content
stringlengths
1
1.04M
input_ids
listlengths
1
774k
ratio_char_token
float64
0.38
22.9
token_count
int64
1
774k
from __future__ import absolute_import from datetime import date, datetime from decimal import Decimal import os from django_google_adwords.models import ReportFile, Account, Campaign, AdGroup, \ DailyAccountMetrics, DailyCampaignMetrics, DailyAdGroupMetrics, Ad, \ DailyAdMetrics from django.test.testcases im...
[ 6738, 11593, 37443, 834, 1330, 4112, 62, 11748, 198, 198, 6738, 4818, 8079, 1330, 3128, 11, 4818, 8079, 198, 6738, 32465, 1330, 4280, 4402, 198, 11748, 28686, 198, 198, 6738, 42625, 14208, 62, 13297, 62, 324, 10879, 13, 27530, 1330, 635...
3.58
100
import time from tkinter import * from multiprocessing import Process import threading info = { 'total_time': 60 } flag = [False] if __name__ == '__main__': app = make_app() app.after(0, ui_watcher) app.mainloop()
[ 11748, 640, 198, 6738, 256, 74, 3849, 1330, 1635, 198, 6738, 18540, 305, 919, 278, 1330, 10854, 198, 11748, 4704, 278, 198, 198, 10951, 796, 1391, 198, 220, 220, 220, 705, 23350, 62, 2435, 10354, 3126, 198, 92, 198, 198, 32109, 796, ...
2.505263
95
from .main import MainController from .about import AboutController from .login import LoginController from .student import StudentController from .profile import ProfileController from .password import PasswordController from .grades import GradesController from .sections import SectionsController from .term_selection...
[ 6738, 764, 12417, 1330, 8774, 22130, 198, 6738, 764, 10755, 1330, 7994, 22130, 198, 6738, 764, 38235, 1330, 23093, 22130, 198, 6738, 764, 50139, 1330, 13613, 22130, 198, 6738, 764, 13317, 1330, 13118, 22130, 198, 6738, 764, 28712, 1330, 3...
5
155
# Copyright 2021 Andreas Steck (steck.andi@gmail.com) # # 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, 15069, 33448, 33728, 2441, 694, 357, 4169, 694, 13, 26800, 31, 14816, 13, 785, 8, 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,...
3.431604
424
# -*- coding: utf-8 -*- # Copyright 2019 SAMITorch Authors. All Rights Reserved. # # Licensed under the MIT License; # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # https://opensource.org/licenses/MIT # # Unless required by applicable law or agreed to...
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 2, 15069, 13130, 28844, 2043, 273, 354, 46665, 13, 1439, 6923, 33876, 13, 198, 2, 198, 2, 49962, 739, 262, 17168, 13789, 26, 198, 2, 345, 743, 407, 779, 428, 2393, 2...
4.113514
185
# vim: tabstop=4 shiftwidth=4 softtabstop=4 # Copyright (c) 2010 Citrix Systems, 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/L...
[ 2, 43907, 25, 7400, 11338, 28, 19, 6482, 10394, 28, 19, 2705, 8658, 11338, 28, 19, 198, 198, 2, 220, 220, 220, 15069, 357, 66, 8, 3050, 15792, 8609, 11998, 11, 3457, 13, 198, 2, 198, 2, 220, 220, 220, 49962, 739, 262, 24843, 137...
2.227786
4,693
from subprocess import check_output def frame_rate(file_path): """Use ``ffprobe`` to inspect frame rate of video file @param file_path @return @throw OSError if `file_path` does not exist, or if ``ffprobe`` cannot be run (e.g. not installed) @throw ValueError if frame rate cannot be inferred ...
[ 6738, 850, 14681, 1330, 2198, 62, 22915, 628, 198, 4299, 5739, 62, 4873, 7, 7753, 62, 6978, 2599, 198, 220, 220, 220, 37227, 11041, 7559, 487, 1676, 1350, 15506, 284, 10104, 5739, 2494, 286, 2008, 2393, 628, 220, 220, 220, 2488, 17143...
1.982096
2,290
import torch def anchor_offset(anchor_list, anchor_strides, featmap_sizes): """ Get offest for deformable conv based on anchor shape NOTE: currently support deformable kernel_size=3 and dilation=1 Args: anchor_list (list[list[tensor])): [NI, NLVL, NA, 4] list of multi-level anchors ...
[ 11748, 28034, 628, 198, 4299, 18021, 62, 28968, 7, 3702, 273, 62, 4868, 11, 18021, 62, 2536, 1460, 11, 2218, 8899, 62, 82, 4340, 2599, 198, 220, 220, 220, 37227, 3497, 572, 395, 329, 47577, 540, 3063, 1912, 319, 18021, 5485, 198, 22...
2.054234
1,051
#!/usr/bin/env python3 # Adapted from: https://github.com/jvdsn/crypto-attacks/blob/master/attacks/rc4/fms.py from pwn import * import json from collections import Counter context.log_level = 'info' r = remote('178.62.73.26', 31267) """ Recovers the hidden part of an RC4 key using the Fluhrer-Mantin-Shamir attack. :...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 18, 198, 2, 30019, 276, 422, 25, 3740, 1378, 12567, 13, 785, 14, 73, 85, 9310, 77, 14, 29609, 78, 12, 38458, 14, 2436, 672, 14, 9866, 14, 38458, 14, 6015, 19, 14, 69, 907, 13, 9078, ...
2.513995
393
import conf import workers from db.getters.experiment_groups import get_running_experiment_group from hpsearch.exceptions import ExperimentGroupException from hpsearch.tasks import base from hpsearch.tasks.logger import logger from lifecycles.experiment_groups import ExperimentGroupLifeCycle from options.registry.grou...
[ 11748, 1013, 198, 11748, 3259, 198, 198, 6738, 20613, 13, 1136, 1010, 13, 23100, 3681, 62, 24432, 1330, 651, 62, 20270, 62, 23100, 3681, 62, 8094, 198, 6738, 289, 7752, 998, 13, 1069, 11755, 1330, 29544, 13247, 16922, 198, 6738, 289, ...
2.332468
385
from string import Template main()
[ 6738, 4731, 1330, 37350, 198, 220, 198, 12417, 3419 ]
4
9
import getopt import os import sys import time import argparse import tarfile import numpy as np import pandas as pd from collections import deque import gc import copy import tensorflow as tf from flatland.core.grid import grid4 from flatland.envs.rail_env import RailEnv from flatland.utils.misc import str2bool fr...
[ 11748, 651, 8738, 198, 11748, 28686, 198, 11748, 25064, 198, 11748, 640, 198, 11748, 1822, 29572, 198, 11748, 13422, 7753, 198, 198, 11748, 299, 32152, 355, 45941, 198, 198, 11748, 19798, 292, 355, 279, 67, 198, 6738, 17268, 1330, 390, ...
2.899083
872
from flask import Blueprint from flask_restful import Api from app.api.v1.views.meetups import AllMeetupsApi, SingleMeetupApi from app.api.v1.views.questions import AllQuestionsApi, SingleQuestion from app.api.v1.views.users import AllUsersApi """create variable called api_v1 that defines the blueprint and registers ...
[ 6738, 42903, 1330, 39932, 198, 6738, 42903, 62, 2118, 913, 1330, 5949, 72, 198, 6738, 598, 13, 15042, 13, 85, 16, 13, 33571, 13, 47745, 4739, 1330, 1439, 29318, 4739, 32, 14415, 11, 14206, 29318, 929, 32, 14415, 198, 6738, 598, 13, ...
2.649485
291
from functools import lru_cache from itertools import chain from typing import Sequence, Union from conllu.models import TokenList, TokenTree from scipy.stats import spearmanr import torch import numpy as np import stanza from .id_wrap import id_wrap _SF_PUNCT = {"''", ',', '.', ':', '``', '-LRB-', '-RRB-'} ...
[ 6738, 1257, 310, 10141, 1330, 300, 622, 62, 23870, 198, 6738, 340, 861, 10141, 1330, 6333, 198, 6738, 19720, 1330, 45835, 11, 4479, 198, 198, 6738, 369, 297, 84, 13, 27530, 1330, 29130, 8053, 11, 29130, 27660, 198, 6738, 629, 541, 88,...
2.705036
139
import cv2 import numpy as np from skimage import exposure origin = cv2.imread('generated/images/1-ground.png/diffused/1024tk_0_progress_00000.png') fixed = np.zeros(origin.shape, dtype=origin.dtype) fixed[:,:,0] = cv2.equalizeHist(origin[:,:,0]) fixed[:,:,1] = cv2.equalizeHist(origin[:,:,1]) fixed[:,:,2] = cv2.equal...
[ 11748, 269, 85, 17, 198, 11748, 299, 32152, 355, 45941, 198, 6738, 1341, 9060, 1330, 7111, 198, 198, 47103, 796, 269, 85, 17, 13, 320, 961, 10786, 27568, 14, 17566, 14, 16, 12, 2833, 13, 11134, 14, 26069, 1484, 14, 35500, 30488, 62,...
2.516129
310
#!/usr/bin/env python3 # -*- coding: utf-8 -*- """ Created on Sun Dec 20 15:58:22 2020 @author: ayman """ import torch import torch.nn.functional as F def calc_pg_losses(batch, net, entropy_beta=0.02): """ Calculate Policy and Entropy losses from batch. Parameters ---------- batch : BatchGenerat...
[ 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, 4280, 1160, 1315, 25, 3365, 25, 1828, 12131, 198, 198, 31, 9800, 25, 38762, 805, 19...
2.47451
510
"""Contains the project's version number in ``__version__``.""" import pkg_resources __all__ = ['__version__'] #: The project version string. __version__: str = pkg_resources.require("pymap")[0].version
[ 37811, 4264, 1299, 262, 1628, 338, 2196, 1271, 287, 7559, 834, 9641, 834, 15506, 526, 15931, 198, 198, 11748, 279, 10025, 62, 37540, 198, 198, 834, 439, 834, 796, 37250, 834, 9641, 834, 20520, 198, 198, 2, 25, 383, 1628, 2196, 4731, ...
3.121212
66
# -*- coding: utf-8 -*- import io import random from pathlib import Path import mplfinance as fplt import pandas as pd import requests # Program arguments ticker = 'aapl.us' # use ticker as in stooq.com foresight = 7 # in days hindsight = 30 # in days number_of_data = 1000 # to use in model if __name__ == '_...
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 198, 11748, 33245, 198, 11748, 4738, 198, 6738, 3108, 8019, 1330, 10644, 198, 198, 11748, 285, 489, 69, 14149, 355, 277, 489, 83, 198, 11748, 19798, 292, 355, 279, 67, ...
2.685039
127
import pickle import torch from torch import nn import numpy as np from scipy import linalg from tqdm import tqdm from calc_inception import load_patched_inception_v3 import pdb import os import csv from glob import glob import math from torch.nn import functional as F from matplotlib import pyplot as plt @torch.no_...
[ 11748, 2298, 293, 198, 198, 11748, 28034, 198, 6738, 28034, 1330, 299, 77, 198, 11748, 299, 32152, 355, 45941, 198, 6738, 629, 541, 88, 1330, 300, 1292, 70, 198, 6738, 256, 80, 36020, 1330, 256, 80, 36020, 198, 198, 6738, 42302, 62, ...
2.249015
1,269
import pytest from dicomtrolley.exceptions import DICOMTrolleyException from dicomtrolley.wado import InstanceReference from tests.conftest import set_mock_response from tests.mock_responses import ( MockWadoParameters, WADO_RESPONSE_DICOM, WADO_RESPONSE_INVALID_DICOM, WADO_RESPONSE_INVALID_NON_DICOM, ...
[ 11748, 12972, 9288, 198, 198, 6738, 288, 291, 296, 83, 42639, 13, 1069, 11755, 1330, 360, 2149, 2662, 51, 42639, 16922, 198, 6738, 288, 291, 296, 83, 42639, 13, 86, 4533, 1330, 2262, 590, 26687, 198, 6738, 5254, 13, 1102, 701, 395, ...
2.194485
689
import datetime import time from pymongo import MongoClient import pymongo import logging from archon.config import * import archon.facade as facade import archon.exchange.exchanges as exc from archon.model import models import archon.orderbooks as orderbooks from archon.feeds import cryptocompare from archon.util im...
[ 11748, 4818, 8079, 198, 11748, 640, 198, 6738, 279, 4948, 25162, 1330, 42591, 11792, 198, 11748, 279, 4948, 25162, 198, 11748, 18931, 628, 198, 6738, 3934, 261, 13, 11250, 1330, 1635, 198, 11748, 3934, 261, 13, 38942, 671, 355, 43562, 1...
3.349112
169
# Generated by Django 3.2.13 on 2022-06-09 17:48 from django.db import migrations, models
[ 2, 2980, 515, 416, 37770, 513, 13, 17, 13, 1485, 319, 33160, 12, 3312, 12, 2931, 1596, 25, 2780, 198, 198, 6738, 42625, 14208, 13, 9945, 1330, 15720, 602, 11, 4981, 628 ]
2.875
32
import socket import threading import sys if (len(sys.argv) > 1): client = Client(sys.argv[1], int(sys.argv[2])) else: server = Server() server.run()
[ 11748, 17802, 198, 11748, 4704, 278, 198, 11748, 25064, 198, 198, 361, 357, 11925, 7, 17597, 13, 853, 85, 8, 1875, 352, 2599, 198, 220, 220, 220, 5456, 796, 20985, 7, 17597, 13, 853, 85, 58, 16, 4357, 493, 7, 17597, 13, 853, 85, ...
2.41791
67
import re import pandas as pd from pandas.tseries.offsets import BDay def get_av_security_tickets(df): """ PURE FUNCTION """ assert isinstance(df, pd.DataFrame) mask_ci = (df["AP_SD_CI_ID"].isin([9926, 8696])) description_regex = "(anti)?virus|^vol.?$|pirat(é|e)|malware|(mc)?afee" ...
[ 11748, 302, 201, 198, 11748, 19798, 292, 355, 279, 67, 201, 198, 6738, 19798, 292, 13, 912, 10640, 13, 8210, 1039, 1330, 347, 12393, 201, 198, 201, 198, 201, 198, 201, 198, 201, 198, 4299, 651, 62, 615, 62, 12961, 62, 83, 15970, 7...
2.143443
7,557
from os import system if __name__=="__main__": print(""" _______ _ _______ _______ |__ __(_) |__ __| |__ __| | | _ ___ | | __ _ ___ | | ___ ___ | | | |/ __| | |/ _` |/ __| | |/ _ \ / _ \\ | | | | (...
[ 6738, 28686, 1330, 1080, 628, 628, 628, 198, 198, 361, 11593, 3672, 834, 855, 1, 834, 12417, 834, 1298, 628, 220, 220, 220, 3601, 7203, 15931, 198, 220, 220, 220, 220, 220, 220, 37405, 4808, 220, 220, 220, 220, 220, 220, 220, 220, ...
2.084746
413
N=int(input()) flag=False for i in range(1,10): m=N/i if m.is_integer() and 1<=m<=9: flag=True break print("Yes" if flag else "No")
[ 45, 28, 600, 7, 15414, 28955, 198, 32109, 28, 25101, 198, 1640, 1312, 287, 2837, 7, 16, 11, 940, 2599, 198, 220, 220, 220, 285, 28, 45, 14, 72, 198, 220, 220, 220, 611, 285, 13, 271, 62, 41433, 3419, 290, 352, 27, 28, 76, 27, ...
1.9375
80
# cvae.py is designed to use: "action" or ("action", "target position") as condition. cvae_new.py is designed to use ("target position" and "robot position") as condition from __future__ import print_function, division, absolute_import from torch.autograd import Variable import torch as th import numpy as np import ...
[ 2, 269, 33353, 13, 9078, 318, 3562, 284, 779, 25, 366, 2673, 1, 393, 5855, 2673, 1600, 366, 16793, 2292, 4943, 355, 4006, 13, 269, 33353, 62, 3605, 13, 9078, 318, 3562, 284, 779, 5855, 16793, 2292, 1, 290, 366, 305, 13645, 2292, 4...
2.338553
1,341
import random cnt = 0 # 本质为一次插入排序 if __name__ == '__main__': arr = [] [arr.append(random.randint(-100, 100)) for i in range(random.randint(10000, 10000))] print(arr) shell_sort(arr) print(arr) print(sorted(arr)) print(len(arr)) print(cnt)
[ 11748, 4738, 198, 198, 66, 429, 796, 657, 628, 198, 198, 2, 42164, 105, 164, 112, 101, 10310, 118, 31660, 162, 105, 94, 162, 237, 240, 17739, 98, 162, 236, 240, 41753, 237, 628, 198, 361, 11593, 3672, 834, 6624, 705, 834, 12417, 8...
1.950704
142
## ## @file custom_voc_detection.py ## @brief Custom Pascal VOC Detection Dataset Class ## @author Keitetsu ## @date 2020/05/20 ## @copyright Copyright (c) 2020 Keitetsu ## @par License ## This software is released under the MIT License. ## import os import numpy as np ...
[ 2235, 198, 2235, 2488, 7753, 220, 220, 220, 220, 220, 220, 220, 2183, 62, 18893, 62, 15255, 3213, 13, 9078, 198, 2235, 2488, 65, 3796, 220, 220, 220, 220, 220, 220, 8562, 35163, 569, 4503, 46254, 16092, 292, 316, 5016, 198, 2235, 24...
2.649746
197
''' uses pyOSC package and adapted from code - from nifty / anton.augsburg (https://git.imld.de/imlprojects/niftytransfer/blob/master/src/net/py_osc_server.py) - from pyOSC example (https://gitorious.org/pyosc/devel/source/633c0112318a3519314aa798a552a092566c73c1:examples/knect-rcv.py#L14-15) ''' import types from OSC...
[ 7061, 6, 198, 2664, 12972, 2640, 34, 5301, 198, 392, 16573, 422, 2438, 198, 12, 422, 47803, 1220, 281, 1122, 13, 7493, 30359, 357, 5450, 1378, 18300, 13, 320, 335, 13, 2934, 14, 320, 75, 42068, 14, 77, 24905, 39437, 14, 2436, 672, ...
2.369097
2,414
import copy from typing import Dict from algorithms.configuration.entities.entity import Entity class Obstacle(Entity): """ This is an entity which blocks movement access for the agent. The agent is not allowed to step on it or collide with it. """
[ 11748, 4866, 198, 6738, 19720, 1330, 360, 713, 198, 198, 6738, 16113, 13, 11250, 3924, 13, 298, 871, 13, 26858, 1330, 20885, 628, 198, 4871, 46378, 6008, 7, 32398, 2599, 198, 220, 220, 220, 37227, 198, 220, 220, 220, 770, 318, 281, ...
3.573333
75
# a dictionary of item notes items = { "Bartali Sailboat": ["Buy from Proix. 10 mil"], "Epheria Sailboat": ["Buy on CM or craft from Bartali Sailboat", "Improved Sailboat works for Caravel"], "Epheria Frigate": ["Buy on CM or craft from Bartali Sailboat", "Improved Frigate works for Galleass"], "Epheria Caravel": ...
[ 2, 257, 22155, 286, 2378, 4710, 198, 198, 23814, 796, 1391, 198, 197, 1, 33, 433, 7344, 27783, 24482, 1298, 14631, 14518, 422, 1041, 844, 13, 838, 1465, 33116, 198, 197, 1, 13807, 372, 544, 27783, 24482, 1298, 14631, 14518, 319, 16477...
3.065751
2,038
import sys import os import numpy as np import scipy.sparse as sp from lib.smpl import Smpl from lib.maps import normalize if sys.version_info[0] == 3: import _pickle as pkl else: import cPickle as pkl
[ 11748, 25064, 198, 11748, 28686, 198, 198, 11748, 299, 32152, 355, 45941, 198, 11748, 629, 541, 88, 13, 82, 29572, 355, 599, 198, 198, 6738, 9195, 13, 5796, 489, 1330, 2439, 489, 198, 6738, 9195, 13, 31803, 1330, 3487, 1096, 198, 198,...
2.675
80
# # Autogenerated by Thrift Compiler (0.13.0) # # DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING # # options string: py # from thrift.Thrift import TType, TMessageType, TFrozenDict, TException, TApplicationException from thrift.protocol.TProtocol import TProtocolException from thrift.TRecursive impo...
[ 2, 198, 2, 5231, 519, 877, 515, 416, 16283, 2135, 3082, 5329, 357, 15, 13, 1485, 13, 15, 8, 198, 2, 198, 2, 8410, 5626, 48483, 4725, 48481, 7013, 15986, 311, 11335, 14603, 7013, 35876, 25003, 7013, 15986, 8410, 2751, 198, 2, 198, ...
2.285985
15,326
# Copyright (c) Facebook, Inc. and its affiliates. # All rights reserved. # # This source code is licensed under the license found in the # LICENSE file in the root directory of this source tree. # from .web_view import VizSeqWebView from .data_view import VizSeqDataPageView, DEFAULT_PAGE_SIZE, DEFAULT_PAGE_NO from .d...
[ 2, 15069, 357, 66, 8, 3203, 11, 3457, 13, 290, 663, 29116, 13, 198, 2, 1439, 2489, 10395, 13, 198, 2, 198, 2, 770, 2723, 2438, 318, 11971, 739, 262, 5964, 1043, 287, 262, 198, 2, 38559, 24290, 2393, 287, 262, 6808, 8619, 286, 42...
2.577982
218
import sys import codecs from random import shuffle if __name__ == "__main__": # Usage: python split_train_ensemble.py ../datasets/cp3/oromo/cp3_train.conll ../datasets/cp3/oromo/ 5 fname = sys.argv[1] write_to_folder = sys.argv[2] split_num = int(sys.argv[3]) split(fname, write_to_folder, split_...
[ 11748, 25064, 198, 11748, 40481, 82, 198, 6738, 4738, 1330, 36273, 628, 198, 361, 11593, 3672, 834, 6624, 366, 834, 12417, 834, 1298, 198, 220, 220, 220, 1303, 29566, 25, 21015, 6626, 62, 27432, 62, 1072, 11306, 13, 9078, 11485, 14, 1...
2.347826
138
import pykorbit email = "ceo_jo@gmail.com" password = "mypassword" key = "TVMtMRtcap22CRnFeegege84cNDuTJVmvv9FaGWJTRriY7b8cWKIez7eGGkzan0" secret = "MEasLLFhahGAyUucm7refegEEgpvBfTUe3A2DiMA48o4egegEEv9pBmLUq4e3pM" korbit = pykorbit.Korbit(email, password, key, secret) order = korbit.cancel_order("XRP", "12886793") pr...
[ 11748, 12972, 74, 42594, 198, 198, 12888, 796, 366, 344, 78, 62, 7639, 31, 14816, 13, 785, 1, 198, 28712, 796, 366, 1820, 28712, 1, 198, 2539, 796, 366, 6849, 44, 83, 13599, 83, 11128, 1828, 9419, 77, 37, 1453, 469, 469, 5705, 66,...
1.97619
168
#!/usr/bin/env python # -*- coding: utf-8 -*- """ Virtualchain ~~~~~ copyright: (c) 2014 by Halfmoon Labs, Inc. copyright: (c) 2015 by Blockstack.org This file is part of Virtualchain Virtualchain is free software: you can redistribute it and/or modify it under the terms of the GNU...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 37811, 198, 220, 220, 220, 15595, 7983, 198, 220, 220, 220, 220, 8728, 93, 198, 220, 220, 220, 6634, 25, 357, 66, 8...
2.514335
2,337
import json import pandas as pd def project_raw_twitter_to_text_lang(path_to_raw_data): """ Yield text and lang fields from raw tweets """ with open(path_to_raw_data, 'r') as raw: for line in raw: json_line = json.loads(line) yield { 'text': json_line['d...
[ 11748, 33918, 198, 11748, 19798, 292, 355, 279, 67, 628, 198, 4299, 1628, 62, 1831, 62, 6956, 62, 1462, 62, 5239, 62, 17204, 7, 6978, 62, 1462, 62, 1831, 62, 7890, 2599, 198, 220, 220, 220, 37227, 198, 220, 220, 220, 575, 1164, 24...
2.187097
310
# -*- coding: utf-8 -*- import mysql.connector as mydb conn = mydb.connect( host="localhost", port="3306", user="rhoen", password="pass", database="book" ) # カーソルの作成 cur = conn.cursor() # SLQ文の実行 cur.execute("select * from author where author_id like '%S%'") # 実行結果を取得 rows = cur.fetchall() # 実...
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 198, 11748, 48761, 13, 8443, 273, 355, 616, 9945, 198, 198, 37043, 796, 616, 9945, 13, 8443, 7, 198, 220, 220, 220, 2583, 2625, 36750, 1600, 198, 220, 220, 220, 2493, ...
1.697318
261
"""Lexical analysis base for telegram bots.""" from .message import ( Chat, ChatType, Message, MessageEntity, MessageEntityType, User, ) from .token import ( BotCommandToken, CashtagToken, CommaToken, DotToken, EmailToken, HashtagToken, MentionToken, QuestionToke...
[ 37811, 45117, 605, 3781, 2779, 329, 573, 30536, 29641, 526, 15931, 198, 198, 6738, 764, 20500, 1330, 357, 198, 220, 220, 220, 24101, 11, 198, 220, 220, 220, 24101, 6030, 11, 198, 220, 220, 220, 16000, 11, 198, 220, 220, 220, 16000, ...
2.523179
151
"""Multiclass and multilabel classification strategies. This file implements an one-vs-one multiclass learning algorithm that uses over sampling algorithms and variances of the decision function. """ from __future__ import division import numpy as np from itertools import product from sklearn.multiclass import OneVs...
[ 37811, 15205, 291, 31172, 290, 1963, 346, 9608, 17923, 10064, 13, 198, 198, 1212, 2393, 23986, 281, 530, 12, 14259, 12, 505, 47368, 31172, 4673, 11862, 326, 3544, 198, 2502, 19232, 16113, 290, 1401, 16097, 286, 262, 2551, 2163, 13, 198,...
2.350195
5,891
# -*- coding: utf-8 -*- from odoo import models, fields, api,tools,_ import calendar from datetime import timedelta, date import datetime import re from threading import Timer, Thread #import imp import sys #reload(sys) #sys.setdefaultencoding("utf8") from odoo.exceptions import UserError import logging _logger = loggi...
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 6738, 16298, 2238, 1330, 4981, 11, 7032, 11, 40391, 11, 31391, 11, 62, 198, 11748, 11845, 198, 6738, 4818, 8079, 1330, 28805, 12514, 11, 3128, 198, 11748, 4818, 8079, 19...
3.21374
131
# Generated by Django 2.0.1 on 2018-01-13 14:24 from django.db import migrations, models
[ 2, 2980, 515, 416, 37770, 362, 13, 15, 13, 16, 319, 2864, 12, 486, 12, 1485, 1478, 25, 1731, 198, 198, 6738, 42625, 14208, 13, 9945, 1330, 15720, 602, 11, 4981, 628 ]
2.84375
32
from typing import NamedTuple, Callable add_p = Primitive('add') mul_p = Primitive('mul') neg_p = Primitive("neg") sin_p = Primitive("sin") cos_p = Primitive("cos") reduce_sum_p = Primitive("reduce_sum") greater_p = Primitive("greater") less_p = Primitive("less") transpose_p = Primitive("transpose") broadcast_p = Prim...
[ 6738, 19720, 1330, 34441, 51, 29291, 11, 4889, 540, 198, 198, 2860, 62, 79, 796, 11460, 1800, 10786, 2860, 11537, 198, 76, 377, 62, 79, 796, 11460, 1800, 10786, 76, 377, 11537, 198, 12480, 62, 79, 796, 11460, 1800, 7203, 12480, 4943, ...
2.492524
2,207
import requests import json import os HOUSTON_SERVICE_URL=os.environ['HOUSTON_SERVICE_URL'] url = f"http://{HOUSTON_SERVICE_URL}/api/landingzoneprogressitem/" # Additional headers. headers = {'Content-Type': 'application/json' }
[ 11748, 7007, 198, 11748, 33918, 198, 11748, 28686, 628, 198, 46685, 41924, 62, 35009, 27389, 62, 21886, 28, 418, 13, 268, 2268, 17816, 46685, 41924, 62, 35009, 27389, 62, 21886, 20520, 198, 6371, 796, 277, 1, 4023, 1378, 90, 46685, 4192...
2.752809
89
#-*- coding: utf-8 -*- # from Tkinter import * # 引入模块 # resize函数是用来改变文字大小的,当进度条改变时调用 # def resize(ev=None): # label.config(font='Helvetica -%d bold' % scale.get()) # config函数就是通过设置组件的参数来改变组件的,这里改变的是font字体大小 # top = Tk() # 主窗口 # top.geometry('600x400') # 设置了主窗口的初始大小600x400 # 设置标签字体的初始大小 # label = Label(top, t...
[ 2, 12, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 2, 422, 309, 74, 3849, 1330, 1635, 220, 1303, 10263, 120, 243, 17739, 98, 162, 101, 94, 161, 251, 245, 628, 198, 2, 47558, 49035, 121, 46763, 108, 42468, 18796, 101, ...
2.167418
3,106
#Curso #7 Templates tags from flask import Flask from flask import render_template app = Flask(__name__) #app = Flask(__name__, template_folder = 'prueba_template') #para darle una carpeta en especifico @app.route('/user/<name>') if __name__ == '__main__': app.run(debug = True, host="127.0.0.1", port=9566)
[ 2, 26628, 568, 1303, 22, 5825, 17041, 15940, 198, 198, 6738, 42903, 1330, 46947, 198, 6738, 42903, 1330, 8543, 62, 28243, 198, 198, 1324, 796, 46947, 7, 834, 3672, 834, 8, 198, 198, 2, 1324, 796, 46947, 7, 834, 3672, 834, 11, 11055,...
2.603306
121
from coin.utils.format import format
[ 6738, 10752, 13, 26791, 13, 18982, 1330, 5794, 628, 198 ]
3.9
10
#-*-coding:utf-8-*- # date:2020-05-07 # Author: xiang li from __future__ import print_function import argparse import os import sys import time sys.path.append('./') import torch import torch.nn as nn from models.resnet import resnet18, resnet34, resnet50, resnet101, resnet152 from models.mobilenetv2 import MobileNetV...
[ 2, 12, 9, 12, 66, 7656, 25, 40477, 12, 23, 12, 9, 12, 198, 2, 3128, 25, 42334, 12, 2713, 12, 2998, 198, 2, 6434, 25, 2124, 15483, 7649, 198, 198, 6738, 11593, 37443, 834, 1330, 3601, 62, 8818, 198, 11748, 1822, 29572, 198, 11748...
1.903901
3,153
import numpy as np import typing from typing import Any, List, Text from rasa.nlu.config import RasaNLUModelConfig from rasa.nlu.featurizers import Featurizer from rasa.nlu.tokenizers import Token from rasa.nlu.training_data import Message, TrainingData if typing.TYPE_CHECKING: import mitie from rasa.nlu.constan...
[ 11748, 299, 32152, 355, 45941, 198, 11748, 19720, 198, 6738, 19720, 1330, 4377, 11, 7343, 11, 8255, 198, 198, 6738, 374, 15462, 13, 77, 2290, 13, 11250, 1330, 371, 15462, 32572, 52, 17633, 16934, 198, 6738, 374, 15462, 13, 77, 2290, 1...
2.36087
230
# ------------------------------------------------------------------------- # # Part of the CodeChecker project, under the Apache License v2.0 with # LLVM Exceptions. See LICENSE for license information. # SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception # # ---------------------------------------------------...
[ 2, 16529, 45537, 198, 2, 198, 2, 220, 2142, 286, 262, 6127, 9787, 263, 1628, 11, 739, 262, 24843, 13789, 410, 17, 13, 15, 351, 198, 2, 220, 27140, 15996, 1475, 11755, 13, 4091, 38559, 24290, 329, 5964, 1321, 13, 198, 2, 220, 30628...
4.77381
84
import json import os for language in ['java']: print(language) train,valid,test,codebase=[],[],[], [] for root, dirs, files in os.walk(language+'/final'): for file in files: temp=os.path.join(root,file) if '.jsonl' in temp: if 'train' in temp: ...
[ 11748, 33918, 198, 11748, 28686, 198, 198, 1640, 3303, 287, 37250, 12355, 6, 5974, 198, 220, 220, 220, 3601, 7, 16129, 8, 198, 220, 220, 220, 4512, 11, 12102, 11, 9288, 11, 8189, 8692, 41888, 38430, 38430, 4357, 17635, 198, 220, 220, ...
1.662592
1,227
import os import cv2 import numpy as np
[ 11748, 28686, 198, 11748, 269, 85, 17, 198, 11748, 299, 32152, 355, 45941 ]
3
13
import os ANGEL_BOT_TOKEN = os.environ['ANGEL_BOT_TOKEN'] PLAYERS_FILENAME = os.environ['PLAYERS_FILENAME'] CHAT_ID_JSON = os.environ['CHAT_ID_JSON'] ANGEL_ALIAS = os.environ['ANGEL_ALIAS'] MORTAL_ALIAS = os.environ['MORTAL_ALIAS'] ''' only important for singlebot '''
[ 11748, 28686, 198, 15567, 3698, 62, 33, 2394, 62, 10468, 43959, 796, 28686, 13, 268, 2268, 17816, 15567, 3698, 62, 33, 2394, 62, 10468, 43959, 20520, 198, 31519, 4877, 62, 46700, 1677, 10067, 796, 28686, 13, 268, 2268, 17816, 31519, 487...
2.327586
116
import vkquick as vq app = vq.App() @app.command("ping", "пинг") app.run("$BOT_TOKEN")
[ 11748, 410, 74, 24209, 355, 410, 80, 628, 198, 1324, 796, 410, 80, 13, 4677, 3419, 628, 198, 31, 1324, 13, 21812, 7203, 13886, 1600, 366, 140, 123, 18849, 22177, 140, 111, 4943, 628, 198, 1324, 13, 5143, 7203, 3, 33, 2394, 62, 104...
2
46
#!/usr/bin/env python3 """player module.""" class Player: """Player for Tic Tac Toe.""" def __init__(self, token): """Initialize object.""" self._token = token.upper() def get_token(self): """Return the token of this player.""" return self._token def __repr__(self): ...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 18, 198, 37811, 7829, 8265, 526, 15931, 628, 198, 4871, 7853, 25, 198, 220, 220, 220, 37227, 14140, 329, 309, 291, 26075, 1675, 68, 526, 15931, 628, 220, 220, 220, 825, 11593, 15003, 834, ...
2.503106
161
import torch import os import numpy as np import matplotlib.pyplot as plt from PIL import Image import glob from torchvision import transforms as T from torch.utils.data import DataLoader, Dataset from utils.transforms import DataAugmentation from utils.visualize import image_with_mask_torch from dataset.triplet_sample...
[ 11748, 28034, 198, 11748, 28686, 198, 11748, 299, 32152, 355, 45941, 198, 11748, 2603, 29487, 8019, 13, 9078, 29487, 355, 458, 83, 198, 6738, 350, 4146, 1330, 7412, 198, 11748, 15095, 198, 6738, 28034, 10178, 1330, 31408, 355, 309, 198, ...
1.622285
4,281
import pandas as pd import numpy as np import matplotlib.pyplot as plt from sklearn.linear_model import LinearRegression,Ridge,ElasticNet,ElasticNetCV,LassoCV,SGDRegressor,RidgeCV from collections import defaultdict import json import statsmodels.api as sm from sklearn.preprocessing import StandardScaler, Polyno...
[ 11748, 19798, 292, 355, 279, 67, 220, 220, 198, 11748, 299, 32152, 355, 45941, 220, 220, 198, 11748, 2603, 29487, 8019, 13, 9078, 29487, 355, 458, 83, 220, 220, 198, 6738, 1341, 35720, 13, 29127, 62, 19849, 1330, 44800, 8081, 2234, 11...
1.90659
4,689
import pytest from telliot_core.apps.core import TelliotCore @pytest.mark.asyncio @pytest.mark.asyncio @pytest.mark.asyncio @pytest.mark.asyncio @pytest.mark.asyncio @pytest.mark.asyncio @pytest.mark.asyncio @pytest.mark.asyncio
[ 11748, 12972, 9288, 198, 198, 6738, 1560, 5151, 62, 7295, 13, 18211, 13, 7295, 1330, 14026, 5151, 14055, 628, 198, 31, 9078, 9288, 13, 4102, 13, 292, 13361, 952, 628, 198, 31, 9078, 9288, 13, 4102, 13, 292, 13361, 952, 628, 198, 31,...
2.299065
107
# This test suite relies pytest-djangoapp
[ 2, 770, 1332, 18389, 16507, 12972, 9288, 12, 28241, 14208, 1324, 628 ]
3.583333
12
import argparse from pathlib import Path from tqdm import tqdm import yaml import torchaudio def fixed_length_segmentation( path_to_wavs: str, path_to_segmentation_yaml: str, segment_length: int ) -> None: """ Produces a fixed-length segmentation of a collection of audios with segment-length seconds a...
[ 11748, 1822, 29572, 198, 6738, 3108, 8019, 1330, 10644, 198, 6738, 256, 80, 36020, 1330, 256, 80, 36020, 198, 11748, 331, 43695, 198, 11748, 28034, 24051, 628, 198, 4299, 5969, 62, 13664, 62, 325, 5154, 341, 7, 198, 220, 220, 220, 310...
2.210747
1,191
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import models, migrations import postgres.fields.interval_field import postgres.fields.range_fields import tests.models import postgres.fields import postgres.fields.uuid_field import postgres.operations import uuid import decimal import dj...
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 6738, 11593, 37443, 834, 1330, 28000, 1098, 62, 17201, 874, 198, 198, 6738, 42625, 14208, 13, 9945, 1330, 4981, 11, 15720, 602, 198, 11748, 1281, 34239, 13, 25747, 13, 3...
3.314286
105
from __future__ import absolute_import, division # makes KratosMultiphysics backward compatible with python 2.6 and 2.7 # Import packages import numpy as np ''' This utility contains the classes to perform the Continuation Multilevel Monte Carlo (CMLMC) and the Monte Carlo (MC) algorithms References: M. Pisaroni, S...
[ 6738, 11593, 37443, 834, 1330, 4112, 62, 11748, 11, 7297, 1303, 1838, 509, 10366, 418, 15205, 13323, 23154, 19528, 11670, 351, 21015, 362, 13, 21, 290, 362, 13, 22, 198, 198, 2, 17267, 10392, 198, 11748, 299, 32152, 355, 45941, 628, 1...
2.519287
2,411
import json import os from flask import Flask, render_template, json, current_app as app from covid_data import timer,data_generaion,generator from apscheduler.schedulers.background import BackgroundScheduler app = Flask(__name__) # For debuging app.debug = True sched = BackgroundScheduler(daemon=True) sched.add_j...
[ 11748, 33918, 198, 11748, 28686, 198, 6738, 42903, 1330, 46947, 11, 8543, 62, 28243, 11, 33918, 11, 1459, 62, 1324, 355, 598, 198, 6738, 39849, 312, 62, 7890, 1330, 19781, 11, 7890, 62, 8612, 64, 295, 11, 8612, 1352, 198, 6738, 257, ...
2.656151
317
import logging import pyspark from epsel import ensure_basic_logging LOG_FORMAT = "___ %(name)s %(levelname)s %(message)s" logger = logging.getLogger("job_log_process") @ensure_basic_logging(level=logging.INFO, format=LOG_FORMAT) if __name__ == '__main__': logging.basicConfig(level=logging.INFO, format=LOG_...
[ 11748, 18931, 198, 198, 11748, 279, 893, 20928, 198, 198, 6738, 2462, 741, 1330, 4155, 62, 35487, 62, 6404, 2667, 198, 198, 25294, 62, 21389, 1404, 796, 366, 17569, 4064, 7, 3672, 8, 82, 4064, 7, 5715, 3672, 8, 82, 4064, 7, 20500, ...
2.607692
130
import random import math print(f"-----===== Start =====-----\n") # Problem 1. # A crack team of love scientists from JeUp (a hot new dating site) have devised a way to represent dating profiles as rectangles on a two-dimensional plane. # They need help writing an algorithm to find the intersection of two users' love...
[ 11748, 4738, 198, 11748, 10688, 198, 198, 4798, 7, 69, 1, 30934, 1421, 28, 7253, 29335, 30934, 59, 77, 4943, 198, 198, 2, 20647, 352, 13, 198, 2, 317, 8469, 1074, 286, 1842, 5519, 422, 3852, 4933, 357, 64, 3024, 649, 10691, 2524, ...
2.972304
1,697
#!/usr/bin/env python3 # coding: utf-8 # ---------- # # Data Tools # # ---------- # ### Modules # standard library import os from bisect import bisect_left from os.path import join, normpath import csv import json # dependencies import numpy as np from scipy.signal import savgol_filter # custom code from pupil_code...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 18, 198, 2, 19617, 25, 3384, 69, 12, 23, 198, 198, 2, 24200, 438, 1303, 198, 2, 6060, 20003, 1303, 198, 2, 24200, 438, 1303, 198, 198, 21017, 3401, 5028, 198, 2, 3210, 5888, 198, 11748,...
2.489362
658
""" The `model` module contains code for managing the execution of the simulation. The base class `Model` should be subclassed when creating new model types, such as an SIR or SEIR model. A function is required alongside each model class to run the simulation due to the way that Python objects are passed between proces...
[ 37811, 198, 464, 4600, 19849, 63, 8265, 4909, 2438, 329, 11149, 262, 9706, 286, 198, 1169, 18640, 13, 383, 2779, 1398, 4600, 17633, 63, 815, 307, 47611, 276, 198, 12518, 4441, 649, 2746, 3858, 11, 884, 355, 281, 311, 4663, 393, 7946, ...
2.535316
1,076
""" Runner for a Django Python function """ from __future__ import absolute_import import uuid from ..event import BaseEvent from ..utils import add_data_if_needed from ..constants import EPSAGON_HEADER_TITLE class DjangoRunner(BaseEvent): """ Represents Python Django event runner. """ ORIGIN = 'run...
[ 37811, 198, 49493, 329, 257, 37770, 11361, 2163, 198, 37811, 198, 198, 6738, 11593, 37443, 834, 1330, 4112, 62, 11748, 198, 11748, 334, 27112, 198, 6738, 11485, 15596, 1330, 7308, 9237, 198, 6738, 11485, 26791, 1330, 751, 62, 7890, 62, ...
2.111888
1,001
# 14_2048_autoplay.py # Dieses Script soll mittels Selenium die Website https://play2048.co/ öffnen und # durch ein Bestimmtes Muster von Tasteneingaben das entsprechende Spiel spielen. # https://play2048.co/ # Spielmuster: hoch, rechs, unten, links import os from selenium import webdriver from selenium.webdriver.comm...
[ 2, 1478, 62, 1238, 2780, 62, 2306, 404, 10724, 13, 9078, 198, 2, 360, 444, 274, 12327, 523, 297, 285, 715, 1424, 15300, 47477, 4656, 15887, 3740, 1378, 1759, 1238, 2780, 13, 1073, 14, 6184, 114, 487, 38572, 3318, 198, 2, 288, 2575, ...
2.608696
322
import numpy as np import matplotlib.pyplot as plt import pickle from scipy import sparse import hdbscan from sklearn.cluster import DBSCAN from scipy.spatial.distance import euclidean from fastdtw import fastdtw from collections import Counter from tslearn.clustering import TimeSeriesKMeans, GlobalAlignmentKernelKMean...
[ 11748, 299, 32152, 355, 45941, 198, 11748, 2603, 29487, 8019, 13, 9078, 29487, 355, 458, 83, 198, 11748, 2298, 293, 198, 6738, 629, 541, 88, 1330, 29877, 198, 11748, 289, 9945, 35836, 198, 6738, 1341, 35720, 13, 565, 5819, 1330, 360, ...
3.17094
117
import requests import json import time import pandas as pd import matplotlib.pyplot as plt import deepdish as dd from apis.worldtradingdata_com import WtdsDataSource SYMBOL = "SPCE" PAUSE_TICKER = 60 hist = [] prs = [] ds = WtdsDataSource() for a in range(1): d = ds.get_live("SPCE") p = float(d['data'][0]...
[ 11748, 7007, 198, 11748, 33918, 198, 11748, 640, 198, 11748, 19798, 292, 355, 279, 67, 198, 11748, 2603, 29487, 8019, 13, 9078, 29487, 355, 458, 83, 198, 11748, 2769, 67, 680, 355, 49427, 198, 198, 6738, 2471, 271, 13, 6894, 2213, 498...
2.185022
227
import numpy as np import pandas as pd from sklearn.base import BaseEstimator, TransformerMixin from sklearn.cluster import KMeans """ ###################################################################################### Global functions definitions: ###############################################################...
[ 11748, 299, 32152, 355, 45941, 220, 198, 11748, 19798, 292, 355, 279, 67, 220, 198, 6738, 1341, 35720, 13, 8692, 1330, 7308, 22362, 320, 1352, 11, 3602, 16354, 35608, 259, 198, 6738, 1341, 35720, 13, 565, 5819, 1330, 509, 5308, 504, 1...
2.294444
1,800
from django.urls import reverse from service_catalog.models import RequestState from tests.test_service_catalog.base_test_request import BaseTestRequest AUTHORIZED_STATES = [RequestState.SUBMITTED]
[ 6738, 42625, 14208, 13, 6371, 82, 1330, 9575, 198, 198, 6738, 2139, 62, 9246, 11794, 13, 27530, 1330, 19390, 9012, 198, 6738, 5254, 13, 9288, 62, 15271, 62, 9246, 11794, 13, 8692, 62, 9288, 62, 25927, 1330, 7308, 14402, 18453, 628, 19...
3.241935
62
#!/usr/bin/env python3 # -*- coding: utf-8 -*- """ @author: Pieter Huycke email: pieter.huycke@ugent.be GitHub: phuycke """ #%% res = add_frac((1, 2), (4, 2)) print(res) res = multiply_frac((1, 3), (1, 4)) print(res)
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 18, 198, 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 628, 198, 37811, 198, 31, 9800, 25, 36548, 263, 367, 4669, 66, 365, 198, 12888, 25, 220, 220, 279, 1155, 263, 13, 71...
1.973913
115
import subprocess import logging if __name__ == '__main__': print(select_gpu())
[ 11748, 850, 14681, 198, 11748, 18931, 198, 198, 361, 11593, 3672, 834, 6624, 705, 834, 12417, 834, 10354, 198, 220, 220, 220, 3601, 7, 19738, 62, 46999, 28955 ]
3
28
# importing the Kratos Library import KratosMultiphysics as KM import KratosMultiphysics.ShallowWaterApplication as SW ## Import base class file from KratosMultiphysics.ShallowWaterApplication.shallow_water_base_solver import ShallowWaterBaseSolver
[ 2, 33332, 262, 509, 10366, 418, 10074, 198, 11748, 509, 10366, 418, 15205, 13323, 23154, 355, 46646, 198, 11748, 509, 10366, 418, 15205, 13323, 23154, 13, 2484, 12154, 19184, 23416, 355, 12672, 198, 198, 2235, 17267, 2779, 1398, 2393, 198...
3.571429
70
list_of_concepts = [ ['Python', 'Python is a Programming Language'], ['For Loop', 'For Loops allow you to iterate over lists'], ['Lists', 'Lists are sequences of data'] ] print generate_HTML_list(list_of_concepts)
[ 201, 198, 4868, 62, 1659, 62, 43169, 82, 796, 685, 37250, 37906, 3256, 705, 37906, 318, 257, 30297, 15417, 6, 4357, 201, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220,...
2.120301
133
from ipsframework.taskManager import TaskManager import pytest import shutil from unittest import mock @pytest.mark.skipif(not shutil.which('mpirun'), reason="missing mpirun")
[ 6738, 220, 2419, 30604, 13, 35943, 13511, 1330, 15941, 13511, 198, 11748, 12972, 9288, 198, 11748, 4423, 346, 198, 6738, 555, 715, 395, 1330, 15290, 628, 628, 198, 31, 9078, 9288, 13, 4102, 13, 48267, 361, 7, 1662, 4423, 346, 13, 4758...
3.22807
57
import numpy as np import librosa from sklearn.preprocessing import MinMaxScaler # Ordered Chromagram Magnitude Indexes # OCMI normalized # uses relative distances to the most prominent index # delta-ocmi measures the difference between two frames # key-insensitive
[ 11748, 299, 32152, 355, 45941, 198, 11748, 9195, 4951, 64, 198, 6738, 1341, 35720, 13, 3866, 36948, 1330, 1855, 11518, 3351, 36213, 198, 198, 2, 14230, 1068, 18255, 6713, 14872, 3984, 12901, 274, 198, 198, 2, 24775, 8895, 39279, 198, 2,...
3.898551
69
# @lc app=leetcode id=676 lang=python3 # # [676] Implement Magic Dictionary # # https://leetcode.com/problems/implement-magic-dictionary/description/ # # algorithms # Medium (55.97%) # Likes: 864 # Dislikes: 168 # Total Accepted: 56K # Total Submissions: 99.9K # Testcase Example: '["MagicDictionary", "buildDict"...
[ 2, 2488, 44601, 598, 28, 293, 316, 8189, 4686, 28, 42548, 42392, 28, 29412, 18, 198, 2, 198, 2, 685, 42548, 60, 48282, 6139, 28261, 198, 2, 198, 2, 3740, 1378, 293, 316, 8189, 13, 785, 14, 1676, 22143, 14, 320, 26908, 12, 32707, ...
2.353571
1,120
import abc import copy from collections import OrderedDict import logging import typing import numpy as np from smac.tae.execute_ta_run import StatusType from smac.runhistory.runhistory import RunHistory, RunKey, RunValue from smac.configspace import impute_inactive_values import smac.epm.base_imputor from smac.utils...
[ 11748, 450, 66, 198, 11748, 4866, 198, 6738, 17268, 1330, 14230, 1068, 35, 713, 198, 11748, 18931, 198, 11748, 19720, 198, 198, 11748, 299, 32152, 355, 45941, 198, 198, 6738, 895, 330, 13, 83, 3609, 13, 41049, 62, 8326, 62, 5143, 1330...
2.715867
271
import os import time import argparse import datetime from src.shared import eyetracking BASE_OUTPUT_DIR = '/home/basile/tests' if __name__ == "__main__": parsed = parse_args() start_eyetracker(parsed)
[ 11748, 28686, 198, 11748, 640, 198, 11748, 1822, 29572, 198, 11748, 4818, 8079, 198, 6738, 12351, 13, 28710, 1330, 1926, 21879, 5430, 198, 198, 33, 11159, 62, 2606, 7250, 3843, 62, 34720, 796, 31051, 11195, 14, 12093, 576, 14, 41989, 6,...
2.730769
78
from .multi_bracket_validation import multi_bracket_validation import pytest # __init__
[ 6738, 764, 41684, 62, 1671, 8317, 62, 12102, 341, 1330, 5021, 62, 1671, 8317, 62, 12102, 341, 198, 11748, 12972, 9288, 628, 198, 2, 11593, 15003, 834, 198 ]
3.214286
28
import abc import PyQt5.QtCore from .observer import Observer
[ 11748, 450, 66, 201, 198, 201, 198, 11748, 9485, 48, 83, 20, 13, 48, 83, 14055, 201, 198, 6738, 764, 672, 15388, 1330, 27058, 201, 198, 201, 198, 201, 198, 201, 198, 201, 198 ]
2.205882
34
from typing import Dict, Optional from django_elasticsearch_dsl import fields
[ 6738, 19720, 1330, 360, 713, 11, 32233, 198, 198, 6738, 42625, 14208, 62, 417, 3477, 12947, 62, 67, 6649, 1330, 7032, 628, 628, 628 ]
3.5
24
""" C{fstypes.py} module contains the implementation of feature value types as defined in the FUF manual (v5.2) """ from sexp import * from nltk.featstruct import CustomFeatureValue, UnificationFailure class FeatureTypeTable(object): """ The C{FeatureTypeTable} maintains relationships between a given feat...
[ 37811, 198, 34, 90, 69, 301, 9497, 13, 9078, 92, 8265, 4909, 262, 7822, 286, 3895, 198, 8367, 3858, 355, 5447, 287, 262, 376, 36820, 10107, 357, 85, 20, 13, 17, 8, 198, 37811, 198, 6738, 1714, 79, 1330, 1635, 198, 6738, 299, 2528,...
2.534181
1,887
# Copyright 2020 Nagoya University (Tomoki Hayashi) # Apache 2.0 (http://www.apache.org/licenses/LICENSE-2.0) """Text-to-speech ESPnet model.""" from contextlib import contextmanager from distutils.version import LooseVersion from typing import Dict from typing import Optional from typing import Tuple import torch...
[ 2, 15069, 12131, 15196, 23790, 2059, 357, 13787, 18228, 9075, 12144, 8, 198, 2, 220, 24843, 362, 13, 15, 220, 357, 4023, 1378, 2503, 13, 43073, 13, 2398, 14, 677, 4541, 14, 43, 2149, 24290, 12, 17, 13, 15, 8, 198, 198, 37811, 8206...
2.102845
5,834
import logging import paho.mqtt.client as mqtt import config logger = logging.getLogger(__name__) def on_connect(client, userdata, rc): """ The callback for when the client receives a CONNACK response from the server. Subscribing in on_connect() means that if we lose the connection and reconnect the...
[ 11748, 18931, 198, 11748, 279, 17108, 13, 76, 80, 926, 13, 16366, 355, 285, 80, 926, 198, 198, 11748, 4566, 198, 198, 6404, 1362, 796, 18931, 13, 1136, 11187, 1362, 7, 834, 3672, 834, 8, 628, 198, 4299, 319, 62, 8443, 7, 16366, 11...
3.110345
145
import json from pathlib import Path from pytest import fixture @fixture
[ 11748, 33918, 198, 6738, 3108, 8019, 1330, 10644, 198, 198, 6738, 12972, 9288, 1330, 29220, 628, 198, 31, 69, 9602, 198 ]
3.619048
21
from diagrams import Diagram from diagrams.aws.network import ELB from diagrams.aws.compute import EC2 from diagrams.aws.database import RDS with Diagram("Groupd Worker", direction="TB"): ELB("lb") >> [ EC2("worker1"), EC2("worker2"), EC2("worker3"), EC2("worker4"), EC2("worker5"), ] >> RDS("ev...
[ 6738, 37067, 1330, 6031, 6713, 198, 6738, 37067, 13, 8356, 13, 27349, 1330, 17852, 33, 198, 6738, 37067, 13, 8356, 13, 5589, 1133, 1330, 13182, 17, 198, 6738, 37067, 13, 8356, 13, 48806, 1330, 371, 5258, 198, 198, 4480, 6031, 6713, 72...
2.739496
119
from importlib import reload import os import pandas as pd import numpy as np import gzbuilderspirals.pipeline as gzbp import gzbuilderspirals.metric as gzbm import gzbuilderspirals as gzb import lib.galaxy_utilities as gu gzb = reload(gzb) gzbp = reload(gzbp) gzbm = reload(gzbm) id_list = np.loadtxt('lib/subject-id-...
[ 6738, 1330, 8019, 1330, 18126, 198, 11748, 28686, 198, 11748, 19798, 292, 355, 279, 67, 198, 11748, 299, 32152, 355, 45941, 198, 11748, 308, 89, 50034, 4063, 874, 13, 79, 541, 4470, 355, 308, 14969, 79, 198, 11748, 308, 89, 50034, 406...
2.33526
692
import scluster if __name__ == '__main__': test()
[ 11748, 264, 565, 5819, 198, 220, 220, 198, 198, 361, 11593, 3672, 834, 6624, 705, 834, 12417, 834, 10354, 198, 220, 1332, 3419, 198 ]
2.333333
24
y1 = [ 8.40562e-01, 8.45339e-01, 8.50050e-01, 8.54752e-01, 8.59376e-01, 8.64032e-01, 8.68617e-01, 8.73157e-01, 8.77641e-01] y2 = [ 8.59901e-01, 8.59751e-01, 8.59621e-01, 8.59521e-01, 8.59376e-01, 8.59251e-01, 8.59144e-01, 8.59030e-01, 8.58911e-01] y3 = [ 8.40052e-01, 8.44962e-01, 8.49800e-01, 8.546...
[ 198, 198, 88, 16, 796, 685, 807, 13, 1821, 43918, 68, 12, 486, 11, 220, 807, 13, 2231, 29626, 68, 12, 486, 11, 220, 807, 13, 4059, 1120, 68, 12, 486, 11, 220, 807, 13, 4051, 43665, 68, 12, 486, 11, 220, 807, 13, 3270, 32128, ...
1.757353
544
import numpy as np class LinearSVM(LinearClassifier): """ A subclass that uses the Multiclass SVM loss function """ def svm_loss_vectorized(W, X, y, reg): """ Structured SVM loss function, vectorized implementation. Inputs and outputs are the same as svm_loss_naive. """ loss = 0.0 dW = np.zeros(W.sha...
[ 11748, 299, 32152, 355, 45941, 628, 198, 4871, 44800, 50, 15996, 7, 14993, 451, 9487, 7483, 2599, 198, 220, 37227, 317, 47611, 326, 3544, 262, 7854, 291, 31172, 311, 15996, 2994, 2163, 37227, 628, 198, 4299, 264, 14761, 62, 22462, 62, ...
2.562305
642
""" Test nothing, so that ``tox`` does not exit with an error code """ def test_nothing(): """Tests that Python is running""" pass
[ 37811, 198, 14402, 2147, 11, 523, 326, 7559, 83, 1140, 15506, 857, 407, 8420, 351, 281, 4049, 2438, 198, 37811, 628, 198, 4299, 1332, 62, 22366, 33529, 198, 220, 220, 220, 37227, 51, 3558, 326, 11361, 318, 2491, 37811, 198, 220, 220, ...
3.155556
45
import deepchem as dc import numpy as np import pandas as pd import optuna from functools import reduce import cytoxnet.dataprep.io as io import cytoxnet.dataprep.dataprep as dataprep import cytoxnet.dataprep.featurize as feat from cytoxnet.models.models import ToxModel import cytoxnet.models.opt as opt ## !!!!!!temp...
[ 11748, 2769, 15245, 355, 30736, 198, 11748, 299, 32152, 355, 45941, 198, 11748, 19798, 292, 355, 279, 67, 198, 11748, 2172, 9613, 198, 6738, 1257, 310, 10141, 1330, 4646, 198, 198, 11748, 27104, 1140, 3262, 13, 19608, 499, 7856, 13, 952...
2.245455
1,100
""" Name: Pre-processing class file Description: This file contains pre-processing classes. Version: [release][3.2] Source url: https://github.com/OPHoperHPO/image-background-remove-tool Modified by humanova (humanova)[https://github.com/humanova]. Changes: 1. Removed method_detect function. 2. Moved __init__ i...
[ 37811, 201, 198, 5376, 25, 3771, 12, 36948, 1398, 2393, 201, 198, 11828, 25, 770, 2393, 4909, 662, 12, 36948, 6097, 13, 201, 198, 14815, 25, 685, 20979, 7131, 18, 13, 17, 60, 201, 198, 7416, 19016, 25, 3740, 1378, 12567, 13, 785, ...
2.278409
3,696
import os import sys sys.path.append('/home-4/yhe23@jhu.edu/work/yuan/tools/python_lib/lib/python2.7/site-packages') import os import sys sys.setrecursionlimit(10000) sys.path.append('/home-4/yhe23@jhu.edu/work/yuan/tools/python_lib/lib/python2.7/site-packages') sys.path.append('/home-4/yhe23@jhu.edu/work/yuan/tools/py...
[ 11748, 28686, 198, 11748, 25064, 198, 17597, 13, 6978, 13, 33295, 10786, 14, 11195, 12, 19, 14, 88, 258, 1954, 31, 73, 13415, 13, 15532, 14, 1818, 14, 88, 7258, 14, 31391, 14, 29412, 62, 8019, 14, 8019, 14, 29412, 17, 13, 22, 14, ...
2.299356
932