content
stringlengths
1
1.04M
input_ids
listlengths
1
774k
ratio_char_token
float64
0.38
22.9
token_count
int64
1
774k
# -*- coding: utf-8 -*- ############################################################################## # # OpenERP, Open Source Management Solution # Copyright (C) 2010-today OpenERP SA (<http://www.openerp.com>) # # This program is free software: you can redistribute it and/or modify # it under the terms o...
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 29113, 29113, 7804, 4242, 2235, 198, 2, 198, 2, 220, 220, 220, 4946, 1137, 47, 11, 4946, 8090, 8549, 28186, 198, 2, 220, 220, 220, 15069, 357, 34, 8, 3050, 12, 40838...
2.317446
6,483
# -*- coding: utf-8 -*- # Copyright 2018 ICON Foundation # # 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, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 2, 15069, 2864, 314, 10943, 5693, 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, 42...
2.117898
1,408
a = list(range(10)) slice1 = slice(0, 3) slice2 = slice(4, 8) print(a[slice1]) print(a[slice2]) a[slice2] = ["@", "#", "$", "%"] print(a) del a[slice1] print(a) print(f"slice start: {slice1.start}") print(f"slice stop: {slice1.stop}") print(f"slice step: {slice1.step}") c = slice(0, 100, 3) s = "0as0ef0df0vd0ef0d" ...
[ 64, 796, 1351, 7, 9521, 7, 940, 4008, 198, 48369, 16, 796, 16416, 7, 15, 11, 513, 8, 198, 48369, 17, 796, 16416, 7, 19, 11, 807, 8, 198, 4798, 7, 64, 58, 48369, 16, 12962, 198, 4798, 7, 64, 58, 48369, 17, 12962, 198, 198, 64...
2.059459
185
#!/usr/bin/env python import ConfigParser import requests import json cp = ConfigParser.SafeConfigParser() cp.read('/etc/keystone/keystone.conf') token = cp.get('DEFAULT', 'admin_token') baseurl = 'http://localhost:35357/v3/OS-FEDERATION' headers = { 'X-Auth-Token': token, 'Content-Type': 'application/json',...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 11748, 17056, 46677, 198, 11748, 7007, 198, 11748, 33918, 198, 198, 13155, 796, 17056, 46677, 13, 31511, 16934, 46677, 3419, 198, 13155, 13, 961, 10786, 14, 14784, 14, 2539, 6440, 14, 25...
2.323202
987
# Copyright (C) 2018-2021 Intel Corporation # SPDX-License-Identifier: Apache-2.0 from extensions.front.tf.concat_ext import ConcatFrontExtractor from unit_tests.utils.extractors import PB, BaseExtractorsTestingClass
[ 2, 15069, 357, 34, 8, 2864, 12, 1238, 2481, 8180, 10501, 198, 2, 30628, 55, 12, 34156, 12, 33234, 7483, 25, 24843, 12, 17, 13, 15, 198, 198, 6738, 18366, 13, 8534, 13, 27110, 13, 1102, 9246, 62, 2302, 1330, 1482, 9246, 25886, 1162...
3.318182
66
"""Defines a project macro used in every TokTok sub-project. It checks constraints such as the use of the correct license and the presence and correctness of the license text. """ _haskell_travis = rule( attrs = { "package": attr.string(mandatory = True), "_template": attr.label( defau...
[ 37811, 7469, 1127, 257, 1628, 15021, 973, 287, 790, 9453, 19042, 850, 12, 16302, 13, 198, 198, 1026, 8794, 17778, 884, 355, 262, 779, 286, 262, 3376, 5964, 290, 262, 4931, 198, 392, 29409, 286, 262, 5964, 2420, 13, 198, 37811, 198, ...
2.194012
835
"""the simple baseline for autograph""" import numpy as np import pandas as pd import torch import torch.nn.functional as F from torch.nn import Linear from torch_geometric.nn import GCNConv, JumpingKnowledge from torch_geometric.data import Data from torch_geometric.nn import Node2Vec from torch.utils.dat...
[ 37811, 1169, 2829, 14805, 329, 1960, 2384, 37811, 201, 198, 201, 198, 11748, 299, 32152, 355, 45941, 201, 198, 11748, 19798, 292, 355, 279, 67, 201, 198, 201, 198, 11748, 28034, 201, 198, 11748, 28034, 13, 20471, 13, 45124, 355, 376, ...
3.007519
266
from data_importers.management.commands import BaseXpressDemocracyClubCsvImporter
[ 6738, 1366, 62, 320, 1819, 1010, 13, 27604, 13, 9503, 1746, 1330, 7308, 55, 8439, 11522, 17818, 42350, 34, 21370, 3546, 26634, 628 ]
3.608696
23
# -*- coding: utf-8 -*- # %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% # # Copyright (c) 2019 Image Processing Research Group of University Federico II of Naples ('GRIP-UNINA'). # All rights reserved. # This work should only be used for nonprofit purposes. # # By downloading and/or u...
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 201, 198, 2, 4064, 36917, 36917, 36917, 36917, 36917, 36917, 36917, 36917, 36917, 36917, 36917, 36917, 36917, 36917, 36917, 36917, 36917, 36917, 201, 198, 2, 201, 198, 2, 15069, ...
3.184314
255
# pylint: disable=W0201 from Jumpscale import j JSBASE = j.baseclasses.object # Variables functions = {} func = Functions() functions[1] = func func.guid = 1 func.name = "GeneralModuleStatus" func.description = "General status of a module" func.read = 1 func.write = 0 func.valDef = Value() func.valDef.type = ...
[ 2, 279, 2645, 600, 25, 15560, 28, 54, 15, 1264, 198, 6738, 449, 8142, 38765, 1330, 474, 198, 198, 41, 16811, 11159, 796, 474, 13, 8692, 37724, 13, 15252, 628, 198, 220, 220, 220, 1303, 15965, 2977, 628, 198, 12543, 2733, 796, 23884,...
2.68151
16,798
if __name__ == '__main__': main()
[ 628, 198, 361, 11593, 3672, 834, 6624, 705, 834, 12417, 834, 10354, 198, 220, 220, 220, 1388, 3419, 198 ]
2.157895
19
#!/usr/bin/env python # encoding: utf-8 """ @author: zhanghe @software: PyCharm @file: bearing.py @time: 2020-02-29 23:23 """ from flask_sqlalchemy import SQLAlchemy from app_backend import app db_bearing = SQLAlchemy(app)
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 2, 21004, 25, 3384, 69, 12, 23, 198, 198, 37811, 198, 31, 9800, 25, 1976, 33255, 258, 198, 31, 43776, 25, 9485, 1925, 1670, 198, 31, 7753, 25, 14121, 13, 9078, 198, 31, 2435, 25, ...
2.590909
88
#!/usr/bin/env python2 # -*- coding: utf-8 -*- ''' Keeps your MPD playlist filled with music you like Dependencies : python-mpd pysqlite ''' import os import mpd import random import sqlite3 import time import io import sys import socket ## Config playtime = 70 # Percentage of a song that must be pla...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 17, 198, 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 198, 7061, 6, 198, 15597, 82, 534, 4904, 35, 33178, 5901, 351, 2647, 345, 588, 198, 198, 35, 2690, 3976, 1058, ...
2.334444
1,501
import json import logging from collections import Counter from typing import Union import boto3 from .... import settings from . import OutputCtxManagerBase logger = logging.getLogger("cliexecutor") SQS = boto3.client("sqs", endpoint_url=settings.SQS_ENDPOINT, region_name="ap-northeast-1") class SQSRecordOutputCt...
[ 11748, 33918, 198, 11748, 18931, 198, 6738, 17268, 1330, 15034, 198, 6738, 19720, 1330, 4479, 198, 198, 11748, 275, 2069, 18, 198, 198, 6738, 19424, 1330, 6460, 198, 6738, 764, 1330, 25235, 34, 17602, 13511, 14881, 198, 198, 6404, 1362, ...
2.427848
790
import torch import torch.nn as nn import torch.nn.functional as F from .layers import ConvLayer, Decoder, DigitCaps, PrimaryCaps __all__ = [ 'CapsNet', ] class CapsNet(nn.Module): '''Capsule Network''' @staticmethod @staticmethod @staticmethod
[ 11748, 28034, 198, 11748, 28034, 13, 20471, 355, 299, 77, 198, 11748, 28034, 13, 20471, 13, 45124, 355, 376, 198, 198, 6738, 764, 75, 6962, 1330, 34872, 49925, 11, 34580, 11, 7367, 270, 34, 1686, 11, 21087, 34, 1686, 198, 198, 834, ...
2.522523
111
import csv import dill import itertools import math import pandas as pd import numpy as np from itertools import combinations from sklearn.model_selection import train_test_split from tqdm import tqdm med_file = 'data/PRESCRIPTIONS.csv' diag_file = 'data/DIAGNOSES_ICD.csv' procedure_file = 'data/PROCEDURES_ICD.csv' ...
[ 11748, 269, 21370, 198, 11748, 288, 359, 198, 11748, 340, 861, 10141, 198, 11748, 10688, 198, 198, 11748, 19798, 292, 355, 279, 67, 198, 11748, 299, 32152, 355, 45941, 198, 198, 6738, 340, 861, 10141, 1330, 17790, 198, 6738, 1341, 35720...
2.292496
653
from unittest import TestCase from concurrent.futures import ThreadPoolExecutor from mock import patch import os import platform from aws_lambda_builders.actions import ActionFailedError from aws_lambda_builders.workflows.dotnet_clipackage.dotnetcli import DotnetCLIExecutionError from aws_lambda_builders.workflows.do...
[ 6738, 555, 715, 395, 1330, 6208, 20448, 198, 198, 6738, 24580, 13, 69, 315, 942, 1330, 14122, 27201, 23002, 38409, 198, 6738, 15290, 1330, 8529, 198, 11748, 28686, 198, 11748, 3859, 198, 198, 6738, 3253, 82, 62, 50033, 62, 50034, 13, ...
3.717557
131
import re from collections import defaultdict import rules attrs_re = re.compile(r"""\s*(\w+)\s*=\s*(["'])(.*?)(?<!\\)\2""", re.DOTALL) class HTMLFilter: """Simple HTML white list filter. Usage: hf = HTMLFilter() filtered_html = hf.filter(html) The filter parses the code for < and > ch...
[ 11748, 302, 198, 6738, 17268, 1330, 4277, 11600, 198, 198, 11748, 3173, 198, 198, 1078, 3808, 62, 260, 796, 302, 13, 5589, 576, 7, 81, 37811, 59, 82, 9, 38016, 86, 10, 19415, 82, 9, 28, 59, 82, 9, 7, 14692, 20520, 5769, 15885, 3...
2.674757
206
import time class get_rate_limited_function(object): """ Close over a function and a time limit in seconds. The resulting object can be called like the function, but will not delegate to the function if that function was called through the object in the time limit. Clients can ignore the time lim...
[ 11748, 640, 628, 198, 4871, 651, 62, 4873, 62, 10698, 62, 8818, 7, 15252, 2599, 198, 220, 220, 220, 37227, 198, 220, 220, 220, 13872, 625, 257, 2163, 290, 257, 640, 4179, 287, 4201, 13, 383, 7186, 2134, 460, 198, 220, 220, 220, 30...
3.349754
203
# -*- coding: utf-8 -*- """ Extensions that introduce `basename` and `dirname` as Jinja2 filters. Examples -------- my_path = "/some/absolute/path/with/file.txt" {{ my_path | basename }} Will fill in `file.txt`. """ from __future__ import absolute_import import os.path from jinja2.ext import Extension _...
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 198, 37811, 198, 11627, 5736, 326, 10400, 4600, 12093, 12453, 63, 290, 4600, 15908, 3672, 63, 355, 17297, 6592, 17, 16628, 13, 198, 198, 27730, 198, 982, 628, 220, 220, ...
2.736842
285
from __future__ import print_function import pdb import pytest import sys
[ 6738, 11593, 37443, 834, 1330, 3601, 62, 8818, 198, 11748, 279, 9945, 198, 11748, 12972, 9288, 198, 11748, 25064, 628, 628, 628, 628, 198 ]
3.416667
24
# STDLIB import sys # main{{{ def main() -> None: """ the main method, prints hello world Parameter ---------- none none Result ---------- none Exceptions ---------- none Examples ---------- >>> main() Hello World - by PizzaCutter """ ...
[ 2, 3563, 19260, 9865, 198, 11748, 25064, 628, 198, 2, 1388, 27007, 90, 198, 4299, 1388, 3419, 4613, 6045, 25, 198, 220, 220, 220, 37227, 198, 220, 220, 220, 262, 1388, 2446, 11, 20842, 23748, 995, 628, 198, 220, 220, 220, 25139, 235...
2.485577
208
import ctypes from lib.logger import log from receiver.game_version import CrossGamePacketHeader class PacketHeader(CrossGamePacketHeader): """ The Packet Header is the same across F12020 and F12021 Hence we use one shared HeaderClass for now May have to upgrade that logic if it changes """ ...
[ 11748, 269, 19199, 198, 198, 6738, 9195, 13, 6404, 1362, 1330, 2604, 198, 6738, 9733, 13, 6057, 62, 9641, 1330, 6372, 8777, 47, 8317, 39681, 628, 198, 198, 4871, 6400, 316, 39681, 7, 21544, 8777, 47, 8317, 39681, 2599, 198, 220, 220, ...
3.25
100
# Plotagem básica com _matplotlib_ ## Visualização de dados A visualização de dados é um campo do conhecimento bastante antigo que foi trazido à mostra muito recentemente com a expansão do "Big Data". Seu principal objetivo é representar dados e informações graficamente por meio de elementos visuais como tabelas, gr...
[ 2, 28114, 363, 368, 275, 40138, 3970, 401, 4808, 6759, 29487, 8019, 62, 198, 198, 2235, 15612, 23638, 16175, 28749, 390, 9955, 418, 220, 198, 198, 32, 5874, 23638, 16175, 28749, 390, 9955, 418, 38251, 23781, 1413, 78, 466, 369, 258, 6...
2.202508
8,133
from pprint import pprint as pp from character_tracker.basic_moves import basic_moves from character_tracker.roller import Roller from character_tracker.utils import get_int_input, get_str_input class Character(object): """A Monster of the Week game character. """ @property @charm.setter @prop...
[ 6738, 279, 4798, 1330, 279, 4798, 355, 9788, 198, 6738, 2095, 62, 2213, 10735, 13, 35487, 62, 76, 5241, 1330, 4096, 62, 76, 5241, 198, 6738, 2095, 62, 2213, 10735, 13, 10646, 1330, 24945, 198, 6738, 2095, 62, 2213, 10735, 13, 26791, ...
2.76
175
# Generated by Django 2.2.5 on 2019-10-04 18:34 from django.db import migrations
[ 2, 2980, 515, 416, 37770, 362, 13, 17, 13, 20, 319, 13130, 12, 940, 12, 3023, 1248, 25, 2682, 198, 198, 6738, 42625, 14208, 13, 9945, 1330, 15720, 602, 628 ]
2.766667
30
import numpy as np def provide_PSF_2D(x=None,y=None,PSF_version=None): """ Provides 2D PSF at any position in the detector plane This a version which takes a finite nubmer of pregenerated PSF and \ creates the interpolated version at required position (Future: version which takes interpola...
[ 198, 11748, 299, 32152, 355, 45941, 198, 198, 4299, 2148, 62, 3705, 37, 62, 17, 35, 7, 87, 28, 14202, 11, 88, 28, 14202, 11, 3705, 37, 62, 9641, 28, 14202, 2599, 198, 220, 220, 220, 37227, 47081, 362, 35, 6599, 37, 379, 597, 229...
2.309231
2,199
import sys for i in sys.stdin: ab = i.split() n = int(ab[0]) h = int(ab[1]) v = int(ab[2]) print(max(h, n - h) * max(v, n - v) * 4)
[ 11748, 25064, 198, 198, 1640, 1312, 287, 25064, 13, 19282, 259, 25, 198, 220, 220, 220, 450, 796, 1312, 13, 35312, 3419, 198, 220, 220, 220, 299, 796, 493, 7, 397, 58, 15, 12962, 198, 220, 220, 220, 289, 796, 493, 7, 397, 58, 16...
1.823529
85
import torch import numpy as np import pickle import os from PIL import Image from pathlib import Path from tqdm import tqdm import dnnlib, legacy import clip import torch.nn.functional as F import torchvision.transforms as T import scipy import warnings import torchvision.models from pymoo.core.problem import Problem ...
[ 11748, 28034, 198, 11748, 299, 32152, 355, 45941, 198, 11748, 2298, 293, 198, 11748, 28686, 198, 6738, 350, 4146, 1330, 7412, 198, 6738, 3108, 8019, 1330, 10644, 198, 6738, 256, 80, 36020, 1330, 256, 80, 36020, 198, 11748, 288, 20471, 8...
2.622163
1,498
# ABC145c if __name__ == '__main__': main()
[ 2, 9738, 18781, 66, 628, 198, 198, 361, 11593, 3672, 834, 6624, 705, 834, 12417, 834, 10354, 198, 220, 220, 220, 1388, 3419, 198 ]
2.125
24
#'random' library import import random #rank list & suit dictionary cardranks = ["Clubs", "Diamonds", "Hearts", "Spades"] cardsuits = {"Ace":11, "One":1, "Two":2, "Three":3, "Four":4, "Five":5, "Six":6, "Seven":7, "Eight":8, "Nine":9, "Ten":10, "Jack":10, "Queen":10, "King":10} #player class w/ public attributes #dec...
[ 2, 6, 25120, 6, 5888, 1330, 198, 11748, 4738, 198, 2, 43027, 1351, 1222, 6050, 22155, 198, 9517, 81, 2283, 796, 14631, 2601, 23161, 1600, 366, 47710, 82, 1600, 366, 1544, 5889, 1600, 366, 4561, 2367, 8973, 198, 27761, 15379, 796, 1977...
3.076726
391
# # Copyright (c), 2016-2020, SISSA (International School for Advanced Studies). # All rights reserved. # This file is distributed under the terms of the MIT License. # See the file 'LICENSE' in the root directory of the present # distribution, or http://opensource.org/licenses/MIT. # # @author Davide Brunato <brunato@...
[ 2, 198, 2, 15069, 357, 66, 828, 1584, 12, 42334, 11, 311, 1797, 4090, 357, 24274, 3961, 329, 13435, 10422, 737, 198, 2, 1439, 2489, 10395, 13, 198, 2, 770, 2393, 318, 9387, 739, 262, 2846, 286, 262, 17168, 13789, 13, 198, 2, 4091,...
2.319069
1,589
import argparse import torch from torch.utils.data import DataLoader import sys, os sys.path.insert(0, os.path.join( os.path.dirname(os.path.realpath(__file__)), "../../")) from deep_audio_features.dataloading.dataloading import FeatureExtractorDataset from deep_audio_features.lib.training import test from deep_aud...
[ 11748, 1822, 29572, 198, 11748, 28034, 198, 6738, 28034, 13, 26791, 13, 7890, 1330, 6060, 17401, 198, 11748, 25064, 11, 28686, 198, 17597, 13, 6978, 13, 28463, 7, 15, 11, 28686, 13, 6978, 13, 22179, 7, 198, 220, 220, 220, 28686, 13, ...
2.696721
366
#!/usr/bin/env python # -*- coding: UTF-8 -*- __author__ = 'Chao Wu' R = 8.315e-3 # gas constant in kJ/mol/K T = 298.15 # absolute temperature in K, or 25 C K = 10000 # big enough constant defaultMW = 40 # default enzyme molecular weight in kDa defaultKcat = 200 # default reaction catalytic rate constant in ...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 2, 532, 9, 12, 19617, 25, 41002, 12, 23, 532, 9, 12, 628, 198, 834, 9800, 834, 796, 705, 1925, 5488, 18027, 6, 628, 198, 198, 49, 796, 807, 13, 27936, 68, 12, 18, 197, 197, 2, ...
2.794239
243
import numpy as np from keras import backend as K from keras.models import Sequential from keras.layers import Dense, Bidirectional, LSTM, GRU from keras.optimizers import Adam from keras.callbacks import EarlyStopping from keras.layers import Conv1D, MaxPooling1D from time import time import pandas as pd # convert a...
[ 11748, 299, 32152, 355, 45941, 198, 6738, 41927, 292, 1330, 30203, 355, 509, 198, 6738, 41927, 292, 13, 27530, 1330, 24604, 1843, 198, 6738, 41927, 292, 13, 75, 6962, 1330, 360, 1072, 11, 43484, 4154, 282, 11, 406, 2257, 44, 11, 10863...
3.428571
105
# -- python -- import cv2,tqdm,copy import numpy as np import unittest import tempfile import sys from einops import rearrange import shutil from pathlib import Path from easydict import EasyDict as edict # -- vision -- from PIL import Image # -- linalg -- import torch as th import numpy as np # -- package helper i...
[ 198, 2, 1377, 21015, 1377, 198, 11748, 269, 85, 17, 11, 83, 80, 36020, 11, 30073, 198, 11748, 299, 32152, 355, 45941, 198, 11748, 555, 715, 395, 198, 11748, 20218, 7753, 198, 11748, 25064, 198, 6738, 304, 259, 2840, 1330, 37825, 858, ...
2.780172
232
from PyQt4 import QtGui zip_uri = '/vsizip/C:/Users/Ujaval/Downloads/tl_2013_06_tract.zip/tl_2013_06_tract.shp' shp = QgsVectorLayer(zip_uri, 'tl_2013_06_tract', 'ogr') QgsMapLayerRegistry.instance().addMapLayer(shp) csv_uri = "file:///C:/Users/Ujaval/Downloads/ca_tracts_pop.csv?delimiter=," csv = QgsVectorLayer(csv_...
[ 6738, 9485, 48, 83, 19, 1330, 33734, 8205, 72, 198, 13344, 62, 9900, 796, 31051, 14259, 528, 541, 14, 34, 14079, 14490, 14, 52, 73, 9226, 14, 10002, 82, 14, 28781, 62, 6390, 62, 3312, 62, 83, 974, 13, 13344, 14, 28781, 62, 6390, ...
2.268116
828
# Copyright 2020 Huawei Technologies Co., Ltd # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to...
[ 2, 15069, 12131, 43208, 21852, 1766, 1539, 12052, 198, 2, 198, 2, 49962, 739, 262, 24843, 13789, 11, 10628, 362, 13, 15, 357, 1169, 366, 34156, 15341, 198, 2, 345, 743, 407, 779, 428, 2393, 2845, 287, 11846, 351, 262, 13789, 13, 198...
3.415698
344
from rosettautil.util import fileutil aa_codes_in_order = ["ALA","CYS","ASP","GLU","PHE","GLY","HIS","ILE","LYS","LEU","MET","ASN","PRO","GLN","ARG","SER","THR","VAL","TRP","TYR"]
[ 6738, 686, 17744, 2306, 346, 13, 22602, 1330, 2393, 22602, 198, 7252, 62, 40148, 62, 259, 62, 2875, 796, 14631, 1847, 32, 2430, 34, 16309, 2430, 1921, 47, 2430, 8763, 52, 2430, 11909, 36, 2430, 8763, 56, 2430, 39, 1797, 2430, 41119, ...
2.368421
76
from sc2.constants import * from sc2.position import Point2 from bot.starpruuuft.agent_message import AgentMessage from .agent import Agent from .. import utilities # Reconhece um depot localizado na rampa # Faz o cache da localização dos depots de rampa
[ 6738, 629, 17, 13, 9979, 1187, 1330, 1635, 201, 198, 6738, 629, 17, 13, 9150, 1330, 6252, 17, 201, 198, 201, 198, 6738, 10214, 13, 301, 5117, 622, 12303, 701, 13, 25781, 62, 20500, 1330, 15906, 12837, 201, 198, 6738, 764, 25781, 133...
2.895833
96
from _DATATYPES import TreeNode #Question: Given a Binary Search Tree (BST), convert it to a Greater Tree such that every key of the original BST is changed to the original key plus sum of all keys greater than the original key in BST. #Solution: Traverse reverse in order, keep count of sums and adjust each node as nee...
[ 6738, 4808, 35, 1404, 1404, 48232, 1546, 1330, 12200, 19667, 198, 2, 24361, 25, 11259, 257, 45755, 11140, 12200, 357, 33, 2257, 828, 10385, 340, 284, 257, 18169, 12200, 884, 326, 790, 1994, 286, 262, 2656, 44992, 318, 3421, 284, 262, ...
4.061947
113
#!/usr/bin/env python import numpy as np import nibabel as nib import matplotlib.pyplot as plt from improc3d.reslice import reslice3d, reslice3d_coarse from improc3d.reslice import transform_to_axial from improc3d.reslice import transform_to_coronal from improc3d.reslice import transform_to_sagittal obj = nib.load(...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 198, 11748, 299, 32152, 355, 45941, 198, 11748, 33272, 9608, 355, 33272, 198, 11748, 2603, 29487, 8019, 13, 9078, 29487, 355, 458, 83, 198, 198, 6738, 2015, 66, 18, 67, 13, 411, 75, ...
2.351064
564
from .base import BaseJITTest
[ 6738, 764, 8692, 1330, 7308, 41, 2043, 14402, 628 ]
3.444444
9
e = Exgdb() c = ExgdbCmd() #c.b('atcoder_abc_abc124_d_handstand::main') c.b('main.rs:82') gdb.execute('run') gdb.execute('layout src')
[ 68, 796, 1475, 70, 9945, 3419, 198, 66, 796, 1475, 70, 9945, 40109, 3419, 198, 2, 66, 13, 65, 10786, 265, 66, 12342, 62, 39305, 62, 39305, 17464, 62, 67, 62, 4993, 1481, 3712, 12417, 11537, 198, 66, 13, 65, 10786, 12417, 13, 3808,...
2.076923
65
#!/usr/bin/env python # Copyright (c) 2022 SMHI, Swedish Meteorological and Hydrological Institute. # License: MIT License (see LICENSE.txt or http://opensource.org/licenses/mit). """ Created on 2020-07-08 13:19 @author: a002028 """ class Dependencies: """Doc.""" def __init__(self, **kwargs): """Ini...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 2, 15069, 357, 66, 8, 33160, 9447, 25374, 11, 14023, 25582, 2770, 290, 15084, 3225, 30766, 5136, 13, 198, 2, 13789, 25, 17168, 13789, 357, 3826, 38559, 24290, 13, 14116, 393, 2638, 137...
2.551351
185
# -*- coding: utf-8 -*- ######################################################### # # who when what # -------- ---------- --------------------------------- # apuglisi 2019-09-28 Created # ######################################################### def multiton(cls): ''' Multiton decorator ...
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 29113, 14468, 7804, 2, 198, 2, 198, 2, 508, 220, 220, 220, 220, 220, 220, 618, 220, 220, 220, 220, 220, 220, 220, 644, 198, 2, 24200, 220, 24200, 438, 220, 20368, ...
3.515707
382
from heritagesites.models import CountryArea, DevStatus, HeritageSite, HeritageSiteCategory, \ HeritageSiteJurisdiction, Location, Planet, Region, SubRegion, IntermediateRegion from rest_framework import response, serializers, status
[ 6738, 607, 270, 1095, 2737, 13, 27530, 1330, 12946, 30547, 11, 6245, 19580, 11, 18518, 29123, 11, 18518, 29123, 27313, 11, 3467, 198, 197, 9360, 10208, 29123, 41, 333, 9409, 2867, 11, 13397, 11, 11397, 11, 17718, 11, 3834, 47371, 11, ...
4.016393
61
#!/usr/bin/python # Copyright 2018 Nils Bore, Sriharsha Bhat (nbore@kth.se, svbhat@kth.se) # # Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: # # 1. Redistributions of source code must retain the above copyright notice, thi...
[ 2, 48443, 14629, 14, 8800, 14, 29412, 198, 198, 2, 15069, 2864, 399, 4487, 45409, 11, 20872, 71, 945, 3099, 347, 5183, 357, 46803, 382, 31, 74, 400, 13, 325, 11, 38487, 65, 5183, 31, 74, 400, 13, 325, 8, 198, 2, 198, 2, 2297, ...
3.470219
638
'''input 23 2 1 9 12 21 ''' # -*- coding: utf-8 -*- # AtCoder Beginner Contest # Problem A if __name__ == '__main__': current_hour, add_hour = list(map(int, input().split())) contest_hour = current_hour + add_hour if contest_hour < 24: print(contest_hour) else: ...
[ 7061, 6, 15414, 201, 198, 1954, 362, 201, 198, 16, 201, 198, 201, 198, 24, 1105, 201, 198, 2481, 201, 198, 201, 198, 7061, 6, 201, 198, 201, 198, 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 201, 198, 201, 198, 2,...
2.053254
169
''' Given a 2d grid map of '1's (land) and '0's (water), count the number of islands. An island is surrounded by water and is formed by connecting adjacent lands horizontally or vertically. You may assume all four edges of the grid are all surrounded by water. Example 1: Input: 11110 11010 11000 00000 Output: 1 Exa...
[ 7061, 6, 198, 198, 15056, 257, 362, 67, 10706, 3975, 286, 705, 16, 338, 357, 1044, 8, 290, 705, 15, 338, 357, 7050, 828, 954, 262, 1271, 286, 14807, 13, 1052, 7022, 318, 11191, 416, 1660, 290, 318, 7042, 416, 14320, 15909, 8604, 3...
2.890511
137
# -*- coding: utf-8 -*- #Department Module Description """ ============================================================================== created : 03/20/2017 Last update: 02/08/2021 Developer: Wei-Chun Chang Lite Version 2 @Yishan08212019 API version 1.0 Filename: customizedHandle.py Description: basically, all...
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 2, 36261, 19937, 12489, 198, 37811, 198, 23926, 25609, 855, 198, 25598, 220, 220, 220, 1058, 7643, 14, 1238, 14, 5539, 198, 5956, 4296, 25, 7816, 14, 2919, 14, 1238, 2...
2.120585
6,286
#!/usr/bin/python # -*- coding: utf-8 -*- # Copyright: (c) 2015, Nate Coraor <nate@coraor.org> # GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) from __future__ import absolute_import, division, print_function __metaclass__ = type DOCUMENTATION = r''' --- module: zfs_delega...
[ 2, 48443, 14629, 14, 8800, 14, 29412, 198, 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 198, 2, 15069, 25, 357, 66, 8, 1853, 11, 23486, 2744, 64, 273, 1279, 77, 378, 31, 66, 5799, 273, 13, 2398, 29, 198, 2, ...
2.99245
1,192
#Funções '''' =========================================== def equacao_reta(x): y_x = 2 * x + 1 return y_x x = float(input("Entre com o valor a ser calculado para y(x) = 2x+1: ")) resultado = equacao_reta(x) print("O resultado encontrado foi Y = %.0f" %resultado) ============================================ ''...
[ 2, 24629, 16175, 127, 113, 274, 198, 39115, 198, 10052, 2559, 18604, 198, 198, 4299, 1602, 330, 5488, 62, 1186, 64, 7, 87, 2599, 198, 220, 220, 220, 331, 62, 87, 796, 362, 1635, 2124, 1343, 352, 198, 220, 220, 220, 1441, 331, 62, ...
2.170732
246
from typing import Tuple, cast from ..base import BaseFile from .part import BlockingParts from ...models.file import ( FileModel, UploadUrlModel, FileDeleteModel, PartCancelModel ) from ...settings import DownloadSettings, CopyFileSettings from ...exceptions import AwaitingOnly from ...utils impo...
[ 6738, 19720, 1330, 309, 29291, 11, 3350, 198, 198, 6738, 11485, 8692, 1330, 7308, 8979, 198, 198, 6738, 764, 3911, 1330, 1086, 8629, 42670, 198, 198, 6738, 2644, 27530, 13, 7753, 1330, 357, 198, 220, 220, 220, 9220, 17633, 11, 198, 22...
3.5
110
from tests.cli import make_client, run_cmd from tests.util import answers
[ 6738, 5254, 13, 44506, 1330, 787, 62, 16366, 11, 1057, 62, 28758, 198, 6738, 5254, 13, 22602, 1330, 7429, 628, 628, 628 ]
3.590909
22
# Imports import numpy as np import os import json import sys # noinspection PyPep8Naming from scipy.spatial.transform import Rotation # This class converts AMASS SMPLH .npz body animation files into Unity-readable .json files. # See AMASSConverterExamples file for an example on how to use this class. if __name__ ...
[ 2, 1846, 3742, 198, 11748, 299, 32152, 355, 45941, 198, 11748, 28686, 198, 11748, 33918, 198, 11748, 25064, 198, 2, 645, 1040, 14978, 9485, 47, 538, 23, 45, 3723, 198, 6738, 629, 541, 88, 13, 2777, 34961, 13, 35636, 1330, 371, 14221, ...
3.254717
106
from InterpreteF2.NodoAST import NodoArbol from InterpreteF2.Tabla_de_simbolos import Tabla_de_simbolos from InterpreteF2.Arbol import Arbol from InterpreteF2.Valor.Valor import Valor from InterpreteF2.Primitivos.TIPO import TIPO from InterpreteF2.Primitivos.COMPROBADOR_deTipos import COMPROBADOR_deTipos from Interpret...
[ 6738, 4225, 3866, 660, 37, 17, 13, 45, 24313, 11262, 1330, 399, 24313, 3163, 28984, 198, 6738, 4225, 3866, 660, 37, 17, 13, 33349, 5031, 62, 2934, 62, 82, 14107, 349, 418, 1330, 16904, 5031, 62, 2934, 62, 82, 14107, 349, 418, 198, ...
2.52
175
# coding: utf-8 import sys import os sys.path.insert(1, os.path.join(sys.path[0], '..')) from strtodate import strtodate
[ 2, 19617, 25, 3384, 69, 12, 23, 198, 11748, 25064, 198, 11748, 28686, 198, 17597, 13, 6978, 13, 28463, 7, 16, 11, 28686, 13, 6978, 13, 22179, 7, 17597, 13, 6978, 58, 15, 4357, 705, 492, 6, 4008, 198, 6738, 965, 83, 375, 378, 133...
2.44
50
# -------------------------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. # --------------------------------------------------------------------...
[ 2, 16529, 1783, 10541, 198, 2, 15069, 357, 66, 8, 5413, 10501, 13, 1439, 2489, 10395, 13, 198, 2, 49962, 739, 262, 17168, 13789, 13, 4091, 13789, 13, 14116, 287, 262, 1628, 6808, 329, 5964, 1321, 13, 198, 2, 16529, 1783, 10541, 198,...
2.776325
2,982
if __name__ == '__main__': math()
[ 198, 198, 361, 11593, 3672, 834, 6624, 705, 834, 12417, 834, 10354, 198, 220, 220, 220, 10688, 3419, 198 ]
2.105263
19
#! /usr/bin/env python3 import csv import json import os import pathlib import sys import numpy as np import cairo import argparse import layout from draw_card import drawCard from card_model import CardModel from card_model import CardDeck def extant_file(x): """ 'Type' for argparse - checks that file ex...
[ 2, 0, 1220, 14629, 14, 8800, 14, 24330, 21015, 18, 198, 11748, 269, 21370, 198, 11748, 33918, 198, 11748, 28686, 198, 11748, 3108, 8019, 198, 11748, 25064, 198, 11748, 299, 32152, 355, 45941, 198, 198, 11748, 1275, 7058, 198, 11748, 182...
2.44811
1,667
import unittest from shmakovpn.extend_builtins import ExtendedDict from functools import reduce from typing import List, Dict, Any class TestGroupByExtendedDict(unittest.TestCase): """ This class contains tests of **groupby** using **ExtendedDict** """ data: List[Dict[str, Any]] = [ ...
[ 11748, 555, 715, 395, 201, 198, 6738, 427, 76, 44715, 21999, 13, 2302, 437, 62, 18780, 1040, 1330, 24204, 35, 713, 201, 198, 6738, 1257, 310, 10141, 1330, 4646, 201, 198, 6738, 19720, 1330, 7343, 11, 360, 713, 11, 4377, 201, 198, 20...
1.861436
599
{ 'variables': { 'project_name': 'examples', 'current_dir': '<(DEPTH)', }, 'targets': [ { 'target_name': 'basic_sample', 'type': 'executable', 'dependencies': [ '<(current_dir)/src/macia.gyp:macia', ], 'sources': [ 'basic_sample.cc', ], 'includ...
[ 90, 198, 220, 705, 25641, 2977, 10354, 1391, 198, 220, 220, 220, 705, 16302, 62, 3672, 10354, 705, 1069, 12629, 3256, 198, 220, 220, 220, 705, 14421, 62, 15908, 10354, 705, 27, 7, 46162, 4221, 8, 3256, 198, 220, 8964, 198, 220, 705,...
1.815686
510
from azure.cognitiveservices.language.luis.authoring import LUISAuthoringClient from msrest.authentication import CognitiveServicesCredentials import datetime, json, os, time authoring_key = "bde233f61f5e4e3fa48ff5a11b0f304c" region = "westus" endpoint = "https://{}.api.cognitive.microsoft.com".format(region) # ...
[ 198, 6738, 35560, 495, 13, 66, 2360, 20288, 712, 1063, 13, 16129, 13, 2290, 271, 13, 9800, 278, 1330, 50168, 1797, 13838, 278, 11792, 198, 6738, 13845, 2118, 13, 41299, 3299, 1330, 38655, 31007, 34, 445, 14817, 198, 198, 11748, 4818, ...
2.972789
147
# Copyright 2020 Silicon Compiler Authors. All Rights Reserved. import siliconcompiler import pytest @pytest.fixture ################################## def test_minimum(chip): '''API test for min/max() methods ''' flow = chip.get('option', 'flow') N = len(chip.getkeys('flowgraph', flow , 'syn')) ...
[ 2, 15069, 12131, 18210, 3082, 5329, 46665, 13, 1439, 6923, 33876, 13, 198, 11748, 29867, 5589, 5329, 198, 11748, 12972, 9288, 198, 198, 31, 9078, 9288, 13, 69, 9602, 198, 198, 29113, 2235, 198, 4299, 1332, 62, 39504, 7, 35902, 2599, 1...
2.703349
209
import torch.utils.data as ut import torch import cPickle as cp import numpy as np from utils import Progbar, getdata from model import Word2vec from torch.autograd import Variable import torch.optim as optim from constants import * use_cuda = torch.cuda.is_available() data = filter(lambda x: len(x) > 1, open(TEXT).r...
[ 11748, 28034, 13, 26791, 13, 7890, 355, 3384, 198, 11748, 28034, 198, 11748, 269, 31686, 293, 355, 31396, 198, 11748, 299, 32152, 355, 45941, 198, 6738, 3384, 4487, 1330, 1041, 70, 5657, 11, 651, 7890, 198, 6738, 2746, 1330, 9678, 17, ...
2.305828
1,527
import LevelBuilder from sprites import *
[ 11748, 5684, 32875, 198, 6738, 42866, 1330, 1635 ]
5.125
8
from typing import Dict, List import pickle import numpy as np def predict_song(neighbors: Dict[str, List[int]]) -> Dict[str, List[int]]: """predict the ranks of song ids for each hum given its retrieved song neighbors The most importance job is choose the first place song The rules are, given o...
[ 6738, 19720, 1330, 360, 713, 11, 7343, 201, 198, 11748, 2298, 293, 201, 198, 201, 198, 11748, 299, 32152, 355, 45941, 201, 198, 201, 198, 201, 198, 4299, 4331, 62, 34050, 7, 710, 394, 32289, 25, 360, 713, 58, 2536, 11, 7343, 58, 6...
2.026529
3,091
def count_parameters(model, verbose=True): """Count number of parameters in PyTorch model, References: https://discuss.pytorch.org/t/how-do-i-check-the-number-of-parameters-of-a-model/4325/7. from utils.utils import count_parameters count_parameters(model) import sys sys.exit(1) """ n_a...
[ 4299, 954, 62, 17143, 7307, 7, 19849, 11, 15942, 577, 28, 17821, 2599, 198, 220, 220, 220, 37227, 12332, 1271, 286, 10007, 287, 9485, 15884, 354, 2746, 11, 198, 220, 220, 220, 31458, 25, 3740, 1378, 15410, 1046, 13, 9078, 13165, 354, ...
2.502146
233
# -*- coding: utf-8; -*- from httpolice import request, response from httpolice.blackboard import Blackboard from httpolice.known import st def complaint_box(*args, **kwargs): """Create an empty exchange that only carries a single notice. This is used (for example, in :mod:`httpolice.framing1`) to repo...
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 26, 532, 9, 12, 198, 198, 6738, 2638, 349, 501, 1330, 2581, 11, 2882, 198, 6738, 2638, 349, 501, 13, 13424, 3526, 1330, 2619, 3526, 198, 6738, 2638, 349, 501, 13, 4002, 1330, 336, 628,...
2.697222
360
import urllib import cv2 import numpy as np import os create_pos_n_neg()
[ 11748, 2956, 297, 571, 198, 11748, 269, 85, 17, 198, 11748, 299, 32152, 355, 45941, 198, 11748, 28686, 628, 198, 17953, 62, 1930, 62, 77, 62, 12480, 3419 ]
2.642857
28
# Set creds and headers era_user = '@@{era_creds.username}@@' era_pass = '@@{era_creds.secret}@@' headers = {'Content-Type': 'application/json', 'Accept': 'application/json'} # Get Software Profile ID url = "https://@@{era_ip}@@:8443/era/v0.8/profiles?type=Software&name=@@{software_profile}@@" resp = urlreq(url, v...
[ 2, 5345, 2600, 82, 290, 24697, 198, 8607, 62, 7220, 796, 705, 12404, 90, 8607, 62, 66, 445, 82, 13, 29460, 92, 12404, 6, 198, 8607, 62, 6603, 796, 705, 12404, 90, 8607, 62, 66, 445, 82, 13, 21078, 92, 12404, 6, 198, 50145, 796, ...
2.561972
710
## Shorty ## Copyright 2009 Joshua Roesslein ## See LICENSE ## @url short.to
[ 2235, 10073, 88, 198, 2235, 15069, 3717, 20700, 5564, 408, 33663, 198, 2235, 4091, 38559, 24290, 198, 198, 2235, 2488, 6371, 1790, 13, 1462, 628 ]
3.16
25
#!/usr/bin/env python import subprocess import requests import json import time import logging try: from Queue import Queue except: from queue import Queue from threading import Thread, RLock _LOG = logging.getLogger(__name__) _LOG.setLevel(logging.DEBUG) _lh = logging.StreamHandler() _lh.setFormatter(logging.F...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 11748, 850, 14681, 198, 11748, 7007, 198, 11748, 33918, 198, 11748, 640, 198, 11748, 18931, 198, 28311, 25, 198, 220, 220, 220, 422, 4670, 518, 1330, 4670, 518, 198, 16341, 25, 198, 22...
2.37543
3,492
from cassandra.cluster import Cluster from cassandra.cqlengine import connection from cassandra.cqlengine.management import sync_table from coins import Coin CQLENG_ALLOW_SCHEMA_MANAGEMENT='CQLENG_ALLOW_SCHEMA_MANAGEMENT' cluster=Cluster() connection.setup(['127.0.0.1'], "cassy", protocol_version=3) class CoinPrice a...
[ 6738, 30606, 15918, 13, 565, 5819, 1330, 38279, 198, 6738, 30606, 15918, 13, 66, 13976, 18392, 1330, 4637, 198, 6738, 30606, 15918, 13, 66, 13976, 18392, 13, 27604, 1330, 17510, 62, 11487, 198, 6738, 10796, 1330, 16312, 198, 34, 9711, 2...
3.175758
495
# -*- coding: utf-8 -*- from __future__ import absolute_import from __future__ import division from __future__ import print_function from __future__ import unicode_literals from future import standard_library standard_library.install_aliases() from builtins import * from genestack_client import Application, FilesUtil,...
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 198, 6738, 11593, 37443, 834, 1330, 4112, 62, 11748, 198, 6738, 11593, 37443, 834, 1330, 7297, 198, 6738, 11593, 37443, 834, 1330, 3601, 62, 8818, 198, 6738, 11593, 37443,...
3.65625
96
#!/usr/bin/env python3 from pwn import * context.update(arch = 'amd64', os = 'linux', log_level = 'info') target = ELF('./target', checksec=False) libc_2_24_so = ELF('./libc-2.24.so', checksec=False) __libc_csu_init = 0x400840 __libc_csu_init_call_target = 0x400e48 __libc_csu_init_gadget1 = 0x400896 __libc_csu_init_g...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 18, 198, 6738, 279, 675, 1330, 1635, 198, 22866, 13, 19119, 7, 998, 796, 705, 28745, 2414, 3256, 28686, 796, 705, 23289, 3256, 2604, 62, 5715, 796, 705, 10951, 11537, 198, 198, 16793, 796, ...
1.201777
10,690
import inspect from bs4 import BeautifulSoup from typing import Optional, Union from ._settings import HEADERS from ._schema import DefaultSchema from ._utils import clean_vulgar_fraction, clean_unicode class AllRecipes(DefaultSchema): """ """ @classmethod def __init__(self, url: str, headers: Opti...
[ 11748, 10104, 198, 6738, 275, 82, 19, 1330, 23762, 50, 10486, 198, 6738, 19720, 1330, 32233, 11, 4479, 198, 198, 6738, 47540, 33692, 1330, 39837, 4877, 198, 6738, 47540, 15952, 2611, 1330, 15161, 27054, 2611, 198, 6738, 47540, 26791, 1330...
2.135472
1,122
import sys import re import doctest import manuel.doctest import manuel.codeblock import manuel.testing import unittest if sys.version_info[0] < 3: # Just don't do them under Python 3. # Sigh. if __name__ == '__main__': unittest.TextTestRunner().run(additional_tests())
[ 11748, 25064, 198, 11748, 302, 198, 11748, 10412, 395, 198, 11748, 582, 2731, 13, 4598, 310, 395, 198, 11748, 582, 2731, 13, 8189, 9967, 198, 11748, 582, 2731, 13, 33407, 198, 11748, 555, 715, 395, 628, 198, 361, 25064, 13, 9641, 62, ...
2.76699
103
import pandas as pd from sklearn.linear_model import LogisticRegression from sklearn.model_selection import train_test_split from sklearn.preprocessing import StandardScaler import psycopg2 from sqlalchemy import create_engine from config import db_password #data from: https://www.kaggle.com/malapatiravi/graduate-scho...
[ 11748, 19798, 292, 355, 279, 67, 198, 6738, 1341, 35720, 13, 29127, 62, 19849, 1330, 5972, 2569, 8081, 2234, 198, 6738, 1341, 35720, 13, 19849, 62, 49283, 1330, 4512, 62, 9288, 62, 35312, 198, 6738, 1341, 35720, 13, 3866, 36948, 1330, ...
3.365385
104
from mesa.visualization.ModularVisualization import ModularServer from mesa.visualization.modules import CanvasGrid from mesa.visualization.UserParam import UserSettableParameter from mesa.visualization.modules import ChartModule from .model import CivilViolenceModel from .agent import Citizen, Cop COP_COLOR = "Blac...
[ 6738, 18842, 64, 13, 41464, 1634, 13, 5841, 934, 36259, 1634, 1330, 3401, 934, 10697, 198, 6738, 18842, 64, 13, 41464, 1634, 13, 18170, 1330, 1680, 11017, 41339, 198, 6738, 18842, 64, 13, 41464, 1634, 13, 12982, 22973, 1330, 11787, 50, ...
2.090909
1,023
import json from elasticsearch import Elasticsearch from tube.etl.outputs.es.timestamp import ( putting_timestamp, get_latest_utc_transaction_time, ) from tube.etl.outputs.es.versioning import Versioning from tube.etl.plugins import post_process_plugins, add_auth_resource_path_mapping from tube.etl.spark_base...
[ 11748, 33918, 198, 198, 6738, 27468, 12947, 1330, 48567, 12947, 198, 198, 6738, 12403, 13, 316, 75, 13, 22915, 82, 13, 274, 13, 16514, 27823, 1330, 357, 198, 220, 220, 220, 5137, 62, 16514, 27823, 11, 198, 220, 220, 220, 651, 62, 42...
3.055118
127
import math from classes.dataframes import * import numpy as np # class Utility: # # def __init__(self): # self.Data = Dataframes() # self.df_orders = self.Data.get_df_orders() # self.grid_rows = self.Data.grid_row # self.grid_cols = self.Data.grid_col # self.df_wrhs = self...
[ 11748, 10688, 198, 6738, 6097, 13, 7890, 37805, 1330, 1635, 198, 11748, 299, 32152, 355, 45941, 628, 198, 2, 1398, 34030, 25, 198, 2, 198, 2, 220, 220, 220, 220, 825, 11593, 15003, 834, 7, 944, 2599, 198, 2, 220, 220, 220, 220, 22...
2.171429
210
from typing import Dict, List, Union from sqlalchemy.dialects.postgresql import ENUM from db import db from models.model_mixin import ModelMixin ActorJSON = Dict[str, Union[int, str, List[str]]] gender_enum = ENUM("Male", "Female", name="gender") class ActorModel(db.Model, ModelMixin): """SQLAlchemy ...
[ 6738, 19720, 1330, 360, 713, 11, 7343, 11, 4479, 201, 198, 6738, 44161, 282, 26599, 13, 38969, 478, 82, 13, 7353, 34239, 13976, 1330, 12964, 5883, 201, 198, 6738, 20613, 1330, 20613, 201, 198, 6738, 4981, 13, 19849, 62, 19816, 259, 13...
2.503968
252
#!/usr/bin/env spcli # this command runs hierarchical FST comparison from seqpy import cout, cerr from seqpy.cmds import arg_parser from seqpy.core.bioio import tabparser import itertools import allel
[ 2, 48443, 14629, 14, 8800, 14, 24330, 599, 44506, 198, 198, 2, 428, 3141, 4539, 38958, 376, 2257, 7208, 198, 198, 6738, 33756, 9078, 1330, 42304, 11, 269, 8056, 198, 6738, 33756, 9078, 13, 28758, 82, 1330, 1822, 62, 48610, 198, 6738, ...
3.166667
66
import argparse import csv import logging import random import numpy as np import nibabel as nib from pathlib import Path if __name__ == "__main__": logging.basicConfig(format='%(asctime)s | %(name)-4s | %(levelname)-4s | %(message)s', level=logging.INFO, datefmt='%Y-%m-%d %H:%M:%S') ...
[ 11748, 1822, 29572, 198, 11748, 269, 21370, 198, 11748, 18931, 198, 11748, 4738, 198, 11748, 299, 32152, 355, 45941, 198, 11748, 33272, 9608, 355, 33272, 198, 6738, 3108, 8019, 1330, 10644, 628, 628, 198, 361, 11593, 3672, 834, 6624, 366,...
2.288462
156
from base import LeetCodeProblem class Problem(LeetCodeProblem): # for behaviours other than exact match between solution output and expected output # see # Testers in README.md """ https://leetcode.com/problems/super-ugly-number/ # first attempt: ## invariant since all prime factor of SU...
[ 6738, 2779, 1330, 1004, 316, 10669, 40781, 628, 198, 4871, 20647, 7, 3123, 316, 10669, 40781, 2599, 198, 220, 220, 220, 1303, 329, 38975, 584, 621, 2748, 2872, 1022, 4610, 5072, 290, 2938, 5072, 198, 220, 220, 220, 1303, 766, 1303, 30...
3.226316
190
import networkx.algorithms.operators.tests.test_all import pytest from graphscope.nx.utils.compat import import_as_graphscope_nx import_as_graphscope_nx(networkx.algorithms.operators.tests.test_all, decorators=pytest.mark.usefixtures("graphscope_session")) @pytest.mark.skip(reason="not suppo...
[ 11748, 3127, 87, 13, 282, 7727, 907, 13, 3575, 2024, 13, 41989, 13, 9288, 62, 439, 198, 11748, 12972, 9288, 198, 198, 6738, 4823, 29982, 13, 77, 87, 13, 26791, 13, 5589, 265, 1330, 1330, 62, 292, 62, 34960, 29982, 62, 77, 87, 198,...
2.795349
215
import os
[ 198, 11748, 28686, 198 ]
2.75
4
import numpy as np import pandas as pd import gzip import sys from collections import Counter import os DATA_DIR = "../data/" if not os.path.exists(DATA_DIR): os.makedirs(DATA_DIR)
[ 11748, 299, 32152, 355, 45941, 198, 11748, 19798, 292, 355, 279, 67, 198, 11748, 308, 13344, 198, 11748, 25064, 198, 6738, 17268, 1330, 15034, 198, 11748, 28686, 198, 198, 26947, 62, 34720, 796, 366, 40720, 7890, 30487, 198, 198, 361, 4...
2.690141
71
#!/usr/bin/env python # coding: utf-8 # In[17]: import numpy as np from numpy import linalg as LA dimension=2 #次元を指定する v=randomnumber(dimension) e=np.zeros((dimension,dimension),dtype='float64')#エルミット演算子を生成する単位ベクトル u=getu(dimension) print(u) for c in range(0,dimension): e[c]=u[c]/LA.norm(u[c],2)#·ord=2...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 2, 19617, 25, 3384, 69, 12, 23, 198, 198, 2, 554, 58, 1558, 5974, 628, 198, 11748, 299, 32152, 355, 45941, 198, 6738, 299, 32152, 1330, 300, 1292, 70, 355, 9131, 628, 198, 46156, 2...
1.694387
481
import json import io
[ 11748, 33918, 198, 11748, 33245, 628 ]
3.833333
6
import json import os import random import requests from django_project import settings from django.http import HttpResponse, JsonResponse from messenger.utils.response.ResponseTypes.QuickReplyResponse import QuickReplyResponse from messenger.utils.response.ResponseTypes.TextResponse import TextResponse from django.c...
[ 11748, 33918, 198, 11748, 28686, 198, 11748, 4738, 198, 198, 11748, 7007, 198, 6738, 42625, 14208, 62, 16302, 1330, 6460, 198, 6738, 42625, 14208, 13, 4023, 1330, 367, 29281, 31077, 11, 449, 1559, 31077, 198, 198, 6738, 31228, 13, 26791, ...
2.309073
2,061
# coding: utf-8 import os from urllib.request import urlopen import pytest from selenium.webdriver import Firefox, ActionChains from selenium.webdriver.common.by import By from selenium.webdriver.firefox.options import Options from selenium.webdriver.support.expected_conditions import staleness_of from selenium.webdr...
[ 2, 19617, 25, 3384, 69, 12, 23, 198, 198, 11748, 28686, 198, 6738, 2956, 297, 571, 13, 25927, 1330, 19016, 9654, 198, 198, 11748, 12972, 9288, 198, 6738, 384, 11925, 1505, 13, 12384, 26230, 1330, 16802, 11, 7561, 1925, 1299, 198, 6738...
2.939535
215
import pandas as pd from sklearn.cluster import KMeans import numpy as np import matplotlib.pyplot as plt from datetime import datetime, date, time, timedelta import re import pickle import time as tm df = pd.read_csv("bitcoin_auto.csv", dtype={"COMPOUND": float}) df = df.drop_duplicates() # print(df.he...
[ 201, 198, 11748, 19798, 292, 355, 279, 67, 201, 198, 6738, 1341, 35720, 13, 565, 5819, 1330, 509, 5308, 504, 201, 198, 11748, 299, 32152, 355, 45941, 201, 198, 11748, 2603, 29487, 8019, 13, 9078, 29487, 355, 458, 83, 201, 198, 6738, ...
2.166448
763
from typing import Collection, Dict, Union from modules import bar from datetime import timedelta import psutil valid_fstypes = ["ntfs", "ext4", "ext3"] def get_pc_status() -> Union[Dict[str, str], Dict[str, dict], Dict[str, str]]: """With the help of the psutil module, scanns the PC for information about all the ...
[ 6738, 19720, 1330, 12251, 11, 360, 713, 11, 4479, 198, 6738, 13103, 1330, 2318, 198, 6738, 4818, 8079, 1330, 28805, 12514, 198, 11748, 26692, 22602, 198, 12102, 62, 69, 301, 9497, 796, 14631, 429, 9501, 1600, 366, 2302, 19, 1600, 366, ...
2.314738
1,201
#!/usr/bin/env python # -*- coding:utf-8 -*- # Author: wxnacy@gmail.com """ """ import os import json import yaml
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 2, 532, 9, 12, 19617, 25, 40477, 12, 23, 532, 9, 12, 198, 2, 6434, 25, 266, 87, 77, 1590, 31, 14816, 13, 785, 198, 37811, 198, 198, 37811, 198, 198, 11748, 28686, 198, 11748, 339...
2.32
50
import sys if __name__ == '__main__': main()
[ 198, 11748, 25064, 628, 198, 198, 361, 11593, 3672, 834, 6624, 705, 834, 12417, 834, 10354, 198, 220, 220, 220, 1388, 3419, 628, 628, 628, 628, 198 ]
2.259259
27
from .domain import * from .common import *
[ 6738, 764, 27830, 1330, 1635, 198, 6738, 764, 11321, 1330, 1635, 198 ]
3.666667
12
import os import urllib
[ 11748, 28686, 198, 11748, 2956, 297, 571, 628 ]
3.125
8