content
stringlengths
1
1.04M
input_ids
listlengths
1
774k
ratio_char_token
float64
0.38
22.9
token_count
int64
1
774k
#!/usr/bin/env python3 # Copyright (c) Facebook, Inc. and its affiliates. import random from typing import Any, Callable, Dict, List, Optional, Tuple, Union import augly.audio.functional as F import augly.utils as utils import numpy as np from augly.audio.utils import RNGSeed """ Base Classes for Transforms """ ...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 18, 198, 2, 15069, 357, 66, 8, 3203, 11, 3457, 13, 290, 663, 29116, 13, 198, 198, 11748, 4738, 198, 6738, 19720, 1330, 4377, 11, 4889, 540, 11, 360, 713, 11, 7343, 11, 32233, 11, 309, ...
3.438247
251
# Copyright (c) 2021 - present, Timur Shenkao # 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 required by appl...
[ 2, 15069, 357, 66, 8, 33448, 532, 1944, 11, 5045, 333, 22323, 4914, 78, 198, 2, 1439, 2489, 10395, 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, 7...
3.443114
334
# -*- coding: utf-8 -*- # Generated by Django 1.9.7 on 2016-11-08 18:16 from __future__ import unicode_literals from django.db import migrations, models import django.db.models.deletion
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 2, 2980, 515, 416, 37770, 352, 13, 24, 13, 22, 319, 1584, 12, 1157, 12, 2919, 1248, 25, 1433, 198, 6738, 11593, 37443, 834, 1330, 28000, 1098, 62, 17201, 874, 198, 1...
2.724638
69
#!/usr/bin/env python # -*- coding: utf-8 -*- # Copyright 2010 British Broadcasting Corporation and Kamaelia Contributors(1) # # (1) Kamaelia Contributors are listed in the AUTHORS file and at # http://www.kamaelia.org/AUTHORS - please extend this file, # not this notice. # # Licensed under the Apache License,...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 198, 2, 15069, 3050, 3517, 32250, 10501, 290, 509, 1689, 25418, 25767, 669, 7, 16, 8, 198, 2, 198, 2, 357, 16, 8, ...
2.626866
1,139
import datetime import marisa import sys time_begin = datetime.datetime.now() keys = [] for line in sys.stdin: keys.append(line.rstrip()) time_end = datetime.datetime.now() print "input:", time_end - time_begin time_begin = datetime.datetime.now() dic = dict() for i in range(len(keys)): dic[keys[i]] = i time_end ...
[ 11748, 4818, 8079, 198, 11748, 1667, 9160, 198, 11748, 25064, 198, 198, 2435, 62, 27471, 796, 4818, 8079, 13, 19608, 8079, 13, 2197, 3419, 198, 13083, 796, 17635, 198, 1640, 1627, 287, 25064, 13, 19282, 259, 25, 198, 220, 8251, 13, 33...
2.600733
819
""" Copyright 2021 Lukas Kreisköther 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 https://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, soft...
[ 37811, 198, 15269, 33448, 28102, 292, 25732, 1984, 9101, 490, 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, ...
2.376671
2,469
# -*- coding: utf-8 -*- # Copyright (c) 2021 PaddlePaddle Authors. All Rights Reserve. # # 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 # # U...
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 2, 15069, 357, 66, 8, 33448, 350, 37382, 47, 37382, 46665, 13, 1439, 6923, 12224, 13, 198, 2, 198, 2, 49962, 739, 262, 24843, 13789, 11, 10628, 362, 13, 15, 357, 116...
1.906173
6,107
from .pametis import * __all__ = [ 'OPT', 'configure', 'reset', 'sitemap', 'PametisException', 'AmbiguousOptions', 'BadParam', 'PametisCacheError', 'BadDomain', 'CantRemove', 'Pametis_cache', 'Sql_cache', 'postgres'...
[ 6738, 764, 79, 321, 316, 271, 1330, 1635, 198, 834, 439, 834, 796, 685, 198, 220, 220, 220, 220, 220, 220, 220, 705, 3185, 51, 3256, 198, 220, 220, 220, 220, 220, 220, 220, 705, 11250, 495, 3256, 198, 220, 220, 220, 220, 220, 22...
1.722628
274
#coding: utf-8 import re from pyquery import PyQuery as pq from lxml import etree page = ''' ''' doc = pq(page) div = doc('div').find('.proxylistitem') div.each(perser) #print d('p') #返回<p>test 1</p><p>test 2</p> #print d('p').html() #返回test 1 #print d('p').eq(1).html() #返回test 2
[ 2, 66, 7656, 25, 3384, 69, 12, 23, 198, 11748, 302, 198, 6738, 12972, 22766, 1330, 9485, 20746, 355, 279, 80, 198, 6738, 300, 19875, 1330, 2123, 631, 198, 198, 7700, 796, 705, 7061, 628, 198, 7061, 6, 628, 198, 15390, 796, 279, 80...
2.125926
135
"""Classes and functions used by multiple modules in the system.""" import uuid from hashlib import md5 import bcrypt from voluptuous import Invalid, MultipleInvalid def token(): """ Generate a random but insecure token. Returns: The randomly generated token """ return str(uuid.uuid4()....
[ 37811, 9487, 274, 290, 5499, 973, 416, 3294, 13103, 287, 262, 1080, 526, 15931, 198, 11748, 334, 27112, 198, 6738, 12234, 8019, 1330, 45243, 20, 198, 198, 11748, 275, 29609, 198, 6738, 2322, 37623, 5623, 1330, 17665, 11, 20401, 44651, 6...
2.499157
1,186
import numpy as np import matplotlib.pyplot as plt import os from keras import layers, optimizers from keras.models import Model, Sequential from keras.layers import Dense, LSTM, Dropout from keras import optimizers, regularizers from tensorflow import keras from tensorflow.keras import layers from train_model import ...
[ 198, 11748, 299, 32152, 355, 45941, 198, 11748, 2603, 29487, 8019, 13, 9078, 29487, 355, 458, 83, 198, 11748, 28686, 198, 6738, 41927, 292, 1330, 11685, 11, 6436, 11341, 198, 6738, 41927, 292, 13, 27530, 1330, 9104, 11, 24604, 1843, 198...
2.678571
196
from firebase_admin import storage
[ 6738, 2046, 8692, 62, 28482, 1330, 6143 ]
4.857143
7
# Do not REMOVE
[ 2, 2141, 407, 22657, 46, 6089, 198 ]
2.285714
7
from gym.envs.registration import register register( id='SimpleFlappy-v0', entry_point='gym_simpleflappy.envs:FlappyEnv', ) register( id='SimpleFlappyDistance-v0', entry_point='gym_simpleflappy.envs:FlappyEnvDistance', )
[ 6738, 11550, 13, 268, 14259, 13, 2301, 33397, 1330, 7881, 198, 198, 30238, 7, 198, 220, 220, 220, 4686, 11639, 26437, 7414, 7774, 12, 85, 15, 3256, 198, 220, 220, 220, 5726, 62, 4122, 11639, 1360, 76, 62, 36439, 2704, 7774, 13, 268,...
2.463918
97
from gym.scoreboard.registration import add_task, add_group add_group( id='bandits', name='Bandits', description='Various N-Armed Bandit environments' ) add_task( id='BanditTwoArmedDeterministicFixed-v0', group='bandits', experimental=True, contributor='jkcooper2', summary="Simplest b...
[ 6738, 11550, 13, 26675, 3526, 13, 2301, 33397, 1330, 751, 62, 35943, 11, 751, 62, 8094, 628, 198, 2860, 62, 8094, 7, 198, 220, 220, 220, 4686, 11639, 3903, 896, 3256, 198, 220, 220, 220, 1438, 11639, 31407, 896, 3256, 198, 220, 220,...
2.93978
3,454
from django import forms from django.contrib.auth import forms as auth_forms from django.contrib.auth.models import User from books.widgets import NoNameTextInput # TODO: Might be good to update this later to update the username too so we aren't doing two database saves PRODUCTS = [ ('ebook', 'eBook Only')...
[ 6738, 42625, 14208, 1330, 5107, 198, 198, 6738, 42625, 14208, 13, 3642, 822, 13, 18439, 1330, 5107, 355, 6284, 62, 23914, 198, 6738, 42625, 14208, 13, 3642, 822, 13, 18439, 13, 27530, 1330, 11787, 198, 198, 6738, 3835, 13, 28029, 11407,...
3.228814
118
# -*- coding: utf-8 -*- """ It generates plots that shows similarity for anomalies in each dataset. """ import copy import math import numpy as np import matplotlib import matplotlib.mlab import matplotlib.pyplot as plt from matplotlib import gridspec import nslkdd.preprocessing as preprocessing import nslkdd.data.mo...
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 37811, 198, 1026, 18616, 21528, 326, 2523, 26789, 329, 35907, 287, 1123, 27039, 13, 198, 37811, 198, 198, 11748, 4866, 198, 11748, 10688, 198, 11748, 299, 32152, 355, 4594...
2.670554
343
from nose.tools import assert_equal from nose import SkipTest import random from pbtools.pbdagcon.aligngraph import *
[ 6738, 9686, 13, 31391, 1330, 6818, 62, 40496, 198, 6738, 9686, 1330, 32214, 14402, 198, 11748, 4738, 198, 6738, 279, 18347, 10141, 13, 79, 17457, 363, 1102, 13, 31494, 34960, 1330, 1635, 628, 198 ]
3.529412
34
from django.utils import timezone from django.utils.translation import gettext_lazy as _ from rest_framework import serializers from rest_framework.exceptions import ValidationError from ggongsul.member.models import Member from ggongsul.member.serializers import MemberSerializer from ggongsul.partner.models import P...
[ 6738, 42625, 14208, 13, 26791, 1330, 640, 11340, 198, 6738, 42625, 14208, 13, 26791, 13, 41519, 1330, 651, 5239, 62, 75, 12582, 355, 4808, 198, 198, 6738, 1334, 62, 30604, 1330, 11389, 11341, 198, 6738, 1334, 62, 30604, 13, 1069, 11755,...
3.725
120
import json import os import random import bottle from api import ping_response, start_response, move_response, end_response # Moving towards a tail is safe as long as that snake does not have food witihn reach. # If it is te only possible move, that move should be made anyway @bottle.route('/') @bottle.route('/...
[ 11748, 33918, 198, 11748, 28686, 198, 11748, 4738, 198, 11748, 9294, 198, 198, 6738, 40391, 1330, 29400, 62, 26209, 11, 923, 62, 26209, 11, 1445, 62, 26209, 11, 886, 62, 26209, 628, 198, 2, 26768, 3371, 257, 7894, 318, 3338, 355, 890,...
2.645367
626
""" Internal model of a report during generation """ #*************************************************************************************************** # Copyright 2015, 2019 National Technology & Engineering Solutions of Sandia, LLC (NTESS). # Under the terms of Contract DE-NA0003525 with NTESS, the U.S. Government ...
[ 37811, 18628, 2746, 286, 257, 989, 1141, 5270, 37227, 198, 2, 17174, 17174, 17174, 8162, 198, 2, 15069, 1853, 11, 13130, 2351, 8987, 1222, 14044, 23555, 286, 3837, 544, 11, 11419, 357, 11251, 7597, 737, 198, 2, 4698, 262, 2846, 286, 1...
2.399412
7,148
import pytest from datetime import datetime from update import lambda_handler import boto3 import os import json dynamodb = boto3.resource('dynamodb') table = dynamodb.Table(os.environ['TABLE_NAME']) # ------------------------------------------ # valid pattern # ----------------------------------------...
[ 11748, 12972, 9288, 198, 6738, 4818, 8079, 1330, 4818, 8079, 198, 6738, 4296, 1330, 37456, 62, 30281, 198, 11748, 275, 2069, 18, 198, 11748, 28686, 198, 11748, 33918, 198, 198, 67, 4989, 375, 65, 796, 275, 2069, 18, 13, 31092, 10786, ...
2.574944
447
from bot import DOWNLOAD_DIR, LOGGER from bot.helper.ext_utils.bot_utils import MirrorStatus, get_readable_file_size, get_readable_time from time import sleep
[ 6738, 10214, 1330, 30320, 35613, 62, 34720, 11, 41605, 30373, 198, 6738, 10214, 13, 2978, 525, 13, 2302, 62, 26791, 13, 13645, 62, 26791, 1330, 17918, 19580, 11, 651, 62, 46155, 62, 7753, 62, 7857, 11, 651, 62, 46155, 62, 2435, 198, ...
3.404255
47
#!/usr/bin/env python3 import pyaudio import sys sys.path.insert(0, "../") from pwmaudio import noALSAerror with noALSAerror(): p = pyaudio.PyAudio() info = p.get_host_api_info_by_index(0) print(p.get_host_api_count()) print(info) numdevices = info.get('deviceCount') for i in range(0, numdevi...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 18, 198, 198, 11748, 12972, 24051, 198, 11748, 25064, 198, 17597, 13, 6978, 13, 28463, 7, 15, 11, 366, 40720, 4943, 198, 198, 6738, 279, 86, 2611, 463, 952, 1330, 645, 1847, 4090, 18224, ...
2.229167
288
import sys import math import random import imp from java import jclass from controller.leds import leds from controller.message import message from controller.sensor import sensor from controller.motion_sensor import motion_sensor from controller.button import button from controller.color_sensor import color_sensor fr...
[ 11748, 25064, 198, 11748, 10688, 198, 11748, 4738, 198, 11748, 848, 198, 6738, 20129, 1330, 474, 4871, 198, 6738, 10444, 13, 992, 82, 1330, 2957, 82, 198, 6738, 10444, 13, 20500, 1330, 3275, 198, 6738, 10444, 13, 82, 22854, 1330, 12694,...
3.083516
455
# -*- coding: utf-8 -*- """OpenCTI CrowdStrike actor importer module.""" from typing import Any, Generator, List, Mapping, Optional from crowdstrike_client.api.intel.actors import Actors from crowdstrike_client.api.models import Response from crowdstrike_client.api.models.actor import Actor from pycti.connector.open...
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 37811, 11505, 4177, 40, 29452, 31584, 8674, 848, 4337, 8265, 526, 15931, 198, 198, 6738, 19720, 1330, 4377, 11, 35986, 11, 7343, 11, 337, 5912, 11, 32233, 198, 198, 6738...
2.326165
1,116
from datetime import date from zerobouncesdk import zerobouncesdk, ZBApiException, \ ZBMissingApiKeyException test()
[ 6738, 4818, 8079, 1330, 3128, 198, 6738, 1976, 263, 672, 45982, 34388, 1330, 1976, 263, 672, 45982, 34388, 11, 1168, 4339, 14415, 16922, 11, 3467, 198, 220, 220, 220, 1168, 12261, 747, 278, 32, 14415, 9218, 16922, 628, 628, 628, 628, ...
2.847826
46
#!/usr/bin/python ################################################################################# # MIT License # # Copyright (c) 2019 Aaron Jense, Amy Heidner, Dennis Heidner # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation file...
[ 2, 48443, 14629, 14, 8800, 14, 29412, 201, 198, 201, 198, 29113, 29113, 14468, 2, 201, 198, 2, 17168, 13789, 201, 198, 2, 201, 198, 2, 15069, 357, 66, 8, 13130, 12139, 449, 1072, 11, 14235, 679, 312, 1008, 11, 16902, 679, 312, 100...
3.801061
377
import numpy as np import math import logging log = logging.getLogger(__name__) def fairness_reward(actions, queues=None): """Compute Jain"s fairness index for a list of values. See http://en.wikipedia.org/wiki/Fairness_measure for fairness equations. @param values: list of values @return fairness: JF...
[ 11748, 299, 32152, 355, 45941, 198, 11748, 10688, 198, 11748, 18931, 198, 6404, 796, 18931, 13, 1136, 11187, 1362, 7, 834, 3672, 834, 8, 628, 198, 4299, 22692, 62, 260, 904, 7, 4658, 11, 43359, 28, 14202, 2599, 198, 220, 220, 220, 3...
2.580357
672
# -*- coding: utf-8 -*- import os
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 11748, 28686, 628, 628 ]
2.055556
18
print('vamos calcular seu IMC') a = float(input('Sua altura: ')) p = float(input('Seu peso: ')) n = (p/(a**2)) print(f'Seu IMC e: {n:.1f}') if n < 18.5: print('Abaixo do peso.') elif n <= 25 and n > 18.5: print('Peso ideal.') elif n < 30 and n > 25: print('Sobrepeso.') elif n <= 40 and 30 < n: print('ob...
[ 4798, 10786, 85, 321, 418, 2386, 10440, 384, 84, 8959, 34, 11537, 198, 64, 796, 12178, 7, 15414, 10786, 5606, 64, 5988, 5330, 25, 705, 4008, 198, 79, 796, 12178, 7, 15414, 10786, 4653, 84, 32317, 78, 25, 705, 4008, 198, 77, 796, 3...
1.994624
186
from unittest import TestCase import logging from supplychainpy._helpers import _data_cleansing from supplychainpy.sample_data.config import ABS_FILE_PATH #logging.basicConfig(level=logging.INFO, format='%(asctime)s - %(levelname)s - %(message)s')
[ 6738, 555, 715, 395, 1330, 6208, 20448, 198, 198, 11748, 18931, 198, 198, 6738, 5127, 7983, 9078, 13557, 16794, 364, 1330, 4808, 7890, 62, 2375, 504, 278, 198, 6738, 5127, 7983, 9078, 13, 39873, 62, 7890, 13, 11250, 1330, 29950, 62, 2...
2.988095
84
switchApp("System Preferences.app") click("1273526123226.png") click("1273526171905.png") thumbs = findAll("1273527194228.png") for t in list(thumbs)[:2]: # only take the first two dragLeft(t) # off #dragRight(t) # on #dragToMute(t)
[ 198, 31943, 4677, 7203, 11964, 49780, 13, 1324, 4943, 198, 12976, 7203, 16799, 2327, 2075, 10163, 24909, 13, 11134, 4943, 198, 12976, 7203, 16799, 2327, 2075, 1558, 1129, 2713, 13, 11134, 4943, 198, 400, 18146, 796, 1064, 3237, 7203, 1679...
2.454545
99
import os import sys from .tracking import FunctionIndexer, get_full_function_name def pytest_addoption(parser): """ Pytest hook - register command line arguments. We want to register the --func_cov argument to explicitly pass the location of the package to discover and the ignore_func_names ini sett...
[ 11748, 28686, 198, 11748, 25064, 198, 198, 6738, 764, 36280, 1330, 15553, 15732, 263, 11, 651, 62, 12853, 62, 8818, 62, 3672, 628, 198, 4299, 12972, 9288, 62, 2860, 18076, 7, 48610, 2599, 198, 220, 220, 220, 37227, 198, 220, 220, 220,...
2.339572
374
#! /usr/bin/env python from .toy_problem_test import ToyProblemTest from .reconciliation_problem_test import ReconciliationProblemTest from .reconciliation_problem_2_test import ReconciliationProblem2Test from .recon3_test import Recon3Test from .optgapc1_test import OptGapC1Test from .optgapc2_test import OptGapC2Te...
[ 2, 0, 1220, 14629, 14, 8800, 14, 24330, 21015, 628, 198, 6738, 764, 83, 726, 62, 45573, 62, 9288, 1330, 10977, 40781, 14402, 198, 6738, 764, 260, 1102, 66, 15547, 62, 45573, 62, 9288, 1330, 23419, 66, 15547, 40781, 14402, 198, 6738, ...
2.642086
556
"""Test getting/setting variables and subjacs with promoted/relative/absolute names.""" import unittest import numpy as np from openmdao.api import Problem, Group, ExecComp, IndepVarComp, DirectSolver, ParallelGroup from openmdao.utils.mpi import MPI try: from openmdao.vectors.petsc_vector import PETScVector exce...
[ 37811, 14402, 1972, 14, 33990, 9633, 290, 850, 73, 16436, 351, 13722, 14, 43762, 14, 48546, 3891, 526, 15931, 198, 198, 11748, 555, 715, 395, 198, 11748, 299, 32152, 355, 45941, 198, 6738, 1280, 9132, 5488, 13, 15042, 1330, 20647, 11, ...
3.044025
159
from django.test import TestCase from heltour.tournament.models import * from django.core.urlresolvers import reverse # For now we just have sanity checks for the templates used # This could be enhanced by verifying the context data
[ 6738, 42625, 14208, 13, 9288, 1330, 6208, 20448, 198, 6738, 932, 83, 454, 13, 83, 5138, 13, 27530, 1330, 1635, 198, 6738, 42625, 14208, 13, 7295, 13, 6371, 411, 349, 690, 1330, 9575, 198, 198, 2, 1114, 783, 356, 655, 423, 34182, 879...
3.966102
59
from skydb import SkydbTable from random import choice from string import ascii_letters table_name = ''.join([choice(ascii_letters) for i in range(20)]) import time print("Creating table") table = SkydbTable(table_name, columns=['c1','c2','c3'], seed="some_random", verbose=1) print("Added table successfully")
[ 6738, 1341, 5173, 65, 1330, 5274, 9945, 10962, 198, 6738, 4738, 1330, 3572, 198, 6738, 4731, 1330, 355, 979, 72, 62, 15653, 198, 198, 11487, 62, 3672, 796, 705, 4458, 22179, 26933, 25541, 7, 292, 979, 72, 62, 15653, 8, 329, 1312, 28...
3.088235
102
from rabbitai.db_engine_specs.athena import AthenaEngineSpec from tests.db_engine_specs.base_tests import TestDbEngineSpec
[ 6738, 22746, 1872, 13, 9945, 62, 18392, 62, 4125, 6359, 13, 265, 831, 64, 1330, 21341, 13798, 22882, 198, 6738, 5254, 13, 9945, 62, 18392, 62, 4125, 6359, 13, 8692, 62, 41989, 1330, 6208, 43832, 13798, 22882, 628 ]
3.263158
38
import os import sys import errno import math from math import * sys.path.append('../../common') from env_indigo import * if not os.path.exists(joinPathPy("out", __file__)): try: os.makedirs(joinPathPy("out", __file__)) except OSError as e: if e.errno != errno.EEXIST: raise indigo...
[ 11748, 28686, 198, 11748, 25064, 198, 11748, 11454, 3919, 198, 11748, 10688, 198, 6738, 10688, 1330, 1635, 198, 198, 17597, 13, 6978, 13, 33295, 10786, 40720, 40720, 11321, 11537, 198, 6738, 17365, 62, 521, 14031, 1330, 1635, 198, 198, 36...
2.410292
719
from builtins import str from django import forms from django.forms.widgets import TextInput from .version import Version from .constants import DEFAULT_NUMBER_BITS from .utils import convert_version_int_to_string
[ 6738, 3170, 1040, 1330, 965, 198, 198, 6738, 42625, 14208, 1330, 5107, 198, 6738, 42625, 14208, 13, 23914, 13, 28029, 11407, 1330, 8255, 20560, 198, 6738, 764, 9641, 1330, 10628, 198, 6738, 764, 9979, 1187, 1330, 5550, 38865, 62, 41359, ...
3.661017
59
''' Created on Oct 20, 2021 @author: mballance ''' from tblink_rpc_utils.idl_spec import IDLSpec from tblink_rpc_utils.input_reader import InputReader from tblink_rpc_utils.input_spec import InputSpec from tblink_rpc_utils.yaml_idl_parser import YamlIDLParser
[ 7061, 6, 198, 41972, 319, 2556, 1160, 11, 33448, 198, 198, 31, 9800, 25, 285, 1894, 590, 198, 7061, 6, 198, 6738, 256, 2436, 676, 62, 81, 14751, 62, 26791, 13, 312, 75, 62, 16684, 1330, 4522, 43, 22882, 198, 6738, 256, 2436, 676, ...
2.663265
98
import misaka as m from django import template from django.template.defaultfilters import stringfilter from django.utils.safestring import mark_safe from MedusaII.settings import MARKDOWNX_MARKDOWN_EXTENSIONS register = template.Library() @register.filter(is_safe=True) @stringfilter
[ 11748, 2984, 8130, 355, 285, 198, 6738, 42625, 14208, 1330, 11055, 198, 6738, 42625, 14208, 13, 28243, 13, 12286, 10379, 1010, 1330, 4731, 24455, 198, 6738, 42625, 14208, 13, 26791, 13, 49585, 395, 1806, 1330, 1317, 62, 21230, 198, 198, ...
3.428571
84
#! /usr/bin/env python import sys from rpython.jit.codewriter.policy import JitPolicy from rsqueakvm import model, objspace, interpreter, squeakimage # This loads an image file in advance and includes it in the # translation-output. At run-time, the defined selector is sent # to the defined SmallInteger. This way we g...
[ 2, 0, 1220, 14629, 14, 8800, 14, 24330, 21015, 198, 11748, 25064, 198, 6738, 374, 29412, 13, 45051, 13, 19815, 413, 43407, 13, 30586, 1330, 449, 270, 36727, 198, 6738, 44608, 4188, 461, 14761, 1330, 2746, 11, 26181, 13200, 11, 28846, ...
3.358407
226
from model.modelfactory import *
[ 6738, 2746, 13, 4666, 7046, 9548, 1330, 1635 ]
4
8
from cursor import Cursor from node import Node
[ 6738, 23493, 1330, 327, 21471, 198, 6738, 10139, 1330, 19081, 198, 220, 220, 220, 220, 220, 220, 220, 220, 198, 220, 220, 220, 220, 220, 220, 220, 220, 198 ]
2.275862
29
load( "@com_googlesource_gerrit_bazlets//tools:classpath.bzl", "classpath_collector", )
[ 2220, 7, 198, 220, 220, 220, 44212, 785, 62, 2188, 519, 829, 1668, 62, 1362, 799, 62, 65, 1031, 5289, 1003, 31391, 25, 4871, 6978, 13, 65, 48274, 1600, 198, 220, 220, 220, 366, 4871, 6978, 62, 33327, 273, 1600, 198, 8, 198 ]
2.232558
43
# -*- coding: utf-8 -*- import inspect import llbc class pyllbcStream(object): """ Stream class encapsulation, use to pack/unpack data sequence. """ @property def endian(self): """ Get stream endian setting(see llbc.Endian module). """ return llbc.inl.GetPyStreamE...
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 198, 11748, 10104, 198, 198, 11748, 32660, 15630, 198, 198, 4871, 12972, 297, 15630, 12124, 7, 15252, 2599, 198, 220, 220, 220, 37227, 198, 220, 220, 220, 13860, 1398, 3...
2.215063
2,297
#import hashlib #from random import randint # # def hash2(self, str1): # # result=0 # b_str1=str.encode(str1) # h=hashlib.sha1(b_str1).hexdigest() # for c in str1: # result += ord(c) # return result % self.filter_len # if __name__ == '__main__': # da...
[ 2, 11748, 12234, 8019, 198, 2, 6738, 4738, 1330, 43720, 600, 628, 220, 220, 220, 1303, 198, 220, 220, 220, 1303, 825, 12234, 17, 7, 944, 11, 965, 16, 2599, 198, 220, 220, 220, 1303, 198, 220, 220, 220, 1303, 220, 220, 220, 220, ...
1.900498
603
import os.path
[ 11748, 28686, 13, 6978, 628 ]
3.2
5
""" .. module:: Facemovie :platform: Unix, Windows :synopsis: Main class of the application. Contains the core image processing functions.Plays the role of a controller for the application, as it supports the communication layer. .. moduleauthor:: Julien Lengrand-Lambert <jlengrand@gmail.com> """ import threadi...
[ 37811, 198, 492, 8265, 3712, 13585, 368, 10739, 198, 220, 220, 1058, 24254, 25, 33501, 11, 3964, 198, 220, 220, 1058, 28869, 24608, 25, 8774, 1398, 286, 262, 3586, 13, 49850, 262, 4755, 2939, 7587, 5499, 13, 3646, 592, 262, 2597, 286,...
2.355384
1,421
#Question 24 #Implement a queue class in Python: It should support 3 APIs: #queue.top(): prints current element at front of queue #queue.pop(): takes out an element from front of queue #queue.add(): adds a new element at end of stack queue_1 = Queue() queue_1.add(12) queue_1.add(11) queue_1.add(55) queue_1.add(66) qu...
[ 2, 24361, 1987, 198, 2, 3546, 26908, 257, 16834, 1398, 287, 11361, 25, 632, 815, 1104, 513, 23113, 25, 198, 2, 36560, 13, 4852, 33529, 20842, 1459, 5002, 379, 2166, 286, 16834, 198, 2, 36560, 13, 12924, 33529, 2753, 503, 281, 5002, ...
2.430303
330
from typing import Any, Dict, List, Optional, cast from uuid import UUID from tortoise.query_utils import Q from app import models, schemas from app.services.searchers import AbstractSearcher
[ 6738, 19720, 1330, 4377, 11, 360, 713, 11, 7343, 11, 32233, 11, 3350, 198, 6738, 334, 27112, 1330, 471, 27586, 198, 198, 6738, 7619, 25678, 13, 22766, 62, 26791, 1330, 1195, 198, 198, 6738, 598, 1330, 4981, 11, 3897, 5356, 198, 6738, ...
3.611111
54
# -*- coding: utf-8 -*- """ Just for test """
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 37811, 198, 5703, 329, 1332, 198, 37811 ]
2.142857
21
import numpy as np import matplotlib.pyplot as plt if __name__ == '__main__': # tcfile = './Thermal_conductivity_Se.txt' tcfile = './Thermal_conductivity_S.txt' plt_tc(tcfile)
[ 11748, 299, 32152, 355, 45941, 220, 198, 11748, 2603, 29487, 8019, 13, 9078, 29487, 355, 458, 83, 220, 628, 198, 198, 361, 11593, 3672, 834, 6624, 705, 834, 12417, 834, 10354, 198, 197, 2, 37096, 7753, 796, 705, 19571, 35048, 7617, 62...
2.402597
77
""" Scatter plot between """ import pandas as pd import numpy as np from numpy.random import random from math import pi from bokeh.io import output_notebook output_notebook() from bokeh.io import show, output_file from bokeh.palettes import RdYlGn6 from bokeh.models import ( BasicTicker, ColorBar, LinearC...
[ 37811, 198, 3351, 1436, 7110, 1022, 198, 37811, 198, 11748, 19798, 292, 355, 279, 67, 198, 11748, 299, 32152, 355, 45941, 198, 6738, 299, 32152, 13, 25120, 1330, 4738, 198, 6738, 10688, 1330, 31028, 198, 198, 6738, 1489, 365, 71, 13, ...
1.650313
2,874
APItoken = 'ffb1bf6df27099919ca9ab63da88b1929016a7f7468d477f65241f61e1f457ab4' \ 'f53c50ead0371ce632b283b5dc803fae33b34b3601053d2bde24f4ebc921b1b' config = { 'url': 'https://q-console-api.mybluemix.net/api', 'hub': 'ibmq', 'group': 'qc-ware', 'project': 'default' }
[ 2969, 1026, 4233, 796, 705, 487, 65, 16, 19881, 21, 7568, 20233, 17032, 1129, 6888, 24, 397, 5066, 6814, 3459, 65, 1129, 1959, 27037, 64, 22, 69, 4524, 3104, 67, 32883, 69, 2996, 28872, 69, 5333, 68, 16, 69, 33032, 397, 19, 6, 346...
1.735632
174
#!/usr/bin/python # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # ...
[ 2, 48443, 14629, 14, 8800, 14, 29412, 198, 198, 2, 49962, 739, 262, 24843, 13789, 11, 10628, 362, 13, 15, 357, 1169, 366, 34156, 15341, 345, 743, 198, 2, 407, 779, 428, 2393, 2845, 287, 11846, 351, 262, 13789, 13, 921, 743, 7330, ...
3.521505
186
# # Licensed to the Apache Software Foundation (ASF) under one or more # contributor license agreements. See the NOTICE file distributed with # this work for additional information regarding copyright ownership. # The ASF licenses this file to You under the Apache License, Version 2.0 # (the "License"); you may not us...
[ 2, 198, 2, 49962, 284, 262, 24843, 10442, 5693, 357, 1921, 37, 8, 739, 530, 393, 517, 198, 2, 18920, 5964, 11704, 13, 220, 4091, 262, 28536, 2393, 9387, 351, 198, 2, 428, 670, 329, 3224, 1321, 5115, 6634, 9238, 13, 198, 2, 383, ...
3.444444
477
import argparse import numpy as np import os import sys sys.path.append('../data') sys.path.append('../plot') import torch from load import sigmoid, quadratic, chf, parkinsons, load_data_format from data_utils import parse_data, change_missing from plot_utils import plot_subtypes, plot_latent from models import Subl...
[ 11748, 1822, 29572, 198, 11748, 299, 32152, 355, 45941, 198, 11748, 28686, 198, 11748, 25064, 198, 17597, 13, 6978, 13, 33295, 10786, 40720, 7890, 11537, 198, 17597, 13, 6978, 13, 33295, 10786, 40720, 29487, 11537, 198, 198, 11748, 28034, ...
3.050847
118
from Bio.PDB import PDBParser as BioPDBParser import io import itertools from operator import itemgetter from utils.exceptions import InvalidFormat VALID_AMINOACIDS = {"A", "R", "N", "D", "C", "C", "Q", "E", "G", "H", "I", "L", "K", "M", "M", "F", "P", "O", "S", "U", "T", "W", "Y", "V", "B", "Z", "...
[ 6738, 16024, 13, 5760, 33, 1330, 350, 11012, 46677, 355, 16024, 5760, 20866, 28198, 198, 11748, 33245, 198, 11748, 340, 861, 10141, 198, 6738, 10088, 1330, 2378, 1136, 353, 198, 6738, 3384, 4487, 13, 1069, 11755, 1330, 17665, 26227, 198, ...
2.034213
1,023
import re from salmon.search.base import IdentData, SearchMixin from salmon.sources import DiscogsBase SOURCES = { "Vinyl": "Vinyl", "File": "WEB", "CD": "CD", } def sanitize_artist_name(name): """ Remove parenthentical number disambiguation bullshit from artist names, as well as the asteri...
[ 11748, 302, 198, 198, 6738, 24535, 13, 12947, 13, 8692, 1330, 11440, 6601, 11, 11140, 35608, 259, 198, 6738, 24535, 13, 82, 2203, 1330, 8444, 18463, 14881, 198, 198, 50, 2606, 7397, 1546, 796, 1391, 198, 220, 220, 220, 366, 53, 19754,...
2.605166
271
import RPi.GPIO as GPIO
[ 11748, 25812, 72, 13, 16960, 9399, 355, 50143, 198 ]
2.666667
9
import logging from django.utils.html import strip_tags from . import settings as sendgrid_settings from .signals import message_composed logger = logging.getLogger('threaded_messages') if sendgrid_settings.THREADED_MESSAGES_USE_SENDGRID: from sendgrid_parse_api.signals import email_received else: email_rec...
[ 11748, 18931, 198, 198, 6738, 42625, 14208, 13, 26791, 13, 6494, 1330, 10283, 62, 31499, 198, 198, 6738, 764, 1330, 6460, 355, 3758, 25928, 62, 33692, 198, 6738, 764, 12683, 874, 1330, 3275, 62, 5589, 1335, 198, 198, 6404, 1362, 796, ...
3.073394
109
# coding:utf-8 ''' @author = super_fazai @File : free_api_utils.py @connect : superonesfazai@gmail.com ''' """ 一些免费api 接口的封装 """ from pprint import pprint import re # from fzutils.ip_pools import tri_ip_pool # from fzutils.spider.fz_requests import Requests # from fzutils.common_utils import json_2_dict # from f...
[ 2, 19617, 25, 40477, 12, 23, 198, 198, 7061, 6, 198, 31, 9800, 796, 2208, 62, 69, 1031, 1872, 198, 31, 8979, 220, 220, 220, 1058, 1479, 62, 15042, 62, 26791, 13, 9078, 198, 31, 8443, 1058, 2208, 1952, 69, 1031, 1872, 31, 14816, ...
1.523067
10,383
#!/usr/bin/env python # -*- coding: utf-8 -*- """ test_axpy_weather ---------------------------------- Tests for `axpy_weather` module. """ import sys import unittest from axpy_weather import axpy_weather
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 198, 37811, 198, 9288, 62, 897, 9078, 62, 23563, 198, 3880, 438, 198, 198, 51, 3558, 329, 4600, 897, 9078, 62, 23563,...
2.90411
73
from setuptools import setup, find_packages setup( name="jupyterhub-configurator", version="1.0", packages=find_packages(), license="3-BSD", author="yuvipanda", author_email="yuvipanda@gmail.com", install_requires=["tornado", "aiohttp", "jupyterhub", "deepmerge", "pluggy"], include_pack...
[ 6738, 900, 37623, 10141, 1330, 9058, 11, 1064, 62, 43789, 198, 198, 40406, 7, 198, 220, 220, 220, 1438, 2625, 73, 929, 88, 353, 40140, 12, 11250, 333, 1352, 1600, 198, 220, 220, 220, 2196, 2625, 16, 13, 15, 1600, 198, 220, 220, 22...
2.310881
193
from __future__ import annotations from typing import List, Tuple, Dict try: import urequests as requests except ImportError: import requests try: import ujson as json except ImportError: import json
[ 6738, 11593, 37443, 834, 1330, 37647, 198, 6738, 19720, 1330, 7343, 11, 309, 29291, 11, 360, 713, 198, 198, 28311, 25, 198, 197, 11748, 334, 8897, 3558, 355, 7007, 198, 16341, 17267, 12331, 25, 198, 197, 11748, 7007, 198, 198, 28311, ...
3.483333
60
# Start your code below (tip: Make sure to indent your code)
[ 198, 220, 220, 220, 1303, 7253, 534, 2438, 2174, 357, 22504, 25, 6889, 1654, 284, 33793, 534, 2438, 8, 198 ]
3.3
20
import sys sys.path.append("../../") from unittest import TestCase from pmst.geometry import Point, Ray from pmst.component import Lens from pmst.microscope import Microscope import pmst.source import numpy as np # self.assertTrue(self.s.ray_list.get_ray(1) == Ray(Point(0, .5, 1), Point(0, .5, 2))) # ...
[ 11748, 25064, 198, 17597, 13, 6978, 13, 33295, 7203, 40720, 40720, 4943, 198, 198, 6738, 555, 715, 395, 1330, 6208, 20448, 198, 6738, 9114, 301, 13, 469, 15748, 1330, 6252, 11, 7760, 198, 6738, 9114, 301, 13, 42895, 1330, 30092, 198, ...
2.469274
179
import os import inspect import typing import threading from contextlib import suppress from functools import wraps def enforce_types(callable): """ From: https://stackoverflow.com/questions/50563546/validating-detailed-types-in-python-dataclasses """ spec = inspect.getfullargspec(callable) ...
[ 11748, 28686, 198, 11748, 10104, 198, 11748, 19720, 198, 11748, 4704, 278, 198, 6738, 4732, 8019, 1330, 18175, 198, 6738, 1257, 310, 10141, 1330, 27521, 628, 198, 198, 4299, 4605, 62, 19199, 7, 13345, 540, 2599, 198, 220, 220, 220, 3722...
2.791667
168
from django.db.models.signals import post_save from django.dispatch import receiver from .models import Vote from .serializers import VoteSerializer from asgiref.sync import async_to_sync import channels.layers @receiver(post_save, sender=Vote)
[ 6738, 42625, 14208, 13, 9945, 13, 27530, 13, 12683, 874, 1330, 1281, 62, 21928, 198, 6738, 42625, 14208, 13, 6381, 17147, 1330, 9733, 198, 6738, 764, 27530, 1330, 19175, 198, 6738, 764, 46911, 11341, 1330, 19175, 32634, 7509, 198, 198, ...
3.351351
74
#!/usr/bin/env python """MariaDB slave status checker""" import sys import argparse import MySQLdb class NagiosPlugin(object): """Nagios Plugin base class""" class SlaveStatusCheck(NagiosPlugin): """Class to help us run slave status queries against MariaDB""" REPLICATION_LAG_MODE = 'replication_lag' ...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 37811, 46827, 11012, 11778, 3722, 2198, 263, 37811, 198, 11748, 25064, 198, 11748, 1822, 29572, 198, 11748, 33476, 9945, 628, 198, 4871, 15196, 4267, 37233, 7, 15252, 2599, 198, 220, 220, ...
2.201621
1,974
import sys, os, platform import ocr_image_analyzer as OCR try: import PIL.Image import PIL.ImageTk except ModuleNotFoundError: print('Required libraries not found, please install PIL') if __name__ == "__main__": raise Exception('Cannot be called as main script') debug = True #***********...
[ 11748, 25064, 11, 28686, 11, 3859, 201, 198, 11748, 267, 6098, 62, 9060, 62, 38200, 9107, 355, 440, 9419, 201, 198, 28311, 25, 201, 198, 220, 220, 220, 1330, 350, 4146, 13, 5159, 201, 198, 220, 220, 220, 1330, 350, 4146, 13, 5159, ...
3.222892
166
# exercise 10.2.1 from matplotlib.pyplot import figure, show from scipy.io import loadmat from toolbox_02450 import clusterplot from scipy.cluster.hierarchy import linkage, fcluster, dendrogram # Load Matlab data file and extract variables of interest mat_data = loadmat('../Data/synth1.mat') X = mat_data['X'] y = mat_...
[ 2, 5517, 838, 13, 17, 13, 16, 198, 6738, 2603, 29487, 8019, 13, 9078, 29487, 1330, 3785, 11, 905, 198, 6738, 629, 541, 88, 13, 952, 1330, 3440, 6759, 198, 6738, 2891, 3524, 62, 40839, 1120, 1330, 13946, 29487, 198, 6738, 629, 541, ...
2.782967
364
from js9 import j app = j.tools.prefab._getBaseAppClass()
[ 6738, 44804, 24, 1330, 474, 198, 198, 1324, 796, 474, 13, 31391, 13, 3866, 36434, 13557, 1136, 14881, 4677, 9487, 3419, 628 ]
2.727273
22
#!/usr/bin/env python # Copyright (c) 2015 The Chromium Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. """Python utility that triggers and waits for tasks to complete on CTFE.""" import base64 import hashlib import json import math i...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 2, 15069, 357, 66, 8, 1853, 383, 18255, 1505, 46665, 13, 1439, 2489, 10395, 13, 198, 2, 5765, 286, 428, 2723, 2438, 318, 21825, 416, 257, 347, 10305, 12, 7635, 5964, 326, 460, 307, ...
2.589025
1,713
from dataclasses import dataclass, field from typing import Optional @dataclass
[ 6738, 4818, 330, 28958, 1330, 4818, 330, 31172, 11, 2214, 198, 6738, 19720, 1330, 32233, 628, 198, 31, 19608, 330, 31172, 198 ]
3.727273
22
import functools from flask_appify.util import request_wants_json try: from google.appengine.api import datastore_errors except ImportError: # not on the AppEngine platform datastore_errors = None __all__ = [ 'init_app', ] html_response = { 503: """<!doctype html><html><head><title>503 Service...
[ 11748, 1257, 310, 10141, 198, 198, 6738, 42903, 62, 1324, 1958, 13, 22602, 1330, 2581, 62, 86, 1187, 62, 17752, 198, 198, 28311, 25, 198, 220, 220, 220, 422, 23645, 13, 1324, 18392, 13, 15042, 1330, 4818, 459, 382, 62, 48277, 198, 1...
3.038265
392
from datetime import datetime from pathlib import Path import pytest from my_receipts.apps.receipts.parsers import TaxcomParser CURRENT_DIR = Path(__file__).resolve(strict=True).parent pytestmark = pytest.mark.django_db
[ 6738, 4818, 8079, 1330, 4818, 8079, 198, 6738, 3108, 8019, 1330, 10644, 198, 198, 11748, 12972, 9288, 198, 198, 6738, 616, 62, 260, 344, 10257, 82, 13, 18211, 13, 260, 344, 10257, 82, 13, 79, 945, 364, 1330, 9241, 785, 46677, 198, 1...
2.848101
79
# Generated by Django 3.2.9 on 2021-11-18 17:50 from django.db import migrations
[ 2, 2980, 515, 416, 37770, 513, 13, 17, 13, 24, 319, 33448, 12, 1157, 12, 1507, 1596, 25, 1120, 198, 198, 6738, 42625, 14208, 13, 9945, 1330, 15720, 602, 628 ]
2.766667
30
import sublime import sublime_plugin from structs.thread_handler import * from api.inspect import highlighting from lookup import file_type as lookup_file_type
[ 11748, 41674, 198, 11748, 41674, 62, 33803, 198, 198, 6738, 2878, 82, 13, 16663, 62, 30281, 1330, 1635, 198, 6738, 40391, 13, 1040, 806, 1330, 21292, 198, 6738, 35847, 1330, 2393, 62, 4906, 355, 35847, 62, 7753, 62, 4906, 628 ]
4.05
40
from src import *
[ 6738, 12351, 1330, 1635, 198 ]
3.6
5
from django.contrib.auth import login, logout from django.contrib.auth.decorators import login_required from django.db import transaction from django.shortcuts import render, redirect from django.views.generic import TemplateView from grocery_store.grocery_auth.forms import SignInForm, SignUpForm from grocery_store.p...
[ 6738, 42625, 14208, 13, 3642, 822, 13, 18439, 1330, 17594, 11, 2604, 448, 198, 6738, 42625, 14208, 13, 3642, 822, 13, 18439, 13, 12501, 273, 2024, 1330, 17594, 62, 35827, 198, 198, 6738, 42625, 14208, 13, 9945, 1330, 8611, 198, 6738, ...
3.7
120
# -*- coding: utf-8 -*- """ Created on Wed Nov 30 17:56:58 2016 @author: Vivian Zhong """ import click import pymc3 as pm import pandas as pd import numpy as np import matplotlib.pyplot as plt import seaborn as sns import logging @click.command() @click.option('--filename', default='data.csv', help='Fi...
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 37811, 198, 41972, 319, 3300, 5267, 1542, 1596, 25, 3980, 25, 3365, 1584, 198, 198, 31, 9800, 25, 25313, 666, 10511, 506, 198, 37811, 198, 198, 11748, 3904, 198, 11748, ...
2.167895
2,579
#!/usr/local/bin/python3 if __name__ == "__main__": arm(2)
[ 2, 48443, 14629, 14, 12001, 14, 8800, 14, 29412, 18, 198, 198, 361, 11593, 3672, 834, 6624, 366, 834, 12417, 834, 1298, 198, 220, 220, 220, 3211, 7, 17, 8, 628 ]
2.096774
31
''' TO-DO: GET BETTER RESULTS CLEAN UP THIS CODE TO GET THE SINGLE PROCESSING EASIER TO USE REDO AS A PR TO ORIGINAL REPO ''' import os import argparse from solver import Solver from data_loader import get_loader from torch.backends import cudnn # celeba_loader = get_loader(config.celeba_image_dir, config.attr_path...
[ 7061, 6, 198, 10468, 12, 18227, 25, 198, 18851, 38651, 5781, 15731, 35342, 198, 29931, 1565, 15958, 12680, 42714, 5390, 17151, 3336, 311, 2751, 2538, 41755, 7597, 2751, 412, 1921, 38311, 5390, 23210, 198, 22083, 46, 7054, 317, 4810, 5390,...
2.277641
407
# modified from https://github.com/tkipf/pygcn/blob/master/pygcn/layers.py import math import torch import torch.nn as nn from torch.nn.parameter import Parameter class GraphConvolution(nn.Module): """ Simple GCN layer, similar to https://arxiv.org/abs/1609.02907 """
[ 2, 9518, 422, 3740, 1378, 12567, 13, 785, 14, 30488, 541, 69, 14, 9078, 70, 31522, 14, 2436, 672, 14, 9866, 14, 9078, 70, 31522, 14, 75, 6962, 13, 9078, 198, 198, 11748, 10688, 198, 198, 11748, 28034, 198, 11748, 28034, 13, 20471, ...
2.663551
107
OC_OKAPI_KEY = "xxx" OC_USERNAME = "xxx" OC_PASSWORD = "xxx" OC_QUERYID = "xxx"
[ 4503, 62, 11380, 17614, 62, 20373, 796, 366, 31811, 1, 198, 4503, 62, 29904, 20608, 796, 366, 31811, 1, 198, 4503, 62, 47924, 54, 12532, 796, 366, 31811, 1, 198, 4503, 62, 10917, 19664, 2389, 796, 366, 31811, 1, 198 ]
2
40
# Copyright 2020 Google LLC # # 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, 12131, 3012, 11419, 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, 921, 743, 733...
2.407035
796
#------------------------------------------------------------------------------- # Name: MNIST TensorFlow example # Purpose: Experiments with TensorFlow # # Author: kol # # Created: 09.01.2020 # Copyright: (c) kol 2020 #------------------------------------------------------------------------------...
[ 2, 10097, 24305, 198, 2, 6530, 25, 220, 220, 220, 220, 220, 220, 220, 29060, 8808, 309, 22854, 37535, 1672, 198, 2, 32039, 25, 220, 220, 220, 220, 8170, 6800, 351, 309, 22854, 37535, 198, 2, 198, 2, 6434, 25, 220, 220, 220, 220, ...
2.462963
648
""" test data for orientation functions """ # global import numpy as np
[ 37811, 198, 9288, 1366, 329, 12852, 5499, 198, 37811, 198, 198, 2, 3298, 198, 11748, 299, 32152, 355, 45941, 628 ]
3.7
20
from dataclasses import dataclass from moonleap import Resource @dataclass
[ 6738, 4818, 330, 28958, 1330, 4818, 330, 31172, 198, 198, 6738, 8824, 293, 499, 1330, 20857, 628, 198, 31, 19608, 330, 31172, 198 ]
3.391304
23
from typing import Any, Iterable, Iterator, List, Optional, Union AnyString = Union[str, Iterable[Any]] def split_string(string: Optional[AnyString], separator: str = ",") -> List[str]: """ Breaks given *string* by the specified *separator*. If *string* is a non-``str`` iterable, then return a list if i...
[ 6738, 19720, 1330, 4377, 11, 40806, 540, 11, 40806, 1352, 11, 7343, 11, 32233, 11, 4479, 198, 198, 7149, 10100, 796, 4479, 58, 2536, 11, 40806, 540, 58, 7149, 11907, 628, 198, 4299, 6626, 62, 8841, 7, 8841, 25, 32233, 58, 7149, 1010...
2.567568
703
#======================================================================= # verilator_cffi.py #======================================================================= from __future__ import print_function import os import shutil import verilog_structural from ...tools.simulation.vcd import get_vcd_timescale from sub...
[ 2, 23926, 1421, 18604, 198, 2, 3326, 346, 1352, 62, 66, 487, 72, 13, 9078, 198, 2, 23926, 1421, 18604, 198, 198, 6738, 11593, 37443, 834, 1330, 3601, 62, 8818, 198, 198, 11748, 28686, 198, 11748, 4423, 346, 198, 198, 11748, 3326, 34...
4.640112
1,067
from django.conf.urls import include, url from django.contrib.sitemaps.views import sitemap from django.contrib.sitemaps import FlatPageSitemap, GenericSitemap, Sitemap from django.core.urlresolvers import reverse from django.contrib import admin from blog.models import Article, News, Category, Column from demoprojec...
[ 6738, 42625, 14208, 13, 10414, 13, 6371, 82, 1330, 2291, 11, 19016, 198, 6738, 42625, 14208, 13, 3642, 822, 13, 82, 9186, 1686, 13, 33571, 1330, 1650, 368, 499, 198, 6738, 42625, 14208, 13, 3642, 822, 13, 82, 9186, 1686, 1330, 21939, ...
2.003544
1,693
# -*- coding: utf-8 -*- # # Copyright 2012-2015 Spotify AB # # 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...
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 2, 198, 2, 15069, 2321, 12, 4626, 26778, 9564, 198, 2, 198, 2, 49962, 739, 262, 24843, 13789, 11, 10628, 362, 13, 15, 357, 1169, 366, 34156, 15341, 198, 2, 345, 743,...
3.438202
356
A_23_01_11 = {0: {'A': 0.076, 'C': 0.036, 'E': 0.046, 'D': -0.002, 'G': 0.043, 'F': -0.067, 'I': 0.002, 'H': 0.011, 'K': 0.104, 'M': -0.205, 'L': -0.209, 'N': -0.039, 'Q': 0.186, 'P': 0.065, 'S': 0.074, 'R': -0.03, 'T': 0.087, 'W': 0.0, 'V': -0.11, 'Y': -0.068}, 1: {'A': 0.014, 'C': 0.002, 'E': 0.031, 'D': -0.004, 'G':...
[ 32, 62, 1954, 62, 486, 62, 1157, 796, 1391, 15, 25, 1391, 6, 32, 10354, 657, 13, 2998, 21, 11, 705, 34, 10354, 657, 13, 48597, 11, 705, 36, 10354, 657, 13, 45438, 11, 705, 35, 10354, 532, 15, 13, 21601, 11, 705, 38, 10354, 657...
1.540572
1,713
import logging from .resource import BaseResource logger = logging.getLogger(__name__)
[ 11748, 18931, 198, 6738, 764, 31092, 1330, 7308, 26198, 198, 198, 6404, 1362, 796, 18931, 13, 1136, 11187, 1362, 7, 834, 3672, 834, 8, 198 ]
3.52
25
from django import forms from django.core.mail.message import EmailMessage from django.forms.widgets import Textarea
[ 6738, 42625, 14208, 1330, 5107, 198, 6738, 42625, 14208, 13, 7295, 13, 4529, 13, 20500, 1330, 9570, 12837, 198, 6738, 42625, 14208, 13, 23914, 13, 28029, 11407, 1330, 8255, 20337 ]
3.866667
30