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 -*- # # ----------------------------------------------------------------------------------- # Copyright (c) Microsoft Open Technologies (Shanghai) Co. Ltd. All rights reserved. # # The MIT License (MIT) # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this softw...
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 2, 198, 2, 16529, 1783, 6329, 198, 2, 15069, 357, 66, 8, 5413, 4946, 21852, 357, 2484, 272, 20380, 8, 1766, 13, 12052, 13, 220, 1439, 2489, 10395, 13, 198, 2, 198, ...
4.048611
432
# Copyright (c) 2010, 2011 Diogo Becker # Distributed under the MIT License # See accompanying file LICENSE """ Dude output for experiments """ import utils import os import core import sys HEAD = '~'*80 HEAD2 = '~'*80 LINE = '-'*80 class PBar: """ A simple progress bar. Based on example at http://snipp...
[ 2, 15069, 357, 66, 8, 3050, 11, 2813, 6031, 24076, 40765, 198, 2, 4307, 6169, 739, 262, 17168, 13789, 198, 2, 4091, 19249, 2393, 38559, 24290, 198, 198, 37811, 198, 35, 2507, 5072, 329, 10256, 198, 37811, 198, 11748, 3384, 4487, 198, ...
2.834646
127
#! /usr/bin/python3.7 # soh cah toa main()
[ 2, 0, 1220, 14629, 14, 8800, 14, 29412, 18, 13, 22, 628, 198, 2, 523, 71, 269, 993, 284, 64, 198, 12417, 3419 ]
1.913043
23
import os import subprocess from setuptools import setup from distutils.command.install import install as _install setup( name='curig', version='0.1', author="LIU Honghao", author_email="stein.h.liu@gmail.com", description="GPU version of NUFFT and Radio astronomy gridder package", packag...
[ 198, 11748, 28686, 198, 11748, 850, 14681, 198, 6738, 900, 37623, 10141, 1330, 9058, 198, 6738, 1233, 26791, 13, 21812, 13, 17350, 1330, 2721, 355, 4808, 17350, 628, 628, 198, 40406, 7, 198, 220, 220, 220, 1438, 11639, 22019, 328, 3256,...
2.578947
247
from timeit import default_timer
[ 6738, 640, 270, 1330, 4277, 62, 45016, 628 ]
4.25
8
# # Define a custom noise model to be used during execution of Qiskit Aer simulator # # Note: this custom definition is the same as the default noise model provided # The code is provided here for users to copy to their own file and customize from qiskit.providers.aer.noise import NoiseModel, ReadoutError from qiskit...
[ 2, 198, 2, 2896, 500, 257, 2183, 7838, 2746, 284, 307, 973, 1141, 9706, 286, 1195, 1984, 270, 15781, 35375, 198, 2, 198, 198, 2, 5740, 25, 428, 2183, 6770, 318, 262, 976, 355, 262, 4277, 7838, 2746, 2810, 198, 2, 383, 2438, 318, ...
3.762376
101
#!/usr/bin/env python 3 import pika from QUANTAXIS.QAPubSub.base import base_ps from QUANTAXIS.QAPubSub.setting import (qapubsub_ip, qapubsub_password, qapubsub_port, qapubsub_user) ######### 生产者 ######### if __name__ == '__main__': import datetime p = publisher(exchange='z3...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 513, 198, 11748, 279, 9232, 628, 198, 6738, 19604, 1565, 5603, 55, 1797, 13, 48, 2969, 549, 7004, 13, 8692, 1330, 2779, 62, 862, 198, 6738, 19604, 1565, 5603, 55, 1797, 13, 48, 2969, 549,...
2.050251
199
"""Test doit_tasks/file_search.py.""" from calcipy.doit_tasks.doit_globals import DG from calcipy.doit_tasks.file_search import find_project_files_by_suffix def test_find_project_files_by_suffix(): """Test find_project_files_by_suffix.""" result = find_project_files_by_suffix(DG.meta.path_project, DG.meta.ig...
[ 37811, 14402, 466, 270, 62, 83, 6791, 14, 7753, 62, 12947, 13, 9078, 526, 15931, 198, 198, 6738, 42302, 541, 88, 13, 4598, 270, 62, 83, 6791, 13, 4598, 270, 62, 4743, 672, 874, 1330, 46133, 198, 6738, 42302, 541, 88, 13, 4598, 270...
2.503401
294
import http import pathlib import pytest import requests from django.utils import timezone from jcasts.episodes.factories import EpisodeFactory from jcasts.episodes.models import Episode from jcasts.podcasts.factories import CategoryFactory, PodcastFactory from jcasts.podcasts.models import Podcast from jcasts.podca...
[ 11748, 2638, 198, 11748, 3108, 8019, 198, 198, 11748, 12972, 9288, 198, 11748, 7007, 198, 198, 6738, 42625, 14208, 13, 26791, 1330, 640, 11340, 198, 198, 6738, 474, 40924, 13, 538, 8052, 13, 22584, 1749, 1330, 7922, 22810, 198, 6738, 47...
3.663717
113
# -*- coding: utf-8 -*- # # Copyright (C) 2020 Grzegorz Jacenków. # # 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...
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 2, 198, 2, 15069, 357, 34, 8, 12131, 1902, 89, 1533, 273, 89, 8445, 268, 74, 10205, 86, 13, 198, 2, 198, 2, 49962, 739, 262, 24843, 13789, 11, 10628, 362, 13, 15, ...
3.398551
276
from stable_baselines.common.cmd_util import make_atari_env from stable_baselines import SAC from stable_baselines.sac.policies import FeedForwardPolicy as SACPolicy from stable_baselines.common.policies import register_policy import tensorflow as tf import gym # There already exists an environment generator # that wi...
[ 6738, 8245, 62, 12093, 20655, 13, 11321, 13, 28758, 62, 22602, 1330, 787, 62, 35554, 62, 24330, 198, 6738, 8245, 62, 12093, 20655, 1330, 311, 2246, 198, 6738, 8245, 62, 12093, 20655, 13, 30584, 13, 79, 4160, 444, 1330, 18272, 39746, 3...
3.231111
225
"""A selection of utilities to allow for fast scanning of a mol file""" from __future__ import generators import re def molSplitter(file): """(file) -> for m in molSplitter(file) ... do something with mol""" lines = [] for line in file: if line.find("$$$$") == 0: yield "\n".join(lines) ...
[ 37811, 32, 6356, 286, 20081, 284, 1249, 329, 3049, 21976, 286, 257, 18605, 198, 7753, 37811, 198, 6738, 11593, 37443, 834, 1330, 27298, 198, 11748, 302, 198, 198, 4299, 18605, 26568, 1967, 7, 7753, 2599, 198, 220, 220, 220, 13538, 18109...
2.338624
189
# Copyright (c) 2013, summayya and contributors # For license information, please see license.txt import frappe from frappe import _, _dict # def get_data(filters): # company = filters.company # data = frappe.db.sql(f"""SELECT account, balance from `tabGL Entry` where company = \'{company}\'""") # return data ...
[ 2, 15069, 357, 66, 8, 2211, 11, 2160, 11261, 3972, 290, 20420, 198, 2, 1114, 5964, 1321, 11, 3387, 766, 5964, 13, 14116, 198, 198, 11748, 5306, 27768, 198, 6738, 5306, 27768, 1330, 4808, 11, 4808, 11600, 628, 628, 198, 2, 825, 651, ...
2.49505
202
from coreapp.models import * from datetime import datetime, date, timedelta from django.contrib.auth.models import Group, User, Permission import pytz india_timezone = pytz.timezone('Asia/Kolkata') #india_timezone.localize(datetime.strptime('Sep 1 2017 12:01AM', '%b %d %Y %I:%M%p'))
[ 6738, 4755, 1324, 13, 27530, 1330, 1635, 198, 6738, 4818, 8079, 1330, 4818, 8079, 11, 3128, 11, 28805, 12514, 198, 6738, 42625, 14208, 13, 3642, 822, 13, 18439, 13, 27530, 1330, 4912, 11, 11787, 11, 2448, 3411, 198, 11748, 12972, 22877,...
2.733333
105
#!/usr/bin/env python3 import logging import csv
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 18, 198, 198, 11748, 18931, 198, 11748, 269, 21370 ]
2.882353
17
#!/usr/bin/env python3 import asyncio import nemo import helper import config import discord from discord.ext.commands import has_permissions number_emojis = ["1⃣", "2⃣", "3⃣", "4⃣", "5⃣", "6⃣", "7⃣", "8⃣", "9⃣"] nemo = nemo.Nemo() @nemo.command("!") @has_permissions(administrator=True) @nemo.command("!help") @h...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 18, 198, 11748, 30351, 952, 198, 198, 11748, 36945, 78, 198, 11748, 31904, 198, 11748, 4566, 198, 11748, 36446, 198, 6738, 36446, 13, 2302, 13, 9503, 1746, 1330, 468, 62, 525, 8481, 198, 19...
2.511905
504
import setuptools with open("README.md", "r") as fh: long_description = fh.read() requirements = ["beancount","pandas"] setuptools.setup( name="beancount2dataframe", version="0.0.1", author="Dmitri Kourbatsky", author_email="camel109@gmail.com", decription="pandas driver t...
[ 11748, 900, 37623, 10141, 198, 198, 4480, 1280, 7203, 15675, 11682, 13, 9132, 1600, 366, 81, 4943, 355, 277, 71, 25, 198, 220, 220, 220, 890, 62, 11213, 796, 277, 71, 13, 961, 3419, 198, 198, 8897, 18883, 796, 14631, 1350, 1192, 608...
2.318296
399
#!/usr/bin/env python3 # Copyright (c) Meta Platforms, Inc. and affiliates. # # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. import logging from tempfile import NamedTemporaryFile from unittest.mock import patch from ax.utils.common.logger i...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 18, 198, 2, 15069, 357, 66, 8, 30277, 19193, 82, 11, 3457, 13, 290, 29116, 13, 198, 2, 198, 2, 770, 2723, 2438, 318, 11971, 739, 262, 17168, 5964, 1043, 287, 262, 198, 2, 38559, 24290, ...
3.356061
132
from enum import Enum
[ 6738, 33829, 1330, 2039, 388, 628 ]
3.833333
6
import re size = [] with open("allSize.txt") as inFile: for line in inFile: z = re.match(r'(.*)T ', line) if z: # print((z.groups())) # print z.group()[:-2] size.append(float(z.group()[:-2])) print sum(size)
[ 11748, 302, 198, 198, 7857, 796, 17635, 198, 4480, 1280, 7203, 439, 10699, 13, 14116, 4943, 355, 287, 8979, 25, 198, 220, 329, 1627, 287, 287, 8979, 25, 198, 220, 220, 220, 1976, 796, 302, 13, 15699, 7, 81, 6, 7, 15885, 8, 51, 4...
2.096491
114
# Lint as: python3 # Copyright 2020 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # https://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or ag...
[ 2, 406, 600, 355, 25, 21015, 18, 198, 2, 15069, 12131, 3012, 11419, 198, 2, 198, 2, 49962, 739, 262, 24843, 13789, 11, 10628, 362, 13, 15, 357, 1169, 366, 34156, 15341, 198, 2, 345, 743, 407, 779, 428, 2393, 2845, 287, 11846, 351,...
3.480851
235
import json data = None with open('sparql_result.json', 'r') as f: data = json.load(f) print(data['head']) food_ids_list = data['results']['bindings'] ids = [] for doc in food_ids_list: current_id = doc['id']['value'] ids.append(current_id) print(len(ids)) f = open('article_ids.csv', 'w') with f: ...
[ 11748, 33918, 198, 198, 7890, 796, 6045, 198, 4480, 1280, 10786, 82, 1845, 13976, 62, 20274, 13, 17752, 3256, 705, 81, 11537, 355, 277, 25, 198, 220, 220, 220, 1366, 796, 33918, 13, 2220, 7, 69, 8, 198, 198, 4798, 7, 7890, 17816, ...
2.154639
194
#!/usr/bin/env python2 # -*- coding: utf-8 -*- """ Created on Mon Jun 4 19:25:01 2018 @author: francesco """ import numpy as np import time from izi.izi import izi import matplotlib.pyplot as plt plt.ion() timestart = time.process_time() #%% #THIS IS THE TEST data shown in Fig 1 of Blanc et al., 2015 #fluxes from H...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 17, 198, 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 37811, 198, 41972, 319, 2892, 7653, 220, 604, 678, 25, 1495, 25, 486, 2864, 198, 198, 31, 9800, 25, 1216, 1817, ...
2.04047
766
""" Dynamic Edge-Conditioned Filters in Convolutional Neural Networks on Graphs https://github.com/mys007/ecc https://arxiv.org/abs/1704.02901 2017 Martin Simonovsky """ from __future__ import division from __future__ import print_function from builtins import range import torch import torch...
[ 37811, 201, 198, 220, 220, 220, 26977, 13113, 12, 48362, 276, 7066, 1010, 287, 34872, 2122, 282, 47986, 27862, 319, 29681, 82, 201, 198, 220, 220, 220, 3740, 1378, 12567, 13, 785, 14, 28744, 25816, 14, 68, 535, 201, 198, 220, 220, 2...
2.935294
850
""" Feature Store Dataclass ----------------------- This dataclass provides a unified interface to access Feast methods from within a feature store. """ import os from dataclasses import dataclass from datetime import datetime from typing import Any, Dict, List, Optional, Union import pandas as pd from dataclasses_...
[ 37811, 198, 38816, 9363, 16092, 330, 31172, 198, 19351, 6329, 198, 198, 1212, 4818, 330, 31172, 3769, 257, 22706, 7071, 284, 1895, 42936, 5050, 422, 1626, 257, 3895, 3650, 13, 220, 198, 37811, 198, 198, 11748, 28686, 198, 6738, 4818, 33...
3.743243
222
############### functions for borg # functions # by tatan ############### from termcolor import colored, cprint import colorama import random colorama.init() larrow = colored('>', 'green', attrs=['bold']) # for user input actmessages = colored('\nCurrently available actions:', 'green', attrs=['bold']) def plinpu...
[ 7804, 4242, 21017, 197, 197, 12543, 2733, 329, 275, 2398, 198, 2, 220, 5499, 220, 1303, 197, 197, 1525, 256, 39036, 198, 7804, 4242, 21017, 198, 6738, 3381, 8043, 1330, 16396, 11, 269, 4798, 198, 11748, 3124, 1689, 198, 11748, 4738, 1...
2.789604
404
import os import sys import logging import argparse import urllib import csv import utils import subprocess if __name__ == '__main__': parser = argparse.ArgumentParser() parser.add_argument('--name', required=True, dest='name', help='name package', default=None) parser.add_argument('--version', required=Tr...
[ 11748, 28686, 198, 11748, 25064, 198, 11748, 18931, 198, 11748, 1822, 29572, 198, 11748, 2956, 297, 571, 198, 11748, 269, 21370, 198, 11748, 3384, 4487, 198, 11748, 850, 14681, 198, 198, 361, 11593, 3672, 834, 6624, 705, 834, 12417, 834, ...
2.805128
390
import cv2 import numpy as np import glob file_array = [] img_array = [] for filename in glob.glob('./Diagnostics/local/Ratio/mass400/dist_function/IAT_E2_f1D_*.png'): file_array.append(filename) file_array.sort() for filename in file_array[:]: img = cv2.imread(filename) height, width, layers = img.shape ...
[ 11748, 269, 85, 17, 198, 11748, 299, 32152, 355, 45941, 198, 11748, 15095, 198, 198, 7753, 62, 18747, 796, 17635, 198, 9600, 62, 18747, 796, 17635, 198, 1640, 29472, 287, 15095, 13, 4743, 672, 7, 4458, 14, 18683, 4660, 34558, 14, 1200...
2.427313
227
#!/usr/bin/env python # -*- coding: utf-8 -*- import scipy import scipy.linalg from pyss.mpi.util.operation import hv def rayleigh_ritz(p, a, b, cv, comm, left=False, right=True, check_finite=True, homogeneous_eigvals=False): """ Rayleigh-Ritz Procedure using MPI parallelism. Parameter...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 198, 11748, 629, 541, 88, 198, 11748, 629, 541, 88, 13, 75, 1292, 70, 198, 6738, 12972, 824, 13, 3149, 72, 13, 2260...
2.43316
1,152
# Generated by Django 3.1 on 2021-02-19 14:05 from django.db import migrations, models
[ 2, 2980, 515, 416, 37770, 513, 13, 16, 319, 33448, 12, 2999, 12, 1129, 1478, 25, 2713, 198, 198, 6738, 42625, 14208, 13, 9945, 1330, 15720, 602, 11, 4981, 628 ]
2.966667
30
# -*- coding: utf-8 -*- # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software ...
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 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, 13...
3.702857
175
''' Please Pass the Coded Messages ============================== You need to pass a message to the bunny prisoners, but to avoid detection, the code you agreed to use is... obscure, to say the least. The bunnies are given food on standard-issue prison plates that are stamped with the numbers 0-9 for easier sorting...
[ 7061, 6, 198, 5492, 6251, 262, 327, 9043, 43534, 198, 4770, 25609, 855, 198, 198, 1639, 761, 284, 1208, 257, 3275, 284, 262, 44915, 10577, 11, 475, 284, 3368, 13326, 11, 262, 2438, 345, 4987, 284, 198, 779, 318, 986, 18611, 11, 284,...
3.423588
602
import os import shutil import tempfile from pathlib import Path try: from StringIO import StringIO except ImportError: from io import StringIO import dtoolcore from ruamel.yaml import YAML
[ 11748, 28686, 198, 11748, 4423, 346, 198, 11748, 20218, 7753, 198, 198, 6738, 3108, 8019, 1330, 10644, 198, 198, 28311, 25, 198, 220, 220, 220, 422, 10903, 9399, 1330, 10903, 9399, 198, 16341, 17267, 12331, 25, 198, 220, 220, 220, 422, ...
3.138462
65
from argparse import ArgumentParser import sys from jira import JIRA from jira_issue_recommender.util import get_comment, get_issues, get_issues_tfidf, get_most_similar
[ 6738, 1822, 29572, 1330, 45751, 46677, 198, 11748, 25064, 198, 198, 6738, 474, 8704, 1330, 449, 40, 3861, 198, 198, 6738, 474, 8704, 62, 21949, 62, 47335, 2194, 13, 22602, 1330, 651, 62, 23893, 11, 651, 62, 37165, 11, 651, 62, 37165, ...
3.245283
53
from trafpy.generator.src import builder from trafpy.generator.src.demand import Demand from trafpy.generator.src.tools import load_data_from_json, unpickle_data import glob import json import time from sqlitedict import SqliteDict import os if __name__ == '__main__': ''' Take path to previously generated ...
[ 6738, 1291, 69, 9078, 13, 8612, 1352, 13, 10677, 1330, 27098, 198, 6738, 1291, 69, 9078, 13, 8612, 1352, 13, 10677, 13, 28550, 1330, 34479, 198, 6738, 1291, 69, 9078, 13, 8612, 1352, 13, 10677, 13, 31391, 1330, 3440, 62, 7890, 62, 6...
2.065028
1,261
""" * 중복 문자 제거 중복된 문자를 제외하고 사전식 순서로 나열하라. 예제 1 - 입력 "bcabc" - 출력 "abc" 예제 2 - 입력 "cbacdcbc" - 출력 "acdb" """ if __name__ == '__main__': solution = Solution() param = "cbacdcb" print(solution.removeDuplicateLetters(param))
[ 37811, 198, 9, 23821, 97, 239, 167, 111, 113, 31619, 105, 116, 168, 252, 238, 23821, 254, 250, 166, 109, 108, 198, 168, 97, 239, 167, 111, 113, 167, 238, 250, 31619, 105, 116, 168, 252, 238, 167, 98, 120, 23821, 254, 250, 168, 2...
1.163366
202
#!/usr/bin/env python3 # -*- coding: utf-8 -*- import click from punica.tool.tool import Tool from .main import main @main.group('tool', invoke_without_command=True) @click.pass_context def tool_cmd(ctx): """ Data format conversion tool """ if ctx.invoked_subcommand is None: print('Usage: pu...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 18, 198, 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 198, 11748, 3904, 198, 6738, 4000, 3970, 13, 25981, 13, 25981, 1330, 16984, 198, 198, 6738, 764, 12417, 1330, 1388,...
2.360105
1,519
"""Utilities to validate Galaxy xml tool wrappers and extract information from the XSD schema. """ from typing import List from lxml import etree from pygls.lsp.types import Diagnostic, MarkupContent, MarkupKind from ..context import XmlContext from ..xml.document import XmlDocument from .constants import MSG_NO_DOC...
[ 37811, 18274, 2410, 284, 26571, 9252, 35555, 2891, 7917, 11799, 290, 7925, 198, 17018, 422, 262, 1395, 10305, 32815, 13, 198, 37811, 198, 198, 6738, 19720, 1330, 7343, 198, 198, 6738, 300, 19875, 1330, 2123, 631, 198, 6738, 12972, 4743, ...
2.663199
769
# Copyright 2013-2020 Lawrence Livermore National Security, LLC and other # Spack Project Developers. See the top-level COPYRIGHT file for details. # # SPDX-License-Identifier: (Apache-2.0 OR MIT) from spack import * class Foss(BundlePackage): """GNU Compiler Collection (GCC) based compiler toolchain, includ...
[ 2, 15069, 2211, 12, 42334, 13914, 45036, 3549, 2351, 4765, 11, 11419, 290, 584, 198, 2, 1338, 441, 4935, 34152, 13, 4091, 262, 1353, 12, 5715, 27975, 38162, 9947, 2393, 329, 3307, 13, 198, 2, 198, 2, 30628, 55, 12, 34156, 12, 33234,...
2.395639
321
# Licensed under a 3-clause BSD style license - see LICENSE.rst from __future__ import (absolute_import, division, print_function, unicode_literals) import numpy as np from astropy.stats import sigma_clip __all__ = ['find_imgcuts', 'img_stats', 'rescale_img', 'scale_linear', 'scale_s...
[ 2, 49962, 739, 257, 513, 12, 565, 682, 347, 10305, 3918, 5964, 532, 766, 38559, 24290, 13, 81, 301, 198, 6738, 11593, 37443, 834, 1330, 357, 48546, 62, 11748, 11, 7297, 11, 3601, 62, 8818, 11, 198, 220, 220, 220, 220, 220, 220, 22...
2.552348
7,622
#'!/usr/bin/env python #-*- coding:utf-8 -*- #!/usr/bin/python3 from chainer import Chain, functions, links from Encoder import Encoder from Decoder import Decoder import numpy as np from util.Common_function import CommonFunction
[ 2, 6, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 2, 12, 9, 12, 19617, 25, 40477, 12, 23, 532, 9, 12, 198, 2, 48443, 14629, 14, 8800, 14, 29412, 18, 198, 198, 6738, 6333, 263, 1330, 21853, 11, 5499, 11, 6117, 198, 6738, 14711...
3.28169
71
import sys script = sys.argv[0] filename = sys.argv[1] txt = open(filename) print(f"Here's your file {filename}:") print(txt.read()) print("Type the filename again:") file_again = input("> ") txt_again = open(file_again) print(txt_again.read())
[ 11748, 25064, 198, 198, 12048, 796, 25064, 13, 853, 85, 58, 15, 60, 198, 34345, 796, 25064, 13, 853, 85, 58, 16, 60, 198, 198, 14116, 796, 1280, 7, 34345, 8, 198, 198, 4798, 7, 69, 1, 4342, 338, 534, 2393, 1391, 34345, 38362, 49...
2.659574
94
"""Implements the COVID SEIR model as a TFP Joint Distribution""" import pandas as pd import geopandas as gp import numpy as np import xarray import tensorflow as tf import tensorflow_probability as tfp from gemlib.distributions import DiscreteTimeStateTransitionModel from covid19uk.util import impute_previous_cases...
[ 37811, 3546, 1154, 902, 262, 7375, 11008, 7946, 4663, 2746, 355, 257, 309, 5837, 16798, 27484, 37811, 198, 198, 11748, 19798, 292, 355, 279, 67, 198, 11748, 30324, 392, 292, 355, 27809, 198, 11748, 299, 32152, 355, 45941, 198, 11748, 21...
2.4228
1,807
from enum import Enum
[ 6738, 33829, 1330, 2039, 388, 628 ]
3.833333
6
# Auto-anchor utils
[ 2, 11160, 12, 3702, 273, 3384, 4487, 198 ]
2.5
8
#!/usr/bin/env python ''' Project: Geothon (https://github.com/MBoustani/Geothon) File: Vector/create_wkt_line.py Description: This code creates a wkt line from multi-points. Author: Maziyar Boustani (github.com/MBoustani) ''' try: import ogr except ImportError: from osgeo import ogr ...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 198, 7061, 6, 198, 16775, 25, 220, 220, 220, 220, 220, 220, 2269, 849, 261, 357, 5450, 1378, 12567, 13, 785, 14, 10744, 23968, 3216, 14, 10082, 849, 261, 8, 198, 8979, 25, 220, 220...
2.677019
322
from zeit.cms.interfaces import ICMSContent from zeit.content.article.interfaces import IArticle import argparse import logging import prometheus_client import zeit.cms.cli import zeit.find.interfaces import zeit.retresco.interfaces import zope.component REGISTRY = prometheus_client.CollectorRegistry() log = logging....
[ 6738, 41271, 270, 13, 46406, 13, 3849, 32186, 1330, 12460, 5653, 19746, 198, 6738, 41271, 270, 13, 11299, 13, 20205, 13, 3849, 32186, 1330, 314, 14906, 198, 11748, 1822, 29572, 198, 11748, 18931, 198, 11748, 1552, 36916, 62, 16366, 198, ...
2.371548
1,195
import numpy as np from numba import jit # Assumptions: # The stock price volatility is equal to the implied volatility and remains constant. # Geometric Brownian Motion is used to model the stock price. # Risk-free interest rates remain constant. # The Black-Scholes Model is used to price options contracts. # Dividen...
[ 11748, 299, 32152, 355, 45941, 198, 6738, 997, 7012, 1330, 474, 270, 198, 198, 2, 2195, 388, 8544, 25, 198, 2, 383, 4283, 2756, 30772, 318, 4961, 284, 262, 17142, 30772, 290, 3793, 6937, 13, 198, 2, 2269, 16996, 4373, 666, 20843, 31...
4.157895
114
# Copyright (c) 2014 Rackspace, Inc. # # 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 wr...
[ 2, 15069, 357, 66, 8, 1946, 37927, 13200, 11, 3457, 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, 262, 13789,...
3.81
200
# Copyright 2021 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, ...
[ 2, 15069, 33448, 3012, 11419, 198, 2, 198, 2, 49962, 739, 262, 24843, 13789, 11, 10628, 362, 13, 15, 357, 1169, 366, 34156, 15341, 198, 2, 345, 743, 407, 779, 428, 2393, 2845, 287, 11846, 351, 262, 13789, 13, 198, 2, 921, 743, 733...
2.663576
755
from django.conf.urls import patterns, url urlpatterns = patterns( 'wagtail.wagtailcore.views', # All front-end views are handled through Wagtail's core.views.serve mechanism. # Here we match a (possibly empty) list of path segments, each followed by # a '/'. If a trailing slash is not present, we leav...
[ 6738, 42625, 14208, 13, 10414, 13, 6371, 82, 1330, 7572, 11, 19016, 198, 198, 6371, 33279, 82, 796, 7572, 7, 198, 220, 220, 220, 705, 86, 363, 13199, 13, 86, 363, 13199, 7295, 13, 33571, 3256, 198, 220, 220, 220, 1303, 1439, 2166, ...
2.952381
168
import csv import importlib import importlib.util import re __all__ = [ 'camel_case_to_underscore', 'import_type', 'import_module_from_file', 'read_teams_from_file', ] first_cap_re = re.compile('(.)([A-Z][a-z]+)') all_cap_re = re.compile('([a-z0-9])([A-Z])') def read_teams_from_file(file_name: str):...
[ 11748, 269, 21370, 198, 11748, 1330, 8019, 198, 11748, 1330, 8019, 13, 22602, 198, 11748, 302, 198, 198, 834, 439, 834, 796, 685, 198, 220, 220, 220, 705, 66, 17983, 62, 7442, 62, 1462, 62, 41116, 7295, 3256, 198, 220, 220, 220, 705...
2.229021
572
############################################################################## # # Copyright (c) 2006-2008 Zope Foundation and Contributors. # All Rights Reserved. # # This software is subject to the provisions of the Zope Public License, # Version 2.1 (ZPL). A copy of the ZPL should accompany this distribution. # THI...
[ 29113, 29113, 7804, 4242, 2235, 198, 2, 198, 2, 15069, 357, 66, 8, 4793, 12, 11528, 1168, 3008, 5693, 290, 25767, 669, 13, 198, 2, 1439, 6923, 33876, 13, 198, 2, 198, 2, 770, 3788, 318, 2426, 284, 262, 8617, 286, 262, 1168, 3008, ...
4.354369
412
# Generated by Django 2.2.4 on 2019-09-07 14:22 import datetime from django.db import migrations, models
[ 2, 2980, 515, 416, 37770, 362, 13, 17, 13, 19, 319, 13130, 12, 2931, 12, 2998, 1478, 25, 1828, 198, 198, 11748, 4818, 8079, 198, 6738, 42625, 14208, 13, 9945, 1330, 15720, 602, 11, 4981, 628 ]
2.972222
36
from app.helpers.template_helpers import ( CENSUS_CY_BASE_URL, CENSUS_EN_BASE_URL, CENSUS_NIR_BASE_URL, ) from tests.integration.integration_test_case import IntegrationTestCase SIGN_OUT_URL_PATH = "/sign-out" SIGNED_OUT_URL_PATH = "/signed-out" ACCOUNT_SERVICE_LOG_OUT_URL = "http://localhost/logout" ACCOU...
[ 6738, 598, 13, 16794, 364, 13, 28243, 62, 16794, 364, 1330, 357, 198, 220, 220, 220, 327, 16938, 2937, 62, 34, 56, 62, 33, 11159, 62, 21886, 11, 198, 220, 220, 220, 327, 16938, 2937, 62, 1677, 62, 33, 11159, 62, 21886, 11, 198, ...
2.50303
165
#!/usr/bin/env python # -*- coding: utf-8 -*- """The definition of the base classes Host and VM which provide the necessary primitives to interact with a vm and test a submission bundle.""" from __future__ import with_statement # Use simplejson or Python 2.6 json, prefer simplejson. try: import simplejson as js...
[ 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, 464, 6770, 286, 262, 2779, 6097, 14504, 290, 16990, 543, 198, 15234, 485, 262, 3306, 2684, 20288, 284, 9427...
3.431818
176
import open3d as o3d import numpy as np import os import json import quaternion as quat import utils ################################################### ############### MAIN ################################################### do_white_background = False do_save = False dataset_name = 'easy' mesh_folder = '../results...
[ 11748, 1280, 18, 67, 355, 267, 18, 67, 198, 11748, 299, 32152, 355, 45941, 198, 11748, 28686, 198, 11748, 33918, 198, 11748, 627, 9205, 295, 355, 627, 265, 198, 11748, 3384, 4487, 198, 198, 29113, 14468, 21017, 198, 7804, 4242, 21017, ...
1.769076
3,984
# Generate table creation sql # # generate_table_sql.py schema parser_output_dir # Assumes that <schema>_hist exists # # Example: python generate_table_sql.py zte_cm_2g "data\cm\zte\gsm\parsed\in" # # Change log: # 23/11/2017 Make columns below text fields for Ericsson 2G cnaiv2 dumps # INTERNAL_CELL.UHPRIOTHR, # INT...
[ 2, 2980, 378, 3084, 6282, 44161, 198, 2, 220, 198, 2, 7716, 62, 11487, 62, 25410, 13, 9078, 32815, 30751, 62, 22915, 62, 15908, 198, 2, 2195, 8139, 326, 1279, 15952, 2611, 29, 62, 10034, 7160, 198, 2, 198, 2, 17934, 25, 21015, 771...
2.283136
1,607
from pyramid.httpexceptions import HTTPBadRequest, HTTPConflict, HTTPForbidden, HTTPInternalServerError, HTTPOk from pyramid.settings import asbool from pyramid.view import view_config from magpie import models from magpie.api import exception as ax from magpie.api import requests as ar from magpie.api import schemas ...
[ 6738, 27944, 13, 2804, 24900, 11755, 1330, 14626, 22069, 18453, 11, 14626, 18546, 13758, 11, 14626, 1890, 37978, 11, 14626, 37693, 10697, 12331, 11, 14626, 18690, 198, 6738, 27944, 13, 33692, 1330, 355, 30388, 198, 6738, 27944, 13, 1177, ...
2.553137
2,710
from pprint import pprint from aim.engine.repo.repo import AimRepo from aim.ql.grammar.statement import Statement if __name__ == '__main__': repo = AimRepo.get_working_repo(mode='r') query = 'metric_2, metric ' \ ' if experiment in (test_metrics, test_metrics_2)' \ ' and context.foo ...
[ 6738, 279, 4798, 1330, 279, 4798, 198, 198, 6738, 4031, 13, 18392, 13, 260, 7501, 13, 260, 7501, 1330, 36223, 6207, 78, 198, 6738, 4031, 13, 13976, 13, 4546, 3876, 13, 26090, 1330, 21983, 628, 198, 361, 11593, 3672, 834, 6624, 705, ...
2.567376
282
import requests from EvaMap.Metrics.metric import metric
[ 11748, 7007, 198, 198, 6738, 32355, 13912, 13, 9171, 10466, 13, 4164, 1173, 1330, 18663, 198 ]
3.625
16
from volga.format import Format from volga.protocols import supportsDeserialization class Schema(supportsDeserialization): """[summary] :param supportsDeserialization: [description] :type supportsDeserialization: [type] """ def __init__(self) -> None: """[summary]""" ... def...
[ 6738, 2322, 4908, 13, 18982, 1330, 18980, 198, 6738, 2322, 4908, 13, 11235, 4668, 82, 1330, 6971, 5960, 48499, 1634, 628, 198, 4871, 10011, 2611, 7, 18608, 2096, 5960, 48499, 1634, 2599, 198, 220, 220, 220, 13538, 17912, 49736, 60, 628,...
2.569149
188
static = """ bumped = lhs; """ inc = """ bumped = lhs + 1; """ sum = """ bumped = lhs + i; """ vsids = """ if (i % 256 == 0) unbumped = lhs * 0.5; bumped = lhs + 1; """ nvsids = """ unbumped = 0.8 * lhs; bumped = lhs + (1 - 0.8); ""...
[ 12708, 796, 37227, 198, 220, 220, 220, 220, 220, 220, 220, 38034, 796, 300, 11994, 26, 198, 220, 220, 220, 37227, 198, 1939, 796, 37227, 198, 220, 220, 220, 220, 220, 220, 220, 38034, 796, 300, 11994, 1343, 352, 26, 198, 220, 220, ...
1.715859
908
#---------------------------------------------------------------------- # Copyright (c) 2011-2016 Raytheon BBN Technologies # # Permission is hereby granted, free of charge, to any person obtaining # a copy of this software and/or hardware specification (the "Work") to # deal in the Work without restriction, including ...
[ 2, 10097, 23031, 198, 2, 15069, 357, 66, 8, 2813, 12, 5304, 7760, 1169, 261, 12597, 45, 21852, 198, 2, 198, 2, 2448, 3411, 318, 29376, 7520, 11, 1479, 286, 3877, 11, 284, 597, 1048, 16727, 198, 2, 257, 4866, 286, 428, 3788, 290, ...
3.911168
394
from ipykernel.kernelapp import IPKernelApp from .kernel import CafKernel IPKernelApp.launch_instance(kernel_class=CafKernel)
[ 6738, 20966, 88, 33885, 13, 33885, 1324, 1330, 6101, 42, 7948, 4677, 198, 6738, 764, 33885, 1330, 35046, 42, 7948, 198, 4061, 42, 7948, 4677, 13, 35681, 62, 39098, 7, 33885, 62, 4871, 28, 34, 1878, 42, 7948, 8, 198 ]
3.15
40
from __future__ import print_function from __future__ import unicode_literals import pwd from .exceptions import ValidationError def validator(func): """ :param: none_if_invalid """ return inline @validator @validator
[ 6738, 11593, 37443, 834, 1330, 3601, 62, 8818, 198, 6738, 11593, 37443, 834, 1330, 28000, 1098, 62, 17201, 874, 198, 198, 11748, 279, 16993, 198, 198, 6738, 764, 1069, 11755, 1330, 3254, 24765, 12331, 628, 198, 4299, 4938, 1352, 7, 2078...
2.963415
82
""" Basic text-based table classes """ import texttab.const as const from texttab.const import FG_COLOURS, BG_COLOURS
[ 37811, 198, 26416, 2420, 12, 3106, 3084, 6097, 198, 37811, 198, 11748, 2420, 8658, 13, 9979, 355, 1500, 198, 6738, 2420, 8658, 13, 9979, 1330, 25503, 62, 25154, 2606, 6998, 11, 34839, 62, 25154, 2606, 6998, 628 ]
3.216216
37
import unittest from reamber.algorithms.generate.sv.SvSequence import SvSequence, SvObj if __name__ == '__main__': unittest.main()
[ 11748, 555, 715, 395, 198, 198, 6738, 302, 7789, 13, 282, 7727, 907, 13, 8612, 378, 13, 21370, 13, 50, 85, 44015, 594, 1330, 44343, 44015, 594, 11, 44343, 49201, 628, 198, 198, 361, 11593, 3672, 834, 6624, 705, 834, 12417, 834, 1035...
2.574074
54
# Generated by Django 3.2.6 on 2021-08-22 07:57 from django.db import migrations
[ 2, 2980, 515, 416, 37770, 513, 13, 17, 13, 21, 319, 33448, 12, 2919, 12, 1828, 8753, 25, 3553, 198, 198, 6738, 42625, 14208, 13, 9945, 1330, 15720, 602, 628 ]
2.766667
30
# jsb/socklib/xmpp/presence.py # # """ Presence. """ # jsb imports from jsb.lib.eventbase import EventBase from jsb.utils.trace import whichmodule from jsb.lib.gozerevent import GozerEvent ## basic imports import time import logging ## classes
[ 2, 474, 36299, 14, 82, 735, 8019, 14, 87, 76, 381, 14, 18302, 594, 13, 9078, 198, 2, 198, 2, 198, 198, 37811, 46523, 13, 37227, 198, 198, 2, 474, 36299, 17944, 198, 198, 6738, 474, 36299, 13, 8019, 13, 15596, 8692, 1330, 8558, 1...
2.820225
89
#! python3 from itertools import chain KING_CACHE = [king_moves(i) for i in range(64)] NIGHT_CACHE = [night_moves(i) for i in range(64)] VERTICAL_CACHE = [vertical_moves(i) for i in range(64)] DIAGONAL_CACHE = [diagonal_moves(i) for i in range(64)] if __name__ == "__main__": from main import run run...
[ 2, 0, 21015, 18, 198, 6738, 340, 861, 10141, 1330, 6333, 198, 198, 37286, 62, 34, 2246, 13909, 796, 685, 3364, 62, 76, 5241, 7, 72, 8, 329, 1312, 287, 2837, 7, 2414, 15437, 198, 198, 45, 9947, 62, 34, 2246, 13909, 796, 685, 3847...
2.29078
141
# proxy module from __future__ import absolute_import from chaco.scales.scales import *
[ 2, 15741, 8265, 198, 6738, 11593, 37443, 834, 1330, 4112, 62, 11748, 198, 6738, 442, 10602, 13, 1416, 2040, 13, 1416, 2040, 1330, 1635, 198 ]
3.52
25
import construct as cs import construct_typed as cst import dataclasses import typing as t from . import GalleryItem @dataclasses.dataclass constr = "renamed_test" / cst.DataclassStruct(RenamedTest) gallery_item = GalleryItem( construct=constr, example_binarys={ "Zeros": bytes(constr.sizeof()), ...
[ 11748, 5678, 355, 50115, 198, 11748, 5678, 62, 774, 9124, 355, 269, 301, 198, 11748, 4818, 330, 28958, 198, 11748, 19720, 355, 256, 198, 6738, 764, 1330, 12917, 7449, 628, 198, 31, 19608, 330, 28958, 13, 19608, 330, 31172, 628, 198, 1...
2.754237
118
version = (0, 5, 1)
[ 9641, 796, 357, 15, 11, 642, 11, 352, 8, 198 ]
2
10
# =========================================================================== # # SINGLETON METACLASS # # =========================================================================== # # =========================================================================== # ...
[ 2, 38093, 2559, 855, 1303, 198, 2, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 311, 2751, 2538, 11357, 31243, 2246, 43, 10705, 220, 220, 220, ...
1.84507
1,065
MODE_ARM = 0 MODE_THUMB = 1 MODE_JAZELLE = 2 #IFLAGS - keep bottom 8-bits for cross-platform flags like envi.IF_NOFALL and envi.IF_BRFALL IF_PSR_S = 1<<32 # This DP instruciton can update CPSR IF_B = 1<<33 # Byte IF_H = 1<<35 # HalfWord IF_S = 1<<36 # Signed IF_...
[ 49058, 62, 33456, 220, 220, 220, 220, 220, 220, 220, 796, 657, 198, 49058, 62, 4221, 5883, 33, 220, 220, 220, 220, 220, 796, 352, 198, 49058, 62, 41, 22778, 3698, 2538, 220, 220, 220, 796, 362, 198, 198, 2, 40, 38948, 50, 532, 1...
2.115304
4,293
# Generated by Django 3.1.8 on 2021-10-08 11:32 from django.db import migrations, models
[ 2, 2980, 515, 416, 37770, 513, 13, 16, 13, 23, 319, 33448, 12, 940, 12, 2919, 1367, 25, 2624, 198, 198, 6738, 42625, 14208, 13, 9945, 1330, 15720, 602, 11, 4981, 628 ]
2.84375
32
from django.contrib import admin from grage.maintenance.models import Maintenance, MaintenanceItem admin.site.register([ Maintenance, MaintenanceItem, ])
[ 6738, 42625, 14208, 13, 3642, 822, 1330, 13169, 198, 198, 6738, 1036, 496, 13, 12417, 8219, 13, 27530, 1330, 34857, 11, 34857, 7449, 198, 198, 28482, 13, 15654, 13, 30238, 26933, 198, 220, 220, 220, 34857, 11, 34857, 7449, 11, 198, 12...
3.72093
43
# Copyright (c) 2015, Michael Boyle # See LICENSE file for details: <https://github.com/moble/scri/blob/master/LICENSE> import os import inspect import functools import warnings import socket import datetime import pprint import copy import numpy as np import quaternion import scipy.constants as spc from scipy.interpo...
[ 2, 15069, 357, 66, 8, 1853, 11, 3899, 37619, 198, 2, 4091, 38559, 24290, 2393, 329, 3307, 25, 1279, 5450, 1378, 12567, 13, 785, 14, 39949, 293, 14, 1416, 380, 14, 2436, 672, 14, 9866, 14, 43, 2149, 24290, 29, 198, 198, 11748, 2868...
2.353101
17,706
############################################################################ # This Python file is part of PyFEM, the code that accompanies the book: # # # # 'Non-Linear Finite Element Analysis of Solids and Structures' # # R. ...
[ 29113, 29113, 7804, 4242, 201, 198, 2, 220, 770, 11361, 2393, 318, 636, 286, 9485, 37, 3620, 11, 262, 2438, 326, 48159, 262, 1492, 25, 220, 1303, 201, 198, 2, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, ...
2.261065
1,333
# # PySNMP MIB module CISCO-XGCP-CAPABILITY (http://snmplabs.com/pysmi) # ASN.1 source file:///Users/davwang4/Dev/mibs.snmplabs.com/asn1/CISCO-XGCP-CAPABILITY # Produced by pysmi-0.3.4 at Mon Apr 29 18:05:30 2019 # On host DAVWANG4-M-1475 platform Darwin version 18.5.0 by user davwang4 # Using Python version 3.7.3 (def...
[ 2, 198, 2, 9485, 15571, 7378, 337, 9865, 8265, 36159, 8220, 12, 55, 38, 8697, 12, 33177, 32, 25382, 357, 4023, 1378, 16184, 76, 489, 8937, 13, 785, 14, 79, 893, 11632, 8, 198, 2, 7054, 45, 13, 16, 2723, 2393, 1378, 14, 14490, 14...
2.434857
2,341
from typing import Optional import numpy as np import pandas as pd from temporis.transformation import TransformerStep from scipy.signal import savgol_filter from sklearn.cluster import MiniBatchKMeans class SavitzkyGolayTransformer(TransformerStep): """Filter each feature using LOESS Parameters ------...
[ 6738, 19720, 1330, 32233, 198, 198, 11748, 299, 32152, 355, 45941, 198, 11748, 19798, 292, 355, 279, 67, 198, 6738, 10042, 271, 13, 7645, 1161, 1330, 3602, 16354, 8600, 198, 6738, 629, 541, 88, 13, 12683, 282, 1330, 6799, 70, 349, 62,...
2.451754
1,596
# coding: utf-8 # Copyright (c) 2016, 2022, Oracle and/or its affiliates. All rights reserved. # This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may c...
[ 2, 19617, 25, 3384, 69, 12, 23, 198, 2, 15069, 357, 66, 8, 1584, 11, 33160, 11, 18650, 290, 14, 273, 663, 29116, 13, 220, 1439, 2489, 10395, 13, 198, 2, 770, 3788, 318, 10668, 12, 36612, 284, 345, 739, 262, 14499, 2448, 33532, 1...
2.804944
2,589
# -*- coding: utf-8 -*- """CLI debug commands.""" # system module import math import time from typing import TYPE_CHECKING from uuid import UUID # community module import click from dateutil import parser from circle_core.timed_db import TimedDBBundle if TYPE_CHECKING: from typing import List, Tuple @click.g...
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 37811, 5097, 40, 14257, 9729, 526, 15931, 198, 198, 2, 1080, 8265, 198, 11748, 10688, 198, 11748, 640, 198, 6738, 19720, 1330, 41876, 62, 50084, 2751, 198, 6738, 334, 27...
2.763265
245
#!/usr/bin/python3 from urllib.request import urlopen from html.parser import HTMLParser from subprocess import call from functools import partial, wraps from typing import Any, List, Tuple import re import argparse import platform TEMPLATE = 'template.cc' LANGUAGE = 'C++17' SAMPLE_INPUT = 'input' SAMPLE_OUTPUT = ...
[ 2, 48443, 14629, 14, 8800, 14, 29412, 18, 198, 198, 6738, 2956, 297, 571, 13, 25927, 1330, 19016, 9654, 198, 6738, 27711, 13, 48610, 1330, 11532, 46677, 198, 198, 6738, 850, 14681, 1330, 869, 198, 6738, 1257, 310, 10141, 1330, 13027, ...
2.542857
210
from config.mysql import mysql_config_dev, mysql_config_prod
[ 6738, 4566, 13, 28744, 13976, 1330, 48761, 62, 11250, 62, 7959, 11, 48761, 62, 11250, 62, 1676, 67 ]
3.333333
18
""" Clean Keywords =============================================================================== Cleans the keywords columns using the file keywords.txt, located in the same directory as the documents.csv file. >>> from techminer2 import * >>> directory = "/workspaces/techminer2/data/" >>> clean_keywords(directory...
[ 37811, 198, 32657, 7383, 10879, 198, 23926, 25609, 18604, 198, 198, 34, 11861, 262, 26286, 15180, 1262, 262, 2393, 26286, 13, 14116, 11, 5140, 287, 220, 198, 1169, 976, 8619, 355, 262, 4963, 13, 40664, 2393, 13, 198, 198, 33409, 422, ...
2.780695
1,295
import json from datetime import datetime, timedelta from django.urls import reverse import jwt from allauth.socialaccount.tests import OAuth2TestsMixin from allauth.tests import MockedResponse, TestCase from .provider import AppleProvider # Generated on https://mkjwk.org/, used to sign and verify the apple id_to...
[ 11748, 33918, 198, 6738, 4818, 8079, 1330, 4818, 8079, 11, 28805, 12514, 198, 198, 6738, 42625, 14208, 13, 6371, 82, 1330, 9575, 198, 198, 11748, 474, 46569, 198, 198, 6738, 477, 18439, 13, 14557, 23317, 13, 41989, 1330, 440, 30515, 17,...
1.522587
2,103
import webbrowser import sys import os import os.path import api def open_existing_link(search_key): """ Opens a link given particular key :param search_key: key to search in the quicklinks file :return: """ did_succeed = api.search_for_value(search_key, open_link) if not did_succeed...
[ 11748, 3992, 40259, 198, 11748, 25064, 198, 11748, 28686, 198, 11748, 28686, 13, 6978, 198, 11748, 40391, 628, 628, 198, 198, 4299, 1280, 62, 25687, 62, 8726, 7, 12947, 62, 2539, 2599, 198, 220, 220, 220, 37227, 198, 220, 220, 220, 86...
2.700405
247
#!/usr/bin/env python3 from model_weights import * import argparse if __name__ == "__main__": parser = argparse.ArgumentParser(description='Export tensorflow variables from checkpoint to numpy file') parser.add_argument('logdir', metavar='TF_LOGDIR', type=str, help='the tensorflow log ...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 18, 198, 198, 6738, 2746, 62, 43775, 1330, 1635, 198, 11748, 1822, 29572, 198, 198, 361, 11593, 3672, 834, 6624, 366, 834, 12417, 834, 1298, 198, 220, 220, 220, 30751, 796, 1822, 29572, 13,...
2.533333
255
from typing import Tuple, Union import pytest from nonebug import App from utils import make_fake_event, make_fake_message @pytest.mark.asyncio @pytest.mark.asyncio @pytest.mark.parametrize( "msg,ignorecase,type,text,expected", [ ("prefix", False, "message", "prefix_", True), ("prefix", Fa...
[ 6738, 19720, 1330, 309, 29291, 11, 4479, 198, 198, 11748, 12972, 9288, 198, 6738, 4844, 25456, 1330, 2034, 198, 198, 6738, 3384, 4487, 1330, 787, 62, 30706, 62, 15596, 11, 787, 62, 30706, 62, 20500, 628, 198, 31, 9078, 9288, 13, 4102,...
2.360122
983
print(@@calc1+2*@@python3+@@lua4@@@@@@@@@)
[ 198, 4798, 7, 12404, 9948, 66, 16, 10, 17, 9, 12404, 29412, 18, 10, 12404, 40211, 19, 37991, 31, 8, 628 ]
2.142857
21
import unittest import os import numpy as np from solar_data_pipeline.file.csv import CsvAccess
[ 11748, 555, 715, 395, 198, 11748, 28686, 198, 11748, 299, 32152, 355, 45941, 198, 6738, 6591, 62, 7890, 62, 79, 541, 4470, 13, 7753, 13, 40664, 1330, 327, 21370, 15457, 198 ]
3.096774
31
import argparse from pathlib import Path import pandas as pd import numpy as np from progressbar import ProgressBar def save_filepath_label(usage, frame_dir, label_dir, out_dir): """ Save filepaths of all the frames and their respective output label as numpy array. Namely this numpy array's would be ...
[ 11748, 1822, 29572, 198, 6738, 3108, 8019, 1330, 10644, 198, 198, 11748, 19798, 292, 355, 279, 67, 198, 11748, 299, 32152, 355, 45941, 198, 6738, 4371, 5657, 1330, 18387, 10374, 628, 198, 4299, 3613, 62, 7753, 6978, 62, 18242, 7, 26060,...
2.372618
1,417
import os import collections ORIGINAL_TASK_ORDER = ('lemma', 'pos', 'morph') EMPTY = '_' if __name__ == '__main__': dirpath = 'datasets/capitula_classic/' all_tasks = get_all_tasks(dirpath) all_tasks = list(all_tasks) print(all_tasks) for f in os.listdir(dirpath): print("Processing...
[ 198, 11748, 28686, 198, 11748, 17268, 628, 198, 1581, 3528, 17961, 62, 51, 1921, 42, 62, 12532, 1137, 796, 19203, 10671, 2611, 3256, 705, 1930, 3256, 705, 24503, 11537, 198, 39494, 9936, 796, 705, 62, 6, 628, 628, 198, 361, 11593, 367...
2.197861
187
from scapy.all import DNS, DNSQR, IP, ICMP, RandShort, send, UDP import argparse import sys g_target_ip = "" g_name_servers = ["8.8.8.8"] # Default; can be overwritten using -n flag g_domain = "www.google.com" # Default; can be overwritten using -d flag """ This function creates and sends spoofed DNS queries to a ...
[ 6738, 629, 12826, 13, 439, 1330, 18538, 11, 18538, 48, 49, 11, 6101, 11, 12460, 7378, 11, 8790, 16438, 11, 3758, 11, 36428, 198, 11748, 1822, 29572, 198, 11748, 25064, 198, 198, 70, 62, 16793, 62, 541, 796, 13538, 198, 70, 62, 3672,...
2.975155
161
#!/usr/bin/python # -*-encoding=utf8 -*- # @Author : imooc # @Email : imooc@foxmail.com # @Created at : 2018/11/30 # @Filename : myResponse.py # @Desc : #...
[ 2, 48443, 14629, 14, 8800, 14, 29412, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, ...
1.345679
243
import unittest.mock as mock from django.contrib.auth.models import AnonymousUser, Group, User from django.test import TestCase from rest_access_policy import AccessPolicy, AccessPolicyException from rest_framework.decorators import api_view from rest_framework.viewsets import ModelViewSet
[ 11748, 555, 715, 395, 13, 76, 735, 355, 15290, 198, 198, 6738, 42625, 14208, 13, 3642, 822, 13, 18439, 13, 27530, 1330, 19200, 12982, 11, 4912, 11, 11787, 198, 6738, 42625, 14208, 13, 9288, 1330, 6208, 20448, 198, 6738, 1334, 62, 1552...
3.782051
78
#!/usr/bin/env python #coding: utf-8 import argparse import sys import inference import os ''' script for single image or batch predicition. Accepts folder or single file path''' if __name__ == '__main__': accept_arguments()
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 2, 66, 7656, 25, 3384, 69, 12, 23, 198, 11748, 1822, 29572, 198, 11748, 25064, 198, 11748, 32278, 198, 11748, 28686, 198, 7061, 6, 4226, 329, 2060, 2939, 393, 15458, 41219, 653, 13, ...
3.164384
73
import zmq from zmq import Socket, PULL, ZMQError, ENOTSOCK, RCVTIMEO, EAGAIN from logger.logger import log
[ 11748, 1976, 76, 80, 198, 6738, 1976, 76, 80, 1330, 47068, 11, 350, 9994, 11, 1168, 49215, 12331, 11, 412, 11929, 50, 11290, 11, 13987, 36392, 3955, 4720, 11, 412, 4760, 29833, 198, 198, 6738, 49706, 13, 6404, 1362, 1330, 2604, 628 ]
2.619048
42