content
stringlengths
1
1.05M
input_ids
listlengths
1
883k
ratio_char_token
float64
1
22.9
token_count
int64
1
883k
"""Only one validation per mission, user and actor Revision ID: 1a89721126f7 Revises: fa96dfc8237d Create Date: 2021-10-14 11:22:01.124488 """ from alembic import op import sqlalchemy as sa # revision identifiers, used by Alembic. revision = "1a89721126f7" down_revision = "fa96dfc8237d" branch_labels = None depends...
[ 37811, 10049, 530, 21201, 583, 4365, 11, 2836, 290, 8674, 198, 198, 18009, 1166, 4522, 25, 352, 64, 4531, 22, 2481, 19420, 69, 22, 198, 18009, 2696, 25, 24685, 4846, 7568, 66, 23, 24693, 67, 198, 16447, 7536, 25, 33448, 12, 940, 12,...
2.601563
128
# Copyright 2020 Jan Feitsma (Falcons) # SPDX-License-Identifier: Apache-2.0 #!/usr/bin/python import os import sys import argparse from rtdb2 import RtDB2Store, RTDB2_DEFAULT_PATH import rtdb2tools from hexdump import hexdump # Main structure of the program if __name__ == "__main__": # Argument parsing. des...
[ 2, 15069, 12131, 2365, 5452, 896, 2611, 357, 41129, 5936, 8, 198, 2, 30628, 55, 12, 34156, 12, 33234, 7483, 25, 24843, 12, 17, 13, 15, 198, 2, 48443, 14629, 14, 8800, 14, 29412, 198, 11748, 28686, 198, 11748, 25064, 198, 11748, 1822...
2.537179
780
from __future__ import print_function from __future__ import division import os import gym import numpy as np from skimage.transform import resize from skimage.color import rgb2gray
[ 6738, 11593, 37443, 834, 1330, 3601, 62, 8818, 198, 6738, 11593, 37443, 834, 1330, 7297, 198, 198, 11748, 28686, 198, 11748, 11550, 198, 11748, 299, 32152, 355, 45941, 198, 198, 6738, 1341, 9060, 13, 35636, 1330, 47558, 198, 6738, 1341, ...
3.854167
48
#!/usr/bin/env python # coding: utf-8 # # Meta-Analytic Coactivation Modeling # In[1]: # First, import the necessary modules and functions import os from datetime import datetime import matplotlib.pyplot as plt from myst_nb import glue from repo2data.repo2data import Repo2Data import nimare start = datetime.now(...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 2, 19617, 25, 3384, 69, 12, 23, 198, 198, 2, 1303, 30277, 12, 37702, 13370, 1766, 48545, 9104, 278, 198, 198, 2, 554, 58, 16, 5974, 628, 198, 2, 3274, 11, 1330, 262, 3306, 13103, ...
2.851994
2,081
""" CISCO_IPSLA_ECHO_MIB This MIB module defines the templates for IP SLA operations of ICMP echo, UDP echo and TCP connect. The ICMP echo operation measures end\-to\-end response time between a Cisco router and any IP enabled device by computing the time taken between sending an ICMP echo request message to the d...
[ 37811, 36159, 8220, 62, 47643, 13534, 62, 25994, 46, 62, 8895, 33, 220, 198, 198, 1212, 337, 9865, 8265, 15738, 262, 24019, 329, 6101, 12419, 32, 4560, 286, 198, 2149, 7378, 9809, 11, 36428, 9809, 290, 23633, 2018, 13, 198, 198, 464, ...
3.816609
289
# Licensed to the Apache Software Foundation (ASF) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. The ASF licenses this file # to you under the Apache License, Version 2.0 (the # "License"); you may not u...
[ 2, 49962, 284, 262, 24843, 10442, 5693, 357, 1921, 37, 8, 739, 530, 198, 2, 393, 517, 18920, 5964, 11704, 13, 220, 4091, 262, 28536, 2393, 198, 2, 9387, 351, 428, 670, 329, 3224, 1321, 198, 2, 5115, 6634, 9238, 13, 220, 383, 7054,...
2.52458
1,607
#!/usr/bin/env python3 import shlex from tkinter import * from tkinter import messagebox from psutil import Popen top = Tk() top.title("Franka Gripper Control") top.geometry("300x75") B1 = Button(top, text = "Open Gripper", command = open) B1.place(x = 30,y = 20) B2 = Button(top, text = "Close Gripper", command = c...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 18, 198, 11748, 427, 2588, 198, 6738, 256, 74, 3849, 1330, 1635, 198, 6738, 256, 74, 3849, 1330, 3275, 3524, 198, 6738, 26692, 22602, 1330, 8099, 268, 628, 198, 4852, 796, 309, 74, 3419, ...
2.647482
139
for i in range(int(input())): number_of_candies = int(input()) candies_weights = list(map(int, input().split())) bob_pos = number_of_candies - 1 alice_pos = 0 bob_current_weight = 0 alice_current_weight = 0 last_equal_candies_total_number = 0 while alice_pos <= bob_pos: if al...
[ 1640, 1312, 287, 2837, 7, 600, 7, 15414, 28955, 2599, 198, 220, 220, 220, 1271, 62, 1659, 62, 46188, 444, 796, 493, 7, 15414, 28955, 198, 220, 220, 220, 2658, 444, 62, 43775, 796, 1351, 7, 8899, 7, 600, 11, 5128, 22446, 35312, 341...
2.248485
330
#!/usr/bin/env python """This tool builds or repacks the client binaries. This handles invocations for the build across the supported platforms including handling Visual Studio, pyinstaller and other packaging mechanisms. """ import logging import os import platform import time # pylint: disable=unused-import from ...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 37811, 1212, 2891, 12188, 393, 1128, 4595, 262, 5456, 38640, 13, 198, 198, 1212, 17105, 800, 20968, 329, 262, 1382, 1973, 262, 4855, 9554, 1390, 198, 4993, 1359, 15612, 11733, 11, 12972,...
2.649925
4,639
# -------------- # Code starts here # Create the lists class_1 = ['geoffrey hinton', 'andrew ng', 'sebastian raschka', 'yoshu bengio'] class_2 = ['hilary mason', 'carla gentry', 'corinna cortes'] # Concatenate both the strings new_class = class_1+class_2 print(new_class) # Append the list new_class.append('p...
[ 2, 220, 26171, 198, 2, 6127, 4940, 994, 201, 198, 201, 198, 2, 13610, 262, 8341, 220, 201, 198, 4871, 62, 16, 796, 37250, 469, 2364, 4364, 289, 2371, 3256, 705, 392, 1809, 23370, 3256, 705, 325, 65, 459, 666, 374, 292, 354, 4914, ...
2.679931
578
# coding=utf-8 # Copyright 2022 The ML Fairness Gym 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 applicab...
[ 2, 19617, 28, 40477, 12, 23, 198, 2, 15069, 33160, 383, 10373, 7011, 1108, 31187, 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, 239...
3.646617
266
import argparse import csv import os from moss_client.core import submit_and_dl, parse_moss_reports data_folder = 'data' if __name__ == "__main__": parser = argparse.ArgumentParser( description="MOSS CLI client for submitting java files to the service and downloading the report from the " ...
[ 11748, 1822, 29572, 198, 11748, 269, 21370, 198, 11748, 28686, 198, 6738, 42853, 62, 16366, 13, 7295, 1330, 9199, 62, 392, 62, 25404, 11, 21136, 62, 76, 793, 62, 48922, 198, 198, 7890, 62, 43551, 796, 705, 7890, 6, 628, 198, 198, 36...
2.763323
638
#!/usr/bin/env python import rospy #from apriltags_ros.msg import AprilTagDetectionArray from duckietown_msgs.msg import AprilTagsWithInfos import tf2_ros from tf2_msgs.msg import TFMessage import tf.transformations as tr from geometry_msgs.msg import Transform, TransformStamped import numpy as np from localization imp...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 11748, 686, 2777, 88, 198, 2, 6738, 46593, 2326, 3775, 62, 4951, 13, 19662, 1330, 3035, 24835, 11242, 3213, 19182, 198, 6738, 22045, 1155, 593, 62, 907, 14542, 13, 19662, 1330, 3035, 3...
3.123239
284
#!/usr/bin/python # pylint: disable=W0223 """ Get a list of teams """ from html.parser import HTMLParser import requests DATALOC = "http://www.espn.com/mens-college-basketball/tournament/bracket" def check_teams(): """ Extract a list of teams (schools) """ req = requests.get(DATALOC) parser = C...
[ 2, 48443, 14629, 14, 8800, 14, 29412, 198, 2, 279, 2645, 600, 25, 15560, 28, 54, 15, 22047, 198, 37811, 198, 3855, 257, 1351, 286, 3466, 198, 37811, 198, 6738, 27711, 13, 48610, 1330, 11532, 46677, 198, 11748, 7007, 628, 198, 198, 3...
2.373239
284
# # PySNMP MIB module Nortel-MsCarrier-MscPassport-SubnetInterfaceMIB (http://snmplabs.com/pysmi) # ASN.1 source file:///Users/davwang4/Dev/mibs.snmplabs.com/asn1/Nortel-MsCarrier-MscPassport-SubnetInterfaceMIB # Produced by pysmi-0.3.4 at Wed May 1 14:31:21 2019 # On host DAVWANG4-M-1475 platform Darwin version 18.5....
[ 2, 198, 2, 9485, 15571, 7378, 337, 9865, 8265, 15209, 417, 12, 10128, 9914, 5277, 12, 44, 1416, 14478, 634, 12, 7004, 3262, 39317, 8895, 33, 357, 4023, 1378, 16184, 76, 489, 8937, 13, 785, 14, 79, 893, 11632, 8, 198, 2, 7054, 45, ...
2.971821
11,072
import codecs import tempfile from contextlib import closing from .cgi import CGIClient from .combine import CombineSVG from .mapserv import MapServer, InternalError from .tree import build_tree if __name__ == "__main__": import os import logging logging.basicConfig(level=logging.DEBUG) params = ...
[ 11748, 40481, 82, 198, 11748, 20218, 7753, 198, 6738, 4732, 8019, 1330, 9605, 198, 198, 6738, 764, 37157, 1330, 29925, 2149, 75, 1153, 198, 6738, 764, 24011, 500, 1330, 29176, 50, 43490, 198, 198, 6738, 764, 31803, 712, 1330, 9347, 1069...
2.215297
353
import frappe
[ 11748, 5306, 27768, 198 ]
3.5
4
from common.bio.constants import SMILES_CHARACTER_TO_ID, ID_TO_SMILES_CHARACTER def from_smiles_to_id(data, column): """Converts sequences from smiles to ids Args: data: data that contains characters that need to be converted to ids column: a column of the dataframe that contains characters that ...
[ 6738, 2219, 13, 65, 952, 13, 9979, 1187, 1330, 9447, 4146, 1546, 62, 38019, 2246, 5781, 62, 10468, 62, 2389, 11, 4522, 62, 10468, 62, 12310, 4146, 1546, 62, 38019, 2246, 5781, 628, 198, 4299, 422, 62, 5796, 2915, 62, 1462, 62, 312, ...
2.94586
314
import os import sys import unittest # Set Python search path to the parent directory sys.path.append(os.path.join(os.path.dirname(__file__), '..')) from lib.config import * if __name__ == "__main__": unittest.main(buffer=True)
[ 11748, 28686, 198, 11748, 25064, 198, 11748, 555, 715, 395, 198, 198, 2, 5345, 11361, 2989, 3108, 284, 262, 2560, 8619, 198, 17597, 13, 6978, 13, 33295, 7, 418, 13, 6978, 13, 22179, 7, 418, 13, 6978, 13, 15908, 3672, 7, 834, 7753, ...
2.819277
83
""" Test to make sure that libraries built with Nimporter can be installed via Pip. """ import sys, os, subprocess, shutil, pkg_resources, json, warnings from pathlib import Path import pytest import nimporter PYTHON = 'python' if sys.platform == 'win32' else 'python3' PIP = 'pip' if shutil.which('pip') else 'pip3' ...
[ 37811, 198, 14402, 284, 787, 1654, 326, 12782, 3170, 351, 27168, 26634, 460, 307, 6589, 2884, 25149, 13, 198, 37811, 198, 198, 11748, 25064, 11, 28686, 11, 850, 14681, 11, 4423, 346, 11, 279, 10025, 62, 37540, 11, 33918, 11, 14601, 19...
3.066667
105
samples = { "2_brother_plays": { "question_parts": [range(1, 13), range(13, 17)], "sp_parts": [range(20, 43), range(50, 60)] } }
[ 82, 12629, 796, 1391, 198, 220, 220, 220, 366, 17, 62, 37343, 62, 26024, 1298, 1391, 198, 220, 220, 220, 220, 220, 220, 220, 366, 25652, 62, 42632, 1298, 685, 9521, 7, 16, 11, 1511, 828, 2837, 7, 1485, 11, 1596, 8, 4357, 198, 22...
1.987013
77
# Generated by Django 3.1.7 on 2021-03-24 17:41 import django.db.models.deletion from django.conf import settings from django.db import migrations from django.db import models
[ 2, 2980, 515, 416, 37770, 513, 13, 16, 13, 22, 319, 33448, 12, 3070, 12, 1731, 1596, 25, 3901, 198, 198, 11748, 42625, 14208, 13, 9945, 13, 27530, 13, 2934, 1616, 295, 198, 6738, 42625, 14208, 13, 10414, 1330, 6460, 198, 6738, 42625...
3.068966
58
# coding=utf-8 # *** WARNING: this file was generated by the Pulumi Terraform Bridge (tfgen) Tool. *** # *** Do not edit by hand unless you're certain you know what you are doing! *** import warnings import pulumi import pulumi.runtime from typing import Any, Dict, List, Mapping, Optional, Tuple, Union from .. import ...
[ 2, 19617, 28, 40477, 12, 23, 198, 2, 17202, 39410, 25, 428, 2393, 373, 7560, 416, 262, 21624, 12994, 24118, 687, 10290, 357, 27110, 5235, 8, 16984, 13, 17202, 198, 2, 17202, 2141, 407, 4370, 416, 1021, 4556, 345, 821, 1728, 345, 760...
3.45283
106
from kivy.uix.screenmanager import ScreenManager from kivy.uix.boxlayout import BoxLayout from kivy.lang.builder import Builder from kivy.animation import Animation from kivy.core.window import Window from kivymd.app import MDApp import kivymd import kivy print( ) print( )
[ 6738, 479, 452, 88, 13, 84, 844, 13, 9612, 37153, 1330, 15216, 13511, 198, 6738, 479, 452, 88, 13, 84, 844, 13, 3524, 39786, 1330, 8315, 32517, 198, 6738, 479, 452, 88, 13, 17204, 13, 38272, 1330, 35869, 198, 6738, 479, 452, 88, 1...
2.915789
95
import functools import itertools import numbers from ..backend_object import BackendObject from ..annotation import Annotation vs_id_ctr = itertools.count() # # Overriding base methods # def __hash__(self): return hash((self.region_id, self.region_base_addr, hash(self.offset))) def __...
[ 11748, 1257, 310, 10141, 198, 11748, 340, 861, 10141, 198, 11748, 3146, 198, 198, 6738, 11485, 1891, 437, 62, 15252, 1330, 5157, 437, 10267, 198, 6738, 11485, 1236, 14221, 1330, 1052, 38983, 198, 198, 14259, 62, 312, 62, 24087, 796, 340...
2.1536
4,069
import logging from episodes import find_updates, db, count_all from logging import error as logi from flask import Flask, jsonify, request
[ 11748, 18931, 198, 198, 6738, 8640, 1330, 1064, 62, 929, 19581, 11, 20613, 11, 954, 62, 439, 198, 6738, 18931, 1330, 4049, 355, 2604, 72, 198, 6738, 42903, 1330, 46947, 11, 33918, 1958, 11, 2581, 628 ]
3.944444
36
from ..utils import Object
[ 198, 198, 6738, 11485, 26791, 1330, 9515, 628 ]
3.75
8
# -*- coding: utf-8 -*- # catapult: runs python scripts in already running processes to eliminate the # python interpreter startup time. # # The lexicon for sparv.saldo.annotate and sparv.saldo.compound can be pre-loaded and # shared between processes. See the variable annotators in handle and start. # # Run scripts in...
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 2, 48786, 25, 4539, 21015, 14750, 287, 1541, 2491, 7767, 284, 11005, 262, 198, 2, 21015, 28846, 13693, 640, 13, 198, 2, 198, 2, 383, 31191, 4749, 329, 37331, 85, 13, ...
2.359112
4,461
from __future__ import unicode_literals import unittest from nose.tools import * # PEP8 asserts from nose.plugins.attrib import attr from textblob.sentiments import PatternAnalyzer, NaiveBayesAnalyzer, DISCRETE, CONTINUOUS def assert_about_equal(first, second, places=4): return assert_equal(round(first, places...
[ 6738, 11593, 37443, 834, 1330, 28000, 1098, 62, 17201, 874, 198, 11748, 555, 715, 395, 198, 6738, 9686, 13, 31391, 1330, 1635, 220, 1303, 350, 8905, 23, 29348, 198, 6738, 9686, 13, 37390, 13, 1078, 822, 1330, 708, 81, 198, 198, 6738, ...
3.032
125
from django.apps import AppConfig
[ 6738, 42625, 14208, 13, 18211, 1330, 2034, 16934, 628 ]
3.888889
9
import json import sys f=open(sys.argv[1]) y = json.loads(f.read()) print("Tests results: " + str(y["result"])) print("Tests duration: " + str(y["duration"])) print("Tests output:\n~~~~~~~~~~~~~~~~~~~~\n" + str(y["stdout"]))
[ 11748, 33918, 198, 11748, 25064, 198, 198, 69, 28, 9654, 7, 17597, 13, 853, 85, 58, 16, 12962, 198, 88, 796, 33918, 13, 46030, 7, 69, 13, 961, 28955, 198, 4798, 7203, 51, 3558, 2482, 25, 366, 1343, 965, 7, 88, 14692, 20274, 8973, ...
2.632184
87
#!/usr/bin/env python3 # # Copyright (c) 2016, The OpenThread Authors. # All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are met: # 1. Redistributions of source code must retain the above copyright # ...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 18, 198, 2, 198, 2, 220, 15069, 357, 66, 8, 1584, 11, 383, 4946, 16818, 46665, 13, 198, 2, 220, 1439, 2489, 10395, 13, 198, 2, 198, 2, 220, 2297, 396, 3890, 290, 779, 287, 2723, 290, ...
3.357955
528
""" Manage Linux kernel packages on APT-based systems """ import functools import logging import re try: from salt.utils.versions import LooseVersion as _LooseVersion from salt.exceptions import CommandExecutionError HAS_REQUIRED_LIBS = True except ImportError: HAS_REQUIRED_LIBS = False log = loggin...
[ 37811, 198, 5124, 496, 7020, 9720, 10392, 319, 3486, 51, 12, 3106, 3341, 198, 37811, 198, 198, 11748, 1257, 310, 10141, 198, 11748, 18931, 198, 11748, 302, 198, 198, 28311, 25, 198, 220, 220, 220, 422, 8268, 13, 26791, 13, 47178, 1330...
2.660278
2,661
import json import numpy as np from numba import jit from timeit import default_timer as timer # Constant, used in the formula. # Defined here to speed up the calculation, i.e. it's calculated only once # and then placed in the formula. SQRT_2PI = np.float32(np.sqrt(2 * np.pi)) # This function will run on the CPU. d...
[ 11748, 33918, 198, 11748, 299, 32152, 355, 45941, 198, 6738, 997, 7012, 1330, 474, 270, 198, 6738, 640, 270, 1330, 4277, 62, 45016, 355, 19781, 198, 198, 2, 20217, 11, 973, 287, 262, 10451, 13, 198, 2, 2896, 1389, 994, 284, 2866, 51...
2.560563
710
#! /usr/bin/python import sys if sys.version_info[0] == 3: from .__main__ import * else: pass
[ 2, 0, 1220, 14629, 14, 8800, 14, 29412, 198, 198, 11748, 25064, 198, 198, 361, 25064, 13, 9641, 62, 10951, 58, 15, 60, 6624, 513, 25, 198, 220, 220, 220, 422, 764, 834, 12417, 834, 1330, 1635, 198, 17772, 25, 198, 220, 220, 220, ...
2.288889
45
import datetime def iso_extract_info(string): """ Will get all of the info and return it as an array :param string: ISO formatted string that will be used for extraction :return: array [year, month, day, military_time_hour, minutes, hours] :note: every item is an int except for minutes ...
[ 11748, 4818, 8079, 628, 198, 4299, 47279, 62, 2302, 974, 62, 10951, 7, 8841, 2599, 198, 220, 220, 220, 37227, 198, 220, 220, 220, 2561, 651, 477, 286, 262, 7508, 290, 1441, 340, 355, 281, 7177, 198, 220, 220, 220, 1058, 17143, 4731,...
2.488899
2,252
from microbit import * import random, speech, radio eye_angles = [50, 140, 60, 90, 140] radio.off() sentences = [ "Hello my name is Mike", "What is your name", "I am looking at you", "Exterminate exterminate exterminate", "Number Five is alive", "I cant do that Dave", "daisee daisee give ...
[ 6738, 4580, 2545, 1330, 1635, 198, 11748, 4738, 11, 4046, 11, 5243, 198, 198, 25379, 62, 27787, 796, 685, 1120, 11, 12713, 11, 3126, 11, 4101, 11, 12713, 60, 198, 198, 37004, 13, 2364, 3419, 198, 198, 34086, 3007, 796, 685, 198, 220...
1.827206
544
import datetime import time
[ 11748, 4818, 8079, 198, 11748, 640, 628, 198 ]
3.75
8
from django.urls import path from issue_template.views import IssueTemplateView urlpatterns = [ path( '<str:owner>/<str:repo>/<str:token_auth>/', IssueTemplateView.as_view() ), ]
[ 6738, 42625, 14208, 13, 6371, 82, 1330, 3108, 198, 6738, 2071, 62, 28243, 13, 33571, 1330, 18232, 30800, 7680, 628, 198, 6371, 33279, 82, 796, 685, 198, 220, 220, 220, 3108, 7, 198, 220, 220, 220, 220, 220, 220, 220, 705, 27, 2536, ...
2.356322
87
import os, tempfile, subprocess from hammer_vlsi import MMMCCorner, MMMCCornerType, HammerTool, HammerToolStep, HammerSRAMGeneratorTool, SRAMParameters from hammer_vlsi.units import VoltageValue, TemperatureValue from hammer_tech import Library, ExtraLibrary from typing import NamedTuple, Dict, Any, List from abc imp...
[ 198, 11748, 28686, 11, 20218, 7753, 11, 850, 14681, 198, 198, 6738, 15554, 62, 85, 7278, 72, 1330, 337, 12038, 4093, 273, 1008, 11, 337, 12038, 4093, 273, 1008, 6030, 11, 18278, 25391, 11, 18278, 25391, 8600, 11, 18278, 12562, 2390, 8...
3.431193
109
import collections import nltk import os from sklearn import ( datasets, model_selection, feature_extraction, linear_model, naive_bayes, ensemble ) def extract_features(corpus): '''Extract TF-IDF features from corpus''' sa_stop_words = nltk.corpus.stopwords.words("english") # words that might in...
[ 11748, 17268, 198, 11748, 299, 2528, 74, 198, 11748, 28686, 198, 6738, 1341, 35720, 1330, 357, 198, 220, 220, 220, 40522, 11, 2746, 62, 49283, 11, 3895, 62, 2302, 7861, 11, 14174, 62, 19849, 11, 24354, 62, 24406, 274, 11, 198, 220, ...
2.586144
1,097
# -*- coding: utf-8 -*- ''' File name: code\gcd_sequence\sol_443.py Author: Vaidic Joshi Date created: Oct 20, 2018 Python Version: 3.x ''' # Solution to Project Euler Problem #443 :: GCD sequence # # For more information see: # https://projecteuler.net/problem=443 # Problem Statement ''' Let g(n) ...
[ 198, 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 7061, 6, 198, 220, 220, 220, 9220, 1438, 25, 2438, 59, 70, 10210, 62, 43167, 59, 34453, 62, 34938, 13, 9078, 198, 220, 220, 220, 6434, 25, 569, 1698, 291, 8518,...
2.33213
277
# coding=utf-8 """ Collects data from RabbitMQ through the admin interface #### Notes * if two vhosts have the queues with the same name, the metrics will collide #### Dependencies * pyrabbit """ import diamond.collector try: from numbers import Number Number # workaround for pyflakes issue #13 im...
[ 2, 19617, 28, 40477, 12, 23, 198, 198, 37811, 198, 31337, 82, 1366, 422, 25498, 49215, 832, 262, 13169, 7071, 198, 198, 4242, 11822, 198, 1635, 611, 734, 410, 4774, 82, 423, 262, 43359, 351, 262, 976, 1438, 11, 262, 20731, 481, 4659...
3.336283
113
# Copyright (c) 2021, NVIDIA CORPORATION & AFFILIATES. 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 requ...
[ 2, 15069, 357, 66, 8, 33448, 11, 15127, 23929, 44680, 6234, 1222, 317, 5777, 4146, 40, 29462, 13, 220, 1439, 2489, 10395, 13, 198, 2, 198, 2, 49962, 739, 262, 24843, 13789, 11, 10628, 362, 13, 15, 357, 1169, 366, 34156, 15341, 198, ...
3.087398
492
from flask import Flask, request, jsonify from flask_cors import CORS from run import run_ansys from api.validate import spec_present, data_type_validate, spec_keys_validate, ansys_overload_check ansys_processing_count = 0 # debug # import ipdb; ipdb.set_trace() app = Flask(__name__) CORS(app) # local development co...
[ 6738, 42903, 1330, 46947, 11, 2581, 11, 33918, 1958, 198, 6738, 42903, 62, 66, 669, 1330, 327, 20673, 198, 6738, 1057, 1330, 1057, 62, 504, 893, 198, 6738, 40391, 13, 12102, 378, 1330, 1020, 62, 25579, 11, 1366, 62, 4906, 62, 12102, ...
2.77931
145
from .dataset import get_cifar100, get_cifar10, get_imagenet_lmdb, get_imagenet __all__ = ["get_cifar100", "get_cifar10", "get_imagenet_lmdb", "get_imagenet"]
[ 6738, 764, 19608, 292, 316, 1330, 651, 62, 66, 361, 283, 3064, 11, 651, 62, 66, 361, 283, 940, 11, 651, 62, 320, 11286, 316, 62, 75, 9132, 65, 11, 651, 62, 320, 11286, 316, 198, 198, 834, 439, 834, 796, 14631, 1136, 62, 66, 36...
2.105263
76
from sklearn.model_selection import KFold
[ 6738, 1341, 35720, 13, 19849, 62, 49283, 1330, 509, 37, 727 ]
3.727273
11
from django.db import models
[ 6738, 42625, 14208, 13, 9945, 1330, 4981, 201, 198, 201, 198, 201, 198, 201, 198, 220, 220, 201, 198, 201, 198, 201, 198 ]
1.913043
23
# admin_tools/urls.py # Brought to you by We Vote. Be good. # -*- coding: UTF-8 -*- from django.conf.urls import re_path from . import views urlpatterns = [ re_path(r'^$', views.admin_home_view, name='admin_home',), re_path(r'^data_cleanup/$', views.data_cleanup_view, name='data_cleanup'), re_path(r'^dat...
[ 2, 13169, 62, 31391, 14, 6371, 82, 13, 9078, 198, 2, 347, 2909, 284, 345, 416, 775, 19175, 13, 1355, 922, 13, 198, 2, 532, 9, 12, 19617, 25, 41002, 12, 23, 532, 9, 12, 198, 198, 6738, 42625, 14208, 13, 10414, 13, 6371, 82, 133...
2.547945
584
""" A base node that provides several output tensors. """ from ....layers.algebra import Idx from .base import SingleNode, Node from .. import _debprint from ...indextypes import IdxType
[ 37811, 198, 32, 2779, 10139, 326, 3769, 1811, 5072, 11192, 669, 13, 198, 37811, 198, 6738, 19424, 75, 6962, 13, 282, 29230, 1330, 5121, 87, 198, 6738, 764, 8692, 1330, 14206, 19667, 11, 19081, 198, 6738, 11485, 1330, 4808, 11275, 4798, ...
3.566038
53
from .zero import zero from main_module._unittester import UnitTester test = UnitTester(__name__) del UnitTester
[ 6738, 764, 22570, 1330, 6632, 198, 198, 6738, 1388, 62, 21412, 13557, 403, 715, 7834, 1330, 11801, 51, 7834, 198, 9288, 796, 11801, 51, 7834, 7, 834, 3672, 834, 8, 198, 12381, 11801, 51, 7834 ]
3.228571
35
import numpy as np import numpy.random as npr import scipy.optimize as spo import tomo_challenge.metrics as tcm # custom data type, could be replaced with/tie in to tree.py class # cut_vals is (nfeat, nbins - 1) numpy array, float # tree_ids is ((nbins,) * nfeat) numpy array, int TreePars = namedtuple('TreePars', ['cu...
[ 11748, 299, 32152, 355, 45941, 198, 11748, 299, 32152, 13, 25120, 355, 299, 1050, 198, 11748, 629, 541, 88, 13, 40085, 1096, 355, 15106, 198, 11748, 284, 5908, 62, 36747, 3540, 13, 4164, 10466, 355, 256, 11215, 198, 198, 2, 2183, 1366...
2.610692
1,590
import shelve regal = shelve.open('score.txt') neuerScore = int(input("Neuer HighScore: \n")) updateScore(neuerScore)
[ 11748, 7497, 303, 198, 198, 2301, 282, 796, 7497, 303, 13, 9654, 10786, 26675, 13, 14116, 11537, 198, 198, 710, 15573, 26595, 796, 493, 7, 15414, 7203, 8199, 15573, 3334, 26595, 25, 3467, 77, 48774, 198, 19119, 26595, 7, 710, 15573, 2...
2.767442
43
# -*- coding: utf-8 -*- import ldap BASE = ldap.SCOPE_BASE ONELEVEL = ldap.SCOPE_ONELEVEL SUBTREE = ldap.SCOPE_SUBTREE SCOPES = [BASE, ONELEVEL, SUBTREE] del ldap
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 11748, 300, 67, 499, 198, 198, 33, 11159, 796, 300, 67, 499, 13, 6173, 32135, 62, 33, 11159, 198, 11651, 2538, 18697, 796, 300, 67, 499, 13, 6173, 32135, 62, 11651, ...
1.875
88
import glob import numpy as np X = np.empty((0, 193)) y = np.empty((0, 10)) groups = np.empty((0, 1)) npz_files = glob.glob('./urban_sound_?.npz') for fn in npz_files: print(fn) data = np.load(fn) X = np.append(X, data['X'], axis=0) y = np.append(y, data['y'], axis=0) groups = np.append(groups, dat...
[ 11748, 15095, 198, 11748, 299, 32152, 355, 45941, 198, 198, 55, 796, 45941, 13, 28920, 19510, 15, 11, 29691, 4008, 198, 88, 796, 45941, 13, 28920, 19510, 15, 11, 838, 4008, 198, 24432, 796, 45941, 13, 28920, 19510, 15, 11, 352, 4008, ...
2.097872
235
import dlib
[ 11748, 288, 8019, 628 ]
3.25
4
# Copyright (c) 2021, NVIDIA CORPORATION. All rights reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by appli...
[ 2, 15069, 357, 66, 8, 33448, 11, 15127, 23929, 44680, 6234, 13, 220, 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, 779, 428, 2393...
3.434641
306
# coding=utf-8 # *** WARNING: this file was generated by the Pulumi Terraform Bridge (tfgen) Tool. *** # *** Do not edit by hand unless you're certain you know what you are doing! *** import json import warnings import pulumi import pulumi.runtime from typing import Union from .. import utilities, tables
[ 2, 19617, 28, 40477, 12, 23, 198, 2, 17202, 39410, 25, 428, 2393, 373, 7560, 416, 262, 21624, 12994, 24118, 687, 10290, 357, 27110, 5235, 8, 16984, 13, 17202, 198, 2, 17202, 2141, 407, 4370, 416, 1021, 4556, 345, 821, 1728, 345, 760...
3.898734
79
# Copyright 2018 United States Government as represented by the Administrator of # the National Aeronautics and Space Administration. No copyright is claimed in # the United States under Title 17, U.S. Code. All Other Rights Reserved. # The Stochastic Reduced Order Models with Python (SROMPy) platform is licensed # un...
[ 2, 15069, 2864, 1578, 1829, 5070, 355, 7997, 416, 262, 22998, 286, 198, 2, 262, 2351, 15781, 261, 2306, 873, 290, 4687, 8694, 13, 1400, 6634, 318, 4752, 287, 198, 2, 262, 1578, 1829, 739, 11851, 1596, 11, 471, 13, 50, 13, 6127, 13...
4.12069
232
import os import errno import sys
[ 11748, 28686, 198, 11748, 11454, 3919, 198, 11748, 25064, 628 ]
3.5
10
# Copyright 2013-2019 Lawrence Livermore National Security, LLC and other # Spack Project Developers. See the top-level COPYRIGHT file for details. # # SPDX-License-Identifier: (Apache-2.0 OR MIT) from spack import *
[ 2, 15069, 2211, 12, 23344, 13914, 45036, 3549, 2351, 4765, 11, 11419, 290, 584, 198, 2, 1338, 441, 4935, 34152, 13, 4091, 262, 1353, 12, 5715, 27975, 38162, 9947, 2393, 329, 3307, 13, 198, 2, 198, 2, 30628, 55, 12, 34156, 12, 33234,...
3.47619
63
import sys import unittest try: from unittest import mock except ImportError: import mock import argparse from tabcmd.parsers.create_site_users_parser import CreateSiteUsersParser from .common_setup import * commandname = 'createsiteusers'
[ 11748, 25064, 198, 11748, 555, 715, 395, 198, 198, 28311, 25, 198, 220, 220, 220, 422, 555, 715, 395, 1330, 15290, 198, 16341, 17267, 12331, 25, 198, 220, 220, 220, 1330, 15290, 198, 11748, 1822, 29572, 198, 6738, 7400, 28758, 13, 79,...
3.289474
76
#!/usr/bin/env python import argparse import json import os import boto3 parser = argparse.ArgumentParser( formatter_class=argparse.RawDescriptionHelpFormatter, description='''\ Output following the defined format. Options are: dotenv - dotenv style [default] export - shell export style std...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 11748, 1822, 29572, 198, 11748, 33918, 198, 11748, 28686, 198, 198, 11748, 275, 2069, 18, 628, 198, 48610, 796, 1822, 29572, 13, 28100, 1713, 46677, 7, 198, 220, 220, 220, 1296, 1436, ...
2.616505
412
""" Finds the number of distinct ways a player can checkout a score less than 100 Author: Juan Rios """ import math def checkout_solutions(checkout,sequence,idx_sq,d): ''' returns the number of solution for a given checkout value ''' counter = 0 for double in d: if double>checkout: ...
[ 37811, 198, 16742, 82, 262, 1271, 286, 7310, 2842, 257, 2137, 460, 28006, 257, 4776, 1342, 621, 1802, 198, 13838, 25, 16852, 371, 4267, 198, 37811, 198, 11748, 10688, 198, 198, 4299, 28006, 62, 82, 14191, 7, 9122, 448, 11, 43167, 11, ...
1.940989
627
import jax.numpy as jnp from jax import lax import optax import chex
[ 11748, 474, 897, 13, 77, 32152, 355, 474, 37659, 198, 6738, 474, 897, 1330, 36919, 198, 11748, 2172, 897, 198, 11748, 1125, 87, 628, 198 ]
2.84
25
import os from setuptools import setup, find_packages import versioneer if __name__ == "__main__": meta = {} base_dir = os.path.dirname(os.path.abspath(__file__)) with open(os.path.join(base_dir, 'gammy', '_meta.py')) as fp: exec(fp.read(), meta) setup( name = "gammy", ...
[ 11748, 28686, 198, 6738, 900, 37623, 10141, 1330, 9058, 11, 1064, 62, 43789, 198, 11748, 2196, 28153, 628, 198, 361, 11593, 3672, 834, 6624, 366, 834, 12417, 834, 1298, 628, 220, 220, 220, 13634, 796, 23884, 198, 220, 220, 220, 2779, ...
2.003619
829
import root if __name__ == '__main__': window = root.Root() window.mainloop()
[ 11748, 6808, 628, 198, 361, 11593, 3672, 834, 6624, 705, 834, 12417, 834, 10354, 198, 220, 220, 220, 4324, 796, 6808, 13, 30016, 3419, 198, 220, 220, 220, 4324, 13, 12417, 26268, 3419, 198 ]
2.588235
34
from flask import Blueprint recommendation_blueprint = Blueprint('recommendations', __name__) from application.recommendations import routes
[ 6738, 42903, 1330, 39932, 628, 198, 47335, 437, 341, 62, 17585, 4798, 796, 39932, 10786, 47335, 437, 602, 3256, 11593, 3672, 834, 8, 628, 198, 6738, 3586, 13, 47335, 437, 602, 1330, 11926 ]
4.363636
33
# python 3.7 """Predicts the scene category, attribute.""" import numpy as np from PIL import Image import torch import torch.nn.functional as F import torchvision.transforms as transforms from .base_predictor import BasePredictor from .scene_wideresnet import resnet18 __all__ = ['ScenePredictor'] N...
[ 2, 21015, 513, 13, 22, 201, 198, 37811, 39156, 14137, 262, 3715, 6536, 11, 11688, 526, 15931, 201, 198, 201, 198, 11748, 299, 32152, 355, 45941, 201, 198, 6738, 350, 4146, 1330, 7412, 201, 198, 201, 198, 11748, 28034, 201, 198, 11748,...
2.788321
137
from flask import Flask, render_template, request from flask_sqlalchemy import SQLAlchemy app = Flask(__name__) app.config["SQLALCHEMY_DATABASE_URI"] = "mysql://root:mysql@127.0.0.1:3306/python_github" app.config["SQLALCHEMY_TRACK_MODIFICATIONS"] = True db = SQLAlchemy(app) if __name__ == "__main__": db.drop_al...
[ 6738, 42903, 1330, 46947, 11, 8543, 62, 28243, 11, 2581, 198, 6738, 42903, 62, 25410, 282, 26599, 1330, 16363, 2348, 26599, 198, 1324, 796, 46947, 7, 834, 3672, 834, 8, 198, 1324, 13, 11250, 14692, 17861, 1847, 3398, 3620, 56, 62, 35,...
2.444444
153
from collections import deque if __name__ == '__main__': print(solution( 3, [[1,2],[3,3]], ))
[ 6738, 17268, 1330, 390, 4188, 198, 198, 361, 11593, 3672, 834, 6624, 705, 834, 12417, 834, 10354, 198, 220, 220, 220, 3601, 7, 82, 2122, 7, 198, 220, 220, 220, 220, 220, 220, 220, 513, 11, 16410, 16, 11, 17, 38430, 18, 11, 18, 6...
2.156863
51
def test_zigzag_level_order(): a = TreeNode(3) b = TreeNode(9) c = TreeNode(20) d = TreeNode(15) e = TreeNode(7) a.left = b a.right = c c.left = d c.right = e assert Solution().zigzagLevelOrder(a) == [ [3], [20, 9], [15, 7] ]
[ 628, 198, 4299, 1332, 62, 38262, 50183, 62, 5715, 62, 2875, 33529, 198, 220, 220, 220, 257, 796, 12200, 19667, 7, 18, 8, 198, 220, 220, 220, 275, 796, 12200, 19667, 7, 24, 8, 198, 220, 220, 220, 269, 796, 12200, 19667, 7, 1238, ...
1.839506
162
# -*- coding: utf-8 -*- """File containing a Windows Registry plugin to parse the USBStor key.""" from __future__ import unicode_literals from plaso.containers import events from plaso.containers import time_events from plaso.lib import definitions from plaso.parsers import logger from plaso.parsers import winreg fro...
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 37811, 8979, 7268, 257, 3964, 33432, 13877, 284, 21136, 262, 8450, 1273, 273, 1994, 526, 15931, 198, 198, 6738, 11593, 37443, 834, 1330, 28000, 1098, 62, 17201, 874, 198, ...
3.210526
133
''' static analyzers are annoying so lets rename eval ''' evil = eval
[ 7061, 6, 9037, 4284, 47031, 389, 15774, 523, 8781, 36265, 5418, 705, 7061, 198, 198, 23542, 796, 5418, 198 ]
3.736842
19
import numpy as np import torch from torch.nn import functional as F from rltoolkit.acm.off_policy import AcMOffPolicy from rltoolkit.algorithms import DDPG from rltoolkit.algorithms.ddpg.models import Actor, Critic if __name__ == "__main__": #with torch.cuda.device(0): model = DDPG_AcM( # unbiased_u...
[ 11748, 299, 32152, 355, 45941, 198, 11748, 28034, 198, 6738, 28034, 13, 20471, 1330, 10345, 355, 376, 198, 198, 6738, 374, 2528, 970, 15813, 13, 330, 76, 13, 2364, 62, 30586, 1330, 4013, 44, 9362, 36727, 198, 6738, 374, 2528, 970, 158...
1.971831
497
#!/usr/bin/python #---------------------------------------------------------------- # OSM POI handler for pyroute # #------------------------------------------------------ # Copyright 2007, Oliver White # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Publ...
[ 2, 48443, 14629, 14, 8800, 14, 29412, 198, 2, 10097, 198, 2, 7294, 44, 19922, 40, 21360, 329, 279, 2417, 13192, 198, 2, 198, 2, 3880, 19351, 438, 198, 2, 15069, 4343, 11, 15416, 2635, 198, 2, 198, 2, 770, 1430, 318, 1479, 3788, ...
3.790164
305
from __future__ import annotations import os import traceback as tb from collections import defaultdict from enum import IntEnum from functools import update_wrapper from itertools import chain from typing import Any, Callable, DefaultDict, Generator, Iterable, Optional from pelutils import get_timestamp, get_repo fro...
[ 6738, 11593, 37443, 834, 1330, 37647, 198, 11748, 28686, 198, 11748, 12854, 1891, 355, 256, 65, 198, 6738, 17268, 1330, 4277, 11600, 198, 6738, 33829, 1330, 2558, 4834, 388, 198, 6738, 1257, 310, 10141, 1330, 4296, 62, 48553, 198, 6738, ...
2.328407
1,827
import mock import pytest import datetime as dt from django.utils import timezone from elasticsearch_metrics import metrics from elasticsearch_dsl import IndexTemplate from elasticsearch_metrics import signals from elasticsearch_metrics.exceptions import ( IndexTemplateNotFoundError, IndexTemplateOutOfSyncErro...
[ 11748, 15290, 198, 11748, 12972, 9288, 198, 11748, 4818, 8079, 355, 288, 83, 198, 6738, 42625, 14208, 13, 26791, 1330, 640, 11340, 198, 6738, 27468, 12947, 62, 4164, 10466, 1330, 20731, 198, 6738, 27468, 12947, 62, 67, 6649, 1330, 12901, ...
3.347518
141
from functools import lru_cache
[ 6738, 1257, 310, 10141, 1330, 300, 622, 62, 23870 ]
3.444444
9
"""Tests for :mod:`esmvalcore.iris_helpers`.""" import datetime import iris import numpy as np import pytest from cf_units import Unit from esmvalcore.iris_helpers import date2num, var_name_constraint def test_var_name_constraint(cubes): """Test :func:`esmvalcore.iris_helpers.var_name_constraint`.""" out...
[ 37811, 51, 3558, 329, 1058, 4666, 25, 63, 45798, 2100, 7295, 13, 29616, 62, 16794, 364, 63, 526, 15931, 198, 11748, 4818, 8079, 198, 198, 11748, 4173, 271, 198, 11748, 299, 32152, 355, 45941, 198, 11748, 12972, 9288, 198, 6738, 30218, ...
2.311024
508
#!/usr/bin/env python # -*- coding: utf-8 -*- """ Geo regions for map plot """ __author__ = "Saeed Moghimi" __copyright__ = "Copyright 2017, UCAR/NOAA" __license__ = "GPL" __version__ = "1.0" __email__ = "moghimis@gmail.com" import matplotlib.pyplot as plt from collections import defaultdict defs = defaultdict(dic...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 37811, 198, 10082, 78, 7652, 329, 3975, 7110, 198, 37811, 198, 834, 9800, 834, 796, 366, 33890, 2308, 4270, 456, 25236,...
2.148148
243
import numpy import matplotlib.pyplot as plt fig_convergence = plt.figure(1,figsize=(12,6)) x = numpy.loadtxt('log_deepAI_paper_nonlin_action_long.txt') plt.subplot(122) plt.plot(x[:,0]) plt.xlim([0,500]) plt.ylim([-10,200]) plt.xlabel('Steps') plt.ylabel('Free Action') plt.axvline(x=230.0,linestyle=':') plt.axvline...
[ 11748, 299, 32152, 198, 11748, 2603, 29487, 8019, 13, 9078, 29487, 355, 458, 83, 198, 198, 5647, 62, 1102, 332, 12745, 796, 458, 83, 13, 26875, 7, 16, 11, 5647, 7857, 16193, 1065, 11, 21, 4008, 198, 198, 87, 796, 299, 32152, 13, 2...
1.880488
410
#! python3 # Help from: http://www.scotttorborg.com/python-packaging/minimal.html # https://docs.python.org/3/distutils/commandref.html#sdist-cmd # https://docs.python.org/3.4/distutils/setupscript.html#installing-additional-files # https://docs.python.org/3.4/tutorial/modules.html # Install it with python setup.py ins...
[ 2, 0, 21015, 18, 198, 2, 10478, 422, 25, 2638, 1378, 2503, 13, 1416, 313, 926, 273, 23297, 13, 785, 14, 29412, 12, 8002, 3039, 14, 1084, 4402, 13, 6494, 198, 2, 3740, 1378, 31628, 13, 29412, 13, 2398, 14, 18, 14, 17080, 26791, 1...
2.432119
1,208
import io import sys from textnn.utils import ProgressIterator #inspired by https://stackoverflow.com/a/34738440
[ 11748, 33245, 198, 11748, 25064, 198, 6738, 2420, 20471, 13, 26791, 1330, 18387, 37787, 628, 198, 2, 24194, 416, 3740, 1378, 25558, 2502, 11125, 13, 785, 14, 64, 14, 30995, 22842, 1821, 628, 628 ]
3.470588
34
import os import numpy as np import pandas as pd housing_df = pd.read_csv(filepath_or_buffer='~/C:\Users\nikhi\NIKH0610\class5-homework\toys-datasets\boston')
[ 11748, 28686, 198, 11748, 299, 32152, 355, 45941, 198, 11748, 19798, 292, 355, 279, 67, 198, 198, 50028, 62, 7568, 796, 279, 67, 13, 961, 62, 40664, 7, 7753, 6978, 62, 273, 62, 22252, 11639, 93, 14, 34, 7479, 14490, 59, 17187, 5303,...
2.409091
66
def insert_metatable(): """SQL query to insert records from table insert into a table on a DB """ return """ INSERT INTO TABLE {{ params.target_schema }}.{{ params.target_table }} VALUES ('{{ params.schema }}', '{{ params.table }}', {{ ti.xcom_pull(key='hive_res', task_ids=params.count_inserts)[0...
[ 198, 4299, 7550, 62, 4164, 21156, 33529, 198, 220, 220, 220, 37227, 17861, 12405, 284, 7550, 4406, 422, 3084, 7550, 656, 257, 3084, 319, 257, 20137, 198, 220, 220, 220, 37227, 628, 220, 220, 220, 1441, 37227, 198, 220, 220, 220, 29194...
2.871212
132
# -*- coding: utf-8 -*- """Highlevel wrapper of the VISA Library. :copyright: 2014-2020 by PyVISA-py Authors, see AUTHORS for more details. :license: MIT, see LICENSE for more details. """ import random from collections import OrderedDict from typing import Any, Dict, Iterable, List, Optional, Tuple, Union, cast fr...
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 37811, 11922, 5715, 29908, 286, 262, 569, 22312, 10074, 13, 628, 198, 25, 22163, 4766, 25, 1946, 12, 42334, 416, 9485, 53, 22312, 12, 9078, 46665, 11, 766, 37195, 20673,...
2.411534
9,190
from __future__ import absolute_import from __future__ import division from __future__ import print_function from __future__ import unicode_literals import cv2 import numpy as np import os import math from PIL import Image, ImageDraw, ImageFont from caffe2.python import workspace from detectron.core.config import cf...
[ 6738, 11593, 37443, 834, 1330, 4112, 62, 11748, 198, 6738, 11593, 37443, 834, 1330, 7297, 198, 6738, 11593, 37443, 834, 1330, 3601, 62, 8818, 198, 6738, 11593, 37443, 834, 1330, 28000, 1098, 62, 17201, 874, 198, 198, 11748, 269, 85, 17,...
2.8223
287
# -*- coding: utf-8 -*- ''' Execute salt convenience routines ''' # Import python libs from __future__ import print_function from __future__ import absolute_import import collections import logging import time import sys import multiprocessing # Import salt libs import salt.exceptions import salt.loader import salt.m...
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 7061, 6, 198, 23002, 1133, 8268, 15607, 31878, 198, 7061, 6, 198, 198, 2, 17267, 21015, 9195, 82, 198, 6738, 11593, 37443, 834, 1330, 3601, 62, 8818, 198, 6738, 11593, ...
3.45977
174
# For usage of lark with PyInstaller. See https://pyinstaller-sample-hook.readthedocs.io/en/latest/index.html import os
[ 2, 1114, 8748, 286, 300, 668, 351, 9485, 15798, 263, 13, 4091, 3740, 1378, 9078, 17350, 263, 12, 39873, 12, 25480, 13, 961, 83, 704, 420, 82, 13, 952, 14, 268, 14, 42861, 14, 9630, 13, 6494, 201, 198, 201, 198, 11748, 28686, 201 ]
2.795455
44
# Copyright (c) 2019 Sagar Gubbi. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. import sys import numpy as np import gym import tensorflow as tf from tensorflow.keras.models import Sequential, Model from tensorflow.keras.layers import Input,...
[ 2, 15069, 357, 66, 8, 13130, 25605, 283, 402, 549, 8482, 13, 1439, 2489, 10395, 13, 198, 2, 5765, 286, 428, 2723, 2438, 318, 21825, 416, 257, 347, 10305, 12, 7635, 5964, 326, 460, 307, 198, 2, 1043, 287, 262, 38559, 24290, 2393, 1...
2.715318
692
import click from arbol.arbol import aprint, asection from dexp.cli.defaults import DEFAULT_CLEVEL, DEFAULT_CODEC, DEFAULT_STORE from dexp.cli.parsing import _get_output_path, _parse_channels, _parse_chunks from dexp.datasets.open_dataset import glob_datasets from dexp.datasets.operations.crop import dataset_crop
[ 11748, 3904, 198, 6738, 610, 28984, 13, 283, 28984, 1330, 257, 4798, 11, 257, 5458, 198, 198, 6738, 36017, 79, 13, 44506, 13, 12286, 82, 1330, 5550, 38865, 62, 29931, 18697, 11, 5550, 38865, 62, 34, 3727, 2943, 11, 5550, 38865, 62, ...
2.855856
111
import sys from matplotlib import image as mpimg import numpy as np import os DIPHA_CONST = 8067171840 DIPHA_IMAGE_TYPE_CONST = 1 DIM = 3 input_dir = os.path.join(os.getcwd(), sys.argv[1]) dipha_output_filename = sys.argv[2] vert_filename = sys.argv[3] input_filenames = [name for nam...
[ 11748, 25064, 201, 198, 6738, 2603, 29487, 8019, 1330, 2939, 355, 29034, 9600, 201, 198, 11748, 299, 32152, 355, 45941, 201, 198, 11748, 28686, 201, 198, 201, 198, 35, 4061, 7801, 62, 10943, 2257, 796, 4019, 3134, 1558, 1507, 1821, 201,...
2.004382
1,141
""" Tools para validar o arquivo template recebido do SQS """
[ 37811, 198, 33637, 31215, 4938, 283, 267, 610, 421, 23593, 11055, 1407, 14065, 78, 466, 49747, 50, 198, 37811, 198 ]
3.1
20
import numpy as np import matplotlib.pyplot as plt import math N = [100,500,1000,5000] fig = plt.figure() for i in range(4): X = np.array([]) x = 0.1 #initialize x0 to be 0.1 for j in range(N[i]): u = np.random.rand() x_star = np.random.normal(x,10) A = min(1,eval(x_star)/eval(x)) #...
[ 11748, 299, 32152, 355, 45941, 198, 11748, 2603, 29487, 8019, 13, 9078, 29487, 355, 458, 83, 198, 11748, 10688, 198, 198, 45, 796, 685, 3064, 11, 4059, 11, 12825, 11, 27641, 60, 198, 5647, 796, 458, 83, 13, 26875, 3419, 198, 1640, 1...
1.993506
462
#!/usr/bin/python # -*- encoding: utf8 -*- import itertools import math import sys import IPy if __name__ == "__main__": main()
[ 2, 48443, 14629, 14, 8800, 14, 29412, 198, 2, 532, 9, 12, 21004, 25, 3384, 69, 23, 532, 9, 12, 198, 198, 11748, 340, 861, 10141, 198, 11748, 10688, 198, 11748, 25064, 198, 198, 11748, 6101, 88, 628, 198, 198, 361, 11593, 3672, 834...
2.403509
57
name = "mail.txt" counts = dict() handle = open(name) for line in handle: line = line.rstrip() if line == '': continue words = line.split() if words[0] == 'From': counts[words[5][:2]] = counts.get(words[5][:2], 0) + 1 tlist = list() for key, value in counts.items(): ...
[ 3672, 796, 366, 4529, 13, 14116, 1, 198, 9127, 82, 796, 8633, 3419, 198, 28144, 796, 1280, 7, 3672, 8, 198, 1640, 1627, 287, 5412, 25, 198, 220, 220, 220, 220, 1627, 796, 1627, 13, 81, 36311, 3419, 198, 220, 220, 220, 220, 611, ...
2.158416
202
import os from typing import Any, Dict, List, Optional import carla from core.simulators.carla_simulator import CarlaSimulator from core.simulators.carla_data_provider import CarlaDataProvider from .srunner.scenarios.route_scenario import RouteScenario, SCENARIO_CLASS_DICT from .srunner.scenariomanager.scenario_mana...
[ 11748, 28686, 198, 6738, 19720, 1330, 4377, 11, 360, 713, 11, 7343, 11, 32233, 198, 198, 11748, 1097, 5031, 198, 198, 6738, 4755, 13, 14323, 24325, 13, 7718, 5031, 62, 14323, 8927, 1330, 1879, 5031, 8890, 8927, 198, 6738, 4755, 13, 14...
3.283019
106
import myproject myproject.logs(show_level='debug') myproject.mymod.do_something()
[ 11748, 616, 16302, 198, 198, 1820, 16302, 13, 6404, 82, 7, 12860, 62, 5715, 11639, 24442, 11537, 628, 198, 1820, 16302, 13, 1820, 4666, 13, 4598, 62, 18927, 3419, 198 ]
2.866667
30
#!/usr/bin/env python # coding: utf-8 # BEGIN --- required only for testing, remove in real world code --- BEGIN import os import sys THISDIR = os.path.dirname(os.path.abspath(__file__)) APPDIR = os.path.abspath(os.path.join(THISDIR, os.path.pardir, os.path.pardir)) sys.path.insert(0, APPDIR) # END --- required only f...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 2, 19617, 25, 3384, 69, 12, 23, 198, 198, 2, 347, 43312, 11420, 2672, 691, 329, 4856, 11, 4781, 287, 1103, 995, 2438, 11420, 347, 43312, 198, 11748, 28686, 198, 11748, 25064, 198, 43...
2.635338
266