content
stringlengths
1
1.04M
input_ids
listlengths
1
774k
ratio_char_token
float64
0.38
22.9
token_count
int64
1
774k
## 1. String Manipulation ## hello = "hello world"[0:5] foo = "some string" password = "password" print(foo[5:11]) # Your code goes here fifth = password[4] last_four = password[len(password)-4:] ## 2. Omitting starting or ending indices ## hello = "hello world"[:5] foo = "some string" print(foo[5:]) my_string = ...
[ 2235, 352, 13, 10903, 35045, 1741, 22492, 198, 198, 31373, 796, 366, 31373, 995, 17912, 15, 25, 20, 60, 198, 21943, 796, 366, 11246, 4731, 1, 198, 28712, 796, 366, 28712, 1, 198, 198, 4798, 7, 21943, 58, 20, 25, 1157, 12962, 198, ...
2.696477
738
import discord from discord.ext import commands from discord.utils import get from discord.ext.commands import has_permissions, MissingPermissions class Moderation(commands.Cog): """ Moderation commands for discord """ @commands.command(help='Kicks people from the server') @commands.has_permissions(kick_...
[ 11748, 36446, 198, 6738, 36446, 13, 2302, 1330, 9729, 198, 6738, 36446, 13, 26791, 1330, 651, 198, 6738, 36446, 13, 2302, 13, 9503, 1746, 1330, 468, 62, 525, 8481, 11, 25639, 5990, 8481, 198, 198, 4871, 35926, 341, 7, 9503, 1746, 13, ...
3.205298
151
import os import sys from git import Repo commits = list(Repo('.').iter_commits('master')) authors = {} notable = {} changelog = {} for i, c in enumerate(commits): s = c.summary tags = [] while s[0] == '[': r = s.find(']') tag = s[1:r] tags.append(tag) s = s[r + 1:] ...
[ 11748, 28686, 198, 11748, 25064, 198, 198, 6738, 17606, 1330, 1432, 78, 198, 198, 9503, 896, 796, 1351, 7, 6207, 78, 10786, 2637, 737, 2676, 62, 9503, 896, 10786, 9866, 6, 4008, 198, 198, 41617, 796, 23884, 198, 1662, 540, 796, 23884,...
2.097561
369
# do not import pylab, because this file may need to be loaded from Python environments that don't necessarily have access to pylab # from pylab import * import os scenes = [] # # Archinteriors volumes 00-09 # scenes.append({"name": "ai_001_001", "archive_file": "AI1_001.rar", "asset_fil...
[ 2, 466, 407, 1330, 279, 2645, 397, 11, 780, 428, 2393, 743, 761, 284, 307, 9639, 422, 11361, 12493, 326, 836, 470, 6646, 423, 1895, 284, 279, 2645, 397, 198, 2, 422, 279, 2645, 397, 1330, 1635, 198, 198, 11748, 28686, 628, 198, 19...
1.809523
80,498
import json import logging from argparse import Namespace import numpy as np from fairseq import metrics, search, utils from fairseq.data import encoders from fairseq.tasks import register_task from fairseq.tasks.translation_multi_simple_epoch import TranslationMultiSimpleEpochTask from fairseq.sequence_generator impo...
[ 11748, 33918, 198, 11748, 18931, 198, 6738, 1822, 29572, 1330, 28531, 10223, 198, 198, 11748, 299, 32152, 355, 45941, 198, 6738, 3148, 41068, 1330, 20731, 11, 2989, 11, 3384, 4487, 198, 6738, 3148, 41068, 13, 7890, 1330, 2207, 375, 364, ...
2.277674
1,066
import numpy as np import matplotlib.pyplot as plt # TODO def mesh2d_(f,*args): """ Plot function taking len 2 vector as single argument f(xs) """ mesh2d(g,*args) def mesh2d(f,*args): """ Plot function taking two arguments f(x,y) """ fig = plt.figure() ax = fig.add_sub...
[ 198, 11748, 299, 32152, 355, 45941, 198, 11748, 2603, 29487, 8019, 13, 9078, 29487, 355, 458, 83, 198, 198, 2, 16926, 46, 198, 198, 4299, 19609, 17, 67, 41052, 69, 11, 9, 22046, 2599, 198, 220, 220, 220, 37227, 28114, 2163, 2263, 18...
2.043344
323
from pyhdl.core import * from pyhdl.parts.logic import * @module("NOT4", [ "B4" ], [ "B4" ]) @module("AND4", [ "B4", "B4" ], [ "B4" ]) @module("AND4S", [ "B4", "N" ], [ "B4" ]) @module("OR4", [ "B4", "B4" ], [ "B4" ]) @module("XOR4", [ "B4", "B4" ], [ "B4" ]) @module("XOR4S", [ "B4", "N" ], [...
[ 198, 198, 6738, 12972, 71, 25404, 13, 7295, 220, 220, 220, 220, 220, 220, 220, 1330, 1635, 198, 6738, 12972, 71, 25404, 13, 42632, 13, 6404, 291, 1330, 1635, 628, 198, 198, 31, 21412, 7203, 11929, 19, 1600, 685, 366, 33, 19, 1, 16...
1.791317
714
import argparse import geopandas as gpd import pandas as pd from shapely.geometry import MultiPolygon import sys import textwrap sys.path.append('scripts/') from config import METRICS, CANVAS, PROCESS_METRICS from grid import Grid, CellCalculator from metrics import Metric, CMetric, ClusterNumberMetric, MinimumCluster...
[ 11748, 1822, 29572, 198, 11748, 30324, 392, 292, 355, 27809, 67, 198, 11748, 19798, 292, 355, 279, 67, 198, 6738, 5485, 306, 13, 469, 15748, 1330, 15237, 34220, 14520, 198, 11748, 25064, 198, 11748, 2420, 37150, 198, 198, 17597, 13, 697...
3.2364
1,011
import matplotlib.pyplot as plt
[ 11748, 2603, 29487, 8019, 13, 9078, 29487, 355, 458, 83 ]
3.1
10
from __future__ import absolute_import, unicode_literals # Taken from the following StackOverflow answer: # http://stackoverflow.com/a/3703727/199176 SELECT_TYPES_SQL = """ SELECT n.nspname as schema, t.typname as type FROM pg_type t LEFT JOIN pg_catalog.pg_namespace n ON n.oid = t.typnamespace W...
[ 6738, 11593, 37443, 834, 1330, 4112, 62, 11748, 11, 28000, 1098, 62, 17201, 874, 628, 198, 2, 30222, 422, 262, 1708, 23881, 5886, 11125, 3280, 25, 198, 2, 220, 220, 2638, 1378, 25558, 2502, 11125, 13, 785, 14, 64, 14, 20167, 2718, 1...
2.346304
514
import cvxpy as cp import numpy as np import mosek
[ 11748, 269, 85, 87, 9078, 355, 31396, 220, 198, 11748, 299, 32152, 355, 45941, 198, 11748, 285, 577, 74, 628, 198 ]
2.571429
21
from re import match from io import BytesIO from lxml import etree from urllib import request __CURRENT_QUOTE_URL = "http://rate.bot.com.tw/xrt?Lang=zh-TW" __HISTORY_QUOTE_URL_PATTERN = "http://rate.bot.com.tw/xrt/quote/{range}/{currency}" __NAME_DICT = {} def now_all(): """取得目前所有幣別的牌告匯率 :rtype: dict "...
[ 6738, 302, 1330, 2872, 198, 6738, 33245, 1330, 2750, 4879, 9399, 198, 6738, 300, 19875, 1330, 2123, 631, 198, 6738, 2956, 297, 571, 1330, 2581, 198, 198, 834, 34, 39237, 62, 10917, 23051, 62, 21886, 796, 366, 4023, 1378, 4873, 13, 136...
1.868399
1,193
from moviepy.editor import * import os # split("D:/Загрузки/hackathon_part_1.mp4", "D:/datasets/")
[ 6738, 3807, 9078, 13, 35352, 1330, 1635, 198, 11748, 28686, 628, 198, 198, 2, 6626, 7203, 35, 14079, 140, 245, 16142, 140, 111, 21169, 35072, 140, 115, 31583, 18849, 14, 31153, 12938, 62, 3911, 62, 16, 13, 3149, 19, 1600, 366, 35, 1...
2.081633
49
def spin_words(sentence=None): """ Description: Write a function that takes in a string of one or more words, and returns the same string, but with all five or more letter words reversed (Just like the name of this Kata). Strings passed in will consist of only letters and spaces. Spaces will ...
[ 4299, 7906, 62, 10879, 7, 34086, 594, 28, 14202, 2599, 198, 220, 220, 220, 220, 198, 220, 220, 220, 37227, 198, 220, 220, 220, 12489, 25, 198, 220, 220, 220, 19430, 257, 2163, 326, 2753, 287, 257, 4731, 286, 530, 393, 517, 2456, 1...
2.611413
368
from bioblend.galaxy import GalaxyInstance from bioblend.galaxy.histories import HistoryClient from bioblend.galaxy.libraries import LibraryClient from bioblend.galaxy.tools import ToolClient from bioblend.galaxy.datasets import DatasetClient from bioblend.galaxy.jobs import JobsClient from urllib.parse import urlpars...
[ 6738, 3182, 45292, 437, 13, 13528, 6969, 1330, 9252, 33384, 198, 6738, 3182, 45292, 437, 13, 13528, 6969, 13, 10034, 1749, 1330, 7443, 11792, 198, 6738, 3182, 45292, 437, 13, 13528, 6969, 13, 75, 11127, 1330, 10074, 11792, 198, 6738, 31...
2.238794
1,227
#!/usr/bin/python3 import struct import time import argparse import ssl import socket import sys import os from concurrent.futures import ProcessPoolExecutor class Server: ''' This class represents a remote server implementing the exobrain protocol It performs the UI and Display roles of said protocol, to...
[ 2, 48443, 14629, 14, 8800, 14, 29412, 18, 198, 198, 11748, 2878, 198, 11748, 640, 198, 11748, 1822, 29572, 198, 11748, 264, 6649, 198, 11748, 17802, 198, 11748, 25064, 198, 11748, 28686, 198, 6738, 24580, 13, 69, 315, 942, 1330, 10854, ...
3.088296
487
# coding: utf-8 # Copyright (c) 2016, 2021, 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, 33448, 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.343043
56,885
# -*- coding: utf-8 -*- """Operator plugin that inherits a base class and is made available through `type`.""" from __future__ import unicode_literals from __future__ import print_function import logging import json from typing import Dict from cookiecutter.operators import BaseOperator logger = logging.getLogger(_...
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 198, 37811, 18843, 1352, 13877, 326, 10639, 896, 257, 2779, 1398, 290, 318, 925, 1695, 832, 4600, 4906, 63, 526, 15931, 198, 6738, 11593, 37443, 834, 1330, 28000, 1098, ...
3.147826
230
#!/usr/bin/env python3 # -*- coding: utf-8 -*- """ Created on Sun May 17 22:02:56 2020 @author: cuixiwen """ #Import essential packages import requests import pandas as pd import time import datetime from datetime import timedelta #def a function to using huobi API to get history Kline data and return a dataframe #...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 18, 198, 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 37811, 198, 41972, 319, 3825, 1737, 1596, 2534, 25, 2999, 25, 3980, 12131, 198, 198, 31, 9800, 25, 18912, 844, 14...
3.149533
107
# Copyright (c) 2018 Copyright holder of the paper Generative Adversarial Model Learning # submitted to NeurIPS 2019 for review # All rights reserved. import rllab.misc.logger as logger from rllab.torch.sampler.torchSampler import TorchBaseSampler from rllab.sampler import parallel_sampler from rllab.algos.base import...
[ 2, 15069, 357, 66, 8, 2864, 15069, 15762, 286, 262, 3348, 2980, 876, 1215, 690, 36098, 9104, 18252, 198, 2, 8948, 284, 3169, 333, 47643, 13130, 329, 2423, 198, 2, 1439, 2489, 10395, 13, 198, 198, 11748, 374, 297, 397, 13, 44374, 13,...
3.277457
173
from django.shortcuts import render, HttpResponseRedirect from .forms import LoginForm from django.contrib.auth import get_user_model, authenticate, login, logout # Create your views here.
[ 6738, 42625, 14208, 13, 19509, 23779, 1330, 8543, 11, 367, 29281, 31077, 7738, 1060, 198, 198, 6738, 764, 23914, 1330, 23093, 8479, 198, 6738, 42625, 14208, 13, 3642, 822, 13, 18439, 1330, 651, 62, 7220, 62, 19849, 11, 8323, 5344, 11, ...
3.574074
54
# Copyright 2014 M. A. Zentile, J. Keaveney, L. Weller, D. Whiting, # C. S. Adams and I. G. Hughes. # 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...
[ 2, 15069, 1946, 337, 13, 317, 13, 1168, 298, 576, 11, 449, 13, 3873, 4005, 2959, 11, 406, 13, 3894, 263, 11, 360, 13, 854, 1780, 11, 198, 2, 327, 13, 311, 13, 12620, 290, 314, 13, 402, 13, 19712, 13, 198, 198, 2, 49962, 739, ...
2.33085
8,188
import pytest import numpy as np from factor import OrderFinder, QuantumOrderFinder, FakeQuantumOrderFinder TEST_RNG = np.random.default_rng(seed=2022) TEST_N_TRIALS = 3
[ 11748, 12972, 9288, 198, 11748, 299, 32152, 355, 45941, 198, 198, 6738, 5766, 1330, 8284, 37, 5540, 11, 29082, 18743, 37, 5540, 11, 33482, 24915, 388, 18743, 37, 5540, 198, 198, 51, 6465, 62, 49, 10503, 796, 45941, 13, 25120, 13, 1228...
2.707692
65
#!/usr/bin/env python3 # Copyright 2013-present Barefoot Networks, Inc. # Copyright 2018 VMware, 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/LI...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 18, 198, 2, 15069, 2211, 12, 25579, 38234, 5898, 27862, 11, 3457, 13, 198, 2, 15069, 2864, 37754, 11, 3457, 13, 198, 2, 198, 2, 49962, 739, 262, 24843, 13789, 11, 10628, 362, 13, 15, 35...
2.192076
3,988
# -*- coding: utf-8 -*- """Unit tests for Request class""" import pytest from ga4gh.refget.http.request import Request testdata_header = [ ("Content-Type", "appliciation/json"), ("Content-Type", "text/plain"), ("Range", "bytes=25-100") ] testdata_path = [ ("seqid", "ga4gh:SQ.HKyMuwwEWbdUDXfk5o1EGxGeq...
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 37811, 26453, 5254, 329, 19390, 1398, 37811, 198, 198, 11748, 12972, 9288, 198, 6738, 31986, 19, 456, 13, 5420, 1136, 13, 4023, 13, 25927, 1330, 19390, 198, 198, 9288, 7...
2.184375
320
#!/usr/bin/env python3 # -*- coding: utf-8 -*- # # Copyright (c) 2013 Frederik Elwert <frederik.elwert@web.de> # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the "Software"), to deal # in the Software without restriction, including...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 18, 198, 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 2, 198, 2, 15069, 357, 66, 8, 2211, 18669, 1134, 2574, 86, 861, 1279, 39193, 263, 1134, 13, 417, 86, 861, 31, ...
3.39899
396
from coinbase.wallet.client import Client import huobi_main_monitor import time import email_client if __name__ == '__main__': main()
[ 6738, 10752, 8692, 13, 44623, 13, 16366, 1330, 20985, 198, 11748, 289, 84, 13411, 62, 12417, 62, 41143, 198, 11748, 640, 198, 11748, 3053, 62, 16366, 198, 198, 361, 11593, 3672, 834, 6624, 705, 834, 12417, 834, 10354, 198, 220, 220, 2...
3.136364
44
# Generated by Django 2.1 on 2020-07-20 05:20 from django.conf import settings from django.db import migrations, models import django.db.models.deletion
[ 2, 2980, 515, 416, 37770, 362, 13, 16, 319, 12131, 12, 2998, 12, 1238, 8870, 25, 1238, 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
#!/usr/bin/env python3 import helm_generator.generator as gen import sys if __name__ == '__main__': sys.exit(main())
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 18, 198, 198, 11748, 18030, 62, 8612, 1352, 13, 8612, 1352, 355, 2429, 198, 11748, 25064, 628, 198, 361, 11593, 3672, 834, 6624, 705, 834, 12417, 834, 10354, 198, 220, 220, 220, 25064, 13, ...
2.638298
47
from appJar import gui app = gui('Internal marks caliculator') app.setBg('#8b9dc3') app.addLabel('lb1','Enter your marks') app.addLabelNumericEntry('class test 1') app.addLabelNumericEntry('class test 2') app.addLabelNumericEntry('class test 3') app.addLabelNumericEntry('class test 4') app.addLabelNumericEntry('mid 1'...
[ 6738, 598, 47511, 1330, 11774, 198, 198, 1324, 796, 11774, 10786, 37693, 8849, 2386, 291, 8927, 11537, 198, 1324, 13, 2617, 33, 70, 10786, 2, 23, 65, 24, 17896, 18, 11537, 198, 1324, 13, 2860, 33986, 10786, 23160, 16, 41707, 17469, 53...
2.871622
148
# # quiz # # what is a result of following Python code a = "5" b = "6" print( a + b ) # # 1. 11 # # 2. 5 # # 3. 6 # # 4. 56 # # 5. compile error a=2 b=2 if (a > 5 and b < 3): print("heheh") else: print("hohoho") a=2 b=2 if (a > 5 or b < 3): print("heheh") else: print("hohoho") # ## Please code 'xx...
[ 2, 1303, 38964, 198, 2, 1303, 644, 318, 257, 1255, 286, 1708, 11361, 2438, 198, 64, 796, 366, 20, 1, 198, 65, 796, 366, 21, 1, 198, 4798, 7, 257, 1343, 275, 1267, 198, 198, 2, 1303, 352, 13, 1367, 198, 2, 1303, 362, 13, 642, ...
2.486216
399
import time import receiver if __name__ == '__main__': recv = receiver.Receiver() recv.start_thread(12345) try: print('Press Ctrl-C to stop') while True: while recv.available(): msgs = recv.get() print(msgs) time.sleep(1 / 60) fina...
[ 11748, 640, 198, 11748, 9733, 198, 198, 361, 11593, 3672, 834, 6624, 705, 834, 12417, 834, 10354, 198, 220, 220, 220, 664, 85, 796, 9733, 13, 3041, 39729, 3419, 198, 220, 220, 220, 664, 85, 13, 9688, 62, 16663, 7, 10163, 2231, 8, ...
1.934066
182
import unittest from slack_ttt.native.dynamo_db import DynamoDB from slack_ttt.request_handler import RequestHandler # NEW GAME USE CASES # GAME ACCEPT USE CASES # GAME DECLINE USE CASES # DISPLAY BOARD TEST CASES # GAME MOVES TEST CASES # GAME COMPLETION TEST CASES # GAME ENDING TEST...
[ 11748, 555, 715, 395, 198, 6738, 30740, 62, 926, 83, 13, 30191, 13, 67, 4989, 78, 62, 9945, 1330, 41542, 11012, 198, 6738, 30740, 62, 926, 83, 13, 25927, 62, 30281, 1330, 19390, 25060, 628, 220, 220, 220, 1303, 12682, 30517, 23210, ...
2.777778
135
# Copyright (c) OpenMMLab. All rights reserved. import argparse from collections import OrderedDict import torch def convert(src, dst): """Convert keys in torchvision pretrained MobileNetV2 models to mmcls style.""" # load pytorch model blobs = torch.load(src, map_location='cpu') # convert ...
[ 2, 15069, 357, 66, 8, 4946, 44, 5805, 397, 13, 1439, 2489, 10395, 13, 198, 11748, 1822, 29572, 198, 6738, 17268, 1330, 14230, 1068, 35, 713, 198, 198, 11748, 28034, 628, 628, 628, 198, 4299, 10385, 7, 10677, 11, 29636, 2599, 198, 22...
2.532584
445
from keys.sol6_keys import * from converters.sol1_flags import * from keys.sol6_keys import V2MapBase from mapping_v2 import * import logging log = logging.getLogger(__name__)
[ 6738, 8251, 13, 34453, 21, 62, 13083, 1330, 1635, 198, 6738, 6718, 1010, 13, 34453, 16, 62, 33152, 1330, 1635, 198, 6738, 8251, 13, 34453, 21, 62, 13083, 1330, 569, 17, 13912, 14881, 198, 6738, 16855, 62, 85, 17, 1330, 1635, 198, 11...
3.051724
58
from aws_api_mock.Entity_Generator_Command_Interface import Entity_Generator_Command_Interface from aws_api_mock.aws_data_helpers import get_exadecimal_sample
[ 6738, 3253, 82, 62, 15042, 62, 76, 735, 13, 32398, 62, 8645, 1352, 62, 21575, 62, 39317, 1330, 20885, 62, 8645, 1352, 62, 21575, 62, 39317, 198, 6738, 3253, 82, 62, 15042, 62, 76, 735, 13, 8356, 62, 7890, 62, 16794, 364, 1330, 651...
3.057692
52
#!/usr/bin/env python3 import io import sys import cv2 import os import json import asyncio import aiohttp import numpy as np from PIL import Image from ai import Detector from json import JSONEncoder from datetime import datetime, date from kafka import KafkaConsumer #Override the default method if __name__ == "...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 18, 198, 198, 11748, 33245, 198, 11748, 25064, 198, 11748, 269, 85, 17, 198, 11748, 28686, 198, 11748, 33918, 198, 11748, 30351, 952, 198, 11748, 257, 952, 4023, 198, 11748, 299, 32152, 355, ...
2.928177
181
# jobs.py Class to work with submitted LogicApp jobs import os,json, sys, requests from datetime import datetime from slugify import slugify class Jobs(): """ system for managing running jobs Usage: from mljob.job import Jobs # in app init, put the class inside the app app.jobs = Jobs # set th...
[ 2, 3946, 13, 9078, 220, 5016, 284, 670, 351, 8948, 30146, 4677, 3946, 198, 198, 11748, 28686, 11, 17752, 11, 25064, 11, 7007, 198, 6738, 4818, 8079, 1330, 4818, 8079, 198, 6738, 31065, 1958, 1330, 31065, 1958, 198, 198, 4871, 19161, 3...
2.290115
6,687
# -*- coding: utf-8 -*- # Generated by Django 1.11.1 on 2017-11-04 20:19 from __future__ import unicode_literals from django.db import migrations, models
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 2, 2980, 515, 416, 37770, 352, 13, 1157, 13, 16, 319, 2177, 12, 1157, 12, 3023, 1160, 25, 1129, 198, 6738, 11593, 37443, 834, 1330, 28000, 1098, 62, 17201, 874, 198, ...
2.736842
57
#!/usr/bin/env python # coding: utf-8 # In[2]: #hide from nbdev_demo.core import * # # nbdev_demo # # > Just my little demo. # This file will become your README and also the index of your documentation. # ## Install # `pip install nbdev_demo` # ## How to use # Fill me in please! Don't forget code examples: ...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 2, 19617, 25, 3384, 69, 12, 23, 198, 198, 2, 554, 58, 17, 5974, 628, 198, 2, 24717, 198, 6738, 299, 65, 7959, 62, 9536, 78, 13, 7295, 1330, 1635, 628, 198, 2, 1303, 299, 65, 79...
2.513699
146
"""Generates new queries on the JOB-light schema. For each JOB-light join template, repeat #queries per template: - sample a tuple from this inner join result via factorized_sampler - sample #filters, and columns to put these filters on - query literals: use this tuple's values - sample ops: {>=, <=, =} fo...
[ 37811, 8645, 689, 649, 20743, 319, 262, 449, 9864, 12, 2971, 32815, 13, 198, 198, 1890, 1123, 449, 9864, 12, 2971, 4654, 11055, 11, 9585, 1303, 421, 10640, 583, 11055, 25, 198, 220, 220, 532, 6291, 257, 46545, 422, 428, 8434, 4654, ...
2.077813
5,012
""" Figure 2: Quick look into mostly valency """ import numpy as np from .figureCommon import subplotLabel, setFontSize, getSetup, popCompare from .figureS2 import vieqPlot ligConc = np.array([1e-8]) KxStarP = 1e-10 affinity = 1e8 # 7
[ 37811, 198, 11337, 362, 25, 12029, 804, 656, 4632, 1188, 1387, 198, 37811, 198, 11748, 299, 32152, 355, 45941, 198, 6738, 764, 26875, 17227, 1330, 850, 29487, 33986, 11, 900, 38160, 11, 651, 40786, 11, 1461, 41488, 198, 6738, 764, 26875...
2.833333
84
from aws_cdk import( core, aws_codepipeline as codepipeline, aws_codepipeline_actions as cpactions, aws_codecommit as codecommit, aws_s3 as s3, aws_iam as iam, aws_codebuild as codebuild, pipelines ) import json
[ 6738, 3253, 82, 62, 10210, 74, 1330, 7, 198, 220, 4755, 11, 198, 220, 3253, 82, 62, 19815, 538, 541, 4470, 355, 14873, 538, 541, 4470, 11, 198, 220, 3253, 82, 62, 19815, 538, 541, 4470, 62, 4658, 355, 31396, 4658, 11, 198, 220, ...
2.222222
108
# This library is free software; you can redistribute it and/or modify # it under the terms of the GNU Lesser General Public License as # published by the Free Software Foundation; either version 3 of the # License, or (at your option) any later version. # # This library is distributed in the hope that it will be usefu...
[ 2, 770, 5888, 318, 1479, 3788, 26, 345, 460, 17678, 4163, 340, 290, 14, 273, 13096, 198, 2, 340, 739, 262, 2846, 286, 262, 22961, 12892, 263, 3611, 5094, 13789, 355, 198, 2, 3199, 416, 262, 3232, 10442, 5693, 26, 2035, 2196, 513, ...
3.407407
432
# Copyright 2019-2020 by Peter Cock, The James Hutton Institute. # All rights reserved. # This file is part of the THAPBI Phytophthora ITS1 Classifier Tool (PICT), # and is released under the "MIT License Agreement". Please see the LICENSE # file that should have been included as part of this package. """Code for sampl...
[ 2, 15069, 13130, 12, 42334, 416, 5613, 23769, 11, 383, 3700, 367, 21115, 5136, 13, 198, 2, 1439, 2489, 10395, 13, 198, 2, 770, 2393, 318, 636, 286, 262, 2320, 2969, 3483, 1380, 20760, 2522, 34261, 42437, 16, 5016, 7483, 16984, 357, ...
2.198893
2,710
# PolynomialFeatures(degree=2, interaction_only=False, include_bias=True) import sys X = [[1, 2], [3, 4], [5, 6]] my_poly = PolynomialTools(order=2) #, interactions_only=True, include_bias=False) my_poly.fit(X) # print(len(my_poly.__powers_lists)) # print(my_poly.__powers_lists) print(my_poly.get_features_names(['...
[ 2, 12280, 26601, 498, 23595, 7, 16863, 28, 17, 11, 10375, 62, 8807, 28, 25101, 11, 2291, 62, 65, 4448, 28, 17821, 8, 198, 11748, 25064, 628, 198, 198, 55, 796, 16410, 16, 11, 362, 4357, 685, 18, 11, 604, 4357, 685, 20, 11, 718, ...
2.372951
244
import pathlib import pickle import numpy as np import scipy.stats from horaha import PROJECT_ROOT
[ 11748, 3108, 8019, 198, 11748, 2298, 293, 198, 198, 11748, 299, 32152, 355, 45941, 198, 11748, 629, 541, 88, 13, 34242, 198, 198, 6738, 3076, 12236, 1330, 21965, 23680, 62, 13252, 2394, 628, 628, 198 ]
3
35
#!/usr/bin/python # -*- coding: utf-8 -*- #用于进行http请求,以及MD5加密,生成签名的工具类 import http.client import urllib import json import hashlib import time import requests from urllib.parse import urljoin from urllib.parse import urlencode
[ 2, 48443, 14629, 14, 8800, 14, 29412, 198, 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 2, 18796, 101, 12859, 236, 32573, 249, 26193, 234, 4023, 46237, 115, 162, 109, 224, 171, 120, 234, 20015, 98, 20998, 232, 12...
1.965812
117
""" TODO """ import csv import StringIO from flask import current_app from psqlgraph import Node from sheepdog.errors import UserError from sheepdog.utils.transforms.bcr_xml_to_json import ( BcrXmlToJsonParser, BcrClinicalXmlToJsonParser, ) def parse_bool_from_string(value): """ Return a boolean gi...
[ 37811, 198, 51, 3727, 46, 198, 37811, 198, 198, 11748, 269, 21370, 198, 11748, 10903, 9399, 198, 198, 6738, 42903, 1330, 1459, 62, 1324, 198, 6738, 279, 25410, 34960, 1330, 19081, 198, 198, 6738, 15900, 9703, 13, 48277, 1330, 11787, 123...
2.19491
3,222
import sys import os import signal import requests import json import queue import time import threading import ntplib from threading import Thread from gethongbao import verControl, HongBao, QiangHongBao, get_cookie, update_cookie from basemodule.logger import logger from douyu_login import utils as login_utils from ...
[ 198, 11748, 25064, 198, 11748, 28686, 198, 11748, 6737, 198, 11748, 7007, 198, 11748, 33918, 198, 11748, 16834, 198, 11748, 640, 198, 11748, 4704, 278, 198, 11748, 299, 83, 489, 571, 198, 6738, 4704, 278, 1330, 14122, 198, 6738, 651, 71...
1.70369
2,710
import cv2 import numpy as np import skimage.io from src.software_retina.retina import *
[ 11748, 269, 85, 17, 198, 11748, 299, 32152, 355, 45941, 198, 11748, 1341, 9060, 13, 952, 198, 198, 6738, 12351, 13, 43776, 62, 1186, 1437, 13, 1186, 1437, 1330, 1635, 198 ]
2.903226
31
""" Iterating multiple lists at the same time """ l1 = [1,2,3] l2 = [6,7,8,10,20,30] for a,b in zip(l1, l2): if (a < b): print(a) else: print(b) print("____ LEARNING RANGE BUILT IN FUNCTION ____") """ Built in function Creates a sequence of numbers but does not save them in memory very useful f...
[ 37811, 198, 29993, 803, 3294, 8341, 379, 262, 976, 640, 198, 37811, 198, 75, 16, 796, 685, 16, 11, 17, 11, 18, 60, 198, 75, 17, 796, 685, 21, 11, 22, 11, 23, 11, 940, 11, 1238, 11, 1270, 60, 198, 1640, 257, 11, 65, 287, 1997...
2.243363
226
#made by atul narayan. this game is for 4 players. choice = input('How many players? (1,2 or 3):') if choice not in range (1,4): print("enter valid number of players") if choice in ('1'): player1 = str(input("Enter Your Name:")) if choice == '1': print('welcome', '' ,player1) ...
[ 2, 9727, 416, 379, 377, 30083, 22931, 13, 428, 983, 318, 329, 604, 1938, 13, 198, 25541, 796, 5128, 10786, 2437, 867, 1938, 30, 357, 16, 11, 17, 393, 513, 2599, 11537, 198, 361, 3572, 407, 287, 2837, 357, 16, 11, 19, 2599, 198, ...
1.743548
4,921
# Generated by Django 2.1.5 on 2019-03-16 09:29 from django.db import migrations
[ 2, 2980, 515, 416, 37770, 362, 13, 16, 13, 20, 319, 13130, 12, 3070, 12, 1433, 7769, 25, 1959, 198, 198, 6738, 42625, 14208, 13, 9945, 1330, 15720, 602, 628 ]
2.766667
30
"""Authors: Cody Baker and Ben Dichter.""" import spikeextractors as se from nwb_conversion_tools import NWBConverter, neuroscopedatainterface from .watsonlfpdatainterface import WatsonLFPInterface from .watsonbehaviordatainterface import WatsonBehaviorInterface from .watsonnorecording import WatsonNoRecording from .wa...
[ 37811, 30515, 669, 25, 27035, 14372, 290, 3932, 360, 488, 353, 526, 15931, 198, 11748, 20240, 2302, 974, 669, 355, 384, 198, 6738, 299, 39346, 62, 1102, 9641, 62, 31391, 1330, 21966, 2749, 261, 332, 353, 11, 7669, 1416, 19458, 265, 39...
3.51497
167
"""Abstention loss function classes and associated alpha updater classes for classification. loss function classes --------------------- * DACLoss(tf.keras.losses.Loss): Modified k-class cross-entropy per-sample loss with spinup, as defined by Sunil Thulasidasan. * NotWrongLoss(tf.keras.losses.Loss): Abst...
[ 37811, 4826, 301, 1463, 2994, 2163, 6097, 290, 3917, 17130, 2325, 729, 6097, 329, 198, 4871, 2649, 13, 198, 198, 22462, 2163, 6097, 198, 19351, 12, 198, 9, 45793, 43, 793, 7, 27110, 13, 6122, 292, 13, 22462, 274, 13, 43, 793, 2599, ...
3.04213
2,967
# Copyright (c) OpenMMLab. All rights reserved. from .class_names import get_classes, get_palette from .eval_hooks import DistEvalHook, EvalHook from .metrics import (eval_metrics, intersect_and_union, mean_dice, mean_fscore, mean_iou, pre_eval_to_metrics) __all__ = [ 'EvalHook', 'DistEvalHoo...
[ 2, 15069, 357, 66, 8, 4946, 44, 5805, 397, 13, 1439, 2489, 10395, 13, 198, 6738, 764, 4871, 62, 14933, 1330, 651, 62, 37724, 11, 651, 62, 18596, 5857, 198, 6738, 764, 18206, 62, 25480, 82, 1330, 4307, 36, 2100, 39, 566, 11, 26439,...
2.348485
198
# Copyright (c) 2014, Fundacion Dr. Manuel Sadosky # 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 # list of condit...
[ 2, 15069, 357, 66, 8, 1946, 11, 7557, 49443, 1583, 13, 25995, 14668, 418, 2584, 198, 2, 1439, 2489, 10395, 13, 198, 198, 2, 2297, 396, 3890, 290, 779, 287, 2723, 290, 13934, 5107, 11, 351, 393, 1231, 198, 2, 17613, 11, 389, 10431,...
3.415913
553
#!/usr/bin/env python3 """infoset classes that manage various configurations.""" import os.path import os # Import project libraries from infoset.utils import general from infoset.utils import log class Config(object): """Class gathers all configuration information.""" def __init__(self): """Functi...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 18, 198, 37811, 10745, 418, 316, 6097, 326, 6687, 2972, 25412, 526, 15931, 198, 198, 11748, 28686, 13, 6978, 198, 11748, 28686, 198, 198, 2, 17267, 1628, 12782, 198, 6738, 1167, 418, 316, 1...
2.045158
5,204
#!/usr/bin/python # -*- coding: UTF-8 -*- import maya.cmds as cmds
[ 2, 48443, 14629, 14, 8800, 14, 29412, 201, 198, 2, 532, 9, 12, 19617, 25, 41002, 12, 23, 532, 9, 12, 201, 198, 201, 198, 11748, 743, 64, 13, 28758, 82, 355, 23991, 82, 201, 198, 201, 198, 201, 198, 201, 198, 201, 198, 201, 198...
1.782609
46
from emojitations.emojitypes import EmojiAnnotations emoji = [ EmojiAnnotations(emoji='😀', codepoints=(128512,), name='sura inayokenua', slug='sura_inayokenua', annotations=frozenset({'kenua', 'uso'})), EmojiAnnotations(emoji='😁', codepoints=(128513,), name='uso uliokenua na macho yanayotabasamu', slug='uso_uliok...
[ 6738, 795, 13210, 20597, 13, 368, 13210, 414, 12272, 1330, 2295, 31370, 2025, 30078, 198, 368, 31370, 796, 685, 198, 220, 2295, 31370, 2025, 30078, 7, 368, 31370, 11639, 47249, 222, 3256, 14873, 538, 1563, 82, 16193, 1065, 5332, 1065, 1...
2.314958
68,641
from io import BytesIO from abc import ABCMeta, abstractmethod import metric_constant as c import os import gzip import zlib import base64 import sqs import enum_type SENSITIVITY_TYPE = enum_type.create(NONE="Insensitive", ENCRYPT="Sensitive") """ Encrypt S3 files (0) or leave unencrypted (1) """
[ 6738, 33245, 1330, 2750, 4879, 9399, 198, 6738, 450, 66, 1330, 9738, 48526, 11, 12531, 24396, 198, 11748, 18663, 62, 9979, 415, 355, 269, 198, 11748, 28686, 198, 11748, 308, 13344, 198, 11748, 1976, 8019, 198, 11748, 2779, 2414, 198, 11...
2.851852
108
# coding: utf-8 # 安装Mysql驱动 # pip install mysql-connector-python --allow-external mysql-connector-python # pip install mysql-connector # 导入Mysql驱动 import mysql.connector # 创建数据库连接 conn = mysql.connector.connect(host='192.168.1.64', user='root', password='root', database='test') # 创建游标 cursor = conn.cursor() # 创建user...
[ 2, 19617, 25, 3384, 69, 12, 23, 198, 198, 2, 10263, 106, 231, 35318, 44, 893, 13976, 165, 102, 109, 27950, 101, 198, 2, 7347, 2721, 48761, 12, 8443, 273, 12, 29412, 1377, 12154, 12, 22615, 48761, 12, 8443, 273, 12, 29412, 198, 2, ...
1.839416
411
import select import socket import threading import queue import time """ This class is used by both player, trainer, coach and fake monitor for connecting to the server. """
[ 11748, 2922, 198, 11748, 17802, 198, 11748, 4704, 278, 198, 11748, 16834, 198, 11748, 640, 198, 198, 37811, 198, 1212, 1398, 318, 973, 416, 1111, 2137, 11, 21997, 11, 3985, 290, 8390, 5671, 329, 14320, 284, 262, 4382, 13, 198, 37811 ]
4.268293
41
import hydroDL import os from hydroDL.data import dbCsv from hydroDL.model import rnn, crit, train from hydroDL import post from hydroDL import utils import numpy as np rootDB = hydroDL.pathSMAP['DB_L3_NA'] nEpoch = 100 outFolder = os.path.join(hydroDL.pathSMAP['outTest'], 'cnnCond') ty1 = [20150402, 20160401] ty2 = [...
[ 11748, 17173, 19260, 198, 11748, 28686, 198, 6738, 17173, 19260, 13, 7890, 1330, 20613, 34, 21370, 198, 6738, 17173, 19260, 13, 19849, 1330, 374, 20471, 11, 1955, 11, 4512, 198, 6738, 17173, 19260, 1330, 1281, 198, 6738, 17173, 19260, 133...
2.184704
693
from django.contrib import admin from .models import Note # Меняем формат вывода даты и времени только для РУССКОЙ локализации # Для всего сайта надо поместить этот код в `settings.py` from django.conf.locale.ru import formats as ru_formats ru_formats.DATETIME_FORMAT = "d.m.Y H:i:s" @admin.register(Note)
[ 6738, 42625, 14208, 13, 3642, 822, 1330, 13169, 198, 198, 6738, 764, 27530, 1330, 5740, 198, 198, 2, 12466, 250, 16843, 22177, 40623, 16843, 43108, 220, 141, 226, 15166, 21169, 43108, 16142, 20375, 12466, 110, 45035, 38857, 25443, 112, 16...
1.552764
199
import pytest import quake.client as quake @quake.mpi_task(n_processes=1) @quake.mpi_task(n_processes=1) @quake.mpi_task(n_processes=1) @quake.mpi_task(n_processes=4) @quake.mpi_task(n_processes=4) @quake.arg("a", layout="scatter") @quake.mpi_task(n_processes=8) @quake.mpi_task(n_processes=2)
[ 11748, 12972, 9288, 198, 198, 11748, 36606, 13, 16366, 355, 36606, 628, 198, 31, 421, 539, 13, 3149, 72, 62, 35943, 7, 77, 62, 14681, 274, 28, 16, 8, 628, 198, 31, 421, 539, 13, 3149, 72, 62, 35943, 7, 77, 62, 14681, 274, 28, ...
2.038961
154
import logging import sys import os from mlpiper.components.connectable_component import ConnectableComponent from datarobot_drum.drum.common import LOGGER_NAME_PREFIX from datarobot_drum.drum.model_adapter import PythonModelAdapter from datarobot_drum.drum.utils import shared_fit_preprocessing, make_sure_artifact_is...
[ 11748, 18931, 198, 11748, 25064, 198, 11748, 28686, 198, 198, 6738, 25962, 79, 9346, 13, 5589, 3906, 13, 8443, 540, 62, 42895, 1330, 8113, 540, 21950, 198, 198, 6738, 4818, 283, 672, 313, 62, 67, 6582, 13, 67, 6582, 13, 11321, 1330, ...
3
131
import torch import torch.nn import linklink as link from unn.utils.bn_helper import GroupSyncBatchNorm, FrozenBatchNorm2d from unn.utils.dist_helper import get_world_size def op32_wrapper(func): """Wrapper forward whose input are all tensors and can only handle float""" return forward def setup_fp16(): ...
[ 11748, 28034, 198, 11748, 28034, 13, 20471, 198, 11748, 2792, 8726, 355, 2792, 198, 198, 6738, 41231, 13, 26791, 13, 9374, 62, 2978, 525, 1330, 4912, 28985, 33, 963, 35393, 11, 23673, 33, 963, 35393, 17, 67, 198, 6738, 41231, 13, 2679...
2.885
200
# -*- coding: utf-8 -*- from __future__ import absolute_import from __future__ import division from __future__ import print_function import csv import numpy as np import os import sys from observations.util import maybe_download_and_extract def gaba(path): """Effect of pentazocine on post-operative pain (average ...
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 6738, 11593, 37443, 834, 1330, 4112, 62, 11748, 198, 6738, 11593, 37443, 834, 1330, 7297, 198, 6738, 11593, 37443, 834, 1330, 3601, 62, 8818, 198, 198, 11748, 269, 21370, ...
2.665734
715
# Copyright 1999-2018 Alibaba Group Holding Ltd. # # 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 a...
[ 2, 15069, 7358, 12, 7908, 41992, 4912, 31703, 12052, 13, 198, 2, 198, 2, 49962, 739, 262, 24843, 13789, 11, 10628, 362, 13, 15, 357, 1169, 366, 34156, 15341, 198, 2, 345, 743, 407, 779, 428, 2393, 2845, 287, 11846, 351, 262, 13789, ...
3.218543
302
# Time: O(nlogn) # Space: O(n) import collections
[ 2, 3862, 25, 220, 440, 7, 21283, 2360, 8, 198, 2, 4687, 25, 440, 7, 77, 8, 198, 198, 11748, 17268, 628 ]
2.409091
22
"""Holds client subclass of discord.ext.Bot, and registeres commands.""" from discord.ext import commands as ext from offthedialbot.commands import register_commands client = Client(command_prefix='$') register_commands(client)
[ 37811, 39, 10119, 5456, 47611, 286, 36446, 13, 2302, 13, 20630, 11, 290, 4214, 68, 411, 9729, 526, 15931, 201, 198, 201, 198, 6738, 36446, 13, 2302, 1330, 9729, 355, 1070, 201, 198, 201, 198, 6738, 572, 83, 704, 498, 13645, 13, 9503...
3.115385
78
import argparse import json import logging import os import time from collections import Counter from copy import deepcopy from sklearn.model_selection import KFold import metrics import numpy as np import torch import torch.nn as nn import torch.optim as optim from pyjarowinkler import distance as jwdistance from ut...
[ 11748, 1822, 29572, 198, 11748, 33918, 198, 11748, 18931, 198, 11748, 28686, 198, 11748, 640, 198, 6738, 17268, 1330, 15034, 198, 6738, 4866, 1330, 2769, 30073, 198, 198, 6738, 1341, 35720, 13, 19849, 62, 49283, 1330, 509, 37, 727, 198, ...
2.112574
3,038
#!/usr/bin/env python # -*- python -*- #BEGIN_LEGAL # #Copyright (c) 2019 Intel 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, 48443, 14629, 14, 8800, 14, 24330, 220, 21015, 198, 2, 532, 9, 12, 21015, 532, 9, 12, 198, 2, 33, 43312, 62, 2538, 38, 1847, 198, 2, 198, 2, 15269, 357, 66, 8, 13130, 8180, 10501, 198, 2, 198, 2, 220, 49962, 739, 262, 24843...
2.35248
1,149
import json import os import urllib.parse import PySimpleGUI as sg import requests from bs4 import BeautifulSoup, SoupStrainer
[ 11748, 33918, 198, 11748, 28686, 198, 11748, 2956, 297, 571, 13, 29572, 198, 198, 11748, 9485, 26437, 40156, 355, 264, 70, 198, 11748, 7007, 198, 6738, 275, 82, 19, 1330, 23762, 50, 10486, 11, 34011, 1273, 3201, 263, 198 ]
3.282051
39
import urllib.request import shutil import os import tarfile import random import glob from TexSoup import TexSoup def import_resolve(tex, path): """Resolve all imports and update the parse tree. Reads from a tex file and once finished, writes to a tex file. """ soup = TexSoup(tex) dir_path = os....
[ 198, 11748, 2956, 297, 571, 13, 25927, 198, 11748, 4423, 346, 198, 11748, 28686, 220, 198, 11748, 13422, 7753, 198, 11748, 4738, 198, 11748, 15095, 198, 6738, 3567, 50, 10486, 1330, 3567, 50, 10486, 198, 198, 4299, 1330, 62, 411, 6442, ...
2.253532
2,477
from setuptools import setup, find_packages VERSION = '0.1.11' DESCRIPTION = 'A mobility analysis package developed at the Swiss Data Science Center' with open("README.md", "r", encoding="utf-8") as fh: long_description = fh.read() # Setting up setup( # the name must match the folder name 'sdscmob' ...
[ 6738, 900, 37623, 10141, 1330, 9058, 11, 1064, 62, 43789, 198, 198, 43717, 796, 705, 15, 13, 16, 13, 1157, 6, 220, 198, 30910, 40165, 796, 705, 32, 15873, 3781, 5301, 4166, 379, 262, 14780, 6060, 5800, 3337, 6, 198, 198, 4480, 1280,...
2.501114
449
# # Copyright (c) SAS Institute Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in w...
[ 2, 198, 2, 15069, 357, 66, 8, 35516, 5136, 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, 2845, 287, 11846, 351, 262, 13789, ...
3.56746
252
radius = int(input("Please Enter Radius of the Circle: ")) Rate = int(input("Please Enter Rate of Fencing: ")) #now calculating the area of circle area = 3.146 * 3.146 * radius print("The Area of the Circle is ", area) #now calculating the circumference circumference = 3.146 * 2 * radius print("The Circumference...
[ 42172, 796, 493, 7, 15414, 7203, 5492, 6062, 48838, 286, 262, 16291, 25, 366, 4008, 201, 198, 32184, 796, 493, 7, 15414, 7203, 5492, 6062, 14806, 286, 376, 9532, 25, 366, 4008, 201, 198, 2, 2197, 26019, 262, 1989, 286, 9197, 201, 19...
3.496296
135
import json from util import build from output import Output from method import Method from executor import Executor from function import Function from instance import Instance from algorithm import Algorithm if __name__ == '__main__': args = json.dumps({ 'algorithm': { 'mu': 1, 'lmbda': 1, ...
[ 11748, 33918, 198, 198, 6738, 7736, 1330, 1382, 198, 6738, 5072, 1330, 25235, 198, 6738, 2446, 1330, 11789, 198, 6738, 3121, 273, 1330, 8393, 38409, 198, 6738, 2163, 1330, 15553, 198, 6738, 4554, 1330, 2262, 590, 198, 6738, 11862, 1330, ...
1.705357
2,240
from django.contrib import admin # <HINT> Import any new Models here from .models import Course, Enrollment, Lesson, Instructor, Learner from .models import Question, Choice,Submission, Answer # <HINT> Register QuestionInline and ChoiceInline classes here # Register your models here. # <HINT> Register Questio...
[ 6738, 42625, 14208, 13, 3642, 822, 1330, 13169, 198, 2, 1279, 39, 12394, 29, 17267, 597, 649, 32329, 994, 198, 6738, 764, 27530, 1330, 20537, 11, 2039, 48108, 11, 12892, 261, 11, 47839, 11, 8010, 1008, 198, 6738, 764, 27530, 1330, 182...
3.363636
253
import io from bookmark_helper import * first_file_name = input('Enter first file name, including extension: ') second_file_name = input('Enter second file name, including extension: ') first_file = open(first_file_name, 'r') second_file = open(second_file_name, 'r') first_file_header = first_file.readline() sec...
[ 198, 11748, 33245, 198, 6738, 44007, 62, 2978, 525, 1330, 1635, 198, 198, 11085, 62, 7753, 62, 3672, 796, 5128, 10786, 17469, 717, 2393, 1438, 11, 1390, 7552, 25, 705, 8, 198, 12227, 62, 7753, 62, 3672, 796, 5128, 10786, 17469, 1218, ...
2.844991
529
# # Copyright 2015-2019, Institute for Systems Biology # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law ...
[ 2, 198, 2, 15069, 1853, 12, 23344, 11, 5136, 329, 11998, 24698, 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...
3.631579
247
"""""" import asyncio import hashlib from typing import Optional from uuid import uuid4 from .redis import RedisConnection class LockException(BaseLockException): """""" pass class ReleaseLockException(BaseLockException): """""" pass class Lock(object): """""" def __init__(self, lock_ke...
[ 15931, 15931, 15931, 198, 11748, 30351, 952, 198, 11748, 12234, 8019, 198, 6738, 19720, 1330, 32233, 198, 6738, 334, 27112, 1330, 334, 27112, 19, 198, 198, 6738, 764, 445, 271, 1330, 2297, 271, 32048, 628, 198, 198, 4871, 13656, 16922, ...
1.973492
3,018
from nameless import longest from nameless.cli import main
[ 198, 6738, 299, 39942, 1330, 14069, 198, 6738, 299, 39942, 13, 44506, 1330, 1388, 628, 198 ]
3.875
16
import argparse import glob import json import os import numpy as np import requests import sys # python get_pythia_caption_and_vsepp_score.py -o youcookII_pythia_json_files -i youcookII_json_files from pythia.utils.text_utils import tokenize # annotations_file = "/home/ascott/data/youcookII/YouCookII/annotations/yo...
[ 11748, 1822, 29572, 198, 11748, 15095, 198, 11748, 33918, 198, 11748, 28686, 198, 11748, 299, 32152, 355, 45941, 198, 11748, 7007, 198, 11748, 25064, 198, 198, 2, 21015, 651, 62, 79, 5272, 544, 62, 6888, 1159, 62, 392, 62, 85, 325, 38...
2.299174
605
import requests import pause import json import time import datetime import re import grequests import sys import os page = "hej" baseurl = "https://api.github.com/" # Get token f = open("token","r") username = f.readline() token = f.readline().rstrip('\n') f.close() #read data with open('reposfinal') as data_file:...
[ 11748, 7007, 198, 11748, 14985, 198, 11748, 33918, 198, 11748, 640, 198, 11748, 4818, 8079, 198, 11748, 302, 198, 11748, 308, 8897, 3558, 198, 11748, 25064, 198, 11748, 28686, 198, 198, 7700, 796, 366, 258, 73, 1, 198, 8692, 6371, 796, ...
2.241538
650
import logging log = logging.getLogger('fabric.fabalicious.git') from base import BaseMethod from fabric.api import * from lib.utils import validate_dict from lib.configuration import data_merge from lib import configuration
[ 11748, 18931, 198, 6404, 796, 18931, 13, 1136, 11187, 1362, 10786, 36434, 1173, 13, 36434, 282, 6243, 13, 18300, 11537, 198, 198, 6738, 2779, 1330, 7308, 17410, 198, 6738, 9664, 13, 15042, 1330, 1635, 198, 6738, 9195, 13, 26791, 1330, 2...
3.766667
60
# -*- coding: utf-8 -*- # Generated by the protocol buffer compiler. DO NOT EDIT! # source: client/transaction/transaction.proto from google.protobuf import descriptor as _descriptor from google.protobuf import message as _message from google.protobuf import reflection as _reflection from google.protobuf import symbo...
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 2, 2980, 515, 416, 262, 8435, 11876, 17050, 13, 220, 8410, 5626, 48483, 0, 198, 2, 2723, 25, 5456, 14, 7645, 2673, 14, 7645, 2673, 13, 1676, 1462, 198, 198, 6738, 23...
2.628732
9,815
# coding=utf-8 import os import xml.etree.ElementTree as ET import matplotlib.pyplot as plt path = os.path.join(os.getcwd(), 'images', 'annotations') if not os.path.exists(path): raise ValueError('The images\\annotations firectory does not exist') else: files = os.listdir(path) results = {} files =...
[ 2, 19617, 28, 40477, 12, 23, 198, 198, 11748, 28686, 198, 198, 11748, 35555, 13, 316, 631, 13, 20180, 27660, 355, 12152, 198, 198, 11748, 2603, 29487, 8019, 13, 9078, 29487, 355, 458, 83, 198, 198, 6978, 796, 28686, 13, 6978, 13, 22...
2.346516
531
import logging import os import cv2 import numpy as np import pickle import constants import random from natsort import natsorted from tqdm import tqdm from Isolator.isolator import Isolator from tensorflow.python.keras.preprocessing.image import ImageDataGenerator from tensorflow.python.keras.preprocessing.image impor...
[ 11748, 18931, 198, 11748, 28686, 198, 11748, 269, 85, 17, 198, 11748, 299, 32152, 355, 45941, 198, 11748, 2298, 293, 198, 11748, 38491, 198, 11748, 4738, 198, 6738, 299, 1381, 419, 1330, 299, 1381, 9741, 198, 6738, 256, 80, 36020, 1330,...
3.333333
108
import os import io from datetime import datetime, timedelta import uuid from flask import flash, render_template, request, redirect, url_for, jsonify, send_from_directory, abort from flask_admin.contrib.sqla import ModelView from flask_admin.form.upload import FileUploadField from flask_admin import AdminIndexView im...
[ 11748, 28686, 198, 11748, 33245, 198, 6738, 4818, 8079, 1330, 4818, 8079, 11, 28805, 12514, 198, 11748, 334, 27112, 198, 198, 6738, 42903, 1330, 7644, 11, 8543, 62, 28243, 11, 2581, 11, 18941, 11, 19016, 62, 1640, 11, 33918, 1958, 11, ...
2.577391
1,150
# Copyright (c) 2009-2020 Arm Limited # SPDX-License-Identifier: Apache-2.0 # # 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 ...
[ 2, 15069, 357, 66, 8, 3717, 12, 42334, 7057, 15302, 198, 2, 30628, 55, 12, 34156, 12, 33234, 7483, 25, 24843, 12, 17, 13, 15, 198, 2, 198, 2, 49962, 739, 262, 24843, 13789, 11, 10628, 362, 13, 15, 357, 1169, 366, 34156, 15341, 1...
2.912898
597
import sys filename = sys.argv[1] outfile = sys.argv[2] lines = open(filename, "r").readlines() lines = sorted(lines, key = sortByFirstNumber) ofile = open(outfile, "w") for num in lines: ofile.write(str(num))
[ 11748, 25064, 198, 34345, 796, 25064, 13, 853, 85, 58, 16, 60, 198, 448, 7753, 796, 25064, 13, 853, 85, 58, 17, 60, 198, 6615, 796, 1280, 7, 34345, 11, 366, 81, 11074, 961, 6615, 3419, 198, 6615, 796, 23243, 7, 6615, 11, 1994, 7...
2.534884
86
import os import shutil import numpy as np from zntrack import Node, ZnTrackProject, zn class ComputeA(Node): """Node stage A""" inp = zn.params() out = zn.outs() def test_stage_addition(tmp_path): """Check that the dvc repro works""" shutil.copy(__file__, tmp_path) os.chdir(tmp_path) ...
[ 11748, 28686, 198, 11748, 4423, 346, 198, 198, 11748, 299, 32152, 355, 45941, 198, 198, 6738, 1976, 429, 39638, 1330, 19081, 11, 1168, 77, 24802, 16775, 11, 1976, 77, 628, 198, 4871, 3082, 1133, 32, 7, 19667, 2599, 198, 220, 220, 220,...
2.422481
516
from django.db.models.query import QuerySet from graphene import Field, Int from graphene.relay import Connection, Node from graphene_django import DjangoConnectionField, DjangoObjectType from graphene_django.filter import DjangoFilterConnectionField from graphql.execution.base import ResolveInfo from promise.promise i...
[ 6738, 42625, 14208, 13, 9945, 13, 27530, 13, 22766, 1330, 43301, 7248, 198, 6738, 42463, 1330, 7663, 11, 2558, 198, 6738, 42463, 13, 2411, 323, 1330, 26923, 11, 19081, 198, 6738, 42463, 62, 28241, 14208, 1330, 37770, 32048, 15878, 11, 3...
4.380952
105
import numpy as np import pandas as pd from pandas.tseries.offsets import BDay from functools import partial from pandas.tseries.frequencies import to_offset from backtester.plotter import generateGraph from backtester.state_writer import StateWriter from tensorboardX import SummaryWriter from datetime import datetime ...
[ 11748, 299, 32152, 355, 45941, 198, 11748, 19798, 292, 355, 279, 67, 198, 6738, 19798, 292, 13, 912, 10640, 13, 8210, 1039, 1330, 347, 12393, 198, 6738, 1257, 310, 10141, 1330, 13027, 198, 6738, 19798, 292, 13, 912, 10640, 13, 69, 889...
3.584906
106
import click from planning_system.cli import add_subcommands @click.group() @click.pass_obj def survey(config): """ Survey - related commands. """ pass add_subcommands(survey, __file__, __package__)
[ 11748, 3904, 198, 6738, 5410, 62, 10057, 13, 44506, 1330, 751, 62, 7266, 9503, 1746, 628, 628, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 198, 31, 12976, 13, 8094, 3419, 198, 31, 12976, 13, 6603, 62...
2.494737
95
#!/usr/bin/env python3 """Get the data at path from the provided file. Copyright Notice ---------------- Copyright (C) HealthTensor, Inc - All Rights Reserved Unauthorized copying of this file, via any medium is strictly prohibited Proprietary and confidential """ import sys import yaml if __name__ == '__main_...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 18, 198, 37811, 3855, 262, 1366, 379, 3108, 422, 262, 2810, 2393, 13, 198, 198, 15269, 17641, 198, 1783, 198, 15269, 357, 34, 8, 3893, 51, 22854, 11, 3457, 532, 1439, 6923, 33876, 198, 22...
2.696
375