content
stringlengths
1
1.04M
input_ids
listlengths
1
774k
ratio_char_token
float64
0.38
22.9
token_count
int64
1
774k
import os import vtkAll as vtk import math import time import numpy as np from ddapp import callbacks from ddapp import transformUtils from ddapp import lcmUtils from ddapp import objectmodel as om from ddapp.utime import getUtime from ddapp import robotstate import drc as lcmdrc
[ 11748, 28686, 198, 11748, 410, 30488, 3237, 355, 410, 30488, 198, 11748, 10688, 198, 11748, 640, 198, 11748, 299, 32152, 355, 45941, 198, 198, 6738, 49427, 1324, 1330, 869, 10146, 198, 6738, 49427, 1324, 1330, 6121, 18274, 4487, 198, 6738...
3.337209
86
import SocketServer from SimpleTCPDispatcher import SimpleTCPDispatcher from SimpleTCPRequestHandler import SimpleTCPRequestHandler __author__ = 'umairghani' class SimpleTCPServer(SocketServer.TCPServer, SimpleTCPDispatcher): """ Simple TCP Server """ allow_reuse_address = True def __init__(se...
[ 11748, 47068, 10697, 198, 198, 6738, 17427, 4825, 5760, 271, 8071, 2044, 1330, 17427, 4825, 5760, 271, 8071, 2044, 198, 6738, 17427, 4825, 47, 18453, 25060, 1330, 17427, 4825, 47, 18453, 25060, 198, 198, 834, 9800, 834, 796, 705, 388, 9...
2.578767
292
import re import json import collections import traceback from pathlib import Path import unicodedata as ucd from tf.client.make.build import makeSearchClients from .nena_parser import NenaLexerParser from .build_tf import NenaTfBuilder from .build_docs import DocsBuilder
[ 11748, 302, 198, 11748, 33918, 198, 11748, 17268, 198, 11748, 12854, 1891, 198, 6738, 3108, 8019, 1330, 10644, 198, 11748, 28000, 9043, 1045, 355, 334, 10210, 198, 6738, 48700, 13, 16366, 13, 15883, 13, 11249, 1330, 787, 18243, 2601, 2334...
3.592105
76
import tensorflow as tf import numpy as np x_inp = tf.placeholder(tf.float32, [5, 5]) w_inp = tf.placeholder(tf.float32, [3, 3]) x = tf.reshape(x_inp, [1, 5, 5, 1]) w = tf.reshape(w_inp, [3, 3, 1, 1]) x_valid = tf.nn.conv2d(x, w, strides=[1, 1, 1, 1], padding='VALID') x_same = tf.nn.conv2d(x, w, strides=[1, 1, 1, 1...
[ 11748, 11192, 273, 11125, 355, 48700, 198, 11748, 299, 32152, 355, 45941, 628, 198, 87, 62, 259, 79, 796, 48700, 13, 5372, 13829, 7, 27110, 13, 22468, 2624, 11, 685, 20, 11, 642, 12962, 198, 86, 62, 259, 79, 796, 48700, 13, 5372, ...
1.819536
604
# Copyright (c) 2021, NVIDIA CORPORATION. All rights reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by appli...
[ 2, 15069, 357, 66, 8, 33448, 11, 15127, 23929, 44680, 6234, 13, 220, 1439, 2489, 10395, 13, 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...
2.232713
752
from aioftx.session import FTXClientSession from .schemas import ( AcceptQuoteRequest, AcceptQuoteResponse, CancelQuoteRequest, CancelQuoteResponse, CreateQuoteRequest, CreateQuoteResponse, GetMyQuotesReponse, GetMyQuotesRequest, GetQuotesRequest, GetQuotesResponse, Quote, )...
[ 6738, 257, 952, 701, 87, 13, 29891, 1330, 19446, 55, 11792, 36044, 198, 198, 6738, 764, 1416, 4411, 292, 1330, 357, 198, 220, 220, 220, 21699, 25178, 18453, 11, 198, 220, 220, 220, 21699, 25178, 31077, 11, 198, 220, 220, 220, 27910, ...
2.638854
803
# Generated by the protocol buffer compiler. DO NOT EDIT! # source: hapi/rudder/rudder.proto import sys _b=sys.version_info[0]<3 and (lambda x:x) or (lambda x:x.encode('latin1')) from google.protobuf import descriptor as _descriptor from google.protobuf import message as _message from google.protobuf import reflectio...
[ 2, 2980, 515, 416, 262, 8435, 11876, 17050, 13, 220, 8410, 5626, 48483, 0, 198, 2, 2723, 25, 387, 14415, 14, 81, 41686, 14, 81, 41686, 13, 1676, 1462, 198, 198, 11748, 25064, 198, 62, 65, 28, 17597, 13, 9641, 62, 10951, 58, 15, ...
2.643583
13,776
from twisted.spread import pb from twisted.internet import reactor from twisted.python import util factory = pb.PBClientFactory() reactor.connectTCP("localhost", 8789, factory) d = factory.getRootObject() a = [] d.addCallback(lambda object: object.callRemote("nextQuote")) d.addCallback(lambda echo: a.append(echo)) d.a...
[ 6738, 19074, 13, 43639, 1330, 279, 65, 198, 6738, 19074, 13, 37675, 1330, 21905, 198, 6738, 19074, 13, 29412, 1330, 7736, 198, 198, 69, 9548, 796, 279, 65, 13, 49079, 11792, 22810, 3419, 198, 260, 11218, 13, 8443, 4825, 47, 7203, 3675...
3.167939
131
from subprocess import check_output
[ 6738, 850, 14681, 1330, 2198, 62, 22915, 628, 198 ]
4.222222
9
# -*- coding: utf-8 -*- ################################################################### # Object detection - YOLOv5_6.0 - OpenCV dnn # From : https://github.com/samsu2018/yolov5_6.0_opencvdnn_python # Modify : Sam Su (1, 11, 2022) ################################################################## import cv2 import ...
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 29113, 29113, 21017, 198, 2, 9515, 13326, 532, 575, 3535, 46, 85, 20, 62, 21, 13, 15, 532, 4946, 33538, 288, 20471, 198, 2, 3574, 1058, 3740, 1378, 12567, 13, 785, 1...
3.163142
331
import os import random from PIL import Image from argparse import ArgumentParser import torch import torch.nn as nn import torch.backends.cudnn as cudnn import torchvision.transforms as transforms import torchvision.utils as vutils from model.networks import Generator from utils.tools import get_config, is_image_fil...
[ 11748, 28686, 198, 11748, 4738, 198, 6738, 350, 4146, 1330, 7412, 198, 6738, 1822, 29572, 1330, 45751, 46677, 198, 198, 11748, 28034, 198, 11748, 28034, 13, 20471, 355, 299, 77, 198, 11748, 28034, 13, 1891, 2412, 13, 66, 463, 20471, 355...
3.065672
335
from cassandra.cluster import Cluster """ Function to create a connection object """
[ 6738, 30606, 15918, 13, 565, 5819, 1330, 38279, 198, 198, 37811, 198, 220, 15553, 284, 2251, 257, 4637, 2134, 198, 37811, 628 ]
4.045455
22
""" This is a script to generate prime numbers from a range of numbers. Or by checking to see if the input number is prime. """ #Calculate the prime numbers between two numbers #Allow the user to enter in a range of numbers #Secondly be able to have the user enter a number to check to see if it is prime #thirdly have ...
[ 37811, 770, 318, 257, 4226, 284, 7716, 6994, 3146, 422, 257, 2837, 286, 3146, 13, 198, 5574, 416, 10627, 284, 766, 611, 262, 5128, 1271, 318, 6994, 13, 198, 37811, 198, 198, 2, 9771, 3129, 378, 262, 6994, 3146, 1022, 734, 3146, 198,...
3.462069
290
h, m = map(int, input().split(':')) t = h*60+m for i in range(120): if (t >= 7*60 and t < 10*60) or (t >= 15*60 and t < 19*60): t += 2 else: t += 1 h = t//60%24 m = t%60 # print(f'{h:02d}:{m:02d}') print('%02d:%02d' % (h, m))
[ 71, 11, 285, 796, 3975, 7, 600, 11, 5128, 22446, 35312, 7, 10354, 6, 4008, 201, 198, 83, 796, 289, 9, 1899, 10, 76, 201, 198, 1640, 1312, 287, 2837, 7, 10232, 2599, 201, 198, 197, 361, 357, 83, 18189, 767, 9, 1899, 290, 256, 1...
1.737589
141
#!/usr/bin/env python # This code is part of qiskit-runtime. # # (C) Copyright IBM 2021. # # This code is licensed under the Apache License, Version 2.0. You may # obtain a copy of this license in the LICENSE.txt file in the root directory # of this source tree or at http://www.apache.org/licenses/LICENSE-2.0....
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 201, 198, 201, 198, 2, 770, 2438, 318, 636, 286, 10662, 1984, 270, 12, 43282, 13, 201, 198, 2, 201, 198, 2, 357, 34, 8, 15069, 19764, 33448, 13, 201, 198, 2, 201, 198, 2, 770, 2438, ...
3.084058
345
#!/usr/bin/env python3 # -*- coding: utf-8 -*- # This file is part of the Wapiti project (http://wapiti.sourceforge.net) # Copyright (C) 2008-2018 Nicolas Surribas # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free S...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 18, 198, 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 2, 770, 2393, 318, 636, 286, 262, 370, 499, 8846, 1628, 357, 4023, 1378, 86, 499, 8846, 13, 10459, 30293, 13, 3...
2.41154
2,097
from learn import * from server import *
[ 6738, 2193, 1330, 1635, 201, 198, 6738, 4382, 1330, 1635, 201, 198, 220, 220, 220, 220, 201, 198 ]
2.722222
18
from django import forms
[ 198, 6738, 42625, 14208, 1330, 5107, 628, 628 ]
3.625
8
#!/usr/bin/python3 import cv2 import datetime import sys import gflags import glog FLAGS = gflags.FLAGS if __name__ == '__main__': argv = FLAGS(sys.argv) sys.exit(main(argv))
[ 2, 48443, 14629, 14, 8800, 14, 29412, 18, 198, 198, 11748, 269, 85, 17, 198, 11748, 4818, 8079, 198, 11748, 25064, 198, 198, 11748, 308, 33152, 198, 11748, 1278, 519, 198, 198, 38948, 50, 796, 308, 33152, 13, 38948, 50, 628, 198, 19...
2.277108
83
from django.shortcuts import render from django.contrib.auth.models import User from django.http import HttpResponse from .models import RestaurantReview, Restaurant from random import randint # Create your views here.
[ 6738, 42625, 14208, 13, 19509, 23779, 1330, 8543, 198, 6738, 42625, 14208, 13, 3642, 822, 13, 18439, 13, 27530, 1330, 11787, 198, 6738, 42625, 14208, 13, 4023, 1330, 367, 29281, 31077, 198, 198, 6738, 764, 27530, 1330, 26078, 14832, 11, ...
3.894737
57
# coding=utf-8 from typing import Union
[ 2, 19617, 28, 40477, 12, 23, 198, 198, 6738, 19720, 1330, 4479, 628 ]
3.230769
13
from __future__ import absolute_import from .core import (ZmqSubscriber, ZmqPublisher) from .core import load_config
[ 6738, 11593, 37443, 834, 1330, 4112, 62, 11748, 198, 198, 6738, 764, 7295, 1330, 357, 57, 76, 80, 7004, 1416, 24735, 11, 1168, 76, 80, 46471, 8, 198, 6738, 764, 7295, 1330, 3440, 62, 11250 ]
3.342857
35
import subprocess import textwrap import pytest import signal import socket import time import os PORT = 9000 HOST = 'localhost' KEY = "testtesttest" @pytest.fixture(scope="session") #def test_ancillary_on_s3(minio, tmp_path): # f = tmp_path / "test.yaml" # g = tmp_path / "clip.geojson" # f.write_text(textw...
[ 11748, 850, 14681, 198, 11748, 2420, 37150, 198, 11748, 12972, 9288, 198, 11748, 6737, 198, 11748, 17802, 198, 11748, 640, 198, 11748, 28686, 198, 198, 15490, 796, 50138, 198, 39, 10892, 796, 705, 36750, 6, 198, 20373, 796, 366, 9288, 9...
2.088685
327
import torch import torch.nn as nn import torch.nn.functional as F import torchvision.models as models pretrained_model_path = 'pretrained/resnet_gray_weights.pth.tar'
[ 11748, 28034, 201, 198, 11748, 28034, 13, 20471, 355, 299, 77, 201, 198, 11748, 28034, 13, 20471, 13, 45124, 355, 376, 201, 198, 11748, 28034, 10178, 13, 27530, 355, 4981, 201, 198, 201, 198, 5310, 13363, 62, 19849, 62, 6978, 796, 705...
2.731343
67
"""Ellipsoid suspended in shear flow (2 hours). An example to illustrate 3d pysph rigid_body framework """ from __future__ import print_function import numpy as np from scipy.integrate import odeint from pysph.base.nnps import DomainManager from pysph.base.utils import (get_particle_array_wcsph, ...
[ 37811, 30639, 541, 568, 312, 9951, 287, 673, 283, 5202, 357, 17, 2250, 737, 198, 198, 2025, 1672, 284, 19418, 513, 67, 279, 893, 746, 20831, 62, 2618, 9355, 198, 37811, 198, 6738, 11593, 37443, 834, 1330, 3601, 62, 8818, 198, 11748, ...
1.794752
5,793
#tuning Parameter import numpy as np import glob import os import pandas as pd import scipy import matplotlib.pyplot as plt from sklearn import datasets, linear_model from scipy.stats import norm from sklearn.neighbors import KernelDensity from scipy.stats import poisson import math from itertools import permutations i...
[ 2, 28286, 278, 25139, 2357, 198, 11748, 299, 32152, 355, 45941, 198, 11748, 15095, 198, 11748, 28686, 198, 11748, 19798, 292, 355, 279, 67, 198, 11748, 629, 541, 88, 198, 11748, 2603, 29487, 8019, 13, 9078, 29487, 355, 458, 83, 198, 6...
1.689625
2,265
import json import os
[ 11748, 33918, 198, 11748, 28686, 198 ]
3.666667
6
# -*- coding: UTF-8 -*- # Code generated by lark suite oapi sdk gen from typing import * from ....api import Request as APIRequest, Response as APIResponse, set_timeout, set_tenant_key, set_user_access_token, set_path_params, \ set_query_params, set_response_stream, set_is_response_stream, FormData, FormDataFile ...
[ 2, 532, 9, 12, 19617, 25, 41002, 12, 23, 532, 9, 12, 198, 2, 6127, 7560, 416, 300, 668, 18389, 267, 15042, 264, 34388, 2429, 198, 198, 6738, 19720, 1330, 1635, 198, 198, 6738, 19424, 15042, 1330, 19390, 355, 7824, 18453, 11, 18261, ...
2.837079
178
# import the necessary packages from imutils import paths import argparse import cv2 # construct the argument parse and parse the arguments ap = argparse.ArgumentParser() ap.add_argument("-i", "--images", required=True, help="path to input directory of images") ap.add_argument("-t", "--threshold", type=float, defau...
[ 2, 1330, 262, 3306, 10392, 198, 6738, 545, 26791, 1330, 13532, 198, 11748, 1822, 29572, 198, 11748, 269, 85, 17, 628, 198, 198, 2, 5678, 262, 4578, 21136, 290, 21136, 262, 7159, 198, 499, 796, 1822, 29572, 13, 28100, 1713, 46677, 3419...
2.847328
393
import tfchain.tests.encoding.rivbin as testrivbin import tfchain.tests.encoding.siabin as testsiabin
[ 11748, 48700, 7983, 13, 41989, 13, 12685, 7656, 13, 15104, 8800, 355, 1332, 15104, 8800, 198, 11748, 48700, 7983, 13, 41989, 13, 12685, 7656, 13, 13396, 6014, 355, 5254, 72, 6014, 198 ]
3.1875
32
import numpy as np
[ 11748, 299, 32152, 355, 45941, 198 ]
3.166667
6
""""writer module handle writing the images to disk""" import webdataset as wds import json import pandas as pd import pyarrow.parquet as pq import pyarrow as pa import fsspec class BufferedParquetWriter: """Write samples to parquet files incrementally with a buffer""" def flush(self, force=False): ...
[ 15931, 15931, 16002, 8265, 5412, 3597, 262, 4263, 284, 11898, 37811, 198, 198, 11748, 3992, 19608, 292, 316, 355, 266, 9310, 198, 11748, 33918, 198, 11748, 19798, 292, 355, 279, 67, 198, 11748, 12972, 6018, 13, 1845, 21108, 355, 279, 80...
2.233134
1,171
import unittest import mock from mopidy_gmusic import ( GMusicExtension, backend as backend_lib, scrobbler_frontend)
[ 11748, 555, 715, 395, 198, 198, 11748, 15290, 198, 198, 6738, 285, 404, 19325, 62, 70, 28965, 1330, 357, 198, 220, 220, 220, 6951, 385, 291, 11627, 3004, 11, 30203, 355, 30203, 62, 8019, 11, 629, 305, 11848, 1754, 62, 8534, 437, 8, ...
2.818182
44
from PyQt6 import QtCore, QtWidgets import sys # ф-ция с основными настройками окна if __name__ == "__main__": app = QtWidgets.QApplication(sys.argv) InfoWindow = QtWidgets.QMainWindow() ui = UiInfoWindow() ui.setup_ui(InfoWindow) InfoWindow.show() sys.exit(app.exec())
[ 6738, 9485, 48, 83, 21, 1330, 33734, 14055, 11, 33734, 54, 312, 11407, 201, 198, 11748, 25064, 201, 198, 201, 198, 201, 198, 220, 220, 220, 1303, 220, 141, 226, 12, 141, 228, 18849, 40623, 220, 21727, 12466, 122, 21727, 22177, 25443, ...
1.83908
174
# -*- coding: utf-8 -*- # spearmint # # Academic and Non-Commercial Research Use Software License and Terms # of Use # # Spearmint is a software package to perform Bayesian optimization # according to specific algorithms (the “Software”). The Software is # designed to automatically run experiments (thus the code name ...
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 2, 693, 1670, 600, 198, 2, 198, 2, 31421, 290, 8504, 12, 48401, 4992, 5765, 10442, 13789, 290, 17637, 198, 2, 286, 5765, 198, 2, 198, 2, 2531, 1670, 600, 318, 257, ...
3.162663
4,537
import os import networkx as nx import pandas as pd import numpy as np from stellargraph.mapper import ( CorruptedGenerator, FullBatchNodeGenerator, ) from stellargraph import StellarGraph from stellargraph.layer import GCN, DeepGraphInfomax from tensorflow.keras.optimizers import Adam from tensorflow.keras.cal...
[ 11748, 28686, 198, 11748, 3127, 87, 355, 299, 87, 198, 11748, 19798, 292, 355, 279, 67, 198, 11748, 299, 32152, 355, 45941, 198, 6738, 336, 695, 853, 1470, 13, 76, 11463, 1330, 357, 198, 220, 220, 220, 2744, 31590, 8645, 1352, 11, 1...
2.605648
1,983
# Ignore pictures where the tagged concept has a probability below the threshold THRESHOLD = 0.9 # Number of pictures to index MAX_MEDIA = 1000 # Clarifai API details - http://www.clarifai.com/api CLARIFAI_APP_ID = 'xxx' CLARIFAI_APP_SECRET = 'xxx' # Algolia API details = http://www.clarifai.com/api ALGOLIA_APP_ID = ...
[ 2, 41032, 5986, 810, 262, 30509, 3721, 468, 257, 12867, 2174, 262, 11387, 198, 4221, 19535, 39, 15173, 796, 657, 13, 24, 198, 2, 7913, 286, 5986, 284, 6376, 198, 22921, 62, 30733, 3539, 796, 8576, 198, 198, 2, 15420, 361, 1872, 7824...
2.573684
190
import numpy as np
[ 11748, 299, 32152, 355, 45941, 628, 198 ]
3
7
# DESAFIO 067 # Faça um programa que mostre a tabuada de vários números, um de cada vez, para cada valor digitado # pelo usuário. O programa será interrompido quando o número solicitado for negativo. while True: num = int(input('Digite um número para ver sua tabuada: ')) print('-' * 30) if num < 0: ...
[ 2, 22196, 8579, 9399, 657, 3134, 198, 2, 18350, 50041, 23781, 1430, 64, 8358, 749, 260, 257, 7400, 84, 4763, 390, 410, 6557, 380, 418, 299, 21356, 647, 418, 11, 23781, 390, 269, 4763, 1569, 89, 11, 31215, 269, 4763, 1188, 273, 16839...
2.212264
212
from __future__ import division #brings in Python 3.0 mixed type calculations import numpy as np import os import pandas as pd import sys #find parent directory and import model parentddir = os.path.abspath(os.path.join(os.path.dirname(__file__), os.path.pardir)) sys.path.append(parentddir) from base.uber_model impo...
[ 6738, 11593, 37443, 834, 1330, 7297, 220, 1303, 1671, 654, 287, 11361, 513, 13, 15, 7668, 2099, 16765, 198, 11748, 299, 32152, 355, 45941, 198, 11748, 28686, 198, 11748, 19798, 292, 355, 279, 67, 198, 11748, 25064, 198, 198, 2, 19796, ...
1.918086
18,080
# Generated by Django 3.1.5 on 2021-02-16 20:41 from django.conf import settings from django.db import migrations, models import django.db.models.deletion import django.utils.timezone
[ 2, 2980, 515, 416, 37770, 513, 13, 16, 13, 20, 319, 33448, 12, 2999, 12, 1433, 1160, 25, 3901, 198, 198, 6738, 42625, 14208, 13, 10414, 1330, 6460, 198, 6738, 42625, 14208, 13, 9945, 1330, 15720, 602, 11, 4981, 198, 11748, 42625, 14...
3.04918
61
import torch import torch.nn as nn import torch.nn.functional as F import numpy as np # Custom from src.normalisation import channel, instance if __name__ == "__main__": C = 8 y = torch.randn([3,C,16,16]) y_dims = y.size() G = Generator(y_dims[1:], y_dims[0], C=C, n_residual_blocks=3, sample_noise=...
[ 11748, 28034, 198, 11748, 28034, 13, 20471, 355, 299, 77, 198, 11748, 28034, 13, 20471, 13, 45124, 355, 376, 198, 11748, 299, 32152, 355, 45941, 198, 198, 2, 8562, 198, 6738, 12351, 13, 11265, 5612, 1330, 6518, 11, 4554, 628, 198, 198...
2.308176
159
import pandas as pd from django.http import response from django.shortcuts import render,HttpResponse from .models import Person,report,management,Person_without_Aadhar import datetime from django.utils.timezone import utc from rest_framework import serializers, status,viewsets from rest_framework.views import APIView ...
[ 11748, 19798, 292, 355, 279, 67, 198, 6738, 42625, 14208, 13, 4023, 1330, 2882, 198, 6738, 42625, 14208, 13, 19509, 23779, 1330, 8543, 11, 43481, 31077, 198, 6738, 764, 27530, 1330, 7755, 11, 13116, 11, 27604, 11, 15439, 62, 19419, 62, ...
3.765
200
from exceptions.exceptions import ArgumentInvalid, ObjectsNotExist from typing import Generator, Optional from sqlalchemy import and_ from configures.const import POST_MINIMUM_WORDS from handlers import BaseHandler from models.database_models import Comment from models.database_models.post_model import Post from mode...
[ 6738, 13269, 13, 1069, 11755, 1330, 45751, 44651, 11, 35832, 3673, 3109, 396, 198, 6738, 19720, 1330, 35986, 11, 32233, 198, 198, 6738, 44161, 282, 26599, 1330, 290, 62, 198, 198, 6738, 4566, 942, 13, 9979, 1330, 24582, 62, 23678, 3955,...
4.173913
115
#!/usr/bin/env python """ Cubic spline peak finder. Hazen 03/16 """ import pickle import numpy import tifffile import storm_analysis.sa_library.analysis_io as analysisIO import storm_analysis.sa_library.fitting as fitting import storm_analysis.sa_library.ia_utilities_c as utilC import storm_analysis.sa_library.matc...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 37811, 198, 43632, 291, 4328, 500, 9103, 1064, 263, 13, 198, 198, 39, 1031, 268, 7643, 14, 1433, 198, 37811, 198, 198, 11748, 2298, 293, 198, 11748, 299, 32152, 198, 198, 11748, 256, ...
2.272038
1,055
import pandas as pd url = "https://en.wikipedia.org/wiki/Road_safety_in_Europe" target_table_name = "European Union Road Safety Facts and Figures" # Fetch all tables on webpage that match # provided table name and return as list df = pd.read_html(url, match=target_table_name) # Grab the first table df = df[0] if le...
[ 11748, 19798, 292, 355, 279, 67, 198, 198, 6371, 796, 366, 5450, 1378, 268, 13, 31266, 13, 2398, 14, 15466, 14, 29197, 62, 44708, 62, 259, 62, 16112, 1, 198, 16793, 62, 11487, 62, 3672, 796, 366, 22030, 4479, 5567, 11233, 26972, 290...
2.554593
577
import csv data = loaddata() for k,v in data.iteritems(): print len(k), k + ":" + v #return 0 if not a place #return 1 if it's region #return 2 if it's a province #return 3 if it's a munincipality
[ 11748, 269, 21370, 198, 198, 7890, 796, 3440, 7890, 3419, 198, 1640, 479, 11, 85, 287, 1366, 13, 2676, 23814, 33529, 198, 220, 220, 220, 3601, 18896, 7, 74, 828, 479, 1343, 366, 11097, 1343, 410, 220, 198, 220, 220, 220, 1303, 7783,...
2.494505
91
"""Test suite for the bootstrap_elasticsearch view of richie's search app.""" import json from unittest import mock from django.contrib.messages import get_messages from cms.test_utils.testcases import CMSTestCase from richie.apps.core.factories import UserFactory class BootstrapElasticsearchViewTestCase(CMSTestCa...
[ 37811, 14402, 18389, 329, 262, 6297, 26418, 62, 417, 3477, 12947, 1570, 286, 5527, 494, 338, 2989, 598, 526, 15931, 198, 11748, 33918, 198, 6738, 555, 715, 395, 1330, 15290, 198, 198, 6738, 42625, 14208, 13, 3642, 822, 13, 37348, 1095, ...
2.621279
1,579
# -*- coding: utf-8 -*- from __future__ import unicode_literals import time from django.db import models from django.utils.translation import ugettext_lazy as _ from app.core.models import Domain, Mailbox EXT_LIST_TYPE = ( ('general', _(u'普通邮件列表')), ('dept', _(u'部门邮件列表')), ('sys', _(u'系统邮件列表')) ) EXT_LIST_...
[ 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, 11748, 640, 198, 6738, 42625, 14208, 13, 9945, 1330, 4981, 198, 6738, 42625, 14208, 13, 26791, 13, 41519, ...
1.79682
566
#!/usr/bin/env python3 ''' @description : Given a gnomAD VCF, shortlist SNPs for a capture-based panel to detect allelic imbalance @created : 09/16/2020 @author : Cyriac Kandoth ''' from __future__ import division, print_function import os, sys, argparse, time, pysam if __name__ == "__main__": start_time = time.t...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 18, 198, 7061, 6, 198, 31, 11213, 1058, 11259, 257, 19967, 296, 2885, 569, 22495, 11, 1790, 4868, 11346, 12016, 329, 257, 8006, 12, 3106, 6103, 284, 4886, 28654, 677, 32556, 198, 31, 25598,...
2.703488
172
import socket import json import os import sys from threading import Thread from multiprocessing import Process from queue import Queue from logging import Formatter,getLogger,FileHandler from logging.handlers import TimedRotatingFileHandler,RotatingFileHandler import logging import time from functools import reduce l...
[ 11748, 17802, 198, 11748, 33918, 198, 11748, 28686, 198, 11748, 25064, 198, 6738, 4704, 278, 1330, 14122, 198, 6738, 18540, 305, 919, 278, 1330, 10854, 198, 6738, 16834, 1330, 4670, 518, 198, 6738, 18931, 1330, 5178, 1436, 11, 1136, 11187...
3.296875
192
from je_editor.utils.file.open.open_file import read_file def open_last_edit_file(file_from_output_content, code_editor): """ :param file_from_output_content: readied file from output content :param code_editor the editor to insert file content :return readied file open last edit file if succe...
[ 6738, 11223, 62, 35352, 13, 26791, 13, 7753, 13, 9654, 13, 9654, 62, 7753, 1330, 1100, 62, 7753, 628, 198, 4299, 1280, 62, 12957, 62, 19312, 62, 7753, 7, 7753, 62, 6738, 62, 22915, 62, 11299, 11, 2438, 62, 35352, 2599, 198, 220, 2...
2.642553
235
from __future__ import print_function import zmq import time ADDR='tcp://127.0.0.1:11155' ctx = zmq.Context() srv = ctx.socket(zmq.REP) srv.bind(ADDR) #srv.setsockopt(zmq.RCVTIMEO, 3000); while True: try: msg = srv.recv() except Exception as e: print('zmq socket revc timedout:', e) else: print('cl...
[ 6738, 11593, 37443, 834, 1330, 3601, 62, 8818, 198, 11748, 1976, 76, 80, 198, 11748, 640, 198, 198, 2885, 7707, 11639, 83, 13155, 1378, 16799, 13, 15, 13, 15, 13, 16, 25, 1157, 18742, 6, 198, 198, 49464, 796, 1976, 76, 80, 13, 219...
2.176796
181
from __future__ import annotations from typing import Dict, Any, List, TYPE_CHECKING if TYPE_CHECKING: from xml.etree.ElementTree import Element
[ 6738, 11593, 37443, 834, 1330, 37647, 198, 198, 6738, 19720, 1330, 360, 713, 11, 4377, 11, 7343, 11, 41876, 62, 50084, 2751, 198, 198, 361, 41876, 62, 50084, 2751, 25, 198, 220, 220, 220, 422, 35555, 13, 316, 631, 13, 20180, 27660, ...
3.377778
45
import os import sys from pathlib import Path from tkinter import * from tkinter import filedialog from os import listdir from os.path import isfile, join from nltk.tokenize.regexp import RegexpTokenizer from make_story import get_next_words, load_data_from_file BUTTONS_PER_COL = 8 DATA_PATH = "./data/" data = None ...
[ 11748, 28686, 198, 11748, 25064, 198, 6738, 3108, 8019, 1330, 10644, 198, 6738, 256, 74, 3849, 1330, 1635, 198, 6738, 256, 74, 3849, 1330, 5717, 498, 519, 198, 6738, 28686, 1330, 1351, 15908, 198, 6738, 28686, 13, 6978, 1330, 318, 7753,...
2.417431
654
from __future__ import absolute_import from __future__ import print_function import os import sys import six from conversion_imagenet import TestModels if __name__ == '__main__': test_mxnet()
[ 6738, 11593, 37443, 834, 1330, 4112, 62, 11748, 198, 6738, 11593, 37443, 834, 1330, 3601, 62, 8818, 198, 198, 11748, 28686, 198, 11748, 25064, 198, 11748, 2237, 198, 6738, 11315, 62, 320, 11286, 316, 1330, 6208, 5841, 1424, 628, 198, 19...
3.295082
61
# coding=utf-8 # # created by kpe on 15.Mar.2019 at 12:52 # from __future__ import absolute_import, division, print_function import tensorflow as tf from tensorflow.python import keras from tensorflow.python.keras import backend as K from bert.layer import Layer
[ 2, 19617, 28, 40477, 12, 23, 198, 2, 198, 2, 2727, 416, 479, 431, 319, 1315, 13, 7676, 13, 23344, 379, 1105, 25, 4309, 198, 2, 198, 198, 6738, 11593, 37443, 834, 1330, 4112, 62, 11748, 11, 7297, 11, 3601, 62, 8818, 198, 198, 117...
3.152941
85
# postgresql/pg8000.py # Copyright (C) 2005-2021 the SQLAlchemy authors and contributors <see AUTHORS # file> # # This module is part of SQLAlchemy and is released under # the MIT License: http://www.opensource.org/licenses/mit-license.php r""" .. dialect:: postgresql+pg8000 :name: pg8000 :dbapi: pg8000 :co...
[ 2, 1281, 34239, 13976, 14, 6024, 33942, 13, 9078, 198, 2, 15069, 357, 34, 8, 5075, 12, 1238, 2481, 262, 16363, 2348, 26599, 7035, 290, 20420, 1279, 3826, 37195, 20673, 198, 2, 2393, 29, 198, 2, 198, 2, 770, 8265, 318, 636, 286, 16...
3.023392
855
from tempfile import NamedTemporaryFile from cbmail.base import Attachment, BaseMail from cbmail.mixins import MailingListMixin from django.test import SimpleTestCase from mock import patch
[ 6738, 20218, 7753, 1330, 34441, 12966, 5551, 8979, 198, 198, 6738, 269, 65, 4529, 13, 8692, 1330, 3460, 15520, 11, 7308, 25804, 198, 6738, 269, 65, 4529, 13, 19816, 1040, 1330, 11099, 278, 8053, 35608, 259, 198, 6738, 42625, 14208, 13, ...
3.62963
54
from django.urls import path from . import views urlpatterns = [ path('', views.index, name='index'), path('check_db_connection', views.get_time, name="check_db"), ]
[ 6738, 42625, 14208, 13, 6371, 82, 1330, 3108, 198, 198, 6738, 764, 1330, 5009, 198, 198, 6371, 33279, 82, 796, 685, 198, 220, 220, 220, 3108, 10786, 3256, 5009, 13, 9630, 11, 1438, 11639, 9630, 33809, 198, 220, 220, 220, 3108, 10786, ...
2.793651
63
# coding=utf-8 import re import json import requests from bs4 import BeautifulSoup if __name__ == '__main__': print(get())
[ 2, 19617, 28, 40477, 12, 23, 198, 11748, 302, 198, 11748, 33918, 198, 11748, 7007, 198, 6738, 275, 82, 19, 1330, 23762, 50, 10486, 628, 198, 198, 361, 11593, 3672, 834, 6624, 705, 834, 12417, 834, 10354, 198, 220, 220, 220, 3601, 7,...
2.826087
46
import ast import operator import typing from collections import defaultdict from codegen import raml_types from codegen.generate_abstract import AbstractModuleGenerator from codegen.utils import reorder_class_definitions FIELD_TYPES = { "string": "marshmallow.fields.String", "object": "marshmallow.fields.Dic...
[ 11748, 6468, 198, 11748, 10088, 198, 11748, 19720, 198, 6738, 17268, 1330, 4277, 11600, 198, 198, 6738, 2438, 5235, 1330, 15770, 75, 62, 19199, 198, 6738, 2438, 5235, 13, 8612, 378, 62, 397, 8709, 1330, 27741, 26796, 8645, 1352, 198, 67...
1.988262
1,789
# This file is part of Synchronized-BatchNorm-PyTorch. # https://github.com/vacancy/Synchronized-BatchNorm-PyTorch # Distributed under MIT License. from .batchnorm import SynchronizedBatchNorm1d, SynchronizedBatchNorm2d, SynchronizedBatchNorm3d from .batchnorm import patch_sync_batchnorm, convert_model from .replicate...
[ 2, 770, 2393, 318, 636, 286, 16065, 11413, 1143, 12, 33, 963, 35393, 12, 20519, 15884, 354, 13, 198, 2, 3740, 1378, 12567, 13, 785, 14, 85, 330, 3883, 14, 50, 24871, 1143, 12, 33, 963, 35393, 12, 20519, 15884, 354, 198, 2, 4307, ...
3.25641
117
# -*- coding: utf-8 -*- # vim: sw=4:ts=4:expandtab """ riko.bado.io ~~~~~~~~~~~~ Provides functions for asynchronously reading files and urls Examples: basic usage:: >>> from riko import get_path >>> from riko.bado.io import async_url_open """ import pygogo as gogo from io import open from tempfi...
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 2, 43907, 25, 1509, 28, 19, 25, 912, 28, 19, 25, 11201, 392, 8658, 198, 37811, 198, 380, 7204, 13, 65, 4533, 13, 952, 198, 15116, 8728, 198, 15946, 1460, 5499, 329, ...
2.856742
356
#!/usr/bin/env python3 '''Search or create POTCAR file. The elements can be parsed manually, or read from POSCAR. ''' import os import sys from argparse import ArgumentParser, RawDescriptionHelpFormatter from mykit.core.utils import trim_after from mykit.vasp.poscar import Poscar from mykit.vasp.potcar import Potcar...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 18, 198, 7061, 6, 18243, 393, 2251, 350, 2394, 20034, 2393, 13, 198, 198, 464, 4847, 460, 307, 44267, 14500, 11, 393, 1100, 422, 28069, 20034, 13, 198, 7061, 6, 198, 198, 11748, 28686, 19...
2.930769
130
from typing import List, Optional from cloudrail.knowledge.context.aws.lambda_.lambda_alias import create_lambda_function_arn from cloudrail.knowledge.context.aws.iam.policy_statement import PolicyStatement from cloudrail.knowledge.context.aws.iam.policy import Policy from cloudrail.knowledge.context.aws.service_name ...
[ 6738, 19720, 1330, 7343, 11, 32233, 198, 198, 6738, 6279, 30224, 13, 45066, 13, 22866, 13, 8356, 13, 50033, 44807, 50033, 62, 26011, 1330, 2251, 62, 50033, 62, 8818, 62, 1501, 198, 6738, 6279, 30224, 13, 45066, 13, 22866, 13, 8356, 13...
3.003546
282
# automatically generated by the FlatBuffers compiler, do not modify # namespace: flat import flatbuffers
[ 2, 6338, 7560, 416, 262, 21939, 36474, 364, 17050, 11, 466, 407, 13096, 198, 198, 2, 25745, 25, 6228, 198, 198, 11748, 6228, 36873, 364, 198 ]
4.153846
26
# -*- coding: utf-8 -*- # Form implementation generated from reading ui file 'qt_window_test_ui.ui' # # Created: Fri Jan 16 22:18:17 2015 # by: PyQt4 UI code generator 4.9.1 # # WARNING! All changes made in this file will be lost! from PyQt4 import QtCore, QtGui try: _fromUtf8 = QtCore.QString.fromUtf8 exce...
[ 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, 39568, 62, 17497, 62, 9288, 62, 9019, 13, 9019, 6, 198, 2, 198, 2, 15622, 25, 19480, 2365, 1467, 2534, 25, ...
2.520548
146
# -*- coding: utf-8 -*- """ Tencent is pleased to support the open source community by making BK-LOG 蓝鲸日志平台 available. Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved. BK-LOG 蓝鲸日志平台 is licensed under the MIT License. License for BK-LOG 蓝鲸日志平台: ------------------------------------------------...
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 37811, 198, 24893, 1087, 318, 10607, 284, 1104, 262, 1280, 2723, 2055, 416, 1642, 347, 42, 12, 25294, 5525, 241, 251, 165, 110, 116, 33768, 98, 33232, 245, 33176, 111, ...
3.296636
654
"""Time humanizing functions.""" from __future__ import annotations import datetime as dt import enum import functools import math from typing import Any import human_readable.i18n as i18n _ = i18n.gettext P_ = i18n.pgettext N_ = i18n.ngettext @functools.total_ordering class Unit(enum.Enum): """Enum for minim...
[ 37811, 7575, 1692, 2890, 5499, 526, 15931, 198, 6738, 11593, 37443, 834, 1330, 37647, 198, 198, 11748, 4818, 8079, 355, 288, 83, 198, 11748, 33829, 198, 11748, 1257, 310, 10141, 198, 11748, 10688, 198, 6738, 19720, 1330, 4377, 198, 198, ...
2.430688
10,597
from django.utils.translation import gettext_lazy from rest_framework import serializers from rest_framework.settings import api_settings from datahub.search.apps import get_global_search_apps_as_mapping from datahub.search.query_builder import MAX_RESULTS from datahub.search.utils import SearchOrdering, SortDirection...
[ 6738, 42625, 14208, 13, 26791, 13, 41519, 1330, 651, 5239, 62, 75, 12582, 198, 6738, 1334, 62, 30604, 1330, 11389, 11341, 198, 6738, 1334, 62, 30604, 13, 33692, 1330, 40391, 62, 33692, 198, 198, 6738, 4818, 993, 549, 13, 12947, 13, 18...
2.774515
1,907
### Load arguments import sys, getopt if __name__ == "__main__": new_seq, model_ID = main(sys.argv[1:]) ### Load libraries from keras.layers.convolutional import Conv1D, MaxPooling1D from keras.layers.core import Dropout, Reshape, Dense, Activation, Flatten from keras.layers import BatchNormalization, InputLay...
[ 198, 21017, 8778, 7159, 198, 198, 11748, 25064, 11, 651, 8738, 198, 198, 361, 11593, 3672, 834, 6624, 366, 834, 12417, 834, 1298, 198, 220, 220, 649, 62, 41068, 11, 2746, 62, 2389, 796, 1388, 7, 17597, 13, 853, 85, 58, 16, 25, 129...
2.721284
592
j,i=65,-2 for I in range (1,14): J= j-5 I=i+3 print('I=%d J=%d' %(I,J)) j=J i=I
[ 220, 198, 73, 11, 72, 28, 2996, 12095, 17, 198, 1640, 314, 287, 2837, 357, 16, 11, 1415, 2599, 198, 220, 220, 220, 449, 28, 474, 12, 20, 198, 220, 220, 220, 314, 28, 72, 10, 18, 198, 220, 220, 220, 3601, 10786, 40, 28, 4, 67...
1.402778
72
#!/usr/bin/env python import argparse import copy import logging import os import random import time from typing import Dict, List, Tuple import numpy as np import torch import torch.nn as nn import torch.optim as optim import torchvision from torch.utils.data import DataLoader from torchvision import models from ut...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 198, 11748, 1822, 29572, 198, 11748, 4866, 198, 11748, 18931, 198, 11748, 28686, 198, 11748, 4738, 198, 11748, 640, 198, 6738, 19720, 1330, 360, 713, 11, 7343, 11, 309, 29291, 198, 198, ...
2.12045
1,511
""" Real time AEmotion (env: 'torch') """ # %% Import libs import pyaudio import numpy as np # import pickle # import librosa import keract import sys sys.path.append('..') from src.modeling.tcn.tcn import TCN import os import tensorflow as tf os.environ['CUDA_VISIBLE_DEVICES'] = '-1' from tensorflow.keras.models i...
[ 37811, 198, 15633, 640, 317, 10161, 9650, 357, 24330, 25, 705, 13165, 354, 11537, 198, 37811, 198, 2, 43313, 17267, 9195, 82, 198, 11748, 12972, 24051, 198, 11748, 299, 32152, 355, 45941, 198, 2, 1330, 2298, 293, 198, 2, 1330, 9195, 4...
2.897674
215
# Charlotte Capitanchik # 25.04.18 # Based on fastCLIP tRNA strategy # input is SAM of tRNA mapping # and .fai of what is was mapped to import pysam from collections import defaultdict import operator from collections import Counter import sys import statistics import random import re # input # #trna_fai = sys.argv...
[ 2, 14685, 4476, 270, 3702, 1134, 198, 2, 1679, 13, 3023, 13, 1507, 198, 2, 13403, 319, 3049, 5097, 4061, 256, 27204, 4811, 198, 2, 5128, 318, 28844, 286, 256, 27204, 16855, 198, 2, 290, 764, 69, 1872, 286, 644, 318, 373, 27661, 28...
2.545491
5,034
# -*- coding: utf-8 -*- """ Created on Mon Sep 13 11:10:35 2021 @author: Clau """ ''' Paper: Energy sufficiency, lowlands. User: Health Center ''' from core import User, np User_list = [] #Definig users HC = User("Health center", 1) User_list.append(HC) HC_indoor_bulb = HC.Appliance(HC,20,7,2,...
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 201, 198, 37811, 201, 198, 41972, 319, 2892, 8621, 1511, 1367, 25, 940, 25, 2327, 33448, 201, 198, 201, 198, 31, 9800, 25, 1012, 559, 201, 198, 37811, 201, 198, 201, 198, ...
1.909091
1,199
""" Estimate Lasso and Elastic-Net regression models on a manually generated sparse signal corrupted with an additive noise. """ # %% import numpy as np import matplotlib.pyplot as plt from sklearn.metrics import r2_score from sklearn.model_selection import train_test_split np.random.seed(42) n_samples, n_features = 5...
[ 37811, 198, 22362, 1920, 406, 28372, 290, 48567, 12, 7934, 20683, 4981, 319, 257, 14500, 7560, 29877, 198, 12683, 282, 26940, 351, 281, 38298, 7838, 13, 198, 37811, 198, 2, 43313, 198, 11748, 299, 32152, 355, 45941, 198, 11748, 2603, 29...
1.980237
1,012
"""This module solves kata https://www.codewars.com/kata/n-th-fibonacci.""" def original_solution(n): """Return the nth fibonacci number.""" if n == 1: return 0 a, b = 0, 1 for i in range(1, n - 1): a, b = b, (a + b) return b #better solution def nth_fib(n): """Return the nth f...
[ 37811, 1212, 8265, 39107, 479, 1045, 3740, 1378, 2503, 13, 19815, 413, 945, 13, 785, 14, 74, 1045, 14, 77, 12, 400, 12, 69, 571, 261, 44456, 526, 15931, 198, 198, 4299, 2656, 62, 82, 2122, 7, 77, 2599, 198, 220, 220, 220, 37227, ...
2.220339
236
import random_functions, colorama, Forensics_tool_redesigned_using_oops import sqlite3, getpass, os #module 5 - Browser Forensics #chrome_tool_start #chrome_tool_end #mozilla_tool_start #mozilla_tool_end
[ 11748, 4738, 62, 12543, 2733, 11, 3124, 1689, 11, 4558, 49242, 62, 25981, 62, 445, 274, 3916, 62, 3500, 62, 44860, 201, 198, 11748, 44161, 578, 18, 11, 651, 6603, 11, 28686, 201, 198, 201, 198, 2, 21412, 642, 532, 34270, 4558, 49242...
2.266055
109
# -*- coding: utf-8 -*- """ @author:XuMing(xuming624@qq.com) @description: """ import sys import unittest sys.path.append('..') from text2vec import SBert from text2vec import BM25 from sentence_transformers.util import cos_sim sbert_model = SBert('paraphrase-multilingual-MiniLM-L12-v2') if __name__ == '__main_...
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 37811, 198, 31, 9800, 25, 55, 84, 44, 278, 7, 87, 12595, 21, 1731, 31, 38227, 13, 785, 8, 198, 31, 11213, 25, 220, 198, 37811, 198, 11748, 25064, 198, 11748, 555, ...
2.510949
137
#!/usr/bin/env python3 import sys import argparse from nltk import sent_tokenize from nltk import word_tokenize from nltk import ngrams as nltk_ngrams from functools import partial LPAD_SYMBOL = "<s>" RPAD_SYMBOL = "</s>" nltk_ngrams = partial(nltk_ngrams, pad_right=True, pad_left=True, right_pad_symbol=RPA...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 18, 198, 198, 11748, 25064, 198, 11748, 1822, 29572, 198, 198, 6738, 299, 2528, 74, 1330, 1908, 62, 30001, 1096, 198, 6738, 299, 2528, 74, 1330, 1573, 62, 30001, 1096, 198, 6738, 299, 2528,...
2.389785
372
""" Usage: python small_satrn_inference.py vedastr/test.jpg """ import argparse import os import sys import cv2 from vedastr.runners import InferenceRunner from vedastr.utils import Config from pathlib import Path from vedastr.helper import download_drive_file home = str(Path.home()) if __name__ == '__main__': ...
[ 37811, 198, 28350, 25, 198, 29412, 1402, 62, 49720, 35906, 62, 259, 4288, 13, 9078, 410, 276, 459, 81, 14, 9288, 13, 9479, 198, 37811, 198, 11748, 1822, 29572, 198, 11748, 28686, 198, 11748, 25064, 198, 198, 11748, 269, 85, 17, 198, ...
2.877193
114
''' 给定一个二叉树和一个目标和,判断该树中是否存在根节点到叶子节点的路径,这条路径上所有节点值相加等于目标和。 说明: 叶子节点是指没有子节点的节点。 返回值:布尔值 ''' # Definition for a binary tree node. # class TreeNode: # def __init__(self, x): # self.val = x # self.left = None # self.right = None from collections import deque
[ 7061, 6, 198, 163, 119, 247, 22522, 248, 31660, 10310, 103, 12859, 234, 20998, 231, 43718, 239, 161, 240, 234, 31660, 10310, 103, 33566, 106, 43718, 229, 161, 240, 234, 171, 120, 234, 26344, 97, 23877, 255, 46237, 98, 43718, 239, 4079...
1.087452
263
"""Two way (mutual nearest neighbor) matcher. Authors: Ayush Baid """ from typing import Tuple import cv2 as cv import numpy as np from enum import Enum from gtsfm.common.keypoints import Keypoints from gtsfm.frontend.matcher.matcher_base import MatcherBase class MatchingDistanceType(Enum): """Type of distance...
[ 37811, 7571, 835, 357, 21973, 723, 16936, 4780, 8, 2603, 2044, 13, 198, 198, 30515, 669, 25, 13709, 1530, 347, 1698, 198, 37811, 198, 6738, 19720, 1330, 309, 29291, 198, 198, 11748, 269, 85, 17, 355, 269, 85, 198, 11748, 299, 32152, ...
2.292884
1,335
import scrapy from scrapy.loader import ItemLoader from mercadolibre.items import CelularItem ## #comment_js_7me > div > div > div > div:nth-child(2) > div > div > div > div.UFICommentContent > div._26f8 > div > span
[ 11748, 15881, 88, 198, 6738, 15881, 88, 13, 29356, 1330, 9097, 17401, 628, 198, 6738, 11991, 324, 349, 571, 260, 13, 23814, 1330, 15248, 934, 7449, 628, 198, 198, 2235, 1303, 23893, 62, 8457, 62, 22, 1326, 1875, 2659, 1875, 2659, 1875...
2.846154
78
import aiohttp
[ 11748, 257, 952, 4023, 628 ]
3.2
5
"""This module will update a binary feature matrix Z.""" import numpy as np import numpy.random as nr from . import logPX from . import logPV from . import sampleV # slice sampler def sampleZ(X, Z, A, sigma_x, sigma_a, alpha, K, N, D, realvaluedZ, proposeNewfeature): """Drawing Z using an uncollapsed Gibbs sampl...
[ 37811, 1212, 8265, 481, 4296, 257, 13934, 3895, 17593, 1168, 526, 15931, 198, 11748, 299, 32152, 355, 45941, 198, 11748, 299, 32152, 13, 25120, 355, 299, 81, 198, 6738, 764, 1330, 2604, 47, 55, 198, 6738, 764, 1330, 2604, 47, 53, 198,...
1.86618
1,644
from cbutil import Path from pathinfo import * for p in source_file_paths + header_file_paths: content = None with p.open('r') as fr: content = fr.read() if content != None and '\r' in content: print(p) with p.open('w', encoding = 'UTF-8') as fw: fw.write(content) ...
[ 6738, 269, 4360, 346, 1330, 10644, 198, 6738, 3108, 10951, 1330, 1635, 628, 198, 1640, 279, 287, 2723, 62, 7753, 62, 6978, 82, 1343, 13639, 62, 7753, 62, 6978, 82, 25, 198, 220, 220, 220, 2695, 796, 6045, 198, 220, 220, 220, 351, ...
2.182432
148
# -*- coding: utf-8 -*- # Generated by Django 1.9.2 on 2016-04-10 03:18 from __future__ import unicode_literals from django.db import migrations, models
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 2, 2980, 515, 416, 37770, 352, 13, 24, 13, 17, 319, 1584, 12, 3023, 12, 940, 7643, 25, 1507, 198, 6738, 11593, 37443, 834, 1330, 28000, 1098, 62, 17201, 874, 198, 19...
2.719298
57
import logging import argparse import sys import os import json import time import datetime from writers import csv_writer from writers import json_writer from utils import get_memory from utils import memory_limit from accessors.pride_data import get_filelist, get_projectlist, write_archive_file, download_projectli...
[ 11748, 18931, 198, 11748, 1822, 29572, 198, 11748, 25064, 198, 11748, 28686, 198, 11748, 33918, 198, 11748, 640, 198, 11748, 4818, 8079, 198, 198, 6738, 8786, 1330, 269, 21370, 62, 16002, 198, 6738, 8786, 1330, 33918, 62, 16002, 198, 198,...
2.60431
2,042
#!/usr/bin/env python # -*- coding: utf-8 -*- """Contains test cases for the utils.py module.""" import locale import sys import unittest from pathlib import Path from unittest import mock PATH = Path(__file__).parent sys.path.insert(0, str(PATH.parent)) from youtube_dl_gui import utils class TestUtils(unittest....
[ 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, 4264, 1299, 1332, 2663, 329, 262, 3384, 4487, 13, 9078, 8265, 526, 15931, 628, 198, 11748, 36693, 198, 1174...
2.531044
757
__version__ = "0.0.6" from .core import *
[ 834, 9641, 834, 796, 366, 15, 13, 15, 13, 21, 1, 198, 6738, 764, 7295, 1330, 1635 ]
2.411765
17
import os from jinja2 import Environment, FileSystemLoader import pypandoc import click import pathlib import re BEFORE="""{% extends 'layouts/main.html' %} {% block content %} """ AFTER=""" {% endblock %} """ # add option for substitution @click.command() @click.option('--var', '-v', multiple=True) @click.argumen...
[ 11748, 28686, 198, 6738, 474, 259, 6592, 17, 1330, 9344, 11, 9220, 11964, 17401, 198, 11748, 279, 4464, 392, 420, 198, 11748, 3904, 198, 11748, 3108, 8019, 198, 11748, 302, 628, 198, 12473, 30818, 2625, 15931, 90, 4, 14582, 705, 10724, ...
2.22504
631
''' Created on Oct 18, 2012 @author: mmunn Unit test : EUCA-2244 Default launch permission for user image (account resource) The fix for this issue changes the database so euca_conf --initialize must have been run with the fix present for this test to pass. setUp ...
[ 7061, 6, 198, 41972, 319, 2556, 1248, 11, 2321, 198, 31, 9800, 25, 285, 6199, 77, 198, 26453, 1332, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1058, 4576, 8141, 12, 24137, 19, 15161, 4219, 7170, 329, 2836, 2939, 357, 23317, 8271, ...
2.530086
349
# -*- coding: utf-8 -*- # Generated by Django 1.11.3 on 2017-08-09 19:01 from __future__ import unicode_literals from django.conf import settings from django.db import migrations, models import django.db.models.deletion import django.utils.timezone import django_remote_submission.models import model_utils.fields impor...
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 2, 2980, 515, 416, 37770, 352, 13, 1157, 13, 18, 319, 2177, 12, 2919, 12, 2931, 678, 25, 486, 198, 6738, 11593, 37443, 834, 1330, 28000, 1098, 62, 17201, 874, 198, 1...
3.037037
108
import os,urllib, urllib2 import raid path = '/home/lorenzo/projects/assets/GCF_52/' #testMultiple() #testOne('20674984470_1') #testOne('20675014450_1') #testOne('20673569920_1') testWS('20673569920_1')
[ 11748, 28686, 11, 333, 297, 571, 11, 2956, 297, 571, 17, 198, 11748, 9513, 198, 198, 6978, 796, 31051, 11195, 14, 75, 29578, 10872, 14, 42068, 14, 19668, 14, 15916, 37, 62, 4309, 14, 6, 198, 198, 2, 9288, 31217, 3419, 198, 2, 9288...
2.204301
93
import os import paho.mqtt.client as mqtt import time import mysql.connector import json print("Starting up!") sql_host = os.environ['SQL_HOST'] sql_user = os.environ['SQL_USER'] sql_passwd = os.environ['SQL_PASSWD'] sql_database = os.environ['SQL_DATABASE'] mqtt_host = os.environ['MQTT_HOST'] mqtt_user = os.en...
[ 11748, 28686, 198, 11748, 279, 17108, 13, 76, 80, 926, 13, 16366, 355, 285, 80, 926, 198, 11748, 640, 198, 11748, 48761, 13, 8443, 273, 198, 11748, 33918, 628, 220, 220, 220, 220, 198, 4798, 7203, 22851, 510, 2474, 8, 198, 198, 2541...
2.398034
407
import os import pdfkit PAGE_SIZE = "A4"
[ 11748, 28686, 198, 11748, 37124, 15813, 198, 198, 4537, 8264, 62, 33489, 796, 366, 32, 19, 1 ]
2.411765
17
import matplotlib.pyplot as plt from numpy import arange import pandas as pd import os import logging logging.basicConfig() logger = logging.getLogger('PlotEvalNumBar') logger.setLevel('INFO') if __name__ == '__main__': csv_path = r"../../../tests/mf_param_opt_tests/output/FidelityLevelTest.csv" bar_path = ...
[ 11748, 2603, 29487, 8019, 13, 9078, 29487, 355, 458, 83, 198, 6738, 299, 32152, 1330, 610, 858, 198, 11748, 19798, 292, 355, 279, 67, 198, 11748, 28686, 198, 11748, 18931, 198, 198, 6404, 2667, 13, 35487, 16934, 3419, 198, 6404, 1362, ...
2.533333
210