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-2015 Christopher L. Felton # See the licence file in the top directory # import myhdl from myhdl import Signal, intbv, always_comb from ..clock import Clock from .streamers import Streamers _fb_num = 0 _fb_list = {} def _add_bus(fb, name=''): """ globally keep track of all the buses added...
[ 2, 198, 2, 15069, 357, 66, 8, 2211, 12, 4626, 12803, 406, 13, 13937, 1122, 198, 2, 4091, 262, 17098, 2393, 287, 262, 1353, 8619, 198, 2, 198, 198, 11748, 616, 71, 25404, 198, 6738, 616, 71, 25404, 1330, 26484, 11, 493, 65, 85, 1...
2.691275
149
import matplotlib.pyplot as plt import matplotlib.gridspec as gridspec import pickle as pic import sys, os import numpy as np import math as math HYP = 1.4 BETA = 0.0 it = 500 S = 2 M = 2 K = 32 init = "circ" EST_DIR_A = "/home/mafontai/Documents/project/git_project/speech_separation/alpha_SpatialMNMF/results_2anechoi...
[ 11748, 2603, 29487, 8019, 13, 9078, 29487, 355, 458, 83, 198, 11748, 2603, 29487, 8019, 13, 2164, 2340, 43106, 355, 50000, 43106, 198, 11748, 2298, 293, 355, 8301, 198, 11748, 25064, 11, 28686, 198, 11748, 299, 32152, 355, 45941, 198, 1...
2.360499
1,362
# Copyright 2014, 2015 SAP SE. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http: //www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, #...
[ 2, 15069, 1946, 11, 1853, 48323, 7946, 13, 198, 2, 198, 2, 49962, 739, 262, 24843, 13789, 11, 10628, 362, 13, 15, 357, 1169, 366, 34156, 15341, 198, 2, 345, 743, 407, 779, 428, 2393, 2845, 287, 11846, 351, 262, 13789, 13, 198, 2, ...
3.776471
170
n1 = input('Digite o primeiro número? ') n2 = input('Digite o segundo número? ') soma = int(n1) + int(n2) print('A soma é: ', soma)
[ 77, 16, 796, 5128, 10786, 19511, 578, 267, 6994, 7058, 299, 21356, 647, 78, 30, 705, 8, 198, 77, 17, 796, 5128, 10786, 19511, 578, 267, 384, 70, 41204, 299, 21356, 647, 78, 30, 705, 8, 198, 82, 6086, 796, 493, 7, 77, 16, 8, 13...
2.0625
64
from keras.models import * from keras.layers import * from keras.optimizers import Adam, RMSprop from keras.losses import mean_squared_error import keras.backend as K # from keras_lr_multiplier import LRMultiplier ''' code source: https://github.com/yuanyuanli85/Stacked_Hourglass_Network_Keras ''' import os # os.syst...
[ 6738, 41927, 292, 13, 27530, 1330, 1635, 198, 6738, 41927, 292, 13, 75, 6962, 1330, 1635, 198, 6738, 41927, 292, 13, 40085, 11341, 1330, 7244, 11, 371, 5653, 22930, 198, 6738, 41927, 292, 13, 22462, 274, 1330, 1612, 62, 16485, 1144, 6...
2.400192
1,042
def gcd(a, b): '''Najvecji skupni veckratnik''' if b == 0: return a else: return gcd(b, a % b) def lcm(a, b): '''Najmanjsi skupni delitelj''' return int((a * b) / gcd(a, b)) def stevilo_deljivo_prvimi_stevili(n): '''Vrne najmanjso stevilo deljivo s prvimi n naravnimi stevili'''...
[ 4299, 308, 10210, 7, 64, 11, 275, 2599, 198, 220, 220, 220, 705, 7061, 45, 1228, 35138, 7285, 1341, 929, 8461, 1569, 694, 10366, 17187, 7061, 6, 198, 220, 220, 220, 611, 275, 6624, 657, 25, 198, 220, 220, 220, 220, 220, 220, 220, ...
1.824903
257
from .type_util import * from .session import session from .table import * from .vector import Vector
[ 6738, 764, 4906, 62, 22602, 1330, 1635, 198, 6738, 764, 29891, 1330, 6246, 198, 6738, 764, 11487, 1330, 1635, 198, 6738, 764, 31364, 1330, 20650 ]
4.04
25
#!/usr/bin/env python from typing import List, Optional, Tuple import pygame joysticks = [] if __name__ == '__main__': try: main() except Exception as e: import sys import traceback print(traceback.format_exception(None, # <- type(e) by docs, but ignored ...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 198, 6738, 19720, 1330, 7343, 11, 32233, 11, 309, 29291, 198, 198, 11748, 12972, 6057, 198, 198, 2633, 34810, 796, 17635, 628, 628, 628, 628, 198, 361, 11593, 3672, 834, 6624, 705, 834...
1.890196
255
# -*- coding: utf-8 -*- import tensorflow as tf from tensorflow.contrib.tensorboard.plugins import projector import os import numpy as np dir = "./jtr/data/emoji2vec/" emojis = [] vecs = [] with open(dir + "metadata.tsv", "w") as f_out: # f_out.write("emoji\n") with open(dir + "emoji2vec.txt", "r") as f_in: ...
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 198, 11748, 11192, 273, 11125, 355, 48700, 198, 6738, 11192, 273, 11125, 13, 3642, 822, 13, 83, 22854, 3526, 13, 37390, 1330, 43396, 198, 11748, 28686, 198, 198, 11748, ...
2.337001
727
import FWCore.ParameterSet.Config as cms TrackerRecoGeometryESProducer = cms.ESProducer("TrackerMTDRecoGeometryESProducer", usePhase2Stacks = cms.bool(False) ) from Configuration.ProcessModifiers.vectorHits_cff import vectorHits vectorHits.toModify(TrackerRecoGeometryESProducer, usePhase2Stacks = True)
[ 11748, 48849, 14055, 13, 36301, 7248, 13, 16934, 355, 269, 907, 198, 198, 35694, 6690, 78, 10082, 15748, 1546, 11547, 2189, 796, 269, 907, 13, 1546, 11547, 2189, 7203, 35694, 13752, 35, 6690, 78, 10082, 15748, 1546, 11547, 2189, 1600, 1...
2.990291
103
data_schema = { "definitions": {}, "$schema": "http://json-schema.org/draft-07/schema#", "$id": "http://example.com/root.json", "type": "object", "title": "The Root Schema", "required": [ "type", "pvc", "path", "filename" ], "properties": { "type": { "$id": "#/properties/type",...
[ 7890, 62, 15952, 2611, 796, 1391, 198, 220, 366, 4299, 50101, 1298, 1391, 5512, 198, 220, 17971, 15952, 2611, 1298, 366, 4023, 1378, 17752, 12, 15952, 2611, 13, 2398, 14, 35679, 12, 2998, 14, 15952, 2611, 2, 1600, 198, 220, 17971, 312...
1.927336
578
import sys import Bio import statsmodels import math import numpy as np import pandas as pd from statsmodels.compat.python import range from statsmodels.compat.collections import OrderedDict from Bio import SeqIO from Bio.Seq import Seq from Bio.SeqUtils.ProtParam import ProteinAnalysis from collections impo...
[ 11748, 25064, 201, 198, 11748, 16024, 201, 198, 11748, 9756, 27530, 201, 198, 11748, 10688, 201, 198, 11748, 299, 32152, 355, 45941, 201, 198, 11748, 19798, 292, 355, 279, 67, 201, 198, 6738, 9756, 27530, 13, 5589, 265, 13, 29412, 1330,...
2.260986
13,495
import json import uuid from django.core.urlresolvers import reverse from django.contrib.auth import get_user_model from django.core.cache import cache from rest_framework.test import APITestCase from model_mommy import mommy from ..models import ( County, Contact, ContactType, Constituency, Ward,...
[ 11748, 33918, 198, 11748, 334, 27112, 198, 198, 6738, 42625, 14208, 13, 7295, 13, 6371, 411, 349, 690, 1330, 9575, 198, 6738, 42625, 14208, 13, 3642, 822, 13, 18439, 1330, 651, 62, 7220, 62, 19849, 198, 6738, 42625, 14208, 13, 7295, 1...
2.770161
248
import torch import torch.nn as nn import torch.nn.functional as F from torch.nn.utils.rnn import pack_padded_sequence, pad_packed_sequence class SeqEncoderBase(nn.Module): ''' Sequence encoder takes sequences as input, transform them into embeddings, and then outputs encoded fixed-size representation. ...
[ 11748, 28034, 198, 11748, 28034, 13, 20471, 355, 299, 77, 198, 11748, 28034, 13, 20471, 13, 45124, 355, 376, 198, 6738, 28034, 13, 20471, 13, 26791, 13, 81, 20471, 1330, 2353, 62, 79, 29373, 62, 43167, 11, 14841, 62, 34860, 62, 43167,...
3.237624
101
import random import numpy as np from rlkit.envs.mujoco.pusher3dof import PusherEnv3DOF from rlkit.envs.mujoco.pusher_avoider_3dof import PusherAvoiderEnv3DOF from rlkit.exploration_strategies.ou_strategy import OUStrategy from rlkit.launchers.launcher_util import run_experiment from rlkit.torch.networks import FeedFo...
[ 11748, 4738, 198, 11748, 299, 32152, 355, 45941, 198, 198, 6738, 374, 75, 15813, 13, 268, 14259, 13, 76, 23577, 25634, 13, 79, 34055, 18, 67, 1659, 1330, 350, 34055, 4834, 85, 18, 18227, 37, 198, 6738, 374, 75, 15813, 13, 268, 14259...
1.699115
3,051
from .md_api import BeeMdApi from .md_api import BeeMdApiApp from .td_api import BeeTdApi from .td_api import BeeTdApiApp __all__ = [BeeMdApiApp, BeeMdApi, BeeTdApi, BeeTdApiApp]
[ 6738, 764, 9132, 62, 15042, 1330, 24719, 44, 67, 32, 14415, 198, 6738, 764, 9132, 62, 15042, 1330, 24719, 44, 67, 32, 14415, 4677, 198, 6738, 764, 8671, 62, 15042, 1330, 24719, 51, 67, 32, 14415, 198, 6738, 764, 8671, 62, 15042, 133...
2.168675
83
# -*- coding: utf-8 -*- import pymongo from pymongo.errors import DuplicateKeyError from settings import MONGO_HOST, MONGO_PORT import pymysql # twisted: 用于异步写入(包含数据库)的框架,cursor.execute()是同步写入 from twisted.enterprise import adbapi
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 11748, 279, 4948, 25162, 198, 6738, 279, 4948, 25162, 13, 48277, 1330, 49821, 5344, 9218, 12331, 198, 6738, 6460, 1330, 25000, 11230, 62, 39, 10892, 11, 25000, 11230, 62, ...
2.017544
114
from tlh.const import RomVariant from dataclasses import dataclass from sortedcontainers import SortedKeyList from bisect import bisect_left, bisect_right from intervaltree import Interval, IntervalTree @dataclass class Constraint: """ A constraint defines that two local addresses of different rom variants sho...
[ 6738, 256, 75, 71, 13, 9979, 1330, 3570, 23907, 415, 198, 6738, 4818, 330, 28958, 1330, 4818, 330, 31172, 198, 6738, 23243, 3642, 50221, 1330, 311, 9741, 9218, 8053, 198, 6738, 47457, 478, 1330, 47457, 478, 62, 9464, 11, 47457, 478, 6...
3.455752
452
import numpy as np import argparse from skopt.benchmarks import branin from skopt import gp_minimize from skopt import forest_minimize from skopt import gbrt_minimize from skopt import dummy_minimize if __name__ == "__main__": repeat_num = 10 max_call = 200 optimizers = [("gp_minimize", gp_minimize), ...
[ 11748, 299, 32152, 355, 45941, 198, 11748, 1822, 29572, 198, 198, 6738, 1341, 8738, 13, 26968, 14306, 1330, 865, 272, 259, 198, 6738, 1341, 8738, 1330, 27809, 62, 1084, 48439, 198, 6738, 1341, 8738, 1330, 8222, 62, 1084, 48439, 198, 673...
2.130184
868
import pytest import datetime import pandas as pd import pyarrow as pa import numpy as np from arrow_pd_parser.parse import ( pa_read_csv_to_pandas, pa_read_json_to_pandas, ) @pytest.mark.parametrize( "in_type,pd_timestamp_type,out_type", [ ("timestamp[s]", "datetime_object", "object"), ...
[ 11748, 12972, 9288, 198, 11748, 4818, 8079, 198, 11748, 19798, 292, 355, 279, 67, 198, 11748, 12972, 6018, 355, 14187, 198, 11748, 299, 32152, 355, 45941, 198, 6738, 15452, 62, 30094, 62, 48610, 13, 29572, 1330, 357, 198, 220, 220, 220,...
2.170338
681
''' Date: 2022.01.26 15:01:37 Description: 仿射密码 LastEditors: Rustle Karl LastEditTime: 2022.01.26 15:27:13 ''' from math import gcd def get_multiplicative_inverse(a): '''求乘法逆,这里只是简单列举''' return { 1: 1, 3: 9, 9: 3, 5: 21, 21: 5, 7: 15, 15: 7, 11: 19, 19: 11, 17:...
[ 7061, 6, 198, 10430, 25, 33160, 13, 486, 13, 2075, 1315, 25, 486, 25, 2718, 198, 11828, 25, 220, 20015, 123, 22887, 226, 43380, 228, 163, 254, 223, 198, 5956, 18378, 669, 25, 17103, 293, 15415, 198, 5956, 18378, 7575, 25, 33160, 13,...
1.635036
274
import torch from .layer import VarPropagationLayer from .layer_utils import get_jacobian_loop
[ 11748, 28034, 198, 6738, 764, 29289, 1330, 12372, 24331, 363, 341, 49925, 198, 6738, 764, 29289, 62, 26791, 1330, 651, 62, 30482, 672, 666, 62, 26268, 220, 198 ]
3.428571
28
import smtplib from converter.simple import UnicodeMessage import logging logger = logging.getLogger(__name__) class Sender: ''' Class that is responsible of sending emails. It uses a specified SMTP server. ''' def send(self, msg, *recipients): ''' Sends the given UnicodeMessage to e...
[ 11748, 895, 83, 489, 571, 198, 198, 6738, 38394, 13, 36439, 1330, 34371, 12837, 198, 198, 11748, 18931, 198, 6404, 1362, 796, 18931, 13, 1136, 11187, 1362, 7, 834, 3672, 834, 8, 198, 198, 4871, 311, 2194, 25, 198, 220, 220, 220, 705...
2.572453
697
from faker import Faker fake = Faker("Ru-ru")
[ 6738, 277, 3110, 1330, 376, 3110, 198, 198, 30706, 796, 376, 3110, 7203, 40464, 12, 622, 4943, 628 ]
2.666667
18
from urllib.request import Request, urlopen import urllib import requests import pandas as pd from xlwt import Workbook from bs4 import BeautifulSoup import sys import time import random url_list = ["https://www.google.com/search?q=Thomas+Muntzer+Strasse+122+parking+Gamstadt", "https://www.google.com/search?q=Bierweg+...
[ 6738, 2956, 297, 571, 13, 25927, 1330, 19390, 11, 19016, 9654, 198, 11748, 2956, 297, 571, 198, 11748, 7007, 198, 11748, 19798, 292, 355, 279, 67, 198, 6738, 2124, 75, 46569, 1330, 5521, 2070, 198, 6738, 275, 82, 19, 1330, 23762, 50, ...
2.292095
248,440
from .base import BaseData __all__ = [ "BaseData", ]
[ 6738, 764, 8692, 1330, 7308, 6601, 198, 198, 834, 439, 834, 796, 685, 198, 220, 220, 220, 366, 14881, 6601, 1600, 198, 60, 198 ]
2.416667
24
from django.shortcuts import render from isodate import parse_duration from rest_framework import viewsets from rest_framework.decorators import action from rest_framework.response import Response from rest_framework_extensions.mixins import NestedViewSetMixin from .models import Hospital, AppointmentSlot from .seriali...
[ 6738, 42625, 14208, 13, 19509, 23779, 1330, 8543, 198, 6738, 318, 375, 378, 1330, 21136, 62, 32257, 198, 6738, 1334, 62, 30604, 1330, 5009, 1039, 198, 6738, 1334, 62, 30604, 13, 12501, 273, 2024, 1330, 2223, 198, 6738, 1334, 62, 30604, ...
4.130841
107
# -*- coding: utf-8 -*- import pymysql import sys # test code # myopenid = "kdhfskgadfvbsdvkjgkaghsdzfkigv_dgfjsdzfvbjazsgdcfvgh" # p1 = 1000000.0 # p2 = 4000000.0 # stockid = "" # user_setting = '设置' + ' ' + str(p1) + ' ' + str(p2) + ' ' # mi = mysql_interaction() # mi.mysql_connect() # mi.create_table() # mi.update...
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 11748, 279, 4948, 893, 13976, 198, 11748, 25064, 628, 198, 2, 1332, 2438, 198, 2, 616, 9654, 312, 796, 366, 74, 34985, 69, 8135, 70, 324, 69, 85, 1443, 67, 85, 42421...
2.178808
302
import os import re from sqlalchemy import Table from nose.plugins.skip import SkipTest from ckan.model import Session, repo, meta, engine_is_sqlite from ckanext.spatial.model.package_extent import setup as spatial_db_setup, define_spatial_tables from ckanext.harvest.model import setup as harvest_model_setup
[ 11748, 28686, 198, 11748, 302, 198, 198, 6738, 44161, 282, 26599, 1330, 8655, 198, 6738, 9686, 13, 37390, 13, 48267, 1330, 32214, 14402, 198, 198, 6738, 269, 27541, 13, 19849, 1330, 23575, 11, 29924, 11, 13634, 11, 3113, 62, 271, 62, ...
3.270833
96
# Copyright 2013-2019 Lawrence Livermore National Security, LLC and other # Spack Project Developers. See the top-level COPYRIGHT file for details. # # SPDX-License-Identifier: (Apache-2.0 OR MIT) from spack import * class Minisign(CMakePackage): """Minisign is a dead simple tool to sign files and verify signatu...
[ 2, 15069, 2211, 12, 23344, 13914, 45036, 3549, 2351, 4765, 11, 11419, 290, 584, 198, 2, 1338, 441, 4935, 34152, 13, 4091, 262, 1353, 12, 5715, 27975, 38162, 9947, 2393, 329, 3307, 13, 198, 2, 198, 2, 30628, 55, 12, 34156, 12, 33234,...
2.720812
197
import aiohttp import asyncio from pyhifiberry import audiocontrol2 if __name__ == "__main__": asyncio.get_event_loop().run_until_complete(main())
[ 11748, 257, 952, 4023, 198, 11748, 30351, 952, 198, 6738, 12972, 71, 361, 1856, 563, 1330, 40504, 420, 756, 3225, 17, 198, 198, 361, 11593, 3672, 834, 6624, 366, 834, 12417, 834, 1298, 198, 220, 220, 220, 30351, 952, 13, 1136, 62, 1...
2.763636
55
""" 训练 DataLoaderStock 及 相关的 Wrapper """ import datetime import logging import numpy as np import pandas as pd from QUANTAXIS.QAFetch.QAQuery_Advance import \ QA_fetch_stock_block_adv as get_block from LSTM_for_Stock.data_processor import DataLoader from LSTM_for_Stock.data_processor import DataLoaderStock from L...
[ 37811, 198, 164, 106, 255, 163, 119, 225, 6060, 17401, 26207, 10263, 237, 232, 13328, 249, 116, 17739, 111, 21410, 27323, 2848, 198, 37811, 198, 11748, 4818, 8079, 198, 11748, 18931, 198, 198, 11748, 299, 32152, 355, 45941, 198, 11748, ...
2.256098
410
import matplotlib.pyplot as plt import numpy as np import os import json import seaborn as sns import re sns.set(style="darkgrid") num_params_list = [10, 2010, 4010, 6010, 8010, 10010, 20010, 30010, 40010] def natural_keys(text): ''' alist.sort(key=natural_keys) sorts in human order http://ne...
[ 11748, 2603, 29487, 8019, 13, 9078, 29487, 355, 458, 83, 201, 198, 11748, 299, 32152, 355, 45941, 201, 198, 11748, 28686, 201, 198, 11748, 33918, 201, 198, 11748, 384, 397, 1211, 355, 3013, 82, 201, 198, 11748, 302, 201, 198, 201, 198...
2.44403
536
import unittest from kyu6.dig_pow import dig_pow
[ 11748, 555, 715, 395, 198, 198, 6738, 479, 24767, 21, 13, 12894, 62, 79, 322, 1330, 3100, 62, 79, 322, 628 ]
2.428571
21
import tensorflow as tf from tensorflow import keras import numpy as np import matplotlib.pyplot as plt from PIL import Image import glob from sklearn.metrics import confusion_matrix from sklearn.metrics import plot_confusion_matrix classes = {'Arch': 0, 'Left Loop': 1, 'Right Loop': 2, 'Whorl': 3} class_n...
[ 11748, 11192, 273, 11125, 355, 48700, 201, 198, 6738, 11192, 273, 11125, 1330, 41927, 292, 201, 198, 11748, 299, 32152, 355, 45941, 201, 198, 11748, 2603, 29487, 8019, 13, 9078, 29487, 355, 458, 83, 201, 198, 6738, 350, 4146, 1330, 7412...
2.295643
2,777
"""A simple REST json client using `requests`_ for the http connection. .. _requests: http://docs.python-requests.org The REST protocol is built on http(s), with the body containing a json-encoded dictionary as necessary. """ # fmt:off import asyncio import logging import os import time from typing import Any, Call...
[ 37811, 32, 2829, 30617, 33918, 5456, 1262, 4600, 8897, 3558, 63, 62, 329, 262, 2638, 4637, 13, 198, 198, 492, 4808, 8897, 3558, 25, 2638, 1378, 31628, 13, 29412, 12, 8897, 3558, 13, 2398, 198, 198, 464, 30617, 8435, 318, 3170, 319, ...
2.243982
3,656
import argparse import json import sys from collections import OrderedDict from pathlib import Path import numpy as np import pandas as pd from scipy.stats import pearsonr from wn.path import WordNetPaths from sts_wrldom.corpusReader import read_data from sts_wrldom.utils import accuracy, get_scores, log_frame, rmse ...
[ 11748, 1822, 29572, 198, 11748, 33918, 198, 11748, 25064, 198, 6738, 17268, 1330, 14230, 1068, 35, 713, 198, 6738, 3108, 8019, 1330, 10644, 198, 198, 11748, 299, 32152, 355, 45941, 198, 11748, 19798, 292, 355, 279, 67, 198, 6738, 629, 5...
2.05236
2,903
import cv2 as cv import sys faceProto = "datasets/opencv_face_detector.pbtxt" faceModel = "datasets/opencv_face_detector_uint8.pb" genderProto = "datasets/gender_deploy.prototxt" genderModel = "datasets/gender_net.caffemodel" MODEL_MEAN_VALUES = (78.4263377603, 87.7689143744, 114.895847746) genderList = ['Ma...
[ 11748, 269, 85, 17, 355, 269, 85, 201, 198, 11748, 25064, 201, 198, 201, 198, 2550, 2964, 1462, 796, 366, 19608, 292, 1039, 14, 9654, 33967, 62, 2550, 62, 15255, 9250, 13, 40842, 14116, 1, 201, 198, 2550, 17633, 796, 366, 19608, 292...
2.344
625
from rest_framework import serializers from ..models import Form
[ 6738, 1334, 62, 30604, 1330, 11389, 11341, 198, 198, 6738, 11485, 27530, 1330, 5178, 628 ]
4.466667
15
from netapp.netapp_object import NetAppObject class GpoGpresultInfo(NetAppObject): """ GPO RSoP(Resultant Set of Policy) that is currently defined on the Active Directory for a CIFS-enabled Vserver. When returned as part of the output, all elements of this typedef are reported, unless limited by a ...
[ 6738, 2010, 1324, 13, 3262, 1324, 62, 15252, 1330, 3433, 4677, 10267, 198, 198, 4871, 402, 7501, 38, 18302, 586, 12360, 7, 7934, 4677, 10267, 2599, 198, 220, 220, 220, 37227, 198, 220, 220, 220, 14714, 46, 371, 2396, 47, 7, 23004, 4...
2.263226
3,081
from conans import ConanFile, CMake
[ 6738, 369, 504, 1330, 31634, 8979, 11, 327, 12050, 198 ]
3.6
10
''' (c) University of Liverpool 2019 All rights reserved. @author: neilswainston ''' # pylint: disable=invalid-name # pylint: disable=wrong-import-order import math from sklearn.linear_model import LinearRegression from liv_learn.utils import coeff_corr import matplotlib.pyplot as plt def plot_histogram(data, xla...
[ 7061, 6, 198, 7, 66, 8, 2059, 286, 11761, 13130, 198, 198, 3237, 2489, 10395, 13, 198, 198, 31, 9800, 25, 497, 346, 2032, 391, 3743, 198, 7061, 6, 198, 2, 279, 2645, 600, 25, 15560, 28, 259, 12102, 12, 3672, 198, 2, 279, 2645, ...
2.241983
1,029
# -*- coding: utf-8 -*- __author__ = "Daniel1147 (sxn91401@gmail.com)" __license__ = "Apache 2.0" # standard library from abc import ABC, abstractmethod class ServerConfig(ABC): """ The configuration for starting up the eureka server. It allows clients to override the entities through setters. """ ...
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 198, 834, 9800, 834, 796, 366, 19962, 1157, 2857, 357, 82, 87, 77, 24, 1415, 486, 31, 14816, 13, 785, 16725, 198, 834, 43085, 834, 796, 366, 25189, 4891, 362, 13, 15...
2.761905
168
import json import os import shutil import time import urllib from collections import namedtuple import utility as util import unittest import filecmp import os.path
[ 11748, 33918, 198, 11748, 28686, 198, 11748, 4423, 346, 198, 11748, 640, 198, 11748, 2956, 297, 571, 198, 6738, 17268, 1330, 3706, 83, 29291, 198, 11748, 10361, 355, 7736, 198, 11748, 555, 715, 395, 198, 11748, 2393, 48991, 198, 11748, ...
3.837209
43
import base64 import os import unittest from unittest.mock import patch import yaml from click.testing import CliRunner from keeper_secrets_manager_core.core import SecretsManager from keeper_secrets_manager_core.storage import InMemoryKeyValueStorage from keeper_secrets_manager_core.configkeys import ConfigKeys from ...
[ 11748, 2779, 2414, 198, 11748, 28686, 198, 11748, 555, 715, 395, 198, 6738, 555, 715, 395, 13, 76, 735, 1330, 8529, 198, 198, 11748, 331, 43695, 198, 6738, 3904, 13, 33407, 1330, 1012, 72, 49493, 198, 6738, 28356, 62, 2363, 8004, 62, ...
3.648438
128
""" The MIT License (MIT) Copyright (c) 2018 Zuse Institute Berlin, www.zib.de Permissions are granted as stated in the license file you have obtained with this software. If you find the library useful for your purpose, please refer to README.md for how to cite IPET. @author: Gregor Hendel """ from .StatisticReader ...
[ 37811, 198, 464, 17168, 13789, 357, 36393, 8, 198, 198, 15269, 357, 66, 8, 2864, 1168, 1904, 5136, 11307, 11, 7324, 13, 89, 571, 13, 2934, 198, 198, 5990, 8481, 389, 7520, 355, 5081, 287, 262, 5964, 2393, 345, 423, 6492, 198, 4480, ...
2.41994
1,324
# Copyright 2021 Rikai Authors # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in wri...
[ 2, 220, 15069, 33448, 50067, 1872, 46665, 198, 2, 198, 2, 220, 49962, 739, 262, 24843, 13789, 11, 10628, 362, 13, 15, 357, 1169, 366, 34156, 15341, 198, 2, 220, 345, 743, 407, 779, 428, 2393, 2845, 287, 11846, 351, 262, 13789, 13, ...
2.41065
2,216
import click from nbzz.util.bee_key import decrypt_privatekey_from_bee_keyfile,keyfile from nbzz.util.config import load_config from web3 import Web3 from typing import Dict from nbzz.util.default_root import DEFAULT_ROOT_PATH import plyvel from nbzz.rpc.xdai_rpc import connect_w3,get_model_contract,send_transaction fr...
[ 11748, 3904, 198, 6738, 299, 65, 3019, 13, 22602, 13, 20963, 62, 2539, 1330, 42797, 62, 19734, 2539, 62, 6738, 62, 20963, 62, 2539, 7753, 11, 2539, 7753, 198, 6738, 299, 65, 3019, 13, 22602, 13, 11250, 1330, 3440, 62, 11250, 198, 67...
2.950739
406
# Copyright 2017, OpenCensus Authors # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in w...
[ 2, 15069, 2177, 11, 4946, 34, 7314, 46665, 198, 2, 198, 2, 49962, 739, 262, 24843, 13789, 11, 10628, 362, 13, 15, 357, 1169, 366, 34156, 15341, 198, 2, 345, 743, 407, 779, 428, 2393, 2845, 287, 11846, 351, 262, 13789, 13, 198, 2, ...
3.729537
281
from analyze.calc_run import * base = 'G:/Prive/MIJN-Documenten/TU/62-Stage/20180202-l/' d=-5 # calc_run(base + 'run1b', # REACTOR_GLASS_SHORT_QUAD, # scope_multiple=True, # scope_file_name_index=2, # lengt # meas=SHORT_MEAS_LEN, # current_scaling=0.5, # delay=d,...
[ 6738, 16602, 13, 9948, 66, 62, 5143, 1330, 1635, 198, 198, 8692, 796, 705, 38, 14079, 47, 11590, 14, 8895, 41, 45, 12, 24941, 268, 14, 51, 52, 14, 5237, 12, 29391, 14, 1264, 1795, 19004, 12, 75, 14, 6, 198, 67, 10779, 20, 198, ...
1.69209
708
import numpy as np from openmdao.api import Group, Problem from hyperloop.Python.tube import propulsion_mechanics
[ 11748, 299, 32152, 355, 45941, 198, 6738, 1280, 9132, 5488, 13, 15042, 1330, 4912, 11, 20647, 198, 198, 6738, 8718, 26268, 13, 37906, 13, 29302, 1330, 38873, 62, 1326, 3147, 873, 198 ]
3.59375
32
import glob import sys ##### creatin dict that will have all control positions ##### EXECUTION ###### MHpath = sys.argv[1] ID_con = sys.argv[2] ID_cas = sys.argv[3] OutPath = sys.argv[4] DP = sys.argv[5] if "ND" in DP: con_MH = MHpath + "/ND-" + ID_con + "/final.passed.tsv" cas_MH = MHpath + "/ND-" + ID_cas + "/...
[ 11748, 15095, 198, 11748, 25064, 198, 198, 4242, 2, 1827, 259, 8633, 326, 481, 423, 477, 1630, 6116, 628, 198, 4242, 2, 7788, 2943, 35354, 46424, 2, 198, 198, 36208, 6978, 796, 25064, 13, 853, 85, 58, 16, 60, 198, 2389, 62, 1102, ...
2.206478
247
import math import numpy as np import tensorflow as tf import torch from torch import nn import torch.nn.functional as F import math from tener.misc.pretty_print import print_info def make_positions(tensor, padding_idx=0): """Replace non-padding symbols with their position numbers. Position numbers begin...
[ 11748, 10688, 198, 198, 11748, 299, 32152, 355, 45941, 198, 11748, 11192, 273, 11125, 355, 48700, 198, 198, 11748, 28034, 198, 6738, 28034, 1330, 299, 77, 198, 11748, 28034, 13, 20471, 13, 45124, 355, 376, 198, 11748, 10688, 198, 198, 6...
2.397552
2,533
# 13.3 Final, etc. # What is the difference between final, finally, and finalize?
[ 2, 1511, 13, 18, 8125, 11, 3503, 13, 198, 198, 2, 1867, 318, 262, 3580, 1022, 2457, 11, 3443, 11, 290, 2457, 1096, 30, 198 ]
3.32
25
import torch import numpy as np
[ 11748, 28034, 198, 11748, 299, 32152, 355, 45941, 628, 628 ]
3.5
10
from __future__ import absolute_import from __future__ import division from __future__ import print_function import numpy as np import tensorflow as tf
[ 6738, 11593, 37443, 834, 1330, 4112, 62, 11748, 198, 6738, 11593, 37443, 834, 1330, 7297, 198, 6738, 11593, 37443, 834, 1330, 3601, 62, 8818, 198, 198, 11748, 299, 32152, 355, 45941, 198, 11748, 11192, 273, 11125, 355, 48700, 628, 198 ]
3.875
40
# Generated by Django 2.2.16 on 2021-02-13 12:11 import django.contrib.postgres.fields.jsonb from django.db import migrations
[ 2, 2980, 515, 416, 37770, 362, 13, 17, 13, 1433, 319, 33448, 12, 2999, 12, 1485, 1105, 25, 1157, 198, 198, 11748, 42625, 14208, 13, 3642, 822, 13, 7353, 34239, 13, 25747, 13, 17752, 65, 198, 6738, 42625, 14208, 13, 9945, 1330, 15720...
2.844444
45
# Generated by Django 2.0.8 on 2019-02-06 15:17 import django.contrib.postgres.fields.jsonb from django.db import migrations
[ 2, 2980, 515, 416, 37770, 362, 13, 15, 13, 23, 319, 13130, 12, 2999, 12, 3312, 1315, 25, 1558, 198, 198, 11748, 42625, 14208, 13, 3642, 822, 13, 7353, 34239, 13, 25747, 13, 17752, 65, 198, 6738, 42625, 14208, 13, 9945, 1330, 15720, ...
2.822222
45
import contextlib import typing import binascii import asyncio from torba.testcase import AsyncioTestCase from tests import dht_mocks from lbrynet.conf import Config from lbrynet.dht import constants from lbrynet.dht.node import Node from lbrynet.dht.peer import PeerManager from lbrynet.dht.blob_announcer import BlobAn...
[ 11748, 4732, 8019, 198, 11748, 19720, 198, 11748, 9874, 292, 979, 72, 198, 11748, 30351, 952, 198, 6738, 7332, 7012, 13, 9288, 7442, 1330, 1081, 13361, 952, 14402, 20448, 198, 6738, 5254, 1330, 288, 4352, 62, 76, 3320, 198, 6738, 18360,...
3.181818
121
# -*- coding: utf-8 -*- from .transformer_tagger import TransformerTagger __all__ = ["TransformerTagger"]
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 6738, 764, 7645, 16354, 62, 83, 7928, 1330, 3602, 16354, 51, 7928, 198, 198, 834, 439, 834, 796, 14631, 8291, 16354, 51, 7928, 8973, 198 ]
2.74359
39
""" @author axiner @version v1.0.0 @created 2022/5/4 9:17 @abstract @description @history """ import re import sys from pathlib import Path from toollib import utils, regexp from toollib.decorator import sys_required from toollib.tcli import here from toollib.tcli.base import BaseCmd from toollib.tcli.option import Op...
[ 37811, 198, 31, 9800, 7877, 7274, 198, 31, 9641, 410, 16, 13, 15, 13, 15, 198, 31, 25598, 33160, 14, 20, 14, 19, 860, 25, 1558, 198, 31, 397, 8709, 198, 31, 11213, 198, 31, 23569, 198, 37811, 198, 11748, 302, 198, 11748, 25064, ...
2.938053
113
import pytest import libvirt import jinja2 import tarfile from pathlib import Path from libvirt import libvirtError, virConnect, virDomain, virStoragePool, virStorageVol from stack.kvm import Hypervisor, VmException from unittest.mock import create_autospec, patch, call, Mock from subprocess import CompletedProcess
[ 11748, 12972, 9288, 198, 11748, 9195, 48940, 198, 11748, 474, 259, 6592, 17, 198, 11748, 13422, 7753, 198, 6738, 3108, 8019, 1330, 10644, 198, 6738, 9195, 48940, 1330, 9195, 48940, 12331, 11, 5709, 13313, 11, 5709, 43961, 11, 5709, 31425,...
3.686047
86
from __future__ import annotations import logging from typing import TYPE_CHECKING from .constants import ( MAX_FLOAT, ) from .abc import ( Model, ) from .services import ( Service, ) if TYPE_CHECKING: from typing import ( Set, Any, Dict, Generator, Tuple, ...
[ 6738, 11593, 37443, 834, 1330, 37647, 198, 198, 11748, 18931, 198, 6738, 19720, 1330, 41876, 62, 50084, 2751, 198, 198, 6738, 764, 9979, 1187, 1330, 357, 198, 220, 220, 220, 25882, 62, 3697, 46, 1404, 11, 198, 8, 198, 6738, 764, 39305...
2.292818
181
from bapa import app, mail from flask_mail import Message import os def send_email(subject=None, body=None, recipients=None): """Send an email""" msg = Message( subject=subject, body=body, recipients=recipients ) if app.config['TESTING']: #no need to send an email ...
[ 6738, 275, 32678, 1330, 598, 11, 6920, 198, 6738, 42903, 62, 4529, 1330, 16000, 198, 11748, 28686, 198, 198, 4299, 3758, 62, 12888, 7, 32796, 28, 14202, 11, 1767, 28, 14202, 11, 20352, 28, 14202, 2599, 198, 220, 220, 220, 37227, 25206...
2.256228
281
def circles(x, y, s,ax, c='b',vmin=None, vmax=None, **kwargs): """ Make a scatter of circles plot of x vs y, where x and y are sequence like objects of the same lengths. The size of circles are in data scale. Parameters ---------- x,y : scalar or array_like, shape (n, ) Input data ...
[ 4299, 13332, 7, 87, 11, 331, 11, 264, 11, 897, 11, 269, 11639, 65, 3256, 85, 1084, 28, 14202, 11, 410, 9806, 28, 14202, 11, 12429, 46265, 22046, 2599, 198, 220, 220, 220, 37227, 198, 220, 220, 220, 6889, 257, 41058, 286, 13332, 71...
2.401677
1,312
# Licensed under a 3-clause BSD style license - see LICENSE.rst import sqlalchemy import pandas as pd __all__ = ['SALTSdb'] class SALTSdb: """SALTSdb is an interface to the SALT mysql database and specifically simplifies the steps of returning objects from a call to the database Parameters --...
[ 2, 49962, 739, 257, 513, 12, 565, 682, 347, 10305, 3918, 5964, 532, 766, 38559, 24290, 13, 81, 301, 198, 198, 11748, 44161, 282, 26599, 198, 11748, 19798, 292, 355, 279, 67, 198, 198, 834, 439, 834, 796, 37250, 50, 1847, 4694, 9945,...
2.398815
1,181
# Code generated by lark_sdk_gen. DO NOT EDIT. from pylark.lark_request import RawRequestReq, _new_method_option from pylark import lark_type, lark_type_sheet, lark_type_approval import attr import typing import io @attr.s @attr.s
[ 2, 6127, 7560, 416, 300, 668, 62, 21282, 74, 62, 5235, 13, 8410, 5626, 48483, 13, 198, 198, 6738, 279, 2645, 668, 13, 75, 668, 62, 25927, 1330, 16089, 18453, 3041, 80, 11, 4808, 3605, 62, 24396, 62, 18076, 198, 6738, 279, 2645, 66...
2.724138
87
"""GTFS Fare Attributes.""" import datetime import entity import geom import util import widetime import validation
[ 37811, 38, 10234, 50, 35205, 49213, 526, 15931, 198, 11748, 4818, 8079, 198, 198, 11748, 9312, 198, 11748, 4903, 296, 198, 11748, 7736, 198, 11748, 9214, 8079, 198, 11748, 21201 ]
3.866667
30
import numpy as np import abc class SensitivityNorm(abc.ABC): """ This class defines the interface that must be implemented to compute the sensitivity norm between two values in a normed space. """ @abc.abstractmethod def compute(self, x_1, x_2): """ The compute method receive...
[ 11748, 299, 32152, 355, 45941, 198, 11748, 450, 66, 628, 198, 4871, 14173, 11365, 35393, 7, 39305, 13, 24694, 2599, 198, 220, 220, 220, 37227, 198, 220, 220, 220, 770, 1398, 15738, 262, 7071, 326, 1276, 307, 9177, 284, 24061, 262, 142...
2.861486
296
""" This module contains the full api workflow od the project sex partners It has the following methods * Upload an image to server and returns task id * Method for processing this task #/image_put curl -F "image=@fixtures/members-301f4eab458270d4ad75856b9c7962de.jpg" http://127.0.0.1:8000/api/image_put/ #/task/...
[ 37811, 198, 1212, 8265, 4909, 262, 1336, 40391, 30798, 16298, 262, 1628, 1714, 4887, 198, 198, 1026, 468, 262, 1708, 5050, 198, 198, 9, 36803, 281, 2939, 284, 4382, 290, 5860, 4876, 4686, 198, 9, 11789, 329, 7587, 428, 4876, 628, 198,...
2.59322
177
""" Provides a class that handles the fits metadata required by PypeIt. .. include common links, assuming primary doc root is up one directory .. include:: ../include/links.rst """ import os import io import string from copy import deepcopy import datetime from IPython import embed import numpy as np import yaml fr...
[ 37811, 198, 15946, 1460, 257, 1398, 326, 17105, 262, 11414, 20150, 2672, 416, 350, 2981, 1026, 13, 198, 198, 492, 2291, 2219, 6117, 11, 13148, 4165, 2205, 6808, 318, 510, 530, 8619, 198, 492, 2291, 3712, 11485, 14, 17256, 14, 28751, 1...
2.207838
34,551
#!/usr/bin/env python # -*- coding: utf-8 -* """ :authors: Guannan Ma maguannan @mythmgn :description: """ import os import sys _TOP = os.path.dirname(os.path.abspath(__file__)) + '/../' sys.path.insert(0, _TOP) from cup import err from cup import exfile from cup import unittest LOCK_FILE = './.file_test.lock'...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 198, 37811, 198, 25, 41617, 25, 198, 220, 220, 220, 1962, 1236, 272, 6669, 2153, 84, 1236, 272, 2488, 1820, 400, 76, 4593, 198...
2.281341
686
from .models import Cart, CartProduct from rest_framework import serializers
[ 6738, 764, 27530, 1330, 13690, 11, 13690, 15667, 198, 6738, 1334, 62, 30604, 1330, 11389, 11341, 628, 220, 220, 220, 220, 220, 220, 220, 220, 628, 198 ]
3.296296
27
from common.webdriver_factory import get_driver from selenium.webdriver.support.wait import WebDriverWait from selenium.webdriver.support import expected_conditions as EC from selenium.webdriver.common.by import By driver = get_driver('chrome') driver.implicitly_wait(10) driver.get('https://www.amazon.com.mx/') eleme...
[ 6738, 2219, 13, 12384, 26230, 62, 69, 9548, 1330, 651, 62, 26230, 198, 6738, 384, 11925, 1505, 13, 12384, 26230, 13, 11284, 13, 17077, 1330, 5313, 32103, 21321, 198, 6738, 384, 11925, 1505, 13, 12384, 26230, 13, 11284, 1330, 2938, 62, ...
2.904977
221
from distutils.core import setup from Cython.Build import cythonize setup(ext_modules=cythonize("stock_pyx.pyx"))
[ 6738, 1233, 26791, 13, 7295, 1330, 9058, 201, 198, 201, 198, 6738, 327, 7535, 13, 15580, 1330, 3075, 400, 261, 1096, 201, 198, 201, 198, 40406, 7, 2302, 62, 18170, 28, 948, 400, 261, 1096, 7203, 13578, 62, 9078, 87, 13, 9078, 87, ...
2.630435
46
from collections import defaultdict from oto.models.scent import CentroidSmoothing from sklearn.model_selection import train_test_split from sklearn.metrics import accuracy_score, f1_score import numpy as np dflt_metrics = ( ('accuracy', accuracy_score), ('f1', f1_score) )
[ 6738, 17268, 1330, 4277, 11600, 198, 6738, 267, 1462, 13, 27530, 13, 82, 1087, 1330, 1979, 3882, 7556, 1025, 722, 198, 6738, 1341, 35720, 13, 19849, 62, 49283, 1330, 4512, 62, 9288, 62, 35312, 198, 6738, 1341, 35720, 13, 4164, 10466, ...
3.053763
93
from command import Command, is_command from event import Event
[ 6738, 3141, 1330, 9455, 11, 318, 62, 21812, 198, 6738, 1785, 1330, 8558 ]
4.846154
13
import pygame from pygame.locals import * from lab_3.camera3d import Camera3D from lab_3.model3d import Model3D from util.events import is_quit_event from lab_3.affine_transform import * # def scale(self, k): # x, y = pygame.mouse.get_pos() # x = self._x_screen_to_world(x) # y = self._y_s...
[ 11748, 12972, 6057, 198, 6738, 12972, 6057, 13, 17946, 874, 1330, 1635, 198, 198, 6738, 2248, 62, 18, 13, 25695, 18, 67, 1330, 20432, 18, 35, 198, 6738, 2248, 62, 18, 13, 19849, 18, 67, 1330, 9104, 18, 35, 198, 6738, 7736, 13, 315...
2.333333
198
# vim:fileencoding=utf-8:noet """ python method """ # Copyright (c) 2010 - 2019, © Badassops LLC / Luc Suryo # All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are met: # # * Redistributions of source code...
[ 2, 43907, 25, 7753, 12685, 7656, 28, 40477, 12, 23, 25, 3919, 316, 198, 198, 37811, 21015, 2446, 37227, 198, 198, 2, 15069, 357, 66, 8, 220, 3050, 532, 13130, 11, 10673, 7772, 562, 2840, 11419, 1220, 7598, 311, 1601, 78, 198, 2, 1...
2.648036
1,324
import faulthandler import logging from time import time from lin_kernighan.algorithms.structures.matrix import adjacency_matrix from lin_kernighan.algorithms.utils.generator import generator from lin_kernighan.lkh_search import LKHSearch if __name__ == '__main__': size = 500 logging.basicConfig(format='%(asc...
[ 11748, 277, 2518, 400, 392, 1754, 198, 11748, 18931, 198, 6738, 640, 1330, 640, 198, 198, 6738, 9493, 62, 74, 1142, 394, 272, 13, 282, 7727, 907, 13, 7249, 942, 13, 6759, 8609, 1330, 9224, 330, 1387, 62, 6759, 8609, 198, 6738, 9493,...
2.348123
293
""""This file manages the postprocessing of the objects in the images""" import numpy as np import cv2 import json def postProcess ( fileNames =None , theDic=None, output_file_name = "output.json" ): """ this function handels the postprocessing of values, :param fileNames: if out put is written to files a...
[ 15931, 15931, 1212, 2393, 15314, 262, 1281, 36948, 286, 262, 5563, 287, 262, 4263, 37811, 198, 198, 11748, 299, 32152, 355, 45941, 198, 11748, 269, 85, 17, 198, 11748, 33918, 198, 198, 4299, 1281, 18709, 357, 2393, 36690, 796, 14202, 83...
2.594203
759
from test import image_psf_shape from test_autolens.integration.tests.imaging.runner import run_a_mock
[ 6738, 1332, 1330, 2939, 62, 862, 69, 62, 43358, 198, 6738, 1332, 62, 2306, 349, 641, 13, 18908, 1358, 13, 41989, 13, 320, 3039, 13, 16737, 1330, 1057, 62, 64, 62, 76, 735, 628 ]
3.058824
34
# -*- coding: utf-8 -*- # Copyright 2018-2019 Streamlit Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicabl...
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 2, 15069, 2864, 12, 23344, 13860, 18250, 3457, 13, 198, 2, 198, 2, 49962, 739, 262, 24843, 13789, 11, 10628, 362, 13, 15, 357, 1169, 366, 34156, 15341, 198, 2, 345, ...
2.739813
2,994
from typing import Iterable, Set if __name__ == "__main__": data = open("Day 6 Data.txt").read() data = parse_data(data) data = all_yes_in_group(data) print(sum(len(x) for x in data))
[ 6738, 19720, 1330, 40806, 540, 11, 5345, 628, 628, 198, 361, 11593, 3672, 834, 6624, 366, 834, 12417, 834, 1298, 198, 220, 220, 220, 1366, 796, 1280, 7203, 12393, 718, 6060, 13, 14116, 11074, 961, 3419, 198, 220, 220, 220, 1366, 796, ...
2.487805
82
#!/usr/bin/python3 from flask import Blueprint, request, jsonify, make_response from sqlalchemy import or_ import demjson from datetime import timedelta, datetime from .entities.publishment_log import PublishmentLog, PublishmentLogSchema from .entities.entity import Session publishment_log_api = Blueprint('publishme...
[ 2, 48443, 14629, 14, 8800, 14, 29412, 18, 198, 198, 6738, 42903, 1330, 39932, 11, 2581, 11, 33918, 1958, 11, 787, 62, 26209, 198, 6738, 44161, 282, 26599, 1330, 393, 62, 198, 11748, 1357, 17752, 198, 6738, 4818, 8079, 1330, 28805, 125...
2.551351
185
from random import randint #Haga un dado de 6 caras y muestre los resultados de 10 tiradas. d6 = Die() results = [] for roll_num in range(10): result = d6.roll_die() results.append(result) print("\n10 rollos de un dado de 6 caras:") print(results) #Haga un dado de 10 caras y muestre los resultados de 10 tira...
[ 6738, 4738, 1330, 43720, 600, 198, 198, 2, 39, 8126, 555, 288, 4533, 390, 718, 1097, 292, 331, 38779, 395, 260, 22346, 1255, 22484, 390, 838, 48965, 38768, 13, 198, 67, 21, 796, 6733, 3419, 198, 198, 43420, 796, 17635, 198, 1640, 48...
2.577855
289
# DJANGO BASE SETTINGS import os, sys from os import environ from os.path import basename from unipath import Path ########## PATH CONFIGURATION PROJECT_DIR = Path(__file__).ancestor(2) MEDIA_ROOT = PROJECT_DIR.child("media") STATIC_ROOT = PROJECT_DIR.child("static") STATICFILES_DIRS = ( PROJECT_DIR.child("style...
[ 2, 13004, 1565, 11230, 49688, 25823, 51, 20754, 198, 198, 11748, 28686, 11, 25064, 198, 6738, 28686, 1330, 551, 2268, 198, 6738, 28686, 13, 6978, 1330, 1615, 12453, 198, 6738, 555, 541, 776, 1330, 10644, 628, 198, 7804, 2235, 46490, 256...
2.723889
2,767
# -*- coding: utf-8 -*- """Tests around detection whether cookiecutter templates are cached locally.""" import io import os import pytest from cookiecutter import repository @pytest.fixture @pytest.fixture
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 198, 37811, 51, 3558, 1088, 13326, 1771, 19751, 8968, 353, 24019, 389, 39986, 15726, 526, 15931, 198, 198, 11748, 33245, 198, 11748, 28686, 198, 198, 11748, 12972, 9288, 1...
3.208955
67
# -*- coding: utf-8 -*-
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 628, 198 ]
1.733333
15
#!/usr/bin/python3 # -*- coding: utf-8 -*- if __name__ == '__main__': # lists = [2,9,5,9,4,7,1,5,4] # quick_sort(lists,0, len(lists) - 1) # print(lists) lists2 = [1,1] quick_sort2(lists2, 0, len(lists2) - 1) print lists2
[ 2, 48443, 14629, 14, 8800, 14, 29412, 18, 198, 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 628, 628, 628, 198, 361, 11593, 3672, 834, 6624, 705, 834, 12417, 834, 10354, 198, 220, 220, 220, 1303, 8341, 796, 685, 17, ...
1.901515
132
"Entry" 'Laying Out Input Forms' # Entry widgets are often used to get # field values in form-like displays. # combines labels, entries, and frames to # achieve the multiple-input display """ use Entry widgets directly lay out by rows with fixed-width labels: this and grid are best for forms """ from tkinter import...
[ 1, 30150, 1, 198, 6, 43, 8369, 3806, 23412, 39196, 6, 198, 2, 21617, 40803, 389, 1690, 973, 284, 651, 220, 198, 2, 2214, 3815, 287, 1296, 12, 2339, 11298, 13, 198, 2, 21001, 14722, 11, 12784, 11, 290, 13431, 284, 220, 198, 2, 46...
3.306785
339
import urllib.request import datetime as dt import json MAX_TIME_DIFFERENCE_MIN = 10 # function to open the JSON history file # function to load the history data from the JSON def time_in_range(start, end, x): """Return true if x is in the range [start, end]""" if start <= end: return s...
[ 11748, 2956, 297, 571, 13, 25927, 201, 198, 11748, 4818, 8079, 355, 288, 83, 201, 198, 11748, 33918, 201, 198, 201, 198, 22921, 62, 34694, 62, 35, 5064, 24302, 18310, 62, 23678, 796, 838, 201, 198, 201, 198, 2, 2163, 284, 1280, 262,...
2.472103
466
#!/usr/bin/env python import os import sys from pathlib import Path import tabulate import sacrebleu from pysimt.metrics.simnmt import AVPScorer, AVLScorer """This script should be run from within the parent folder where each pysimt experiment resides.""" if __name__ == '__main__': results = {} trglang ...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 11748, 28686, 198, 11748, 25064, 198, 198, 6738, 3108, 8019, 1330, 10644, 198, 198, 11748, 7400, 5039, 198, 11748, 5360, 260, 903, 84, 198, 198, 6738, 279, 893, 320, 83, 13, 4164, 1046...
2.244898
931
from django.urls import path, include from rest_framework.schemas import get_schema_view from rest_framework.documentation import include_docs_urls from API import views urlpatterns = [ path('', views.AllMethods.as_view(), name='all-methods'), path('docs/', include_docs_urls(title='JobSearch-docs')), path...
[ 6738, 42625, 14208, 13, 6371, 82, 1330, 3108, 11, 2291, 198, 6738, 1334, 62, 30604, 13, 1416, 4411, 292, 1330, 651, 62, 15952, 2611, 62, 1177, 198, 6738, 1334, 62, 30604, 13, 22897, 341, 1330, 2291, 62, 31628, 62, 6371, 82, 220, 198...
2.51468
579
""" Use scans with adaptive step sizes ********************************** Problem ======= Concentrate measurement in regions of high variability, taking larger strides through flat regions. Approach ======== The *plans* in bluesky can be fully adaptive, determining one step at a time. A couple built-in plans provid...
[ 37811, 198, 11041, 23824, 351, 29605, 2239, 10620, 198, 17174, 1174, 198, 198, 40781, 198, 1421, 18604, 198, 198, 3103, 1087, 4873, 15558, 287, 7652, 286, 1029, 25364, 11, 2263, 4025, 35002, 198, 9579, 6228, 7652, 13, 198, 198, 4677, 28...
3.139535
559
import os from glob import glob from ..core import containers from ..core import handles here = os.getcwd() example_data_dir = os.path.join(os.path.split(here)[0], "example_data", "_data") # print(glob(example_data_dir+"/*")) mcd_def_malonylation_file_list = os.path.join(example_data_dir, "mcd_def_malonylation",...
[ 198, 11748, 28686, 198, 6738, 15095, 1330, 15095, 198, 198, 6738, 11485, 7295, 1330, 16472, 198, 6738, 11485, 7295, 1330, 17105, 198, 198, 1456, 796, 28686, 13, 1136, 66, 16993, 3419, 198, 198, 20688, 62, 7890, 62, 15908, 796, 28686, 13...
2.625
152
#!/usr/bin/env python """A script to scrape Amazon product reviews from the web page. Copyright 2014 Heung Ming Tai 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://...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 37811, 32, 4226, 284, 42778, 6186, 1720, 8088, 422, 262, 3992, 2443, 13, 628, 198, 220, 220, 220, 15069, 1946, 679, 2150, 26980, 11144, 628, 220, 220, 220, 49962, 739, 262, 24843, 1378...
3.553125
320
import logging import platform import sys import warnings if platform.system() == "Windows": # Configure comtypes to not generate DLL bindings into # current environment, instead keeping them in memory. # Slower, but prevents dirtying environments. import comtypes.client comtypes.client.gen_dir = ...
[ 11748, 18931, 198, 11748, 3859, 198, 11748, 25064, 198, 11748, 14601, 198, 198, 361, 3859, 13, 10057, 3419, 6624, 366, 11209, 1298, 198, 220, 220, 220, 1303, 17056, 495, 401, 19199, 284, 407, 7716, 360, 3069, 34111, 656, 198, 220, 220, ...
2.724487
4,439
from gpkit import Model, Variable, Vectorize, VectorVariable, parse_variables, ureg as u from gpkit.constraints.tight import Tight import numpy as np class Payload(Model): """Payload model Variables --------- M [kg] Total Payload mass M_pax ...
[ 6738, 27809, 15813, 1330, 9104, 11, 35748, 11, 20650, 1096, 11, 20650, 43015, 11, 21136, 62, 25641, 2977, 11, 334, 2301, 355, 334, 198, 6738, 27809, 15813, 13, 1102, 2536, 6003, 13, 33464, 1330, 44643, 198, 11748, 299, 32152, 355, 45941...
2.13811
963
import matplotlib.pyplot as plt def set_default_plot_params(): """ Sets default parameters in the matplotlibrc. :return: None """ xtick = { 'top': True, 'minor.visible': True, 'direction': 'in', 'labelsize': 10 } ytick = { 'right': True, 'min...
[ 11748, 2603, 29487, 8019, 13, 9078, 29487, 355, 458, 83, 198, 198, 4299, 900, 62, 12286, 62, 29487, 62, 37266, 33529, 198, 220, 220, 220, 37227, 198, 220, 220, 220, 21394, 4277, 10007, 287, 262, 2603, 29487, 75, 2889, 66, 13, 198, 2...
1.901235
486