content
stringlengths
1
1.04M
input_ids
listlengths
1
774k
ratio_char_token
float64
0.38
22.9
token_count
int64
1
774k
# # Copyright 2019-2020 Lukas Schmelzeisen # # 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 t...
[ 2, 198, 2, 15069, 13130, 12, 42334, 28102, 292, 3059, 17694, 2736, 13254, 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, ...
3.812808
203
# -*- coding: utf-8 -*- # Generated by Django 1.11.6 on 2017-12-01 14:49 from __future__ import unicode_literals from django.db import migrations, models
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 2, 2980, 515, 416, 37770, 352, 13, 1157, 13, 21, 319, 2177, 12, 1065, 12, 486, 1478, 25, 2920, 198, 6738, 11593, 37443, 834, 1330, 28000, 1098, 62, 17201, 874, 198, ...
2.736842
57
import unittest import sys sys.path.insert(0, '../') from client.cisco_grpc_client_insecure import CiscoGRPCClient import json if __name__ == '__main__': unittest.main()
[ 11748, 555, 715, 395, 198, 11748, 25064, 198, 17597, 13, 6978, 13, 28463, 7, 15, 11, 705, 40720, 11537, 198, 6738, 5456, 13, 66, 4861, 62, 2164, 14751, 62, 16366, 62, 259, 22390, 1330, 28289, 10761, 5662, 11792, 198, 11748, 33918, 198...
2.734375
64
import logging logger = logging.getLogger(__name__) import requests import _thread if __name__ == '__main__': import json import time client = WebClient() msg = { 'type': 'config', 'domains': [ {'id': 'B', 'address': 'http://127.0.0.1:8882'}, ] ...
[ 11748, 18931, 198, 6404, 1362, 796, 18931, 13, 1136, 11187, 1362, 7, 834, 3672, 834, 8, 198, 198, 11748, 7007, 198, 11748, 4808, 16663, 628, 198, 198, 361, 11593, 3672, 834, 6624, 705, 834, 12417, 834, 10354, 198, 220, 220, 220, 1330,...
2.117241
290
import os.path as osp import numpy as np import torch from cogdl.data import Data, Dataset from cogdl.utils import download_url from cogdl.datasets import register_dataset @register_dataset("fb13") @register_dataset("fb15k") @register_dataset("fb15k237") @register_dataset("wn18") @register_dataset("wn18...
[ 11748, 28686, 13, 6978, 355, 267, 2777, 198, 198, 11748, 299, 32152, 355, 45941, 198, 11748, 28034, 198, 6738, 43072, 25404, 13, 7890, 1330, 6060, 11, 16092, 292, 316, 198, 6738, 43072, 25404, 13, 26791, 1330, 4321, 62, 6371, 198, 6738,...
2.641791
134
# https://leetcode.com/problems/4sum from collections import defaultdict
[ 2, 3740, 1378, 293, 316, 8189, 13, 785, 14, 1676, 22143, 14, 19, 16345, 198, 198, 6738, 17268, 1330, 4277, 11600, 628 ]
3.409091
22
import models import read_data as data import hyperparameters from drift_detection.__init__ import * import random import numpy import logging
[ 11748, 4981, 198, 11748, 1100, 62, 7890, 355, 1366, 198, 11748, 8718, 17143, 7307, 198, 6738, 24260, 62, 15255, 3213, 13, 834, 15003, 834, 1330, 1635, 198, 11748, 4738, 198, 11748, 299, 32152, 198, 11748, 18931, 628, 198 ]
3.815789
38
import requests
[ 11748, 7007, 628 ]
5.666667
3
import frappe from frappe.website.page_renderers.error_page import ErrorPage from frappe.website.page_renderers.not_permitted_page import NotPermittedPage from frappe.website.page_renderers.redirect_page import RedirectPage from frappe.website.path_resolver import PathResolver def get_response(path=None, http_status_...
[ 11748, 5306, 27768, 198, 6738, 5306, 27768, 13, 732, 12485, 13, 7700, 62, 10920, 19288, 13, 18224, 62, 7700, 1330, 13047, 9876, 198, 6738, 5306, 27768, 13, 732, 12485, 13, 7700, 62, 10920, 19288, 13, 1662, 62, 525, 3291, 62, 7700, 133...
3.146429
280
import tensorflow as tf import numpy as np import rnn_cell, rnn train_set = np.load('train_set.npy') test_set = np.load('test_set.npy') x = tf.placeholder(tf.float32, shape=[None, None, 2]) y = tf.placeholder(tf.float32, shape=[1, None]) activation = lambda x: tf.maximum(x, .01*x) with tf.variable_scope('lstm'): ...
[ 11748, 11192, 273, 11125, 355, 48700, 198, 11748, 299, 32152, 355, 45941, 198, 11748, 374, 20471, 62, 3846, 11, 374, 20471, 198, 198, 27432, 62, 2617, 796, 45941, 13, 2220, 10786, 27432, 62, 2617, 13, 77, 9078, 11537, 198, 9288, 62, 2...
2.090821
1,035
from test.tools.enums import OpTypes from restfx import val from restfx import route from restfx.http import HttpFile from restfx.http import HttpRequest @route(module='测试名称-模块', name='测试名称-GET', extname='jsp', auth=False, op_type=OpTypes.Query, validators=( val('param1').range(2, 2) )) def get(re...
[ 6738, 1332, 13, 31391, 13, 268, 5700, 1330, 8670, 31431, 201, 198, 201, 198, 6738, 1334, 21373, 1330, 1188, 201, 198, 6738, 1334, 21373, 1330, 6339, 201, 198, 6738, 1334, 21373, 13, 4023, 1330, 367, 29281, 8979, 201, 198, 6738, 1334, ...
1.558626
1,339
# -*- coding: utf-8 -*- # Form implementation generated from reading ui file 'DirBrowser_ui.ui' # # Created by: PyQt5 UI code generator 5.9.2 # # WARNING! All changes made in this file will be lost! from PyQt5 import QtCore, QtGui, QtWidgets from HubblePi.viewer.DirBrowserTableView import DirBrowserTableView
[ 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, 35277, 46532, 62, 9019, 13, 9019, 6, 198, 2, 198, 2, 15622, 416, 25, 9485, 48, 83, 20, 12454, 2438, 17301, ...
2.980952
105
from __future__ import unicode_literals import dataent
[ 6738, 11593, 37443, 834, 1330, 28000, 1098, 62, 17201, 874, 198, 11748, 1366, 298 ]
3.857143
14
''' The Sprite Curry system. This package contains everything one needs to compile and execute Curry code. The topmost module provides an instance of the Curry system and an API to interact with it. To perform a soft reset call :func:`reset`. This returns the system to its original state, with no definitions and no ...
[ 7061, 6, 198, 464, 33132, 20920, 1080, 13, 198, 198, 1212, 5301, 4909, 2279, 530, 2476, 284, 17632, 290, 12260, 20920, 2438, 13, 198, 464, 1353, 1712, 8265, 3769, 281, 4554, 286, 262, 20920, 1080, 290, 281, 7824, 284, 198, 3849, 529, ...
3.057799
1,436
card_pub_key = 15335876 door_pub_key = 15086442 card_loop_size = find_loop_size(7, card_pub_key) door_loop_size = find_loop_size(7, door_pub_key) print(find_enc_key(door_pub_key, card_loop_size))
[ 9517, 62, 12984, 62, 2539, 796, 1315, 2091, 3365, 4304, 198, 9424, 62, 12984, 62, 2539, 796, 6640, 39570, 3682, 628, 628, 198, 9517, 62, 26268, 62, 7857, 796, 1064, 62, 26268, 62, 7857, 7, 22, 11, 2657, 62, 12984, 62, 2539, 8, 198...
2.325581
86
""" This file defined the URLs (end-points) for the plugin. """ from django.conf.urls import url from . import views # The plugin handles the request to the URL by responding with the view which is loaded # from views.py. Inside "views" is a class which responses to the # request. "name" is a shortcut name for the url...
[ 37811, 198, 1212, 2393, 5447, 262, 32336, 357, 437, 12, 13033, 8, 329, 262, 13877, 13, 198, 37811, 198, 6738, 42625, 14208, 13, 10414, 13, 6371, 82, 1330, 19016, 198, 6738, 764, 1330, 5009, 198, 198, 2, 383, 13877, 17105, 262, 2581, ...
3.00495
202
import random import datetime from bubbleSort import BubbleSort
[ 11748, 4738, 198, 11748, 4818, 8079, 198, 198, 6738, 14310, 42758, 1330, 33691, 42758 ]
4.571429
14
from Chemistry.PDB.pdb_atom import pdb_atom from Chemistry.PDB.pdb_constants import pdb_constants """ * pdb is list of pdb_models * pdb_model is a list of pdb_chains objects * pdb _chain is a list of pdb_atom objects * atom ahs attributes such as: - atom_serial_number - atom_name - resname -...
[ 6738, 27867, 13, 5760, 33, 13, 79, 9945, 62, 37696, 1330, 279, 9945, 62, 37696, 201, 198, 6738, 27867, 13, 5760, 33, 13, 79, 9945, 62, 9979, 1187, 1330, 279, 9945, 62, 9979, 1187, 201, 198, 201, 198, 37811, 201, 198, 9, 279, 9945,...
1.985533
2,834
# PyAlgoTrade # # Copyright 2011-2015 Gabriel Martin Becedillas Ruiz # # 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 ap...
[ 2, 9485, 2348, 2188, 35965, 198, 2, 198, 2, 15069, 2813, 12, 4626, 17371, 5780, 15780, 276, 25314, 11667, 528, 198, 2, 198, 2, 49962, 739, 262, 24843, 13789, 11, 10628, 362, 13, 15, 357, 1169, 366, 34156, 15341, 198, 2, 345, 743, ...
3.310793
769
# Add relative directory Library to import path, so we can import the SpoutSDK.pyd library. # Feel free to remove these if you put the SpoutSDK.pyd file in the same directory as the python scripts. import sys sys.path.append('Library') import numpy as np import argparse import time import SpoutSDK import pygame from ...
[ 2, 3060, 3585, 8619, 10074, 284, 1330, 3108, 11, 523, 356, 460, 1330, 262, 1338, 448, 10305, 42, 13, 79, 5173, 5888, 13, 220, 198, 2, 18571, 1479, 284, 4781, 777, 611, 345, 1234, 262, 1338, 448, 10305, 42, 13, 79, 5173, 2393, 287,...
3.086066
244
# -*- coding: utf-8 -*- from __future__ import unicode_literals from unittest.case import TestCase from actors import Actor, DESTROYED, ACTIVE, Obstacle, Pig, YellowBird, RedBird class BirdBaseTests(TestCase): """ Base Test Class for birds. It has no tests. Its only purpose is encapsulate assertions ...
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 198, 6738, 11593, 37443, 834, 1330, 28000, 1098, 62, 17201, 874, 198, 6738, 555, 715, 395, 13, 7442, 1330, 6208, 20448, 198, 198, 6738, 10544, 1330, 27274, 11, 22196, 54...
2.679724
434
""" Peng-robinson equation of state calculator. As used: https://www.poppyi.com/app_design_form/public_render/peng%20robinson%20eq%20of%20state """ import numpy as np R = 8.31446 # Pa.m3/K
[ 37811, 198, 47, 1516, 12, 22609, 7899, 16022, 286, 1181, 28260, 13, 198, 198, 1722, 973, 25, 3740, 1378, 2503, 13, 7501, 14097, 72, 13, 785, 14, 1324, 62, 26124, 62, 687, 14, 11377, 62, 13287, 14, 79, 1516, 4, 1238, 22609, 7899, 4...
2.487179
78
from django import forms from django.contrib.auth.models import User from core.models import Post, Category # forms will go here. create account has been added, new post form will probably go here
[ 6738, 42625, 14208, 1330, 5107, 198, 6738, 42625, 14208, 13, 3642, 822, 13, 18439, 13, 27530, 1330, 11787, 198, 6738, 4755, 13, 27530, 1330, 2947, 11, 21743, 198, 198, 2, 5107, 481, 467, 994, 13, 2251, 1848, 468, 587, 2087, 11, 649, ...
4
50
from django.conf.urls import patterns, url from . import views urlpatterns = patterns( '', url('program_export/', views.program_export, name='program_export'), url(r'^special_event/(?P<slug>.*)/$', views.special_event, name='special_event'), )
[ 6738, 42625, 14208, 13, 10414, 13, 6371, 82, 1330, 7572, 11, 19016, 198, 198, 6738, 764, 1330, 5009, 628, 198, 6371, 33279, 82, 796, 7572, 7, 198, 220, 220, 220, 705, 3256, 198, 220, 220, 220, 19016, 10786, 23065, 62, 39344, 14, 325...
2.784946
93
#!/usr/bin/env python3 ################################################ # # Parser to handle compatibility between # magma and portal json formats # # Michele Berselli # berselli.michele@gmail.com # ################################################ ################################################ # Libra...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 18, 198, 198, 29113, 14468, 198, 2, 198, 2, 220, 220, 23042, 263, 284, 5412, 17764, 1022, 198, 2, 220, 220, 220, 220, 220, 220, 2153, 2611, 290, 17898, 33918, 17519, 198, 2, 198, 2, 220...
1.96092
2,610
''' FVCproductions CSC291_4 ''' # list numbers = [3, 7, 9484, 46, 67, 2.3] total = 0 for num in numbers: total += num # concanetation print "The total is", total print "hi!"*4 # tuple things = ("one", "two") # dictionary age = {"Dryfuss": 6, "Yana": 30, "Lucy", 6} #set print numbers[2] print age["Yan...
[ 7061, 6, 198, 37, 15922, 11167, 507, 198, 34, 6173, 33551, 62, 19, 198, 7061, 6, 628, 198, 2, 1351, 198, 198, 77, 17024, 796, 685, 18, 11, 767, 11, 860, 34137, 11, 6337, 11, 8275, 11, 362, 13, 18, 60, 198, 198, 23350, 796, 657...
2.264151
159
# SPDX-License-Identifier: Apache-2.0 # # The OpenSearch Contributors require contributions made to # this file be licensed under the Apache-2.0 license or a # compatible open source license. import os from abc import ABC, abstractmethod
[ 2, 30628, 55, 12, 34156, 12, 33234, 7483, 25, 24843, 12, 17, 13, 15, 198, 2, 198, 2, 383, 4946, 18243, 25767, 669, 2421, 9284, 925, 284, 198, 2, 428, 2393, 307, 11971, 739, 262, 24843, 12, 17, 13, 15, 5964, 393, 257, 198, 2, 1...
3.75
64
""" Example running quick estimate algorithm on synthetic data. @author: toddkarin """ import numpy as np import pandas as pd from pandas.plotting import register_matplotlib_converters register_matplotlib_converters() import datetime import matplotlib matplotlib.use('TkAgg') import matplotlib.pyplot as plt import s...
[ 37811, 198, 16281, 2491, 2068, 8636, 11862, 319, 18512, 1366, 13, 198, 198, 31, 9800, 25, 23646, 74, 17714, 198, 37811, 198, 198, 11748, 299, 32152, 355, 45941, 198, 11748, 19798, 292, 355, 279, 67, 198, 6738, 19798, 292, 13, 29487, 8...
1.821033
2,710
from django.urls import reverse from django.db.models import Count from django.shortcuts import render, redirect from django.http import HttpResponse from django.forms import formset_factory, modelformset_factory from .models import * from .models import TrainingValue from .models import Training as TrainingModel from ...
[ 6738, 42625, 14208, 13, 6371, 82, 1330, 9575, 198, 6738, 42625, 14208, 13, 9945, 13, 27530, 1330, 2764, 198, 6738, 42625, 14208, 13, 19509, 23779, 1330, 8543, 11, 18941, 198, 6738, 42625, 14208, 13, 4023, 1330, 367, 29281, 31077, 198, 6...
3.513043
115
import datetime import re import simplejson as json import singer from google.cloud.bigquery import SchemaField from jsonschema import validate from jsonschema.exceptions import ValidationError # StitchData compatible timestamp meta data # https://www.stitchdata.com/docs/data-structure/system-tables-and-columns BATC...
[ 11748, 4818, 8079, 198, 11748, 302, 198, 198, 11748, 2829, 17752, 355, 33918, 198, 11748, 14015, 198, 6738, 23645, 13, 17721, 13, 14261, 22766, 1330, 10011, 2611, 15878, 198, 6738, 44804, 684, 2395, 2611, 1330, 26571, 198, 6738, 44804, 68...
3.102564
156
import pytest from ..api import * from .examples import * from ..condition import Condition # This test is the simplest one I could imagine that exercises the logic where # disjoint subsets are calculated. The next test is similar, but does much more # complex work. Hopefully the debugging can ta...
[ 11748, 12972, 9288, 198, 198, 6738, 11485, 15042, 1330, 1635, 198, 6738, 764, 1069, 12629, 1330, 1635, 198, 6738, 11485, 31448, 1330, 24295, 628, 628, 628, 628, 628, 628, 628, 628, 628, 628, 628, 198, 2, 770, 1332, 318, 262, 24043, 53...
3.931818
88
import unittest # Custom import from src.performance_metrics.binary_classifier_metrics import BinaryClassifierMetrics class TestAccuracy(unittest.TestCase): """ """ def test_accuracy_pos(self): """ Positive test case for the accuracy function. """ # Assume metrics...
[ 11748, 555, 715, 395, 198, 198, 2, 8562, 1330, 198, 6738, 12351, 13, 26585, 62, 4164, 10466, 13, 39491, 62, 4871, 7483, 62, 4164, 10466, 1330, 45755, 9487, 7483, 9171, 10466, 628, 198, 4871, 6208, 17320, 23843, 7, 403, 715, 395, 13, ...
2.141827
832
import random import torch import numbers from torchvision.transforms import Lambda, functional as F class ColorJitter(object): """Randomly change the brightness, contrast and saturation of an image. Args: brightness (float or tuple of float (min, max)): How much to jitter brightness. ...
[ 11748, 4738, 198, 11748, 28034, 198, 11748, 3146, 198, 6738, 28034, 10178, 13, 7645, 23914, 1330, 21114, 6814, 11, 10345, 355, 376, 628, 628, 628, 628, 198, 4871, 5315, 41, 1967, 7, 15252, 2599, 198, 220, 220, 220, 37227, 29531, 306, ...
2.58342
965
import os from leapp.libraries.common.config import mock_configs from leapp.models import ( DNFWorkaround, InstalledRPM, Module, RepositoriesSetupTasks, RPM, RpmTransactionTasks, SatelliteFacts ) from leapp.snactor.fixture import current_actor_context RH_PACKAGER = 'Red Hat, Inc. <http://b...
[ 11748, 28686, 198, 198, 6738, 443, 1324, 13, 75, 11127, 13, 11321, 13, 11250, 1330, 15290, 62, 11250, 82, 198, 6738, 443, 1324, 13, 27530, 1330, 357, 198, 220, 220, 220, 360, 21870, 12468, 14145, 11, 198, 220, 220, 220, 2262, 4262, ...
2.536585
246
import sys import inspect from typing import Any from cowait.types import serialize from .definition import TaskDefinition from .components import TaskManager, RpcComponent, rpc from .parent_task import ParentTask
[ 11748, 25064, 198, 11748, 10104, 198, 6738, 19720, 1330, 4377, 198, 6738, 9875, 4548, 13, 19199, 1330, 11389, 1096, 198, 6738, 764, 46758, 1330, 15941, 36621, 198, 6738, 764, 5589, 3906, 1330, 15941, 13511, 11, 371, 14751, 21950, 11, 374,...
4.215686
51
import sys import os import urllib.request import urllib.error import logging import subprocess from typing import Optional, Dict from urllib.error import ContentTooShortError logger = logging.getLogger(__name__) DEFAULT_HEADERS = { 'User-Agent': 'Mozilla/5.0 (Windows NT 6.1; WOW64; rv:12.0) Gecko/20100101 F...
[ 11748, 25064, 198, 11748, 28686, 198, 11748, 2956, 297, 571, 13, 25927, 198, 11748, 2956, 297, 571, 13, 18224, 198, 11748, 18931, 198, 11748, 850, 14681, 198, 198, 6738, 19720, 1330, 32233, 11, 360, 713, 198, 6738, 2956, 297, 571, 13, ...
2.581317
1,488
for count in range(6): name = input() print("hello ", name)
[ 1640, 954, 287, 2837, 7, 21, 2599, 198, 220, 220, 220, 1438, 796, 5128, 3419, 198, 220, 220, 220, 3601, 7203, 31373, 33172, 1438, 8 ]
2.68
25
# -*- coding: utf-8 -*- import os import json import decimal import simplejson import couchdb.json from couchdb import util from logging import getLogger from datetime import datetime, timedelta from base64 import b64encode, b64decode from cornice.resource import resource, view from email.header import decode_header fr...
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 11748, 28686, 198, 11748, 33918, 198, 11748, 32465, 198, 11748, 2829, 17752, 198, 11748, 18507, 9945, 13, 17752, 198, 6738, 18507, 9945, 1330, 7736, 198, 6738, 18931, 1330, ...
3.227053
621
__all__ = ['interface']
[ 834, 439, 834, 796, 37250, 39994, 20520, 198 ]
3
8
def test_account_model(db_session): """test make a new user account""" from ..models import Account assert len(db_session.query(Account).all()) == 0 user = Account( username='me', password='me', email='me@me.com', ) db_session.add(user) assert len(db_session.query(Ac...
[ 4299, 1332, 62, 23317, 62, 19849, 7, 9945, 62, 29891, 2599, 198, 220, 220, 220, 37227, 9288, 787, 257, 649, 2836, 1848, 37811, 198, 220, 220, 220, 422, 11485, 27530, 1330, 10781, 628, 220, 220, 220, 6818, 18896, 7, 9945, 62, 29891, ...
2.460641
686
#!/usr/bin/env python3 import os import json import pprint import requests from dateutil.parser import parse as parsedate with open("cameras.json") as f: cameras = json.load(f) with open("unavailable.jpg", "rb") as f: unavailable = f.read() camIds = sorted([int(c["properties"]["id"]) for c in cameras["featur...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 18, 198, 198, 11748, 28686, 198, 11748, 33918, 198, 11748, 279, 4798, 198, 11748, 7007, 198, 6738, 3128, 22602, 13, 48610, 1330, 21136, 355, 44267, 378, 198, 198, 4480, 1280, 7203, 66, 2382, ...
2.315136
403
# Tests the various Containers / Classes found in results.py import os import sys import util from pyflight.result import * from pyflight.models.flight_data import FlightData # Test the FlightData Container # Test the Airport Container first_result = Result(util.download_file_if_not_exists( url="https://de...
[ 2, 30307, 262, 2972, 2345, 50221, 1220, 38884, 1043, 287, 2482, 13, 9078, 198, 198, 11748, 28686, 198, 11748, 25064, 198, 198, 11748, 7736, 198, 198, 6738, 12972, 22560, 13, 20274, 1330, 1635, 198, 6738, 12972, 22560, 13, 27530, 13, 225...
3.29085
306
"""Error classes for authentise_services""" class ResourceError(Exception): """arbitrary error whenever a call to a authentise resource doesnt go according to plan""" pass class ResourceStillProcessing(Exception): """most authentise resources have a status property to tell the user what state its in ...
[ 37811, 12331, 6097, 329, 8323, 786, 62, 30416, 37811, 628, 198, 4871, 20857, 12331, 7, 16922, 2599, 198, 220, 220, 220, 37227, 283, 2545, 11619, 4049, 8797, 257, 869, 284, 257, 8323, 786, 8271, 46701, 467, 1864, 284, 1410, 37811, 198, ...
3.859813
107
from redis_cache.exceptions import ConnectionInterrumped from django.conf import settings import django.core.exceptions from dimagi.utils.couch.cache import cache_core rcache = cache_core.get_redis_default_cache() #######################################################################################################...
[ 6738, 2266, 271, 62, 23870, 13, 1069, 11755, 1330, 26923, 9492, 81, 27073, 198, 6738, 42625, 14208, 13, 10414, 1330, 6460, 198, 11748, 42625, 14208, 13, 7295, 13, 1069, 11755, 198, 6738, 5391, 18013, 13, 26791, 13, 66, 7673, 13, 23870, ...
4.152866
157
# -*- coding: utf-8 -*- """ This file represents how AST worked before python3.8 release. We used to have violations on the first decorator that wraps function, method, or a class. We also store here things that are ``SyntaxError`` in python3.8 and above. """ @first # noqa: WPS216 @second @third(param='a') @four...
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 198, 37811, 198, 1212, 2393, 6870, 703, 29273, 3111, 878, 21015, 18, 13, 23, 2650, 13, 198, 198, 1135, 973, 284, 423, 11734, 319, 262, 717, 11705, 1352, 198, 5562, 275...
2.949275
138
# Generated by Django 3.2.6 on 2021-08-12 15:38 from django.db import migrations, models
[ 2, 2980, 515, 416, 37770, 513, 13, 17, 13, 21, 319, 33448, 12, 2919, 12, 1065, 1315, 25, 2548, 198, 198, 6738, 42625, 14208, 13, 9945, 1330, 15720, 602, 11, 4981, 628 ]
2.84375
32
import sys import os import os.path import glob import collections import re import numpy as np import scipy as sp import scipy.integrate import scipy.special import theano import theano.tensor as tt from theano.printing import Print from theano import gof use_accel = True if use_accel: from . import mixednoise_...
[ 11748, 25064, 198, 11748, 28686, 198, 11748, 28686, 13, 6978, 198, 11748, 15095, 198, 11748, 17268, 198, 11748, 302, 198, 11748, 299, 32152, 355, 45941, 198, 11748, 629, 541, 88, 355, 599, 198, 11748, 629, 541, 88, 13, 18908, 4873, 198,...
2.385593
236
#!/usr/bin/env python import os import sys import click import yaml from urllib import request from evernode.classes import Json, Security class Create: """ Easy evernode app creation""" app_name = None dir_name = None config_file = None uwsgi_file = None app_file = None ...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 201, 198, 201, 198, 11748, 28686, 201, 198, 11748, 25064, 201, 198, 11748, 3904, 201, 198, 11748, 331, 43695, 201, 198, 6738, 2956, 297, 571, 1330, 2581, 201, 198, 6738, 304, 933, 1098, 13,...
2.503401
147
from ..option import Option
[ 6738, 11485, 18076, 1330, 16018, 198 ]
4.666667
6
from enum import Enum ServerName = 'Http Technopark Highload server' HttpVersion = '1.1'
[ 6738, 33829, 1330, 2039, 388, 198, 198, 10697, 5376, 796, 705, 43481, 5429, 404, 668, 3334, 2220, 4382, 6, 198, 43481, 14815, 796, 705, 16, 13, 16, 6, 628 ]
3.137931
29
""" Copyright 2017-present, Airbnb Inc. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, sof...
[ 37811, 198, 15269, 2177, 12, 25579, 11, 35079, 3457, 13, 198, 198, 26656, 15385, 739, 262, 24843, 13789, 11, 10628, 362, 13, 15, 357, 1169, 366, 34156, 15341, 198, 5832, 743, 407, 779, 428, 2393, 2845, 287, 11846, 351, 262, 13789, 13,...
2.008786
6,032
# -*- coding: utf-8 -*- # Generated by Django 1.10 on 2018-05-11 06:19 from __future__ import unicode_literals from django.db import migrations
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 2, 2980, 515, 416, 37770, 352, 13, 940, 319, 2864, 12, 2713, 12, 1157, 9130, 25, 1129, 198, 6738, 11593, 37443, 834, 1330, 28000, 1098, 62, 17201, 874, 198, 198, 6738,...
2.754717
53
import unittest import numpy as np from math import exp from scipy.special import expit from dl4nlp.utilities import sigmoid_gradient, softmax if __name__ == '__main__': unittest.main()
[ 11748, 555, 715, 395, 198, 11748, 299, 32152, 355, 45941, 198, 6738, 10688, 1330, 1033, 198, 6738, 629, 541, 88, 13, 20887, 1330, 1033, 270, 198, 6738, 288, 75, 19, 21283, 79, 13, 315, 2410, 1330, 264, 17225, 1868, 62, 49607, 11, 27...
2.865672
67
''' author = Zhijing Jin (zhijing.jin@connect.hku.hk) date = Aug 24, 2019 How to Run: python bleu.py \ -refs data/ref0.txt data/ref1.txt -hyps data/hyp0.txt ''' from __future__ import print_function, division import os import json import argparse from .download import TMP_DIR, DETOK_FILE, BLEU_DETOK_FILE, BLEU_FILE...
[ 7061, 6, 198, 9800, 796, 10511, 11030, 17297, 357, 23548, 11030, 13, 18594, 31, 8443, 13, 71, 23063, 13, 71, 74, 8, 198, 4475, 796, 2447, 1987, 11, 13130, 198, 198, 2437, 284, 5660, 25, 198, 198, 29412, 7245, 84, 13, 9078, 3467, 1...
2.241504
1,383
__author__ = 'Yunxi Lin' from pages.BasePage import BasePage
[ 834, 9800, 834, 796, 705, 56, 403, 29992, 5164, 6, 198, 198, 6738, 5468, 13, 14881, 9876, 1330, 7308, 9876 ]
3.05
20
############################################################################# ## ## Copyright (C) 2010 velociraptor Genjix <aphidia@hotmail.com> ## Copyright (C) 2016 The Qt Company Ltd. ## Contact: http://www.qt.io/licensing/ ## ## This file is part of the Qt for Python examples of the Qt Toolkit. ## ## $QT_BEGIN_LICE...
[ 29113, 29113, 7804, 4242, 2, 198, 2235, 198, 2235, 15069, 357, 34, 8, 3050, 11555, 420, 343, 2373, 273, 5215, 73, 844, 1279, 6570, 38513, 31, 8940, 4529, 13, 785, 29, 198, 2235, 15069, 357, 34, 8, 1584, 383, 33734, 5834, 12052, 13, ...
3.417299
659
from google_images_download import google_images_download # creating object response = google_images_download.googleimagesdownload() search_queries =['apple','cat','appropriate','exorbitant'] for query in search_queries: downloadimages(query) print()
[ 6738, 23645, 62, 17566, 62, 15002, 1330, 23645, 62, 17566, 62, 15002, 220, 220, 201, 198, 220, 220, 201, 198, 2, 4441, 2134, 220, 201, 198, 26209, 796, 23645, 62, 17566, 62, 15002, 13, 13297, 17566, 15002, 3419, 220, 220, 201, 198, ...
2.825243
103
import shutil from contextlib import contextmanager import pytest from indy_common.config_helper import NodeConfigHelper from indy_node.test.helper import TestNode from plenum.test.node_catchup.helper import ensure_all_nodes_have_same_data from plenum.test.test_node import ensureElectionsDone, ensure_node_disconnecte...
[ 11748, 4423, 346, 198, 6738, 4732, 8019, 1330, 4732, 37153, 198, 198, 11748, 12972, 9288, 198, 198, 6738, 773, 88, 62, 11321, 13, 11250, 62, 2978, 525, 1330, 19081, 16934, 47429, 198, 6738, 773, 88, 62, 17440, 13, 9288, 13, 2978, 525,...
1.943337
3,512
# -*- coding: utf-8 -*- # If y != None, constructs the unordered pair (x, y) # If y == None, constructs an unordered pair from iterable x, e.g. a tuple
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 220, 220, 220, 1303, 1002, 331, 14512, 6045, 11, 34175, 262, 555, 24071, 5166, 357, 87, 11, 331, 8, 198, 220, 220, 220, 1303, 1002, 331, 6624, 6045, 11, 34175, 281, ...
2.666667
60
#!/usr/bin/env python import leginon.leginondata import sys import getpass import sets days = int(raw_input('Days: ')) ## make set of all application names appquery = leginon.leginondata.ApplicationData() apps = appquery.query() print 'APPS', len(apps) allapps = sets.Set() allappsdict = {} for app in apps: appname ...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 198, 11748, 1232, 259, 261, 13, 1455, 259, 623, 1045, 198, 11748, 25064, 198, 11748, 651, 6603, 198, 11748, 5621, 198, 198, 12545, 796, 493, 7, 1831, 62, 15414, 10786, 38770, 25, 705, ...
2.837004
454
import timeit setup = ''' import scipy.sparse as sp import numpy as np from bisect import bisect from numpy.random import rand, randint import submatrix as s r = [10,20,30] A = s.randomMatrix() ''' t = timeit.Timer("s.subMatrix(r,r,A)", setup).repeat(3, 10) print t #print t.timeit()
[ 11748, 640, 270, 198, 198, 40406, 796, 705, 7061, 198, 11748, 629, 541, 88, 13, 82, 29572, 355, 599, 198, 11748, 299, 32152, 355, 45941, 198, 6738, 47457, 478, 1330, 47457, 478, 198, 6738, 299, 32152, 13, 25120, 1330, 43720, 11, 43720...
2.508621
116
# coding: utf-8 from typing import Dict, List # noqa: F401 from fastapi import ( # noqa: F401 APIRouter, Body, Cookie, Depends, Form, Header, Path, Query, Request, Response, Security, status, ) from acapy_wrapper.models.extra_models import TokenModel # noqa: F401 fr...
[ 2, 19617, 25, 3384, 69, 12, 23, 198, 198, 6738, 19720, 1330, 360, 713, 11, 7343, 220, 1303, 645, 20402, 25, 376, 21844, 198, 198, 6738, 3049, 15042, 1330, 357, 220, 1303, 645, 20402, 25, 376, 21844, 198, 220, 220, 220, 3486, 4663, ...
2.559387
783
c = float(input('Digite a temperatura em C°: ')) f = c * 1.8 + 32 print('{:.0f} C° é igual a {:.0f}° Fahrenheight'.format(c, f))
[ 66, 796, 12178, 7, 15414, 10786, 19511, 578, 257, 4124, 2541, 64, 795, 327, 7200, 25, 705, 4008, 198, 69, 796, 269, 1635, 352, 13, 23, 1343, 3933, 198, 4798, 10786, 90, 25, 13, 15, 69, 92, 327, 7200, 38251, 45329, 723, 257, 46110,...
2.169492
59
import transaction import unittest import unittest.mock as mock from pyramid import testing from .models import User
[ 11748, 8611, 198, 11748, 555, 715, 395, 198, 11748, 555, 715, 395, 13, 76, 735, 355, 15290, 198, 198, 6738, 27944, 1330, 4856, 198, 198, 6738, 764, 27530, 1330, 11787, 628, 198 ]
3.78125
32
#!/usr/bin/env python import sys import copy import rospy import moveit_commander import moveit_msgs.msg import geometry_msgs.msg import signal import math import tf from copy import deepcopy import transformation signal.signal(signal.SIGINT, signal_handler) pose_list = \ { 'left_open': [0.6451299414163874, 0.483081...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 198, 11748, 25064, 198, 11748, 4866, 198, 11748, 686, 2777, 88, 198, 11748, 1445, 270, 62, 9503, 4066, 198, 11748, 1445, 270, 62, 907, 14542, 13, 19662, 198, 11748, 22939, 62, 907, 145...
1.9833
9,940
""" Hi! I intentionally wrote this script sort of weird so that it will only work in Python 3.7+, to make sure that you're using the right Python. Don't worry if you don't understand it! If you're curious, I'm happy to explain anything in it. -- C """ from __future__ import annotations print("Hello, ", end='World!\n'...
[ 37811, 198, 17250, 0, 198, 40, 16464, 2630, 428, 4226, 3297, 286, 7650, 523, 326, 340, 481, 198, 8807, 670, 287, 11361, 513, 13, 22, 28200, 284, 787, 1654, 326, 345, 821, 1262, 198, 1169, 826, 11361, 13, 2094, 470, 5490, 611, 345, ...
3.521739
92
from django.core.signals import Signal deleting = Signal(providing_args=['del_objs', 'rel_objs'])
[ 6738, 42625, 14208, 13, 7295, 13, 12683, 874, 1330, 26484, 201, 198, 201, 198, 2934, 293, 889, 796, 26484, 7, 15234, 2530, 62, 22046, 28, 17816, 12381, 62, 672, 8457, 3256, 705, 2411, 62, 672, 8457, 6, 12962, 201, 198 ]
2.55
40
#---------------------------------------------------------------------------------------------------------------| # Organization: AllenRing | # -- Created by Ritch ...
[ 2, 10097, 3880, 24305, 91, 201, 198, 2, 12275, 25, 9659, 39687, 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,...
2.141832
4,879
import os import json import random import time import numpy as np with open('../manifest/output.manifest', 'r') as f: output = [json.loads(line) for line in f.readlines()] # Shuffle output in place. np.random.shuffle(output) dataset_size = len(output) train_test_split_index = round(dataset_size*0.8) train_...
[ 11748, 28686, 198, 11748, 33918, 198, 11748, 4738, 198, 11748, 640, 198, 11748, 299, 32152, 355, 45941, 198, 198, 4480, 1280, 10786, 40720, 805, 8409, 14, 22915, 13, 805, 8409, 3256, 705, 81, 11537, 355, 277, 25, 198, 220, 220, 220, 5...
2.422951
305
num = int(input('Digite um número inteiro: ')) print('''Escolha uma das bases para convertê-lo: [1] Converter para \033[34mBinário\033[m [2] Convertar para \033[34mOctal\033[m [3] Converter para \033[34mHexadecimal\033[m ''') opçao = int(input('Sua opção: ')) if opçao == 1: print(f'{num} convertido para \033[31mBi...
[ 22510, 796, 493, 7, 15414, 10786, 19511, 578, 23781, 299, 21356, 647, 78, 493, 68, 7058, 25, 705, 4008, 198, 4798, 7, 7061, 6, 47051, 349, 3099, 334, 2611, 288, 292, 12536, 31215, 10385, 25792, 12, 5439, 25, 220, 198, 58, 16, 60, ...
2.094156
308
from rest_framework.authentication import TokenAuthentication
[ 6738, 1334, 62, 30604, 13, 41299, 3299, 1330, 29130, 47649, 3299, 628 ]
5.25
12
from typing import Dict from fastapi.testclient import TestClient from sqlalchemy.orm import Session from app.config import settings from tests.utils.utils import random_email, random_lower_string
[ 6738, 19720, 1330, 360, 713, 198, 198, 6738, 3049, 15042, 13, 9288, 16366, 1330, 6208, 11792, 198, 6738, 44161, 282, 26599, 13, 579, 1330, 23575, 198, 198, 6738, 598, 13, 11250, 1330, 6460, 198, 6738, 5254, 13, 26791, 13, 26791, 1330, ...
3.865385
52
from random import uniform import lepy from PySide2Wrapper.PySide2Wrapper.window import MainWindow from PySide2Wrapper.PySide2Wrapper.widget import OpenGLWidget from PySide2Wrapper.PySide2Wrapper.app import Application if __name__ == "__main__": simple_scene = SimpleScene() app = Application() gl_widg...
[ 6738, 4738, 1330, 8187, 198, 198, 11748, 443, 9078, 198, 6738, 9485, 24819, 17, 36918, 2848, 13, 20519, 24819, 17, 36918, 2848, 13, 17497, 1330, 8774, 27703, 198, 6738, 9485, 24819, 17, 36918, 2848, 13, 20519, 24819, 17, 36918, 2848, 13...
2.858131
289
from dotenv import load_dotenv load_dotenv() from app.web import create_app app = create_app() if __name__ == '__main__': app.run()
[ 6738, 16605, 24330, 1330, 3440, 62, 26518, 24330, 198, 198, 2220, 62, 26518, 24330, 3419, 198, 198, 6738, 598, 13, 12384, 1330, 2251, 62, 1324, 198, 198, 1324, 796, 2251, 62, 1324, 3419, 198, 198, 361, 11593, 3672, 834, 6624, 705, 834...
2.592593
54
import numpy as np import base64 from PIL import Image import cv2 #from StringIO import StringIO import numpy as np import io from io import BytesIO # if(img): #img=cv2.imread(np1,cv2.IMREAD_UNCHANGED)
[ 198, 11748, 299, 32152, 355, 45941, 198, 11748, 2779, 2414, 198, 6738, 350, 4146, 1330, 7412, 198, 11748, 269, 85, 17, 198, 2, 6738, 10903, 9399, 1330, 10903, 9399, 198, 11748, 299, 32152, 355, 45941, 198, 11748, 33245, 198, 6738, 33245...
2.654321
81
# Licensed to the StackStorm, Inc ('StackStorm') under one or more # contributor license agreements. See the NOTICE file distributed with # this work for additional information regarding copyright ownership. # The ASF licenses this file to You under the Apache License, Version 2.0 # (the "License"); you may not use th...
[ 2, 49962, 284, 262, 23881, 32173, 11, 3457, 19203, 25896, 32173, 11537, 739, 530, 393, 517, 198, 2, 18920, 5964, 11704, 13, 220, 4091, 262, 28536, 2393, 9387, 351, 198, 2, 428, 670, 329, 3224, 1321, 5115, 6634, 9238, 13, 198, 2, 383...
2.556708
1,543
import sys from .escape_seq import csi from .escape_seq import CSI, SGR, ColorsMode, Color """Rudimentary ANSI support. See: https://en.wikipedia.org/wiki/ANSI_escape_code """ def cursor_position(n=1, m=1): """Move cursor to row n, column m (1-indexed from top-left).""" return csi(CSI.CUP, n, m) ...
[ 11748, 25064, 198, 198, 6738, 764, 41915, 62, 41068, 1330, 269, 13396, 198, 6738, 764, 41915, 62, 41068, 1330, 49911, 11, 311, 10761, 11, 29792, 19076, 11, 5315, 628, 198, 37811, 49, 463, 39051, 3537, 11584, 1104, 13, 198, 198, 6214, ...
2.604839
124
n = int(input('digite um número inteiro: ')) op = int(input('''escolha uma opção de conversão: [ 1 ] Binário [ 2 ] Octal [ 3 ] Hexadecimal''')) if op == 1: print(bin(n)[2:]) elif op == 2: print(oct(n)[2:]) elif op == 3: print(hex(n)[2:])
[ 77, 796, 493, 7, 15414, 10786, 12894, 578, 23781, 299, 21356, 647, 78, 493, 68, 7058, 25, 705, 4008, 201, 198, 201, 198, 404, 796, 493, 7, 15414, 7, 7061, 6, 3798, 349, 3099, 334, 2611, 1034, 16175, 28749, 390, 3453, 28749, 25, 22...
1.875
144
try: from loader.loader import loader except ImportError as err: print(f"Import failed, {err}")
[ 28311, 25, 201, 198, 220, 220, 220, 422, 40213, 13, 29356, 1330, 40213, 201, 198, 16341, 17267, 12331, 355, 11454, 25, 201, 198, 220, 220, 220, 3601, 7, 69, 1, 20939, 4054, 11, 1391, 8056, 92, 4943 ]
2.864865
37
import itertools import os import string import numpy as np from msibi import MSIBI, Pair, State, mie os.system("rm rdfs/pair_C3*_state*-step*.txt f_fits.log") os.system("rm state_*/*.txt state*/run.py state*/*query.dcd") # Set up global parameters. rdf_cutoff = 5.0 opt = MSIBI( rdf_cutoff=rdf_cutoff, n_rdf_po...
[ 11748, 340, 861, 10141, 198, 11748, 28686, 198, 11748, 4731, 198, 198, 11748, 299, 32152, 355, 45941, 198, 198, 6738, 13845, 27567, 1330, 30781, 3483, 11, 39645, 11, 1812, 11, 285, 494, 198, 198, 418, 13, 10057, 7203, 26224, 374, 7568, ...
2.274016
635
# -*- test-case-name: twisted.web2.dav.test.test_delete -*- ## # Copyright (c) 2005 Apple Computer, Inc. All rights reserved. # # 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 restric...
[ 2, 532, 9, 12, 1332, 12, 7442, 12, 3672, 25, 19074, 13, 12384, 17, 13, 67, 615, 13, 9288, 13, 9288, 62, 33678, 532, 9, 12, 198, 2235, 198, 2, 15069, 357, 66, 8, 5075, 4196, 13851, 11, 3457, 13, 1439, 2489, 10395, 13, 198, 2, ...
3.225926
540
# flake8: noqa from .draw_curve import draw_froc_curve, draw_roc_curve, draw_pr_curve from .image import Color, imshow, imshow_bboxes __all__ = [k for k in globals().keys() if not k.startswith("_")]
[ 2, 781, 539, 23, 25, 645, 20402, 198, 198, 6738, 764, 19334, 62, 22019, 303, 1330, 3197, 62, 69, 12204, 62, 22019, 303, 11, 3197, 62, 12204, 62, 22019, 303, 11, 3197, 62, 1050, 62, 22019, 303, 198, 6738, 764, 9060, 1330, 5315, 11,...
2.5125
80
import matplotlib.pyplot as plt import matplotlib.dates as mdates import tensorflow as tf import xarray as xr def plot_loss(history: tf.keras.callbacks.History): """ Visualizes the progress of a trained model by plotting the loss per epoch Parameters ---------- history: tf.keras.callbacks.History...
[ 11748, 2603, 29487, 8019, 13, 9078, 29487, 355, 458, 83, 198, 11748, 2603, 29487, 8019, 13, 19581, 355, 285, 19581, 198, 11748, 11192, 273, 11125, 355, 48700, 198, 11748, 2124, 18747, 355, 2124, 81, 628, 198, 4299, 7110, 62, 22462, 7, ...
2.804545
220
from enum import Enum # Maps token symbol to the token type ONE_SYMBOL_TOKENS = { "+": TokenType.PLUS, "-": TokenType.MINUS, "*": TokenType.MULTIPLY, "/": TokenType.REAL_DIV, "(": TokenType.LPAR, ")": TokenType.RPAR, ";": TokenType.SEMI, ":": TokenType.COLON, ",": TokenType.COMMA...
[ 6738, 33829, 1330, 2039, 388, 628, 628, 198, 2, 20347, 11241, 6194, 284, 262, 11241, 2099, 198, 11651, 62, 23060, 10744, 3535, 62, 10468, 42, 16938, 796, 1391, 198, 220, 220, 220, 43825, 1298, 29130, 6030, 13, 6489, 2937, 11, 198, 220...
2.222973
296
import os import logging import boto3 from botocore.exceptions import ClientError from .common import get_file, create_path
[ 11748, 28686, 198, 11748, 18931, 198, 11748, 275, 2069, 18, 198, 6738, 10214, 420, 382, 13, 1069, 11755, 1330, 20985, 12331, 198, 6738, 764, 11321, 1330, 651, 62, 7753, 11, 2251, 62, 6978, 628 ]
3.676471
34
#!/usr/bin/env python from sys import exit, stdin from os import environ, path, unlink from tempfile import NamedTemporaryFile from subprocess import Popen, PIPE from argparse import ArgumentParser import parser import lexer __author__ = "Juan J. Martinez <jjm@usebox.net>" __version__ = "0.6.3" app_name = "JTC" proj...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 198, 6738, 25064, 1330, 8420, 11, 14367, 259, 198, 6738, 28686, 1330, 551, 2268, 11, 3108, 11, 555, 8726, 198, 6738, 20218, 7753, 1330, 34441, 12966, 5551, 8979, 198, 6738, 850, 14681, ...
2.093596
1,827
# -*- coding: utf-8 -*- from setuptools import find_packages, setup __version__ = "0.1.1" __desc__ = "A dead-simple GraphQL client that supports subscriptions over websockets" with open('README.md') as readme_file: readme = readme_file.read() requirements = [ 'websocket-client==0.54.0' ] test_requirements ...
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 6738, 900, 37623, 10141, 1330, 1064, 62, 43789, 11, 9058, 628, 198, 834, 9641, 834, 796, 366, 15, 13, 16, 13, 16, 1, 198, 834, 20147, 834, 796, 366, 32, 2636, 12, ...
2.622034
590
# # Copyright (c) 2019-2021 James Thorne. # # This file is part of factual error correction. # See https://jamesthorne.co.uk for further info. # # 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 ...
[ 2, 198, 2, 15069, 357, 66, 8, 13130, 12, 1238, 2481, 3700, 536, 8553, 13, 198, 2, 198, 2, 770, 2393, 318, 636, 286, 27234, 4049, 17137, 13, 198, 2, 4091, 3740, 1378, 39159, 395, 71, 8553, 13, 1073, 13, 2724, 329, 2252, 7508, 13,...
2.597843
649
""" Data loader for TACRED json files. """ import json import random import torch import numpy as np class DataLoader(object): """ Load data from json files, preprocess and prepare batches. """ def preprocess(self, data, opt): """ Preprocess the data and convert to ids. """ processed ...
[ 37811, 198, 6601, 40213, 329, 309, 2246, 22083, 33918, 3696, 13, 198, 37811, 198, 198, 11748, 33918, 198, 11748, 4738, 198, 11748, 28034, 198, 11748, 299, 32152, 355, 45941, 628, 198, 4871, 6060, 17401, 7, 15252, 2599, 198, 220, 220, 22...
1.887422
4,166
import csv import json import sys def make_json(args): """ Pretty simple and somewhat naive script that =takes a `.xsv` file as an argument, converts it to JSON, and outputs it as a json file of the same name as the original csv. It can handle .csv or .tsv files. It does, however, make a lot of ...
[ 11748, 269, 21370, 198, 11748, 33918, 198, 11748, 25064, 628, 198, 4299, 787, 62, 17752, 7, 22046, 2599, 198, 220, 220, 220, 37227, 198, 220, 220, 220, 20090, 2829, 290, 6454, 24354, 4226, 326, 796, 83, 1124, 257, 4600, 13, 87, 21370,...
2.322506
431
"""Functions to test the difference of DEMs tools.""" import warnings import geoutils as gu import numpy as np with warnings.catch_warnings(): warnings.simplefilter("ignore") import xdem
[ 37811, 24629, 2733, 284, 1332, 262, 3580, 286, 40101, 82, 4899, 526, 15931, 198, 11748, 14601, 198, 198, 11748, 4903, 448, 4487, 355, 915, 198, 11748, 299, 32152, 355, 45941, 198, 198, 4480, 14601, 13, 40198, 62, 40539, 654, 33529, 198,...
3.355932
59
import os import sys ## Modify this path sys.path.append("C:\\Program Files (x86)\\Apache Software Foundation\\Trafodion Command Interface\\lib\\python") import Session # create a new session sess = Session.Session() # Connect to the database x=sess. connect ("user1","password","16.123.456.78","23400") # Execute sa...
[ 11748, 28686, 1330, 25064, 198, 198, 2235, 3401, 1958, 428, 3108, 198, 17597, 13, 6978, 13, 33295, 7203, 34, 25, 6852, 15167, 13283, 357, 87, 4521, 8, 6852, 25189, 4891, 10442, 5693, 6852, 15721, 69, 375, 295, 9455, 26491, 6852, 8019, ...
3.268182
220
import os import pytest import numpy as np AWNAS_TEST_NASBENCH = os.environ.get("AWNAS_TEST_NASBENCH", None) @pytest.mark.skipif( not AWNAS_TEST_NASBENCH, reason="do not test the nasbench BTC by default.") @pytest.mark.parametrize("case", [ {"cls": "nasbench-101", "load_nasbench": False, "validate_spec": Fals...
[ 11748, 28686, 198, 11748, 12972, 9288, 198, 11748, 299, 32152, 355, 45941, 198, 198, 12298, 18293, 62, 51, 6465, 62, 18293, 33, 1677, 3398, 796, 28686, 13, 268, 2268, 13, 1136, 7203, 12298, 18293, 62, 51, 6465, 62, 18293, 33, 1677, 33...
2.087218
665
from __future__ import absolute_import from __future__ import division from __future__ import print_function import shutil import sys import tempfile from observations.r.forbes2000 import forbes2000 def test_forbes2000(): """Test module forbes2000.py by downloading forbes2000.csv and testing shape of extrac...
[ 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, 4423, 346, 198, 11748, 25064, 198, 11748, 20218, 7753, 198, 198, 6738, 13050, ...
3.116279
172
# Copyright The PyTorch Lightning team. # # 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, 15069, 383, 9485, 15884, 354, 12469, 1074, 13, 198, 2, 198, 2, 49962, 739, 262, 24843, 13789, 11, 10628, 362, 13, 15, 357, 1169, 366, 34156, 15341, 198, 2, 345, 743, 407, 779, 428, 2393, 2845, 287, 11846, 351, 262, 13789, 13, 1...
2.615035
2,860
#!/usr/bin/env python3 # Copyright (c) 2017 The Bitcoin Core developers # Distributed under the MIT software license, see the accompanying # file COPYING or http://www.opensource.org/licenses/mit-license.php. import os import argparse from framework.argparse.option import add_tmp_directory_option from framework.bitco...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 18, 198, 2, 15069, 357, 66, 8, 2177, 383, 6185, 7231, 6505, 198, 2, 4307, 6169, 739, 262, 17168, 3788, 5964, 11, 766, 262, 19249, 198, 2, 2393, 27975, 45761, 393, 2638, 1378, 2503, 13, ...
3.516355
428
from typing import Dict, Tuple import pytest # store history of failures per test class name and per index # in parametrize (if parametrize used) _test_failed_incremental: Dict[str, Dict[Tuple[int, ...], str]] = {}
[ 6738, 19720, 1330, 360, 713, 11, 309, 29291, 198, 198, 11748, 12972, 9288, 198, 198, 2, 3650, 2106, 286, 15536, 583, 1332, 1398, 1438, 290, 583, 6376, 198, 2, 287, 5772, 316, 380, 2736, 357, 361, 5772, 316, 380, 2736, 973, 8, 198, ...
3.041667
72
# **************************************************************************** # # Air Hockey Table Project # Author: Ricardo Valverde # ------------------------- #This Code is Created for UCR's EE175 Senior Design Project # This Code contains The Puck Object Striker #For Pygame Documentation please see: #https://w...
[ 2, 41906, 17174, 46068, 1303, 198, 2, 3701, 17277, 8655, 4935, 198, 198, 2, 6434, 25, 38847, 3254, 332, 2934, 198, 2, 220, 22369, 12, 198, 198, 2, 1212, 6127, 318, 15622, 329, 471, 9419, 338, 27254, 17430, 14017, 8495, 4935, 198, 19...
4.559322
118
from CC3501Utils import * from Bombs import * from Vista import * from Pared import * from Player import * from Explosion import * from PDes import * from Enemy import * from Win import * from Power import * import pygame import math as m import random as rand #########################################################...
[ 198, 6738, 12624, 2327, 486, 18274, 4487, 1330, 1635, 198, 6738, 44394, 1330, 1635, 198, 6738, 25160, 1330, 1635, 198, 6738, 350, 1144, 1330, 1635, 198, 6738, 7853, 1330, 1635, 198, 6738, 45742, 1330, 1635, 198, 6738, 350, 5960, 1330, 1...
1.843326
10,474
myint = 7 print(myint) # the below way is another way to do the above print(7) # This will print 7.
[ 1820, 600, 796, 767, 198, 4798, 7, 1820, 600, 8, 198, 198, 2, 262, 2174, 835, 318, 1194, 835, 284, 466, 262, 2029, 198, 4798, 7, 22, 8, 198, 198, 2, 770, 481, 3601, 767, 13, 198 ]
2.756757
37