content
stringlengths
1
1.05M
input_ids
listlengths
1
883k
ratio_char_token
float64
1
22.9
token_count
int64
1
883k
""" Use repro_eval from the command line with e.g. python -m repro_eval -t rpd -q qrel_orig -r orig_b rpd_b python -m repro_eval -t rpd -q qrel_orig -r orig_b orig_a rpd_b rpd_a python -m repro_eval -t rpd -m rmse -q qrel_orig -r orig_b rpd_b python -m repro_eval -t rpl -q qrel_orig qrel_rpl -r orig_b rpl_b python...
[ 37811, 198, 11041, 43969, 62, 18206, 422, 262, 3141, 1627, 351, 304, 13, 70, 13, 198, 198, 29412, 532, 76, 43969, 62, 18206, 532, 83, 374, 30094, 532, 80, 10662, 2411, 62, 11612, 532, 81, 1796, 62, 65, 374, 30094, 62, 65, 198, 198...
2.708609
302
import math from game_objects import Turret, Troop players = [] def calculate_distance(entity1: Location, entity2: Location) -> float: # distance between vectors: https://brilliant.org/wiki/distance-formula/ distance = math.sqrt((entity1.x - entity2.x) ** 2 + (entity1.y + entity2.y) ** 2) return dista...
[ 11748, 10688, 198, 198, 6738, 983, 62, 48205, 1330, 3831, 1186, 11, 8498, 404, 198, 198, 32399, 796, 17635, 628, 628, 198, 4299, 15284, 62, 30246, 7, 26858, 16, 25, 13397, 11, 9312, 17, 25, 13397, 8, 4613, 12178, 25, 198, 220, 220, ...
2.539185
319
import os from pathlib import Path from difflib import SequenceMatcher supported_bibtex_types = {"article", "book", "booklet", "inbook", "incollection", "inproceedings", "manual", "mastersthesis", "misc", "phdthesis", "proceedings", "techreport", "unpublished"} supported_fields = ["author",...
[ 11748, 28686, 198, 6738, 3108, 8019, 1330, 10644, 198, 6738, 814, 8019, 1330, 45835, 19044, 2044, 628, 198, 15999, 62, 65, 571, 16886, 62, 19199, 796, 19779, 20205, 1600, 366, 2070, 1600, 366, 2070, 1616, 1600, 366, 259, 2070, 1600, 366...
2.235146
3,181
from selenium import webdriver import time import userdata as udata import random randomUsers = set()
[ 6738, 384, 11925, 1505, 1330, 3992, 26230, 201, 198, 11748, 640, 201, 198, 11748, 2836, 7890, 355, 334, 7890, 201, 198, 11748, 4738, 201, 198, 201, 198, 25120, 14490, 796, 900, 3419, 201, 198, 201, 198, 220, 220, 220, 220, 220, 220, ...
2.388889
54
''' Title : Linear Algebra Subdomain : Numpy Domain : Python Author : codeperfectplus Created : 10 May 2020 ''' import numpy n=int(input()) a=numpy.array([input().split() for _ in range(n)],float) print(round(numpy.linalg.det(a),2))
[ 7061, 6, 198, 19160, 220, 220, 220, 220, 1058, 44800, 978, 29230, 198, 7004, 27830, 1058, 399, 32152, 198, 43961, 220, 220, 220, 1058, 11361, 198, 13838, 220, 220, 220, 1058, 2438, 25833, 9541, 198, 41972, 220, 220, 1058, 838, 1737, 1...
2.510204
98
# -*- coding: utf-8 -*- import numpy as np from ..dim_processors_base import DimProcessorBase from ...registry import DIMPROCESSORS from sklearn.preprocessing import normalize from typing import Dict, List
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 198, 11748, 299, 32152, 355, 45941, 198, 198, 6738, 11485, 27740, 62, 14681, 669, 62, 8692, 1330, 14048, 18709, 273, 14881, 198, 6738, 2644, 2301, 4592, 1330, 360, 3955, ...
3.119403
67
import csv import person from random import randrange headers = ['Name', 'Messages', 'Char Count', 'Likes Given', 'Likes Received', 'Image URL'] #tester code people = ['bob', 'joe', 'gmo'] bob = person.Person(111, 'bob', 'www.bob.com', people) joe = person.Person(222, 'joe', 'www.joe.com', people) gmo = p...
[ 11748, 269, 21370, 201, 198, 11748, 1048, 201, 198, 6738, 4738, 1330, 43720, 9521, 201, 198, 201, 198, 50145, 796, 37250, 5376, 3256, 705, 36479, 1095, 3256, 705, 12441, 2764, 3256, 705, 43, 7938, 11259, 3256, 705, 43, 7938, 20557, 3256...
2.310198
706
import pandas as pd from hydroDL.data import usgs, gageII, gridMET, ntn, GLASS, transform, dbBasin import numpy as np import matplotlib.pyplot as plt from hydroDL.post import axplot, figplot from hydroDL import kPath, utils import json import os import importlib from hydroDL.master import basinFull from hydroDL.app.wa...
[ 198, 11748, 19798, 292, 355, 279, 67, 198, 6738, 17173, 19260, 13, 7890, 1330, 514, 14542, 11, 308, 496, 3978, 11, 10706, 47123, 11, 299, 34106, 11, 10188, 10705, 11, 6121, 11, 20613, 15522, 259, 198, 11748, 299, 32152, 355, 45941, 19...
2.309333
375
import math as m import numpy as np from BDMesh import Mesh1DUniform from BDFunction1D import Function from BDFunction1D.Functional import Functional from BDFunction1D.Interpolation import InterpolateFunction from BDPoisson1D.DirichletNonLinear import dirichlet_non_linear_poisson_solver_arrays from BDPoisson1D.Dirich...
[ 11748, 10688, 355, 285, 198, 11748, 299, 32152, 355, 45941, 198, 198, 6738, 347, 23127, 5069, 1330, 47529, 16, 35, 3118, 6933, 198, 6738, 347, 8068, 4575, 16, 35, 1330, 15553, 198, 6738, 347, 8068, 4575, 16, 35, 13, 22203, 282, 1330, ...
2.837121
264
import argparse import gzip import os import pytest from ..dumpSTR import * from trtools.testsupport.utils import assert_same_vcf, assert_same_file # Set up base argparser # Test no such file or directory def test_WrongFile(args, testDumpSTRdir): fname = os.path.join(testDumpSTRdir, "test_non_existent.vcf") ...
[ 11748, 1822, 29572, 198, 11748, 308, 13344, 198, 11748, 28686, 198, 198, 11748, 12972, 9288, 198, 198, 6738, 11485, 39455, 18601, 1330, 1635, 198, 6738, 491, 31391, 13, 9288, 11284, 13, 26791, 1330, 6818, 62, 31642, 62, 85, 12993, 11, 6...
3.478916
664
begin_unit comment|'# Copyright 2012 Andrew Bogott for the Wikimedia Foundation' nl|'\n' comment|'#' nl|'\n' comment|'# Licensed under the Apache License, Version 2.0 (the "License"); you may' nl|'\n' comment|'# not use this file except in compliance with the License. You may obtain' nl|'\n' comment|'# a copy ...
[ 27471, 62, 20850, 198, 23893, 91, 6, 2, 15069, 2321, 6858, 21555, 1252, 329, 262, 44877, 5693, 6, 198, 21283, 91, 6, 59, 77, 6, 198, 23893, 91, 6, 2, 6, 198, 21283, 91, 6, 59, 77, 6, 198, 23893, 91, 6, 2, 220, 220, 220, 4996...
1.799445
15,502
# -*- coding: utf-8 -*- """ 1946. Largest Number After Mutating Substring https://leetcode.com/problems/largest-number-after-mutating-substring/ Example 1: Input: num = "132", change = [9,8,5,0,3,6,4,2,6,8] Output: "832" Explanation: Replace the substring "1": - 1 maps to change[1] = 8. Thus, "132" becomes "832". "8...
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 198, 37811, 198, 1129, 3510, 13, 406, 853, 395, 7913, 2293, 13859, 803, 3834, 8841, 198, 5450, 1378, 293, 316, 8189, 13, 785, 14, 1676, 22143, 14, 28209, 12, 17618, 12...
2.486957
345
import pytest from bot.bot import Bot
[ 11748, 12972, 9288, 198, 6738, 10214, 13, 13645, 1330, 18579, 628 ]
3.545455
11
""" Hackerrank Day 9: Recursion 3 https://www.hackerrank.com/challenges/30-recursion/problem?h_r=email&unlock_token=bc6d5f3963afb26ed0b2f69c3f4f3ddb1826e1b2&utm_campaign=30_days_of_code_continuous&utm_medium=email&utm_source=daily_reminder Objective Today, we are learning about an algorithmic concept called recursion....
[ 37811, 198, 32833, 8056, 962, 198, 12393, 860, 25, 3311, 24197, 513, 198, 5450, 1378, 2503, 13, 31153, 8056, 962, 13, 785, 14, 36747, 34120, 14, 1270, 12, 8344, 24197, 14, 45573, 30, 71, 62, 81, 28, 12888, 5, 403, 5354, 62, 30001, ...
3.238663
419
from django.db import models
[ 6738, 42625, 14208, 13, 9945, 1330, 4981, 198 ]
3.625
8
import logging from qbrobot import qsettings try : from util import send_dingding except ImportError: DINGDING_CANUSE = False else: DINGDING_CANUSE = True """ class DingDingLogger pass all args to logger.method, and call dingding.send_msg() 1. debug message don't send to dingding. 2....
[ 11748, 18931, 198, 198, 6738, 220, 10662, 7957, 13645, 1330, 10662, 33692, 628, 198, 28311, 1058, 198, 220, 220, 220, 422, 7736, 1330, 3758, 62, 12083, 12083, 220, 198, 16341, 17267, 12331, 25, 198, 220, 220, 220, 360, 2751, 35, 2751, ...
2.664336
286
# %% import os import pandas as pd import numpy as np import datetime # %% CARGA DE DATOS path = r'F:\Trabajo\Promotive\Chile\PRT\7\CSV\3' os.chdir(path) files = os.listdir(path) files # %% files_xls = [f for f in files if f[-3:] == 'csv'] files_xls # %% columnas = ['PPU', 'MARCA', 'MODELO', 'ANO_FABRICACION', 'NU...
[ 2, 43313, 198, 11748, 28686, 198, 11748, 19798, 292, 355, 279, 67, 198, 11748, 299, 32152, 355, 45941, 198, 11748, 4818, 8079, 628, 198, 2, 43313, 17368, 9273, 5550, 360, 1404, 2640, 198, 6978, 796, 374, 6, 37, 7479, 2898, 397, 34944,...
2.181269
331
import os.path as osp import numpy as np from PIL import Image import torch.utils.data as data import torch __all__ = ['LFW_CROP'] EXTENSION_FACTOR = 2
[ 11748, 28686, 13, 6978, 355, 267, 2777, 198, 11748, 299, 32152, 355, 45941, 198, 6738, 350, 4146, 1330, 7412, 198, 198, 11748, 28034, 13, 26791, 13, 7890, 355, 1366, 198, 11748, 28034, 198, 198, 834, 439, 834, 796, 37250, 43, 24160, 6...
2.736842
57
from pyimei import ImeiSupport #testing classes ImeiSupport.test() valid_imeis = [ 356938035643809, 490154203237518, "356938035643809" ] invalid_imeis = [ 358065019104263, "357805023984941", 356938035643801 ] checkImeisArray(valid_imeis) checkImeisArray(invalid_imeis) pr...
[ 6738, 12972, 45519, 1330, 314, 1326, 72, 15514, 201, 198, 201, 198, 2, 33407, 6097, 201, 198, 40, 1326, 72, 15514, 13, 9288, 3419, 201, 198, 201, 198, 12102, 62, 524, 271, 796, 685, 201, 198, 220, 220, 220, 3439, 3388, 23734, 2327, ...
2.076355
406
""" .. code-block:: python from aioauth import responses Response objects used throughout the project. ---- """ from dataclasses import dataclass, field from http import HTTPStatus from typing import Dict from .collections import HTTPHeaderDict from .constances import default_headers from .types import ErrorTyp...
[ 37811, 198, 492, 2438, 12, 9967, 3712, 21015, 628, 220, 220, 220, 422, 257, 952, 18439, 1330, 9109, 198, 198, 31077, 5563, 973, 3690, 262, 1628, 13, 198, 198, 650, 198, 37811, 198, 6738, 4818, 330, 28958, 1330, 4818, 330, 31172, 11, ...
3.788889
90
#!/usr/bin/env python3 import logging import platform import time from functools import partial from statistics import stdev from typing import List, Tuple, Dict, Union, Any import psutil from joblib import Parallel, delayed from fimdp.objectives import BUCHI from fipomdp import ConsPOMDP from fipomdp.energy_solvers ...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 18, 198, 11748, 18931, 198, 11748, 3859, 198, 11748, 640, 198, 6738, 1257, 310, 10141, 1330, 13027, 198, 6738, 7869, 1330, 336, 7959, 198, 6738, 19720, 1330, 7343, 11, 309, 29291, 11, 360, ...
3.245098
204
import network import time # deactivate AP ap = network.WLAN(network.AP_IF) ap.active(False) # activate static network wlan = network.WLAN(network.STA_IF) wlan.active(True) # connect to local WIFI wlan.connect('TFM-Attendees') # wait until connected while not wlan.isconnected(): print('connecting...') time....
[ 11748, 3127, 198, 11748, 640, 198, 198, 2, 390, 39022, 3486, 198, 499, 796, 3127, 13, 54, 25697, 7, 27349, 13, 2969, 62, 5064, 8, 198, 499, 13, 5275, 7, 25101, 8, 198, 198, 2, 15155, 9037, 3127, 198, 86, 9620, 796, 3127, 13, 54,...
2.829787
141
import asyncio import logging import os import time from addict import Addict from aiogram.types import Message from hikcamerabot.config.config import get_result_queue from hikcamerabot.constants import Event, VideoGifType from hikcamerabot.utils.utils import format_ts, gen_random_str
[ 11748, 30351, 952, 198, 11748, 18931, 198, 11748, 28686, 198, 11748, 640, 198, 198, 6738, 19678, 1330, 3060, 713, 198, 6738, 257, 72, 21857, 13, 19199, 1330, 16000, 198, 198, 6738, 289, 1134, 66, 2382, 397, 313, 13, 11250, 13, 11250, ...
3.284091
88
""" Provides functionalilty for working with celled hypercubes. Hypercubes are extensions of lines, squares and cubes into higher dimensions. Celled hypercubes can be thought as a grid or lattice structure. From this point, hypercubes is used to mean celled hypercubes. A hypercube can be described by its dimension a...
[ 37811, 47081, 10345, 6267, 329, 1762, 351, 2685, 276, 8718, 66, 29080, 13, 198, 198, 38197, 66, 29080, 389, 18366, 286, 3951, 11, 24438, 290, 34896, 656, 2440, 220, 198, 27740, 5736, 13, 327, 11978, 8718, 66, 29080, 460, 307, 1807, 35...
2.103772
25,739
# Package version __version__ = "0.16.31"
[ 2, 15717, 2196, 198, 834, 9641, 834, 796, 366, 15, 13, 1433, 13, 3132, 1, 198 ]
2.625
16
# SPDX-FileCopyrightText: 2021 Division of Intelligent Medical Systems, DKFZ # SPDX-FileCopyrightText: 2021 Janek Groehl # SPDX-License-Identifier: MIT from simpa.core.device_digital_twins import SlitIlluminationGeometry, LinearArrayDetectionGeometry, PhotoacousticDevice from simpa import perform_k_wave_acoustic_forw...
[ 2, 30628, 55, 12, 8979, 15269, 8206, 25, 33448, 7458, 286, 49452, 8366, 11998, 11, 32975, 37, 57, 198, 2, 30628, 55, 12, 8979, 15269, 8206, 25, 33448, 2365, 988, 10299, 17231, 75, 198, 2, 30628, 55, 12, 34156, 12, 33234, 7483, 25, ...
3.215517
348
#!/usr/bin/python # -*- coding: utf-8 -*- # Copyright (c) 2016, Silvio Peroni <essepuntato@gmail.com> # # Permission to use, copy, modify, and/or distribute this software for any purpose # with or without fee is hereby granted, provided that the above copyright notice # and this permission notice appear in all copies. ...
[ 2, 48443, 14629, 14, 8800, 14, 29412, 198, 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 2, 15069, 357, 66, 8, 1584, 11, 4243, 85, 952, 2448, 14651, 1279, 35270, 79, 2797, 5549, 31, 14816, 13, 785, 29, 198, 2, ...
3.373089
327
from rest_framework import serializers from backend_app import models # RESPONSES SERIALIZERS
[ 6738, 1334, 62, 30604, 1330, 11389, 11341, 198, 198, 6738, 30203, 62, 1324, 1330, 4981, 628, 628, 628, 628, 628, 628, 628, 198, 198, 2, 47203, 19213, 1546, 18871, 12576, 14887, 4877, 628, 628, 628, 198 ]
3.222222
36
"""The database connection manager. """ import logging import psycopg2
[ 37811, 464, 6831, 4637, 4706, 13, 198, 37811, 198, 198, 11748, 18931, 198, 11748, 17331, 22163, 70, 17, 628 ]
3.842105
19
""" cvp.py Functions for generating CVP feeds. :copyright: (C) 2014 by github.com/alfg. :license: MIT, see README for more details. """ def cvp_player_to_dict(player): """ Convert a player object from a Tree to a CVP-compliant dict. """ return { "session": player.session, "userid": ...
[ 37811, 198, 33967, 79, 13, 9078, 198, 24629, 2733, 329, 15453, 327, 8859, 21318, 13, 198, 198, 25, 22163, 4766, 25, 357, 34, 8, 1946, 416, 33084, 13, 785, 14, 1604, 70, 13, 198, 25, 43085, 25, 220, 220, 17168, 11, 766, 20832, 1168...
2.206501
523
# Copyright (C) 2010 Google Inc. All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are # met: # # * Redistributions of source code must retain the above copyright # notice, this list of conditions and the f...
[ 2, 15069, 357, 34, 8, 3050, 3012, 3457, 13, 1439, 2489, 10395, 13, 198, 2, 198, 2, 2297, 396, 3890, 290, 779, 287, 2723, 290, 13934, 5107, 11, 351, 393, 1231, 198, 2, 17613, 11, 389, 10431, 2810, 326, 262, 1708, 3403, 389, 198, ...
3.605996
467
# -*- coding: utf-8 -*- from skimage import transform import tensorflow as tf import numpy as np import glob import face_recognition as FR import os import shutil
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 6738, 1341, 9060, 1330, 6121, 198, 11748, 11192, 273, 11125, 355, 48700, 198, 11748, 299, 32152, 355, 45941, 198, 11748, 15095, 198, 11748, 1986, 62, 26243, 653, 355, 8782...
3.173077
52
print("Enter Values of cylindrical part of tent ") h = float(input("Height : ")) r = float(input("radius : ")) csa_cyl = cyl(h, r) l = float(input("Enter slant height ")) csa_con = con(r, l) canvas_area = csa_cyl + csa_con print("Area of canvas = ", canvas_area, " m^2") unit_price = float(input("Enter cost of 1 m^2 ")...
[ 4798, 7203, 17469, 27068, 286, 17327, 521, 8143, 636, 286, 11105, 366, 8, 198, 71, 796, 12178, 7, 15414, 7203, 23106, 1058, 366, 4008, 198, 81, 796, 12178, 7, 15414, 7203, 42172, 1058, 366, 4008, 198, 6359, 64, 62, 38801, 796, 17327, ...
2.769231
169
# Plotly integration for the Moku:Lab Datalogger # Copyright 2016 Liquid Instruments Pty. Ltd. from pymoku import InvalidOperationException
[ 2, 28114, 306, 11812, 329, 262, 337, 11601, 25, 17822, 360, 10254, 519, 1362, 198, 198, 2, 15069, 1584, 21020, 43953, 350, 774, 13, 12052, 13, 198, 198, 6738, 279, 4948, 11601, 1330, 17665, 32180, 16922 ]
3.916667
36
import publisher test_pdf_filename = "test/test.pdf" test_css_filename = "test/test.css" test_md_filename = "test/test.md" test_html_filename = "test/test.html" test_sender = "cpg@yakko.cs.wmich.edu" test_recipient = "cpgillem@gmail.com" test_md = "# Test heading\n\n- test item 1\n- test item 2" # The test case curr...
[ 11748, 9991, 198, 198, 9288, 62, 12315, 62, 34345, 796, 366, 9288, 14, 9288, 13, 12315, 1, 198, 9288, 62, 25471, 62, 34345, 796, 366, 9288, 14, 9288, 13, 25471, 1, 198, 9288, 62, 9132, 62, 34345, 796, 366, 9288, 14, 9288, 13, 9132...
2.531915
141
from .train import Train
[ 6738, 764, 27432, 1330, 16835 ]
4.8
5
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import models, migrations
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 6738, 11593, 37443, 834, 1330, 28000, 1098, 62, 17201, 874, 198, 198, 6738, 42625, 14208, 13, 9945, 1330, 4981, 11, 15720, 602, 628 ]
2.891892
37
#!/usr/bin/env python # -*- coding:utf-8 -*- from .Contract import * from .Receivable import * from .Receipt import * from .Shop import * from .Statement import * from .Application import *
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 220, 198, 2, 532, 9, 12, 19617, 25, 40477, 12, 23, 532, 9, 12, 198, 198, 6738, 764, 45845, 1330, 1635, 198, 6738, 764, 3041, 48054, 1330, 1635, 198, 6738, 764, 3041, 344, 10257, 1330, 1...
3.080645
62
# -*- coding: utf-8 -*- import csv from stop_words import get_stop_words from nltk.stem.porter import PorterStemmer from gensim import corpora import gensim import os import re from nltk.tokenize import RegexpTokenizer #SET PATH path = r'' inputname="" def remove_html_tags(text): """Remove html tags from a s...
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 198, 11748, 269, 21370, 198, 6738, 2245, 62, 10879, 1330, 651, 62, 11338, 62, 10879, 198, 6738, 299, 2528, 74, 13, 927, 13, 26634, 1330, 20890, 1273, 368, 647, 198, 67...
2.052897
794
#!/usr/bin/env python import sys import os sys.path.append(os.path.join(os.path.dirname('__file__'), '..', 'src')) from random import randint from datetime import datetime, timedelta from logsandra.model.client import CassandraClient client = CassandraClient('test', 'localhost', 9160, 3) keywords = ['foo', 'bar', ...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 11748, 25064, 198, 11748, 28686, 198, 198, 17597, 13, 6978, 13, 33295, 7, 418, 13, 6978, 13, 22179, 7, 418, 13, 6978, 13, 15908, 3672, 10786, 834, 7753, 834, 33809, 705, 492, 3256, 7...
2.865385
208
#!/usr/bin/env python # -*- coding: utf-8 -*- from setuptools import setup, find_packages setup( # name of the lib name='bioshadock_biotools', # version version='1.0.1', packages=find_packages(), author="Francois Moreews", description="Import tool for biotools from Dockerfile", 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, 6738, 900, 37623, 10141, 1330, 9058, 11, 1064, 62, 43789, 198, 198, 40406, 7, 628, 220, 220, 220, 1303, 1438, 28...
2.362398
367
import numpy as np from tensorflow.keras.models import Sequential from tensorflow.keras.layers import Dense from tensorflow.keras.optimizers import RMSprop from tensorflow.lite.python import lite X_train = np.array([[0.0, 0.0], [1.0, 0.0], [0.0, 1.0], [1.0, ...
[ 11748, 299, 32152, 355, 45941, 198, 198, 6738, 11192, 273, 11125, 13, 6122, 292, 13, 27530, 1330, 24604, 1843, 198, 6738, 11192, 273, 11125, 13, 6122, 292, 13, 75, 6962, 1330, 360, 1072, 198, 6738, 11192, 273, 11125, 13, 6122, 292, 13...
2.115108
556
from django.db import models from django.contrib.auth.models import AbstractUser from django.utils.translation import ugettext_lazy as _
[ 6738, 42625, 14208, 13, 9945, 1330, 4981, 198, 6738, 42625, 14208, 13, 3642, 822, 13, 18439, 13, 27530, 1330, 27741, 12982, 198, 6738, 42625, 14208, 13, 26791, 13, 41519, 1330, 334, 1136, 5239, 62, 75, 12582, 355, 4808, 628, 198 ]
3.475
40
import logging from abc import ABC, abstractmethod from os.path import isfile, splitext import pathlib import torch from .waveform import get_waveform logger = logging.getLogger(__name__)
[ 11748, 18931, 198, 6738, 450, 66, 1330, 9738, 11, 12531, 24396, 198, 6738, 28686, 13, 6978, 1330, 318, 7753, 11, 4328, 578, 742, 198, 11748, 3108, 8019, 198, 11748, 28034, 198, 198, 6738, 764, 19204, 687, 1330, 651, 62, 19204, 687, 19...
3.310345
58
import os import sys import serial import time import struct ser = serial.Serial('/dev/ttyACM0',9600) led = sys.argv[1] act = sys.argv[2] l = str(led) """a = str(act)""" time.sleep(5) ser.write(struct.pack(l.encode()) """ ser.write(l.encode()) """
[ 11748, 28686, 198, 11748, 25064, 198, 11748, 11389, 198, 11748, 640, 198, 11748, 2878, 198, 198, 2655, 796, 11389, 13, 32634, 10786, 14, 7959, 14, 42852, 2246, 44, 15, 3256, 4846, 405, 8, 198, 992, 796, 25064, 13, 853, 85, 58, 16, 6...
2.390476
105
""" Primary module for Froggit This module contains the main controller class for the Froggit application. There is no need for any additional classes in this module. If you need more classes, 99% of the time they belong in either the lanes module or the models module. If you are unsure about where a new class should...
[ 37811, 198, 35170, 8265, 329, 9734, 1130, 270, 198, 198, 1212, 8265, 4909, 262, 1388, 10444, 1398, 329, 262, 9734, 1130, 270, 3586, 13, 1318, 198, 271, 645, 761, 329, 597, 3224, 6097, 287, 428, 8265, 13, 220, 1002, 345, 761, 517, 60...
3.655556
180
import logging from functools import wraps from PIL import Image, ImageFont, ImageDraw from config import LIST_ALLOWED_USERS
[ 11748, 18931, 198, 6738, 1257, 310, 10141, 1330, 27521, 198, 6738, 350, 4146, 1330, 7412, 11, 7412, 23252, 11, 7412, 25302, 198, 198, 6738, 4566, 1330, 39498, 62, 7036, 3913, 1961, 62, 2937, 4877, 628, 198 ]
3.555556
36
from .Camera import * from .GloveBox import * from .Microscope import * from .Stage import * from .UserInterface import * from .NeuralNetwork import *
[ 6738, 764, 35632, 1330, 1635, 198, 6738, 764, 9861, 659, 14253, 1330, 1635, 220, 198, 6738, 764, 13031, 29982, 1330, 1635, 220, 198, 6738, 764, 29391, 1330, 1635, 198, 6738, 764, 12982, 39317, 1330, 1635, 198, 6738, 764, 8199, 1523, 262...
3.534884
43
""" Copyright 2019-2021 Boris Shminke 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 t...
[ 37811, 198, 220, 220, 15069, 13130, 12, 1238, 2481, 25026, 911, 1084, 365, 628, 220, 220, 49962, 739, 262, 24843, 13789, 11, 10628, 362, 13, 15, 357, 1169, 366, 34156, 15341, 198, 220, 220, 345, 743, 407, 779, 428, 2393, 2845, 287, ...
3.574561
228
from __future__ import absolute_import, division, print_function import cv2 import random import numpy as np import colorsys import matplotlib.pyplot as plt import matplotlib.patches as patches from matplotlib.patches import Polygon from skimage.measure import find_contours def log(text, array=None): """Prints a...
[ 6738, 11593, 37443, 834, 1330, 4112, 62, 11748, 11, 7297, 11, 3601, 62, 8818, 198, 198, 11748, 269, 85, 17, 198, 11748, 4738, 198, 11748, 299, 32152, 355, 45941, 198, 11748, 7577, 893, 198, 11748, 2603, 29487, 8019, 13, 9078, 29487, 3...
2.098956
2,779
import pytest
[ 11748, 12972, 9288, 198 ]
3.5
4
"""Particle filters for inference in state space models.""" import abc from typing import Tuple, Dict, Callable, Any, Optional import numpy as np from numpy.random import Generator from scipy.special import logsumexp from scipy.sparse import csr_matrix from dapy.filters.base import AbstractEnsembleFilter from dapy.mod...
[ 37811, 7841, 1548, 16628, 329, 32278, 287, 1181, 2272, 4981, 526, 15931, 198, 198, 11748, 450, 66, 198, 6738, 19720, 1330, 309, 29291, 11, 360, 713, 11, 4889, 540, 11, 4377, 11, 32233, 198, 11748, 299, 32152, 355, 45941, 198, 6738, 29...
3.536364
110
import random
[ 11748, 4738 ]
6.5
2
""" Copyright 2011 Shao-Chuan Wang <shaochuan.wang AT gmail.com> Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to ...
[ 37811, 198, 220, 220, 15069, 2813, 911, 5488, 12, 1925, 7258, 15233, 1279, 26270, 5374, 7258, 13, 47562, 5161, 308, 4529, 13, 785, 29, 628, 220, 220, 220, 2448, 3411, 318, 29376, 7520, 11, 1479, 286, 3877, 11, 284, 597, 1048, 16727, ...
3.218807
553
# coding: utf-8 """ App Center Client Microsoft Visual Studio App Center API # noqa: E501 OpenAPI spec version: preview Contact: benedetto.abbenanti@gmail.com Project Repository: https://github.com/b3nab/appcenter-sdks """ import pprint import re # noqa: F401 import six def to_str(self)...
[ 2, 19617, 25, 3384, 69, 12, 23, 198, 198, 37811, 198, 220, 220, 220, 2034, 3337, 20985, 628, 220, 220, 220, 5413, 15612, 11733, 2034, 3337, 7824, 220, 1303, 645, 20402, 25, 412, 33548, 628, 220, 220, 220, 4946, 17614, 1020, 2196, 25...
2.593373
332
from click.testing import CliRunner import unittest from mock import patch, Mock, PropertyMock from floyd.cli.version import upgrade
[ 6738, 3904, 13, 33407, 1330, 1012, 72, 49493, 198, 11748, 555, 715, 395, 198, 6738, 15290, 1330, 8529, 11, 44123, 11, 14161, 44, 735, 198, 198, 6738, 781, 12192, 13, 44506, 13, 9641, 1330, 8515, 198 ]
3.722222
36
"""Contains HelpCommand class.""" import discord from discord.ext import commands from offthedialbot import utils def short(self, command, doc=True): """List the command as a one-liner.""" sig = self.get_command_signature(command) if not doc else f'{self.clean_prefix}{command}' return f'...
[ 37811, 4264, 1299, 10478, 21575, 1398, 526, 15931, 198, 198, 11748, 36446, 198, 6738, 36446, 13, 2302, 1330, 9729, 198, 198, 6738, 572, 83, 704, 498, 13645, 1330, 3384, 4487, 628, 198, 220, 220, 220, 825, 1790, 7, 944, 11, 3141, 11, ...
2.734177
158
def is_anagram ( word1, word2 ): ''' Returns True if word1 is 'anagram' of word2 or False if otherwise. word1: str word2: str ''' return sorted(word1) == sorted(word2) print(is_anagram("silence", "listen"))
[ 4299, 318, 62, 272, 6713, 357, 1573, 16, 11, 1573, 17, 15179, 198, 220, 220, 220, 705, 7061, 198, 220, 220, 220, 16409, 6407, 611, 1573, 16, 318, 705, 272, 6713, 6, 286, 1573, 17, 393, 10352, 611, 4306, 13, 198, 220, 220, 220, 2...
2.161017
118
import torch from torch import nn as nn from learning.modules.blocks import ResBlock, ResBlockConditional
[ 11748, 28034, 198, 6738, 28034, 1330, 299, 77, 355, 299, 77, 198, 198, 6738, 4673, 13, 18170, 13, 27372, 1330, 1874, 12235, 11, 1874, 12235, 25559, 1859 ]
3.925926
27
# Used for deploying on Apache with mod_wsgi from cryptovote.app import create_app application = create_app()
[ 2, 16718, 329, 29682, 319, 24843, 351, 953, 62, 18504, 12397, 198, 6738, 8194, 709, 1258, 13, 1324, 1330, 2251, 62, 1324, 198, 31438, 796, 2251, 62, 1324, 3419, 198 ]
3.666667
30
# # @lc app=leetcode id=203 lang=python3 # # [203] Remove Linked List Elements # # @lc code=start # Definition for singly-linked list. # class ListNode: # def __init__(self, val=0, next=None): # self.val = val # self.next = next # @lc code=end
[ 2, 198, 2, 2488, 44601, 598, 28, 293, 316, 8189, 4686, 28, 22416, 42392, 28, 29412, 18, 198, 2, 198, 2, 685, 22416, 60, 17220, 7502, 276, 7343, 26632, 198, 2, 198, 198, 2, 2488, 44601, 2438, 28, 9688, 198, 2, 30396, 329, 1702, 3...
2.333333
114
""" A module that defines the QLearning Agent for the pricing game as a class. Note that we have a numba version (for speed) which inherits everything from QLearningAgentBase. """ import numpy as np from numba import float64 from numba import int32 from numba import njit from numba.experimental import jitclass from ....
[ 37811, 198, 198, 32, 8265, 326, 15738, 262, 1195, 41730, 15906, 329, 262, 13045, 983, 355, 257, 1398, 13, 198, 6425, 326, 356, 423, 257, 997, 7012, 2196, 357, 1640, 2866, 8, 543, 10639, 896, 2279, 422, 198, 9711, 451, 768, 36772, 14...
2.707692
520
#!/usr/bin/python # with help from teleop_keyboard.py, # https://github.com/ros-teleop/teleop_twist_keyboard/blob/master/teleop_twist_keyboard.py # Graylin Trevor Jay and Austin Hendrix, BSD licensed import roslib; #roslib.load_manifest('teleop_move') import rospy from geometry_msgs.msg import Twist import sys, ...
[ 2, 48443, 14629, 14, 8800, 14, 29412, 198, 198, 2, 351, 1037, 422, 5735, 404, 62, 2539, 3526, 13, 9078, 11, 220, 198, 2, 220, 220, 3740, 1378, 12567, 13, 785, 14, 4951, 12, 46813, 404, 14, 46813, 404, 62, 4246, 396, 62, 2539, 35...
1.961538
338
""" File: shrink.py ame: Wilson Wang 2020/08/05 ------------------------------- Create a new "out" image half the width and height of the original. Set pixels at x=0 1 2 3 in out , from x=0 2 4 6 in original, and likewise in the y direction. """ from simpleimage import SimpleImage def shrink(filename): ...
[ 37811, 201, 198, 8979, 25, 22085, 13, 9078, 201, 198, 480, 25, 8127, 15233, 12131, 14, 2919, 14, 2713, 201, 198, 1783, 24305, 201, 198, 16447, 257, 649, 366, 448, 1, 2939, 2063, 262, 9647, 290, 6001, 286, 262, 2656, 13, 201, 198, ...
2.520194
619
""" show ip dhcp database show ip dhcp snooping database show ip dhcp snooping database detail """ # Python import re # Metaparser from genie.metaparser import MetaParser from genie.metaparser.util.schemaengine import (Schema, Any, Optional, Or, And, Default, Use) # Pa...
[ 37811, 198, 12860, 20966, 34590, 13155, 6831, 198, 12860, 20966, 34590, 13155, 3013, 11224, 278, 6831, 198, 12860, 20966, 34590, 13155, 3013, 11224, 278, 6831, 3703, 198, 37811, 198, 198, 2, 11361, 198, 11748, 302, 198, 198, 2, 3395, 499,...
3.821192
302
import os import sys import json import ipaddress import paramiko br=sys.argv[1] r=sys.argv[2] IP=sys.argv[3] func_createcont(br,r,IP)
[ 11748, 28686, 198, 11748, 25064, 198, 11748, 33918, 198, 11748, 20966, 21975, 198, 11748, 5772, 12125, 198, 198, 1671, 28, 17597, 13, 853, 85, 58, 16, 60, 198, 81, 28, 17597, 13, 853, 85, 58, 17, 60, 198, 4061, 28, 17597, 13, 853, ...
2.266667
60
### flaskr/__init__.py import os from flask import Flask from flask_sqlalchemy import SQLAlchemy db = SQLAlchemy()
[ 21017, 42903, 81, 14, 834, 15003, 834, 13, 9078, 198, 198, 11748, 28686, 198, 6738, 42903, 1330, 46947, 198, 6738, 42903, 62, 25410, 282, 26599, 1330, 16363, 2348, 26599, 198, 198, 9945, 796, 16363, 2348, 26599, 3419 ]
3.135135
37
import boto3 import time if __name__ == "__main__": ec2 = AwsEc2("", "") res = ec2.get_instance_by_resource('xxxxxx') for i in res: print(i.placement)
[ 11748, 275, 2069, 18, 198, 11748, 640, 628, 198, 198, 361, 11593, 3672, 834, 6624, 366, 834, 12417, 834, 1298, 198, 220, 220, 220, 9940, 17, 796, 5851, 82, 49136, 17, 7203, 1600, 366, 4943, 198, 220, 220, 220, 581, 796, 9940, 17, ...
2.185185
81
import control import speech_recognition as sr def recognize_speech_from_mic(recognizer, microphone): """Transcribe speech from recorded from `microphone`. Returns a dictionary with three keys: "success": a boolean indicating whether or not the API request was successful "error": `Non...
[ 11748, 1630, 198, 11748, 4046, 62, 26243, 653, 355, 19677, 198, 198, 4299, 7564, 62, 45862, 62, 6738, 62, 9383, 7, 26243, 7509, 11, 21822, 2599, 198, 220, 220, 220, 37227, 8291, 66, 4892, 4046, 422, 6264, 422, 4600, 24055, 4862, 44646...
2.756595
834
from .consts import * # Object matching by classid OBJECTS_CLSID_RULES = [ {'type' : RULETYPE_EQUAL, 'text' : 'clsid:D27CDB6E-AE6D-11cf-96B8-444553540000', 'entities' : [ {'name' : 'web:tech/flash'} ] }, {'type' : RULETYPE_EQUAL, 'text' : 'clsid:d27cdb6e-ae6d-11cf-96b8-44455354...
[ 6738, 764, 1102, 6448, 1330, 1635, 628, 198, 2, 9515, 12336, 416, 1398, 312, 198, 9864, 41, 2943, 4694, 62, 5097, 50, 2389, 62, 49, 6239, 1546, 796, 685, 198, 220, 220, 220, 1391, 6, 4906, 6, 1058, 371, 24212, 25216, 62, 36, 10917...
1.764968
3,808
# Why does this file exist, and why not put this in `__main__`? # # You might be tempted to import things from `__main__` later, # but that will cause problems: the code will get executed twice: # # - When you run `python -m failprint` python will execute # `__main__.py` as a script. That means there won't be any # ...
[ 2, 4162, 857, 428, 2393, 2152, 11, 290, 1521, 407, 1234, 428, 287, 4600, 834, 12417, 834, 63, 30, 198, 2, 198, 2, 921, 1244, 307, 26194, 284, 1330, 1243, 422, 4600, 834, 12417, 834, 63, 1568, 11, 198, 2, 475, 326, 481, 2728, 276...
2.681143
1,819
# -*- coding: utf-8 -*- # Copyright (c) 2020, RC and contributors # For license information, please see license.txt from __future__ import unicode_literals import frappe from frappe.model.document import Document
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 2, 15069, 357, 66, 8, 12131, 11, 13987, 290, 20420, 198, 2, 1114, 5964, 1321, 11, 3387, 766, 5964, 13, 14116, 198, 198, 6738, 11593, 37443, 834, 1330, 28000, 1098, 62,...
3.451613
62
# coding:utf-8 # author:MurphyWan # www.py """ controller.py/index.py from flask import Blueprint route_index = Blueprint('index_page', __name__) @route_index.route("/") def index(): return "Hello World" """ from application import app ''' ''' from web.interceptors.Authinterceptor import * ''' url ''' from ...
[ 2, 19617, 25, 40477, 12, 23, 198, 2, 1772, 25, 23830, 6883, 45681, 198, 2, 7324, 13, 9078, 198, 198, 37811, 10444, 13, 9078, 14, 9630, 13, 9078, 198, 6738, 42903, 1330, 39932, 198, 38629, 62, 9630, 796, 39932, 10786, 9630, 62, 7700,...
3.039506
405
# -------------- #Header files import pandas as pd import numpy as np import matplotlib.pyplot as plt #path of the data file- path data=pd.read_csv(path) data["Gender"].replace("-","Agender",inplace=True) gender_count=data.Gender.value_counts() gender_count.plot(kind="bar") #Code starts here # ---...
[ 2, 220, 26171, 198, 2, 39681, 3696, 201, 198, 11748, 19798, 292, 355, 279, 67, 201, 198, 11748, 299, 32152, 355, 45941, 201, 198, 11748, 2603, 29487, 8019, 13, 9078, 29487, 355, 458, 83, 201, 198, 201, 198, 201, 198, 2, 6978, 286, ...
2.373737
594
#!/usr/bin/env python3 #MIT License #Copyright (c) 2018 The University of Michigan #Permission is hereby granted, free of charge, to any person obtaining a copy #of this software and associated documentation files (the "Software"), to deal #in the Software without restriction, including without limitation the rights ...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 18, 198, 2, 36393, 13789, 198, 198, 2, 15269, 357, 66, 8, 2864, 383, 2059, 286, 7055, 198, 198, 2, 5990, 3411, 318, 29376, 7520, 11, 1479, 286, 3877, 11, 284, 597, 1048, 16727, 257, 486...
3.737952
332
# coding: utf-8 # In[35]: import matplotlib.pyplot as plt from pylab import * import numpy as np main_image=plt.figure(figsize=(10,10)) subplots_adjust(hspace=0.3,wspace=0.3)# #1- x_0=np.linspace(0,2*np.pi,20) #X sub_image_1=plt.subplot(2,2,1) plt.xlabel('X value') plt.ylabel('Sin value') plt.grid(True) sub_image...
[ 198, 2, 19617, 25, 3384, 69, 12, 23, 198, 198, 2, 554, 58, 2327, 5974, 628, 198, 11748, 2603, 29487, 8019, 13, 9078, 29487, 355, 458, 83, 198, 6738, 279, 2645, 397, 1330, 1635, 198, 11748, 299, 32152, 355, 45941, 198, 198, 12417, ...
2.092702
1,014
"""Generated class for event_audit.json""" from .common import Entry
[ 37811, 8645, 515, 1398, 329, 1785, 62, 3885, 270, 13, 17752, 37811, 198, 198, 6738, 764, 11321, 1330, 21617, 628 ]
3.55
20
#!/usr/bin/env python # -*- coding: utf-8 -*- """ RGB Colourspace Transformations =============================== Defines the *RGB* colourspace transformations: - :func:`XYZ_to_RGB` - :func:`RGB_to_XYZ` - :func:`RGB_to_RGB` See Also -------- `RGB Colourspaces IPython Notebook <http://nbviewer.ipython.org/gith...
[ 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, 36982, 38773, 13200, 26981, 602, 198, 4770, 25609, 18604, 198, 198, 7469, 1127, 262, 1635, 36982, 9, 9...
2.204743
3,458
from typing import List import pandas as pd import pytest from preprocessing.assign_folds import assign_folds testdata = [ [ [ "patient1", "patient2", "patient3", "patient4", "patient5", "patient6", "patient7", ...
[ 6738, 19720, 1330, 7343, 198, 198, 11748, 19798, 292, 355, 279, 67, 198, 11748, 12972, 9288, 198, 198, 6738, 662, 36948, 13, 562, 570, 62, 69, 10119, 1330, 8333, 62, 69, 10119, 198, 198, 9288, 7890, 796, 685, 198, 220, 220, 220, 685...
1.555556
558
from django.contrib.auth.models import User from django.db import models from apps.tags.models import Tag
[ 6738, 42625, 14208, 13, 3642, 822, 13, 18439, 13, 27530, 1330, 11787, 198, 6738, 42625, 14208, 13, 9945, 1330, 4981, 198, 198, 6738, 6725, 13, 31499, 13, 27530, 1330, 17467, 628 ]
3.483871
31
"""Tests for __main__.py.""" # import logging from unittest.mock import MagicMock, patch import pytest import viseron.__main__ def test_init(simple_config, mocked_viseron): """Test init.""" viseron.__main__.main() # viseron.__main__.LOGGER.info("testing") with patch.object(viseron.__main__, "main",...
[ 37811, 51, 3558, 329, 11593, 12417, 834, 13, 9078, 526, 15931, 198, 2, 1330, 18931, 198, 6738, 555, 715, 395, 13, 76, 735, 1330, 6139, 44, 735, 11, 8529, 198, 198, 11748, 12972, 9288, 198, 198, 11748, 1490, 263, 261, 13, 834, 12417,...
2.08137
467
# Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # d...
[ 2, 220, 220, 220, 49962, 739, 262, 24843, 13789, 11, 10628, 362, 13, 15, 357, 1169, 366, 34156, 15341, 345, 743, 198, 2, 220, 220, 220, 407, 779, 428, 2393, 2845, 287, 11846, 351, 262, 13789, 13, 921, 743, 7330, 198, 2, 220, 220, ...
1.919269
1,697
from flask import session, redirect, url_for from flask.json import jsonify from api import app, oauth from api import models
[ 6738, 42903, 1330, 6246, 11, 18941, 11, 19016, 62, 1640, 198, 6738, 42903, 13, 17752, 1330, 33918, 1958, 198, 6738, 40391, 1330, 598, 11, 267, 18439, 198, 6738, 40391, 1330, 4981, 628, 628, 198 ]
3.823529
34
if __name__ == '__main__': column_generator()
[ 198, 198, 361, 11593, 3672, 834, 6624, 705, 834, 12417, 834, 10354, 198, 220, 220, 220, 5721, 62, 8612, 1352, 3419, 198 ]
2.363636
22
# -*- coding: utf-8 -*- """ This file contains language-specific implementation for an Afrikaans voice. The idea is that this file contains subclassed Voice and Phoneset implementations. This package ttslab/voices may then also contain speaker specific implementations e.g. "afrikaans_SPEAKER.py" """ fr...
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 37811, 770, 2393, 4909, 3303, 12, 11423, 7822, 329, 281, 198, 220, 220, 220, 2483, 28716, 504, 3809, 13, 628, 220, 220, 220, 383, 2126, 318, 326, 428, 2393, 4909, 4761...
3.115044
226
#!/usr/bin/python # -*- coding: utf-8 -*- """ This module contains analysis done for the Ocean iodide (Oi!) project This includes presentation at conferences etc... """ import numpy as np import pandas as pd import sparse2spatial as s2s import sparse2spatial.utils as utils import matplotlib import matplotlib.pyplot...
[ 2, 48443, 14629, 14, 8800, 14, 29412, 198, 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 37811, 198, 198, 1212, 8265, 4909, 3781, 1760, 329, 262, 10692, 41080, 485, 357, 46, 72, 8133, 1628, 198, 198, 1212, 3407, 1...
2.032489
71,194
import pandas as pd from . import cashUtils as utils
[ 11748, 19798, 292, 355, 279, 67, 198, 6738, 764, 1330, 5003, 18274, 4487, 355, 3384, 4487, 628, 628 ]
3.111111
18
from distutils.core import Extension, setup from Cython.Build import cythonize from Cython.Compiler import Options Options.docstrings = False ext = Extension(name="cyt_module", sources=["cyt_module.pyx"]) setup( ext_modules = cythonize(ext), )
[ 6738, 1233, 26791, 13, 7295, 1330, 27995, 11, 9058, 198, 198, 6738, 327, 7535, 13, 15580, 1330, 3075, 400, 261, 1096, 198, 6738, 327, 7535, 13, 7293, 5329, 1330, 18634, 198, 198, 29046, 13, 15390, 37336, 796, 10352, 198, 198, 2302, 79...
2.976471
85
from flask import request, url_for from flask_api import FlaskAPI, status, exceptions from flask_cors import CORS, cross_origin import torch import json import numpy as np import torch from modeling_gptneo import GPTNeoForCausalLM from modeling_gpt2 import GPT2LMHeadModel from transformers import ( GPTNeoConfig...
[ 6738, 42903, 1330, 2581, 11, 19016, 62, 1640, 198, 6738, 42903, 62, 15042, 1330, 46947, 17614, 11, 3722, 11, 13269, 198, 6738, 42903, 62, 66, 669, 1330, 327, 20673, 11, 3272, 62, 47103, 198, 11748, 28034, 198, 11748, 33918, 198, 198, ...
1.915305
8,017
""" post_bands: post_bands extract data from static-o_DS3_EBANDS.agr and it will build the kpoints length: xcoord_k from the high symmetry line and the corresponding basis for reciprocal space. b1 = 1 / a1, b2 = 1 / a2 and b3 = 1 / a3. """ import os import numpy as np import matplotlib.pypl...
[ 37811, 201, 198, 7353, 62, 21397, 25, 201, 198, 220, 220, 220, 1281, 62, 21397, 7925, 1366, 422, 9037, 12, 78, 62, 5258, 18, 62, 30195, 1565, 5258, 13, 363, 81, 290, 340, 481, 1382, 201, 198, 220, 220, 220, 262, 479, 13033, 4129, ...
2.585938
128
import logging import logging.config logging.config.fileConfig('./instance/logging.conf') # create logger logger = logging.getLogger('Cognitive-API') # 'application' code ''' logger.debug('debug message') logger.info('info message') logger.warning('warn message') logger.error('error message') logger.critical('criti...
[ 198, 11748, 18931, 198, 11748, 18931, 13, 11250, 198, 198, 6404, 2667, 13, 11250, 13, 7753, 16934, 7, 4458, 14, 39098, 14, 6404, 2667, 13, 10414, 11537, 198, 198, 2, 2251, 49706, 198, 6404, 1362, 796, 18931, 13, 1136, 11187, 1362, 107...
3.209524
105
import json import unittest from buter.app.services import load_from_file, detect_app_name from buter.server import docker from buter.util.Utils import unzip from config import getConfig if __name__ == '__main__': unittest.main()
[ 11748, 33918, 198, 11748, 555, 715, 395, 198, 198, 6738, 475, 263, 13, 1324, 13, 30416, 1330, 3440, 62, 6738, 62, 7753, 11, 4886, 62, 1324, 62, 3672, 198, 6738, 475, 263, 13, 15388, 1330, 36253, 198, 6738, 475, 263, 13, 22602, 13, ...
3.051282
78
# -*-coding:utf-8-*- __author__ = 'Mason' import re import zipfile z = zipfile.ZipFile('channel.zip', mode='r') number = '90052' comments = [] while True: text = z.read(number + '.txt') number = re.findall('([0-9]+)', text) print number try: number = number[0] comments.append(z.getinfo...
[ 2, 532, 9, 12, 66, 7656, 25, 40477, 12, 23, 12, 9, 12, 198, 834, 9800, 834, 796, 705, 44, 888, 6, 198, 198, 11748, 302, 198, 11748, 19974, 7753, 198, 198, 89, 796, 19974, 7753, 13, 41729, 8979, 10786, 17620, 13, 13344, 3256, 423...
2.30814
172
from products.product import Product from notifications.notification import Notification from clients.client import Client
[ 6738, 3186, 13, 11167, 1330, 8721, 198, 6738, 19605, 13, 1662, 2649, 1330, 42808, 198, 6738, 7534, 13, 16366, 1330, 20985, 628 ]
5.636364
22
# https://atcoder.jp/contests/joi2008yo/tasks/joi2008yo_e R, C = list(map(int, input().split())) senbei_pos = [] ans = 0 for _ in range(R): pos = list(map(int, input().split())) senbei_pos.append(pos) for bit in range(2**R): total = 0 copied_pos = senbei_pos[:] # R101020 flip_row_pos = list(for...
[ 2, 3740, 1378, 265, 66, 12342, 13, 34523, 14, 3642, 3558, 14, 7639, 72, 11528, 8226, 14, 83, 6791, 14, 7639, 72, 11528, 8226, 62, 68, 198, 49, 11, 327, 796, 1351, 7, 8899, 7, 600, 11, 5128, 22446, 35312, 3419, 4008, 198, 6248, 1...
2.041935
310
#!/usr/env python3 import requests import os import glob import telegram from time import sleep token = "token" bot = telegram.Bot(token=token) # , bash youtube-dl -x --audio-format mp3 <link>, mp3 mp3_bot = BotHandler(token) if __name__ == '__main__': try: main() except KeyboardInter...
[ 2, 48443, 14629, 14, 24330, 21015, 18, 198, 11748, 7007, 198, 11748, 28686, 198, 11748, 15095, 198, 11748, 573, 30536, 198, 6738, 640, 1330, 3993, 198, 30001, 796, 366, 30001, 1, 198, 13645, 796, 573, 30536, 13, 20630, 7, 30001, 28, 3...
2.435714
140
#!/usr/bin/python # ex:set fileencoding=utf-8: from __future__ import unicode_literals from djangobmf.views import ModuleCreateView from djangobmf.views import ModuleUpdateView from djangobmf.views import ModuleDetailView from .forms import BMFTeamUpdateForm from .forms import BMFTeamCreateForm
[ 2, 48443, 14629, 14, 8800, 14, 29412, 198, 2, 409, 25, 2617, 2393, 12685, 7656, 28, 40477, 12, 23, 25, 198, 198, 6738, 11593, 37443, 834, 1330, 28000, 1098, 62, 17201, 874, 198, 198, 6738, 42625, 648, 672, 76, 69, 13, 33571, 1330, ...
3.145833
96
from __future__ import division, print_function import sys, os, glob, time, warnings, gc # import matplotlib.pyplot as plt import numpy as np from astropy.table import Table, vstack, hstack import fitsio from astropy.io import fits from scipy.interpolate import interp1d output_path = '/global/cfs/cdirs/desi/users/ro...
[ 6738, 11593, 37443, 834, 1330, 7297, 11, 3601, 62, 8818, 198, 11748, 25064, 11, 28686, 11, 15095, 11, 640, 11, 14601, 11, 308, 66, 198, 2, 1330, 2603, 29487, 8019, 13, 9078, 29487, 355, 458, 83, 198, 11748, 299, 32152, 355, 45941, 1...
2.199153
472
import telepot # No criei um bot no telegram ainda, dessa forma este codigo no funciona # TODO: Criar bot no telegram e pegar chave bot = telepot.Bot("Aqui vai minha chave do Telegram") bot.message_loop(recebendoMsg) while True: pass
[ 11748, 5735, 13059, 198, 198, 2, 1400, 269, 5034, 72, 23781, 10214, 645, 573, 30536, 257, 22261, 11, 288, 21411, 1296, 64, 43577, 14873, 14031, 645, 25439, 32792, 198, 2, 16926, 46, 25, 327, 380, 283, 10214, 645, 573, 30536, 304, 613,...
2.677778
90
# Support for english (EN) language helper_commands = { "AUTHORIZE": "Usage:\n/authorize @<username>\n/authorize <user id>", "DEAUTHORIZE": "Usage:\n/deauthorize @<username>\n/deauthorize <user id>", "GIVEN": "Usage:\n/given <amount> @<username> <description>", "SPENT": "Usage:\n/spent <amount> <description>.\nPay...
[ 2, 7929, 329, 46932, 357, 1677, 8, 3303, 198, 198, 2978, 525, 62, 9503, 1746, 796, 1391, 198, 197, 1, 32, 24318, 1581, 35400, 1298, 366, 28350, 7479, 77, 14, 9800, 1096, 2488, 27, 29460, 29, 59, 77, 14, 9800, 1096, 1279, 7220, 468...
2.660725
1,683