content
stringlengths
1
1.05M
input_ids
listlengths
1
883k
ratio_char_token
float64
1
22.9
token_count
int64
1
883k
from unsync import unsync import asyncio import datetime import math import aiohttp import requests if __name__ == '__main__': main()
[ 6738, 555, 27261, 1330, 555, 27261, 198, 11748, 30351, 952, 198, 11748, 4818, 8079, 198, 11748, 10688, 198, 11748, 257, 952, 4023, 198, 11748, 7007, 628, 628, 628, 198, 198, 361, 11593, 3672, 834, 6624, 705, 834, 12417, 834, 10354, 198,...
3.085106
47
# coding=utf-8 # *** WARNING: this file was generated by the Pulumi Terraform Bridge (tfgen) Tool. *** # *** Do not edit by hand unless you're certain you know what you are doing! *** import warnings import pulumi import pulumi.runtime from typing import Any, Mapping, Optional, Sequence, Union, overload from .. import...
[ 2, 19617, 28, 40477, 12, 23, 198, 2, 17202, 39410, 25, 428, 2393, 373, 7560, 416, 262, 21624, 12994, 24118, 687, 10290, 357, 27110, 5235, 8, 16984, 13, 17202, 198, 2, 17202, 2141, 407, 4370, 416, 1021, 4556, 345, 821, 1728, 345, 760...
2.316254
1,132
"""Code for reading and writing results to google sheets""" from bs4 import BeautifulSoup import requests import warnings import json import pandas as pd from six.moves.urllib.parse import urlparse, parse_qs from six.moves.urllib.request import urlopen _CELLSET_ID = "AIzaSyC8Zo-9EbXgHfqNzDxVb_YS_IIZBWtvoJ4" def get...
[ 37811, 10669, 329, 3555, 290, 3597, 2482, 284, 23645, 15747, 37811, 198, 6738, 275, 82, 19, 1330, 23762, 50, 10486, 198, 11748, 7007, 198, 11748, 14601, 198, 11748, 33918, 198, 11748, 19798, 292, 355, 279, 67, 198, 6738, 2237, 13, 76, ...
1.987402
635
# -*- coding: utf-8 -* ''' 98 / \ 96 84 / \ / \ 92 82 78 47 / \ / \ / \ / \ 33 ...
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 198, 198, 7061, 6, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 198, 220, 220, 220, 220, 220...
1.511278
532
from ink2canvas.svg.AbstractShape import AbstractShape
[ 6738, 16882, 17, 5171, 11017, 13, 21370, 70, 13, 23839, 33383, 1330, 27741, 33383 ]
3.857143
14
import pandas datas = pandas.read_csv("../../Sample/example_dataset.csv", index_col=0) print(datas)
[ 11748, 19798, 292, 198, 198, 19608, 292, 796, 19798, 292, 13, 961, 62, 40664, 7203, 40720, 40720, 36674, 14, 20688, 62, 19608, 292, 316, 13, 40664, 1600, 6376, 62, 4033, 28, 15, 8, 198, 4798, 7, 19608, 292, 8, 198 ]
2.525
40
from flask import * app = Flask(__name__) import botty # ---------------------------------- # ----------------------------------- # ----------------------------------- # ----------------------------------- if __name__ == "__main__": app.debug = True app.run(host="0.0.0.0")
[ 6738, 42903, 1330, 1635, 198, 1324, 796, 46947, 7, 834, 3672, 834, 8, 198, 198, 11748, 10214, 774, 198, 198, 2, 20368, 438, 198, 2, 20368, 6329, 628, 198, 2, 20368, 6329, 198, 2, 20368, 6329, 198, 198, 361, 11593, 3672, 834, 6624, ...
3.776316
76
#!/usr/bin/env python3 import os DATABASE="/home/tomate/Warehouse/syte/meta.db" XLSDIR = "/mnt/c/Users/Natacha/Documents/TempDocs/progen/Formula/" temp = [i for i in next(os.walk(XLSDIR))[2] if i.endswith("xlsx") or i.endswith("xls")] flist = {} for i in temp: name = i.split(" ")[0].split("-")[0].split(".")[0] ...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 18, 198, 198, 11748, 28686, 198, 198, 35, 1404, 6242, 11159, 35922, 11195, 14, 39532, 378, 14, 38824, 4803, 14, 1837, 660, 14, 28961, 13, 9945, 1, 198, 55, 6561, 34720, 796, 12813, 76, 42...
2.147619
210
#!/usr/bin/env python import sys from setuptools import setup from setuptools.command.test import test as TestCommand setup( name='range-requests-proxy', version='0.1', description='Asynchronous HTTP proxy for HTTP Range Requests', author='Marko Trajkov', author_email='markostrajkov@gmail.com', ...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 198, 11748, 25064, 198, 6738, 900, 37623, 10141, 1330, 9058, 198, 6738, 900, 37623, 10141, 13, 21812, 13, 9288, 1330, 1332, 355, 6208, 21575, 628, 198, 198, 40406, 7, 198, 220, 220, 22...
2.554585
229
import os import pytest import torch import pytorch_pfn_extras.onnx as tou from tests.pytorch_pfn_extras_tests.onnx.test_export_testcase import Net
[ 11748, 28686, 198, 198, 11748, 12972, 9288, 198, 11748, 28034, 198, 198, 11748, 12972, 13165, 354, 62, 79, 22184, 62, 2302, 8847, 13, 261, 77, 87, 355, 2819, 198, 6738, 5254, 13, 9078, 13165, 354, 62, 79, 22184, 62, 2302, 8847, 62, ...
2.62069
58
#!/usr/bin/env python # -*- coding:UTF-8 -*- ''' @Description: @Author: Zpp @Date: 2020-05-28 13:44:29 @LastEditors: Zpp @LastEditTime: 2020-05-28 14:02:02 ''' params = { # 'fields': { 'type': { 'name': '', 'type': 'int', 'between': [1, 2, 3], 'required...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 2, 532, 9, 12, 19617, 25, 48504, 12, 23, 532, 9, 12, 198, 7061, 6, 198, 31, 11828, 25, 220, 198, 31, 13838, 25, 1168, 381, 198, 31, 10430, 25, 12131, 12, 2713, 12, 2078, 1511, ...
1.669405
487
import mxnet as mx
[ 11748, 285, 87, 3262, 355, 285, 87, 628 ]
2.5
8
import datetime import json from calendar import timegm from urllib.parse import parse_qsl import requests from allauth.socialaccount import models as aamodels from requests_oauthlib import OAuth1 from rest_framework import parsers, renderers from rest_framework import status from rest_framework.authtoken.models impor...
[ 11748, 4818, 8079, 198, 11748, 33918, 198, 6738, 11845, 1330, 640, 39870, 198, 6738, 2956, 297, 571, 13, 29572, 1330, 21136, 62, 80, 6649, 198, 198, 11748, 7007, 198, 6738, 477, 18439, 13, 14557, 23317, 1330, 4981, 355, 257, 321, 375, ...
2.6121
843
import requests import aiohttp from constants import API_KEY
[ 11748, 7007, 198, 198, 11748, 257, 952, 4023, 198, 6738, 38491, 1330, 7824, 62, 20373, 198 ]
3.875
16
""" En samling hjelpefunksjoner som bruker nvdbapiv3-funksjonene til gjre nyttige ting, f.eks. lagre geografiske datasett Disse hjelpefunksjonene forutsetter fungerende installasjon av geopandas, shapely og en del andre ting som m installeres separat. Noen av disse bibliotekene kunne historisk av og til vre plundret...
[ 37811, 198, 4834, 6072, 1359, 289, 73, 417, 431, 12543, 591, 73, 14491, 3870, 18145, 6122, 299, 85, 9945, 499, 452, 18, 12, 12543, 591, 46286, 1734, 21502, 220, 308, 73, 260, 299, 88, 926, 10045, 256, 278, 11, 277, 13, 2573, 13, 1...
1.986653
5,769
""" You are given the following information, but you may prefer to do some research for yourself. 1 Jan 1900 was a Monday. Thirty days has September, April, June and November. All the rest have thirty-one, Saving February alone, Which has twenty-eight, rain or shine. And on leap years, twen...
[ 37811, 198, 1639, 389, 1813, 262, 1708, 1321, 11, 475, 345, 743, 4702, 284, 466, 617, 2267, 329, 3511, 13, 628, 220, 220, 220, 352, 2365, 21489, 373, 257, 3321, 13, 198, 220, 220, 220, 29948, 1528, 468, 2693, 11, 198, 220, 220, 22...
3.02834
247
#!/usr/bin/env python3 # -*- encoding: utf-8 -*- """ Setup for the dbservice """ from setuptools import setup, find_packages setup( name='dbservice', version='0.9', description="Database service for storing meter data", author="Sren Aagaard Mikkelsen", author_email='smik@eng.au.dk', url='http...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 18, 198, 2, 532, 9, 12, 21004, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 198, 37811, 198, 40786, 329, 262, 288, 1443, 712, 501, 198, 37811, 198, 198, 6738, 900, 37623, 10141, 1330, 9058, ...
2.510638
188
# # -*- coding: utf-8 -*- # Copyright 2019 Red Hat # GNU General Public License v3.0+ # (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) """ The arg spec for the junos facts module. """ from __future__ import absolute_import, division, print_function __metaclass__ = type
[ 2, 198, 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 2, 15069, 13130, 2297, 10983, 198, 2, 22961, 3611, 5094, 13789, 410, 18, 13, 15, 10, 198, 2, 357, 3826, 27975, 45761, 393, 3740, 1378, 2503, 13, 41791, 13, 2...
2.858586
99
from flask_restful import Resource, reqparse from firebase_admin import auth as firebase_auth from dbcls.models import User parser = reqparse.RequestParser() parser.add_argument('token', type=str, required=True, nullable=False)
[ 6738, 42903, 62, 2118, 913, 1330, 20857, 11, 43089, 29572, 198, 6738, 2046, 8692, 62, 28482, 1330, 6284, 355, 2046, 8692, 62, 18439, 198, 198, 6738, 20613, 565, 82, 13, 27530, 1330, 11787, 628, 198, 48610, 796, 43089, 29572, 13, 18453, ...
3.515152
66
#Import required modules import requests import json # Get json results for the required input InputString = "kobe is a basketball player" headers = { 'Content-type': 'application/json', } data = '{"text":InputString = '+ InputString + '}' response = requests.post('http://66.76.242.198:9888/', d...
[ 2, 20939, 2672, 13103, 201, 198, 11748, 7007, 201, 198, 11748, 33918, 201, 198, 201, 198, 2, 3497, 33918, 2482, 329, 262, 2672, 5128, 220, 201, 198, 201, 198, 20560, 10100, 796, 366, 74, 5910, 318, 257, 9669, 2137, 1, 201, 198, 201,...
2.932099
162
# coding=utf-8 # Copyright 2018 The Google AI Language Team 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 of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by ...
[ 2, 19617, 28, 40477, 12, 23, 198, 2, 15069, 2864, 383, 3012, 9552, 15417, 4816, 46665, 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,...
3.055394
343
default_bot = 'example_bots.any_to_any.bot.AnyToAny'
[ 12286, 62, 13645, 796, 705, 20688, 62, 42478, 13, 1092, 62, 1462, 62, 1092, 13, 13645, 13, 7149, 2514, 7149, 6, 198 ]
2.409091
22
from server import roles
[ 6738, 4382, 1330, 9176, 628, 628, 628, 628, 198 ]
3.666667
9
import csv import logging import os import shutil from csv import DictWriter # noqa: F401 from pyhocon import ConfigTree, ConfigFactory # noqa: F401 from typing import Dict, Any # noqa: F401 from databuilder.job.base_job import Job from databuilder.loader.base_loader import Loader from databuilder.models.neo4j_csv...
[ 11748, 269, 21370, 198, 11748, 18931, 198, 11748, 28686, 198, 11748, 4423, 346, 198, 6738, 269, 21370, 1330, 360, 713, 34379, 220, 1303, 645, 20402, 25, 376, 21844, 198, 198, 6738, 12972, 71, 36221, 1330, 17056, 27660, 11, 17056, 22810, ...
2.781553
206
# -*- coding: utf-8 -*- """ @author: Hiromasa Kaneko """ import pandas as pd from sklearn.neighbors import NearestNeighbors # k-NN k_in_knn = 5 # k-NN k rate_of_training_samples_inside_ad = 0.96 # AD AD dataset = pd.read_csv('resin.csv', index_col=0, header=0) x_prediction = pd.read_csv('resin_predic...
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 201, 198, 37811, 201, 198, 31, 9800, 25, 29379, 296, 15462, 14248, 988, 78, 201, 198, 37811, 201, 198, 201, 198, 11748, 19798, 292, 355, 279, 67, 201, 198, 6738, 1341, 3572...
2.144928
1,173
#!/usr/bin/python """ """ from mininet.net import Mininet from mininet.node import Controller, RemoteController, OVSKernelSwitch,UserSwitch #OVSLegacyKernelSwitch, UserSwitch from mininet.cli import CLI from mininet.log import setLogLevel from mininet.link import Link, TCLink #conf_port=50000 conf_ip_1='10.0.0.254'...
[ 2, 48443, 14629, 14, 8800, 14, 29412, 198, 220, 198, 37811, 198, 37811, 198, 6738, 949, 42504, 13, 3262, 1330, 1855, 42504, 198, 6738, 949, 42504, 13, 17440, 1330, 22741, 11, 21520, 22130, 11, 440, 53, 18831, 7948, 38978, 11, 12982, 3...
1.995
1,400
#Definicion de la clase #antes de empezar una clase se declara de la siguiente manera
[ 198, 2, 7469, 47277, 295, 390, 8591, 537, 589, 198, 2, 39781, 390, 795, 431, 41046, 555, 64, 537, 589, 384, 2377, 3301, 390, 8591, 43237, 84, 1153, 68, 582, 8607, 628, 198 ]
2.69697
33
""" Migration script to add 'ldda_id' column to the implicitly_converted_dataset_association table. """ from __future__ import print_function import logging from sqlalchemy import ( Column, ForeignKey, Integer, MetaData ) from galaxy.model.migrate.versions.util import ( add_column, drop_colum...
[ 37811, 198, 44, 4254, 4226, 284, 751, 705, 335, 6814, 62, 312, 6, 5721, 284, 262, 31821, 62, 1102, 13658, 62, 19608, 292, 316, 62, 562, 41003, 3084, 13, 198, 37811, 198, 6738, 11593, 37443, 834, 1330, 3601, 62, 8818, 198, 198, 11748...
2.879699
133
votes_t_shape = [3, 0, 1, 2] for i in range(6 - 4): votes_t_shape += [i + 4] print(votes_t_shape)
[ 29307, 62, 83, 62, 43358, 796, 685, 18, 11, 657, 11, 352, 11, 362, 60, 198, 1640, 1312, 287, 2837, 7, 21, 532, 604, 2599, 198, 220, 220, 220, 5690, 62, 83, 62, 43358, 15853, 685, 72, 1343, 604, 60, 198, 4798, 7, 29307, 62, 83,...
2.04
50
import numpy as np import itertools import gpuscheduler import argparse import os import uuid import hashlib import glob import math from itertools import product from torch.optim.lr_scheduler import OneCycleLR from os.path import join parser = argparse.ArgumentParser(description='Compute script.') parser.add_argumen...
[ 11748, 299, 32152, 355, 45941, 198, 11748, 340, 861, 10141, 198, 11748, 27809, 385, 1740, 18173, 198, 11748, 1822, 29572, 198, 11748, 28686, 198, 11748, 334, 27112, 198, 11748, 12234, 8019, 198, 11748, 15095, 198, 11748, 10688, 198, 6738, ...
2.207294
3,729
from boa3.builtin import public from boa3.builtin.contract import Nep5TransferEvent transfer = Nep5TransferEvent
[ 6738, 1489, 64, 18, 13, 18780, 259, 1330, 1171, 198, 198, 6738, 1489, 64, 18, 13, 18780, 259, 13, 28484, 1330, 15310, 20, 43260, 9237, 628, 198, 39437, 796, 15310, 20, 43260, 9237, 628 ]
3.441176
34
# The Topical Guide # Copyright 2010-2011 Brigham Young University # # This file is part of the Topical Guide <http://nlp.cs.byu.edu/topic_browser>. # # The Topical Guide is free software: you can redistribute it and/or modify it # under the terms of the GNU Affero General Public License as published by the # Free Soft...
[ 2, 383, 5849, 605, 10005, 198, 2, 15069, 3050, 12, 9804, 37434, 6960, 2059, 198, 2, 198, 2, 770, 2393, 318, 636, 286, 262, 5849, 605, 10005, 1279, 4023, 1378, 21283, 79, 13, 6359, 13, 1525, 84, 13, 15532, 14, 26652, 62, 40259, 284...
3.70137
365
"""Tests for merge.py.""" from __future__ import absolute_import, division, print_function from glob import glob import os import tarfile import tempfile from neurodocker.docker import client from neurodocker.reprozip.trace import ReproZipMinimizer from neurodocker.reprozip.merge import merge_pack_files def _creat...
[ 37811, 51, 3558, 329, 20121, 13, 9078, 526, 15931, 198, 198, 6738, 11593, 37443, 834, 1330, 4112, 62, 11748, 11, 7297, 11, 3601, 62, 8818, 198, 198, 6738, 15095, 1330, 15095, 198, 11748, 28686, 198, 11748, 13422, 7753, 198, 11748, 20218...
2.474286
350
""" HTML5 contexts. :author: Dominik Lang :license: MIT """ import contextlib import io import sys __all__ = ['create_document', 'tag', 'as_link']
[ 37811, 201, 198, 28656, 20, 26307, 13, 201, 198, 201, 198, 25, 9800, 25, 11817, 1134, 16332, 201, 198, 25, 43085, 25, 17168, 201, 198, 37811, 201, 198, 201, 198, 11748, 4732, 8019, 201, 198, 11748, 33245, 201, 198, 11748, 25064, 201, ...
2.324324
74
""" Jonathan Zacsh's solution to homework #3, Nov 14., Part I """ # Per homework instructions, following lead from matlab example by professor: # http://comet.lehman.cuny.edu/schneider/Fall17/CMP464/Maple/PartialDerivatives1.pdf import sys import tensorflow as tf import tempfile import os import numpy as np os.envir...
[ 37811, 198, 30365, 44922, 1477, 338, 4610, 284, 26131, 1303, 18, 11, 5267, 1478, 1539, 2142, 314, 198, 37811, 198, 2, 2448, 26131, 7729, 11, 1708, 1085, 422, 2603, 23912, 1672, 416, 6240, 25, 198, 2, 220, 220, 2638, 1378, 785, 316, ...
2.415507
503
import torch import torch.nn as nn import numpy as np import matplotlib matplotlib.use("Agg") import matplotlib.pyplot as plt import pandas as pd from sklearn.metrics import * from sklearn.metrics import precision_recall_fscore_support as prfs device = torch.device('cuda:0' if torch.cuda.is_available() else 'cpu')
[ 11748, 28034, 198, 11748, 28034, 13, 20471, 355, 299, 77, 198, 11748, 299, 32152, 355, 45941, 198, 11748, 2603, 29487, 8019, 198, 6759, 29487, 8019, 13, 1904, 7203, 46384, 4943, 198, 11748, 2603, 29487, 8019, 13, 9078, 29487, 355, 458, ...
3.009434
106
""" Celery queued tasks for Helios 2010-08-01 ben@adida.net """ import copy from celery import shared_task from celery.utils.log import get_logger import signals from models import CastVote, Election, Voter, VoterFile from view_utils import render_template_raw
[ 37811, 198, 34, 417, 1924, 8358, 1739, 8861, 329, 5053, 4267, 198, 198, 10333, 12, 2919, 12, 486, 198, 11722, 31, 324, 3755, 13, 3262, 198, 37811, 198, 11748, 4866, 198, 6738, 18725, 1924, 1330, 4888, 62, 35943, 198, 6738, 18725, 1924...
3.238095
84
""" pytest fixtures """ import unittest.mock as mock import pytest import virtual_dealer.api
[ 37811, 198, 9078, 9288, 34609, 198, 37811, 198, 11748, 555, 715, 395, 13, 76, 735, 355, 15290, 198, 11748, 12972, 9288, 198, 11748, 7166, 62, 31769, 263, 13, 15042, 628, 628, 628 ]
3.0625
32
from xml.etree import ElementTree from casexml.apps.case.tests.util import check_xml_line_by_line from casexml.apps.case.xml import V2 from corehq.apps.fixtures import fixturegenerators from corehq.apps.fixtures.models import FixtureDataItem, FixtureDataType, FixtureOwnership, FixtureTypeField, \ FixtureItemField, ...
[ 6738, 35555, 13, 316, 631, 1330, 11703, 27660, 198, 6738, 1339, 19875, 13, 18211, 13, 7442, 13, 41989, 13, 22602, 1330, 2198, 62, 19875, 62, 1370, 62, 1525, 62, 1370, 198, 6738, 1339, 19875, 13, 18211, 13, 7442, 13, 19875, 1330, 569, ...
3.277778
162
# -*- coding: utf-8 -*- """We define custom Django signals to trigger before executing searches.""" from django.db.models.signals import post_save, pre_delete from django.dispatch import receiver from django_elasticsearch_dsl.apps import DEDConfig from readthedocs.projects.models import HTMLFile, Project from readthe...
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 198, 37811, 1135, 8160, 2183, 37770, 10425, 284, 7616, 878, 23710, 15455, 526, 15931, 198, 6738, 42625, 14208, 13, 9945, 13, 27530, 13, 12683, 874, 1330, 1281, 62, 21928, ...
3.22069
145
"""Internal API endpoint constant library. _______ __ _______ __ __ __ | _ .----.-----.--.--.--.--| | _ | |_.----|__| |--.-----. |. 1___| _| _ | | | | _ | 1___| _| _| | <| -__| |. |___|__| |_____|________|_____|____ |____|__| |__|__|__|_____| |: 1 | ...
[ 37811, 37693, 7824, 36123, 6937, 5888, 13, 628, 220, 37405, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 11593, 220, 37405, 11593, 220, 220, 220, 220, 220, 220, ...
2.54583
1,451
import itertools import sys from signal import SIGINT, default_int_handler, signal from typing import Any, Dict, List from pip._vendor.progress.bar import Bar, FillingCirclesBar, IncrementalBar from pip._vendor.progress.spinner import Spinner from pip._internal.utils.compat import WINDOWS from pip._internal....
[ 11748, 340, 861, 10141, 201, 198, 11748, 25064, 201, 198, 6738, 6737, 1330, 33993, 12394, 11, 4277, 62, 600, 62, 30281, 11, 6737, 201, 198, 6738, 19720, 1330, 4377, 11, 360, 713, 11, 7343, 201, 198, 201, 198, 6738, 7347, 13557, 85, ...
2.557
1,000
import typing import numpy as np import scripts.study_case.ID_5.matchzoo as mz from scripts.study_case.ID_5.matchzoo.engine.base_metric import BaseMetric from .tuner import Tuner def tune( params: 'mz.ParamTable', optimizer: str = 'adam', trainloader: mz.dataloader.DataLoader = None, validloader: mz...
[ 11748, 19720, 198, 198, 11748, 299, 32152, 355, 45941, 198, 198, 11748, 14750, 13, 44517, 62, 7442, 13, 2389, 62, 20, 13, 15699, 89, 2238, 355, 285, 89, 198, 6738, 14750, 13, 44517, 62, 7442, 13, 2389, 62, 20, 13, 15699, 89, 2238, ...
2.464373
1,628
"""Tests for the pixel observation wrapper.""" from typing import Optional import pytest import numpy as np import gym from gym import spaces from gym.wrappers.pixel_observation import PixelObservationWrapper, STATE_KEY
[ 37811, 51, 3558, 329, 262, 17465, 13432, 29908, 526, 15931, 198, 6738, 19720, 1330, 32233, 198, 198, 11748, 12972, 9288, 198, 11748, 299, 32152, 355, 45941, 198, 198, 11748, 11550, 198, 6738, 11550, 1330, 9029, 198, 6738, 11550, 13, 29988...
3.766667
60
import pyaudio import wave from scipy.fftpack import fft, ifft import numpy as np import matplotlib.pyplot as plt import cv2 from scipy import signal from swan import pycwt CHUNK = 1024 FORMAT = pyaudio.paInt16 # int16 CHANNELS = 1 # 1;monoral 2;- RATE = 22100 # 22.1kHz 44.1kHz RECORD_SECONDS =...
[ 11748, 12972, 24051, 198, 11748, 6769, 198, 6738, 629, 541, 88, 13, 487, 83, 8002, 1330, 277, 701, 11, 611, 701, 198, 11748, 299, 32152, 355, 45941, 198, 11748, 2603, 29487, 8019, 13, 9078, 29487, 355, 458, 83, 198, 11748, 269, 85, ...
1.957759
1,089
#/ <reference path="./testBlocks/mb.ts" /> basic.forever(function_0)
[ 2, 14, 1279, 35790, 3108, 28, 1911, 14, 9288, 45356, 14, 2022, 13, 912, 1, 11037, 198, 35487, 13, 754, 332, 7, 8818, 62, 15, 8 ]
2.615385
26
#!/usr/bin/env python # -*- coding:utf-8 -*- import random import numpy as np import matplotlib.pyplot as plt robot = Robot() robot.set(0, 1, 0) robot.set_noise(0.1,0.05) x_trajectory, y_trajectory = run(robot, 0.1, 1.0) n = len(x_trajectory) fig, ax1 = plt.subplots(1, 1, figsize=(8, 8)) ax1...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 2, 532, 9, 12, 19617, 25, 40477, 12, 23, 532, 9, 12, 220, 198, 198, 11748, 4738, 198, 220, 198, 11748, 299, 32152, 355, 45941, 198, 220, 198, 11748, 2603, 29487, 8019, 13, 9078, 29...
2.00885
226
from .clip_sampler import DistributedSampler, UniformClipSampler, RandomClipSampler __all__ = ("DistributedSampler", "UniformClipSampler", "RandomClipSampler")
[ 6738, 764, 15036, 62, 37687, 20053, 1330, 4307, 6169, 16305, 20053, 11, 35712, 2601, 541, 16305, 20053, 11, 14534, 2601, 541, 16305, 20053, 198, 198, 834, 439, 834, 796, 5855, 20344, 6169, 16305, 20053, 1600, 366, 3118, 6933, 2601, 541, ...
3.156863
51
# # PySNMP MIB module HH3C-PPPOE-SERVER-MIB (http://snmplabs.com/pysmi) # ASN.1 source file:///Users/davwang4/Dev/mibs.snmplabs.com/asn1/HH3C-PPPOE-SERVER-MIB # Produced by pysmi-0.3.4 at Mon Apr 29 19:16:17 2019 # On host DAVWANG4-M-1475 platform Darwin version 18.5.0 by user davwang4 # Using Python version 3.7.3 (def...
[ 2, 198, 2, 9485, 15571, 7378, 337, 9865, 8265, 47138, 18, 34, 12, 10246, 16402, 36, 12, 35009, 5959, 12, 8895, 33, 357, 4023, 1378, 16184, 76, 489, 8937, 13, 785, 14, 79, 893, 11632, 8, 198, 2, 7054, 45, 13, 16, 2723, 2393, 1378...
2.462229
2,118
name = input("masukkan nama pembeli = ") alamat= input("Alamat = ") NoTelp = input("No Telp = ") print("\n") print("=================INFORMASI HARGA MOBIL DEALER JAYA ABADI===============") print("Pilih Jenis Mobil :") print("\t 1.Daihatsu ") print("\t 2.Honda ") print("\t 3.Toyota ") print("") pilihan = int(input("Pil...
[ 3672, 796, 5128, 7203, 5356, 2724, 27541, 299, 1689, 279, 368, 6667, 72, 796, 366, 8, 198, 44949, 265, 28, 5128, 7203, 2348, 321, 265, 796, 366, 8, 198, 2949, 33317, 79, 796, 5128, 7203, 2949, 12088, 79, 796, 366, 8, 198, 4798, 72...
1.916432
1,065
""" Copyright 2020 The OneFlow Authors. All rights reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agr...
[ 37811, 198, 15269, 12131, 383, 1881, 37535, 46665, 13, 1439, 2489, 10395, 13, 198, 198, 26656, 15385, 739, 262, 24843, 13789, 11, 10628, 362, 13, 15, 357, 1169, 366, 34156, 15341, 198, 5832, 743, 407, 779, 428, 2393, 2845, 287, 11846, ...
3.681416
226
import unittest import datetime from dida import schemas, triggers from marshmallow import ValidationError
[ 11748, 555, 715, 395, 198, 11748, 4818, 8079, 198, 198, 6738, 750, 64, 1330, 3897, 5356, 11, 20022, 198, 6738, 22397, 42725, 1330, 3254, 24765, 12331, 628 ]
4.037037
27
from django.shortcuts import render from rest_framework import status from rest_framework.generics import ( ListAPIView, ListCreateAPIView, ListAPIView, RetrieveUpdateAPIView,) from rest_framework.response import Response from rest_framework.permissions import IsAuthenticated from rest_framework.decorat...
[ 6738, 42625, 14208, 13, 19509, 23779, 1330, 8543, 198, 6738, 1334, 62, 30604, 1330, 3722, 198, 6738, 1334, 62, 30604, 13, 8612, 873, 1330, 357, 198, 220, 220, 220, 7343, 2969, 3824, 769, 11, 198, 220, 220, 220, 7343, 16447, 2969, 3824...
3.117175
623
# -*- coding: utf-8 -*- """ Example to train and evaluate a model with given data @author: Quoc-Tuan Truong <tuantq.vnu@gmail.com> """ from cornac.data import Reader from cornac.eval_methods import BaseMethod from cornac.models import MF from cornac.metrics import MAE, RMSE from cornac.utils import cache # Download...
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 198, 37811, 198, 16281, 284, 4512, 290, 13446, 257, 2746, 351, 1813, 1366, 198, 198, 31, 9800, 25, 2264, 420, 12, 51, 7258, 13616, 506, 1279, 28047, 415, 80, 13, 85, ...
2.525907
386
import os import numpy as np import cv2 import albumentations from PIL import Image from torch.utils.data import Dataset from taming.data.sflckr import SegmentationBase # for examples included in repo # With semantic map and scene label if __name__ == "__main__": dset = ADE20kValidation() ex = dset[0] ...
[ 11748, 28686, 198, 11748, 299, 32152, 355, 45941, 198, 11748, 269, 85, 17, 198, 11748, 435, 65, 1713, 602, 198, 6738, 350, 4146, 1330, 7412, 198, 6738, 28034, 13, 26791, 13, 7890, 1330, 16092, 292, 316, 198, 198, 6738, 256, 3723, 13, ...
2.397059
204
#!/usr/bin/env python3 """ fr_distributed_cleanup.py - a script to remove hosts which have migrated to other feeder hubs. To be run on Federated Reporting superhub after each import of feeder data. First, to setup, enable fr_distributed_cleanup by setting a class in augments (def.json). This enables policy in cfe_inte...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 18, 198, 37811, 198, 8310, 62, 17080, 6169, 62, 27773, 929, 13, 9078, 532, 257, 4226, 284, 4781, 11453, 543, 423, 40227, 284, 198, 847, 3745, 263, 38459, 13, 1675, 307, 1057, 319, 35089, ...
2.976744
774
#Doesn't work. import time fibonacci = [1, 1] n = int(input()) while len(fibonacci) < n: fibonacci.append(fibonacci[-1] + fibonacci[-2]) for i in range(n): print(fibonacci[i], end=' ')
[ 2, 13921, 77, 470, 670, 13, 201, 198, 11748, 640, 201, 198, 201, 198, 69, 571, 261, 44456, 796, 685, 16, 11, 352, 60, 201, 198, 77, 796, 493, 7, 15414, 28955, 201, 198, 4514, 18896, 7, 69, 571, 261, 44456, 8, 1279, 299, 25, 20...
2.009901
101
from setuptools import setup setup(name="csgoinvshuffle")
[ 6738, 900, 37623, 10141, 1330, 9058, 198, 198, 40406, 7, 3672, 2625, 6359, 2188, 16340, 1477, 18137, 4943, 198 ]
3.105263
19
""" basic logging functionality based on a producer/consumer scheme. XXX implement this API: (maybe put it into slogger.py?) log = Logger( info=py.log.STDOUT, debug=py.log.STDOUT, command=None) log.info("hello", "world") log...
[ 37811, 201, 198, 35487, 18931, 11244, 1912, 319, 257, 9920, 14, 49827, 7791, 13, 201, 198, 201, 198, 43145, 3494, 428, 7824, 25, 357, 25991, 1234, 340, 656, 25801, 1362, 13, 9078, 10091, 201, 198, 201, 198, 220, 220, 220, 220, 220, ...
2.118959
538
import re from model.contact import Contact
[ 11748, 302, 198, 6738, 2746, 13, 32057, 1330, 14039, 628, 628, 628 ]
4.083333
12
""" ABP analyzer and graphics tests """ cases = [ ('Run Pymodel Graphics to generate dot file from FSM model, no need use pma', 'pmg ABP'), ('Generate SVG file from dot', 'dotsvg ABP'), # Now display ABP.dot in browser ('Run PyModel Analyzer to generate FSM from original FSM, should be the...
[ 37811, 198, 6242, 47, 4284, 9107, 290, 9382, 5254, 198, 37811, 198, 198, 33964, 796, 685, 198, 220, 220, 220, 19203, 10987, 9485, 19849, 19840, 284, 7716, 16605, 2393, 422, 376, 12310, 2746, 11, 645, 761, 779, 279, 2611, 3256, 198, 22...
2.78341
217
# Generated by Django 3.1.2 on 2020-10-26 12:21 from django.db import migrations, models import django.db.models.deletion
[ 2, 2980, 515, 416, 37770, 513, 13, 16, 13, 17, 319, 12131, 12, 940, 12, 2075, 1105, 25, 2481, 198, 198, 6738, 42625, 14208, 13, 9945, 1330, 15720, 602, 11, 4981, 198, 11748, 42625, 14208, 13, 9945, 13, 27530, 13, 2934, 1616, 295, ...
2.818182
44
""" PackageTools - A set of tools to aid working with packages. Copyright (c) 1998-2000, Marc-Andre Lemburg; mailto:mal@lemburg.com Copyright (c) 2000-2015, eGenix.com Software GmbH; mailto:info@egenix.com See the documentation for further information on copyrights, or contact the author. All Rights Re...
[ 37811, 15717, 33637, 532, 317, 900, 286, 4899, 284, 6133, 1762, 351, 10392, 13, 628, 220, 220, 220, 15069, 357, 66, 8, 7795, 12, 11024, 11, 13067, 12, 31258, 20607, 7423, 26, 6920, 1462, 25, 7617, 31, 293, 2022, 3686, 13, 785, 198, ...
2.360252
4,916
"""Regression tests for what was in Python 2's "urllib" module""" import urllib.parse import urllib.request import urllib.error import http.client import email.message import io import unittest from unittest.mock import patch from test import support import os try: import ssl except ImportError: ssl = None imp...
[ 37811, 8081, 2234, 5254, 329, 644, 373, 287, 11361, 362, 338, 366, 333, 297, 571, 1, 8265, 37811, 198, 198, 11748, 2956, 297, 571, 13, 29572, 198, 11748, 2956, 297, 571, 13, 25927, 198, 11748, 2956, 297, 571, 13, 18224, 198, 11748, ...
2.1875
2,528
# Python 2 and 3 from __future__ import unicode_literals from ...models import Address, SeasonalPriceBand from ..base import Product
[ 2, 11361, 362, 290, 513, 198, 6738, 11593, 37443, 834, 1330, 28000, 1098, 62, 17201, 874, 198, 198, 6738, 2644, 27530, 1330, 17917, 11, 7369, 282, 18124, 31407, 198, 198, 6738, 11485, 8692, 1330, 8721, 628 ]
3.777778
36
from discord.ext import commands import json import random with open("assets/json/questions.json") as data: data = json.load(data) dares = data["dares"]
[ 6738, 36446, 13, 2302, 1330, 9729, 198, 11748, 33918, 198, 11748, 4738, 628, 198, 4480, 1280, 7203, 19668, 14, 17752, 14, 6138, 507, 13, 17752, 4943, 355, 1366, 25, 198, 220, 220, 220, 1366, 796, 33918, 13, 2220, 7, 7890, 8, 198, 22...
3
55
APIC_IP="sandboxapic.cisco.com" APIC_PORT="443" GROUP='group-xx'
[ 2969, 2149, 62, 4061, 2625, 38142, 3524, 499, 291, 13, 66, 4861, 13, 785, 1, 198, 2969, 2149, 62, 15490, 2625, 34938, 1, 198, 46846, 11639, 8094, 12, 5324, 6, 198 ]
2.096774
31
# Copyright 2013-2015 David Mohr # # 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 writi...
[ 2, 15069, 2211, 12, 4626, 3271, 9719, 81, 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, ...
3.714286
175
# encoding: utf-8 import sys from market_maker import OrderManager from settings import * import os from pymongo import MongoClient, ASCENDING from pymongo.errors import ConnectionFailure from datetime import datetime , timedelta import numpy as np ################################################################...
[ 2, 21004, 25, 3384, 69, 12, 23, 198, 198, 11748, 25064, 198, 198, 6738, 1910, 62, 10297, 1330, 8284, 13511, 198, 6738, 6460, 1330, 1635, 198, 11748, 28686, 198, 198, 6738, 279, 4948, 25162, 1330, 42591, 11792, 11, 25400, 10619, 2751, ...
4.668571
175
# -*- coding: utf-8 -*- # Copyright (c) 2008-2013 LOGILAB S.A. (Paris, FRANCE). # http://www.logilab.fr/ -- mailto:contact@logilab.fr # # 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 ver...
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 2, 15069, 357, 66, 8, 3648, 12, 6390, 41605, 4146, 6242, 311, 13, 32, 13, 357, 40313, 11, 8782, 19240, 737, 198, 2, 2638, 1378, 2503, 13, 6404, 346, 397, 13, 8310, ...
3.522184
293
import logging from ariadne import MutationType, convert_kwargs_to_snake_case from config import clients, messages, queue mutation = MutationType()
[ 11748, 18931, 198, 6738, 257, 21244, 710, 1330, 337, 7094, 6030, 11, 10385, 62, 46265, 22046, 62, 1462, 62, 16184, 539, 62, 7442, 198, 6738, 4566, 1330, 7534, 11, 6218, 11, 16834, 198, 198, 76, 7094, 796, 337, 7094, 6030, 3419, 628, ...
3.511628
43
import os from django.conf import settings from django.template.loader import render_to_string from django.utils import timezone import json import requests from urllib.parse import quote, urlencode from hc.accounts.models import Profile from hc.lib import emails from hc.lib.string import replace try: import app...
[ 11748, 28686, 198, 198, 6738, 42625, 14208, 13, 10414, 1330, 6460, 198, 6738, 42625, 14208, 13, 28243, 13, 29356, 1330, 8543, 62, 1462, 62, 8841, 198, 6738, 42625, 14208, 13, 26791, 1330, 640, 11340, 198, 11748, 33918, 198, 11748, 7007, ...
2.800712
281
#!/usr/bin/env python3 # # Copyright 2022 Graviti. Licensed under MIT License. # """Portex type builder related classes.""" from hashlib import md5 from pathlib import Path from shutil import rmtree from subprocess import PIPE, CalledProcessError, run from tempfile import gettempdir from typing import TYPE_CHECKING, ...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 18, 198, 2, 198, 2, 15069, 33160, 32599, 8846, 13, 49962, 739, 17168, 13789, 13, 198, 2, 198, 37811, 13924, 1069, 2099, 27098, 3519, 6097, 526, 15931, 628, 198, 6738, 12234, 8019, 1330, 452...
3.295259
464
from typing import Dict, List, Any from ..df.types import Definition from ..df.base import op from ..util.data import traverse_get MAPPING = Definition(name="mapping", primitive="map") MAPPING_TRAVERSE = Definition(name="mapping_traverse", primitive="List[str]") MAPPING_KEY = Definition(name="key", primitive="str") M...
[ 6738, 19720, 1330, 360, 713, 11, 7343, 11, 4377, 198, 198, 6738, 11485, 7568, 13, 19199, 1330, 30396, 198, 6738, 11485, 7568, 13, 8692, 1330, 1034, 198, 6738, 11485, 22602, 13, 7890, 1330, 38138, 62, 1136, 198, 198, 44, 24805, 2751, 7...
3.301724
116
import time import sys import pkg_resources import os import retrying from sqlalchemy.exc import IntegrityError # anchore modules import anchore_engine.clients.services.common import anchore_engine.subsys.servicestatus import anchore_engine.subsys.metrics from anchore_engine.subsys import logger from anchore_engine.c...
[ 11748, 640, 198, 11748, 25064, 198, 11748, 279, 10025, 62, 37540, 198, 11748, 28686, 198, 11748, 1005, 14992, 198, 198, 6738, 44161, 282, 26599, 13, 41194, 1330, 39348, 12331, 198, 198, 2, 12619, 382, 13103, 198, 11748, 12619, 382, 62, ...
2.486239
2,071
"""Scraper for Supreme Court of U.S. CourtID: scotus Court Short Name: scotus History: - 2014-07-20 - Created by Andrei Chelaru, reviewed by MLR - 2017-10-09 - Updated by MLR. """ from datetime import datetime from juriscraper.OralArgumentSite import OralArgumentSite
[ 37811, 3351, 38545, 329, 5617, 3078, 286, 471, 13, 50, 13, 198, 36699, 2389, 25, 629, 313, 385, 198, 36699, 10073, 6530, 25, 629, 313, 385, 198, 18122, 25, 198, 532, 1946, 12, 2998, 12, 1238, 532, 15622, 416, 10948, 72, 11425, 11493...
3.067416
89
# -*- coding: utf-8 -*- import argparse import os import shutil import time import numpy as np import random from collections import OrderedDict import torch import torch.backends.cudnn as cudnn from callbacks import AverageMeter from data_utils.causal_data_loader_frames import VideoFolder from utils impo...
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 201, 198, 201, 198, 11748, 1822, 29572, 201, 198, 11748, 28686, 201, 198, 11748, 4423, 346, 201, 198, 11748, 640, 201, 198, 11748, 299, 32152, 355, 45941, 201, 198, 11748, 47...
2.423331
2,726
# encoding: utf-8 from flask import Flask from flask_sqlalchemy import SQLAlchemy from flask_cors import CORS import logging app = Flask(__name__) CORS(app, resources={r"/*": {"origins": "*"}}) app.config.from_object('config.current') db = SQLAlchemy(app) logger = logging.getLogger(__name__) log...
[ 2, 21004, 25, 3384, 69, 12, 23, 201, 198, 201, 198, 6738, 42903, 1330, 46947, 201, 198, 6738, 42903, 62, 25410, 282, 26599, 1330, 16363, 2348, 26599, 201, 198, 6738, 42903, 62, 66, 669, 1330, 327, 20673, 201, 198, 201, 198, 201, 198...
2.600858
233
from Module import AbstractModule
[ 6738, 19937, 1330, 27741, 26796, 628, 628 ]
5.285714
7
from string import Template import re if __name__ == '__main__': template_str = '${0} is Aug.' t = PositionalArgumentTemplate(template_str) print(template_str) print(dir(t)) print(t.delimiter) print(t.idpattern) print(type(t.idpattern)) print(t.flags) print(t.pattern) print(t.s...
[ 6738, 4731, 1330, 37350, 198, 11748, 302, 628, 198, 361, 11593, 3672, 834, 6624, 705, 834, 12417, 834, 10354, 198, 220, 220, 220, 11055, 62, 2536, 796, 705, 38892, 15, 92, 318, 2447, 2637, 198, 220, 220, 220, 256, 796, 18574, 1859, ...
2.321212
165
# Copyright The Linux Foundation and each contributor to CommunityBridge. # SPDX-License-Identifier: MIT import json import os import requests import uuid import hug import pytest from falcon import HTTP_200, HTTP_409 import cla from cla import routes ID_TOKEN = os.environ.get('ID_TOKEN') API_URL = os.environ.get('...
[ 2, 15069, 383, 7020, 5693, 290, 1123, 18920, 284, 8108, 37385, 13, 198, 2, 30628, 55, 12, 34156, 12, 33234, 7483, 25, 17168, 198, 198, 11748, 33918, 198, 11748, 28686, 198, 11748, 7007, 198, 11748, 334, 27112, 198, 198, 11748, 16225, ...
2.55
400
# Copyright(c) 2017, Dimitar Venkov # @5devene, dimitar.ven@gmail.com # www.badmonkeys.net import clr clr.AddReference('System.Windows.Forms') clr.AddReference('System.Drawing') from System.Drawing import Point, Color, Font from System.Windows.Forms import * from cStringIO import StringIO str_file = StringIO() size1...
[ 2, 15069, 7, 66, 8, 2177, 11, 14048, 7940, 9932, 21862, 198, 2, 2488, 20, 2934, 574, 68, 11, 5391, 7940, 13, 574, 31, 14816, 13, 785, 198, 2, 7324, 13, 14774, 2144, 13083, 13, 3262, 198, 198, 11748, 537, 81, 198, 198, 565, 81, ...
2.702222
225
""" Question: Nim Game My Submissions Question You are playing the following Nim Game with your friend: There is a heap of stones on the table, each time one of you take turns to remove 1 to 3 stones. The one who removes the last stone will be the winner. You will take the first turn to remove the stones. Bot...
[ 37811, 198, 24361, 25, 198, 220, 220, 220, 27168, 3776, 2011, 3834, 8481, 18233, 628, 220, 220, 220, 921, 389, 2712, 262, 1708, 27168, 3776, 351, 534, 1545, 25, 1318, 318, 257, 24575, 286, 14966, 319, 262, 3084, 11, 1123, 640, 530, ...
3.603581
391
import unittest import base
[ 11748, 555, 715, 395, 198, 198, 11748, 2779, 628 ]
3.333333
9
''' (c) 2011, 2012 Georgia Tech Research Corporation This source code is released under the New BSD license. Please see http://wiki.quantsoftware.org/index.php?title=QSTK_License for license details. Created on Feb 20, 2011 @author: John Cornwell @organization: Georgia Institute of Technology @contact: JohnW...
[ 7061, 6, 201, 198, 7, 66, 8, 2813, 11, 2321, 7859, 9634, 4992, 10501, 201, 198, 1212, 2723, 2438, 318, 2716, 739, 262, 968, 347, 10305, 5964, 13, 220, 4222, 766, 201, 198, 4023, 1378, 15466, 13, 40972, 43776, 13, 2398, 14, 9630, 1...
1.955148
3,322
# Copyright 2014-2018 The PySCF Developers. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by appl...
[ 2, 15069, 1946, 12, 7908, 383, 9485, 6173, 37, 34152, 13, 1439, 6923, 33876, 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...
2.357143
1,064
# 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 # d...
[ 2, 220, 220, 220, 49962, 739, 262, 24843, 13789, 11, 10628, 362, 13, 15, 357, 1169, 366, 34156, 15341, 345, 743, 198, 2, 220, 220, 220, 407, 779, 428, 2393, 2845, 287, 11846, 351, 262, 13789, 13, 921, 743, 7330, 198, 2, 220, 220, ...
3.388889
234
import svhn2mnist import usps import syn2gtrsb import syndig2svhn
[ 11748, 38487, 21116, 17, 10295, 396, 198, 11748, 514, 862, 198, 11748, 6171, 17, 70, 2213, 36299, 198, 11748, 11150, 328, 17, 21370, 21116, 628, 198 ]
2.615385
26
import torch from torch import Tensor from torch.nn.modules.loss import _Loss
[ 11748, 28034, 198, 6738, 28034, 1330, 309, 22854, 198, 6738, 28034, 13, 20471, 13, 18170, 13, 22462, 1330, 4808, 43, 793, 628, 198 ]
3.478261
23
import json import logging import os import shutil import tempfile import yaml from collections import defaultdict from copy import deepcopy from patroni import PATRONI_ENV_PREFIX from patroni.exceptions import ConfigParseError from patroni.dcs import ClusterConfig from patroni.postgresql.config import CaseInsensitive...
[ 11748, 33918, 198, 11748, 18931, 198, 11748, 28686, 198, 11748, 4423, 346, 198, 11748, 20218, 7753, 198, 11748, 331, 43695, 198, 198, 6738, 17268, 1330, 4277, 11600, 198, 6738, 4866, 1330, 2769, 30073, 198, 6738, 19686, 72, 1330, 28748, 4...
2.451697
766
############################################################################## # # Copyright (c) 2002 Zope Foundation and Contributors. # # This software is subject to the provisions of the Zope Public License, # Version 2.1 (ZPL). A copy of the ZPL should accompany this distribution. # THIS SOFTWARE IS PROVIDED "AS I...
[ 29113, 29113, 7804, 4242, 2235, 198, 2, 198, 2, 15069, 357, 66, 8, 6244, 1168, 3008, 5693, 290, 25767, 669, 13, 198, 2, 198, 2, 770, 3788, 318, 2426, 284, 262, 8617, 286, 262, 1168, 3008, 5094, 13789, 11, 198, 2, 10628, 362, 13, ...
3.450382
393
import openmdao.api as om from pycycle.thermo.cea import species_data from pycycle.constants import AIR_ELEMENTS from pycycle.elements.ambient import Ambient from pycycle.elements.flow_start import FlowStart if __name__ == "__main__": p1 = om.Problem() p1.model = om.Group() des_vars = p1.model.add_sub...
[ 11748, 1280, 9132, 5488, 13, 15042, 355, 39030, 198, 198, 6738, 12972, 13696, 13, 490, 5908, 13, 344, 64, 1330, 4693, 62, 7890, 198, 6738, 12972, 13696, 13, 9979, 1187, 1330, 31600, 62, 36, 2538, 28957, 198, 6738, 12972, 13696, 13, 68...
2.05175
657
from django.shortcuts import render from django.contrib.auth.decorators import login_required from django.contrib.auth.forms import AdminPasswordChangeForm, PasswordChangeForm, UserCreationForm from django.contrib.auth import update_session_auth_hash, login, authenticate from django.contrib import messages from django...
[ 6738, 42625, 14208, 13, 19509, 23779, 1330, 8543, 198, 198, 6738, 42625, 14208, 13, 3642, 822, 13, 18439, 13, 12501, 273, 2024, 1330, 17594, 62, 35827, 198, 6738, 42625, 14208, 13, 3642, 822, 13, 18439, 13, 23914, 1330, 32053, 35215, 19...
3.738854
157
# Lint as: python3 # coding=utf-8 # Copyright 2019 The TensorFlow Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICE...
[ 2, 406, 600, 355, 25, 21015, 18, 198, 2, 19617, 28, 40477, 12, 23, 198, 2, 15069, 13130, 383, 309, 22854, 37535, 46665, 13, 1439, 6923, 33876, 13, 198, 2, 198, 2, 49962, 739, 262, 24843, 13789, 11, 10628, 362, 13, 15, 357, 1169, ...
2.714425
1,026
from datetime import datetime from kubernetes import client from kubernetes.client.rest import ApiException import os import time import yaml from tests import config as conf import tests.utils as ut
[ 6738, 4818, 8079, 1330, 4818, 8079, 198, 6738, 479, 18478, 3262, 274, 1330, 5456, 198, 6738, 479, 18478, 3262, 274, 13, 16366, 13, 2118, 1330, 5949, 72, 16922, 198, 11748, 28686, 198, 11748, 640, 198, 11748, 331, 43695, 198, 198, 6738, ...
3.540984
61
import os from dotenv import load_dotenv
[ 11748, 28686, 198, 6738, 16605, 24330, 1330, 3440, 62, 26518, 24330, 628 ]
3.5
12
import os import sys import click import pickle import sncosmo import numpy as np from astropy.table import Table DATA_PATH = '/home/samdixon/jla_light_curves/' def modify_error(lc, error_floor=0.): """Add an error floor of `error_floor` times the maximum flux of the band to each observation """ ...
[ 11748, 28686, 198, 11748, 25064, 198, 11748, 3904, 198, 11748, 2298, 293, 198, 11748, 3013, 6966, 5908, 198, 11748, 299, 32152, 355, 45941, 198, 6738, 6468, 28338, 13, 11487, 1330, 8655, 628, 198, 26947, 62, 34219, 796, 31051, 11195, 14, ...
2.049462
465
""" Unit tests for the system interface.""" import unittest from six import assertRaisesRegex from six.moves import cStringIO import numpy as np from openmdao.api import Problem, Group, IndepVarComp, ExecComp from openmdao.test_suite.components.options_feature_vector import VectorDoublingComp from openmdao.utils.ass...
[ 37811, 11801, 5254, 329, 262, 1080, 7071, 526, 15931, 198, 198, 11748, 555, 715, 395, 198, 6738, 2237, 1330, 6818, 21762, 2696, 3041, 25636, 198, 6738, 2237, 13, 76, 5241, 1330, 269, 10100, 9399, 198, 198, 11748, 299, 32152, 355, 45941,...
3.248062
129
#!/usr/bin/env python3 # -*- coding: utf-8 -*- import argparse import os import sqlite3 import sys import pandas as pd from src import config def db_tables(connection): """List tables in database.""" res = pd.read_sql("select name from sqlite_master", connection) return res.name.values def create_data...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 18, 198, 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 198, 11748, 1822, 29572, 198, 11748, 28686, 198, 11748, 44161, 578, 18, 198, 11748, 25064, 198, 11748, 19798, 292, ...
2.380952
399
# coding: utf-8 import pytest import app as service import yaml import responder from starlette.responses import PlainTextResponse
[ 2, 19617, 25, 3384, 69, 12, 23, 198, 198, 11748, 12972, 9288, 198, 11748, 598, 355, 2139, 198, 11748, 331, 43695, 198, 11748, 3031, 263, 198, 6738, 3491, 21348, 13, 16733, 274, 1330, 28847, 8206, 31077, 628, 628, 628, 628, 628 ]
3.439024
41