content
stringlengths
1
1.04M
input_ids
listlengths
1
774k
ratio_char_token
float64
0.38
22.9
token_count
int64
1
774k
# -*- coding: utf-8 -*- # # This file is part of Invenio. # Copyright (C) 2015-2018 CERN. # # Invenio is free software; you can redistribute it and/or modify it # under the terms of the MIT License; see LICENSE file for more details. """Models for storing information about OAIServer state.""" from datetime import dat...
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 2, 198, 2, 770, 2393, 318, 636, 286, 554, 574, 952, 13, 198, 2, 15069, 357, 34, 8, 1853, 12, 7908, 327, 28778, 13, 198, 2, 198, 2, 554, 574, 952, 318, 1479, 3788...
2.44269
1,457
import os import pandas as pd import sqlite3 CSV_FILEPATH = os.path.join(os.path.dirname(__file__), "..", "data", "buddymove_holidayiq.csv") DB_FILEPATH = os.path.join(os.path.dirname(__file__), "..", "data", "buddymove_holidayiq.db") connection = sqlite3.connect(DB_FILEPATH) table_name = "reviews2" df = pd.read_cs...
[ 198, 11748, 28686, 198, 11748, 19798, 292, 355, 279, 67, 198, 11748, 44161, 578, 18, 198, 198, 7902, 53, 62, 25664, 34219, 796, 28686, 13, 6978, 13, 22179, 7, 418, 13, 6978, 13, 15908, 3672, 7, 834, 7753, 834, 828, 366, 492, 1600, ...
2.845574
531
from .helpers import * from .logger import Logger
[ 6738, 764, 16794, 364, 1330, 1635, 198, 6738, 764, 6404, 1362, 1330, 5972, 1362 ]
3.5
14
# Copyright 2021 Thomas Battenfeld, Alexander Thomas, Johannes Köster. # Licensed under the BSD 2-Clause License (https://opensource.org/licenses/BSD-2-Clause) # This file may not be copied, modified, or distributed # except according to those terms. import sys sys.stderr = open(snakemake.log[0], "w") import altair ...
[ 2, 15069, 33448, 5658, 12350, 268, 16265, 11, 10009, 5658, 11, 38579, 509, 9101, 1706, 13, 198, 2, 49962, 739, 262, 347, 10305, 362, 12, 2601, 682, 13789, 357, 5450, 1378, 44813, 1668, 13, 2398, 14, 677, 4541, 14, 21800, 12, 17, 12,...
2.568504
635
# Generated by Django 2.0.1 on 2018-09-18 17:56 from django.db import migrations, models
[ 2, 2980, 515, 416, 37770, 362, 13, 15, 13, 16, 319, 2864, 12, 2931, 12, 1507, 1596, 25, 3980, 198, 198, 6738, 42625, 14208, 13, 9945, 1330, 15720, 602, 11, 4981, 628 ]
2.84375
32
#!/usr/bin/env python # -*- coding: utf-8 -*- from skimage import io,color,img_as_ubyte import random import os from 畫直方圖 import PH random.seed(100) Embed_mod('./oneshoe/oneshoe1-1','./oneshoe1','./oneshoe/oneshoe-edge.png',20,7) #input路徑+output路徑+原框路徑+數量+mod值 Embed_mod('./oneshoe/one...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 6738, 1341, 9060, 1330, 33245, 11, 8043, 11, 9600, 62, 292, 62, 549, 88, 660, 198, 11748, 4738, 198, 11748, 28686, 19...
1.508951
391
""" See https://github.com/mitsuhiko/flask-oauth/blob/master/example/google.py """ import flask from flask_oauth import OAuth import requests from sharebears import app _GOOGLE_REDIRECT_URI = "/sign_in_google_complete" _oauth = OAuth() _google = _oauth.remote_app("google", base_url="https://www.google.com/acco...
[ 37811, 198, 6214, 3740, 1378, 12567, 13, 785, 14, 24883, 7456, 12125, 14, 2704, 2093, 12, 12162, 1071, 14, 2436, 672, 14, 9866, 14, 20688, 14, 13297, 13, 9078, 198, 37811, 198, 198, 11748, 42903, 198, 6738, 42903, 62, 12162, 1071, 133...
2.495702
349
#!/usr/loca/bin/python ''' create an auth_key''' import time import base64 import pyDes from settings import USER_NAME, USER_ID, TOKEN_APP, TOKEN_KEY def gettoken(): ''' create an auth_key''' sign = '{}|{}|{}|{}'.format(USER_NAME, USER_ID, TOKEN_APP, int(time.time())) k = pyDes.des(TOKEN_KEY, pyDes.CBC, T...
[ 2, 48443, 14629, 14, 75, 11216, 14, 8800, 14, 29412, 198, 7061, 6, 2251, 281, 6284, 62, 2539, 7061, 6, 198, 11748, 640, 198, 11748, 2779, 2414, 198, 11748, 12972, 5960, 198, 6738, 6460, 1330, 1294, 1137, 62, 20608, 11, 1294, 1137, 6...
2.296703
182
''' Management and display of home page and other content pages. ''' default_app_config = 'mep.pages.apps.PagesConfig'
[ 7061, 6, 198, 48032, 290, 3359, 286, 1363, 2443, 290, 584, 2695, 5468, 13, 198, 7061, 6, 198, 198, 12286, 62, 1324, 62, 11250, 796, 705, 76, 538, 13, 31126, 13, 18211, 13, 47798, 16934, 6, 198 ]
3.243243
37
import os import glob import torch from torchtext.datasets.imdb import IMDB from nltk.tokenize.casual import TweetTokenizer import numpy as np UNK = 0 PAD = 1
[ 11748, 28686, 198, 11748, 15095, 198, 11748, 28034, 198, 6738, 28034, 5239, 13, 19608, 292, 1039, 13, 320, 9945, 1330, 8959, 11012, 198, 6738, 299, 2528, 74, 13, 30001, 1096, 13, 34004, 723, 1330, 18752, 30642, 7509, 198, 11748, 299, 32...
2.945455
55
# coding = utf-8 import face_recognition import cv2 import numpy as np import os, sys import time os.chdir('/home/pi/ZYDEMO/iota') # 创建视频对象 # 加载当前目录下名为'yht.jpg'的照片,照片里需要有且仅有一张脸,这张脸将作为认识的脸 # if __name__ == '__main__': # face_rec(None)
[ 2, 19617, 796, 3384, 69, 12, 23, 198, 11748, 1986, 62, 26243, 653, 198, 11748, 269, 85, 17, 198, 11748, 299, 32152, 355, 45941, 198, 11748, 28686, 11, 25064, 198, 11748, 640, 198, 198, 418, 13, 354, 15908, 10786, 14, 11195, 14, 1441...
1.318919
185
"""API data models"""
[ 37811, 17614, 1366, 4981, 37811, 198 ]
3.666667
6
from boa3.builtin import public @public
[ 6738, 1489, 64, 18, 13, 18780, 259, 1330, 1171, 628, 198, 31, 11377, 198 ]
3
14
from __future__ import division, print_function import numpy as np def sinusoid(p,t): ''' calculate sine function plus constant offset in y p - parameters (A, f, phi, b) t - discrete times ''' y = p[0]*np.sin(2*np.pi*p[1]*t+p[2]) + p[3] return y
[ 6738, 11593, 37443, 834, 1330, 7297, 11, 3601, 62, 8818, 198, 11748, 299, 32152, 355, 45941, 198, 198, 4299, 7813, 385, 1868, 7, 79, 11, 83, 2599, 628, 220, 220, 220, 705, 7061, 198, 220, 220, 220, 15284, 264, 500, 2163, 5556, 6937,...
2.305785
121
from django.contrib.auth import get_user_model from rest_framework.test import APITestCase from courses.models import Course from courses.tests.base import DatasetMixin, JWTAuthMixin User = get_user_model()
[ 6738, 42625, 14208, 13, 3642, 822, 13, 18439, 1330, 651, 62, 7220, 62, 19849, 198, 6738, 1334, 62, 30604, 13, 9288, 1330, 3486, 2043, 395, 20448, 198, 198, 6738, 10902, 13, 27530, 1330, 20537, 198, 6738, 10902, 13, 41989, 13, 8692, 13...
3.230769
65
#coding:utf-8 import sys import hashlib if __name__ == '__main__': main_test()
[ 2, 66, 7656, 25, 40477, 12, 23, 198, 198, 11748, 25064, 198, 11748, 12234, 8019, 198, 198, 361, 11593, 3672, 834, 6624, 705, 834, 12417, 834, 10354, 198, 197, 12417, 62, 9288, 3419, 198 ]
2.411765
34
import os import json from logging.handlers import TimedRotatingFileHandler import logging class ProcessStep(object): """ Base Class used to build data processing chain """ next_step = None def process(self, step_input): """ Process input and and return output """ return self.next(ste...
[ 11748, 28686, 198, 11748, 33918, 198, 6738, 18931, 13, 4993, 8116, 1330, 5045, 276, 24864, 803, 8979, 25060, 198, 198, 11748, 18931, 628, 198, 198, 4871, 10854, 8600, 7, 15252, 2599, 198, 220, 220, 220, 37227, 7308, 5016, 973, 284, 1382...
2.944039
411
''' create_machine.py allows users to create a FA ''' from xml.dom.minidom import parse, Node import re
[ 7061, 6, 198, 17953, 62, 30243, 13, 9078, 220, 198, 198, 47205, 2985, 284, 2251, 257, 9677, 198, 220, 198, 7061, 6, 198, 6738, 35555, 13, 3438, 13, 1084, 312, 296, 1330, 21136, 11, 19081, 198, 11748, 302, 628, 628, 220, 220, 220, ...
2.245614
57
# Copyright (c) 2017 Hedvig 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 required ...
[ 2, 15069, 357, 66, 8, 2177, 30920, 85, 328, 3457, 13, 198, 2, 1439, 6923, 33876, 13, 198, 2, 198, 2, 220, 220, 220, 49962, 739, 262, 24843, 13789, 11, 10628, 362, 13, 15, 357, 1169, 366, 34156, 15341, 345, 743, 198, 2, 220, 220,...
3.397351
302
# -*- coding: utf-8 -*- # MegEngine is Licensed under the Apache License, Version 2.0 (the "License") # # Copyright (c) 2014-2021 Megvii Inc. All rights reserved. # # Unless required by applicable law or agreed to in writing, # software distributed under the License is distributed on an # "AS IS" BASIS, WITHOUT ARRANTI...
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 2, 8336, 13798, 318, 49962, 739, 262, 24843, 13789, 11, 10628, 362, 13, 15, 357, 1169, 366, 34156, 4943, 198, 2, 198, 2, 15069, 357, 66, 8, 1946, 12, 1238, 2481, 833...
3.177885
208
# Copyright 2014-2018 PUNCH Cyber Analytics Group # # 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 applica...
[ 2, 220, 220, 15069, 1946, 12, 7908, 350, 47461, 15101, 30437, 4912, 198, 2, 198, 2, 220, 220, 49962, 739, 262, 24843, 13789, 11, 10628, 362, 13, 15, 357, 1169, 366, 34156, 15341, 198, 2, 220, 220, 345, 743, 407, 779, 428, 2393, 28...
3.724
250
#!/usr/bin/env python files = ['A96fig_withnames.tre', 'B98fig_withnames.tre', 'H98fig_withnames.tre', 'I85fig_withnames.tre', 'N98fig_withnames.tre', 'P95fig_withnames.tre', 'S90fig_withnames.tre'] trees = [] prefix = '../original data files/' for file in files...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 198, 16624, 796, 37250, 32, 4846, 5647, 62, 4480, 14933, 13, 33945, 3256, 198, 220, 220, 220, 220, 220, 220, 220, 220, 705, 33, 4089, 5647, 62, 4480, 14933, 13, 33945, 3256, 198, 220...
1.972477
327
from ..config import get_logger
[ 6738, 11485, 11250, 1330, 651, 62, 6404, 1362, 628 ]
3.666667
9
from main import application
[ 6738, 1388, 1330, 3586, 198 ]
5.8
5
r""" Processes the Excel file in: D:\data\NRSI\2263B_Turtle-Nest-Mound """ import pandas as pd import numpy as np import os # First - load all the folders baseDir = r"D:\data\NRSI\2263B_Turtle-Nest-Mound" def getDirectories(baseDir: str) -> list[str]: """Get the list of directories in the given base...
[ 81, 37811, 198, 220, 220, 220, 10854, 274, 262, 24134, 2393, 287, 25, 198, 220, 220, 220, 220, 220, 220, 220, 360, 7479, 7890, 59, 41256, 40, 59, 1828, 5066, 33, 62, 51, 17964, 12, 45, 395, 12, 44, 633, 198, 37811, 198, 11748, 1...
2.652574
1,088
entrada = int(input()) k = 0 while(k< entrada): num = int(input()) k += 1 soma = 0 for i in range(0,num): if( i%2 == 0): soma += 1 elif ( i% 2 != 0): soma = soma - 1 print(soma)
[ 298, 81, 4763, 796, 493, 7, 15414, 28955, 198, 198, 74, 796, 657, 198, 4514, 7, 74, 27, 24481, 4763, 2599, 198, 220, 220, 220, 997, 796, 493, 7, 15414, 28955, 198, 220, 220, 220, 479, 15853, 352, 198, 220, 220, 220, 3870, 64, 79...
1.744526
137
import numpy as np from robot_map import Map import os import json from a_star import AStarPlanner import matplotlib.pyplot as plt from dynamic_window_approach import main class MapGen: """Class for generating roads""" def test_case_generate(self): """Function that produces a list with states and ...
[ 11748, 299, 32152, 355, 45941, 198, 198, 6738, 9379, 62, 8899, 1330, 9347, 198, 198, 11748, 28686, 198, 11748, 33918, 198, 6738, 257, 62, 7364, 1330, 317, 8248, 20854, 1008, 198, 11748, 2603, 29487, 8019, 13, 9078, 29487, 355, 458, 83, ...
1.999565
2,299
""" This code is taken from the hyperlearn library: https://github.com/danielhanchen/hyperlearn/ And distributed together with the license therein: BSD 3-Clause License Copyright (c) 2020, Daniel Han-Chen All rights reserved. Redistribution and use in source and binary forms, with or without modification, are perm...
[ 37811, 198, 1212, 2438, 318, 2077, 422, 262, 8718, 35720, 5888, 25, 3740, 1378, 12567, 13, 785, 14, 67, 6321, 71, 1192, 831, 14, 49229, 35720, 14, 198, 198, 1870, 9387, 1978, 351, 262, 5964, 27258, 25, 628, 198, 21800, 513, 12, 2601...
2.946809
846
from django.conf.urls.defaults import patterns, url urlpatterns = patterns('cropper.views', url('^$', view='upload', name='cropper_upload'), url('^(?P<original_id>\d+)/$', view='crop', name='cropper_crop'), )
[ 6738, 42625, 14208, 13, 10414, 13, 6371, 82, 13, 12286, 82, 1330, 7572, 11, 19016, 198, 198, 6371, 33279, 82, 796, 7572, 10786, 19915, 2848, 13, 33571, 3256, 198, 220, 220, 220, 19016, 10786, 61, 3, 3256, 1570, 11639, 25850, 3256, 143...
2.626506
83
from pandocfilters import toJSONFilter, toJSONFilters, Math, Para, Image, RawInline, Str import sys import re import os if __name__ == "__main__": toJSONFilters([processCustomImageSize])
[ 6738, 19798, 420, 10379, 1010, 1330, 284, 40386, 22417, 11, 284, 40386, 11928, 1010, 11, 16320, 11, 2547, 64, 11, 7412, 11, 16089, 818, 1370, 11, 4285, 198, 11748, 25064, 198, 11748, 302, 198, 11748, 28686, 628, 198, 198, 361, 11593, ...
3.096774
62
from django.db import models from south.modelsinspector import add_introspection_rules add_introspection_rules([], ["^utils\.compressed_textfield\.StoryField"]) def uncompress_string(s): '''helper function to reverse django.utils.text.compress_string''' import cStringIO, gzip try: zbuf = cStringIO...
[ 6738, 42625, 14208, 13, 9945, 1330, 4981, 198, 198, 6738, 5366, 13, 27530, 1040, 806, 273, 1330, 751, 62, 600, 305, 31308, 62, 38785, 198, 2860, 62, 600, 305, 31308, 62, 38785, 26933, 4357, 14631, 61, 26791, 17405, 5589, 2790, 62, 523...
2.405128
195
import getpass import json import os import subprocess import sys import tempfile import uuid from . import config
[ 11748, 651, 6603, 198, 11748, 33918, 198, 11748, 28686, 198, 11748, 850, 14681, 198, 11748, 25064, 198, 11748, 20218, 7753, 198, 11748, 334, 27112, 198, 6738, 764, 1330, 4566, 628, 628, 198 ]
3.71875
32
# -*- coding: utf-8 -*- # vim: set noai syntax=python ts=4 sw=4: # # Copyright (c) 2018-2021 Linh Pham # wwdtm is released under the terms of the Apache License 2.0 """Wait Wait Don't Tell Me! Stats Location Data Utility Functions """ from functools import lru_cache from typing import Any, Dict, Optional from mysql.co...
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 2, 43907, 25, 900, 645, 1872, 15582, 28, 29412, 40379, 28, 19, 1509, 28, 19, 25, 198, 2, 198, 2, 15069, 357, 66, 8, 2864, 12, 1238, 2481, 5164, 71, 1380, 321, 198,...
2.313693
2,410
from typing import Union
[ 6738, 19720, 1330, 4479, 628 ]
5.2
5
import gi gi.require_version('Gtk', '3.0') from gi.repository import Gtk import json import sys import requests from concurrent.futures.thread import ThreadPoolExecutor from playstore.playstore import Playstore # Default credentials file location. credentials_default_location = 'credentials.json' # Default directory ...
[ 11748, 308, 72, 198, 12397, 13, 46115, 62, 9641, 10786, 38, 30488, 3256, 705, 18, 13, 15, 11537, 198, 6738, 308, 72, 13, 260, 1930, 37765, 1330, 402, 30488, 198, 11748, 33918, 198, 11748, 25064, 198, 11748, 7007, 198, 6738, 24580, 13,...
2.964664
283
import shodan import argparse import os import sys import re import time from dateutil.parser import parse from datetime import datetime, timedelta FINGERPRINT = [ {'name': 'MikroTik', 'filter': 'tcp/2000', 'test': 'contains', 'contains': ['product', 'MikroTik'], 'result': {'type': 'Router', 'device': 'MikroT...
[ 11748, 427, 45561, 198, 11748, 1822, 29572, 198, 11748, 28686, 198, 11748, 25064, 198, 11748, 302, 198, 11748, 640, 198, 6738, 3128, 22602, 13, 48610, 1330, 21136, 198, 6738, 4818, 8079, 1330, 4818, 8079, 11, 28805, 12514, 628, 198, 37, ...
2.44431
9,095
# --------------------------------------------------------------------------------------------- # # # This is a script for capturing stereo image pairs at a regular interval. It is intended to be # used to capture images for stereo camera calibration. The script shows the video stream for the # specified camera pair in...
[ 2, 16529, 1783, 32501, 1303, 198, 2, 198, 2, 770, 318, 257, 4226, 329, 21430, 24820, 2939, 14729, 379, 257, 3218, 16654, 13, 632, 318, 5292, 284, 307, 198, 2, 973, 284, 8006, 4263, 329, 24820, 4676, 36537, 13, 383, 4226, 2523, 262, ...
2.627148
1,164
import unittest from python_module import do_something if __name__ == '__main__': unittest.main()
[ 11748, 555, 715, 395, 198, 6738, 21015, 62, 21412, 1330, 466, 62, 18927, 198, 198, 361, 11593, 3672, 834, 6624, 705, 834, 12417, 834, 10354, 198, 220, 220, 220, 555, 715, 395, 13, 12417, 3419, 198 ]
2.861111
36
num_classes = 1 # model settings model = dict( type='CascadeRCNN', backbone=dict( type='ResNet', depth=50, num_stages=4, out_indices=(0, 1, 2, 3), frozen_stages=1, norm_cfg=dict(type='BN', requires_grad=True), norm_eval=True, style='pyt...
[ 22510, 62, 37724, 796, 352, 201, 198, 2, 2746, 6460, 201, 198, 19849, 796, 8633, 7, 201, 198, 220, 220, 220, 2099, 11639, 34, 28966, 7397, 6144, 3256, 201, 198, 220, 220, 220, 32774, 28, 11600, 7, 201, 198, 220, 220, 220, 220, 220...
1.608625
7,977
from django import forms
[ 6738, 42625, 14208, 1330, 5107, 628 ]
4.333333
6
import os import pandas as pd def read_book(title_path): """ read a book and return it as a string :param title_path: path to book :return: string with book content """ with open(title_path, "r", encoding="utf-8") as current_file: text = current_file.read() text = text.replace("...
[ 11748, 28686, 198, 11748, 19798, 292, 355, 279, 67, 198, 198, 4299, 1100, 62, 2070, 7, 7839, 62, 6978, 2599, 198, 220, 220, 220, 37227, 198, 220, 220, 220, 1100, 257, 1492, 290, 1441, 340, 355, 257, 4731, 198, 220, 220, 220, 1058, ...
2.556667
300
#test cases stk=Stack() stk.push(1) stk.push(2) stk.push(3) stk.push(4) stk.pop() stk.is_empty() stk.get_stack()
[ 201, 198, 2, 9288, 2663, 201, 198, 301, 74, 28, 25896, 3419, 201, 198, 301, 74, 13, 14689, 7, 16, 8, 201, 198, 301, 74, 13, 14689, 7, 17, 8, 201, 198, 301, 74, 13, 14689, 7, 18, 8, 201, 198, 301, 74, 13, 14689, 7, 19, 8, ...
1.620253
79
import os import sys import numpy as np from time import sleep import torch from test_tube import HyperOptArgumentParser, Experiment, SlurmCluster from pytorch_lightning.models.trainer import Trainer from pytorch_lightning.utils.arg_parse import add_default_args from pytorch_lightning.callbacks import EarlyStopping, ...
[ 11748, 28686, 198, 11748, 25064, 198, 11748, 299, 32152, 355, 45941, 198, 6738, 640, 1330, 3993, 198, 11748, 28034, 198, 198, 6738, 1332, 62, 29302, 1330, 15079, 27871, 28100, 1713, 46677, 11, 29544, 11, 3454, 333, 76, 2601, 5819, 198, ...
2.753355
1,565
# Copyright (C) 2022 Intel Corporation # SPDX-License-Identifier: Apache-2.0 # from mmcls.models.builder import CLASSIFIERS from mmcls.models.classifiers.image import ImageClassifier @CLASSIFIERS.register_module()
[ 2, 15069, 357, 34, 8, 33160, 8180, 10501, 198, 2, 30628, 55, 12, 34156, 12, 33234, 7483, 25, 24843, 12, 17, 13, 15, 198, 2, 198, 198, 6738, 8085, 565, 82, 13, 27530, 13, 38272, 1330, 42715, 5064, 40, 4877, 198, 6738, 8085, 565, ...
3.144928
69
# ***************************************************************************** # Copyright 2004-2008 Steve Menard # # 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...
[ 2, 41906, 17174, 4557, 35625, 198, 2, 220, 220, 15069, 5472, 12, 11528, 6542, 6065, 446, 198, 2, 198, 2, 220, 220, 49962, 739, 262, 24843, 13789, 11, 10628, 362, 13, 15, 357, 1169, 366, 34156, 15341, 198, 2, 220, 220, 345, 743, 40...
3.263736
546
# Copyright (c) OpenMMLab. All rights reserved. import argparse import os import os.path as osp import time import mmcv import torch from mmcls.apis import set_random_seed from mmcls.models import build_classifier from mmcv import DictAction from mmcv.parallel import MMDataParallel, MMDistributedDataParallel from mmcv...
[ 2, 15069, 357, 66, 8, 4946, 44, 5805, 397, 13, 1439, 2489, 10395, 13, 198, 11748, 1822, 29572, 198, 11748, 28686, 198, 11748, 28686, 13, 6978, 355, 267, 2777, 198, 11748, 640, 198, 198, 11748, 8085, 33967, 198, 11748, 28034, 198, 6738...
2.317365
334
class Node(object): """ Build nodes to add to dequeue """ _value = None _next = None class Dequeue(object): """ Class to make dequeue with nodes - nodes can be added and removed from both the head and tail of a dequeue""" head = None size = 0 tail = None curr = None def append(self...
[ 4871, 19081, 7, 15252, 2599, 198, 220, 220, 220, 37227, 10934, 13760, 284, 751, 284, 390, 36560, 37227, 198, 220, 220, 220, 4808, 8367, 796, 6045, 198, 220, 220, 220, 4808, 19545, 796, 6045, 198, 198, 4871, 1024, 36560, 7, 15252, 2599...
2.103361
1,190
import os import shutil from conans import ConanFile, tools from ghc import GHCBuild
[ 11748, 28686, 198, 11748, 4423, 346, 198, 6738, 369, 504, 1330, 31634, 8979, 11, 4899, 198, 6738, 24997, 66, 1330, 46615, 15580, 198 ]
3.695652
23
# Generated by wandb/proto/wandb_internal_codegen.py. DO NOT EDIT! import sys if sys.version_info >= (3, 8): from typing import Literal else: from typing_extensions import Literal DEPRECATED_FEATURES = Literal[ "keras_callback__data_type", "run__mode", "run__save_no_args", "run__join", ...
[ 2, 2980, 515, 416, 11569, 65, 14, 1676, 1462, 14, 86, 392, 65, 62, 32538, 62, 8189, 5235, 13, 9078, 13, 220, 8410, 5626, 48483, 0, 628, 198, 11748, 25064, 628, 198, 361, 25064, 13, 9641, 62, 10951, 18189, 357, 18, 11, 807, 2599, ...
2.408163
147
import random print("Welcome to guess the number!") #Infinite loop to keep the game running forever while True: print("I am thinking of a number between 1 and 100, try guessing what it is"); #Picks a ranodm number between 1 and 100, it does not include 101 number = random.randrange(1,101) #...
[ 11748, 4738, 201, 198, 201, 198, 4798, 7203, 14618, 284, 4724, 262, 1271, 2474, 8, 201, 198, 201, 198, 2, 18943, 9504, 9052, 284, 1394, 262, 983, 2491, 8097, 201, 198, 4514, 6407, 25, 201, 198, 220, 220, 220, 3601, 7203, 40, 716, ...
2.638243
387
import zipfile from google_drive_downloader import GoogleDriveDownloader as gdd from tqdm import tqdm import requests gdd.download_file_from_google_drive(file_id='1cQEjNIb11eOL4ZPKKvXPvdx9OVL324Zp', dest_path='./checkpoints.zip') with zipfile.ZipFile("checkpoints.zip", 'r') a...
[ 11748, 19974, 7753, 201, 198, 6738, 23645, 62, 19472, 62, 15002, 263, 1330, 3012, 24825, 10002, 263, 355, 308, 1860, 201, 198, 6738, 256, 80, 36020, 1330, 256, 80, 36020, 201, 198, 11748, 7007, 201, 198, 201, 198, 70, 1860, 13, 15002,...
2.147059
170
#! /usr/bin/env python # https://docs.pwntools.com/en/stable/elf/corefile.html from pwn import * target_name = './vuln_cpp.exe' # Set up pwntools for the correct architecture exe = context.binary = ELF(target_name) #print(exe.symbols) # Generate a cyclic pattern so that we can auto-find the offset payload = cyclic...
[ 2, 0, 1220, 14629, 14, 8800, 14, 24330, 21015, 198, 198, 2, 3740, 1378, 31628, 13, 79, 86, 429, 10141, 13, 785, 14, 268, 14, 31284, 14, 7046, 14, 7295, 7753, 13, 6494, 198, 198, 6738, 279, 675, 1330, 1635, 198, 198, 16793, 62, 3...
2.789238
446
"""SVM An interface for scikit-learn's C-Support Vector Classifier model. """ import logging import numpy as np import sklearn.svm from sklearn.multiclass import OneVsRestClassifier from libact.base.interfaces import ContinuousModel LOGGER = logging.getLogger(__name__) class SVM(ContinuousModel): """C-Suppo...
[ 37811, 50, 15996, 198, 198, 2025, 7071, 329, 629, 1134, 270, 12, 35720, 338, 327, 12, 15514, 20650, 5016, 7483, 2746, 13, 198, 37811, 198, 11748, 18931, 198, 198, 11748, 299, 32152, 355, 45941, 198, 11748, 1341, 35720, 13, 82, 14761, ...
3.160377
212
import numpy as np import tensorflow as tf import logging logger = logging.getLogger(__name__) from .text_util import EOS_ID, UNK_ID from .graph_util import * from .util import *
[ 198, 11748, 299, 32152, 355, 45941, 198, 11748, 11192, 273, 11125, 355, 48700, 198, 198, 11748, 18931, 198, 6404, 1362, 796, 18931, 13, 1136, 11187, 1362, 7, 834, 3672, 834, 8, 198, 198, 6738, 764, 5239, 62, 22602, 1330, 412, 2640, 62...
2.835821
67
""" Created on July 13, 2020 Updated on May 18, 2021 model: Deep & Cross Network for Ad Click Predictions @author: Ziyao Geng(zggzy1996@163.com) """ import tensorflow as tf from tensorflow.keras import Model from tensorflow.keras.regularizers import l2 from tensorflow.keras.layers import Embedding, Dense, Input fro...
[ 37811, 198, 41972, 319, 2901, 1511, 11, 12131, 198, 17354, 319, 1737, 1248, 11, 33448, 198, 198, 19849, 25, 10766, 1222, 6372, 7311, 329, 1215, 6914, 14322, 9278, 198, 198, 31, 9800, 25, 1168, 21008, 78, 402, 1516, 7, 89, 1130, 7357, ...
3.141593
113
# Generated by Django 2.1.2 on 2018-10-02 20:29 from django.db import migrations
[ 2, 2980, 515, 416, 37770, 362, 13, 16, 13, 17, 319, 2864, 12, 940, 12, 2999, 1160, 25, 1959, 198, 198, 6738, 42625, 14208, 13, 9945, 1330, 15720, 602, 628 ]
2.766667
30
# -*- coding: utf-8 -*- # Copyright (c) 2018-2021, earthobservations developers. # Distributed under the MIT License. See LICENSE for more info. from datetime import datetime, timedelta import h5py import pytest from wetterdienst.provider.dwd.radar import DwdRadarParameter, DwdRadarValues from wetterdienst.provider.d...
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 2, 15069, 357, 66, 8, 2864, 12, 1238, 2481, 11, 4534, 672, 3168, 602, 6505, 13, 198, 2, 4307, 6169, 739, 262, 17168, 13789, 13, 4091, 38559, 24290, 329, 517, 7508, 1...
2.322261
1,415
""" Groundwork documentation support module. """ import logging from groundwork.patterns.gw_base_pattern import GwBasePattern class GwDocumentsPattern(GwBasePattern): """ Documents can be collected by other Plugins to present their content inside user documentation, online help, console output or whatev...
[ 37811, 198, 35539, 1818, 10314, 1104, 8265, 13, 198, 37811, 198, 198, 11748, 18931, 198, 198, 6738, 40641, 13, 33279, 82, 13, 70, 86, 62, 8692, 62, 33279, 1330, 39661, 14881, 47546, 628, 198, 4871, 39661, 38354, 47546, 7, 38, 86, 1488...
2.542935
2,201
from __future__ import print_function import numpy as np import matplotlib.pyplot as plt from sklearn.svm import SVR from sklearn.model_selection import cross_val_score # For reproducibility np.random.seed(1000) nb_samples = 50 if __name__ == '__main__': # Create dataset X = np.arange(-nb_samples, nb_sa...
[ 6738, 11593, 37443, 834, 1330, 3601, 62, 8818, 198, 198, 11748, 299, 32152, 355, 45941, 198, 11748, 2603, 29487, 8019, 13, 9078, 29487, 355, 458, 83, 198, 198, 6738, 1341, 35720, 13, 82, 14761, 1330, 311, 13024, 198, 6738, 1341, 35720, ...
2.363112
347
from collections import defaultdict import numpy as np from bitarray import bitarray import re ''' script which mines frequent one cycles ''' # F1 is also generally kept and only further iterations have join and prune steps involved def findOneCyclePatterns(Tslice, minconfidence, periodicityhintarray, period_j): ...
[ 6738, 17268, 1330, 4277, 11600, 198, 11748, 299, 32152, 355, 45941, 198, 6738, 1643, 18747, 1330, 1643, 18747, 198, 11748, 302, 198, 198, 7061, 6, 198, 12048, 543, 18446, 10792, 530, 16006, 198, 7061, 6, 198, 198, 2, 376, 16, 318, 635...
2.720408
980
#!/bin/usr/env python3 """ Prints the Potential energy. Defaults to the 'Done' of l502 or l508 """ import os import argparse from pyssian import GaussianOutFile from pyssianutils.functions import potential_energy, write_2_file __version__ = '0.0.1' parser = argparse.ArgumentParser(description=__doc__) parser.add_a...
[ 2, 48443, 8800, 14, 14629, 14, 24330, 21015, 18, 198, 198, 37811, 198, 18557, 82, 262, 32480, 2568, 13, 2896, 13185, 284, 262, 705, 45677, 6, 286, 300, 35126, 393, 300, 33042, 198, 37811, 198, 198, 11748, 28686, 198, 198, 11748, 1822,...
2.267857
1,288
#Copyright 2010 Erik Tollerud # # 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 i...
[ 2, 15269, 3050, 22722, 44786, 263, 463, 198, 2, 198, 2, 220, 220, 49962, 739, 262, 24843, 13789, 11, 10628, 362, 13, 15, 357, 1169, 366, 34156, 15341, 198, 2, 220, 220, 345, 743, 407, 779, 428, 2393, 2845, 287, 11846, 351, 262, 13...
2.208871
7,124
# coding:utf-8 # 将图片以小分片的形式裁剪下来 import tkFileDialog import cv2 from configurationInjection import configInjection import os config = configInjection() config.loadConfiguration() rois = config.rois[0] flag = True videopath = tkFileDialog.askopenfilename(initialdir="/home/zb/myfile/cutSave") count = 0 cap = cv2.VideoC...
[ 2, 19617, 25, 40477, 12, 23, 198, 2, 10263, 108, 228, 32368, 122, 31965, 229, 20015, 98, 22887, 237, 26344, 228, 31965, 229, 21410, 37605, 95, 28156, 237, 32518, 223, 30298, 103, 10310, 233, 30266, 98, 198, 11748, 256, 74, 8979, 44204...
2.22113
407
import socket import fcntl import struct from domain.network_interface import NetworkInterface from provider import Provider
[ 11748, 17802, 198, 11748, 277, 66, 429, 75, 198, 11748, 2878, 198, 198, 6738, 7386, 13, 27349, 62, 39994, 1330, 7311, 39317, 198, 6738, 10131, 1330, 32549, 628 ]
4.535714
28
#!/usr/bin/env python # Builds against your current Python version. You must have numpy installed. from __future__ import print_function import distutils.sysconfig import distutils.version import os import numpy import re import shutil import subprocess import sys import sysconfig # http://stackoverflow.com/a/149811...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 198, 2, 10934, 82, 1028, 534, 1459, 11361, 2196, 13, 921, 1276, 423, 299, 32152, 6589, 13, 198, 198, 6738, 11593, 37443, 834, 1330, 3601, 62, 8818, 198, 11748, 1233, 26791, 13, 17597, ...
3.290909
110
from collections import ( Counter, ) from datetime import ( datetime, timezone, ) import doctest from itertools import chain import json import logging import os import re from unittest import ( TestCase, skip, ) from unittest.mock import Mock from uuid import UUID import warnings from atomicwrites...
[ 6738, 17268, 1330, 357, 198, 220, 220, 220, 15034, 11, 198, 8, 198, 6738, 4818, 8079, 1330, 357, 198, 220, 220, 220, 4818, 8079, 11, 198, 220, 220, 220, 640, 11340, 11, 198, 8, 198, 11748, 10412, 395, 198, 6738, 340, 861, 10141, 1...
2.819549
399
#!/usr/bin/env python3 # -*- coding: utf-8 -*- """ Created on Mon Apr 29 00:14:44 2019 @author: jay This code demostrates the current filter optimization by GA Apr29 00:14 As of this writing, the GA code is running correctly but it isn't evolving as expected. We will try to change the fitness function Apr29 14:47 A...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 18, 198, 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 37811, 198, 41972, 319, 2892, 2758, 2808, 3571, 25, 1415, 25, 2598, 13130, 198, 198, 31, 9800, 25, 474, 323, 198,...
2.080782
1,176
# encoding: utf-8 """ Copyright 2018 (c) Germán Arroyo Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, p...
[ 2, 21004, 25, 3384, 69, 12, 23, 198, 198, 37811, 198, 198, 15269, 2864, 357, 66, 8, 14164, 21162, 943, 3287, 78, 198, 198, 5990, 3411, 318, 29376, 7520, 11, 1479, 286, 3877, 11, 284, 597, 1048, 16727, 257, 4866, 286, 428, 3788, 29...
2.755782
1,081
# Copyright 2016 Dave Kludt # # 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, s...
[ 2, 15069, 1584, 9935, 14770, 463, 83, 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, ...
3.223325
403
# Copyright (c) 2021 Works Applications Co., Ltd. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or a...
[ 2, 15069, 357, 66, 8, 33448, 10933, 26622, 1766, 1539, 12052, 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, 2845, 287, 11846, 351, 2...
2.816648
889
abcd = Solution() print abcd.removeDuplicates([1,1,2])
[ 198, 397, 10210, 796, 28186, 3419, 198, 4798, 450, 10210, 13, 28956, 35660, 489, 16856, 26933, 16, 11, 16, 11, 17, 12962, 198 ]
2.434783
23
from spaceone.core.manager import BaseManager from spaceone.inventory.libs.connector import OCIConnector from spaceone.inventory.libs.schema.region import RegionResource, RegionResponse REGION_INFO = { # TODO # SAMPLE # 'eastus': {'name': 'US East (Virginia)', 'tags': {'latitude': '37.3719', 'longitude':...
[ 6738, 2272, 505, 13, 7295, 13, 37153, 1330, 7308, 13511, 198, 6738, 2272, 505, 13, 24807, 13, 8019, 82, 13, 8443, 273, 1330, 24775, 2149, 261, 1606, 273, 198, 6738, 2272, 505, 13, 24807, 13, 8019, 82, 13, 15952, 2611, 13, 36996, 133...
2.770492
122
# Copyright 2021 VMware, 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 required by a...
[ 2, 15069, 33448, 37754, 11, 3457, 13, 198, 2, 1439, 6923, 33876, 198, 2, 198, 2, 220, 220, 220, 49962, 739, 262, 24843, 13789, 11, 10628, 362, 13, 15, 357, 1169, 366, 34156, 15341, 345, 743, 198, 2, 220, 220, 220, 407, 779, 428, ...
3.107362
326
import logging import pyarrow import ray from collections import defaultdict import deltacat.compute.stats.utils.stats_completion_file as scf from deltacat.compute.stats.models.delta_stats_cache_result import DeltaStatsCacheResult from deltacat.compute.stats.models.manifest_entry_stats import ManifestEntryStats from ...
[ 11748, 18931, 198, 198, 11748, 12972, 6018, 198, 11748, 26842, 198, 6738, 17268, 1330, 4277, 11600, 198, 198, 11748, 1619, 83, 330, 265, 13, 5589, 1133, 13, 34242, 13, 26791, 13, 34242, 62, 785, 24547, 62, 7753, 355, 629, 69, 198, 673...
2.714531
1,163
''' Created on September 15, 2016 @author: compsecmonkey ''' import logging from configparser import ConfigParser from flask import Flask, jsonify from werkzeug.exceptions import HTTPException, default_exceptions from core.logs import prepare_logger from api.responses import prepare_200 app = None def make_json_...
[ 7061, 6, 198, 41972, 319, 2693, 1315, 11, 1584, 198, 198, 31, 9800, 25, 552, 2363, 49572, 198, 7061, 6, 198, 11748, 18931, 198, 6738, 4566, 48610, 1330, 17056, 46677, 198, 198, 6738, 42903, 1330, 46947, 11, 33918, 1958, 198, 6738, 266...
2.865248
423
# from linked_list.linked_list import LinkedList # def includes(self, value): # is_last = False # current = self.head # print(current) # while not is_last: # if str(current) == str(value): # return True # if current.next == None: # ...
[ 2, 422, 6692, 62, 4868, 13, 25614, 62, 4868, 1330, 7502, 276, 8053, 628, 198, 220, 220, 220, 1303, 825, 3407, 7, 944, 11, 1988, 2599, 198, 220, 220, 220, 1303, 220, 220, 220, 220, 318, 62, 12957, 796, 10352, 198, 220, 220, 220, ...
2.033333
300
#!/usr/bin/env python """ This module provides DatasetParent.ListChild data access object. """ from WMCore.Database.DBFormatter import DBFormatter class ListChild(DBFormatter): """ DatasetParent ListChild DAO class. """ def __init__(self, logger, dbi, owner=""): """ Add schema owner and...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 37811, 198, 1212, 8265, 3769, 16092, 292, 316, 24546, 13, 8053, 16424, 1366, 1895, 2134, 13, 198, 37811, 198, 6738, 370, 9655, 382, 13, 38105, 13, 11012, 8479, 1436, 1330, 20137, 8479, ...
2.305296
642
import requests import os import socket import shutil
[ 11748, 7007, 198, 11748, 28686, 198, 11748, 17802, 198, 11748, 4423, 346, 628, 628 ]
4.071429
14
import autobasedoc.autorpt as ar import copy class Header(ar.StyledTable): """ data object to store all data of header of one page """ def __init__(self, title=None, headerMarginTop=0.5, debug=False): """ """ super(Header, self).__init__() self.headerMarginTop = head...
[ 198, 11748, 1960, 672, 839, 420, 13, 2306, 273, 457, 355, 610, 198, 11748, 4866, 628, 198, 4871, 48900, 7, 283, 13, 18716, 992, 10962, 2599, 198, 220, 220, 220, 37227, 198, 220, 220, 220, 1366, 2134, 284, 3650, 477, 1366, 286, 13639...
1.897785
2,348
from django.template import Library, TemplateSyntaxError, Node from ecs.scratchpad.models import ScratchPad register = Library() @register.tag
[ 6738, 42625, 14208, 13, 28243, 1330, 10074, 11, 37350, 13940, 41641, 12331, 11, 19081, 198, 198, 6738, 304, 6359, 13, 1416, 36722, 15636, 13, 27530, 1330, 1446, 36722, 26114, 198, 198, 30238, 796, 10074, 3419, 198, 198, 31, 30238, 13, 1...
3.47619
42
import unittest from TPool import Pool from threading import Lock pairs = [] try: pyrange = xrange except: pyrange = range if __name__ == '__main__': unittest.main()
[ 11748, 555, 715, 395, 198, 198, 6738, 24525, 970, 1330, 19850, 198, 6738, 4704, 278, 1330, 13656, 198, 198, 79, 3468, 796, 17635, 198, 198, 28311, 25, 198, 220, 220, 220, 279, 2417, 858, 796, 2124, 9521, 198, 16341, 25, 198, 220, 22...
2.555556
72
import sim, os, collections # On-line collection of bottle graphs [Du Bois, OOSPLA 2013] # See tools/bottlegraph.py for a version that works on off-line data sim.util.register(BottleGraph())
[ 11748, 985, 11, 28686, 11, 17268, 198, 198, 2, 1550, 12, 1370, 4947, 286, 9294, 28770, 685, 35660, 3248, 271, 11, 440, 2640, 45710, 2211, 60, 198, 2, 4091, 4899, 14, 10985, 16606, 13, 9078, 329, 257, 2196, 326, 2499, 319, 572, 12, ...
3.344828
58
from cirq import num_qubits import torch import torch.nn as nn import torch.nn.functional as F from torch.autograd import Variable import torch from torch import nn from qtensor_ai.ParallelQTensor import (InnerProductCircuitComposer, ParallelQtreeSimulator, ...
[ 6738, 10774, 80, 1330, 997, 62, 421, 9895, 198, 11748, 28034, 198, 11748, 28034, 13, 20471, 355, 299, 77, 198, 11748, 28034, 13, 20471, 13, 45124, 355, 376, 198, 198, 6738, 28034, 13, 2306, 519, 6335, 1330, 35748, 198, 198, 11748, 280...
2.406557
305
import time #Ne lisez pas. Utilité = 0 print("Coucou les lycéens ! Alors c'est comment ?") time.sleep(5) #Oui, cela ne sers à rien ce truc. print("On essaye de tricher en SNT ? \n Oui je parle à vous les \nS \nE \nC \nO \nN \nD \nE \nS") time.sleep(3) #Concentre toi sur ton cours que plus tôt de chercher la solution à ...
[ 11748, 640, 1303, 8199, 300, 786, 89, 38836, 13, 7273, 6392, 2634, 796, 657, 198, 4798, 7203, 34, 280, 66, 280, 10287, 22404, 32682, 641, 5145, 978, 669, 269, 6, 395, 2912, 220, 1701, 8, 198, 2435, 13, 42832, 7, 20, 8, 1303, 46, ...
2.370166
181
""" Copyright 2013 Steven Diamond This file is part of CVXPY. CVXPY is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. CVXPY is distributed i...
[ 37811, 198, 15269, 2211, 8239, 13566, 198, 198, 1212, 2393, 318, 636, 286, 26196, 27481, 56, 13, 198, 198, 33538, 27481, 56, 318, 1479, 3788, 25, 345, 460, 17678, 4163, 340, 290, 14, 273, 13096, 198, 270, 739, 262, 2846, 286, 262, 2...
2.546448
1,098
# ------------------------------------------------------------------------------------------ # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License (MIT). See LICENSE in the repo root for license information. # -------------------------------------------------------------------...
[ 2, 220, 16529, 22369, 438, 198, 2, 220, 15069, 357, 66, 8, 5413, 10501, 13, 1439, 2489, 10395, 13, 198, 2, 220, 49962, 739, 262, 17168, 13789, 357, 36393, 737, 4091, 38559, 24290, 287, 262, 29924, 6808, 329, 5964, 1321, 13, 198, 2, ...
2.592892
619
from datetime import datetime from sqlalchemy.orm import sessionmaker, Session from app.contact import engine from app.models import Products if __name__ == '__main__': Session: sessionmaker = sessionmaker(bind=engine) session: Session = Session() product: list = fetch_by_current_date(connection=sess...
[ 6738, 4818, 8079, 1330, 4818, 8079, 198, 198, 6738, 44161, 282, 26599, 13, 579, 1330, 6246, 10297, 11, 23575, 198, 198, 6738, 598, 13, 32057, 1330, 3113, 198, 6738, 598, 13, 27530, 1330, 18675, 628, 628, 198, 361, 11593, 3672, 834, 66...
2.926829
164
from django.conf import settings from django.db import models
[ 6738, 42625, 14208, 13, 10414, 1330, 6460, 198, 6738, 42625, 14208, 13, 9945, 1330, 4981, 628 ]
3.9375
16
import re import pickle import numpy as np with open("shared/cited_100.pickle", "rb") as f: data = pickle.load(f) c=0 all_topics = {} for i, l in enumerate(data["topic_lists"]): abstract = data["abstracts"][i] abstract = re.sub(r'\s+', ' ', abstract) if abstract.find("$")!=-1: print("\n"*2) ...
[ 11748, 302, 198, 11748, 2298, 293, 198, 11748, 299, 32152, 355, 45941, 198, 4480, 1280, 7203, 28710, 14, 66, 863, 62, 3064, 13, 27729, 293, 1600, 366, 26145, 4943, 355, 277, 25, 198, 220, 220, 220, 1366, 796, 2298, 293, 13, 2220, 7,...
1.920988
405
""" plot countour """ import numpy as np import matplotlib.cm as cm import matplotlib.pyplot as plt from numpy.core.shape_base import block import pandas as pd plt.rcParams["font.family"] = "Times New Roman" data_1 = pd.read_csv("DemandData_50_005.txt") data_2 = pd.read_csv("DemandData_50_010.txt") x1 = np.unique...
[ 37811, 198, 220, 220, 220, 7110, 954, 454, 198, 37811, 198, 11748, 299, 32152, 355, 45941, 198, 11748, 2603, 29487, 8019, 13, 11215, 355, 12067, 198, 11748, 2603, 29487, 8019, 13, 9078, 29487, 355, 458, 83, 198, 6738, 299, 32152, 13, ...
2.054025
944
# push deer implementation # see https://github.com/easychen/pushdeer import requests from typing import Dict, Any
[ 2, 4574, 20096, 7822, 198, 2, 766, 3740, 1378, 12567, 13, 785, 14, 38171, 6607, 14, 14689, 2934, 263, 198, 198, 11748, 7007, 198, 6738, 19720, 1330, 360, 713, 11, 4377, 628 ]
3.65625
32
from .dividend_yield_downloaders import *
[ 6738, 764, 67, 1699, 437, 62, 88, 1164, 62, 15002, 364, 1330, 1635, 198 ]
3
14
from sqlalchemy import Table, Column, Integer, String, BigInteger, Boolean, ForeignKey, ForeignKeyConstraint, Numeric from cassiopeia_sqlstore.common import metadata, SQLBaseObject, map_object map_object(SQLParticipantAdditional)
[ 6738, 44161, 282, 26599, 1330, 8655, 11, 29201, 11, 34142, 11, 10903, 11, 4403, 46541, 11, 41146, 11, 8708, 9218, 11, 8708, 9218, 3103, 2536, 2913, 11, 399, 39223, 198, 198, 6738, 30606, 72, 3008, 544, 62, 25410, 8095, 13, 11321, 1330...
3.725806
62
from abc import ABC, abstractmethod from Bio import SeqIO import pandas as pd from .message import Message from fireworks.utils import index_to_list from fireworks.utils.exceptions import ParameterizationError from .component_map import Component_Map, PyTorch_Component_Map from .cache import LRUCache, LFUCache, Unlimit...
[ 6738, 450, 66, 1330, 9738, 11, 12531, 24396, 198, 6738, 16024, 1330, 1001, 80, 9399, 198, 11748, 19798, 292, 355, 279, 67, 198, 6738, 764, 20500, 1330, 16000, 198, 6738, 26056, 13, 26791, 1330, 6376, 62, 1462, 62, 4868, 198, 6738, 260...
3.300146
683
#!/usr/bin/env python from math import floor # Parent: floor(k / 2) # Children: (2k, 2k + 1) if __name__ == '__main__': a = Heap() a.insert(5) a.insert(6) a.insert(1) a.insert(4) a.insert(2) a.insert(3) print(a) a._print() print(a.remove_max()) print(a) a._pr...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 198, 6738, 10688, 1330, 4314, 628, 198, 220, 220, 220, 1303, 16774, 25, 4314, 7, 74, 1220, 362, 8, 198, 220, 220, 220, 1303, 8990, 25, 357, 17, 74, 11, 362, 74, 1343, 352, 8, 628...
1.917647
170
player1 = [] player2 = [] with open("poker.txt") as hands: for i in hands: player1.append(i.split()[0:5]) player2.append(i.split()[5:10]) conversion = {"A": 14, "J": 11, "Q": 12, "K": 13, "T": 10} results = {1: "High card", ...
[ 7829, 16, 796, 17635, 201, 198, 7829, 17, 796, 17635, 201, 198, 201, 198, 4480, 1280, 7203, 79, 11020, 13, 14116, 4943, 355, 2832, 25, 201, 198, 220, 220, 220, 329, 1312, 287, 2832, 25, 201, 198, 220, 220, 220, 220, 220, 220, 220,...
1.796552
580
import unittest import os from somef.cli import * test_data_path = "test_data/" # This repo does no longer have a file with ACK. # def test_issue_166(self): # header = {} # header['accept'] = 'application/vnd.github.v3+json' # text, github_data = load_repository_metadata("https://git...
[ 11748, 555, 715, 395, 198, 198, 11748, 28686, 198, 6738, 617, 69, 13, 44506, 1330, 1635, 198, 198, 9288, 62, 7890, 62, 6978, 796, 366, 9288, 62, 7890, 30487, 628, 198, 220, 220, 220, 1303, 770, 29924, 857, 645, 2392, 423, 257, 2393,...
2.303723
1,182
#!/usr/bin/env python # -*- coding: utf-8 -*- # # C++ version Copyright (c) 2006-2007 Erin Catto http://www.box2d.org # Python version by Ken Lauer / sirkne at gmail dot com # # This software is provided 'as-is', without any express or implied # warranty. In no event will the authors be held liable for any dam...
[ 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, 327, 4880, 2196, 15069, 357, 66, 8, 4793, 12, 12726, 28894, 327, 45807, 2638, 1378, 2503, ...
2.201881
1,382
#!/usr/bin/env python # -*- coding: UTF-8 -*- from base import BaseObject class InferenceAPI(BaseObject): """ Inference API """ def __init__(self, is_debug: bool = False): """ Created: 6-Nov-2019 craig.trim@ibm.com * https://github.ibm....
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 2, 532, 9, 12, 19617, 25, 41002, 12, 23, 532, 9, 12, 628, 198, 6738, 2779, 1330, 7308, 10267, 628, 198, 4871, 554, 4288, 17614, 7, 14881, 10267, 2599, 198, 220, 220, 220, 37227, 55...
1.987013
231
import os from os import walk from typing import Dict from PIL import Image, ImageDraw, ImageFilter, ImageFont import numpy as np import config def get_relative_positions(image, positions): """ Get the relative value of the positions when max image width and height equal 1. """ img_...
[ 11748, 28686, 198, 6738, 28686, 1330, 2513, 198, 6738, 19720, 1330, 360, 713, 198, 198, 6738, 350, 4146, 1330, 7412, 11, 7412, 25302, 11, 7412, 22417, 11, 7412, 23252, 198, 11748, 299, 32152, 355, 45941, 198, 198, 11748, 4566, 628, 628,...
2.77027
222