content
stringlengths
1
1.04M
input_ids
listlengths
1
774k
ratio_char_token
float64
0.38
22.9
token_count
int64
1
774k
from dataclasses import dataclass from typing import Union, List, Any, Optional, Iterable, Tuple, Literal from chess.custom_typehints import Coord2D, Coord2DSet, Colour from chess.model.pieces import Piece, King @dataclass class Block: """ A block inside a chess board """ x: int y: int piece:...
[ 6738, 4818, 330, 28958, 1330, 4818, 330, 31172, 198, 6738, 19720, 1330, 4479, 11, 7343, 11, 4377, 11, 32233, 11, 40806, 540, 11, 309, 29291, 11, 25659, 1691, 198, 198, 6738, 19780, 13, 23144, 62, 4906, 71, 29503, 1330, 22819, 17, 35, ...
2.921429
140
# SET MISMATCH LEETCODE SOLUTION: # creating a class. # creating a function to solve the problem.
[ 2, 25823, 337, 31125, 11417, 12509, 2767, 34, 16820, 36817, 35354, 25, 201, 198, 201, 198, 2, 4441, 257, 1398, 13, 201, 198, 201, 198, 220, 220, 220, 1303, 4441, 257, 2163, 284, 8494, 262, 1917, 13, 201 ]
2.842105
38
from typing import Any
[ 6738, 19720, 1330, 4377, 628 ]
4.8
5
import os import django os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'locadora.settings.development') django.setup() from core.models import User, Perfil, Cliente, Midia, Distribuidora, Estado, Cidade, \ Endereco, Genero, Filme, Artista, Item # genero genero, created_gen = Genero.objects.get_or_create(nome='Gen...
[ 11748, 28686, 198, 11748, 42625, 14208, 198, 198, 418, 13, 268, 2268, 13, 2617, 12286, 10786, 35028, 1565, 11230, 62, 28480, 51, 20754, 62, 33365, 24212, 3256, 705, 17946, 324, 5799, 13, 33692, 13, 31267, 11537, 198, 198, 28241, 14208, ...
2.347826
897
#!usr/bin/env python # exp name | ratio response failure | num trials print(3840+6400+6400+19200) print(6*(1120+1280+1280+1120+1120+1280)) l = [ ("colour", 0.0145833333333333, 3840), ("contrast#", 0.01671875, 6400), ("noise", 0.01296875, 6400), ("eidolon", 0.0109895833333333, 19200), ("false-colour", 0.0292, 6*1120), ...
[ 2, 0, 14629, 14, 8800, 14, 24330, 21015, 198, 198, 2, 1033, 1438, 930, 8064, 2882, 5287, 930, 997, 9867, 198, 4798, 7, 2548, 1821, 10, 2414, 405, 10, 2414, 405, 10, 1129, 2167, 8, 198, 4798, 7, 21, 9, 7, 16, 10232, 10, 1065, 1...
2.318087
481
import re import yaml from netmiko import Netmiko ### Debug output ### ### Manual ### ### Dependecies #### ### Scripts ####
[ 11748, 302, 198, 11748, 331, 43695, 198, 6738, 2010, 76, 12125, 1330, 3433, 76, 12125, 628, 198, 21017, 31687, 5072, 44386, 198, 198, 21017, 17969, 44386, 198, 198, 21017, 37947, 721, 444, 1303, 21017, 628, 198, 21017, 12327, 82, 1303, ...
3.068182
44
""" *Author*: Jacek Pierzchlewski, Aalborg University, Denmark. <jap@es.aau.dk> *Version*: 1.0 | 20-JAN-2016 : * Version 1.0 released |br| 1.0r1 | 28-JAN-2016 : * Only real part of reconstructed signals is preserved *License*: BSD 2-Clause """ from __future__ import division import rxcs import nu...
[ 37811, 198, 9, 13838, 47026, 198, 220, 220, 220, 49674, 74, 13762, 89, 354, 293, 18504, 4106, 11, 317, 282, 23297, 2059, 11, 16490, 13, 1279, 73, 499, 31, 274, 13, 64, 559, 13, 34388, 29, 198, 198, 9, 14815, 47026, 198, 220, 220, ...
3.385417
192
"""Generate test messages for the example consumer.""" import random import time import uuid from pika.adapters import BlockingConnection from pika.connection import ConnectionParameters from pika import BasicProperties MESSAGE_COUNT = 100 HTML_VALUE = '<html><head><title>Hi</title></head><body>Hello %i</body></html...
[ 37811, 8645, 378, 1332, 6218, 329, 262, 1672, 7172, 526, 15931, 198, 11748, 4738, 198, 11748, 640, 198, 11748, 334, 27112, 198, 198, 6738, 279, 9232, 13, 324, 12126, 1330, 1086, 8629, 32048, 198, 6738, 279, 9232, 13, 38659, 1330, 26923,...
2.083751
1,397
import requests, json from django.views.generic import TemplateView from django.db.models import Q from hknweb.markdown_pages.models import MarkdownPage from hknweb.academics.models import Course, Instructor from hknweb.utils import method_login_and_permission from hknweb.course_surveys.constants import ( Attr, ...
[ 11748, 7007, 11, 33918, 198, 198, 6738, 42625, 14208, 13, 33571, 13, 41357, 1330, 37350, 7680, 198, 6738, 42625, 14208, 13, 9945, 13, 27530, 1330, 1195, 198, 198, 6738, 289, 15418, 12384, 13, 4102, 2902, 62, 31126, 13, 27530, 1330, 2940...
2.634921
189
from math import ceil if __name__ == '__main__': pass
[ 6738, 10688, 1330, 2906, 346, 628, 628, 198, 361, 11593, 3672, 834, 6624, 705, 834, 12417, 834, 10354, 198, 220, 220, 220, 1208, 198 ]
2.583333
24
from django.conf import settings from shop.models import Product from decimal import Decimal
[ 6738, 42625, 14208, 13, 10414, 1330, 6460, 198, 6738, 6128, 13, 27530, 1330, 8721, 198, 6738, 32465, 1330, 4280, 4402, 198, 220, 220, 220, 220, 220, 220, 220, 220, 628, 220, 220, 220, 220, 220, 220, 220, 220 ]
2.921053
38
# Copyright 2021 Google LLC # # 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, ...
[ 2, 15069, 33448, 3012, 11419, 198, 2, 198, 2, 49962, 739, 262, 24843, 13789, 11, 10628, 362, 13, 15, 357, 1169, 366, 34156, 15341, 198, 2, 345, 743, 407, 779, 428, 2393, 2845, 287, 11846, 351, 262, 13789, 13, 198, 2, 921, 743, 733...
2.811861
4,502
# -*- coding: utf-8 -*- from .ao import ao from .apo import apo from .bias import bias from .bop import bop from .brar import brar from .cci import cci from .cfo import cfo from .cg import cg from .cmo import cmo from .coppock import coppock from .cti import cti from .er import er from .eri import eri fro...
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 201, 198, 6738, 764, 5488, 1330, 257, 78, 201, 198, 6738, 764, 41817, 1330, 2471, 78, 201, 198, 6738, 764, 65, 4448, 1330, 10690, 201, 198, 6738, 764, 65, 404, 1330, 275, ...
2.602632
380
import os import pandas as pd import matplotlib.pyplot as plt import numpy as np from math import exp, log from operator import add # question 1a df = pd.read_csv('hw3_table4-2.csv', index_col='Isotope') print("\nRead dataframe:") print(df) conc_238U = float(df['Concentration']['238-U']) / float(df['Concentration'][...
[ 11748, 28686, 198, 11748, 19798, 292, 355, 279, 67, 198, 11748, 2603, 29487, 8019, 13, 9078, 29487, 355, 458, 83, 198, 11748, 299, 32152, 355, 45941, 198, 6738, 10688, 1330, 1033, 11, 2604, 198, 6738, 10088, 1330, 751, 628, 198, 2, 18...
2.102694
2,376
from nose.tools import * import requests from openfda.tests.api_test_helpers import * from nose.tools import * EXACT_FIELDS = ['openfda.application_number.exact', 'openfda.brand_name.exact', 'openfda.generic_name.exact', 'openfda.is_original_packager.exact', 'openfda.manufacturer_name.exact', ...
[ 6738, 9686, 13, 31391, 1330, 1635, 198, 11748, 7007, 198, 198, 6738, 1280, 69, 6814, 13, 41989, 13, 15042, 62, 9288, 62, 16794, 364, 1330, 1635, 198, 6738, 9686, 13, 31391, 1330, 1635, 198, 198, 6369, 10659, 62, 11674, 3698, 5258, 796...
2.022388
402
# -*- coding: utf-8 -*- """ @Date: Created on 2019/4/30 @Author: Haojun Gao @Description: """ # 加载pyecharts import os import re import pandas from os import walk from pyecharts import Geo, Bar, Line, Overlap, EffectScatter, Map, Style, Page if __name__ == "__main__": root = "2019-04-30-09-54-32" dirs = ...
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 37811, 198, 31, 10430, 25, 15622, 319, 13130, 14, 19, 14, 1270, 198, 31, 13838, 25, 367, 5488, 29741, 402, 5488, 198, 31, 11828, 25, 220, 198, 37811, 198, 198, 2, 10...
2.290123
324
from ot_receiver import OTReceiver import socket import random from fastecdsa import keys,curve, ecdsa import pickle import encrypt import time import cProfile import reader_hash as RH from sys import argv if __name__ == "__main__": main()
[ 6738, 30972, 62, 260, 39729, 1330, 21676, 3041, 39729, 220, 198, 11748, 17802, 198, 11748, 4738, 198, 6738, 3049, 721, 9310, 64, 1330, 8251, 11, 22019, 303, 11, 9940, 9310, 64, 198, 11748, 2298, 293, 198, 11748, 34117, 198, 11748, 640, ...
3.223684
76
# Python from __future__ import unicode_literals # Django from django.contrib import admin # Django-Site-Utils from site_utils.admin import ModelAdmin # Test App from .models import Document, Photo @admin.register(Document) @admin.register(Photo)
[ 2, 11361, 198, 6738, 11593, 37443, 834, 1330, 28000, 1098, 62, 17201, 874, 198, 198, 2, 37770, 198, 6738, 42625, 14208, 13, 3642, 822, 1330, 13169, 198, 198, 2, 37770, 12, 29123, 12, 18274, 4487, 198, 6738, 2524, 62, 26791, 13, 28482,...
3.298701
77
from kingfisher_scrapy.spiders.digiwhist_base import DigiwhistBase
[ 6738, 5822, 69, 4828, 62, 1416, 2416, 88, 13, 2777, 4157, 13, 12894, 72, 1929, 396, 62, 8692, 1330, 7367, 72, 1929, 396, 14881, 628 ]
2.72
25
# Generated by Django 3.0.12 on 2021-02-17 16:43 from django.db import migrations, models
[ 2, 2980, 515, 416, 37770, 513, 13, 15, 13, 1065, 319, 33448, 12, 2999, 12, 1558, 1467, 25, 3559, 198, 198, 6738, 42625, 14208, 13, 9945, 1330, 15720, 602, 11, 4981, 628 ]
2.875
32
import logging import bread import django import htmlgenerator as hg from bread import layout, menu from bread.layout.components.button import Button from bread.layout.components.forms import Form from bread.utils import Link, reverse_model from bread.views import EditView, ReadView, layoutasreadonly from django.apps ...
[ 11748, 18931, 198, 198, 11748, 8509, 198, 11748, 42625, 14208, 198, 11748, 27711, 8612, 1352, 355, 289, 70, 198, 6738, 8509, 1330, 12461, 11, 6859, 198, 6738, 8509, 13, 39786, 13, 5589, 3906, 13, 16539, 1330, 20969, 198, 6738, 8509, 13,...
3.611111
270
import asyncio import aiohttp import discord from discord.ext import commands from discord_slash import SlashContext, cog_ext from util.var import dagpi
[ 11748, 30351, 952, 198, 198, 11748, 257, 952, 4023, 198, 11748, 36446, 198, 6738, 36446, 13, 2302, 1330, 9729, 198, 6738, 36446, 62, 6649, 1077, 1330, 26616, 21947, 11, 43072, 62, 2302, 198, 6738, 7736, 13, 7785, 1330, 48924, 14415, 628...
3.738095
42
#!/usr/bin/env python3 """Day 11: Dumbo Octopus Usage: ./solution.py 1|2 FILE """ from __future__ import annotations import sys import typing as t from argparse import ArgumentParser from dataclasses import dataclass verbose = False @dataclass(frozen=True) P = Point @dataclass @dataclass def part1(filen...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 18, 198, 37811, 12393, 1367, 25, 360, 29309, 2556, 25790, 198, 198, 28350, 25, 24457, 82, 2122, 13, 9078, 352, 91, 17, 45811, 198, 198, 37811, 198, 198, 6738, 11593, 37443, 834, 1330, 37647...
2.285714
595
print('Hello, World!') print(1 + 2) print(7 * 6) print( ) print("The end", "or is it?", "keep watching to learn more about Python", 3)
[ 4798, 10786, 15496, 11, 2159, 0, 11537, 198, 4798, 7, 16, 1343, 362, 8, 198, 4798, 7, 22, 1635, 718, 8, 198, 4798, 7, 1267, 198, 4798, 7203, 464, 886, 1600, 366, 273, 318, 340, 35379, 366, 14894, 4964, 284, 2193, 517, 546, 11361, ...
2.8125
48
import spidev import time import RPi.GPIO as GPIO
[ 11748, 599, 485, 85, 198, 11748, 640, 198, 11748, 25812, 72, 13, 16960, 9399, 355, 50143, 198, 220, 220, 220, 220, 220, 220, 220, 220, 198 ]
2.269231
26
#!/usr/bin/env python # -*- coding: utf-8 -*- x = 50 func() print 'Value of x is', x
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 198, 87, 796, 2026, 198, 20786, 3419, 198, 4798, 705, 11395, 286, 2124, 318, 3256, 2124 ]
2.179487
39
import os import pickle import datetime from submits import Verdicts from IPython.display import Image, display, HTML import shutil import config import json import pprint pp = pprint.PrettyPrinter(indent=4) def UNIX_from_datetime(dtstr): """ INPUT: 2021-06-21T14:10:58.765 """ y = int(dtstr[0:4]...
[ 11748, 28686, 198, 11748, 2298, 293, 198, 11748, 4818, 8079, 198, 6738, 850, 24883, 1330, 4643, 11600, 82, 198, 6738, 6101, 7535, 13, 13812, 1330, 7412, 11, 3359, 11, 11532, 198, 11748, 4423, 346, 198, 11748, 4566, 198, 11748, 33918, 19...
2.159722
288
import sys from algorithm.dataSet import DataSet from algorithm.knn import Knn from lib.userFunction.friendExtractor import getUserFriends from lib.userFunction.locationEstimation import getUserLocation from lib.userFunction.businessExtractor import getUserReviews from util.errorCheck import getRating, MAE from plots.b...
[ 11748, 25064, 198, 6738, 11862, 13, 7890, 7248, 1330, 6060, 7248, 198, 6738, 11862, 13, 15418, 77, 1330, 6102, 77, 198, 6738, 9195, 13, 7220, 22203, 13, 6726, 11627, 40450, 1330, 651, 12982, 36705, 198, 6738, 9195, 13, 7220, 22203, 13, ...
2.468778
1,105
""" Description: Requirements: pySerial, wxPython Phoenix glossary and of other descriptions: DMM - digital multimeter PSU - power supply SBC - single board computer INS - general instrument commands GEN - general sequence instructions """ import wx import theme import base # from wx.lib.agw import spinctrl
[ 37811, 198, 11828, 25, 220, 198, 42249, 25, 12972, 32634, 11, 266, 87, 37906, 9643, 198, 198, 4743, 793, 560, 290, 286, 584, 16969, 25, 198, 198, 35, 12038, 532, 4875, 1963, 16912, 198, 3705, 52, 532, 1176, 5127, 198, 50, 2749, 532,...
3.550562
89
from subprocess import call import os from urllib.request import urlretrieve from keras.preprocessing.image import load_img, img_to_array import numpy as np
[ 6738, 850, 14681, 1330, 869, 198, 11748, 28686, 198, 6738, 2956, 297, 571, 13, 25927, 1330, 19016, 1186, 30227, 198, 6738, 41927, 292, 13, 3866, 36948, 13, 9060, 1330, 3440, 62, 9600, 11, 33705, 62, 1462, 62, 18747, 198, 11748, 299, 3...
3.035714
56
# -*- coding: utf-8 -*- import os from setuptools import setup, find_packages _REQUIREMENTS_FILE = 'REQUIREMENTS.txt' with open('README.rst') as f: readme = f.read() with open('LICENSE') as f: license = f.read() setup( name='cdsindelprobe', version='0.0.1', description='Summarize 1 bp frameshif...
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 11748, 28686, 198, 6738, 900, 37623, 10141, 1330, 9058, 11, 1064, 62, 43789, 628, 198, 62, 2200, 49128, 28957, 62, 25664, 796, 705, 2200, 49128, 28957, 13, 14116, 6, 198...
2.498258
287
""" ------------------------------------------------- File Name: dataset.py Author: Zhonghao Huang Date: 2019/9/2 Description: ------------------------------------------------- """ import re import os from PIL import Image from torch.utils.data import Dataset def read_image(img_path): ...
[ 37811, 198, 47232, 12, 198, 220, 220, 9220, 6530, 25, 220, 220, 220, 27039, 13, 9078, 198, 220, 220, 6434, 25, 220, 220, 220, 220, 220, 220, 10511, 19757, 5488, 31663, 198, 220, 220, 7536, 25, 220, 220, 220, 220, 220, 220, 220, 22...
2.518225
631
from typing import List from descartes import PolygonPatch from joblib import Parallel, delayed import matplotlib.pyplot as plt from .model import Layer, Location, StyleDict, Style
[ 6738, 19720, 1330, 7343, 198, 198, 6738, 1715, 433, 274, 1330, 12280, 14520, 33952, 198, 6738, 1693, 8019, 1330, 42945, 11, 11038, 198, 11748, 2603, 29487, 8019, 13, 9078, 29487, 355, 458, 83, 198, 198, 6738, 764, 19849, 1330, 34398, 11...
3.755102
49
# Copyright 2013-2019 Lawrence Livermore National Security, LLC and other # Spack Project Developers. See the top-level COPYRIGHT file for details. # # SPDX-License-Identifier: (Apache-2.0 OR MIT) from spack import * import shutil import os class KokkosCmake(CMakePackage): """Kokkos implements a programming mode...
[ 2, 15069, 2211, 12, 23344, 13914, 45036, 3549, 2351, 4765, 11, 11419, 290, 584, 198, 2, 1338, 441, 4935, 34152, 13, 4091, 262, 1353, 12, 5715, 27975, 38162, 9947, 2393, 329, 3307, 13, 198, 2, 198, 2, 30628, 55, 12, 34156, 12, 33234,...
2.168294
5,122
#!/usr/bin/env python3 import sys if __name__ == '__main__': if len(sys.argv) <= 1: print(f"usage: {__file__} <inputfile>") sys.exit(0) program = [] with open(sys.argv[1], "r") as handle: text = handle.read() program = [int(token) for token in text.split(',')] if not...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 18, 198, 11748, 25064, 628, 198, 198, 361, 11593, 3672, 834, 6624, 705, 834, 12417, 834, 10354, 198, 220, 220, 220, 611, 18896, 7, 17597, 13, 853, 85, 8, 19841, 352, 25, 198, 220, 220, ...
2.138528
231
from collections import Counter for _ in range(int(input())): p = str(input()) h = str(input()) if (len(p) > len(h)): print("NO") continue if (len(p) == len(h)): if sorted(p)==sorted(h): print("YES") else: print("NO") continue window = Counter(p) s = len(p) flag = 0 curr = Counter(h[:s]) # fir...
[ 6738, 17268, 1330, 15034, 198, 1640, 4808, 287, 2837, 7, 600, 7, 15414, 28955, 2599, 198, 197, 79, 796, 965, 7, 15414, 28955, 198, 197, 71, 796, 965, 7, 15414, 28955, 198, 197, 361, 357, 11925, 7, 79, 8, 1875, 18896, 7, 71, 8, 2...
2.039514
329
import numpy as np class Filter: '''Kalman filter class''' def run_filter(): ''' loop over data and call predict and update''' np.random.seed(10) # make random values predictable # init filter KF = Filter() # init track state and covariance x = np.matrix([[0], ...
[ 11748, 299, 32152, 355, 45941, 198, 198, 4871, 25853, 25, 198, 220, 220, 220, 705, 7061, 41428, 805, 8106, 1398, 7061, 6, 198, 220, 220, 220, 220, 220, 220, 220, 220, 198, 220, 220, 220, 220, 220, 220, 220, 220, 198, 4299, 1057, 6...
2.08363
562
import random from PIL import Image from utils import getSeed, save_time import numpy as np import argparse import timeit if __name__ == '__main__': parser = argparse.ArgumentParser() # group = parser.add_mutually_exclusive_group() parser.add_argument('-i', '--input-image', type=str, help='Path t...
[ 11748, 4738, 198, 6738, 350, 4146, 1330, 7412, 198, 6738, 3384, 4487, 1330, 651, 50, 2308, 11, 3613, 62, 2435, 198, 11748, 299, 32152, 355, 45941, 198, 11748, 1822, 29572, 198, 11748, 640, 270, 628, 220, 220, 220, 220, 198, 220, 220, ...
2.480663
543
import turtle loadWindow = turtle.Screen() turtle.speed(2) for i in range(100): turtle.circle(5*i) turtle.circle(-5*i) turtle.left(i) turtle.exitonclick()
[ 11748, 28699, 220, 201, 198, 2220, 27703, 796, 28699, 13, 23901, 3419, 220, 201, 198, 83, 17964, 13, 12287, 7, 17, 8, 220, 201, 198, 220, 220, 201, 198, 1640, 1312, 287, 2837, 7, 3064, 2599, 220, 201, 198, 220, 220, 220, 28699, 13...
2.053763
93
# Login disponível # Este exercício caiu na avaliação final de Design de Software 2019-2 # Você está trabalhando em um processo de migração de um sistema de gestão antigo para uma nova versão mais robusta. Nessa nova versão os nomes de usuários (login) devem ser únicos. Como essa restrição não existia na versão anterio...
[ 2, 23093, 4596, 261, 8836, 626, 198, 2, 412, 4169, 4208, 8836, 66, 952, 1275, 16115, 12385, 1196, 9752, 16175, 28749, 2457, 390, 8495, 390, 10442, 13130, 12, 17, 198, 2, 47208, 25792, 1556, 6557, 491, 44349, 4993, 78, 795, 23781, 1429...
2.551959
587
from strips.operators import Action from strips.states import State, PartialState, Literal, STRIPSProblem from misc.utils import arg_info, currentframe from misc.functions import pairs from itertools import permutations ########################################################################### ######################...
[ 6738, 22670, 13, 3575, 2024, 1330, 7561, 198, 6738, 22670, 13, 27219, 1330, 1812, 11, 43689, 9012, 11, 25659, 1691, 11, 3563, 7112, 3705, 40781, 198, 6738, 12747, 13, 26791, 1330, 1822, 62, 10951, 11, 1459, 14535, 198, 6738, 12747, 13, ...
4.557895
95
import numpy as np import pytest from deepctr.models import MLR from ..utils import check_model,SingleFeat,SAMPLE_SIZE @pytest.mark.parametrize( 'region_sparse,region_dense,base_sparse,base_dense,bias_sparse,bias_dense', [(0, 2, 0, 2, 0, 1), (0, 2, 0, 1, 0, 2), (0, 2, 0, 0, 1, 0), (0, 1, 1, 2, 1, 1,), ...
[ 11748, 299, 32152, 355, 45941, 198, 11748, 12972, 9288, 198, 6738, 2769, 24087, 13, 27530, 1330, 10373, 49, 198, 6738, 11485, 26791, 1330, 2198, 62, 19849, 11, 28008, 37, 4098, 11, 49302, 16437, 62, 33489, 628, 198, 31, 9078, 9288, 13, ...
1.923695
249
from conans import ConanFile, CMake from conans import tools from conans.tools import os_info, SystemPackageTool import os, sys import sysconfig from io import StringIO
[ 6738, 369, 504, 1330, 31634, 8979, 11, 327, 12050, 198, 6738, 369, 504, 1330, 4899, 198, 6738, 369, 504, 13, 31391, 1330, 28686, 62, 10951, 11, 4482, 27813, 25391, 198, 11748, 28686, 11, 25064, 198, 11748, 25064, 11250, 198, 6738, 33245...
3.755556
45
# Your FileSystem object will be instantiated and called as such: # obj = FileSystem() # param_1 = obj.createPath(path,value) # param_2 = obj.get(path)
[ 198, 198, 2, 3406, 9220, 11964, 2134, 481, 307, 9113, 12931, 290, 1444, 355, 884, 25, 198, 2, 26181, 796, 9220, 11964, 3419, 198, 2, 5772, 62, 16, 796, 26181, 13, 17953, 15235, 7, 6978, 11, 8367, 8, 198, 2, 5772, 62, 17, 796, 26...
3.019608
51
import json from collections import OrderedDict import pytorch_lightning as pl from torch.utils.data import DataLoader from transformers import BertTokenizer from jerex.datasets import DocREDDataset from jerex.entities import EntityType, RelationType from jerex.sampling.sampling_common import collate_fn_padding cla...
[ 11748, 33918, 198, 6738, 17268, 1330, 14230, 1068, 35, 713, 198, 198, 11748, 12972, 13165, 354, 62, 2971, 768, 355, 458, 198, 6738, 28034, 13, 26791, 13, 7890, 1330, 6060, 17401, 198, 6738, 6121, 364, 1330, 22108, 30642, 7509, 198, 198,...
3.362573
171
import copy import datetime import io import itertools import os import shutil import sys import unittest import tempfile import pkg_resources from unittest import mock import pyhmmer from pyhmmer.errors import EaselError, AlphabetMismatch from pyhmmer.easel import Alphabet, SequenceFile, MSAFile from pyhmmer.plan7 im...
[ 11748, 4866, 198, 11748, 4818, 8079, 198, 11748, 33245, 198, 11748, 340, 861, 10141, 198, 11748, 28686, 198, 11748, 4423, 346, 198, 11748, 25064, 198, 11748, 555, 715, 395, 198, 11748, 20218, 7753, 198, 11748, 279, 10025, 62, 37540, 198, ...
3.509615
104
from fastapi import Depends, HTTPException from starlette.status import HTTP_401_UNAUTHORIZED from starlette.requests import Request from app.database.models import User from app.dependencies import get_db from app.internal.security.ouath2 import ( Session, get_jwt_token, get_authorization_cookie ) from app.intern...
[ 6738, 3049, 15042, 1330, 2129, 2412, 11, 14626, 16922, 198, 6738, 3491, 21348, 13, 13376, 1330, 14626, 62, 21844, 62, 52, 4535, 24318, 1581, 14887, 1961, 198, 6738, 3491, 21348, 13, 8897, 3558, 1330, 19390, 198, 198, 6738, 598, 13, 4880...
2.572848
906
# Copyright (C) 2014-2021 Syntrogi Inc dba Intheon. All rights reserved. from pathlib import Path import numpy as np import os import warnings def internalize_coordinates(coords, unit, x, y, z): """Convert the given coordinates (Nx3 array) into a unified internal coordinate system. The internal system...
[ 2, 220, 15069, 357, 34, 8, 1946, 12, 1238, 2481, 26375, 3828, 72, 3457, 288, 7012, 2558, 37060, 13, 1439, 2489, 10395, 13, 198, 198, 6738, 3108, 8019, 1330, 10644, 198, 11748, 299, 32152, 355, 45941, 198, 11748, 28686, 198, 11748, 146...
2.024014
1,166
a, b, c = map(int, input().split()) abc_len = [a, b, c] if abc_len.count(5) == 2 and abc_len.count(7) == 1: print("YES") else: print("NO")
[ 64, 11, 275, 11, 269, 796, 3975, 7, 600, 11, 5128, 22446, 35312, 28955, 198, 39305, 62, 11925, 796, 685, 64, 11, 275, 11, 269, 60, 198, 361, 450, 66, 62, 11925, 13, 9127, 7, 20, 8, 6624, 362, 290, 450, 66, 62, 11925, 13, 9127,...
2.041667
72
#!/usr/bin/env python # -*- coding: utf-8 -*- """ Copyright (C) 2018 Intel Corporation Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required b...
[ 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, 15269, 357, 34, 8, 2864, 8180, 10501, 198, 198, 26656, 15385, 739, 262, 24843, 13789, 11, 10628, 362, ...
2.558626
1,194
#!/usr/bin/env python3 """DB Backend SQL Calls to databses. Copyright 2019 California Institute of Technology 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/li...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 18, 198, 37811, 11012, 5157, 437, 16363, 27592, 284, 4818, 397, 8448, 13, 198, 198, 15269, 13130, 3442, 5136, 286, 8987, 198, 220, 220, 49962, 739, 262, 24843, 13789, 11, 10628, 362, 13, 15...
2.140852
4,061
""" Nesta atividade você terá que criar uma função para verificar se a chave do dicionário existe em seus valores. Cada valor dos pares chave:valor do seu dicionário será uma lista. O objetivo é verificar se a chave está dentro de sua respectiva lista. Ao final, sua função deverá ter construído um novo dicionário, onde...
[ 37811, 198, 45, 18059, 379, 1699, 671, 12776, 25792, 1059, 6557, 8358, 269, 380, 283, 334, 2611, 1257, 16175, 28749, 31215, 3326, 811, 283, 384, 257, 442, 1015, 466, 288, 47430, 6557, 27250, 2152, 68, 795, 384, 385, 1188, 2850, 13, 19...
2.312715
582
# -*- coding: utf-8 -*- from django.conf import settings from django.contrib.auth.models import AnonymousUser from django.core.exceptions import ValidationError from django.core.mail import send_mail from django.core.urlresolvers import reverse from django.core.paginator import Paginator, EmptyPage, PageNotAnInteger fr...
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 6738, 42625, 14208, 13, 10414, 1330, 6460, 198, 6738, 42625, 14208, 13, 3642, 822, 13, 18439, 13, 27530, 1330, 19200, 12982, 198, 6738, 42625, 14208, 13, 7295, 13, 1069, ...
3.23662
355
import torch import torch.utils.data as data_utils import torch.optim as optim import torch.nn as nn import torch.nn.functional as F import sys import time import copy import numpy as np class ModelTrainer: '''class containing all the info about the training process and handling the actual training function...
[ 11748, 28034, 198, 11748, 28034, 13, 26791, 13, 7890, 355, 1366, 62, 26791, 198, 11748, 28034, 13, 40085, 355, 6436, 198, 11748, 28034, 13, 20471, 355, 299, 77, 198, 11748, 28034, 13, 20471, 13, 45124, 355, 376, 198, 198, 11748, 25064, ...
2.35187
4,010
# Time: O(n) # Space: O(1)
[ 2, 3862, 25, 220, 440, 7, 77, 8, 198, 2, 4687, 25, 440, 7, 16, 8, 198 ]
1.647059
17
#Sin & Cos # I am using Python 3 from math import sin, cos, pi x = pi/4 val = (sin(x))**2 + (cos(x))**2 print (val) #Compute S in meters v0 = 3 #m/s t = 1 #s a = 2 #m/s**2 s = v0 * t + 0.5*(a*t)**2 print (s) #Verifying Equations a = 3.3 b = 5.3 a2 = a**2 b2 = b**2 eq1_sum = a2 + 2*(a*b) + b2 eq2_sum = a2 - 2*(a*b) ...
[ 2, 46200, 1222, 10437, 198, 2, 314, 716, 1262, 11361, 513, 198, 198, 6738, 10688, 1330, 7813, 11, 8615, 11, 31028, 198, 87, 796, 31028, 14, 19, 198, 2100, 796, 357, 31369, 7, 87, 4008, 1174, 17, 1343, 357, 6966, 7, 87, 4008, 1174,...
1.830189
265
# -*- coding: utf-8 -*- """ Created on Thu Dec 31 11:21:17 2020 :copyright: Jared Peacock (jpeacock@usgs.gov) :license: MIT """ # ============================================================================= # Imports # ============================================================================= import unitte...
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 37811, 198, 41972, 319, 26223, 4280, 3261, 1367, 25, 2481, 25, 1558, 12131, 198, 198, 25, 22163, 4766, 25, 220, 198, 220, 220, 220, 19116, 2631, 330, 735, 357, 73, 431...
5.275
160
import os import sys from pathlib import Path sys.path.append(str(Path(__file__).resolve().parent.parent)) from aiphysim.trainer import Trainer # noqa: E402 from aiphysim.utils import load_opts, make_output_dir, save_config # noqa: E402 if __name__ == "__main__": pwd = Path().resolve() if pwd.name != "de...
[ 11748, 28686, 198, 11748, 25064, 198, 6738, 3108, 8019, 1330, 10644, 198, 198, 17597, 13, 6978, 13, 33295, 7, 2536, 7, 15235, 7, 834, 7753, 834, 737, 411, 6442, 22446, 8000, 13, 8000, 4008, 198, 198, 6738, 257, 13323, 893, 320, 13, ...
2.304015
523
# # Notation: Converter Symbolic import mechkit import numpy as np import sympy as sp import itertools np.set_printoptions( linewidth=140, precision=3, # suppress=False, ) # ### Symbolic with numbers converter = mechkit.notation.ConverterSymbolic() ones_tensor = np.ones((3, 3, 3, 3), dtype=sp.Symbol) pr...
[ 2, 1303, 1892, 341, 25, 35602, 353, 41327, 4160, 198, 198, 11748, 36571, 15813, 198, 11748, 299, 32152, 355, 45941, 198, 11748, 10558, 88, 355, 599, 198, 11748, 340, 861, 10141, 198, 198, 37659, 13, 2617, 62, 4798, 25811, 7, 198, 220,...
2.464646
297
from pyspark.sql import DataFrame from pyspark.ml import Transformer class Union(Transformer): """Appends rows of the dataframe provided in the constructor to the rows of the dataframe being transformed. This operation is possible if both tables have equal schemas. """
[ 6738, 279, 893, 20928, 13, 25410, 1330, 6060, 19778, 198, 6738, 279, 893, 20928, 13, 4029, 1330, 3602, 16354, 628, 198, 4871, 4479, 7, 8291, 16354, 2599, 198, 220, 220, 220, 37227, 4677, 2412, 15274, 286, 262, 1366, 14535, 2810, 287, ...
3.786667
75
from scrapy_redis.spiders import RedisSpider from example.items import ExampleLoader class MySpider(RedisSpider): """Spider that reads urls from redis queue (myspider:start_urls).""" name = 'myspider_redis' redis_key = 'myspider:start_urls'
[ 6738, 15881, 88, 62, 445, 271, 13, 2777, 4157, 1330, 2297, 271, 41294, 198, 6738, 1672, 13, 23814, 1330, 17934, 17401, 628, 198, 4871, 2011, 41294, 7, 7738, 271, 41294, 2599, 198, 220, 220, 220, 37227, 41294, 326, 9743, 2956, 7278, 42...
2.833333
90
from functools import wraps from py2store.base import Store from py2store.mixins import PrefixRelativizationMixin from py2store.persisters.dropbox_w_dropbox import DropboxPersister
[ 6738, 1257, 310, 10141, 1330, 27521, 198, 198, 6738, 12972, 17, 8095, 13, 8692, 1330, 9363, 198, 6738, 12972, 17, 8095, 13, 19816, 1040, 1330, 3771, 13049, 6892, 265, 452, 1634, 35608, 259, 198, 6738, 12972, 17, 8095, 13, 19276, 6223, ...
3.345455
55
# -------------------------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. # --------------------------------------------------------------------...
[ 2, 16529, 1783, 10541, 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, 5964, 1321, 13, 198, 2, 16529, 1783, 10541, 198,...
5.152672
131
from django.contrib import admin from .models import AuctionListing, User, Bid, Comments # Register your models here. admin.site.register(AuctionListing) admin.site.register(User) admin.site.register(Bid) admin.site.register(Comments)
[ 6738, 42625, 14208, 13, 3642, 822, 1330, 13169, 198, 6738, 764, 27530, 1330, 36071, 8053, 278, 11, 11787, 11, 43484, 11, 19502, 198, 198, 2, 17296, 534, 4981, 994, 13, 198, 28482, 13, 15654, 13, 30238, 7, 32, 8110, 8053, 278, 8, 198...
3.357143
70
import unittest import pickle import numpy as np from bark.core.world.agent import * from bark.core.models.behavior import * from bark.core.world import * from bark.core.world.map import * from bark.core.geometry import * from bark.core.models.dynamic import * from bark.core.models.execution import * from bark.core.ge...
[ 11748, 555, 715, 395, 198, 11748, 2298, 293, 198, 11748, 299, 32152, 355, 45941, 198, 198, 6738, 21405, 13, 7295, 13, 6894, 13, 25781, 1330, 1635, 198, 6738, 21405, 13, 7295, 13, 27530, 13, 46571, 1330, 1635, 198, 6738, 21405, 13, 729...
3.22619
168
import signal import sys import time import cv2 import numpy as np import pyfakewebcam from inotify_simple import INotify, flags from pipey import Pipeable import virtcam.debug as debug from virtcam.base import FrameProcessor, FrameSink, FrameSource, Image
[ 11748, 6737, 198, 11748, 25064, 198, 11748, 640, 198, 198, 11748, 269, 85, 17, 198, 11748, 299, 32152, 355, 45941, 198, 11748, 12972, 30706, 12384, 20991, 198, 6738, 287, 313, 1958, 62, 36439, 1330, 3268, 313, 1958, 11, 9701, 198, 6738,...
3.466667
75
a,b = map(int, input().split()) if a>b: print(">") elif a<b: print("<") elif a==b: print("==") #이렇게 map을 사용하면 입력할때 형태를 정할 수 있다. 지금은 정수로 입력한다는 것 ############################################################################################################## a = int(input()) for n in range(a, 0, -1): # 시작숫...
[ 64, 11, 65, 796, 3975, 7, 600, 11, 5128, 22446, 35312, 28955, 198, 361, 257, 29, 65, 25, 198, 220, 220, 220, 3601, 7, 5320, 4943, 198, 417, 361, 257, 27, 65, 25, 198, 220, 220, 220, 3601, 7203, 27, 4943, 198, 417, 361, 257, 85...
1.468817
465
from contextlib import contextmanager import os import tempfile try: from contextlib import _GeneratorContextManager as GCM except ImportError: from contextlib import GeneratorContextManager as GCM from dvc.utils.compat import urlparse from dvc.repo import Repo from dvc.external_repo import ExternalRepo def...
[ 6738, 4732, 8019, 1330, 4732, 37153, 198, 11748, 28686, 198, 11748, 20218, 7753, 198, 198, 28311, 25, 198, 220, 220, 220, 422, 4732, 8019, 1330, 4808, 8645, 1352, 21947, 13511, 355, 20145, 44, 198, 16341, 17267, 12331, 25, 198, 220, 220...
2.583984
512
import torch import torch.nn as nn from torch.nn import functional as F from utils import helpers as utl device = torch.device("cuda:0" if torch.cuda.is_available() else "cpu")
[ 11748, 28034, 198, 11748, 28034, 13, 20471, 355, 299, 77, 198, 6738, 28034, 13, 20471, 1330, 10345, 355, 376, 198, 198, 6738, 3384, 4487, 1330, 49385, 355, 3384, 75, 198, 198, 25202, 796, 28034, 13, 25202, 7203, 66, 15339, 25, 15, 1, ...
3.137931
58
# Generated by Django 3.2.8 on 2022-02-25 15:36 from django.db import migrations, models from django.db.models import F
[ 2, 2980, 515, 416, 37770, 513, 13, 17, 13, 23, 319, 33160, 12, 2999, 12, 1495, 1315, 25, 2623, 198, 198, 6738, 42625, 14208, 13, 9945, 1330, 15720, 602, 11, 4981, 198, 6738, 42625, 14208, 13, 9945, 13, 27530, 1330, 376, 628, 198 ]
2.860465
43
from hashlib import md5 from .CONFIG import HEX_DIGITS_IN_ADDRESS, ADDRESS_SPACE_SIZE
[ 6738, 12234, 8019, 1330, 45243, 20, 198, 6738, 764, 10943, 16254, 1330, 367, 6369, 62, 35, 3528, 29722, 62, 1268, 62, 2885, 7707, 7597, 11, 5984, 7707, 7597, 62, 4303, 11598, 62, 33489, 628 ]
2.558824
34
from Statistics.SampleMean import sampleMean from Calculators.Addition import addition
[ 6738, 14370, 13, 36674, 5308, 272, 1330, 6291, 5308, 272, 198, 6738, 27131, 2024, 13, 4550, 653, 1330, 3090, 628 ]
4.4
20
from collections import Counter from datetime import datetime from typing import List from palabros.database import db_cursor from palabros.errors import DatabaseError, GameError from palabros.queries import Query from palabros.schemas import Attempt, CharInspection, Game WORD_LENGTH = 5 def _normalize_word(word: s...
[ 6738, 17268, 1330, 15034, 198, 6738, 4818, 8079, 1330, 4818, 8079, 198, 6738, 19720, 1330, 7343, 198, 198, 6738, 6340, 397, 4951, 13, 48806, 1330, 20613, 62, 66, 21471, 198, 6738, 6340, 397, 4951, 13, 48277, 1330, 24047, 12331, 11, 3776...
2.377446
1,942
# coding: utf-8 """ Katib Swagger description for Katib # noqa: E501 The version of the OpenAPI document: v1beta1-0.1 Generated by: https://openapi-generator.tech """ import pprint import re # noqa: F401 import six from kubeflow.katib.configuration import Configuration class V1beta1Experiment...
[ 2, 19617, 25, 3384, 69, 12, 23, 198, 198, 37811, 198, 220, 220, 220, 8595, 571, 628, 220, 220, 220, 2451, 7928, 6764, 329, 8595, 571, 220, 1303, 645, 20402, 25, 412, 33548, 628, 220, 220, 220, 383, 2196, 286, 262, 4946, 17614, 318...
2.353511
8,574
# Authors: Sylvain MARIE <sylvain.marie@se.com> # + All contributors to <https://github.com/smarie/python-pytest-cases> # # License: 3-clause BSD, <https://github.com/smarie/python-pytest-cases/blob/master/LICENSE> from pytest_cases import param_fixture, fixture_union, fixture a = param_fixture('a', ['x', 'y'...
[ 2, 46665, 25, 24286, 391, 18805, 10008, 1279, 9163, 391, 13, 3876, 494, 31, 325, 13, 785, 29, 198, 2, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1343, 1439, 20420, 284, 1279, 5450, 1378, 12567, 13, 785, 14, 82, 3876, 494, 14, ...
2.509317
161
main()
[ 197, 197, 628, 198, 12417, 3419, 197, 197, 197, 197 ]
1.5
10
# Copyright 2022 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, 33160, 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.255639
399
import pandas as pd def _pd_hash_on_indexes(arg): """ hash pandas objects to immutable (index, columns) without modifying the objects This hash function uniquely identifies pandas.Series and pandas.DataFrame by (index, columns). This means if values of a column have been overwritten (due to ...
[ 11748, 19798, 292, 355, 279, 67, 628, 198, 4299, 4808, 30094, 62, 17831, 62, 261, 62, 9630, 274, 7, 853, 2599, 198, 220, 220, 220, 37227, 198, 220, 220, 220, 12234, 19798, 292, 5563, 284, 40139, 357, 9630, 11, 15180, 8, 1231, 30620,...
2.837838
222
# from sizif import * VERSION = "0.0.7"
[ 2, 422, 264, 528, 361, 1330, 1635, 198, 198, 43717, 796, 366, 15, 13, 15, 13, 22, 1, 198 ]
2.157895
19
import gzip import os import shutil import tarfile import bz2 import urllib.request from zipfile import ZipFile import boto3 from tqdm import tqdm """ Returns a human readable string reprentation of bytes"""
[ 11748, 308, 13344, 198, 11748, 28686, 198, 11748, 4423, 346, 198, 11748, 13422, 7753, 198, 11748, 275, 89, 17, 198, 11748, 2956, 297, 571, 13, 25927, 198, 6738, 19974, 7753, 1330, 38636, 8979, 198, 198, 11748, 275, 2069, 18, 198, 6738, ...
3.183099
71
# path: lib/processors # filename: defaults.py # description: WSGI application data defauts processors ''' # make python2 strings and dictionaries behave like python3 from __future__ import unicode_literals try: from builtins import dict, str except ImportError: from __builtin__ import dict, str Copyright 2017 ...
[ 2, 3108, 25, 9195, 14, 14681, 669, 198, 2, 29472, 25, 26235, 13, 9078, 198, 2, 6764, 25, 25290, 18878, 3586, 1366, 825, 17712, 20399, 198, 7061, 6, 220, 198, 2, 787, 21015, 17, 13042, 290, 48589, 3166, 17438, 588, 21015, 18, 198, ...
3.62406
266
#!/usr/bin/env python import time import optparse import numpy as np import tensorflow as tf import tensorflow.contrib from tensorflow.python.ops import rnn # Parameters optparser = optparse.OptionParser() optparser.add_option("--mode", default='inference', type=str, help="inference or train") optparser.add_option("...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 11748, 640, 198, 11748, 2172, 29572, 198, 11748, 299, 32152, 355, 45941, 198, 11748, 11192, 273, 11125, 355, 48700, 198, 11748, 11192, 273, 11125, 13, 3642, 822, 198, 6738, 11192, 273, 1...
2.507449
1,074
from __future__ import annotations import functools import inspect import sys import textwrap from abc import ABCMeta from concurrent.futures import CancelledError from dataclasses import dataclass, field from itertools import chain from types import TracebackType from typing import Any, cast from wrapt import Object...
[ 6738, 11593, 37443, 834, 1330, 37647, 198, 198, 11748, 1257, 310, 10141, 198, 11748, 10104, 198, 11748, 25064, 198, 11748, 2420, 37150, 198, 6738, 450, 66, 1330, 9738, 48526, 198, 6738, 24580, 13, 69, 315, 942, 1330, 43780, 3353, 12331, ...
2.525106
4,481
#!/usr/bin/env python __author__ = "Radical.Utils Development Team" __copyright__ = "Copyright 2016, RADICAL@Rutgers" __license__ = "MIT" ''' Unit tests for ru.Heartbeat() ''' import os import sys import time import multiprocessing as mp import radical.utils as ru # --------------------------------------...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 198, 834, 9800, 834, 220, 220, 220, 796, 366, 15546, 605, 13, 18274, 4487, 7712, 4816, 1, 198, 834, 22163, 4766, 834, 796, 366, 15269, 1584, 11, 33540, 20151, 31, 49, 315, 5355, 1, ...
3.090426
752
import numpy as np dirs = [UP, DOWN, LEFT, RIGHT] = range(4)
[ 11748, 299, 32152, 355, 45941, 201, 198, 15908, 82, 796, 685, 8577, 11, 30320, 11, 12509, 9792, 11, 33621, 60, 796, 2837, 7, 19, 8, 201 ]
2.384615
26
import numpy as np ''' Look up: https://docs.scipy.org/doc/numpy/reference/routines.random.html ''' if __name__ == "__main__": print("Random integers") array = random_integer() very_specific_slicing(array)
[ 11748, 299, 32152, 355, 45941, 220, 198, 7061, 6, 6803, 510, 25, 3740, 1378, 31628, 13, 1416, 541, 88, 13, 2398, 14, 15390, 14, 77, 32152, 14, 35790, 14, 81, 448, 1127, 13, 25120, 13, 6494, 705, 7061, 198, 198, 361, 11593, 3672, 8...
2.696203
79
#!/usr/bin/env python # -*- coding: utf-8 -*- # # GTKfiles.py # # Copyright 2010-2015 Jose Riguera Lopez <jriguera@gmail.com> # # 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 # #...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 2, 198, 2, 220, 220, 220, 220, 220, 220, 7963, 42, 16624, 13, 9078, 198, 2, 198, 2, 220, 220, 15069, 3050, 12, 46...
2.619102
869
import gzip from unittest import TestCase from wsgiref.util import setup_testing_defaults from prometheus_client import CollectorRegistry, Counter, make_wsgi_app from prometheus_client.exposition import _bake_output, CONTENT_TYPE_LATEST
[ 11748, 308, 13344, 198, 6738, 555, 715, 395, 1330, 6208, 20448, 198, 6738, 266, 45213, 557, 69, 13, 22602, 1330, 9058, 62, 33407, 62, 12286, 82, 198, 198, 6738, 1552, 36916, 62, 16366, 1330, 17573, 8081, 4592, 11, 15034, 11, 787, 62, ...
3.366197
71
filename = 'a_daughter_of_witches.txt' file_path = 'txt_files/' try: with open(f"{file_path}{filename}", encoding = 'utf-8') as f: contents = f.read() word_hunt = contents.lower().count('the ') print(f"Ordet du letar efter hittas {word_hunt} gånger i denna story") except FileNotFoundError:...
[ 34345, 796, 705, 64, 62, 29642, 62, 1659, 62, 86, 9249, 13, 14116, 6, 198, 7753, 62, 6978, 796, 705, 14116, 62, 16624, 14, 6, 198, 198, 28311, 25, 198, 220, 220, 220, 351, 1280, 7, 69, 1, 90, 7753, 62, 6978, 18477, 34345, 92, ...
2.403846
156
import pytest from pyinlinemodule.function import InlineFunction, METH_NOARGS, METH_O, METH_VARARGS, METH_KEYWORDS THIS_IS_CPP_CODE = "this_is_cpp_code" def function_with_cpp_args_kwargs(a, b, c=None, d=3, e=(None, "test")): """this is a doctring """ __cpp__ = """ return Py_BuildValue("(O,O,O,O,O)",...
[ 11748, 12972, 9288, 198, 198, 6738, 12972, 259, 2815, 368, 375, 2261, 13, 8818, 1330, 554, 1370, 22203, 11, 337, 20702, 62, 15285, 1503, 14313, 11, 337, 20702, 62, 46, 11, 337, 20702, 62, 53, 1503, 1503, 14313, 11, 337, 20702, 62, 2...
2.308842
803
from django.shortcuts import render from django.http import HttpResponse
[ 6738, 42625, 14208, 13, 19509, 23779, 1330, 8543, 198, 6738, 42625, 14208, 13, 4023, 1330, 367, 29281, 31077, 198 ]
3.842105
19
''' Pipelined bi-directional LSTM model. This model stacked biLSTM NLU and biLSTM SAP separate models together, and its weights are initilized by the ones of seprate models. Besides, for the SAP task, the decision threshold on the output layer is tuned on dev data. Author : Xuesong Yang ...
[ 7061, 6, 25149, 417, 1389, 3182, 12, 37295, 282, 406, 2257, 44, 2746, 13, 198, 220, 220, 220, 770, 2746, 24167, 3182, 43, 2257, 44, 22879, 52, 290, 3182, 43, 2257, 44, 48323, 4553, 4981, 1978, 11, 198, 220, 220, 220, 290, 663, 195...
2.770696
1,365
import subprocess returned_text = subprocess.check_output("speedtest-cli", shell=True, universal_newlines=True) print("The Result of Speed Test") print(returned_text)
[ 11748, 850, 14681, 198, 198, 7783, 276, 62, 5239, 796, 850, 14681, 13, 9122, 62, 22915, 7203, 12287, 9288, 12, 44506, 1600, 7582, 28, 17821, 11, 10112, 62, 3605, 6615, 28, 17821, 8, 198, 4798, 7203, 464, 25414, 286, 8729, 6208, 4943, ...
3.294118
51
from . import views from django.urls import path urlpatterns = [ path('', views.home), path('product/', views.product), path('customer/', views.customer), ]
[ 6738, 764, 1330, 5009, 198, 6738, 42625, 14208, 13, 6371, 82, 1330, 3108, 628, 198, 6371, 33279, 82, 796, 685, 198, 220, 220, 220, 3108, 10786, 3256, 5009, 13, 11195, 828, 198, 220, 220, 220, 3108, 10786, 11167, 14, 3256, 5009, 13, ...
2.758065
62
my_list = [] for cub_x in range(1, 1001, 2): my_list.append(cub_x ** 3) #print(my_list) my_list_2 = [] for cub_y in range(1, 1001, 2): my_list_2.append(cub_y ** 3 + 17) result_1 = sum_list_1(my_list) print(result_1) result_2 = sum_list_2(my_list_2) print(result_2) result_3 = sum_list_3(my_list) print(result_3)
[ 198, 1820, 62, 4868, 796, 17635, 198, 1640, 13617, 62, 87, 287, 2837, 7, 16, 11, 1802, 16, 11, 362, 2599, 198, 220, 220, 220, 616, 62, 4868, 13, 33295, 7, 66, 549, 62, 87, 12429, 513, 8, 198, 2, 4798, 7, 1820, 62, 4868, 8, 1...
2.025316
158
""" setup.py: Install nanoreactor learning script. """ from __future__ import print_function VERSION=4.2 __author__ = "Lee-Ping Wang, Alexey Titov, Robert McGibbon" __version__ = "%.1f"%VERSION import os, sys from distutils.core import setup#, Extension import numpy import glob requirements = ['numpy', 'networkx']...
[ 37811, 198, 40406, 13, 9078, 25, 15545, 15709, 382, 11218, 4673, 4226, 13, 220, 220, 198, 37811, 198, 6738, 11593, 37443, 834, 1330, 3601, 62, 8818, 198, 198, 43717, 28, 19, 13, 17, 198, 834, 9800, 834, 796, 366, 24338, 12, 49806, 1...
1.936858
681
from .bp4dSigReader import BP4DSigReader from .ubfcSigReader import UBFCSigReader from .unisensSigReader import UnisensSigReader
[ 6738, 764, 46583, 19, 67, 50, 328, 33634, 1330, 20997, 19, 5258, 328, 33634, 198, 6738, 764, 549, 16072, 50, 328, 33634, 1330, 471, 33, 4851, 50, 328, 33634, 198, 6738, 764, 403, 271, 641, 50, 328, 33634, 1330, 791, 271, 641, 50, ...
2.804348
46
list1 = [12, 24, 32, 39, 45, 50, 54] n = 45 result = binary_search(list1, n) if result != -1: print("Element is present at index", str(result)) else: print("Element is not present in the list1")
[ 4868, 16, 796, 685, 1065, 11, 1987, 11, 3933, 11, 5014, 11, 4153, 11, 2026, 11, 7175, 60, 220, 220, 198, 77, 796, 4153, 220, 220, 220, 220, 220, 198, 20274, 796, 13934, 62, 12947, 7, 4868, 16, 11, 299, 8, 220, 220, 198, 361, 1...
2.411111
90
# -*- encoding: utf-8 -*- # Copyright (c) 2015 b<>com # # Authors: Jean-Emile DARTOIS <jean-emile.dartois@b-com.com> # # 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/...
[ 2, 532, 9, 12, 21004, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 2, 15069, 357, 66, 8, 1853, 275, 27, 29, 785, 198, 2, 198, 2, 46665, 25, 11320, 12, 10161, 576, 360, 7227, 46, 1797, 1279, 73, 11025, 12, 368, 576, 13, 67, 433, ...
3.412698
252
import os, sys basePlugPath = os.path.join("..", "..") sys.path.insert(0, os.path.join(basePlugPath, "api")) sys.path.insert(0, os.path.join(basePlugPath, "external")) # TODO - know difference between module import vs package import? import drawingboard from pattern.web import Twitter, hashtags import pprint pp = p...
[ 198, 11748, 28686, 11, 25064, 220, 198, 8692, 23257, 15235, 796, 28686, 13, 6978, 13, 22179, 7203, 492, 1600, 366, 492, 4943, 198, 17597, 13, 6978, 13, 28463, 7, 15, 11, 28686, 13, 6978, 13, 22179, 7, 8692, 23257, 15235, 11, 366, 15...
2.862069
174