content
stringlengths
1
1.04M
input_ids
listlengths
1
774k
ratio_char_token
float64
0.38
22.9
token_count
int64
1
774k
# #------------------------------------------------------------------------------ # Copyright (c) 2013-2014, Christian Therien # # 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 # # h...
[ 2, 201, 198, 2, 10097, 26171, 201, 198, 2, 15069, 357, 66, 8, 2211, 12, 4967, 11, 4302, 12634, 2013, 201, 198, 2, 201, 198, 2, 49962, 739, 262, 24843, 13789, 11, 10628, 362, 13, 15, 357, 1169, 366, 34156, 15341, 201, 198, 2, 345...
3.492481
266
#!/usr/bin/env python # -*- coding: ASCII -*- """ Merge/Adapter trim reads stored in BAM :Author: Martin Kircher :Contact: mkircher@uw.edu """ import sys import os import math import pysam from optparse import OptionParser,OptionGroup import string table = string.maketrans('TGCAMRWSYKVHDBtgcamrwsykvhdb','ACGTKYWSR...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 2, 532, 9, 12, 19617, 25, 37101, 532, 9, 12, 198, 198, 37811, 198, 198, 13102, 469, 14, 47307, 15797, 9743, 8574, 287, 347, 2390, 198, 198, 25, 13838, 25, 5780, 509, 1980, 372, 198...
2.358127
7,690
# 295. Find Median from Data Stream # Runtime: 2710 ms, faster than 5.93% of Python3 online submissions for Find Median from Data Stream. # Memory Usage: 35.4 MB, less than 94.61% of Python3 online submissions for Find Median from Data Stream. import bisect # Insertion Sort # Your MedianFinder object will be ...
[ 2, 34772, 13, 9938, 26178, 422, 6060, 13860, 198, 198, 2, 43160, 25, 2681, 940, 13845, 11, 5443, 621, 642, 13, 6052, 4, 286, 11361, 18, 2691, 22129, 329, 9938, 26178, 422, 6060, 13860, 13, 198, 198, 2, 14059, 29566, 25, 3439, 13, ...
3.430894
123
import base64 from io import StringIO with open('f:/a/a.txt','r') as fi: fo = StringIO() base64.encode(fi,fo) print(fo.getvalue())
[ 11748, 2779, 2414, 198, 6738, 33245, 1330, 10903, 9399, 198, 4480, 1280, 10786, 69, 14079, 64, 14, 64, 13, 14116, 41707, 81, 11537, 355, 25912, 25, 198, 220, 220, 220, 220, 220, 11511, 796, 10903, 9399, 3419, 198, 220, 220, 220, 220, ...
2.242424
66
from django.conf import settings from django.core.exceptions import ImproperlyConfigured from django.utils.translation import get_language, to_locale from livesettings import config_value from satchmo_utils.numbers import trunc_decimal import locale import logging log = logging.getLogger('l10n.utils') #backport from...
[ 6738, 42625, 14208, 13, 10414, 1330, 6460, 198, 6738, 42625, 14208, 13, 7295, 13, 1069, 11755, 1330, 12205, 525, 306, 16934, 1522, 198, 6738, 42625, 14208, 13, 26791, 13, 41519, 1330, 651, 62, 16129, 11, 284, 62, 17946, 1000, 198, 6738,...
2.35511
1,546
# #1.3: Design an algorithm and write code to remove the duplicate characters in a string without using any additional buffer. #NOTE: one or two additional variables are fine. An extra copy of the array is not. # myString = "hubba bubba bubble tape" noDuplicates = [] for letter in myString: if letter not in noDup...
[ 2, 198, 2, 16, 13, 18, 25, 8495, 281, 11862, 290, 3551, 2438, 284, 4781, 262, 23418, 3435, 287, 257, 4731, 1231, 1262, 597, 3224, 11876, 13, 198, 2, 16580, 25, 530, 393, 734, 3224, 9633, 389, 3734, 13, 1052, 3131, 4866, 286, 262, ...
3.277778
126
# -*- coding: utf-8 -*- """ Created on Fri Feb 26 10:56:23 2021 @author: linca """ import time import os import numpy as np import pandas as pd if __name__=='__main__': beacon_list = [1,5,6,7,10,11,15,16,17,19,21,22,23,24,25,26,28,29,30,32,34,36,38,40,41,44,46,48] bpeace = BPeace(beacon_list) ...
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 37811, 198, 41972, 319, 19480, 3158, 2608, 838, 25, 3980, 25, 1954, 33448, 198, 198, 31, 9800, 25, 300, 1939, 64, 198, 37811, 198, 11748, 640, 198, 11748, 28686, 198, ...
2.022624
221
''' Parts from https://en.wikipedia.org/wiki/User:Ritchie333/afcbios.py, licensed CC-BY-SA-3.0 ''' import re from botbase import * titles = [] page_to_update = "Wikipedia:WikiProject Women in Red/Drafts" reMarker = re.compile("<ref.*\/ref>|{{.*}}|<!--.*-->|\'\'\'|----") reTitle = re.compile( '\(.*\)' ) header_new = "...
[ 7061, 6, 198, 42670, 422, 3740, 1378, 268, 13, 31266, 13, 2398, 14, 15466, 14, 12982, 25, 49, 48423, 20370, 14, 1878, 21101, 4267, 13, 9078, 11, 11971, 12624, 12, 17513, 12, 4090, 12, 18, 13, 15, 198, 7061, 6, 198, 198, 11748, 302...
2.636861
548
#!/usr/bin/env python # -*- coding: utf-8 -*- import json from alipay.aop.api.constant.ParamConstants import *
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 11748, 33918, 198, 198, 6738, 435, 541, 323, 13, 64, 404, 13, 15042, 13, 9979, 415, 13, 22973, 34184, 1187, 1330, 163...
2.446809
47
"""``runway gen-sample k8s-flux-repo`` command.""" import logging import shutil import sys from typing import Any # pylint: disable=W import click from ... import options from .utils import TEMPLATES, convert_gitignore, copy_sample, write_tfstate_template if sys.version_info.major > 2: from pathlib import Path ...
[ 37811, 15506, 5143, 1014, 2429, 12, 39873, 479, 23, 82, 12, 69, 22564, 12, 260, 7501, 15506, 3141, 526, 15931, 198, 11748, 18931, 198, 11748, 4423, 346, 198, 11748, 25064, 198, 6738, 19720, 1330, 4377, 220, 1303, 279, 2645, 600, 25, 1...
2.402242
803
from Werewolf.agents.AgentPlayer import AgentPlayer; from Werewolf.game.actions.Vote import Vote; from Shared.enums.AgentTypeEnum import AgentTypeEnum; import random;
[ 6738, 40261, 13, 49638, 13, 36772, 14140, 1330, 15906, 14140, 26, 198, 6738, 40261, 13, 6057, 13, 4658, 13, 37394, 1330, 19175, 26, 198, 198, 6738, 39403, 13, 268, 5700, 13, 36772, 6030, 4834, 388, 1330, 15906, 6030, 4834, 388, 26, 19...
3.595745
47
from ..internal.utils.importlib import func_name # noqa from ..internal.utils.importlib import module_name # noqa from ..internal.utils.importlib import require_modules # noqa
[ 6738, 11485, 32538, 13, 26791, 13, 11748, 8019, 1330, 25439, 62, 3672, 220, 1303, 645, 20402, 198, 6738, 11485, 32538, 13, 26791, 13, 11748, 8019, 1330, 8265, 62, 3672, 220, 1303, 645, 20402, 198, 6738, 11485, 32538, 13, 26791, 13, 1174...
3.509804
51
from datetime import datetime from getCryptocurrencyRate import CryptoCurrencyRate product = "BTC_JPY" # ["BTC_JPY", "XRP_JPY", "ETH_JPY", "XTZ_JPY", "XLM_JPY", "XEM_JPY", "BAT_JPY", "ETC_JPY", "LTC_JPY", "BCH_JPY", "MONA_JPY", "LSK_JPY"] scale = "hour" # ["hour","day","week","month","year"] res = CryptoCurrencyRate...
[ 6738, 4818, 8079, 1330, 4818, 8079, 198, 198, 6738, 651, 23919, 420, 13382, 32184, 1330, 36579, 34, 13382, 32184, 198, 198, 11167, 796, 366, 35964, 62, 12889, 56, 1, 198, 2, 14631, 35964, 62, 12889, 56, 1600, 366, 55, 20031, 62, 12889...
2.229452
292
nombres_magos = ['Luis', 'Pedro', 'Antonio'] show_magicians(nombres_magos) print("\nGrandes Magos:") great_magicians = make_great(nombres_magos[:]) show_magicians(great_magicians) print("\nMagos Originales:") show_magicians(nombres_magos)
[ 198, 77, 2381, 411, 62, 19726, 418, 796, 37250, 25596, 271, 3256, 705, 43468, 305, 3256, 705, 13217, 261, 952, 20520, 198, 12860, 62, 19726, 5106, 7, 77, 2381, 411, 62, 19726, 418, 8, 198, 198, 4798, 7203, 59, 77, 23581, 274, 2944, ...
2.372549
102
from decimal import Decimal from typing import ( Any, Dict, Optional, ) import asyncio from hummingbot.core.event.events import ( OrderType, TradeType ) from hummingbot.connector.in_flight_order_base import InFlightOrderBase from .altmarkets_constants import Constants s_decimal_0 = Decimal(0)
[ 6738, 32465, 1330, 4280, 4402, 198, 6738, 19720, 1330, 357, 198, 220, 220, 220, 4377, 11, 198, 220, 220, 220, 360, 713, 11, 198, 220, 220, 220, 32233, 11, 198, 8, 198, 11748, 30351, 952, 198, 6738, 41465, 13645, 13, 7295, 13, 15596,...
2.925926
108
from subprocess import call import shutil import os from Converter import ( UrlConverter, LinkConverter ) # import config import json import logging
[ 6738, 850, 14681, 1330, 869, 198, 11748, 4423, 346, 198, 11748, 28686, 198, 6738, 35602, 353, 1330, 357, 8799, 75, 3103, 332, 353, 11, 7502, 3103, 332, 353, 1267, 198, 2, 1330, 4566, 198, 11748, 33918, 198, 11748, 18931, 198 ]
3.725
40
"""oai.py module.""" import json import logging from typing import Iterator, Optional import smart_open from sickle import Sickle from sickle.models import Record logger = logging.getLogger(__name__)
[ 37811, 78, 1872, 13, 9078, 8265, 526, 15931, 198, 11748, 33918, 198, 11748, 18931, 198, 6738, 19720, 1330, 40806, 1352, 11, 32233, 198, 198, 11748, 4451, 62, 9654, 198, 6738, 6639, 293, 1330, 32181, 293, 198, 6738, 6639, 293, 13, 27530,...
3.416667
60
f=open("./level_def.txt","r") lines = f.readlines() idx=0 level_id=1 for line in lines: if idx % 16 == 0: fo = open("level/level-%i.txt" % level_id, "w") fo.write("%s" %(line)) if idx % 16 == 15: fo.close() level_id+=1 idx+=1
[ 69, 28, 9654, 7, 1911, 14, 5715, 62, 4299, 13, 14116, 2430, 81, 4943, 198, 6615, 796, 277, 13, 961, 6615, 3419, 198, 312, 87, 28, 15, 198, 5715, 62, 312, 28, 16, 198, 1640, 1627, 287, 3951, 25, 198, 220, 220, 220, 611, 4686, 8...
1.886525
141
from dagster_graphql.test.utils import execute_dagster_graphql from dagster.core.instance import DagsterInstance from .execution_queries import START_PIPELINE_EXECUTION_QUERY from .setup import define_test_context, get_retry_multi_execution_params, retry_config NON_PERSISTENT_INTERMEDIATES_ERROR = ( 'Cannot perf...
[ 6738, 48924, 1706, 62, 34960, 13976, 13, 9288, 13, 26791, 1330, 12260, 62, 67, 363, 1706, 62, 34960, 13976, 198, 198, 6738, 48924, 1706, 13, 7295, 13, 39098, 1330, 32167, 1706, 33384, 198, 198, 6738, 764, 18558, 1009, 62, 421, 10640, ...
3.112
125
import db_operations from user import User # from event import Event # def add_test_events(): # for i in range(5): # tmp_event = Event() # db_operations.add_event(tmp_event._date, tmp_event.getAuthInBit()) # def list_test_events(): # events = db_operations.get_events() # for event in event...
[ 11748, 20613, 62, 3575, 602, 198, 6738, 2836, 1330, 11787, 198, 2, 422, 1785, 1330, 8558, 198, 198, 2, 825, 751, 62, 9288, 62, 31534, 33529, 198, 2, 220, 220, 220, 220, 329, 1312, 287, 2837, 7, 20, 2599, 198, 2, 220, 220, 220, 2...
2.421384
159
from parcels import FieldSet, ParticleSet, ScipyParticle, JITParticle, Variable, AdvectionRK4, AdvectionRK4_3D, RectilinearZGrid, ErrorCode from parcels.field import Field, VectorField from parcels.tools.converters import TimeConverter from datetime import timedelta as delta import datetime import numpy as np import ma...
[ 6738, 49796, 1330, 7663, 7248, 11, 2142, 1548, 7248, 11, 1446, 541, 88, 7841, 1548, 11, 449, 2043, 7841, 1548, 11, 35748, 11, 1215, 303, 596, 49, 42, 19, 11, 1215, 303, 596, 49, 42, 19, 62, 18, 35, 11, 48599, 346, 259, 451, 57, ...
2.389741
2,086
""" Copyright (c) 2022 Huawei Technologies Co.,Ltd. openGauss is licensed under Mulan PSL v2. You can use this software according to the terms and conditions of the Mulan PSL v2. You may obtain a copy of Mulan PSL v2 at: http://license.coscl.org.cn/MulanPSL2 THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, W...
[ 37811, 198, 15269, 357, 66, 8, 33160, 43208, 21852, 1766, 1539, 43, 8671, 13, 198, 198, 9654, 35389, 1046, 318, 11971, 739, 17996, 272, 6599, 43, 410, 17, 13, 198, 1639, 460, 779, 428, 3788, 1864, 284, 262, 2846, 290, 3403, 286, 262...
1.927505
469
# -*- coding: utf-8 -*- # Generated by the protocol buffer compiler. DO NOT EDIT! # source: tb_paddle/proto/plugin_pr_curve.proto from google.protobuf import descriptor as _descriptor from google.protobuf import message as _message from google.protobuf import reflection as _reflection from google.protobuf import symb...
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 2, 2980, 515, 416, 262, 8435, 11876, 17050, 13, 220, 8410, 5626, 48483, 0, 198, 2, 2723, 25, 256, 65, 62, 79, 37382, 14, 1676, 1462, 14, 33803, 62, 1050, 62, 22019, ...
2.464358
982
from test.database import SurrogatePK, Model, db from sqlalchemy import Column, String,DateTime, Integer
[ 6738, 1332, 13, 48806, 1330, 4198, 3828, 378, 40492, 11, 9104, 11, 20613, 198, 6738, 44161, 282, 26599, 1330, 29201, 11, 10903, 11, 10430, 7575, 11, 34142, 198 ]
3.75
28
# -*- coding: utf-8 -*- # # Copyright 2021 Google LLC. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless requir...
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 1303, 198, 2, 15069, 33448, 3012, 11419, 13, 1439, 6923, 33876, 13, 198, 2, 198, 2, 49962, 739, 262, 24843, 13789, 11, 10628, 362, 13, 15, 357, 1169, 366, 34156, 15341, 198...
3.094891
548
import pytest from yadage.wflownode import YadageNode from yadage.tasks import packtivity_task from yadage.controllers import YadageController
[ 11748, 12972, 9288, 198, 6738, 331, 324, 496, 13, 86, 2704, 593, 1098, 1330, 41449, 496, 19667, 198, 6738, 331, 324, 496, 13, 83, 6791, 1330, 2353, 83, 3458, 62, 35943, 198, 6738, 331, 324, 496, 13, 3642, 36667, 1330, 41449, 496, 22...
3.272727
44
import numpy as np from elmo import load_elmo_context_embeddings from word_embeddings import get_w2v_word_embeddings, get_elmo_word_embeddings, get_w2v_multiword_embeddings from word2vec import get_w2v_context_embeddings_Default from utils import task_to_df import pathlib # --------------------------------------- # ---...
[ 11748, 299, 32152, 355, 45941, 198, 6738, 1288, 5908, 1330, 3440, 62, 417, 5908, 62, 22866, 62, 20521, 67, 654, 198, 6738, 1573, 62, 20521, 67, 654, 1330, 651, 62, 86, 17, 85, 62, 4775, 62, 20521, 67, 654, 11, 651, 62, 417, 5908, ...
3.141066
319
from cryptography.hazmat.backends import default_backend from cryptography.hazmat.primitives import serialization from cryptography.hazmat.primitives.asymmetric import rsa from cryptography.hazmat.primitives.asymmetric.rsa import RSAPrivateKey
[ 198, 6738, 45898, 13, 71, 1031, 6759, 13, 1891, 2412, 1330, 4277, 62, 1891, 437, 198, 6738, 45898, 13, 71, 1031, 6759, 13, 19795, 20288, 1330, 11389, 1634, 198, 6738, 45898, 13, 71, 1031, 6759, 13, 19795, 20288, 13, 4107, 3020, 19482,...
3.565217
69
import sys,os,time import argparse sys.path.append(os.getenv("MARRTINO_APPS_HOME")+"/program") import robot_cmd_ros from robot_cmd_ros import * robot_cmd_ros.use_audio = False robot_cmd_ros.tv_good = 0.5 import move # main if __name__ == "__main__": parser = argparse.ArgumentParser(description='navigator')...
[ 11748, 25064, 11, 418, 11, 2435, 198, 11748, 1822, 29572, 198, 198, 17597, 13, 6978, 13, 33295, 7, 418, 13, 1136, 24330, 7203, 40569, 14181, 46016, 62, 2969, 3705, 62, 39069, 4943, 10, 1, 14, 23065, 4943, 198, 198, 11748, 9379, 62, ...
2.581818
220
import logging from typing import Set import falcon from common.consts import HTTP_WRITE_METHODS from common.falcon_utils import auth_token from common.util import is_public from ui import BackendController
[ 11748, 18931, 198, 6738, 19720, 1330, 5345, 198, 198, 11748, 24215, 1102, 198, 198, 6738, 2219, 13, 1102, 6448, 1330, 14626, 62, 18564, 12709, 62, 49273, 50, 198, 6738, 2219, 13, 42932, 1102, 62, 26791, 1330, 6284, 62, 30001, 198, 6738,...
3.637931
58
''' Copyright 2015 Stefan Andrei Chelariu 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, soft...
[ 7061, 6, 198, 15269, 1853, 28842, 10948, 72, 11425, 2743, 84, 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...
3.892405
158
import IceRayCpp
[ 11748, 6663, 19591, 34, 381, 201, 198 ]
2.571429
7
import pandas as pd import pyttsx3 from sklearn import preprocessing from sklearn.tree import DecisionTreeClassifier,_tree import numpy as np from sklearn.model_selection import train_test_split from sklearn.model_selection import cross_val_score from sklearn.svm import SVC import csv import warnings warnings.filterw...
[ 198, 198, 11748, 19798, 292, 355, 279, 67, 198, 11748, 12972, 83, 912, 87, 18, 198, 6738, 1341, 35720, 1330, 662, 36948, 198, 6738, 1341, 35720, 13, 21048, 1330, 26423, 27660, 9487, 7483, 11, 62, 21048, 198, 11748, 299, 32152, 355, 45...
2.65365
589
import os import urllib.request PATH_OCCA = os.path.expanduser('~/work/data/OCCA/') os.makedirs(PATH_OCCA, exist_ok=True) varnames = "theta salt phihyd etan".split() ftp = "ftp://mit.ecco-group.org/ecco_for_las/OCCA_1x1_v2/2004-6/annual/" for name in varnames: fname = f"DD{name}.0406annclim.nc" url = f"{ftp...
[ 11748, 28686, 198, 11748, 2956, 297, 571, 13, 25927, 628, 198, 34219, 62, 46, 4093, 32, 796, 28686, 13, 6978, 13, 11201, 392, 7220, 10786, 93, 14, 1818, 14, 7890, 14, 46, 4093, 32, 14, 11537, 198, 418, 13, 76, 4335, 17062, 7, 3421...
2.10177
226
from distutils.core import setup from distutils.extension import Extension from Cython.Build import cythonize cec20_extension = Extension( name="cec20", sources=["cec20.pyx"], libraries=["cec20"], library_dirs=["lib"], include_dirs=["lib"], ) setup(name="cec20", ext_modules=cythonize([cec20_extensi...
[ 6738, 1233, 26791, 13, 7295, 1330, 9058, 198, 6738, 1233, 26791, 13, 2302, 3004, 1330, 27995, 198, 6738, 327, 7535, 13, 15580, 1330, 3075, 400, 261, 1096, 198, 198, 344, 66, 1238, 62, 2302, 3004, 796, 27995, 7, 198, 220, 220, 220, 1...
2.587302
126
import importlib.resources as pkg_resources import os OS_FEDORA = "fedora" OS_UBUNTU = "ubuntu" OS_MAC = "macintosh" HOME = os.environ["HOME"] RESOURCES_PATH = str(pkg_resources.path("workstation", "resources"))
[ 11748, 1330, 8019, 13, 37540, 355, 279, 10025, 62, 37540, 198, 11748, 28686, 198, 198, 2640, 62, 37, 1961, 1581, 32, 796, 366, 19082, 5799, 1, 198, 2640, 62, 10526, 4944, 51, 52, 796, 366, 32230, 1, 198, 2640, 62, 44721, 796, 366, ...
2.675
80
######## # Copyright (c) 2015 GigaSpaces Technologies Ltd. All rights reserved # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless...
[ 7804, 198, 2, 15069, 357, 66, 8, 1853, 402, 13827, 4561, 2114, 21852, 12052, 13, 1439, 2489, 10395, 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, 4...
3.444853
272
# # Copyright 2014-2016 Vinay Vasista, Ravi Teja Mullapudi, Uday Bondhugula, # and others from Multicore Computing Lab, Department of Computer Science # and Automation, Indian Institute of Science # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with ...
[ 2, 198, 2, 15069, 1946, 12, 5304, 11820, 323, 23663, 12523, 11, 371, 15820, 1665, 6592, 19574, 499, 47928, 11, 471, 820, 12812, 71, 1018, 4712, 11, 198, 2, 290, 1854, 422, 7854, 291, 382, 38589, 3498, 11, 2732, 286, 13851, 5800, 198...
3.636145
415
import unittest from simtk.openmm import * from simtk.openmm.app import * from simtk.unit import * class TestMetadynamics(unittest.TestCase): """Test the Metadynamics class""" def testHarmonicOscillator(self): """Test running metadynamics on a harmonic oscillator.""" system = System() ...
[ 11748, 555, 715, 395, 198, 6738, 985, 30488, 13, 9654, 3020, 1330, 1635, 198, 6738, 985, 30488, 13, 9654, 3020, 13, 1324, 1330, 1635, 198, 6738, 985, 30488, 13, 20850, 1330, 1635, 198, 198, 4871, 6208, 9171, 324, 4989, 873, 7, 403, ...
2.192722
742
import pytest from os import path from licensify.apply_license import apply_license_header from licensify.errors import LicensesOutOfDateError @pytest.fixture
[ 11748, 12972, 9288, 198, 198, 6738, 28686, 1330, 3108, 198, 198, 6738, 8240, 1958, 13, 39014, 62, 43085, 1330, 4174, 62, 43085, 62, 25677, 198, 6738, 8240, 1958, 13, 48277, 1330, 10483, 4541, 7975, 5189, 10430, 12331, 198, 198, 31, 9078...
3.521739
46
import xml.etree.ElementTree as ET import sys import os import re newLine = re.compile(r"^\n\s+") NS = {'mods': 'http://www.loc.gov/mods/v3'} fileName = os.path.splitext(sys.argv[1])[0] pull(fileName)
[ 11748, 35555, 13, 316, 631, 13, 20180, 27660, 355, 12152, 198, 11748, 25064, 198, 11748, 28686, 198, 11748, 302, 198, 198, 3605, 13949, 796, 302, 13, 5589, 576, 7, 81, 1, 61, 59, 77, 59, 82, 10, 4943, 198, 8035, 796, 1391, 6, 2412...
2.255556
90
#!/usr/bin/env python3 import socket import sys import threading import mmonitor #print('esqueci de fazer o exercicio 2A') t = threading.Thread(target=mmonitor.Console) t.start() porta = int(input('Porta para ouvir sensores: ')) s = socket.socket(socket.AF_INET, socket.SOCK_STREAM) try: s.bind(('', porta)) excep...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 18, 198, 11748, 17802, 198, 11748, 25064, 198, 11748, 4704, 278, 198, 11748, 285, 41143, 198, 198, 2, 4798, 10786, 274, 421, 721, 72, 390, 277, 19178, 267, 4208, 46441, 362, 32, 11537, 198,...
2.494071
253
import pandas as pd import numpy as np import os from os.path import isfile, join import math from utils import log, list_all_files, abs_path if __name__ == "__main__": main()
[ 11748, 19798, 292, 355, 279, 67, 198, 11748, 299, 32152, 355, 45941, 198, 11748, 28686, 198, 6738, 28686, 13, 6978, 1330, 318, 7753, 11, 4654, 198, 198, 11748, 10688, 198, 198, 6738, 3384, 4487, 1330, 2604, 11, 1351, 62, 439, 62, 1662...
2.873016
63
""" 给你一个长度为n的数组,其中只有一个数字出现了1次,其他均出现2次,问如何快速的找到这个数字。 """ nums = [6, 4, 7, 6, 7, 4, 5] print(solution(nums)) nums.sort() print(nums)
[ 37811, 198, 220, 220, 220, 13328, 119, 247, 19526, 254, 31660, 10310, 103, 165, 243, 123, 41753, 99, 10310, 118, 77, 21410, 46763, 108, 163, 119, 226, 171, 120, 234, 17739, 114, 40792, 20998, 103, 17312, 231, 31660, 10310, 103, 46763, ...
0.945205
146
from scipy import sparse import numpy as np import math import implicit import logging logger = logging.getLogger(__name__) def predict_most_similar(visits, num_users, num_jobs, UserJobs, factors=50, cut_off=300, log_discrete=True): """ Matrix Factorization based Still Collaborative filtering but thi...
[ 6738, 629, 541, 88, 1330, 29877, 198, 11748, 299, 32152, 355, 45941, 198, 11748, 10688, 198, 11748, 16992, 198, 11748, 18931, 198, 6404, 1362, 796, 18931, 13, 1136, 11187, 1362, 7, 834, 3672, 834, 8, 628, 198, 4299, 4331, 62, 1712, 62...
2.632568
958
from numpy.distutils.core import setup, Extension import subprocess import os ext_call_collect = Extension(name="mlmicrophysics.call_collect", sources=["mlmicrophysics/call_collect.f90"], extra_objects=["mlmicrophysics/stochastic_collect_tau_cam.o"]) with open...
[ 6738, 299, 32152, 13, 17080, 26791, 13, 7295, 1330, 9058, 11, 27995, 198, 11748, 850, 14681, 198, 11748, 28686, 198, 198, 2302, 62, 13345, 62, 33327, 796, 27995, 7, 3672, 2625, 4029, 24055, 746, 23154, 13, 13345, 62, 33327, 1600, 198, ...
1.86211
834
#!/usr/bin/python3 from botbase import * _heinsberg_c = re.compile(r"([0-9.]+) bestätigte") _heinsberg_d = re.compile(r"Verstorbenen liegt im Kreis Heinsberg bei ([0-9.]+)\.") _heinsberg_a = re.compile(r"([0-9.]+) Personen als noch nicht genesen") schedule.append(Task(9, 15, 15, 35, 600, heinsberg, 5370)) if __name__...
[ 2, 48443, 14629, 14, 8800, 14, 29412, 18, 198, 6738, 10214, 8692, 1330, 1635, 198, 198, 62, 258, 1040, 3900, 62, 66, 796, 302, 13, 5589, 576, 7, 81, 18109, 58, 15, 12, 24, 8183, 28988, 1266, 11033, 83, 328, 660, 4943, 198, 62, 2...
2.2625
160
# THIS PROGRAM IS IN EARLY DEVELOPMENT # AND DOES **NOT** WORK YET. # I2C sensor reading works, but control of the tank does not. # I think the problem may be in the poor accuracy of Python's # time.sleep() as opposed to C's usleep(). # This may mean that a pure Python version will never work :( # Raspberry Tank Cont...
[ 2, 12680, 46805, 3180, 3268, 31834, 11319, 5550, 18697, 3185, 10979, 198, 2, 5357, 38359, 12429, 11929, 1174, 30936, 575, 2767, 13, 198, 198, 2, 314, 17, 34, 12694, 3555, 2499, 11, 475, 1630, 286, 262, 6873, 857, 407, 13, 198, 2, 31...
3.231579
760
# no stream support # reserved names: callMethod, onCompletion
[ 2, 645, 4269, 1104, 628, 198, 198, 2, 10395, 3891, 25, 869, 17410, 11, 319, 5377, 24547, 628 ]
3.722222
18
import random import pandas as pd if __name__ == "__main__": generate_new_data()
[ 11748, 4738, 198, 198, 11748, 19798, 292, 355, 279, 67, 628, 198, 198, 361, 11593, 3672, 834, 6624, 366, 834, 12417, 834, 1298, 198, 220, 220, 220, 7716, 62, 3605, 62, 7890, 3419, 198 ]
2.617647
34
from django import forms from django.contrib.auth.models import User
[ 6738, 42625, 14208, 1330, 5107, 198, 6738, 42625, 14208, 13, 3642, 822, 13, 18439, 13, 27530, 1330, 11787, 198 ]
3.631579
19
#!/usr/bin/env python # DISABLE SELECT PYLINT TESTS # pylint: disable=import-error, line-too-long, too-few-public-methods # pylint: disable=bad-continuation r""" ╔════════════════════════════════════════════════════╗ ║ ╔═╗╦═╗╔═╗╔═╗╦ ╦╔═╗╔╗╔╔═╗ ╔╦╗╔═╗╔╦╗╔═╗╔╗╔╔═╗╔╦╗╔═╗ ║ ║ ║ ╦╠╦╝╠═╣╠═╝╠═╣║╣ ║║║║╣ ║║║║╣ ║ ╠═╣║║║║ ...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 2, 13954, 17534, 33493, 350, 45448, 12394, 309, 1546, 4694, 198, 2, 279, 2645, 600, 25, 15560, 28, 11748, 12, 18224, 11, 1627, 12, 18820, 12, 6511, 11, 1165, 12, 32146, 12, 11377, 12...
1.951287
7,924
# coding: utf8 import json import os import urllib.request from pathlib import Path from spacy.language import Language from spacy.util import get_lang_class BASE_URL = "https://lindat.mff.cuni.cz/repository/xmlui/bitstream/handle/11234/1-2998/" MODELS_DIR = os.path.join(Path(__file__).parent, "models") langs_path = ...
[ 2, 19617, 25, 3384, 69, 23, 198, 11748, 33918, 198, 11748, 28686, 198, 11748, 2956, 297, 571, 13, 25927, 198, 6738, 3108, 8019, 1330, 10644, 198, 198, 6738, 599, 1590, 13, 16129, 1330, 15417, 198, 6738, 599, 1590, 13, 22602, 1330, 651...
2.523756
884
import typing if __name__ == "__main__": main()
[ 11748, 19720, 201, 198, 201, 198, 201, 198, 201, 198, 361, 11593, 3672, 834, 6624, 366, 834, 12417, 834, 1298, 201, 198, 220, 220, 220, 1388, 3419, 201, 198 ]
2.103448
29
print((int(input()) + 3) % 7)
[ 4798, 19510, 600, 7, 15414, 28955, 1343, 513, 8, 4064, 767, 8, 198 ]
2.307692
13
# Copyright (c) Microsoft Corporation. # Licensed under the MIT license. """ Semantic Machines\N{TRADE MARK SIGN} software. Creates text data (source-target pairs) to be used for training OpenNMT models. """ import argparse import dataclasses from typing import Dict, Iterator import jsons from tqdm import tqdm fro...
[ 2, 220, 15069, 357, 66, 8, 5413, 10501, 13, 198, 2, 220, 49962, 739, 262, 17168, 5964, 13, 198, 37811, 198, 13900, 5109, 31182, 59, 45, 90, 5446, 19266, 39641, 36771, 92, 3788, 13, 198, 198, 16719, 274, 2420, 1366, 357, 10459, 12, ...
2.425419
1,133
#!/usr/bin/python3 # # Corona Circles, codevscovid19 hackathon Zurich # by Christopher Rehm 29-30 mar 2020, christopherrehm@web.de import sys import MySQLdb if __name__ == "__main__": if len(sys.argv)-1 == 1: findCircleIDbyName(sys.argv[1]) else: print("wrong number of arguments")
[ 2, 48443, 14629, 14, 8800, 14, 29412, 18, 198, 2, 198, 2, 44574, 21239, 5427, 11, 2438, 85, 1416, 709, 312, 1129, 8156, 12938, 43412, 198, 2, 416, 12803, 797, 23940, 2808, 12, 1270, 1667, 12131, 11, 33826, 8803, 260, 23940, 31, 1238...
2.460317
126
#!/usr/bin/python import time import os import argparse from subprocess import call from joblib import Parallel, delayed import multiprocessing if __name__ == '__main__': parser = argparse.ArgumentParser() parser.add_argument( '--orig', type=str, help="Original directory") parser....
[ 2, 48443, 14629, 14, 8800, 14, 29412, 198, 11748, 640, 198, 11748, 28686, 198, 11748, 1822, 29572, 198, 6738, 850, 14681, 1330, 869, 198, 198, 6738, 1693, 8019, 1330, 42945, 11, 11038, 198, 11748, 18540, 305, 919, 278, 198, 220, 198, ...
2.403141
382
from __future__ import print_function import sys sys.path.insert(1,"../../../") import h2o from tests import pyunit_utils from os import path import binascii ''' Export file with h2o.export_file compressed with 'gzip' ''' if __name__ == "__main__": pyunit_utils.standalone_test(export_gzip) else: export_gzi...
[ 6738, 11593, 37443, 834, 1330, 3601, 62, 8818, 198, 11748, 25064, 198, 17597, 13, 6978, 13, 28463, 7, 16, 553, 40720, 40720, 40720, 4943, 198, 11748, 289, 17, 78, 198, 6738, 5254, 1330, 12972, 20850, 62, 26791, 198, 6738, 28686, 1330, ...
2.771186
118
# -*- coding: utf-8 -*- # Copyright 2014 Spanish National Research Council (CSIC) # # 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 # # Unle...
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 198, 2, 15069, 1946, 7897, 2351, 4992, 4281, 357, 7902, 2149, 8, 198, 2, 198, 2, 49962, 739, 262, 24843, 13789, 11, 10628, 362, 13, 15, 357, 1169, 366, 34156, 15341, ...
2.525535
607
from compas.geometry import Translation, Vector, Transformation, Frame from integral_timber_joints.assembly import BeamAssemblyMethod from integral_timber_joints.process.dependency import ComputationalResult try: from typing import Dict, List, Optional, Tuple from integral_timber_joints.process import RobotCla...
[ 6738, 552, 292, 13, 469, 15748, 1330, 33322, 11, 20650, 11, 49127, 11, 25184, 198, 6738, 19287, 62, 16514, 527, 62, 73, 1563, 82, 13, 41873, 1330, 25855, 49670, 17410, 198, 6738, 19287, 62, 16514, 527, 62, 73, 1563, 82, 13, 14681, 1...
2.570192
6,005
# Generated by the protocol buffer compiler. DO NOT EDIT! # source: graph_description.proto import sys _b=sys.version_info[0]<3 and (lambda x:x) or (lambda x:x.encode('latin1')) from google.protobuf import descriptor as _descriptor from google.protobuf import message as _message from google.protobuf import reflection...
[ 2, 2980, 515, 416, 262, 8435, 11876, 17050, 13, 220, 8410, 5626, 48483, 0, 198, 2, 2723, 25, 4823, 62, 11213, 13, 1676, 1462, 198, 198, 11748, 25064, 198, 62, 65, 28, 17597, 13, 9641, 62, 10951, 58, 15, 60, 27, 18, 290, 357, 500...
2.436953
29,502
#!/usr/bin/env python3 # -*- coding: utf-8 -*- """ Created on March 6, 2021 @author: Mohammad Asif Zaman - April 10, 2021 - Added optical spot ON-OFF text """ import numpy as np import pylab as py import matplotlib as plt from parameters import * # Module global Parameters: # =====================...
[ 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, 41972, 319, 2805, 718, 11, 33448, 198, 198, 31, 9800, 25, 29674, 1081, 361, 1168, 10546, 628, 198, 12...
2.52621
496
import datetime import random import json # base = datetime.datetime.today() # date_list = [base - datetime.timedelta(days=x) for x in range(0, 100*365)] # lt = {} # for d in date_list: # print str(d)[:10] # lt[str(d)[:10]] = int(10000*random.random()) # with open('test.json', 'w') as f: # f.write(json.dumps(lt))...
[ 11748, 4818, 8079, 198, 11748, 4738, 198, 11748, 33918, 198, 198, 2, 2779, 796, 4818, 8079, 13, 19608, 8079, 13, 40838, 3419, 198, 2, 3128, 62, 4868, 796, 685, 8692, 532, 4818, 8079, 13, 16514, 276, 12514, 7, 12545, 28, 87, 8, 329, ...
2.421687
166
from __future__ import absolute_import from __future__ import unicode_literals from memoized import memoized from django import forms from django.utils.translation import ugettext as _, ugettext_noop, ugettext_lazy from crispy_forms.layout import Submit from crispy_forms import layout as crispy from corehq.apps.hqwe...
[ 6738, 11593, 37443, 834, 1330, 4112, 62, 11748, 198, 6738, 11593, 37443, 834, 1330, 28000, 1098, 62, 17201, 874, 198, 198, 6738, 16155, 1143, 1330, 16155, 1143, 198, 6738, 42625, 14208, 1330, 5107, 198, 6738, 42625, 14208, 13, 26791, 13, ...
3.495798
119
# Generated by Django 2.0.9 on 2019-02-22 15:06 from django.db import migrations, models import wagtail.search.index
[ 2, 2980, 515, 416, 37770, 362, 13, 15, 13, 24, 319, 13130, 12, 2999, 12, 1828, 1315, 25, 3312, 198, 198, 6738, 42625, 14208, 13, 9945, 1330, 15720, 602, 11, 4981, 198, 11748, 266, 363, 13199, 13, 12947, 13, 9630, 628 ]
2.902439
41
from random import randint #con init clases de numeros complejos #clase con init # complejo=Complejo(3,4) # print(complejo.getimaginary(9,3)) # print(complejo.suma(3,6)) # print(complejo.resta(3,6)) # print(complejo.multiplicacion(3,6)) # print(complejo.division(3,6)) #clase sin init...
[ 6738, 4738, 1330, 43720, 600, 201, 198, 201, 198, 2, 1102, 2315, 537, 1386, 390, 5470, 418, 1224, 73, 418, 201, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 201, 198, 220, 220, 220, 220, 201, 198, 201, 198, 201, 198, 2, 565...
2.153667
859
""" Summarize a column total cases column and total deaths column Country by country data in columns, sum up and match global totals """ import csv import pandas pandas.set_option("display.max_rows", None, "display.max_columns", None) col_list = ["Total Cases", "Country/ Other", "Total Deaths", "# 9/27/2020"] df = p...
[ 37811, 198, 13065, 3876, 1096, 257, 5721, 2472, 2663, 5721, 290, 2472, 7040, 5721, 220, 198, 33921, 416, 1499, 1366, 287, 15180, 11, 2160, 510, 290, 2872, 3298, 26310, 198, 37811, 198, 11748, 269, 21370, 220, 198, 11748, 19798, 292, 198...
2.582938
422
from flask import request, jsonify from api import api, core @api.route('/v1/service/deploy', methods=['POST']) @api.route('/v1/service/<name>', methods=['DELETE']) @api.route('/v1/service/<name>', methods=['GET']) @api.route('/v1/service/<name>/scale/<replicas>', methods=['POST']) @api.route('/v1/service/<name>/s...
[ 6738, 42903, 1330, 2581, 11, 33918, 1958, 198, 6738, 40391, 1330, 40391, 11, 4755, 198, 198, 31, 15042, 13, 38629, 10786, 14, 85, 16, 14, 15271, 14, 2934, 1420, 3256, 5050, 28, 17816, 32782, 6, 12962, 198, 198, 31, 15042, 13, 38629, ...
2.429412
170
# _________________________________________________________________________ # # Water Security Toolkit (WST) # Copyright (c) 2012 Sandia Corporation. # This software is distributed under the Revised BSD License. # Under the terms of Contract DE-AC04-94AL85000, there is a non-exclusive # license for use of ...
[ 2, 220, 220, 27193, 2602, 62, 201, 198, 2, 201, 198, 2, 220, 5638, 4765, 16984, 15813, 357, 54, 2257, 8, 201, 198, 2, 220, 15069, 357, 66, 8, 2321, 3837, 544, 10501, 13, 201, 198, 2, 220, 770, 3788, 318, 9387, 739, 262, 31492, ...
3.142061
359
from django import template register = template.Library() @register.filter(name='get_public_notes')
[ 6738, 42625, 14208, 1330, 11055, 198, 30238, 796, 11055, 13, 23377, 3419, 628, 198, 31, 30238, 13, 24455, 7, 3672, 11639, 1136, 62, 11377, 62, 17815, 11537, 198 ]
3.642857
28
import os import time import numpy as np import tensorflow as tf from eight_mile.tf.layers import reload_checkpoint from eight_mile.tf.optz import optimizer from baseline.tf.tfy import TRAIN_FLAG, SET_TRAIN_FLAG from baseline.train import Trainer, register_trainer from baseline.model import create_model_for from collec...
[ 11748, 28686, 198, 11748, 640, 198, 11748, 299, 32152, 355, 45941, 198, 11748, 11192, 273, 11125, 355, 48700, 198, 6738, 3624, 62, 18085, 13, 27110, 13, 75, 6962, 1330, 18126, 62, 9122, 4122, 198, 6738, 3624, 62, 18085, 13, 27110, 13, ...
2.200904
3,982
import paho.mqtt.client as mqtt if __name__ == '__main__': client = mqtt.Client() client.on_connect = on_connect client.on_message = on_message client.connect('localhost', 1883, 60) client.loop_forever()
[ 11748, 279, 17108, 13, 76, 80, 926, 13, 16366, 355, 285, 80, 926, 628, 628, 198, 361, 11593, 3672, 834, 6624, 705, 834, 12417, 834, 10354, 198, 220, 220, 220, 5456, 796, 285, 80, 926, 13, 11792, 3419, 198, 220, 220, 220, 5456, 13,...
2.516484
91
# coding: utf-8 import parsingconfig from jpype import * import sys import socket import socks from io import BytesIO import struct #Since we deliver message from java module to python module, #I think it is ok to just use this socket function to directly #deliver and process the message #Need to figure out whether i...
[ 2, 19617, 25, 3384, 69, 12, 23, 198, 11748, 32096, 11250, 198, 6738, 474, 79, 2981, 1330, 1635, 198, 11748, 25064, 198, 11748, 17802, 198, 11748, 24359, 198, 6738, 33245, 1330, 2750, 4879, 9399, 198, 11748, 2878, 198, 198, 2, 6385, 35...
2.450075
671
from setuptools import setup setup( name='flickr-archive-extractor', version='0.1.1', install_requires=[], tests_require=['nose>=1.3', 'pycodestyle'], test_suite='nose.collector', scripts=['flickr_archive_extractor.py'], author='Nikita Kovaliov', author_email='nikita@maizy.ru', desc...
[ 6738, 900, 37623, 10141, 1330, 9058, 198, 198, 40406, 7, 198, 220, 220, 220, 1438, 11639, 2704, 18994, 12, 17474, 12, 2302, 40450, 3256, 198, 220, 220, 220, 2196, 11639, 15, 13, 16, 13, 16, 3256, 198, 220, 220, 220, 2721, 62, 47911,...
2.492147
191
#!/usr/bin/python ##################################################################################### # Copyright (c) 2022 Marijn Heule, Randal E. Bryant, Carnegie Mellon University # Last edit: March 23, 2022 # # Permission is hereby granted, free of charge, to any person obtaining a copy of this software and # as...
[ 2, 48443, 14629, 14, 8800, 14, 29412, 198, 198, 29113, 29113, 14468, 4242, 2, 198, 2, 15069, 357, 66, 8, 33160, 1526, 48848, 679, 2261, 11, 371, 7642, 412, 13, 16754, 11, 33976, 49808, 2059, 198, 2, 4586, 4370, 25, 2805, 2242, 11, ...
3.911548
407
"""Environment testing non_RL scenario 1 of the bayesian envs.""" import numpy as np from gym.spaces.box import Box from flow.core.rewards import desired_velocity from flow.envs.ring.accel import AccelEnv from flow.core.kernel import Kernel ADDITIONAL_ENV_PARAMS = { # maximum acceleration for autonomous vehicles, ...
[ 37811, 31441, 4856, 1729, 62, 7836, 8883, 352, 286, 262, 15489, 35610, 551, 14259, 526, 15931, 198, 11748, 299, 32152, 355, 45941, 198, 6738, 11550, 13, 2777, 2114, 13, 3524, 1330, 8315, 198, 6738, 5202, 13, 7295, 13, 260, 2017, 1330, ...
3.198582
282
import pandas as pd di_matrix = pd.DataFrame()
[ 11748, 19798, 292, 355, 279, 67, 198, 10989, 62, 6759, 8609, 796, 279, 67, 13, 6601, 19778, 3419 ]
2.555556
18
import numpy as np from .conformalmap import ConformalMap from .closedcurve import ClosedCurve from .unitdisk import unitdisk from .region import Region from .szego import Szego, SzegoOpts class SzMap(ConformalMap): """SzMap represents a Riemann map via the Szego kernel. """ def __init__(self, range=None...
[ 11748, 299, 32152, 355, 45941, 198, 6738, 764, 1102, 687, 282, 8899, 1330, 1482, 687, 282, 13912, 198, 6738, 764, 20225, 22019, 303, 1330, 30550, 26628, 303, 198, 6738, 764, 20850, 39531, 1330, 4326, 39531, 198, 6738, 764, 36996, 1330, ...
2.285235
596
from setuptools import setup, find_packages from os import path from ctlearn.version import * here = path.abspath(path.dirname(__file__)) with open(path.join(here, 'README.rst'), encoding='utf-8') as f: long_description = f.read() setup(name='ctlearn', version=get_version_pypi(), author="CTLearn Team...
[ 6738, 900, 37623, 10141, 1330, 9058, 11, 1064, 62, 43789, 198, 6738, 28686, 1330, 3108, 198, 6738, 269, 7100, 1501, 13, 9641, 1330, 1635, 198, 198, 1456, 796, 3108, 13, 397, 2777, 776, 7, 6978, 13, 15908, 3672, 7, 834, 7753, 834, 40...
2.647887
355
# -*- coding: utf-8 -*- """ Created on Thu May 31 23:54:45 2018 @author: SilverDoe """ from tkinter import messagebox res = messagebox.askquestion('Message title','Message content') res = messagebox.askyesno('Message title','Message content') res = messagebox.askyesnocancel('Message title','Message content') res = m...
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 37811, 198, 41972, 319, 26223, 1737, 3261, 2242, 25, 4051, 25, 2231, 2864, 198, 198, 31, 9800, 25, 7698, 35, 2577, 198, 37811, 628, 198, 6738, 256, 74, 3849, 1330, 327...
3.407692
130
from django.test import TestCase, TransactionTestCase from .models import Notes, Diary from django.utils import timezone from rest_framework.test import APIRequestFactory, APIClient from django.contrib.auth.models import User from freezegun import freeze_time from rest_framework_jwt.views import obtain_jwt_token import...
[ 6738, 42625, 14208, 13, 9288, 1330, 6208, 20448, 11, 45389, 14402, 20448, 198, 6738, 764, 27530, 1330, 11822, 11, 35911, 198, 6738, 42625, 14208, 13, 26791, 1330, 640, 11340, 198, 6738, 1334, 62, 30604, 13, 9288, 1330, 7824, 18453, 22810,...
2.101774
2,368
from gameInitialization import * from getAndDoActions import * from checkState import * from voting import * from displayAndPrompt import * import Globals teamInfoList = promptTeams() teams = createTeams(teamInfoList) roleList = [] for team in teams: roleList += getListOfTeamRoles(team) playerInfoList = getPlayerName...
[ 6738, 983, 24243, 1634, 1330, 1635, 198, 6738, 651, 1870, 5211, 32, 2733, 1330, 1635, 198, 6738, 2198, 9012, 1330, 1635, 198, 6738, 6709, 1330, 1635, 198, 6738, 3359, 1870, 24129, 457, 1330, 1635, 198, 11748, 40713, 874, 198, 198, 15097...
2.929319
382
import math,random,pygame from pygame.locals import * def combineVectors(vector1, vector2): """ Adds together two vectors given as an angle plus a magnitude (length)""" (angle1, length1) = vector1 (angle2, length2) = vector2 x = math.sin(angle1) * length1 y = math.cos(angle1) * length1 x1 = x...
[ 11748, 10688, 11, 25120, 11, 9078, 6057, 198, 6738, 12972, 6057, 13, 17946, 874, 1330, 1635, 198, 198, 4299, 12082, 53, 478, 669, 7, 31364, 16, 11, 15879, 17, 2599, 198, 220, 220, 220, 37227, 34333, 1978, 734, 30104, 1813, 355, 281, ...
2.11479
906
import numpy as np import schnell as snl import matplotlib.pyplot as plt from matplotlib import rc rc('font', **{'family': 'sans-serif', 'sans-serif': ['Helvetica']}) rc('text', usetex=True) t_obs = 1 f_ref = 63 nside = 64 obs_time = t_obs*365*24*3600. freqs = np.linspace(10., 1010., 101) dets = [snl.Gr...
[ 11748, 299, 32152, 355, 45941, 198, 11748, 264, 1349, 695, 355, 3013, 75, 198, 11748, 2603, 29487, 8019, 13, 9078, 29487, 355, 458, 83, 198, 6738, 2603, 29487, 8019, 1330, 48321, 198, 6015, 10786, 10331, 3256, 12429, 90, 6, 17989, 10354...
1.780962
977
from kernel.models.tools import Base, tool_engine from sqlalchemy.orm import sessionmaker user_engine = tool_engine(tool) user_session = sessionmaker(bind = user_engine) user_session = user_session() Base.metadata.create_all(user_engine)
[ 6738, 9720, 13, 27530, 13, 31391, 1330, 7308, 11, 2891, 62, 18392, 198, 6738, 44161, 282, 26599, 13, 579, 1330, 6246, 10297, 198, 198, 7220, 62, 18392, 796, 2891, 62, 18392, 7, 25981, 8, 198, 7220, 62, 29891, 796, 6246, 10297, 7, 21...
3.30137
73
import numpy as np import pandas as pd from datetime import timedelta from datetime import datetime from io import StringIO from urllib import request as url_request import os import sys import matplotlib.pyplot as plt import matplotlib.dates as mdates from scipy.optimize import curve_fit # This stuff because pandas...
[ 11748, 299, 32152, 355, 45941, 198, 11748, 19798, 292, 355, 279, 67, 198, 6738, 4818, 8079, 1330, 28805, 12514, 198, 6738, 4818, 8079, 1330, 4818, 8079, 198, 6738, 33245, 1330, 10903, 9399, 198, 6738, 2956, 297, 571, 1330, 2581, 355, 19...
2.606171
551
# coding: utf-8 def bids_dir_to_fsl_dir(bids_dir): """ Converts BIDS PhaseEncodingDirection parameters (i,j,k,i-,j-,k-) to FSL direction (x,y,z,x-,y-,z-). """ fsl_dir = bids_dir.lower() if fsl_dir == "i-": return "x-" if fsl_dir == "i": return "x" if fsl_dir == "j-": ...
[ 2, 19617, 25, 3384, 69, 12, 23, 628, 198, 4299, 27837, 62, 15908, 62, 1462, 62, 69, 6649, 62, 15908, 7, 65, 2340, 62, 15908, 2599, 198, 220, 220, 220, 37227, 198, 220, 220, 220, 1482, 24040, 347, 14255, 18983, 27195, 7656, 35, 415...
1.915888
321
import logging as __logging from ._tokenizer import Tokenizer __logging.getLogger(f"pizza_nlp.{__name__}").addHandler(__logging.NullHandler())
[ 11748, 18931, 355, 11593, 6404, 2667, 198, 198, 6738, 47540, 30001, 7509, 1330, 29130, 7509, 198, 198, 834, 6404, 2667, 13, 1136, 11187, 1362, 7, 69, 1, 79, 9990, 62, 21283, 79, 13, 90, 834, 3672, 834, 92, 11074, 2860, 25060, 7, 834...
2.9
50
# -------------- #Importing header files import pandas as pd import matplotlib.pyplot as plt import seaborn as sns #Code starts here #Code ends here data=pd.read_csv(path) #Plotting histogram of Rating data['Rating'].plot(kind='hist') plt.show() #Subsetting the dataframe based on `Rating` column data=data[da...
[ 2, 220, 26171, 198, 2, 20939, 278, 13639, 3696, 198, 11748, 19798, 292, 355, 279, 67, 198, 11748, 2603, 29487, 8019, 13, 9078, 29487, 355, 458, 83, 198, 11748, 384, 397, 1211, 355, 3013, 82, 628, 628, 198, 198, 2, 10669, 4940, 994, ...
2.758921
1,261
# # Copyright (c) 2019, Neptune Labs Sp. z o.o. # # 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 agr...
[ 2, 198, 2, 15069, 357, 66, 8, 13130, 11, 26461, 23500, 1338, 13, 1976, 267, 13, 78, 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, ...
3.416216
370
from typing import Any py_map = map py_type = type
[ 6738, 19720, 1330, 4377, 198, 198, 9078, 62, 8899, 796, 3975, 198, 198, 9078, 62, 4906, 796, 2099 ]
2.888889
18
from Model import * import MinMax import AlphaBeta import parameters import threading import sys from random import randint from time import sleep # Lancer le combat d'ia model = Model(1, 1) model.pMax_ias[1] = int(sys.argv[1]) # pMax j1 model.eval_ias[1] = int(sys.argv[2]) # eval j1 model.pMax_ias[...
[ 6738, 9104, 1330, 1635, 201, 198, 11748, 1855, 11518, 201, 198, 11748, 12995, 43303, 201, 198, 11748, 10007, 201, 198, 11748, 4704, 278, 201, 198, 11748, 25064, 201, 198, 6738, 4738, 1330, 43720, 600, 201, 198, 6738, 640, 1330, 3993, 20...
2.309278
194
import numpy as np import torch from torch.autograd import Variable from .Attacker import Attacker from .WhiteBoxAttacker import PGDAttack from ..models.PixelLevelTransferN import PixelLevelTransferN from ..utils import clamp_to_valid_img, tform1, tform2, retrieve_image if __name__ == "__main__": # gan_at...
[ 11748, 299, 32152, 355, 45941, 198, 11748, 28034, 198, 198, 6738, 28034, 13, 2306, 519, 6335, 1330, 35748, 198, 198, 6738, 764, 8086, 10735, 1330, 8307, 263, 198, 6738, 764, 12256, 14253, 8086, 10735, 1330, 23842, 5631, 926, 441, 198, 1...
2.239557
1,173
''' FORCE Copyright (c) 2020-present NAVER Corp. MIT license ''' import torch import torch.nn as nn import torch.nn.functional as F from tensorboardX import SummaryWriter from ignite.engine import create_supervised_evaluator from ignite.metrics import Accuracy, Loss from pruning.pruning_algos import iterative_prunin...
[ 7061, 6, 198, 13775, 5222, 198, 15269, 357, 66, 8, 12131, 12, 25579, 11746, 5959, 11421, 13, 198, 36393, 5964, 198, 7061, 6, 198, 198, 11748, 28034, 198, 11748, 28034, 13, 20471, 355, 299, 77, 198, 11748, 28034, 13, 20471, 13, 45124, ...
2.898701
385
import networkx as nx import numpy as np import matplotlib.pyplot as plt import matplotlib.pyplot as plt1 import pylab G = nx.MultiDiGraph() #list of kabyle tags tags=[] i=0 #extraction du tableau des tags for ligne in open("c:/tal/tagspos.txt",encoding='utf-8'): a=ligne.replace('\n',"") if (i...
[ 11748, 3127, 87, 355, 299, 87, 201, 198, 11748, 299, 32152, 355, 45941, 201, 198, 11748, 2603, 29487, 8019, 13, 9078, 29487, 355, 458, 83, 201, 198, 11748, 2603, 29487, 8019, 13, 9078, 29487, 355, 458, 83, 16, 201, 198, 11748, 279, ...
1.850969
4,697
from django.db import models # Create your models here.
[ 6738, 42625, 14208, 13, 9945, 1330, 4981, 198, 198, 2, 13610, 534, 4981, 994, 13, 198, 220, 220 ]
3.277778
18
import os import pytest from typer.testing import CliRunner from ops2deb.cli import app runner = CliRunner() @pytest.mark.parametrize("args", [[], ["-v"], ["-v", "-e", "10"]])
[ 11748, 28686, 198, 198, 11748, 12972, 9288, 198, 6738, 1259, 525, 13, 33407, 1330, 1012, 72, 49493, 198, 198, 6738, 39628, 17, 11275, 13, 44506, 1330, 598, 198, 198, 16737, 796, 1012, 72, 49493, 3419, 628, 628, 198, 198, 31, 9078, 928...
2.628571
70
# MIT License # # Copyright (c) 2021 Université Paris-Saclay # Copyright (c) 2021 Laboratoire national de métrologie et d'essais (LNE) # Copyright (c) 2021 CNRS # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the "Software"), to dea...
[ 2, 17168, 13789, 198, 2, 198, 2, 15069, 357, 66, 8, 33448, 26986, 43816, 6342, 12, 38318, 10724, 198, 2, 15069, 357, 66, 8, 33448, 7882, 5549, 557, 2260, 390, 285, 25125, 3225, 37987, 2123, 288, 6, 408, 15152, 357, 43, 12161, 8, 1...
2.882458
1,123
#!/usr/bin/env python3 # -*- coding: utf-8 -*- import unittest from pyppeteer.launcher import Launcher from pyppeteer.chromium_downloader import chromium_excutable
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 18, 198, 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 198, 11748, 555, 715, 395, 198, 198, 6738, 12972, 381, 14471, 263, 13, 38722, 2044, 1330, 26385, 198, 6738, 12972, ...
2.737705
61