content
stringlengths
1
1.05M
input_ids
listlengths
1
883k
ratio_char_token
float64
1
22.9
token_count
int64
1
883k
# Copyright 2015 Elizabeth Myers. # All rights reserved. # This file is part of the pycardcast project. See LICENSE in the root # directory for licensing information. import asyncio import aiohttp from pycardcast.net import CardcastAPIBase from pycardcast.deck import (DeckInfo, DeckInfoNotFoundError, ...
[ 2, 15069, 220, 1853, 10674, 25434, 13, 198, 2, 1439, 2489, 10395, 13, 198, 2, 770, 2393, 318, 636, 286, 262, 12972, 9517, 2701, 1628, 13, 4091, 38559, 24290, 287, 262, 6808, 198, 2, 8619, 329, 15665, 1321, 13, 198, 198, 11748, 30351...
2.618421
228
from ctypes import * from .api import api from .const import * from .library import library
[ 6738, 269, 19199, 1330, 1635, 198, 6738, 764, 15042, 1330, 40391, 198, 6738, 764, 9979, 1330, 1635, 198, 6738, 764, 32016, 1330, 5888, 628 ]
3.875
24
import time from faker import Faker from radish_ext.radish.step_config import StepConfig from conduit.client import ConduitClient, ConduitConfig
[ 11748, 640, 198, 198, 6738, 277, 3110, 1330, 376, 3110, 198, 6738, 2511, 680, 62, 2302, 13, 6335, 680, 13, 9662, 62, 11250, 1330, 5012, 16934, 198, 198, 6738, 44457, 13, 16366, 1330, 9724, 5013, 11792, 11, 9724, 5013, 16934, 628, 628 ...
3.571429
42
import requests import credentials
[ 11748, 7007, 198, 11748, 18031, 628, 198 ]
5.285714
7
import os import sys from conda_build import api from conda_build import render import pytest
[ 11748, 28686, 198, 11748, 25064, 198, 6738, 1779, 64, 62, 11249, 1330, 40391, 198, 6738, 1779, 64, 62, 11249, 1330, 8543, 198, 198, 11748, 12972, 9288, 628, 628, 198 ]
3.413793
29
if __name__ == '__main__': main()
[ 198, 198, 361, 11593, 3672, 834, 6624, 705, 834, 12417, 834, 10354, 198, 220, 220, 220, 1388, 3419, 198 ]
2.105263
19
#Writing MOOG parameter file for the parameter, abundance, and error calculations. #The parameter file only needs to be written once, at beginning of the routine, because the output #files are overwritten with each itereation of the routine, only minimal output data are needed. # #The user can choose to have the param...
[ 2, 33874, 337, 6684, 38, 11507, 2393, 329, 262, 11507, 11, 20038, 11, 290, 4049, 16765, 13, 198, 2, 464, 11507, 2393, 691, 2476, 284, 307, 3194, 1752, 11, 379, 3726, 286, 262, 8027, 11, 780, 262, 5072, 220, 198, 2, 16624, 389, 699...
4.228188
149
"""Plots for optimization lecture.""" import matplotlib.pyplot as plt import numpy as np from matplotlib import cm def plot_contour(f, allvecs, legend_path): """Plot contour graph for function f.""" # Create array from values with at least two dimensions. allvecs = np.atleast_2d(allvecs) X, Y, Z = _g...
[ 37811, 3646, 1747, 329, 23989, 19143, 526, 15931, 198, 11748, 2603, 29487, 8019, 13, 9078, 29487, 355, 458, 83, 198, 11748, 299, 32152, 355, 45941, 198, 6738, 2603, 29487, 8019, 1330, 12067, 628, 198, 4299, 7110, 62, 3642, 454, 7, 69, ...
2.216667
840
"""All functions return a Component so you can easily pipe or compose them. There are two types of functions: - decorators: return the original component - containers: return a new component """ from functools import lru_cache, partial import numpy as np from omegaconf import OmegaConf from pydantic import validate...
[ 37811, 3237, 5499, 1441, 257, 35100, 523, 345, 460, 3538, 12656, 393, 36664, 606, 13, 198, 198, 1858, 389, 734, 3858, 286, 5499, 25, 198, 198, 12, 11705, 2024, 25, 1441, 262, 2656, 7515, 198, 12, 16472, 25, 1441, 257, 649, 7515, 198...
2.5729
1,262
#coding=utf-8 from __future__ import division """ # OVERLAY UFOS For anyone looking in here, sorry the code is so messy. This is a standalone version of a script with a lot of dependencies. """ import os from AppKit import * #@PydevCodeAnalysisIgnore from vanilla import * #@PydevCodeAnalysisIgnore from mojo.drawingT...
[ 2, 66, 7656, 28, 40477, 12, 23, 198, 6738, 11593, 37443, 834, 1330, 7297, 198, 37811, 198, 2, 28729, 43, 4792, 471, 37, 2640, 198, 198, 1890, 2687, 2045, 287, 994, 11, 7926, 262, 2438, 318, 523, 24097, 13, 770, 318, 257, 27669, 21...
3.423913
276
import os appdata_path = os.path.expanduser("~/.local/share/nautapy") os.makedirs(appdata_path, exist_ok=True)
[ 11748, 28686, 628, 198, 1324, 7890, 62, 6978, 796, 28686, 13, 6978, 13, 11201, 392, 7220, 7203, 93, 11757, 12001, 14, 20077, 14, 77, 2306, 12826, 4943, 198, 418, 13, 76, 4335, 17062, 7, 1324, 7890, 62, 6978, 11, 2152, 62, 482, 28, ...
2.478261
46
import requests import json import datetime import sys from dateutil.parser import parse as to_datetime try: import pandas as pd except: pass from pyteamup.utils.utilities import * from pyteamup.utils.constants import * from pyteamup.Event import Event def get_event_collection(self, start_dt=None, end_dt...
[ 11748, 7007, 198, 11748, 33918, 198, 11748, 4818, 8079, 198, 11748, 25064, 198, 6738, 3128, 22602, 13, 48610, 1330, 21136, 355, 284, 62, 19608, 8079, 198, 28311, 25, 198, 220, 220, 220, 1330, 19798, 292, 355, 279, 67, 198, 16341, 25, ...
2.320844
2,749
from . import constant parameters = { 'RegNet' : { "lr": 0.1, "epochs": 100, "weight_decay": 5e-5, "batch_size": 128, "nesterov": True, "init_backbone":True, "init_extractor":True,}, } backbone_config = { "RegNetX002" : {"channels": 3, "dropout": 0.2,}, "RegNetY004" : {"channels": ...
[ 198, 6738, 764, 1330, 6937, 198, 198, 17143, 7307, 796, 1391, 198, 220, 220, 220, 220, 220, 220, 220, 705, 8081, 7934, 6, 1058, 1391, 366, 14050, 1298, 657, 13, 16, 11, 366, 538, 5374, 82, 1298, 1802, 11, 366, 6551, 62, 12501, 323...
1.579735
5,211
# # @section License # # The MIT License (MIT) # # Copyright (c) 2016-2017, Erik Moqvist # # Permission is hereby granted, free of charge, to any person # obtaining a copy of this software and associated documentation # files (the "Software"), to deal in the Software without # restriction, including without limitation ...
[ 2, 198, 2, 2488, 5458, 13789, 198, 2, 198, 2, 383, 17168, 13789, 357, 36393, 8, 198, 2, 198, 2, 15069, 357, 66, 8, 1584, 12, 5539, 11, 22722, 4270, 44179, 396, 198, 2, 198, 2, 2448, 3411, 318, 29376, 7520, 11, 1479, 286, 3877, ...
3
536
from django.conf.urls import patterns, include, url urlpatterns = patterns('reports.views', url(r'^index/*$', 'index'), url(r'^dashboard/*$', 'dashboard'), url(r'^$', 'index'), url(r'^detail/(?P<serial>[^/]+)$', 'detail'), url(r'^detailpkg/(?P<serial>[^/]+)/(?P<manifest_name>[^/]+)$', 'detail_pkg')...
[ 6738, 42625, 14208, 13, 10414, 13, 6371, 82, 1330, 7572, 11, 2291, 11, 19016, 198, 198, 6371, 33279, 82, 796, 7572, 10786, 48922, 13, 33571, 3256, 198, 220, 220, 220, 19016, 7, 81, 6, 61, 9630, 15211, 3, 3256, 705, 9630, 33809, 198,...
2.157434
343
#!/usr/bin/env python # -*- coding: utf-8 -*- import time import multiprocessing import pytest import socket import signal import os import logging try: from urllib2 import URLError, urlopen except ImportError: from urllib.error import URLError from urllib.request import urlopen from flask import _request...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 11748, 640, 198, 11748, 18540, 305, 919, 278, 198, 11748, 12972, 9288, 198, 11748, 17802, 198, 11748, 6737, 198, 11748, ...
2.395793
1,046
from .exceptions import ( ServerResponseError, InternalServerError, NonXMLResponseError, EndpointUnavailableError, ) from functools import wraps from xml.etree.ElementTree import ParseError from ..query import QuerySet import logging try: from distutils2.version import NormalizedVersion as Version ...
[ 6738, 764, 1069, 11755, 1330, 357, 198, 220, 220, 220, 9652, 31077, 12331, 11, 198, 220, 220, 220, 18628, 10697, 12331, 11, 198, 220, 220, 220, 8504, 55, 5805, 31077, 12331, 11, 198, 220, 220, 220, 5268, 4122, 3118, 15182, 12331, 11, ...
3.058333
600
import unittest from freeplane_importer.importer import Importer from mock import Mock from mock import MagicMock from mock import call from freeplane_importer.model_not_found_exception import ModelNotFoundException
[ 11748, 555, 715, 395, 198, 6738, 1479, 14382, 62, 320, 26634, 13, 320, 26634, 1330, 1846, 26634, 198, 6738, 15290, 1330, 44123, 198, 6738, 15290, 1330, 6139, 44, 735, 198, 6738, 15290, 1330, 869, 198, 198, 6738, 1479, 14382, 62, 320, ...
3.824561
57
import argparse import numpy as np from scipy.stats import linregress import matplotlib.pyplot as plt parser = argparse.ArgumentParser() parser.add_argument("--plot", action="store_const", default=False, const=True) args = parser.parse_args() data = np.loadtxt("../data/data.csv", skiprows=1, usecols=list(range(1,8)),...
[ 11748, 1822, 29572, 198, 11748, 299, 32152, 355, 45941, 198, 6738, 629, 541, 88, 13, 34242, 1330, 9493, 2301, 601, 198, 11748, 2603, 29487, 8019, 13, 9078, 29487, 355, 458, 83, 198, 198, 48610, 796, 1822, 29572, 13, 28100, 1713, 46677, ...
2.259336
482
from jedi.inference.base_value import ValueSet, NO_VALUES from jedi.common import monkeypatch def get_merged_lazy_value(lazy_values): if len(lazy_values) > 1: return MergedLazyValues(lazy_values) else: return lazy_values[0]
[ 6738, 474, 13740, 13, 259, 4288, 13, 8692, 62, 8367, 1330, 11052, 7248, 11, 8005, 62, 23428, 35409, 198, 6738, 474, 13740, 13, 11321, 1330, 21657, 17147, 628, 628, 628, 198, 198, 4299, 651, 62, 647, 2004, 62, 75, 12582, 62, 8367, 7,...
2.438095
105
import matplotlib.lines as lines import matplotlib.pyplot as plt COLOR_CLASSIFICATIONS = [ 'black', # Unclassified 'blue', # Classified True (1) 'red' # Classified False (0) ] def generate_line(ax, p0, p1, color='black', style='-'): ''' Generates a line between points p0 and p1 which...
[ 11748, 2603, 29487, 8019, 13, 6615, 355, 3951, 198, 11748, 2603, 29487, 8019, 13, 9078, 29487, 355, 458, 83, 198, 198, 46786, 62, 31631, 30643, 18421, 796, 685, 198, 220, 220, 220, 705, 13424, 3256, 220, 220, 220, 1303, 791, 31691, 19...
2.427807
748
import sys import os import re import json import pickle import tempfile import itertools import contextlib import xml.etree.cElementTree as cET from copy import deepcopy from xml.etree import ElementTree as ET from pprint import pformat from .constants import ( MARKER_COLOR, MARKER_DURATION, MARKER_NAME, ...
[ 11748, 25064, 198, 11748, 28686, 198, 11748, 302, 198, 11748, 33918, 198, 11748, 2298, 293, 198, 11748, 20218, 7753, 198, 11748, 340, 861, 10141, 198, 11748, 4732, 8019, 198, 11748, 35555, 13, 316, 631, 13, 66, 20180, 27660, 355, 269, 2...
2.509044
2,709
import sys import numpy as np import pandas as pd import matplotlib.pyplot as plt import seaborn as sns if len(sys.argv) != 3: print('usage: python plot_performances.py <group_csv> <indiv_csv>') exit() group_file = sys.argv[1] indiv_file = sys.argv[2] # Load the data df_group = pd.read_csv(group_file) df_i...
[ 11748, 25064, 198, 198, 11748, 299, 32152, 355, 45941, 198, 11748, 19798, 292, 355, 279, 67, 198, 11748, 2603, 29487, 8019, 13, 9078, 29487, 355, 458, 83, 198, 11748, 384, 397, 1211, 355, 3013, 82, 628, 198, 361, 18896, 7, 17597, 13, ...
2.327306
553
from Aion.utils.data import getADBPath import subprocess
[ 6738, 317, 295, 13, 26791, 13, 7890, 1330, 651, 2885, 33, 15235, 198, 11748, 850, 14681, 198 ]
3.352941
17
from collections import OrderedDict import pytest import vcr try: # Python 2.7 # requests's ``json()`` function returns strings as unicode (as per the # JSON spec). In 2.7, those are of type unicode rather than str. basestring # was created to help with that. # https://docs.python.org/2/library/func...
[ 6738, 17268, 1330, 14230, 1068, 35, 713, 198, 198, 11748, 12972, 9288, 198, 11748, 410, 6098, 628, 198, 28311, 25, 220, 1303, 11361, 362, 13, 22, 198, 220, 220, 220, 1303, 7007, 338, 7559, 17752, 3419, 15506, 2163, 5860, 13042, 355, 2...
3.014706
136
# # Copyright 2015 Naver Corp. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing...
[ 2, 198, 2, 15069, 1853, 399, 8770, 11421, 13, 198, 2, 198, 2, 49962, 739, 262, 24843, 13789, 11, 10628, 362, 13, 15, 357, 1169, 366, 34156, 15341, 198, 2, 345, 743, 407, 779, 428, 2393, 2845, 287, 11846, 351, 262, 13789, 13, 198, ...
3.796954
197
import os import sys import numpy as np import matplotlib.pyplot as plt import flopy if __name__ == "__main__": success = run()
[ 11748, 28686, 198, 11748, 25064, 198, 11748, 299, 32152, 355, 45941, 198, 11748, 2603, 29487, 8019, 13, 9078, 29487, 355, 458, 83, 198, 198, 11748, 781, 11081, 628, 198, 198, 361, 11593, 3672, 834, 6624, 366, 834, 12417, 834, 1298, 198,...
2.77551
49
# -*- coding: utf-8 -*- ''' Documentacin sobre clustering en Python: http://scikit-learn.org/stable/modules/clustering.html http://www.learndatasci.com/k-means-clustering-algorithms-python-intro/ http://hdbscan.readthedocs.io/en/latest/comparing_clustering_algorithms.html https://joernhees.de/...
[ 220, 220, 220, 1303, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 201, 198, 7061, 6, 201, 198, 24941, 330, 259, 523, 4679, 32966, 1586, 551, 11361, 25, 201, 198, 220, 220, 220, 2638, 1378, 36216, 15813, 12, 35720, 13, 23...
2.186244
5,176
""" preprocess of (single lead) ecg signal: band pass --> remove baseline --> find rpeaks --> denoise (mainly deal with motion artefact) TODO: 1. motion artefact detection, and slice the signal into continuous (no motion artefact within) segments 2. to add References: ----------- [1] https://github...
[ 37811, 198, 3866, 14681, 286, 357, 29762, 1085, 8, 9940, 70, 6737, 25, 198, 220, 220, 220, 4097, 1208, 14610, 4781, 14805, 14610, 1064, 374, 431, 4730, 14610, 2853, 25678, 357, 12417, 306, 1730, 351, 6268, 46252, 22584, 8, 198, 198, 5...
2.221156
4,065
## mv to //:WORKSPACE.bzl ocaml_configure load("//ocaml/_bootstrap:ocaml.bzl", _ocaml_configure = "ocaml_configure") # load("//ocaml/_bootstrap:obazl.bzl", _obazl_configure = "obazl_configure") load("//ocaml/_rules:ocaml_repository.bzl" , _ocaml_repository = "ocaml_repository") # load("//ocaml/_rules:opam_confi...
[ 2235, 285, 85, 284, 3373, 25, 33249, 4303, 11598, 13, 65, 48274, 267, 20991, 75, 62, 11250, 495, 198, 198, 2220, 7203, 1003, 420, 43695, 47835, 18769, 26418, 25, 420, 43695, 13, 65, 48274, 1600, 4808, 420, 43695, 62, 11250, 495, 796, ...
2.363354
322
from metrician.explainations.tests import *
[ 6738, 18663, 666, 13, 20676, 391, 602, 13, 41989, 1330, 1635, 198 ]
3.666667
12
import tensorflow as tf from .. src.align import detect_face from .. src import facenet from .. simple import download_model import sys import os from os.path import expanduser import copy import cv2 import numpy as np from scipy import spatial minsize = 20 # minimum size of face threshold = [0.6, 0.7, 0.7] # three ...
[ 11748, 11192, 273, 11125, 355, 48700, 198, 6738, 11485, 12351, 13, 31494, 1330, 4886, 62, 2550, 198, 6738, 11485, 12351, 1330, 1777, 268, 316, 198, 6738, 11485, 2829, 1330, 4321, 62, 19849, 198, 11748, 25064, 198, 11748, 28686, 198, 6738,...
3.263158
114
from .aggregated_stats import * from .game_stats import * from .stat_definitions import *
[ 6738, 764, 9460, 2301, 515, 62, 34242, 1330, 1635, 198, 6738, 764, 6057, 62, 34242, 1330, 1635, 198, 6738, 764, 14269, 62, 4299, 50101, 1330, 1635 ]
3.423077
26
"""Test Manage All-Link Record.""" import unittest from binascii import unhexlify from pyinsteon.address import Address from pyinsteon.constants import AckNak, ManageAllLinkRecordAction, MessageId from pyinsteon.protocol.messages.all_link_record_flags import \ AllLinkRecordFlags from tests import set_log_levels fr...
[ 37811, 14402, 1869, 496, 1439, 12, 11280, 13266, 526, 15931, 198, 11748, 555, 715, 395, 198, 6738, 9874, 292, 979, 72, 1330, 555, 33095, 75, 1958, 198, 198, 6738, 12972, 259, 4169, 261, 13, 21975, 1330, 17917, 198, 6738, 12972, 259, 4...
3.134921
126
#!/usr/bin/env python # coding: utf-8 # # Figure Info. # # | Title | Journal | Authors | Article Date | Code Date | Figure | Links | # |:------|:-------:|:-------:|:------------:|:---------:|:------:|:-----:| # |A microfluidic approach for experimentally modelling <br> the intercellular coupling system of a mammalian...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 2, 19617, 25, 3384, 69, 12, 23, 198, 198, 2, 1303, 11291, 14151, 13, 198, 2, 220, 198, 2, 930, 11851, 930, 4913, 930, 46665, 930, 10172, 7536, 930, 6127, 7536, 930, 11291, 930, 216...
1.87881
2,690
from django.shortcuts import render, HttpResponse, HttpResponseRedirect from django.template import loader from django.conf import settings from django.contrib.auth.models import User from rameniaapp.models import ReviewReport, ProfileReport, NoodleReport, Report, Review, Profile, Noodle from django.views.generic impor...
[ 6738, 42625, 14208, 13, 19509, 23779, 1330, 8543, 11, 367, 29281, 31077, 11, 367, 29281, 31077, 7738, 1060, 198, 6738, 42625, 14208, 13, 28243, 1330, 40213, 198, 6738, 42625, 14208, 13, 10414, 1330, 6460, 198, 6738, 42625, 14208, 13, 3642...
3.188552
297
#!/usr/bin/python # # This tool is an attempt to automate some taks related # to malware unpacking. # # Most (if not all) of the tricks used in this tool # directly comes from an excellent course given # by Nicolas Brulez (@nicolasbrulez) # # Tool developped by David DURVAUX for Autopsit # (commercial brand of N-Labs...
[ 2, 48443, 14629, 14, 8800, 14, 29412, 198, 2, 198, 2, 770, 2891, 318, 281, 2230, 284, 43511, 617, 256, 4730, 3519, 198, 198, 2, 284, 18953, 8593, 5430, 13, 198, 2, 198, 2, 4042, 357, 361, 407, 477, 8, 286, 262, 15910, 973, 287, ...
3.578846
1,040
from ._head_base import HeadComponent __all__ = ['MjStyle']
[ 198, 6738, 47540, 2256, 62, 8692, 1330, 7123, 21950, 628, 198, 834, 439, 834, 796, 37250, 44, 73, 21466, 20520, 628 ]
3.047619
21
# Copyright 2020 Huawei Technologies Co., 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 agreed to...
[ 2, 15069, 12131, 43208, 21852, 1766, 1539, 12052, 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.218668
1,532
import torch from torch.nn import functional as F from torch.utils.data import Dataset from gensim.corpora.dictionary import Dictionary
[ 11748, 28034, 198, 6738, 28034, 13, 20471, 1330, 10345, 355, 376, 198, 6738, 28034, 13, 26791, 13, 7890, 1330, 16092, 292, 316, 198, 6738, 308, 641, 320, 13, 10215, 38851, 13, 67, 14188, 1330, 28261, 628 ]
3.805556
36
# MINLP written by GAMS Convert at 08/20/20 01:30:45 # # Equation counts # Total E G L N X C B # 297 170 42 85 0 0 0 0 # # Variable counts # x b i s1s s2s sc ...
[ 2, 220, 20625, 19930, 3194, 416, 402, 40834, 38240, 379, 8487, 14, 1238, 14, 1238, 5534, 25, 1270, 25, 2231, 198, 2, 220, 220, 198, 2, 220, 7889, 341, 9853, 198, 2, 220, 220, 220, 220, 220, 7472, 220, 220, 220, 220, 220, 220, 22...
1.918844
38,925
import logging import os import shutil import subprocess import pytest import salt.utils.platform log = logging.getLogger(__name__)
[ 11748, 18931, 198, 11748, 28686, 198, 11748, 4423, 346, 198, 11748, 850, 14681, 198, 198, 11748, 12972, 9288, 198, 11748, 8268, 13, 26791, 13, 24254, 198, 198, 6404, 796, 18931, 13, 1136, 11187, 1362, 7, 834, 3672, 834, 8, 628, 628, 6...
3.27907
43
import game_framework from pico2d import * import title_state name = "StartState" image = None logo_time = 0.0 from pico2d import * import title_state name = "StartState" image = None logo_time = 0.0
[ 11748, 983, 62, 30604, 198, 6738, 279, 3713, 17, 67, 1330, 1635, 198, 11748, 3670, 62, 5219, 198, 198, 3672, 796, 366, 10434, 9012, 1, 198, 9060, 796, 6045, 198, 6404, 78, 62, 2435, 796, 657, 13, 15, 628, 198, 198, 6738, 279, 3713...
2.639535
86
#!/usr/bin/env python3 # Copyright 2021 Xiaomi Corp. (authors: Fangjun Kuang) # # See ../../../../LICENSE for clarification regarding multiple authors # # 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...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 18, 198, 2, 15069, 220, 220, 220, 33448, 220, 46726, 11421, 13, 220, 220, 220, 220, 220, 220, 220, 357, 41617, 25, 24468, 29741, 12554, 648, 8, 198, 2, 198, 2, 4091, 11485, 14, 40720, 4...
2.963687
358
import configparser
[ 11748, 4566, 48610, 628 ]
5.25
4
from __future__ import print_function import itertools from demisto_sdk.commands.common.constants import VALIDATED_PACK_ITEM_TYPES from demisto_sdk.commands.common.errors import Errors from demisto_sdk.commands.common.hook_validations.base_validator import \ BaseValidator from demisto_sdk.commands.common.tools im...
[ 6738, 11593, 37443, 834, 1330, 3601, 62, 8818, 198, 198, 11748, 340, 861, 10141, 198, 198, 6738, 1357, 396, 78, 62, 21282, 74, 13, 9503, 1746, 13, 11321, 13, 9979, 1187, 1330, 26173, 2389, 11617, 62, 47, 8120, 62, 2043, 3620, 62, 99...
2.497537
203
import numpy as np
[ 11748, 299, 32152, 355, 45941, 198, 220, 220, 220, 220, 198 ]
2.181818
11
from xml.dom import minidom import pywikibot from api.decorator import time_this SiteMock = pywikibot.Site p = PageMock(SiteMock('en', 'wiktionary'), 'gaon') e = p.get()
[ 6738, 35555, 13, 3438, 1330, 949, 312, 296, 198, 198, 11748, 12972, 20763, 571, 313, 198, 198, 6738, 40391, 13, 12501, 273, 1352, 1330, 640, 62, 5661, 198, 198, 29123, 44, 735, 796, 12972, 20763, 571, 313, 13, 29123, 628, 198, 198, ...
2.478873
71
import os from functools import partial from io import BytesIO import numpy as np import PIL.Image import scipy.misc import tensorflow as tf graph = tf.Graph() sess = tf.InteractiveSession(graph=graph) model_fn = "./models/tensorflow_inception_graph.pb" with tf.gfile.FastGFile(model_fn, 'rb') as f: graph_def = tf...
[ 11748, 28686, 198, 6738, 1257, 310, 10141, 1330, 13027, 198, 6738, 33245, 1330, 2750, 4879, 9399, 198, 198, 11748, 299, 32152, 355, 45941, 198, 11748, 350, 4146, 13, 5159, 198, 11748, 629, 541, 88, 13, 44374, 198, 11748, 11192, 273, 111...
2.319672
366
import calendar import datetime import logging import os import webapp2 import dbmodel TESTING = os.environ.get('SERVER_SOFTWARE', '').startswith('Development') app = webapp2.WSGIApplication([ ('/tasks/admin/reset', ResetHandler) ], debug=TESTING)
[ 11748, 11845, 198, 11748, 4818, 8079, 198, 11748, 18931, 198, 11748, 28686, 198, 198, 11748, 3992, 1324, 17, 198, 198, 11748, 20613, 19849, 198, 198, 51, 6465, 2751, 796, 28686, 13, 268, 2268, 13, 1136, 10786, 35009, 5959, 62, 15821, 37...
2.866667
90
from dataclasses import dataclass from itertools import cycle from typing import Dict, Union import numpy as np from ...layers.utils.color_transformations import ( transform_color, transform_color_cycle, )
[ 6738, 4818, 330, 28958, 1330, 4818, 330, 31172, 198, 6738, 340, 861, 10141, 1330, 6772, 198, 6738, 19720, 1330, 360, 713, 11, 4479, 198, 198, 11748, 299, 32152, 355, 45941, 198, 198, 6738, 2644, 75, 6962, 13, 26791, 13, 8043, 62, 3563...
3.235294
68
"""Abstract class for all toggle buttons""" # Standard library imports import logging from collections import OrderedDict # Third party imports import ipywidgets # Local imports from .abc_toggle_buttons import BaseToggleButtons from .layouts import DICT_LAYOUT_HBOX_ANY LOGGER = logging.getLogger(__name__) def ...
[ 37811, 23839, 1398, 329, 477, 19846, 12163, 37811, 198, 2, 8997, 5888, 17944, 198, 11748, 18931, 198, 6738, 17268, 1330, 14230, 1068, 35, 713, 198, 198, 2, 10467, 2151, 17944, 198, 11748, 20966, 88, 28029, 11407, 198, 198, 2, 10714, 179...
2.305627
1,564
__author__ = 'Pat McClernan and Dan Wegmann' import Player import Message # input #0 for rock #1 for paper #2 for scissors # past move is array of numbers # our move followed by their move #Our strategy is to look at all past moves #In a large number of games, you would expect # each move to be seen an even amount ...
[ 834, 9800, 834, 796, 705, 12130, 23780, 1142, 272, 290, 6035, 775, 70, 9038, 6, 198, 11748, 7853, 198, 11748, 16000, 198, 2, 5128, 198, 2, 15, 329, 3881, 198, 2, 16, 329, 3348, 198, 2, 17, 329, 41786, 198, 2, 1613, 1445, 318, 71...
3
326
from age_and_gender import * from PIL import Image, ImageDraw, ImageFont data = AgeAndGender() data.load_shape_predictor('models/shape_predictor_5_face_landmarks.dat') data.load_dnn_gender_classifier('models/dnn_gender_classifier_v1.dat') data.load_dnn_age_predictor('models/dnn_age_predictor_v1.dat') filename = 'test...
[ 6738, 2479, 62, 392, 62, 8388, 1330, 1635, 198, 6738, 350, 4146, 1330, 7412, 11, 7412, 25302, 11, 7412, 23252, 198, 198, 7890, 796, 7129, 1870, 41394, 3419, 198, 7890, 13, 2220, 62, 43358, 62, 79, 17407, 273, 10786, 27530, 14, 43358, ...
2.46506
415
from tictactoe import TicTacToe import random import csv import os gameNr = 1 gameLimit = 10000 lst_moves_1 = [] lst_moves_2 = [] while gameNr <= gameLimit: print("+++++++++++") print("Game#", gameNr) game = TicTacToe() tmp_moves_1 = [] tmp_moves_2 = [] while game.get_winner() == 0 and game....
[ 6738, 256, 713, 529, 2577, 1330, 309, 291, 51, 330, 2514, 68, 198, 11748, 4738, 198, 11748, 269, 21370, 198, 11748, 28686, 198, 198, 6057, 45, 81, 796, 352, 198, 6057, 39184, 796, 33028, 198, 198, 75, 301, 62, 76, 5241, 62, 16, 79...
1.935185
756
from __future__ import print_function, absolute_import, division # makes these scripts backward compatible with python 2.6 and 2.7 # TODO this should be implemented, see "kratos/utilities/interval_utility.h"
[ 6738, 11593, 37443, 834, 1330, 3601, 62, 8818, 11, 4112, 62, 11748, 11, 7297, 220, 1303, 1838, 777, 14750, 19528, 11670, 351, 21015, 362, 13, 21, 290, 362, 13, 22, 198, 198, 2, 16926, 46, 428, 815, 307, 9177, 11, 766, 366, 74, 103...
3.666667
57
import bitstring import pytest from stixcore.data.test import test_data from stixcore.idb.manager import IDBManager from stixcore.tmtc.packets import ( SOURCE_PACKET_HEADER_STRUCTURE, TC_DATA_HEADER_STRUCTURE, TM_DATA_HEADER_STRUCTURE, SourcePacketHeader, TCPacket, TMDataHeader, TMPacket, ...
[ 198, 11748, 1643, 8841, 198, 11748, 12972, 9288, 198, 198, 6738, 336, 844, 7295, 13, 7890, 13, 9288, 1330, 1332, 62, 7890, 198, 6738, 336, 844, 7295, 13, 312, 65, 13, 37153, 1330, 4522, 33, 13511, 198, 6738, 336, 844, 7295, 13, 83, ...
2.306418
966
"""Provides SeriesLoader object and helpers, used to read Series data from disk or other filesystems. """ from collections import namedtuple import json from numpy import array, arange, frombuffer, load, ndarray, unravel_index, vstack from numpy import dtype as dtypeFunc from scipy.io import loadmat from cStringIO impo...
[ 37811, 15946, 1460, 7171, 17401, 2134, 290, 49385, 11, 973, 284, 1100, 7171, 1366, 422, 11898, 393, 584, 29905, 82, 13, 198, 37811, 198, 6738, 17268, 1330, 3706, 83, 29291, 198, 11748, 33918, 198, 6738, 299, 32152, 1330, 7177, 11, 610, ...
2.980031
651
# run local models given a path, default to './mxnet_models/' import os import argparse import time import mxnet as mx import numpy as np file_path = os.path.realpath(__file__) dir_name = os.path.dirname(file_path) os.environ["MXNET_CUDNN_AUTOTUNE_DEFAULT"] = "0" def xprint(s): pass parser = argparse.Argum...
[ 2, 1057, 1957, 4981, 1813, 257, 3108, 11, 4277, 284, 705, 19571, 36802, 3262, 62, 27530, 14, 6, 198, 198, 11748, 28686, 198, 11748, 1822, 29572, 198, 11748, 640, 198, 11748, 285, 87, 3262, 355, 285, 87, 198, 11748, 299, 32152, 355, ...
2.412073
1,143
from lammps_data.angles import get_angles
[ 6738, 300, 6475, 862, 62, 7890, 13, 27787, 1330, 651, 62, 27787, 628, 628, 628 ]
3.133333
15
# Generated by Django 3.1.1 on 2020-12-16 03:07 from django.db import migrations, models
[ 2, 2980, 515, 416, 37770, 513, 13, 16, 13, 16, 319, 12131, 12, 1065, 12, 1433, 7643, 25, 2998, 198, 198, 6738, 42625, 14208, 13, 9945, 1330, 15720, 602, 11, 4981, 628 ]
2.84375
32
from sklearn.preprocessing import StandardScaler from sklearn.datasets import load_wine from sklearn.model_selection import train_test_split wine = load_wine() columns_names = wine.feature_names y = wine.target X = wine.data print('Pre scaling X') print(X) scaler = StandardScaler() scaler.fit(X) scaled_features = sc...
[ 6738, 1341, 35720, 13, 3866, 36948, 1330, 8997, 3351, 36213, 198, 6738, 1341, 35720, 13, 19608, 292, 1039, 1330, 3440, 62, 39002, 198, 6738, 1341, 35720, 13, 19849, 62, 49283, 1330, 4512, 62, 9288, 62, 35312, 198, 198, 39002, 796, 3440,...
2.873494
166
#!/usr/bin/env python # -*- coding: utf-8 -*- # Common Python library imports import os import pytest # Pip package imports from collections import namedtuple from flask import template_rendered from flask_security.signals import ( reset_password_instructions_sent, user_confirmed, user_registered, ) # In...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 198, 2, 8070, 11361, 5888, 17944, 198, 11748, 28686, 198, 11748, 12972, 9288, 198, 198, 2, 25149, 5301, 17944, 198, 673...
3.21256
207
from setuptools import setup from nats.aio.client import __version__ EXTRAS = { 'nkeys': ['nkeys'], } setup( name='nats-py', version=__version__, description='NATS client for Python', long_description='Python client for NATS, a lightweight, high-performance cloud native messaging system', cla...
[ 6738, 900, 37623, 10141, 1330, 9058, 198, 198, 6738, 299, 1381, 13, 64, 952, 13, 16366, 1330, 11593, 9641, 834, 198, 198, 6369, 5446, 1921, 796, 1391, 198, 220, 220, 220, 705, 77, 13083, 10354, 37250, 77, 13083, 6, 4357, 198, 92, 19...
2.560773
362
############################################################## #*** MagicDAQ USB DAQ and M&A Board General Demo Script *** ############################################################## #*** Websites *** # MagicDAQ Website: # https://www.magicdaq.com/ # API Docs Website: # https://magicdaq.github.io/magicdaq_docs/ #*...
[ 29113, 14468, 7804, 4242, 2235, 198, 2, 8162, 6139, 46640, 8450, 17051, 48, 290, 337, 5, 32, 5926, 3611, 34588, 12327, 17202, 198, 29113, 14468, 7804, 4242, 2235, 198, 198, 2, 8162, 47736, 2737, 17202, 198, 2, 6139, 46640, 15887, 25, ...
3.436062
3,738
from .results import (ArticleSearchResult, EmbeddingsResult, SearchResult, TagResult, ZoteroExtractionResult) __all__ = [ "TagResult", "EmbeddingsResult", "ZoteroExtractionResult", "SearchResult", "ArticleSearchResult" ]
[ 6738, 764, 43420, 1330, 357, 14906, 18243, 23004, 11, 13302, 6048, 654, 23004, 11, 11140, 23004, 11, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 17467, 23004, 11, 226...
2.709677
93
from django.contrib.auth import get_user_model from rest_framework import serializers
[ 6738, 42625, 14208, 13, 3642, 822, 13, 18439, 1330, 651, 62, 7220, 62, 19849, 198, 198, 6738, 1334, 62, 30604, 1330, 11389, 11341, 628, 628, 628, 628 ]
3.481481
27
# Copyright 2022 IBM Inc. All rights reserved # SPDX-License-Identifier: Apache2.0 # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless ...
[ 2, 15069, 33160, 19764, 3457, 13, 1439, 2489, 10395, 198, 2, 30628, 55, 12, 34156, 12, 33234, 7483, 25, 24843, 17, 13, 15, 198, 198, 2, 49962, 739, 262, 24843, 13789, 11, 10628, 362, 13, 15, 357, 1169, 366, 34156, 15341, 198, 2, 3...
2.637151
1,039
#------------------------------------------------------------------------------- # Name: module1 # Purpose: # # Author: qgeddes # # Created: 25/04/2013 # Copyright: (c) qgeddes 2013 # Licence: <your licence> #------------------------------------------------------------------------------- import L7...
[ 2, 10097, 24305, 198, 2, 6530, 25, 220, 220, 220, 220, 220, 220, 220, 8265, 16, 198, 2, 32039, 25, 198, 2, 198, 2, 6434, 25, 220, 220, 220, 220, 220, 10662, 2004, 8906, 198, 2, 198, 2, 15622, 25, 220, 220, 220, 220, 1679, 14, ...
2.915441
272
# -*- coding: utf-8 -*- from __future__ import absolute_import import six from sentry.api.serializers import serialize from sentry.models import SavedSearch from sentry.models.savedsearch import DEFAULT_SAVED_SEARCHES from sentry.testutils import TestCase
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 198, 6738, 11593, 37443, 834, 1330, 4112, 62, 11748, 198, 198, 11748, 2237, 198, 198, 6738, 1908, 563, 13, 15042, 13, 46911, 11341, 1330, 11389, 1096, 198, 6738, 1908, 5...
3.170732
82
""" #;+ #; NAME: #; general #; Version 1.0 #; #; PURPOSE: #; Module for monkeying with files and filenames #; 172Sep-2014 by JXP #;- #;------------------------------------------------------------------------------ """ # Import libraries import numpy as np from astropy.io import fits from astropy.io import as...
[ 37811, 198, 2, 26, 10, 220, 198, 2, 26, 36751, 25, 198, 2, 26, 2276, 198, 2, 26, 220, 220, 220, 10628, 352, 13, 15, 198, 2, 26, 198, 2, 26, 33079, 48933, 25, 198, 2, 26, 220, 220, 220, 19937, 329, 937, 365, 1112, 351, 3696, ...
3.145695
151
#!/usr/bin/env python try: from setuptools.core import setup except ImportError: from distutils.core import setup setup(name='genderizer', version='0.1.2.3', license='MIT', description='Genderizer tries to infer gender information looking at first name and/or making text analysis', lo...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 198, 28311, 25, 198, 220, 220, 220, 422, 900, 37623, 10141, 13, 7295, 1330, 9058, 198, 16341, 17267, 12331, 25, 198, 220, 220, 220, 422, 1233, 26791, 13, 7295, 1330, 9058, 628, 198, ...
2.651822
247
# Copyright 2022 Collate # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # http://www.apache.org/licenses/LICENSE-2.0 # Unless required by applicable law or agreed to in writing, software...
[ 2, 220, 15069, 33160, 7778, 378, 198, 2, 220, 49962, 739, 262, 24843, 13789, 11, 10628, 362, 13, 15, 357, 1169, 366, 34156, 15341, 198, 2, 220, 345, 743, 407, 779, 428, 2393, 2845, 287, 11846, 351, 262, 13789, 13, 198, 2, 220, 921...
3.769784
278
# -*- coding: utf-8 -*- from storyruntime.Containers import Containers from storyruntime.constants.ServiceConstants import ServiceConstants import storyscript def test_containers_format_command(story): """ Ensures a simple resolve can be performed """ story_text = 'alpine echo msg:"foo"\n' story....
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 6738, 1621, 43282, 13, 4264, 50221, 1330, 2345, 50221, 198, 6738, 1621, 43282, 13, 9979, 1187, 13, 16177, 34184, 1187, 1330, 4809, 34184, 1187, 198, 198, 11748, 1621, 1204...
2.140957
376
from django.contrib import admin from django.shortcuts import redirect from django.utils.safestring import mark_safe from django.contrib.admin.widgets import AdminFileWidget def redirect_one_object(model, obj): response = redirect(f'/admin/{model._meta.app_label}/{model._meta.model_name}/add/') if obj: ...
[ 6738, 42625, 14208, 13, 3642, 822, 1330, 13169, 198, 6738, 42625, 14208, 13, 19509, 23779, 1330, 18941, 198, 6738, 42625, 14208, 13, 26791, 13, 49585, 395, 1806, 1330, 1317, 62, 21230, 198, 6738, 42625, 14208, 13, 3642, 822, 13, 28482, ...
2.753623
207
import os plane = [[0 for i in range(1000)] for j in range(1000)] count = [0] if __name__ == "__main__": overlapping_vents()
[ 11748, 28686, 198, 198, 14382, 796, 16410, 15, 329, 1312, 287, 2837, 7, 12825, 15437, 329, 474, 287, 2837, 7, 12825, 15437, 198, 198, 9127, 796, 685, 15, 60, 628, 198, 361, 11593, 3672, 834, 6624, 366, 834, 12417, 834, 1298, 198, 22...
2.607843
51
import unittest if __name__ == '__main__': unittest.main()
[ 11748, 555, 715, 395, 628, 628, 198, 361, 11593, 3672, 834, 6624, 705, 834, 12417, 834, 10354, 198, 220, 220, 220, 555, 715, 395, 13, 12417, 3419, 198 ]
2.392857
28
############################################################################### # # Tests for XlsxWriter. # # Copyright (c), 2013-2019, John McNamara, jmcnamara@cpan.org # import unittest from ...compatibility import StringIO from ...worksheet import Worksheet
[ 29113, 29113, 7804, 4242, 21017, 198, 2, 198, 2, 30307, 329, 1395, 7278, 87, 34379, 13, 198, 2, 198, 2, 15069, 357, 66, 828, 2211, 12, 23344, 11, 1757, 22586, 47848, 11, 474, 23209, 7402, 3301, 31, 66, 6839, 13, 2398, 198, 2, 198,...
3.984848
66
from neo4j.v1 import GraphDatabase #neo4j==1.7.0 uri="bolt://localhost:7687" driver=GraphDatabase.driver(uri, auth=("neo4j", "testneo4j")) #execute_read(print_query,'Alice')
[ 6738, 19102, 19, 73, 13, 85, 16, 1330, 29681, 38105, 1303, 710, 78, 19, 73, 855, 16, 13, 22, 13, 15, 198, 198, 9900, 2625, 25593, 1378, 36750, 25, 30610, 22, 1, 198, 26230, 28, 37065, 38105, 13, 26230, 7, 9900, 11, 6284, 28, 720...
2.5
70
import os import tempfile import mock from . import utils from hotsos.core.config import setup_config from hotsos.core.ycheck.scenarios import YScenarioChecker from hotsos.core.issues.utils import KnownBugsStore, IssuesStore from hotsos.plugin_extensions.juju import summary JOURNALCTL_CAPPEDPOSITIONLOST = """ Dec 2...
[ 11748, 28686, 198, 11748, 20218, 7753, 198, 198, 11748, 15290, 198, 198, 6738, 764, 1330, 3384, 4487, 198, 198, 6738, 33915, 418, 13, 7295, 13, 11250, 1330, 9058, 62, 11250, 198, 6738, 33915, 418, 13, 7295, 13, 88, 9122, 13, 1416, 268...
3.682369
743
import argparse import collections import shutil import sys import time from datetime import timedelta from pathlib import Path import torch from torch.nn.parallel import DataParallel, DistributedDataParallel try: # PyTorch >= 1.6 supports mixed precision training from torch.cuda.amp import autocast amp_su...
[ 11748, 1822, 29572, 198, 11748, 17268, 198, 11748, 4423, 346, 198, 11748, 25064, 198, 11748, 640, 198, 6738, 4818, 8079, 1330, 28805, 12514, 198, 6738, 3108, 8019, 1330, 10644, 198, 198, 11748, 28034, 198, 6738, 28034, 13, 20471, 13, 1845...
2.866841
383
import logging import requests import multiprocessing import pathlib from typing import List from typing import Optional from typing import Tuple from typing import Dict from joblib import delayed from joblib import Parallel from datetime import date from datetime import timedelta logger = logging.getLogger(__name__) ...
[ 11748, 18931, 198, 11748, 7007, 198, 11748, 18540, 305, 919, 278, 198, 11748, 3108, 8019, 198, 6738, 19720, 1330, 7343, 198, 6738, 19720, 1330, 32233, 198, 6738, 19720, 1330, 309, 29291, 198, 6738, 19720, 1330, 360, 713, 198, 6738, 1693, ...
3.945652
92
# -*- coding: utf-8 -*- """ Created on Wed Oct 21 19:52:22 2020 #Plan A @author: 18096 """ '''Defines the neural network, loss function and metrics''' #from functools import reduce import torch import torch.nn as nn from torch.nn.functional import pad from torch.autograd import Variable import logging ...
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 201, 198, 37811, 201, 198, 41972, 319, 3300, 2556, 2310, 678, 25, 4309, 25, 1828, 12131, 201, 198, 2, 20854, 317, 201, 198, 31, 9800, 25, 1248, 2931, 21, 201, 198, 37811, ...
2.725926
135
import pytest
[ 11748, 12972, 9288, 628 ]
3.75
4
# Copyright (c) 2017 Yingxin Cheng # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in wr...
[ 2, 15069, 357, 66, 8, 2177, 38833, 87, 259, 27692, 198, 2, 198, 2, 49962, 739, 262, 24843, 13789, 11, 10628, 362, 13, 15, 357, 1169, 366, 34156, 15341, 345, 743, 198, 2, 407, 779, 428, 2393, 2845, 287, 11846, 351, 262, 13789, 13, ...
3.795455
264
"""Test suite for pylab_import_all magic Modified from the irunner module but using regex. """ # Global to make tests extra verbose and help debugging VERBOSE = True # stdlib imports import StringIO import sys import unittest import re # IPython imports from IPython.lib import irunner from IPython.testing import dec...
[ 37811, 14402, 18389, 329, 279, 2645, 397, 62, 11748, 62, 439, 5536, 198, 5841, 1431, 422, 262, 4173, 403, 1008, 8265, 475, 1262, 40364, 13, 198, 37811, 198, 198, 2, 8060, 284, 787, 5254, 3131, 15942, 577, 290, 1037, 28769, 198, 5959, ...
3.133333
180
import logging import os import shutil import time import torch model_state = 'model_state.pt' trainer_state = 'trainer_state.pt'
[ 11748, 18931, 198, 11748, 28686, 198, 11748, 4423, 346, 198, 11748, 640, 198, 198, 11748, 28034, 198, 198, 19849, 62, 5219, 796, 705, 19849, 62, 5219, 13, 457, 6, 198, 2213, 10613, 62, 5219, 796, 705, 2213, 10613, 62, 5219, 13, 457, ...
3.022727
44
import numpy as np import torch import os import cv2 import importlib from dataset import * from PIL import Image from argparse import ArgumentParser from torch.autograd import Variable from torch.utils.data import DataLoader from torchvision.transforms import Compose, CenterCrop, Normalize, Resize from torchvision.tr...
[ 11748, 299, 32152, 355, 45941, 198, 11748, 28034, 198, 11748, 28686, 198, 11748, 269, 85, 17, 198, 11748, 1330, 8019, 198, 6738, 27039, 1330, 1635, 198, 6738, 350, 4146, 1330, 7412, 198, 6738, 1822, 29572, 1330, 45751, 46677, 198, 198, ...
3.029106
481
import pytest from pytest import raises from pydantic_jsonapi.resource_linkage import ResourceLinkage from pydantic import BaseModel, ValidationError
[ 11748, 12972, 9288, 198, 6738, 12972, 9288, 1330, 12073, 198, 198, 6738, 279, 5173, 5109, 62, 17752, 15042, 13, 31092, 62, 8726, 496, 1330, 20857, 11280, 496, 198, 6738, 279, 5173, 5109, 1330, 7308, 17633, 11, 3254, 24765, 12331, 628, 1...
3.731707
41
import numpy as np from keras.datasets import mnist from keras.models import Sequential from keras.layers.core import Dense, Dropout, Activation from keras.optimizers import SGD from keras.utils import np_utils import keras.callbacks import keras.backend.tensorflow_backend as KTF import tensorflow as tf batch_size = 1...
[ 11748, 299, 32152, 355, 45941, 198, 6738, 41927, 292, 13, 19608, 292, 1039, 1330, 285, 77, 396, 198, 6738, 41927, 292, 13, 27530, 1330, 24604, 1843, 198, 6738, 41927, 292, 13, 75, 6962, 13, 7295, 1330, 360, 1072, 11, 14258, 448, 11, ...
2.407059
850
#!/usr/bin/env python3 # Copyright 2019-2021 ETH Zurich and the DaCe authors. All rights reserved. from dace.transformation.dataflow.streaming_memory import StreamingMemory from dace.transformation.interstate.sdfg_nesting import InlineSDFG from dace.transformation.interstate.fpga_transform_sdfg import FPGATransformSDF...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 18, 198, 2, 15069, 13130, 12, 1238, 2481, 35920, 43412, 290, 262, 9637, 34, 68, 7035, 13, 1439, 2489, 10395, 13, 198, 198, 6738, 288, 558, 13, 7645, 1161, 13, 7890, 11125, 13, 5532, 278, ...
2.395854
1,013
import math from typing import List, Union import torch import torch.nn as nn import torch.nn.functional as F from torch import Tensor if __name__ == "__main__": input = torch.zeros(1, 512, 13, 13) output = spatial_pyramid_pool(input, [1, 2, 3], "max") print(output.shape)
[ 11748, 10688, 198, 6738, 19720, 1330, 7343, 11, 4479, 198, 198, 11748, 28034, 198, 11748, 28034, 13, 20471, 355, 299, 77, 198, 11748, 28034, 13, 20471, 13, 45124, 355, 376, 198, 6738, 28034, 1330, 309, 22854, 628, 628, 198, 361, 11593, ...
2.788462
104
""" usage requires these additional modules pip install azure-batch azure-storage-blob jsonschema pyyaml && pip install git+https://github.com/microsoft/SparseSC.git@ad4bf27edb28f517508f6934f21eb65d17fb6543 && scgrad start usage: from SparseSC import fit, aggregate_batch_results from SparseSC.utils.azure_batch_clie...
[ 37811, 198, 26060, 4433, 777, 3224, 13103, 198, 198, 79, 541, 2721, 35560, 495, 12, 43501, 35560, 495, 12, 35350, 12, 2436, 672, 44804, 684, 2395, 2611, 12972, 88, 43695, 11405, 7347, 2721, 17606, 10, 5450, 1378, 12567, 13, 785, 14, 4...
2.545006
7,910
from .visual_entailment_dataset import VisualEntailmentDataset
[ 6738, 764, 41464, 62, 298, 603, 434, 62, 19608, 292, 316, 1330, 15612, 14539, 603, 434, 27354, 292, 316, 198 ]
3.15
20
# Basic Fantasy RPG Dungeoneer Suite # Copyright 2007-2012 Chris Gonnerman # All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions # are met: # # Redistributions of source code must retain the above copyright # no...
[ 2, 14392, 10982, 12909, 5648, 469, 505, 263, 26264, 198, 2, 15069, 4343, 12, 6999, 5180, 35371, 1008, 805, 198, 2, 1439, 2489, 10395, 13, 198, 2, 198, 2, 2297, 396, 3890, 290, 779, 287, 2723, 290, 13934, 5107, 11, 351, 393, 1231, ...
1.761238
6,718
from flask import Flask, current_app from flask import render_template from flask import jsonify from jieba.analyse import extract_tags import string from DB import chinaSQL from DB import worldSQL app = Flask(__name__, template_folder='../../web', static_folder='../../static') ...
[ 6738, 42903, 1330, 46947, 11, 1459, 62, 1324, 198, 6738, 42903, 1330, 8543, 62, 28243, 198, 6738, 42903, 1330, 33918, 1958, 198, 6738, 474, 494, 7012, 13, 38200, 325, 1330, 7925, 62, 31499, 198, 11748, 4731, 198, 6738, 20137, 1330, 442,...
3.12069
116
# Generated by Django 2.0.2 on 2018-02-17 10:50 from django.db import migrations, models
[ 2, 2980, 515, 416, 37770, 362, 13, 15, 13, 17, 319, 2864, 12, 2999, 12, 1558, 838, 25, 1120, 198, 198, 6738, 42625, 14208, 13, 9945, 1330, 15720, 602, 11, 4981, 628 ]
2.84375
32
#!/usr/bin/env python3 # Simple and dumb script to send a message to the #podman IRC channel on frenode # Based on example from: https://pythonspot.com/building-an-irc-bot/ import os import time import random import errno import socket import sys if len(sys.argv) < 3: print("Error: Must pass desired nick and me...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 18, 198, 198, 2, 17427, 290, 13526, 4226, 284, 3758, 257, 3275, 284, 262, 1303, 33320, 805, 30039, 6518, 319, 22832, 1098, 198, 2, 13403, 319, 1672, 422, 25, 3740, 1378, 79, 5272, 684, 13...
2.589744
234
from changes.api.base import APIView from changes.lib.coverage import get_coverage_by_build_id, merged_coverage_data from changes.models.build import Build
[ 6738, 2458, 13, 15042, 13, 8692, 1330, 3486, 3824, 769, 198, 198, 6738, 2458, 13, 8019, 13, 1073, 1857, 1330, 651, 62, 1073, 1857, 62, 1525, 62, 11249, 62, 312, 11, 23791, 62, 1073, 1857, 62, 7890, 198, 198, 6738, 2458, 13, 27530, ...
3.3125
48
"""Compliant mechanism synthesis problems using topology optimization.""" import numpy import scipy.sparse from ..problems import ElasticityProblem from .boundary_conditions import MechanismSynthesisBoundaryConditions from ..utils import deleterowcol
[ 37811, 38143, 3014, 9030, 21263, 2761, 1262, 1353, 1435, 23989, 526, 15931, 198, 198, 11748, 299, 32152, 198, 11748, 629, 541, 88, 13, 82, 29572, 198, 198, 6738, 11485, 1676, 22143, 1330, 48567, 414, 40781, 198, 6738, 764, 7784, 560, 62...
4.031746
63