content
stringlengths
1
1.05M
input_ids
listlengths
1
883k
ratio_char_token
float64
1
22.9
token_count
int64
1
883k
# -*- coding: utf-8 -*- from __future__ import unicode_literals import itertools as it from django.db import models, migrations def convert_status(apps, schema_editor): ''' Migrate Visit.skipped and ScheduledPhoneCall.skipped -> status (pending,missed,deleted,attended) ''' Visit = apps.get_model(...
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 6738, 11593, 37443, 834, 1330, 28000, 1098, 62, 17201, 874, 198, 11748, 340, 861, 10141, 355, 340, 198, 198, 6738, 42625, 14208, 13, 9945, 1330, 4981, 11, 15720, 602, 19...
2.435547
512
import os import sys from datetime import time import unittest sys.path.append( os.path.dirname( os.path.dirname(os.path.join("..", "..", "..", os.path.dirname("__file__"))) ) ) from core.controller import BaseTimeRangeController if __name__ == "__main__": unittest.main()
[ 11748, 28686, 198, 11748, 25064, 198, 6738, 4818, 8079, 1330, 640, 198, 11748, 555, 715, 395, 198, 198, 17597, 13, 6978, 13, 33295, 7, 198, 220, 220, 220, 28686, 13, 6978, 13, 15908, 3672, 7, 198, 220, 220, 220, 220, 220, 220, 220, ...
2.538462
117
from gtts import gTTS as ttos from pydub import AudioSegment import os
[ 6738, 308, 83, 912, 1330, 308, 51, 4694, 355, 256, 83, 418, 198, 6738, 279, 5173, 549, 1330, 13491, 41030, 434, 198, 11748, 28686, 198 ]
2.84
25
from __future__ import absolute_import from relaax.server.parameter_server import parameter_server_base from relaax.server.common import session from . import ddpg_model
[ 6738, 11593, 37443, 834, 1330, 4112, 62, 11748, 198, 6738, 823, 64, 897, 13, 15388, 13, 17143, 2357, 62, 15388, 1330, 11507, 62, 15388, 62, 8692, 198, 6738, 823, 64, 897, 13, 15388, 13, 11321, 1330, 6246, 198, 198, 6738, 764, 1330, ...
3.659574
47
# -*- coding: utf-8 -*- import json import os import pyminifier try: import io as StringIO except ImportError: import cStringIO as StringIO # lint:ok # Check to see if slimit or some other minification library is installed and # Set minify equal to slimit's minify function. try: import slimit js_mi...
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 628, 198, 11748, 33918, 198, 11748, 28686, 198, 198, 11748, 12972, 1084, 7483, 198, 198, 28311, 25, 198, 220, 220, 220, 1330, 33245, 355, 10903, 9399, 198, 16341, 17267, 12331,...
1.867706
3,719
from rtlsdr import RtlSdr from contextlib import closing from matplotlib import pyplot as plt import numpy as np from scipy.signal import spectrogram, windows from scipy import signal from skimage.io import imsave, imread from datetime import datetime import json import os from tqdm import tqdm import time from queue i...
[ 6738, 374, 83, 7278, 7109, 1330, 371, 28781, 50, 7109, 198, 6738, 4732, 8019, 1330, 9605, 198, 6738, 2603, 29487, 8019, 1330, 12972, 29487, 355, 458, 83, 198, 11748, 299, 32152, 355, 45941, 198, 6738, 629, 541, 88, 13, 12683, 282, 133...
3.018382
272
# import os TEST_DIR = os.path.abspath(os.path.dirname(__file__))
[ 2, 198, 11748, 28686, 198, 198, 51, 6465, 62, 34720, 796, 28686, 13, 6978, 13, 397, 2777, 776, 7, 418, 13, 6978, 13, 15908, 3672, 7, 834, 7753, 834, 4008, 198 ]
2.16129
31
from __future__ import print_function import argparse import os import torch import torch.nn as nn import torch.nn.functional as F from torch.autograd import Variable from torchvision import datasets, transforms from tqdm import tqdm from pyromancy import pyromq from pyromancy.losses import LossGroup, NegativeLogLik...
[ 6738, 11593, 37443, 834, 1330, 3601, 62, 8818, 198, 198, 11748, 1822, 29572, 198, 11748, 28686, 198, 198, 11748, 28034, 198, 11748, 28034, 13, 20471, 355, 299, 77, 198, 11748, 28034, 13, 20471, 13, 45124, 355, 376, 198, 6738, 28034, 13,...
1.971646
1,975
#!/usr/bin/env python import os import copy import json import numpy as np import selfdrive.messaging as messaging from selfdrive.locationd.calibration_helpers import Calibration from selfdrive.swaglog import cloudlog from common.params import Params from common.transformations.model import model_height from common.tra...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 11748, 28686, 198, 11748, 4866, 198, 11748, 33918, 198, 11748, 299, 32152, 355, 45941, 198, 11748, 2116, 19472, 13, 37348, 3039, 355, 19925, 198, 6738, 2116, 19472, 13, 24886, 67, 13, 99...
2.717172
396
import argparse import copy import logging import sys from dataclasses import dataclass from datetime import datetime, timedelta from slack_sdk import WebClient from typing import Dict, Optional, List import pytz from hunter import config from hunter.attributes import get_back_links from hunter.config import ConfigEr...
[ 11748, 1822, 29572, 198, 11748, 4866, 198, 11748, 18931, 198, 11748, 25064, 198, 6738, 4818, 330, 28958, 1330, 4818, 330, 31172, 198, 6738, 4818, 8079, 1330, 4818, 8079, 11, 28805, 12514, 198, 6738, 30740, 62, 21282, 74, 1330, 5313, 11792...
2.334926
5,443
# Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. # -*- coding: utf-8 -*- # # Configuration file for the Sphinx documentation builder. import os import sys import shutil # Check these extensions were installed. import sphinx_gallery.gen_gallery # The package should be insta...
[ 2, 15069, 357, 66, 8, 5413, 10501, 13, 1439, 2489, 10395, 13, 198, 2, 49962, 739, 262, 17168, 13789, 13, 198, 198, 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 2, 198, 2, 28373, 2393, 329, 262, 45368, 28413, 10...
3.155378
753
"""Traffic simulator code.""" import sys from os import path from traffic_sim.analysis import TrafficExperiment from traffic_sim.console import console if not __package__: _path = path.realpath(path.abspath(__file__)) sys.path.insert(0, path.dirname(path.dirname(_path))) def main(): """Run code from CL...
[ 37811, 15721, 2108, 35375, 2438, 526, 15931, 198, 198, 11748, 25064, 198, 6738, 28686, 1330, 3108, 198, 198, 6738, 4979, 62, 14323, 13, 20930, 1330, 23624, 20468, 3681, 198, 6738, 4979, 62, 14323, 13, 41947, 1330, 8624, 198, 198, 361, 4...
2.391837
245
#! /usr/bin/env python # -*- coding: UTF-8 -*- from __future__ import division,print_function,absolute_import,unicode_literals import sys import os os.chdir(sys.path[0]) sys.path.append('/mnt/sda2/github/TSF1KEV/TSFpy') from TSF_io import * #from TSF_Forth import * from TSF_shuffle import * from TSF_match import * fro...
[ 2, 0, 1220, 14629, 14, 8800, 14, 24330, 21015, 198, 2, 532, 9, 12, 19617, 25, 41002, 12, 23, 532, 9, 12, 198, 6738, 11593, 37443, 834, 1330, 7297, 11, 4798, 62, 8818, 11, 48546, 62, 11748, 11, 46903, 1098, 62, 17201, 874, 198, 1...
1.940492
773
#!/usr/bin/python # -*- coding: UTF-8 -*- import re import sys, getopt import glob import os if __name__ == "__main__": main(sys.argv[1:])
[ 2, 48443, 14629, 14, 8800, 14, 29412, 198, 2, 532, 9, 12, 19617, 25, 41002, 12, 23, 532, 9, 12, 198, 198, 11748, 302, 198, 11748, 25064, 11, 651, 8738, 198, 11748, 15095, 198, 11748, 28686, 628, 628, 628, 628, 628, 628, 628, 198, ...
2.304348
69
from pyatool import PYAToolkit # toolkit # adb PYAToolkit.bind_cmd(func_name='test_a', command='shell pm list package | grep google') # PYAToolkit.bind_func(real_func=test_b) # log PYAToolkit.switch_logger(True) # d = PYAToolkit('123456F') assert d.is_connected() # # d = PYAToolkit('123456F', mode='remote') ...
[ 6738, 12972, 265, 970, 1330, 350, 56, 1404, 970, 15813, 628, 198, 2, 2891, 15813, 628, 198, 2, 512, 65, 198, 47, 56, 1404, 970, 15813, 13, 21653, 62, 28758, 7, 20786, 62, 3672, 11639, 9288, 62, 64, 3256, 3141, 11639, 29149, 9114, ...
2.292793
666
#!/usr/bin/env python # -*- coding: utf-8 -*- from __future__ import absolute_import, print_function, division from six.moves import xrange, zip import tensorflow as tf from .tensor import Tensor
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 198, 6738, 11593, 37443, 834, 1330, 4112, 62, 11748, 11, 3601, 62, 8818, 11, 7297, 198, 6738, 2237, 13, 76, 5241, 133...
2.450549
91
""" Here we're going to code for the local rotations. We're doing an object oriented approach Left and right are in reference to the origin """ __version__ = 1.0 __author__ = 'Katie Kruzan' import string # just to get the alphabet easily iterable import sys # This just helps us in our printing from typing import Di...
[ 37811, 198, 4342, 356, 821, 1016, 284, 2438, 329, 262, 1957, 5724, 602, 13, 775, 821, 1804, 281, 2134, 25921, 3164, 198, 18819, 290, 826, 389, 287, 4941, 284, 262, 8159, 198, 37811, 198, 198, 834, 9641, 834, 796, 352, 13, 15, 198, ...
2.638797
3,624
import random import argparse import numpy as np import pandas as pd import os import time import string import torch import torch.nn as nn import torch.nn.functional as F from torch.utils.data import DataLoader from tqdm import tqdm from model import WideResnet from cifar import get_train_loader, get_val_loader from ...
[ 11748, 4738, 198, 11748, 1822, 29572, 198, 11748, 299, 32152, 355, 45941, 198, 11748, 19798, 292, 355, 279, 67, 198, 11748, 28686, 198, 11748, 640, 198, 11748, 4731, 198, 198, 11748, 28034, 198, 11748, 28034, 13, 20471, 355, 299, 77, 19...
3.048443
1,156
import pandas as pd import numpy as np import seaborn as sns import matplotlib.pyplot as plt data = pd.read_csv("data.csv") data.info() """ Data columns (total 33 columns): # Column Non-Null Count Dtype --- ------ -------------- ----- 0 id 569 no...
[ 11748, 19798, 292, 355, 279, 67, 198, 11748, 299, 32152, 355, 45941, 198, 11748, 384, 397, 1211, 355, 3013, 82, 198, 11748, 2603, 29487, 8019, 13, 9078, 29487, 355, 458, 83, 198, 198, 7890, 796, 279, 67, 13, 961, 62, 40664, 7203, 78...
2.447393
2,148
import os import numpy as np import torch import argparse from hparams import create_hparams from model import lcm from train import load_model from torch.utils.data import DataLoader from reader import TextMelIDLoader, TextMelIDCollate, id2sp from inference_utils import plot_data parser = argparse.ArgumentParser() p...
[ 11748, 28686, 198, 11748, 299, 32152, 355, 45941, 198, 11748, 28034, 198, 11748, 1822, 29572, 198, 198, 6738, 289, 37266, 1330, 2251, 62, 71, 37266, 198, 6738, 2746, 1330, 300, 11215, 198, 6738, 4512, 1330, 3440, 62, 19849, 198, 6738, 2...
2.802292
349
# Generated by Django 3.1.2 on 2020-11-29 13:25 import dalme_app.models._templates from django.conf import settings from django.db import migrations, models import django.db.models.deletion import django_currentuser.middleware import uuid import wagtail.search.index
[ 2, 2980, 515, 416, 37770, 513, 13, 16, 13, 17, 319, 12131, 12, 1157, 12, 1959, 1511, 25, 1495, 198, 198, 11748, 288, 282, 1326, 62, 1324, 13, 27530, 13557, 11498, 17041, 198, 6738, 42625, 14208, 13, 10414, 1330, 6460, 198, 6738, 426...
3.091954
87
from django.apps import AppConfig
[ 6738, 42625, 14208, 13, 18211, 1330, 2034, 16934, 628 ]
3.888889
9
# recursive_bt_maze.py # # Author: Jens Gansloser # Created On: 16 Feb 2019 import os import random import numpy as np
[ 2, 45115, 62, 18347, 62, 76, 6201, 13, 9078, 198, 2, 198, 2, 6434, 25, 449, 641, 402, 504, 75, 13416, 198, 2, 15622, 1550, 25, 1467, 3158, 13130, 198, 198, 11748, 28686, 198, 11748, 4738, 198, 11748, 299, 32152, 355, 45941, 628 ]
2.813953
43
import re import math def read_file(path): #path = input("Please enter the path of the KV File:") #path = "C:\\Steam\\steamapps\\common\\dota 2 beta\\game\\dota_addons\\heataria\\scripts\\npc\\abilities\\heataria_blaze_path.txt" try: file = open(path, "r") text = file.read() except FileNotFoundError: tex...
[ 198, 11748, 302, 198, 11748, 10688, 198, 197, 197, 198, 198, 4299, 1100, 62, 7753, 7, 6978, 2599, 198, 197, 2, 6978, 796, 5128, 7203, 5492, 3802, 262, 3108, 286, 262, 509, 53, 9220, 25, 4943, 198, 197, 2, 6978, 796, 366, 34, 25, ...
2.643617
188
#!/usr/bin/python # # This source file is part of appleseed. # Visit http://appleseedhq.net/ for additional information and resources. # # This software is released under the MIT license. # # Copyright (c) 2014-2016 Francois Beaune, The appleseedhq Organization # # Permission is hereby granted, free of charge, to any ...
[ 2, 48443, 14629, 14, 8800, 14, 29412, 198, 198, 2, 198, 2, 770, 2723, 2393, 318, 636, 286, 22514, 2308, 13, 198, 2, 16440, 2638, 1378, 1324, 829, 2308, 71, 80, 13, 3262, 14, 329, 3224, 1321, 290, 4133, 13, 198, 2, 198, 2, 770, ...
3.913819
673
from typing import List, Any import time from discord import Embed, Reaction from utils import uniquify # EMOJIS regional_indicator_A to regional_indicator_T reaction_emojies = ['\U0001F1E6', '\U0001F1E7', '\U0001F1E8', '\U0001F1E9', '\U00...
[ 6738, 19720, 1330, 7343, 11, 4377, 198, 11748, 640, 198, 6738, 36446, 1330, 13302, 276, 11, 39912, 198, 6738, 3384, 4487, 1330, 555, 1557, 1958, 198, 198, 2, 412, 11770, 41, 1797, 7915, 62, 521, 26407, 62, 32, 284, 7915, 62, 521, 26...
1.420973
658
import email.utils as em import re if __name__ == '__main__': obj = Main()
[ 11748, 3053, 13, 26791, 355, 795, 198, 11748, 302, 198, 220, 220, 220, 220, 220, 220, 220, 220, 198, 361, 11593, 3672, 834, 6624, 705, 834, 12417, 834, 10354, 198, 220, 220, 220, 26181, 796, 8774, 3419, 198 ]
2.315789
38
# -*- coding: utf-8 -*- import tensorflow as tf import random import math import os from config import FLAGS from model import Seq2Seq from dialog import Dialog if __name__ == "__main__": tf.app.run()
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 198, 11748, 11192, 273, 11125, 355, 48700, 198, 11748, 4738, 198, 11748, 10688, 198, 11748, 28686, 198, 198, 6738, 4566, 1330, 9977, 4760, 50, 198, 6738, 2746, 1330, 1001,...
2.74026
77
# Author: Alexander Fabisch <Alexander.Fabisch@dfki.de> import numpy as np from bolero.representation import BlackBoxBehavior from bolero.representation import DMPBehavior as DMPBehaviorImpl
[ 2, 6434, 25, 10009, 376, 8102, 354, 1279, 38708, 13, 37, 8102, 354, 31, 7568, 4106, 13, 2934, 29, 198, 198, 11748, 299, 32152, 355, 45941, 198, 6738, 11572, 3529, 13, 15603, 341, 1330, 2619, 14253, 25267, 15759, 198, 6738, 11572, 3529...
3.344828
58
import logging.config import tornado from bitstampws import Client as Websocket import lib.configs.logging from lib.subscribers import SimpleLoggerSubscriber logging.config.dictConfig(lib.configs.logging.d) if __name__ == '__main__': with Websocket() as client: with SimpleLoggerSubscriber(client): ...
[ 11748, 18931, 13, 11250, 198, 11748, 33718, 198, 6738, 1643, 301, 696, 18504, 1330, 20985, 355, 47736, 5459, 198, 198, 11748, 9195, 13, 11250, 82, 13, 6404, 2667, 198, 6738, 9195, 13, 7266, 40075, 364, 1330, 17427, 11187, 1362, 7004, 14...
2.445
200
import random from pprint import pformat from copy import deepcopy from utils.logger import GP_Logger from terminal_set import TerminalSet
[ 11748, 4738, 198, 6738, 279, 4798, 1330, 279, 18982, 198, 6738, 4866, 1330, 2769, 30073, 198, 6738, 3384, 4487, 13, 6404, 1362, 1330, 14714, 62, 11187, 1362, 198, 6738, 12094, 62, 2617, 1330, 24523, 7248, 198 ]
3.861111
36
# -*- coding: utf-8 -*- """ packaging package. """ from pyrin.packaging.base import Package
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 37811, 198, 8002, 3039, 5301, 13, 198, 37811, 198, 198, 6738, 279, 2417, 259, 13, 8002, 3039, 13, 8692, 1330, 15717, 628 ]
2.611111
36
#coding:utf-8 ''' filename:heapq_merge.py chap:7 subject:4-2 conditions:heapq.merge,sorted_list:lst1,lst2 lst3=merged_list(lst1,lst2) is sorted solution:heapq.merge ''' import heapq lst1 = [1,3,5,7,9] lst2 = [2,4,6,8] if __name__ == '__main__': lst3 = heapq.merge(lst1,lst...
[ 2, 66, 7656, 25, 40477, 12, 23, 198, 198, 7061, 6, 198, 220, 220, 220, 29472, 25, 258, 499, 80, 62, 647, 469, 13, 9078, 198, 220, 220, 220, 220, 220, 220, 220, 28022, 25, 22, 198, 220, 220, 220, 2426, 25, 19, 12, 17, 198, 22...
1.719626
214
"""Generated client library for serviceuser version v1.""" # NOTE: This file is autogenerated and should not be edited by hand. from apitools.base.py import base_api from googlecloudsdk.third_party.apis.serviceuser.v1 import serviceuser_v1_messages as messages
[ 37811, 8645, 515, 5456, 5888, 329, 2139, 7220, 2196, 410, 16, 526, 15931, 198, 2, 24550, 25, 770, 2393, 318, 1960, 519, 877, 515, 290, 815, 407, 307, 13012, 416, 1021, 13, 198, 6738, 2471, 270, 10141, 13, 8692, 13, 9078, 1330, 2779,...
3.447368
76
#!/usr/bin/env python3 # adapted from wav2letter/src/feature/test/MfccTest.cpp import itertools as it import os import sys from wav2letter.feature import FeatureParams, Mfcc if __name__ == "__main__": if len(sys.argv) != 2: print(f"usage: {sys.argv[0]} feature_test_data_path", file=sys.stderr) ...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 18, 198, 198, 2, 16573, 422, 266, 615, 17, 9291, 14, 10677, 14, 30053, 14, 9288, 14, 44, 69, 535, 14402, 13, 20322, 198, 198, 11748, 340, 861, 10141, 355, 340, 198, 11748, 28686, 198, 1...
2.430556
720
from tkinter import * import onetimepad if __name__ == "__main__": root=Tk() Message_Decrypt(root) root.mainloop()
[ 6738, 256, 74, 3849, 1330, 1635, 198, 11748, 319, 8079, 15636, 628, 198, 361, 11593, 3672, 834, 6624, 366, 834, 12417, 834, 1298, 198, 220, 220, 220, 6808, 28, 51, 74, 3419, 198, 220, 220, 220, 16000, 62, 10707, 6012, 7, 15763, 8, ...
2.433962
53
#!/usr/bin/env python3 from urdf2optcontrol import optimizer from matplotlib import pyplot as plt import pathlib # URDF options urdf_path = pathlib.Path(__file__).parent.joinpath('urdf', 'rrbot.urdf').absolute() root = "link1" end = "link3" in_cond = [0] * 4 my_constraints = [my_constraint1, my_constraint2] ...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 18, 198, 6738, 220, 2799, 69, 17, 8738, 13716, 1330, 6436, 7509, 198, 6738, 2603, 29487, 8019, 1330, 12972, 29487, 355, 458, 83, 220, 198, 11748, 3108, 8019, 198, 198, 2, 37902, 8068, 3689,...
2.567039
358
""" Pooled PostgreSQL database backend for Django. Requires psycopg 2: http://initd.org/projects/psycopg2 """ from django import get_version as get_django_version from django.db.backends.postgresql_psycopg2.base import \ DatabaseWrapper as OriginalDatabaseWrapper from django.db.backends.signals import connection_c...
[ 37811, 198, 27201, 276, 2947, 47701, 6831, 30203, 329, 37770, 13, 198, 198, 39618, 17331, 22163, 70, 362, 25, 2638, 1378, 15003, 67, 13, 2398, 14, 42068, 14, 13764, 22163, 70, 17, 198, 37811, 198, 6738, 42625, 14208, 1330, 651, 62, 96...
2.496559
2,034
# Skeleton from fastapi_skeleton.core import messages
[ 2, 19460, 10565, 198, 6738, 3049, 15042, 62, 82, 38800, 13, 7295, 1330, 6218, 628, 198 ]
3.5
16
# Copyright 2016 Cisco Systems, Inc. All rights reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless requir...
[ 2, 15069, 1584, 28289, 11998, 11, 3457, 13, 220, 1439, 2489, 10395, 13, 198, 2, 198, 2, 220, 220, 220, 49962, 739, 262, 24843, 13789, 11, 10628, 362, 13, 15, 357, 1169, 366, 34156, 15341, 345, 743, 198, 2, 220, 220, 220, 407, 779,...
2.217314
1,132
# Copyright 2017 The TensorFlow Authors. 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...
[ 2, 15069, 2177, 383, 309, 22854, 37535, 46665, 13, 1439, 6923, 33876, 13, 201, 198, 2, 201, 198, 2, 49962, 739, 262, 24843, 13789, 11, 10628, 362, 13, 15, 357, 1169, 366, 34156, 15341, 201, 198, 2, 345, 743, 407, 779, 428, 2393, 2...
3.614232
267
from storage.buffer import QLearningBuffer from utils.torch_utils import ExpertTransition, augmentTransition from utils.parameters import buffer_aug_type
[ 6738, 6143, 13, 22252, 1330, 1195, 41730, 28632, 198, 6738, 3384, 4487, 13, 13165, 354, 62, 26791, 1330, 25516, 8291, 653, 11, 35016, 8291, 653, 198, 6738, 3384, 4487, 13, 17143, 7307, 1330, 11876, 62, 7493, 62, 4906, 628, 628, 628 ]
3.878049
41
import torch from typing import Any, Dict, List, OrderedDict, Tuple from hlrl.core.agents import RLAgent from hlrl.core.common.wrappers import MethodWrapper
[ 11748, 28034, 198, 198, 6738, 19720, 1330, 4377, 11, 360, 713, 11, 7343, 11, 14230, 1068, 35, 713, 11, 309, 29291, 198, 198, 6738, 289, 14050, 75, 13, 7295, 13, 49638, 1330, 371, 13534, 6783, 198, 6738, 289, 14050, 75, 13, 7295, 13,...
3.057692
52
# -*- coding: utf-8 -*- PIXIVUTIL_VERSION = '20191220-beta1' PIXIVUTIL_LINK = 'https://github.com/Nandaka/PixivUtil2/releases' PIXIVUTIL_DONATE = 'https://bit.ly/PixivUtilDonation' # Log Settings PIXIVUTIL_LOG_FILE = 'pixivutil.log' PIXIVUTIL_LOG_SIZE = 10485760 PIXIVUTIL_LOG_COUNT = 10 PIXIVUTIL_LOG_FORMAT = "%(asct...
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 198, 47, 10426, 3824, 3843, 4146, 62, 43717, 796, 705, 23344, 1065, 1238, 12, 31361, 16, 6, 198, 47, 10426, 3824, 3843, 4146, 62, 43, 17248, 796, 705, 5450, 1378, 1256...
2.015528
322
from django.http import Http404 from django.shortcuts import render, redirect, reverse from django.views.generic import ListView from django.contrib.auth.decorators import login_required from django.contrib.auth.mixins import LoginRequiredMixin from django.contrib.auth.models import User from rest_framework import st...
[ 6738, 42625, 14208, 13, 4023, 1330, 367, 29281, 26429, 198, 6738, 42625, 14208, 13, 19509, 23779, 1330, 8543, 11, 18941, 11, 9575, 198, 6738, 42625, 14208, 13, 33571, 13, 41357, 1330, 7343, 7680, 220, 198, 6738, 42625, 14208, 13, 3642, ...
3.75
192
import os.path import types import sys
[ 198, 11748, 28686, 13, 6978, 198, 11748, 3858, 198, 11748, 25064, 198 ]
3.333333
12
from django.shortcuts import render from rest_framework import response from rest_framework.serializers import Serializer from . import serializers from rest_framework.response import Response from rest_framework.views import APIView from django.views import View from rest_framework import status from . models import S...
[ 6738, 42625, 14208, 13, 19509, 23779, 1330, 8543, 198, 6738, 1334, 62, 30604, 1330, 2882, 198, 6738, 1334, 62, 30604, 13, 46911, 11341, 1330, 23283, 7509, 198, 6738, 764, 1330, 11389, 11341, 198, 6738, 1334, 62, 30604, 13, 26209, 1330, ...
2.304183
1,841
from selenium import webdriver from time import sleep from selenium.webdriver.common.keys import Keys from selenium.webdriver.support import expected_conditions as EC from selenium.webdriver.common.by import By from selenium.webdriver.support.wait import WebDriverWait def Dm(driver,user,message): ''' This functio...
[ 6738, 384, 11925, 1505, 1330, 3992, 26230, 198, 6738, 640, 1330, 3993, 198, 6738, 384, 11925, 1505, 13, 12384, 26230, 13, 11321, 13, 13083, 1330, 26363, 198, 6738, 384, 11925, 1505, 13, 12384, 26230, 13, 11284, 1330, 2938, 62, 17561, 17...
2.346257
748
import requests from datetime import datetime import json from extras import Day, Lesson def send(self, url, method="get", params={}, files={}): """ Parameters ------------ url -> Represents the url to go to method -> Represents the method to use. Can be either `get` or ...
[ 11748, 7007, 198, 6738, 4818, 8079, 1330, 4818, 8079, 198, 11748, 33918, 198, 6738, 33849, 1330, 3596, 11, 12892, 261, 628, 628, 198, 220, 220, 220, 825, 3758, 7, 944, 11, 19016, 11, 2446, 2625, 1136, 1600, 42287, 34758, 5512, 3696, 3...
1.738017
2,420
''' Created on 10/11/2017 @author: jschmid3@stevens.edu Pledge: I pledge my honor that I have abided by the Stevens Honor System -Joshua Schmidt CS115 - Lab 6 ''' def isOdd(n): '''Returns whether or not the integer argument is odd.''' #question 1: base_2 of 42: 101010 if n == 0: return False ...
[ 7061, 6, 198, 41972, 319, 838, 14, 1157, 14, 5539, 198, 31, 9800, 25, 220, 220, 474, 20601, 13602, 18, 31, 4169, 574, 82, 13, 15532, 198, 47, 2965, 25, 220, 220, 220, 314, 13995, 616, 7522, 326, 314, 423, 450, 1384, 416, 262, 20...
2.544279
1,547
#!/usr/bin/env python from math import * import sys frame_width = 200 frame_height = 75 drill = 1.6 # 1/16 inch radius. extrusion = 15 motor_screw_grid = 31 motor_cutout_diameter = 22 motor_width = 42.2 motor_offset = 35 # Motor face to extrusion. motor_side, motor_bend = rotate(0, motor_offset + extrusion, 30) m...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 198, 6738, 10688, 1330, 1635, 198, 11748, 25064, 198, 198, 14535, 62, 10394, 796, 939, 198, 14535, 62, 17015, 796, 5441, 198, 7109, 359, 796, 352, 13, 21, 220, 1303, 352, 14, 1433, 1...
2.228363
959
import torch from torchvision.datasets import MNIST from torchvision import transforms from torch.utils.data import DataLoader from scripts.utils import SyntheticNoiseDataset from models.babyunet import BabyUnet CHECKPOINTS_PATH = '../checkpoints/' mnist_test = MNIST('../inferred_data/MNIST', download=True, ...
[ 11748, 28034, 198, 6738, 28034, 10178, 13, 19608, 292, 1039, 1330, 29060, 8808, 198, 198, 6738, 28034, 10178, 1330, 31408, 198, 6738, 28034, 13, 26791, 13, 7890, 1330, 6060, 17401, 198, 198, 6738, 14750, 13, 26791, 1330, 26375, 6587, 2949...
2.459677
372
# Script for data augmentation functions import numpy as np from collections import deque from PIL import Image import cv2 from data.config import * def imread_cv2(image_path): """ Read image_path with cv2 format (H, W, C) if image is '.gif' outputs is a numpy array of {0,1} """ image_format = ima...
[ 2, 12327, 329, 1366, 16339, 14374, 5499, 198, 198, 11748, 299, 32152, 355, 45941, 198, 6738, 17268, 1330, 390, 4188, 198, 6738, 350, 4146, 1330, 7412, 198, 11748, 269, 85, 17, 198, 6738, 1366, 13, 11250, 1330, 1635, 198, 198, 4299, 54...
2.516438
1,673
""" substitute_finder app custom templatetags module """ from django import template register = template.Library()
[ 37811, 198, 7266, 301, 3678, 62, 22805, 598, 2183, 2169, 489, 265, 316, 3775, 8265, 198, 37811, 198, 6738, 42625, 14208, 1330, 11055, 198, 198, 30238, 796, 11055, 13, 23377, 3419, 628 ]
3.65625
32
from django.shortcuts import render, redirect, get_object_or_404 from django.urls import reverse_lazy from django import views from django.views import generic as g_views from django.views.generic import base as b_views, edit as e_views from .. import forms, models
[ 6738, 42625, 14208, 13, 19509, 23779, 1330, 8543, 11, 18941, 11, 651, 62, 15252, 62, 273, 62, 26429, 198, 6738, 42625, 14208, 13, 6371, 82, 1330, 9575, 62, 75, 12582, 198, 6738, 42625, 14208, 1330, 5009, 198, 6738, 42625, 14208, 13, 3...
3.443038
79
from load_las_data import LoadLasData from altair_log_plot import AltAirLogPlot from load_shapefile_data import LoadShpData from alitair_well_location_map import WellLocationMap
[ 6738, 3440, 62, 21921, 62, 7890, 1330, 8778, 46898, 6601, 198, 6738, 5988, 958, 62, 6404, 62, 29487, 1330, 12344, 16170, 11187, 43328, 198, 6738, 3440, 62, 43358, 7753, 62, 7890, 1330, 8778, 2484, 79, 6601, 198, 6738, 435, 270, 958, 6...
3.423077
52
import pickle import pandas as pd from typing import List, Tuple
[ 11748, 2298, 293, 198, 11748, 19798, 292, 355, 279, 67, 198, 6738, 19720, 1330, 7343, 11, 309, 29291, 198 ]
3.421053
19
import xadmin from users.models import VerifyCode from xadmin import views xadmin.site.register(VerifyCode, VerifyCodeAdmin) xadmin.site.register(views.BaseAdminView, BaseSetting) xadmin.site.register(views.CommAdminView, GlobalSettings)
[ 11748, 2124, 28482, 201, 198, 6738, 2985, 13, 27530, 1330, 49899, 10669, 201, 198, 6738, 2124, 28482, 1330, 5009, 201, 198, 201, 198, 201, 198, 201, 198, 201, 198, 201, 198, 87, 28482, 13, 15654, 13, 30238, 7, 13414, 1958, 10669, 11, ...
3.02381
84
### Load necessary libraries ### import numpy as np from sklearn.model_selection import KFold from sklearn.metrics import accuracy_score import tensorflow as tf from tensorflow import keras from sklearn.metrics import ConfusionMatrixDisplay model = get_network() model.summary() ### Train and evaluate via 10-Folds ...
[ 21017, 8778, 3306, 12782, 44386, 198, 198, 11748, 299, 32152, 355, 45941, 198, 6738, 1341, 35720, 13, 19849, 62, 49283, 1330, 509, 37, 727, 198, 6738, 1341, 35720, 13, 4164, 10466, 1330, 9922, 62, 26675, 198, 198, 11748, 11192, 273, 111...
2.406554
1,129
import os import pprint import subprocess import time from typing import Dict, List from kubernetes.client import ( V1EnvVar, V1EnvVarSource, V1ObjectFieldSelector, V1ResourceFieldSelector, ) from metaflow import FlowSpec, step, environment, resources, current kubernetes_vars = get_env_vars( { ...
[ 11748, 28686, 198, 11748, 279, 4798, 198, 11748, 850, 14681, 198, 11748, 640, 198, 6738, 19720, 1330, 360, 713, 11, 7343, 198, 198, 6738, 479, 18478, 3262, 274, 13, 16366, 1330, 357, 198, 220, 220, 220, 569, 16, 4834, 85, 19852, 11, ...
1.947267
1,043
#!/usr/bin/env python # -*- coding: utf-8 -*- """Functions used for data handling """ __author__ = "Christina Ludwig, GIScience Research Group, Heidelberg University" __email__ = "christina.ludwig@uni-heidelberg.de" import os import yaml from shapely.geometry import box import numpy as np import pandas as pd import g...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 37811, 24629, 2733, 973, 329, 1366, 9041, 198, 37811, 198, 198, 834, 9800, 834, 796, 366, 10684, 1437, 44476, 11, 402, ...
2.503576
2,377
# 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 # distributed under t...
[ 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, 198, 2, 257, 4866, 286, 262, 13789, 379, 198, 2,...
3.600985
203
from warnings import warn from tables.utilsextension import * _warnmsg = ("utilsExtension is pending deprecation, import utilsextension instead. " "You may use the pt2to3 tool to update your source code.") warn(_warnmsg, DeprecationWarning, stacklevel=2)
[ 6738, 14601, 1330, 9828, 201, 198, 6738, 8893, 13, 22602, 325, 742, 3004, 1330, 1635, 201, 198, 201, 198, 62, 40539, 19662, 796, 5855, 26791, 11627, 3004, 318, 13310, 1207, 8344, 341, 11, 1330, 7736, 325, 742, 3004, 2427, 13, 366, 201...
3.078652
89
#!/usr/bin/env python3 # The format of your own localizable method. # This is an example of '"string".localized' SUFFIX = '.localized' KEY = r'"(?:\\.|[^"\\])*"' LOCALIZABLE_RE = r'%s%s' % (KEY, SUFFIX) # Specify the path of localizable files in project. LOCALIZABLE_FILE_PATH = '' LOCALIZABLE_FILE_NAMES = ['Localizab...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 18, 198, 198, 2, 383, 5794, 286, 534, 898, 1957, 13821, 2446, 13, 198, 2, 770, 318, 281, 1672, 286, 705, 1, 8841, 1911, 12001, 1143, 6, 198, 12564, 5777, 10426, 796, 45302, 12001, 1143, ...
2.252809
356
from dashboard_analytics.models import AccountType, InstrumentType, Account, Transaction
[ 6738, 30415, 62, 38200, 14094, 13, 27530, 1330, 10781, 6030, 11, 42410, 6030, 11, 10781, 11, 45389 ]
5.176471
17
#!/usr/bin/env python """ Add all (potentially gigantic) histograms in a group of files. """ import dashi import tables import os, sys, operator, shutil from optparse import OptionParser parser = OptionParser(usage="%prog [OPTIONS] infiles outfile", description=__doc__) parser.add_option("--blocksize", dest="blocksi...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 198, 37811, 198, 4550, 477, 357, 13059, 3746, 24804, 8, 1554, 26836, 287, 257, 1448, 286, 3696, 13, 198, 37811, 198, 198, 11748, 288, 12144, 198, 11748, 8893, 198, 11748, 28686, 11, 25...
2.655172
667
import datetime
[ 11748, 4818, 8079, 628, 628, 628, 628, 628, 628 ]
3
9
from .base import * DEBUG = True EMAIL_BACKEND = 'django.core.mail.backends.console.EmailBackend' DATABASES = { 'default': { 'ENGINE': 'django.db.backends.postgresql', 'NAME': 'SMS', 'USER': 'postgres', 'PASSWORD': 'password', 'HOST': 'localhost', 'PORT': '', }...
[ 6738, 764, 8692, 1330, 1635, 198, 198, 30531, 796, 6407, 198, 198, 27630, 4146, 62, 31098, 10619, 796, 705, 28241, 14208, 13, 7295, 13, 4529, 13, 1891, 2412, 13, 41947, 13, 15333, 7282, 437, 6, 198, 198, 35, 1404, 6242, 1921, 1546, ...
2.153226
248
from functions import get_df, write_df import geopy from geopy import distance """ The function question3 takes in the latitude and longitude of potential distress locations, and returns the nearest port with essential provisions such as water, fuel_oil and diesel. """ if __name__ == "__main__": question3("foodpa...
[ 6738, 5499, 1330, 651, 62, 7568, 11, 3551, 62, 7568, 198, 11748, 4903, 11081, 198, 6738, 4903, 11081, 1330, 5253, 198, 198, 37811, 198, 464, 2163, 1808, 18, 2753, 287, 262, 32477, 290, 890, 3984, 286, 2785, 17087, 7064, 11, 198, 392, ...
3.56
100
#!/usr/bin/env python3 # -*- coding: utf-8 -*- # ------------------------------------------------------------------------------ # # Copyright 2022 Valory AG # Copyright 2018-2021 Fetch.AI Limited # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 18, 198, 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 2, 16529, 26171, 198, 2, 198, 2, 220, 220, 15069, 33160, 3254, 652, 13077, 198, 2, 220, 220, 15069, 2864, 12, 1...
2.740816
980
import pybullet as p #p.connect(p.UDP,"192.168.86.100") p.connect(p.SHARED_MEMORY) p.resetSimulation() objects = [p.loadURDF("plane.urdf", 0.000000,0.000000,0.000000,0.000000,0.000000,0.000000,1.000000)] objects = [p.loadURDF("samurai.urdf", 0.000000,0.000000,0.000000,0.000000,0.000000,0.000000,1.000000)] objects = [p...
[ 11748, 12972, 15065, 1616, 355, 279, 198, 2, 79, 13, 8443, 7, 79, 13, 52, 6322, 553, 17477, 13, 14656, 13, 4521, 13, 3064, 4943, 198, 79, 13, 8443, 7, 79, 13, 9693, 1503, 1961, 62, 44, 3620, 15513, 8, 198, 79, 13, 42503, 8890, ...
2.170857
2,148
def longest_common_prefix(s1: str, s2: str) -> str: """ Finds the longest common prefix (substring) given two strings s1: First string to compare s2: Second string to compare Returns: Longest common prefix between s1 and s2 >>> longest_common_prefix("ACTA", "GCCT") '' >>> long...
[ 4299, 14069, 62, 11321, 62, 40290, 7, 82, 16, 25, 965, 11, 264, 17, 25, 965, 8, 4613, 965, 25, 198, 220, 220, 220, 37227, 198, 220, 220, 220, 9938, 82, 262, 14069, 2219, 21231, 357, 7266, 8841, 8, 1813, 734, 13042, 628, 220, 220...
2.216758
1,647
from __future__ import annotations from typing import Optional, Dict, List, Union, Type, TYPE_CHECKING from datetime import date, datetime import pandas as pd import numpy as np import re import locale try: locale.setlocale(locale.LC_ALL, "en_US.UTF-8") except locale.Error: # Readthedocs has a problem, but dif...
[ 6738, 11593, 37443, 834, 1330, 37647, 198, 6738, 19720, 1330, 32233, 11, 360, 713, 11, 7343, 11, 4479, 11, 5994, 11, 41876, 62, 50084, 2751, 198, 6738, 4818, 8079, 1330, 3128, 11, 4818, 8079, 198, 11748, 19798, 292, 355, 279, 67, 198,...
3.134078
179
#!/usr/bin/python3 if __name__ == "__main__": import sys args(sys.argv)
[ 2, 48443, 14629, 14, 8800, 14, 29412, 18, 198, 198, 361, 11593, 3672, 834, 6624, 366, 834, 12417, 834, 1298, 198, 220, 220, 220, 1330, 25064, 198, 220, 220, 220, 26498, 7, 17597, 13, 853, 85, 8, 198 ]
2.131579
38
""" These modules contain sub-modules related to defining various profiles in a model """
[ 37811, 198, 4711, 13103, 3994, 850, 12, 18170, 3519, 284, 16215, 2972, 16545, 287, 257, 2746, 198, 37811 ]
4.944444
18
#!/usr/bin/env python3 import re lines = get_input() count = 0 for line in lines: lower, upper, char, password = re.split(r'-|: | ', line) lower, upper = int(lower) - 1, int(upper) - 1 try: if (password[lower] == char) ^ (password[upper] == char): count += 1 except: # do...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 18, 198, 198, 11748, 302, 628, 198, 198, 6615, 796, 651, 62, 15414, 3419, 198, 9127, 796, 657, 198, 198, 1640, 1627, 287, 3951, 25, 198, 220, 220, 220, 2793, 11, 6727, 11, 1149, 11, 920...
2.31677
161
from __future__ import print_function import json from os.path import join, dirname from watson_developer_cloud import ToneAnalyzerV3 from watson_developer_cloud.tone_analyzer_v3 import ToneInput from pprint import pprint # If service instance provides API key authentication # service = ToneAnalyzerV3( # ## url i...
[ 6738, 11593, 37443, 834, 1330, 3601, 62, 8818, 198, 11748, 33918, 198, 6738, 28686, 13, 6978, 1330, 4654, 11, 26672, 3672, 198, 6738, 266, 13506, 62, 16244, 263, 62, 17721, 1330, 45362, 37702, 9107, 53, 18, 198, 6738, 266, 13506, 62, ...
2.649567
1,501
# -*- coding: utf-8 -*- from hcloud.core.domain import BaseDomain from hcloud.helpers.descriptors import ISODateTime
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 6738, 289, 17721, 13, 7295, 13, 27830, 1330, 7308, 43961, 198, 198, 6738, 289, 17721, 13, 16794, 364, 13, 20147, 1968, 669, 1330, 3180, 3727, 378, 7575, 628, 628, 628, ...
2.73913
46
import pytest from AutomationFramework.page_objects.interfaces.interfaces import Interfaces from AutomationFramework.tests.base_test import BaseTest
[ 11748, 12972, 9288, 198, 6738, 17406, 341, 21055, 6433, 13, 7700, 62, 48205, 13, 3849, 32186, 13, 3849, 32186, 1330, 4225, 32186, 198, 6738, 17406, 341, 21055, 6433, 13, 41989, 13, 8692, 62, 9288, 1330, 7308, 14402, 628 ]
3.947368
38
# Copyright 2012 OpenStack Foundation # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in...
[ 2, 15069, 2321, 4946, 25896, 5693, 198, 2, 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.855346
159
from typing import Any, List, Union from boa3.builtin import NeoMetadata, metadata, public from boa3.builtin.contract import Nep17TransferEvent from boa3.builtin.interop.blockchain import get_contract from boa3.builtin.interop.contract import GAS, NEO, call_contract from boa3.builtin.interop.runtime import calling_scr...
[ 6738, 19720, 1330, 4377, 11, 7343, 11, 4479, 198, 198, 6738, 1489, 64, 18, 13, 18780, 259, 1330, 21227, 9171, 14706, 11, 20150, 11, 1171, 198, 6738, 1489, 64, 18, 13, 18780, 259, 13, 28484, 1330, 15310, 1558, 43260, 9237, 198, 6738, ...
3.444939
899
import os # Restrict the script to run on CPU os.environ ["CUDA_DEVICE_ORDER"] = "PCI_BUS_ID" os.environ["CUDA_VISIBLE_DEVICES"] = "" # Import Keras Tensoflow Backend # from keras import backend as K import tensorflow as tf # Configure it to use only specific CPU Cores config = tf.ConfigProto(intra_op_parallelism_thre...
[ 11748, 28686, 198, 2, 37163, 262, 4226, 284, 1057, 319, 9135, 198, 418, 13, 268, 2268, 14631, 43633, 5631, 62, 7206, 27389, 62, 12532, 1137, 8973, 796, 366, 5662, 40, 62, 45346, 62, 2389, 1, 198, 418, 13, 268, 2268, 14692, 43633, 56...
2.465035
286
import discord from redbot.core.bot import Red from redbot.core.commands import commands from redbot.core.utils.chat_formatting import humanize_list from .utils import permcheck, rpccheck
[ 11748, 36446, 201, 198, 6738, 2266, 13645, 13, 7295, 13, 13645, 1330, 2297, 201, 198, 6738, 2266, 13645, 13, 7295, 13, 9503, 1746, 1330, 9729, 201, 198, 6738, 2266, 13645, 13, 7295, 13, 26791, 13, 17006, 62, 18982, 889, 1330, 1692, 10...
3.078125
64
import torch DEVICE = 'cuda' import math import torch.optim as optim from model import * import os import copy, gzip, pickle, time data_dir = './drive/MyDrive/music_classification/Data' classes = os.listdir(data_dir+'/images_original')
[ 11748, 28034, 198, 7206, 27389, 796, 705, 66, 15339, 6, 198, 11748, 10688, 198, 11748, 28034, 13, 40085, 355, 6436, 198, 6738, 2746, 1330, 1635, 198, 11748, 28686, 198, 11748, 4866, 11, 308, 13344, 11, 2298, 293, 11, 640, 198, 7890, 6...
3.105263
76
# Copyright 2021 cstsunfu. 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 applicable law or agr...
[ 2, 15069, 33448, 269, 6448, 403, 20942, 13, 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, 779, 428, 2393, 2845, 287, 11846, 351, ...
3.579125
297
# Copyright 2017 ProjectQ-Framework (www.projectq.ch) # # 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 app...
[ 2, 220, 220, 15069, 2177, 4935, 48, 12, 21055, 6433, 357, 2503, 13, 16302, 80, 13, 354, 8, 198, 2, 198, 2, 220, 220, 49962, 739, 262, 24843, 13789, 11, 10628, 362, 13, 15, 357, 1169, 366, 34156, 15341, 198, 2, 220, 220, 345, 743...
2.249788
7,090
""" app.deps ======== Register dependencies that are not part of a ``Flask`` extension. """ from flask import Flask from redis import Redis from rq import Queue def init_app(app: Flask) -> None: """Register application helpers that are not ``Flask-`` extensions. As these are not ``Flask`` extensions they do...
[ 37811, 198, 1324, 13, 10378, 82, 198, 2559, 198, 198, 38804, 20086, 326, 389, 407, 636, 286, 257, 7559, 7414, 2093, 15506, 7552, 13, 198, 37811, 198, 6738, 42903, 1330, 46947, 198, 6738, 2266, 271, 1330, 2297, 271, 198, 6738, 374, 80,...
3.066929
254
from util.args import * from util.logger import Logger
[ 6738, 7736, 13, 22046, 1330, 1635, 198, 6738, 7736, 13, 6404, 1362, 1330, 5972, 1362, 198 ]
3.4375
16
# from wx.lib.pubsub import pub from pubsub import pub import serial import threading import queue import time
[ 2, 422, 266, 87, 13, 8019, 13, 12984, 7266, 1330, 2240, 198, 6738, 2240, 7266, 1330, 2240, 198, 11748, 11389, 198, 11748, 4704, 278, 198, 11748, 16834, 198, 11748, 640, 628 ]
3.612903
31
from flask import Flask from datadog import statsd import logging import os # This is a small example application # It uses tracing and dogstatsd on a sample flask application log = logging.getLogger("app") app = Flask(__name__) # The app has two routes, a basic endpoint and an exception endpoint # This is meant ...
[ 6738, 42903, 1330, 46947, 198, 6738, 4818, 324, 519, 1330, 9756, 67, 198, 11748, 18931, 198, 198, 11748, 28686, 198, 198, 2, 770, 318, 257, 1402, 1672, 3586, 198, 2, 632, 3544, 35328, 290, 3290, 34242, 67, 319, 257, 6291, 42903, 3586,...
2.881356
236
# Lets create a linked list that has the following elements ''' 1. FE 2. SE 3. TE 4. BE ''' # Creating a Node class to create individual Nodes number_list= LinkedList() number_list.add("FE") number_list.add("SE") number_list.add("TE") number_list.add("BE")
[ 2, 38257, 2251, 257, 6692, 1351, 326, 468, 262, 1708, 4847, 220, 201, 198, 7061, 6, 201, 198, 16, 13, 18630, 201, 198, 17, 13, 7946, 201, 198, 18, 13, 13368, 201, 198, 19, 13, 9348, 201, 198, 7061, 6, 201, 198, 201, 198, 2, 30...
2.346774
124
# Copyright (c) MONAI Consortium # 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, so...
[ 2, 15069, 357, 66, 8, 25000, 20185, 42727, 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...
3.693878
196
import pytest from opentrons.commands import protocol_commands def test_delay_with_message(): """It should allow a message to be appended to the delay text.""" command = protocol_commands.delay(seconds=1, minutes=1, msg="Waiting...") assert command["payload"]["text"] == ( "Delaying for 1 minutes...
[ 11748, 12972, 9288, 198, 6738, 1034, 298, 12212, 13, 9503, 1746, 1330, 8435, 62, 9503, 1746, 628, 198, 198, 4299, 1332, 62, 40850, 62, 4480, 62, 20500, 33529, 198, 220, 220, 220, 37227, 1026, 815, 1249, 257, 3275, 284, 307, 598, 1631,...
2.991597
119
from unittest.mock import patch import pytest from just_bin_it.endpoints.sources import HistogramSource from tests.doubles.consumer import StubConsumer TEST_MESSAGE = b"this is a byte message" INVALID_FB = b"this is an invalid fb message"
[ 6738, 555, 715, 395, 13, 76, 735, 1330, 8529, 198, 198, 11748, 12972, 9288, 198, 198, 6738, 655, 62, 8800, 62, 270, 13, 437, 13033, 13, 82, 2203, 1330, 5590, 21857, 7416, 198, 6738, 5254, 13, 67, 280, 7689, 13, 49827, 1330, 41135, ...
3.0375
80
import getopt import sys from libcloud.compute.types import NodeState from lc import get_lc from printer import Printer def lister_main(what, resource=None, extension=False, supports_location=False, **kwargs): """Shortcut for main() routine for lister tools, e.g. lc-SOMETHING-list @param what: ...
[ 11748, 651, 8738, 198, 11748, 25064, 198, 198, 6738, 9195, 17721, 13, 5589, 1133, 13, 19199, 1330, 19081, 9012, 198, 198, 6738, 300, 66, 1330, 651, 62, 44601, 198, 6738, 20632, 1330, 1736, 3849, 628, 198, 4299, 300, 1694, 62, 12417, 7...
2.345696
1,429
# -*- coding: utf-8 -*- '''Chemical Engineering Design Library (ChEDL). Utilities for process modeling. Copyright (C) 2020, Caleb Bell <Caleb.Andrew.Bell@gmail.com> Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal...
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 7061, 6, 41829, 605, 14044, 8495, 10074, 357, 1925, 1961, 43, 737, 41086, 329, 1429, 21128, 13, 198, 15269, 357, 34, 8, 12131, 11, 40777, 7459, 1279, 34, 32100, 13, 20...
3.720745
376
ten_things = "Apples Oranges cows Telephone Light Sugar" print ("Wait there are not 10 things in that list. Let's fix") stuff = ten_things.split(' ') more_stuff = {"Day", "Night", "Song", "Firebee", "Corn", "Banana", "Girl", "Boy"} while len(stuff) !=10: next_one = more_stuff.pop() print("Adding: ", next_one) ...
[ 1452, 62, 27971, 796, 366, 4677, 829, 1471, 6231, 22575, 44735, 4401, 20874, 1, 198, 198, 4798, 5855, 21321, 612, 389, 407, 838, 1243, 287, 326, 1351, 13, 3914, 338, 4259, 4943, 198, 198, 41094, 796, 3478, 62, 27971, 13, 35312, 10786,...
2.748899
227
# Copyright 2013-2022 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 *
[ 2, 15069, 2211, 12, 1238, 1828, 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, ...
3.421875
64
#!/usr/bin/env python """ Copyright 2010-2019 University Of Southern California 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 appli...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 37811, 198, 15269, 3050, 12, 23344, 2059, 3226, 8050, 3442, 198, 198, 26656, 15385, 739, 262, 24843, 13789, 11, 10628, 362, 13, 15, 357, 1169, 366, 34156, 15341, 198, 5832, 743, 407, 7...
3.089636
357
"""test_models.py: runs tests on the models for digit.""" import pytest from core.models import (Grade, Subject, Question, Comment, Option, Topic, Block, ...
[ 37811, 9288, 62, 27530, 13, 9078, 25, 4539, 5254, 319, 262, 4981, 329, 16839, 526, 15931, 198, 11748, 12972, 9288, 198, 6738, 4755, 13, 27530, 1330, 357, 42233, 11, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 22...
1.630872
298