content
stringlengths
1
1.04M
input_ids
listlengths
1
774k
ratio_char_token
float64
0.38
22.9
token_count
int64
1
774k
import typing import tempfile class FileHelper: '''Context manager to use files in pulzar '''
[ 11748, 19720, 198, 11748, 20218, 7753, 198, 198, 4871, 9220, 47429, 25, 198, 220, 220, 220, 705, 7061, 21947, 4706, 284, 779, 3696, 287, 17472, 41046, 198, 220, 220, 220, 705, 7061 ]
3.1875
32
from tkinter import * #--------------- main window -------------- root = Tk() root.title("colorv2") root.resizable(0,0) #------------------ variables ------------------------- vsr = IntVar() vsg = IntVar() vsb = IntVar() mainrgb = StringVar() mainrgb.set("#000000") bgr = "red" bgg = "green" bgb = "blue" don = StringVa...
[ 6738, 256, 74, 3849, 1330, 1635, 198, 2, 24305, 1388, 4324, 220, 26171, 198, 15763, 796, 309, 74, 3419, 198, 15763, 13, 7839, 7203, 8043, 85, 17, 4943, 198, 15763, 13, 411, 13821, 7, 15, 11, 15, 8, 198, 198, 2, 1783, 438, 9633, ...
2.782041
1,225
from django.core import validators from django.db import models from testing.validators import contains_only_digits_validator
[ 6738, 42625, 14208, 13, 7295, 1330, 4938, 2024, 201, 198, 6738, 42625, 14208, 13, 9945, 1330, 4981, 201, 198, 201, 198, 6738, 4856, 13, 12102, 2024, 1330, 4909, 62, 8807, 62, 12894, 896, 62, 12102, 1352, 201, 198, 201, 198 ]
3.325
40
import json import os import zlib import requests from base45 import b45decode import cwt from cwt import load_pem_hcert_dsc # An endpoint of Digital Green Certificate Verifier Service compliant with: # https://eu-digital-green-certificates.github.io/dgca-verifier-service/ BASE_URL = os.environ["CWT_SAMPLES_EUDCC_...
[ 11748, 33918, 198, 11748, 28686, 198, 11748, 1976, 8019, 198, 198, 11748, 7007, 198, 6738, 2779, 2231, 1330, 275, 2231, 12501, 1098, 198, 198, 11748, 269, 46569, 198, 6738, 269, 46569, 1330, 3440, 62, 79, 368, 62, 71, 22583, 62, 67, 1...
1.839117
1,268
#!/usr/bin/python import bn256 """ Demonstrate the bn256 module using the BLS short signature scheme """ test()
[ 2, 48443, 14629, 14, 8800, 14, 29412, 198, 198, 11748, 275, 77, 11645, 198, 198, 37811, 198, 35477, 23104, 262, 275, 77, 11645, 8265, 1262, 262, 347, 6561, 1790, 9877, 7791, 198, 37811, 198, 198, 9288, 3419, 628 ]
3.052632
38
import numpy as np import matplotlib.pyplot as plt import networkx as nx palette = {"node_color":"#36558F", "edge_color":"#40376E", "font_color":"#000000", "face_color":"#96ACB7"} plt.figure(figsize=(16,16)) ax = plt.axes() ax.set_facecolor(palette["face_color"]) def read_csv(file_name="actors.csv"): """Take an a...
[ 11748, 299, 32152, 355, 45941, 198, 11748, 2603, 29487, 8019, 13, 9078, 29487, 355, 458, 83, 198, 11748, 3127, 87, 355, 299, 87, 198, 198, 18596, 5857, 796, 19779, 17440, 62, 8043, 2404, 2, 2623, 40486, 37, 1600, 366, 14907, 62, 8043,...
2.49536
862
from io import BytesIO, TextIOWrapper from pathlib import Path from time import time from typing import Union, TextIO, List from lzma import compress, decompress import PIL.Image import discord from core.abc.fileSystem import AbstractFileSystem, AbstractFile, openingReadMode, openingWriteMode, AbstractFolder, fileTy...
[ 6738, 33245, 1330, 2750, 4879, 9399, 11, 220, 8255, 40, 3913, 430, 2848, 198, 6738, 3108, 8019, 1330, 10644, 198, 6738, 640, 1330, 640, 198, 6738, 19720, 1330, 4479, 11, 8255, 9399, 11, 7343, 198, 6738, 300, 89, 2611, 1330, 27413, 11,...
2.876354
2,677
import re # ============================================================================= # A regex used for fixing pin names RE_PIN_NAME = re.compile(r"^([A-Za-z0-9_]+)(?:\[([0-9]+)\])?$") # ============================================================================= def get_pin_name(name): """ Returns t...
[ 11748, 302, 198, 198, 2, 38093, 25609, 198, 198, 2, 317, 40364, 973, 329, 18682, 6757, 3891, 198, 2200, 62, 44032, 62, 20608, 796, 302, 13, 5589, 576, 7, 81, 1, 61, 26933, 32, 12, 57, 64, 12, 89, 15, 12, 24, 62, 48688, 5769, 3...
2.682612
1,317
""" Django settings for {{ cookiecutter.project_name }} project. For more information on this file, see https://docs.djangoproject.com/en/1.10/topics/settings/ For the full list of settings and their values, see https://docs.djangoproject.com/en/1.10/ref/settings/ """ import os # Build paths inside the project like...
[ 37811, 198, 35, 73, 14208, 6460, 329, 22935, 19751, 8968, 353, 13, 16302, 62, 3672, 34949, 1628, 13, 198, 198, 1890, 517, 1321, 319, 428, 2393, 11, 766, 198, 5450, 1378, 31628, 13, 28241, 648, 404, 305, 752, 13, 785, 14, 268, 14, ...
2.589266
1,770
import gzip import shutil DIRECTORY_IN = 'wiki-en-processed/articles/' DIRECTORY_OUT = 'wiki-en-processed/articles-compressed/' for i in range(508): file = '{:06}'.format(i) print('[*] Starting to compress', DIRECTORY_IN + file + '.json') with open(DIRECTORY_IN + file + '.json', 'rb') as fileIn, gzip.op...
[ 11748, 308, 13344, 198, 11748, 4423, 346, 198, 198, 17931, 23988, 15513, 62, 1268, 796, 705, 15466, 12, 268, 12, 14681, 276, 14, 26845, 14, 6, 198, 17931, 23988, 15513, 62, 12425, 796, 705, 15466, 12, 268, 12, 14681, 276, 14, 26845, ...
2.524691
162
numero1 = int(input('Digite primeiro número ')) numero2 = int(input('Digite segundo número ')) print('A soma é', numero1 + numero2)
[ 22510, 3529, 16, 796, 493, 7, 15414, 10786, 19511, 578, 6994, 7058, 299, 21356, 647, 78, 705, 4008, 198, 22510, 3529, 17, 796, 493, 7, 15414, 10786, 19511, 578, 384, 70, 41204, 299, 21356, 647, 78, 705, 4008, 198, 4798, 10786, 32, 3...
2.4
55
"""Repository module for ready.""" import logging from os import environ as env from typing import Any from dotenv import load_dotenv from flask import make_response, Response from flask_restful import Resource import requests # Get environment load_dotenv() FUSEKI_HOST_URL = env.get("FUSEKI_HOST_URL", "http://fuseki...
[ 37811, 6207, 13264, 8265, 329, 3492, 526, 15931, 198, 11748, 18931, 198, 6738, 28686, 1330, 551, 2268, 355, 17365, 198, 6738, 19720, 1330, 4377, 198, 198, 6738, 16605, 24330, 1330, 3440, 62, 26518, 24330, 198, 6738, 42903, 1330, 787, 62, ...
2.410526
380
# ECRYPT BY Boy HamzaH # Subscribe Cok Chanel YouTube Gua Anjing # Dan Jangan Lupa Follow Github Gua exec((lambda _____, ______ : ______(eval((lambda ____,__,_ : ____.join([_(___) for ___ in __]))('',[95, 95, 105, 109, 112, 111, 114, 116, 95, 95, 40, 34, 98, 97, 115, 101, 54, 52, 34, 41, 46, 98, 51, 50, 100, 101, 99, 1...
[ 2, 412, 9419, 56, 11571, 11050, 6387, 4345, 4496, 39, 198, 2, 19808, 327, 482, 18704, 417, 7444, 1962, 64, 1052, 49940, 198, 2, 6035, 449, 37089, 32244, 64, 7281, 38994, 1962, 64, 198, 18558, 19510, 50033, 220, 29343, 11, 44435, 1058,...
1.506105
18,429
from rest_framework import viewsets, status from rest_framework.response import Response from crowdsourcing.serializers.template import *
[ 6738, 1334, 62, 30604, 1330, 5009, 1039, 11, 3722, 198, 6738, 1334, 62, 30604, 13, 26209, 1330, 18261, 198, 198, 6738, 15779, 29985, 13, 46911, 11341, 13, 28243, 1330, 1635, 628, 628 ]
4.4375
32
# Test budgetanly import budgeting import budgetanly # Create a new project proj = budgeting.Project('Test project','USD') # Make a checking account proj.acctmake('checking') # Add 500 dollars proj.income('checking',2000,(2016,11,1)) # Make a rent budget proj.bdgtmake('rent') # Put 300 dollars in proj.add('rent',10...
[ 2, 6208, 4466, 272, 306, 198, 198, 11748, 4466, 278, 198, 11748, 4466, 272, 306, 198, 198, 2, 13610, 257, 649, 1628, 198, 1676, 73, 796, 4466, 278, 13, 16775, 10786, 14402, 1628, 41707, 29072, 11537, 198, 198, 2, 6889, 257, 10627, 1...
2.685131
343
#!/usr/bin/env python import numpy as np import nibabel as nib from dipy.segment.mask import median_otsu import sys finput = sys.argv[1] foutput = sys.argv[2] print "Input: " + finput print "Output: " + foutput img = nib.load(finput) data = np.squeeze(img.get_data()) b0_mask, mask = median_otsu(data, 2, 1) mask_img...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 198, 11748, 299, 32152, 355, 45941, 198, 11748, 33272, 9608, 355, 33272, 198, 6738, 19550, 88, 13, 325, 5154, 13, 27932, 1330, 14288, 62, 1747, 84, 198, 11748, 25064, 198, 198, 69, 154...
2.292576
229
import torch # todo more careful check GPU_ENABLED = True if torch.cuda.is_available(): try: _ = torch.Tensor([0.0, 0.0]).cuda() torch.set_default_tensor_type("torch.cuda.FloatTensor") print("gpu available") GPU_ENABLED = True except: print("gpu not available") G...
[ 11748, 28034, 198, 198, 2, 284, 4598, 517, 8161, 2198, 198, 33346, 62, 1677, 6242, 30465, 796, 6407, 198, 361, 28034, 13, 66, 15339, 13, 271, 62, 15182, 33529, 198, 220, 220, 220, 1949, 25, 198, 220, 220, 220, 220, 220, 220, 220, ...
2.247191
178
"""Minimal flask app""" from flask import Flask, render_template import requests from openaq import OpenAQ from decouple import config from flask_sqlalchemy import SQLAlchemy APP = Flask(__name__) APP.config['SQLALCHEMY_DATABASE_URI'] = 'sqlite:///db.sqlite3' DB = SQLAlchemy(APP) api = OpenAQ() def make_list(): ...
[ 37811, 9452, 4402, 42903, 598, 37811, 198, 198, 6738, 42903, 1330, 46947, 11, 8543, 62, 28243, 198, 11748, 7007, 198, 6738, 1280, 30188, 1330, 4946, 32, 48, 198, 6738, 875, 43846, 1330, 4566, 198, 6738, 42903, 62, 25410, 282, 26599, 133...
2.688755
498
from __future__ import absolute_import, division, print_function # LIBTBX_SET_DISPATCHER_NAME mmtbx.pdb_statistics # LIBTBX_PRE_DISPATCHER_INCLUDE_SH export PHENIX_GUI_ENVIRONMENT=1 # LIBTBX_PRE_DISPATCHER_INCLUDE_SH export BOOST_ADAPTBX_FPE_DEFAULT=1 from wxtbx.polygon_db_viewer import ConfigFrame import wx if (__na...
[ 6738, 11593, 37443, 834, 1330, 4112, 62, 11748, 11, 7297, 11, 3601, 62, 8818, 198, 2, 45651, 22737, 55, 62, 28480, 62, 26288, 47, 11417, 1137, 62, 20608, 8085, 83, 65, 87, 13, 79, 9945, 62, 14269, 3969, 198, 2, 45651, 22737, 55, 6...
2.424084
191
# -*- coding: utf-8 -*- # @Author : surfer # @email : surfer@canway.net # @Time : 2020/5/15 15:52 # @file : cmdb_help.py import requests from config import APP_ID, APP_TOKEN, BK_PAAS_HOST import json # print get_biz_id('蓝鲸') # print get_bk_set_id(u'蓝鲸', 'mysql')
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 2, 2488, 13838, 220, 1058, 969, 2232, 198, 2, 2488, 12888, 220, 220, 1058, 969, 2232, 31, 5171, 1014, 13, 3262, 198, 2, 2488, 7575, 220, 220, 220, 1058, 12131, 14, 2...
2.014388
139
import autograd.scipy.special as special import autograd.numpy as np import wh, wp import util import gtilde from scipy.integrate import quad from scipy.stats import multivariate_normal from autograd import primitive import matplotlib.pyplot as plt __nugget_scalar = 1e-7 __nugget = lambda n: __nugget_scalar * np.eye(n)...
[ 11748, 1960, 519, 6335, 13, 1416, 541, 88, 13, 20887, 355, 2041, 198, 11748, 1960, 519, 6335, 13, 77, 32152, 355, 45941, 198, 11748, 348, 11, 266, 79, 198, 11748, 7736, 198, 11748, 308, 83, 44725, 198, 6738, 629, 541, 88, 13, 18908,...
1.942158
2,697
# encoding: utf-8 #----------------------------------------------------------------------------- # Copyright (C) Jupyter Development Team # # Distributed under the terms of the BSD License. The full license is in # the file COPYING, distributed as part of this software. #--------------------------------------------...
[ 2, 21004, 25, 3384, 69, 12, 23, 198, 2, 10097, 32501, 198, 2, 220, 15069, 357, 34, 8, 449, 929, 88, 353, 7712, 4816, 198, 2, 198, 2, 220, 4307, 6169, 739, 262, 2846, 286, 262, 347, 10305, 13789, 13, 220, 383, 1336, 5964, 318, ...
4.068702
131
from gym_sweden.envs.swedenworld_env import SwedenWorldEnv
[ 6738, 11550, 62, 2032, 31829, 13, 268, 14259, 13, 2032, 31829, 6894, 62, 24330, 1330, 10710, 10603, 4834, 85 ]
3.052632
19
#!/usr/bin/env python from __future__ import print_function import sys from collections import defaultdict import gflags as flags FLAGS = flags.FLAGS sys.setrecursionlimit(20000) flags.DEFINE_string("train", "data/joint/shuffle.train.txt", "training data") flags.DEFINE_string("test", "data/join...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 198, 6738, 11593, 37443, 834, 1330, 3601, 62, 8818, 198, 198, 11748, 25064, 198, 6738, 17268, 1330, 4277, 11600, 198, 198, 11748, 308, 33152, 355, 9701, 198, 38948, 50, 796, 9701, 13, ...
2.445736
516
from onnx_darknet.handlers.frontend_handler import FrontendHandler from onnx_darknet.handlers.handler import onnx_op from onnx_darknet.handlers.handler import darknet_op from .math_mixin import ArithmeticMixin @onnx_op("Div") @darknet_op("RealDiv")
[ 6738, 319, 77, 87, 62, 21953, 3262, 13, 4993, 8116, 13, 8534, 437, 62, 30281, 1330, 8880, 437, 25060, 198, 6738, 319, 77, 87, 62, 21953, 3262, 13, 4993, 8116, 13, 30281, 1330, 319, 77, 87, 62, 404, 198, 6738, 319, 77, 87, 62, 21...
2.788889
90
# pangadfs-pydfsoptimizer/app/app.py # -*- coding: utf-8 -*- # Copyright (C) 2020 Eric Truett # Licensed under the Apache 2.0 License import json import logging from pangadfs.ga import GeneticAlgorithm from pangadfs.misc import diversity from pathlib import Path import numpy as np from stevedore.driver ...
[ 2, 279, 648, 324, 9501, 12, 79, 5173, 9501, 40085, 7509, 14, 1324, 14, 1324, 13, 9078, 201, 198, 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 201, 198, 2, 15069, 357, 34, 8, 12131, 7651, 13616, 3087, 201, 198, 2, ...
2.543699
2,071
import logging from kubernetes.client.rest import ApiException from piqe_ocp_lib import __loggername__ from piqe_ocp_lib.api.resources.ocp_base import OcpBase logger = logging.getLogger(__loggername__) """ Both openshift Pipeline and PipelineRun object requires openshift-pipeline operator to be install. It is not i...
[ 11748, 18931, 198, 198, 6738, 479, 18478, 3262, 274, 13, 16366, 13, 2118, 1330, 5949, 72, 16922, 198, 198, 6738, 279, 25011, 68, 62, 420, 79, 62, 8019, 1330, 11593, 6404, 70, 13292, 834, 198, 6738, 279, 25011, 68, 62, 420, 79, 62, ...
2.429563
3,457
import os from settings import LOCACOES_PATH, CONTRATOS_PATH, CONVENIOS_PATH, DB_PATH IGNORE_LIST = ['__init__.py', 'santos-transparencia.py', 'settings.py'] if __name__ == '__main__': files = os.listdir('.') modulos = ['Contratos', 'Convênios', 'Locações'] files = [f for f in files if '.py' in f and ...
[ 11748, 28686, 198, 6738, 6460, 1330, 37347, 2246, 46, 1546, 62, 34219, 11, 27342, 1404, 2640, 62, 34219, 11, 7102, 28290, 40, 2640, 62, 34219, 11, 20137, 62, 34219, 628, 198, 16284, 6965, 62, 45849, 796, 37250, 834, 15003, 834, 13, 90...
2.312757
243
from zope.interface import classProvides from twisted.plugin import IPlugin from axiom.attributes import integer, inmemory from axiom.item import Item from eridanus import util as eutil from eridanus.ieridanus import IEridanusPluginProvider from eridanus.plugin import Plugin, usage, rest from eridanusstd import urb...
[ 6738, 1976, 3008, 13, 39994, 1330, 1398, 15946, 1460, 198, 198, 6738, 19074, 13, 33803, 1330, 314, 37233, 198, 198, 6738, 7877, 29005, 13, 1078, 7657, 1330, 18253, 11, 287, 31673, 198, 6738, 7877, 29005, 13, 9186, 1330, 9097, 198, 198, ...
2.722628
411
import os from typing import Protocol from aws_cdk import core as cdk from aws_cdk import aws_ecs as ecs from aws_cdk import aws_ec2 as ec2 from aws_cdk import aws_iam as iam from aws_cdk import aws_rds as rds from aws_cdk import aws_dynamodb as dynamodb from aws_cdk.aws_elasticloadbalancing import LoadBalancer, LoadB...
[ 11748, 28686, 198, 6738, 19720, 1330, 20497, 198, 198, 6738, 3253, 82, 62, 10210, 74, 1330, 4755, 355, 22927, 74, 198, 6738, 3253, 82, 62, 10210, 74, 1330, 3253, 82, 62, 721, 82, 355, 304, 6359, 198, 6738, 3253, 82, 62, 10210, 74, ...
3.171296
216
import os from flask import Flask, request, make_response, jsonify, render_template from flask_cors import CORS from utilities import wakati app = Flask(__name__, static_folder="client/static", template_folder="client/static/public") CORS(app) #Cross Origin Resource Sharing @app...
[ 11748, 28686, 198, 6738, 42903, 1330, 46947, 11, 2581, 11, 787, 62, 26209, 11, 33918, 1958, 11, 8543, 62, 28243, 198, 6738, 42903, 62, 66, 669, 1330, 327, 20673, 198, 6738, 20081, 1330, 266, 461, 7246, 198, 198, 1324, 796, 46947, 7, ...
2.487562
201
S = input() print(S[:3])
[ 50, 796, 5128, 3419, 198, 4798, 7, 50, 58, 25, 18, 12962, 198 ]
1.923077
13
"""Simple power transformation classes.""" # pylint: disable=unused-variable from ..numerical_libs import sync_numerical_libs, xp # TODO this could be better organized... @sync_numerical_libs def yeojohnson(y, lam): """Yeo-Johnson tranform, batched in the first dimension.""" y_in = y.astype(xp.float64) ...
[ 37811, 26437, 1176, 13389, 6097, 526, 15931, 198, 2, 279, 2645, 600, 25, 15560, 28, 403, 1484, 12, 45286, 198, 198, 6738, 11485, 77, 6975, 605, 62, 8019, 82, 1330, 17510, 62, 77, 6975, 605, 62, 8019, 82, 11, 36470, 198, 198, 2, 16...
2.122623
2,577
import types from sqlalchemy import Column, String, BigInteger, Integer, DateTime, ForeignKey, Sequence from sqlalchemy.orm import relationship, backref import datetime from ..BaseModel import BaseModel
[ 11748, 3858, 198, 6738, 44161, 282, 26599, 1330, 29201, 11, 10903, 11, 4403, 46541, 11, 34142, 11, 7536, 7575, 11, 8708, 9218, 11, 45835, 198, 6738, 44161, 282, 26599, 13, 579, 1330, 2776, 11, 736, 5420, 198, 11748, 4818, 8079, 198, 1...
4.08
50
#!/usr/bin/env python # -*- coding: utf-8 -*- """ Tests of the matplotib plotting functions """ import pytest # prevent issue with not having a display on travis-ci # this needs to go *before* pyplot imports import matplotlib matplotlib.use('Agg') from matplotlib.pyplot import gcf import matplotlib.pyplot as plt d...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 37811, 198, 51, 3558, 286, 262, 2603, 29487, 571, 29353, 5499, 198, 37811, 198, 198, 11748, 12972, 9288, 198, 198, 2, ...
1.801166
17,668
__all__ = [ 'DTM', ] from .model import DTM
[ 198, 834, 439, 834, 796, 685, 198, 220, 220, 220, 705, 35, 15972, 3256, 198, 60, 628, 198, 6738, 764, 19849, 1330, 360, 15972, 628 ]
2.08
25
# -*- coding: utf-8 -*- # Author: Tao Hu <taohu620@gmail.com> import os import torch import torch.nn as nn import torch.optim as optim import torch.nn.init as init import argparse from torch.autograd import Variable import torch.utils.data as data from layers.modules import MultiBoxLoss from tqdm import tqdm from pyto...
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 2, 6434, 25, 32120, 11256, 1279, 8326, 1219, 84, 38850, 31, 14816, 13, 785, 29, 198, 198, 11748, 28686, 198, 11748, 28034, 198, 11748, 28034, 13, 20471, 355, 299, 77, ...
2.608573
1,423
print("hola!") """ Este es un comentario de mas de una linea pense que te podria interesar... """ print("Los comentarios con \"\"\" Son mejores que los cochinos comentarios con #!")
[ 4798, 7203, 3937, 64, 2474, 8, 628, 198, 37811, 198, 198, 36, 4169, 1658, 555, 401, 298, 4982, 220, 198, 2934, 12422, 390, 555, 64, 1627, 64, 198, 79, 1072, 8358, 573, 24573, 7496, 493, 68, 411, 283, 986, 198, 198, 37811, 198, 198...
2.661972
71
""" This file tests the epoll() implementation. Target files: - libdesock/src/epoll.c """ import os import ctypes import random import helper import desock
[ 37811, 198, 1212, 2393, 5254, 262, 2462, 692, 3419, 7822, 13, 198, 198, 21745, 3696, 25, 198, 220, 220, 220, 532, 9195, 8906, 735, 14, 10677, 14, 538, 692, 13, 66, 198, 37811, 198, 198, 11748, 28686, 198, 11748, 269, 19199, 198, 117...
3.075472
53
import utils.VisualizeNN as VisNN from sklearn.neural_network import MLPClassifier import numpy as np if __name__ == "__main__": training_set_inputs = np.array([[0, 0, 1], [0, 1, 1], [1, 0, 1], [0, 1, 0], [1, 0, 0], [1, 1, 1], [0, 0, 0]]) training_set_outputs = np.array([[0, 1, 1, 1, 1, 0, 0]]).T X = train...
[ 11748, 3384, 4487, 13, 36259, 1096, 6144, 355, 6911, 6144, 198, 6738, 1341, 35720, 13, 710, 1523, 62, 27349, 1330, 10373, 47, 9487, 7483, 198, 11748, 299, 32152, 355, 45941, 198, 198, 361, 11593, 3672, 834, 6624, 366, 834, 12417, 834, ...
2.446629
356
import json import re from django.core import mail from django.test import TestCase from registration.models import RegistrationProfile from rest_framework import status from bluebottle.test.factory_models.accounts import BlueBottleUserFactory class UserApiIntegrationTest(TestCase): """ Integration tests f...
[ 11748, 33918, 198, 11748, 302, 198, 198, 6738, 42625, 14208, 13, 7295, 1330, 6920, 198, 6738, 42625, 14208, 13, 9288, 1330, 6208, 20448, 198, 198, 6738, 9352, 13, 27530, 1330, 24610, 37046, 198, 6738, 1334, 62, 30604, 1330, 3722, 198, 1...
2.438701
2,186
import plotly import plotly.express as px import plotly.graph_objects as go import dash import dash_table import dash_core_components as dcc import dash_html_components as html from dash.dependencies import Input,Output,State from dash.exceptions import PreventUpdate import os import json import urllib import requ...
[ 11748, 7110, 306, 198, 11748, 7110, 306, 13, 42712, 355, 279, 87, 198, 11748, 7110, 306, 13, 34960, 62, 48205, 355, 467, 198, 198, 11748, 14470, 198, 11748, 14470, 62, 11487, 198, 11748, 14470, 62, 7295, 62, 5589, 3906, 355, 288, 535,...
2.136706
4,645
############################################################################## # # Below code is based on # https://github.com/YuliangXiu/PoseFlow # -------------------------------------------------------- # PoseFlow: Efficient Online Pose Tracking (BMVC'18) (https://arxiv.org/abs/1802.00977) # Credits: Xiu, Yuliang an...
[ 29113, 29113, 7804, 4242, 2235, 198, 2, 198, 2, 10383, 2438, 318, 1912, 319, 198, 2, 3740, 1378, 12567, 13, 785, 14, 56, 377, 15483, 55, 16115, 14, 47, 577, 37535, 198, 2, 20368, 22369, 198, 2, 37557, 37535, 25, 412, 5632, 7467, 3...
3.943709
302
import os import sys import pytest from montreal_forced_aligner.command_line.mfa import parser from montreal_forced_aligner.command_line.train_lm import run_train_lm
[ 11748, 28686, 198, 11748, 25064, 198, 198, 11748, 12972, 9288, 198, 198, 6738, 40689, 5305, 62, 12072, 62, 31494, 263, 13, 21812, 62, 1370, 13, 76, 13331, 1330, 30751, 198, 6738, 40689, 5305, 62, 12072, 62, 31494, 263, 13, 21812, 62, ...
3.053571
56
from sqlalchemy import Binary, Column, Integer, String, DateTime from sqlalchemy.dialects.mysql import TINYINT, MEDIUMTEXT from app import db, login_manager
[ 6738, 44161, 282, 26599, 1330, 45755, 11, 29201, 11, 34142, 11, 10903, 11, 7536, 7575, 198, 6738, 44161, 282, 26599, 13, 38969, 478, 82, 13, 28744, 13976, 1330, 309, 1268, 56, 12394, 11, 26112, 41796, 32541, 198, 198, 6738, 598, 1330, ...
3.361702
47
import xarray as xr import pandas as pd import matplotlib.pyplot as plt import cartopy.crs as ccrs import matplotlib.patches as mpatches def select_data(ds, lat_min, lat_max, lon_min, lon_max): """ select the dataset given the box information """ ds_select = ds.where((ds.lat>=lat_min)&(ds.lat<=lat_max)...
[ 11748, 2124, 18747, 355, 2124, 81, 198, 11748, 19798, 292, 355, 279, 67, 198, 11748, 2603, 29487, 8019, 13, 9078, 29487, 355, 458, 83, 198, 11748, 6383, 11081, 13, 66, 3808, 355, 36624, 3808, 198, 11748, 2603, 29487, 8019, 13, 8071, 2...
1.676809
1,479
from terraingrid import TerrainGrid import numpy as np import cv2 as cv import matplotlib.pyplot as plt import numpy.ma as ma import random as rng import time as time import tsp rd0 = r"D:\Documents\School\2019-20\ISEF 2020\HighProcessed\r_37ez2.tif" rd1 = r"D:\Documents\School\2019-20\ISEF 2020\HighProcessed\r_37f...
[ 6738, 1059, 430, 278, 6058, 1330, 3813, 3201, 41339, 198, 11748, 299, 32152, 355, 45941, 220, 198, 11748, 269, 85, 17, 355, 269, 85, 220, 198, 11748, 2603, 29487, 8019, 13, 9078, 29487, 355, 458, 83, 198, 11748, 299, 32152, 13, 2611, ...
2.213852
1,646
import os import pandas as pd from datetime import datetime from dateutil.relativedelta import relativedelta import talib import matplotlib.pyplot as plt import matplotlib.patches as mpatches from mplfinance.original_flavor import candlestick_ohlc from matplotlib.pylab import date2num if __name__ == '__main__': ...
[ 11748, 28686, 198, 11748, 19798, 292, 355, 279, 67, 198, 6738, 4818, 8079, 1330, 4818, 8079, 198, 6738, 3128, 22602, 13, 2411, 265, 1572, 12514, 1330, 48993, 1572, 12514, 198, 198, 11748, 3305, 571, 198, 11748, 2603, 29487, 8019, 13, 90...
2.605042
238
# 1893. A380 # A1-2 - window # B1-2 - aisle # C1-2 - aisle # D1-2 - window # 1-2 A-D A, D - window # 3-20 A-F A, F - window # 21-65 A-K A, K - window #AB CD EF #ABC DEFG HJK place = input() num_pos = len(place) - 1 number = int(place[:num_pos]) letter = place[num_pos:] if number >= 21: if letter == 'C' or lett...
[ 2, 48889, 13, 317, 23734, 198, 198, 2, 317, 16, 12, 17, 532, 4324, 198, 2, 347, 16, 12, 17, 532, 28960, 198, 2, 327, 16, 12, 17, 532, 28960, 198, 2, 360, 16, 12, 17, 532, 4324, 198, 198, 2, 352, 12, 17, 317, 12, 35, 317, ...
2.156977
344
import unittest import gym import numpy as np
[ 11748, 555, 715, 395, 198, 11748, 11550, 198, 11748, 299, 32152, 355, 45941, 628, 628, 198 ]
3.125
16
import logging import threading from functools import partial from string import whitespace try: from BaseHTTPServer import HTTPServer, BaseHTTPRequestHandler from urllib import unquote except ImportError: from http.server import HTTPServer, BaseHTTPRequestHandler from urllib.parse import unquote from ...
[ 11748, 18931, 198, 11748, 4704, 278, 198, 6738, 1257, 310, 10141, 1330, 13027, 198, 6738, 4731, 1330, 13216, 10223, 198, 28311, 25, 198, 220, 220, 220, 422, 7308, 6535, 28820, 18497, 1330, 38288, 18497, 11, 7308, 40717, 18453, 25060, 198,...
2.937143
350
from __future__ import annotations import collections import itertools from typing import Any, Callable, Iterable, Iterator from toolz import compose, identity import ibis.expr.operations as ops import ibis.expr.types as ir class Stack(Container): """Wrapper around `collections.deque`. Implements the `Co...
[ 6738, 11593, 37443, 834, 1330, 37647, 198, 198, 11748, 17268, 198, 11748, 340, 861, 10141, 198, 6738, 19720, 1330, 4377, 11, 4889, 540, 11, 40806, 540, 11, 40806, 1352, 198, 198, 6738, 2891, 89, 1330, 36664, 11, 5369, 198, 198, 11748, ...
2.497828
1,842
import os # and comment out a line below from Bio.PDB import PDBIO, PDBList, PDBParser, parse_pdb_header from Bio.PDB.Structure import Structure from Bio.PDB.Model import Model # If you want to use in jphacks/D_2110 repository, # refer Quick install guide on README file # https://github.com/jphacks/D_2110#quick-insta...
[ 11748, 28686, 198, 198, 2, 290, 2912, 503, 257, 1627, 2174, 198, 6738, 16024, 13, 5760, 33, 1330, 14340, 3483, 46, 11, 350, 11012, 8053, 11, 350, 11012, 46677, 11, 21136, 62, 79, 9945, 62, 25677, 198, 6738, 16024, 13, 5760, 33, 13, ...
2.159172
1,401
#!/usr/bin/env python # -*- coding: utf-8 -*- # # This will create a dist directory containing the executable file, all the data # directories. All Libraries will be bundled in executable file. # # Run the build process by entering 'pygame2exe.py' or # 'python pygame2exe.py' in a console prompt. # # To build e...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 201, 198, 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 201, 198, 2, 201, 198, 2, 770, 481, 2251, 257, 1233, 8619, 7268, 262, 28883, 2393, 11, 477, 262, 1366, 201, 198, 2,...
2.376694
738
# -*- coding: utf-8 -*- from oauth2.datatype import AccessToken from oauth2.error import AccessTokenNotFound from oauth2.store import AccessTokenStore from oauth2.tokengenerator import StatelessTokenGenerator class TokenStore(AccessTokenStore): """Uses stateless token to validate access tokens and auth tokens. ...
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 198, 6738, 267, 18439, 17, 13, 19608, 265, 2981, 1330, 8798, 30642, 198, 6738, 267, 18439, 17, 13, 18224, 1330, 8798, 30642, 3673, 21077, 198, 6738, 267, 18439, 17, 13, ...
2.696113
566
# -*- coding: utf-8 -*- import application if __name__ == '__main__': app = application.Application() app.run()
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 11748, 3586, 198, 198, 361, 11593, 3672, 834, 6624, 705, 834, 12417, 834, 10354, 198, 220, 220, 220, 598, 796, 3586, 13, 23416, 3419, 198, 220, 220, 220, 598, 13, 5143...
2.574468
47
# -*- coding: utf-8 -*- from django.apps import AppConfig
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 6738, 42625, 14208, 13, 18211, 1330, 2034, 16934, 628 ]
2.565217
23
#!/usr/bin/env python # Copyright 2017 Google Inc. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless require...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 198, 2, 15069, 2177, 3012, 3457, 13, 1439, 6923, 33876, 13, 198, 2, 198, 2, 49962, 739, 262, 24843, 13789, 11, 10628, 362, 13, 15, 357, 1169, 366, 34156, 15341, 198, 2, 345, 743, 4...
3.035745
1,147
from sklearn.preprocessing import StandardScaler categorical_encoder = OneHotEncoder(drop="if_binary", handle_unknown='ignore') numerical_pipe = Pipeline([ ('scaler', StandardScaler()), ('imputer', SimpleImputer(strategy='mean')) ]) preprocessing = ColumnTransformer( [('cat', categorical_encoder, categori...
[ 6738, 1341, 35720, 13, 3866, 36948, 1330, 8997, 3351, 36213, 198, 198, 66, 2397, 12409, 62, 12685, 12342, 796, 1881, 21352, 27195, 12342, 7, 14781, 2625, 361, 62, 39491, 1600, 5412, 62, 34680, 11639, 46430, 11537, 198, 77, 6975, 605, 62...
3.085271
129
import contextlib import pytest from webtest import TestApp from lms import db from lms.app import create_app from tests.conftest import SESSION, TEST_SETTINGS, get_test_database_url TEST_SETTINGS["sqlalchemy.url"] = get_test_database_url( default="postgresql://postgres@localhost:5433/lms_functests" ) @pytest....
[ 11748, 4732, 8019, 198, 198, 11748, 12972, 9288, 198, 6738, 3992, 9288, 1330, 6208, 4677, 198, 198, 6738, 300, 907, 1330, 20613, 198, 6738, 300, 907, 13, 1324, 1330, 2251, 62, 1324, 198, 6738, 5254, 13, 1102, 701, 395, 1330, 311, 4762...
2.751309
382
import os import unittest from Models.people import People from api.Exceptions.SystemErrorException import SystemErrorException # executed prior to each test # executed after each test if __name__ == "__main__": unittest.main()
[ 220, 198, 11748, 28686, 198, 11748, 555, 715, 395, 198, 220, 628, 198, 6738, 32329, 13, 15332, 1330, 4380, 198, 198, 6738, 40391, 13, 3109, 11755, 13, 11964, 12331, 16922, 1330, 4482, 12331, 16922, 198, 220, 198, 220, 198, 220, 220, 2...
2.530973
113
from django.db import migrations from rest_api.huji_loader import load_from_zip
[ 198, 6738, 42625, 14208, 13, 9945, 1330, 15720, 602, 628, 198, 6738, 1334, 62, 15042, 13, 13415, 7285, 62, 29356, 1330, 3440, 62, 6738, 62, 13344, 628, 198 ]
3.035714
28
# Copyright (c) 2008 Sebastian Sareyko <smoon at nooms dot de> # See COPYING file for details. import os import xmmsclient from xmmsclient import glib as xmmsglib import gobject import gtk import gettext
[ 2, 15069, 357, 66, 8, 3648, 26190, 311, 533, 88, 7204, 1279, 5796, 2049, 379, 645, 3150, 16605, 390, 29, 198, 2, 4091, 27975, 45761, 2393, 329, 3307, 13, 628, 198, 11748, 28686, 198, 11748, 2124, 76, 907, 16366, 198, 6738, 2124, 76,...
3.089552
67
import json import torch import imagemodel import imageprocessor import predictargs if __name__ == "__main__": args = predictargs.initialize_arguments() predict(args.use_gpu, args.checkpoint, args.input, args.top_k)
[ 11748, 33918, 198, 11748, 28034, 198, 11748, 3590, 368, 375, 417, 198, 11748, 2939, 41341, 198, 11748, 4331, 22046, 628, 628, 198, 361, 11593, 3672, 834, 6624, 366, 834, 12417, 834, 1298, 198, 220, 220, 220, 26498, 796, 4331, 22046, 13,...
3.04
75
""" Smallest multiple Problem 5 2520 is the smallest number that can be divided by each of the numbers from 1 to 10 without any remainder. What is the smallest positive number that is evenly divisible by all of the numbers from 1 to 20? """ from math import sqrt def prime(n): """ return true...
[ 37811, 201, 198, 18712, 395, 3294, 201, 198, 40781, 642, 201, 198, 201, 198, 1495, 1238, 318, 262, 18197, 1271, 326, 460, 307, 9086, 416, 1123, 286, 262, 3146, 422, 352, 284, 838, 1231, 597, 17675, 13, 201, 198, 201, 198, 2061, 318,...
2.030127
863
from sys import argv import gzip import os file = argv[1] snp_dir = argv[2] region_file = argv[3] chr = argv[4] snps = [] with open(region_file, 'r') as r_file: for line in r_file.readlines(): line = line.strip('\n') line = line.split('\t') SNP = line[0] if line[2] == chr: ...
[ 6738, 25064, 1330, 1822, 85, 198, 11748, 308, 13344, 198, 11748, 28686, 198, 198, 7753, 796, 1822, 85, 58, 16, 60, 198, 16184, 79, 62, 15908, 796, 1822, 85, 58, 17, 60, 198, 36996, 62, 7753, 796, 1822, 85, 58, 18, 60, 198, 354, ...
1.869681
376
import os import torch from torch.utils.ffi import create_extension from IPython import embed include_dirs = [] library_dirs = [] sources = ['src/nms.cpp'] headers = ['src/nms.h'] defines = [] with_cuda = False if torch.cuda.is_available(): print('Including CUDA code.') cuda_home = os.getenv('CUDA_PATH') ...
[ 11748, 28686, 198, 11748, 28034, 198, 6738, 28034, 13, 26791, 13, 487, 72, 1330, 2251, 62, 2302, 3004, 198, 6738, 6101, 7535, 1330, 11525, 198, 198, 17256, 62, 15908, 82, 796, 17635, 198, 32016, 62, 15908, 82, 796, 17635, 628, 198, 82...
2.109113
834
names = ['lexiaoyuan', 'lexiaoyuanbeta', 'benjamin', 'xushicheng'] print(names[0]) print(names[1]) print(names[2]) print(names[3]) message = names[0].title() + ", is a programmer!" print(message) message = names[1].title() + ", is a programmer!" print(message) message = names[2].title() + ", is a programmer!" print(me...
[ 14933, 796, 37250, 2588, 544, 726, 7258, 3256, 705, 2588, 544, 726, 7258, 31361, 3256, 705, 11722, 13337, 3256, 705, 87, 1530, 14234, 782, 20520, 198, 4798, 7, 14933, 58, 15, 12962, 198, 4798, 7, 14933, 58, 16, 12962, 198, 4798, 7, ...
2.840149
269
import os import pytest # IMPORTANT keep this above all other borg imports to avoid inconsistent values # for `from borg.constants import PBKDF2_ITERATIONS` (or star import) usages before # this is executed from borg import constants # no fixture-based monkey-patching since star-imports are used for the constants mod...
[ 11748, 28686, 198, 198, 11748, 12972, 9288, 198, 198, 2, 30023, 9863, 8643, 1394, 428, 2029, 477, 584, 275, 2398, 17944, 284, 3368, 18326, 3815, 198, 2, 329, 4600, 6738, 275, 2398, 13, 9979, 1187, 1330, 30524, 42, 8068, 17, 62, 2043, ...
3.180602
299
import unittest from functools import partial import numpy as np import pytest from tensorkit import tensor as T from tensorkit.variational import * from tests.helper import * assert_allclose_ = partial(assert_allclose, atol=1e-4)
[ 11748, 555, 715, 395, 198, 6738, 1257, 310, 10141, 1330, 13027, 198, 198, 11748, 299, 32152, 355, 45941, 198, 11748, 12972, 9288, 198, 198, 6738, 11192, 967, 270, 1330, 11192, 273, 355, 309, 198, 6738, 11192, 967, 270, 13, 25641, 864, ...
3.118421
76
import json as json_parser from kubernetes import client, config from kubernetes.client.api.custom_objects_api import CustomObjectsApi from pipecheck.utils import mergedicts
[ 11748, 33918, 355, 33918, 62, 48610, 198, 198, 6738, 479, 18478, 3262, 274, 1330, 5456, 11, 4566, 198, 6738, 479, 18478, 3262, 274, 13, 16366, 13, 15042, 13, 23144, 62, 48205, 62, 15042, 1330, 8562, 10267, 82, 32, 14415, 198, 198, 673...
3.509804
51
from numpy import pi, sqrt, tanh from scipy.optimize import root class WaveTheory: '''Base class for waves calculations.''' @property @property @property @property class BoussinesqTheory(WaveTheory): '''Boussinesq theory for dispersive waves.''' beta = -0.531 alpha = 0.5 * beta*...
[ 6738, 299, 32152, 1330, 31028, 11, 19862, 17034, 11, 25706, 71, 198, 6738, 629, 541, 88, 13, 40085, 1096, 1330, 6808, 628, 198, 4871, 17084, 464, 652, 25, 198, 220, 220, 220, 705, 7061, 14881, 1398, 329, 9813, 16765, 2637, 7061, 628, ...
2.784091
176
import enum from typing import ( BinaryIO, ByteString, Dict, FrozenSet, Generator, Text, TextIO, Tuple, Union, ) from mypy_extensions import TypedDict # Define Types # const.py FPDictType = Dict[int, Text] FPSetType = FrozenSet[Tuple[int, Text]] # retrosheet.py TextStream = TextI...
[ 11748, 33829, 198, 6738, 19720, 1330, 357, 198, 220, 220, 220, 45755, 9399, 11, 198, 220, 220, 220, 30589, 10100, 11, 198, 220, 220, 220, 360, 713, 11, 198, 220, 220, 220, 23673, 7248, 11, 198, 220, 220, 220, 35986, 11, 198, 220, ...
2.199536
431
import bwsample as bws
[ 11748, 275, 18504, 1403, 355, 275, 18504, 628 ]
3
8
# encoding: utf-8 ''' @author: Minghao Guo @contact: mh.guo0111@gmail.com @software: nef @file: imshow_mixin.py @date: 5/6/2019 @desc: '''
[ 2, 21004, 25, 3384, 69, 12, 23, 198, 7061, 6, 198, 31, 9800, 25, 26980, 23778, 1962, 78, 198, 31, 32057, 25, 285, 71, 13, 5162, 78, 486, 1157, 31, 14816, 13, 785, 198, 31, 43776, 25, 497, 69, 198, 31, 7753, 25, 545, 12860, 62,...
2.089552
67
from datetime import datetime import json from itertools import izip from datatypes import DataPoint from event import ChangepointEvent DATE_FORMAT = '%d.%m.%Y %H:%M:%S.%f'
[ 6738, 4818, 8079, 1330, 4818, 8079, 198, 11748, 33918, 198, 6738, 340, 861, 10141, 1330, 220, 528, 541, 198, 198, 6738, 4818, 265, 9497, 1330, 6060, 12727, 198, 6738, 1785, 1330, 9794, 4122, 9237, 628, 198, 35, 6158, 62, 21389, 1404, ...
2.695652
69
from unittest import TestCase from unittest.mock import patch, Mock from boto3_large_message_utils.exceptions import CompressionError from boto3_large_message_utils.builder import LargeMessageBuilder @patch( "boto3_large_message_utils.builder.generate_s3_object_key", return_value="abcde-fghi-jklm-nopqrst...
[ 6738, 555, 715, 395, 1330, 6208, 20448, 198, 6738, 555, 715, 395, 13, 76, 735, 1330, 8529, 11, 44123, 198, 198, 6738, 275, 2069, 18, 62, 11664, 62, 20500, 62, 26791, 13, 1069, 11755, 1330, 3082, 2234, 12331, 198, 6738, 275, 2069, 18...
2.842391
184
# Generated by Django 3.2.5 on 2021-08-06 18:36 from django.db import migrations, models
[ 2, 2980, 515, 416, 37770, 513, 13, 17, 13, 20, 319, 33448, 12, 2919, 12, 3312, 1248, 25, 2623, 198, 198, 6738, 42625, 14208, 13, 9945, 1330, 15720, 602, 11, 4981, 628 ]
2.84375
32
import numpy as np import sqlalchemy import datetime as dt from sqlalchemy.ext.automap import automap_base from sqlalchemy.orm import Session from sqlalchemy import create_engine, func from flask import Flask, jsonify from flask import session # Database Setup engine = create_engine("sqlite:///Resources/hawaii.sqlite...
[ 11748, 299, 32152, 355, 45941, 198, 198, 11748, 44161, 282, 26599, 198, 11748, 4818, 8079, 355, 288, 83, 198, 6738, 44161, 282, 26599, 13, 2302, 13, 2306, 296, 499, 1330, 3557, 499, 62, 8692, 198, 6738, 44161, 282, 26599, 13, 579, 133...
2.423369
659
# -*- coding: utf-8 -* from expects import * from expects.testing import failure with describe('be_above_or_equal'): with it('should pass if number is above expected'): expect(5).to(be_above_or_equal(4)) with it('should pass if number equals expected'): expect(5).to(be_above_or_equal(5)) ...
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 198, 198, 6738, 13423, 1330, 1635, 198, 6738, 13423, 13, 33407, 1330, 5287, 628, 198, 4480, 6901, 10786, 1350, 62, 29370, 62, 273, 62, 40496, 6, 2599, 198, 220, 220, 220, 351, ...
2.461353
414
############################################################################### # Convert sampling solns to the output format ############################################################################### # Generate initial solutions # Call multi-dendrix to obtaining initial solns # Generate solns based on user-i...
[ 198, 29113, 29113, 7804, 4242, 21017, 198, 2, 38240, 19232, 1540, 5907, 284, 262, 5072, 5794, 198, 198, 29113, 29113, 7804, 4242, 21017, 198, 2, 2980, 378, 4238, 8136, 220, 198, 198, 2, 4889, 5021, 12, 67, 437, 8609, 284, 16727, 4238,...
5.444444
90
#!/usr/bin/env python3 # For given prediction directory {code[2:3]}/{code} load all predictions # and print statistics. import argparse import os import typing import logging import json import dataclasses import collections logger = logging.getLogger(__name__) logger.setLevel(logging.DEBUG) @dataclasses.dataclass ...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 18, 198, 2, 1114, 1813, 17724, 8619, 1391, 8189, 58, 17, 25, 18, 48999, 14, 90, 8189, 92, 3440, 477, 16277, 198, 2, 290, 3601, 7869, 13, 198, 11748, 1822, 29572, 198, 11748, 28686, 198, ...
3.08871
124
import numpy as np import datetime import smtplib import logging import time import csv import cv2 print ("======================START======================") all_count = 0 #Checking finding count true_count = 0 #Checking detection count #open result CSV file file = open('./result/res_Insert_name.csv', 'w') #...
[ 11748, 299, 32152, 355, 45941, 198, 11748, 4818, 8079, 198, 11748, 895, 83, 489, 571, 198, 11748, 18931, 198, 11748, 640, 198, 11748, 269, 21370, 198, 11748, 269, 85, 17, 198, 198, 4798, 5855, 4770, 50155, 2257, 7227, 4770, 50155, 4943,...
2.377095
716
import os ENV = os.environ.get('ACHOO_DEBUG')
[ 11748, 28686, 198, 198, 1677, 53, 796, 28686, 13, 268, 2268, 13, 1136, 10786, 16219, 6684, 62, 30531, 11537, 198 ]
2.35
20
from algo.face import Face import dlib # dlib's face dlib_find_faces (HOG-based) dlib_find_faces = dlib.get_frontal_face_detector()
[ 6738, 435, 2188, 13, 2550, 1330, 15399, 198, 11748, 288, 8019, 198, 198, 2, 288, 8019, 338, 1986, 288, 8019, 62, 19796, 62, 32186, 357, 39, 7730, 12, 3106, 8, 198, 67, 8019, 62, 19796, 62, 32186, 796, 288, 8019, 13, 1136, 62, 8534...
2.576923
52
import panel as pn long_text = "abcde" * 10 pn.template.MaterialTemplate( title="Hello World", sidebar=long_text, main=long_text, ).servable()
[ 11748, 6103, 355, 279, 77, 201, 198, 201, 198, 6511, 62, 5239, 796, 366, 39305, 2934, 1, 1635, 838, 201, 198, 201, 198, 21999, 13, 28243, 13, 17518, 30800, 7, 201, 198, 220, 220, 220, 3670, 2625, 15496, 2159, 1600, 201, 198, 220, ...
2.371429
70
# Include with # import os # exec(open(os.path.join(os.path.dirname(__file__), 'sky130_sram_common.py')).read()) tech_name = "sky130" nominal_corner_only = True # Local wordlines have issues with met3 power routing for now #local_array_size = 16 #route_supplies = False check_lvsdrc = True #perimeter_pins = Fals...
[ 2, 40348, 351, 198, 2, 220, 220, 1330, 28686, 198, 2, 220, 220, 2452, 7, 9654, 7, 418, 13, 6978, 13, 22179, 7, 418, 13, 6978, 13, 15908, 3672, 7, 834, 7753, 834, 828, 705, 15688, 12952, 62, 82, 859, 62, 11321, 13, 9078, 11537, ...
2.681373
204
import requests import pandas as pd import datetime import json import numpy as np #Specify Timeframe min_date = datetime.datetime.now().date() - datetime.timedelta(days=2) max_date = datetime.datetime.now().date() params = {"min_date": str(min_date), "max_date": str(max_date), "data_sources":"0,1,2"} response = reque...
[ 11748, 7007, 198, 11748, 19798, 292, 355, 279, 67, 198, 11748, 4818, 8079, 198, 11748, 33918, 198, 11748, 299, 32152, 355, 45941, 198, 198, 2, 22882, 1958, 3862, 14535, 198, 1084, 62, 4475, 796, 4818, 8079, 13, 19608, 8079, 13, 2197, ...
2.949541
654
# -*- coding: utf-8 -*- # Form implementation generated from reading ui file '../ui_files/new_dev.ui' # # Created: Fri Dec 19 19:55:28 2014 # by: pyside-uic 0.2.15 running on PySide 1.2.1 # # WARNING! All changes made in this file will be lost! from PySide import QtCore, QtGui
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 198, 2, 5178, 7822, 7560, 422, 3555, 334, 72, 2393, 705, 40720, 9019, 62, 16624, 14, 3605, 62, 7959, 13, 9019, 6, 198, 2, 198, 2, 15622, 25, 19480, 4280, 678, 678, ...
2.623853
109
import os from flask import Flask, request, render_template, jsonify from twitter import TwitterClient app = Flask(__name__) # Setup the client <query string, retweets_only bool, with_sentiment bool> api = TwitterClient('@yum_dude') @app.route('/') @app.route('/tweets') port = int(os.environ.get('PO...
[ 11748, 28686, 201, 198, 6738, 42903, 1330, 46947, 11, 2581, 11, 8543, 62, 28243, 11, 33918, 1958, 201, 198, 6738, 17044, 1330, 3009, 11792, 201, 198, 201, 198, 1324, 796, 46947, 7, 834, 3672, 834, 8, 201, 198, 2, 31122, 262, 5456, 1...
2.613793
145
#!/usr/bin/python # This Python CGI script will write the color into a log file # The log data will be agregated in a separate program and be sent to graphite import os import sys import time import fcntl import socket import urlparse #import cgitb #cgitb.enable() print "Content-Type: text/html" # end of headers pr...
[ 2, 48443, 14629, 14, 8800, 14, 29412, 198, 198, 2, 770, 11361, 36378, 4226, 481, 3551, 262, 3124, 656, 257, 2604, 2393, 198, 2, 383, 2604, 1366, 481, 307, 556, 2301, 515, 287, 257, 4553, 1430, 290, 307, 1908, 284, 4823, 578, 198, ...
2.793443
305
##~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~## ## ## ## This file forms part of the Underworld geophysics modelling application. ## ## ...
[ 2235, 93, 2, 93, 2, 93, 2, 93, 2, 93, 2, 93, 2, 93, 2, 93, 2, 93, 2, 93, 2, 93, 2, 93, 2, 93, 2, 93, 2, 93, 2, 93, 2, 93, 2, 93, 2, 93, 2, 93, 2, 93, 2, 93, 2, 93, 2, 93, 2, 93, 2, 93, 2, 93, 2, 93, 2, ...
1.80456
614
#! /usr/bin/env python3 import sys import re def find_iter(target_regex, in_stream, out_stream): """ Iterates over all matches of 'target_regex' found in origin.txt. Parameters ---------- target_regex the regular expression that is searched for in in_stream in_stream the ...
[ 2, 0, 1220, 14629, 14, 8800, 14, 24330, 21015, 18, 198, 198, 11748, 25064, 198, 11748, 302, 198, 198, 4299, 1064, 62, 2676, 7, 16793, 62, 260, 25636, 11, 287, 62, 5532, 11, 503, 62, 5532, 2599, 198, 220, 220, 220, 37227, 198, 220,...
2.620571
875
from spartan import expr, util from test_common import with_ctx from math import sqrt import parakeet from spartan.expr import stencil N_COLORS = 3 IMG_SIZE = (N_COLORS, 16, 16) FILTER_SIZE = (5, 5) N_IMGS = 1 N_FILTERS = 1 ONE_TILE = (10000, 10000, 10000, 10000) @with_ctx
[ 6738, 599, 433, 272, 1330, 44052, 11, 7736, 198, 6738, 1332, 62, 11321, 1330, 351, 62, 49464, 198, 6738, 10688, 1330, 19862, 17034, 198, 11748, 1582, 539, 316, 198, 6738, 599, 433, 272, 13, 31937, 1330, 45219, 2856, 198, 198, 45, 62, ...
2.518182
110
# SQLAlchemy from app import db # POSS Models from .models import User from .models import ApiKey
[ 2, 16363, 2348, 26599, 198, 6738, 598, 1330, 20613, 198, 198, 2, 350, 18420, 32329, 198, 6738, 764, 27530, 1330, 11787, 198, 6738, 764, 27530, 1330, 5949, 72, 9218, 628, 198 ]
3.258065
31
#!/usr/bin/python #-*- coding:utf-8 -*- import sys import struct import numpy as np from torch import tensor from torch.nn import functional as fn if __name__ == '__main__': pad_f32() print("end")
[ 2, 48443, 14629, 14, 8800, 14, 29412, 198, 2, 12, 9, 12, 19617, 25, 40477, 12, 23, 532, 9, 12, 198, 198, 11748, 25064, 198, 11748, 2878, 198, 11748, 299, 32152, 355, 45941, 198, 6738, 28034, 1330, 11192, 273, 198, 6738, 28034, 13, ...
2.666667
78
# Copyright 2019 Nokia # # 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, softwa...
[ 2, 15069, 13130, 26182, 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, 7330, 257...
2.458395
3,377
from graphbrain import * from graphbrain.parsers import * if __name__ == '__main__': text = """ Satellites from NASA and other agencies have been tracking sea ice changes since 1979. """ parser = create_parser('en', lemmas=True) parses = parser.parse(text) for parse in parses: pr...
[ 6738, 4823, 27825, 1330, 1635, 198, 6738, 4823, 27825, 13, 79, 945, 364, 1330, 1635, 628, 198, 361, 11593, 3672, 834, 6624, 705, 834, 12417, 834, 10354, 198, 220, 220, 220, 2420, 796, 37227, 198, 220, 220, 220, 311, 7528, 2737, 422, ...
2.510204
196
# import object from module turtle from turtle import * # initial state of spinner is null (stable) state= {'turn':0 } # Draw fidget spinner # Animate fidget spinner # Flick fidget spinner # setup window screen setup(600, 400, 370, 0) bgcolor("black") tracer(False) # wing of fidget spinner width(60) color("oran...
[ 2, 1330, 2134, 422, 8265, 28699, 198, 6738, 28699, 1330, 1635, 198, 198, 2, 4238, 1181, 286, 599, 5083, 318, 9242, 357, 31284, 8, 198, 5219, 28, 1391, 6, 15344, 10354, 15, 1782, 198, 198, 2, 15315, 277, 17484, 599, 5083, 198, 198, ...
2.957447
141
"""Support for binary sensors to display Proxmox VE data.""" import homeassistant.components.proxmox as proxmox from homeassistant.components.binary_sensor import BinarySensorDevice from homeassistant.const import ATTR_ATTRIBUTION DEVICE_CLASS = 'connectivity' ATTRIBUTION = 'Data provided by Proxmox' async def async...
[ 37811, 15514, 329, 13934, 15736, 284, 3359, 1041, 87, 76, 1140, 569, 36, 1366, 526, 15931, 198, 11748, 1363, 562, 10167, 13, 5589, 3906, 13, 1676, 87, 76, 1140, 355, 14793, 76, 1140, 198, 6738, 1363, 562, 10167, 13, 5589, 3906, 13, ...
2.301916
1,305