content
stringlengths
1
1.05M
input_ids
listlengths
1
883k
ratio_char_token
float64
1
22.9
token_count
int64
1
883k
""" Read voyage data emails. """ import email from imaplib import IMAP4_SSL import logging OK = 'OK' logger = logging.getLogger(__name__)
[ 37811, 198, 5569, 31505, 1366, 7237, 13, 198, 37811, 198, 198, 11748, 3053, 198, 6738, 545, 64, 489, 571, 1330, 8959, 2969, 19, 62, 31127, 198, 11748, 18931, 628, 198, 11380, 796, 705, 11380, 6, 198, 198, 6404, 1362, 796, 18931, 13, ...
2.769231
52
from common import get_file_contents test_data = [ "00100", "11110", "10110", "10111", "10101", "01111", "00111", "11100", "10000", "11001", "00010", "01010", ] if __name__ == '__main__': print("Part 1: ", p1()) print("Part 2: ", p2())
[ 6738, 2219, 1330, 651, 62, 7753, 62, 3642, 658, 628, 628, 628, 628, 198, 9288, 62, 7890, 796, 685, 198, 197, 1, 405, 3064, 1600, 198, 197, 1, 1157, 11442, 1600, 198, 197, 1, 8784, 940, 1600, 198, 197, 1, 8784, 1157, 1600, 198, 1...
2.039063
128
import os import redis from urllib.parse import urlparse def connect_to_redis(url=None): """Return a connection to Redis. If a URL is supplied, it will be used, otherwise an environment variable is checked before falling back to a default. Since we are generally running on Heroku, and configuring S...
[ 11748, 28686, 198, 11748, 2266, 271, 198, 198, 6738, 2956, 297, 571, 13, 29572, 1330, 19016, 29572, 628, 198, 4299, 2018, 62, 1462, 62, 445, 271, 7, 6371, 28, 14202, 2599, 198, 220, 220, 220, 37227, 13615, 257, 4637, 284, 2297, 271, ...
3.073394
218
# # Copyright (c) 2010-2016, Fabric Software Inc. All rights reserved. #
[ 2, 198, 2, 15069, 357, 66, 8, 3050, 12, 5304, 11, 37759, 10442, 3457, 13, 1439, 2489, 10395, 13, 198, 2, 198 ]
3.318182
22
from . import modules
[ 198, 6738, 764, 1330, 13103 ]
4.4
5
# -*- coding: utf-8 -*- """ Created on Thu Sep 2 03:02:57 2021 @author: sgaa_ """ print ("for loop") for i in range (1,20): print (i) print ("while loop") i=1 while i<12: print (i) i+=1 if 1 in range(2,5): print ("Yes 1 is in the range") elif 3 in range (3,5): print ("Yes 1 is in range 2") el...
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 37811, 198, 41972, 319, 26223, 8621, 220, 362, 7643, 25, 2999, 25, 3553, 33448, 198, 198, 31, 9800, 25, 264, 4908, 64, 62, 198, 37811, 198, 4798, 5855, 1640, 9052, 494...
2.231707
164
import json import re import os import logging from abc import ABC from typing import Dict, Any, List, Tuple from utils.constants import pascal_train_size, pascal_val_size logging.basicConfig(level=logging.INFO) logger = logging.getLogger(__name__) def preprocess_caption(caption: str) -> str: """Basic method us...
[ 11748, 33918, 198, 11748, 302, 198, 11748, 28686, 198, 11748, 18931, 198, 6738, 450, 66, 1330, 9738, 198, 6738, 19720, 1330, 360, 713, 11, 4377, 11, 7343, 11, 309, 29291, 198, 198, 6738, 3384, 4487, 13, 9979, 1187, 1330, 279, 27747, 6...
2.496144
1,167
# coding: utf-8 """ Genomic Data Store Service No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 The version of the OpenAPI document: v1 Generated by: https://openapi-generator.tech """ from __future__ import absolute_import im...
[ 2, 19617, 25, 3384, 69, 12, 23, 198, 198, 37811, 198, 220, 220, 220, 5215, 10179, 6060, 9363, 4809, 628, 220, 220, 220, 1400, 6764, 2810, 357, 27568, 416, 4946, 15042, 35986, 3740, 1378, 12567, 13, 785, 14, 9654, 499, 270, 10141, 14...
2.989247
186
import math from typing import Tuple import jax import jax.numpy as jnp import numpy as np from einops import repeat upsample_arrays = dict( lanczos3=np.array( [ 0.0073782638646662235, 0.030112292617559433, -0.06799723953008652, -0.13327467441558838, ...
[ 11748, 10688, 198, 6738, 19720, 1330, 309, 29291, 198, 198, 11748, 474, 897, 198, 11748, 474, 897, 13, 77, 32152, 355, 474, 37659, 198, 11748, 299, 32152, 355, 45941, 198, 6738, 304, 259, 2840, 1330, 9585, 628, 628, 198, 4739, 1403, 6...
1.502712
1,106
# Author: @dourgey # Create Time: 2019/12/27: 18:06 # # argparse # # PILLOW # import argparse import os import sys from PIL import Image parser = argparse.ArgumentParser() parser.add_argument("-i", "--image", help="~") parser.add_argument("-f", "--file", help="~") args = parser.parse_args() if not os.path.exists...
[ 2, 6434, 25, 2488, 67, 14501, 88, 198, 2, 13610, 3862, 25, 13130, 14, 1065, 14, 1983, 25, 1248, 25, 3312, 198, 198, 2, 220, 198, 2, 1822, 29572, 198, 2, 220, 198, 2, 350, 8267, 3913, 198, 2, 220, 198, 198, 11748, 1822, 29572, ...
2.193642
346
from __future__ import absolute_import from __future__ import division from __future__ import print_function import numpy as np import ray.numbuf import ray.pickling as pickling def check_serializable(cls): """Throws an exception if Ray cannot serialize this class efficiently. Args: cls (type): The class t...
[ 6738, 11593, 37443, 834, 1330, 4112, 62, 11748, 198, 6738, 11593, 37443, 834, 1330, 7297, 198, 6738, 11593, 37443, 834, 1330, 3601, 62, 8818, 198, 198, 11748, 299, 32152, 355, 45941, 198, 198, 11748, 26842, 13, 77, 2178, 3046, 198, 1174...
2.654812
2,390
from numpy import sqrt import numpy as np #from util import sphinx_compat_jit as jit from numba import jit ORDER_L=50 def precalculate_data(p, gamma, m_values=[0]): """Precalculate W_plus, W_minus, W_pm, and G_m_ll Args: p (complex): laplace conjugate of path length gamma (real): aligning l=...
[ 6738, 299, 32152, 1330, 19862, 17034, 198, 11748, 299, 32152, 355, 45941, 198, 2, 6738, 7736, 1330, 599, 20079, 87, 62, 5589, 265, 62, 45051, 355, 474, 270, 198, 6738, 997, 7012, 1330, 474, 270, 198, 198, 12532, 1137, 62, 43, 28, 11...
1.961123
463
#!/usr/bin/env python import logging import json import os import os.path as path from collections import OrderedDict import argparse import tweepy from tweepy import Stream import twitter_config from tweet_writer_listener import TweetWriterListener CITIES = ['San Francisco', 'New York', 'Boston', 'Los Angeles', '...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 198, 11748, 18931, 198, 11748, 33918, 198, 11748, 28686, 198, 11748, 28686, 13, 6978, 355, 3108, 198, 6738, 17268, 1330, 14230, 1068, 35, 713, 198, 11748, 1822, 29572, 198, 198, 11748, 4...
2.521945
843
# -*- coding: utf-8 -*- # ------------------------------------------------------------------------- # This is a sample controller # this file is released under public domain and you can use without limitations # ------------------------------------------------------------------------- import json from datetime import d...
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 2, 16529, 45537, 198, 2, 770, 318, 257, 6291, 10444, 198, 2, 428, 2393, 318, 2716, 739, 1171, 7386, 290, 345, 460, 779, 1231, 11247, 198, 2, 16529, 45537, 198, 11748, ...
4.735849
106
#!/usr/bin/env python3 from markdownify import markdownify as md import argparse import re import os import sys parser = argparse.ArgumentParser() parser.add_argument('input_file', help='file to convert') args = parser.parse_args() input_file = args.input_file print(input_file) if not re.search('.dist.php', input_...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 18, 198, 198, 6738, 1317, 2902, 1958, 1330, 1317, 2902, 1958, 355, 45243, 198, 11748, 1822, 29572, 198, 11748, 302, 198, 11748, 28686, 198, 11748, 25064, 198, 198, 48610, 796, 1822, 29572, 13...
2.16996
1,012
import io, os import argparse from timeit import default_timer as timer parser = argparse.ArgumentParser(description="File Performance Testing Util") parser.add_argument("command",help="Test to perform",choices=['read','write','readany']) parser.add_argument("dir",help="Directory to use") args = parser.parse_args() ...
[ 11748, 33245, 11, 28686, 198, 11748, 1822, 29572, 198, 6738, 640, 270, 1330, 4277, 62, 45016, 355, 19781, 198, 198, 48610, 796, 1822, 29572, 13, 28100, 1713, 46677, 7, 11213, 2625, 8979, 15193, 23983, 7273, 346, 4943, 198, 198, 48610, 1...
2.705882
374
import webbrowser url = 'http://www.wsb.com/Assignment2/case15.php?videourl=" onerror="alert(document.cookie)' new = 2 webbrowser.open(url, new=new)
[ 11748, 3992, 40259, 198, 198, 6371, 796, 705, 4023, 1378, 2503, 13, 18504, 65, 13, 785, 14, 8021, 16747, 17, 14, 7442, 1314, 13, 10121, 30, 85, 485, 454, 75, 2625, 319, 18224, 2625, 44598, 7, 22897, 13, 44453, 33047, 198, 3605, 796,...
2.559322
59
import types from typing import Iterable, Union from .call_frame import CallFrame __all__ = ['CallStack']
[ 198, 11748, 3858, 198, 6738, 19720, 1330, 40806, 540, 11, 4479, 198, 198, 6738, 764, 13345, 62, 14535, 1330, 4889, 19778, 628, 198, 834, 439, 834, 796, 37250, 14134, 25896, 20520, 628 ]
3.46875
32
from django.shortcuts import render, get_object_or_404 from django.core.paginator import Paginator, PageNotAnInteger, EmptyPage from products.models import Product def productList(request, productName): """""" submenu = productName if productName == 'robot': productName = '' elif productName ...
[ 6738, 42625, 14208, 13, 19509, 23779, 1330, 8543, 11, 651, 62, 15252, 62, 273, 62, 26429, 198, 6738, 42625, 14208, 13, 7295, 13, 79, 363, 20900, 1330, 31525, 20900, 11, 7873, 3673, 2025, 46541, 11, 33523, 9876, 198, 6738, 3186, 13, 27...
1.989489
1,332
import json import os from dataclasses import dataclass, field from typing import Dict, Optional
[ 11748, 33918, 198, 11748, 28686, 198, 6738, 4818, 330, 28958, 1330, 4818, 330, 31172, 11, 2214, 198, 6738, 19720, 1330, 360, 713, 11, 32233, 628, 628, 198 ]
3.740741
27
import base64 import fnmatch import logging import os import tempfile from ssl import SSLContext, create_default_context from typing import Dict, List, Optional, Sequence import yaml from kube.tools.repr import disp_secret_blob, disp_secret_string def get_selector() -> KubeConfigSelector: loader = KubeC...
[ 11748, 2779, 2414, 198, 11748, 24714, 15699, 198, 11748, 18931, 198, 11748, 28686, 198, 11748, 20218, 7753, 198, 6738, 264, 6649, 1330, 25952, 21947, 11, 2251, 62, 12286, 62, 22866, 198, 6738, 19720, 1330, 360, 713, 11, 7343, 11, 32233, ...
3.37037
135
from PyQt5.QtCore import QThread, pyqtSignal, QDateTime, QObject from PyQt5.QtWidgets import QApplication, QDialog, QLineEdit import time import sys if __name__ == '__main__': app = QApplication(sys.argv) win = Window() win.show() sys.exit(app.exec_())
[ 6738, 9485, 48, 83, 20, 13, 48, 83, 14055, 1330, 1195, 16818, 11, 12972, 39568, 11712, 282, 11, 1195, 10430, 7575, 11, 1195, 10267, 198, 6738, 9485, 48, 83, 20, 13, 48, 83, 54, 312, 11407, 1330, 1195, 23416, 11, 1195, 44204, 11, 1...
2.518519
108
from __future__ import annotations from typing import List, Tuple, OrderedDict as OrderedDictType, DefaultDict, Optional from collections import OrderedDict, defaultdict from metric import MusicNote, TimePointSequence from model.base import MidiModel, MidiModelState from model.beat import TatumTrackingModelState, Tatu...
[ 6738, 11593, 37443, 834, 1330, 37647, 198, 6738, 19720, 1330, 7343, 11, 309, 29291, 11, 14230, 1068, 35, 713, 355, 14230, 1068, 35, 713, 6030, 11, 15161, 35, 713, 11, 32233, 198, 6738, 17268, 1330, 14230, 1068, 35, 713, 11, 4277, 1160...
3.834586
133
global plus global minus minus = ["ASP","GLU"] plus = ["ARG","HIS","LYS"] def find_charge(residues): """ Takes a list of residues and returns the number of plus and minus charged residues. This function uses the global plus and minus variables """ global plus global minus plus_charge = sum([res in plu...
[ 198, 198, 20541, 5556, 198, 20541, 20208, 198, 198, 40191, 796, 14631, 1921, 47, 2430, 8763, 52, 8973, 198, 9541, 796, 14631, 1503, 38, 2430, 39, 1797, 2430, 11319, 50, 8973, 198, 198, 4299, 1064, 62, 10136, 7, 411, 312, 947, 2599, ...
3.22963
135
# imports import csv # open the file with open("example.csv") as file: reader = csv.reader(file) # prep to store names of columns titleRow = reader.next() #rest = [row for row in reader] columnList = {} for row in reader: iterator = 0 cellList = [] for cell in row: if cell == "": cellList.app...
[ 2, 17944, 198, 11748, 269, 21370, 198, 198, 2, 1280, 262, 2393, 198, 198, 4480, 1280, 7203, 20688, 13, 40664, 4943, 355, 2393, 25, 198, 197, 46862, 796, 269, 21370, 13, 46862, 7, 7753, 8, 198, 197, 2, 3143, 284, 3650, 3891, 286, 1...
2.622407
241
import some_mod
[ 11748, 617, 62, 4666, 198 ]
3.2
5
from flask import Flask from application.blueprints.user.routes import users
[ 6738, 42903, 1330, 46947, 198, 198, 6738, 3586, 13, 17585, 17190, 13, 7220, 13, 81, 448, 274, 1330, 2985, 628 ]
3.95
20
from collections import namedtuple import torch NONLINEARITIES = { "tanh": torch.nn.Tanh, "relu": torch.nn.ReLU, } TimeDerivative = namedtuple("TimeDerivative", ["dq_dt", "dp_dt"]) StepPrediction = namedtuple("StepPrediction", ["q", "p"])
[ 6738, 17268, 1330, 3706, 83, 29291, 198, 11748, 28034, 198, 198, 45, 1340, 24027, 1503, 30383, 796, 1391, 198, 220, 220, 220, 366, 38006, 71, 1298, 28034, 13, 20471, 13, 45557, 71, 11, 198, 220, 220, 220, 366, 260, 2290, 1298, 28034, ...
2.540816
98
>>> S = 'Susceptible' >>> print(S) >>> E = 'Exposed' >>> print(E) >>> I = 'Infectious' >>> print(I) >>> R = 'Removed' >>> print(R) >>> N = 'Total Population' >>> print(N) >>> C = 'Living with COVID19' >>> print(C) >>> D = 'Living with Diabetes' >>> print(D) >>> Susceptible = input('Enter number of Susceptible Individua...
[ 33409, 311, 796, 705, 30746, 984, 856, 6, 198, 33409, 3601, 7, 50, 8, 198, 33409, 412, 796, 705, 16870, 1335, 6, 198, 33409, 3601, 7, 36, 8, 198, 33409, 314, 796, 705, 818, 2309, 699, 6, 198, 33409, 3601, 7, 40, 8, 198, 33409, ...
3.208995
378
from typing import _GenericAlias # type: ignore from typing import ClassVar from typing_extensions import Protocol # Single-sourcing the version number with poetry: # https://github.com/python-poetry/poetry/pull/2366#issuecomment-652418094 try: __version__ = __import__("importlib.metadata").metadata.version(__na...
[ 6738, 19720, 1330, 4808, 46189, 40489, 220, 1303, 2099, 25, 8856, 198, 6738, 19720, 1330, 5016, 19852, 198, 198, 6738, 19720, 62, 2302, 5736, 1330, 20497, 198, 198, 2, 14206, 12, 82, 29985, 262, 2196, 1271, 351, 19518, 25, 198, 2, 374...
2.618065
775
from dataclasses import dataclass from typing import Callable, Dict, List, Optional, Sequence, Tuple, Union import altair as alt import pandas as pd from sklearn.metrics import ( accuracy_score, classification_report, f1_score, precision_score, recall_score, ) from gobbli.util import ( as_mult...
[ 6738, 4818, 330, 28958, 1330, 4818, 330, 31172, 198, 6738, 19720, 1330, 4889, 540, 11, 360, 713, 11, 7343, 11, 32233, 11, 45835, 11, 309, 29291, 11, 4479, 198, 198, 11748, 5988, 958, 355, 5988, 198, 11748, 19798, 292, 355, 279, 67, ...
2.666667
513
#!/usr/bin/env python import rospy from victor_fake_hardware_interface.minimal_fake_arm_interface import MinimalFakeGripperInterface if __name__ == '__main__': main()
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 11748, 686, 2777, 88, 198, 6738, 2210, 273, 62, 30706, 62, 10424, 1574, 62, 39994, 13, 1084, 4402, 62, 30706, 62, 1670, 62, 39994, 1330, 1855, 4402, 49233, 38, 380, 2848, 39317, 628, ...
2.852459
61
# -*- coding: utf-8 -*- import numpy as np import matplotlib.pyplot as plt import networkx as nx import pandas as pd import copy from numba import njit from numba.typed import Dict, List from numba.core import types from concurrent.futures import ThreadPoolExecutor np.seterr(over='ignore') #plot utilizando o...
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 198, 11748, 299, 32152, 355, 45941, 198, 11748, 2603, 29487, 8019, 13, 9078, 29487, 355, 458, 83, 198, 11748, 3127, 87, 355, 299, 87, 198, 11748, 19798, 292, 355, 279, ...
2.815385
130
"""odin.http.server - ODIN HTTP Server class. This module provides the core HTTP server class used in ODIN, which handles all client requests, handing off API requests to the appropriate API route and adapter plugins, and defining the default route used to serve static content. Tim Nicholls, STFC Application Engineer...
[ 37811, 375, 259, 13, 4023, 13, 15388, 532, 31245, 1268, 14626, 9652, 1398, 13, 198, 198, 1212, 8265, 3769, 262, 4755, 14626, 4382, 1398, 973, 287, 31245, 1268, 11, 543, 17105, 477, 5456, 7007, 11, 198, 4993, 278, 572, 7824, 7007, 284,...
3.940741
135
# @file Valid Parentheses # @brief Given a string containing just the characters '(', ')', '{', '}', # '[' and ']', determine if the input string is valid. # https://leetcode.com/problems/valid-parentheses/ import collections ''' Given a string containing just the characters '(', ')', '{', '}', '[' and ']', de...
[ 2, 2488, 7753, 220, 48951, 16774, 39815, 198, 2, 2488, 65, 3796, 11259, 257, 4731, 7268, 655, 262, 3435, 29513, 3256, 705, 8, 3256, 705, 90, 3256, 705, 92, 3256, 198, 2, 220, 220, 220, 220, 220, 220, 220, 705, 17816, 290, 705, 60,...
3.034884
172
#!/usr/bin/env python from __future__ import print_function from collections import deque if __name__ == '__main__': import os samples = [ ['HYDROCARBON COMBUSTION', 'QUAIL BEHAVIOR', 'QUAIL COMBUSTION'], ['CODE JAM', 'SPACE JAM', 'PEARL JAM'], ['IN...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 198, 6738, 11593, 37443, 834, 1330, 3601, 62, 8818, 198, 6738, 17268, 1330, 390, 4188, 198, 198, 361, 11593, 3672, 834, 6624, 705, 834, 12417, 834, 10354, 198, 220, 220, 220, 1330, 286...
1.8199
1,005
from .core import _train, train, predict, XGBClassifier, XGBRegressor # noqa __version__ = '0.1.7'
[ 6738, 764, 7295, 1330, 4808, 27432, 11, 4512, 11, 4331, 11, 1395, 4579, 9487, 7483, 11, 1395, 4579, 8081, 44292, 220, 1303, 645, 20402, 198, 198, 834, 9641, 834, 796, 705, 15, 13, 16, 13, 22, 6, 198 ]
2.657895
38
#! /usr/bin/env python # -*- coding: utf-8 -*- #################### # Copyright (c) 2021 ryanbuckner # https://github.com/ryanbuckner/life360-plugin/wiki # # Based on neilk's Solcast plugin ################################################################################ # Imports #####################################...
[ 2, 0, 1220, 14629, 14, 8800, 14, 24330, 21015, 198, 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 14468, 4242, 198, 2, 15069, 357, 66, 8, 33448, 374, 4121, 27041, 1008, 220, 198, 2, 3740, 1378, 12567, 13, 785, 1...
4.918129
171
from django.shortcuts import render from django.contrib.auth.forms import UserCreationForm from django.contrib.auth.decorators import login_required from django.urls import reverse_lazy from django.views import generic, View
[ 6738, 42625, 14208, 13, 19509, 23779, 1330, 8543, 198, 198, 6738, 42625, 14208, 13, 3642, 822, 13, 18439, 13, 23914, 1330, 11787, 12443, 341, 8479, 198, 6738, 42625, 14208, 13, 3642, 822, 13, 18439, 13, 12501, 273, 2024, 1330, 17594, 62...
3.492308
65
import requests from bs4 import BeautifulSoup
[ 11748, 7007, 198, 6738, 275, 82, 19, 1330, 23762, 50, 10486 ]
4.090909
11
import pyblish.api from openpype.pipeline import PublishXmlValidationError from openpype.hosts.tvpaint.api import lib
[ 11748, 12972, 65, 1836, 13, 15042, 198, 6738, 1280, 79, 2981, 13, 79, 541, 4470, 1330, 8525, 1836, 55, 4029, 7762, 24765, 12331, 198, 6738, 1280, 79, 2981, 13, 4774, 82, 13, 14981, 79, 2913, 13, 15042, 1330, 9195, 628, 198 ]
2.926829
41
import board import neopixel import time pixels = neopixel.NeoPixel(board.D21, 1) GREEN = (255, 0, 0) # RED = (0,255,0) # BLUE = (0,0,255) # YELLOW = (255,255,0) # CYAN = (255,0,255) # VIOLET = (0,127,255) # WHITE = (255,255,255) # OFF = (0,0,0) #
[ 11748, 3096, 198, 11748, 497, 404, 7168, 198, 11748, 640, 198, 198, 79, 14810, 796, 497, 404, 7168, 13, 8199, 78, 40809, 7, 3526, 13, 35, 2481, 11, 352, 8, 198, 198, 43016, 796, 357, 13381, 11, 657, 11, 657, 8, 1303, 198, 22083, ...
1.938462
130
import torch import pretrainedmodels as PM import torch.nn as nn from .Mobilenet import MobileNetV2 device = 'cuda' if torch.cuda.is_available() else 'cpu'
[ 11748, 28034, 220, 201, 198, 11748, 2181, 13363, 27530, 355, 3122, 220, 201, 198, 11748, 28034, 13, 20471, 355, 299, 77, 201, 198, 6738, 764, 47100, 268, 316, 1330, 12173, 7934, 53, 17, 201, 198, 201, 198, 25202, 796, 705, 66, 15339, ...
2.827586
58
from erised.proxy import Proxy if __name__ == "__main__": person = Person() person.dog = Dog() proxy = Proxy(obj=person) # call method remotely call_future = proxy.dog.bark(loud=True) print(call_future.result()) # set attributes into remote object, even if they didn't exist originally ...
[ 6738, 1931, 1417, 13, 36436, 1330, 38027, 628, 628, 198, 361, 11593, 3672, 834, 6624, 366, 834, 12417, 834, 1298, 198, 220, 220, 220, 1048, 796, 7755, 3419, 198, 220, 220, 220, 1048, 13, 9703, 796, 8532, 3419, 198, 220, 220, 220, 15...
3.03
200
# Generated by Django 2.1.7 on 2019-03-23 00:52 from django.db import migrations, models
[ 2, 2980, 515, 416, 37770, 362, 13, 16, 13, 22, 319, 13130, 12, 3070, 12, 1954, 3571, 25, 4309, 198, 198, 6738, 42625, 14208, 13, 9945, 1330, 15720, 602, 11, 4981, 628 ]
2.84375
32
from __future__ import division from builtins import str from builtins import range import proteus import sys import numpy from proteus import Profiling #it should probably be associated with the PUMI domain somehow #The current implementation assumes we're using NS, VOF, LS, RD, MCorr setup with lagging and Backwards...
[ 6738, 11593, 37443, 834, 1330, 7297, 198, 6738, 3170, 1040, 1330, 965, 198, 6738, 3170, 1040, 1330, 2837, 198, 11748, 5915, 385, 198, 11748, 25064, 198, 11748, 299, 32152, 198, 6738, 5915, 385, 1330, 4415, 4386, 198, 198, 2, 270, 815, ...
4.278195
133
# -*- coding: utf-8 -*- # Generated by Django 1.9.5 on 2017-02-02 14:22 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, 20, 319, 2177, 12, 2999, 12, 2999, 1478, 25, 1828, 198, 6738, 11593, 37443, 834, 1330, 28000, 1098, 62, 17201, 874, 198, 1...
2.724638
69
""" REAM: REAM Ain't Markdown ~~~~~~~~~~~~~~~~~~~~~~~~~ This file is part of the ream package :copyright: Copyright 2020 by Chih-Ming Louis Lee :license: MIT, see LICENSE for details """ import sys import os import re import json import pandas as pd from ream.transformer import Ream2Dict from ream.grammar import REA...
[ 37811, 198, 32235, 25, 4526, 2390, 31899, 470, 2940, 2902, 198, 27156, 15116, 93, 198, 198, 1212, 2393, 318, 636, 286, 262, 302, 321, 5301, 198, 198, 25, 22163, 4766, 25, 15069, 12131, 416, 609, 4449, 12, 44, 278, 5593, 5741, 198, 2...
2.498333
600
### get all the blocked raw datafiles from ARC and convert to nifti's ### #rsync -avz ndcn0180@arcus.arc.ox.ac.uk:/data/ndcn-fmrib-water-brain/ndcn0180/EM/M3/M3_S1_GNU/testblock/m000_?????-?????_?????-?????_?????-?????.h5 /Users/michielk/oxdata/P01/EM/M3/M3_S1_GNU/ for f in `ls m000_?????-?????_?????-?????_?????-?????....
[ 21017, 651, 477, 262, 10226, 8246, 1366, 16624, 422, 43928, 290, 10385, 284, 299, 2135, 72, 338, 44386, 198, 2, 81, 27261, 532, 615, 89, 299, 17896, 77, 486, 1795, 31, 5605, 385, 13, 5605, 13, 1140, 13, 330, 13, 2724, 14079, 7890, ...
2.187192
203
import sys print(sum([int(x) for x in sys.argv[1]]))
[ 11748, 25064, 198, 198, 4798, 7, 16345, 26933, 600, 7, 87, 8, 329, 2124, 287, 25064, 13, 853, 85, 58, 16, 11907, 4008 ]
2.304348
23
# Copyright 2020 Intel, Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing,...
[ 2, 15069, 12131, 8180, 11, 3457, 13, 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.624309
181
# -*- coding: utf-8 -*- # Generated by Django 1.11.6 on 2018-09-08 16:33 from __future__ import unicode_literals from django.db import migrations
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 2, 2980, 515, 416, 37770, 352, 13, 1157, 13, 21, 319, 2864, 12, 2931, 12, 2919, 1467, 25, 2091, 198, 6738, 11593, 37443, 834, 1330, 28000, 1098, 62, 17201, 874, 198, ...
2.690909
55
from constants import ALIGNMENT, STRIKE_THROUGH, UNDERLINE
[ 6738, 38491, 1330, 8355, 16284, 10979, 11, 3563, 7112, 7336, 62, 4221, 49, 32632, 11, 35219, 24027, 628, 628 ]
3.263158
19
# Copyright (c) Microsoft Corporation. # Licensed under the MIT license. import numpy as np import svirl.config as cfg from svirl.storage import GArray from . import FixedVortices def gl_parameter_squared_h(self): if self.solveA: return cfg.dtype(self.gl_parameter**2) return cf...
[ 2, 15069, 357, 66, 8, 5413, 10501, 13, 198, 2, 49962, 739, 262, 17168, 5964, 13, 198, 198, 11748, 299, 32152, 355, 45941, 198, 198, 11748, 38487, 1901, 13, 11250, 355, 30218, 70, 198, 6738, 38487, 1901, 13, 35350, 1330, 402, 19182, ...
2.011293
1,771
from hashlib import sha256 from helpers import load_dataset import numpy as np import os import pandas as pd import requests import sys import time import urllib.request CSV_PATH = sys.argv[1] URL_COLUMN = sys.argv[2] PATH = sys.argv[3] if not os.path.exists(PATH): os.mkdir(PATH) dataset = load_dataset(CSV_PATH)...
[ 6738, 12234, 8019, 1330, 427, 64, 11645, 198, 6738, 49385, 1330, 3440, 62, 19608, 292, 316, 198, 11748, 299, 32152, 355, 45941, 198, 11748, 28686, 198, 11748, 19798, 292, 355, 279, 67, 198, 11748, 7007, 198, 11748, 25064, 198, 11748, 64...
2.527221
349
from abc import ABCMeta, abstractmethod from dataclasses import dataclass from typing import Any, List, Type, TypeVar from lf3py.lang.dsn import DSN from lf3py.serialization.serializer import DictSerializer, Serializer T_OBJ = TypeVar('T_OBJ') Ok = Result()
[ 6738, 450, 66, 1330, 9738, 48526, 11, 12531, 24396, 198, 6738, 4818, 330, 28958, 1330, 4818, 330, 31172, 198, 6738, 19720, 1330, 4377, 11, 7343, 11, 5994, 11, 5994, 19852, 198, 198, 6738, 300, 69, 18, 9078, 13, 17204, 13, 9310, 77, ...
2.977528
89
from . import aggregative from . import base from . import meta from . import non_aggregative EXPLICIT_LOSS_MINIMIZATION_METHODS = { aggregative.ELM, aggregative.SVMQ, aggregative.SVMAE, aggregative.SVMKLD, aggregative.SVMRAE, aggregative.SVMNKLD } AGGREGATIVE_METHODS = { aggregative.CC, ...
[ 6738, 764, 1330, 13262, 876, 198, 6738, 764, 1330, 2779, 198, 6738, 764, 1330, 13634, 198, 6738, 764, 1330, 1729, 62, 9460, 2301, 876, 198, 198, 6369, 31484, 2043, 62, 43, 18420, 62, 23678, 3955, 14887, 6234, 62, 49273, 50, 796, 1391,...
2.335277
343
lst_prime=list(filter(prime_num,range(1,2500))) print(len(lst_prime))
[ 75, 301, 62, 35505, 28, 4868, 7, 24455, 7, 35505, 62, 22510, 11, 9521, 7, 16, 11, 44688, 22305, 201, 198, 4798, 7, 11925, 7, 75, 301, 62, 35505, 4008 ]
2.333333
30
from EM_Algorithm.gen_gauss import gen_gauss from EM_Algorithm.gen_poisson import gen_poisson import numpy as np import matplotlib.pyplot as plt x = gen_gauss([8],[2],[1000]) y = gen_poisson([1],[1000]) fig = plt.figure(figsize=(8, 8)) # Add a gridspec with two rows and two columns and a ratio of 2 to 7 between # th...
[ 6738, 17228, 62, 2348, 42289, 13, 5235, 62, 4908, 1046, 1330, 2429, 62, 4908, 1046, 198, 6738, 17228, 62, 2348, 42289, 13, 5235, 62, 7501, 30927, 1330, 2429, 62, 7501, 30927, 198, 11748, 299, 32152, 355, 45941, 198, 11748, 2603, 29487, ...
2.385417
384
import os from threading import Thread from typing import List from aiExchangeMessages_pb2 import SimulationID, TestResult if __name__ == "__main__": from AIExchangeService import get_service from aiExchangeMessages_pb2 import SimStateResponse, Control, SimulationID, VehicleID, DataRequest service = ge...
[ 11748, 28686, 198, 6738, 4704, 278, 1330, 14122, 198, 6738, 19720, 1330, 7343, 198, 198, 6738, 257, 72, 3109, 3803, 36479, 1095, 62, 40842, 17, 1330, 41798, 2389, 11, 6208, 23004, 628, 198, 198, 361, 11593, 3672, 834, 6624, 366, 834, ...
2.701031
291
# PHS3350 # Week 2 - wave packet and RFAP - # "what I cannot create I cannot understand" - R. Feynman. # Ana Fabela Hinojosa, 13/03/2021 import os from pathlib import Path import numpy as np import matplotlib import matplotlib.pyplot as plt import physunits from scipy.fft import fft, ifft plt.rcParams['figure.dpi'] =...
[ 2, 350, 7998, 2091, 1120, 198, 2, 6119, 362, 532, 6769, 19638, 290, 20445, 2969, 532, 198, 2, 366, 10919, 314, 2314, 2251, 314, 2314, 1833, 1, 532, 371, 13, 5452, 2047, 805, 13, 220, 198, 2, 17639, 376, 9608, 64, 367, 2879, 73, ...
2.032086
935
""" run with nosetests -v --nocapture or nosetests -v """ from builtins import object from cloudmesh_base.util import HEADING
[ 37811, 1057, 351, 198, 198, 39369, 316, 3558, 532, 85, 1377, 77, 420, 2373, 495, 198, 198, 273, 198, 198, 39369, 316, 3558, 532, 85, 198, 198, 37811, 198, 198, 6738, 3170, 1040, 1330, 2134, 198, 6738, 6279, 76, 5069, 62, 8692, 13, ...
2.729167
48
# -*- coding: utf-8 -*- # # Copyright (C) 2018-2019 CERN. # # invenio-app-ils is free software; you can redistribute it and/or modify it # under the terms of the MIT License; see LICENSE file for more details. """Test record permissions.""" from __future__ import unicode_literals import uuid import pytest from flas...
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 2, 198, 2, 15069, 357, 34, 8, 2864, 12, 23344, 327, 28778, 13, 198, 2, 198, 2, 287, 574, 952, 12, 1324, 12, 4487, 318, 1479, 3788, 26, 345, 460, 17678, 4163, 340, ...
3.22449
196
from .components.Head import Head from .components.NavIcons import Hamburger from .components.Screens import HomeScreen, AboutScreen, ProjectsScreen from .components.Footer import Footer from .utils import JSON_DIR from json import load import os
[ 6738, 764, 5589, 3906, 13, 13847, 1330, 7123, 201, 198, 6738, 764, 5589, 3906, 13, 30575, 40, 5936, 1330, 26175, 32650, 201, 198, 6738, 764, 5589, 3906, 13, 3351, 5681, 1330, 5995, 23901, 11, 7994, 23901, 11, 29898, 23901, 201, 198, 6...
3.459459
74
# Copyright (c) 2021-present, Facebook, Inc. # # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. # import logging from typing import Dict, List import gym import numpy as np from dm_control import mujoco from dm_control.mujoco.wrapper.mjbinding...
[ 2, 15069, 357, 66, 8, 33448, 12, 25579, 11, 3203, 11, 3457, 13, 198, 2, 198, 2, 770, 2723, 2438, 318, 11971, 739, 262, 17168, 5964, 1043, 287, 262, 198, 2, 38559, 24290, 2393, 287, 262, 6808, 8619, 286, 428, 2723, 5509, 13, 198, ...
3.189781
137
#!/usr/bin/python # # identify the DNS servers used on the WAN interface. # # Tries to find the owner of the DNS as well. # # DNS spoofing is one of the entry points for malware. I haven't seen it since I dumped # Windows at home but in past have seen malware that would change the DNS config on # the router. Kind of ...
[ 2, 48443, 14629, 14, 8800, 14, 29412, 198, 2, 198, 2, 5911, 262, 18538, 9597, 973, 319, 262, 370, 1565, 7071, 13, 198, 2, 198, 2, 309, 1678, 284, 1064, 262, 4870, 286, 262, 18538, 355, 880, 13, 198, 2, 220, 198, 2, 18538, 42078,...
2.794224
277
from hs_restclient import HydroShare, HydroShareAuthBasic # Download LCZO sesnor database from Hydroshare # link to the Hydroshare resource https://www.hydroshare.org/resource/b38bc00887ec45ac9499f9dea45eb8d5/ auth = HydroShareAuthBasic(username="miguelcleon", password = "x") hs = HydroShare(auth = auth) hs.getResour...
[ 6738, 289, 82, 62, 2118, 16366, 1330, 32116, 11649, 11, 32116, 11649, 30515, 26416, 198, 198, 2, 10472, 22228, 57, 46, 264, 274, 13099, 6831, 422, 32116, 20077, 198, 2, 2792, 284, 262, 32116, 20077, 8271, 3740, 1378, 2503, 13, 15511, ...
2.822695
141
""" Game fix for Toybox Turbos """ #pylint: disable=C0103 from protonfixes import util from protonfixes.logger import log def main(): """ Changes the proton argument from the launcher to the game """ log('Applying fixes for Toybox Turbos') # Fix infinite startup screen util.set_environment('PROT...
[ 37811, 3776, 4259, 329, 10977, 3524, 3831, 39565, 198, 37811, 198, 2, 79, 2645, 600, 25, 15560, 28, 34, 486, 3070, 198, 198, 6738, 386, 1122, 42624, 1330, 7736, 198, 6738, 386, 1122, 42624, 13, 6404, 1362, 1330, 2604, 198, 198, 4299, ...
3
113
""" The strategies module provides utilities for designing trading strategies Notes ------ All strategies should inherit from BaseStrategy, and provide a get_order_list method. For details of the requirements of this method, see its docstring in base/BaseStrategy, or in the method within SimpleStrategy in this module....
[ 37811, 383, 10064, 8265, 3769, 20081, 329, 18492, 7313, 10064, 198, 198, 16130, 198, 23031, 198, 3237, 10064, 815, 16955, 422, 7308, 13290, 4338, 11, 290, 2148, 257, 651, 62, 2875, 62, 4868, 198, 24396, 13, 1114, 3307, 286, 262, 5359, ...
4.1875
208
# Create your migrations here. # WILL USE THIS LATER IF/WHEN YOU CREATE A DATABASE AND USER ACCOUNTS - THIS MAY BE IN A DIFFERENT APP AS WELL!!!
[ 2, 13610, 534, 15720, 602, 994, 13, 198, 2, 17682, 23210, 12680, 406, 23261, 16876, 14, 12418, 1677, 7013, 29244, 6158, 317, 360, 1404, 6242, 11159, 5357, 1294, 1137, 15859, 19385, 4694, 532, 12680, 26720, 9348, 3268, 317, 360, 5064, 24...
3.06383
47
import numpy as np
[ 11748, 299, 32152, 355, 45941, 628 ]
3.333333
6
""" Provides example of how I would like `enum` to be used. Implementation details: (1) Uses Metaclass for two reasons: (1.1) So that the subclasses can be iterable (we want class objects, not instance objects) (1.2) To automatically collect Enumeratee enum.Enumerator EnumSet, Partition, Basis Produc...
[ 37811, 198, 15946, 1460, 1672, 286, 703, 314, 561, 588, 4600, 44709, 63, 284, 307, 973, 13, 198, 198, 3546, 32851, 3307, 25, 198, 7, 16, 8, 36965, 3395, 330, 31172, 329, 734, 3840, 25, 198, 220, 220, 220, 357, 16, 13, 16, 8, 140...
3.291954
435
#!/usr/bin/env python '''Generally useful bits and bobs.''' import queue # For PrintThread and exe_run from time import sleep, time, gmtime, strftime # For lock timeout, exe_run timeout and logging import threading # For PrintThread import os # For ChangeDir, ...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 198, 7061, 6, 37058, 4465, 10340, 290, 275, 8158, 2637, 7061, 198, 198, 11748, 16834, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, ...
2.099731
13,035
# -*- coding: utf-8 -*- ########################################################################### ## Python code generated with wxFormBuilder (version Oct 26 2018) ## http://www.wxformbuilder.org/ ## ## PLEASE DO *NOT* EDIT THIS FILE! ########################################################################### impor...
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 198, 29113, 29113, 7804, 21017, 198, 2235, 11361, 2438, 7560, 351, 266, 87, 8479, 32875, 357, 9641, 2556, 2608, 2864, 8, 198, 2235, 2638, 1378, 2503, 13, 49345, 687, 382...
5.4
95
import json import click from tqdm import tqdm import numpy as np from PIL import Image from skimage.exposure import rescale_intensity from . import extraction, pipeline np.seterr(all='raise')
[ 11748, 33918, 198, 198, 11748, 3904, 198, 6738, 256, 80, 36020, 1330, 256, 80, 36020, 198, 11748, 299, 32152, 355, 45941, 198, 6738, 350, 4146, 1330, 7412, 198, 6738, 1341, 9060, 13, 1069, 26205, 1330, 6811, 1000, 62, 47799, 198, 198, ...
3.266667
60
from mezzanine import template from homepage.models import Info register = template.Library()
[ 6738, 502, 3019, 272, 500, 1330, 11055, 198, 6738, 34940, 13, 27530, 1330, 14151, 198, 198, 30238, 796, 11055, 13, 23377, 3419, 198 ]
4.130435
23
#!/usr/bin/python # -*- coding: utf-8 -*- """pytests for :mod:`.__main__`""" from mini_project_1.__main__ import get_parser, main import mock
[ 2, 48443, 14629, 14, 8800, 14, 29412, 198, 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 198, 37811, 9078, 41989, 329, 1058, 4666, 25, 44646, 834, 12417, 834, 63, 37811, 198, 198, 6738, 9927, 62, 16302, 62, 16, 13...
2.45
60
from kafka import KafkaConsumer consumer = KafkaConsumer('myTestTopic', bootstrap_servers='localhost:9092') for item in consumer: print("The Message is :", item) # https://kafka-1:9092
[ 6738, 479, 1878, 4914, 1330, 46906, 49106, 198, 49827, 796, 46906, 49106, 10786, 1820, 14402, 33221, 3256, 6297, 26418, 62, 2655, 690, 11639, 36750, 25, 44675, 17, 11537, 198, 1640, 2378, 287, 7172, 25, 198, 220, 220, 220, 3601, 7203, 4...
3.15
60
expected_output = { "instance": { "default": { "vrf": { "L3VPN-0050": { "address_family": { "vpnv4": { "default_vrf": "L3VPN-0050", "prefixes": { "1...
[ 40319, 62, 22915, 796, 1391, 198, 220, 220, 220, 366, 39098, 1298, 1391, 198, 220, 220, 220, 220, 220, 220, 220, 366, 12286, 1298, 1391, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 366, 37020, 69, 1298, 1391, 198, ...
1.232631
54,924
""" This file is here to register apps. """ from django.apps import AppConfig
[ 37811, 770, 2393, 318, 994, 284, 7881, 6725, 13, 37227, 198, 6738, 42625, 14208, 13, 18211, 1330, 2034, 16934, 628 ]
3.95
20
from .client import client from .config import db_pass, db_user import string import random
[ 6738, 764, 16366, 1330, 5456, 198, 6738, 764, 11250, 1330, 20613, 62, 6603, 11, 20613, 62, 7220, 198, 198, 11748, 4731, 198, 11748, 4738, 628 ]
3.76
25
import hashlib import json import datetime import Util #Defining the block into our blockchain #Genesis block creator def create_genesis_block(): return Block(0, datetime.datetime.now(), "Genesis block", "0") def next_block(last_block): this_data = json.dumps({ "proof-of-work": last_block.index + 1, ...
[ 11748, 12234, 8019, 198, 11748, 33918, 198, 11748, 4818, 8079, 198, 11748, 7273, 346, 198, 198, 2, 7469, 3191, 262, 2512, 656, 674, 11779, 198, 198, 2, 13746, 9339, 2512, 13172, 198, 4299, 2251, 62, 5235, 9339, 62, 9967, 33529, 198, 2...
2.748408
314
from pwn import * p = process("./vuln_3.o") gdb.attach(p) for i in range(8): malloc('a') malloc('a') malloc('a') for i in range(9): free(i-1) free(8) free(9) free(8) for i in range(8): malloc('a') malloc('\x48\xc0\x04\x08') malloc('1') malloc('1') p.sendlineafter('>> ','1 ' +'admin') p.interacti...
[ 6738, 279, 675, 1330, 1635, 628, 198, 79, 796, 1429, 7, 1911, 14, 85, 377, 77, 62, 18, 13, 78, 4943, 198, 198, 70, 9945, 13, 47348, 7, 79, 8, 198, 198, 1640, 1312, 287, 2837, 7, 23, 2599, 198, 220, 220, 220, 17374, 420, 10786,...
1.934524
168
#!/usr/bin/env python """ sentry-twilio ============= Sentry Notification plugin for Twilio Programmable SMS. :copyright: 2017 Luis Nell. :license: MIT, see LICENSE for more details. """ from __future__ import absolute_import from setuptools import setup, find_packages VERSION = '1.0' install_requires = [ 'twil...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 37811, 198, 82, 13000, 12, 4246, 346, 952, 198, 25609, 28, 198, 50, 13000, 42808, 13877, 329, 1815, 346, 952, 6118, 44102, 29287, 13, 198, 25, 22163, 4766, 25, 2177, 20894, 399, 695, ...
2.478351
485
import re from datetime import timedelta import responses from django.test import override_settings from django.utils.timezone import now from model_mommy.mommy import make from websubsub.models import Subscription from websubsub.tasks import refresh_subscriptions, retry_failed from .base import BaseTestCase, method_...
[ 11748, 302, 198, 6738, 4818, 8079, 1330, 28805, 12514, 198, 198, 11748, 9109, 198, 6738, 42625, 14208, 13, 9288, 1330, 20957, 62, 33692, 198, 6738, 42625, 14208, 13, 26791, 13, 2435, 11340, 1330, 783, 198, 6738, 2746, 62, 32542, 1820, 1...
3.666667
90
import Constants from .Hydrogen import Hydrogen from .Cosmology import Cosmology from .HaloMassFunction import HaloMassFunction from .RateCoefficients import RateCoefficients from .SecondaryElectrons import SecondaryElectrons from .CrossSections import PhotoIonizationCrossSection
[ 11748, 4757, 1187, 198, 6738, 764, 40436, 8648, 1330, 15084, 8648, 198, 6738, 764, 36734, 29126, 1330, 10437, 29126, 198, 6738, 764, 39, 7335, 20273, 22203, 1330, 18597, 20273, 22203, 198, 6738, 764, 32184, 34, 2577, 2108, 2334, 1330, 148...
4.014286
70
from __future__ import absolute_import from __future__ import division from __future__ import print_function import logging import numpy as np import random from collections import deque import torch from os.path import exists from torch.nn.functional import smooth_l1_loss, mse_loss # noqa from torch.optim import Adam...
[ 6738, 11593, 37443, 834, 1330, 4112, 62, 11748, 198, 6738, 11593, 37443, 834, 1330, 7297, 198, 6738, 11593, 37443, 834, 1330, 3601, 62, 8818, 198, 11748, 18931, 198, 11748, 299, 32152, 355, 45941, 198, 11748, 4738, 198, 6738, 17268, 1330,...
3.695238
105
"""Widgets abstract out common View rendering patterns like displaying a list of logging messages or a bar chart. They typically take the ClusterData object, a window, and a list of keys they should care about from ClusterData. They then draw directly onto the window.""" from operator import itemgetter from .curses_u...
[ 37811, 54, 312, 11407, 12531, 503, 2219, 3582, 14837, 7572, 588, 19407, 198, 64, 1351, 286, 18931, 6218, 393, 257, 2318, 8262, 13, 1119, 6032, 1011, 262, 38279, 6601, 198, 15252, 11, 257, 4324, 11, 290, 257, 1351, 286, 8251, 484, 815,...
4.283951
81
""" Copyright 2020 Twitter, Inc. SPDX-License-Identifier: Apache-2.0 """ import unittest import math import torch from feature_propagation import FeaturePropagation if __name__ == "__main__": unittest.main()
[ 37811, 198, 15269, 12131, 3009, 11, 3457, 13, 198, 4303, 36227, 12, 34156, 12, 33234, 7483, 25, 24843, 12, 17, 13, 15, 198, 37811, 198, 11748, 555, 715, 395, 198, 11748, 10688, 198, 198, 11748, 28034, 198, 198, 6738, 3895, 62, 22930, ...
2.972603
73
# -*- coding: utf-8 -*- from publication_backbone.views.publication import PublicationListHybridView from publication_backbone import conf as config #============================================================================== # PromotionListHybridView #===============================================================...
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 6738, 9207, 62, 1891, 15992, 13, 33571, 13, 11377, 341, 1330, 45065, 8053, 21217, 10236, 7680, 198, 6738, 9207, 62, 1891, 15992, 1330, 1013, 355, 4566, 198, 198, 2, 2392...
5.775862
58
import os import unittest import numpy.testing as npt from tradssat import SoilFile, WTHFile, MTHFile, ExpFile, CULFile, ECOFile, DSSATResults from tradssat.out import SoilTempOut, SoilNiOut, SummaryOut, PlantGroOut, ETOut, SoilWatOut, MulchOut from tests.utils import _test_read, _test_write, rsrcs, read_json, get_re...
[ 11748, 28686, 198, 11748, 555, 715, 395, 198, 198, 11748, 299, 32152, 13, 33407, 355, 299, 457, 198, 6738, 2083, 824, 265, 1330, 1406, 346, 8979, 11, 370, 4221, 8979, 11, 337, 4221, 8979, 11, 5518, 8979, 11, 327, 6239, 8979, 11, 390...
2.705128
234
# 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 u...
[ 2, 49962, 284, 262, 24843, 10442, 5693, 357, 1921, 37, 8, 739, 530, 198, 2, 393, 517, 18920, 5964, 11704, 13, 220, 4091, 262, 28536, 2393, 198, 2, 9387, 351, 428, 670, 329, 3224, 1321, 198, 2, 5115, 6634, 9238, 13, 220, 383, 7054,...
3.995495
222
import logging import unittest from src.gh_action_docs import app logging.disable(logging.CRITICAL) if __name__ == "__main__": unittest.main()
[ 11748, 18931, 198, 11748, 555, 715, 395, 198, 6738, 12351, 13, 456, 62, 2673, 62, 31628, 1330, 598, 198, 198, 6404, 2667, 13, 40223, 7, 6404, 2667, 13, 9419, 2043, 20151, 8, 628, 198, 198, 361, 11593, 3672, 834, 6624, 366, 834, 1241...
2.696429
56
#! /usr/bin/env python # coding=utf-8 from __future__ import print_function, division from scipy.stats import sigmaclip from astwro.pydaophot import daophot from astwro.pydaophot import fname from astwro.pydaophot import allstar from astwro.starlist import read_dao_file from astwro.starlist import write_ds9_regions ...
[ 2, 0, 1220, 14629, 14, 8800, 14, 24330, 21015, 198, 2, 19617, 28, 40477, 12, 23, 198, 198, 6738, 11593, 37443, 834, 1330, 3601, 62, 8818, 11, 7297, 198, 198, 6738, 629, 541, 88, 13, 34242, 1330, 264, 17225, 37779, 541, 198, 198, 6...
2.927602
221
from xml.dom.minidom import parse if __name__ == '__main__': # DOMTree = parse("config.xml") collection = DOMTree.documentElement header = collection.getElementsByTagName('header')[0].childNodes[0].data printLine() print('Header:\n', header) printLine() version = header[:1] prin...
[ 6738, 35555, 13, 3438, 13, 1084, 312, 296, 1330, 21136, 198, 198, 361, 11593, 3672, 834, 6624, 705, 834, 12417, 834, 10354, 198, 220, 220, 220, 1303, 220, 198, 220, 220, 220, 24121, 27660, 796, 21136, 7203, 11250, 13, 19875, 4943, 198...
2.184287
1,031
from django.test import TestCase from django.contrib.auth.models import User from dixit import settings from dixit.game.models.game import Game, GameStatus from dixit.game.models.player import Player
[ 198, 6738, 42625, 14208, 13, 9288, 1330, 6208, 20448, 198, 6738, 42625, 14208, 13, 3642, 822, 13, 18439, 13, 27530, 1330, 11787, 198, 198, 6738, 288, 844, 270, 1330, 6460, 198, 6738, 288, 844, 270, 13, 6057, 13, 27530, 13, 6057, 1330,...
3.383333
60
# -*- coding: utf-8 -*- """ Django settings for portality project. Generated by 'django-admin startproject' using Django 1.8.17. For more information on this file, see https://docs.djangoproject.com/en/1.8/topics/settings/ For the full list of settings and their values, see https://docs.djangoproject.com/en/1.8/ref/...
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 37811, 198, 35, 73, 14208, 6460, 329, 2493, 1483, 1628, 13, 198, 198, 8645, 515, 416, 705, 28241, 14208, 12, 28482, 923, 16302, 6, 1262, 37770, 352, 13, 23, 13, 1558, ...
2.145465
3,451
from django.apps import AppConfig
[ 6738, 42625, 14208, 13, 18211, 1330, 2034, 16934, 628 ]
3.888889
9
print(convert(10,2)) print(convert_inv(10,2))
[ 198, 198, 4798, 7, 1102, 1851, 7, 940, 11, 17, 4008, 628, 198, 4798, 7, 1102, 1851, 62, 16340, 7, 940, 11, 17, 4008, 198 ]
2
25
from pybricks.pupdevices import Motor from pybricks.tools import wait from pybricks.parameters import Port, Direction from pybricks.robotics import SpikeBase from pybricks import version print(version) # Initialize base. left_motor = Motor(Port.C) right_motor = Motor(Port.D) spike_base = SpikeBase(left_motor, right_m...
[ 6738, 12972, 65, 23706, 13, 79, 929, 42034, 1330, 12533, 198, 6738, 12972, 65, 23706, 13, 31391, 1330, 4043, 198, 6738, 12972, 65, 23706, 13, 17143, 7307, 1330, 4347, 11, 41837, 198, 6738, 12972, 65, 23706, 13, 305, 13645, 873, 1330, ...
2.898592
355