content
stringlengths
1
1.04M
input_ids
listlengths
1
774k
ratio_char_token
float64
0.38
22.9
token_count
int64
1
774k
import platform from friendlyshell.basic_shell import BasicShell import pytest from mock import patch @pytest.mark.skipif(platform.python_implementation()=="PyPy", reason="Test not supported on PyPy") if __name__ == "__main__": pytest.main([__file__, "-v", "-s"])
[ 11748, 3859, 198, 6738, 8030, 29149, 13, 35487, 62, 29149, 1330, 14392, 23248, 198, 11748, 12972, 9288, 198, 6738, 15290, 1330, 8529, 628, 198, 31, 9078, 9288, 13, 4102, 13, 48267, 361, 7, 24254, 13, 29412, 62, 320, 32851, 3419, 855, ...
2.745283
106
import json import hashlib import base64
[ 11748, 33918, 198, 11748, 12234, 8019, 198, 11748, 2779, 2414, 198 ]
3.727273
11
import json import os import time from subprocess import call from threading import Thread import django from django.conf import settings from django.test import RequestFactory, TestCase from django.views.generic.base import TemplateView from django_jinja.builtins import DEFAULT_EXTENSIONS from unittest2 import skipIf...
[ 11748, 33918, 198, 11748, 28686, 198, 11748, 640, 198, 6738, 850, 14681, 1330, 869, 198, 6738, 4704, 278, 1330, 14122, 198, 198, 11748, 42625, 14208, 198, 6738, 42625, 14208, 13, 10414, 1330, 6460, 198, 6738, 42625, 14208, 13, 9288, 1330,...
3.204188
191
from django.http import HttpRequest, HttpResponse from zerver.models import UserProfile from zerver.lib.actions import notify_attachment_update from zerver.lib.validator import check_int from zerver.lib.response import json_success from zerver.lib.attachments import user_attachments, remove_attachment, \ access_at...
[ 6738, 42625, 14208, 13, 4023, 1330, 367, 29281, 18453, 11, 367, 29281, 31077, 198, 198, 6738, 1976, 18497, 13, 27530, 1330, 11787, 37046, 198, 6738, 1976, 18497, 13, 8019, 13, 4658, 1330, 19361, 62, 1078, 15520, 62, 19119, 198, 6738, 19...
3.438776
98
from multiprocessing import Process, Queue import warnings class ErrorInProcessException(RuntimeError): """Exception raised when one or more parallel processes raises an exception""" def run_parallel(*functions): """Runs a series of functions in parallel. Return values are ordered by the order in which thei...
[ 6738, 18540, 305, 919, 278, 1330, 10854, 11, 4670, 518, 198, 11748, 14601, 628, 198, 4871, 13047, 818, 18709, 16922, 7, 41006, 12331, 2599, 198, 220, 220, 220, 37227, 16922, 4376, 618, 530, 393, 517, 10730, 7767, 12073, 281, 6631, 37811...
2.995781
711
# Script to add the min and max mz values to feature objects # takes as input the path of a dictionary file that must have a 'features' key import os import pickle import numpy as np import sys os.environ.setdefault("DJANGO_SETTINGS_MODULE", "ms2ldaviz.settings") import django django.setup() from basicviz.models im...
[ 2, 12327, 284, 751, 262, 949, 290, 3509, 285, 89, 3815, 284, 3895, 5563, 198, 2, 2753, 355, 5128, 262, 3108, 286, 257, 22155, 2393, 326, 1276, 423, 257, 705, 40890, 6, 1994, 198, 198, 11748, 28686, 198, 11748, 2298, 293, 198, 11748,...
2.746177
327
import os import json
[ 11748, 28686, 198, 11748, 33918, 198 ]
3.666667
6
# # Copyright (c) 2022 Airbyte, Inc., all rights reserved. # import importlib.resources as pkg_resources import os from pathlib import Path from typing import Iterable, Tuple import click from octavia_cli.base_commands import OctaviaCommand from . import example_files DIRECTORIES_TO_CREATE = {"connections", "destin...
[ 2, 198, 2, 15069, 357, 66, 8, 33160, 3701, 26327, 11, 3457, 1539, 477, 2489, 10395, 13, 198, 2, 198, 198, 11748, 1330, 8019, 13, 37540, 355, 279, 10025, 62, 37540, 198, 11748, 28686, 198, 6738, 3108, 8019, 1330, 10644, 198, 6738, 19...
3.183673
196
# python peripherals import random import os import sys import math sys.path.insert(1, os.path.join(sys.path[0], '../..')) # numpy import numpy # pandas import pandas # ipython from IPython.display import display, HTML # matplotlib import matplotlib.pyplot as plt import matplotlib.ticker as ticker import matplotlib...
[ 2, 21015, 18375, 874, 198, 11748, 4738, 198, 11748, 28686, 198, 11748, 25064, 198, 11748, 10688, 198, 17597, 13, 6978, 13, 28463, 7, 16, 11, 28686, 13, 6978, 13, 22179, 7, 17597, 13, 6978, 58, 15, 4357, 705, 40720, 492, 6, 4008, 198...
2.767375
2,072
from django.shortcuts import render from met.models import Artist from api.serializers import ArtistSerializer from rest_framework import generics, permissions, status, viewsets from rest_framework.response import Response class ArtistViewSet(viewsets.ModelViewSet): """ This ViewSet provides both 'list' and 'detai...
[ 6738, 42625, 14208, 13, 19509, 23779, 1330, 8543, 198, 6738, 1138, 13, 27530, 1330, 18902, 220, 198, 6738, 40391, 13, 46911, 11341, 1330, 18902, 32634, 7509, 198, 6738, 1334, 62, 30604, 1330, 1152, 873, 11, 21627, 11, 3722, 11, 5009, 10...
3.625899
139
from datetime import datetime, timedelta, timezone from collections import deque from math import sqrt from time import monotonic from logging import getLogger from pkg_resources import resource_stream from tempfile import NamedTemporaryFile from .utils import load_pickle, dump_pickle from .db import Session, get_poke...
[ 6738, 4818, 8079, 1330, 4818, 8079, 11, 28805, 12514, 11, 640, 11340, 198, 6738, 17268, 1330, 390, 4188, 198, 6738, 10688, 1330, 19862, 17034, 198, 6738, 640, 1330, 937, 313, 9229, 198, 6738, 18931, 1330, 651, 11187, 1362, 198, 6738, 27...
2.278882
1,610
# uncompyle6 version 3.4.1 # Python bytecode 2.7 (62211) # Decompiled from: Python 2.7.16 (v2.7.16:413a49145e, Mar 2 2019, 14:32:10) # [GCC 4.2.1 Compatible Apple LLVM 6.0 (clang-600.0.57)] # Embedded file name: /Users/versonator/Jenkins/live/output/mac_64_static/Release/python-bundle/MIDI Remote Scripts/SL_MkIII/ski...
[ 2, 34318, 2349, 21, 2196, 513, 13, 19, 13, 16, 198, 2, 11361, 18022, 8189, 362, 13, 22, 357, 21, 1828, 1157, 8, 198, 2, 4280, 3361, 3902, 422, 25, 11361, 362, 13, 22, 13, 1433, 357, 85, 17, 13, 22, 13, 1433, 25, 44103, 64, 2...
2.558824
204
med=0 c=0 while c!=2: n=float(input()) if n>=0 and n<=10: med=med+n c=c+1 else: print("nota invalida") med=med/2 print("media = %.2f" %med)
[ 1150, 28, 15, 198, 66, 28, 15, 198, 4514, 269, 0, 28, 17, 25, 198, 220, 220, 220, 220, 299, 28, 22468, 7, 15414, 28955, 198, 220, 220, 220, 220, 611, 299, 29, 28, 15, 290, 299, 27, 28, 940, 25, 198, 220, 220, 220, 220, 220, ...
1.603448
116
for _ in range(int(input())): A, B, C, D = map(int, input().split()) if A < B or C + D < B: print("No") continue elif C >= B - 1: print("Yes") continue ret = [] s_set = set() now = A while True: now %= B if now in s_set: print("Yes"...
[ 1640, 4808, 287, 2837, 7, 600, 7, 15414, 28955, 2599, 198, 220, 220, 220, 317, 11, 347, 11, 327, 11, 360, 796, 3975, 7, 600, 11, 5128, 22446, 35312, 28955, 198, 220, 220, 220, 611, 317, 1279, 347, 393, 327, 1343, 360, 1279, 347, ...
1.689542
306
''' A.Q. Snyder TFR Tire Data Analysis this code is written to analyze the TTC FSAE tire data the code is written in a linear, easy to read format catered towards an engineering mindset rather than efficient software Contact: aaron.snyder@temple.edu for help running or understanding the program ''' #_____________...
[ 7061, 6, 198, 32, 13, 48, 13, 22543, 198, 10234, 49, 45942, 6060, 14691, 198, 5661, 2438, 318, 3194, 284, 16602, 262, 42662, 42894, 36, 15867, 1366, 198, 1169, 2438, 318, 3194, 287, 257, 14174, 11, 2562, 284, 1100, 5794, 269, 34190, ...
2.338635
1,509
from clickhouse_driver import Client from utils import * from configs.default import * def connect_db(): ''' Creates a connection to the CLickhouse database. :return: Error if some exception occurred else tuple containing connection object and None. ''' try: client = Client(host='localhost...
[ 6738, 3904, 4803, 62, 26230, 1330, 20985, 198, 6738, 3384, 4487, 1330, 1635, 198, 6738, 4566, 82, 13, 12286, 1330, 1635, 628, 198, 4299, 2018, 62, 9945, 33529, 198, 220, 220, 220, 705, 7061, 198, 220, 220, 220, 7921, 274, 257, 4637, ...
2.537954
1,818
from tasks.models import Task, TaskTaken from issues.models import Issue from django.conf import settings from django.db.models import Q from django.db import transaction from django.shortcuts import render_to_response, get_object_or_404, redirect from django.contrib.auth.decorators import login_required from django.t...
[ 6738, 8861, 13, 27530, 1330, 15941, 11, 15941, 51, 1685, 198, 6738, 2428, 13, 27530, 1330, 18232, 198, 198, 6738, 42625, 14208, 13, 10414, 1330, 6460, 198, 6738, 42625, 14208, 13, 9945, 13, 27530, 1330, 1195, 198, 6738, 42625, 14208, 13...
3.521429
140
from pathlib import Path from typing import Any, Optional, Union from pydantic import BaseModel, BaseSettings, Extra, Field SettingsField = Field # noqa """Extendable settings field""" class BaseDynaconf: """Extendable model""" def _d_get_value(self, key: str, default: Any = None) -> Any: """Get ...
[ 6738, 3108, 8019, 1330, 10644, 198, 6738, 19720, 1330, 4377, 11, 32233, 11, 4479, 198, 198, 6738, 279, 5173, 5109, 1330, 7308, 17633, 11, 7308, 26232, 11, 17221, 11, 7663, 628, 198, 26232, 15878, 796, 7663, 220, 1303, 645, 20402, 198, ...
2.365756
1,501
from helper import unittest, PillowTestCase, hopper from PIL import Image if __name__ == '__main__': unittest.main() # End of file
[ 6738, 31904, 1330, 555, 715, 395, 11, 19770, 322, 14402, 20448, 11, 8169, 2848, 198, 198, 6738, 350, 4146, 1330, 7412, 628, 198, 198, 361, 11593, 3672, 834, 6624, 705, 834, 12417, 834, 10354, 198, 220, 220, 220, 555, 715, 395, 13, 1...
2.745098
51
''' Functions Summary: This file contains Example: Usage of Todo: * ''' ''' Imports ''' # data array handling import numpy as np # data table handling import pandas as pd from operator import itemgetter from itertools import groupby ''' Current-Voltage File Format Parse Functions ''' def ty...
[ 198, 7061, 6, 40480, 198, 198, 22093, 25, 198, 220, 220, 220, 770, 2393, 4909, 198, 198, 16281, 25, 198, 220, 220, 220, 29566, 286, 198, 198, 51, 24313, 25, 198, 220, 220, 220, 1635, 198, 7061, 6, 628, 198, 198, 7061, 6, 1846, 3...
2.274283
2,512
# pylint: disable=missing-docstring from unittest.mock import Mock import pytest from peltak.core.hooks import HooksRegister
[ 2, 279, 2645, 600, 25, 15560, 28, 45688, 12, 15390, 8841, 198, 6738, 555, 715, 395, 13, 76, 735, 1330, 44123, 198, 198, 11748, 12972, 9288, 198, 198, 6738, 279, 2120, 461, 13, 7295, 13, 25480, 82, 1330, 18531, 82, 38804, 628, 628, ...
2.934783
46
""" Test datasets """ from fastapi.testclient import TestClient from main import app, PREFIX client = TestClient(app) EXAMPLE_DATASET_BODY = { "name": "Unit Test Dataset", "description": "Dataset created during a unit test", "labels": [ { "name": "Boolean", "variant": "bo...
[ 37811, 198, 14402, 40522, 198, 37811, 198, 198, 6738, 3049, 15042, 13, 9288, 16366, 1330, 6208, 11792, 198, 198, 6738, 1388, 1330, 598, 11, 22814, 47084, 198, 198, 16366, 796, 6208, 11792, 7, 1324, 8, 198, 198, 6369, 2390, 16437, 62, ...
2.468499
873
import os import re #If len > 0, the HTML line given contains single and/or double quotation marks #Takes the HTML lines with quotation marks and returns the codification #depending on if it has single or double quotation marks. if __name__ == "__main__": # test_bits_total() # test_num_attributes_line...
[ 11748, 28686, 198, 11748, 302, 198, 198, 2, 1532, 18896, 1875, 657, 11, 262, 11532, 1627, 1813, 4909, 2060, 290, 14, 273, 4274, 35777, 8849, 628, 628, 198, 198, 2, 51, 1124, 262, 11532, 3951, 351, 35777, 8849, 290, 5860, 262, 14873, ...
3.306931
101
import json from abc import ABCMeta, abstractmethod import time import threading import hashlib import base64 import random from typing import Optional, List from pathlib import Path from api import Marketplace, Producer from server import MerchantServer from models import SoldOffer, Offer
[ 11748, 33918, 198, 6738, 450, 66, 1330, 9738, 48526, 11, 12531, 24396, 198, 11748, 640, 198, 11748, 4704, 278, 198, 11748, 12234, 8019, 198, 11748, 2779, 2414, 198, 11748, 4738, 198, 6738, 19720, 1330, 32233, 11, 7343, 198, 6738, 3108, ...
4.373134
67
import argparse import glob import os from video_ffmpeg_utils import VideoFfmpegUtils """ Copy Timecode and enc ProResHQ or h265 Example: python3 copy_timecode.py \ --video-src "PATH_TO_VIDEO_SRC" \ --video-out "PATH_TO_VIDEO_OUT" \ --codec h265 \ --copy-tc \ """ # --------------...
[ 11748, 1822, 29572, 198, 11748, 15095, 198, 11748, 28686, 198, 198, 6738, 2008, 62, 487, 43913, 62, 26791, 1330, 7623, 37, 38353, 22071, 18274, 4487, 628, 198, 37811, 198, 29881, 3862, 8189, 290, 2207, 1041, 4965, 41275, 393, 289, 22980, ...
2.389976
818
"""Codec functions for IDP Common Message Format supported by Inmarsat MGS. Also supported on ORBCOMM IGWS1. """ from binascii import b2a_base64 from math import log2, ceil from struct import pack, unpack from typing import Tuple, Union from warnings import WarningMessage, warn import xml.etree.ElementTree as ET from...
[ 37811, 43806, 721, 5499, 329, 4522, 47, 8070, 16000, 18980, 4855, 416, 554, 76, 945, 265, 337, 14313, 13, 198, 198, 7583, 4855, 319, 6375, 2749, 2662, 44, 35336, 19416, 16, 13, 198, 37811, 198, 198, 6738, 9874, 292, 979, 72, 1330, 2...
2.18657
15,383
if __name__ == "__main__" : main()
[ 628, 628, 198, 361, 11593, 3672, 834, 6624, 366, 834, 12417, 834, 1, 1058, 1388, 3419 ]
2.4375
16
from pathlib import Path TEST_DATA_DIR = Path("/Users/sean/code/pharedox/data")
[ 6738, 3108, 8019, 1330, 10644, 628, 198, 51, 6465, 62, 26947, 62, 34720, 796, 10644, 7203, 14, 14490, 14, 325, 272, 14, 8189, 14, 746, 1144, 1140, 14, 7890, 4943, 198 ]
2.645161
31
"""Service module.""" import datetime import uuid import zoneinfo from typing import Any, Optional from ... import config from ...utils import encoding from . import password_hashing, repository async def create_user( username: str, email: str, first_name: str, last_name: str, password: str, ...
[ 37811, 16177, 8265, 526, 15931, 198, 198, 11748, 4818, 8079, 198, 11748, 334, 27112, 198, 11748, 6516, 10951, 198, 6738, 19720, 1330, 4377, 11, 32233, 198, 198, 6738, 2644, 1330, 4566, 198, 6738, 2644, 26791, 1330, 21004, 198, 6738, 764, ...
2.701651
1,696
import numpy as np def GSFC_NK(data, **kwargs): ''' Picker algorithm by NASA Goddard Arguments must include the snowradar trace data itself (passed as a 1D float array) as well as any parameters required by the algorithm for layer-picking Only 2 picked layers are expected 1. air-snow lay...
[ 11748, 299, 32152, 355, 45941, 198, 198, 4299, 26681, 4851, 62, 46888, 7, 7890, 11, 12429, 46265, 22046, 2599, 198, 220, 220, 220, 705, 7061, 198, 220, 220, 220, 12346, 263, 11862, 416, 8884, 47386, 628, 220, 220, 220, 20559, 2886, 12...
2.819121
387
from typing import Dict, Tuple, Union from numpy.typing import DTypeLike # noqa: F401 DimsT = Tuple[Union[str, None]] ShapeT = Tuple[Union[int, None]] ChunksT = Union[bool, Dict[str, Union[int, None]]]
[ 6738, 19720, 1330, 360, 713, 11, 309, 29291, 11, 4479, 198, 198, 6738, 299, 32152, 13, 774, 13886, 1330, 360, 6030, 7594, 220, 1303, 645, 20402, 25, 376, 21844, 198, 198, 35, 12078, 51, 796, 309, 29291, 58, 38176, 58, 2536, 11, 6045...
2.594937
79
from modules.feedback.models.feedback_field import FeedbackField from modules.feedback.models.feedback_score_field import FeedbackScoreField from modules.feedback.models.feedback import Feedback
[ 6738, 13103, 13, 12363, 1891, 13, 27530, 13, 12363, 1891, 62, 3245, 1330, 37774, 15878, 198, 6738, 13103, 13, 12363, 1891, 13, 27530, 13, 12363, 1891, 62, 26675, 62, 3245, 1330, 37774, 26595, 15878, 198, 6738, 13103, 13, 12363, 1891, 13...
4.0625
48
from setuptools import setup, find_packages from codecs import open from os import path here = path.abspath(path.dirname(__file__)) with open(path.join(here, 'README.md'), encoding='utf-8') as f: long_description = f.read() install_requires = [ 'luigi', 'gokart>=0.1.20', 'python-dateutil==2.7.5', ...
[ 6738, 900, 37623, 10141, 1330, 9058, 11, 1064, 62, 43789, 198, 6738, 40481, 82, 1330, 1280, 198, 6738, 28686, 1330, 3108, 198, 198, 1456, 796, 3108, 13, 397, 2777, 776, 7, 6978, 13, 15908, 3672, 7, 834, 7753, 834, 4008, 198, 4480, 1...
2.428916
415
"""rio_viz.cli.""" import os import tempfile from contextlib import contextmanager, ExitStack import click from rio_viz import app, raster from rio_cogeo.cogeo import cog_validate, cog_translate from rio_cogeo.profiles import cog_profiles @contextmanager def TemporaryRasterFile(dst_path, suffix=".tif"): """Cre...
[ 37811, 27250, 62, 85, 528, 13, 44506, 526, 15931, 198, 198, 11748, 28686, 198, 11748, 20218, 7753, 198, 6738, 4732, 8019, 1330, 4732, 37153, 11, 29739, 25896, 198, 198, 11748, 3904, 198, 6738, 374, 952, 62, 85, 528, 1330, 598, 11, 374...
2.15253
1,403
# -*- coding: utf-8 -*- # Generated by Django 1.10.5 on 2017-01-24 09:04 from __future__ import unicode_literals from django.db import migrations, models import django.utils.timezone
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 2, 2980, 515, 416, 37770, 352, 13, 940, 13, 20, 319, 2177, 12, 486, 12, 1731, 7769, 25, 3023, 198, 6738, 11593, 37443, 834, 1330, 28000, 1098, 62, 17201, 874, 198, 1...
2.80303
66
#-*- coding: utf-8 -*- import sys import os import glob import click #import click_completion #click_completion.init() from sequana import version import functools __all__ = ["main"] import sequana import colorlog logger = colorlog.getLogger(__name__) # This can be used by all commands as a simple decorator C...
[ 2, 12, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 198, 11748, 25064, 198, 11748, 28686, 198, 11748, 15095, 198, 11748, 3904, 198, 2, 11748, 3904, 62, 785, 24547, 198, 198, 2, 12976, 62, 785, 24547, 13, 15003, 3419, 198, ...
2.443369
10,745
def problem463(): """ The function $f$ is defined for all positive integers as follows: • $f(1)=1$ • $f(3)=3$ • $f(2n)=f(n)$ • $f(4n + 1)=2f(2n + 1) - f(n)$ • $f(4n + 3)=3f(2n + 1) - 2f(n)$ The function $S(n)$ is defined as $\\sum_{i=1}^{n}f(i)$. $...
[ 4299, 1917, 38380, 33529, 198, 220, 220, 220, 37227, 628, 198, 220, 220, 220, 383, 2163, 720, 69, 3, 318, 5447, 329, 477, 3967, 37014, 355, 5679, 25, 628, 220, 220, 220, 220, 220, 220, 220, 220, 5595, 720, 69, 7, 16, 47505, 16, ...
1.784232
241
#this is for testing, an internal testbench to verify implemented features from bs4 import BeautifulSoup from course import MyCourse import requests import csv import cscraper cscraper.updateCSV() courses = cscraper.findCoursebyID("MaTh 170") for course in courses: course.printCourse() courses = cscraper.findCour...
[ 2, 5661, 318, 329, 4856, 11, 281, 5387, 1332, 26968, 284, 11767, 9177, 3033, 198, 198, 6738, 275, 82, 19, 1330, 23762, 50, 10486, 198, 6738, 1781, 1330, 2011, 49046, 198, 11748, 7007, 198, 11748, 269, 21370, 198, 11748, 269, 1416, 385...
2.890511
274
from pymantic.compat import ( binary_type, ) class LarkParser(object): """Provide a consistent interface for parsing serialized RDF using one of the lark parsers. """ def parse(self, string_or_stream, graph=None): """Parse a string or file-like object into RDF primitives and add t...
[ 6738, 279, 4948, 5109, 13, 5589, 265, 1330, 357, 198, 220, 220, 220, 13934, 62, 4906, 11, 198, 8, 628, 198, 4871, 406, 668, 46677, 7, 15252, 2599, 198, 220, 220, 220, 37227, 15946, 485, 257, 6414, 7071, 329, 32096, 11389, 1143, 371,...
2.182624
564
import unittest import numpy as np from utils_ml.src.data_processing import data_processing_utils if __name__ == '__main__': unittest.main()
[ 11748, 555, 715, 395, 198, 198, 11748, 299, 32152, 355, 45941, 198, 198, 6738, 3384, 4487, 62, 4029, 13, 10677, 13, 7890, 62, 36948, 1330, 1366, 62, 36948, 62, 26791, 628, 198, 198, 361, 11593, 3672, 834, 6624, 705, 834, 12417, 834, ...
2.777778
54
"""Main TTX application, Mac-only""" #make sure we don't lose events to SIOUX import MacOS MacOS.EnableAppswitch(-1) SetWatchCursor() # a few constants LOGFILENAME = "TTX errors" PREFSFILENAME = "TTX preferences" DEFAULTXMLOUTPUT = ":XML output" DEFAULTTTOUTPUT = ":TrueType output" import FrameWork import MiniAEF...
[ 37811, 13383, 26653, 55, 3586, 11, 4100, 12, 8807, 37811, 628, 198, 2, 15883, 1654, 356, 836, 470, 4425, 2995, 284, 25861, 2606, 55, 198, 11748, 4100, 2640, 198, 14155, 2640, 13, 36695, 4677, 31943, 32590, 16, 8, 198, 198, 7248, 10723...
2.583333
1,092
#!/usr/bin/env python # # Copyright 2007 Google 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 o...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 2, 198, 2, 15069, 4343, 3012, 3457, 13, 198, 2, 198, 2, 49962, 739, 262, 24843, 13789, 11, 10628, 362, 13, 15, 357, 1169, 366, 34156, 15341, 198, 2, 345, 743, 407, 779, 428, 2393, ...
3.288828
367
from unittest import TestCase from scrapy.exporters import JsonLinesItemExporter, JsonItemExporter from scrapy.settings import BaseSettings, default_settings from s3pipeline import S3Pipeline from s3pipeline.strategies.s3 import S3Strategy from s3pipeline.strategies.gcs import GCSStrategy
[ 6738, 555, 715, 395, 1330, 6208, 20448, 198, 198, 6738, 15881, 88, 13, 1069, 1819, 1010, 1330, 449, 1559, 43, 1127, 7449, 3109, 26634, 11, 449, 1559, 7449, 3109, 26634, 198, 6738, 15881, 88, 13, 33692, 1330, 7308, 26232, 11, 4277, 62,...
3.052083
96
""" Vim YouCompleteMe""" import pathlib
[ 37811, 36645, 921, 20988, 5308, 37811, 198, 11748, 3108, 8019, 198 ]
3.636364
11
import base64 enc_response = base64.b64encode(flow.getVariable("sf.response")) flow.setVariable("sf.response", enc_response)
[ 11748, 2779, 2414, 198, 12685, 62, 26209, 796, 2779, 2414, 13, 65, 2414, 268, 8189, 7, 11125, 13, 1136, 43015, 7203, 28202, 13, 26209, 48774, 198, 11125, 13, 2617, 43015, 7203, 28202, 13, 26209, 1600, 2207, 62, 26209, 8 ]
3.179487
39
# -*- coding: utf-8 -*- ########################################################################### # Copyright (c), The AiiDA team. All rights reserved. # # This file is part of the AiiDA code. # # ...
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 29113, 29113, 7804, 21017, 198, 2, 15069, 357, 66, 828, 383, 317, 4178, 5631, 1074, 13, 1439, 2489, 10395, 13, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, ...
2.675393
382
"""connection full name Revision ID: e1855559096 Revises: 401bc82cc255 Create Date: 2015-09-26 17:40:20.742180 """ # revision identifiers, used by Alembic. revision = 'e1855559096' down_revision = '401bc82cc255' from alembic import op import sqlalchemy as sa
[ 37811, 38659, 1336, 1438, 198, 198, 18009, 1166, 4522, 25, 304, 1507, 2816, 38605, 2931, 21, 198, 18009, 2696, 25, 22219, 15630, 6469, 535, 13381, 198, 16447, 7536, 25, 1853, 12, 2931, 12, 2075, 1596, 25, 1821, 25, 1238, 13, 22, 3682,...
2.65
100
import logging from typing import Iterator from my_foo_project.foo import Foo from my_foo_project.client import foo_pb2 from optionalgrpc import IS_RUNNING_LOCAL
[ 11748, 18931, 198, 6738, 19720, 1330, 40806, 1352, 198, 198, 6738, 616, 62, 21943, 62, 16302, 13, 21943, 1330, 36080, 198, 6738, 616, 62, 21943, 62, 16302, 13, 16366, 1330, 22944, 62, 40842, 17, 198, 6738, 11902, 2164, 14751, 1330, 3180...
3.346939
49
__author__ = "jwely" __all__ = ["to_numpy"] from is_rast import is_rast from metadata import metadata import os import arcpy import numpy def to_numpy(raster, numpy_datatype = None): """ Wrapper for arcpy.RasterToNumpyArray with better metadata handling This is just a wraper for the RasterToNumPyArray...
[ 834, 9800, 834, 796, 366, 73, 732, 306, 1, 198, 834, 439, 834, 796, 14631, 1462, 62, 77, 32152, 8973, 628, 198, 6738, 318, 62, 5685, 1330, 318, 62, 5685, 198, 6738, 20150, 1330, 20150, 198, 198, 11748, 28686, 198, 11748, 10389, 9078...
2.262366
1,395
from output.models.nist_data.list_pkg.duration.schema_instance.nistschema_sv_iv_list_duration_length_2_xsd.nistschema_sv_iv_list_duration_length_2 import NistschemaSvIvListDurationLength2 __all__ = [ "NistschemaSvIvListDurationLength2", ]
[ 6738, 5072, 13, 27530, 13, 77, 396, 62, 7890, 13, 4868, 62, 35339, 13, 32257, 13, 15952, 2611, 62, 39098, 13, 77, 1023, 2395, 2611, 62, 21370, 62, 452, 62, 4868, 62, 32257, 62, 13664, 62, 17, 62, 87, 21282, 13, 77, 1023, 2395, 2...
2.541667
96
from lxml import etree import os import sys import shutil import iwjam_util # Performs an import of a mod project into a base project given a # previously computed ProjectDiff between them, # and a list of folder names to prefix # ('%modname%' will be replaced with the mod's name)
[ 6738, 300, 19875, 1330, 2123, 631, 198, 11748, 28686, 198, 11748, 25064, 198, 11748, 4423, 346, 198, 11748, 1312, 86, 39159, 62, 22602, 198, 198, 2, 2448, 23914, 281, 1330, 286, 257, 953, 1628, 656, 257, 2779, 1628, 1813, 257, 198, 2,...
3.423529
85
import numpy as np import matplotlib.pyplot as plt """ SDA.py: Plots the probability of the SDA model generating a connection based on different parameters for Figure 2.4. """ n = 3 alphas = [2, 3, 8] betas = [2, 3, 5] colors = ['r', 'g', 'b'] d = np.arange(0.0, 10.0, 0.1) ax = plt.subplot() for i in range...
[ 11748, 299, 32152, 355, 45941, 198, 11748, 2603, 29487, 8019, 13, 9078, 29487, 355, 458, 83, 198, 198, 37811, 198, 220, 220, 220, 311, 5631, 13, 9078, 25, 1345, 1747, 262, 12867, 286, 262, 311, 5631, 2746, 15453, 257, 4637, 198, 220, ...
2.189516
248
import pandas as pd from sklearn.model_selection._split import _BaseKFold from partition_optimizers import equally_partition_into_bins, mixed_equally_partition_into_bins # Using get_n_splits from the super class.
[ 11748, 19798, 292, 355, 279, 67, 198, 6738, 1341, 35720, 13, 19849, 62, 49283, 13557, 35312, 1330, 4808, 14881, 42, 37, 727, 198, 6738, 18398, 62, 40085, 11341, 1330, 8603, 62, 3911, 653, 62, 20424, 62, 65, 1040, 11, 7668, 62, 4853, ...
3.19403
67
# Generated by Django 2.1.5 on 2019-03-31 08:34 from django.db import migrations, models import django.db.models.deletion
[ 2, 2980, 515, 416, 37770, 362, 13, 16, 13, 20, 319, 13130, 12, 3070, 12, 3132, 8487, 25, 2682, 198, 198, 6738, 42625, 14208, 13, 9945, 1330, 15720, 602, 11, 4981, 198, 11748, 42625, 14208, 13, 9945, 13, 27530, 13, 2934, 1616, 295, ...
2.818182
44
import numpy from numpy import genfromtxt my_data = genfromtxt('matrix.csv', delimiter=',') def bin_ndarray(ndarray, new_shape, operation='sum'): """ Bins an ndarray in all axes based on the target shape, by summing or averaging. Number of output dimensions must match number of input dimensions...
[ 11748, 299, 32152, 628, 198, 6738, 299, 32152, 1330, 2429, 6738, 14116, 198, 1820, 62, 7890, 796, 2429, 6738, 14116, 10786, 6759, 8609, 13, 40664, 3256, 46728, 2676, 28, 3256, 11537, 628, 198, 4299, 9874, 62, 358, 18747, 7, 358, 18747, ...
1.878359
4,094
from django.shortcuts import render from django.views.generic import View from django.shortcuts import render, redirect, HttpResponseRedirect, reverse, HttpResponse from alipay import Alipay import time import string import random import json from operation.models import ShoppingCart, Shopping from .models import * f...
[ 6738, 42625, 14208, 13, 19509, 23779, 1330, 8543, 198, 6738, 42625, 14208, 13, 33571, 13, 41357, 1330, 3582, 198, 6738, 42625, 14208, 13, 19509, 23779, 1330, 8543, 11, 18941, 11, 367, 29281, 31077, 7738, 1060, 11, 9575, 11, 367, 29281, ...
1.767812
1,193
from decimal import Decimal import urllib import requests from authorize.exceptions import AuthorizeConnectionError, \ AuthorizeResponseError PROD_URL = 'https://secure.authorize.net/gateway/transact.dll' TEST_URL = 'https://test.authorize.net/gateway/transact.dll' RESPONSE_FIELDS = { 0: 'response_code', ...
[ 6738, 32465, 1330, 4280, 4402, 198, 11748, 2956, 297, 571, 198, 11748, 7007, 198, 198, 6738, 29145, 13, 1069, 11755, 1330, 6434, 1096, 32048, 12331, 11, 3467, 198, 220, 220, 220, 6434, 1096, 31077, 12331, 628, 198, 4805, 3727, 62, 21886...
2.516432
213
# Copyright 2008-2018 Univa Corporation # # 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, 3648, 12, 7908, 791, 12151, 10501, 198, 2, 198, 2, 49962, 739, 262, 24843, 13789, 11, 10628, 362, 13, 15, 357, 1169, 366, 34156, 15341, 198, 2, 345, 743, 407, 779, 428, 2393, 2845, 287, 11846, 351, 262, 13789, 13, 198, 2...
3.463602
261
# coding: utf-8 # Copyright (c) 2016, 2020, Oracle and/or its affiliates. All rights reserved. # This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may c...
[ 2, 19617, 25, 3384, 69, 12, 23, 198, 2, 15069, 357, 66, 8, 1584, 11, 12131, 11, 18650, 290, 14, 273, 663, 29116, 13, 220, 1439, 2489, 10395, 13, 198, 2, 770, 3788, 318, 10668, 12, 36612, 284, 345, 739, 262, 14499, 2448, 33532, 1...
2.359844
2,565
import os import btree from .util import file_exists DBNAME = 'defines.db'
[ 11748, 28686, 198, 11748, 275, 21048, 198, 6738, 764, 22602, 1330, 2393, 62, 1069, 1023, 198, 198, 11012, 20608, 796, 705, 4299, 1127, 13, 9945, 6, 628 ]
2.851852
27
from app.bootstrap.configmanager import ConfigManager DATABASES = { 'default': { 'ENGINE': 'django.db.backends.postgresql', 'USER': ConfigManager.get('db.user'), 'NAME': ConfigManager.get('db.name'), 'PASSWORD': ConfigManager.get('db.pass'), 'HOST': ConfigManager.get('db.hos...
[ 6738, 598, 13, 18769, 26418, 13, 11250, 37153, 1330, 17056, 13511, 198, 198, 35, 1404, 6242, 1921, 1546, 796, 1391, 198, 220, 220, 220, 705, 12286, 10354, 1391, 198, 220, 220, 220, 220, 220, 220, 220, 705, 26808, 8881, 10354, 705, 282...
2.451362
257
import turtle #module tha drawn things draw_square()
[ 11748, 28699, 1303, 21412, 28110, 7428, 1243, 198, 19334, 62, 23415, 3419, 628, 198 ]
3.928571
14
import pytest from jarg.dialects import FormDialect, JSONDialect
[ 11748, 12972, 9288, 198, 198, 6738, 474, 853, 13, 38969, 478, 82, 1330, 5178, 24400, 478, 11, 19449, 24400, 478, 628, 628 ]
3.136364
22
# -*- coding: utf-8 -*- # Copyright 2021 Cohesity Inc. class NfsConnection(object): """Implementation of the 'NfsConnection' model. :TODO Type description here. Attributes: client_ip (string): Information of a Universal Data Adapter cluster, only valid for an entity of view_name kClu...
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 2, 15069, 33448, 1766, 956, 414, 3457, 13, 198, 198, 4871, 399, 9501, 32048, 7, 15252, 2599, 628, 220, 220, 220, 37227, 3546, 32851, 286, 262, 705, 45, 9501, 32048, 6,...
2.247191
1,068
import os.path, sys from modules.windows_jumplist.consts import * from ctypes import * from modules.windows_jumplist.lib.delphi import * from modules.windows_jumplist.lib.yjSysUtils import * from modules.windows_jumplist.lib.yjDateTime import * from modules.windows_jumplist.LNKFileParser import TLNKFileParser from mod...
[ 11748, 28686, 13, 6978, 11, 25064, 198, 198, 6738, 13103, 13, 28457, 62, 73, 388, 489, 396, 13, 1102, 6448, 1330, 1635, 198, 6738, 269, 19199, 1330, 1635, 198, 6738, 13103, 13, 28457, 62, 73, 388, 489, 396, 13, 8019, 13, 12381, 3484...
2.057715
849
import RPi.GPIO as GPIO import binascii import time GPIO.setmode(GPIO.BCM) GPIO.setup(12, GPIO.OUT) GPIO.setup(16, GPIO.OUT) GPIO.setup(5, GPIO.OUT) GPIO.setup(6, GPIO.OUT) GPIO.setup(13, GPIO.OUT) GPIO.setup(19, GPIO.OUT) pin = [12, 16, 5, 6, 13, 19] k = 0 st="110101011010111" cols = 6 rows = len(st)/3 arr = [[0]*...
[ 11748, 25812, 72, 13, 16960, 9399, 355, 50143, 198, 11748, 9874, 292, 979, 72, 198, 11748, 640, 198, 198, 16960, 9399, 13, 2617, 14171, 7, 16960, 9399, 13, 2749, 44, 8, 198, 16960, 9399, 13, 40406, 7, 1065, 11, 50143, 13, 12425, 8, ...
1.83848
421
# coding=utf-8 import os import re import string from string import Template if __name__ == '__main__': root_dir = os.path.dirname(os.path.abspath(__file__)) input_file = open(os.path.join(root_dir, 'input.cpp'), 'r', encoding='gb18030', errors='ignore') out_file = open(os.path.join(root_dir, 'output.cpp...
[ 2, 19617, 28, 40477, 12, 23, 198, 198, 11748, 28686, 198, 11748, 302, 198, 11748, 4731, 198, 6738, 4731, 1330, 37350, 628, 198, 361, 11593, 3672, 834, 6624, 705, 834, 12417, 834, 10354, 198, 220, 220, 220, 6808, 62, 15908, 796, 28686,...
2.333861
1,264
import pandas as pd import sys import os deep_go_data = sys.argv[1] dataset_path_in = sys.argv[2] dataset_path_out = sys.argv[3] go_file_out = sys.argv[4] df = pd.read_pickle(deep_go_data) targets = list(df.targets) gos = list(df.gos) go_freqs = {} target2go = dict(zip(targets, gos)) target_path = os.path.join(dat...
[ 11748, 19798, 292, 355, 279, 67, 198, 11748, 25064, 198, 11748, 28686, 198, 198, 22089, 62, 2188, 62, 7890, 796, 25064, 13, 853, 85, 58, 16, 60, 198, 19608, 292, 316, 62, 6978, 62, 259, 796, 25064, 13, 853, 85, 58, 17, 60, 198, ...
1.751743
1,434
import requests, json from bs4 import BeautifulSoup import shutil import os try: os.chdir('img') #means cd path except: print('path error') imageUrlPattern = 'http://www.watsons.com.tw' res =requests.get('http://www.watsons.com.tw/%E7%86%B1%E9%8A%B7%E5%95%86%E5%93%81/c/bestSeller?q=:igcBestSeller:category:1...
[ 11748, 7007, 11, 33918, 198, 6738, 275, 82, 19, 1330, 23762, 50, 10486, 198, 11748, 4423, 346, 198, 11748, 28686, 198, 28311, 25, 198, 220, 220, 220, 28686, 13, 354, 15908, 10786, 9600, 11537, 198, 220, 220, 220, 1303, 1326, 504, 2292...
2.102639
341
"""Implementation of the MediaRemoteTV Protocol used by ATV4 and later.""" import logging import asyncio from datetime import datetime from pyatv import (const, exceptions) from pyatv.mrp import (messages, protobuf) from pyatv.mrp.srp import SRPAuthHandler from pyatv.mrp.connection import MrpConnection from pyatv.mrp...
[ 37811, 3546, 32851, 286, 262, 6343, 36510, 6849, 20497, 973, 416, 5161, 53, 19, 290, 1568, 526, 15931, 198, 198, 11748, 18931, 198, 11748, 30351, 952, 198, 6738, 4818, 8079, 1330, 4818, 8079, 198, 198, 6738, 12972, 265, 85, 1330, 357, ...
2.401776
4,393
from .chain import Chain import pickle from collections import OrderedDict import pandas as pd import copy from quantipy.core.tools.view.query import get_dataframe from quantipy.core.helpers.functions import get_text import os class Cluster(OrderedDict): """ Container class in form of an OrderedDict...
[ 6738, 764, 7983, 1330, 21853, 201, 198, 11748, 2298, 293, 201, 198, 6738, 17268, 1330, 14230, 1068, 35, 713, 201, 198, 11748, 19798, 292, 355, 279, 67, 201, 198, 11748, 4866, 201, 198, 6738, 5554, 541, 88, 13, 7295, 13, 31391, 13, 1...
1.823637
7,683
import pymysql import logging # 对数据进行转码 db = MySQLDB(user='root', password='root', db='test')
[ 11748, 279, 4948, 893, 13976, 198, 11748, 18931, 628, 198, 197, 2, 10263, 107, 117, 46763, 108, 162, 235, 106, 32573, 249, 26193, 234, 164, 121, 105, 163, 254, 223, 628, 198, 9945, 796, 33476, 11012, 7, 7220, 11639, 15763, 3256, 9206,...
1.98
50
import numpy as np import matplotlib.pyplot as plt from mpl_toolkits.axes_grid1 import make_axes_locatable import xarray as xr from skimage.segmentation import find_boundaries from skimage.exposure import rescale_intensity from ark.utils import load_utils from ark.utils import misc_utils # plotting functions from ar...
[ 11748, 299, 32152, 355, 45941, 198, 11748, 2603, 29487, 8019, 13, 9078, 29487, 355, 458, 83, 198, 6738, 285, 489, 62, 25981, 74, 896, 13, 897, 274, 62, 25928, 16, 1330, 787, 62, 897, 274, 62, 17946, 21156, 198, 11748, 2124, 18747, 3...
2.008692
4,602
from trainer.gan import dcgan from misc.gpu_utils import parallel_forward as pforward from model.utils import forward_utils as futils _parent_class = dcgan.GANTrainer
[ 6738, 21997, 13, 1030, 1330, 30736, 1030, 198, 6738, 12747, 13, 46999, 62, 26791, 1330, 10730, 62, 11813, 355, 279, 11813, 198, 6738, 2746, 13, 26791, 1330, 2651, 62, 26791, 355, 13294, 4487, 198, 62, 8000, 62, 4871, 796, 30736, 1030, ...
3.652174
46
# # Collective Knowledge (individual environment - setup) # # See CK LICENSE.txt for licensing details # See CK COPYRIGHT.txt for copyright details # # Developer: Grigori Fursin, Grigori.Fursin@cTuning.org, http://fursin.net # ############################################################################## # setup envir...
[ 2, 198, 2, 29128, 20414, 357, 43129, 2858, 532, 9058, 8, 198, 2, 198, 2, 4091, 45233, 38559, 24290, 13, 14116, 329, 15665, 3307, 198, 2, 4091, 45233, 27975, 38162, 9947, 13, 14116, 329, 6634, 3307, 198, 2, 198, 2, 23836, 25, 1902, ...
1.934039
4,912
#!/usr/bin/env python import numpy as np import colorsys import matplotlib.pyplot as plt from matplotlib.ticker import (MultipleLocator, FormatStrFormatter, AutoMinorLocator,ScalarFormatter) import netCDF4 import os import pyproj import pickle from statsmodels.stats.weightstats import De...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 198, 11748, 299, 32152, 355, 45941, 198, 11748, 7577, 893, 198, 11748, 2603, 29487, 8019, 13, 9078, 29487, 355, 458, 83, 198, 6738, 2603, 29487, 8019, 13, 83, 15799, 1330, 357, 31217, ...
1.826298
11,560
import numpy as np content = np.loadtxt('/data/rasa.content') with open('/data/join.fasta') as fasta: with open('/data/rasa.cites', 'a+') as w: line = fasta.readline() num = 0 while line: if(line[0] == '>'): line = fasta.readline() continue ...
[ 11748, 299, 32152, 355, 45941, 198, 198, 11299, 796, 45941, 13, 2220, 14116, 10786, 14, 7890, 14, 8847, 64, 13, 11299, 11537, 198, 4480, 1280, 10786, 14, 7890, 14, 22179, 13, 7217, 64, 11537, 355, 3049, 64, 25, 198, 220, 220, 220, 3...
1.594622
1,004
#!/usr/bin/python import numpy as np #fin = open("H56.bas",r) bas=np.genfromtxt("H56.bas", skip_header=1) #bas=bas[:5] #print( bas ) k0=30.0 l0=0.0 mol0=0 pos0 = np.array([0.0,0.0,0.0]) fout = open("linkers.ini",'w') fout.write("%i\n" %(len(bas)) ) for i,l in enumerate( bas ): pos = l[1:] fout.write("%i %i ...
[ 2, 48443, 14629, 14, 8800, 14, 29412, 198, 198, 11748, 299, 32152, 355, 45941, 198, 198, 2, 15643, 796, 1280, 7203, 39, 3980, 13, 12093, 1600, 81, 8, 198, 198, 12093, 28, 37659, 13, 5235, 6738, 14116, 7203, 39, 3980, 13, 12093, 1600...
1.826271
236
from collections import defaultdict abc = Solution() print (abc.findItinerary([["JFK","KUL"],["JFK","NRT"],["NRT","JFK"]])) # ["JFK","NRT","JFK","KUL"] print (abc.findItinerary([["MUC", "LHR"], ["JFK", "MUC"], ["SFO", "SJC"], ["LHR", "SFO"]])) print (abc.findItinerary([["JFK","SFO"],["JFK","ATL"],["SFO","ATL"],["ATL",...
[ 6738, 17268, 1330, 4277, 11600, 198, 198, 39305, 796, 28186, 3419, 198, 4798, 357, 39305, 13, 19796, 1026, 7274, 560, 26933, 14692, 41, 26236, 2430, 42, 6239, 33116, 14692, 41, 26236, 2430, 45, 14181, 33116, 14692, 45, 14181, 2430, 41, ...
2.302013
149
import argparse, glob,os from keras.callbacks import ModelCheckpoint, LearningRateScheduler, EarlyStopping, ReduceLROnPlateau from keras.optimizers import Adam import data_loader from metrics import * from net.Unet import Net # from net.GCUnet import Net os.environ["CUDA_VISIBLE_DEVICES"] = "3" parser = argparse.Argu...
[ 11748, 1822, 29572, 11, 15095, 11, 418, 198, 6738, 41927, 292, 13, 13345, 10146, 1330, 9104, 9787, 4122, 11, 18252, 32184, 50, 1740, 18173, 11, 12556, 1273, 33307, 11, 44048, 35972, 2202, 3646, 378, 559, 198, 6738, 41927, 292, 13, 40085...
2.533566
1,147
import datetime print(datetime.date.today()) today = datetime.date.today() print(today) print(today.year) print(today.month) print(today.day) print(today.strftime("%d %b %Y")) print(today.strftime("%A %B %y")) print(today.strftime("Please attend out event %A, %B %d in the year %Y")) userInput = input("Please enter ...
[ 11748, 4818, 8079, 198, 198, 4798, 7, 19608, 8079, 13, 4475, 13, 40838, 28955, 198, 198, 40838, 796, 4818, 8079, 13, 4475, 13, 40838, 3419, 198, 4798, 7, 40838, 8, 198, 4798, 7, 40838, 13, 1941, 8, 198, 4798, 7, 40838, 13, 8424, 8...
2.689266
177
# =============================================================================== # Copyright 2016 ross # # 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/LICE...
[ 2, 38093, 25609, 855, 198, 2, 15069, 1584, 686, 824, 198, 2, 198, 2, 49962, 739, 262, 24843, 13789, 11, 10628, 362, 13, 15, 357, 1169, 705, 34156, 24036, 198, 2, 345, 743, 407, 779, 428, 2393, 2845, 287, 11846, 351, 262, 13789, 13...
3.582126
414
# Your python setup file. An example can be found at: # https://github.com/pypa/sampleproject/blob/master/setup.py
[ 2, 3406, 21015, 9058, 2393, 13, 1052, 1672, 460, 307, 1043, 379, 25, 198, 2, 3740, 1378, 12567, 13, 785, 14, 79, 4464, 64, 14, 39873, 16302, 14, 2436, 672, 14, 9866, 14, 40406, 13, 9078, 198 ]
3.108108
37
import sys import os sys.path.insert(1, os.path.join(sys.path[0], '..')) import torch from torchtext.legacy import data from torchtext.legacy import datasets import random import torch.optim as optim import torch.nn as nn import time from train_eval_models import train, evaluate from lstm_model import LSTM from utils i...
[ 11748, 25064, 198, 11748, 28686, 198, 17597, 13, 6978, 13, 28463, 7, 16, 11, 28686, 13, 6978, 13, 22179, 7, 17597, 13, 6978, 58, 15, 4357, 705, 492, 6, 4008, 198, 11748, 28034, 198, 6738, 28034, 5239, 13, 1455, 1590, 1330, 1366, 198...
3.449438
178
# BOJ 14889 import sys from itertools import combinations si = sys.stdin.readline n = int(si()) graph = [list(map(int, si().split())) for _ in range(n)] people = [i for i in range(n)] comb = list(combinations(people, n // 2)) size = len(comb) start = comb[: size // 2] link = list(reversed(comb[size // 2 :])) sub = 1...
[ 2, 16494, 41, 1478, 39121, 198, 11748, 25064, 198, 6738, 340, 861, 10141, 1330, 17790, 198, 198, 13396, 796, 25064, 13, 19282, 259, 13, 961, 1370, 198, 198, 77, 796, 493, 7, 13396, 28955, 198, 34960, 796, 685, 4868, 7, 8899, 7, 600,...
2.059375
320
""" ## Questions: EASY ### 949. [Largest Time for Given Digits](https://leetcode.com/problems/largest-time-for-given-digits) Given an array of 4 digits, return the largest 24 hour time that can be made. The smallest 24 hour time is 00:00, and the largest is 23:59. Starting from 00:00, a time is larger if more time ...
[ 37811, 198, 2235, 20396, 25, 412, 26483, 198, 198, 21017, 860, 2920, 13, 685, 43, 853, 395, 3862, 329, 11259, 7367, 896, 16151, 5450, 1378, 293, 316, 8189, 13, 785, 14, 1676, 22143, 14, 28209, 12, 2435, 12, 1640, 12, 35569, 12, 1289...
2.969231
260
# Configuration file for the Sphinx documentation builder. # # This file only contains a selection of the most common options. For a full # list see the documentation: # https://www.sphinx-doc.org/en/master/usage/configuration.html # -- Path setup -------------------------------------------------------------- # If ex...
[ 2, 28373, 2393, 329, 262, 45368, 28413, 10314, 27098, 13, 198, 2, 198, 2, 770, 2393, 691, 4909, 257, 6356, 286, 262, 749, 2219, 3689, 13, 1114, 257, 1336, 198, 2, 1351, 766, 262, 10314, 25, 198, 2, 3740, 1378, 2503, 13, 82, 746, ...
3.289247
930
from typing import Any, Dict from flask import jsonify, make_response, request, abort from flask.helpers import make_response from flask_restful import Resource from werkzeug.exceptions import HTTPException from werkzeug.wrappers import Response
[ 6738, 19720, 1330, 4377, 11, 360, 713, 198, 6738, 42903, 1330, 33918, 1958, 11, 787, 62, 26209, 11, 2581, 11, 15614, 198, 6738, 42903, 13, 16794, 364, 1330, 787, 62, 26209, 198, 6738, 42903, 62, 2118, 913, 1330, 20857, 198, 6738, 266,...
3.231707
82
from typing import List from app.models.common import DateTimeModelMixin, IDModelMixin from app.models.domain.profiles import Profile from app.models.domain.rwmodel import RWModel
[ 6738, 19720, 1330, 7343, 198, 198, 6738, 598, 13, 27530, 13, 11321, 1330, 7536, 7575, 17633, 35608, 259, 11, 4522, 17633, 35608, 259, 198, 6738, 598, 13, 27530, 13, 27830, 13, 5577, 2915, 1330, 13118, 198, 6738, 598, 13, 27530, 13, 27...
3.714286
49
import numpy as np from visual_mpc.policy.policy import Policy import sys if sys.version_info[0] < 3: import cPickle as pkl else: import pickle as pkl
[ 11748, 299, 32152, 355, 45941, 198, 6738, 5874, 62, 3149, 66, 13, 30586, 13, 30586, 1330, 7820, 198, 11748, 25064, 198, 361, 25064, 13, 9641, 62, 10951, 58, 15, 60, 1279, 513, 25, 198, 220, 220, 220, 1330, 269, 31686, 293, 355, 279,...
2.758621
58
import os from scrapy.spider import BaseSpider from scrapy.selector import HtmlXPathSelector from scrapy.http import Request, HtmlResponse from scrapy.utils.url import urljoin_rfc from scrapy.utils.response import get_base_url from product_spiders.items import Product, ProductLoaderWithNameStrip as ProductLoader from ...
[ 11748, 28686, 198, 6738, 15881, 88, 13, 2777, 1304, 1330, 7308, 41294, 198, 6738, 15881, 88, 13, 19738, 273, 1330, 367, 20369, 55, 15235, 17563, 273, 198, 6738, 15881, 88, 13, 4023, 1330, 19390, 11, 367, 20369, 31077, 198, 6738, 15881, ...
3.21831
142
""" Unit test AgentManager """ import pytest import secrets from starfish.agent_manager import AgentManager from starfish.asset import DataAsset from starfish.network.ddo import DDO
[ 37811, 198, 198, 26453, 1332, 15906, 13511, 198, 198, 37811, 198, 11748, 12972, 9288, 198, 11748, 13141, 198, 198, 6738, 3491, 11084, 13, 25781, 62, 37153, 1330, 15906, 13511, 198, 6738, 3491, 11084, 13, 562, 316, 1330, 6060, 45869, 198, ...
3.54717
53
# # import modules # from ahvl.options.base import OptionsBase from ahvl.helper import AhvlMsg, AhvlHelper # # helper/message # msg = AhvlMsg() hlp = AhvlHelper() # # OptionsLookupSSHHostKey # # set option prefix # set path # useable variables: # - {find} # - {hostname} # set default opti...
[ 2, 198, 2, 1330, 13103, 198, 2, 198, 6738, 29042, 19279, 13, 25811, 13, 8692, 1330, 18634, 14881, 198, 6738, 29042, 19279, 13, 2978, 525, 1330, 7900, 19279, 50108, 11, 7900, 19279, 47429, 198, 198, 2, 198, 2, 31904, 14, 20500, 198, ...
2.717241
145
""" Copyright (c) 2021 SolarLiner, jdrprod, Arxaqapi This software is released under the MIT License. https://opensource.org/licenses/MIT """ import os import json import unittest from pathlib import Path from Simple.document import Document
[ 37811, 198, 15069, 357, 66, 8, 33448, 12347, 43, 7274, 11, 474, 7109, 1676, 67, 11, 943, 27865, 80, 15042, 198, 220, 198, 770, 3788, 318, 2716, 739, 262, 17168, 13789, 13, 198, 3740, 1378, 44813, 1668, 13, 2398, 14, 677, 4541, 14, ...
3.391892
74
import json from django.contrib.auth.mixins import LoginRequiredMixin, UserPassesTestMixin from django.core.exceptions import ValidationError from django.db.models import Q from django.shortcuts import redirect from django.urls import reverse from django.views.generic import DetailView, ListView, TemplateView from me...
[ 11748, 33918, 198, 198, 6738, 42625, 14208, 13, 3642, 822, 13, 18439, 13, 19816, 1040, 1330, 23093, 37374, 35608, 259, 11, 11787, 47, 13978, 14402, 35608, 259, 198, 6738, 42625, 14208, 13, 7295, 13, 1069, 11755, 1330, 3254, 24765, 12331, ...
3.537415
147
#!~/envs/python3/udacity_python_mongodb import xlrd import pprint datafile = "datasets/2013_ERCOT_Hourly_Load_Data.xls" data = parse_file(datafile) pprint.pprint(data) assert data['maxtime'] == (2013, 8, 13, 17, 0, 0) assert round(data['maxvalue'], 10) == round(18779.02551, 10)
[ 2, 0, 93, 14, 268, 14259, 14, 29412, 18, 14, 463, 4355, 62, 29412, 62, 31059, 375, 65, 198, 198, 11748, 2124, 75, 4372, 198, 198, 11748, 279, 4798, 198, 198, 7890, 7753, 796, 366, 19608, 292, 1039, 14, 6390, 62, 47691, 2394, 62, ...
2.344262
122
# Definition for singly-linked list. # class ListNode: # def __init__(self, x): # self.val = x # self.next = None l1 = ListNode(1) l2 = ListNode(6) l3 = ListNode(2) l4 = ListNode(5) l5 = ListNode(4) l1.next = l2 l2.next = l3 l3.next = l4 l4.next = l5 list = [1,2,3,4] print("cond",list) s = S...
[ 198, 198, 2, 30396, 329, 1702, 306, 12, 25614, 1351, 13, 198, 2, 1398, 7343, 19667, 25, 198, 2, 220, 220, 220, 220, 825, 11593, 15003, 834, 7, 944, 11, 2124, 2599, 198, 2, 220, 220, 220, 220, 220, 220, 220, 220, 2116, 13, 2100, ...
1.933333
195
# -*- coding: utf-8 -*- """ Scheduled restarting RAdam """ import math import torch from optimizer import Optimizer
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 37811, 198, 50, 1740, 6309, 15765, 278, 371, 23159, 198, 37811, 198, 11748, 10688, 198, 11748, 28034, 198, 6738, 6436, 7509, 1330, 30011, 7509 ]
3.026316
38
import os import shutil root_cwd = os.path.abspath("../")
[ 11748, 28686, 198, 11748, 4423, 346, 198, 198, 15763, 62, 66, 16993, 796, 28686, 13, 6978, 13, 397, 2777, 776, 7203, 40720, 4943, 628 ]
2.5
24
"""Address file. Handles address encoding and decoding.""" # Types. from typing import Tuple, Optional, Any # Keccak hash function. from Cryptodome.Hash import keccak # Crypto class. from cryptonote.crypto.crypto import Crypto # Base58 Character Set. BASE58: str = "123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqr...
[ 37811, 20231, 2393, 13, 7157, 829, 2209, 21004, 290, 39938, 526, 15931, 198, 198, 2, 24897, 13, 198, 6738, 19720, 1330, 309, 29291, 11, 32233, 11, 4377, 198, 198, 2, 3873, 535, 461, 12234, 2163, 13, 198, 6738, 15126, 375, 462, 13, 2...
2.188274
3,309