content
stringlengths
1
1.04M
input_ids
listlengths
1
774k
ratio_char_token
float64
0.38
22.9
token_count
int64
1
774k
# Copyright 2020 Huawei Technologies Co., Ltd # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to...
[ 2, 15069, 12131, 43208, 21852, 1766, 1539, 12052, 198, 2, 198, 2, 49962, 739, 262, 24843, 13789, 11, 10628, 362, 13, 15, 357, 1169, 366, 34156, 15341, 198, 2, 345, 743, 407, 779, 428, 2393, 2845, 287, 11846, 351, 262, 13789, 13, 198...
3.918605
258
import pyVmomi from pyVmomi import vim, vmodl from DatacenterPrac import Login,GetCluster,GetDatacenter,get_obj,GetClusters from clusterPrac import GetHostsInClusters import status from VMPrac import find_obj,get_container_view,collect_properties import multiprocessing from multiprocessing.dummy import Pool as ThreadPo...
[ 11748, 12972, 53, 76, 12753, 198, 6738, 12972, 53, 76, 12753, 1330, 43907, 11, 410, 4666, 75, 198, 6738, 16092, 330, 9255, 6836, 330, 1330, 23093, 11, 3855, 2601, 5819, 11, 3855, 27354, 330, 9255, 11, 1136, 62, 26801, 11, 3855, 2601, ...
2.694681
940
import os, json from typing import List, Dict from hoshino.log import new_logger log = new_logger('maimaiDX') static = os.path.join(os.path.dirname(__file__), 'static') arcades_json = os.path.join(os.path.dirname(__file__), 'arcades.json') if not os.path.exists(arcades_json): raise '请安装arcades.json文件' ...
[ 11748, 28686, 11, 33918, 201, 198, 6738, 19720, 1330, 7343, 11, 360, 713, 201, 198, 6738, 289, 3768, 2879, 13, 6404, 1330, 649, 62, 6404, 1362, 201, 198, 201, 198, 6404, 796, 649, 62, 6404, 1362, 10786, 76, 1385, 1872, 36227, 11537, ...
2.335385
325
from selenium import webdriver from selenium.webdriver.common.by import By from selenium.webdriver.support.ui import Select from selenium.webdriver.support.ui import WebDriverWait from selenium.common.exceptions import NoSuchElementException, ElementNotVisibleException from browsermobproxy import Server import u...
[ 6738, 384, 11925, 1505, 1330, 3992, 26230, 201, 198, 6738, 384, 11925, 1505, 13, 12384, 26230, 13, 11321, 13, 1525, 1330, 2750, 201, 198, 6738, 384, 11925, 1505, 13, 12384, 26230, 13, 11284, 13, 9019, 1330, 9683, 201, 198, 6738, 384, ...
2.914089
291
from datetime import datetime from urllib.parse import urljoin from city_scrapers_core.constants import CLASSIFICATIONS, NOT_CLASSIFIED from city_scrapers_core.spiders import CityScrapersSpider from dateutil.parser import parse as datetime_parse from city_scrapers.items import Meeting
[ 6738, 4818, 8079, 1330, 4818, 8079, 198, 6738, 2956, 297, 571, 13, 29572, 1330, 19016, 22179, 198, 198, 6738, 1748, 62, 1416, 2416, 364, 62, 7295, 13, 9979, 1187, 1330, 42715, 30643, 18421, 11, 5626, 62, 45449, 198, 6738, 1748, 62, 14...
3.567901
81
import unittest from pynes.game import PPU
[ 11748, 555, 715, 395, 198, 198, 6738, 279, 25337, 13, 6057, 1330, 350, 5105, 628 ]
3
15
#!/usr/bin/python # -*- coding:utf-8 -*- import logging logger = logging.getLogger("PushConsumer") #导入上级目录模块 import sys sys.path.append("..") import settings_MQ as settings #启动JVM from jpype import * jvmPath = getDefaultJVMPath() startJVM(jvmPath, settings.JVM_OPTIONS, "-Djava.ext.dirs="+settings.JAVA_EXT_DIRS) #sta...
[ 2, 48443, 14629, 14, 8800, 14, 29412, 198, 2, 532, 9, 12, 19617, 25, 40477, 12, 23, 532, 9, 12, 198, 198, 11748, 18931, 198, 6404, 1362, 796, 18931, 13, 1136, 11187, 1362, 7203, 49222, 49106, 4943, 198, 198, 2, 43380, 120, 17739, ...
2.102144
793
import numpy from numpy.random import RandomState from numpy.linalg import cholesky as chol from limmbo.core.vdsimple import vd_reml from limmbo.io.input import InputData random = RandomState(15) N = 100 S = 1000 P = 3 snps = (random.rand(N, S) < 0.2).astype(float) kinship = numpy.dot(snps, snps.T) / float(10) y = ran...
[ 11748, 299, 32152, 198, 6738, 299, 32152, 13, 25120, 1330, 14534, 9012, 198, 6738, 299, 32152, 13, 75, 1292, 70, 1330, 442, 4316, 2584, 355, 442, 349, 198, 6738, 1761, 2022, 78, 13, 7295, 13, 85, 9310, 320, 1154, 1330, 410, 67, 62, ...
2.414474
304
""" Pigeon hole problem in cpmpy. ftp://ftp.inria.fr/INRIA/Projects/contraintes/publications/CLP-FD/plilp94.html ''' pigeon: the pigeon-hole problem consists in putting n pigeons in m pigeon-holes (at most 1 pigeon per hole). The boolean formulation uses n × m variables to indicate, for each pigeon, its hole number. O...
[ 37811, 198, 47, 10045, 261, 7604, 1917, 287, 31396, 3149, 88, 13, 198, 198, 701, 79, 1378, 701, 79, 13, 259, 7496, 13, 8310, 14, 1268, 49, 3539, 14, 16775, 82, 14, 3642, 16947, 274, 14, 11377, 602, 14, 5097, 47, 12, 26009, 14, 4...
2.752101
238
from .base import DataSink from .queued import QueuedSink from .notifier import MeasurementNotifierSink from .recorder import FileRecorderSink from .uploader import UploaderSink
[ 6738, 764, 8692, 1330, 6060, 50, 676, 198, 6738, 764, 4188, 1739, 1330, 4670, 1739, 50, 676, 198, 6738, 764, 1662, 7483, 1330, 24291, 434, 3673, 7483, 50, 676, 198, 6738, 764, 8344, 2875, 1330, 9220, 6690, 2875, 50, 676, 198, 6738, ...
3.490196
51
# http://github.com/bobk/jiracharts # # This example code set uses various charting libraries, Python with jira-python and # PowerShell with JiraPS to demonstrate generating useful charts and visualizations from Jira data from jira import JIRA import os import datetime # in this program we use both the gantt...
[ 198, 2, 220, 220, 2638, 1378, 12567, 13, 785, 14, 65, 672, 74, 14, 73, 343, 620, 5889, 198, 2, 198, 2, 220, 220, 770, 1672, 2438, 900, 3544, 2972, 8262, 278, 12782, 11, 11361, 351, 474, 8704, 12, 29412, 290, 220, 198, 2, 220, ...
3.215116
172
# imports here import argparse import time import torch from torch import nn from torch import optim import torch.nn.functional as F import torchvision from torchvision import datasets, models, transforms import matplotlib.pyplot as plt from collections import OrderedDict # torchvision.datasets import ImageFolder from...
[ 2, 17944, 994, 198, 11748, 1822, 29572, 198, 198, 11748, 640, 198, 11748, 28034, 198, 6738, 28034, 1330, 299, 77, 198, 6738, 28034, 1330, 6436, 198, 11748, 28034, 13, 20471, 13, 45124, 355, 376, 198, 11748, 28034, 10178, 198, 6738, 2803...
2.589623
212
__author__ = 'dwatkins'
[ 834, 9800, 834, 796, 705, 67, 47261, 5331, 6, 198 ]
2.4
10
from typing import Literal, Any
[ 6738, 19720, 1330, 25659, 1691, 11, 4377 ]
4.428571
7
import numpy as np
[ 11748, 299, 32152, 355, 45941, 628, 628, 198 ]
2.875
8
from pytheas.data.projects import Project import urllib.parse
[ 6738, 12972, 1169, 292, 13, 7890, 13, 42068, 1330, 4935, 198, 198, 11748, 2956, 297, 571, 13, 29572, 628, 628, 628 ]
3.238095
21
import logging from pathlib import Path from tempfile import mkstemp from typing import Iterator, List, Optional import glob import matplotlib.pyplot as plt import numpy as np from IPython.display import Audio, Image, display import cv2 import librosa from tqdm import tqdm from .mixins import ImageTrainerMixin from ...
[ 11748, 18931, 198, 6738, 3108, 8019, 1330, 10644, 198, 6738, 20218, 7753, 1330, 33480, 927, 79, 198, 6738, 19720, 1330, 40806, 1352, 11, 7343, 11, 32233, 198, 11748, 15095, 198, 198, 11748, 2603, 29487, 8019, 13, 9078, 29487, 355, 458, ...
2.876289
291
#!/usr/bin/env python3 # -*- coding: utf-8 -*- # # This file is part of the minifold project. # https://github.com/nokia/minifold __author__ = "Marc-Olivier Buob" __maintainer__ = "Marc-Olivier Buob" __email__ = "marc-olivier.buob@nokia-bell-labs.com" __copyright__ = "Copyright (C) 2018, Nokia" __license__ ...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 18, 198, 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 2, 198, 2, 770, 2393, 318, 636, 286, 262, 949, 361, 727, 1628, 13, 198, 2, 3740, 1378, 12567, 13, 785, 14, 77...
2.347518
282
import nipype.pipeline.engine as pe from CPAC.pipeline.cpac_group_runner import load_config_yml
[ 198, 11748, 299, 541, 2981, 13, 79, 541, 4470, 13, 18392, 355, 613, 198, 6738, 16932, 2246, 13, 79, 541, 4470, 13, 13155, 330, 62, 8094, 62, 16737, 1330, 3440, 62, 11250, 62, 88, 4029, 628, 628, 198 ]
2.657895
38
load("//rules/jvm:private/label.bzl", _labeled_jars_implementation = "labeled_jars_implementation") # For bedtime reading: # https://github.com/bazelbuild/bazel/issues/4584 # https://groups.google.com/forum/#!topic/bazel-discuss/mt2llfwzmac labeled_jars = aspect( implementation = _labeled_jars_implementation, ...
[ 2220, 7203, 1003, 38785, 14, 73, 14761, 25, 19734, 14, 18242, 13, 65, 48274, 1600, 4808, 18242, 276, 62, 73, 945, 62, 320, 32851, 796, 366, 18242, 276, 62, 73, 945, 62, 320, 32851, 4943, 198, 198, 2, 1114, 3996, 2435, 3555, 25, 19...
2.681481
135
from __future__ import annotations from typing import Optional from jsonclasses import jsonclass, types @jsonclass
[ 6738, 11593, 37443, 834, 1330, 37647, 198, 6738, 19720, 1330, 32233, 198, 6738, 33918, 37724, 1330, 33918, 4871, 11, 3858, 628, 198, 31, 17752, 4871, 198 ]
4.5
26
# Embedded file name: c:\Jenkins\live\output\win_32_static\Release\midi-remote-scripts\Push\ScrollableList.py from __future__ import with_statement from functools import partial from _Framework.Control import ButtonControl, EncoderControl, control_list from _Framework.CompoundComponent import CompoundComponent from _Fr...
[ 2, 13302, 47238, 2393, 1438, 25, 269, 7479, 44875, 5331, 59, 12583, 59, 22915, 59, 5404, 62, 2624, 62, 12708, 59, 26362, 59, 13602, 72, 12, 47960, 12, 46521, 59, 49222, 59, 29261, 540, 8053, 13, 9078, 198, 6738, 11593, 37443, 834, 1...
2.795122
1,640
from locker import User, Credentials function() def create_user(username, password): ''' Function to create a new user with a username and password ''' return User(username, password) def save_user(user): ''' Function to save a new user ''' user.save_user() def display_user(): ...
[ 6738, 17355, 1330, 11787, 11, 327, 445, 14817, 628, 198, 198, 8818, 3419, 628, 198, 4299, 2251, 62, 7220, 7, 29460, 11, 9206, 2599, 198, 220, 220, 220, 705, 7061, 198, 220, 220, 220, 15553, 284, 2251, 257, 649, 2836, 351, 257, 20579...
3.003752
533
import datetime dt = '21/03/2012' day, month, year = (int(x) for x in dt.split('/')) ans = datetime.date(year, month, day) print ans.strftime("%A")
[ 11748, 4818, 8079, 198, 28664, 796, 705, 2481, 14, 3070, 14, 6999, 6, 198, 820, 11, 1227, 11, 614, 796, 357, 600, 7, 87, 8, 329, 2124, 287, 288, 83, 13, 35312, 10786, 14, 6, 4008, 220, 220, 220, 220, 198, 504, 796, 4818, 8079, ...
2.359375
64
nums = [2,1,0,1,2,2,3,0,4,2] val = 2 s = Solution() print(s.removeElement(nums,val))
[ 198, 77, 5700, 796, 685, 17, 11, 16, 11, 15, 11, 16, 11, 17, 11, 17, 11, 18, 11, 15, 11, 19, 11, 17, 60, 198, 2100, 796, 362, 198, 198, 82, 796, 28186, 3419, 198, 198, 4798, 7, 82, 13, 28956, 20180, 7, 77, 5700, 11, 2100, ...
1.77551
49
#!/usr/bin/env python3 import argparse import random onsets = [ "b", "c", "d", "f", "g", "h", "j", "k", "l", "m", "n", "p", "r", "s", "t", "v", "w", "pl", "bl", "kl", "ɡl", "pr", "br", "tr", "dr", "kr", "ɡr", "tw", "dw", "ɡw", "kw", "pw", "fl", "sl",...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 18, 198, 198, 11748, 1822, 29572, 198, 11748, 4738, 198, 198, 684, 1039, 796, 685, 198, 220, 366, 65, 1600, 198, 220, 366, 66, 1600, 198, 220, 366, 67, 1600, 198, 220, 366, 69, 1600, 19...
1.456881
1,090
# def f(): # print (x, id(x)) # x = 99 # print (x, id(x)) # f() # # ---------------- # def f(): # x = 100 # print (x, id(x)) # f() # # print (x) # # ---------------- # def f(): # x = 100 # print (x, id(x)) # x = 99 # print (x, id(x)) # f() # print (x, id(x)) # # ---------------- # def f(): ...
[ 2, 825, 277, 33529, 198, 2, 220, 220, 220, 220, 3601, 357, 87, 11, 4686, 7, 87, 4008, 198, 198, 2, 2124, 796, 7388, 198, 2, 3601, 357, 87, 11, 4686, 7, 87, 4008, 198, 2, 277, 3419, 198, 198, 2, 1303, 34400, 198, 198, 2, 825,...
1.898785
247
n1=int(input('digite um numero')) n2=int(input('digite um numero')) n3=int(input('digite um numero')) maior = n1 if n2 > n1 and n2 > n3 : maior = n2 if n3 > n1 and n3 >n2 : maior = n3 menor = n1 if n2 < n1 and n2 < n3 : menor = n2 if n3 < n1 and n3 < n2 : menor = n3 print ('{} é o MAIOR'.format(maior...
[ 77, 16, 28, 600, 7, 15414, 10786, 12894, 578, 23781, 997, 3529, 6, 4008, 198, 77, 17, 28, 600, 7, 15414, 10786, 12894, 578, 23781, 997, 3529, 6, 4008, 198, 77, 18, 28, 600, 7, 15414, 10786, 12894, 578, 23781, 997, 3529, 6, 4008, ...
1.983425
181
# To Do: improve docstrings from Parser import Parser from CodeWriter import CodeWriter import sys import os class VMTranslator: """ Main class. Handles input, reads the VM file, writes to the assembly file, and drives the VM translation process. """ @staticmethod @staticmethod @st...
[ 2, 1675, 2141, 25, 2987, 2205, 37336, 198, 198, 6738, 23042, 263, 1330, 23042, 263, 198, 6738, 6127, 34379, 1330, 6127, 34379, 198, 11748, 25064, 198, 11748, 28686, 628, 198, 4871, 16990, 8291, 41880, 25, 198, 220, 220, 220, 37227, 198,...
2.539749
239
# Python example # http://jasminsms.com import urllib2 import urllib baseParams = {'username':'foo', 'password':'bar', 'to':'+336222172', 'content':'Hello'} # Sending long content (more than 160 chars): baseParams['content'] = 'Very long message ...........................................................................
[ 2, 11361, 1672, 198, 2, 2638, 1378, 73, 8597, 1040, 907, 13, 785, 198, 11748, 2956, 297, 571, 17, 198, 11748, 2956, 297, 571, 198, 198, 8692, 10044, 4105, 796, 1391, 6, 29460, 10354, 6, 21943, 3256, 705, 28712, 10354, 6, 5657, 3256,...
3.111111
234
"""Initialize proj-template module."""
[ 37811, 24243, 1096, 386, 73, 12, 28243, 8265, 526, 15931, 198 ]
3.545455
11
from importlib import import_module as _import from .api import keywords, scan from .base import PkgcheckException from .results import Result __all__ = ('keywords', 'scan', 'PkgcheckException', 'Result') __title__ = 'pkgcheck' __version__ = '0.10.10' def __getattr__(name): """Provide import access to keyword c...
[ 6738, 1330, 8019, 1330, 1330, 62, 21412, 355, 4808, 11748, 198, 198, 6738, 764, 15042, 1330, 26286, 11, 9367, 198, 6738, 764, 8692, 1330, 350, 10025, 9122, 16922, 198, 6738, 764, 43420, 1330, 25414, 198, 198, 834, 439, 834, 796, 19203, ...
2.893048
187
# _*_ coding: utf-8 _*_ """ Time: 2022/3/7 15:37 Author: ZHANG Yuwei Version: V 0.2 File: setup.py Describe: """ import setuptools # Reads the content of your README.md into a variable to be used in the setup below with open("./README.md", "r") as fh: long_description = fh.read() setupt...
[ 2, 4808, 9, 62, 19617, 25, 3384, 69, 12, 23, 4808, 9, 62, 201, 198, 37811, 201, 198, 7575, 25, 220, 220, 220, 220, 33160, 14, 18, 14, 22, 1315, 25, 2718, 201, 198, 13838, 25, 220, 220, 1168, 39, 15567, 10605, 42990, 201, 198, ...
2.473008
389
from flask import jsonify, Response, request from model import StampModel, CouponModel from view import BaseResource
[ 6738, 42903, 1330, 33918, 1958, 11, 18261, 11, 2581, 198, 198, 6738, 2746, 1330, 40694, 17633, 11, 43156, 261, 17633, 198, 6738, 1570, 1330, 7308, 26198, 628, 198 ]
4.285714
28
# Run with Python 3 import requests import pandas as pd import math import copy '''This example demonstrates how to get lessons data via Stepik-API and why it can be useful.''' '''We download lessons' data one by one, then we make plots to see how much the loss of the people depends on the lesson time ''' plots_mes...
[ 2, 5660, 351, 11361, 513, 198, 11748, 7007, 198, 11748, 19798, 292, 355, 279, 67, 198, 11748, 10688, 198, 11748, 4866, 198, 198, 7061, 6, 1212, 1672, 15687, 703, 284, 651, 11658, 1366, 2884, 5012, 1134, 12, 17614, 290, 1521, 340, 460,...
2.5107
2,056
from aiautomation.testcase.test_plan import TestPlanRunner, PlanInfo plan = PlanInfo('4', '自动化测试', None , None, '119', '1000', '0', '0') t = TestPlanRunner(plan=plan) t.add_case("百度搜索", "一般百度搜索") t.start()
[ 6738, 257, 544, 315, 296, 341, 13, 9288, 7442, 13, 9288, 62, 11578, 1330, 6208, 20854, 49493, 11, 5224, 12360, 198, 198, 11578, 796, 5224, 12360, 10786, 19, 3256, 705, 164, 229, 103, 27950, 101, 44293, 244, 38184, 233, 46237, 243, 325...
1.76378
127
from pkg_example.calculator_module import Calculator
[ 6738, 279, 10025, 62, 20688, 13, 9948, 3129, 1352, 62, 21412, 1330, 43597, 198 ]
3.785714
14
#!/usr/bin/env python3 # -*- coding: utf-8 -*- from flask import Flask, session, redirect, url_for, escape, request import os os.putenv('LANG', 'en_US.UTF-8') os.putenv('LC_ALL', 'en_US.UTF-8') app = Flask(__name__) @app.route('/t') # @app.route('/') # def index(): # if 'username' in session: # return...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 18, 198, 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 198, 6738, 42903, 1330, 46947, 11, 6246, 11, 18941, 11, 19016, 62, 1640, 11, 6654, 11, 2581, 198, 11748, 28686, 1...
2.310502
438
#! encoding=utf8 # To decide the storage of RDD, there are different storage levels, which are given below - # DISK_ONLY = StorageLevel(True, False, False, False, 1) # DISK_ONLY_2 = StorageLevel(True, False, False, False, 2) # MEMORY_AND_DISK = StorageLevel(True, True, False, False, 1) # MEMORY_AND_DISK_2 = Storage...
[ 2, 0, 21004, 28, 40477, 23, 198, 2, 1675, 5409, 262, 6143, 286, 371, 16458, 11, 612, 389, 1180, 6143, 2974, 11, 543, 389, 1813, 2174, 532, 198, 198, 2, 13954, 42, 62, 1340, 11319, 796, 20514, 4971, 7, 17821, 11, 10352, 11, 10352, ...
2.657289
391
# Soultion for Project Euler Problem #8 - https://projecteuler.net/problem=8 # (c) 2017 dpetker TEST_VAL = '7316717653133062491922511967442657474235534919493496983520312774506326239578318016984801869478851843858615607891129494954595017379583319528532088055111254069874715852386305071569329096329522744304355766896648950...
[ 2, 22862, 2528, 295, 329, 4935, 412, 18173, 20647, 1303, 23, 532, 3740, 1378, 16302, 68, 18173, 13, 3262, 14, 45573, 28, 23, 198, 2, 357, 66, 8, 2177, 288, 6449, 6122, 198, 198, 51, 6465, 62, 23428, 796, 705, 4790, 21940, 1558, 29...
2.404145
579
""" utils.py Nicholas Boucher 2020 Utility functions for assisting in election verification calculations. """ from typing import TypeVar, Iterable from logging import info, warning from electionguard.group import ElementModP, int_to_p from electionguard.election import ElectionDescription, ContestDescript...
[ 37811, 3384, 4487, 13, 9078, 198, 220, 220, 220, 20320, 14551, 2044, 12131, 628, 220, 220, 220, 34030, 5499, 329, 26508, 287, 3071, 19637, 198, 220, 220, 220, 16765, 13, 198, 37811, 198, 198, 6738, 19720, 1330, 5994, 19852, 11, 40806, ...
2.644134
1,790
import os from krcg import deck from krcg import twda
[ 11748, 28686, 198, 198, 6738, 479, 6015, 70, 1330, 6203, 198, 6738, 479, 6015, 70, 1330, 665, 6814, 628, 628, 628 ]
2.857143
21
#!/usr/bin/env python # -*- coding: utf-8 -*- # 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...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 2, 49962, 284, 262, 24843, 10442, 5693, 357, 1921, 37, 8, 739, 530, 198, 2, 393, 517, 18920, 5964, 11704, 13, 220, ...
3.13879
562
#purpose: to take output from a MW@h .out file and produce workable data/plots to look at the resulting output in meaningful ways #this is still too hard-coded for my liking, but it'll have to do for now #i.e. if you want to add new attributes to the data class then you manually have to go through and fix the appending...
[ 2, 29983, 25, 284, 1011, 5072, 422, 257, 29961, 31, 71, 764, 448, 2393, 290, 4439, 670, 540, 1366, 14, 489, 1747, 284, 804, 379, 262, 7186, 5072, 287, 11570, 2842, 198, 2, 5661, 318, 991, 1165, 1327, 12, 40976, 329, 616, 24976, 11...
2.778796
764
from datetime import datetime from typing import cast, List, Optional from asyncpg import Record from attr import dataclass from linkedin_messaging import URN from mautrix.types import EventID, RoomID from .model_base import Model @dataclass
[ 6738, 4818, 8079, 1330, 4818, 8079, 198, 6738, 19720, 1330, 3350, 11, 7343, 11, 32233, 198, 198, 6738, 30351, 6024, 1330, 13266, 198, 6738, 708, 81, 1330, 4818, 330, 31172, 198, 6738, 6692, 259, 62, 37348, 3039, 1330, 37902, 45, 198, ...
3.565217
69
# -*- coding: utf-8 -*- import logging logging_level = logging.DEBUG
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 198, 11748, 18931, 198, 198, 6404, 2667, 62, 5715, 796, 18931, 13, 30531, 628, 198 ]
2.517241
29
import math import time import numpy as np from tqdm import tqdm from multiprocessing import Pool, cpu_count
[ 11748, 10688, 198, 11748, 640, 198, 11748, 299, 32152, 355, 45941, 198, 198, 6738, 256, 80, 36020, 1330, 256, 80, 36020, 198, 6738, 18540, 305, 919, 278, 1330, 19850, 11, 42804, 62, 9127, 628, 628, 628, 628, 198 ]
3.105263
38
# Copyright (c) 2019 Mycroft AI, Inc. and Matthew Scholefield # # This file is part of Mycroft Light # (see https://github.com/MatthewScholefield/mycroft-light). # # Licensed to the Apache Software Foundation (ASF) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for...
[ 2, 15069, 357, 66, 8, 13130, 2011, 36714, 9552, 11, 3457, 13, 290, 9308, 3059, 2305, 3245, 198, 2, 198, 2, 770, 2393, 318, 636, 286, 2011, 36714, 4401, 198, 2, 357, 3826, 3740, 1378, 12567, 13, 785, 14, 25372, 14874, 2305, 3245, 1...
3.835962
317
#!/usr/bin/env python # -*- coding: utf-8 -*- from bottle import template, redirect import utils
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 198, 6738, 9294, 1330, 11055, 11, 18941, 198, 11748, 3384, 4487, 198 ]
2.8
35
""" 191. Number of 1 Bits (Hamming weight) Easy Share Write a function that takes an unsigned integer and returns the number of '1' bits it has (also known as the Hamming weight). Note: Note that in some languages, such as Java, there is no unsigned integer type. In this case, the input will be given as a signed int...
[ 37811, 198, 26492, 13, 7913, 286, 352, 44733, 357, 21281, 2229, 3463, 8, 198, 28406, 198, 198, 11649, 198, 16594, 257, 2163, 326, 2753, 281, 22165, 18253, 290, 5860, 262, 1271, 286, 705, 16, 6, 10340, 340, 468, 357, 14508, 1900, 355, ...
2.898305
826
# LSTM to count the number of '1's in a binary string # Reference: https://becominghuman.ai/a-noobs-guide-to-implementing-rnn-lstm-using-tensorflow-1907a5bbb1fa import numpy as np from random import shuffle import tensorflow as tf """ Parameters """ # Seed for all RNGs rng_seed = 12345 np.random.seed(rng_seed) tf...
[ 2, 406, 2257, 44, 284, 954, 262, 1271, 286, 705, 16, 338, 287, 257, 13934, 4731, 198, 2, 20984, 25, 3740, 1378, 9423, 3383, 10734, 13, 1872, 14, 64, 12, 3919, 8158, 12, 41311, 12, 1462, 12, 320, 26908, 278, 12, 81, 20471, 12, 75...
2.525945
1,985
#!/usr/bin/env python # -*- coding: utf-8 -*- """ Given an array of integers that is already sorted in ascending order, find two numbers such that they add up to a specific target number. The function twoSum should return indices of the two numbers such that they add up to the target, where index1 must be less than i...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 198, 37811, 198, 15056, 281, 7177, 286, 37014, 326, 318, 1541, 23243, 287, 41988, 1502, 11, 1064, 734, 3146, 884, 326, ...
2.052009
423
#!/usr/bin/env python # encoding: utf-8 import os import six import struct import sys import unittest sys.path.insert(0, os.path.join(os.path.dirname(__file__), "..")) import pfp import pfp.errors from pfp.fields import * import pfp.utils from pfp.bitwrap import BitwrappedStream import utils if __name__ == "__main...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 2, 21004, 25, 3384, 69, 12, 23, 198, 198, 11748, 28686, 198, 11748, 2237, 198, 11748, 2878, 198, 11748, 25064, 198, 11748, 555, 715, 395, 198, 198, 17597, 13, 6978, 13, 28463, 7, 15,...
2.674419
129
import matplotlib.pyplot as plt from matplotlib.patches import Rectangle, Circle import numpy as np from typing import List, Tuple from loguru import logger from kino.geometry.point import Point from kino.geometry import Vector from myterial import blue_dark, pink from slam.environment import Environment from slam.ma...
[ 11748, 2603, 29487, 8019, 13, 9078, 29487, 355, 458, 83, 198, 6738, 2603, 29487, 8019, 13, 8071, 2052, 1330, 48599, 9248, 11, 16291, 198, 11748, 299, 32152, 355, 45941, 198, 6738, 19720, 1330, 7343, 11, 309, 29291, 198, 6738, 2604, 1471...
3.313725
153
import logging as _logging import arcgis _log = _logging.getLogger(__name__) _use_async = False def _get_list_value(index, array): """ helper operation to loop a list of values regardless of the index value Example: >>> a = [111,222,333] >>> list_loop(15, a) 111 """ if len(array) =...
[ 11748, 18931, 355, 4808, 6404, 2667, 198, 11748, 10389, 70, 271, 628, 198, 62, 6404, 796, 4808, 6404, 2667, 13, 1136, 11187, 1362, 7, 834, 3672, 834, 8, 198, 198, 62, 1904, 62, 292, 13361, 796, 10352, 628, 198, 4299, 4808, 1136, 62,...
2.867066
1,670
""" Author: Daniel Fink Email: daniel-fink@outlook.com """ import os import aiohttp class FileService: """ A service class for all kind of file access like downloads, file deletion, folder deletion, ... """ @classmethod @classmethod @classmethod @classmethod
[ 37811, 198, 13838, 25, 7806, 376, 676, 198, 15333, 25, 288, 6321, 12, 69, 676, 31, 448, 5460, 13, 785, 198, 37811, 198, 198, 11748, 28686, 198, 11748, 257, 952, 4023, 628, 198, 4871, 9220, 16177, 25, 198, 220, 220, 220, 37227, 198, ...
2.911765
102
# Copyright 2013-2022 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 * class RExactextractr(RPackage): """Fast Extraction from Raster Datasets using Polygons Prov...
[ 2, 15069, 2211, 12, 1238, 1828, 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, ...
2.299632
544
#!/usr/bin/python # # This file is part of Ansible # # Ansible is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # # Ansible is distribut...
[ 2, 48443, 14629, 14, 8800, 14, 29412, 198, 2, 198, 2, 770, 2393, 318, 636, 286, 28038, 856, 198, 2, 198, 2, 28038, 856, 318, 1479, 3788, 25, 345, 460, 17678, 4163, 340, 290, 14, 273, 13096, 198, 2, 340, 739, 262, 2846, 286, 262,...
1.976164
9,901
import csv import datetime import random import sys import os import time import argparse import pandas as pd import json from pyspark.sql import SparkSession from pyspark.sql.functions import col BASE_DIR = "/Users/jrtorres/Documents/JRTDocs/Development/General_Projects/cpd-workshop-health-care/data/" OUTPUT_DIR = "...
[ 11748, 269, 21370, 198, 11748, 4818, 8079, 198, 11748, 4738, 198, 11748, 25064, 198, 11748, 28686, 198, 11748, 640, 198, 11748, 1822, 29572, 198, 11748, 19798, 292, 355, 279, 67, 198, 11748, 33918, 198, 198, 6738, 279, 893, 20928, 13, 2...
2.437044
1,096
# Generated by Django 2.0.5 on 2018-05-08 17:52 from django.db import migrations, models
[ 2, 2980, 515, 416, 37770, 362, 13, 15, 13, 20, 319, 2864, 12, 2713, 12, 2919, 1596, 25, 4309, 198, 198, 6738, 42625, 14208, 13, 9945, 1330, 15720, 602, 11, 4981, 628 ]
2.84375
32
from tkinter import * root = Tk() my_gui = Calculator(root) root.mainloop()
[ 6738, 256, 74, 3849, 1330, 1635, 201, 198, 201, 198, 201, 198, 201, 198, 15763, 796, 309, 74, 3419, 201, 198, 1820, 62, 48317, 796, 43597, 7, 15763, 8, 201, 198, 15763, 13, 12417, 26268, 3419, 201, 198 ]
2.263158
38
from django.shortcuts import render_to_response import datetime, pickle, os from django import forms from django.contrib.auth.models import User from django.contrib.auth import authenticate, login, logout from django.http import HttpResponseRedirect from django.contrib.auth.decorators import login_required from django....
[ 6738, 42625, 14208, 13, 19509, 23779, 1330, 8543, 62, 1462, 62, 26209, 198, 11748, 4818, 8079, 11, 2298, 293, 11, 28686, 198, 6738, 42625, 14208, 1330, 5107, 198, 6738, 42625, 14208, 13, 3642, 822, 13, 18439, 13, 27530, 1330, 11787, 198...
3.316176
136
#!/usr/bin/env python3 # Copyright (C) 2018-2021 Intel Corporation # SPDX-License-Identifier: Apache-2.0 if __name__ == "__main__": from subprocess_main import subprocess_main # pylint: disable=no-name-in-module subprocess_main(framework=None)
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 18, 198, 198, 2, 15069, 357, 34, 8, 2864, 12, 1238, 2481, 8180, 10501, 198, 2, 30628, 55, 12, 34156, 12, 33234, 7483, 25, 24843, 12, 17, 13, 15, 628, 198, 361, 11593, 3672, 834, 6624, ...
2.782609
92
from rest_framework import permissions
[ 6738, 1334, 62, 30604, 1330, 21627, 628 ]
5.714286
7
# Title : Inheritance # Author : Kiran Raj R. # Date : 08:11:2020 import math class Polygon: "Create a simply polygon class, which takes number of sites and takes the maginute of each sides" # triangle = Polygon(3) # # triangle.get_sides() # # triangle.print_sides() triangle1 = Triangle() triangle1.get_sides...
[ 2, 11851, 220, 1058, 47025, 42942, 198, 2, 6434, 1058, 7385, 272, 13308, 371, 13, 198, 2, 7536, 220, 220, 1058, 8487, 25, 1157, 25, 42334, 198, 198, 11748, 10688, 198, 198, 4871, 12280, 14520, 25, 198, 220, 220, 220, 366, 16447, 257...
2.890756
119
#!/usr/bin/env python import argparse import datetime import pandas as pd import yaml from pytrthree import TRTH from pytrthree.utils import retry if __name__ == '__main__': parser = argparse.ArgumentParser(description='Tool to send a series of requests to TRTH.') parser.add_argument('--config', action='st...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 11748, 1822, 29572, 198, 11748, 4818, 8079, 198, 198, 11748, 19798, 292, 355, 279, 67, 198, 11748, 331, 43695, 198, 6738, 12972, 2213, 15542, 1330, 7579, 4221, 198, 6738, 12972, 2213, 15...
2.513376
785
import pytest import numpy as np from sklearn import datasets from Logistic_Regression.logistic_regression import LogisticRegression @pytest.fixture def test_logistic_regression(train_test_data_final): """ Tests the linear regression algorithm using the Normal Equation """ X_train, y_trai...
[ 11748, 12972, 9288, 201, 198, 11748, 299, 32152, 355, 45941, 201, 198, 6738, 1341, 35720, 1330, 40522, 201, 198, 201, 198, 6738, 5972, 2569, 62, 8081, 2234, 13, 6404, 2569, 62, 2301, 2234, 1330, 5972, 2569, 8081, 2234, 201, 198, 201, ...
2.402857
350
from django.contrib import admin from .models import Question from .models import Answer # Register your models here admin.site.register(Question) admin.site.register(Answer)
[ 6738, 42625, 14208, 13, 3642, 822, 1330, 13169, 198, 6738, 764, 27530, 1330, 18233, 198, 6738, 764, 27530, 1330, 23998, 198, 198, 2, 17296, 534, 4981, 994, 198, 28482, 13, 15654, 13, 30238, 7, 24361, 8, 198, 28482, 13, 15654, 13, 3023...
3.826087
46
#!/usr/bin/env python # -*- coding: utf-8 -*- """Test the utils""" import sys import os import unittest sys.path = ['./'] + sys.path from util import is_meta from util import get_canonical_id_from_url_segment from util import get_canonical_id_from_title if __name__ == '__main__': unittest.main()
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 37811, 14402, 262, 3384, 4487, 37811, 628, 198, 11748, 25064, 198, 11748, 28686, 198, 11748, 555, 715, 395, 198, 198, 1...
2.623932
117
#!/usr/bin/env python3 import numpy as np import argparse from osgeo import gdal import isce import isceobj import os def cmdLineParse(): ''' Parse command line. ''' parser = argparse.ArgumentParser(description='Convert GeoTiff to ISCE file') parser.add_argument('-i','--input', dest='infile', typ...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 18, 198, 198, 11748, 299, 32152, 355, 45941, 220, 198, 11748, 1822, 29572, 198, 6738, 28686, 469, 78, 1330, 308, 31748, 198, 11748, 318, 344, 198, 11748, 318, 344, 26801, 198, 11748, 28686, ...
2.109641
1,587
from routersploit import ( exploits, print_status, print_success, print_error, http_request, mute, validators, shell, ) class Exploit(exploits.Exploit): """ Exploit implementation for Netgear R7000 and R6400 Remote Code Execution vulnerability. If the target is vulnerable, ...
[ 6738, 41144, 489, 30711, 1330, 357, 198, 220, 220, 220, 27062, 11, 198, 220, 220, 220, 3601, 62, 13376, 11, 198, 220, 220, 220, 3601, 62, 13138, 11, 198, 220, 220, 220, 3601, 62, 18224, 11, 198, 220, 220, 220, 2638, 62, 25927, 11,...
2.222964
749
import json import numpy as np import open3d as o3d if __name__ == '__main__': mse_cal() # read_pcd_pointclouds() # show_gd() # file_path = '/home/ljs/workspace/eccv/FirstTrainingData/out_4096/train/38.pcd' # read_pcd_pointclouds(file_path)
[ 11748, 33918, 198, 11748, 299, 32152, 355, 45941, 198, 198, 11748, 1280, 18, 67, 355, 267, 18, 67, 628, 628, 198, 198, 361, 11593, 3672, 834, 6624, 705, 834, 12417, 834, 10354, 198, 220, 220, 220, 285, 325, 62, 9948, 3419, 198, 220,...
2.214876
121
from stream_framework.feeds.base import BaseFeed from stream_framework.storage.memory import InMemoryActivityStorage from stream_framework.storage.memory import InMemoryTimelineStorage
[ 6738, 4269, 62, 30604, 13, 12363, 82, 13, 8692, 1330, 7308, 18332, 198, 6738, 4269, 62, 30604, 13, 35350, 13, 31673, 1330, 554, 30871, 16516, 31425, 198, 6738, 4269, 62, 30604, 13, 35350, 13, 31673, 1330, 554, 30871, 14967, 4470, 31425,...
4.428571
42
#!/usr/bin/env python # -*- coding: utf-8 -*- # This file is part of global_sewage_signatures. # https://github.com/josl/Global_Sewage_Signatures # Licensed under the MIT license: # http://www.opensource.org/licenses/MIT-license # Copyright (c) 2016, Jose L. Bellod Cisneros & Kosai Al-Nakked # <bellod.cisneros@gmail....
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 198, 2, 770, 2393, 318, 636, 286, 3298, 62, 325, 21482, 62, 12683, 6691, 13, 198, 2, 3740, 1378, 12567, 13, 785, 14...
3.200647
309
import logging import os import re import uuid from io import BytesIO from mimetypes import guess_extension from os.path import splitext from PIL import Image from django.core.files.uploadedfile import InMemoryUploadedFile from django.core.validators import RegexValidator from django.db import models from django.db.mo...
[ 11748, 18931, 198, 11748, 28686, 198, 11748, 302, 198, 11748, 334, 27112, 198, 6738, 33245, 1330, 2750, 4879, 9399, 198, 6738, 17007, 2963, 12272, 1330, 4724, 62, 2302, 3004, 198, 6738, 28686, 13, 6978, 1330, 4328, 578, 742, 198, 198, 6...
2.440513
1,639
from flask import render_template from . import main @main.app_errorhandler(404) def four_o_four(error): ''' This is a function that renders the 404 error page ''' return render_template('fourofour.html'),404
[ 6738, 42903, 1330, 8543, 62, 28243, 198, 6738, 764, 1330, 1388, 198, 198, 31, 12417, 13, 1324, 62, 18224, 30281, 7, 26429, 8, 198, 4299, 1440, 62, 78, 62, 14337, 7, 18224, 2599, 198, 220, 220, 220, 705, 7061, 198, 220, 220, 220, 7...
2.935065
77
import base64 import sys from contextlib import contextmanager from io import StringIO from threading import current_thread from typing import Union import hana_ml.dataframe import pandas import streamlit as st from streamlit.report_thread import REPORT_CONTEXT_ATTR_NAME # from https://discuss.streamlit.io/t/cannot-...
[ 11748, 2779, 2414, 198, 11748, 25064, 198, 6738, 4732, 8019, 1330, 4732, 37153, 198, 6738, 33245, 1330, 10903, 9399, 198, 6738, 4704, 278, 1330, 1459, 62, 16663, 198, 6738, 19720, 1330, 4479, 198, 198, 11748, 289, 2271, 62, 4029, 13, 78...
2.961938
289
from .sim_model import SimModel from .i_sim_model import ISimModel from .sim_array import SimArray from .sim_array_view import SimArrayView from .sim_pstudy import SimPStudy from .sim_output import SimOut
[ 198, 198, 6738, 764, 14323, 62, 19849, 1330, 3184, 17633, 198, 6738, 764, 72, 62, 14323, 62, 19849, 1330, 3180, 320, 17633, 198, 6738, 764, 14323, 62, 18747, 1330, 3184, 19182, 198, 6738, 764, 14323, 62, 18747, 62, 1177, 1330, 3184, 1...
3.234375
64
# Utilities for interacting with databases import os from urllib.parse import urlparse from sqlalchemy import create_engine, text from ensembl_prodinf.server_utils import get_file_sizes from sqlalchemy.engine.url import make_url def list_databases(db_uri, query): """ List databases on a specified MySQL serve...
[ 2, 41086, 329, 24986, 351, 20083, 198, 11748, 28686, 198, 6738, 2956, 297, 571, 13, 29572, 1330, 19016, 29572, 198, 6738, 44161, 282, 26599, 1330, 2251, 62, 18392, 11, 2420, 198, 6738, 551, 4428, 75, 62, 1676, 67, 10745, 13, 15388, 62...
2.736746
547
import pytest
[ 11748, 12972, 9288, 628, 198 ]
3.2
5
# -*- coding: utf-8 -*- ''' Copyright (c) 2020 Huawei Technologies Sweden AB, All rights reserved. Authors: Karl Gäfvert ''' import argparse from .gui import GUI parser = argparse.ArgumentParser(description='Run GUI') parser.add_argument('input_dir', metavar='input_dir', type=str, help='Path to saved...
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 201, 198, 7061, 6, 201, 198, 15269, 357, 66, 8, 12131, 43208, 21852, 10710, 9564, 11, 1439, 2489, 10395, 13, 201, 198, 201, 198, 30515, 669, 25, 201, 198, 220, 220, 220, ...
3.015982
876
from __future__ import unicode_literals import logging import json from django.core.exceptions import ImproperlyConfigured from urllib.request import urlopen from .exceptions import RateBackendError from .models import RateSource, Rate from .settings import money_rates_settings logger = logging.getLogger(__name__)...
[ 6738, 11593, 37443, 834, 1330, 28000, 1098, 62, 17201, 874, 198, 198, 11748, 18931, 198, 11748, 33918, 198, 198, 6738, 42625, 14208, 13, 7295, 13, 1069, 11755, 1330, 12205, 525, 306, 16934, 1522, 198, 6738, 2956, 297, 571, 13, 25927, 13...
3.588889
90
# Trying a new data model for state variables and domains: # Create a new sub-class of numpy.ndarray # that has as an attribute the domain itself # Following a tutorial on subclassing ndarray here: # # http://docs.scipy.org/doc/numpy/user/basics.subclassing.html from __future__ import division import numpy as np fr...
[ 2, 220, 31165, 257, 649, 1366, 2746, 329, 1181, 9633, 290, 18209, 25, 198, 2, 220, 13610, 257, 649, 850, 12, 4871, 286, 299, 32152, 13, 358, 18747, 198, 2, 220, 326, 468, 355, 281, 11688, 262, 7386, 2346, 198, 198, 2, 14207, 257, ...
2.120101
3,164
#!/usr/bin/env python3 # -*- coding: utf-8 -*- """ Created on Fri Dec 13 13:32:14 2019 @author: ortutay """ import pandas as pd import numpy as np link = 'http://bit.ly/uforeports' ufo = pd.read_csv(link) # We split 60-20-20% tran-validation-test sets train, validate, test = np.split(ufo.sample(frac=1), ...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 18, 198, 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 37811, 198, 41972, 319, 19480, 4280, 1511, 1511, 25, 2624, 25, 1415, 13130, 198, 198, 31, 9800, 25, 393, 83, 315,...
2.056818
264
# -*- coding: utf-8 -*- # ------------------------------------------------------------------------------ # # Copyright 2018-2019 Fetch.AI 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 ...
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 2, 16529, 26171, 198, 2, 198, 2, 220, 220, 15069, 2864, 12, 23344, 376, 7569, 13, 20185, 15302, 198, 2, 198, 2, 220, 220, 49962, 739, 262, 24843, 13789, 11, 10628, 3...
2.826753
1,241
n1 = float(input('Digite o primeiro numero')) n2 = float(input('Digite o segundo numero')) n3 = float(input('Digite o terceiro numero')) if n1 < (n2 + n3) and n2 < (n1 + n3) and n3 < (n2 + n1): print('Podem formar um triangulo') else: print('Nao formam um triangulo')
[ 77, 16, 796, 12178, 7, 15414, 10786, 19511, 578, 267, 6994, 7058, 997, 3529, 6, 4008, 198, 77, 17, 796, 12178, 7, 15414, 10786, 19511, 578, 267, 384, 70, 41204, 997, 3529, 6, 4008, 198, 77, 18, 796, 12178, 7, 15414, 10786, 19511, ...
2.3
120
import argparse import logging from transformers import ( set_seed, ) from adynorm.eval_utils import ( evaluate ) from adynorm.adynorm import Adynorm, AdynormNet from adynorm.datasets import ConceptDataset, DictDataset logger = logging.getLogger(__name__) if __name__ == "__main__": main()
[ 11748, 1822, 29572, 198, 198, 11748, 18931, 198, 198, 6738, 6121, 364, 1330, 357, 198, 220, 220, 220, 900, 62, 28826, 11, 198, 8, 198, 198, 6738, 512, 2047, 579, 13, 18206, 62, 26791, 1330, 357, 198, 220, 220, 220, 13446, 198, 8, ...
2.672414
116
from tests.product.mode_installers import StandaloneModeInstaller from tests.product.prestoadmin_installer import PrestoadminInstaller from tests.product.topology_installer import TopologyInstaller from tests.product.standalone.presto_installer import StandalonePrestoInstaller STANDALONE_BARE_CLUSTER = 'bare' BARE_CL...
[ 6738, 5254, 13, 11167, 13, 14171, 62, 17350, 364, 1330, 5751, 17749, 19076, 15798, 263, 198, 6738, 5254, 13, 11167, 13, 79, 2118, 1170, 1084, 62, 17350, 263, 1330, 24158, 1170, 1084, 15798, 263, 198, 6738, 5254, 13, 11167, 13, 4852, 1...
2.189415
359
# Workaround for the 'methods' file not being able to locate the 'mcmcsamplers' folder for importing import sys import os SCRIPT_DIR = os.path.dirname(os.path.realpath(os.path.join(os.getcwd(), os.path.expanduser(__file__)))) sys.path.append(os.path.normpath(os.path.join(SCRIPT_DIR, '../logistigate', 'logistigate'))) s...
[ 2, 5521, 14145, 329, 262, 705, 24396, 82, 6, 2393, 407, 852, 1498, 284, 17276, 262, 705, 76, 11215, 6359, 321, 489, 364, 6, 9483, 329, 33332, 198, 11748, 25064, 198, 11748, 28686, 198, 6173, 46023, 62, 34720, 796, 28686, 13, 6978, 1...
2.084768
29,457
"""Feature extraction code for the VerBIO project """ import pandas as pd import numpy as np from scipy import stats import opensmile from scipy.io import wavfile import preprocessing import neurokit2 as nk import scipy import math def get_df_gradient(df, feature_keys): """Given a list of keys for a dataframe, takes...
[ 37811, 38816, 22236, 2438, 329, 262, 4643, 3483, 46, 1628, 198, 37811, 198, 11748, 19798, 292, 355, 279, 67, 198, 11748, 299, 32152, 355, 45941, 220, 198, 6738, 629, 541, 88, 1330, 9756, 198, 11748, 9808, 18085, 198, 6738, 629, 541, 8...
2.825633
4,026
scores = {"scores": [{"group": "I", "score": 7.0}, {"group": "II", "score": 5.0}, {"group": "III", "score": 2.0}, {"group": "IV", "score": 8.0}, {"group": "V", "score": 9.0}, {"group": "VI", "score": 16.0}, {"group": "VII", "score": 5.0}, {"group": "VIII", "score": 11.0}, {"group": "other", "score": 10.0}, {"group": "a...
[ 1416, 2850, 796, 19779, 1416, 2850, 1298, 685, 4895, 8094, 1298, 366, 40, 1600, 366, 26675, 1298, 767, 13, 15, 5512, 19779, 8094, 1298, 366, 3978, 1600, 366, 26675, 1298, 642, 13, 15, 5512, 19779, 8094, 1298, 366, 10855, 1600, 366, 26...
2.687294
4,541
""" Helper for easily doing async tasks with coroutines. It's mostly syntactic sugar that removes the need for .then and .andThen. Simply: - make a generator function that yields futures (e.g. from qi.async) - add the decorator async_generator For example: @stk.coroutines.async_generator def run_test(self): y...
[ 37811, 198, 47429, 329, 3538, 1804, 30351, 8861, 351, 1162, 448, 1127, 13, 198, 198, 1026, 338, 4632, 7419, 12009, 7543, 326, 20694, 262, 761, 329, 764, 8524, 290, 764, 392, 6423, 13, 198, 198, 35596, 25, 198, 532, 787, 257, 17301, ...
2.484204
3,102
import uuid from flask import Flask, request, jsonify, send_from_directory from flask_socketio import SocketIO from server.httpexceptions.exceptions import ExceptionHandler from server.services.writerservice import * from server.utils.writerencoder import * import time app = Flask(__name__) socket = SocketIO(app, asy...
[ 11748, 334, 27112, 198, 6738, 42903, 1330, 46947, 11, 2581, 11, 33918, 1958, 11, 3758, 62, 6738, 62, 34945, 198, 6738, 42903, 62, 44971, 952, 1330, 47068, 9399, 198, 198, 6738, 4382, 13, 2804, 24900, 11755, 13, 1069, 11755, 1330, 35528,...
2.438535
4,531
# # Copyright (C) 2018 ETH Zurich and University of Bologna # # 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 applicabl...
[ 2, 198, 2, 15069, 357, 34, 8, 2864, 35920, 43412, 290, 2059, 286, 347, 928, 2616, 198, 2, 198, 2, 49962, 739, 262, 24843, 13789, 11, 10628, 362, 13, 15, 357, 1169, 366, 34156, 15341, 198, 2, 345, 743, 407, 779, 428, 2393, 2845, ...
2.960912
307
class NoContent(Exception): """ Triggert, wenn das ausgewählte Objekt kein Inhalt enthält Caller: CLI """
[ 4871, 1400, 19746, 7, 16922, 2599, 198, 220, 220, 220, 37227, 198, 220, 220, 220, 833, 6950, 861, 11, 266, 1697, 288, 292, 257, 385, 39909, 11033, 18519, 660, 38764, 988, 83, 885, 259, 554, 71, 2501, 920, 71, 11033, 2528, 198, 220, ...
2.259259
54
import unittest import yaml import logging logging.basicConfig(level=logging.DEBUG) logging.basicConfig(format='%(message)s') logger = logging.getLogger(__name__) class ExecutablesTest(unittest.TestCase): """Check if we can get the map of executables""" def test_getexemap(self): """Can we construct ...
[ 11748, 555, 715, 395, 198, 11748, 331, 43695, 198, 11748, 18931, 198, 198, 6404, 2667, 13, 35487, 16934, 7, 5715, 28, 6404, 2667, 13, 30531, 8, 198, 6404, 2667, 13, 35487, 16934, 7, 18982, 11639, 4, 7, 20500, 8, 82, 11537, 198, 6404...
2.195545
404
""" [E] We are given an unsorted array containing 'n' numbers taken from the range 1 to 'n'. The array has some numbers appearing twice, find all these duplicate numbers without using any extra space. Example 1: Input: [3, 4, 4, 5, 5] Output: [4, 5] """ # Time: O(n) Space: O(1) main()
[ 628, 198, 37811, 198, 58, 36, 60, 775, 389, 1813, 281, 5576, 9741, 7177, 7268, 705, 77, 6, 3146, 2077, 422, 262, 2837, 352, 284, 705, 77, 4458, 220, 198, 464, 7177, 468, 617, 3146, 12655, 5403, 11, 1064, 477, 777, 23418, 3146, 123...
2.979798
99
from django.conf.urls import url from django.conf.urls import include from myapp import views urlpatterns = [ url(r'^$', views.dashBoard, name='dashboard'), #url(r'^myapp/', include('myapp.urls')), ]
[ 198, 6738, 42625, 14208, 13, 10414, 13, 6371, 82, 1330, 19016, 198, 6738, 42625, 14208, 13, 10414, 13, 6371, 82, 1330, 2291, 198, 6738, 616, 1324, 1330, 5009, 198, 198, 6371, 33279, 82, 796, 685, 628, 220, 220, 220, 19016, 7, 81, 6,...
2.554217
83
import tensorflow as tf import numpy as np import tensorflow_datasets as tfds (ds_train, ds_test), ds_info = tfds.load( 'mnist', split=['train', 'test'], shuffle_files=True, as_supervised=True, with_info=True, ) def normalize_img(image, label): """Normalize image""" return tf.cast(image, tf.floa...
[ 11748, 11192, 273, 11125, 355, 48700, 198, 11748, 299, 32152, 355, 45941, 198, 11748, 11192, 273, 11125, 62, 19608, 292, 1039, 355, 48700, 9310, 198, 7, 9310, 62, 27432, 11, 288, 82, 62, 9288, 828, 288, 82, 62, 10951, 796, 48700, 9310...
2.52164
878
#! -*- encoding: utf-8 -*- try: from urllib import unquote except ImportError: # assume python3 from urllib.parse import unquote from string import punctuation from django.db import models from django.utils.translation import ugettext_lazy as _ from django.contrib.sites.models import Site from mezzanine.pag...
[ 2, 0, 532, 9, 12, 21004, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 28311, 25, 198, 220, 220, 220, 422, 2956, 297, 571, 1330, 555, 22708, 198, 16341, 17267, 12331, 25, 220, 1303, 7048, 21015, 18, 198, 220, 220, 220, 422, 2956, 297, ...
2.574648
710