content
stringlengths
1
1.04M
input_ids
listlengths
1
774k
ratio_char_token
float64
0.38
22.9
token_count
int64
1
774k
############################################################################### #Convert genbank to fasta format # #@requires Biopython #@author:charles.hefer@gmail.com #@version:0.1 ############################################################################### import optparse from Bio import SeqIO def __ma...
[ 29113, 29113, 7804, 4242, 21017, 201, 198, 2, 3103, 1851, 2429, 17796, 284, 3049, 64, 5794, 201, 198, 2, 201, 198, 2, 31, 47911, 8436, 404, 7535, 201, 198, 2, 31, 9800, 25, 10641, 829, 13, 258, 2232, 31, 14816, 13, 785, 201, 198, ...
2.874317
366
# -*- encoding: utf-8 import pygments import pygments.token import pygments.lexers
[ 2, 532, 9, 12, 21004, 25, 3384, 69, 12, 23, 198, 198, 11748, 12972, 11726, 198, 11748, 12972, 11726, 13, 30001, 198, 11748, 12972, 11726, 13, 2588, 364, 628 ]
2.931034
29
import ddsp.training import gin
[ 11748, 49427, 2777, 13, 34409, 198, 11748, 39733, 628 ]
3.666667
9
#!/usr/bin/python3 import os import sys import json from common import place from collections import defaultdict import argparse """ result: { startTime: "2021-01-01..." client: 'combi', players: 2, width: 15, height: 15, deadline: 2, offset: 4, occupiedRatio: 0.1241 myStartProbab...
[ 2, 48443, 14629, 14, 8800, 14, 29412, 18, 198, 11748, 28686, 198, 11748, 25064, 198, 11748, 33918, 198, 6738, 2219, 1330, 1295, 198, 6738, 17268, 1330, 4277, 11600, 198, 11748, 1822, 29572, 198, 198, 37811, 198, 20274, 25, 1391, 198, 22...
2.308775
1,208
from .restrictions import * from .parsing import * from .errors import *
[ 6738, 764, 2118, 2012, 507, 1330, 1635, 198, 6738, 764, 79, 945, 278, 1330, 1635, 198, 6738, 764, 48277, 1330, 1635, 198 ]
3.318182
22
from enum import Enum from typing import NamedTuple __all__ = "SizeHint", "PosHint", "Anchor", "Easing"
[ 6738, 33829, 1330, 2039, 388, 198, 6738, 19720, 1330, 34441, 51, 29291, 198, 198, 834, 439, 834, 796, 366, 10699, 39, 600, 1600, 366, 21604, 39, 600, 1600, 366, 2025, 354, 273, 1600, 366, 36, 2313, 1, 628, 628, 198 ]
2.725
40
# -*- coding: utf-8 -*- import sqlalchemy as sa import structlog from ..schema import NotificationType from ..schema import TransportType from ..schema import Priority from .users import get_user_transports_for_notification logger = structlog.getLogger(__name__, source='YoDB') from yo.db import metadata from .que...
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 11748, 44161, 282, 26599, 355, 473, 198, 11748, 2878, 6404, 628, 198, 6738, 11485, 15952, 2611, 1330, 42808, 6030, 198, 6738, 11485, 15952, 2611, 1330, 19940, 6030, 198, 6...
2.967374
613
# Test the LinearSystem component. import unittest import numpy as np from openmdao.api import Group, Problem, LinearSystem, IndepVarComp, ScipyGMRES from openmdao.test.util import assert_rel_error if __name__ == "__main__": unittest.main()
[ 2, 6208, 262, 44800, 11964, 7515, 13, 198, 198, 11748, 555, 715, 395, 198, 11748, 299, 32152, 355, 45941, 198, 198, 6738, 1280, 9132, 5488, 13, 15042, 1330, 4912, 11, 20647, 11, 44800, 11964, 11, 1423, 538, 19852, 7293, 11, 1446, 541,...
2.941176
85
from django.conf.urls import patterns, url, include from django.conf import settings from django.conf.urls.static import static from django.contrib import admin from richard.videos.sitemaps import CategorySitemap, SpeakerSitemap, VideoSitemap from sergey.views import SpeakerList admin.autodiscover() sitemaps = { ...
[ 6738, 42625, 14208, 13, 10414, 13, 6371, 82, 1330, 7572, 11, 19016, 11, 2291, 198, 6738, 42625, 14208, 13, 10414, 1330, 6460, 198, 6738, 42625, 14208, 13, 10414, 13, 6371, 82, 13, 12708, 1330, 9037, 198, 6738, 42625, 14208, 13, 3642, ...
2.552294
545
import argparse import sys import unittest from typing import Optional, Sequence from unittest import skipIf from unittest.mock import MagicMock, patch SequenceType = Sequence if sys.version_info >= (3, 9): from collections.abc import Sequence # pylint: disable=reimported from typing import Annotated, Litera...
[ 11748, 1822, 29572, 198, 11748, 25064, 198, 11748, 555, 715, 395, 198, 6738, 19720, 1330, 32233, 11, 45835, 198, 6738, 555, 715, 395, 1330, 14267, 1532, 198, 6738, 555, 715, 395, 13, 76, 735, 1330, 6139, 44, 735, 11, 8529, 198, 198, ...
2.984563
583
import click from vmanage.cli.export.templates import templates from vmanage.cli.export.policies import policies @click.group() @click.pass_context def export(ctx): """ Export commands """ export.add_command(templates) export.add_command(policies)
[ 11748, 3904, 198, 6738, 410, 805, 496, 13, 44506, 13, 39344, 13, 11498, 17041, 1330, 24019, 198, 6738, 410, 805, 496, 13, 44506, 13, 39344, 13, 79, 4160, 444, 1330, 4788, 198, 198, 31, 12976, 13, 8094, 3419, 198, 31, 12976, 13, 6603...
2.932584
89
from setuptools import setup with open("README.md", "r") as fh: long_description = fh.read() setup( name='flask-themer', version='1.4.1', description='Simple theme mechanism for Flask', author='Tyler Kennedy', author_email='tk@tkte.ch', url='https://github.com/tktech/flask-themer', lon...
[ 6738, 900, 37623, 10141, 1330, 9058, 198, 198, 4480, 1280, 7203, 15675, 11682, 13, 9132, 1600, 366, 81, 4943, 355, 277, 71, 25, 198, 220, 220, 220, 890, 62, 11213, 796, 277, 71, 13, 961, 3419, 198, 198, 40406, 7, 198, 220, 220, 22...
2.277778
360
#!/usr/bin/env python import tornado.ioloop import tornado.web import tornado.template import dns.resolver import yaml try: with open( '../config.yaml', 'r' ) as f: settings = yaml.safe_load( f ) except IOError: print "Error reading config.yaml, have you created one? (Hint: Try running ./generate_confi...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 11748, 33718, 13, 1669, 11224, 198, 11748, 33718, 13, 12384, 198, 11748, 33718, 13, 28243, 198, 11748, 288, 5907, 13, 411, 14375, 198, 11748, 331, 43695, 198, 198, 28311, 25, 198, 220, ...
2.608911
202
#### Globals/Imports #### import json import xml import xmltodict import xml.etree.ElementTree as ET import os import collections from timeit import default_timer as timer import datetime import traceback import sys import re #### Custom Exceptions #### #### ProcessedClinicalTrial Class Definition #### class Proces...
[ 4242, 40713, 874, 14, 3546, 3742, 1303, 21017, 198, 198, 11748, 33918, 198, 11748, 35555, 198, 11748, 2124, 76, 2528, 375, 713, 198, 11748, 35555, 13, 316, 631, 13, 20180, 27660, 355, 12152, 198, 11748, 28686, 198, 11748, 17268, 198, 67...
3.878788
165
import glob import json import os import pickle import cv2 as cv import numpy as np from tqdm import tqdm if __name__ == '__main__': img_dir = 'data/2011_09_26/2011_09_26_drive_0119_extract/image_00/data' calibration_path = 'data/2011_09_26/2011_09_26_image_00_chessboards.json' output_path = 'calibrat...
[ 11748, 15095, 198, 11748, 33918, 198, 11748, 28686, 198, 11748, 2298, 293, 198, 198, 11748, 269, 85, 17, 355, 269, 85, 198, 11748, 299, 32152, 355, 45941, 198, 6738, 256, 80, 36020, 1330, 256, 80, 36020, 628, 628, 198, 361, 11593, 367...
2.172291
1,126
#OAM: 2 16-bit addresses # 8 bit spriteref # 10 bit x pos # 10 bit y pos # 1 bit x-flip # 1 bit y-flip # 1 bit priority # 1 bit enable OAM = [ { "spriteref":1, "x_pos":13, "y_pos":2, "x_flip":0, "y_flip":0, "priority":0, "enable":1 },...
[ 2, 46, 2390, 25, 362, 1467, 12, 2545, 9405, 198, 2, 220, 220, 220, 807, 1643, 599, 799, 567, 69, 198, 2, 220, 220, 220, 838, 1643, 2124, 1426, 198, 2, 220, 220, 220, 838, 1643, 331, 1426, 198, 2, 220, 220, 220, 352, 1643, 2124...
1.276831
10,566
import grpc from concurrent import futures import time import news_databroker_pb2_grpc import news_databroker_pb2 port = 8061 news = [ 'In Hong Kong, where newspapers have alleged Japan has been selling below-cost semiconductors, some electronics manufacturers share that view.', 'The Ministry of International...
[ 11748, 1036, 14751, 198, 6738, 24580, 1330, 25650, 198, 11748, 640, 198, 11748, 1705, 62, 19608, 397, 305, 6122, 62, 40842, 17, 62, 2164, 14751, 198, 11748, 1705, 62, 19608, 397, 305, 6122, 62, 40842, 17, 198, 198, 634, 796, 807, 3312...
3.537133
579
from .mobilenet import mobilenet from .mobilenetv2 import mobilenetv2 from .resnet import resnet, wideresnet from .vgg import vgg
[ 6738, 764, 76, 25898, 268, 316, 1330, 17754, 268, 316, 198, 6738, 764, 76, 25898, 268, 316, 85, 17, 1330, 17754, 268, 316, 85, 17, 198, 6738, 764, 411, 3262, 1330, 581, 3262, 11, 3094, 411, 3262, 198, 6738, 764, 85, 1130, 1330, 41...
2.826087
46
# Copyright 2021 Amazon.com, Inc. or its affiliates. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"). You # may not use this file except in compliance with the License. A copy of # the License is located at # # http://aws.amazon.com/apache2.0/ # # or in the "license" file accompa...
[ 2, 15069, 33448, 6186, 13, 785, 11, 3457, 13, 393, 663, 29116, 13, 1439, 6923, 33876, 13, 198, 2, 198, 2, 49962, 739, 262, 24843, 13789, 11, 10628, 362, 13, 15, 357, 1169, 366, 34156, 11074, 921, 198, 2, 743, 407, 779, 428, 2393, ...
3.888199
161
from behave import given, then @given('I open google.com') @then('the title should contain "{title}"')
[ 6738, 17438, 1330, 1813, 11, 788, 628, 198, 31, 35569, 10786, 40, 1280, 23645, 13, 785, 11537, 628, 198, 31, 8524, 10786, 1169, 3670, 815, 3994, 45144, 7839, 36786, 11537 ]
3.533333
30
""" MESH sub-module of pyhail Contains the single pol MESH retrieval for gridded radar data. Required reflectivity and temperature data Joshua Soderholm - 15 June 2018 """ import pyart from pyhail import common import netCDF4 import numpy as np def _get_latlon(radgrid, ref_name): """ Generates lattitude an...
[ 37811, 198, 44, 44011, 850, 12, 21412, 286, 12972, 71, 603, 198, 198, 4264, 1299, 262, 2060, 755, 337, 44011, 45069, 329, 1036, 1638, 276, 13428, 1366, 13, 198, 37374, 4079, 3458, 290, 5951, 1366, 198, 198, 47740, 311, 12342, 22981, 5...
2.204129
2,567
import importlib import os from contextlib import suppress import pytest from django.conf import settings from django.dispatch import Signal here = os.path.dirname(__file__) doc_dir = os.path.join(here, "../../../docs") base_dir = os.path.join(here, "../../byro") with open(os.path.join(doc_dir, "developer/plugins/ge...
[ 11748, 1330, 8019, 198, 11748, 28686, 198, 6738, 4732, 8019, 1330, 18175, 198, 198, 11748, 12972, 9288, 198, 6738, 42625, 14208, 13, 10414, 1330, 6460, 198, 6738, 42625, 14208, 13, 6381, 17147, 1330, 26484, 198, 198, 1456, 796, 28686, 13,...
2.714286
182
""" Created on Wed Feb 17 13:27:55 2021 @author: William Callender This program downloads data about the current progress of COVID-19 vaccinations in the United States to project the total number of vaccinations going forward. It does this by getting data about the number of vaccinations per day since vaccines first ...
[ 37811, 198, 41972, 319, 3300, 3158, 1596, 1511, 25, 1983, 25, 2816, 33448, 198, 198, 31, 9800, 25, 3977, 4889, 2194, 198, 198, 1212, 1430, 21333, 1366, 546, 262, 1459, 4371, 286, 7375, 11008, 12, 1129, 46419, 198, 259, 262, 1578, 1829...
2.944444
2,178
""" Picklify is a function that works similar to memoization; it is meant for functions that return a dictionary. Often, such functions will parse a file to generate a dictionary that maps certain keys to values. To save on such overhead costs, we "picklify" them the first time they are called (save the dictionary in a...
[ 37811, 198, 31686, 75, 1958, 318, 257, 2163, 326, 2499, 2092, 284, 16155, 1634, 26, 340, 318, 4001, 329, 198, 12543, 2733, 326, 1441, 257, 22155, 13, 18023, 11, 884, 5499, 481, 21136, 257, 2393, 284, 198, 8612, 378, 257, 22155, 326, ...
2.79846
779
import django_filters import graphene from django.conf import settings from django.contrib.auth import get_user_model from django.db.models import Q from graphene import Field, relay from graphene_permissions.mixins import AuthFilter from graphene_permissions.permissions import AllowAny, AllowAuthenticated from rest_fr...
[ 11748, 42625, 14208, 62, 10379, 1010, 198, 11748, 42463, 198, 6738, 42625, 14208, 13, 10414, 1330, 6460, 198, 6738, 42625, 14208, 13, 3642, 822, 13, 18439, 1330, 651, 62, 7220, 62, 19849, 198, 6738, 42625, 14208, 13, 9945, 13, 27530, 13...
3.172174
1,150
""" Component for interacting with a HomeSeer HomeTroller or HS3 software installation. For more details about this component, please refer to the documentation at https://home-assistant.io/components/homeseer/ """ import asyncio import logging import voluptuous as vol import homeassistant.helpers.config_validation ...
[ 37811, 198, 21950, 329, 24986, 351, 257, 5995, 4653, 263, 5995, 51, 10646, 393, 18070, 18, 3788, 9988, 13, 198, 198, 1890, 517, 3307, 546, 428, 7515, 11, 3387, 3522, 284, 262, 10314, 379, 198, 5450, 1378, 11195, 12, 562, 10167, 13, ...
2.534314
1,428
import pandas as pd import os import subprocess
[ 11748, 19798, 292, 355, 279, 67, 198, 198, 11748, 28686, 198, 198, 11748, 850, 14681 ]
3.266667
15
#%% import cv2 import tkinter as tk import os, time import PIL from PIL import Image, ImageTk import threading import time import platform as plt # from lobe import modify_lobe from tm2_tflite import modify_tm from cv_dust import find_dust from custom_io import c_io ### 影像與AI相關的參數 這些參數幾乎都在 Stream 中使用 ...
[ 2, 16626, 201, 198, 11748, 269, 85, 17, 201, 198, 11748, 256, 74, 3849, 355, 256, 74, 201, 198, 11748, 28686, 11, 640, 201, 198, 11748, 350, 4146, 201, 198, 6738, 350, 4146, 1330, 7412, 11, 7412, 51, 74, 201, 198, 11748, 4704, 278...
1.274194
992
# @Author : guopeiming # @Contact : guopeiming.gpm@{qq, gmail}.com import torch from queue import Queue import numpy as np import torch.nn as nn from utils import chart_helper from utils import trees from utils.vocabulary import Vocabulary from utils.transliterate import TRANSLITERATIONS, BERT_TOKEN_MAPPING from typing...
[ 2, 2488, 13838, 1058, 915, 3008, 320, 278, 198, 2, 2488, 17829, 1058, 915, 3008, 320, 278, 13, 70, 4426, 31, 90, 38227, 11, 308, 4529, 27422, 785, 198, 11748, 28034, 198, 6738, 16834, 1330, 4670, 518, 198, 11748, 299, 32152, 355, 45...
3.287037
216
class BuildHookInterface(object): # no cov """ Example usage: === ":octicons-file-code-16: plugin.py" ```python from hatchling.builders.hooks.plugin.interface import BuildHookInterface class SpecialBuildHook(BuildHookInterface): PLUGIN_NAME = 'special' .....
[ 4871, 10934, 39, 566, 39317, 7, 15252, 2599, 220, 1303, 645, 39849, 198, 220, 220, 220, 37227, 198, 220, 220, 220, 17934, 8748, 25, 628, 220, 220, 220, 24844, 366, 25, 78, 11048, 684, 12, 7753, 12, 8189, 12, 1433, 25, 13877, 13, 9...
2.270706
1,304
import collections import datetime import os import re import time import unicodedata from django.conf import settings from django.core.management import base from django.db import transaction from django.utils import timezone from ...models import Album, Photo from ...storages import get_storage ignores = [re.com...
[ 11748, 17268, 198, 11748, 4818, 8079, 198, 11748, 28686, 198, 11748, 302, 198, 11748, 640, 198, 11748, 28000, 9043, 1045, 198, 198, 6738, 42625, 14208, 13, 10414, 1330, 6460, 198, 6738, 42625, 14208, 13, 7295, 13, 27604, 1330, 2779, 198, ...
2.412736
2,544
import os import dash from texts import APP_TITLE from style_settings import EXTERNAL_STYLESHEETS app = dash.Dash(__name__, external_stylesheets=EXTERNAL_STYLESHEETS) app.title = APP_TITLE server = app.server server.secret_key = os.environ.get("secret_key", "secret") app.config.suppress_callback_exceptions = True
[ 11748, 28686, 198, 11748, 14470, 198, 6738, 13399, 1330, 43504, 62, 49560, 2538, 198, 6738, 3918, 62, 33692, 1330, 7788, 31800, 1847, 62, 2257, 56, 28378, 13909, 32716, 198, 198, 1324, 796, 14470, 13, 43041, 7, 834, 3672, 834, 11, 7097,...
2.953271
107
"""Tests for the google_domains component."""
[ 37811, 51, 3558, 329, 262, 23645, 62, 3438, 1299, 7515, 526, 15931, 198 ]
3.538462
13
from math import inf import os import subprocess import pickle import ipdb from matplotlib import pyplot as plt from matplotlib import animation from mpl_toolkits.mplot3d import Axes3D HEAD = 13 NECK = 12 LEFT_SHOULDER = 9 RIGHT_SHOULDER = 8 LEFT_ELBOW = 10 RIGHT_ELBOW = 7 LEFT_WRIST = 11 RIGHT_WRIST = 6 LEFT_HIP = ...
[ 6738, 10688, 1330, 1167, 198, 11748, 28686, 198, 11748, 850, 14681, 198, 11748, 2298, 293, 198, 11748, 20966, 9945, 198, 6738, 2603, 29487, 8019, 1330, 12972, 29487, 355, 458, 83, 198, 6738, 2603, 29487, 8019, 1330, 11034, 198, 6738, 285,...
2.01668
1,259
import numpy as np from math import degrees import math a = [0, 0] b = [2, 4] c = [6, 6] print(findAngle(a, b, c))
[ 11748, 299, 32152, 355, 45941, 198, 6738, 10688, 1330, 7370, 198, 11748, 10688, 628, 198, 64, 796, 685, 15, 11, 657, 60, 198, 65, 796, 685, 17, 11, 604, 60, 198, 66, 796, 685, 21, 11, 718, 60, 198, 4798, 7, 19796, 13450, 293, 7,...
2.269231
52
from sklearn.cluster import KMeans import numpy as np from crankshaft.analysis_data_provider import AnalysisDataProvider
[ 6738, 1341, 35720, 13, 565, 5819, 1330, 509, 5308, 504, 198, 11748, 299, 32152, 355, 45941, 198, 198, 6738, 1067, 2283, 3099, 701, 13, 20930, 62, 7890, 62, 15234, 1304, 1330, 14691, 6601, 29495, 628 ]
3.514286
35
""" Created by Edward Li at 8/23/20 """ import numpy as np
[ 37811, 198, 41972, 416, 10443, 7455, 379, 807, 14, 1954, 14, 1238, 198, 37811, 198, 11748, 299, 32152, 355, 45941, 628 ]
2.857143
21
from copy import deepcopy import pytest from django.urls import reverse from rest_framework import status from pet.models import Pet @pytest.mark.django_db
[ 6738, 4866, 1330, 2769, 30073, 198, 198, 11748, 12972, 9288, 198, 6738, 42625, 14208, 13, 6371, 82, 1330, 9575, 198, 6738, 1334, 62, 30604, 1330, 3722, 198, 198, 6738, 4273, 13, 27530, 1330, 4767, 628, 198, 31, 9078, 9288, 13, 4102, 1...
3.404255
47
from lxml import html if __name__ == '__main__': parse_html()
[ 6738, 220, 300, 19875, 1330, 27711, 198, 198, 361, 11593, 3672, 834, 6624, 705, 834, 12417, 834, 10354, 198, 220, 220, 220, 21136, 62, 6494, 3419 ]
2.576923
26
"""Demonstrate docstrings and does nothing really.""" def myfunc(): """Simple function to demonstrate circleci.""" return 1 print(myfunc())
[ 37811, 35477, 23104, 2205, 37336, 290, 857, 2147, 1107, 526, 15931, 198, 198, 4299, 616, 20786, 33529, 198, 220, 220, 220, 37227, 26437, 2163, 284, 10176, 9197, 979, 526, 15931, 198, 220, 220, 220, 1441, 352, 198, 198, 4798, 7, 1820, ...
3.409091
44
#!/usr/bin/python # -*- coding: utf-8 -*- # GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) from __future__ import absolute_import, division, print_function __metaclass__ = type DOCUMENTATION = ''' --- module: convert_snake_case short_description: test converting data to s...
[ 2, 48443, 14629, 14, 8800, 14, 29412, 198, 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 198, 2, 22961, 3611, 5094, 13789, 410, 18, 13, 15, 10, 357, 3826, 27975, 45761, 393, 3740, 1378, 2503, 13, 41791, 13, 2398, ...
3.058282
326
buger = juice = 2001 for i in range(0, 5) : if(i < 3) : new_buger = int(input()) if new_buger < buger : buger = new_buger else : new_juice = int(input()) if new_juice < juice : juice = new_juice print(buger + juice - 50)
[ 25456, 263, 796, 13135, 796, 5878, 198, 1640, 1312, 287, 2837, 7, 15, 11, 642, 8, 1058, 198, 220, 220, 220, 611, 7, 72, 1279, 513, 8, 1058, 198, 220, 220, 220, 220, 220, 220, 220, 649, 62, 25456, 263, 796, 493, 7, 15414, 28955, ...
1.912752
149
# --------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. # --------------------------------------------------------- from math import floor import cv2 import numpy as np def blur(src, radius=5): """Wrapper function ...
[ 2, 20368, 22369, 12, 198, 2, 15069, 357, 66, 8, 5413, 10501, 13, 1439, 2489, 10395, 13, 198, 2, 49962, 739, 262, 17168, 13789, 13, 198, 2, 20368, 22369, 12, 198, 198, 6738, 10688, 1330, 4314, 198, 198, 11748, 269, 85, 17, 198, 117...
2.345365
5,901
# Code was created by M. Heriyanto, 2020/01/13 # https://github.com/ezygeo-ai/machine-learning-and-geophysical-inversion/blob/master/scripts/fwd_sp.py import numpy as np import matplotlib.pyplot as plt import pickle # SP forward function # === TEST FORWARD MODELING x0 = 77.07 # m alpha = 309.37 * (np.p...
[ 2, 6127, 373, 2727, 416, 337, 13, 2332, 7745, 14723, 11, 12131, 14, 486, 14, 1485, 201, 198, 2, 3740, 1378, 12567, 13, 785, 14, 68, 7357, 469, 78, 12, 1872, 14, 30243, 12, 40684, 12, 392, 12, 469, 41789, 12, 259, 9641, 14, 2436,...
2.247505
501
""" This is a script includes two type of experience replay pool """ import random from collections import namedtuple from sum_tree import SumSegmentTree, MinSegmentTree Transition = namedtuple('Transition', ('state', 'action', 'next_state', 'reward')) class ReplayMemory: """Experience replay pool""" def ...
[ 37811, 198, 1212, 318, 257, 4226, 3407, 734, 2099, 286, 1998, 24788, 5933, 198, 198, 37811, 198, 11748, 4738, 198, 6738, 17268, 1330, 3706, 83, 29291, 198, 6738, 2160, 62, 21048, 1330, 5060, 41030, 434, 27660, 11, 1855, 41030, 434, 2766...
3.009091
220
import sys, subprocess, time """ This script is made as a wrapper for sc2 bots to set a timeout to the bots (in case they can't find the last enemy structure or the game is ending in a draw) Ideally this script should be done with a bot that terminates on its own after certain things have been achieved, e.g. testing i...
[ 11748, 25064, 11, 850, 14681, 11, 640, 198, 198, 37811, 198, 1212, 4226, 318, 925, 355, 257, 29908, 329, 629, 17, 29641, 284, 900, 257, 26827, 284, 262, 29641, 357, 259, 1339, 484, 460, 470, 1064, 262, 938, 4472, 4645, 393, 262, 983...
2.663971
1,360
# # BSD 2-Clause License # # Copyright (c) 2021, Cristel Chandre # All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are met: # # 1. Redistributions of source code must retain the above copyright notice, this ...
[ 2, 198, 2, 347, 10305, 362, 12, 2601, 682, 13789, 198, 2, 198, 2, 15069, 357, 66, 8, 33448, 11, 24568, 417, 20631, 260, 198, 2, 1439, 2489, 10395, 13, 198, 2, 198, 2, 2297, 396, 3890, 290, 779, 287, 2723, 290, 13934, 5107, 11, ...
3.147059
578
# -*- coding: utf-8 -*- # Zilliqa Python Library # Copyright (C) 2019 Gully Chen # MIT License """ zillipy .zilliqa.node ~~~~~~~~~~~~ Zilliqa Node API. :copyright: (c) 2019 by Gully Chen. :license: MIT License, see LICENSE for more details. """ import socket from jsonrpcclient.clients.socket_client import SocketCli...
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 2, 1168, 50173, 20402, 11361, 10074, 198, 2, 15069, 357, 34, 8, 13130, 220, 402, 2132, 12555, 198, 2, 17168, 13789, 198, 37811, 198, 89, 359, 541, 88, 198, 13, 89, 5...
2.645669
254
import os import sys import numpy as np import pandas as pd import tensorflow as tf from tensorflow.contrib import slim from tensorflow.contrib.slim.python.slim.learning import train_step from tensorflow.python.training import monitored_session from tensorflow.python.training import saver as tf_saver from scipy.ndima...
[ 11748, 28686, 198, 11748, 25064, 198, 198, 11748, 299, 32152, 355, 45941, 198, 11748, 19798, 292, 355, 279, 67, 198, 11748, 11192, 273, 11125, 355, 48700, 198, 198, 6738, 11192, 273, 11125, 13, 3642, 822, 1330, 18862, 198, 6738, 11192, ...
2.199198
9,970
import os import tempfile import unittest import logging from pyidf import ValidationLevel import pyidf from pyidf.idf import IDF from pyidf.node import PipingSystemUndergroundPipeCircuit log = logging.getLogger(__name__)
[ 11748, 28686, 198, 11748, 20218, 7753, 198, 11748, 555, 715, 395, 198, 11748, 18931, 198, 6738, 12972, 312, 69, 1330, 3254, 24765, 4971, 198, 11748, 12972, 312, 69, 198, 6738, 12972, 312, 69, 13, 312, 69, 1330, 33389, 198, 6738, 12972, ...
3.217391
69
from extractor.models import *
[ 6738, 7925, 273, 13, 27530, 1330, 1635, 628 ]
4
8
""" Author: Lukas Mandrake, Shawn Anderson Date : 12/4/19 Brief : Notes : Copyright 2019 California Institute of Technology. ALL RIGHTS RESERVED. U.S. Government Sponsorship acknowledged. """ import importlib import os def repo_path(): """ little function to help resolve location of doctest_files back in r...
[ 37811, 198, 13838, 25, 28102, 292, 13314, 33788, 11, 25225, 9918, 198, 10430, 220, 1058, 1105, 14, 19, 14, 1129, 198, 33, 3796, 1058, 198, 16130, 1058, 198, 15269, 13130, 3442, 5136, 286, 8987, 13, 220, 11096, 371, 34874, 15731, 1137, ...
2.687166
748
#!python3 # the difficulty is [0, 1, 0, ..., 0], [0, 8, 0, ..., 0], [0, 64, 0, ..., 0] import matplotlib.pyplot as plt topo_2_allblocks = { 'line': [69, 491, 1452], 'reg2': [99, 505, 920], 'reg3': [123, 579, 679], 'reg4': [122, 492, 624] } topo_2_validblocks = { 'line': [65, 361, 383], '...
[ 2, 0, 29412, 18, 198, 2, 262, 8722, 318, 685, 15, 11, 352, 11, 657, 11, 2644, 11, 657, 4357, 685, 15, 11, 807, 11, 657, 11, 2644, 11, 657, 4357, 685, 15, 11, 5598, 11, 657, 11, 2644, 11, 657, 60, 198, 11748, 2603, 29487, 801...
2.064982
554
import logging import time from datetime import datetime from functools import wraps
[ 11748, 18931, 198, 11748, 640, 198, 6738, 4818, 8079, 1330, 4818, 8079, 198, 6738, 1257, 310, 10141, 1330, 27521, 628 ]
4.3
20
# Imports from here import argparse import functions_train import os parser = argparse.ArgumentParser() parser.add_argument('--arch', type = str, default = 'vgg19', help = 'which CNN Model should be used for pretraining, choose between vgg13, vgg16, vgg19, densenet121, densenet161, alexnet | (default = vgg19)') pars...
[ 2, 1846, 3742, 422, 994, 198, 11748, 1822, 29572, 198, 11748, 5499, 62, 27432, 220, 198, 11748, 28686, 198, 198, 48610, 796, 1822, 29572, 13, 28100, 1713, 46677, 3419, 198, 198, 48610, 13, 2860, 62, 49140, 10786, 438, 998, 3256, 2099, ...
3.189329
581
from os.path import abspath, dirname, join, split from glob import glob from functools import partial from subprocess import Popen, PIPE import gzip from click import echo from psycopg2 import (connect, OperationalError) from psycopg2.extensions import ISOLATION_LEVEL_AUTOCOMMIT from natsort import natsorted from amg...
[ 6738, 28686, 13, 6978, 1330, 2352, 6978, 11, 26672, 3672, 11, 4654, 11, 6626, 198, 6738, 15095, 1330, 15095, 198, 6738, 1257, 310, 10141, 1330, 13027, 198, 6738, 850, 14681, 1330, 8099, 268, 11, 350, 4061, 36, 198, 11748, 308, 13344, ...
2.482687
1,444
# Copyright (c) "Neo4j" # Neo4j Sweden AB [https://neo4j.com] # # This file is part of Neo4j. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # https://www.apache.org/licenses/LICENSE-2...
[ 2, 15069, 357, 66, 8, 366, 8199, 78, 19, 73, 1, 198, 2, 21227, 19, 73, 10710, 9564, 685, 5450, 1378, 710, 78, 19, 73, 13, 785, 60, 198, 2, 198, 2, 770, 2393, 318, 636, 286, 21227, 19, 73, 13, 198, 2, 198, 2, 49962, 739, 26...
3.045775
284
import os import lldb from lldb.plugins.scripted_process import ScriptedProcess
[ 11748, 28686, 198, 198, 11748, 32660, 9945, 198, 6738, 32660, 9945, 13, 37390, 13, 12048, 276, 62, 14681, 1330, 12327, 276, 18709 ]
3.636364
22
""" **************************************************************************************************** :copyright (c) 2019-2021 URBANopt, Alliance for Sustainable Energy, LLC, and other contributors. All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted ...
[ 37811, 198, 17174, 17174, 17174, 2466, 198, 25, 22163, 4766, 357, 66, 8, 13130, 12, 1238, 2481, 471, 27912, 1565, 8738, 11, 10302, 329, 45276, 6682, 11, 11419, 11, 290, 584, 20420, 13, 198, 198, 3237, 2489, 10395, 13, 198, 198, 7738, ...
2.460453
5,171
test_cases = int(input()) for test in range(test_cases): john_packs, jack_packs = map(int, list(input().split())) john_pack_list = list(input().split()) jack_pack_list = list(input().split()) john_pack_list = [int(x) for x in john_pack_list] jack_pack_list = [int(x) for x in jack_pack_list...
[ 201, 198, 9288, 62, 33964, 796, 493, 7, 15414, 28955, 201, 198, 1640, 1332, 287, 2837, 7, 9288, 62, 33964, 2599, 201, 198, 220, 220, 220, 45610, 62, 32377, 11, 14509, 62, 32377, 796, 3975, 7, 600, 11, 1351, 7, 15414, 22446, 35312, ...
2.207381
569
""" Abstract interface for Embedder. Authors: Christian Dallago """ import abc import logging import tempfile from typing import List, Generator, Optional, Iterable, ClassVar, Any, Dict, Union import torch from numpy import ndarray from bio_embeddings.utilities import ( get_model_file, get_model_directori...
[ 37811, 198, 23839, 7071, 329, 13302, 276, 1082, 13, 198, 198, 30515, 669, 25, 198, 220, 4302, 360, 439, 3839, 198, 37811, 198, 198, 11748, 450, 66, 198, 11748, 18931, 198, 11748, 20218, 7753, 198, 6738, 19720, 1330, 7343, 11, 35986, 1...
2.259004
1,305
import matplotlib matplotlib.use('Agg') import argparse import datetime import models.ICW_FMRI_GAN import nibabel import numpy as np import os import shutil import timeit import torch from brainpedia.brainpedia import Brainpedia from brainpedia.fmri_processing import invert_preprocessor_scaling from torch.autograd im...
[ 11748, 2603, 29487, 8019, 198, 6759, 29487, 8019, 13, 1904, 10786, 46384, 11537, 198, 198, 11748, 1822, 29572, 198, 11748, 4818, 8079, 198, 11748, 4981, 13, 2149, 54, 62, 23264, 7112, 62, 45028, 198, 11748, 33272, 9608, 198, 11748, 299, ...
2.337806
1,714
import setuptools with open("README.md", "r") as fh: long_description = fh.read() setuptools.setup( name='BubbleBox', version='0.1.4', author="Audun Skau Hansen", author_email="a.s.hansen@kjemi.uio.no", description="A molecular dynamics educational tool for Jupyter Notebooks", lon...
[ 11748, 900, 37623, 10141, 198, 198, 4480, 1280, 7203, 15675, 11682, 13, 9132, 1600, 366, 81, 4943, 355, 277, 71, 25, 198, 220, 220, 220, 890, 62, 11213, 796, 277, 71, 13, 961, 3419, 628, 198, 2617, 37623, 10141, 13, 40406, 7, 198, ...
2.526316
266
"""Test TotalConnectDevice.""" from device import TotalConnectDevice from const import DEVICE_INFO_BASIC_1 def tests_init(): """Test __init__().""" test_device = TotalConnectDevice(DEVICE_INFO_BASIC_1) assert test_device.id == DEVICE_INFO_BASIC_1["DeviceID"] # test with missing flags del DEVICE_...
[ 37811, 14402, 7472, 13313, 24728, 526, 15931, 198, 198, 6738, 3335, 1330, 7472, 13313, 24728, 198, 198, 6738, 1500, 1330, 5550, 27389, 62, 10778, 62, 33, 1921, 2149, 62, 16, 198, 198, 4299, 5254, 62, 15003, 33529, 198, 220, 220, 220, ...
2.75
160
#!/usr/bin/env python2.7 # # Copyright 2017 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 l...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 17, 13, 22, 198, 2, 198, 2, 15069, 2177, 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, 77...
3.060296
879
from collections import namedtuple from games import (Game) # self.validSpaces = () class FlagrantCopy(Game): """A flagrant copy of TicTacToe, from game.py It's simplified, so that moves and utility are calculated as needed Play TicTacToe on an h x v board, with Max (first player) playing 'X'. ...
[ 198, 6738, 17268, 1330, 3706, 83, 29291, 198, 6738, 1830, 1330, 357, 8777, 8, 198, 220, 220, 220, 220, 1303, 220, 220, 2116, 13, 12102, 4561, 2114, 796, 7499, 198, 198, 4871, 19762, 5250, 29881, 7, 8777, 2599, 198, 220, 220, 220, 37...
1.909434
1,855
from django.apps import AppConfig
[ 6738, 42625, 14208, 13, 18211, 1330, 2034, 16934, 628 ]
3.888889
9
import numpy as np _i0A = [ -4.41534164647933937950E-18, 3.33079451882223809783E-17, -2.43127984654795469359E-16, 1.71539128555513303061E-15, -1.16853328779934516808E-14, 7.67618549860493561688E-14, -4.85644678311192946090E-13, 2.95505266312963983461E-12, -1.72682629144155570723E-11...
[ 11748, 299, 32152, 355, 45941, 198, 198, 62, 72, 15, 32, 796, 685, 198, 220, 220, 220, 532, 19, 13, 35038, 2682, 23237, 2414, 3720, 29626, 29088, 1120, 36, 12, 1507, 11, 198, 220, 220, 220, 513, 13, 26073, 3720, 2231, 20356, 1828, ...
2.033986
1,736
import sys import pygame # ENGINE TIMER = pygame.USEREVENT + 1 DELAY = 17 # GRAPHICS CAPTION = 'CHIP-EIGHT EMULATOR' WIDTH = 64 HEIGHT = 32 SCALE = 10 COLOR_OFF = pygame.Color(0, 0, 0, 255) COLOR_ON = pygame.Color(255, 255, 255, 255)
[ 11748, 25064, 198, 11748, 12972, 6057, 198, 198, 2, 36924, 8881, 198, 51, 3955, 1137, 796, 12972, 6057, 13, 2937, 9338, 53, 3525, 1343, 352, 198, 35, 3698, 4792, 796, 1596, 198, 198, 2, 10863, 31300, 19505, 198, 33177, 24131, 796, 705...
2.27619
105
import torch
[ 11748, 28034, 628 ]
4.666667
3
import pytest from sovtokenfees.constants import FEES from sovtokenfees.test.constants import NYM_FEES_ALIAS from plenum.common.constants import STATE_PROOF from plenum.test.stasher import delay_rules from plenum.test.delayers import req_delay from sovtokenfees.test.helper import send_and_check_auth_rule
[ 11748, 12972, 9288, 198, 6738, 523, 85, 30001, 69, 2841, 13, 9979, 1187, 1330, 18630, 1546, 198, 6738, 523, 85, 30001, 69, 2841, 13, 9288, 13, 9979, 1187, 1330, 6645, 44, 62, 15112, 1546, 62, 1847, 43429, 198, 198, 6738, 458, 44709, ...
2.980769
104
import logging from .Base import Base import time LOG = logging.getLogger(__name__)
[ 11748, 18931, 198, 6738, 764, 14881, 1330, 7308, 198, 11748, 640, 198, 198, 25294, 796, 18931, 13, 1136, 11187, 1362, 7, 834, 3672, 834, 8, 628 ]
3.307692
26
from PIL import Image import numpy as np import os import os.path as osp from tqdm import tqdm orig_path = '.' # insert here the source path where original COCO annotations are dest_path = '.' # the destination folder, which should be this one' for split in ["train2017", "val2017"]: annotations = f"{orig_path}/...
[ 6738, 350, 4146, 1330, 7412, 198, 11748, 299, 32152, 355, 45941, 198, 11748, 28686, 198, 11748, 28686, 13, 6978, 355, 267, 2777, 198, 6738, 256, 80, 36020, 1330, 256, 80, 36020, 198, 198, 11612, 62, 6978, 796, 705, 2637, 220, 1303, 75...
2.488722
399
from AppKit import NSURL, NSDocumentController from vanilla import * from defconAppKit.windows.baseWindow import BaseWindowController from lib.doodleDocument import DoodleDocument from mojo.UI import OpenGlyphWindow, OpenSpaceCenter, OpenFontInfoSheet # notifications fonts = OpenFont(showUI=False) ...
[ 6738, 2034, 20827, 1330, 10896, 21886, 11, 399, 10305, 7990, 22130, 198, 6738, 16858, 1330, 1635, 198, 6738, 825, 1102, 4677, 20827, 13, 28457, 13, 8692, 27703, 1330, 7308, 27703, 22130, 198, 198, 6738, 9195, 13, 67, 27106, 24941, 1330, ...
3.020833
192
# coding:utf-8 from handlers.base import BaseHandler from models.Approve import Approve from models.ApproveRequest import ApproveRequest from models.ApproveRelation import ApproveRelation from dao.base import session import logging logger = logging.getLogger('boilerplate.' + __name__) import requests import json fro...
[ 2, 19617, 25, 40477, 12, 23, 198, 198, 6738, 32847, 13, 8692, 1330, 7308, 25060, 198, 6738, 4981, 13, 4677, 305, 303, 1330, 20010, 303, 198, 6738, 4981, 13, 4677, 305, 303, 18453, 1330, 20010, 303, 18453, 198, 6738, 4981, 13, 4677, ...
3.688679
106
from django.db import models from django.contrib.auth.models import AbstractUser, BaseUserManager, PermissionsMixin from rest_framework_simplejwt.tokens import RefreshToken from phone_field import PhoneField # Create your models here. # Custom User model for verify user emails and sending verification links
[ 6738, 42625, 14208, 13, 9945, 1330, 4981, 198, 6738, 42625, 14208, 13, 3642, 822, 13, 18439, 13, 27530, 1330, 27741, 12982, 11, 7308, 12982, 13511, 11, 2448, 8481, 35608, 259, 198, 6738, 1334, 62, 30604, 62, 36439, 73, 46569, 13, 83, ...
3.843373
83
#Description #This Python3 script combines Afterglow PS3 USB button-press data with 2 motor activation. #testbed information #This was developed as a deliberately low powered and lightweight combination. It is also affordable at near $200 USD current pricing for all the parts. The Pi3 is used for it's common use,...
[ 2, 11828, 198, 198, 2, 1212, 11361, 18, 4226, 21001, 2293, 4743, 322, 6599, 18, 8450, 4936, 12, 8439, 1366, 351, 362, 5584, 14916, 13, 220, 628, 198, 198, 2, 9288, 3077, 1321, 198, 198, 2, 1212, 373, 4166, 355, 257, 14593, 1877, 1...
2.412388
3,116
from Blockchain import Blockchain from Wallet import Wallet from Transaction import Transaction from DataConverter import BlockDataIO import pytest # Blockchain initialization # Mining Difficulty and reward blockchain = Blockchain(2, 10) # Creating two new wallets: # Each wallet has a user name. createNewWallet fun...
[ 6738, 29724, 1330, 29724, 198, 6738, 37249, 1330, 37249, 198, 6738, 45389, 1330, 45389, 198, 6738, 6060, 3103, 332, 353, 1330, 9726, 6601, 9399, 198, 11748, 12972, 9288, 198, 198, 2, 29724, 37588, 198, 198, 2, 29269, 27419, 290, 6721, 1...
3.609091
440
#!/usr/bin/env python # coding: utf-8 """ Make latex file for supplementary figures """ import os import argparse import pandas import numpy from narps import Narps preamble = '''\\documentclass[10pt]{article} \\usepackage[margin=0.5in]{geometry} \\geometry{letterpaper} \\usepackage{graphicx} \\usepackage{amssymb} \...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 2, 19617, 25, 3384, 69, 12, 23, 198, 37811, 198, 12050, 47038, 2393, 329, 43871, 5538, 198, 198, 37811, 198, 198, 11748, 28686, 198, 11748, 1822, 29572, 198, 11748, 19798, 292, 198, 11...
2.40177
565
from app import app, db
[ 6738, 598, 1330, 598, 11, 20613, 198 ]
3.428571
7
# Modifications Copyright 2016-2017 Reddit, Inc. # # Copyright 2013-2016 DataStax, 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 # # Unle...
[ 2, 3401, 6637, 15069, 1584, 12, 5539, 10750, 11, 3457, 13, 198, 2, 198, 2, 15069, 2211, 12, 5304, 6060, 1273, 897, 11, 3457, 13, 198, 2, 198, 2, 49962, 739, 262, 24843, 13789, 11, 10628, 362, 13, 15, 357, 1169, 366, 34156, 15341, ...
3.549383
324
# -*- Mode: python; tab-width: 4; indent-tabs-mode:nil; coding: utf-8 -*- # vim: tabstop=4 expandtab shiftwidth=4 softtabstop=4 # # fluctmatch --- https://github.com/tclick/python-fluctmatch # Copyright (c) 2013-2017 The fluctmatch Development Team and contributors # (see the file AUTHORS for the full list of names) # ...
[ 2, 532, 9, 12, 10363, 25, 21015, 26, 7400, 12, 10394, 25, 604, 26, 33793, 12, 8658, 82, 12, 14171, 25, 45991, 26, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 2, 43907, 25, 7400, 11338, 28, 19, 4292, 8658, 6482, 10394, 28, 19...
2.393836
1,168
# USAGE # python simple_request.py # import the necessary packages import requests # initialize the Keras REST API endpoint URL along with the input # image path KERAS_REST_API_URL = "http://47.100.63.158/predict" DATA_PATH = "test.txt" # load the input image and construct the payload for the request data = open(DAT...
[ 2, 1294, 11879, 198, 2, 21015, 2829, 62, 25927, 13, 9078, 198, 198, 2, 1330, 262, 3306, 10392, 198, 11748, 7007, 198, 198, 2, 41216, 262, 17337, 292, 30617, 7824, 36123, 10289, 1863, 351, 262, 5128, 198, 2, 2939, 3108, 198, 42839, 1...
3.02551
196
""" CEUB - Bacharelado em Ciência da Computação (BCC) - Prof. Barbosa Teclas de atalho: ctlr <d>, duplica linha. ctrl <y>, apaga linha. ctrl </>, comenta linha. Monitoria (plantão de dúvidas): https://monitoriaceub.github.io/Monitoria/index.html - Com base nos conceitos de POO, implemente a entidade pessoa ...
[ 37811, 220, 220, 18671, 10526, 220, 220, 532, 220, 220, 25332, 20318, 4533, 795, 37685, 25792, 10782, 544, 12379, 22476, 64, 16175, 28749, 357, 2749, 34, 8, 220, 220, 532, 220, 220, 4415, 13, 10593, 8546, 198, 6767, 565, 292, 390, 379...
1.926471
3,400
import re import json import httpretty from aliyunpy.client import AliyunClient from .config import auto_set_fixture from .base import BaseAliyunTestCase
[ 11748, 302, 201, 198, 11748, 33918, 201, 198, 11748, 2638, 16100, 201, 198, 6738, 435, 7745, 403, 9078, 13, 16366, 1330, 978, 7745, 403, 11792, 201, 198, 6738, 764, 11250, 1330, 8295, 62, 2617, 62, 69, 9602, 201, 198, 6738, 764, 8692,...
3.056604
53
import pandas as pd import numpy as np from datetime import datetime from math import radians, cos, sin, asin, sqrt def weekday(x): """ Figures out the day of the week. Outputs 1 for monday,2 for tuesday and so on. """ return (x.weekday()+1) def is_weekend(x): """ Figures out if it was weeken...
[ 11748, 19798, 292, 355, 279, 67, 198, 11748, 299, 32152, 355, 45941, 198, 6738, 4818, 8079, 1330, 4818, 8079, 198, 6738, 10688, 1330, 2511, 1547, 11, 8615, 11, 7813, 11, 355, 259, 11, 19862, 17034, 628, 198, 4299, 28269, 7, 87, 2599, ...
2.382406
557
import utils.module as module_utils from evaluation.evaluators.evaluator import VoidEvaluator from train.trainer import Trainer class DSETrainer(Trainer): """ Trainer for bert distillation training. """
[ 11748, 3384, 4487, 13, 21412, 355, 8265, 62, 26791, 198, 6738, 12660, 13, 18206, 84, 2024, 13, 18206, 84, 1352, 1330, 18331, 36, 2100, 84, 1352, 198, 6738, 4512, 13, 2213, 10613, 1330, 31924, 628, 198, 4871, 17400, 2767, 3201, 263, 7,...
3.191176
68
# Generated by Django 2.0 on 2017-12-20 18:12 from django.conf import settings from django.db import migrations, models import django.db.models.deletion
[ 2, 2980, 515, 416, 37770, 362, 13, 15, 319, 2177, 12, 1065, 12, 1238, 1248, 25, 1065, 198, 198, 6738, 42625, 14208, 13, 10414, 1330, 6460, 198, 6738, 42625, 14208, 13, 9945, 1330, 15720, 602, 11, 4981, 198, 11748, 42625, 14208, 13, ...
3.1
50
#task in automate boring stuff print("Enter a number:") try: n = int(input()) cyclic(n) except ValueError: print("Unvalied value")
[ 2, 35943, 287, 43511, 14262, 3404, 628, 198, 4798, 7203, 17469, 257, 1271, 25, 4943, 198, 28311, 25, 198, 220, 220, 220, 299, 796, 493, 7, 15414, 28955, 198, 220, 220, 220, 11700, 291, 7, 77, 8, 198, 16341, 11052, 12331, 25, 198, ...
2.685185
54
import requests from urllib.request import urlopen from PIL import Image '''Some app that get requests from api.github.com/users''' if __name__ == '__main__': usuario = input('nome de usuario do github: ') geral = get_usuario(usuario) info = subs(usuario) sz_info_subs = list(range(len(info))) #S...
[ 11748, 7007, 198, 6738, 2956, 297, 571, 13, 25927, 1330, 19016, 9654, 198, 6738, 350, 4146, 1330, 7412, 198, 198, 7061, 6, 4366, 598, 326, 651, 7007, 422, 40391, 13, 12567, 13, 785, 14, 18417, 7061, 6, 628, 198, 361, 11593, 3672, 83...
2.41853
313
# -*- coding: utf-8 -*- # # Spyder documentation build configuration file, created by # sphinx-quickstart on Fri Jul 10 16:32:25 2009. # # This file is execfile()d with the current directory set to its parent dir. # # This file does only contain a selection of the most common options. For a # full list see the document...
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 2, 198, 2, 23688, 1082, 10314, 1382, 8398, 2393, 11, 2727, 416, 198, 2, 599, 20079, 87, 12, 24209, 9688, 319, 19480, 5979, 838, 1467, 25, 2624, 25, 1495, 3717, 13, 1...
2.972119
4,053
''' Authors: Dr. Lloyd Windrim and Dr. Mitch Bryson Required packages: numpy, scipy, scikit-learn The primary purpose of this module is to remove and load the ground. The function removeGround() uses the TreePointCloud() class to remove the ground from the input pointcloud, and save the ground as a mes...
[ 7061, 6, 198, 220, 220, 220, 46665, 25, 1583, 13, 22361, 3086, 3036, 290, 1583, 13, 20472, 9092, 1559, 198, 220, 220, 220, 20906, 10392, 25, 299, 32152, 11, 629, 541, 88, 11, 629, 1134, 270, 12, 35720, 628, 220, 220, 220, 383, 416...
3.805461
293
from django.test import TestCase from opportunity.models import Opportunity from common.models import Address from accounts.models import Account from contacts.models import Contact from common.models import User from django.utils import timezone # Create your tests here.
[ 6738, 42625, 14208, 13, 9288, 1330, 6208, 20448, 198, 6738, 3663, 13, 27530, 1330, 32675, 198, 6738, 2219, 13, 27530, 1330, 17917, 198, 6738, 5504, 13, 27530, 1330, 10781, 198, 6738, 13961, 13, 27530, 1330, 14039, 198, 6738, 2219, 13, 2...
4.428571
63
#!/usr/bin/python # -*- coding: utf-8 -*- ## ## modified to use mwclient ## ## # Edit a Wikipedia article with your favourite editor. # # (C) Gerrit Holl 2004 # Distributed under the terms of the MIT license. # Version 0.4. # # TODO: - non existing pages # - edit conflicts # - minor edits # - watc...
[ 2, 48443, 14629, 14, 8800, 14, 29412, 198, 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 2235, 198, 2235, 9518, 284, 779, 285, 86, 16366, 198, 2235, 220, 198, 2235, 220, 198, 198, 2, 5312, 257, 15312, 2708, 351, ...
2.386722
2,410
from functools import partial import tkinter as tk from tkinter import IntVar, StringVar, Variable, ttk from typing import Callable, List, Tuple from collections import namedtuple from ror.ror_solver import TIE_RESOLVERS from ror.WeightedResultAggregator import WeightedResultAggregator from utils.AlphaValueWithWeight ...
[ 6738, 1257, 310, 10141, 1330, 13027, 198, 11748, 256, 74, 3849, 355, 256, 74, 198, 6738, 256, 74, 3849, 1330, 2558, 19852, 11, 10903, 19852, 11, 35748, 11, 256, 30488, 198, 6738, 19720, 1330, 4889, 540, 11, 7343, 11, 309, 29291, 198, ...
3.349265
272
from calendar import timegm from datetime import datetime, timedelta from json import loads from fluiddb.data.system import createSystemData from fluiddb.model.comment import CommentAPI from fluiddb.model.object import ObjectAPI from fluiddb.model.user import UserAPI, getUser from fluiddb.model.value import TagValueAP...
[ 6738, 11845, 1330, 640, 39870, 198, 6738, 4818, 8079, 1330, 4818, 8079, 11, 28805, 12514, 198, 6738, 33918, 1330, 15989, 198, 198, 6738, 6562, 1638, 65, 13, 7890, 13, 10057, 1330, 2251, 11964, 6601, 198, 6738, 6562, 1638, 65, 13, 19849,...
3.735714
140
''' Convolutional autoencoder on MNIST dataset using Keras functional API ''' from keras.datasets import mnist from keras.models import Model from keras.layers import Activation, Input, BatchNormalization from keras.layers import Conv2D, Conv2DTranspose from keras.callbacks import TensorBoard from keras.optimizers ...
[ 7061, 6, 198, 198, 3103, 85, 2122, 282, 1960, 6571, 66, 12342, 319, 29060, 8808, 27039, 1262, 17337, 292, 10345, 7824, 198, 198, 7061, 6, 628, 198, 6738, 41927, 292, 13, 19608, 292, 1039, 1330, 285, 77, 396, 198, 6738, 41927, 292, 1...
2.985714
210
# -*- coding: utf-8 -*- """ Copyright (C) 2017 tianyou pan <sherry0429 at SOAPython> """ import logging import tornado.web import json class MirrorBaseHttpHandler(tornado.web.RequestHandler): """ 这个类是服务的底层抽象。 它将http的Get,Put,Post,Delete请求分别于四个服务函数关联。 业务逻辑不需要于此类打交道。 """ logger = logging.getLo...
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 198, 37811, 198, 15269, 357, 34, 8, 2177, 256, 666, 5832, 3425, 1279, 82, 13372, 3023, 1959, 379, 12809, 2969, 7535, 29, 198, 37811, 198, 11748, 18931, 198, 11748, 33718...
1.555296
1,284
#!/usr/bin/env python import csv import sys import json print('[') delim=';' quotechar='"' with sys.stdin as csvfile: r = csv.DictReader(csvfile, delimiter=delim, quotechar=quotechar) for row in r: json.dump(row, sys.stdout) sys.stdout.write(',\n') print('{ "_meta": { "comment": "export of n...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 198, 11748, 269, 21370, 198, 11748, 25064, 198, 11748, 33918, 198, 198, 4798, 10786, 58, 11537, 198, 198, 12381, 320, 11639, 26, 6, 198, 22708, 10641, 11639, 30543, 198, 198, 4480, 25064...
2.460606
165
default_app_config = 'tomato.apps.TomatoConfig'
[ 12286, 62, 1324, 62, 11250, 796, 705, 39532, 5549, 13, 18211, 13, 13787, 5549, 16934, 6, 198 ]
2.823529
17