content
stringlengths
1
1.04M
input_ids
listlengths
1
774k
ratio_char_token
float64
0.38
22.9
token_count
int64
1
774k
import numpy as np import matplotlib.pyplot as plt import Graphic import Core if __name__ == "__main__": # Set xy grid y0 = np.linspace(-0.5, 0.5, 30) x0 = np.linspace(-0.5, 0.5, 30) grid = np.meshgrid(x0, y0, indexing='ij') grid_array = np.stack(grid, axis=-1) Domain = Core.Rectangula...
[ 11748, 299, 32152, 355, 45941, 198, 11748, 2603, 29487, 8019, 13, 9078, 29487, 355, 458, 83, 198, 198, 11748, 43029, 198, 11748, 7231, 628, 198, 198, 361, 11593, 3672, 834, 6624, 366, 834, 12417, 834, 1298, 628, 628, 198, 220, 220, 22...
2.218362
403
if __name__=='__main__': main()
[ 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 198, 361, 11593, 3672, 834, 855, 6, 834, 12417, 834, 10354, 198, 220, 220, 220, 1388, 3419 ]
1.575758
33
import pandas as pd import numpy as np import scipy.sparse as sparse from implicit.nearest_neighbours import bm25_weight, tfidf_weight, normalize def make_matrix(df, count=False): """ Args: plu_column: string. Name of column which contains PLU card_column: string. Name of column which contain...
[ 11748, 19798, 292, 355, 279, 67, 198, 11748, 299, 32152, 355, 45941, 198, 11748, 629, 541, 88, 13, 82, 29572, 355, 29877, 198, 198, 6738, 16992, 13, 710, 12423, 62, 710, 394, 65, 4662, 1330, 275, 76, 1495, 62, 6551, 11, 48700, 312, ...
2.168489
1,555
import stripe from django.utils.encoding import smart_str from ..models import InvoiceItem def create(customer, amount, description, currency="usd", discountable=False, invoice=None, metadata=None, subscription=None): """ Creates a Stripe invoice item Args: customer: the customer to create the inv...
[ 11748, 39858, 198, 6738, 42625, 14208, 13, 26791, 13, 12685, 7656, 1330, 4451, 62, 2536, 198, 6738, 11485, 27530, 1330, 10001, 2942, 7449, 198, 198, 4299, 2251, 7, 23144, 263, 11, 2033, 11, 6764, 11, 7395, 2625, 385, 67, 1600, 9780, 5...
2.762437
985
from PyQt5 import QtWidgets, QtCore from matplotlib.backends.backend_qt5agg import FigureCanvasQTAgg as FigureCanvas from matplotlib.figure import Figure import numpy as np from . artists import TemplateSourcePlotManual
[ 198, 6738, 9485, 48, 83, 20, 1330, 33734, 54, 312, 11407, 11, 33734, 14055, 198, 6738, 2603, 29487, 8019, 13, 1891, 2412, 13, 1891, 437, 62, 39568, 20, 9460, 1330, 11291, 6090, 11017, 48, 5603, 1130, 355, 11291, 6090, 11017, 198, 6738...
3.064103
78
# Generated by Django 2.2.2 on 2019-07-01 16:00 from django.db import migrations import django.db.models.manager import rdmo.views.managers
[ 2, 2980, 515, 416, 37770, 362, 13, 17, 13, 17, 319, 13130, 12, 2998, 12, 486, 1467, 25, 405, 198, 198, 6738, 42625, 14208, 13, 9945, 1330, 15720, 602, 198, 11748, 42625, 14208, 13, 9945, 13, 27530, 13, 37153, 198, 11748, 374, 67, ...
2.84
50
import argparse import sys from emeki.project_setup import setup_project_UI def emeki_main(): """The main function. It may be called directly from the command line when typing `emeki`.""" print("Hoi! This is my personal python library.") # Define argument parser parser = argparse.ArgumentP...
[ 11748, 1822, 29572, 198, 11748, 25064, 198, 198, 6738, 795, 39548, 13, 16302, 62, 40406, 1330, 9058, 62, 16302, 62, 10080, 628, 198, 4299, 795, 39548, 62, 12417, 33529, 198, 220, 220, 220, 37227, 464, 1388, 2163, 13, 628, 220, 220, 22...
2.82
250
from thstatuses import STATUS, getTextFromStatus from PyQt5.QtWidgets import QApplication from PyQt5.QtGui import QPixmap from selenium import webdriver from selenium.webdriver.support.ui import WebDriverWait from selenium.webdriver.support import expected_conditions as EC from selenium.common.exceptions import Timeou...
[ 6738, 294, 14269, 2664, 1330, 15486, 2937, 11, 651, 8206, 4863, 19580, 198, 6738, 9485, 48, 83, 20, 13, 48, 83, 54, 312, 11407, 1330, 1195, 23416, 198, 6738, 9485, 48, 83, 20, 13, 48, 83, 8205, 72, 1330, 1195, 47, 844, 8899, 198, ...
3.211416
473
###################Calculating state average of a variable and plotting using shape file####### ##############The shapefile and data file are read; Regions are defined and masked############# ###########Zonal statistics for first state is calculated and plotted########################## ##############Zonal statistics a...
[ 14468, 21017, 9771, 3129, 803, 1181, 2811, 286, 257, 7885, 290, 29353, 1262, 5485, 2393, 4242, 21017, 198, 7804, 4242, 2235, 464, 5485, 7753, 290, 1366, 2393, 389, 1100, 26, 47089, 389, 5447, 290, 29229, 7804, 4242, 2, 198, 7804, 21017,...
2.688138
1,273
# the contents of this file will be executed when the module is run with -m. from .xc import xc xc()
[ 2, 262, 10154, 286, 428, 2393, 481, 307, 10945, 618, 262, 8265, 318, 1057, 351, 532, 76, 13, 198, 198, 6738, 764, 25306, 1330, 2124, 66, 628, 198, 25306, 3419, 198 ]
3.354839
31
"""Script for data visualization. """ import matplotlib matplotlib.use('Agg') import matplotlib.pyplot as plt def plot_data(data, path, ylabel="y"): """Plot data. """ fig, ax = plt.subplots() im = ax.imshow( data.transpose((-1, 0)), aspect='auto', cmap='hot', origin='l...
[ 37811, 7391, 329, 1366, 32704, 13, 198, 37811, 198, 11748, 2603, 29487, 8019, 198, 6759, 29487, 8019, 13, 1904, 10786, 46384, 11537, 198, 198, 11748, 2603, 29487, 8019, 13, 9078, 29487, 355, 458, 83, 628, 198, 4299, 7110, 62, 7890, 7, ...
2.145161
248
from TemporaryStorage import TemporaryStorageInstance if __name__ == '__main__': main()
[ 6738, 46042, 31425, 1330, 46042, 31425, 33384, 628, 198, 198, 361, 11593, 3672, 834, 6624, 705, 834, 12417, 834, 10354, 198, 220, 220, 220, 1388, 3419, 198 ]
3.518519
27
import sys import pymongo import projectmemcached import time if __name__ == "__main__": argv = sys.argv if len(argv) < 2: print("Usage: python3.6 reviewapi.py mongodb_uri <listing_id>") exit(-1) mongodb_uri = argv[1] listing_id = int(argv[2]) db = pymongo.MongoClient(mongodb_...
[ 11748, 25064, 198, 11748, 279, 4948, 25162, 198, 11748, 1628, 11883, 66, 2317, 198, 11748, 640, 628, 628, 198, 361, 11593, 3672, 834, 6624, 366, 834, 12417, 834, 1298, 198, 220, 220, 220, 1822, 85, 796, 25064, 13, 853, 85, 198, 220, ...
2.211111
180
import sys from typing import List from enum import Enum, auto from parse_ctl import Parse, CmdType, DatType, BinOp, CmdValue import logging logging.basicConfig() logging.root.setLevel(logging.WARNING) logger = logging.getLogger("TCL_Machine") from tokenizer.Tokenizer import Tokenizer, TT print("Tcl/Forth inspired la...
[ 11748, 25064, 198, 6738, 19720, 1330, 7343, 198, 6738, 33829, 1330, 2039, 388, 11, 8295, 198, 6738, 21136, 62, 34168, 1330, 2547, 325, 11, 327, 9132, 6030, 11, 16092, 6030, 11, 20828, 18257, 11, 327, 9132, 11395, 198, 11748, 18931, 198,...
2.96789
218
#!/usr/bin/env python # coding=utf-8 debugEnable = False
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 2, 19617, 28, 40477, 12, 23, 198, 198, 24442, 36695, 796, 10352, 198 ]
2.636364
22
import sys sys.path.append('../') import bz2, os import random, string import importlib import _pickle as pickle from datetime import datetime, timedelta # ~<~<~<~<~<~<~<~<~<~<~<~<~<~<~<~<~<~<~<~<~<~<~<~<~<~<~<~<~<~<~<~<~<~<~<~<~<~<~<~<~<~<~<~<~<~<~< # OS & list MANAGEMENT FUNCTIONS <~<~<~<~<~<~<~<~<~<~<~<~<~<~<~<~<...
[ 11748, 25064, 198, 17597, 13, 6978, 13, 33295, 10786, 40720, 11537, 198, 198, 11748, 275, 89, 17, 11, 28686, 198, 11748, 4738, 11, 4731, 220, 198, 11748, 1330, 8019, 198, 11748, 4808, 27729, 293, 355, 2298, 293, 198, 6738, 4818, 8079, ...
2.086165
2,855
import click from deploy_tools.cli import ( auto_nonce_option, connect_to_json_rpc, gas_option, gas_price_option, get_nonce, jsonrpc_option, keystore_option, nonce_option, retrieve_private_key, ) from deploy_tools.deploy import build_transaction_options from deploy_tools.files import...
[ 11748, 3904, 198, 6738, 6061, 62, 31391, 13, 44506, 1330, 357, 198, 220, 220, 220, 8295, 62, 13159, 344, 62, 18076, 11, 198, 220, 220, 220, 2018, 62, 1462, 62, 17752, 62, 81, 14751, 11, 198, 220, 220, 220, 3623, 62, 18076, 11, 198...
2.827869
1,098
# -*- coding: utf-8 -*- """ Unit Test: orchard.system_status.formatters.temperature """ import unittest import flask_babel import orchard import orchard.system_status.formatters.temperature as formatter
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 198, 37811, 198, 220, 220, 220, 11801, 6208, 25, 393, 30215, 13, 10057, 62, 13376, 13, 18982, 1010, 13, 11498, 21069, 198, 37811, 198, 198, 11748, 555, 715, 395, 198, ...
2.90411
73
from typing import Dict, List, Tuple from collections import defaultdict from django.db import models from django.db.models.fields.related_descriptors import ManyToManyDescriptor from dotdict import DotDict from .sorter import Sorter from .model_importer import ModelImporter from .importer_manager import ImporterMan...
[ 6738, 19720, 1330, 360, 713, 11, 7343, 11, 309, 29291, 198, 6738, 17268, 1330, 4277, 11600, 198, 198, 6738, 42625, 14208, 13, 9945, 1330, 4981, 198, 6738, 42625, 14208, 13, 9945, 13, 27530, 13, 25747, 13, 5363, 62, 20147, 1968, 669, 1...
3.19917
241
# author: Bartlomiej "furas" Burek (https://blog.furas.pl) # date: 2021.05.30 # # title: How to add text in a “textbox” to an image? # url: https://stackoverflow.com/questions/67760340/how-to-add-text-in-a-textbox-to-an-image/67762111#67762111 import PIL print('PIL version:', PIL.__version__) from PIL import Image,...
[ 198, 2, 1772, 25, 13167, 75, 296, 494, 73, 366, 69, 17786, 1, 347, 495, 74, 357, 5450, 1378, 14036, 13, 69, 17786, 13, 489, 8, 198, 2, 3128, 25, 33448, 13, 2713, 13, 1270, 198, 2, 198, 2, 3670, 25, 1374, 284, 751, 2420, 287, ...
2.521739
621
from configs.Config import Config
[ 6738, 4566, 82, 13, 16934, 1330, 17056, 628 ]
4.375
8
import sys import pathlib import argparse import gzip import json import requests import datadiff import pysmata.loader as loader import pysmata.files if __name__ == "__main__": main()
[ 11748, 25064, 198, 11748, 3108, 8019, 198, 11748, 1822, 29572, 198, 11748, 308, 13344, 198, 11748, 33918, 198, 11748, 7007, 198, 11748, 4818, 324, 733, 198, 198, 11748, 279, 893, 76, 1045, 13, 29356, 355, 40213, 198, 11748, 279, 893, 76...
3.098361
61
from rx import AnonymousObservable, Observable from rx.internal import extensionmethod @extensionmethod(Observable) def default_if_empty(self, default_value=None): """Returns the elements of the specified sequence or the specified value in a singleton sequence if the sequence is empty. res = obs = xs.def...
[ 6738, 374, 87, 1330, 19200, 31310, 712, 540, 11, 19243, 540, 198, 6738, 374, 87, 13, 32538, 1330, 7552, 24396, 628, 198, 31, 2302, 3004, 24396, 7, 31310, 712, 540, 8, 198, 4299, 4277, 62, 361, 62, 28920, 7, 944, 11, 4277, 62, 8367...
3.428571
217
# coding: utf-8 """ CONS3RT Web API A CONS3RT ReSTful API # noqa: E501 The version of the OpenAPI document: 1.0.0 Contact: Fred@gigagantic-server.com Generated by: https://openapi-generator.tech """ from __future__ import absolute_import import unittest import cons3rt from cons3rt.api.test_a...
[ 2, 19617, 25, 3384, 69, 12, 23, 198, 198, 37811, 198, 220, 220, 220, 39537, 18, 14181, 5313, 7824, 628, 220, 220, 220, 317, 39537, 18, 14181, 797, 2257, 913, 7824, 220, 1303, 645, 20402, 25, 412, 33548, 628, 220, 220, 220, 383, 21...
2.376033
484
from qtpy import QtCore from qtpy.QtGui import * from qtpy.QtWidgets import * from cidan.GUI.ListWidgets.ClassItemModule import ClassItemModule from cidan.GUI.ListWidgets.ClassItemWidget import ClassItemWidget class ClassListModule(QFrame): """ Its the class list in the Class modification tab """ # ...
[ 6738, 10662, 83, 9078, 1330, 33734, 14055, 198, 6738, 10662, 83, 9078, 13, 48, 83, 8205, 72, 1330, 1635, 198, 6738, 10662, 83, 9078, 13, 48, 83, 54, 312, 11407, 1330, 1635, 198, 198, 6738, 269, 27610, 13, 40156, 13, 8053, 54, 312, ...
2.332759
580
"""Implementation of the replaceitem command.""" from mcipc.rcon.be.types import EntityEquipmentSlot, ReplaceMode from mcipc.rcon.client import Client from mcipc.rcon.proxy import CommandProxy from mcipc.rcon.types import Vec3 __all__ = ['ReplaceitemProxy', 'replaceitem'] class ReplaceitemProxy(CommandProxy): ...
[ 37811, 3546, 32851, 286, 262, 6330, 9186, 3141, 526, 15931, 198, 198, 6738, 36650, 541, 66, 13, 81, 1102, 13, 1350, 13, 19199, 1330, 20885, 23588, 4667, 38963, 11, 40177, 19076, 198, 6738, 36650, 541, 66, 13, 81, 1102, 13, 16366, 1330...
2.566285
611
if __name__ == '__main__': fun_while()
[ 198, 198, 361, 11593, 3672, 834, 6624, 705, 834, 12417, 834, 10354, 198, 220, 220, 220, 1257, 62, 4514, 3419, 198, 220, 220, 220, 220 ]
1.96
25
print(df.groupby('station').temperature.min()) print(df.groupby('station').temperature.max()) print(df.groupby('station').temperature.std())
[ 4798, 7, 7568, 13, 8094, 1525, 10786, 17529, 27691, 11498, 21069, 13, 1084, 28955, 198, 4798, 7, 7568, 13, 8094, 1525, 10786, 17529, 27691, 11498, 21069, 13, 9806, 28955, 198, 4798, 7, 7568, 13, 8094, 1525, 10786, 17529, 27691, 11498, 2...
3.133333
45
import pytest import dependencies import sys sys.path.insert(0, dependencies.program_path) from src import RoomObject as rObject from src import Room as r
[ 11748, 12972, 9288, 198, 11748, 20086, 198, 11748, 25064, 220, 198, 17597, 13, 6978, 13, 28463, 7, 15, 11, 20086, 13, 23065, 62, 6978, 8, 198, 198, 6738, 12351, 1330, 10096, 10267, 355, 374, 10267, 198, 6738, 12351, 1330, 10096, 355, ...
3.651163
43
from django.db import models
[ 6738, 42625, 14208, 13, 9945, 1330, 4981, 628, 628, 628, 628, 628 ]
3.166667
12
r""" Given a positive integer num, write a function which returns True if num is a perfect square else False. Follow up: Do not use any built-in library function such as sqrt. Example 1: Input: num = 16 Output: true Example 2: Input: num = 14 Output: false Constraints: 1 <= num <= 2^31 - 1 """ # Submitted...
[ 81, 37811, 198, 15056, 257, 3967, 18253, 997, 11, 3551, 257, 2163, 543, 5860, 6407, 611, 997, 318, 257, 2818, 6616, 2073, 10352, 13, 198, 198, 7155, 510, 25, 2141, 407, 779, 597, 3170, 12, 259, 5888, 2163, 884, 355, 19862, 17034, 13...
2.801471
272
from django.db import models from ckeditor.fields import RichTextField # Create your models here.
[ 6738, 42625, 14208, 13, 9945, 1330, 4981, 198, 6738, 269, 9091, 2072, 13, 25747, 1330, 3998, 8206, 15878, 198, 198, 2, 13610, 534, 4981, 994, 13, 628 ]
3.703704
27
from __future__ import absolute_import from .number import randomPN from .gid import calcAge from .passwd import randomPW
[ 6738, 11593, 37443, 834, 1330, 4112, 62, 11748, 198, 198, 6738, 764, 17618, 1330, 4738, 13137, 198, 6738, 764, 70, 312, 1330, 42302, 23396, 198, 6738, 764, 6603, 16993, 1330, 4738, 47, 54 ]
3.69697
33
# -*- coding: utf-8 -*- import django from django.conf import settings from django.utils.functional import keep_lazy if django.VERSION >= (1, 5): from django.contrib.auth import get_user_model AUTH_USER_MODEL = settings.AUTH_USER_MODEL get_user_model = keep_lazy(AUTH_USER_MODEL)(get_user_model) get_use...
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 11748, 42625, 14208, 198, 6738, 42625, 14208, 13, 10414, 1330, 6460, 198, 6738, 42625, 14208, 13, 26791, 13, 45124, 1330, 1394, 62, 75, 12582, 198, 198, 361, 42625, 14208,...
2.603261
184
from Membership import sad,memberships import defuzzify import rule import itertools if __name__ == "__main__": x = FLC(70, 15, 30) x.evaluate()
[ 6738, 37939, 1330, 6507, 11, 30814, 5748, 198, 11748, 825, 4715, 1958, 198, 11748, 3896, 198, 11748, 340, 861, 10141, 628, 198, 198, 361, 11593, 3672, 834, 6624, 366, 834, 12417, 834, 1298, 198, 220, 220, 220, 2124, 796, 376, 5639, 7,...
2.736842
57
import argparse from FCNetwork import FCNetwork if __name__ == "__main__": parser = argparse.ArgumentParser() parser.add_argument( "--sizes", default=[ # 3*28*28, # 2*28*28, 14*28], type=list) parser.add_argument( "--labels_path"...
[ 11748, 1822, 29572, 198, 6738, 10029, 26245, 1330, 10029, 26245, 198, 198, 361, 11593, 3672, 834, 6624, 366, 834, 12417, 834, 1298, 198, 220, 220, 220, 30751, 796, 1822, 29572, 13, 28100, 1713, 46677, 3419, 198, 220, 220, 220, 30751, 13...
1.895801
643
''' Copyright 2022 Airbus SAS Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software dis...
[ 7061, 6, 198, 15269, 33160, 39173, 35516, 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, 198, 1639, 743...
3.401639
244
#!/usr/bin/env python # # Copyright 2007 Google 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 o...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 2, 198, 2, 15069, 4343, 3012, 3457, 13, 198, 2, 198, 2, 49962, 739, 262, 24843, 13789, 11, 10628, 362, 13, 15, 357, 1169, 366, 34156, 15341, 198, 2, 345, 743, 407, 779, 428, 2393, ...
2.818519
810
# # Copyright 2016 Google 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...
[ 2, 198, 2, 15069, 1584, 3012, 3457, 13, 198, 2, 198, 2, 49962, 739, 262, 24843, 13789, 11, 10628, 362, 13, 15, 357, 1169, 366, 34156, 15341, 198, 2, 345, 743, 407, 779, 428, 2393, 2845, 287, 11846, 351, 262, 13789, 13, 198, 2, 9...
2.473338
1,369
from Hackdavis.ab_recipes import Recipes # name, type, ingredients, url if __name__ == "__main__": s = Simplyrecipes('https://www.simplyrecipes.com/recipes/mexican_red_chili_sauce/') print(s.find_ingredients())
[ 6738, 18281, 67, 23401, 13, 397, 62, 8344, 18636, 1330, 44229, 198, 198, 2, 1438, 11, 2099, 11, 9391, 11, 19016, 198, 198, 361, 11593, 3672, 834, 6624, 366, 834, 12417, 834, 1298, 198, 220, 220, 220, 264, 796, 17973, 8344, 18636, 10...
2.619048
84
# -*- coding: utf-8 -*- from zope.interface import alsoProvides from collective.transmogrifier.transmogrifier import Transmogrifier from plone.protect.interfaces import IDisableCSRFProtection from Products.Five.browser import BrowserView
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 6738, 1976, 3008, 13, 39994, 1330, 635, 15946, 1460, 198, 198, 6738, 10098, 13, 7645, 76, 519, 81, 7483, 13, 7645, 76, 519, 81, 7483, 1330, 3602, 76, 519, 81, 7483, ...
3.333333
72
import logging import re import hashlib from appAux import loadFile, toHex logger = logging.getLogger(__name__)
[ 11748, 18931, 198, 11748, 302, 198, 11748, 12234, 8019, 198, 6738, 598, 32, 2821, 1330, 3440, 8979, 11, 284, 39, 1069, 198, 198, 6404, 1362, 796, 18931, 13, 1136, 11187, 1362, 7, 834, 3672, 834, 8 ]
3.111111
36
#!/usr/bin/env python3 # -*- coding: utf-8 -*- """ Created on Sat Feb 13 22:07:00 2021 @authors: Ali Kamali Sara Baradaran Mahdi Heidari """ import angr,claripy
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 18, 198, 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 37811, 198, 198, 41972, 319, 7031, 3158, 1511, 2534, 25, 2998, 25, 405, 33448, 198, 198, 31, 41617, 25, 12104, 12...
2.141176
85
from flask import Flask, request, abort from datetime import datetime import pytz app = Flask(__name__) @app.route('/') if __name__ == '__main__': app.run(ssl_context=("/etc/demo/ssl/blueapron.crt", "/etc/demo/ssl/blueapron.key"), host='0.0.0.0')
[ 6738, 42903, 1330, 46947, 11, 2581, 11, 15614, 198, 6738, 4818, 8079, 1330, 4818, 8079, 198, 11748, 12972, 22877, 628, 198, 1324, 796, 46947, 7, 834, 3672, 834, 8, 628, 628, 198, 31, 1324, 13, 38629, 10786, 14, 11537, 628, 198, 361, ...
2.20155
129
from probability import with_probability import random
[ 6738, 12867, 1330, 351, 62, 1676, 65, 1799, 198, 11748, 4738, 628 ]
4.666667
12
#!/usr/bin/env python # -*- coding: utf-8 -*- """The setup script.""" import os import re from setuptools import find_packages, setup REQUIREMENTS = [] SETUP_REQUIREMENTS = [] TEST_REQUIREMENTS = [] DEV_REQUIREMENTS = ["bumpversion", "pre-commit", "tox"] with open("README.rst") as readme_file: README = readme_f...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 198, 37811, 464, 9058, 4226, 526, 15931, 198, 198, 11748, 28686, 198, 11748, 302, 198, 6738, 900, 37623, 10141, 1330, 1...
2.687289
889
import torch, cv2 from PIL import Image, ImageDraw import numpy as np from shapely.geometry import Polygon, MultiPoint, MultiPolygon from .boxes import dists_pt2line_numpy, dists2corners_numpy # ref: https://github.com/MhLiao/TextBoxes_plusplus/blob/master/examples/text/nms.py def quads_iou(a, b): """ :param ...
[ 11748, 28034, 11, 269, 85, 17, 198, 6738, 350, 4146, 1330, 7412, 11, 7412, 25302, 198, 11748, 299, 32152, 355, 45941, 198, 6738, 5485, 306, 13, 469, 15748, 1330, 12280, 14520, 11, 15237, 12727, 11, 15237, 34220, 14520, 198, 198, 6738, ...
2.106269
8,055
import re # optional dot, word characters, hyphens allowed tag_regex = "^\.?[-\w]+$" # same but repeated and joined by + multitag_regex = "^(\+?\.?[-\w]+)+$"
[ 11748, 302, 198, 198, 2, 11902, 16605, 11, 1573, 3435, 11, 5328, 5135, 3142, 198, 12985, 62, 260, 25636, 796, 366, 61, 17405, 30, 58, 12, 59, 86, 48688, 3, 1, 198, 2, 976, 475, 5100, 290, 5399, 416, 1343, 198, 16680, 270, 363, 6...
2.461538
65
import numpy as np import torch from torch.utils.data import Dataset, Sampler from torch_geometric.data import Data from rorlkit.torch.data_management import rosbag_data
[ 11748, 299, 32152, 355, 45941, 198, 198, 11748, 28034, 198, 6738, 28034, 13, 26791, 13, 7890, 1330, 16092, 292, 316, 11, 3409, 20053, 198, 6738, 28034, 62, 469, 16996, 13, 7890, 1330, 6060, 198, 198, 6738, 374, 273, 75, 15813, 13, 131...
3.122807
57
import copy
[ 11748, 4866, 628 ]
4.333333
3
import argparse import math import sys import tqdm sys.path.append('/relnet') from relnet.evaluation.experiment_conditions import get_conditions_for_experiment from relnet.evaluation.file_paths import FilePaths from multiprocessing.pool import Pool from psutil import cpu_count if __name__ == "__main__": main()
[ 11748, 1822, 29572, 198, 11748, 10688, 198, 11748, 25064, 198, 11748, 256, 80, 36020, 198, 198, 17597, 13, 6978, 13, 33295, 10786, 14, 2411, 3262, 11537, 198, 198, 6738, 823, 3262, 13, 18206, 2288, 13, 23100, 3681, 62, 17561, 1756, 1330...
3.076923
104
__all__ = ["composition", "crystal"]
[ 834, 439, 834, 796, 14631, 785, 9150, 1600, 366, 20470, 7757, 8973 ]
3
12
import sys from unittest import mock import py import pytest FIX_PROJECT = py.path.local(__file__).dirpath("fixture-project") @pytest.fixture @pytest.fixture
[ 11748, 25064, 198, 6738, 555, 715, 395, 1330, 15290, 198, 198, 11748, 12972, 198, 11748, 12972, 9288, 198, 198, 47084, 62, 31190, 23680, 796, 12972, 13, 6978, 13, 12001, 7, 834, 7753, 834, 737, 15908, 6978, 7203, 69, 9602, 12, 16302, ...
2.737705
61
import typing import colors palette: typing.Mapping[str, typing.Mapping[int, typing.Tuple[int, int, int]]] = { "blueGray": { 50: (248, 250, 252), 100: (241, 245, 249), 200: (226, 232, 240), 300: (203, 213, 225), 400: (148, 163, 184), 500: (100, 116, 139), 60...
[ 11748, 19720, 198, 198, 11748, 7577, 198, 198, 18596, 5857, 25, 19720, 13, 44, 5912, 58, 2536, 11, 19720, 13, 44, 5912, 58, 600, 11, 19720, 13, 51, 29291, 58, 600, 11, 493, 11, 493, 11907, 60, 796, 1391, 198, 220, 220, 220, 366, ...
1.750763
4,257
from random import shuffle alunoI = input('Digite o aluno I: ') alunoII = input('Digite o aluno II: ') alunoIII = input('Digite o aluno III: ') alunoIV = input('Digite o aluno IV: ') ordem = [alunoI,alunoII,alunoIII, alunoIV] shuffle(ordem) print('A ordem de apresentação será') print(ordem)
[ 6738, 4738, 1330, 36273, 198, 198, 282, 36909, 40, 796, 5128, 10786, 19511, 578, 267, 435, 36909, 314, 25, 705, 8, 198, 282, 36909, 3978, 796, 5128, 10786, 19511, 578, 267, 435, 36909, 2873, 25, 705, 8, 198, 282, 36909, 10855, 796, ...
2.45
120
""" Module for various checkers. """ import re import logging from functools import lru_cache from abc import ABCMeta, abstractmethod from .parser import compile_regex from .exceptions import InvalidPatternError log = logging.getLogger(__name__) class Checker(metaclass=ABCMeta): """ Abstract class for Che...
[ 37811, 198, 26796, 329, 2972, 2198, 364, 13, 198, 37811, 198, 198, 11748, 302, 198, 11748, 18931, 198, 6738, 1257, 310, 10141, 1330, 300, 622, 62, 23870, 198, 6738, 450, 66, 1330, 9738, 48526, 11, 12531, 24396, 198, 198, 6738, 764, 48...
2.267253
2,159
# -*- coding: utf-8 -*- import os import sys import urllib,urllib2,cookielib import datetime,time import re import random from bs4 import BeautifulSoup as soup import io text_file = open("amazonreviewlinks.txt", "r") lines = text_file.read().split(',') no = len(lines) #opening product link p...
[ 1303, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 201, 198, 201, 198, 11748, 28686, 201, 198, 11748, 25064, 201, 198, 11748, 2956, 297, 571, 11, 333, 297, 571, 17, 11, 27916, 8207, 571, 201, 198, 11748, 4818, 8079, 11, ...
2.122518
6,195
# spectral_cluster.py import torch import torch.nn.functional as F import numpy as np import random import time import datetime import os import sklearn from sklearn import metrics from multi_kmeans_pp import MultiKMeans from logger import Logger from scipy.sparse.csgraph import laplacian as csgra...
[ 2, 37410, 62, 565, 5819, 13, 9078, 201, 198, 11748, 28034, 201, 198, 11748, 28034, 13, 20471, 13, 45124, 355, 376, 201, 198, 11748, 299, 32152, 355, 45941, 201, 198, 11748, 4738, 201, 198, 11748, 640, 201, 198, 11748, 4818, 8079, 201,...
1.932276
6,305
from timeit import default_timer as timer import revkit
[ 6738, 640, 270, 1330, 4277, 62, 45016, 355, 19781, 198, 198, 11748, 2710, 15813, 198 ]
3.8
15
# Time: O(n^2) # Space: O(1) # # Given an array S of n integers, # are there elements a, b, c in S such that a + b + c = 0? # Find all unique triplets in the array which gives the sum of zero. # # Note: # Elements in a triplet (a,b,c) must be in non-descending order. (ie, a <= b <= c) # The solution set must not conta...
[ 2, 3862, 25, 220, 440, 7, 77, 61, 17, 8, 198, 2, 4687, 25, 440, 7, 16, 8, 198, 2, 198, 2, 11259, 281, 7177, 311, 286, 299, 37014, 11, 198, 2, 389, 612, 4847, 257, 11, 275, 11, 269, 287, 311, 884, 326, 257, 1343, 275, 1343,...
2.472
250
from sqlalchemy.ext.declarative import declarative_base Base = declarative_base() from .core import Word, Meaning, ReviewPlan, AddCounter, ReviewPlanType, ReviewStatus, ReviewStage
[ 6738, 44161, 282, 26599, 13, 2302, 13, 32446, 283, 876, 1330, 2377, 283, 876, 62, 8692, 198, 198, 14881, 796, 2377, 283, 876, 62, 8692, 3419, 198, 198, 6738, 764, 7295, 1330, 9678, 11, 30563, 11, 6602, 20854, 11, 3060, 31694, 11, 66...
3.519231
52
# This file is dual licensed under the terms of the Apache License, Version # 2.0, and the BSD License. See the LICENSE file in the root of this repository # for complete details. from __future__ import absolute_import, division, print_function import six from cryptography import utils from cryptography.hazmat.primi...
[ 2, 770, 2393, 318, 10668, 11971, 739, 262, 2846, 286, 262, 24843, 13789, 11, 10628, 198, 2, 362, 13, 15, 11, 290, 262, 347, 10305, 13789, 13, 4091, 262, 38559, 24290, 2393, 287, 262, 6808, 286, 428, 16099, 198, 2, 329, 1844, 3307, ...
2.583582
670
""" This module loads all the classes from the VTK Chemistry library into its namespace. This is an optional module.""" from vtkChemistryPython import *
[ 37811, 770, 8265, 15989, 477, 262, 6097, 422, 262, 32751, 42, 27867, 5888, 656, 198, 896, 25745, 13, 220, 770, 318, 281, 11902, 8265, 526, 15931, 198, 198, 6738, 410, 30488, 41829, 4592, 37906, 1330, 1635, 198 ]
4.189189
37
from .spotify import Spotify from .cache import Cache from . import croapi from . import matcher __all__ = [Spotify, Cache, croapi, matcher]
[ 6738, 764, 20485, 1958, 1330, 26778, 198, 6738, 764, 23870, 1330, 34088, 198, 6738, 764, 1330, 6763, 15042, 198, 6738, 764, 1330, 2603, 2044, 198, 198, 834, 439, 834, 796, 685, 32565, 1958, 11, 34088, 11, 6763, 15042, 11, 2603, 2044, ...
3.302326
43
import json from fastapi.testclient import TestClient from main import my_awesome_api client = TestClient(my_awesome_api) with open("openapi.json", "w") as f: json.dump(client.get("/openapi.json").json(), f, indent=4)
[ 11748, 33918, 198, 198, 6738, 3049, 15042, 13, 9288, 16366, 1330, 6208, 11792, 198, 198, 6738, 1388, 1330, 616, 62, 707, 5927, 62, 15042, 198, 198, 16366, 796, 6208, 11792, 7, 1820, 62, 707, 5927, 62, 15042, 8, 198, 4480, 1280, 7203, ...
2.8125
80
import numpy as np # x = np.array([0.1, 0.8, 0.05, 0.05]) # t = np.array([0.0, 0.1, 0.0, 0.0]) # target probability distribution # x = np.array([0.2, 0.5, 0.2, 0.1]) # t = np.array([0.0, 0.0, 0.1, 0.0]) # target probability distribution # x = np.array([0.05, 0.05, 0.8, 0.1]) # t = np.array([0.0, 0.0, 0.0, 0.1...
[ 11748, 299, 32152, 355, 45941, 628, 198, 2, 2124, 796, 45941, 13, 18747, 26933, 15, 13, 16, 11, 657, 13, 23, 11, 657, 13, 2713, 11, 657, 13, 2713, 12962, 198, 2, 256, 796, 45941, 13, 18747, 26933, 15, 13, 15, 11, 657, 13, 16, ...
1.982363
567
import io import pickle import pprint data = [] data.append(SimpleObject('pickle')) data.append(SimpleObject('preserve')) data.append(SimpleObject('last')) # Simulate a file. out_s = io.BytesIO() # Write to the stream for o in data: print('WRITING : {} ({})'.format(o.name, o.name_backwards)) pickle.dump(o,...
[ 11748, 33245, 198, 11748, 2298, 293, 198, 11748, 279, 4798, 628, 198, 198, 7890, 796, 17635, 198, 7890, 13, 33295, 7, 26437, 10267, 10786, 27729, 293, 6, 4008, 198, 7890, 13, 33295, 7, 26437, 10267, 10786, 18302, 3760, 6, 4008, 198, 7...
2.283019
265
#!/usr/bin/env python # This script has been taken from https://github.com/miguelgrinberg/flasky-with-celery. # The github repo above also provided the starting guidelines to # have celery work in factory mode with Flask: I recommend you also look at the repo above! import os from app import celery, create_app app =...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 2, 770, 4226, 468, 587, 2077, 422, 3740, 1378, 12567, 13, 785, 14, 76, 328, 2731, 2164, 259, 3900, 14, 2704, 2093, 88, 12, 4480, 12, 7015, 88, 13, 220, 198, 2, 383, 33084, 29924, ...
3.419048
105
import sys import os sys.path.append(os.path.join(os.path.dirname(__file__), '..')) import time from pytoion import * if len(sys.argv) == 1: print("Usage: python %s [BLE_DEVICE_ADDRESS]" %(sys.argv[0])) sys.exit() cube = Toio(sys.argv[1]) # sound # see https://toio.github.io/toio-spec/docs/ble_sound try: ...
[ 11748, 25064, 198, 11748, 28686, 198, 17597, 13, 6978, 13, 33295, 7, 418, 13, 6978, 13, 22179, 7, 418, 13, 6978, 13, 15908, 3672, 7, 834, 7753, 834, 828, 705, 492, 6, 4008, 198, 198, 11748, 640, 198, 6738, 12972, 1462, 295, 1330, ...
1.649293
1,132
from django.shortcuts import render from django.http import HttpResponse, Http404 from rest_framework import status from rest_framework.decorators import api_view from rest_framework.views import APIView from rest_framework.response import Response from rest_framework.parsers import JSONParser from models import Task f...
[ 6738, 42625, 14208, 13, 19509, 23779, 1330, 8543, 198, 6738, 42625, 14208, 13, 4023, 1330, 367, 29281, 31077, 11, 367, 29281, 26429, 198, 6738, 1334, 62, 30604, 1330, 3722, 198, 6738, 1334, 62, 30604, 13, 12501, 273, 2024, 1330, 40391, ...
4.112245
98
#!/usr/local/bin/python3 # # stochastic_hill_climbing.py # src # # Created by Illya Starikov on 10/13/18. # Copyright 2018. Illya Starikov. MIT License. # from random import choice from hill_climber import HillClimber class StochasticHillClimber(HillClimber): """A stochastic steepest-ascent hill-climbing algor...
[ 2, 48443, 14629, 14, 12001, 14, 8800, 14, 29412, 18, 198, 2, 198, 2, 3995, 354, 3477, 62, 12639, 62, 565, 320, 4623, 13, 9078, 198, 2, 12351, 198, 2, 198, 2, 15622, 416, 5821, 3972, 2907, 1134, 709, 319, 838, 14, 1485, 14, 1507,...
2.408683
668
for _ in range(int(input())): n=int(input()) l=list(map(int,input().split())) l=sorted(l) r=l[::-1] if(n==1 or n==2): print("first") else: p1=r[1]+sum(r[2::2]) p2=sum(l)-p1 if(p1>p2): print("second") elif(p2>p1): print("fi...
[ 1640, 4808, 287, 2837, 7, 600, 7, 15414, 28955, 2599, 198, 220, 220, 220, 299, 28, 600, 7, 15414, 28955, 198, 220, 220, 220, 300, 28, 4868, 7, 8899, 7, 600, 11, 15414, 22446, 35312, 3419, 4008, 198, 220, 220, 220, 300, 28, 82, 9...
1.566524
233
#!/usr/bin/python import os import sys import signal import json import time from urllib.request import urlopen ''' 5130315 https://www.funder.co.il/wsfund.asmx/GetFundTickerm?callback=jQuery111306779790886268987_1621159388408&id=5130315&startDate=2018-05-16&endDate=2021-05-17&_=1621159388411 https://www.funder.co.il/...
[ 2, 48443, 14629, 14, 8800, 14, 29412, 198, 11748, 28686, 198, 11748, 25064, 198, 11748, 6737, 198, 11748, 33918, 198, 11748, 640, 198, 6738, 2956, 297, 571, 13, 25927, 1330, 19016, 9654, 198, 198, 7061, 6, 198, 4349, 22572, 1314, 198, ...
2.376344
186
# @param s, a string # @return an integer s = "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa...
[ 220, 220, 220, 1303, 2488, 17143, 264, 11, 257, 4731, 198, 220, 220, 220, 1303, 2488, 7783, 281, 18253, 628, 198, 82, 796, 366, 24794, 24794, 24794, 24794, 24794, 24794, 24794, 24794, 24794, 24794, 24794, 24794, 24794, 24794, 24794, 24794...
3.819951
411
from flask import Flask from shellshocker_server.saferproxyfix import SaferProxyFix from raven.contrib.flask import Sentry import os app = Flask(__name__) app.config['SECRET_KEY'] = os.environ['SECRET_KEY'] try: if os.environ['SECRET_KEY'] is not None: app.config['USE_SENTRY'] = True app.config['SENTRY_DSN...
[ 6738, 42903, 1330, 46947, 198, 6738, 7582, 1477, 12721, 62, 15388, 13, 82, 34659, 36436, 13049, 1330, 6895, 263, 44148, 22743, 198, 6738, 37735, 13, 3642, 822, 13, 2704, 2093, 1330, 11352, 563, 198, 198, 11748, 28686, 198, 198, 1324, 79...
2.592784
194
""" NYT Download articles """ from nytimesarticle import articleAPI import pandas as pd import time import re api = articleAPI("<PASTE_YOUR_API_KEY>") df = pd.DataFrame() for i in range(1,10): articles = api.search(q="Artificial Intelligence", begin_date=int("20180"+str(i)+"01"), end_date=int...
[ 37811, 198, 12805, 51, 10472, 6685, 198, 37811, 198, 198, 6738, 299, 20760, 999, 20205, 1330, 2708, 17614, 198, 11748, 19798, 292, 355, 279, 67, 198, 11748, 640, 198, 11748, 302, 198, 198, 15042, 796, 2708, 17614, 7203, 27, 47, 1921, ...
2.111223
2,976
import math from collections import Counter from fractions import Fraction from datatypes import Chord import json
[ 11748, 10688, 198, 6738, 17268, 1330, 15034, 198, 6738, 49876, 1330, 376, 7861, 198, 6738, 4818, 265, 9497, 1330, 609, 585, 198, 11748, 33918, 628, 198 ]
4.5
26
from nlpia.loaders import * # noqa
[ 6738, 299, 34431, 544, 13, 2220, 364, 1330, 1635, 220, 1303, 645, 20402 ]
2.692308
13
import collections from enum import Enum from vtypes import ( VString, VInt, VBool, VUnsignedInt, VDict, VValidatorDict, VList, VDate, VDateTime, VTime, VEnum, Validator, ) class RecordingType(Enum): """From https://github.com/MythTV/mythtv/blob/master/mythtv/libs...
[ 11748, 17268, 198, 6738, 33829, 1330, 2039, 388, 198, 198, 6738, 410, 19199, 1330, 357, 198, 220, 220, 220, 569, 10100, 11, 198, 220, 220, 220, 569, 5317, 11, 198, 220, 220, 220, 569, 33, 970, 11, 198, 220, 220, 220, 569, 3118, 32...
2.547401
327
import sublime from sublime_plugin import WindowCommand from ..git_command import GitCommand from ..ui_mixins.quick_panel import show_paginated_panel
[ 11748, 41674, 198, 6738, 41674, 62, 33803, 1330, 26580, 21575, 198, 198, 6738, 11485, 18300, 62, 21812, 1330, 15151, 21575, 198, 6738, 11485, 9019, 62, 19816, 1040, 13, 24209, 62, 35330, 1330, 905, 62, 79, 363, 3898, 62, 35330, 628, 198...
3.731707
41
# -- Description ----------------------------------------------------------------------------- # # Given a function , that returns two random values between 0..1 , calculate the value of Pi # Credits to YT channel Joma Tech # -------------------------------------------------------------------------------------------- #...
[ 2, 1377, 12489, 16529, 32501, 1303, 198, 2, 11259, 257, 2163, 837, 326, 5860, 734, 4738, 3815, 1022, 657, 492, 16, 837, 15284, 262, 1988, 286, 13993, 198, 2, 29501, 284, 575, 51, 6518, 449, 6086, 9634, 198, 2, 16529, 1783, 10541, 13...
5.234568
81
from __future__ import division import abc import numpy as np from .utils import psnr class metric(object): """Represents an metric for measuring reconstruction quality """ __metaclass__ = abc.ABCMeta @abc.abstractmethod def _eval(self, v): """Evaluate the metric """ retur...
[ 6738, 11593, 37443, 834, 1330, 7297, 198, 11748, 450, 66, 198, 11748, 299, 32152, 355, 45941, 198, 6738, 764, 26791, 1330, 279, 16184, 81, 628, 198, 4871, 18663, 7, 15252, 2599, 198, 220, 220, 220, 37227, 6207, 6629, 281, 18663, 329, ...
2.102941
476
from pythagoras import *
[ 6738, 279, 5272, 363, 41043, 1330, 1635, 628 ]
3.25
8
Desc = cellDescClass("NAND2BXL") Desc.properties["cell_footprint"] = "nand2b" Desc.properties["area"] = "13.305600" Desc.properties["cell_leakage_power"] = "540.512676" Desc.pinOrder = ['AN', 'B', 'Y'] Desc.add_arc("AN","Y","combi") Desc.add_arc("B","Y","combi") Desc.add_param("area",13.305600); Desc.add_pin("AN","inpu...
[ 24564, 796, 2685, 24564, 9487, 7203, 45, 6981, 17, 33, 32457, 4943, 198, 24564, 13, 48310, 14692, 3846, 62, 5898, 4798, 8973, 796, 366, 77, 392, 17, 65, 1, 198, 24564, 13, 48310, 14692, 20337, 8973, 796, 366, 1485, 13, 1270, 3980, 4...
2.403315
181
# -*- coding: utf-8 -*- """ cherry.exceptions ~~~~~~~~~~~~~~~~~~~ This module contains the set of cheery' exceptions. :copyright: (c) 2018-2019 by Windson Yang :license: MIT License, see LICENSE for more details. """ class CacheNotFoundError(IOError): '''Cache files not found''' class FilesNotFoundError(IOError)...
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 37811, 198, 2044, 563, 13, 1069, 11755, 198, 27156, 4907, 93, 198, 1212, 8265, 4909, 262, 900, 286, 1125, 1924, 6, 13269, 13, 198, 25, 22163, 4766, 25, 357, 66, 8, 2...
3.026455
189
# -*- coding: utf-8 -*- @bot.message_handler(commands=['setlang' , 'Setlang'])
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 198, 31, 13645, 13, 20500, 62, 30281, 7, 9503, 1746, 28, 17816, 2617, 17204, 6, 837, 705, 7248, 17204, 6, 12962, 198 ]
2.222222
36
from abc import ABCMeta, abstractmethod import inspect import warnings import re import types class ExecutionNode(object): """Abstract Superclass for all nodes in an execution flow, e.g. parts, molecules Parts are the atomistic instructions in the genetic circuit execution flow | *Attributes:* |...
[ 6738, 450, 66, 1330, 9738, 48526, 11, 12531, 24396, 198, 11748, 10104, 198, 11748, 14601, 198, 11748, 302, 198, 11748, 3858, 628, 198, 4871, 37497, 19667, 7, 15252, 2599, 198, 220, 220, 220, 37227, 23839, 3115, 4871, 329, 477, 13760, 28...
2.468112
25,684
from setuptools import setup, Extension import re description = 'A python library to evolve binary star systems in time.' try: with open('README.md', 'r') as f: long_description = f.read() except FileNotFoundError: long_description = description metadata = {"version": "", "author": "", ...
[ 6738, 900, 37623, 10141, 1330, 9058, 11, 27995, 198, 11748, 302, 198, 198, 11213, 796, 705, 32, 21015, 5888, 284, 18101, 13934, 3491, 3341, 287, 640, 2637, 198, 198, 28311, 25, 198, 220, 220, 220, 351, 1280, 10786, 15675, 11682, 13, 9...
1.988959
634
from __future__ import absolute_import from __future__ import division from __future__ import print_function from sklearn.preprocessing import Normalizer from SharedFunctions import get_current_time, fmt, find_accuracy from datetime import datetime from sklearn.feature_extraction.text import TfidfVectorizer, CountVecto...
[ 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, 6738, 1341, 35720, 13, 3866, 36948, 1330, 14435, 7509, 198, 6738, 39403, 24629, 2733, 1330,...
3.397849
186
from __future__ import absolute_import, division, print_function import boost_adaptbx.boost.python as bp bp.import_ext("cctbx_covariance_ext") from cctbx_covariance_ext import *
[ 6738, 11593, 37443, 834, 1330, 4112, 62, 11748, 11, 7297, 11, 3601, 62, 8818, 198, 11748, 5750, 62, 42552, 65, 87, 13, 39521, 13, 29412, 355, 275, 79, 198, 46583, 13, 11748, 62, 2302, 7203, 66, 310, 65, 87, 62, 66, 709, 2743, 590,...
2.825397
63
# coding=utf-8 # Copyright 2020 The Google Research Authors. # # 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 applicab...
[ 2, 19617, 28, 40477, 12, 23, 198, 2, 15069, 12131, 383, 3012, 4992, 46665, 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, ...
3.348901
364
from pico_code.host.talker import Talker import turtle talker = Talker() turtle = turtle.Turtle() while True: text = talker.receive() x,y = [convert(text) for text in text.split()] turtle.setx(x) turtle.sety(y)
[ 6738, 279, 3713, 62, 8189, 13, 4774, 13, 16620, 263, 1330, 12167, 263, 198, 11748, 28699, 198, 198, 16620, 263, 796, 12167, 263, 3419, 198, 83, 17964, 796, 28699, 13, 51, 17964, 3419, 628, 198, 198, 4514, 6407, 25, 198, 220, 220, 22...
2.391753
97
# -*- coding: utf-8 -*- # Generated by Django 1.11.16 on 2018-10-29 18:33 from __future__ import unicode_literals from django.db import migrations from django_airavata.apps.auth.models import ( NEW_USER_EMAIL_TEMPLATE, VERIFY_EMAIL_TEMPLATE )
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 2, 2980, 515, 416, 37770, 352, 13, 1157, 13, 1433, 319, 2864, 12, 940, 12, 1959, 1248, 25, 2091, 198, 6738, 11593, 37443, 834, 1330, 28000, 1098, 62, 17201, 874, 198, ...
2.40566
106
from sleekxmpp.plugins.base import register_plugin as _register_plugin from sleekpromises.scheduler import sleekpromises_scheduler as _scheduler def register_sleek_promises(): """ Register the sleek promises components for the sleek xmpp framework. :return: """ _register_plugin(_scheduler)
[ 6738, 33143, 87, 76, 381, 13, 37390, 13, 8692, 1330, 7881, 62, 33803, 355, 4808, 30238, 62, 33803, 198, 198, 6738, 33143, 16963, 2696, 13, 1416, 704, 18173, 1330, 33143, 16963, 2696, 62, 1416, 704, 18173, 355, 4808, 1416, 704, 18173, ...
3.14
100
# git clone https://github.com/GoogleCloudPlatform/microservices-demo.git # cd microservices-demo/src/loadgenerator # export FRONTEND_ADDR=localhost # rename : sock shop locustfile.py to locustfile.py # ./loadgen.sh # sock shop locustfile.py file # loadgen.sh is using test steps in : locustfile.py for ...
[ 2, 17606, 17271, 3740, 1378, 12567, 13, 785, 14, 11708, 18839, 37148, 14, 24055, 30416, 12, 9536, 78, 13, 18300, 201, 198, 2, 22927, 4580, 30416, 12, 9536, 78, 14, 10677, 14, 2220, 8612, 1352, 201, 198, 201, 198, 2, 10784, 8782, 358...
2.75625
160
import ansible.inventory.manager import ansible.constants import ansible.parsing.dataloader
[ 11748, 9093, 856, 13, 24807, 13, 37153, 198, 11748, 9093, 856, 13, 9979, 1187, 198, 11748, 9093, 856, 13, 79, 945, 278, 13, 67, 10254, 1170, 263, 628, 198 ]
3.241379
29
# =============================================================== # Author: Rodolfo Ferro # Email: ferro@cimat.mx # Twitter: @FerroRodolfo # # ABOUT COPYING OR USING PARTIAL INFORMATION: # This script was originally created by Rodolfo Ferro, for # his workshop in PythonDay Mexico 2018 at CUCEA in Gdl, Mx. # Any explici...
[ 2, 46111, 4770, 25609, 855, 198, 2, 6434, 25, 6882, 4024, 78, 12880, 305, 198, 2, 9570, 25, 11354, 305, 31, 66, 320, 265, 13, 36802, 198, 2, 3009, 25, 2488, 43362, 305, 27917, 4024, 78, 198, 2, 198, 2, 33478, 27975, 45761, 6375, ...
3.036932
352
from __future__ import print_function import argparse import gzip import io import os import sys from collections import defaultdict from consplice.constraint.utils import get_alternative_gene_symbols from interlap import InterLap # ------------------------------------------------------------------------------------...
[ 6738, 11593, 37443, 834, 1330, 3601, 62, 8818, 198, 198, 11748, 1822, 29572, 198, 11748, 308, 13344, 198, 11748, 33245, 198, 11748, 28686, 198, 11748, 25064, 198, 6738, 17268, 1330, 4277, 11600, 198, 198, 6738, 762, 489, 501, 13, 1102, ...
2.956835
1,946
print(interversion("Marc Barthet"))
[ 198, 198, 4798, 7, 3849, 9641, 7203, 22697, 13167, 3202, 48774, 198 ]
3.166667
12
import re from setuptools import find_packages, setup install_requires = [ 'Django>=1.11.28', 'Wagtail>=2.2', 'django-otp>=0.8.1', 'six>=1.14.0', 'qrcode>=6.1', ] docs_require = [ 'sphinx>=1.4.1', 'sphinx_rtd_theme>=0.4.3', ] tests_require = [ 'coverage==5.0.3', 'pytest==5.3.5', ...
[ 11748, 302, 198, 198, 6738, 900, 37623, 10141, 1330, 1064, 62, 43789, 11, 9058, 198, 198, 17350, 62, 47911, 796, 685, 198, 220, 220, 220, 705, 35, 73, 14208, 29, 28, 16, 13, 1157, 13, 2078, 3256, 198, 220, 220, 220, 705, 54, 363, ...
2.145783
830