content
stringlengths
1
1.04M
input_ids
listlengths
1
774k
ratio_char_token
float64
0.38
22.9
token_count
int64
1
774k
print "Salam Alaikom !" import sys # if statement ------------------------------- if False: print "hi" print "Hello Wolrd!" if True: print "1" print "2" # array -------------------------------------- days = ["Monday", 'Tuesday', 'Wednesday', 'Thursday', 'Friday'] print days[0]; a=1; b=2 # -----------------...
[ 4798, 366, 19221, 321, 42682, 1134, 296, 220, 2474, 628, 198, 11748, 25064, 628, 198, 198, 2, 611, 2643, 34400, 24305, 198, 361, 10352, 25, 198, 197, 4798, 366, 5303, 1, 198, 197, 4798, 366, 15496, 27094, 4372, 2474, 198, 198, 361, ...
2.889474
190
import unittest from app.models import News News=news.News class NewsTest(unittest.TestCase): ''' Test class to test the behaviour of the news class ''' if __name__ == '__main__': unittest.main()
[ 11748, 555, 715, 395, 198, 6738, 598, 13, 27530, 1330, 3000, 198, 198, 9980, 28, 10827, 13, 9980, 198, 198, 4871, 3000, 14402, 7, 403, 715, 395, 13, 14402, 20448, 2599, 198, 220, 220, 220, 705, 7061, 198, 220, 220, 220, 6208, 1398, ...
2.721519
79
"""Implements A* Search functionality.""" from ...helpers import PriorityQueue from ...exceptions import NonexistentNodeError def a_star_search(graph, start, goal): """Runs an A* search on the specified graph to find a path from the ''start'' node to the ''goal'' node. Returns a list of nodes specifying a min...
[ 37811, 3546, 1154, 902, 317, 9, 11140, 11244, 526, 15931, 198, 198, 6738, 2644, 16794, 364, 1330, 34416, 34991, 198, 6738, 2644, 1069, 11755, 1330, 6045, 87, 7609, 19667, 12331, 198, 198, 4299, 257, 62, 7364, 62, 12947, 7, 34960, 11, ...
2.563961
727
# -*- coding: utf-8 -*- # Part of Odoo. See LICENSE file for full copyright and licensing details. import collections import json import itertools import operator from odoo import api, fields, models, tools, _ from odoo.exceptions import ValidationError class SurveyQuestion(models.Model): """ Questions that wil...
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 2, 2142, 286, 10529, 2238, 13, 4091, 38559, 24290, 2393, 329, 1336, 6634, 290, 15665, 3307, 13, 198, 198, 11748, 17268, 198, 11748, 33918, 198, 11748, 340, 861, 10141, 1...
2.731675
8,199
#!/usr/bin/env python import argparse import os import subprocess import tempfile if __name__ == '__main__': p = argparse.ArgumentParser() p.add_argument("-c", "--cluster", default="no-vep") p.add_argument("script") args, unparsed_args = p.parse_known_args() submit(args.script, unparsed_args, ...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 198, 11748, 1822, 29572, 198, 11748, 28686, 198, 11748, 850, 14681, 198, 11748, 20218, 7753, 628, 198, 198, 361, 11593, 3672, 834, 6624, 705, 834, 12417, 834, 10354, 198, 220, 220, 220, ...
2.610687
131
""" Compression using the average of signal as a magnitude """ import numpy as np from .compressor import Compressor class CompressorMagnitude: """ The average of the signal is used to perform the compression on the input data signal. Check the Compressor class on how the thresholding is done with t...
[ 37811, 3082, 2234, 1262, 262, 2811, 286, 6737, 355, 257, 14735, 37227, 198, 198, 11748, 299, 32152, 355, 45941, 198, 198, 6738, 764, 5589, 44292, 1330, 3082, 44292, 628, 198, 4871, 3082, 44292, 48017, 3984, 25, 198, 220, 220, 220, 37227...
2.634703
657
#!/usr/bin/env python3 # -*- coding: utf-8 -*- from wordcloud import WordCloud, ImageColorGenerator from PIL import Image import numpy as np import random if __name__ == '__main__': import re import multidict as multidict text = getFrequencyDictForText(open('lorem-ipsum.txt').read()) mkcloud('lor...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 18, 198, 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 6738, 1573, 17721, 1330, 9678, 18839, 11, 7412, 10258, 8645, 1352, 198, 6738, 350, 4146, 1330, 7412, 198, 11748, 29...
2.538462
143
# -*- coding: utf-8 -*- from enum import Enum # エリア定義
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 6738, 33829, 1330, 2039, 388, 628, 198, 2, 17433, 101, 12675, 11839, 22522, 248, 163, 122, 102, 198 ]
1.75
32
import torch import torch.nn as nn import torch.nn.functional as F from torch.nn.functional import softmax import torch.optim as optim from torch.autograd import Variable import math import numpy as np from utils import write_pkl, read_pkl if __name__ == "__main__": '''self-attention''' ...
[ 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, 201, 198, 6738, 28034, 13, 20471, 13, 45124, 1330, 2705, 9806, 201, 198, 11748, 28034, 13, 4008...
2.112832
452
import os import unittest from main import main from sqlite_dissect.utilities import DotDict class TestCASEExport(unittest.TestCase): """ This class tests a parsing of a file and ensuring that it properly generates a CASE export file. """
[ 11748, 28686, 198, 11748, 555, 715, 395, 198, 198, 6738, 1388, 1330, 1388, 198, 6738, 44161, 578, 62, 6381, 8831, 13, 315, 2410, 1330, 22875, 35, 713, 628, 198, 4871, 6208, 34, 11159, 43834, 7, 403, 715, 395, 13, 14402, 20448, 2599, ...
3.342105
76
#!/usr/bin/python3 import requests from discord.ext import commands TOKEN = "Your Discord token here" OWNER_ID = 0 # Your user ID here RTT_USERNAME = "Realtime Trains API username" RTT_PASSWORD = "Realtime Trains API password" ## BOT SETUP bot = commands.Bot(command_prefix = ">") # Comment to respond to messages from...
[ 2, 48443, 14629, 14, 8800, 14, 29412, 18, 198, 11748, 7007, 198, 6738, 36446, 13, 2302, 1330, 9729, 198, 198, 10468, 43959, 796, 366, 7120, 39462, 11241, 994, 1, 198, 14165, 1137, 62, 2389, 796, 657, 1303, 3406, 2836, 4522, 994, 198, ...
2.846154
156
#Operadores Aritmeticos n1 = int( input('Digite um número: ' ) ) n2 = int( input('Digite outro número: ' ) ) soma = n1 + n2 prod = n1 * n2 div = n1 / n2 divint = n1 // n2 exp = n1 ** n2 resto = n1 % n2 # {: } os dois pontos formatam o valor da mascara conforme as diretrizes #quebra de linha é \n # end= escrever o ...
[ 2, 18843, 324, 2850, 317, 799, 15103, 418, 198, 198, 77, 16, 796, 493, 7, 5128, 10786, 19511, 578, 23781, 299, 21356, 647, 78, 25, 705, 1267, 1267, 198, 77, 17, 796, 493, 7, 5128, 10786, 19511, 578, 503, 305, 299, 21356, 647, 78, ...
2.35443
237
# (C) Copyright 1996-2016 ECMWF. # # This software is licensed under the terms of the Apache Licence Version 2.0 # which can be obtained at http://www.apache.org/licenses/LICENSE-2.0. # In applying this licence, ECMWF does not waive the privileges and immunities # granted to it by virtue of its status as an intergov...
[ 2, 357, 34, 8, 15069, 8235, 12, 5304, 13182, 14326, 37, 13, 198, 2, 220, 198, 2, 770, 3788, 318, 11971, 739, 262, 2846, 286, 262, 24843, 10483, 594, 10628, 362, 13, 15, 198, 2, 543, 460, 307, 6492, 379, 2638, 1378, 2503, 13, 430...
1.859753
1,697
# -*- coding: utf-8 -*- # Resource object code # # Created: Mon Dec 22 15:59:06 2014 # by: The Resource Compiler for PyQt (Qt v4.8.6) # # WARNING! All changes made in this file will be lost! from PyQt4 import QtCore qt_resource_data = "\ \x00\x00\x91\x12\ \x47\ \x49\x46\x38\x39\x61\xca\x00\xec\x00\xe7\xe7\x00\x...
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 198, 2, 20857, 2134, 2438, 198, 2, 198, 2, 15622, 25, 2892, 4280, 2534, 1315, 25, 3270, 25, 3312, 1946, 198, 2, 220, 220, 220, 220, 220, 416, 25, 383, 20857, 3082, ...
1.238986
124,116
#! /bin/python # config store & parse # # @file: config # @time: 2022/02/05 # @author: Mori # import json from tornado.util import ObjectDict global_config = ObjectDict()
[ 2, 0, 1220, 8800, 14, 29412, 198, 2, 4566, 3650, 1222, 21136, 198, 2, 198, 2, 2488, 7753, 25, 4566, 198, 2, 2488, 2435, 25, 33160, 14, 2999, 14, 2713, 198, 2, 2488, 9800, 25, 32709, 198, 2, 198, 198, 11748, 33918, 198, 6738, 337...
2.777778
63
import asyncio from datetime import datetime import serial from logger import root_logger from . import const from .typing import NooliteCommand, BaseNooliteRemote, MotionSensor from typing import Dict, Callable import typing lg = root_logger.getChild('noolite') def _get_tty(tty_name) -> serial.Serial: """ ...
[ 11748, 30351, 952, 198, 6738, 4818, 8079, 1330, 4818, 8079, 198, 198, 11748, 11389, 198, 198, 6738, 49706, 1330, 6808, 62, 6404, 1362, 198, 6738, 764, 1330, 1500, 198, 6738, 764, 774, 13886, 1330, 399, 970, 578, 21575, 11, 7308, 45, 9...
2.375969
258
import pytest from airbyte_dto_factory import * from airbyte_config_model import * @pytest.fixture def dummy_source_dto(): """ Creates a dummy SourceDto """ source = SourceDto() source.source_definition_id = 'ef69ef6e-aa7f-4af1-a01d-ef775033524e' source.source_id = '7d95ec85-47c6-42d4-a7a2-8e5c...
[ 11748, 12972, 9288, 198, 6738, 1633, 26327, 62, 67, 1462, 62, 69, 9548, 1330, 1635, 198, 6738, 1633, 26327, 62, 11250, 62, 19849, 1330, 1635, 198, 198, 31, 9078, 9288, 13, 69, 9602, 198, 4299, 31548, 62, 10459, 62, 67, 1462, 33529, ...
2.009195
2,610
from typing import List class QubotConfigTerminalInfo: """ Abstracts information on the terminal nodes to find. """ class QubotConfigModelParameters: """ Abstracts information on the Q-Learning model parameters. """ def __init__(self, alpha=0.5, gamma=0.6, epsilon=1, decay=0.01, train_ep...
[ 6738, 19720, 1330, 7343, 628, 198, 4871, 1195, 549, 313, 16934, 44798, 282, 12360, 25, 198, 220, 220, 220, 37227, 198, 220, 220, 220, 27741, 82, 1321, 319, 262, 12094, 13760, 284, 1064, 13, 198, 220, 220, 220, 37227, 628, 198, 4871, ...
2.7232
625
#!/usr/bin/env python3 # coding: utf-8 from __future__ import unicode_literals, print_function from collections import Counter from .db import new_session, Tweet import string import re zh = re.compile(r"[\u4e00-\u9fa5]+") other = re.compile(r"[a-zA-Z0-9_]+") bad = ("_ 1 2 3 4 5 I O RT The a and are be bit co com for ...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 18, 198, 2, 19617, 25, 3384, 69, 12, 23, 198, 6738, 11593, 37443, 834, 1330, 28000, 1098, 62, 17201, 874, 11, 3601, 62, 8818, 198, 6738, 17268, 1330, 15034, 198, 6738, 764, 9945, 1330, 64...
2.20237
1,097
from twilio.rest import Client if __name__ == '__main__': from configure import ACCOUNT_SID,AUTO_TOKEN,FROM_NUM,TO_NUM msg = '测试一下,亲爱的路人' send_sms(ACCOUNT_SID,AUTO_TOKEN,FROM_NUM,TO_NUM,msg)
[ 6738, 665, 346, 952, 13, 2118, 1330, 20985, 198, 198, 361, 11593, 3672, 834, 6624, 705, 834, 12417, 834, 10354, 198, 220, 220, 220, 422, 17425, 1330, 15859, 28270, 62, 50, 2389, 11, 39371, 46, 62, 10468, 43959, 11, 10913, 2662, 62, ...
1.897196
107
#!/usr/bin/env python3 import os import sys from pyrevolve import parser from pyrevolve.util import Supervisor here = os.path.dirname(os.path.abspath(__file__)) rvpath = os.path.abspath(os.path.join(here, '..', 'revolve')) sys.path.append(os.path.dirname(os.path.abspath(__file__))) class OnlineEvolutionSupervisor(S...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 18, 198, 11748, 28686, 198, 11748, 25064, 198, 198, 6738, 12972, 18218, 6442, 1330, 30751, 198, 6738, 12972, 18218, 6442, 13, 22602, 1330, 45673, 198, 198, 1456, 796, 28686, 13, 6978, 13, 159...
2.302521
595
#!/usr/bin/python import urllib2 import json import sys from optparse import OptionParser usage = "usage: %prog [options] host" parser = OptionParser(usage = usage) parser.add_option("-t", "--token", dest="token", default="", type='string', help="token") (options, args) = parser.parse_args() if len(args) != 1: p...
[ 2, 48443, 14629, 14, 8800, 14, 29412, 198, 198, 11748, 2956, 297, 571, 17, 198, 11748, 33918, 198, 11748, 25064, 198, 6738, 2172, 29572, 1330, 16018, 46677, 198, 198, 26060, 796, 366, 26060, 25, 4064, 1676, 70, 685, 25811, 60, 2583, 1...
2.812155
181
# -*- coding: utf-8 -*- from __future__ import unicode_literals import re import difflib import logging import functools from string import punctuation as punct from eplist import utils from eplist.episode import Episode from eplist.settings import Settings try: from bs4 import BeautifulSoup Soup = functoo...
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 6738, 11593, 37443, 834, 1330, 28000, 1098, 62, 17201, 874, 198, 198, 11748, 302, 198, 11748, 814, 8019, 198, 11748, 18931, 198, 11748, 1257, 310, 10141, 198, 198, 6738, ...
2.30906
1,744
import os import numpy as np from dylightful.utilities import load_parsed_dyno, get_dir from dylightful.parser import load_env_partners_mixed from dylightful.bar_plot import make_barplot dirname = os.path.dirname(__file__) save_dir = "/media/julian/INTENSO/ZIKV/" name = "ZIKV-Pro-427-1_dynophore" traj_path = save_dir...
[ 11748, 28686, 198, 11748, 299, 32152, 355, 45941, 198, 6738, 288, 2645, 432, 913, 13, 315, 2410, 1330, 3440, 62, 79, 945, 276, 62, 67, 2047, 78, 11, 651, 62, 15908, 198, 6738, 288, 2645, 432, 913, 13, 48610, 1330, 3440, 62, 24330, ...
2.334545
550
from typing import Optional import click from click import Context from opta.exceptions import UserErrors @click.command() @click.pass_context @click.argument("command", required=False) def help(context: Context, command: Optional[str]) -> None: """ Get help for Opta. Example: opta help opta ...
[ 6738, 19720, 1330, 32233, 198, 198, 11748, 3904, 198, 6738, 3904, 1330, 30532, 198, 198, 6738, 2172, 64, 13, 1069, 11755, 1330, 11787, 9139, 5965, 628, 198, 31, 12976, 13, 21812, 3419, 198, 31, 12976, 13, 6603, 62, 22866, 198, 31, 129...
2.684982
273
from django.conf.urls.defaults import * from django.contrib.comments.feeds import LatestCommentsFeed from django.views.generic.simple import direct_to_template, redirect_to from codereviewr.settings import PROJECT_PATH, DEBUG from codereviewr.feeds import * #feeds dictionary feeds = { 'code': CodeFeed, 'comments': ...
[ 171, 119, 123, 6738, 42625, 14208, 13, 10414, 13, 6371, 82, 13, 12286, 82, 1330, 1635, 198, 6738, 42625, 14208, 13, 3642, 822, 13, 15944, 13, 12363, 82, 1330, 26603, 23903, 18332, 198, 6738, 42625, 14208, 13, 33571, 13, 41357, 13, 364...
2.458891
523
'''Train CIFAR10 with PyTorch.''' import torch import random import os import argparse from model import get_model from data import get_data, make_planeloader from utils import get_loss_function, get_scheduler, get_random_images, produce_plot, get_noisy_images, AttackPGD from evaluation import decision_boundary from ...
[ 7061, 6, 44077, 327, 5064, 1503, 940, 351, 9485, 15884, 354, 2637, 7061, 198, 11748, 28034, 198, 11748, 4738, 198, 198, 11748, 28686, 198, 11748, 1822, 29572, 198, 198, 6738, 2746, 1330, 651, 62, 19849, 198, 6738, 1366, 1330, 651, 62, ...
2.314073
1,073
"""flatten.py -- Flattens HDF5 dataset. """ import glob import math import os import h5py import numpy as np import scipy.io def flatten(source: str, dest: str, packets_per_chunk: int = 1000, synthetic: bool = False, silent: bool = True, constant_features_path: str = 'constant_features.mat') -> (int, in...
[ 37811, 2704, 41769, 13, 9078, 1377, 1610, 1078, 641, 5572, 37, 20, 27039, 13, 198, 37811, 198, 198, 11748, 15095, 198, 11748, 10688, 198, 11748, 28686, 198, 198, 11748, 289, 20, 9078, 198, 11748, 299, 32152, 355, 45941, 198, 11748, 629,...
2.133489
3,416
import string import unicodedata SLUG_CHARS_DISPLAY = '[a-z0-9-]' _SLUG_CHARS = string.ascii_lowercase + string.digits + '-' _SLUG_SIZE = 50 def slugify(text): '''Returns the slug of a string (that can be used in an URL for example.''' slug = unicodedata.normalize('NFKD', text).encode('ascii', 'ignore') ...
[ 11748, 4731, 198, 11748, 28000, 9043, 1045, 198, 198, 8634, 7340, 62, 3398, 27415, 62, 26288, 31519, 796, 44438, 64, 12, 89, 15, 12, 24, 12, 49946, 628, 198, 62, 8634, 7340, 62, 3398, 27415, 796, 4731, 13, 292, 979, 72, 62, 21037, ...
2.505435
184
from scapy.all import * ap_list = [] sniff(iface='en0', prn=ssid, count=10, timeout=3, store=0) # for packet in sniff(offline='sample.pcap', prn=changePacketParameters): # packets.append(packet) # for packet in packets: # if packet.haslayer(TCP): # writeToPcapFile(packet) # print(packet.show(...
[ 6738, 629, 12826, 13, 439, 1330, 1635, 198, 198, 499, 62, 4868, 796, 17635, 198, 198, 16184, 733, 7, 361, 558, 11639, 268, 15, 3256, 778, 77, 28, 824, 312, 11, 954, 28, 940, 11, 26827, 28, 18, 11, 3650, 28, 15, 8, 198, 2, 329,...
2.333333
138
import capnp import tarfile import io from .session import get_active_session from ..common import RainException, ids, ID from ..common.attributes import attributes_to_capnp from ..common.content_type import check_content_type, encode_value from ..common import DataType def blob(value, label="const", content_type=N...
[ 11748, 1451, 37659, 198, 11748, 13422, 7753, 198, 11748, 33245, 198, 198, 6738, 764, 29891, 1330, 651, 62, 5275, 62, 29891, 198, 6738, 11485, 11321, 1330, 10301, 16922, 11, 220, 2340, 11, 4522, 198, 6738, 11485, 11321, 13, 1078, 7657, 1...
2.624876
1,005
# Copyright 2021 NVIDIA Corporation # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in wr...
[ 2, 15069, 33448, 15127, 10501, 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, 73...
3.703518
199
""" Django settings for backend project. Generated by 'django-admin startproject' using Django 2.1.4. Since the start of the project, we have upgraded the version to 2.1.7 For more information on this file, see https://docs.djangoproject.com/en/2.1/topics/settings/ For the full list of settings and their va...
[ 37811, 201, 198, 35, 73, 14208, 6460, 329, 30203, 1628, 13, 201, 198, 201, 198, 8645, 515, 416, 705, 28241, 14208, 12, 28482, 923, 16302, 6, 1262, 37770, 362, 13, 16, 13, 19, 13, 201, 198, 6385, 262, 923, 286, 262, 1628, 11, 356, ...
2.356279
2,150
from openrec.tf1.recommenders.recommender import Recommender from openrec.tf1.recommenders.bpr import BPR from openrec.tf1.recommenders.pmf import PMF from openrec.tf1.recommenders.ucml import UCML from openrec.tf1.recommenders.vbpr import VBPR from openrec.tf1.recommenders.vanilla_youtube_rec import VanillaYouTubeRec ...
[ 6738, 1280, 8344, 13, 27110, 16, 13, 47335, 7338, 13, 47335, 2194, 1330, 19237, 2194, 198, 6738, 1280, 8344, 13, 27110, 16, 13, 47335, 7338, 13, 65, 1050, 1330, 347, 4805, 198, 6738, 1280, 8344, 13, 27110, 16, 13, 47335, 7338, 13, 4...
3.115108
139
import copy import itertools import os import time import numpy as np import pandas as pd import scipy.io as scio import yaml import factorAnalysisIOTools as IOTools from factorAnalysisCalTools import prepare_RET_dict, time_horizon_dict if __name__ == '__main__': config_path = r"D:\HX_proj\factorAnalysi...
[ 11748, 4866, 198, 11748, 340, 861, 10141, 198, 11748, 28686, 198, 11748, 640, 198, 198, 11748, 299, 32152, 355, 45941, 198, 11748, 19798, 292, 355, 279, 67, 198, 11748, 629, 541, 88, 13, 952, 355, 629, 952, 198, 11748, 331, 43695, 198...
2.660131
306
""" Running operational space control with the PyGame display. The arm will move the end-effector to a target orientation, which can be changed by pressing the left/right arrow keys. """ import numpy as np from os import environ environ['PYGAME_HIDE_SUPPORT_PROMPT'] = '1' import pygame from abr_control.arms import thr...
[ 37811, 198, 28768, 13919, 2272, 1630, 351, 262, 9485, 8777, 3359, 13, 383, 3211, 481, 198, 21084, 262, 886, 12, 10760, 273, 284, 257, 2496, 12852, 11, 543, 460, 307, 3421, 416, 198, 8439, 278, 262, 1364, 14, 3506, 15452, 8251, 13, 1...
2.649539
759
# coding=utf-8 import pytest import epab.utils from epab.utils import _next_version as nv @pytest.mark.long
[ 2, 19617, 28, 40477, 12, 23, 198, 11748, 12972, 9288, 198, 198, 11748, 2462, 397, 13, 26791, 198, 6738, 2462, 397, 13, 26791, 1330, 4808, 19545, 62, 9641, 355, 299, 85, 628, 198, 31, 9078, 9288, 13, 4102, 13, 6511, 198 ]
2.707317
41
from __future__ import absolute_import from irods.message import iRODSMessage, StringStringMap, RodsHostAddress, STR_PI, MsParam, MsParamArray, RuleExecutionRequest from irods.api_number import api_number from io import open as io_open from irods.message import Message, StringProperty
[ 6738, 11593, 37443, 834, 1330, 4112, 62, 11748, 198, 6738, 1312, 305, 9310, 13, 20500, 1330, 1312, 49, 3727, 12310, 7589, 11, 10903, 10100, 13912, 11, 6882, 82, 17932, 20231, 11, 19269, 62, 11901, 11, 6997, 22973, 11, 6997, 22973, 19182...
3.54321
81
# Array showing guitar string's relative pitches, in semi-tones, with "0" being low E # ["Low E", "A", "D", "G", "B", "High E"] strings = [40, 45, 50, 55, 60, 65];
[ 2, 15690, 4478, 10047, 4731, 338, 3585, 22421, 11, 287, 10663, 12, 36257, 11, 351, 366, 15, 1, 852, 1877, 412, 198, 2, 14631, 20535, 412, 1600, 366, 32, 1600, 366, 35, 1600, 366, 38, 1600, 366, 33, 1600, 366, 11922, 412, 8973, 198...
2.762712
59
from apscheduler.schedulers.background import BackgroundScheduler from apscheduler.triggers.cron import CronTrigger from kalliope.core.ConfigurationManager import BrainLoader from kalliope.core.SynapseLauncher import SynapseLauncher from kalliope.core import Utils from kalliope.core.Models import Event
[ 6738, 257, 862, 1740, 18173, 13, 1416, 704, 377, 364, 13, 25249, 1330, 25353, 50, 1740, 18173, 198, 6738, 257, 862, 1740, 18173, 13, 2213, 328, 5355, 13, 66, 1313, 1330, 31683, 48344, 198, 198, 6738, 479, 36546, 3008, 13, 7295, 13, ...
3.517241
87
""" turtle-example-suite: tdemo_nim.py Play nim against the computer. The player who takes the last stick jest the winner. Implements the model-view-controller design pattern. """ zaimportuj turtle zaimportuj random zaimportuj time SCREENWIDTH = 640 SCREENHEIGHT = 480 MINSTICKS = 7 MAXSTICKS = 3...
[ 37811, 220, 220, 220, 220, 220, 28699, 12, 20688, 12, 2385, 578, 25, 628, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 256, 9536, 78, 62, 77, 320, 13, 9078, 198, 198, 11002, 299, 320, 1028, 262, 3644, 13, 383, 2137, 19...
2.036045
1,942
#Author : Nemuel Wainaina import socket from colorama import init, Fore #some color, haha init() GREEN = Fore.GREEN BLUE = Fore.BLUE RED = Fore.RED GRAY = Fore.LIGHTBLACK_EX RESET = Fore.RESET def is_port_open(target, port): ''' This function simply attempts to create a connection to the ...
[ 2, 13838, 1058, 22547, 2731, 370, 391, 42183, 201, 198, 201, 198, 11748, 17802, 201, 198, 6738, 3124, 1689, 1330, 2315, 11, 4558, 201, 198, 201, 198, 2, 11246, 3124, 11, 42254, 201, 198, 15003, 3419, 201, 198, 43016, 796, 4558, 13, ...
2.324051
395
import numpy as np import os import json import cv2 import sys np.random.seed(2020) # to ensure you always get the same train/test split data_path = '../data/RedLights2011_Medium' gts_path = '../data/hw02_annotations' split_path = '../data/hw02_splits' os.makedirs(split_path, exist_ok=True) # create directory if nee...
[ 11748, 299, 32152, 355, 45941, 198, 11748, 28686, 198, 11748, 33918, 198, 198, 11748, 269, 85, 17, 198, 11748, 25064, 198, 198, 37659, 13, 25120, 13, 28826, 7, 42334, 8, 1303, 284, 4155, 345, 1464, 651, 262, 976, 4512, 14, 9288, 6626,...
2.503356
745
import logging from watchFaceParser.models.elements.basic.compositeElement import CompositeElement
[ 171, 119, 123, 11748, 18931, 198, 198, 6738, 2342, 32388, 46677, 13, 27530, 13, 68, 3639, 13, 35487, 13, 785, 1930, 578, 20180, 1330, 49355, 20180, 628, 628, 628, 628, 198 ]
3.516129
31
import logging import time import typing from urllib.parse import urlparse, parse_qs import fire YGO_SCHEME = 'ygo' YGO_NETLOC = 'deck' DEFAULT_HEADER = '#created by ...\n' CARD_SEP_SYM = '_' CARD_MULTI_SYM = '*' DEFAULT_SYM = '#' NO_SYM = '!' MAIN_HEADER = 'main\n' EXTRA_HEADER = 'extra\n' SIDE_HEADER = 'side\n' ...
[ 11748, 18931, 198, 11748, 640, 198, 11748, 19720, 198, 6738, 2956, 297, 571, 13, 29572, 1330, 19016, 29572, 11, 21136, 62, 48382, 198, 198, 11748, 2046, 198, 198, 56, 11230, 62, 50, 3398, 3620, 36, 796, 705, 88, 2188, 6, 198, 56, 11...
2.165854
205
# -*- coding: utf-8 -*- """Tests for the MDWeb Navigation parser. Tests to write * Handle symlinks * File already open * Non supported extension (.xls) * Permissions Maybe test? * atime, mtime * large file """ import datetime from pyfakefs import fake_filesystem_unittest from unittest import skip try: ...
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 37811, 51, 3558, 329, 262, 10670, 13908, 42115, 30751, 13, 198, 198, 51, 3558, 284, 3551, 198, 220, 1635, 33141, 5659, 28751, 198, 220, 1635, 9220, 1541, 1280, 198, 220,...
2.538434
8,456
if __name__ == '__main__': run()
[ 628, 628, 198, 198, 361, 11593, 3672, 834, 6624, 705, 834, 12417, 834, 10354, 198, 220, 220, 220, 1057, 3419, 628 ]
2.095238
21
# This is actually not even needed apparently # pytest_plugins = ["harvest"]
[ 2, 770, 318, 1682, 407, 772, 2622, 5729, 198, 2, 12972, 9288, 62, 37390, 796, 14631, 9869, 4223, 8973 ]
4
19
#fly from .ModelIO import ModelIO from .ModelConfig import ModelConfig
[ 2, 12254, 201, 198, 6738, 764, 17633, 9399, 1330, 9104, 9399, 201, 198, 6738, 764, 17633, 16934, 1330, 9104, 16934, 201, 198, 201, 198 ]
3.166667
24
""" Simple data classes for storing feedback to present to learners. """ __all__ = ['Feedback', 'FeedbackKind', 'FeedbackCategory', "CompositeFeedbackFunction", "FeedbackResponse"] from pedal.core.formatting import FeedbackFieldWrapper from pedal.core.location import Location from pedal.core.rep...
[ 37811, 198, 26437, 1366, 6097, 329, 23069, 7538, 284, 1944, 284, 46184, 13, 198, 37811, 198, 198, 834, 439, 834, 796, 37250, 18332, 1891, 3256, 705, 18332, 1891, 35854, 3256, 705, 18332, 1891, 27313, 3256, 198, 220, 220, 220, 220, 220, ...
2.733392
4,546
from pathlib import Path from fhir.resources.codesystem import CodeSystem from oops_fhir.utils import CodeSystemConcept __all__ = ["PrecisionEstimateType"] _resource = CodeSystem.parse_file(Path(__file__).with_suffix(".json")) class PrecisionEstimateType: """ PrecisionEstimateType Method of reportin...
[ 6738, 3108, 8019, 1330, 10644, 198, 198, 6738, 277, 71, 343, 13, 37540, 13, 40148, 6781, 1330, 6127, 11964, 198, 198, 6738, 267, 2840, 62, 69, 71, 343, 13, 26791, 1330, 6127, 11964, 3103, 984, 628, 198, 834, 439, 834, 796, 14631, 67...
2.466102
590
""" Author : A. Emerick Date : May 2016 Purpose: """ __author__ = "aemerick <emerick@astro.columbia.edu>" # external import numpy as np #from collections import OrderedDict import os, h5py from scipy.interpolate import interp1d try: import dill as pickle except: print("WARNING: Dill unavail...
[ 37811, 628, 220, 220, 220, 6434, 1058, 317, 13, 10320, 624, 198, 220, 220, 220, 7536, 220, 220, 1058, 1737, 1584, 628, 220, 220, 220, 32039, 25, 198, 198, 37811, 198, 198, 834, 9800, 834, 796, 366, 64, 24677, 624, 1279, 24677, 624, ...
1.956987
17,646
""" Graphing the program flow module. This module aids in understanding the flow of program by creating a visual map (network graph or map) of the program flow path. The graph map is in DOT and GML (XML) types. !!! warning "Required installation" * pycallgraph (run `pip install pycallgraph`) * [Graphviz](http...
[ 37811, 198, 38, 2416, 722, 262, 1430, 5202, 8265, 13, 198, 198, 1212, 8265, 31378, 287, 4547, 262, 5202, 286, 1430, 416, 4441, 257, 5874, 3975, 357, 27349, 4823, 393, 198, 8899, 8, 286, 262, 1430, 5202, 3108, 13, 383, 4823, 3975, 31...
2.217472
2,690
# A Discord bot that does typical dad things # By Jason Saini and James Nguyen # Created: January 31, 2021 # Modified: January 20, 2022 import discord from os import getenv from requests import get, Session from dadjokes import Dadjoke from pyowm import OWM from dotenv import load_dotenv import yfinance as yf # setup...
[ 2, 317, 39462, 10214, 326, 857, 7226, 9955, 1243, 198, 2, 2750, 8982, 311, 391, 72, 290, 3700, 42379, 198, 2, 15622, 25, 3269, 3261, 11, 33448, 198, 2, 40499, 25, 3269, 1160, 11, 33160, 198, 198, 11748, 36446, 198, 6738, 28686, 1330...
2.788732
284
import getopt import shlex from config import config from dogbot.cqsdk.utils import reply from dogbot.models import * def material(bot, message): """用法: -material [-h] [-r [-o]] 职业 -h : 打印本帮助 -r : 逆查 -o : 珠子逆查 职业 : 职业名, 可以是日文原文或者黑话. 原文一概采用未cc的初始职业名. 也接受单位的日文原文或者黑话. 例: -matrial...
[ 11748, 651, 8738, 198, 11748, 427, 2588, 198, 198, 6738, 4566, 1330, 4566, 198, 6738, 3290, 13645, 13, 66, 80, 21282, 74, 13, 26791, 1330, 10971, 198, 6738, 3290, 13645, 13, 27530, 1330, 1635, 628, 198, 4299, 2587, 7, 13645, 11, 3275,...
1.608961
1,964
import torch import torch.nn as nn import torch.nn.functional as F import caption.utils.inference import caption.decoders.vanilla from framework.modules.embeddings import Embedding from framework.modules.global_attention import GlobalAttention
[ 11748, 28034, 198, 11748, 28034, 13, 20471, 355, 299, 77, 198, 11748, 28034, 13, 20471, 13, 45124, 355, 376, 198, 198, 11748, 8305, 13, 26791, 13, 259, 4288, 198, 198, 11748, 8305, 13, 12501, 375, 364, 13, 10438, 5049, 198, 6738, 9355...
3.686567
67
import pytest @pytest.mark.parametrize(['x', 'y', 'ans'], [(1, 1, 2), (1, 2, 3), (1, 3, 4), (1, 4, 5)]) @pytest.mark.parametrize(['x', 'y', 'ans'], [(1, 1, 2), py...
[ 11748, 12972, 9288, 628, 198, 31, 9078, 9288, 13, 4102, 13, 17143, 316, 380, 2736, 7, 17816, 87, 3256, 705, 88, 3256, 705, 504, 6, 4357, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 2...
1.423377
385
""" This is a demonstration of xml.etree (part of the standard library), which is used to parse, modify and create XML files. """ import xml.etree.ElementTree as ET tree = ET.parse('country_data.xml') root = tree.getroot() # The top level tag. print(root.tag) # The tag of the first sub-element. print(root[0].tag) #...
[ 37811, 198, 1212, 318, 257, 13646, 286, 35555, 13, 316, 631, 357, 3911, 286, 262, 3210, 5888, 828, 543, 318, 973, 198, 1462, 21136, 11, 13096, 290, 2251, 23735, 3696, 13, 198, 37811, 198, 198, 11748, 35555, 13, 316, 631, 13, 20180, ...
2.60219
274
from django.db import models from django.db.models import CASCADE from schedule.models.calendar import Calendar from schedule.models.eventType import EventType
[ 6738, 42625, 14208, 13, 9945, 1330, 4981, 198, 6738, 42625, 14208, 13, 9945, 13, 27530, 1330, 35106, 34, 19266, 198, 6738, 7269, 13, 27530, 13, 9948, 9239, 1330, 26506, 198, 6738, 7269, 13, 27530, 13, 15596, 6030, 1330, 8558, 6030, 628 ...
3.926829
41
"""Prints name and description of available network adapters.""" import sys import pysoem if __name__ == '__main__': print('script started') if len(sys.argv) > 1: read_eeprom_of_first_slave(sys.argv[1]) else: print('give ifname as script argument')
[ 37811, 18557, 82, 1438, 290, 6764, 286, 1695, 3127, 46363, 526, 15931, 198, 198, 11748, 25064, 198, 11748, 12972, 568, 368, 628, 198, 198, 361, 11593, 3672, 834, 6624, 705, 834, 12417, 834, 10354, 628, 220, 220, 220, 3601, 10786, 12048,...
2.59633
109
from scan_lib import nero as n CONSTANT_EPOH = 100 CONSTANT_EPOH_1 = 10
[ 6738, 9367, 62, 8019, 1330, 299, 3529, 355, 299, 198, 198, 10943, 2257, 8643, 62, 8905, 12096, 796, 1802, 198, 10943, 2257, 8643, 62, 8905, 12096, 62, 16, 796, 838, 628, 628, 628 ]
2.363636
33
"""Shows a sample tklife application""" from tkinter import StringVar, Widget from tkinter.constants import END from tkinter.ttk import Button, Entry, Label from .widgets import NewTable from .constants import COLUMNSPAN, PADX, PADY from .mixins import generate_event_for from . import Main from .arrange import Autogri...
[ 37811, 2484, 1666, 257, 6291, 256, 74, 6042, 3586, 37811, 198, 198, 6738, 256, 74, 3849, 1330, 10903, 19852, 11, 370, 17484, 198, 6738, 256, 74, 3849, 13, 9979, 1187, 1330, 23578, 198, 6738, 256, 74, 3849, 13, 926, 74, 1330, 20969, ...
2.910615
179
# -*- coding: utf-8 -*- ########################################################################### # Copyright (c), The AiiDA team. All rights reserved. # # This file is part of the AiiDA code. # # ...
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 29113, 29113, 7804, 21017, 198, 2, 15069, 357, 66, 828, 383, 317, 4178, 5631, 1074, 13, 1439, 2489, 10395, 13, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, ...
2.49507
3,955
# # This source file is part of the EdgeDB open source project. # # Copyright 2019-present MagicStack Inc. and the EdgeDB authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http...
[ 2, 198, 2, 770, 2723, 2393, 318, 636, 286, 262, 13113, 11012, 1280, 2723, 1628, 13, 198, 2, 198, 2, 15069, 13130, 12, 25579, 6139, 25896, 3457, 13, 290, 262, 13113, 11012, 7035, 13, 198, 2, 198, 2, 49962, 739, 262, 24843, 13789, 1...
3.250789
634
from .dataset import validate_dataset from .metadata import validate_source_metadata, validate_view_metadata from .project import validate_project from .views import validate_views
[ 6738, 764, 19608, 292, 316, 1330, 26571, 62, 19608, 292, 316, 198, 6738, 764, 38993, 1330, 26571, 62, 10459, 62, 38993, 11, 26571, 62, 1177, 62, 38993, 198, 6738, 764, 16302, 1330, 26571, 62, 16302, 198, 6738, 764, 33571, 1330, 26571, ...
4.113636
44
import sys from ViaBTCAPI.ViaBTCAPI import ViaBTCAPI EXCHANGE_URL = "http://localhost:8080/" USER_ID = 1 USER_ID_2 = 2 UPDATE_MONEY = 0.1 ORDER_PRICE = 0.1 if len(sys.argv) > 1: EXCHANGE_URL = sys.argv[1] api = ViaBTCAPI(EXCHANGE_URL) # get consts from exchange resp = api.market_list() m = resp["result"][0] mar...
[ 11748, 25064, 198, 6738, 33356, 35964, 17614, 13, 30754, 35964, 17614, 1330, 33356, 35964, 17614, 198, 198, 6369, 3398, 27746, 62, 21886, 796, 366, 4023, 1378, 36750, 25, 1795, 1795, 30487, 198, 29904, 62, 2389, 796, 352, 198, 29904, 62, ...
2.490909
770
# HelpMate Speech Synthesis Connection 2020 from google.cloud import texttospeech # Instantiates a client client = texttospeech.TextToSpeechClient() # Set the text input to be synthesized synthesis_input = texttospeech.types.SynthesisInput(text="Hello, World!") # Build the voice request, select the language code ("...
[ 2, 10478, 44, 378, 24709, 26375, 8497, 26923, 12131, 198, 198, 6738, 23645, 13, 17721, 1330, 2420, 83, 418, 431, 3055, 198, 198, 2, 2262, 17096, 689, 257, 5456, 198, 16366, 796, 2420, 83, 418, 431, 3055, 13, 8206, 2514, 5248, 3055, ...
3.107872
343
import re import json from typing import Optional, List, Dict from . import operators from .models.baseoperator import BaseOperator from .dagrun import DAGRun from ..cache import TriggerflowCache from .other.notebook import display_graph
[ 11748, 302, 198, 11748, 33918, 198, 198, 6738, 19720, 1330, 32233, 11, 7343, 11, 360, 713, 198, 198, 6738, 764, 1330, 12879, 198, 6738, 764, 27530, 13, 8692, 46616, 1330, 7308, 18843, 1352, 198, 6738, 764, 67, 363, 5143, 1330, 360, 47...
3.825397
63
# Copyright (C) 2013, Maxime Biais <maxime@biais.org> from .market import Market import time import base64 import hmac import urllib.request import urllib.parse import urllib.error import urllib.request import urllib.error import urllib.parse import hashlib import sys import json import re import logging import config...
[ 2, 15069, 357, 34, 8, 2211, 11, 5436, 524, 347, 544, 271, 1279, 9806, 524, 31, 23339, 271, 13, 2398, 29, 198, 198, 6738, 764, 10728, 1330, 5991, 198, 11748, 640, 198, 11748, 2779, 2414, 198, 11748, 289, 20285, 198, 11748, 2956, 297,...
3.188119
101
"""add_pending_artifact Revision ID: 0f81e9efc84a Revises: 61a1763b9c8d Create Date: 2019-10-24 15:13:36.705288 """ import zeus.db.types from alembic import op import sqlalchemy as sa # revision identifiers, used by Alembic. revision = "0f81e9efc84a" down_revision = "61a1763b9c8d" branch_labels = () depends_on = No...
[ 37811, 2860, 62, 79, 1571, 62, 433, 29660, 198, 198, 18009, 1166, 4522, 25, 657, 69, 6659, 68, 24, 891, 66, 5705, 64, 198, 18009, 2696, 25, 8454, 64, 1558, 5066, 65, 24, 66, 23, 67, 198, 16447, 7536, 25, 13130, 12, 940, 12, 1731...
2.338129
139
""" Copyright 2021 supakeen 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, publish, distribute, sublicens...
[ 37811, 198, 15269, 33448, 7418, 539, 268, 198, 198, 5990, 3411, 318, 29376, 7520, 11, 1479, 286, 3877, 11, 284, 597, 1048, 16727, 257, 4866, 286, 198, 5661, 3788, 290, 3917, 10314, 3696, 357, 1169, 366, 25423, 12340, 284, 1730, 287, 1...
3.212435
772
my_coro = simple_coroutine() next(my_coro) my_coro.send(42)
[ 198, 1820, 62, 10215, 78, 796, 2829, 62, 10215, 28399, 3419, 198, 19545, 7, 1820, 62, 10215, 78, 8, 198, 1820, 62, 10215, 78, 13, 21280, 7, 3682, 8 ]
2.068966
29
from django.conf.urls.defaults import * urlpatterns = patterns('', url(r'^trigger-500$', 'sentry.tests.views.raise_exc', name='sentry-raise-exc'), url(r'^', include('sentry.urls')), )
[ 6738, 42625, 14208, 13, 10414, 13, 6371, 82, 13, 12286, 82, 1330, 1635, 198, 198, 6371, 33279, 82, 796, 7572, 10786, 3256, 198, 220, 220, 220, 19016, 7, 81, 6, 61, 46284, 12, 4059, 3, 3256, 705, 82, 13000, 13, 41989, 13, 33571, 13...
2.443038
79
from pathlib import Path from subprocess import PIPE, run # nosec from typing import List from cruft import exceptions def get_diff(repo0: Path, repo1: Path) -> str: """Compute the raw diff between two repositories.""" try: diff = run( _git_diff("--no-ext-diff", "--no-color", str(repo0)...
[ 6738, 3108, 8019, 1330, 10644, 198, 6738, 850, 14681, 1330, 350, 4061, 36, 11, 1057, 220, 1303, 9686, 66, 198, 6738, 19720, 1330, 7343, 198, 198, 6738, 4630, 701, 1330, 13269, 628, 198, 198, 4299, 651, 62, 26069, 7, 260, 7501, 15, 2...
2.625185
675
from octopus.lib import dataobj BASE_ARTICLE_STRUCT = { "fields": { "id": {"coerce": "unicode"}, # Note that we'll leave these in for ease of use by the "created_date": {"coerce": "utcdatetime"}, # caller, but we'll need to ignore them on the conversion "last_updated": {"coe...
[ 6738, 19318, 25790, 13, 8019, 1330, 1366, 26801, 198, 198, 33, 11159, 62, 7227, 31419, 62, 46126, 796, 1391, 198, 220, 220, 220, 366, 25747, 1298, 1391, 198, 220, 220, 220, 220, 220, 220, 220, 366, 312, 1298, 19779, 1073, 263, 344, ...
1.60493
2,840
import sys from random import * def dispatch_gen(settings, rmgseed = 0): """ Short function that prepares map generation and then dispatches to generation modules """ # Seed with a specific seed if one was provided if rmgseed != 0: print("seed:" + str(rmgseed)) seed(rmgseed) module_name = "modules.%s._...
[ 11748, 25064, 198, 6738, 4738, 1330, 1635, 198, 198, 4299, 27965, 62, 5235, 7, 33692, 11, 374, 11296, 28826, 796, 657, 2599, 198, 197, 37811, 198, 197, 197, 16438, 2163, 326, 25978, 3975, 5270, 198, 197, 197, 392, 788, 4596, 20981, 28...
2.763689
347
#!/usr/bin/env python """ metrics.py Metrics calculation for the analysis/report part of the openff-benchmark workflow By: David F. Hahn Version: Nov 25 2020 """ import numpy as np from rdkit import Chem from rdkit.Chem import TorsionFingerprints def calc_tfd(ref_mol, query_mol): """ Calculate Torsio...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 198, 37811, 198, 4164, 10466, 13, 9078, 198, 198, 9171, 10466, 17952, 329, 262, 3781, 14, 13116, 636, 286, 262, 1280, 487, 12, 26968, 4102, 30798, 198, 198, 3886, 25, 220, 220, 220, ...
2.393858
749
from simple_rest_client.resource import AsyncResource, Resource films_actions = { 'list': { 'method': 'GET', 'url': 'films' }, 'retrieve': { 'method': 'GET', 'url': 'films/{}', }, 'schema': { 'method': 'GET', 'url': 'films/schema', }, } people_a...
[ 6738, 2829, 62, 2118, 62, 16366, 13, 31092, 1330, 1081, 13361, 26198, 11, 20857, 628, 198, 10379, 907, 62, 4658, 796, 1391, 198, 220, 220, 220, 705, 4868, 10354, 1391, 198, 220, 220, 220, 220, 220, 220, 220, 705, 24396, 10354, 705, ...
1.825542
877
#!/usr/bin/env python ''' Generates an EdX style XML question from the provided YAML question file. ''' from pathlib import Path from random import sample import click import yaml from lxml import etree @click.command() @click.argument('file_name') if __name__ == '__main__': gen()
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 7061, 6, 198, 8645, 689, 281, 1717, 55, 3918, 23735, 1808, 422, 262, 2810, 575, 2390, 43, 1808, 2393, 13, 198, 7061, 6, 198, 6738, 3108, 8019, 1330, 10644, 198, 6738, 4738, 1330, 629...
3.073684
95
#Python3 #Permite calcular cuantos años han sido bisiestos en un rango de años ###### DEFINICIONES ###### ###### IMPLEMENTACION ###### an1 = int(input("Digite el año mayor que desea comparar ")) an2 = int(input("Digite el año menor ")) dif = an1 - an2 cont = 0 for indice in range (an2, an1+1): if...
[ 2, 37906, 18, 198, 198, 2, 5990, 32937, 2386, 10440, 18912, 415, 418, 257, 12654, 418, 289, 272, 9785, 78, 47457, 6386, 418, 551, 555, 374, 14208, 390, 257, 12654, 418, 220, 198, 198, 4242, 2235, 197, 197, 197, 197, 197, 7206, 20032...
2.310484
248
import supriya.osc from supriya.commands.Request import Request from supriya.enums import RequestId class GroupFreeAllRequest(Request): """ A /g_freeAll request. :: >>> import supriya >>> server = supriya.Server.default().boot() >>> group = supriya.Group().allocate() >>> ...
[ 11748, 424, 3448, 3972, 13, 17500, 198, 6738, 424, 3448, 3972, 13, 9503, 1746, 13, 18453, 1330, 19390, 198, 6738, 424, 3448, 3972, 13, 268, 5700, 1330, 19390, 7390, 628, 198, 4871, 4912, 11146, 3237, 18453, 7, 18453, 2599, 198, 220, 2...
1.89375
1,280
from itertools import chain from logging import info import torch from mylog import log from memory.trajectory import Trajectory from optimizer import setup_optimizer from agents.on_policy.online_agent import OnlineAgent from actors.on_policy.online_actor import OnlineActor from critics.on_policy.online_critic impor...
[ 6738, 340, 861, 10141, 1330, 6333, 198, 6738, 18931, 1330, 7508, 198, 198, 11748, 28034, 198, 198, 6738, 616, 6404, 1330, 2604, 198, 6738, 4088, 13, 9535, 752, 652, 1330, 4759, 752, 652, 198, 6738, 6436, 7509, 1330, 9058, 62, 40085, 7...
3.243697
238
import logging import os import sys sys.path.append('..') import itertools import json import random import torch from misc import util
[ 11748, 18931, 198, 11748, 28686, 198, 11748, 25064, 198, 17597, 13, 6978, 13, 33295, 10786, 492, 11537, 198, 11748, 340, 861, 10141, 198, 11748, 33918, 198, 11748, 4738, 198, 198, 11748, 28034, 198, 198, 6738, 12747, 1330, 7736, 628, 198 ...
3.5
40
""" This module is used in `SaveDICOM_Image.py` and used as the optional argument `parametric_map` in write functions of `Classes.py` and in "writeNewPixelArray" of `DeveloperTools.py`. The functions in this module capture special versions of DICOM with unique parameters/attributes/values. **How to use:** provide the...
[ 37811, 198, 1212, 8265, 318, 973, 287, 4600, 16928, 35, 2149, 2662, 62, 5159, 13, 9078, 63, 290, 973, 355, 262, 11902, 4578, 4600, 17143, 19482, 62, 8899, 63, 287, 3551, 5499, 286, 4600, 9487, 274, 13, 9078, 63, 290, 287, 366, 13564...
2.606784
796
from datetime import timedelta, datetime from airflow import DAG from airflow.operators.dummy_operator import DummyOperator from airflow import AirflowException args = { "owner": "dataroots", "start_date": datetime(2020, 10, 12), } with DAG( dag_id="example_dag", catchup=False, max_active_runs=1,...
[ 6738, 4818, 8079, 1330, 28805, 12514, 11, 4818, 8079, 198, 198, 6738, 45771, 1330, 360, 4760, 198, 6738, 45771, 13, 3575, 2024, 13, 67, 13513, 62, 46616, 1330, 360, 13513, 18843, 1352, 198, 6738, 45771, 1330, 3701, 11125, 16922, 198, 19...
2.196721
305
import pytest from stellar_sdk import BumpSequence, Operation from . import *
[ 11748, 12972, 9288, 198, 198, 6738, 25041, 62, 21282, 74, 1330, 347, 931, 44015, 594, 11, 14680, 198, 198, 6738, 764, 1330, 1635, 628 ]
3.375
24
# Purpose: Implement time stepping scheme to solve individual and coupled state equations # Record of revisions: # Date Programmer Description of change # ======== ============= ===================== # 09-2020 A. Elkouk Original code import numpy as np # --------------------------------...
[ 2, 32039, 25, 48282, 640, 17413, 7791, 284, 8494, 1981, 290, 18064, 1181, 27490, 201, 198, 2, 13266, 286, 33315, 25, 201, 198, 2, 7536, 220, 220, 220, 220, 220, 6118, 647, 220, 220, 220, 220, 220, 12489, 286, 1487, 201, 198, 2, 29...
2.129438
3,183
from typing import Optional, Callable, Any import grpc import requests as r import env import urllib.parse as url import inspect from client import ml_pipelines as cl import test_api as api
[ 6738, 19720, 1330, 32233, 11, 4889, 540, 11, 4377, 198, 198, 11748, 1036, 14751, 198, 11748, 7007, 355, 374, 198, 11748, 17365, 198, 11748, 2956, 297, 571, 13, 29572, 355, 19016, 198, 11748, 10104, 198, 6738, 5456, 1330, 25962, 62, 79, ...
3.473684
57
from mybitbank.libs.bitcoinrpc.authproxy import AuthServiceProxy, JSONRPCException __all__ = ['AuthServiceProxy', 'JSONRPCException']
[ 6738, 616, 2545, 17796, 13, 8019, 82, 13, 35395, 81, 14751, 13, 18439, 36436, 1330, 26828, 16177, 44148, 11, 19449, 49, 5662, 16922, 198, 834, 439, 834, 796, 37250, 30515, 16177, 44148, 3256, 705, 40386, 49, 5662, 16922, 20520, 198 ]
3.35
40
""" Module for MYISAM2 driver. """ from PyQt5.Qt import qWarning, QApplication, QRegExp # type: ignore from PyQt5.QtXml import QDomDocument # type: ignore from PyQt5.QtWidgets import QMessageBox, QWidget # type: ignore from pineboolib.core.utils.utils_base import auto_qt_translate_text from pineboolib.application.u...
[ 37811, 198, 26796, 329, 17615, 1797, 2390, 17, 4639, 13, 198, 37811, 198, 6738, 9485, 48, 83, 20, 13, 48, 83, 1330, 10662, 20361, 11, 1195, 23416, 11, 1195, 8081, 16870, 220, 1303, 2099, 25, 8856, 198, 6738, 9485, 48, 83, 20, 13, ...
1.823421
28,146
# -*- coding: utf-8 -*- #! \file ./doit/support/cmd/errors.py #! \author Jiří Kučera, <sanczes@gmail.com> #! \stamp 2016-02-15 13:19:12 (UTC+01:00, DST+00:00) #! \project DoIt!: Tools and Libraries for Building DSLs #! \license MIT #! \version 0.0.0 #! \fdes...
[ 2, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220...
2.432879
1,028
#!/usr/bin/env python # Copyright 2015 Google Inc. All rights reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required ...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 2, 15069, 1853, 3012, 3457, 13, 1439, 2489, 10395, 13, 198, 2, 198, 2, 49962, 739, 262, 24843, 13789, 11, 10628, 362, 13, 15, 357, 1169, 366, 34156, 15341, 198, 2, 345, 743, 407, 7...
2.853351
1,507
import os import re for svg in [file for file in os.listdir(os.getcwd()) if '.svg' in file]: file_path = '{}/{}'.format(os.getcwd(), svg) with open (file_path, 'r', encoding='utf-8') as svg_file: content = svg_file.read() target = re.search('fill=".*?"', content) if target != None: ...
[ 11748, 28686, 198, 11748, 302, 198, 1640, 38487, 70, 287, 685, 7753, 329, 2393, 287, 28686, 13, 4868, 15908, 7, 418, 13, 1136, 66, 16993, 28955, 611, 45302, 21370, 70, 6, 287, 2393, 5974, 198, 220, 220, 220, 2393, 62, 6978, 796, 705...
2.172691
249
import base64
[ 11748, 2779, 2414, 628 ]
3.75
4
from datetime import datetime @execution_time random_func()
[ 6738, 4818, 8079, 1330, 4818, 8079, 628, 198, 31, 18558, 1009, 62, 2435, 628, 198, 25120, 62, 20786, 3419 ]
3.315789
19
# Copyright 2018 Analytics Zoo Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to i...
[ 2, 15069, 2864, 30437, 21980, 46665, 13, 198, 2, 198, 2, 49962, 739, 262, 24843, 13789, 11, 10628, 362, 13, 15, 357, 1169, 366, 34156, 15341, 198, 2, 345, 743, 407, 779, 428, 2393, 2845, 287, 11846, 351, 262, 13789, 13, 198, 2, 92...
3.707207
222
# pylint: disable=too-few-public-methods,missing-docstring highlight = Highlight()
[ 2, 279, 2645, 600, 25, 15560, 28, 18820, 12, 32146, 12, 11377, 12, 24396, 82, 11, 45688, 12, 15390, 8841, 628, 628, 198, 8929, 2971, 796, 3334, 2971, 3419, 198 ]
2.9
30
# -*- coding: utf-8 -*- import json import gzip import math import multiprocessing as mp import os import re import shutil from tempfile import mkstemp from typing import Optional, Sequence from xml.dom.minidom import getDOMImplementation, parseString from xml.parsers.expat import ExpatError import cx_Oracle import M...
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 198, 11748, 33918, 198, 11748, 308, 13344, 198, 11748, 10688, 198, 11748, 18540, 305, 919, 278, 355, 29034, 198, 11748, 28686, 198, 11748, 302, 198, 11748, 4423, 346, 198,...
2.386139
404
import pytest import math import numpy as np from ball import ball import matplotlib.pyplot as plt import copy from itertools import combinations import sys import pandas as pd from calculator import calculator import json import dataframes from plotter import plotter from random import random ''' in order...
[ 11748, 12972, 9288, 198, 11748, 10688, 198, 11748, 299, 32152, 355, 45941, 220, 198, 6738, 2613, 1330, 2613, 198, 11748, 2603, 29487, 8019, 13, 9078, 29487, 355, 458, 83, 220, 198, 11748, 4866, 198, 6738, 340, 861, 10141, 1330, 17790, 1...
2.891606
1,227
# functions/add.py import torch from torch.autograd import Function from _ext import my_lib
[ 2, 5499, 14, 2860, 13, 9078, 198, 11748, 28034, 198, 6738, 28034, 13, 2306, 519, 6335, 1330, 15553, 198, 6738, 4808, 2302, 1330, 616, 62, 8019, 628 ]
3.444444
27