content
stringlengths
1
1.04M
input_ids
listlengths
1
774k
ratio_char_token
float64
0.38
22.9
token_count
int64
1
774k
#!/usr/bin/env python # -*- coding: utf-8 -*- import numpy as np from pytest import fixture, yield_fixture from unittest.mock import patch from beyond.dates.date import Date from beyond.dates.eop import Eop from beyond.frames.iau2010 import _earth_orientation, _sideral, _planets, _xys, _xysxy2 @fixture @yield_fix...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 198, 11748, 299, 32152, 355, 45941, 198, 6738, 12972, 9288, 1330, 29220, 11, 7800, 62, 69, 9602, 198, 6738, 555, 715, ...
2.727273
121
# -*- coding: utf-8 """String utilities""" __all__ = ( "startswith_token", "prefix", "strip", "lstrip", "rstrip", "contains_ordered" ) import operator if __debug__: import collections from warnings import warn from .itertools import map_pairs def startswith_token(s, prefix, separators=None): """Tests if a st...
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 198, 37811, 10100, 20081, 37811, 198, 198, 834, 439, 834, 796, 357, 198, 197, 1, 9688, 2032, 342, 62, 30001, 1600, 366, 40290, 1600, 366, 36311, 1600, 366, 75, 36311, 1600, 366, 81, 3631...
2.702899
276
import itertools from graphtools import *
[ 11748, 340, 861, 10141, 198, 6738, 4823, 31391, 1330, 1635, 628, 628, 628, 628 ]
3.5
14
import joblib import pandas as pd from lightgbm import LGBMRegressor as lgbr train = pd.read_csv('../data/train_.csv') X = train.drop('SalePrice', axis=1) y = train.SalePrice model = lgbr(bagging_fraction=0.8, bagging_freq=5, feature_fraction=0.5, min_child_samples=91, min_split_gain=0.9, n_estimators=300...
[ 11748, 1693, 8019, 198, 11748, 19798, 292, 355, 279, 67, 198, 6738, 1657, 70, 20475, 1330, 406, 4579, 44, 8081, 44292, 355, 300, 70, 1671, 198, 198, 27432, 796, 279, 67, 13, 961, 62, 40664, 10786, 40720, 7890, 14, 27432, 44807, 40664,...
2.163009
319
class dna(): """Instantiate a DNA object""" def genSequence(self, N): """Generate a DNA sequence of length N in the subset [G-A-T-C]""" import random # Securities if type(N) != int: raise TypeError("N must be an integer") if N < 0: rai...
[ 198, 4871, 288, 2616, 33529, 198, 220, 220, 220, 37227, 49933, 9386, 257, 7446, 2134, 37811, 628, 220, 220, 220, 220, 220, 220, 220, 220, 198, 220, 220, 220, 825, 2429, 44015, 594, 7, 944, 11, 399, 2599, 198, 220, 220, 220, 220, 2...
2.160079
1,012
''' Created on Dec 2, 2016 @author: lubo ''' import pytest from scgv.models.model import DataModel @pytest.fixture @pytest.fixture @pytest.fixture
[ 7061, 6, 198, 41972, 319, 4280, 362, 11, 1584, 198, 198, 31, 9800, 25, 300, 549, 78, 198, 7061, 6, 198, 11748, 12972, 9288, 198, 6738, 629, 70, 85, 13, 27530, 13, 19849, 1330, 6060, 17633, 628, 198, 31, 9078, 9288, 13, 69, 9602, ...
2.52459
61
#!/usr/bin/env python2 # -*- coding: utf-8 -*- text_encrypt = "".join(map(lambda x: chr(x), eval( "[" + open("059-cipher1.txt", "Ur").readline()[:-1] + "]" ))) posible_pass = [chr(i) + chr(j) + chr(k) for i in range(97,123) for j in range(97,123) for k in range(97,123)] max_num_space = 0 for i in range(len(posible_p...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 17, 198, 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 198, 5239, 62, 12685, 6012, 796, 366, 1911, 22179, 7, 8899, 7, 50033, 2124, 25, 442, 81, 7, 87, 828, 5418, 7, ...
2.264925
268
# -*- coding: utf-8 -*- """ Voter spatials models with variations of voter behavior of 1. Voter Error -- Voters with error in regret/distance calculation 2. Voter Ignorance -- Voters with limited memory and will only evaluate a finite number of candidates. 3. Min/Max voters -- Voters who min/max their scored bal...
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 37811, 198, 198, 53, 19543, 15246, 8231, 4981, 351, 13991, 286, 10765, 4069, 286, 198, 198, 16, 13, 46226, 13047, 1377, 35689, 351, 4049, 287, 13721, 14, 30246, 17952, 1...
1.967296
2,171
# -*- coding: utf-8 -*- """ test_build_gettext ~~~~~~~~~~~~~~~~~~ Test the build process with gettext builder with the test root. :copyright: Copyright 2010 by the Sphinx team, see AUTHORS. :license: BSD, see LICENSE for details. """ import gettext import os from subprocess import Popen, PIPE fr...
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 37811, 198, 220, 220, 220, 1332, 62, 11249, 62, 1136, 5239, 198, 220, 220, 220, 220, 27156, 4907, 628, 220, 220, 220, 6208, 262, 1382, 1429, 351, 651, 5239, 27098, 351...
2.949686
159
from . import model
[ 6738, 764, 1330, 2746, 628 ]
4.2
5
import numpy as np import os import scipy.misc as misc
[ 11748, 299, 32152, 355, 45941, 198, 11748, 28686, 198, 11748, 629, 541, 88, 13, 44374, 355, 12747 ]
3.176471
17
from api.models import Employee import json import requests from django.conf import settings from rest_framework import viewsets, status from rest_framework.decorators import action from rest_framework.permissions import AllowAny, IsAuthenticated from rest_framework.response import Response from rest_framework.views ...
[ 6738, 40391, 13, 27530, 1330, 36824, 198, 11748, 33918, 198, 11748, 7007, 198, 6738, 42625, 14208, 13, 10414, 1330, 6460, 198, 198, 6738, 1334, 62, 30604, 1330, 5009, 1039, 11, 3722, 198, 6738, 1334, 62, 30604, 13, 12501, 273, 2024, 133...
3.746725
229
# coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for # license information. # # Code generated by Microsoft (R) AutoRest Code Generator. # Changes ...
[ 2, 19617, 28, 40477, 12, 23, 198, 2, 16529, 35937, 198, 2, 15069, 357, 66, 8, 5413, 10501, 13, 1439, 2489, 10395, 13, 198, 2, 49962, 739, 262, 17168, 13789, 13, 4091, 13789, 13, 14116, 287, 262, 1628, 6808, 329, 198, 2, 5964, 1321...
3.94362
337
import pytest import numpy as np from sklearn.preprocessing import normalize from whatlies.language import SpacyLanguage from whatlies.transformers import Noise, AddRandom, Normalizer, Umap, Tsne, Pca from whatlies.transformers._transformer import Transformer, SklearnTransformer words = [ "prince", "princess...
[ 11748, 12972, 9288, 198, 198, 11748, 299, 32152, 355, 45941, 198, 6738, 1341, 35720, 13, 3866, 36948, 1330, 3487, 1096, 198, 198, 6738, 644, 13508, 13, 16129, 1330, 1338, 1590, 32065, 198, 6738, 644, 13508, 13, 35636, 364, 1330, 30964, ...
1.953333
900
#!/usr/bin/env python """ :Author Patrik Valkovic :Created 17.08.2017 14:39 :Licence MIT Part of grammpy """ from unittest import TestCase, main from grammpy import * from grammpy.transforms import ContextFree if __name__ == '__main__': main()
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 37811, 198, 25, 13838, 9606, 74, 569, 971, 17215, 198, 25, 41972, 1596, 13, 2919, 13, 5539, 1478, 25, 2670, 198, 25, 26656, 594, 17168, 198, 7841, 286, 14599, 3149, 88, 198, 198, 378...
2.78022
91
import sys import re from bs4 import BeautifulSoup
[ 11748, 25064, 198, 11748, 302, 198, 6738, 275, 82, 19, 1330, 23762, 50, 10486, 198 ]
3.4
15
from brownie import accounts, chain, reverts, Wei import json import time TAP_BASE = 1 TAP_PROFIT = 0
[ 6738, 7586, 494, 1330, 5504, 11, 6333, 11, 302, 24040, 11, 29341, 198, 11748, 33918, 198, 11748, 640, 198, 198, 51, 2969, 62, 33, 11159, 796, 352, 198, 51, 2969, 62, 4805, 19238, 2043, 796, 657, 198 ]
2.783784
37
from django.core.management.base import BaseCommand, CommandError from django.db import ProgrammingError from aggregator.models import * from django.conf import settings import time from datetime import datetime import prestodb
[ 6738, 42625, 14208, 13, 7295, 13, 27604, 13, 8692, 1330, 7308, 21575, 11, 9455, 12331, 198, 6738, 42625, 14208, 13, 9945, 1330, 30297, 12331, 198, 6738, 13262, 1352, 13, 27530, 1330, 1635, 198, 6738, 42625, 14208, 13, 10414, 1330, 6460, ...
4.017241
58
import re import subprocess import threading from .logger import Logger from .server_codes import ExitCode logger = Logger(__name__).logger def _extract_run_time(string): """ extract the runtime that we wrote as the last line in the stderr stream supplied in string :param string: the stderr stream. last...
[ 11748, 302, 198, 11748, 850, 14681, 198, 11748, 4704, 278, 198, 198, 6738, 764, 6404, 1362, 1330, 5972, 1362, 198, 6738, 764, 15388, 62, 40148, 1330, 29739, 10669, 198, 198, 6404, 1362, 796, 5972, 1362, 7, 834, 3672, 834, 737, 6404, 1...
2.616495
485
from test.utils.test_api_resource import TestAPIResource
[ 198, 6738, 1332, 13, 26791, 13, 9288, 62, 15042, 62, 31092, 1330, 6208, 2969, 4663, 274, 1668, 198 ]
3.222222
18
import functools import pathlib import tempfile from typing import Callable, Optional from PyQt6.QtCore import QFileInfo, QSettings, Qt from PyQt6.QtGui import QAction, QIcon from PyQt6.QtWidgets import (QApplication, QDockWidget, QFileDialog, QGridLayout, QLabel, QMainWindow, QMenu, ...
[ 11748, 1257, 310, 10141, 198, 11748, 3108, 8019, 198, 11748, 20218, 7753, 198, 6738, 19720, 1330, 4889, 540, 11, 32233, 198, 198, 6738, 9485, 48, 83, 21, 13, 48, 83, 14055, 1330, 1195, 8979, 12360, 11, 1195, 26232, 11, 33734, 198, 673...
2.814016
371
batch_size = 4000 #256 test_batch_size = 8 max_train_epoch = 100 display_steps = 200 eval_steps = 10000 #4000 #2000 max_decoding_length= 30 filename_prefix = "processed." input_dir = 'temp/run_query_response_bpe/data' vocab_file = input_dir + '/processed.vocab.pickle'
[ 43501, 62, 7857, 796, 30123, 1303, 11645, 198, 9288, 62, 43501, 62, 7857, 796, 807, 198, 198, 9806, 62, 27432, 62, 538, 5374, 796, 1802, 198, 13812, 62, 20214, 796, 939, 198, 198, 18206, 62, 20214, 796, 33028, 1303, 27559, 1303, 11024...
2.676471
102
import numpy as np import random as rd #--- auxiliar function ---# #--- cube class (in this case, a 2x2x2) ---# #--- initializing the cube in it's solved form ---# #--- printing the colors of cube faces ---# #--- defining moves in clock or counterclock wise ---# #--- scrambling the...
[ 11748, 299, 32152, 355, 45941, 198, 11748, 4738, 355, 374, 67, 198, 198, 2, 6329, 27506, 4797, 2163, 11420, 2, 198, 198, 2, 6329, 23441, 1398, 357, 259, 428, 1339, 11, 257, 362, 87, 17, 87, 17, 8, 11420, 2, 198, 220, 220, 220, 2...
2.837398
123
# Copyright (C) 6/11/20 RW Bunney # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # This program is distributed in the...
[ 2, 15069, 357, 34, 8, 718, 14, 1157, 14, 1238, 33212, 28515, 1681, 198, 198, 2, 770, 1430, 318, 1479, 3788, 25, 345, 460, 17678, 4163, 340, 290, 14, 273, 13096, 198, 2, 340, 739, 262, 2846, 286, 262, 22961, 3611, 5094, 13789, 355,...
3.420779
385
import torch from torch.utils.data import DataLoader from src.model.mapsed import MAPSED from src.model.vae.conv_vae import ConvVAE from src.utils.calculate_seq_loss import calculate_seq_loss from src.utils.load_data import load_seq_data, normalize_data_tensor, recover_data_tensor import numpy as np import pandas as pd...
[ 11748, 28034, 198, 6738, 28034, 13, 26791, 13, 7890, 1330, 6060, 17401, 198, 6738, 12351, 13, 19849, 13, 76, 28361, 1330, 34645, 50, 1961, 198, 6738, 12351, 13, 19849, 13, 33353, 13, 42946, 62, 33353, 1330, 34872, 11731, 36, 198, 6738, ...
2.2513
1,154
from .data_manager import DataManager from .data_manager import MultiDomainDataManager
[ 6738, 764, 7890, 62, 37153, 1330, 6060, 13511, 198, 6738, 764, 7890, 62, 37153, 1330, 15237, 43961, 6601, 13511, 198 ]
4.35
20
from django.contrib.auth.mixins import LoginRequiredMixin from django.views.generic import CreateView from django.views.generic import DeleteView from django.views.generic import DetailView from django.views.generic import ListView from django.views.generic import UpdateView from .forms import CompanyForm from .models...
[ 6738, 42625, 14208, 13, 3642, 822, 13, 18439, 13, 19816, 1040, 1330, 23093, 37374, 35608, 259, 198, 6738, 42625, 14208, 13, 33571, 13, 41357, 1330, 13610, 7680, 198, 6738, 42625, 14208, 13, 33571, 13, 41357, 1330, 23520, 7680, 198, 6738, ...
3.873418
158
# Copyright 2016 The Chromium Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. import mock import unittest from analysis.analysis_testcase import AnalysisTestCase from analysis.crash_report import CrashReport from analysis.linear.chang...
[ 2, 15069, 1584, 383, 18255, 1505, 46665, 13, 1439, 2489, 10395, 13, 198, 2, 5765, 286, 428, 2723, 2438, 318, 21825, 416, 257, 347, 10305, 12, 7635, 5964, 326, 460, 307, 198, 2, 1043, 287, 262, 38559, 24290, 2393, 13, 198, 198, 11748...
3.030806
844
import csv import os import pickle import shutil import time from multiprocessing import Pipe, Process from pdb import set_trace as TT from shutil import copyfile import re from timeit import default_timer as timer import numpy as np def reversed_lines(file): "Generate the lines of file in reverse order." part...
[ 11748, 269, 21370, 198, 11748, 28686, 198, 11748, 2298, 293, 198, 11748, 4423, 346, 198, 11748, 640, 198, 6738, 18540, 305, 919, 278, 1330, 36039, 11, 10854, 198, 6738, 279, 9945, 1330, 900, 62, 40546, 355, 26653, 198, 6738, 4423, 346, ...
2.586751
317
from django.conf.urls import url, include from django.urls import reverse from . import views urlpatterns = [ url(r'^identity/verify/$', views.verify_identity, name='verify_identity'), ]
[ 6738, 42625, 14208, 13, 10414, 13, 6371, 82, 1330, 19016, 11, 2291, 198, 6738, 42625, 14208, 13, 6371, 82, 1330, 9575, 198, 198, 6738, 764, 1330, 5009, 198, 198, 6371, 33279, 82, 796, 685, 198, 220, 220, 220, 19016, 7, 81, 6, 61, ...
2.823529
68
"""This script moves resources and exports from the top level of the repo into the corresponding folders within the Python package. Resource files and exports are only checked into version control at the top level and are copied into the package by setup.py upon installation. If a user clones this repo with the intent...
[ 37811, 1212, 4226, 6100, 4133, 290, 15319, 422, 262, 1353, 1241, 286, 262, 29924, 656, 198, 1169, 11188, 24512, 1626, 262, 11361, 5301, 13, 198, 198, 26198, 3696, 290, 15319, 389, 691, 10667, 656, 2196, 1630, 379, 262, 1353, 198, 5715, ...
2.924731
465
import plotly.offline as py import plotly.graph_objs as go data = [go.Bar(x=['JSON', 'XML'], y=[26.2, 77.3])] layout = go.Layout( title='JSON vs XML', yaxis=dict( title='KB', titlefont=dict( family='Courier New, monospace', size=18, color='#7f7f7f' )...
[ 11748, 7110, 306, 13, 2364, 1370, 355, 12972, 198, 11748, 7110, 306, 13, 34960, 62, 672, 8457, 355, 467, 198, 198, 7890, 796, 685, 2188, 13, 10374, 7, 87, 28, 17816, 40386, 3256, 705, 55, 5805, 6, 4357, 331, 41888, 2075, 13, 17, 1...
1.906716
268
#!/usr/bin/env python3 # """ Demonstrate generating a USAN notation on Fusion. """ # # import os import sys #import pdb ; pdb.set_trace() #web3fusion from web3fsnpy import Fsn # Remember to set your environment variables to run this test # e.g. export FSN_PRIVATE_KEY=123456789123456789ABCDEF linkToChain...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 18, 198, 2, 198, 37811, 198, 7814, 23104, 15453, 257, 1294, 1565, 33274, 319, 21278, 13, 220, 198, 37811, 198, 2, 198, 2, 198, 11748, 28686, 198, 11748, 25064, 198, 2, 11748, 279, 9945, 2...
2.526027
730
# Copyright 2019 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # https://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, ...
[ 2, 15069, 13130, 3012, 11419, 198, 2, 198, 2, 49962, 739, 262, 24843, 13789, 11, 10628, 362, 13, 15, 357, 1169, 366, 34156, 15341, 198, 2, 345, 743, 407, 779, 428, 2393, 2845, 287, 11846, 351, 262, 13789, 13, 198, 2, 921, 743, 733...
3.891892
148
import discord from discord.ext import commands import sys import mysql.connector sys.path.insert(1, '../') from config import * sys.path.insert(1, '../constants') from colors import * from constants import * #MySQL stuff mydb = mysql.connector.connect( host= sql.host, user= sql.user, passwo...
[ 11748, 36446, 198, 6738, 36446, 13, 2302, 1330, 9729, 198, 198, 11748, 25064, 198, 11748, 48761, 13, 8443, 273, 628, 198, 17597, 13, 6978, 13, 28463, 7, 16, 11, 705, 40720, 11537, 198, 6738, 4566, 1330, 1635, 198, 17597, 13, 6978, 13,...
2.567164
201
s = Solution() print s.longestConsecutive([100, 4, 200, 1, 3, 2]) print s.longestConsecutive([1, 2, 3])
[ 198, 198, 82, 796, 28186, 3419, 198, 4798, 264, 13, 6511, 395, 3103, 4552, 425, 26933, 3064, 11, 604, 11, 939, 11, 352, 11, 513, 11, 362, 12962, 198, 4798, 264, 13, 6511, 395, 3103, 4552, 425, 26933, 16, 11, 362, 11, 513, 12962, ...
2.355556
45
from .exchanges._json import JsonExchange from .exchanges._xml import XmlExchange from .exchange import Exchange from .auth import Auth from .mock import mocker,Mocker,MockMixin from .error import *
[ 6738, 764, 1069, 36653, 13557, 17752, 1330, 449, 1559, 3109, 3803, 198, 6738, 764, 1069, 36653, 13557, 19875, 1330, 1395, 4029, 3109, 3803, 198, 6738, 764, 1069, 3803, 1330, 12516, 198, 6738, 764, 18439, 1330, 26828, 198, 6738, 764, 76, ...
3.372881
59
import sublime import sublime_plugin import datetime import re import regex from pathlib import Path import os import fnmatch import OrgExtended.orgparse.node as node from OrgExtended.orgparse.sublimenode import * import OrgExtended.orgutil.util as util import OrgExtended.orgutil.navigation as nav import OrgExtended...
[ 11748, 41674, 198, 11748, 41674, 62, 33803, 198, 11748, 4818, 8079, 198, 11748, 302, 198, 11748, 40364, 198, 6738, 3108, 8019, 1330, 10644, 198, 11748, 28686, 198, 11748, 24714, 15699, 198, 11748, 1471, 70, 11627, 1631, 13, 2398, 29572, 1...
2.103081
1,785
# 01 f = open("input.txt", mode='r') min = 0 for line in f.readlines(): num = int(line) if min < num: min = num f2 = open("output.txt", mode='w') print(min, file=f2) f.close() f2.close()
[ 2, 5534, 201, 198, 69, 796, 1280, 7203, 15414, 13, 14116, 1600, 4235, 11639, 81, 11537, 201, 198, 1084, 796, 657, 201, 198, 1640, 1627, 287, 277, 13, 961, 6615, 33529, 201, 198, 220, 220, 220, 997, 796, 493, 7, 1370, 8, 201, 198, ...
2.038095
105
java_keyword_set = { 'abstract', 'assert', 'boolean', 'break', 'byte', 'case', 'catch', 'char', 'class', 'const', 'continue', 'default', 'do', 'double', 'else', 'enum', 'extends', 'final', 'finally', 'float', 'for', 'goto', 'if'...
[ 12355, 62, 2539, 4775, 62, 2617, 796, 1391, 198, 220, 220, 220, 705, 397, 8709, 3256, 198, 220, 220, 220, 705, 30493, 3256, 198, 220, 220, 220, 705, 2127, 21052, 3256, 198, 220, 220, 220, 705, 9032, 3256, 198, 220, 220, 220, 705, ...
1.893333
375
# Copyright 1999-2021 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, 1238, 2481, 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, ...
3.706897
232
#!/usr/bin/env python # -*- coding: utf-8 -*- """ Tests for ProgArchives service. """ if __name__ == "__main__": from mixins import FetchMixin else: from .mixins import FetchMixin from six import u from unittest import TestCase, main ########################################################################...
[ 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, 51, 3558, 329, 1041, 70, 19895, 1083, 2139, 13, 198, 37811, 628, 198, 361, 11593, 3672, 834, 6624, 366, 8...
2.479381
388
#!/usr/bin/python # -*- coding: utf-8 -*- """ Created on Tue Dec 15 18:02:25 2015 @author: a.mester """ #import numpy import math import string def m2pt( m_value ): "meter to pt" #m2pt = 2.835270768e3*m_value m2pt = 1e3 * m_value # m2mm - update 2020 return m2pt def deg2rad( deg_value ): "de...
[ 2, 48443, 14629, 14, 8800, 14, 29412, 198, 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 37811, 198, 41972, 319, 30030, 4280, 1315, 1248, 25, 2999, 25, 1495, 1853, 198, 198, 31, 9800, 25, 257, 13, 6880, 353, 198, ...
2.201117
179
""" So, for each module mass, calculate its fuel and add it to the total. Then, treat the fuel amount you just calculated as the input mass and repeat the process, continuing until a fuel requirement is zero or negative. """ assert calculate_fuels_fuel(14) == 2 assert calculate_fuels_fuel(1969) == 966 assert calcul...
[ 37811, 198, 2396, 11, 329, 1123, 8265, 2347, 11, 15284, 663, 5252, 290, 751, 340, 284, 262, 2472, 13, 220, 198, 6423, 11, 2190, 262, 5252, 2033, 345, 655, 10488, 355, 262, 5128, 2347, 290, 9585, 262, 1429, 11, 220, 198, 18487, 4250,...
3.228758
153
from extract_topicword import ExtractTopicWord text_for_test = [ '明日は元気に研究しに行く予定だ.', '電気通信大学は良い大学だ.', '数学の成績が良い.' ] if __name__ == '__main__': main()
[ 6738, 7925, 62, 26652, 4775, 1330, 29677, 33221, 26449, 628, 198, 5239, 62, 1640, 62, 9288, 796, 685, 198, 6, 23626, 236, 33768, 98, 31676, 17739, 225, 36365, 245, 28618, 163, 254, 242, 163, 102, 114, 22180, 28618, 26193, 234, 31917, ...
1.330508
118
#!/usr/bin/env python3 """ SCRIPT: semivar.py Contains common functions used by both fit_semivariogram.py and plot_semivariogram.py. REVISION HISTORY: 20 Nov 2020: Eric Kemp. Initial specification. """ # Standard library import configparser import os import sys # Other libraries import numpy as np #---------------...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 18, 198, 37811, 198, 6173, 46023, 25, 5026, 452, 283, 13, 9078, 198, 198, 4264, 1299, 2219, 5499, 973, 416, 1111, 4197, 62, 43616, 35460, 21857, 13, 9078, 290, 198, 29487, 62, 43616, 35460,...
2.707937
1,890
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.conf.urls import url from synapsesuggestor.control import ( treenode_association as node_assoc, synapse_detection as syn_det, workflow, analysis, training_data ) app_name = 'synapsesuggestor' urlpatterns = [] # synapse detection endpoi...
[ 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, 10414, 13, 6371, 82, 1330, 19016, 198, 198, 6738, 6171, 45903, 29212, 273, ...
2.446053
760
import subprocess import logging import os logger = logging.getLogger('mainapp.log') # Opening console on start if __name__ == '__main__': launcher()
[ 11748, 850, 14681, 201, 198, 11748, 18931, 201, 198, 11748, 28686, 201, 198, 201, 198, 201, 198, 6404, 1362, 796, 18931, 13, 1136, 11187, 1362, 10786, 12417, 1324, 13, 6404, 11537, 201, 198, 201, 198, 201, 198, 201, 198, 2, 25522, 862...
2.536232
69
"""Parse the energies from Turner, 2004 to rna.py.""" from os import path DIR = path.dirname(path.realpath(__file__)) DIR_DATA = path.join(DIR, "..", "data") DE = path.join(DIR_DATA, "rna.dangle.txt") # input files DE_DH = path.join(DIR_DATA, "rna.dangle.dh.txt") LOOP = path.join(DIR_DATA, "rna.loop.txt"...
[ 37811, 10044, 325, 262, 27598, 422, 15406, 11, 5472, 284, 374, 2616, 13, 9078, 526, 15931, 201, 198, 201, 198, 6738, 28686, 1330, 3108, 201, 198, 201, 198, 34720, 796, 3108, 13, 15908, 3672, 7, 6978, 13, 5305, 6978, 7, 834, 7753, 83...
2.02815
2,167
# This Source Code Form is subject to the terms of the Mozilla Public # License, v. 2.0. If a copy of the MPL was not distributed with this # file, You can obtain one at http://mozilla.org/MPL/2.0/. from marionette.by import By from gaiatest import GaiaTestCase from gaiatest.apps.browser.app import Browser
[ 2, 770, 8090, 6127, 5178, 318, 2426, 284, 262, 2846, 286, 262, 29258, 5094, 198, 2, 13789, 11, 410, 13, 362, 13, 15, 13, 1002, 257, 4866, 286, 262, 4904, 43, 373, 407, 9387, 351, 428, 198, 2, 2393, 11, 921, 460, 7330, 530, 379, ...
3.273684
95
import os import argparse from douzero.evaluation.simulation import evaluate if __name__ == '__main__': #测试农民 # parser = argparse.ArgumentParser( # 'Dou Dizhu Evaluation') # parser.add_argument('--landlord', type=str, # default='baselines/ADP/landlord.ckpt') # parser....
[ 11748, 28686, 220, 198, 11748, 1822, 29572, 198, 198, 6738, 2255, 22570, 13, 18206, 2288, 13, 14323, 1741, 1330, 13446, 198, 198, 361, 11593, 3672, 834, 6624, 705, 834, 12417, 834, 10354, 628, 220, 220, 220, 1303, 38184, 233, 46237, 243...
2.115849
2,650
import datetime from unittest.mock import patch import pytest import _fake_service import tusky_snowflake @pytest.fixture() @patch("_fake_service.tusky_snowflake", tusky_snowflake.mock.new_snowflake_service()) @pytest.mark.asyncio @patch("_fake_service.tusky_snowflake", tusky_snowflake.mock.new_snowflake_s...
[ 11748, 4818, 8079, 198, 6738, 555, 715, 395, 13, 76, 735, 1330, 8529, 198, 198, 11748, 12972, 9288, 198, 198, 11748, 4808, 30706, 62, 15271, 198, 11748, 256, 42431, 62, 82, 2197, 47597, 628, 198, 31, 9078, 9288, 13, 69, 9602, 3419, ...
2.564626
147
import pygame as pg from settings import *
[ 11748, 12972, 6057, 355, 23241, 198, 6738, 6460, 1330, 1635, 628 ]
4
11
import socket import os HOST = 'irc.twitch.tv' PORT = 6667 NAME = 'squat_bot' PASS = '' CHANNEL = 'thebasementintern' CONNECT_MESSAGE = 'Come on ladies move those muscles!' CHEERS = [ 'cheer', 'Kappa', 'DansGame', 'EleGiggle', 'TriHard', 'Kreygasm', '4Head', 'SwiftRage', 'NotLikeThis', 'FailFish', 'VoHiYo...
[ 11748, 17802, 201, 198, 11748, 28686, 201, 198, 201, 198, 39, 10892, 796, 705, 1980, 13, 31844, 13, 14981, 6, 201, 198, 15490, 796, 718, 28933, 201, 198, 20608, 796, 705, 16485, 265, 62, 13645, 6, 201, 198, 47924, 796, 10148, 201, 1...
2.125691
724
import django_tables2 as tables from .models import ScrapeJob from django.utils.html import format_html
[ 11748, 42625, 14208, 62, 83, 2977, 17, 355, 8893, 198, 6738, 764, 27530, 1330, 1446, 13484, 33308, 198, 6738, 42625, 14208, 13, 26791, 13, 6494, 1330, 5794, 62, 6494, 198 ]
3.466667
30
"""Contains a simple class for storing image data.""" from typing import Optional, Sequence import numpy as np from .gpu import get_gpu_info, get_device, get_image_method class Image: """A simple class to store NumPy/CuPy image data and metadata.""" gpu_info = get_gpu_info() def __init__( self...
[ 37811, 4264, 1299, 257, 2829, 1398, 329, 23069, 2939, 1366, 526, 15931, 198, 198, 6738, 19720, 1330, 32233, 11, 45835, 198, 198, 11748, 299, 32152, 355, 45941, 198, 6738, 764, 46999, 1330, 651, 62, 46999, 62, 10951, 11, 651, 62, 25202, ...
2.188177
1,015
import FWCore.ParameterSet.Config as cms candidateChargeBTagComputer = cms.ESProducer("CandidateChargeBTagESProducer", useCondDB = cms.bool(False), gbrForestLabel = cms.string(""), weightFile = cms.FileInPath('RecoBTag/Combined/data/ChargeBTag_4sep_2016.weights.xml.gz'), useAdaBoost = cms.bool(True), ...
[ 11748, 48849, 14055, 13, 36301, 7248, 13, 16934, 355, 269, 907, 198, 198, 46188, 20540, 50044, 19313, 363, 34556, 796, 269, 907, 13, 1546, 11547, 2189, 7203, 41572, 20540, 50044, 19313, 363, 1546, 11547, 2189, 1600, 198, 220, 220, 220, ...
2.459119
159
from .dataset import EventDataset, BalancedEventDataset from .utils import collate, get_train_validation_test __all__ = [ "EventDataset", "collate", "BalancedEventDataset", "get_train_validation_test" ]
[ 6738, 764, 19608, 292, 316, 1330, 8558, 27354, 292, 316, 11, 38984, 9237, 27354, 292, 316, 198, 6738, 764, 26791, 1330, 2927, 378, 11, 651, 62, 27432, 62, 12102, 341, 62, 9288, 198, 198, 834, 439, 834, 796, 685, 198, 220, 220, 220, ...
2.55814
86
import cv2 import imutils import numpy as np MODEL_PATH = r"models/enet-model.net" NET_INPUT = (1024, 512) RED = [255, 0, 0] ORANGE = [255, 165, 0] YELLOW = [255, 255, 0] GREEN = [0, 255, 0] BLUE = [0, 0, 255] INDIGO = [75, 0, 130] VIOLET = [238, 130, 238] BLACK = [0, 0, 0] GRAY = [127, 127, 127] WHITE = [255, 255, 2...
[ 11748, 269, 85, 17, 198, 11748, 545, 26791, 198, 11748, 299, 32152, 355, 45941, 198, 198, 33365, 3698, 62, 34219, 796, 374, 1, 27530, 14, 268, 316, 12, 19849, 13, 3262, 1, 198, 12884, 62, 1268, 30076, 796, 357, 35500, 11, 22243, 8, ...
2.102079
529
import sys import logging from RestrictedPython import compile_restricted from RestrictedPython import safe_builtins logging.basicConfig(level=logging.DEBUG, format='%(asctime)s - %(name)s - %(levelname)s - %(message)s') logger = logging.getLogger('DC') logger.setLevel(logging.DEBUG)
[ 11748, 25064, 198, 11748, 18931, 198, 6738, 8324, 20941, 37906, 1330, 17632, 62, 49343, 198, 6738, 8324, 20941, 37906, 1330, 3338, 62, 18780, 1040, 628, 198, 6404, 2667, 13, 35487, 16934, 7, 5715, 28, 6404, 2667, 13, 30531, 11, 5794, 11...
3.096774
93
import requests response = requests.get('https://google.com') print(f'response status code was {response.status_code}')
[ 11748, 7007, 198, 198, 26209, 796, 7007, 13, 1136, 10786, 5450, 1378, 13297, 13, 785, 11537, 198, 198, 4798, 7, 69, 821, 2777, 2591, 3722, 2438, 373, 1391, 26209, 13, 13376, 62, 8189, 92, 11537, 198 ]
3.388889
36
import pytest from src.macrozero import MacroZero from src.modules import PSO_PIN from src.modules.pso import PSO_COMMAND_PSO
[ 11748, 12972, 9288, 198, 6738, 12351, 13, 20285, 305, 22570, 1330, 42755, 28667, 198, 6738, 12351, 13, 18170, 1330, 6599, 46, 62, 44032, 198, 6738, 12351, 13, 18170, 13, 79, 568, 1330, 6599, 46, 62, 9858, 44, 6981, 62, 3705, 46, 628 ]
3.02381
42
import typing import heapq if __name__ == "__main__": main()
[ 11748, 19720, 201, 198, 11748, 24575, 80, 201, 198, 201, 198, 201, 198, 201, 198, 361, 11593, 3672, 834, 6624, 366, 834, 12417, 834, 1298, 201, 198, 220, 220, 220, 1388, 3419, 201, 198 ]
2.205882
34
#!/usr/bin/env python import os def to_csv(self, dir_path, **kwargs): """ Write each table in this set to a separate CSV in a given directory. See :meth:`.Table.to_csv` for additional details. :param dir_path: Path to the directory to write the CSV files to. """ if not os.path.e...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 198, 11748, 28686, 628, 198, 4299, 284, 62, 40664, 7, 944, 11, 26672, 62, 6978, 11, 12429, 46265, 22046, 2599, 198, 220, 220, 220, 37227, 198, 220, 220, 220, 19430, 1123, 3084, 287, ...
2.382775
209
'''simulation.py Simulation script for model_v003.py which imports fitted parameters k1 and k4 from parameter_estimation.py and curated kinetic constant for k7 from data_aggregation.py.''' from model_v003 import antimony_str import tellurium as te import matplotlib.pyplot as plt from data_aggregation import k7 plt.sty...
[ 7061, 6, 14323, 1741, 13, 9078, 198, 198, 8890, 1741, 4226, 329, 2746, 62, 85, 11245, 13, 9078, 543, 17944, 18235, 10007, 198, 74, 16, 290, 479, 19, 422, 11507, 62, 395, 18991, 13, 9078, 290, 36768, 37892, 6937, 329, 479, 22, 198, ...
3.103189
533
""" 全体的なテスト """ import os import pathlib import shutil from src.converter import file_conveter from src.converter.logger import Logger INPUT_ROOT_DIR = pathlib.Path("./test_input") OUTPUT_ROOT_DIR = pathlib.Path("./test_output") file_conveter.logger = Logger().get_logger() def test_convert_all(): """ コンバ...
[ 37811, 198, 17739, 101, 19526, 241, 21410, 26945, 24336, 43302, 198, 37811, 198, 198, 11748, 28686, 198, 11748, 3108, 8019, 198, 11748, 4423, 346, 198, 198, 6738, 12351, 13, 1102, 332, 353, 1330, 2393, 62, 1102, 303, 353, 198, 6738, 123...
1.889113
1,488
from flask import Blueprint, Response, request, abort, session, redirect, url_for, flash, render_template from ambvis import globals from ambvis.hw import motor, MotorError from ambvis.config import Config from ambvis.logger import log, debug from ambvis.decorators import public_route cfg = Config() bp = Blueprint('s...
[ 6738, 42903, 1330, 39932, 11, 18261, 11, 2581, 11, 15614, 11, 6246, 11, 18941, 11, 19016, 62, 1640, 11, 7644, 11, 8543, 62, 28243, 198, 198, 6738, 4915, 4703, 1330, 15095, 874, 198, 6738, 4915, 4703, 13, 36599, 1330, 5584, 11, 12533, ...
3.526786
112
from utils.mylog import timer from models.lgb_skl_trainer import LGB_Skl_Trainer from models.lgb_trainer import LGB_Trainer from models.xgb_trainer import XGB_Trainer
[ 6738, 3384, 4487, 13, 1820, 6404, 1330, 19781, 198, 6738, 4981, 13, 75, 22296, 62, 8135, 75, 62, 2213, 10613, 1330, 406, 4579, 62, 15739, 75, 62, 2898, 10613, 198, 6738, 4981, 13, 75, 22296, 62, 2213, 10613, 1330, 406, 4579, 62, 289...
2.8
60
import math import torch import torch.nn as nn import torch.nn.functional as F from pytorch_utils import interpolate def init_layer(layer, nonlinearity='leaky_relu'): """Initialize a Linear or Convolutional layer. """ nn.init.kaiming_uniform_(layer.weight, nonlinearity=nonlinearity) if hasattr(layer, '...
[ 11748, 10688, 198, 198, 11748, 28034, 198, 11748, 28034, 13, 20471, 355, 299, 77, 198, 11748, 28034, 13, 20471, 13, 45124, 355, 376, 198, 198, 6738, 12972, 13165, 354, 62, 26791, 1330, 39555, 378, 628, 198, 4299, 2315, 62, 29289, 7, 2...
2.190972
288
# -*- coding: utf-8 -*- import spyns.algorithms.metropolis
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 198, 11748, 599, 2047, 82, 13, 282, 7727, 907, 13, 4164, 25986, 198 ]
2.222222
27
from __future__ import print_function import os, re, sys from ete3 import Tree target_tree = sys.argv[1] #map tip IDs to domain tip_to_domain = {} inh = open("genomemetadata.tsv") for line in inh: fields = re.split("\t", line.rstrip()) tip_to_domain[fields[0]] = fields[21] inh.close() num_arch = 0 num_bact = 0 tre...
[ 6738, 11593, 37443, 834, 1330, 3601, 62, 8818, 198, 11748, 28686, 11, 302, 11, 25064, 198, 6738, 304, 660, 18, 1330, 12200, 198, 198, 16793, 62, 21048, 796, 25064, 13, 853, 85, 58, 16, 60, 198, 2, 8899, 8171, 32373, 284, 7386, 198, ...
2.4
415
# coding:UTF-8 from django.shortcuts import render_to_response from django.http import HttpResponseNotFound from django.core.exceptions import ObjectDoesNotExist from tech.models import ArticleModel, ArticleReadNumber from django.db.models import F import json def get_labels(obj): """ 获取标签列表 :param labe...
[ 2, 19617, 25, 48504, 12, 23, 628, 198, 6738, 42625, 14208, 13, 19509, 23779, 1330, 8543, 62, 1462, 62, 26209, 198, 6738, 42625, 14208, 13, 4023, 1330, 367, 29281, 31077, 3673, 21077, 198, 6738, 42625, 14208, 13, 7295, 13, 1069, 11755, ...
2.443182
176
import sqlite3 import pandas as pd import altair as alt from datetime import date # Establish Connection con= sqlite3.connect(r'../archive.db') cur = con.cursor() # Max Date df = pd.read_sql("""SELECT MAX(date(created_at)) as end_date FROM tweets WHERE (nu...
[ 11748, 44161, 578, 18, 198, 11748, 19798, 292, 355, 279, 67, 198, 11748, 5988, 958, 355, 5988, 198, 6738, 4818, 8079, 1330, 3128, 198, 198, 2, 10062, 17148, 26923, 198, 1102, 28, 44161, 578, 18, 13, 8443, 7, 81, 6, 40720, 17474, 13,...
1.774086
602
""" BookmarkTranscript model to represent the user_transcript_view By: Tom Orth """ from app.database.entity import Entity class BookmarkTranscript(Entity): """ BookmarkTranscript Entity Class """ def __init__(self): """ Instantiate the object """ self.user_id = -1 ...
[ 37811, 198, 10482, 4102, 8291, 6519, 2746, 284, 2380, 262, 2836, 62, 7645, 6519, 62, 1177, 198, 198, 3886, 25, 4186, 47664, 198, 37811, 198, 6738, 598, 13, 48806, 13, 26858, 1330, 20885, 198, 4871, 4897, 4102, 8291, 6519, 7, 32398, 25...
2.550218
687
from clustering_algorithms import CLARA, PAM, get_initial_points from data_loaders import load_data from timer import Timer from visualizers import plot_data # FILENAME = "datasets/artificial/sizes3.arff" FILENAME = "datasets/artificial/zelnik4.arff" # FILENAME = "datasets/artificial/xclara.arff" # FILENAME = "dataset...
[ 6738, 32966, 1586, 62, 282, 7727, 907, 1330, 7852, 24401, 11, 350, 2390, 11, 651, 62, 36733, 62, 13033, 198, 6738, 1366, 62, 2220, 364, 1330, 3440, 62, 7890, 198, 6738, 19781, 1330, 5045, 263, 198, 6738, 5874, 11341, 1330, 7110, 62, ...
2.642599
277
# -*- coding: utf-8 -*- """ --- Day 14: Disk Defragmentation --- Cut and pasted the knot hash script from day 10. When I first tackled this problem I omitted some details from the day 10 implementation and ran into errors. It was the intent of the contest designer to use the prior method including the inputs an...
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 201, 198, 37811, 201, 198, 6329, 3596, 1478, 25, 31664, 2896, 22562, 14374, 11420, 201, 198, 201, 198, 26254, 290, 1613, 276, 262, 29654, 12234, 4226, 422, 1110, 838, 13, 164...
3.491228
342
print ''' This is a ver 4.0 of the Garbage Can Model (Cohen, March, Olsen, 1972) This model allows cycling over all scenarios and 100 iterations and over parameter space. This would be the final version of the GCM. ----------------------------- Maciej Workiewicz 2014 ''' import random as rnd import numpy as np impor...
[ 4798, 705, 7061, 198, 1212, 318, 257, 3326, 604, 13, 15, 286, 262, 7164, 13866, 1680, 9104, 357, 7222, 831, 11, 2805, 11, 39148, 11, 16101, 8, 198, 1212, 2746, 3578, 16259, 625, 477, 13858, 198, 392, 1802, 34820, 290, 625, 11507, 22...
1.835045
10,027
from flask import blueprints cfps_bp = blueprints.Blueprint("cfps", __name__) from . import cli # noqa isort:skip
[ 6738, 42903, 1330, 4171, 17190, 198, 198, 12993, 862, 62, 46583, 796, 4171, 17190, 13, 14573, 4798, 7203, 12993, 862, 1600, 11593, 3672, 834, 8, 198, 198, 6738, 764, 1330, 537, 72, 220, 1303, 645, 20402, 318, 419, 25, 48267, 198 ]
2.853659
41
import tensorflow as tf assert tf.__version__[0] == '2' AUTOTUNE = tf.data.experimental.AUTOTUNE # Initialize components of the model # Define the forward function # Includes preactivation # Initialize components of the model # Define the forward function
[ 11748, 11192, 273, 11125, 355, 48700, 198, 198, 30493, 48700, 13, 834, 9641, 834, 58, 15, 60, 6624, 705, 17, 6, 198, 39371, 2394, 41884, 796, 48700, 13, 7890, 13, 23100, 9134, 13, 39371, 2394, 41884, 198, 220, 220, 220, 1303, 20768, ...
3.229885
87
# # Copyright (c) 2017 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.0 # # Unless required by applicable law or agreed to...
[ 2, 198, 2, 15069, 357, 66, 8, 2177, 8180, 10501, 198, 2, 198, 2, 49962, 739, 262, 24843, 13789, 11, 10628, 362, 13, 15, 357, 1169, 366, 34156, 15341, 198, 2, 345, 743, 407, 779, 428, 2393, 2845, 287, 11846, 351, 262, 13789, 13, ...
3.052154
1,323
#!/usr/bin/env python # -*- coding: utf-8 -*- u""" The module implements routines to model the polarization of optical fields and can be used to calculate the effects of polarization optical elements on the fields. - Jones vectors. - Stokes vectors. - Jones matrices. - Mueller matrices. Examples -------- We calcul...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 84, 37811, 198, 464, 8265, 23986, 31878, 284, 2746, 262, 42704, 286, 18480, 7032, 198, 392, 460, 307, 973, 284, 15284, ...
1.676215
11,625
import warnings from phi import struct from phi import math @struct.definition()
[ 11748, 14601, 198, 198, 6738, 872, 72, 1330, 2878, 198, 6738, 872, 72, 1330, 10688, 628, 198, 31, 7249, 13, 46758, 3419, 198 ]
3.652174
23
from app import db, app from app.util import dump_datetime from werkzeug.security import generate_password_hash, check_password_hash
[ 6738, 598, 1330, 20613, 11, 598, 198, 6738, 598, 13, 22602, 1330, 10285, 62, 19608, 8079, 198, 6738, 266, 9587, 2736, 1018, 13, 12961, 1330, 7716, 62, 28712, 62, 17831, 11, 2198, 62, 28712, 62, 17831, 628, 628, 198 ]
3.512821
39
from django import forms from django.db import models from django.contrib import admin from django.conf import settings from django.utils.html import format_html from zenslackchat.models import SlackApp from zenslackchat.models import ZendeskApp from zenslackchat.models import PagerDutyApp from zenslackchat.models imp...
[ 6738, 42625, 14208, 1330, 5107, 198, 6738, 42625, 14208, 13, 9945, 1330, 4981, 198, 6738, 42625, 14208, 13, 3642, 822, 1330, 13169, 198, 6738, 42625, 14208, 13, 10414, 1330, 6460, 198, 6738, 42625, 14208, 13, 26791, 13, 6494, 1330, 5794, ...
2.543027
1,348
from django.shortcuts import render, redirect from django.views import View from django.views.generic import CreateView, DetailView, TemplateView from django.http import JsonResponse, HttpResponse from django.urls import reverse from .models import PaymentProfile, Card, Voucher, Order, Charge from accounts.mixins impo...
[ 6738, 42625, 14208, 13, 19509, 23779, 1330, 8543, 11, 18941, 198, 6738, 42625, 14208, 13, 33571, 1330, 3582, 198, 6738, 42625, 14208, 13, 33571, 13, 41357, 1330, 13610, 7680, 11, 42585, 7680, 11, 37350, 7680, 198, 6738, 42625, 14208, 13, ...
3.866667
90
import unittest from liveproxy.argparser import ip_address
[ 11748, 555, 715, 395, 198, 198, 6738, 2107, 36436, 13, 853, 48610, 1330, 20966, 62, 21975, 628 ]
3.588235
17
import random import statistics as stat import battle import model import parameters as params from logger import logger
[ 11748, 4738, 198, 11748, 7869, 355, 1185, 198, 198, 11748, 3344, 198, 11748, 2746, 198, 11748, 10007, 355, 42287, 198, 6738, 49706, 1330, 49706, 628, 628, 198 ]
4.666667
27
# cqltext.py # Copyright 2016 Roger Marsh # Licence: See LICENCE (BSD licence) """Widget to display a Chess Query Language (ChessQL) statement. ChessQL statements obey the syntax published for CQL version 6.0.1 (by Gady Costeff). """ # The previous CQL syntax partially supported was version 5.1 found at: # https://w...
[ 2, 269, 13976, 5239, 13, 9078, 198, 2, 15069, 1584, 13637, 9786, 198, 2, 10483, 594, 25, 4091, 38559, 18310, 357, 21800, 17098, 8, 198, 198, 37811, 38300, 284, 3359, 257, 25774, 43301, 15417, 357, 7376, 824, 9711, 8, 2643, 13, 198, ...
2.031953
3,599
import re from toscaparser.nodetemplate import NodeTemplate from . import helper, requester from .exceptions import TkStackException from .helper import CONST, Logger
[ 11748, 302, 198, 198, 6738, 284, 1416, 499, 28198, 13, 77, 375, 316, 368, 6816, 1330, 19081, 30800, 198, 198, 6738, 764, 1330, 31904, 11, 1038, 7834, 198, 6738, 764, 1069, 11755, 1330, 309, 74, 25896, 16922, 198, 6738, 764, 2978, 525,...
3.42
50
# Copyright 2013-2019 Lawrence Livermore National Security, LLC and other # Spack Project Developers. See the top-level COPYRIGHT file for details. # # SPDX-License-Identifier: (Apache-2.0 OR MIT) from spack import * class RSinglecellexperiment(RPackage): """S4 Classes for Single Cell Data. Defines a S4 ...
[ 2, 15069, 2211, 12, 23344, 13914, 45036, 3549, 2351, 4765, 11, 11419, 290, 584, 198, 2, 1338, 441, 4935, 34152, 13, 4091, 262, 1353, 12, 5715, 27975, 38162, 9947, 2393, 329, 3307, 13, 198, 2, 198, 2, 30628, 55, 12, 34156, 12, 33234,...
2.629703
505
import os import click from os.path import abspath from filibuster.server import start_filibuster_server_and_run_multi_threaded_test @click.command() @click.option('--functional-test', required=True, type=str, help='Functional test to run.') @click.option('--analysis-file', default="default-analysis.json", type=str, ...
[ 11748, 28686, 198, 11748, 3904, 198, 6738, 28686, 13, 6978, 1330, 2352, 6978, 198, 6738, 38940, 13, 15388, 1330, 923, 62, 10379, 571, 5819, 62, 15388, 62, 392, 62, 5143, 62, 41684, 62, 16663, 276, 62, 9288, 628, 198, 31, 12976, 13, ...
3.019272
467
import numpy as np import gnumpy as gp import pickle import random
[ 11748, 299, 32152, 355, 45941, 198, 11748, 19967, 32152, 355, 27809, 198, 11748, 2298, 293, 198, 11748, 4738, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 198 ]
2.5
32
from dough import Dough
[ 6738, 15756, 1330, 48179, 628 ]
5
5
# -*- coding: utf-8 -*- from __future__ import absolute_import, division, print_function import datetime import httpretty import json import uuid from collections import Mapping from tests.test_api.utils import TestBaseApi from polyaxon_client.api.base import BaseApiHandler from polyaxon_client.api.job import JobAp...
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 6738, 11593, 37443, 834, 1330, 4112, 62, 11748, 11, 7297, 11, 3601, 62, 8818, 198, 198, 11748, 4818, 8079, 198, 11748, 2638, 16100, 198, 11748, 33918, 198, 11748, 334, 2...
3.299145
117
from django.urls import reverse from django_modals.modals import ModelFormModal from django_modals.processes import PROCESS_EDIT_DELETE, PERMISSION_OFF from django_modals.widgets.colour_picker import ColourPickerWidget from advanced_report_builder.models import Target from django.conf import settings
[ 6738, 42625, 14208, 13, 6371, 82, 1330, 9575, 198, 6738, 42625, 14208, 62, 4666, 874, 13, 4666, 874, 1330, 9104, 8479, 5841, 282, 198, 6738, 42625, 14208, 62, 4666, 874, 13, 14681, 274, 1330, 41755, 7597, 62, 24706, 62, 7206, 2538, 93...
3.41573
89
""" Commonly used utilities """ import os import platform import tarfile import subprocess import shutil import json EXPERIMENTAL_FLAG_ESBUILD = "experimentalEsbuild" class OSUtils(object): """ Wrapper around file system functions, to make it easy to unit test actions in memory """ @property ...
[ 37811, 198, 6935, 8807, 973, 20081, 198, 37811, 198, 198, 11748, 28686, 198, 11748, 3859, 198, 11748, 13422, 7753, 198, 11748, 850, 14681, 198, 11748, 4423, 346, 198, 11748, 33918, 198, 198, 6369, 18973, 3955, 3525, 1847, 62, 38948, 62, ...
3.213873
173
""" q9.py Created on 2020-08-21 Updated on 2020-10-30 Copyright Ryan Kan 2020 Description: A file which holds the designated question class. """ # IMPORTS from sympy import latex from sympy.parsing.sympy_parser import parse_expr from the_challenge.misc import mathematical_round from the_challenge.questions.questio...
[ 37811, 198, 80, 24, 13, 9078, 198, 198, 41972, 319, 12131, 12, 2919, 12, 2481, 198, 17354, 319, 12131, 12, 940, 12, 1270, 198, 198, 15269, 6047, 14248, 12131, 198, 198, 11828, 25, 317, 2393, 543, 6622, 262, 11032, 1808, 1398, 13, 19...
2.921397
229
import discord import logging from . import values from discord.ext import commands from .cogs.commands import CommandsCog from .utils import maybe_mention, ping_devs, EmojiURLs logger = logging.getLogger(__name__)
[ 11748, 36446, 198, 11748, 18931, 198, 198, 6738, 764, 1330, 3815, 198, 6738, 36446, 13, 2302, 1330, 9729, 198, 6738, 764, 66, 18463, 13, 9503, 1746, 1330, 49505, 34, 519, 198, 6738, 764, 26791, 1330, 3863, 62, 434, 295, 11, 29400, 62,...
3.338462
65
# -*- coding: utf-8 -*- import argparse import os from shutil import copyfile import subprocess as sp CURR_DIR = os.getcwd() PKG_DIR = os.path.join(CURR_DIR, ".package") CALC_DIR = os.path.join(PKG_DIR, "CalcPlusPlus") LIB_DIR = os.path.join(CALC_DIR, "libs") PLATFORM_DIR = os.path.join(CALC_DIR, "platforms") if __...
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 11748, 1822, 29572, 198, 11748, 28686, 198, 6738, 4423, 346, 1330, 4866, 7753, 198, 11748, 850, 14681, 355, 599, 198, 198, 34, 31302, 62, 34720, 796, 28686, 13, 1136, 66...
2.467213
244
from face_landmark_detection import generate_face_correspondences from delaunay_triangulation import make_delaunay from face_morph import generate_morph_sequence import subprocess import argparse import shutil import os import imageio import cv2 import numpy as np import glob import json if __name__ == "__main__":...
[ 6738, 1986, 62, 1044, 4102, 62, 15255, 3213, 1330, 7716, 62, 2550, 62, 10215, 5546, 3007, 198, 6738, 1619, 1942, 323, 62, 28461, 648, 1741, 1330, 787, 62, 12381, 1942, 323, 198, 6738, 1986, 62, 24503, 1330, 7716, 62, 24503, 62, 43167,...
2.482143
952