content
stringlengths
1
1.04M
input_ids
listlengths
1
774k
ratio_char_token
float64
0.38
22.9
token_count
int64
1
774k
import importlib import os import re from pathlib import Path import pytest try: from mypy import api as mypy_api except ImportError: mypy_api = None # type: ignore try: import dotenv except ImportError: dotenv = None # type: ignore # This ensures mypy can find the test files, no matter where test...
[ 11748, 1330, 8019, 198, 11748, 28686, 198, 11748, 302, 198, 6738, 3108, 8019, 1330, 10644, 198, 198, 11748, 12972, 9288, 198, 198, 28311, 25, 198, 220, 220, 220, 422, 616, 9078, 1330, 40391, 355, 616, 9078, 62, 15042, 198, 16341, 17267,...
2.607961
829
#!/usr/bin/python '''Entrypoint for APS CLI''' import argparse import json import logging import os import sys import traceback import coloredlogs from aps_commands import ApsCommands from aps_utils import get_config, authenticate_secret LOGGER = logging.getLogger(__name__) # set environment variables that control ...
[ 2, 48443, 14629, 14, 8800, 14, 29412, 198, 7061, 6, 30150, 4122, 329, 3486, 50, 43749, 7061, 6, 198, 11748, 1822, 29572, 198, 11748, 33918, 198, 11748, 18931, 198, 11748, 28686, 198, 11748, 25064, 198, 11748, 12854, 1891, 198, 198, 1174...
2.469164
6,032
"""Definition for bot's collecting component. All of this methods are just wrappers around inner collector. """ from typing import Any, List, Optional, Sequence from botx.bots.mixins.collecting.add_handler import AddHandlerMixin from botx.bots.mixins.collecting.default import DefaultHandlerMixin from botx.bots.mixin...
[ 37811, 36621, 329, 10214, 338, 13157, 7515, 13, 198, 198, 3237, 286, 428, 5050, 389, 655, 7917, 11799, 1088, 8434, 22967, 13, 198, 37811, 198, 198, 6738, 19720, 1330, 4377, 11, 7343, 11, 32233, 11, 45835, 198, 198, 6738, 10214, 87, 13...
2.80212
849
# -*- coding: utf-8 -*- # # This file is part of Invenio. # Copyright (C) 2015-2020 CERN. # # cds-migrator-kit is free software; you can redistribute it and/or modify it # under the terms of the MIT License; see LICENSE file for more details. """CDS-ILS ldap users CLI.""" import click from flask import current_app fr...
[ 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, 42334, 327, 28778, 13, 198, 2, 198, 2, 269, 9310, 12, 76, 3692, 1352...
2.704461
538
# -*- coding: utf-8 -*- import paramiko import logging
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 11748, 5772, 12125, 198, 11748, 18931, 198 ]
2.619048
21
# coding=utf-8 from pytdx.parser.base import BaseParser from pytdx.helper import get_datetime, get_volume, get_price from collections import OrderedDict import struct import six import zlib
[ 2, 19617, 28, 40477, 12, 23, 198, 198, 6738, 12972, 8671, 87, 13, 48610, 13, 8692, 1330, 7308, 46677, 198, 6738, 12972, 8671, 87, 13, 2978, 525, 1330, 651, 62, 19608, 8079, 11, 651, 62, 29048, 11, 651, 62, 20888, 198, 6738, 17268, ...
3.237288
59
"""msgpack rpc over websockets""" import asyncio import inspect import itertools import logging import typing import msgpack # type: ignore logger = logging.getLogger(__name__) __version__ = "0.0.6"
[ 37811, 19662, 8002, 374, 14751, 625, 2639, 11603, 37811, 198, 11748, 30351, 952, 198, 11748, 10104, 198, 11748, 340, 861, 10141, 198, 11748, 18931, 198, 11748, 19720, 198, 198, 11748, 31456, 8002, 220, 1303, 2099, 25, 8856, 198, 198, 6404...
3.089552
67
import os import unittest if __name__ == '__main__': TestMaster().test_master()
[ 11748, 28686, 198, 11748, 555, 715, 395, 628, 198, 361, 11593, 3672, 834, 6624, 705, 834, 12417, 834, 10354, 198, 220, 220, 220, 6208, 18254, 22446, 9288, 62, 9866, 3419, 198 ]
2.774194
31
from setuptools import setup, find_packages setup( name="mss_project", version="1.0", author="Diego Ligtenberg", author_email="diegoligtenberg@gmail.com", description="Master Thesis about Music Source Separation, and Instrument classification", license="MIT", long_description=("README"), ...
[ 6738, 900, 37623, 10141, 1330, 9058, 11, 1064, 62, 43789, 198, 40406, 7, 198, 220, 220, 220, 1438, 2625, 76, 824, 62, 16302, 1600, 220, 198, 220, 220, 220, 2196, 2625, 16, 13, 15, 1600, 220, 198, 220, 220, 220, 1772, 2625, 32423, ...
2.95092
163
from . import builders, buildsteps, changesource, schedulers, slaves, status
[ 6738, 764, 1330, 31606, 11, 1382, 20214, 11, 2458, 1668, 11, 6038, 377, 364, 11, 13384, 11, 3722 ]
4.222222
18
from django.contrib import admin from . models import Region, Report admin.site.register(Region, RegionAdmin) admin.site.register(Report)
[ 6738, 42625, 14208, 13, 3642, 822, 1330, 13169, 198, 6738, 764, 4981, 1330, 17718, 11, 6358, 628, 198, 28482, 13, 15654, 13, 30238, 7, 47371, 11, 17718, 46787, 8, 198, 28482, 13, 15654, 13, 30238, 7, 19100, 8, 198 ]
3.589744
39
from ..interfaces.borg import Borg from ..utilities.attributedict import AttributeDict from ..utilities.attributedict import convert_to_attribute_dict # Need to import all pyyaml loadable classes (bootstrapping problem) FIX ME from ..utilities.executors import * # noqa: F403, F401 from ..utilities.simulators import *...
[ 6738, 11485, 3849, 32186, 13, 23297, 1330, 29004, 198, 6738, 11485, 315, 2410, 13, 1078, 6169, 713, 1330, 3460, 4163, 35, 713, 198, 6738, 11485, 315, 2410, 13, 1078, 6169, 713, 1330, 10385, 62, 1462, 62, 42348, 62, 11600, 198, 198, 2,...
3.282353
170
import os import subprocess from datetime import datetime from os.path import join from pathlib import Path from backup.build_files import zipping_files
[ 11748, 28686, 198, 11748, 850, 14681, 198, 6738, 4818, 8079, 1330, 4818, 8079, 198, 6738, 28686, 13, 6978, 1330, 4654, 198, 6738, 3108, 8019, 1330, 10644, 198, 6738, 11559, 13, 11249, 62, 16624, 1330, 1976, 4501, 62, 16624, 628, 628, 19...
3.829268
41
# Copyright (c) 2021 - present / Neuralmagic, 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 b...
[ 2, 15069, 357, 66, 8, 33448, 532, 1944, 1220, 47986, 32707, 11, 3457, 13, 1439, 6923, 33876, 13, 198, 2, 198, 2, 49962, 739, 262, 24843, 13789, 11, 10628, 362, 13, 15, 357, 1169, 366, 34156, 15341, 198, 2, 345, 743, 407, 779, 428,...
2.875496
1,261
# from pytorch_transformers import * # from sklearn.preprocessing import OneHotEncoder, LabelBinarizer, MultiLabelBinarizer # from data import * # import gensim # from gensim.models import Word2Vec # from tqdm import tqdm # from tqdm import tqdm_notebook as tqdm # Comment this line if using jupyter notebook from scip...
[ 2, 422, 12972, 13165, 354, 62, 35636, 364, 1330, 1635, 198, 2, 422, 1341, 35720, 13, 3866, 36948, 1330, 1881, 21352, 27195, 12342, 11, 36052, 33, 22050, 7509, 11, 15237, 33986, 33, 22050, 7509, 198, 2, 422, 1366, 1330, 1635, 198, 2, ...
2.187106
2,218
import time import pygame from overrides import overrides from planners.baseSampler import Sampler """ For demo / testing only. This policy wait for user mouse input for next sampling node. """
[ 11748, 640, 198, 198, 11748, 12972, 6057, 198, 6738, 23170, 1460, 1330, 23170, 1460, 198, 198, 6738, 33596, 13, 8692, 16305, 20053, 1330, 3409, 20053, 198, 198, 37811, 198, 1890, 13605, 1220, 4856, 691, 13, 770, 2450, 4043, 329, 2836, 1...
3.94
50
import json import unittest from flask_caching import Cache from sqlalchemy import asc from app import app, db from apps.comments.models import CommentsVideos from apps.videos.models import Videos from apps.users.models import Users, UsersAccessLevels, UsersAccessMapping, UsersAccessTokens from apps.utils.time import...
[ 11748, 33918, 198, 11748, 555, 715, 395, 198, 198, 6738, 42903, 62, 66, 8103, 1330, 34088, 198, 6738, 44161, 282, 26599, 1330, 10570, 198, 198, 6738, 598, 1330, 598, 11, 20613, 198, 6738, 6725, 13, 15944, 13, 27530, 1330, 19502, 53, 4...
3.714286
98
""" Example script to do acquire a composite survey image using stage shift. The script uses the center 50% of the image, shifts the stage by the appropriate amount in x, y directions, and stitches the resulting images together into a larger super image. To use: Run Nion Swift and get a good image Set the def...
[ 37811, 198, 16281, 4226, 284, 466, 12831, 257, 24185, 5526, 2939, 1262, 3800, 6482, 13, 198, 198, 464, 4226, 3544, 262, 3641, 2026, 4, 286, 262, 2939, 11, 15381, 262, 3800, 416, 262, 5035, 2033, 198, 259, 2124, 11, 331, 11678, 11, 2...
3.684729
406
#!/usr/bin/env python3 ''' Manage VDB studies ''' import argparse import inspect import multiprocessing import subprocess import sys import tempfile from pathlib import Path import orjson as json import biograph.vdb.athena as athena from biograph.tools.log import setup_logging, log from biograph.tools.refhash import...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 18, 198, 7061, 6, 198, 5124, 496, 569, 11012, 3640, 198, 7061, 6, 198, 11748, 1822, 29572, 198, 11748, 10104, 198, 11748, 18540, 305, 919, 278, 198, 11748, 850, 14681, 198, 11748, 25064, 19...
2.419166
7,336
"""Tests for cement.core.backend."""
[ 37811, 51, 3558, 329, 20534, 13, 7295, 13, 1891, 437, 526, 15931, 628 ]
2.923077
13
# Generated by the gRPC Python protocol compiler plugin. DO NOT EDIT! import grpc from google.protobuf import empty_pb2 as google_dot_protobuf_dot_empty__pb2 from . import language_pb2 as language__pb2 from . import plugin_pb2 as plugin__pb2 class LanguageRuntimeStub(object): """LanguageRuntime is the interface ...
[ 2, 2980, 515, 416, 262, 308, 49, 5662, 11361, 8435, 17050, 13877, 13, 8410, 5626, 48483, 0, 198, 11748, 1036, 14751, 198, 198, 6738, 23645, 13, 11235, 672, 3046, 1330, 6565, 62, 40842, 17, 355, 23645, 62, 26518, 62, 11235, 672, 3046, ...
2.796909
906
import numpy as np from sklearn.preprocessing import PolynomialFeatures from sklearn.linear_model import LinearRegression from sklearn.pipeline import Pipeline from lazyflow.rtype import SubRegion from lazyflow.operator import InputSlot from .abcs import OpTrain from .abcs import OpPredict from tsdl.tools import R...
[ 198, 11748, 299, 32152, 355, 45941, 198, 198, 6738, 1341, 35720, 13, 3866, 36948, 1330, 12280, 26601, 498, 23595, 198, 6738, 1341, 35720, 13, 29127, 62, 19849, 1330, 44800, 8081, 2234, 198, 6738, 1341, 35720, 13, 79, 541, 4470, 1330, 37...
3.608696
92
from itertools import combinations, product import pprint from typing import List, Tuple import numpy as np from slope.utils.preco_parser import PreCoFileType, PreCoParser MentionIndices = List[int] RawMentionClusters = List[List[MentionIndices]] pp = pprint.PrettyPrinter() class MentionPairDataLoader(object): ...
[ 6738, 340, 861, 10141, 1330, 17790, 11, 1720, 198, 11748, 279, 4798, 198, 6738, 19720, 1330, 7343, 11, 309, 29291, 198, 198, 11748, 299, 32152, 355, 45941, 198, 198, 6738, 22638, 13, 26791, 13, 3866, 1073, 62, 48610, 1330, 3771, 7222, ...
2.178385
768
import datetime import json import pymongo.errors from bson import json_util import pymongo import pql from flask import Flask, request, g from flask_restful import Resource, Api, reqparse, abort app = Flask(__name__) api = Api(app) app.config.from_pyfile('config.py', silent=True) def get_resources_db(): """Op...
[ 11748, 4818, 8079, 198, 11748, 33918, 198, 198, 11748, 279, 4948, 25162, 13, 48277, 198, 6738, 275, 1559, 1330, 33918, 62, 22602, 198, 11748, 279, 4948, 25162, 198, 11748, 279, 13976, 198, 6738, 42903, 1330, 46947, 11, 2581, 11, 308, 19...
2.816532
496
import numpy as np import gym import scipy as sc from scipy.special import comb import torch from sds.distributions.gamma import Gamma from sds.models import HybridController from reps.hireps import hbREPS # np.random.seed(1337) # torch.manual_seed(1337) torch.set_num_threads(1) env = gym.make('Pendulum-RL-v1') en...
[ 11748, 299, 32152, 355, 45941, 198, 11748, 11550, 198, 198, 11748, 629, 541, 88, 355, 629, 198, 6738, 629, 541, 88, 13, 20887, 1330, 1974, 198, 11748, 28034, 198, 198, 6738, 264, 9310, 13, 17080, 2455, 507, 13, 28483, 2611, 1330, 4359...
2.048713
1,088
# QUANTCONNECT.COM - Democratizing Finance, Empowering Individuals. # Lean Algorithmic Trading Engine v2.0. Copyright 2014 QuantConnect Corporation. # # 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 Li...
[ 171, 119, 123, 2, 19604, 1565, 4825, 1340, 48842, 13, 9858, 532, 9755, 2890, 15007, 11, 2295, 6477, 278, 34884, 13, 198, 2, 45661, 978, 7727, 9383, 25469, 7117, 410, 17, 13, 15, 13, 15069, 1946, 16972, 13313, 10501, 13, 198, 2, 220,...
2.86398
1,191
# -*- coding: utf-8 -*- import hashlib import hmac from urllib import quote as urlquote from .errors import OperationError, AccountError
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 11748, 12234, 8019, 198, 11748, 289, 20285, 198, 6738, 2956, 297, 571, 1330, 9577, 355, 19016, 22708, 198, 6738, 764, 48277, 1330, 14680, 12331, 11, 10781, 12331, 628 ]
3.285714
42
""" tail.py -- Emulate UNIX tail. Author: Corwin Brown E-Mail: blakfeld@gmail.com Date: 5/24/2015 """ import sys import time
[ 37811, 198, 13199, 13, 9078, 1377, 2295, 5039, 4725, 10426, 7894, 13, 198, 198, 13838, 25, 2744, 5404, 4373, 198, 36, 12, 25804, 25, 698, 461, 16265, 31, 14816, 13, 785, 198, 10430, 25, 642, 14, 1731, 14, 4626, 198, 37811, 198, 198,...
2.612245
49
import numpy as np import cv2 as cv from matplotlib import pyplot as plt from scipy.ndimage.filters import gaussian_filter img = cv.imread('/home/george/PycharmProjects/Statistical_im_proc/KernelGAN/test.jpg') kernel = np.ones((17,17),np.float32)/289 dst = cv.filter2D(img,-1,kernel) g_img = gaussian_filter(img, [1,1...
[ 11748, 299, 32152, 355, 45941, 198, 11748, 269, 85, 17, 355, 269, 85, 198, 6738, 2603, 29487, 8019, 1330, 12972, 29487, 355, 458, 83, 198, 6738, 629, 541, 88, 13, 358, 9060, 13, 10379, 1010, 1330, 31986, 31562, 62, 24455, 628, 198, ...
2.258242
364
#!/usr/bin/env python # coding: utf-8 import sys sys.path.append('../isoclique') import isoclique as ic import networkx as nx import matplotlib.pyplot as plt import random import math import time if __name__ == '__main__': E = nx.karate_club_graph().edges() start = time.time() ic_graph = ic.I...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 2, 19617, 25, 3384, 69, 12, 23, 198, 198, 11748, 25064, 198, 17597, 13, 6978, 13, 33295, 10786, 40720, 271, 38679, 2350, 11537, 198, 11748, 318, 38679, 2350, 355, 14158, 198, 11748, 31...
2.073557
1,074
import argparse from datetime import datetime as dt from lightgbm import LGBMRegressor import numpy as np import pandas as pd from sklearn.ensemble import GradientBoostingRegressor, RandomForestRegressor, StackingRegressor from sklearn.kernel_ridge import KernelRidge from sklearn.linear_model import ElasticNet, Lasso, ...
[ 11748, 1822, 29572, 198, 6738, 4818, 8079, 1330, 4818, 8079, 355, 288, 83, 198, 6738, 1657, 70, 20475, 1330, 406, 4579, 44, 8081, 44292, 198, 11748, 299, 32152, 355, 45941, 198, 11748, 19798, 292, 355, 279, 67, 198, 6738, 1341, 35720, ...
2.37911
2,068
# object created and method calling objHotel = hotel() objHotel.calculateFee()
[ 201, 198, 201, 198, 2, 2134, 2727, 290, 2446, 4585, 201, 198, 26801, 21352, 417, 796, 7541, 3419, 201, 198, 26801, 21352, 417, 13, 9948, 3129, 378, 37, 1453, 3419, 201, 198 ]
2.6875
32
test=np.arange(-2,2,0.1) v1=[] v2=[] v3=[] for i in test: i=cp.Constant(i) v1.append(pinball(i,0.2).value) v2.append(pinball(i,0.5).value) v3.append(pinball(i,0.8).value) plt.plot(test,v1,label="$\\tau=0.2$") plt.plot(test,v2,label="$\\tau=0.5$") plt.plot(test,v3,label="$\\tau=0.8$") plt.x...
[ 9288, 28, 37659, 13, 283, 858, 32590, 17, 11, 17, 11, 15, 13, 16, 8, 201, 198, 85, 16, 28, 21737, 201, 198, 85, 17, 28, 21737, 201, 198, 85, 18, 28, 21737, 201, 198, 1640, 1312, 287, 1332, 25, 201, 198, 220, 220, 220, 1312, ...
1.673401
297
""" Functions about routes. """ from collections import OrderedDict from typing import Optional, Iterable, List, Dict, TYPE_CHECKING import json import geopandas as gp import pandas as pd import numpy as np import shapely.geometry as sg import shapely.ops as so import folium as fl from . import constants as cs from ....
[ 37811, 198, 24629, 2733, 546, 11926, 13, 198, 37811, 198, 6738, 17268, 1330, 14230, 1068, 35, 713, 198, 6738, 19720, 1330, 32233, 11, 40806, 540, 11, 7343, 11, 360, 713, 11, 41876, 62, 50084, 2751, 198, 11748, 33918, 198, 198, 11748, ...
2.438747
10,979
from .mapper import ApiResponse, ApiResponseInterface from .mapper.types import Timestamp, AnyType from .model import Broadcast, PostLiveItem, Reel __all__ = ['UserStoryFeedResponse']
[ 6738, 764, 76, 11463, 1330, 5949, 72, 31077, 11, 5949, 72, 31077, 39317, 198, 6738, 764, 76, 11463, 13, 19199, 1330, 5045, 27823, 11, 4377, 6030, 198, 6738, 764, 19849, 1330, 44244, 11, 2947, 18947, 7449, 11, 797, 417, 198, 198, 834, ...
3.528302
53
# Definition for a binary tree node # @param A : root node of tree # @param B : root node of tree # @return an integer # tree 1 t5 = TreeNode(5) t2 = TreeNode(2) t3 = TreeNode(3) t5.left = t2 t2.right = t3 t8 = TreeNode(8) t5.right = t8 t15 = TreeNode(15) t8.right = t15 t7 = TreeNode(7) t15.left = t...
[ 2, 30396, 329, 257, 220, 13934, 5509, 10139, 628, 220, 220, 220, 1303, 2488, 17143, 317, 1058, 6808, 10139, 286, 5509, 198, 220, 220, 220, 1303, 2488, 17143, 347, 1058, 6808, 10139, 286, 5509, 198, 220, 220, 220, 1303, 2488, 7783, 281...
1.858586
792
# Generated by Django 3.0.7 on 2020-06-22 06:46 from django.db import migrations, models
[ 2, 2980, 515, 416, 37770, 513, 13, 15, 13, 22, 319, 12131, 12, 3312, 12, 1828, 9130, 25, 3510, 198, 198, 6738, 42625, 14208, 13, 9945, 1330, 15720, 602, 11, 4981, 628 ]
2.84375
32
#!/usr/bin/env python3 #plans a lot of the "magic string" text will move into here to make modifying them alot easier on the fly. UpdateFound = "Applying update..." UpdateLaunching = "Launching the updater application. This application will now close automatically."
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 18, 198, 198, 2, 489, 504, 257, 1256, 286, 262, 366, 32707, 4731, 1, 2420, 481, 1445, 656, 994, 284, 787, 30620, 606, 43158, 4577, 319, 262, 6129, 13, 198, 198, 10260, 21077, 796, 366, ...
4
67
#!/usr/bin/python3 # -*- coding: utf-8 -*- import time import argparse import os import cv2 import shutil import numpy as np import open3d as o3d import misc3d as m3d import json from utils import Colors, mask_to_bbox, rgbd_to_pointcloud if __name__ == '__main__': parser = argparse.ArgumentParser() p...
[ 2, 48443, 14629, 14, 8800, 14, 29412, 18, 198, 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 198, 11748, 640, 198, 11748, 1822, 29572, 198, 11748, 28686, 198, 11748, 269, 85, 17, 198, 11748, 4423, 346, 198, 11748, ...
2.137177
1,509
import os import re import ssl import string import sys from configparser import ConfigParser from pathlib import Path from typing import Dict, List, Optional, Set, Tuple import click import nltk from nltk.corpus import brown, webtext from spellchecker import SpellChecker from demisto_sdk.commands.common.constants im...
[ 11748, 28686, 198, 11748, 302, 198, 11748, 264, 6649, 198, 11748, 4731, 198, 11748, 25064, 198, 6738, 4566, 48610, 1330, 17056, 46677, 198, 6738, 3108, 8019, 1330, 10644, 198, 6738, 19720, 1330, 360, 713, 11, 7343, 11, 32233, 11, 5345, ...
2.212543
7,542
df_topic_sents_keywords = format_topics_sentences(ldamodel=lda_model, corpus=corpus, texts=data_ready) # Format df_dominant_topic = df_topic_sents_keywords.reset_index() df_dominant_topic.columns = ['Document_No', 'Dominant_Topic', 'Topic_Perc_Contrib', 'Keywords', 'Text'] df_dominant_topic.head(10)
[ 198, 198, 7568, 62, 26652, 62, 82, 658, 62, 2539, 10879, 796, 5794, 62, 4852, 873, 62, 34086, 3007, 7, 335, 321, 375, 417, 28, 18986, 62, 19849, 11, 35789, 28, 10215, 79, 385, 11, 13399, 28, 7890, 62, 1493, 8, 198, 198, 2, 18980...
2.576271
118
import os import sys this_dir = os.path.dirname(__file__) add_path(os.path.join(this_dir)) add_path(os.path.join(this_dir, 'common')) add_path(os.path.join(this_dir, 'common_pytorch')) print("=================SYS PATH================") for path in sys.path: print(path) print("=================SYS PATH============...
[ 11748, 28686, 198, 11748, 25064, 198, 198, 5661, 62, 15908, 796, 28686, 13, 6978, 13, 15908, 3672, 7, 834, 7753, 834, 8, 198, 2860, 62, 6978, 7, 418, 13, 6978, 13, 22179, 7, 5661, 62, 15908, 4008, 198, 2860, 62, 6978, 7, 418, 13, ...
2.794872
117
### start import profile import sys import os import pandas as pd from opentrons import protocol_api, simulate, execute import json import argparse ### end """ step1_tepmplate.py Description: Generates python protocol file that can be uploaded directly to Opentrons app Usage: python step1_template.py -r <number of...
[ 21017, 923, 198, 11748, 7034, 198, 11748, 25064, 198, 11748, 28686, 198, 11748, 19798, 292, 355, 279, 67, 198, 6738, 1034, 298, 12212, 1330, 8435, 62, 15042, 11, 29308, 11, 12260, 198, 11748, 33918, 198, 11748, 1822, 29572, 198, 21017, ...
2.394554
2,020
# # Copyright 2012 New Dream Network, LLC (DreamHost) # Copyright 2013 eNovance # # Author: Doug Hellmann <doug.hellmann@dreamhost.com> # Julien Danjou <julien@danjou.info> # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You ...
[ 2, 198, 2, 15069, 2321, 968, 7610, 7311, 11, 11419, 357, 30571, 17932, 8, 198, 2, 15069, 2211, 304, 20795, 590, 198, 2, 198, 2, 6434, 25, 15115, 5783, 9038, 1279, 67, 20805, 13, 12758, 9038, 31, 25966, 4774, 13, 785, 29, 198, 2, ...
3.380247
405
from winged_edge import winged_edge_lookup
[ 6738, 8539, 276, 62, 14907, 1330, 8539, 276, 62, 14907, 62, 5460, 929, 198 ]
3.071429
14
import torch from allennlp.data.iterators import BasicIterator from allennlp.data.token_indexers import SingleIdTokenIndexer, ELMoTokenCharactersIndexer from allennlp.modules import Embedding, Elmo from torch import nn import os import config from data_util.data_readers.fever_reader import BasicReader from data_util....
[ 11748, 28034, 198, 6738, 477, 1697, 34431, 13, 7890, 13, 2676, 2024, 1330, 14392, 37787, 198, 6738, 477, 1697, 34431, 13, 7890, 13, 30001, 62, 9630, 364, 1330, 14206, 7390, 30642, 15732, 263, 11, 17852, 16632, 30642, 48393, 15732, 263, ...
3.022581
310
array = [1, 21, 3, 14, 5, 60, 7, 6] n = 27 result = "[21, 6] or [6, 21]" # iterate both arrays in a nested loop, check for sum == n, return when pair is found print("Input: " + "array = " + str(array) + ", " + "n = " + str(n)) print("Expected: " + str(result)) print("Output: " + str(add_upto_n_1(array, n)))
[ 18747, 796, 685, 16, 11, 2310, 11, 513, 11, 1478, 11, 642, 11, 3126, 11, 767, 11, 718, 60, 198, 77, 796, 2681, 198, 20274, 796, 12878, 2481, 11, 718, 60, 393, 685, 21, 11, 2310, 30866, 628, 198, 2, 11629, 378, 1111, 26515, 287, ...
2.504
125
""" Pythonic and thread-safe wrapper around Farasa. Farasa is developed at QCRI and can be found at http://qatsdemo.cloudapp.net/farasa/ Paper can be found at http://www.aclweb.org/anthology/N16-3003 """ import logging from collections import defaultdict from operator import concat, itemgetter from threading import RL...
[ 37811, 198, 37906, 291, 290, 4704, 12, 21230, 29908, 1088, 6755, 15462, 13, 198, 198, 21428, 15462, 318, 4166, 379, 36070, 7112, 290, 460, 307, 1043, 379, 2638, 1378, 80, 1381, 9536, 78, 13, 17721, 1324, 13, 3262, 14, 16370, 15462, 14...
2.109462
3,773
import os, sys import yaml import torch sys.path.append(os.path.dirname(__file__) + '/../') import vaetc if __name__ == "__main__": checkpoint = vaetc.Checkpoint(options={ "model_name": "vae", "dataset": "cars", "epochs": 512, "batch_size": 256, "logger_path": "runs.test...
[ 11748, 28686, 11, 25064, 198, 198, 11748, 331, 43695, 198, 198, 11748, 28034, 198, 198, 17597, 13, 6978, 13, 33295, 7, 418, 13, 6978, 13, 15908, 3672, 7, 834, 7753, 834, 8, 1343, 31051, 40720, 11537, 198, 11748, 46935, 14784, 198, 198...
2.003356
298
import socket import struct import logging from rex.exploit.shellcode import Shellcode l = logging.getLogger("rex.exploit.shellcodes.linux_amd64_connectback")
[ 11748, 17802, 198, 11748, 2878, 198, 11748, 18931, 198, 6738, 302, 87, 13, 20676, 30711, 13, 29149, 8189, 1330, 17537, 8189, 198, 198, 75, 796, 18931, 13, 1136, 11187, 1362, 7203, 21510, 13, 20676, 30711, 13, 29149, 40148, 13, 23289, 62...
3.333333
48
from .cashback import cashback_view from .dealers import dealer_view from .orders import order_view
[ 6738, 764, 30350, 1891, 1330, 5003, 1891, 62, 1177, 198, 6738, 764, 31769, 364, 1330, 16456, 62, 1177, 198, 6738, 764, 6361, 1330, 1502, 62, 1177, 198 ]
3.703704
27
# -*- coding: utf-8 -*- import datetime import re from .._globals import IDENTITY from .._compat import integer_types, basestring from ..objects import Table, Query, Field, Expression from ..helpers.classes import SQLALL, Reference from ..helpers.methods import use_common_filters, xorify from .base import NoSQLAdapter...
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 11748, 4818, 8079, 198, 11748, 302, 198, 198, 6738, 11485, 62, 4743, 672, 874, 1330, 4522, 3525, 9050, 198, 6738, 11485, 62, 5589, 265, 1330, 18253, 62, 19199, 11, 1615,...
2.91875
160
from determined_common.experimental import ( Checkpoint, Determined, ExperimentReference, TrialReference, ) from determined.experimental._native import ( create, create_trial_instance, test_one_batch, init_native, _local_execution_manager, )
[ 6738, 5295, 62, 11321, 13, 23100, 9134, 1330, 357, 198, 220, 220, 220, 6822, 4122, 11, 198, 220, 220, 220, 360, 23444, 11, 198, 220, 220, 220, 29544, 26687, 11, 198, 220, 220, 220, 21960, 26687, 11, 198, 8, 198, 198, 6738, 5295, 1...
2.818182
99
# -*- coding: utf-8 -*- """Class for the ogs ASC file.""" from ogs5py.fileclasses.base import LineFile class ASC(LineFile): """ Class for the ogs ASC file. Parameters ---------- lines : list of str, optional content of the file as a list of lines Default: None name : str, opti...
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 37811, 9487, 329, 262, 267, 14542, 25400, 2393, 526, 15931, 198, 6738, 267, 14542, 20, 9078, 13, 7753, 37724, 13, 8692, 1330, 6910, 8979, 628, 198, 4871, 25400, 7, 13949...
2.541935
310
import sys import numpy import time import matplotlib.mlab as mlab import matplotlib.pyplot as plt import urllib import csv import time #Generate a list of random number from Normal distribution #Generate a list of random number from Poisson distribution # Visualize the number we generated #Connect...
[ 11748, 25064, 201, 198, 11748, 299, 32152, 201, 198, 11748, 640, 201, 198, 11748, 2603, 29487, 8019, 13, 4029, 397, 355, 285, 23912, 201, 198, 11748, 2603, 29487, 8019, 13, 9078, 29487, 355, 458, 83, 201, 198, 11748, 2956, 297, 571, 2...
2.188776
980
############################################################################### # EnsembleClassifier from nimbusml import Pipeline, FileDataStream from nimbusml.datasets import get_dataset from nimbusml.feature_extraction.categorical import OneHotVectorizer from nimbusml.ensemble import EnsembleClassifier from nimbusml...
[ 29113, 29113, 7804, 4242, 21017, 198, 2, 2039, 15140, 9487, 7483, 198, 6738, 299, 320, 10885, 4029, 1330, 37709, 11, 9220, 6601, 12124, 198, 6738, 299, 320, 10885, 4029, 13, 19608, 292, 1039, 1330, 651, 62, 19608, 292, 316, 198, 6738, ...
2.096406
1,753
""" Copyright 2020 The Magma Authors. This source code is licensed under the BSD-style license found in the LICENSE file in the root directory of this source tree. Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES O...
[ 37811, 198, 15269, 12131, 383, 2944, 2611, 46665, 13, 198, 198, 1212, 2723, 2438, 318, 11971, 739, 262, 347, 10305, 12, 7635, 5964, 1043, 287, 262, 198, 43, 2149, 24290, 2393, 287, 262, 6808, 8619, 286, 428, 2723, 5509, 13, 198, 198, ...
3.614943
174
"""Estate manipulation functionality.""" from flask import request from flask_restful import Resource from api.helpers.modelops import get_boards, get_estates from api.helpers.validation import validate_json from api.models import Estate class EstateResource(Resource): """View functions for estates.""" def...
[ 37811, 36, 5219, 17512, 11244, 526, 15931, 198, 198, 6738, 42903, 1330, 2581, 198, 6738, 42903, 62, 2118, 913, 1330, 20857, 198, 198, 6738, 40391, 13, 16794, 364, 13, 19849, 2840, 1330, 651, 62, 12821, 11, 651, 62, 395, 689, 198, 6738...
2.073338
1,309
from typing import List from ddq.universe import Universe from ddq.builder import Builder from ddq.topic import Topic, Predicate, Constant, Axiom, Definition from ddq.topic import Topic as BaseTopic from .membership import Membership from .empty_set import EmptySetConstant, EmptySetAxiom from .non_membership import Non...
[ 6738, 19720, 1330, 7343, 198, 6738, 49427, 80, 13, 403, 3997, 1330, 11950, 198, 6738, 49427, 80, 13, 38272, 1330, 35869, 198, 6738, 49427, 80, 13, 26652, 1330, 47373, 11, 14322, 5344, 11, 20217, 11, 12176, 29005, 11, 30396, 198, 6738, ...
3.886364
88
import random from locust import HttpUser, task, between
[ 11748, 4738, 198, 6738, 1179, 436, 1330, 367, 29281, 12982, 11, 4876, 11, 1022, 628 ]
3.866667
15
# first arg gold, following ones files with scores to ensemble import sys goldFile = sys.argv[1] answers = [] for line in open(goldFile).readlines(): answers.append(int(line.strip())) print "loaded " + str(len(answers)) + " answers" # an array with an array per model to be ensebled individualSentencePredictio...
[ 2, 717, 1822, 3869, 11, 1708, 3392, 3696, 351, 8198, 284, 34549, 198, 198, 11748, 25064, 198, 198, 24267, 8979, 796, 25064, 13, 853, 85, 58, 16, 60, 198, 198, 504, 86, 364, 796, 17635, 198, 198, 1640, 1627, 287, 1280, 7, 24267, 89...
2.643016
451
#!/usr/bin/env python # coding: utf-8 # @Time : 2020/9/7 9:39 # @Author : Li XiaoJun # @Site : # @File : face_editor.py import json import os from imp import reload from animation import common from animation import test_node from animation.helper import manager_version from pymel import core as pm reload(...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 2, 19617, 25, 3384, 69, 12, 23, 198, 2, 2488, 7575, 220, 220, 220, 1058, 12131, 14, 24, 14, 22, 860, 25, 2670, 198, 2, 2488, 13838, 220, 1058, 7455, 28249, 22396, 198, 2, 2488, 2...
1.713398
16,891
import gibson2 import os import argparse import random import subprocess import json from collections import defaultdict import yaml def get_ig_category_ids(): """ Get iGibson object categories :return: file path to the scene name """ ig_dataset_path = gibson2.ig_dataset_path ig_categories_fi...
[ 11748, 46795, 1559, 17, 198, 11748, 28686, 198, 11748, 1822, 29572, 198, 11748, 4738, 198, 11748, 850, 14681, 198, 11748, 33918, 198, 6738, 17268, 1330, 4277, 11600, 198, 11748, 331, 43695, 628, 198, 4299, 651, 62, 328, 62, 22872, 62, 2...
2.314977
3,886
# pylint: disable=C0103,R0904 # 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, 279, 2645, 600, 25, 15560, 28, 34, 486, 3070, 11, 49, 2931, 3023, 198, 198, 2, 220, 220, 49962, 739, 262, 24843, 13789, 11, 10628, 362, 13, 15, 357, 1169, 366, 34156, 15341, 345, 743, 198, 2, 220, 220, 407, 779, 428, 2393, 28...
2.570772
1,088
import json from sklearn.model_selection import train_test_split from finetune.config import BATCH_SIZE from finetune.lm_base import LanguageModelBase from finetune.target_encoders import OrdinalClassificationEncoder if __name__ == "__main__": with open("data/questions.json", "rt") as fp: data = json....
[ 11748, 33918, 198, 198, 6738, 1341, 35720, 13, 19849, 62, 49283, 1330, 4512, 62, 9288, 62, 35312, 198, 198, 6738, 957, 316, 1726, 13, 11250, 1330, 347, 11417, 62, 33489, 198, 6738, 957, 316, 1726, 13, 75, 76, 62, 8692, 1330, 15417, ...
2.598344
483
from ..utils import check_random_state
[ 6738, 11485, 26791, 1330, 2198, 62, 25120, 62, 5219, 628 ]
4
10
#trabalho por Leonardo Vanzin, Mateus Karvat e Roberta Aparecida #inicialmente, são importadas as bibliotecas necessárias from experta import * import interface valores_convertidos = { 'proximidadeMar': float(interface.valores['proximidadeMar']), 'desnivel': float(interface.valores['desnivel']), 'velocida...
[ 2, 2213, 44349, 8873, 16964, 38083, 6656, 42140, 11, 24787, 385, 9375, 85, 265, 304, 5199, 64, 5949, 533, 66, 3755, 198, 198, 2, 259, 6652, 434, 68, 11, 264, 28749, 1330, 38768, 355, 275, 29142, 313, 721, 292, 2418, 6557, 380, 292, ...
2.560647
742
#! @@Author : WAHYU ARIF PURNOMO #! @@Create : 18 Januari 2019 #! @@Modify : 19 Januari 2019 #! Gambar dari reddit. #! Gunakan VPN karena DNS situs reddit sudah di blokir dari negara Indonesia. import os import json import requests import progressbar from PIL import Image from lxml import html from time import sleep f...
[ 2, 0, 25248, 13838, 1058, 16400, 42598, 52, 5923, 5064, 350, 27064, 2662, 46, 198, 2, 0, 25248, 16447, 1058, 1248, 2365, 84, 2743, 13130, 198, 2, 0, 25248, 5841, 1958, 1058, 678, 2365, 84, 2743, 13130, 198, 2, 0, 33330, 283, 288, ...
2.565359
306
#!/usr/bin/env python3 """ This implements a simple Evolutionary Programming (EP) system, but it does not evolve state machines as done with the original EP approach. TODO convert to a state machines problem """ import os from toolz import pipe from leap_ec import Individual, context, test_env_var from ...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 18, 198, 37811, 198, 220, 220, 220, 770, 23986, 257, 2829, 15815, 560, 30297, 357, 8905, 8, 1080, 11, 475, 340, 198, 220, 220, 220, 857, 407, 18101, 1181, 8217, 355, 1760, 351, 262, 2656,...
2.41323
1,285
import covasim as cv import pandas as pd import sciris as sc import numpy as np import population_random as pr if __name__ == '__main__': #Without dispersion cv.set_seed(1) people = pr.generate_people(n_people=200e3, n_contacts=20, dispersion=None) sc.saveobj('randppl.pop', people) # With disper...
[ 11748, 39849, 292, 320, 355, 269, 85, 198, 11748, 19798, 292, 355, 279, 67, 198, 11748, 629, 29616, 355, 629, 198, 11748, 299, 32152, 355, 45941, 198, 198, 11748, 3265, 62, 25120, 355, 778, 628, 198, 361, 11593, 3672, 834, 6624, 705, ...
2.357843
204
# Math; Binary Search # Implement int sqrt(int x). # # Compute and return the square root of x, where x is guaranteed to be a non-negative integer. # # Since the return type is an integer, the decimal digits are truncated and only the integer part of the result is returned. # # Example 1: # # Input: 4 # Output: 2 # Ex...
[ 2, 16320, 26, 45755, 11140, 198, 198, 2, 48282, 493, 19862, 17034, 7, 600, 2124, 737, 198, 2, 198, 2, 3082, 1133, 290, 1441, 262, 6616, 6808, 286, 2124, 11, 810, 2124, 318, 11462, 284, 307, 257, 1729, 12, 31591, 18253, 13, 198, 2,...
3.090909
154
import os import subprocess import sys fontes = ["funcoes_abstratas.f90", "funcoes_alias.f90", 'matriz_A.f90', 'gs.f90', 'extrapolacoes_de_u_e_v.f90', 'fontes_subrotinas.f90', 'class_array_subrotinas.f90', 'residuo.f90', 'variaveis_solvers...
[ 11748, 28686, 198, 11748, 850, 14681, 198, 11748, 25064, 198, 198, 10331, 274, 796, 14631, 12543, 1073, 274, 62, 397, 2536, 265, 292, 13, 69, 3829, 1600, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 366, 12543, 1073, 274, 62, 2...
1.890805
870
# -*- coding: utf-8 -*- import typing import awswrangler as wr from .data import ( create_s3_csv_file, create_s3_json_file, create_many_parquet_file, create_many_json_file, ) from ..merge import ( merge_parquet_by_prefix, merge_json_by_prefix, ) from ..helpers import ( is_s3_object_exists, ...
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 198, 11748, 19720, 198, 11748, 3253, 2032, 36985, 1754, 355, 1319, 198, 6738, 764, 7890, 1330, 357, 198, 220, 220, 220, 2251, 62, 82, 18, 62, 40664, 62, 7753, 11, 198,...
2.004993
2,203
# Copyright (C) 2019-2021 Zilliz. 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 applicable law or ag...
[ 2, 15069, 357, 34, 8, 13130, 12, 1238, 2481, 1168, 359, 528, 13, 1439, 2489, 10395, 13, 198, 2, 198, 2, 49962, 739, 262, 24843, 13789, 11, 10628, 362, 13, 15, 357, 1169, 366, 34156, 15341, 345, 743, 407, 779, 428, 2393, 2845, 198,...
2.839855
4,421
import json from collections import OrderedDict from pandas.io.json import json_normalize
[ 11748, 33918, 198, 6738, 17268, 1330, 14230, 1068, 35, 713, 198, 198, 6738, 19798, 292, 13, 952, 13, 17752, 1330, 33918, 62, 11265, 1096, 628 ]
3.68
25
# pyOCD debugger # Copyright (c) 2016 Arm Limited # SPDX-License-Identifier: Apache-2.0 # # 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 # # ...
[ 2, 12972, 4503, 35, 49518, 198, 2, 15069, 357, 66, 8, 1584, 7057, 15302, 198, 2, 30628, 55, 12, 34156, 12, 33234, 7483, 25, 24843, 12, 17, 13, 15, 198, 2, 198, 2, 49962, 739, 262, 24843, 13789, 11, 10628, 362, 13, 15, 357, 1169,...
3.163265
490
import requests import urllib3 from sciflow import localsettings path = "http://jena1.unfcsd.unf.edu:3030/" dset = "SciData" hdrs = {'Content-Type': 'application/json'} hdrsld = {'Content-Type': 'application/ld+json'} fpath = localsettings.ppath + "/static/files/" def server(): """get the server info from the f...
[ 11748, 7007, 198, 11748, 2956, 297, 571, 18, 198, 6738, 629, 361, 9319, 1330, 17205, 12374, 628, 198, 6978, 796, 366, 4023, 1378, 73, 8107, 16, 13, 403, 69, 6359, 67, 13, 403, 69, 13, 15532, 25, 1270, 1270, 30487, 198, 67, 2617, 7...
2.627561
1,074
# -*- coding: utf-8 -*- import pymongo import json if __name__ in '__main__': main()
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 11748, 279, 4948, 25162, 198, 11748, 33918, 198, 198, 361, 11593, 3672, 834, 287, 705, 834, 12417, 834, 10354, 198, 220, 220, 220, 1388, 3419, 198 ]
2.25
40
from bs4 import BeautifulSoup from datetime import datetime import time import requests from init_database_postgre import load_db_credential_info from real_time_web_scraper import update_insider_trades, write_to_csv insider_trades = [] trading_activity = {'B': 'Buy', 'S': 'Sell', 'O': 'Options Excersise'} def parse_...
[ 6738, 275, 82, 19, 1330, 23762, 50, 10486, 198, 6738, 4818, 8079, 1330, 4818, 8079, 198, 11748, 640, 198, 11748, 7007, 198, 6738, 2315, 62, 48806, 62, 7353, 16694, 1330, 3440, 62, 9945, 62, 66, 445, 1843, 62, 10951, 198, 6738, 1103, ...
2.493467
1,301
r""" PhyloMAF (:mod:`pmaf`) ======================= .. rubric:: Phylogenetic Microbiome Analysis Framework .. currentmodule:: pmaf PhyloMAF is a novel comprehensive microbiome data analysis tool based on Python programming language. With memory efficient and extensible design, PhyloMAF have wide range of applicatio...
[ 81, 37811, 198, 2725, 2645, 78, 5673, 37, 220, 357, 25, 4666, 25, 63, 4426, 1878, 63, 8, 198, 4770, 1421, 18604, 198, 198, 492, 6437, 1173, 3712, 1380, 2645, 6644, 5139, 4527, 8482, 462, 14691, 25161, 198, 198, 492, 1459, 21412, 371...
3.192616
623
import pytest from unittest.mock import MagicMock from megatron.connections import slack from megatron.tests.factories import factories pytestmark = pytest.mark.django_db @pytest.mark.django_db
[ 11748, 12972, 9288, 198, 6738, 555, 715, 395, 13, 76, 735, 1330, 6139, 44, 735, 198, 6738, 17243, 23484, 13, 8443, 507, 1330, 30740, 198, 6738, 17243, 23484, 13, 41989, 13, 22584, 1749, 1330, 17590, 628, 198, 9078, 9288, 4102, 796, 12...
3.109375
64
# ============================================================================= # PROJECT CHRONO - http://projectchrono.org # # Copyright (c) 2022 projectchrono.org # All rights reserved. # # Use of this source code is governed by a BSD-style license that can be found # in the LICENSE file at the top level of the distr...
[ 2, 38093, 25609, 198, 2, 21965, 23680, 32567, 1340, 46, 532, 2638, 1378, 16302, 11413, 78, 13, 2398, 198, 2, 198, 2, 15069, 357, 66, 8, 33160, 1628, 11413, 78, 13, 2398, 198, 2, 1439, 2489, 10395, 13, 198, 2, 198, 2, 5765, 286, ...
3.304348
1,104
import vk_api import random from fresko import create_quote_image from vk_api.utils import get_random_id from vk_api.bot_longpoll import VkBotLongPoll, VkBotEventType
[ 11748, 410, 74, 62, 15042, 198, 11748, 4738, 198, 6738, 34093, 7204, 1330, 2251, 62, 22708, 62, 9060, 198, 6738, 410, 74, 62, 15042, 13, 26791, 1330, 651, 62, 25120, 62, 312, 198, 6738, 410, 74, 62, 15042, 13, 13645, 62, 6511, 30393...
3
56
# -*- coding: utf-8 -*- # Form implementation generated from reading ui file 'about.ui' # # Created by: PyQt5 UI code generator 5.14.1 # # WARNING! All changes made in this file will be lost! from PyQt5 import QtCore, QtGui, QtWidgets
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 198, 2, 5178, 7822, 7560, 422, 3555, 334, 72, 2393, 705, 10755, 13, 9019, 6, 198, 2, 198, 2, 15622, 416, 25, 9485, 48, 83, 20, 12454, 2438, 17301, 642, 13, 1415, 1...
2.845238
84
import torch import numpy as np @torch.no_grad() @torch.no_grad() def anneal_Langevin_dynamics_inpainting(x_mod, refer_image, scorenet, sigmas, image_size, n_steps_each=100, step_lr=0.000008): """ Currently only good for 32x32 images. Assuming the right half is missing....
[ 11748, 28034, 198, 11748, 299, 32152, 355, 45941, 198, 198, 31, 13165, 354, 13, 3919, 62, 9744, 3419, 198, 198, 31, 13165, 354, 13, 3919, 62, 9744, 3419, 198, 4299, 281, 710, 282, 62, 43, 858, 7114, 62, 67, 4989, 873, 62, 259, 354...
1.961783
785
from scrap.kanonierzy_scraper import KanonierzyScraper from adapters.article_adapter import ArticleAdapter from page.article import Article from engine.chrome_browser import BrowserChrome from adapters.file_adapter import FileAdapter FILENAME = "results.json" if __name__ == '__main__': articles = get_article...
[ 6738, 15881, 13, 27541, 261, 959, 7357, 62, 1416, 38545, 1330, 14248, 261, 959, 7357, 3351, 38545, 198, 198, 6738, 46363, 13, 20205, 62, 324, 3429, 1330, 10172, 47307, 198, 6738, 2443, 13, 20205, 1330, 10172, 198, 6738, 3113, 13, 46659,...
3.37963
108
''' Author: Jinguang Tong Affliction: Australia National University, DATA61 CSIRO ''' import os import glob import numpy as np from skimage import io from copy import copy from graphics import Voxelgrid from scipy.ndimage.morphology import binary_dilation from torch.utils.data import Dataset from utils.data import ad...
[ 7061, 6, 198, 13838, 25, 449, 6680, 648, 26565, 198, 35191, 41101, 25, 4505, 2351, 2059, 11, 42865, 5333, 9429, 43708, 198, 7061, 6, 198, 198, 11748, 28686, 198, 11748, 15095, 198, 11748, 299, 32152, 355, 45941, 198, 198, 6738, 1341, ...
2.747292
277
import os import json import pickle import numpy as np from PIL import Image from collections import defaultdict import swiftclient feature_container_name = 'feature' angle_container_name = 'angle' def load_data(img_size, isSwiftEnabled): """ Create pickle objects of features and labels :param img_size...
[ 11748, 28686, 198, 11748, 33918, 198, 11748, 2298, 293, 198, 11748, 299, 32152, 355, 45941, 198, 6738, 350, 4146, 1330, 7412, 198, 6738, 17268, 1330, 4277, 11600, 198, 11748, 14622, 16366, 198, 198, 30053, 62, 34924, 62, 3672, 796, 705, ...
2.226069
982
""" Library folder for plugins configured from `presalytics.story.outline.Plugin` class """
[ 37811, 198, 23377, 9483, 329, 20652, 17839, 422, 4600, 18302, 3400, 14094, 13, 13571, 13, 448, 1370, 13, 37233, 63, 1398, 198, 37811, 198 ]
3.833333
24
if __name__ == "__main__": sr = "pwwkew" so = Solution() print(so.method2(sr))
[ 628, 198, 361, 11593, 3672, 834, 6624, 366, 834, 12417, 834, 1298, 198, 220, 220, 220, 19677, 796, 366, 79, 1383, 365, 86, 1, 198, 220, 220, 220, 523, 796, 28186, 3419, 198, 220, 220, 220, 3601, 7, 568, 13, 24396, 17, 7, 27891, ...
2.043478
46
#!/usr/bin/env python import os import sys import shutil import pyfits import lsst.eotest.image_utils as imutils import lsst.eotest.sensor as sensorTest from lcatr.harness.helpers import dependency_glob bias_files = dependency_glob('*_fe55_bias_*.fits', jobname='ts3_fe55_data') system_noise_files = dependency_glob('no...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 11748, 28686, 198, 11748, 25064, 198, 11748, 4423, 346, 198, 11748, 12972, 21013, 198, 11748, 43979, 301, 13, 68, 313, 395, 13, 9060, 62, 26791, 355, 545, 26791, 198, 11748, 43979, 301, ...
2.604072
442
import builtins from io import StringIO import numpy as np import pytest from pandas.errors import UnsupportedFunctionCall import pandas as pd from pandas import DataFrame, Index, MultiIndex, Series, Timestamp, date_range, isna import pandas._testing as tm import pandas.core.nanops as nanops from pandas.util import ...
[ 11748, 3170, 1040, 198, 6738, 33245, 1330, 10903, 9399, 198, 198, 11748, 299, 32152, 355, 45941, 198, 11748, 12972, 9288, 198, 198, 6738, 19798, 292, 13, 48277, 1330, 791, 15999, 22203, 14134, 198, 198, 11748, 19798, 292, 355, 279, 67, ...
1.929782
2,478
from __future__ import print_function import tensorflow as tf import keras from tensorflow.keras.models import load_model from keras import backend as K from keras.layers import Input import numpy as np import subprocess from tensorloader import TensorLoader as tl import matplotlib.pyplot as plt from matplotlib.backend...
[ 6738, 11593, 37443, 834, 1330, 3601, 62, 8818, 198, 11748, 11192, 273, 11125, 355, 48700, 198, 11748, 41927, 292, 198, 6738, 11192, 273, 11125, 13, 6122, 292, 13, 27530, 1330, 3440, 62, 19849, 198, 6738, 41927, 292, 1330, 30203, 355, 50...
3.052192
479
from bge import logic
[ 6738, 275, 469, 1330, 9156 ]
4.2
5
import numpy as np import matplotlib.pyplot as plt ############################# # simulation helpers # ############################# lo_freq_cavity = 8.0e9 cavity_IF = 180e6 lo_freq_qubit = 7.4e9 qubit_IF = 60e6 lo_freq_rr = 9.3e9 rr_IF = 60e6 readout_len = 380 IF_freq = rr_IF Td = 200 Ts =...
[ 11748, 299, 32152, 355, 45941, 201, 198, 11748, 2603, 29487, 8019, 13, 9078, 29487, 355, 458, 83, 201, 198, 201, 198, 201, 198, 14468, 7804, 4242, 2, 201, 198, 2, 18640, 49385, 1303, 201, 198, 14468, 7804, 4242, 2, 201, 198, 201, 19...
1.632473
4,533
# # This file is part of LiteX. # # Copyright (c) 2021 Franck Jullien <franck.jullien@collshade.fr> # SPDX-License-Identifier: BSD-2-Clause import os import csv import re import xml.etree.ElementTree as et # NameSpaces --------------------------------------------------------------------------------------- namespace...
[ 2, 198, 2, 770, 2393, 318, 636, 286, 27395, 55, 13, 198, 2, 198, 2, 15069, 357, 66, 8, 33448, 12323, 694, 449, 724, 2013, 1279, 69, 2596, 694, 13, 73, 724, 2013, 31, 26000, 1477, 671, 13, 8310, 29, 198, 2, 30628, 55, 12, 34156...
3.242424
165
import re import pytest from convbump.regexps import ensure_regexp_dots, to_regexp @pytest.mark.parametrize( "value, expected", ( ("one two three", r"one two three"), ("{version}", r"{version}"), ("-{type}.{number}", r"-{type}\.{number}"), ("{type}{number}", r"{type}{number}"...
[ 11748, 302, 198, 198, 11748, 12972, 9288, 198, 198, 6738, 3063, 65, 931, 13, 260, 25636, 862, 1330, 4155, 62, 260, 25636, 79, 62, 67, 1747, 11, 284, 62, 260, 25636, 79, 628, 198, 31, 9078, 9288, 13, 4102, 13, 17143, 316, 380, 2736...
2.015152
330
# @param {integer} n # @return {integer}
[ 220, 220, 220, 1303, 2488, 17143, 1391, 41433, 92, 299, 198, 220, 220, 220, 1303, 2488, 7783, 1391, 41433, 92, 198 ]
2.333333
21
from imap_tools.errors import MailboxFolderSelectError from imap_tools import MailBox, AND import logging import datetime def validate_credentials(email_address, server_address, password): """Validate IMAP credentials. If IMAP validation succeed return True Args: URL (str): [address ...
[ 6738, 545, 499, 62, 31391, 13, 48277, 1330, 11099, 3524, 41092, 17563, 12331, 198, 6738, 545, 499, 62, 31391, 1330, 11099, 14253, 11, 5357, 198, 11748, 18931, 198, 11748, 4818, 8079, 628, 198, 4299, 26571, 62, 66, 445, 14817, 7, 12888, ...
2.319252
1,657
import torch
[ 11748, 28034, 201, 198, 201, 198 ]
2.666667
6