content
stringlengths
1
1.04M
input_ids
listlengths
1
774k
ratio_char_token
float64
0.38
22.9
token_count
int64
1
774k
import hashlib import os
[ 11748, 12234, 8019, 198, 11748, 28686, 198 ]
3.571429
7
# baleen.utils.timez # Utility functions for Baleen # # Author: Benjamin Bengfort <benjamin@bengfort.com> # Created: Mon Sep 22 10:14:57 2014 -0400 # # Copyright (C) 2014 Bengfort.com # For license information, see LICENSE.txt # # ID: utils.py [] benjamin@bengfort.com $ """ Utility functions for Baleenc """ ######...
[ 2, 275, 1000, 268, 13, 26791, 13, 2435, 89, 198, 2, 34030, 5499, 329, 43248, 268, 198, 2, 198, 2, 6434, 25, 220, 220, 14533, 14964, 3319, 1279, 11722, 13337, 31, 65, 1516, 3319, 13, 785, 29, 198, 2, 15622, 25, 220, 2892, 8621, 2...
2.705502
1,236
# 插入排序 if __name__ == '__main__': print(Solution().insertSort([1,8,3,2,6,9]))
[ 2, 10545, 237, 240, 17739, 98, 162, 236, 240, 41753, 237, 628, 198, 361, 11593, 3672, 834, 6624, 705, 834, 12417, 834, 10354, 198, 220, 220, 220, 3601, 7, 46344, 22446, 28463, 42758, 26933, 16, 11, 23, 11, 18, 11, 17, 11, 21, 11, ...
1.765957
47
""" Tests for the genetic maps management. """ import unittest from unittest import mock import tarfile import tempfile import os.path import shutil import urllib.request import pathlib import msprime import stdpopsim from stdpopsim import genetic_maps import tests # Infrastructure for keeping a local cache of the ...
[ 37811, 198, 51, 3558, 329, 262, 8513, 8739, 4542, 13, 198, 37811, 198, 11748, 555, 715, 395, 198, 6738, 555, 715, 395, 1330, 15290, 198, 11748, 13422, 7753, 198, 11748, 20218, 7753, 198, 11748, 28686, 13, 6978, 198, 11748, 4423, 346, ...
2.479381
1,164
""" Copyright 2017 ARM Limited 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 writing, software dis...
[ 37811, 198, 15269, 2177, 20359, 15302, 198, 26656, 15385, 739, 262, 24843, 13789, 11, 10628, 362, 13, 15, 357, 1169, 366, 34156, 15341, 198, 5832, 743, 407, 779, 428, 2393, 2845, 287, 11846, 351, 262, 13789, 13, 198, 1639, 743, 7330, ...
2.947814
709
import dash_html_components as html import dash_core_components as dcc def simple_bubble_chart(id_, title): """Generates simple bubble chart component Args: id (str): Component id title (str): Component title Returns: obj: Html div object """ return html.Div( cla...
[ 11748, 14470, 62, 6494, 62, 5589, 3906, 355, 27711, 198, 11748, 14470, 62, 7295, 62, 5589, 3906, 355, 288, 535, 628, 198, 4299, 2829, 62, 46176, 903, 62, 40926, 7, 312, 62, 11, 3670, 2599, 198, 220, 220, 220, 37227, 8645, 689, 2829,...
2.02952
271
# -*- coding:UTF-8 -*- #! /usr/bin/python3 print('''for循环使用格式: for <variable> in <sequence>: <statements> else: <statements>\n''') # 以下 for 实例中使用了 break 语句,break 语句用于跳出当前循环体 for a in [1,2,3,4,5,5,6,7,7,8,8,9,9,10,12,13,14,56,78]: if a == 8: print('a = 8 了') break # 直接结束循环 pri...
[ 2, 532, 9, 12, 19617, 25, 48504, 12, 23, 532, 9, 12, 201, 198, 2, 0, 1220, 14629, 14, 8800, 14, 29412, 18, 201, 198, 4798, 7, 7061, 6, 1640, 36181, 103, 163, 236, 107, 45635, 18796, 101, 43718, 120, 28156, 237, 171, 120, 248, ...
1.202614
1,071
# Copyright 2014 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 by applicable law or agre...
[ 2, 15069, 1946, 3012, 3457, 13, 1439, 2489, 10395, 13, 198, 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, ...
3.77957
186
import logging import socket import time from collections import defaultdict
[ 11748, 18931, 198, 11748, 17802, 198, 11748, 640, 198, 198, 6738, 17268, 1330, 4277, 11600, 628 ]
4.9375
16
import numpy as np import cv2 import matplotlib.pyplot as plt from pathlib import Path import glob2 as glob import os import sys savedir = "./output/" # Add main support to run file from terminal directly if __name__ == '__main__': args = sys.argv # args[0] = current file # args[1] = function name ...
[ 11748, 299, 32152, 355, 45941, 198, 11748, 269, 85, 17, 198, 11748, 2603, 29487, 8019, 13, 9078, 29487, 355, 458, 83, 198, 6738, 3108, 8019, 1330, 10644, 198, 11748, 15095, 17, 355, 15095, 198, 11748, 28686, 198, 11748, 25064, 198, 82, ...
2.731034
145
#------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for # license information. #-------------------------------------------------------------------------- from dateti...
[ 2, 10097, 45537, 198, 2, 15069, 357, 66, 8, 5413, 10501, 13, 1439, 2489, 10395, 13, 198, 2, 49962, 739, 262, 17168, 13789, 13, 4091, 13789, 13, 14116, 287, 262, 1628, 6808, 329, 198, 2, 5964, 1321, 13, 198, 2, 10097, 35937, 198, 1...
4.543353
173
import logging from healthtools.scrapers.base_scraper import Scraper from healthtools.config import SITES from datetime import datetime class DoctorsScraper(Scraper): ''' Scraper for regular doctors on the medical board website ''' def elasticsearch_format(self, entry): """ Format en...
[ 11748, 18931, 198, 198, 6738, 1535, 31391, 13, 1416, 2416, 364, 13, 8692, 62, 1416, 38545, 1330, 1446, 38545, 198, 6738, 1535, 31391, 13, 11250, 1330, 311, 2043, 1546, 198, 6738, 4818, 8079, 1330, 4818, 8079, 628, 198, 4871, 28274, 3351...
2.383693
417
from bisect import bisect def lis(seq, indices=False): '''longest increasing subsequence >>> lis([1, 2, 5, 3, 4]) [1, 2, 3, 4] ''' if not seq: return [] # prevs[i] is the index of the previous element in the longest subsequence # containing element i prevs = [None] * len(seq) ...
[ 6738, 47457, 478, 1330, 47457, 478, 628, 198, 4299, 300, 271, 7, 41068, 11, 36525, 28, 25101, 2599, 198, 220, 220, 220, 705, 7061, 6511, 395, 3649, 6399, 594, 628, 220, 220, 220, 13163, 300, 271, 26933, 16, 11, 362, 11, 642, 11, 5...
2.041068
487
'''A collection of auxiliary functions that might be useful.''' from obscurator import Obscurator from common import Similarity def showcase(s): '''Showcase all tiers of characters on a given sentence.''' print(s) for tiers in [ [Similarity.HIGH], [Similarity.MEDIUM], [Similarity.LO...
[ 7061, 6, 32, 4947, 286, 37419, 5499, 326, 1244, 307, 4465, 2637, 7061, 198, 6738, 10666, 333, 1352, 1330, 1835, 1416, 333, 1352, 198, 6738, 2219, 1330, 11014, 414, 198, 198, 4299, 21742, 7, 82, 2599, 198, 220, 220, 220, 705, 7061, 1...
2.515152
165
from SmartAnno.utils.ConfigReader import ConfigReader from SmartAnno.gui.PreviousNextWidgets import PreviousNextHTML from SmartAnno.gui.Workflow import Workflow from SmartAnno.utils.IntroStep import IntroStep ConfigReader('../conf/smartanno_conf2.json') intro=IntroStep('<h2>Welcome to SmartAnno!</h2><h4>First, let&apos...
[ 6738, 10880, 2025, 3919, 13, 26791, 13, 16934, 33634, 1330, 17056, 33634, 198, 6738, 10880, 2025, 3919, 13, 48317, 13, 21448, 10019, 54, 312, 11407, 1330, 21801, 10019, 28656, 198, 6738, 10880, 2025, 3919, 13, 48317, 13, 12468, 11125, 133...
2.674009
227
import os, sys file = os.path.join(sys.path[0],"txt/2.txt") print(printText(file))
[ 11748, 28686, 11, 25064, 201, 198, 220, 220, 220, 220, 220, 220, 220, 220, 201, 198, 201, 198, 7753, 796, 28686, 13, 6978, 13, 22179, 7, 17597, 13, 6978, 58, 15, 17241, 14116, 14, 17, 13, 14116, 4943, 201, 198, 201, 198, 4798, 7, ...
1.960784
51
import aiomeasures import logging from functools import wraps log = logging.getLogger('discord')
[ 11748, 257, 72, 462, 13846, 198, 11748, 18931, 198, 6738, 1257, 310, 10141, 1330, 27521, 198, 198, 6404, 796, 18931, 13, 1136, 11187, 1362, 10786, 15410, 585, 11537, 198 ]
3.37931
29
""" Copyright (c) 2015 Red Hat, Inc All rights reserved. This software may be modified and distributed under the terms of the BSD license. See the LICENSE file for details. Add arbitrary yum repo, specified by URL of repo file, to a list of repos which should be injected into built image by the inject_yum_repo plugi...
[ 37811, 198, 15269, 357, 66, 8, 1853, 2297, 10983, 11, 3457, 198, 3237, 2489, 10395, 13, 198, 198, 1212, 3788, 743, 307, 9518, 290, 9387, 739, 262, 2846, 198, 1659, 262, 347, 10305, 5964, 13, 4091, 262, 38559, 24290, 2393, 329, 3307, ...
3.142857
231
import final_strategy_train import baseline_strategy import test import time import submissions from os import path TRAIN_START_NAME = submissions.STRATEGY_NAME TRAIN_EPOCH_NUM = submissions.EPOCH_NUM FILENAME = 'savedStrats/' + TRAIN_START_NAME + "_" + str(TRAIN_EPOCH_NUM) + ".pkl" if path.exists(FILENAME): pri...
[ 11748, 2457, 62, 2536, 4338, 62, 27432, 198, 11748, 14805, 62, 2536, 4338, 198, 11748, 1332, 198, 11748, 640, 198, 11748, 22129, 198, 6738, 28686, 1330, 3108, 198, 198, 51, 3861, 1268, 62, 2257, 7227, 62, 20608, 796, 22129, 13, 18601, ...
2.961957
368
from ..base_internode import BaseInternode __all__ = ['NormCoor']
[ 6738, 11485, 8692, 62, 23124, 1098, 1330, 7308, 15865, 1098, 628, 198, 834, 439, 834, 796, 37250, 35393, 34, 2675, 20520, 628 ]
3.136364
22
#!/usr/bin/python2.7 import RPi.GPIO as GPIO GPIO.setmode(GPIO.BCM) GPIO.setup(14, GPIO.OUT) GPIO.output(14, GPIO.HIGH)
[ 2, 48443, 14629, 14, 8800, 14, 29412, 17, 13, 22, 198, 11748, 25812, 72, 13, 16960, 9399, 355, 50143, 198, 16960, 9399, 13, 2617, 14171, 7, 16960, 9399, 13, 2749, 44, 8, 198, 198, 16960, 9399, 13, 40406, 7, 1415, 11, 50143, 13, 12...
2.033333
60
import pytest from txtble import IndeterminateWidthError, Txtble BAD_STRING = "\x01" ERRMSG = repr(BAD_STRING) + ": string has indeterminate width" @pytest.mark.parametrize( "s", [ "\x0E", "\x0F", # altcharset on/off "\033[17;23H", # move cursor "\a", # bell "\b", ...
[ 11748, 12972, 9288, 198, 6738, 256, 742, 903, 1330, 1423, 13221, 378, 30916, 12331, 11, 309, 742, 903, 198, 198, 33, 2885, 62, 18601, 2751, 796, 37082, 87, 486, 1, 198, 1137, 49, 5653, 38, 796, 41575, 7, 33, 2885, 62, 18601, 2751, ...
1.909091
286
from flask import Flask, render_template, jsonify, redirect import pymongo import scrape_mars # Establish Flask app & mongodb connection app = Flask(__name__) conn = "mongodb://localhost:27017" client = pymongo.MongoClient(conn) # Connect to mongo db and mars_info collection db = client.mars collection = db.mars_info...
[ 6738, 42903, 1330, 46947, 11, 8543, 62, 28243, 11, 33918, 1958, 11, 18941, 198, 11748, 279, 4948, 25162, 198, 11748, 42778, 62, 76, 945, 198, 198, 2, 10062, 17148, 46947, 598, 1222, 285, 506, 375, 65, 4637, 198, 1324, 796, 46947, 7, ...
2.849315
146
import sys import os.path import re buttonFileName = 'Button/gpio-keys' print "Checking " + buttonFileName if os.path.isfile(buttonFileName): try: print "Setting proper permissions on " + buttonFileName os.chmod(buttonFileName, 0744) except: pass apikeysFileName = 'Clock/ApiKeys.py' wu...
[ 11748, 25064, 198, 11748, 28686, 13, 6978, 198, 11748, 302, 198, 198, 16539, 8979, 5376, 796, 705, 21864, 14, 31197, 952, 12, 13083, 6, 198, 4798, 366, 9787, 278, 366, 1343, 4936, 8979, 5376, 198, 361, 28686, 13, 6978, 13, 4468, 576, ...
2.148036
662
from typing import NamedTuple ## Security class ChallengeInfo(NamedTuple): """ Attributes: id (int): The id of the challenge challenge (str): The challenge to complete """ id: int challenge: str
[ 6738, 19720, 1330, 34441, 51, 29291, 628, 198, 2235, 4765, 198, 4871, 13879, 12360, 7, 45, 2434, 51, 29291, 2599, 198, 220, 220, 220, 37227, 198, 220, 220, 220, 49213, 25, 198, 220, 220, 220, 220, 220, 220, 220, 4686, 357, 600, 2599...
2.785714
84
import prctl import signal import subprocess from .output import Output class FfmpegOutput(Output): """ The FfmpegOutput class allows an encoded video stream to be passed to FFmpeg for output, meaning we can take advantange of FFmpeg's wide support for different output formats. Optionally audio recor...
[ 11748, 778, 34168, 198, 11748, 6737, 198, 11748, 850, 14681, 198, 198, 6738, 764, 22915, 1330, 25235, 628, 198, 4871, 376, 38353, 22071, 26410, 7, 26410, 2599, 198, 220, 220, 220, 37227, 198, 220, 220, 220, 383, 376, 38353, 22071, 26410...
3.663636
440
from pathlib import Path from pytest import fixture from ..factset import Factset from ..jinja_renderer import JinjaRenderer @fixture @fixture
[ 6738, 3108, 8019, 1330, 10644, 198, 6738, 12972, 9288, 1330, 29220, 198, 6738, 11485, 22584, 2617, 1330, 19020, 2617, 198, 6738, 11485, 18594, 6592, 62, 10920, 11882, 1330, 17297, 6592, 49, 437, 11882, 628, 198, 31, 69, 9602, 628, 198, ...
3.333333
45
import numpy as np from sklearn.base import BaseEstimator, TransformerMixin
[ 198, 11748, 299, 32152, 355, 45941, 198, 6738, 1341, 35720, 13, 8692, 1330, 7308, 22362, 320, 1352, 11, 3602, 16354, 35608, 259, 628, 198 ]
3.291667
24
# PATH interpreter # Copyright (c) 2003-04 Francis Rogers # # 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...
[ 2, 46490, 28846, 198, 2, 15069, 357, 66, 8, 5816, 12, 3023, 12155, 15372, 198, 2, 198, 2, 2448, 3411, 318, 29376, 7520, 11, 1479, 286, 3877, 11, 284, 597, 1048, 16727, 257, 4866, 198, 2, 286, 428, 3788, 290, 3917, 10314, 3696, 357...
2.140331
4,354
# Generated by Django 3.0.6 on 2020-05-28 19:33 from django.db import migrations, models
[ 2, 2980, 515, 416, 37770, 513, 13, 15, 13, 21, 319, 12131, 12, 2713, 12, 2078, 678, 25, 2091, 198, 198, 6738, 42625, 14208, 13, 9945, 1330, 15720, 602, 11, 4981, 628 ]
2.84375
32
"""Tests for 'layout' filters.""" from flask_extras.filters import layout class TestBs3Col: """All tests for bs3 col function.""" def test_returns_right_width(self): """Test the return value for a valid type.""" assert layout.bs3_cols(1) == 12 assert layout.bs3_cols(2) == 6 a...
[ 37811, 51, 3558, 329, 705, 39786, 6, 16628, 526, 15931, 198, 198, 6738, 42903, 62, 2302, 8847, 13, 10379, 1010, 1330, 12461, 628, 198, 4871, 6208, 37000, 18, 5216, 25, 198, 220, 220, 220, 37227, 3237, 5254, 329, 275, 82, 18, 951, 21...
2.28479
309
# -*- coding: utf-8 -*- from nose.tools import * import sys import logging from rainbow_logging_handler import RainbowLoggingHandler
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 6738, 9686, 13, 31391, 1330, 1635, 198, 11748, 25064, 198, 11748, 18931, 198, 6738, 27223, 62, 6404, 2667, 62, 30281, 1330, 19909, 11187, 2667, 25060, 628, 198 ]
3.292683
41
from Resources.required_modules import pymodules pymodules.install(pymodules.presets.modules("mailer")) from email.mime.multipart import MIMEMultipart from email.mime.text import MIMEText import smtplib import ssl # Repeated mailing to a single address def mail_repeated_address(message_object, data_object, reciever_a...
[ 6738, 13864, 13, 35827, 62, 18170, 1330, 12972, 18170, 198, 9078, 18170, 13, 17350, 7, 9078, 18170, 13, 18302, 1039, 13, 18170, 7203, 4529, 263, 48774, 198, 198, 6738, 3053, 13, 76, 524, 13, 16680, 541, 433, 1330, 337, 3955, 3620, 586...
3.03125
320
from graphSearch import GraphSearch from DeepFeatures import DeepFeatures import os import glob import json <<<<<<< HEAD ======= <<<<<<< HEAD ======= >>>>>>> c5b3a9dac6d0789cc8005df728bc69dff4b455b3 import argparse import numpy as np import scipy from skimage import transform <<<<<<< HEAD ======= >>>>>>> Adding chang...
[ 198, 6738, 4823, 18243, 1330, 29681, 18243, 198, 6738, 10766, 23595, 1330, 10766, 23595, 198, 11748, 28686, 198, 11748, 15095, 198, 11748, 33918, 198, 16791, 16791, 16791, 27, 39837, 198, 1421, 18604, 198, 16791, 16791, 16791, 27, 39837, 19...
2.236683
3,980
import unittest from selenium.common.exceptions import TimeoutException from manga_py.base_classes.web_driver import make_driver, get_display
[ 11748, 555, 715, 395, 198, 198, 6738, 384, 11925, 1505, 13, 11321, 13, 1069, 11755, 1330, 3862, 448, 16922, 198, 198, 6738, 15911, 62, 9078, 13, 8692, 62, 37724, 13, 12384, 62, 26230, 1330, 787, 62, 26230, 11, 651, 62, 13812, 628 ]
3.452381
42
# -*- coding: utf-8 -*- # Form implementation generated from reading ui file 'simple_threshold.ui' # # Created by: PyQt5 UI code generator 5.9.2 # # WARNING! All changes made in this file will be lost! from PyQt5 import QtCore, QtGui, QtWidgets
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 198, 2, 5178, 7822, 7560, 422, 3555, 334, 72, 2393, 705, 36439, 62, 400, 10126, 13, 9019, 6, 198, 2, 198, 2, 15622, 416, 25, 9485, 48, 83, 20, 12454, 2438, 17301, ...
2.850575
87
import re
[ 11748, 302, 201, 198, 201, 198 ]
2.166667
6
import discord from discord.ext import commands from discord_slash import cog_ext from discord_slash.utils.manage_commands import create_option
[ 11748, 36446, 198, 6738, 36446, 13, 2302, 1330, 9729, 198, 6738, 36446, 62, 6649, 1077, 1330, 43072, 62, 2302, 198, 6738, 36446, 62, 6649, 1077, 13, 26791, 13, 805, 496, 62, 9503, 1746, 1330, 2251, 62, 18076 ]
3.864865
37
"""Auth command.""" from .base import Base from .. import settings, spotify import spotipy class Auth(Base): """Authenticate user"""
[ 37811, 30515, 3141, 526, 15931, 198, 6738, 764, 8692, 1330, 7308, 198, 6738, 11485, 1330, 6460, 11, 4136, 1958, 198, 198, 11748, 4136, 541, 88, 628, 198, 4871, 26828, 7, 14881, 2599, 198, 220, 220, 220, 37227, 47649, 5344, 2836, 37811, ...
3.333333
42
import pysolr from django.conf import settings from django.template import Template, Context from django.test import TestCase from haystack import connections, connection_router from haystack import indexes from haystack.utils.loading import UnifiedIndex from core.models import MockModel from solr_tests.tests.solr_back...
[ 11748, 279, 893, 349, 81, 198, 6738, 42625, 14208, 13, 10414, 1330, 6460, 198, 6738, 42625, 14208, 13, 28243, 1330, 37350, 11, 30532, 198, 6738, 42625, 14208, 13, 9288, 1330, 6208, 20448, 198, 6738, 27678, 25558, 1330, 8787, 11, 4637, 6...
3.846154
91
import tensorflow as tf import numpy as np class PositionalEncoding(object): """ In https://rubikscode.net/2019/08/05/transformer-with-python-and-tensorflow-2-0-attention-layers/, he uses [sin(w*0), sin(w*1), ..., cos(w*0), cos(w*1), ...] but in tensorflow tutorial https://www.tensorflow.or...
[ 11748, 11192, 273, 11125, 355, 48700, 198, 11748, 299, 32152, 355, 45941, 198, 198, 4871, 18574, 1859, 27195, 7656, 7, 15252, 2599, 198, 220, 220, 220, 37227, 198, 220, 220, 220, 220, 220, 220, 220, 554, 3740, 1378, 25089, 72, 591, 81...
2.539924
263
# # Copyright (c) 2021-2022, Alden Torres # # Licensed under the terms of the MIT license. # Copy of the license at https://opensource.org/licenses/MIT # import json import re import subprocess ecc_headers = ["util", "hash", "mac", "kdf", "ed25519", "ristretto255", "bls12_381", "h2c", "oprf",...
[ 2, 198, 2, 15069, 357, 66, 8, 33448, 12, 1238, 1828, 11, 15586, 268, 27663, 198, 2, 198, 2, 49962, 739, 262, 2846, 286, 262, 17168, 5964, 13, 198, 2, 17393, 286, 262, 5964, 379, 3740, 1378, 44813, 1668, 13, 2398, 14, 677, 4541, ...
2.297778
225
from enum import Enum from typing import Dict, List, NewType from palantir.clock import Clock from palantir.types import Timestamp Metrics = NewType("Metrics", Dict[Metric, Dict[Timestamp, List[float]]])
[ 6738, 33829, 1330, 2039, 388, 198, 6738, 19720, 1330, 360, 713, 11, 7343, 11, 968, 6030, 198, 198, 6738, 6340, 415, 343, 13, 15750, 1330, 21328, 198, 6738, 6340, 415, 343, 13, 19199, 1330, 5045, 27823, 628, 198, 198, 9171, 10466, 796,...
3.115942
69
# # ESnet Network Operating System (ENOS) Copyright (c) 2015, The Regents # of the University of California, through Lawrence Berkeley National # Laboratory (subject to receipt of any required approvals from the # U.S. Dept. of Energy). All rights reserved. # # If you have questions about your rights to use or distrib...
[ 2, 198, 2, 13380, 3262, 7311, 24850, 4482, 357, 1677, 2640, 8, 15069, 357, 66, 8, 1853, 11, 383, 3310, 658, 198, 2, 286, 262, 2059, 286, 3442, 11, 832, 13914, 14727, 2351, 198, 2, 18643, 357, 32796, 284, 14507, 286, 597, 2672, 458...
2.663033
4,953
from bme280 import Bme280 import busio try: import adafruit_dht except ImportError: print ("\033[91mError importing DHT code -- Are you running on an IoT device?\033[0m") try: import board except NotImplementedError: print ("\033[91mError importing board -- Are you running on an IoT device?\033[0m") ...
[ 6738, 275, 1326, 21033, 1330, 347, 1326, 21033, 198, 11748, 1323, 952, 198, 198, 28311, 25, 198, 220, 220, 220, 1330, 512, 1878, 4872, 62, 67, 4352, 198, 16341, 17267, 12331, 25, 198, 220, 220, 220, 3601, 5855, 59, 44427, 58, 6420, ...
2.403608
1,774
from pyabc.transition import NotEnoughParticles, LocalTransition, Transition from pyabc import MultivariateNormalTransition import pandas as pd import numpy as np import pytest from pyabc import GridSearchCV @pytest.fixture(params=[LocalTransition, MultivariateNormalTransition]) def test_argument_or...
[ 6738, 12972, 39305, 13, 7645, 653, 1330, 1892, 47323, 7841, 2983, 11, 10714, 8291, 653, 11, 40658, 198, 6738, 12972, 39305, 1330, 7854, 42524, 26447, 8291, 653, 198, 11748, 19798, 292, 355, 279, 67, 198, 11748, 299, 32152, 355, 45941, 1...
2.424396
787
import pytest from sessionista.store import store MY_ACTION = 'my_action'
[ 11748, 12972, 9288, 198, 6738, 6246, 12523, 13, 8095, 1330, 3650, 198, 198, 26708, 62, 44710, 796, 705, 1820, 62, 2673, 6, 198 ]
3.26087
23
import torch def reg_loss_interaction(A, reg_lambda = 0.001, order=2): """ Regularization loss for the off-diag elements of interaction matrix A """ mask = ~torch.eye(A.shape[0], dtype=torch.bool) return reg_lambda * torch.linalg.norm(A[mask], order) def reg_loss_r(r, reg_lambda = 0.001, order=2): """ Regula...
[ 11748, 28034, 628, 198, 4299, 842, 62, 22462, 62, 3849, 2673, 7, 32, 11, 842, 62, 50033, 796, 657, 13, 8298, 11, 1502, 28, 17, 2599, 198, 220, 37227, 23603, 1634, 2994, 329, 262, 572, 12, 10989, 363, 4847, 286, 10375, 17593, 317, ...
2.898477
197
raio = float(input()) area = (raio * raio) * 3.14159 print("A=%0.4f" %area)
[ 430, 952, 796, 12178, 7, 15414, 28955, 198, 198, 20337, 796, 357, 430, 952, 1635, 2179, 952, 8, 1635, 513, 13, 1415, 19707, 220, 198, 198, 4798, 7203, 32, 28, 4, 15, 13, 19, 69, 1, 4064, 20337, 8 ]
2
39
# Copyright (c) Meta Platforms, Inc. and affiliates. All rights reserved. from datetime import datetime """ Develop an experiment that measures and combination of the following features: spatial_frequency temporal_frequency mean_luminance eccentricity field_angle orientation """ constants = dict( savefolder="....
[ 2, 15069, 357, 66, 8, 30277, 19193, 82, 11, 3457, 13, 290, 29116, 13, 1439, 2489, 10395, 13, 198, 198, 6738, 4818, 8079, 1330, 4818, 8079, 198, 198, 37811, 198, 19246, 281, 6306, 326, 5260, 290, 6087, 286, 262, 1708, 3033, 25, 198, ...
2.354749
358
from dataclasses import dataclass, field from typing import List __NAMESPACE__ = "urn:test" @dataclass
[ 6738, 4818, 330, 28958, 1330, 4818, 330, 31172, 11, 2214, 198, 6738, 19720, 1330, 7343, 198, 198, 834, 45, 29559, 47, 11598, 834, 796, 366, 700, 25, 9288, 1, 628, 198, 31, 19608, 330, 31172, 198 ]
2.944444
36
""" ******************************************************************************** * Name: model_file_database_connection_base.py * Author: nswain * Created On: June 05, 2018 * Copyright: (c) Aquaveo 2018 ******************************************************************************** """ class ModelDatabaseConnect...
[ 37811, 198, 17174, 17174, 8412, 198, 9, 6530, 25, 2746, 62, 7753, 62, 48806, 62, 38659, 62, 8692, 13, 9078, 198, 9, 6434, 25, 299, 2032, 391, 198, 9, 15622, 1550, 25, 2795, 8870, 11, 2864, 198, 9, 15069, 25, 357, 66, 8, 11446, 1...
2.856502
223
from .selection import selection_counter
[ 6738, 764, 49283, 1330, 6356, 62, 24588, 198 ]
5.125
8
import anndata as ad import matplotlib.pyplot as plt import pandas as pd import numpy as np import random import warnings from warnings import warn def cluster_composition(adata, cluster, condition, xlabel='cell cluster', ylabel='cell count', title=None, save=False): """ Deprecated. Us...
[ 11748, 281, 358, 1045, 355, 512, 198, 11748, 2603, 29487, 8019, 13, 9078, 29487, 355, 458, 83, 198, 11748, 19798, 292, 355, 279, 67, 198, 11748, 299, 32152, 355, 45941, 198, 11748, 4738, 198, 198, 11748, 14601, 198, 6738, 14601, 1330, ...
2.227189
1,633
import sys import os import shutil import subprocess import multiprocessing from multiprocessing import Pool import pickle as pkl import itertools import numpy as np from scipy import stats import tensorflow as tf # mute tensorflow information os.environ['TF_CPP_MIN_LOG_LEVEL'] = '3' # or any {'0', '1', '2'} tf.com...
[ 11748, 25064, 198, 11748, 28686, 198, 11748, 4423, 346, 198, 11748, 850, 14681, 198, 11748, 18540, 305, 919, 278, 198, 6738, 18540, 305, 919, 278, 1330, 19850, 198, 11748, 2298, 293, 355, 279, 41582, 198, 11748, 340, 861, 10141, 198, 19...
1.91505
5,721
# -*- coding: utf-8 -*- import numpy as np import pandas as pd import math import statistics from sktime.transformations.base import _PanelToPanelTransformer from sktime.datatypes._panel._convert import from_nested_to_2d_array from sktime.utils.validation.panel import check_X class SlopeTransformer(_PanelToPanelTrans...
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 11748, 299, 32152, 355, 45941, 198, 11748, 19798, 292, 355, 279, 67, 198, 11748, 10688, 198, 11748, 7869, 198, 6738, 1341, 2435, 13, 35636, 602, 13, 8692, 1330, 4808, 26...
2.141472
2,785
from .tracc import * from .functions import *
[ 6738, 764, 2213, 4134, 1330, 1635, 198, 6738, 764, 12543, 2733, 1330, 1635, 198 ]
3.285714
14
#!/usr/bin/env python # TODO: description of this script # BOB = controller # CAB = cable # COM = misc # DEV = controller # GPS = sensor # LCD = actuator # ROB = actuator # SEN = sensor # TOL = tool # WRL = wireless # KIT = (drop) # LAB = (drop) # PRT = misc import flask_sqlalchemy from iot_lab_inventory import db fro...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 2, 16926, 46, 25, 6764, 286, 428, 4226, 198, 2, 347, 9864, 796, 10444, 198, 2, 327, 6242, 796, 7862, 198, 2, 9440, 796, 12747, 198, 2, 5550, 53, 796, 10444, 198, 2, 15472, 796, 1...
1.93617
564
__title__ = "stockist" __description__ = "" __version__ = "0.1.1" __author__ = "Maina Nick" __license__ = "DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE 2.0" __copyright__ = "Copyright (C) 2018-Present Maina Nick"
[ 834, 7839, 834, 796, 366, 13578, 396, 1, 198, 834, 11213, 834, 796, 13538, 198, 834, 9641, 834, 796, 366, 15, 13, 16, 13, 16, 1, 198, 834, 9800, 834, 796, 366, 13383, 64, 8047, 1, 198, 834, 43085, 834, 796, 366, 18227, 25003, 33...
2.826667
75
# coding: utf-8 # flake8: noqa """ Sunshine Conversations API The version of the OpenAPI document: 9.4.5 Generated by: https://openapi-generator.tech """ from __future__ import absolute_import __version__ = "9.4.6" # import apis into sdk package from sunshine_conversations_client.api.activities_api i...
[ 2, 19617, 25, 3384, 69, 12, 23, 198, 198, 2, 781, 539, 23, 25, 645, 20402, 198, 198, 37811, 198, 220, 220, 220, 32210, 32200, 602, 7824, 628, 220, 220, 220, 383, 2196, 286, 262, 4946, 17614, 3188, 25, 860, 13, 19, 13, 20, 198, ...
3.843559
6,699
__version__ = "1.021" try: from .client import Client from .order import Order except ImportError: pass # OANDA API URLS SANDBOX = ( "http://api-sandbox.oanda.com", "http://stream-sandbox.oanda.com" ) PRACTICE = ( "https://api-fxpractice.oanda.com", "https://stream-fxpractice.oanda.com" ...
[ 834, 9641, 834, 796, 366, 16, 13, 46821, 1, 628, 198, 28311, 25, 198, 220, 220, 220, 422, 764, 16366, 1330, 20985, 198, 220, 220, 220, 422, 764, 2875, 1330, 8284, 198, 16341, 17267, 12331, 25, 198, 220, 220, 220, 1208, 628, 198, 2...
2.303371
178
import sys if __name__ == "__main__": if len(sys.argv) == 2: print(max_number(n=sys.argv[1])) else: sys.exit(1)
[ 11748, 25064, 628, 198, 198, 361, 11593, 3672, 834, 6624, 366, 834, 12417, 834, 1298, 198, 220, 220, 220, 611, 18896, 7, 17597, 13, 853, 85, 8, 6624, 362, 25, 198, 220, 220, 220, 220, 220, 220, 220, 3601, 7, 9806, 62, 17618, 7, ...
1.864865
74
import random import re import pandas as pd from sklearn.model_selection import train_test_split """ Translate txt into json """ # Lowercase, trim, and remove non-letter characters if __name__ == "__main__": src_path, trg_path = 'data/hard_pc_src.txt', 'data/hard_pc_tar.txt' raw_data = processData(src_pa...
[ 11748, 4738, 198, 11748, 302, 198, 198, 11748, 19798, 292, 355, 279, 67, 198, 6738, 1341, 35720, 13, 19849, 62, 49283, 1330, 4512, 62, 9288, 62, 35312, 198, 37811, 198, 8291, 17660, 256, 742, 656, 33918, 198, 37811, 198, 198, 2, 16048...
2.62807
285
from custom.ilsgateway.comparison_reports import ProductsCompareReport, LocationsCompareReport, \ WebUsersCompareReport, SMSUsersCompareReport from custom.ilsgateway.tanzania.reports.alerts import AlertReport from custom.ilsgateway.tanzania.reports.dashboard_report import DashboardReport from custom.ilsgateway.tanz...
[ 6738, 2183, 13, 4487, 10494, 1014, 13, 785, 1845, 1653, 62, 48922, 1330, 18675, 41488, 19100, 11, 41277, 41488, 19100, 11, 3467, 198, 220, 220, 220, 5313, 14490, 41488, 19100, 11, 29287, 14490, 41488, 19100, 198, 6738, 2183, 13, 4487, 1...
3.011173
358
import sys import pickle from tqdm import tqdm sys.path.append(sys.path[0].rsplit('/', 1)[0]) from elementary_step_om.chem import Fragment from elementary_step_om.external_calculation.xtb_calculations import xTBCalculator from elementary_step_om.external_calculation.gaussian_calculations import GaussianCalculator i...
[ 11748, 25064, 198, 11748, 2298, 293, 198, 6738, 256, 80, 36020, 1330, 256, 80, 36020, 220, 198, 198, 17597, 13, 6978, 13, 33295, 7, 17597, 13, 6978, 58, 15, 4083, 3808, 489, 270, 10786, 14, 3256, 352, 38381, 15, 12962, 198, 6738, 19...
2.109843
701
# Copyright (c) 2021 Microsoft # # This software is released under the MIT License. # https://opensource.org/licenses/MIT import json import logging import os import tempfile from enum import Enum from pathlib import Path from typing import Literal, Tuple, Union import lightgbm import mlflow import numpy as np import...
[ 2, 15069, 357, 66, 8, 33448, 5413, 198, 2, 198, 2, 770, 3788, 318, 2716, 739, 262, 17168, 13789, 13, 198, 2, 3740, 1378, 44813, 1668, 13, 2398, 14, 677, 4541, 14, 36393, 198, 198, 11748, 33918, 198, 11748, 18931, 198, 11748, 28686, ...
2.484873
3,636
#!/usr/bin/env python3 # Copyright (c) Facebook, Inc. and its affiliates. # # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. import asyncio import importlib.resources import logging import os import shlex import subprocess import sys import tem...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 18, 198, 2, 15069, 357, 66, 8, 3203, 11, 3457, 13, 290, 663, 29116, 13, 198, 2, 198, 2, 770, 2723, 2438, 318, 11971, 739, 262, 17168, 5964, 1043, 287, 262, 198, 2, 38559, 24290, 2393, ...
3.525114
219
## All icons in Laelaps package. __all__ = [ 'BotBwdIcon.png', 'BotFwdIcon.png', 'BotLeftIcon.png', 'BotRightIcon.png', 'BotStopIcon.png', 'LaelapsAlarmsIcon.png', 'LaelapsCamIcon.png', 'LaelapsImuIcon.png', 'LaelapsPanelIcon.png', 'LaelapsRangeIcon.png', 'LaelapsTwistIcon.png', 'ROSIcon.png',...
[ 2235, 1439, 17149, 287, 406, 3010, 1686, 5301, 13, 198, 834, 439, 834, 796, 685, 198, 220, 705, 20630, 33, 16993, 19578, 13, 11134, 3256, 198, 220, 705, 20630, 37, 16993, 19578, 13, 11134, 3256, 198, 220, 705, 20630, 18819, 19578, 13,...
2.174807
389
from flask import Flask from flask import render_template from api.user_api import user_api from api.audit_api import audit_api from api.sns_api import sns_api from errors import ParameterError, DataError from utilities import response from constants import APIStatus from batch.notification import apns_push app = Flas...
[ 6738, 42903, 1330, 46947, 198, 6738, 42903, 1330, 8543, 62, 28243, 198, 6738, 40391, 13, 7220, 62, 15042, 1330, 2836, 62, 15042, 198, 6738, 40391, 13, 3885, 270, 62, 15042, 1330, 14984, 62, 15042, 198, 6738, 40391, 13, 82, 5907, 62, 1...
3.017467
229
from doubles import InstanceDouble, allow from pytest import fixture from staticpy.category import Category @fixture @fixture
[ 6738, 21938, 1330, 2262, 590, 25628, 11, 1249, 198, 6738, 12972, 9288, 1330, 29220, 198, 198, 6738, 9037, 9078, 13, 22872, 1330, 21743, 628, 628, 198, 31, 69, 9602, 628, 198, 31, 69, 9602, 628, 628, 628 ]
3.72973
37
# liste methotları listelerimiz üzerine methotlar sayesinde işlemler yapmamızı sağlar numbers = [5,2,1,7,4] # listeye öğe eklemek için append methodundan yararlanırız numbers.append(20) print(numbers) # listeye indeks numarasına göre öge eklemek numbers.insert(2,10) print(numbers) # listemizde bir öğeyi silmek için r...
[ 2, 1351, 68, 1138, 8940, 21681, 30102, 1351, 417, 263, 320, 528, 6184, 120, 9107, 500, 1138, 8940, 21681, 910, 274, 521, 68, 1312, 46481, 10671, 1754, 331, 499, 76, 321, 30102, 89, 30102, 473, 33133, 21681, 198, 77, 17024, 796, 685, ...
2.20216
1,296
from PIL import Image from pdf2image import convert_from_bytes import os import math import random #
[ 6738, 350, 4146, 1330, 7412, 201, 198, 6738, 37124, 17, 9060, 1330, 10385, 62, 6738, 62, 33661, 201, 198, 11748, 28686, 201, 198, 11748, 10688, 201, 198, 11748, 4738, 201, 198, 2 ]
3.28125
32
import cv2 import numpy as np import matplotlib import matplotlib.pyplot as plt from mpl_toolkits.axes_grid1 import ImageGrid from numpy import pi from utils import stripes, get_gradation_2d,\ get_gradation_3d, checkerboard, radial_gradient from utils.filters import gau_kern, circ_mask from skimage.color impor...
[ 11748, 269, 85, 17, 198, 11748, 299, 32152, 355, 45941, 198, 11748, 2603, 29487, 8019, 198, 11748, 2603, 29487, 8019, 13, 9078, 29487, 355, 458, 83, 198, 6738, 285, 489, 62, 25981, 74, 896, 13, 897, 274, 62, 25928, 16, 1330, 7412, 4...
2.205085
590
import os import pprint import argparse import time import torch import torch.nn as nn import torch.backends.cudnn as cudnn from torch.utils.data import DataLoader import sys sys.path.insert(0, os.path.join(os.path.dirname(__file__), '..')) import lib.models as models from lib.config import config, update_config from l...
[ 11748, 28686, 198, 11748, 279, 4798, 198, 11748, 1822, 29572, 198, 11748, 640, 198, 11748, 28034, 198, 11748, 28034, 13, 20471, 355, 299, 77, 198, 11748, 28034, 13, 1891, 2412, 13, 66, 463, 20471, 355, 269, 463, 20471, 198, 6738, 28034,...
2.250412
607
#!/bin/env python2 """ Script for running annotation on the document files. """ from sys import argv as _argv import logging from ConfigParser import ConfigParser from os import path, listdir from typing import List from srl_nlp.framenet.adapter import PARSERS_AVAILABLE, DocumentAdapter from srl_nlp.framenet.corpus...
[ 2, 48443, 8800, 14, 24330, 21015, 17, 198, 198, 37811, 198, 7391, 329, 2491, 23025, 319, 262, 3188, 3696, 13, 198, 37811, 198, 198, 6738, 25064, 1330, 1822, 85, 355, 4808, 853, 85, 198, 198, 11748, 18931, 198, 6738, 17056, 46677, 1330...
2.775623
361
# This script takes a list of project directories and find the owner info from "_infra/project.yml" import os import sys import yaml if __name__ == '__main__': main()
[ 2, 770, 4226, 2753, 257, 1351, 286, 1628, 29196, 290, 1064, 262, 4870, 7508, 422, 45434, 10745, 430, 14, 16302, 13, 88, 4029, 1, 198, 11748, 28686, 198, 11748, 25064, 198, 11748, 331, 43695, 628, 628, 198, 361, 11593, 3672, 834, 6624,...
3.240741
54
from __future__ import absolute_import import logging import argparse import apache_beam as beam import apache_beam.transforms.window as window '''Normalize pubsub string to json object''' # Lines look like this: # {'datetime': '2017-07-13T21:15:02Z', 'mac': 'FC:FC:48:AE:F6:94', 'status': 1} def run(argv=None): ...
[ 6738, 11593, 37443, 834, 1330, 4112, 62, 11748, 198, 198, 11748, 18931, 198, 11748, 1822, 29572, 198, 11748, 2471, 4891, 62, 40045, 355, 15584, 198, 11748, 2471, 4891, 62, 40045, 13, 7645, 23914, 13, 17497, 355, 4324, 198, 198, 7061, 6,...
2.315234
663
#!/usr/bin/python """Simple VLAN topology example Linear Topology, Switch1-----Switch2 Switch1-----a1, a2, b1, b2 Switch2-----a3, a4 ,b3, b4 objective: 1. a1,a2,a3,a4, belongs to VLAN 100 2. b1, b2, b3, b4 belongs to VLAN 200 Switch1 to Switch2 connected with 802.1Q TRUNK Links """ from mininet.topo import Top...
[ 2, 48443, 14629, 14, 8800, 14, 29412, 628, 198, 37811, 26437, 569, 25697, 1353, 1435, 1672, 198, 198, 14993, 451, 5849, 1435, 11, 198, 198, 38978, 16, 30934, 38978, 17, 198, 198, 38978, 16, 30934, 64, 16, 11, 257, 17, 11, 275, 16, ...
2.580645
310
# web.responder.strategy.base import json """ Base class for strategies returning JSON responses """
[ 2, 3992, 13, 5546, 263, 13, 2536, 4338, 13, 8692, 198, 198, 11748, 33918, 198, 198, 37811, 198, 14881, 1398, 329, 10064, 8024, 19449, 9109, 198, 37811, 198 ]
3.678571
28
import keras # import tensorflow.keras as keras # from keras.models import Sequential from keras.layers import LSTM,Dense,Activation,SimpleRNN,Conv1D,MaxPool1D,Flatten,Reshape,Dropout,MaxPooling1D,Masking from keras.metrics import categorical_accuracy # from keras.callbacks import EarlyStopping # from keras.metrics imp...
[ 11748, 41927, 292, 198, 2, 1330, 11192, 273, 11125, 13, 6122, 292, 355, 41927, 292, 198, 2, 422, 41927, 292, 13, 27530, 1330, 24604, 1843, 198, 6738, 41927, 292, 13, 75, 6962, 1330, 406, 2257, 44, 11, 35, 1072, 11, 25526, 341, 11, ...
3.015504
129
# -*- coding: utf-8 -*- import numpy as np import math import cv2 __all__ = ['_energy', '_entropy', '_next_power_of_two', '_pad_image_power_2', 'pad_image', '_zero_runs']
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 201, 198, 201, 198, 11748, 299, 32152, 355, 45941, 201, 198, 11748, 10688, 201, 198, 11748, 269, 85, 17, 201, 198, 201, 198, 834, 439, 834, 796, 37250, 62, 22554, 3256, 705...
2.053763
93
import math import torch from torch.optim import Optimizer
[ 11748, 10688, 201, 198, 11748, 28034, 201, 198, 6738, 28034, 13, 40085, 1330, 30011, 7509, 201, 198 ]
3.647059
17
""" * Written by the Trapdoor-NX team, May 8, 2018. * Licensing information can found in the 'LICENSE' file. * Injector based on reswitched/fusee-launcher. """ CURR_VERSION = '0.1'
[ 37811, 198, 1635, 22503, 416, 262, 21914, 9424, 12, 45, 55, 1074, 11, 1737, 807, 11, 2864, 13, 198, 1635, 10483, 26426, 1321, 460, 1043, 287, 262, 705, 43, 2149, 24290, 6, 2393, 13, 198, 1635, 554, 752, 273, 1912, 319, 581, 86, 10...
2.787879
66
from docs_snippets_crag.intro_tutorial.basics.connecting_solids.complex_pipeline import diamond from docs_snippets_crag.intro_tutorial.test_util import patch_cereal_requests @patch_cereal_requests
[ 6738, 34165, 62, 16184, 3974, 1039, 62, 6098, 363, 13, 600, 305, 62, 83, 44917, 13, 12093, 873, 13, 8443, 278, 62, 34453, 2340, 13, 41887, 62, 79, 541, 4470, 1330, 15291, 198, 6738, 34165, 62, 16184, 3974, 1039, 62, 6098, 363, 13, ...
2.802817
71
from pysh import pysh a = 1 b = 2 pysh(s['echo $HOME {a} {b}'])
[ 6738, 279, 893, 71, 1330, 279, 893, 71, 198, 198, 64, 796, 352, 198, 65, 796, 362, 198, 79, 893, 71, 7, 82, 17816, 30328, 720, 39069, 1391, 64, 92, 1391, 65, 92, 6, 12962 ]
1.828571
35
from setuptools import find_packages, setup requirements = ["slackclient==2.5.0"] setup( name="slackhermes", version="1.0.0", description="A message notifier for Slack", author="mdcg", url="https://github.com/mdcg/slack-hermes", packages=find_packages(exclude=["tests"]), install_requires=r...
[ 6738, 900, 37623, 10141, 1330, 1064, 62, 43789, 11, 9058, 198, 198, 8897, 18883, 796, 14631, 6649, 441, 16366, 855, 17, 13, 20, 13, 15, 8973, 198, 198, 40406, 7, 198, 220, 220, 220, 1438, 2625, 6649, 441, 372, 6880, 1600, 198, 220, ...
2.556291
151
import re from typing import Any import pendulum from timezonefinder import TimezoneFinder from crimsobot.exceptions import LocationNotFound from crimsobot.utils.astronomy import where_are_you from crimsobot.utils.tools import clib_path_join # This any param is a bummer but it's the only way I can see to make m...
[ 11748, 302, 198, 6738, 19720, 1330, 4377, 198, 198, 11748, 44017, 14452, 198, 6738, 640, 11340, 22805, 1330, 3862, 11340, 37, 5540, 198, 198, 6738, 3606, 568, 13645, 13, 1069, 11755, 1330, 13397, 3673, 21077, 198, 6738, 3606, 568, 13645, ...
3.523364
107
""" Lambda, let, let* Examples: (let ( (a 6)) (* a 1)) """ from typing import List import copy import concurrent.futures from mplisp.structures import env, tree from mplisp import evaluator def lambda_expression(args: List, node): """Return lambda expression""" if len(args) != 2: eval...
[ 37811, 21114, 6814, 11, 1309, 11, 1309, 9, 198, 198, 27730, 25, 198, 7, 1616, 198, 220, 220, 220, 357, 198, 220, 220, 220, 220, 220, 220, 220, 357, 64, 718, 4008, 198, 220, 220, 220, 20789, 257, 352, 4008, 198, 37811, 198, 6738, ...
2.57767
618
#!/usr/bin/env python3 import glob from PIL import Image for file in glob.glob("./rgb/*.jpg"): im1 = Image.open(file) try: im2 = Image.open(file.replace('rgb', 'averaged')) except: im2 = Image.open(file.replace('rgb', 'depth')) get_concat_v(im1, im2).save(file.replace('rgb', 'merged')) #print("Merged: " + fi...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 18, 198, 198, 11748, 15095, 198, 6738, 350, 4146, 1330, 7412, 198, 198, 1640, 2393, 287, 15095, 13, 4743, 672, 7, 1911, 14, 81, 22296, 15211, 13, 9479, 1, 2599, 198, 197, 320, 16, 796, ...
2.29932
147
#!/usr/bin/env python3 import sys, time, colorsys, threading from enum import Enum try: import numpy except ImportError: sys.exit("This script requires the numpy module\nInstall with: sudo pip3 install numpy") from lib.logger import Level, Logger from lib.feature import Feature from lib.enums import Color fr...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 18, 198, 198, 11748, 25064, 11, 640, 11, 7577, 893, 11, 4704, 278, 198, 6738, 33829, 1330, 2039, 388, 198, 198, 28311, 25, 198, 220, 220, 220, 1330, 299, 32152, 198, 16341, 17267, 12331, ...
1.995692
4,410
from djchoices import ChoiceItem, DjangoChoices
[ 6738, 42625, 6679, 1063, 1330, 18502, 7449, 11, 37770, 22164, 1063, 628 ]
4.083333
12
# flake8: noqa __all__ = []
[ 2, 781, 539, 23, 25, 645, 20402, 198, 834, 439, 834, 796, 17635, 198 ]
2
14
from os import system
[ 6738, 28686, 1330, 1080, 220, 198 ]
3.833333
6
""" vaenet.py PyTorch implementation of a Convolutional Neural Network Variational Autoencoder ( VaeNet ) Author : Abhishek . """ # PyTorch Imports import torch.nn as nn # VaeNet class # Initializer for the ConvNetVAE model # Method for the forward pass # Method for the encoder la...
[ 37811, 198, 6862, 268, 316, 13, 9078, 198, 198, 20519, 15884, 354, 7822, 286, 257, 34872, 2122, 282, 47986, 7311, 15965, 864, 5231, 6571, 66, 12342, 357, 569, 3609, 7934, 1267, 198, 198, 13838, 1058, 2275, 14363, 258, 74, 764, 198, 37...
2.5875
160
# Import di flask e degli operatori di templating from flask import Flask, render_template from flask_mail import Mail # Definizione oggetto WSGI app = Flask(__name__) mail = Mail(app) # Configurazioni app.config.from_object('config') app.secret_key = app.config['CSRF_SESSION_KEY'] # HTTP error handling @app.errorh...
[ 2, 17267, 2566, 42903, 304, 3396, 4528, 10088, 72, 2566, 2169, 489, 803, 198, 6738, 42903, 1330, 46947, 11, 8543, 62, 28243, 198, 6738, 42903, 62, 4529, 1330, 11099, 628, 198, 2, 29589, 528, 7935, 267, 1130, 316, 1462, 25290, 18878, 1...
3.23871
155
""" PyOO - Pythonic interface to Apache OpenOffice API (UNO) Copyright (c) 2016-2017 Seznam.cz, a.s. Copyright (c) 2017-2019 Miloslav Pojman """ from __future__ import division import datetime import functools import itertools import numbers import os import sys import uno # Filters used when saving document. FI...
[ 37811, 198, 20519, 6684, 532, 11361, 291, 7071, 284, 24843, 4946, 27743, 7824, 357, 4944, 46, 8, 198, 198, 15269, 357, 66, 8, 1584, 12, 5539, 1001, 89, 7402, 13, 26691, 11, 257, 13, 82, 13, 198, 15269, 357, 66, 8, 2177, 12, 23344,...
2.485603
19,691
# Author: Zi Wang import cPickle as pickle import os import active_learners.helper as helper from active_learners.active_learner import run_ActiveLearner def gen_data(expid, exp, n_data, save_fnm): ''' Generate initial data for a function associated the experiment. Args: expid: ID of the experimen...
[ 2, 6434, 25, 45643, 15233, 198, 11748, 269, 31686, 293, 355, 2298, 293, 198, 11748, 28686, 198, 11748, 4075, 62, 35720, 364, 13, 2978, 525, 355, 31904, 198, 6738, 4075, 62, 35720, 364, 13, 5275, 62, 3238, 1008, 1330, 1057, 62, 13739, ...
2.364418
1,512
import pybullet as p import time import pybullet_data from math import sin, cos import random physicsClient= p.connect(p.GUI)#or p.DIRECTfor non-graphical version p.setAdditionalSearchPath(pybullet_data.getDataPath()) #optionally p.setGravity(0,0,-10) planeId= p.loadURDF("plane.urdf") robotStartPos= [0,0,1] robotStar...
[ 11748, 12972, 15065, 1616, 355, 279, 198, 11748, 640, 198, 11748, 12972, 15065, 1616, 62, 7890, 198, 6738, 10688, 1330, 7813, 11, 8615, 198, 11748, 4738, 220, 198, 198, 746, 23154, 11792, 28, 279, 13, 8443, 7, 79, 13, 40156, 8, 2, 2...
2.446429
1,288
# -*- coding: utf-8 -*- # # Dell EMC OpenManage Ansible Modules # Version 2.1.3 # Copyright (C) 2020 Dell Inc. or its subsidiaries. All Rights Reserved. # GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) # from __future__ import (absolute_import, division, print_function) _...
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 198, 2, 198, 2, 23617, 412, 9655, 4946, 5124, 496, 28038, 856, 3401, 5028, 198, 2, 10628, 362, 13, 16, 13, 18, 198, 2, 15069, 357, 34, 8, 12131, 23617, 3457, 13, 3...
2.070326
1,749
# <<BEGIN-copyright>> # Copyright 2021, Lawrence Livermore National Security, LLC. # See the top-level COPYRIGHT file for details. # # SPDX-License-Identifier: BSD-3-Clause # <<END-copyright>> from math import sqrt from brownies.legacy.toENDF6 import endfFormats as endfFormatsModule from brownies.legacy.converting.E...
[ 2, 9959, 33, 43312, 12, 22163, 4766, 4211, 198, 2, 15069, 33448, 11, 13914, 45036, 3549, 2351, 4765, 11, 11419, 13, 198, 2, 4091, 262, 1353, 12, 5715, 27975, 38162, 9947, 2393, 329, 3307, 13, 198, 2, 220, 198, 2, 30628, 55, 12, 34...
2.762097
248