content
stringlengths
1
1.05M
input_ids
listlengths
1
883k
ratio_char_token
float64
1
22.9
token_count
int64
1
883k
"""Drop-in replacement for collections.OrderedDict by Raymond Hettinger http://code.activestate.com/recipes/576693/ """ try: all except NameError:
[ 37811, 26932, 12, 259, 9014, 329, 17268, 13, 35422, 1068, 35, 713, 416, 24238, 367, 35463, 263, 198, 4023, 1378, 8189, 13, 15791, 44146, 13, 785, 14, 8344, 18636, 14, 3553, 2791, 6052, 14, 198, 37811, 198, 28311, 25, 198, 197, 439, ...
3.12766
47
from HardBlock import *
[ 6738, 6912, 12235, 1330, 1635, 198, 220, 220, 220, 220, 220, 220, 220, 220, 198, 220, 220, 220, 220, 198, 220, 220, 220, 220, 220, 220, 220, 220, 198, 220, 220, 220, 220, 220, 220, 220, 220, 198, 220, 220, 220, 220, 220, 220, 22...
1.372549
51
import dill import haiku as hk import jax from jax.experimental import optix import jax.numpy as jnp from dataset import load_data MINERL_ENV = 'MineRLTreechopVectorObf-v0' PARAMS_FILENAME = 'bc_params_treechop.pkl' def behavioral_cloning(batch): """ The full forward model definition """ x_0 = PovStack(n...
[ 11748, 288, 359, 198, 11748, 387, 28643, 355, 289, 74, 198, 11748, 474, 897, 198, 6738, 474, 897, 13, 23100, 9134, 1330, 2172, 844, 198, 11748, 474, 897, 13, 77, 32152, 355, 474, 37659, 198, 198, 6738, 27039, 1330, 3440, 62, 7890, 6...
2.386364
220
# This code is part of Qiskit. # # (C) Copyright IBM 2020. # # This code is licensed under the Apache License, Version 2.0. You may # obtain a copy of this license in the LICENSE.txt file in the root directory # of this source tree or at http://www.apache.org/licenses/LICENSE-2.0. # # Any modifications or derivative wo...
[ 2, 770, 2438, 318, 636, 286, 1195, 1984, 270, 13, 198, 2, 198, 2, 357, 34, 8, 15069, 19764, 12131, 13, 198, 2, 198, 2, 770, 2438, 318, 11971, 739, 262, 24843, 13789, 11, 10628, 362, 13, 15, 13, 921, 743, 198, 2, 7330, 257, 486...
2.384672
1,357
##################################################################################### # # Copyright (c) Microsoft Corporation. All rights reserved. # # This source code is subject to terms and conditions of the Apache License, Version 2.0. A # copy of the license can be found in the License.html file at the root of th...
[ 29113, 29113, 14468, 4242, 2, 198, 2, 198, 2, 220, 15069, 357, 66, 8, 5413, 10501, 13, 1439, 2489, 10395, 13, 198, 2, 198, 2, 770, 2723, 2438, 318, 2426, 284, 2846, 290, 3403, 286, 262, 24843, 13789, 11, 10628, 362, 13, 15, 13, ...
3.717647
340
import matplotlib.pyplot as plt, numpy as np, pandas as pd,os from ..model import recall_powerlaw_fits_to_full_models from .. import compute_power_rmse from .bluf import * from ..measure.powerlaw import * from .gener_q_vs_w_for_result_folder import *
[ 11748, 2603, 29487, 8019, 13, 9078, 29487, 355, 458, 83, 11, 299, 32152, 355, 45941, 11, 19798, 292, 355, 279, 67, 11, 418, 198, 6738, 11485, 19849, 1330, 10014, 62, 6477, 6270, 62, 21013, 62, 1462, 62, 12853, 62, 27530, 198, 6738, ...
2.885057
87
import sys import math import numpy as np from datetime import datetime import torch import torch.nn as nn import torch.nn.functional as F from torch.autograd import Variable
[ 11748, 25064, 198, 11748, 10688, 198, 11748, 299, 32152, 355, 45941, 198, 6738, 4818, 8079, 1330, 4818, 8079, 198, 198, 11748, 28034, 198, 11748, 28034, 13, 20471, 355, 299, 77, 198, 11748, 28034, 13, 20471, 13, 45124, 355, 376, 198, 67...
3.56
50
import torch.nn as nn import math import torch.utils.model_zoo as model_zoo import torch.nn.functional as F import torch import numpy as np import cv2 import pdb def conv3x3(in_planes, out_planes, stride=1): "3x3 convolution with padding" return nn.Conv2d(in_planes, out_planes, kernel_size=3, stride=stride, ...
[ 11748, 28034, 13, 20471, 355, 299, 77, 198, 11748, 10688, 198, 11748, 28034, 13, 26791, 13, 19849, 62, 89, 2238, 355, 2746, 62, 89, 2238, 198, 11748, 28034, 13, 20471, 13, 45124, 355, 376, 198, 11748, 28034, 198, 11748, 299, 32152, 35...
2.538889
180
"""Serves the single page app web ui.""" import json import tornado.gen from ndscheduler import settings from ndscheduler import utils from ndscheduler.server.handlers import base
[ 37811, 50, 11184, 262, 2060, 2443, 598, 3992, 334, 72, 526, 15931, 198, 198, 11748, 33918, 198, 11748, 33718, 13, 5235, 198, 198, 6738, 299, 67, 1416, 704, 18173, 1330, 6460, 198, 6738, 299, 67, 1416, 704, 18173, 1330, 3384, 4487, 198...
3.267857
56
#!/usr/bin/env python # Created: Wed Jun 21 13:46:35 2000 # Last changed: Time-stamp: <00/12/02 14:18:23 thomas> # Thomas.Sicheritz@molbio.uu.se, http://evolution.bmc.uu.se/~thomas # File: xbb_io.py import os, sys # os.system, sys.argv sys.path.insert(0, '.') sys.path.insert(0, os.path.expanduser('~thomas/cbs/python/...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 2, 15622, 25, 3300, 7653, 2310, 1511, 25, 3510, 25, 2327, 4751, 198, 2, 4586, 3421, 25, 3862, 12, 301, 696, 25, 1279, 405, 14, 1065, 14, 2999, 1478, 25, 1507, 25, 1954, 294, 16911,...
2.254144
181
# Convert a Number to a String! # We need a function that can transform a number into a string. # What ways of achieving this do you know? print(number_to_string(123)) print(type(number_to_string(123)))
[ 2, 38240, 257, 7913, 284, 257, 10903, 0, 198, 198, 2, 775, 761, 257, 2163, 326, 460, 6121, 257, 1271, 656, 257, 4731, 13, 198, 2, 1867, 2842, 286, 16937, 428, 466, 345, 760, 30, 628, 198, 4798, 7, 17618, 62, 1462, 62, 8841, 7, ...
3.416667
60
import spacy from spacy.scorer import PRFScore import typer from pathlib import Path from wasabi import Printer, table import operator import benepar import clausecat_component import clausecat_model import clausecat_reader import clause_segmentation import clause_aggregation msg = Printer() def main(model_path: Pa...
[ 11748, 599, 1590, 198, 6738, 599, 1590, 13, 1416, 11934, 1330, 4810, 37, 26595, 198, 11748, 1259, 525, 198, 6738, 3108, 8019, 1330, 10644, 198, 6738, 373, 17914, 1330, 1736, 3849, 11, 3084, 198, 11748, 10088, 198, 11748, 1888, 538, 283,...
2.1544
1,250
import pathlib print(pathlib.Path(__file__).parent.resolve()) while True: next_cmd = input("> ") print(eval(next_cmd))
[ 11748, 3108, 8019, 198, 198, 4798, 7, 6978, 8019, 13, 15235, 7, 834, 7753, 834, 737, 8000, 13, 411, 6442, 28955, 198, 198, 4514, 6407, 25, 198, 220, 220, 220, 1306, 62, 28758, 796, 5128, 7, 5320, 366, 8, 198, 220, 220, 220, 3601, ...
2.5
52
import logging import os import aiohttp.web from connexion import AioHttpApp from nlp_annotator_api.config.config import conf from nlp_annotator_api.config.logging import setup_logging from nlp_annotator_api.server.middleware.statsd_middleware import StatsdMiddleware from nlp_annotator_api.server.signals.statsd_clien...
[ 11748, 18931, 198, 11748, 28686, 198, 198, 11748, 257, 952, 4023, 13, 12384, 198, 6738, 369, 12413, 295, 1330, 317, 952, 43481, 4677, 198, 198, 6738, 299, 34431, 62, 34574, 1352, 62, 15042, 13, 11250, 13, 11250, 1330, 1013, 198, 6738, ...
2.623596
356
import tensorflow as tf from tensorflow import keras from tensorflow.keras import backend as K from keras_cv_attention_models.aotnet import AotNet from keras_cv_attention_models.download_and_load import reload_model_weights from keras_cv_attention_models.attention_layers import batchnorm_with_activation, conv2d_no_bias...
[ 11748, 11192, 273, 11125, 355, 48700, 198, 6738, 11192, 273, 11125, 1330, 41927, 292, 198, 6738, 11192, 273, 11125, 13, 6122, 292, 1330, 30203, 355, 509, 198, 6738, 41927, 292, 62, 33967, 62, 1078, 1463, 62, 27530, 13, 64, 313, 3262, ...
2.329588
267
"""replace FileRequest with FileGeneration Revision ID: 8692ab1298e1 Revises: 4bbc47f2b48d Create Date: 2018-10-24 14:54:39.278159 """ # revision identifiers, used by Alembic. revision = '8692ab1298e1' down_revision = '4bbc47f2b48d' branch_labels = None depends_on = None from alembic import op import sqlalchemy as ...
[ 37811, 33491, 9220, 18453, 351, 9220, 8645, 341, 198, 198, 18009, 1166, 4522, 25, 807, 46589, 397, 1065, 4089, 68, 16, 198, 18009, 2696, 25, 604, 11848, 66, 2857, 69, 17, 65, 2780, 67, 198, 16447, 7536, 25, 2864, 12, 940, 12, 1731, ...
2.526718
131
import numpy as np import random import sys chainlength = int(sys.argv[1]) dfname = sys.argv[2] outfl = 'result.data' cluster_size = int(sys.argv[3]) # This function will perform statistical analysis to the clustering results X, Xi = readdata(dfname, chainlength) size = readsize(dfname) boxl = np.array([size, size...
[ 11748, 299, 32152, 355, 45941, 198, 11748, 4738, 198, 11748, 25064, 198, 198, 7983, 13664, 796, 493, 7, 17597, 13, 853, 85, 58, 16, 12962, 198, 7568, 3672, 796, 25064, 13, 853, 85, 58, 17, 60, 198, 448, 2704, 796, 705, 20274, 13, ...
2.149692
2,111
import numpy as np import quaternion sample_points = np.array([[-1.0,-1.0,-1.0,-1.0,-1.0,-1.0,-1.0,-1.0,-1.0,-1.0,-1.0,-1.0,-1.0,-1.0,-1.0,-1.0,-1.0,-1.0,-1.0,-1.0,-1.0,-1.0,-1.0,-1.0,-1.0,-1.0,-1.0,-1.0,-1.0,-1.0,-1.0,-1.0,-1.0,-1.0,-1.0,-1.0,-1.0,-1.0,-1.0,-1.0,-1.0,-1.0,-1.0,-1.0,-1.0,-1.0,-1.0,-1.0,-1.0,-1.0,...
[ 11748, 299, 32152, 355, 45941, 201, 198, 11748, 627, 9205, 295, 201, 198, 201, 198, 201, 198, 39873, 62, 13033, 796, 45941, 13, 18747, 26933, 58, 12, 16, 13, 15, 12095, 16, 13, 15, 12095, 16, 13, 15, 12095, 16, 13, 15, 12095, 16, ...
1.131016
16,540
from django.test import TestCase from django.utils import timezone from accounts.models import CustomUser, CustomUserManager
[ 6738, 42625, 14208, 13, 9288, 1330, 6208, 20448, 198, 6738, 42625, 14208, 13, 26791, 1330, 640, 11340, 198, 6738, 5504, 13, 27530, 1330, 8562, 12982, 11, 8562, 12982, 13511, 628 ]
4.2
30
import os from typing import List import numpy as np from torchvision import datasets as torchdata from continuum.datasets import ImageFolderDataset from continuum import download from continuum.tasks import TaskType
[ 11748, 28686, 198, 6738, 19720, 1330, 7343, 198, 198, 11748, 299, 32152, 355, 45941, 198, 6738, 28034, 10178, 1330, 40522, 355, 28034, 7890, 198, 198, 6738, 44422, 13, 19608, 292, 1039, 1330, 7412, 41092, 27354, 292, 316, 198, 6738, 44422...
4.169811
53
from board import Direction # Tuples of input, action, expected output. moving_tests = [ ( [[0,0,0,0], [4,0,0,0], [0,0,0,0], [4,0,2,0]], Direction.UP, [[8,0,2,0], [0,0,0,0], [0,0,0,0], [0,0,0,0]] ), ( [[0,0,0,0], ...
[ 6738, 3096, 1330, 41837, 198, 198, 2, 16749, 2374, 286, 5128, 11, 2223, 11, 2938, 5072, 13, 198, 31462, 62, 41989, 796, 685, 198, 220, 220, 220, 357, 198, 220, 220, 220, 220, 220, 220, 220, 16410, 15, 11, 15, 11, 15, 11, 15, 435...
1.257807
1,377
import pytest from pji.utils import ValueProxy
[ 11748, 12972, 9288, 198, 198, 6738, 279, 7285, 13, 26791, 1330, 11052, 44148, 628 ]
3.5
14
#Intro Page from tkinter import * from PIL import Image, ImageTk import cv2 #----------------------------Start Function--------------------------# #------------------------Main Window---------------------------------#li main_window()
[ 2, 5317, 305, 7873, 198, 6738, 256, 74, 3849, 1330, 1635, 198, 6738, 350, 4146, 1330, 7412, 11, 7412, 51, 74, 198, 11748, 269, 85, 17, 628, 198, 2, 1783, 10541, 10434, 15553, 22369, 438, 2, 628, 198, 2, 22369, 13383, 26580, 3880, ...
4.528302
53
""" This module provides helper functions to support exercises during AM1 with outliers, robust regression and template regression in the CORE data analytics workshop series, week 4. """ import numpy as np import pandas as pd import math from collections import namedtuple def recovery_sulphur_dataframe_wit...
[ 37811, 201, 198, 1212, 8265, 3769, 31904, 5499, 284, 1104, 13565, 1141, 3001, 16, 201, 198, 4480, 41528, 3183, 11, 12373, 20683, 290, 11055, 20683, 287, 262, 327, 6965, 201, 198, 7890, 23696, 20243, 2168, 11, 1285, 604, 13, 201, 198, ...
2.590123
5,204
from radixlib.actions import CreateTokenDefinition from typing import Dict, Any import unittest
[ 6738, 2511, 844, 8019, 13, 4658, 1330, 13610, 30642, 36621, 198, 6738, 19720, 1330, 360, 713, 11, 4377, 198, 11748, 555, 715, 395 ]
4.130435
23
floatVar = 1.0 listVar = [3, "hello"] dictVar = { "myField": "value" } aotVar = [dictVar, dictVar] intVar = 1
[ 22468, 19852, 796, 352, 13, 15, 198, 4868, 19852, 796, 685, 18, 11, 366, 31373, 8973, 198, 11600, 19852, 796, 1391, 198, 220, 220, 220, 366, 1820, 15878, 1298, 366, 8367, 1, 198, 92, 198, 64, 313, 19852, 796, 685, 11600, 19852, 11, ...
2.215686
51
"""Recipes for xTB"""
[ 37811, 6690, 18636, 329, 2124, 22737, 37811, 198 ]
2.75
8
# coding=utf-8 # Copyright 2018 Pants project contributors (see CONTRIBUTORS.md). # Licensed under the Apache License, Version 2.0 (see LICENSE). from __future__ import absolute_import, division, print_function, unicode_literals import os from pants.backend.native.config.environment import Assembler, CCompiler, CppC...
[ 2, 19617, 28, 40477, 12, 23, 198, 2, 15069, 2864, 41689, 1628, 20420, 357, 3826, 27342, 9865, 3843, 20673, 13, 9132, 737, 198, 2, 49962, 739, 262, 24843, 13789, 11, 10628, 362, 13, 15, 357, 3826, 38559, 24290, 737, 198, 198, 6738, 1...
2.978261
276
# -*- coding: utf-8 -*- # ----------------------------------------------------------------------------- # (C) British Crown Copyright 2017-2021 Met Office. # All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions a...
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 2, 16529, 32501, 198, 2, 357, 34, 8, 3517, 12223, 15069, 2177, 12, 1238, 2481, 3395, 4452, 13, 198, 2, 1439, 2489, 10395, 13, 198, 2, 198, 2, 2297, 396, 3890, 290, ...
2.01275
5,961
#!/usr/bin/env python from setuptools import setup, find_packages import os requires = [ ] setup( name='details', version=open(os.path.join('details', '_version')).read(), description='Tools for processing AWS detailed billing reports', long_description=open('README.md').read(), author='Mitch G...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 198, 6738, 900, 37623, 10141, 1330, 9058, 11, 1064, 62, 43789, 198, 198, 11748, 28686, 198, 198, 47911, 796, 685, 198, 60, 628, 198, 40406, 7, 198, 220, 220, 220, 1438, 11639, 36604, ...
2.755501
409
''' Script to check the correctness of the analysis. The analysis is done on raw data and all results are compared to a recorded analysis. ''' import os import unittest import numpy as np from beam_telescope_analysis import track_analysis from beam_telescope_analysis.tools import test_tools if __name__ == '__main...
[ 7061, 6, 12327, 284, 2198, 262, 29409, 286, 262, 3781, 13, 383, 3781, 318, 1760, 319, 8246, 1366, 290, 477, 2482, 389, 3688, 284, 257, 6264, 3781, 13, 198, 7061, 6, 198, 11748, 28686, 198, 198, 11748, 555, 715, 395, 198, 198, 11748,...
3.045685
197
# Licensed under a 3-clause BSD style license - see LICENSE.rst import glob import os import sys import json from os.path import join, isfile import pytest from asv import util from . import tools
[ 2, 49962, 739, 257, 513, 12, 565, 682, 347, 10305, 3918, 5964, 532, 766, 38559, 24290, 13, 81, 301, 198, 198, 11748, 15095, 198, 11748, 28686, 198, 11748, 25064, 198, 11748, 33918, 198, 6738, 28686, 13, 6978, 1330, 4654, 11, 318, 7753...
3.311475
61
# @author Metro # @time 2021/11/24 import os.path import gym from agents.pdqn import P_DQN from utilities.memory import ReplayBuffer from utilities.utilities import * from utilities.route_generator import generate_routefile
[ 2, 2488, 9800, 12477, 198, 2, 2488, 2435, 33448, 14, 1157, 14, 1731, 198, 11748, 28686, 13, 6978, 198, 198, 11748, 11550, 198, 6738, 6554, 13, 30094, 80, 77, 1330, 350, 62, 35, 48, 45, 198, 6738, 20081, 13, 31673, 1330, 23635, 28632...
3.373134
67
import sys import pprint import json import datetime import uuid import urllib import types import traceback from django.core.urlresolvers import reverse, resolve from django.http import HttpResponseRedirect, Http404, HttpResponseServerError, HttpResponseNotFound from django.conf import settings from django.contrib.aut...
[ 11748, 25064, 198, 11748, 279, 4798, 198, 11748, 33918, 198, 11748, 4818, 8079, 198, 11748, 334, 27112, 198, 11748, 2956, 297, 571, 198, 11748, 3858, 198, 11748, 12854, 1891, 198, 6738, 42625, 14208, 13, 7295, 13, 6371, 411, 349, 690, 1...
3.221687
415
# -*- coding: utf-8 -*- import logging import utool as ut import six from . import draw_func2 as df2 from wbia.plottool import plot_helpers as ph from wbia.plottool import interact_helpers as ih from wbia.plottool.viz_featrow import draw_feat_row from wbia.plottool.viz_keypoints import show_keypoints from wbia.plottool...
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 11748, 18931, 198, 11748, 3384, 970, 355, 3384, 198, 11748, 2237, 198, 6738, 764, 1330, 3197, 62, 20786, 17, 355, 47764, 17, 198, 6738, 266, 23339, 13, 489, 1252, 970, ...
2.32963
810
from .database import StDatabase from .telegram import StTelegram from .tinydb import TinyDataBase, TinySelect from .utility import StDispatch
[ 6738, 764, 48806, 1330, 520, 38105, 198, 6738, 764, 660, 30536, 1330, 520, 6767, 30536, 198, 6738, 764, 44152, 9945, 1330, 20443, 6601, 14881, 11, 20443, 17563, 198, 6738, 764, 315, 879, 1330, 520, 49354, 198 ]
3.972222
36
from algorithms.maths.gcd import gcd from typing import List def solve_chinese_remainder(num : List[int], rem : List[int]): """ Computes the smallest x that satisfies the chinese remainder theorem for a system of equations. The system of equations has the form: x % num[0] = rem[0] x % num[1] = ...
[ 6738, 16113, 13, 11018, 82, 13, 70, 10210, 1330, 308, 10210, 198, 6738, 19720, 1330, 7343, 198, 198, 4299, 8494, 62, 354, 3762, 62, 2787, 391, 1082, 7, 22510, 1058, 7343, 58, 600, 4357, 816, 1058, 7343, 58, 600, 60, 2599, 198, 220, ...
2.402321
517
import spacy nlp = spacy.load("ja_core_news_sm") text = ( "" "" ) # doc = nlp(text) print([token.text for token in doc])
[ 11748, 599, 1590, 198, 198, 21283, 79, 796, 599, 1590, 13, 2220, 7203, 6592, 62, 7295, 62, 10827, 62, 5796, 4943, 198, 5239, 796, 357, 198, 220, 220, 220, 13538, 198, 220, 220, 220, 13538, 198, 8, 198, 198, 2, 220, 198, 15390, 796...
2.163934
61
# -*- coding: utf-8 -*- """ ## @author: lywen """ import sys import six import os import base64 import requests import numpy as np import cv2 from PIL import Image import traceback import uuid from glob import glob from bs4 import BeautifulSoup import numpy as np from scipy.spatial import distance as dist def _order_...
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 37811, 198, 2235, 198, 31, 9800, 25, 22404, 21006, 198, 37811, 198, 11748, 25064, 198, 11748, 2237, 198, 11748, 28686, 198, 11748, 2779, 2414, 198, 11748, 7007, 198, 11748...
1.69454
7,857
# -*- coding: UTF-8 -*- import sys, time if __name__=='__main__': max_steps = 100 process_bar = ShowProcess(max_steps, 'OK') for i in range(max_steps): process_bar.show_process() time.sleep(0.1)
[ 2, 532, 9, 12, 19617, 25, 41002, 12, 23, 532, 9, 12, 198, 198, 11748, 25064, 11, 640, 198, 198, 361, 11593, 3672, 834, 855, 6, 834, 12417, 834, 10354, 198, 220, 220, 220, 3509, 62, 20214, 796, 1802, 628, 220, 220, 220, 1429, 62,...
2.215686
102
''' You are given an integer array nums and an integer target. You want to build an expression out of nums by adding one of the symbols '+' and '-' before each integer in nums and then concatenate all the integers. For example, if nums = [2, 1], you can add a '+' before 2 and a '-' before 1 and concatenate them to bu...
[ 7061, 6, 198, 1639, 389, 1813, 281, 18253, 7177, 997, 82, 290, 281, 18253, 2496, 13, 198, 198, 1639, 765, 284, 1382, 281, 5408, 503, 286, 997, 82, 416, 4375, 530, 286, 262, 14354, 705, 10, 6, 290, 705, 19355, 878, 1123, 18253, 287...
3.490798
163
import numpy as np from fixtrack.frontend.pickable_base import PickableBase from vispy import scene
[ 11748, 299, 32152, 355, 45941, 198, 198, 6738, 277, 6346, 39638, 13, 8534, 437, 13, 27729, 540, 62, 8692, 1330, 12346, 540, 14881, 198, 198, 6738, 1490, 9078, 1330, 3715, 628 ]
3.322581
31
""" Example of subscribing to a D-Bus signal using blocking I/O. This subscribes to the signal for a desktop notification being closed. To try it, start this script, then trigger a desktop notification, and close it somehow to trigger the signal. Use Ctrl-C to stop the script. This example relies on the ``org.freedes...
[ 37811, 198, 16281, 286, 18412, 284, 257, 360, 12, 16286, 6737, 1262, 12013, 314, 14, 46, 13, 198, 1212, 11452, 274, 284, 262, 6737, 329, 257, 11364, 14483, 852, 4838, 13, 198, 198, 2514, 1949, 340, 11, 923, 428, 4226, 11, 788, 7616,...
3.062842
732
from shholiday import holiday2020 as hd daytuple = (1,1) nowholiday = hd.holiday2020() print(nowholiday.is_holiday(daytuple))
[ 6738, 427, 37689, 1330, 9912, 42334, 355, 289, 67, 198, 198, 820, 83, 29291, 796, 357, 16, 11, 16, 8, 198, 2197, 37689, 796, 289, 67, 13, 37689, 42334, 3419, 198, 4798, 7, 2197, 37689, 13, 271, 62, 37689, 7, 820, 83, 29291, 4008 ]
2.863636
44
from distutils.core import setup DISTNAME='pandas_composition' FULLVERSION='0.1' ...
[ 6738, 1233, 26791, 13, 7295, 1330, 9058, 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, 22...
1.161695
637
# Generated by Django 2.1.7 on 2019-02-27 14:23 from django.db import migrations, models
[ 2, 2980, 515, 416, 37770, 362, 13, 16, 13, 22, 319, 13130, 12, 2999, 12, 1983, 1478, 25, 1954, 198, 198, 6738, 42625, 14208, 13, 9945, 1330, 15720, 602, 11, 4981, 628 ]
2.84375
32
from setuptools import setup from codecs import open from os import path here = path.abspath(path.dirname(__file__)) with open(path.join(here, 'README.rst'), encoding='utf-8') as f: long_description = f.read() setup( name='xiandb', version='0.2.0', description='A database model for Xian', long_d...
[ 6738, 900, 37623, 10141, 1330, 9058, 198, 6738, 40481, 82, 1330, 1280, 198, 6738, 28686, 1330, 3108, 198, 198, 1456, 796, 3108, 13, 397, 2777, 776, 7, 6978, 13, 15908, 3672, 7, 834, 7753, 834, 4008, 198, 198, 4480, 1280, 7, 6978, 13...
2.605114
352
from functools import partial import tensorflow as tf _EPSILON = tf.keras.backend.epsilon() # Helper functions below def _process_labels(labels, label_smoothing, dtype): labels = tf.dtypes.cast(labels, dtype=dtype) if label_smoothing is not None: labels = (1 - label_smoothing) * labels + label_s...
[ 6738, 1257, 310, 10141, 1330, 13027, 198, 11748, 11192, 273, 11125, 355, 48700, 198, 198, 62, 36, 3705, 4146, 1340, 796, 48700, 13, 6122, 292, 13, 1891, 437, 13, 538, 18217, 261, 3419, 628, 628, 198, 198, 2, 5053, 525, 5499, 2174, 6...
2.365992
1,235
import time from collections import OrderedDict from datetime import datetime, timedelta from django.db import models from django.conf import settings from django.utils.timezone import utc from .skills import Skill, SkillGroup from metrics.models import Corporation from tasks.models import EveApiCache, Task from evet...
[ 11748, 640, 198, 6738, 17268, 1330, 14230, 1068, 35, 713, 198, 6738, 4818, 8079, 1330, 4818, 8079, 11, 28805, 12514, 198, 198, 6738, 42625, 14208, 13, 9945, 1330, 4981, 198, 6738, 42625, 14208, 13, 10414, 1330, 6460, 198, 6738, 42625, 1...
2.18354
1,373
# -*- coding: utf-8 -*- from {{cookiecutter.skill_name}}.root import app __all__ = ['app']
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 6738, 22935, 44453, 8968, 353, 13, 42401, 62, 3672, 11709, 13, 15763, 1330, 598, 198, 198, 834, 439, 834, 796, 37250, 1324, 20520, 198 ]
2.421053
38
from django.urls import path from backend.api.v1.dialogs.views import ( DialogListCreateView, DialogRetrieveUpdateDestroyAPIView, DialogMembershipListCreateView, DialogMessageListCreateView, DialogMessageRetrieveUpdateDestroyAPIView, ) urlpatterns = [ path('', DialogListCreateView.as_view()), ...
[ 6738, 42625, 14208, 13, 6371, 82, 1330, 3108, 198, 6738, 30203, 13, 15042, 13, 85, 16, 13, 38969, 18463, 13, 33571, 1330, 357, 198, 220, 220, 220, 21269, 519, 8053, 16447, 7680, 11, 198, 220, 220, 220, 21269, 519, 9781, 30227, 10260, ...
2.736364
220
# coding: utf-8 from __future__ import absolute_import from __future__ import division from __future__ import print_function import os from bioblend import galaxy from biomaj2galaxy import config, pass_context from biomaj2galaxy.io import info, warn import click CONFIG_TEMPLATE = """## BioMAJ2Galaxy: Global Confi...
[ 2, 19617, 25, 3384, 69, 12, 23, 198, 6738, 11593, 37443, 834, 1330, 4112, 62, 11748, 198, 6738, 11593, 37443, 834, 1330, 7297, 198, 6738, 11593, 37443, 834, 1330, 3601, 62, 8818, 198, 198, 11748, 28686, 198, 198, 6738, 3182, 45292, 43...
3.065728
213
from ..datamart import * def test_create_dimension_insert_2_identical_lines(): ''' with 2 identical lines, only one gets stored ''' dimension = Dimension("test_dimension") dimension.addDimensionLine('test') dimension.addDimensionLine('test') assert dimension.id_value == 1 assert len(list(di...
[ 6738, 11485, 19608, 321, 433, 1330, 1635, 198, 198, 4299, 1332, 62, 17953, 62, 46156, 62, 28463, 62, 17, 62, 738, 605, 62, 6615, 33529, 198, 220, 220, 220, 705, 7061, 351, 362, 10411, 3951, 11, 691, 530, 3011, 8574, 198, 220, 220, ...
3.054393
239
# # msmarco doc: create the train.tsv triples # ------------------------------- import random random.seed(42) import argparse import os import sys from tqdm import tqdm sys.path.append(os.getcwd()) from matchmaker.evaluation.msmarco_eval import * from collections import defaultdict from matchmaker.dataloaders.blin...
[ 2, 198, 2, 13845, 3876, 1073, 2205, 25, 2251, 262, 4512, 13, 912, 85, 1333, 2374, 220, 220, 198, 2, 34400, 24305, 198, 198, 11748, 4738, 198, 25120, 13, 28826, 7, 3682, 8, 198, 198, 11748, 1822, 29572, 198, 11748, 28686, 198, 11748,...
2.431454
1,933
from core.response import Response from communities.tests import TestCase
[ 6738, 4755, 13, 26209, 1330, 18261, 198, 6738, 5348, 13, 41989, 1330, 6208, 20448, 628, 628 ]
4.8125
16
# Author: Angela Chapman # Date: 8/6/2014 # # This file contains code to accompany the Kaggle tutorial # "Deep learning goes to the movies". The code in this file # is for Parts 2 and 3 of the tutorial, which cover how to # train a model using Word2Vec. # # *************************************** # # ****** Re...
[ 2, 220, 6434, 25, 17799, 29045, 198, 2, 220, 7536, 25, 807, 14, 21, 14, 4967, 198, 2, 198, 2, 220, 770, 2393, 4909, 2438, 284, 13873, 262, 509, 9460, 293, 11808, 198, 2, 220, 366, 29744, 4673, 2925, 284, 262, 6918, 1911, 220, 38...
2.774098
1,691
from .core import FullTimePositions
[ 6738, 764, 7295, 1330, 6462, 7575, 21604, 1756, 198 ]
4
9
# coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for # license information. # # Code generated by Microsoft (R) AutoRest Code Generator. # Changes ...
[ 2, 19617, 28, 40477, 12, 23, 198, 2, 16529, 35937, 198, 2, 15069, 357, 66, 8, 5413, 10501, 13, 1439, 2489, 10395, 13, 198, 2, 49962, 739, 262, 17168, 13789, 13, 4091, 13789, 13, 14116, 287, 262, 1628, 6808, 329, 198, 2, 5964, 1321...
5.354167
96
# Python3 program to print # given matrix in spiral form # Driver Code a = [[1, 2, 3, 4, 5, 6], [7, 8, 9, 10, 11, 12], [13, 14, 15, 16, 17, 18]] R = 3 C = 6 spiralPrint(R, C, a)
[ 2, 11361, 18, 1430, 284, 3601, 198, 2, 1813, 17593, 287, 23642, 1296, 628, 198, 198, 2, 12434, 6127, 198, 64, 796, 16410, 16, 11, 362, 11, 513, 11, 604, 11, 642, 11, 718, 4357, 198, 220, 220, 220, 220, 685, 22, 11, 807, 11, 86...
2.086957
92
""" Authorization Utilities """ from shared.models.user_entities import User from shared.service.jwt_auth_wrapper import JWTAuthManager manager = JWTAuthManager(oidc_vault_secret="oidc/rest", object_creator=lambda claims, assumed_role, user_roles: User( first_name=...
[ 37811, 198, 13838, 1634, 41086, 198, 37811, 198, 6738, 4888, 13, 27530, 13, 7220, 62, 298, 871, 1330, 11787, 198, 6738, 4888, 13, 15271, 13, 73, 46569, 62, 18439, 62, 48553, 1330, 449, 54, 5603, 1071, 13511, 198, 198, 37153, 796, 449,...
1.925424
295
import matplotlib.pyplot as plt import numpy as np from photonpy.cpp.context import Context import photonpy.cpp.gaussian as gaussian from photonpy.smlm.util import imshow_hstack from photonpy.cpp.estimator import Estimator with Context() as ctx: g = gaussian.Gaussian(ctx) for cuda in [False]: print(...
[ 11748, 2603, 29487, 8019, 13, 9078, 29487, 355, 458, 83, 198, 11748, 299, 32152, 355, 45941, 198, 198, 6738, 48190, 9078, 13, 20322, 13, 22866, 1330, 30532, 198, 11748, 48190, 9078, 13, 20322, 13, 4908, 31562, 355, 31986, 31562, 198, 67...
1.845601
557
# -*- coding: utf-8 """Module for testing helper functions. This file is part of project TESPy (github.com/oemof/tespy). It's copyrighted by the contributors recorded in the version control history of the file, available from its original location tests/tools_tests/helpers_tests.py SPDX-License-Identifier: MIT """ ...
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 198, 198, 37811, 26796, 329, 4856, 31904, 5499, 13, 198, 198, 1212, 2393, 318, 636, 286, 1628, 309, 1546, 20519, 357, 12567, 13, 785, 14, 78, 368, 1659, 14, 4879, 9078, 737, 632, 338, ...
2.785818
691
import formencode import pylons from pylons import app_globals as g def validate_custom(schema, **state_kwargs): """Validate a formencode schema. Works similar to the @validate decorator. On success return a dictionary of parameters from reque...
[ 11748, 1296, 268, 8189, 220, 198, 11748, 279, 2645, 684, 198, 6738, 279, 2645, 684, 1330, 598, 62, 4743, 672, 874, 355, 308, 628, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, ...
2.571429
539
""" Dynamo Utils ============ All utility functions for interactions with DynamoDB Functions - ensure_json - create_user_table - create_or_update_record - list_tables - list_records - get_record - delete_table - delete_record - check_active """ import boto3 from decimal import Deci...
[ 37811, 198, 35, 4989, 78, 7273, 4487, 198, 25609, 198, 198, 3237, 10361, 5499, 329, 12213, 351, 41542, 11012, 198, 198, 24629, 2733, 198, 220, 220, 220, 532, 4155, 62, 17752, 198, 220, 220, 220, 532, 2251, 62, 7220, 62, 11487, 198, ...
2.105758
4,255
from .branch import Branch
[ 6738, 764, 1671, 3702, 1330, 20551 ]
4.333333
6
print('this is a test2 file')
[ 4798, 10786, 5661, 318, 257, 1332, 17, 2393, 11537, 198 ]
3
10
""" ******************************************************************************** compas_blender.forms ******************************************************************************** .. currentmodule:: compas_blender.forms """ __all__ = []
[ 37811, 198, 17174, 17174, 8412, 198, 5589, 292, 62, 2436, 2194, 13, 23914, 198, 17174, 17174, 8412, 198, 198, 492, 1459, 21412, 3712, 552, 292, 62, 2436, 2194, 13, 23914, 198, 198, 37811, 198, 198, 834, 439, 834, 796, 17635, 198 ]
6.02439
41
#!/usr/bin/python3 import sys import git r = git.Repo( sys.argv[1] ) num = 0 for info in r.blame( 'HEAD', sys.argv[2] ): num += 1 commit = info[0] all_lines = info[1] print( '%s %6d:%s' % (commit, num, all_lines[0]) ) for line in all_lines[1:]: num += 1 print( '%*s %6d:%s' % (4...
[ 2, 48443, 14629, 14, 8800, 14, 29412, 18, 198, 11748, 25064, 198, 198, 11748, 17606, 198, 198, 81, 796, 17606, 13, 6207, 78, 7, 25064, 13, 853, 85, 58, 16, 60, 1267, 628, 198, 22510, 796, 657, 198, 198, 1640, 7508, 287, 374, 13, ...
1.954023
174
# configs for the model training # configs for the model testing # configs for hyperparameter tuning(SMAC3)
[ 2, 4566, 82, 329, 262, 2746, 3047, 198, 198, 2, 4566, 82, 329, 262, 2746, 4856, 198, 198, 2, 4566, 82, 329, 8718, 17143, 2357, 24549, 7, 12310, 2246, 18, 8, 198 ]
3.4375
32
# -*- coding: utf-8 -*- import unittest from uuid import uuid4 from copy import deepcopy from openprocurement.api.models import get_now from openprocurement.edge.tests.base import AuctionBaseWebTest, test_award, test_auction_data, test_document, ROUTE_PREFIX try: import openprocurement.auctions.core as auctions_co...
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 11748, 555, 715, 395, 198, 6738, 334, 27112, 1330, 334, 27112, 19, 198, 6738, 4866, 1330, 2769, 30073, 198, 198, 6738, 1280, 36942, 495, 434, 13, 15042, 13, 27530, 1330,...
2.796
250
from selenium.common.exceptions import NoSuchElementException from selenium.webdriver.remote.webelement import WebElement
[ 6738, 384, 11925, 1505, 13, 11321, 13, 1069, 11755, 1330, 1400, 16678, 20180, 16922, 198, 6738, 384, 11925, 1505, 13, 12384, 26230, 13, 47960, 13, 732, 1350, 1732, 1330, 5313, 20180, 628 ]
3.84375
32
from PyQt5.QtWidgets import QDialog from PyQt5 import uic from PyQt5.Qt import Qt from PyQt5.Qt import QShortcut from PyQt5.Qt import QKeySequence from PyQt5.QtWidgets import QMessageBox from PyQt5.QtWidgets import QInputDialog from PyQt5.Qt import QDateTime from PyQt5.Qt import QStyle from PyQt5.Qt import QNetworkCook...
[ 6738, 9485, 48, 83, 20, 13, 48, 83, 54, 312, 11407, 1330, 1195, 44204, 198, 6738, 9485, 48, 83, 20, 1330, 334, 291, 198, 6738, 9485, 48, 83, 20, 13, 48, 83, 1330, 33734, 198, 6738, 9485, 48, 83, 20, 13, 48, 83, 1330, 1195, 164...
2.8
200
#!/usr/bin/env python3 import os import sys import logging import subprocess logging.basicConfig(level=logging.INFO) root_dir = 'submitted_data' submitted_file_split = set() for dir_, _, files in os.walk(root_dir): for file_name in files: rel_dir = os.path.relpath(dir_, root_dir) rel_file = os...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 18, 198, 198, 11748, 28686, 198, 11748, 25064, 198, 11748, 18931, 198, 11748, 850, 14681, 628, 198, 6404, 2667, 13, 35487, 16934, 7, 5715, 28, 6404, 2667, 13, 10778, 8, 628, 198, 15763, 62,...
1.968341
916
import enum
[ 11748, 33829, 201, 198, 201, 198, 201, 198 ]
2.125
8
# Copyright 2019 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 agreed to in writing, ...
[ 2, 15069, 13130, 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.56993
2,288
import numpy as np img_dtype = np.float32 imgX, imgY, imgZ = (256, 256, 150) imgs_path_withfaces = '../dataset/withfaces' imgs_path_nofaces = '../dataset/nofaces' imgX_dwt1, imgY_dwt1, imgZ_dwt1 = (128, 128, 75) imgs_path_withfaces_dwt = './dataset/withfaces' imgs_path_nofaces_dwt = './dataset/nofaces' dwt_flag = (...
[ 11748, 299, 32152, 355, 45941, 198, 198, 9600, 62, 67, 4906, 796, 45941, 13, 22468, 2624, 198, 198, 9600, 55, 11, 33705, 56, 11, 33705, 57, 796, 357, 11645, 11, 17759, 11, 6640, 8, 198, 9600, 82, 62, 6978, 62, 4480, 32186, 796, 70...
2.024291
247
# Copyright (c) 2020 PaddlePaddle Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by appli...
[ 2, 15069, 357, 66, 8, 12131, 350, 37382, 47, 37382, 46665, 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, 2393, 2845...
2.309834
4,454
# -*- coding: utf-8 -*- """ Created on Fri Jan 29 13:38:35 2021 GROUND INVASION! The Game @author: Ashton Hansen (ashhansen6@outlook.com) """ # Packages used: import numpy as np import pandas as pd import random as rng from termcolor import colored # Defining starting forces ## Defenders: def_force =...
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 201, 198, 37811, 201, 198, 41972, 319, 19480, 2365, 2808, 1511, 25, 2548, 25, 2327, 33448, 201, 198, 201, 198, 46025, 34899, 1921, 2849, 0, 383, 3776, 201, 198, 31, 9800, 2...
2.389639
4,150
from django.conf.urls import include, url from django.views.generic.base import RedirectView from pretalx.event.models.event import SLUG_CHARS from pretalx.orga.views import cards from .views import ( admin, auth, cfp, dashboard, event, mails, organiser, person, plugins, review...
[ 6738, 42625, 14208, 13, 10414, 13, 6371, 82, 1330, 2291, 11, 19016, 198, 6738, 42625, 14208, 13, 33571, 13, 41357, 13, 8692, 1330, 2297, 1060, 7680, 198, 198, 6738, 2181, 282, 87, 13, 15596, 13, 27530, 13, 15596, 1330, 12419, 7340, 62...
1.482649
16,598
''' This file is part of PM4Py (More Info: https://pm4py.fit.fraunhofer.de). PM4Py is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any late...
[ 7061, 6, 198, 220, 220, 220, 770, 2393, 318, 636, 286, 3122, 19, 20519, 357, 5167, 14151, 25, 3740, 1378, 4426, 19, 9078, 13, 11147, 13, 69, 430, 403, 71, 30288, 13, 2934, 737, 628, 220, 220, 220, 3122, 19, 20519, 318, 1479, 3788,...
2.968354
632
from htmlman import HTMLMan from styleman import Template page=HTMLMan() page.make_responsive() page.add_title("Base Quiz") style=Template('antartica') page.add_body_class(style['page']) page.add_js("baseui.js") page.create_section('main',append=True) page['main'].add_style_class(style['main']) title=page.create_sec...
[ 6738, 27711, 805, 1330, 11532, 5124, 198, 6738, 3918, 805, 1330, 37350, 198, 198, 7700, 28, 28656, 5124, 3419, 198, 7700, 13, 15883, 62, 39772, 3419, 198, 7700, 13, 2860, 62, 7839, 7203, 14881, 2264, 528, 4943, 198, 7635, 28, 30800, 1...
2.669173
665
name = "cluster" num_cores = 1000 GENERAL_PARTITIONS = ["regular"] GPU_PARTITIONS = ["gpu"] PARTITIONS = GENERAL_PARTITIONS + GPU_PARTITIONS ACTIVE_JOB_STATES = ["RUNNING", "COMPLETING"] FINISHED_JOB_STATES = ["COMPLETED", "NODE_FAIL", "TIMEOUT", "FAILED", "CANCELLED"] JOB_STATES = ACTIVE_JOB_STATES + FINISHED_JOB_...
[ 3672, 796, 366, 565, 5819, 1, 198, 22510, 62, 66, 2850, 796, 8576, 198, 198, 35353, 27130, 62, 30709, 2043, 11053, 796, 14631, 16338, 8973, 198, 33346, 62, 30709, 2043, 11053, 796, 14631, 46999, 8973, 198, 198, 30709, 2043, 11053, 796, ...
2.649485
194
# This file is part of the CERN Indico plugins. # Copyright (C) 2014 - 2021 CERN # # The CERN Indico plugins are free software; you can redistribute # them and/or modify them under the terms of the MIT License; see # the LICENSE file for more details. import dateutil.parser import pytz from flask import flash, request...
[ 2, 770, 2393, 318, 636, 286, 262, 327, 28778, 1423, 3713, 20652, 13, 198, 2, 15069, 357, 34, 8, 1946, 532, 33448, 327, 28778, 198, 2, 198, 2, 383, 327, 28778, 1423, 3713, 20652, 389, 1479, 3788, 26, 345, 460, 17678, 4163, 198, 2, ...
3.372596
416
from datamart.materializers.materializer_base import MaterializerBase import os import urllib.request import sys import csv import copy import json from typing import List from pprint import pprint import re import typing from pandas import DataFrame import traceback
[ 6738, 4818, 321, 433, 13, 33665, 11341, 13, 33665, 7509, 62, 8692, 1330, 14633, 7509, 14881, 198, 198, 11748, 28686, 198, 11748, 2956, 297, 571, 13, 25927, 198, 11748, 25064, 198, 11748, 269, 21370, 198, 11748, 4866, 198, 11748, 33918, ...
3.857143
70
from typing import Dict, List, Tuple import pkg_resources def load_file(filename: str, directory: str) -> List[List[str]]: """Loads a data file stored in the Axelrod library's data subdirectory, likely for parameters for a strategy.""" path = "/".join((directory, filename)) data_bytes = pkg_resources...
[ 6738, 19720, 1330, 360, 713, 11, 7343, 11, 309, 29291, 198, 198, 11748, 279, 10025, 62, 37540, 628, 198, 4299, 3440, 62, 7753, 7, 34345, 25, 965, 11, 8619, 25, 965, 8, 4613, 7343, 58, 8053, 58, 2536, 60, 5974, 198, 220, 220, 220, ...
2.388416
587
# -*- coding: utf-8 -*- from __future__ import unicode_literals # REST from rest_framework.viewsets import ViewSetMixin from rest_framework import routers, serializers, viewsets from rest_framework.authentication import SessionAuthentication, BasicAuthentication, TokenAuthentication from rest_framework.permissions imp...
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 6738, 11593, 37443, 834, 1330, 28000, 1098, 62, 17201, 874, 198, 198, 2, 30617, 198, 6738, 1334, 62, 30604, 13, 1177, 28709, 1330, 3582, 7248, 35608, 259, 198, 6738, 133...
3.722857
350
# Copyright (c) 2016-present, Facebook, Inc. # # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. import atexit import logging import os import subprocess import sys from typing import List from .command import ClientException, ExitCode, State f...
[ 2, 15069, 357, 66, 8, 1584, 12, 25579, 11, 3203, 11, 3457, 13, 198, 2, 198, 2, 770, 2723, 2438, 318, 11971, 739, 262, 17168, 5964, 1043, 287, 262, 198, 2, 38559, 24290, 2393, 287, 262, 6808, 8619, 286, 428, 2723, 5509, 13, 198, ...
3.90566
106
from collections import deque, defaultdict import os import sys import logging import time import json import gym import torch.nn as nn import torch import numpy as np import matplotlib.pyplot as plt from model import RL_Policy, Semantic_Mapping from utils.storage import GlobalRolloutStorage from envs import make_vec_...
[ 6738, 17268, 1330, 390, 4188, 11, 4277, 11600, 198, 11748, 28686, 198, 11748, 25064, 198, 11748, 18931, 198, 11748, 640, 198, 11748, 33918, 198, 11748, 11550, 198, 11748, 28034, 13, 20471, 355, 299, 77, 198, 11748, 28034, 198, 11748, 299,...
3.163121
141
#!/usr/bin/env python # coding=utf-8 ''' Author: Shuangchi He / Yulv Email: yulvchi@qq.com Date: 2022-03-19 10:33:38 Motto: Entities should not be multiplied unnecessarily. LastEditors: Shuangchi He LastEditTime: 2022-03-23 00:52:55 FilePath: /Awesome-Ultrasound-Standard-Plane-Detection/src/ITN/srmg/core/RiemannianRigh...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 2, 19617, 28, 40477, 12, 23, 198, 7061, 6, 198, 13838, 25, 32344, 648, 11072, 679, 1220, 575, 377, 85, 198, 15333, 25, 331, 377, 85, 11072, 31, 38227, 13, 785, 198, 10430, 25, 3316...
2.262397
3,045
# -*- coding: utf-8 -*- # Generated by the protocol buffer compiler. DO NOT EDIT! # source: v0449gRpc.proto """Generated protocol buffer code.""" from google.protobuf import descriptor as _descriptor from google.protobuf import descriptor_pool as _descriptor_pool from google.protobuf import message as _message from go...
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 2, 2980, 515, 416, 262, 8435, 11876, 17050, 13, 220, 8410, 5626, 48483, 0, 198, 2, 2723, 25, 410, 15, 31911, 70, 49, 14751, 13, 1676, 1462, 198, 37811, 8645, 515, 84...
2.218095
2,100
import datetime from django.core.management import call_command from django.urls import reverse from rest_framework import status from rest_framework.test import APITestCase from resources_portal.management.commands.populate_dev_database import populate_dev_database from resources_portal.models import Material, Organ...
[ 11748, 4818, 8079, 198, 198, 6738, 42625, 14208, 13, 7295, 13, 27604, 1330, 869, 62, 21812, 198, 6738, 42625, 14208, 13, 6371, 82, 1330, 9575, 198, 6738, 1334, 62, 30604, 1330, 3722, 198, 6738, 1334, 62, 30604, 13, 9288, 1330, 3486, 2...
2.508065
1,364
# Copyright 2019 Huawei Technologies Co., Ltd # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to...
[ 2, 15069, 13130, 43208, 21852, 1766, 1539, 12052, 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.369092
1,333
workdays = float(input()) daily_tips = float(input()) exchange_rate = float(input()) salary = workdays * daily_tips annual_income = salary * 12 + salary * 2.5 net_income = annual_income - annual_income * 25 / 100 result = net_income / 365 * exchange_rate print('%.2f' % result)
[ 1818, 12545, 796, 12178, 7, 15414, 28955, 198, 29468, 62, 41315, 796, 12178, 7, 15414, 28955, 198, 1069, 3803, 62, 4873, 796, 12178, 7, 15414, 28955, 198, 198, 21680, 560, 796, 670, 12545, 1635, 4445, 62, 41315, 198, 198, 1236, 723, 6...
3.021505
93
from transformer_rankers.trainers import transformer_trainer from transformer_rankers.datasets import dataset, preprocess_scisumm_ranked from transformer_rankers.eval import results_analyses_tools from transformers import BertTokenizer, BertForSequenceClassification from sacred.observers import FileStorageObserver fro...
[ 6738, 47385, 62, 43027, 364, 13, 27432, 364, 1330, 47385, 62, 2213, 10613, 198, 6738, 47385, 62, 43027, 364, 13, 19608, 292, 1039, 1330, 27039, 11, 662, 14681, 62, 1416, 271, 13929, 62, 28282, 198, 6738, 47385, 62, 43027, 364, 13, 182...
3.179724
217
#Q: Evaluate the sum of all the amicable numbers under 10000. #A: 31626 print sum_amicable(1,10000)
[ 2, 48, 25, 26439, 4985, 262, 2160, 286, 477, 262, 716, 18424, 3146, 739, 33028, 13, 198, 2, 32, 25, 34131, 2075, 198, 198, 4798, 2160, 62, 18127, 540, 7, 16, 11, 49388, 8, 198 ]
2.885714
35
import long_responses as long # Returns the probability of a message matching the responses that we have # Checks all the responses using the probability of the messages
[ 11748, 890, 62, 16733, 274, 355, 890, 198, 198, 2, 16409, 262, 12867, 286, 257, 3275, 12336, 262, 9109, 326, 356, 423, 628, 198, 2, 47719, 477, 262, 9109, 1262, 262, 12867, 286, 262, 6218, 628 ]
4.833333
36
from io import StringIO import numpy as np from h5py import File from keras.models import load_model as keras_load_model from PIL import Image, ImageOps
[ 6738, 33245, 1330, 10903, 9399, 198, 198, 11748, 299, 32152, 355, 45941, 198, 6738, 289, 20, 9078, 1330, 9220, 198, 6738, 41927, 292, 13, 27530, 1330, 3440, 62, 19849, 355, 41927, 292, 62, 2220, 62, 19849, 198, 6738, 350, 4146, 1330, ...
3.340426
47
from setuptools import setup setup( name="workshop-client", install_requires=["flask==1.1.1", "requests==2.22.0"], python_requires=">=3.7", classifiers=[ "Development Status :: 1 - Beta", "License :: OSI Approved :: MIT License", "Programming Language :: Python :: 3", "P...
[ 6738, 900, 37623, 10141, 1330, 9058, 198, 198, 40406, 7, 198, 220, 220, 220, 1438, 2625, 38067, 12, 16366, 1600, 198, 220, 220, 220, 2721, 62, 47911, 28, 14692, 2704, 2093, 855, 16, 13, 16, 13, 16, 1600, 366, 8897, 3558, 855, 17, ...
2.497006
167
import json import unittest import pyfacebook.models as models
[ 11748, 33918, 198, 11748, 555, 715, 395, 198, 198, 11748, 12972, 19024, 13, 27530, 355, 4981, 628 ]
3.823529
17
# MIT License # # Copyright (c) 2020 Airbyte # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the "Software"), to deal # in the Software without restriction, including without limitation the rights # to use, copy, modify, merge, publ...
[ 2, 17168, 13789, 198, 2, 198, 2, 15069, 357, 66, 8, 12131, 3701, 26327, 198, 2, 198, 2, 2448, 3411, 318, 29376, 7520, 11, 1479, 286, 3877, 11, 284, 597, 1048, 16727, 257, 4866, 198, 2, 286, 428, 3788, 290, 3917, 10314, 3696, 357, ...
3.571776
411