content
stringlengths
1
1.04M
input_ids
listlengths
1
774k
ratio_char_token
float64
0.38
22.9
token_count
int64
1
774k
#! /usr/bin/python # -*- encoding: utf-8 -*- import torch import torch.nn as nn if __name__ == '__main__': Loss = AMSoftmax(1024, 10) a = torch.randn(20, 1024) lb = torch.randint(0, 10, (20, ), dtype = torch.long) loss = Loss(a, lb) loss.backward() Loss_b = BottleneckLoss(1024, 10) ...
[ 2, 0, 1220, 14629, 14, 8800, 14, 29412, 198, 2, 532, 9, 12, 21004, 25, 3384, 69, 12, 23, 532, 9, 12, 628, 198, 11748, 28034, 198, 11748, 28034, 13, 20471, 355, 299, 77, 628, 628, 628, 198, 361, 11593, 3672, 834, 6624, 705, 834, ...
2.222656
256
# Create by Packetsss # Personal use is allowed # Commercial use is prohibited friends = ["Jack", "Jim", "Frank", "Kirk"] len(friends) for friends in friends: print(friends) for index in range(len(friends)): print(friends[index]) for index in range(5): if index == 0: print("1st") else: ...
[ 2, 13610, 416, 6400, 316, 824, 82, 198, 2, 15644, 779, 318, 3142, 198, 2, 22724, 779, 318, 12244, 628, 198, 36154, 796, 14631, 14295, 1600, 366, 18050, 1600, 366, 17439, 1600, 366, 42, 14232, 8973, 198, 11925, 7, 36154, 8, 198, 198,...
2.57047
149
# Problem 5- Smallest multiple # https://projecteuler.net/problem=5 # Answer = 21162960 # Solution 1 main()
[ 2, 20647, 642, 12, 10452, 395, 3294, 198, 2, 3740, 1378, 16302, 68, 18173, 13, 3262, 14, 45573, 28, 20, 198, 2, 23998, 796, 362, 18298, 1959, 1899, 628, 198, 2, 28186, 352, 628, 628, 198, 12417, 3419, 198 ]
2.923077
39
#! /usr/bin/env python3 # countdown.py - a simple countdown script import time import subprocess def countdown(seconds=60): """ Simple countdown script that plays an alarm after the countdown completes :param float seconds: seconds to decrement """ for x in range(seconds, 0, -1): print(f...
[ 2, 0, 1220, 14629, 14, 8800, 14, 24330, 21015, 18, 198, 2, 33970, 13, 9078, 532, 257, 2829, 33970, 4226, 198, 198, 11748, 640, 198, 11748, 850, 14681, 628, 198, 4299, 33970, 7, 43012, 28, 1899, 2599, 198, 220, 220, 220, 37227, 198, ...
2.585253
217
from django.shortcuts import render, redirect from django.contrib import auth, messages from django.http import HttpResponse, HttpResponseNotFound, Http404 import pyrebase import json import re config = { 'apiKey': "AIzaSyD4pquYNH5AnnnKTFmdRg0dzooWkwQrj8I", 'authDomain': "scholar-system.firebaseapp.com", '...
[ 6738, 42625, 14208, 13, 19509, 23779, 1330, 8543, 11, 18941, 198, 6738, 42625, 14208, 13, 3642, 822, 1330, 6284, 11, 6218, 198, 6738, 42625, 14208, 13, 4023, 1330, 367, 29281, 31077, 11, 367, 29281, 31077, 3673, 21077, 11, 367, 29281, 2...
2.798246
228
# >>> x="@peter I really love that shirt at #Macy. http://bit.ly//WjdiW4" >>> ' '.join(re.sub("(@[A-Za-z0-9]+)|([ # ^0-9A-Za-z \t])|(\w+:\/\/\S+)"," ",x).split()) 'I really love that shirt at Macy' >>> x="@shawn Titanic tragedy # could have been prevented Economic Times: Telegraph.co.ukTitanic tragedy could have been p...
[ 2, 13163, 2124, 2625, 31, 79, 2357, 314, 1107, 1842, 326, 10147, 379, 1303, 44, 1590, 13, 2638, 1378, 2545, 13, 306, 1003, 54, 73, 10989, 54, 19, 1, 13163, 705, 45302, 22179, 7, 260, 13, 7266, 7203, 7, 31, 58, 32, 12, 57, 64, ...
2.282582
821
# ---------------------------------------------------------------------------- # CLASSES: nightly # # Test Case: dual_mesh.py # # Tests: mesh - 2D rectilinear, single domain. # 3D rectilinear, single domain. # plots - pc, mesh # operators - DualMesh #...
[ 2, 16529, 10541, 198, 2, 220, 42715, 1546, 25, 37862, 198, 2, 198, 2, 220, 6208, 8913, 25, 220, 10668, 62, 76, 5069, 13, 9078, 198, 2, 198, 2, 220, 30307, 25, 220, 220, 220, 220, 220, 19609, 220, 220, 220, 220, 220, 532, 362, ...
2.483286
1,047
#!/usr/bin/env python # -*- coding:utf-8 -* # function: a python logger # author: chaoxiaodi # create time: 2021-09-06 # update time import sys import logging from colorama import Fore, Style # if __name__ == '__main__': # # log = Logger(logger="main", ) # # log.debug("debug") # # log.info("info") # ...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 2, 532, 9, 12, 19617, 25, 40477, 12, 23, 532, 9, 198, 2, 2163, 25, 257, 21015, 49706, 220, 198, 2, 1772, 25, 17792, 1140, 544, 23130, 198, 2, 2251, 640, 25, 33448, 12, 2931, 12, ...
2.506173
162
# # Generated with PipeInPipeContactBlueprint from dmt.blueprint import Blueprint from dmt.dimension import Dimension from dmt.attribute import Attribute from dmt.enum_attribute import EnumAttribute from dmt.blueprint_attribute import BlueprintAttribute from sima.sima.blueprints.namedobject import NamedObjectBlueprint...
[ 2, 220, 198, 2, 2980, 515, 351, 36039, 818, 47, 3757, 17829, 14573, 4798, 198, 6738, 288, 16762, 13, 17585, 4798, 1330, 39932, 198, 6738, 288, 16762, 13, 46156, 1330, 34024, 198, 6738, 288, 16762, 13, 42348, 1330, 3460, 4163, 198, 673...
3.660377
106
from django.conf import settings from django.contrib.contenttypes.fields import GenericForeignKey from django.contrib.contenttypes.models import ContentType from django.db import models from django.utils.timezone import now from simple_review.fields import RateField
[ 6738, 42625, 14208, 13, 10414, 1330, 6460, 198, 6738, 42625, 14208, 13, 3642, 822, 13, 11299, 19199, 13, 25747, 1330, 42044, 33616, 9218, 198, 6738, 42625, 14208, 13, 3642, 822, 13, 11299, 19199, 13, 27530, 1330, 14041, 6030, 198, 6738, ...
3.871429
70
from neo4j import GraphDatabase import os from bs4 import BeautifulSoup as bs import requests # with open('C:/Users/Rinkie/Documents/Coding/Web/shopping/shoprite/fruit.html') as srite: # source = bs(srite, 'lxml') # pic = source.find_all('img', attrs={'alt': 'Golden Apples Pack 1kg'})[0]['src'] # res = requests.g...
[ 6738, 19102, 19, 73, 1330, 29681, 38105, 198, 11748, 28686, 198, 6738, 275, 82, 19, 1330, 23762, 50, 10486, 355, 275, 82, 198, 11748, 7007, 198, 198, 2, 351, 1280, 10786, 34, 14079, 14490, 14, 49, 676, 494, 14, 38354, 14, 34, 7656, ...
2.077908
1,874
from collections import defaultdict from typing import Dict, List
[ 6738, 17268, 1330, 4277, 11600, 198, 6738, 19720, 1330, 360, 713, 11, 7343, 628, 628 ]
4.6
15
import os import sys import requests import logging from telegram import ParseMode, Update from telegram.ext import Updater, CommandHandler, CallbackContext from dotenv import load_dotenv load_dotenv() logging.basicConfig(level=logging.INFO, format="%(asctime)s - %(name)s - %(levelname)s - %(messa...
[ 11748, 28686, 198, 11748, 25064, 198, 11748, 7007, 198, 11748, 18931, 198, 6738, 573, 30536, 1330, 2547, 325, 19076, 11, 10133, 198, 6738, 573, 30536, 13, 2302, 1330, 3205, 67, 729, 11, 9455, 25060, 11, 4889, 1891, 21947, 198, 6738, 166...
2.738235
340
# coding: utf-8 import sys import os FILENAME = sys.argv[1] with open(FILENAME, 'r') as f: lines = f.readlines() lines = [line.strip() for line in lines] asplines = [line for line in lines if 'asp' in line] aspparts = [line.split(' ') for line in asplines] asps = [] for asppart in aspparts: ...
[ 2, 19617, 25, 3384, 69, 12, 23, 201, 198, 201, 198, 11748, 25064, 201, 198, 11748, 28686, 201, 198, 201, 198, 46700, 1677, 10067, 796, 25064, 13, 853, 85, 58, 16, 60, 201, 198, 201, 198, 4480, 1280, 7, 46700, 1677, 10067, 11, 705,...
2.130435
299
from typing import List, TypeVar, NoReturn, Generic T = TypeVar('T')
[ 6738, 19720, 1330, 7343, 11, 5994, 19852, 11, 1400, 13615, 11, 42044, 198, 198, 51, 796, 5994, 19852, 10786, 51, 11537, 628, 198 ]
3.130435
23
from flask import flash from db.dbconn import curs
[ 6738, 42903, 1330, 7644, 198, 6738, 20613, 13, 9945, 37043, 1330, 13882, 628 ]
4
13
"""These are tests for developing CODE for dictionary creation and validation Code for VALIDATION of dictionaries should probably be bundled with the dictionaries themselves """ from pathlib import Path from lxml import etree import os import re import logging logging.info(f"loading {__file__}") try: from ..py4...
[ 37811, 4711, 389, 5254, 329, 5922, 42714, 329, 22155, 6282, 290, 21201, 198, 198, 10669, 329, 26173, 2389, 6234, 286, 48589, 3166, 815, 2192, 307, 34358, 351, 262, 48589, 3166, 2405, 198, 198, 37811, 198, 198, 6738, 3108, 8019, 1330, 10...
2.662087
2,329
""" The code implementation of the paper: A. Rasouli, I. Kotseruba, T. Kunic, and J. Tsotsos, "PIE: A Large-Scale Dataset and Models for Pedestrian Intention Estimation and Trajectory Prediction", ICCV 2019. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance...
[ 37811, 198, 464, 2438, 7822, 286, 262, 3348, 25, 198, 198, 32, 13, 28513, 2852, 72, 11, 314, 13, 509, 1747, 263, 22013, 11, 309, 13, 22673, 291, 11, 290, 449, 13, 13146, 1747, 418, 11, 366, 47, 10008, 25, 317, 13601, 12, 29990, ...
2.915414
532
#!/usr/bin/env python # TODO: ADD COPYRIGHT TAG from __future__ import print_function, division import __builtin__ from hsdev import test_api import multiprocessing import sys from hsdev import dbgimport # NOQA INTERACTIVE = '--interactive' in sys.argv or '-i' in sys.argv if __name__ == '__main__': print('[TES...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 2, 16926, 46, 25, 27841, 27975, 38162, 9947, 37801, 198, 6738, 11593, 37443, 834, 1330, 3601, 62, 8818, 11, 7297, 198, 11748, 11593, 18780, 259, 834, 198, 6738, 289, 82, 7959, 1330, 13...
2.265446
437
import random from collections import deque
[ 11748, 4738, 198, 6738, 17268, 1330, 390, 4188, 628, 628 ]
4.7
10
from .base import BaseConfig
[ 6738, 764, 8692, 1330, 7308, 16934, 628 ]
4.285714
7
from .usersim import UserSimulator import argparse, json, random, copy, sys import numpy as np # from model import SimulatorModel from model_pytorch import SimulatorModel from deep_dialog import dialog_config class ModelBasedSimulator(UserSimulator): """ A rule-based user simulator for testing dialog policy """ ...
[ 6738, 764, 18417, 320, 1330, 11787, 8890, 8927, 198, 11748, 1822, 29572, 11, 33918, 11, 4738, 11, 4866, 11, 25064, 198, 11748, 299, 32152, 355, 45941, 198, 2, 422, 2746, 1330, 13942, 17633, 198, 6738, 2746, 62, 9078, 13165, 354, 1330, ...
2.418269
4,992
import argparse from os import path import unittest from termcolor import colored parser = argparse.ArgumentParser( description='Test modules', ) parser.add_argument( '--module', dest='module' ) args = parser.parse_args() directory = args.module or '.' print('Running tests in ' + colored('"' + path.abspa...
[ 11748, 1822, 29572, 198, 6738, 28686, 1330, 3108, 198, 11748, 555, 715, 395, 198, 6738, 3381, 8043, 1330, 16396, 198, 198, 48610, 796, 1822, 29572, 13, 28100, 1713, 46677, 7, 198, 220, 220, 220, 6764, 11639, 14402, 13103, 3256, 198, 8, ...
3.024242
165
from __future__ import absolute_import, unicode_literals from xml.etree import ElementTree import altapay.transaction from altapay import utils from altapay.resource import Resource
[ 6738, 11593, 37443, 834, 1330, 4112, 62, 11748, 11, 28000, 1098, 62, 17201, 874, 198, 198, 6738, 35555, 13, 316, 631, 1330, 11703, 27660, 198, 198, 11748, 5988, 499, 323, 13, 7645, 2673, 198, 6738, 5988, 499, 323, 1330, 3384, 4487, 19...
3.627451
51
""" The MIT License (MIT) Copyright (c) 2016 Jake Lussier (Stanford University) 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 the rights to use...
[ 37811, 198, 464, 17168, 13789, 357, 36393, 8, 198, 198, 15269, 357, 66, 8, 1584, 14757, 406, 1046, 959, 357, 32140, 3841, 2059, 8, 198, 198, 5990, 3411, 318, 29376, 7520, 11, 1479, 286, 3877, 11, 284, 597, 1048, 16727, 257, 4866, 19...
2.949178
669
from flask_peewee.rest import RestAPI, RestResource from app import app from models import * api = RestAPI(app) api.register(Account, AccountResource) api.register(Transaction)
[ 6738, 42903, 62, 431, 413, 1453, 13, 2118, 1330, 8324, 17614, 11, 8324, 26198, 198, 198, 6738, 598, 1330, 598, 198, 6738, 4981, 1330, 1635, 628, 198, 15042, 796, 8324, 17614, 7, 1324, 8, 198, 15042, 13, 30238, 7, 30116, 11, 10781, 2...
3.461538
52
# -*- coding: utf-8 -*- """ Created on Tue Sep 1 22:15:52 2020 @author: galin """ import pandas as pd import urllib.request import datetime as dt import os import time from tqdm.auto import tqdm
[ 201, 198, 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 201, 198, 37811, 201, 198, 41972, 319, 30030, 8621, 220, 352, 2534, 25, 1314, 25, 4309, 12131, 201, 198, 201, 198, 31, 9800, 25, 9426, 259, 201, 198, 37811, 201, ...
2.222222
99
from django.contrib import admin from .models import Requests # Register your models here. @admin.register(Requests)
[ 6738, 42625, 14208, 13, 3642, 822, 1330, 13169, 198, 6738, 764, 27530, 1330, 9394, 3558, 198, 198, 2, 17296, 534, 4981, 994, 13, 198, 31, 28482, 13, 30238, 7, 16844, 3558, 8, 628 ]
3.606061
33
# -*- coding: utf-8 -*- """ S3 Data Objects API @copyright: 2009-2013 (c) Sahana Software Foundation @license: MIT 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 ...
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 198, 37811, 311, 18, 6060, 35832, 7824, 628, 220, 220, 220, 2488, 22163, 4766, 25, 3717, 12, 6390, 357, 66, 8, 22982, 2271, 10442, 5693, 198, 220, 220, 220, 2488, 4308...
1.884866
132,915
import requests import hashlib
[ 11748, 7007, 198, 11748, 12234, 8019 ]
5
6
#!/usr/bin/env python3 from flask import Flask from flask import render_template, make_response, redirect from flask import request import requests from db import DB import config app = Flask(__name__) database = DB("users.db") @app.route('/') @ app.route('/callback', methods=['GET'])
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 18, 198, 198, 6738, 42903, 1330, 46947, 198, 6738, 42903, 1330, 8543, 62, 28243, 11, 787, 62, 26209, 11, 18941, 198, 6738, 42903, 1330, 2581, 198, 198, 11748, 7007, 198, 198, 6738, 20613, 1...
3.206522
92
#!/usr/bin/env python # # mkv-validator.py # # MKV validator wrapper - recursively validate integrity of mkv files # using mkvalidator.exe storing the results in a log file. # # Copyright 2016 Denton Davenport # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in com...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 2, 198, 2, 33480, 85, 12, 12102, 1352, 13, 9078, 198, 2, 198, 2, 20553, 53, 4938, 1352, 29908, 532, 664, 1834, 2280, 26571, 11540, 286, 33480, 85, 3696, 198, 2, 1262, 33480, 12102, ...
3.273319
461
""" Face Cluster https://github.com/zhly0/facenet-face-cluster-chinese-whispers- """ import argparse import math # import os import facenet import numpy as np import tensorflow as tf def face_distance(face_encodings, face_to_compare): """ Given a list of face encodings, compare them to a known face encoding ...
[ 37811, 198, 32388, 38279, 198, 5450, 1378, 12567, 13, 785, 14, 23548, 306, 15, 14, 38942, 268, 316, 12, 2550, 12, 565, 5819, 12, 354, 3762, 12, 1929, 27148, 12, 198, 37811, 198, 11748, 1822, 29572, 198, 11748, 10688, 198, 2, 1330, 2...
2.044627
5,109
#!/usr/bin/env python #!/usr/bin/env python from ecmwfapi import ECMWFDataServer server = ECMWFDataServer() server.retrieve({ "class": "ei", "dataset": "interim", "date": "1979-01-01/to/2017-05-31", "expver": "1", "grid": "0.75/0.75", "levelist": "500", "levtype": "pl", "param": "129.12...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 198, 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 6738, 9940, 76, 86, 69, 15042, 1330, 13182, 14326, 37, 6601, 10697, 198, 15388, 796, 13182, 14326, 37, 6601, 10697, 3419, 198, 15...
2
266
import sc2reader """ This module contains a number of useful functions. """ def convert_to_gametime_r(replay, real_time_s): ''' Converts the real time of a point in the replay to the internally calculated game time. Args: replay (sc2reader.replay): The sc2reader replay obj...
[ 11748, 629, 17, 46862, 201, 198, 201, 198, 37811, 201, 198, 1212, 8265, 4909, 257, 1271, 286, 4465, 5499, 13, 201, 198, 201, 198, 37811, 201, 198, 201, 198, 201, 198, 201, 198, 201, 198, 4299, 10385, 62, 1462, 62, 28483, 8079, 62, ...
2.277419
930
from shutil import copyfile import click from esque.cli.helpers import ensure_approval from esque.cli.options import State, default_options from esque.config import config_dir, config_path, sample_config_path @click.command("recreate") @default_options def config_recreate(state: State): """(Re)create esque conf...
[ 6738, 4423, 346, 1330, 4866, 7753, 198, 198, 11748, 3904, 198, 198, 6738, 1658, 4188, 13, 44506, 13, 16794, 364, 1330, 4155, 62, 21064, 2100, 198, 6738, 1658, 4188, 13, 44506, 13, 25811, 1330, 1812, 11, 4277, 62, 25811, 198, 6738, 165...
3.164384
219
# pylint: disable=redefined-outer-name from typing import List import pytest from eth_utils import encode_hex, keccak from tests.pathfinding.config import NUMBER_OF_NODES from raiden_libs.types import Address from raiden_libs.utils import private_key_to_address @pytest.fixture(scope="session") @pytest.fixture(sco...
[ 2, 279, 2645, 600, 25, 15560, 28, 445, 18156, 12, 39605, 12, 3672, 198, 6738, 19720, 1330, 7343, 198, 198, 11748, 12972, 9288, 198, 6738, 4555, 62, 26791, 1330, 37773, 62, 33095, 11, 885, 535, 461, 198, 6738, 5254, 13, 6978, 41070, ...
2.944099
161
#!/usr/bin/env python # -*- coding: utf-8 -*- import json from alipay.aop.api.constant.ParamConstants import * from alipay.aop.api.domain.MultiCurrencyMoneyVO import MultiCurrencyMoneyVO from alipay.aop.api.domain.MultiCurrencyMoneyVO import MultiCurrencyMoneyVO from alipay.aop.api.domain.MultiCurrencyMoneyVO import M...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 11748, 33918, 198, 198, 6738, 435, 541, 323, 13, 64, 404, 13, 15042, 13, 9979, 415, 13, 22973, 34184, 1187, 1330, 163...
2.93007
143
import pytest # noqa from django.test import TestCase import common.search_indexes as index from common.models import Person, CustomPage, NewsArticle, Job
[ 11748, 12972, 9288, 1303, 645, 20402, 198, 198, 6738, 42625, 14208, 13, 9288, 1330, 6208, 20448, 198, 198, 11748, 2219, 13, 12947, 62, 9630, 274, 355, 6376, 198, 198, 6738, 2219, 13, 27530, 1330, 7755, 11, 8562, 9876, 11, 3000, 14906, ...
3.521739
46
""" logging """ import os import logging from pathlib import Path filePath = str(Path(os.path.dirname(__file__)).parent.parent.joinpath("_Temp", "logging.log")) print("Logging to", filePath) logging.basicConfig( \ level=logging.DEBUG, \ format='%(asctime)s : %(levelname)s : %(message)s', \ ...
[ 37811, 201, 198, 6404, 2667, 201, 198, 37811, 201, 198, 201, 198, 11748, 28686, 201, 198, 11748, 18931, 201, 198, 6738, 3108, 8019, 1330, 10644, 201, 198, 201, 198, 7753, 15235, 796, 965, 7, 15235, 7, 418, 13, 6978, 13, 15908, 3672, ...
2.374582
299
import os import csv import discord import pandas as pd import tempfile from discord import Attachment from functionality.shared_functions import create_event_tree, create_type_tree, add_event_to_file, turn_types_to_string from Event import Event from parse.match import parse_period from icalendar import Calendar impo...
[ 11748, 28686, 198, 11748, 269, 21370, 198, 11748, 36446, 198, 11748, 19798, 292, 355, 279, 67, 198, 11748, 20218, 7753, 198, 6738, 36446, 1330, 3460, 15520, 198, 6738, 11244, 13, 28710, 62, 12543, 2733, 1330, 2251, 62, 15596, 62, 21048, ...
2.306694
2,465
#!/usr/bin/env python #!/usr/bin/env python ''' This script contains functions and unit tests for calling the services started by `turtlebot_server.py`. You may copy this file to your project repo and import `class TurtlebotClient` for controlling Turtlebot. ''' from ros_turtlebot_control.srv import GetPose...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 198, 7061, 6, 198, 1212, 4226, 4909, 5499, 290, 4326, 5254, 329, 198, 220, 220, 220, 4585, 262, 2594, 2067, 416, 4600, 83, 17964, 13...
2.619672
610
#!/usr/bin/env python # -*- coding: utf-8 -*- import logging import os import re import subprocess import tempfile from lxml import html import requests class WBCError(Exception): """ Custom exception """ pass class WBCFetch(object): """ Fetch WBC publication and issues """ def get...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 11748, 18931, 198, 11748, 28686, 198, 11748, 302, 198, 11748, 850, 14681, 198, 11748, 20218, 7753, 198, 198, 6738, 300, ...
1.863259
3,971
import numpy as np import random import gym import math import tensorflow as tf import tensorflow.keras.models as km import tensorflow.keras.layers as kl import tensorflow.keras.initializers as ki import tensorflow.keras.optimizers as ko import tensorflow.keras.losses as klo import tensorflow.keras.backend as K import...
[ 11748, 299, 32152, 355, 45941, 198, 11748, 4738, 198, 11748, 11550, 198, 11748, 10688, 198, 198, 11748, 11192, 273, 11125, 355, 48700, 198, 11748, 11192, 273, 11125, 13, 6122, 292, 13, 27530, 355, 10571, 198, 11748, 11192, 273, 11125, 13,...
2.639752
483
from virtman.openstack.common import processutils as putils from virtman.utils import rootwrap # Licyh NOTE: openstack.common.processutils & subprocess.Popen only supports # 'ls' not 'cat a.py' but 'cat','a.py',
[ 198, 6738, 4118, 805, 13, 9654, 25558, 13, 11321, 1330, 1429, 26791, 355, 1234, 4487, 198, 6738, 4118, 805, 13, 26791, 1330, 6808, 37150, 628, 198, 198, 2, 406, 4611, 71, 24550, 25, 1280, 25558, 13, 11321, 13, 14681, 26791, 1222, 850,...
3.130435
69
# MegEngine is Licensed under the Apache License, Version 2.0 (the "License") # # Copyright (c) 2014-2021 Megvii Inc. All rights reserved. # # Unless required by applicable law or agreed to in writing, # software distributed under the License is distributed on an # "AS IS" BASIS, WITHOUT ARRANTIES OR CONDITIONS OF ANY ...
[ 2, 8336, 13798, 318, 49962, 739, 262, 24843, 13789, 11, 10628, 362, 13, 15, 357, 1169, 366, 34156, 4943, 198, 2, 198, 2, 15069, 357, 66, 8, 1946, 12, 1238, 2481, 8336, 85, 4178, 3457, 13, 1439, 2489, 10395, 13, 198, 2, 198, 2, 1...
3.290323
186
from unittest import TestCase import unittest import numpy as np import filecmp import os from ezyrb.parametricspace import ParametricSpace
[ 6738, 555, 715, 395, 1330, 6208, 20448, 198, 11748, 555, 715, 395, 198, 11748, 299, 32152, 355, 45941, 198, 11748, 2393, 48991, 198, 11748, 28686, 198, 198, 6738, 304, 89, 2417, 65, 13, 17143, 316, 10466, 10223, 1330, 25139, 19482, 1410...
3.380952
42
"""Contains code to read the yaml-configuration.""" import logging from typing import Any, Dict import dateutil.parser import yaml def _read_config_yaml() -> Dict[str, Any]: """Read the file `config.yml` and write its contents to a dict. Give defaults to values that the file doesn't specify.""" filename ...
[ 37811, 4264, 1299, 2438, 284, 1100, 262, 331, 43695, 12, 11250, 3924, 526, 15931, 198, 11748, 18931, 198, 6738, 19720, 1330, 4377, 11, 360, 713, 198, 198, 11748, 3128, 22602, 13, 48610, 198, 11748, 331, 43695, 628, 198, 4299, 4808, 961,...
2.853933
445
import sqlite3 as lite lines = open('unicode.txt','r').readlines() con = lite.connect('map.db') with con: cur = con.cursor() cur.execute("CREATE TABLE Mapping(UTF8 PRIMARY KEY, CNS TEXT)") for l in lines: if not l[0] == '#': words = l[:-1].split() key = words[1] ...
[ 198, 11748, 44161, 578, 18, 355, 300, 578, 198, 198, 6615, 796, 1280, 10786, 46903, 1098, 13, 14116, 41707, 81, 27691, 961, 6615, 3419, 198, 1102, 796, 300, 578, 13, 8443, 10786, 8899, 13, 9945, 11537, 198, 198, 4480, 369, 25, 198, ...
2.087805
205
#More on files #Python version 2.7 #Let's play a bit more with files and try to copy one file to another. from sys import argv from os.path import exists script, filename_from, filename_to = argv #Expecting 2 pamaeters (plus script name) print "Copying from %s to %s." % (filename_from, filename_to) file_from = ope...
[ 2, 5167, 319, 3696, 198, 2, 37906, 2196, 362, 13, 22, 198, 198, 2, 5756, 338, 711, 257, 1643, 517, 351, 3696, 290, 1949, 284, 4866, 530, 2393, 284, 1194, 13, 198, 198, 6738, 25064, 1330, 1822, 85, 198, 6738, 28686, 13, 6978, 1330,...
3.069343
274
############################################################################## # Python script to set mode and backup server percentages # This might be used with automation such as Home Assistant to change # modes to charge the battery at cheap rate electricity times ###################################################...
[ 29113, 29113, 7804, 4242, 2235, 198, 2, 11361, 4226, 284, 900, 4235, 290, 11559, 4382, 28071, 198, 2, 770, 1244, 307, 973, 351, 22771, 884, 355, 5995, 15286, 284, 1487, 198, 2, 12881, 284, 3877, 262, 6555, 379, 7026, 2494, 8744, 1661,...
4.496241
133
# -*- coding: utf-8 -*- from flask import current_app from flask.cli import FlaskGroup, run_command from kort.api import create_app cli = FlaskGroup(add_default_commands=False, create_app=create_app) cli.add_command(run_command) @cli.command('shell') def shell_command(): """Starts an interactive shell.""" ...
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 6738, 42903, 1330, 1459, 62, 1324, 198, 6738, 42903, 13, 44506, 1330, 46947, 13247, 11, 1057, 62, 21812, 198, 198, 6738, 479, 419, 13, 15042, 1330, 2251, 62, 1324, 628, ...
2.625806
310
# IMPORTS ################################################################################ IMPORTS # # Standard library import flask import http import datetime # Installed from jwcrypto import jwk, jws # Own import tests import dds_web from dds_web.api.user import encrypted_jwt_token, jwt_token # TESTS ###########...
[ 2, 30023, 33002, 1303, 29113, 29113, 7804, 4242, 21017, 30023, 33002, 1303, 198, 198, 2, 8997, 5888, 198, 11748, 42903, 198, 11748, 2638, 198, 11748, 4818, 8079, 198, 198, 2, 2262, 4262, 198, 6738, 474, 86, 29609, 78, 1330, 474, 43021, ...
2.835168
3,270
# -*- coding: future_fstrings -*- import os from time import time import datetime from keras import backend as K from keras.preprocessing.image import ImageDataGenerator from keras.applications.mobilenet import MobileNet from keras.applications.mobilenet import preprocess_input as MobileNet_preprocess_input from ker...
[ 2, 532, 9, 12, 19617, 25, 2003, 62, 69, 37336, 532, 9, 12, 198, 198, 11748, 28686, 198, 6738, 640, 1330, 640, 198, 11748, 4818, 8079, 198, 198, 6738, 41927, 292, 1330, 30203, 355, 509, 198, 6738, 41927, 292, 13, 3866, 36948, 13, 9...
2.124217
6,384
from reportlab.platypus import Image, SimpleDocTemplate def images_to_pdf( list_of_images: list, pdf_file_name: str, width=None, height=None, hAlign="CENTER" ) -> bool: """ Function convert the image into Pdf """ pdf = SimpleDocTemplate(pdf_file_name) images = [] for i in list_of_images: ...
[ 6738, 989, 23912, 13, 489, 265, 4464, 385, 1330, 7412, 11, 17427, 23579, 30800, 628, 198, 4299, 4263, 62, 1462, 62, 12315, 7, 198, 220, 220, 220, 1351, 62, 1659, 62, 17566, 25, 1351, 11, 37124, 62, 7753, 62, 3672, 25, 965, 11, 964...
2.450311
322
#pica is short for problematica #Here and ONLY here user and user image database calls are handled
[ 2, 79, 3970, 318, 1790, 329, 15833, 64, 198, 2, 4342, 290, 22224, 994, 2836, 290, 2836, 2939, 6831, 3848, 389, 12118, 198 ]
4.304348
23
"""Copyright (c) 2016 Michael Tang 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 the rights to use, copy, modify, merge, publish, distribute, su...
[ 37811, 15269, 357, 66, 8, 1584, 3899, 18816, 198, 198, 5990, 3411, 318, 29376, 7520, 11, 1479, 286, 3877, 11, 284, 597, 1048, 16727, 257, 4866, 198, 1659, 428, 3788, 290, 3917, 10314, 3696, 357, 1169, 366, 25423, 12340, 284, 1730, 198...
3.638577
534
from __future__ import absolute_import from __future__ import division from __future__ import print_function import tensorflow as tf import copy
[ 6738, 11593, 37443, 834, 1330, 4112, 62, 11748, 198, 6738, 11593, 37443, 834, 1330, 7297, 198, 6738, 11593, 37443, 834, 1330, 3601, 62, 8818, 198, 198, 11748, 11192, 273, 11125, 355, 48700, 198, 11748, 4866, 628, 628 ]
4.027027
37
#!/usr/bin/env python from topo import Topology
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 198, 6738, 1353, 78, 1330, 5849, 1435, 198 ]
2.882353
17
# # PySNMP MIB module CISCO-MEDIA-GATEWAY-MIB (http://snmplabs.com/pysmi) # ASN.1 source file:///Users/davwang4/Dev/mibs.snmplabs.com/asn1/CISCO-MEDIA-GATEWAY-MIB # Produced by pysmi-0.3.4 at Wed May 1 11:50:09 2019 # On host DAVWANG4-M-1475 platform Darwin version 18.5.0 by user davwang4 # Using Python version 3.7.3 ...
[ 2, 198, 2, 9485, 15571, 7378, 337, 9865, 8265, 36159, 8220, 12, 30733, 3539, 12, 38, 6158, 27285, 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, 1...
2.774672
25,261
_help_ = """ extractSVGTableSVGDocs.py v 1.01 Aug 20 2013 python extractSVGTableSVGDocs.py <path to input TTX file with SVG table> <path to folder to contain output SVG files> <file base mame> Read SVG table from a TTX output file, and extract the SVG docs to separate files. Records the start/end GID in the SVG doc ...
[ 62, 16794, 62, 796, 37227, 198, 2302, 974, 50, 43490, 10962, 50, 43490, 23579, 82, 13, 9078, 410, 352, 13, 486, 2447, 1160, 2211, 198, 198, 29412, 7925, 50, 43490, 10962, 50, 43490, 23579, 82, 13, 9078, 1279, 6978, 284, 5128, 26653, ...
3.019231
260
import dataclasses import typing from typing import ( Optional, ) @dataclasses.dataclass
[ 11748, 4818, 330, 28958, 198, 11748, 19720, 198, 6738, 19720, 1330, 357, 198, 220, 32233, 11, 198, 8, 628, 198, 198, 31, 19608, 330, 28958, 13, 19608, 330, 31172, 198, 220, 220 ]
3
32
import pytest from math import inf from itu_r_468_weighting.constants import ( GLOBAL_DB_TOLERANCE, ITU_R_468__FREQS_AND_EXP_VALS__1KHZ, ITU_R_468__FREQS_AND_EXP_VALS__2KHZ, ) from itu_r_468_weighting.filter import r468 @pytest.mark.parametrize( "start, end, khz_option, returns", [ (1, 19...
[ 11748, 12972, 9288, 198, 6738, 10688, 1330, 1167, 198, 198, 6738, 340, 84, 62, 81, 62, 38472, 62, 6551, 278, 13, 9979, 1187, 1330, 357, 198, 220, 220, 220, 10188, 9864, 1847, 62, 11012, 62, 51, 3535, 1137, 19240, 11, 198, 220, 220, ...
1.777098
1,144
# Generated by Django 3.2.12 on 2022-06-05 17:11 from django.conf import settings from django.db import migrations, models import django.db.models.deletion
[ 2, 2980, 515, 416, 37770, 513, 13, 17, 13, 1065, 319, 33160, 12, 3312, 12, 2713, 1596, 25, 1157, 198, 198, 6738, 42625, 14208, 13, 10414, 1330, 6460, 198, 6738, 42625, 14208, 13, 9945, 1330, 15720, 602, 11, 4981, 198, 11748, 42625, ...
3.038462
52
''' Created on Aug 10, 2018 @author: wouters ''' import serial.tools.list_ports from threading import Thread import time import os USBDEVICE = "/dev/ttyUSB0" serial_port = 0 class ButtonRetreiver(Thread): ''' classdocs ''' _buttoncallback = 0 serial_port = 0 _serialfound = False firstco...
[ 7061, 6, 198, 41972, 319, 2447, 838, 11, 2864, 198, 198, 31, 9800, 25, 266, 280, 1010, 198, 7061, 6, 198, 11748, 11389, 13, 31391, 13, 4868, 62, 3742, 628, 198, 6738, 4704, 278, 1330, 14122, 198, 11748, 640, 198, 11748, 28686, 198, ...
2.142349
281
""" Removing foreign rule key to RuleSQL Revision ID: 8b22879952cf Revises: 2592f3bdae72 Create Date: 2020-02-13 20:38:38.984495 """ # revision identifiers, used by Alembic. revision = '8b22879952cf' down_revision = '2592f3bdae72' branch_labels = None depends_on = None from alembic import op import sqlalchemy as sa...
[ 37811, 3982, 5165, 3215, 3896, 1994, 284, 14330, 17861, 198, 198, 18009, 1166, 4522, 25, 807, 65, 1828, 5774, 2079, 4309, 12993, 198, 18009, 2696, 25, 1679, 5892, 69, 18, 17457, 3609, 4761, 198, 16447, 7536, 25, 12131, 12, 2999, 12, 1...
2.631206
141
# rootcint.py import os import re from SCons.Script import Action, Builder def generate(env): """ RootCint(dictionary,headers[,PCMNAME=pcmfilename]) env.RootCint(dictionary,headers[,PCMNAME=pcmfilename]) Generate ROOT dictionary source file "dictionary" from list of class headers "headers" ""...
[ 2, 6808, 66, 600, 13, 9078, 198, 198, 11748, 28686, 198, 11748, 302, 198, 6738, 6374, 684, 13, 7391, 1330, 7561, 11, 35869, 198, 198, 4299, 7716, 7, 24330, 2599, 198, 220, 220, 220, 37227, 198, 220, 220, 220, 20410, 34, 600, 7, 67...
2.398157
1,085
import asyncio import aioredis import orjson BENCH_VALUE = b'{"user":356091260429402122,"name":"Why are you reading","money":9164,"xp":6000000,"pvpwins":14,"money_booster":0,"time_booster":0,"luck_booster":0,"marriage":463318425901596672,"background":"https://i.imgur.com/LRV2QCK.png","guild":15306,"class":["Paragon",...
[ 11748, 30351, 952, 198, 198, 11748, 257, 72, 1850, 271, 198, 11748, 393, 17752, 198, 198, 33, 1677, 3398, 62, 39488, 796, 275, 6, 4895, 7220, 1298, 2327, 31751, 1065, 1899, 11785, 32531, 18376, 553, 3672, 2404, 5195, 389, 345, 3555, 2...
2.575758
297
#!/usr/bin/env python import sys import Bio; from Bio import SeqIO import pandas as pd fasta = SeqIO.to_dict(list(SeqIO.parse(sys.argv[1], 'fasta'))) blast_table = pd.read_csv(sys.argv[2], sep='\t') sample_df = pd.DataFrame() sample_df['Sample'] = pd.Series(list(fasta.keys())) sample_df['Sequence'] = pd.Series(list...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 198, 11748, 25064, 198, 11748, 16024, 26, 422, 16024, 1330, 1001, 80, 9399, 198, 11748, 19798, 292, 355, 279, 67, 198, 198, 7217, 64, 796, 1001, 80, 9399, 13, 1462, 62, 11600, 7, 486...
2.427562
283
# -*- coding: utf-8 -*- """ Created on Wed Aug 13 15:35:50 2014 @author: rich """ import networkx as nx import numpy as np from scipy.sparse import identity from scipy.sparse import issparse from scipy.linalg import inv from scipy.sparse.linalg import inv as inv_sp # computes trophic level and returns dict of {nodeI...
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 37811, 198, 41972, 319, 3300, 2447, 1511, 1315, 25, 2327, 25, 1120, 1946, 198, 198, 31, 9800, 25, 5527, 198, 37811, 198, 198, 11748, 3127, 87, 355, 299, 87, 198, 11748...
2.701613
124
from blabel import LabelWriter label_writer = LabelWriter("item_template.html", items_per_page=3, default_stylesheets=("style.css",)) records= [ dict(name="Scott", sex="M"), dict(name="Laura", sex="F"), dict(name="Jane", sex="F"), dict(name="Valentin", sex="M"), dict(name...
[ 6738, 698, 9608, 1330, 36052, 34379, 198, 198, 18242, 62, 16002, 796, 36052, 34379, 7203, 9186, 62, 28243, 13, 6494, 1600, 3709, 62, 525, 62, 7700, 28, 18, 11, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, ...
2.199029
206
#!/usr/bin/env python # -*- coding: utf-8 -*- import simplejson as json from alipay.aop.api.constant.ParamConstants import *
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 11748, 2829, 17752, 355, 33918, 198, 198, 6738, 435, 541, 323, 13, 64, 404, 13, 15042, 13, 9979, 415, 13, 22973, 3418...
2.58
50
from src.SkinCancer.Dataloader import TestDataset from src.SkinCancer.Model import SkinCancerModel from torch import load from torch.utils.data import DataLoader import numpy as np from sklearn.metrics import accuracy_score model = SkinCancerModel() model.load_state_dict(load('model_skin_cancer_epoch40.pt')) model.eva...
[ 6738, 12351, 13, 42455, 34, 8250, 13, 35, 10254, 1170, 263, 1330, 6208, 27354, 292, 316, 198, 6738, 12351, 13, 42455, 34, 8250, 13, 17633, 1330, 17847, 34, 8250, 17633, 198, 6738, 28034, 1330, 3440, 198, 6738, 28034, 13, 26791, 13, 78...
2.62069
319
from .dbquery import DBquery as dbquery __all__ = ['dbquery']
[ 6738, 764, 9945, 22766, 1330, 20137, 22766, 355, 20613, 22766, 198, 834, 439, 834, 796, 37250, 9945, 22766, 20520 ]
3.210526
19
# # Copyright (c) 2019. Asutosh Nayak (nayak.asutosh@ymail.com) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # """ Sample python script ...
[ 2, 198, 2, 15069, 357, 66, 8, 13130, 13, 1081, 315, 3768, 38808, 461, 357, 77, 323, 461, 13, 292, 315, 3768, 31, 88, 4529, 13, 785, 8, 198, 2, 198, 2, 49962, 739, 262, 24843, 13789, 11, 10628, 362, 13, 15, 357, 1169, 366, 3415...
2.350322
1,707
# Copyright (c) Microsoft Corporation. # Licensed under the MIT license. import torch import os from torch.autograd import Variable from torch.autograd import Function import time
[ 2, 15069, 357, 66, 8, 5413, 10501, 13, 198, 2, 49962, 739, 262, 17168, 5964, 13, 198, 198, 11748, 28034, 198, 11748, 28686, 198, 6738, 28034, 13, 2306, 519, 6335, 1330, 35748, 198, 6738, 28034, 13, 2306, 519, 6335, 1330, 15553, 198, ...
3.956522
46
import numpy as np from mahotas.histogram import fullhistogram import pytest
[ 11748, 299, 32152, 355, 45941, 198, 6738, 42768, 313, 292, 13, 10034, 21857, 1330, 1336, 10034, 21857, 198, 11748, 12972, 9288, 628 ]
3.545455
22
""" SemVer management class """ from .semver_core import SemVerCore
[ 37811, 198, 13900, 13414, 4542, 1398, 198, 37811, 198, 198, 6738, 764, 43616, 332, 62, 7295, 1330, 12449, 13414, 14055, 628, 198 ]
3.227273
22
"""A python library to dynamically configure HAProxy ACLs over the UNIX admin socket.""" import re import socket import sys from haproxy.constants import HA_SOCK_FILE, HA_SOCK_TIMEOUT, HA_DEBUG from haproxy.errors import CommandExecError from haproxy.utils import cmd_succeeded # pylint: disable=bad-whitespace clas...
[ 37811, 32, 21015, 5888, 284, 32366, 17425, 14558, 44148, 17382, 82, 625, 262, 4725, 10426, 13169, 17802, 526, 15931, 198, 198, 11748, 302, 198, 11748, 17802, 198, 11748, 25064, 198, 198, 6738, 387, 36436, 13, 9979, 1187, 1330, 14558, 62, ...
2.432419
2,042
import numpy as np from .activation_function import ActivationFunction class Softmax(ActivationFunction): """Class which describe an activation function for a layer of neurons. Attributes: ----------- output tensor representing the result of the layer of neurons """ def forw...
[ 11748, 299, 32152, 355, 45941, 198, 198, 6738, 764, 48545, 62, 8818, 1330, 13144, 341, 22203, 628, 198, 4871, 8297, 9806, 7, 25526, 341, 22203, 2599, 198, 220, 220, 220, 37227, 9487, 543, 6901, 281, 14916, 2163, 329, 257, 7679, 286, 1...
2.4
575
import unittest from app.models import User from app import db
[ 11748, 555, 715, 395, 198, 6738, 598, 13, 27530, 1330, 11787, 198, 6738, 598, 1330, 20613, 198 ]
3.705882
17
import sys import os import re import glob import pandas as pd import argparse def parse_arguments(): """ Parse user arguments Output: list with all the user arguments """ # All the docstrings are very provisional and some of them are old, they would be changed in further step...
[ 11748, 25064, 198, 11748, 28686, 198, 11748, 302, 198, 11748, 15095, 198, 11748, 19798, 292, 355, 279, 67, 198, 11748, 1822, 29572, 628, 198, 4299, 21136, 62, 853, 2886, 33529, 198, 220, 220, 220, 37227, 198, 220, 220, 220, 220, 220, ...
2.407388
1,895
#! /usr/bin/env python __author__ = "Panthotanvir" obj = Child() print "result of isinstance of parent class:", isinstance(obj, Parent) print "result of isinstance of child class:", isinstance(obj, Child) print "result of issubclass parent of child", issubclass(Parent, Child) print "result of issubclass child of ...
[ 2, 0, 1220, 14629, 14, 8800, 14, 24330, 21015, 220, 198, 198, 834, 9800, 834, 796, 366, 15730, 400, 313, 272, 37040, 1, 628, 198, 26801, 796, 5932, 3419, 198, 198, 4798, 366, 20274, 286, 318, 39098, 286, 2560, 1398, 25, 1600, 318, ...
3.357143
168
if __name__ == "__main__": mainCBEI()
[ 198, 198, 361, 11593, 3672, 834, 6624, 366, 834, 12417, 834, 1298, 198, 220, 220, 220, 1388, 34, 12473, 40, 3419 ]
2.047619
21
#!/usr/bin/env python # -*- coding: utf-8 -*- """ for amimoto_alexa """ def debug_logger(*args): """ outputs args to log """ for x in args: print(repr(x))
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 37811, 198, 329, 716, 43354, 62, 1000, 27865, 198, 37811, 628, 198, 4299, 14257, 62, 6404, 1362, 46491, 22046, 2599, 19...
2.182927
82
import webbrowser import shutil import os from subprocess import Popen, PIPE, STDOUT from distutils.spawn import find_executable from six import u from traitlets import TraitError, validate, Bool, Dict, Unicode from ipypublish import __version__ from ipypublish.postprocessors.base import IPyPostProcessor from ipypubl...
[ 11748, 3992, 40259, 198, 11748, 4423, 346, 198, 11748, 28686, 198, 6738, 850, 14681, 1330, 8099, 268, 11, 350, 4061, 36, 11, 48571, 12425, 198, 6738, 1233, 26791, 13, 48183, 1330, 1064, 62, 18558, 18187, 198, 198, 6738, 2237, 1330, 334,...
2.77643
577
# Copyright 2018 The TensorFlow Probability 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 applicable law o...
[ 2, 15069, 2864, 383, 309, 22854, 37535, 30873, 1799, 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, 2845, 287, 11846, 351, 262, ...
3.493534
464
# yacctab.py # This file is automatically generated. Do not edit. _tabversion = '3.2' _lr_method = 'LALR' _lr_signature = '2\xc5_\xd67N4BKg\xe9|"\xc9x\'' _lr_action_items = {'VOID':([0,1,2,9,14,16,18,21,22,23,24,25,27,30,31,34,35,36,37,40,41,44,45,47,49,51,53,55,56,58,61,62,65,67,69,71,72,74,76,77,79,80,82,84,8...
[ 198, 2, 331, 330, 310, 397, 13, 9078, 198, 2, 770, 2393, 318, 6338, 7560, 13, 2141, 407, 4370, 13, 198, 62, 8658, 9641, 796, 705, 18, 13, 17, 6, 198, 198, 62, 14050, 62, 24396, 796, 705, 43, 1847, 49, 6, 198, 198, 62, 14050, ...
2.171139
61,272
"""Test the json file with keys and values describing the data file.""" import os.path as op import json import sp_experiment init_dir = op.dirname(sp_experiment.__file__) fname = 'task-sp_events.json' fpath = op.join(init_dir, fname) def test_json(): """Test json file.""" with open(fpath, 'r') as f: ...
[ 37811, 14402, 262, 33918, 2393, 351, 8251, 290, 3815, 12059, 262, 1366, 2393, 526, 15931, 198, 11748, 28686, 13, 6978, 355, 1034, 198, 11748, 33918, 198, 198, 11748, 599, 62, 23100, 3681, 628, 198, 15003, 62, 15908, 796, 1034, 13, 15908...
2.329897
194
import os import argparse import numpy as np import cv2 from PIL import Image from tqdm import tqdm from .utils import mpi_process if __name__ == '__main__': main()
[ 11748, 28686, 198, 11748, 1822, 29572, 198, 11748, 299, 32152, 355, 45941, 198, 11748, 269, 85, 17, 198, 6738, 350, 4146, 1330, 7412, 198, 6738, 256, 80, 36020, 1330, 256, 80, 36020, 198, 6738, 764, 26791, 1330, 285, 14415, 62, 14681, ...
2.881356
59
import pytest from unittest.mock import MagicMock, patch import base64 import os import requests import time import gen3.auth from gen3.auth import Gen3Auth test_endpoint = "https://localhost" test_key = { "api_key": "whatever." + base64.urlsafe_b64encode( ('{"iss": "%s", "exp": %d }' % (test_endpoint...
[ 11748, 12972, 9288, 198, 6738, 555, 715, 395, 13, 76, 735, 1330, 6139, 44, 735, 11, 8529, 198, 11748, 2779, 2414, 198, 11748, 28686, 198, 11748, 7007, 198, 11748, 640, 198, 198, 11748, 2429, 18, 13, 18439, 198, 6738, 2429, 18, 13, 1...
2.259895
2,678
import pandas as pd import glob import numpy as np from pandas_profiling import ProfileReport from fuzzywuzzy import fuzz from fuzzywuzzy import process # Loading HERA data path = r'./hera/' # use your path USE_COLS = ['ISO_3', 'DATE', 'REGION', 'CONTAMINES', 'DECES', 'GUERIS', 'CONTAMINES_FEMME', 'CONTAMINES_HOMME', ...
[ 11748, 19798, 292, 355, 279, 67, 198, 11748, 15095, 198, 11748, 299, 32152, 355, 45941, 198, 6738, 19798, 292, 62, 5577, 4386, 1330, 13118, 19100, 198, 6738, 34669, 86, 4715, 88, 1330, 26080, 198, 6738, 34669, 86, 4715, 88, 1330, 1429, ...
2.307092
2,820
import numpy as np import cv2 import time from grabscreen import grab_screen #drivingwindow #race map #scoreboard #speedometer #health meter #RPM gauge #Steering wheel #Gear box to shift gears #Left rearview mirror #Right rearview mirror main()
[ 11748, 299, 32152, 355, 45941, 198, 11748, 269, 85, 17, 198, 11748, 640, 198, 6738, 5552, 9612, 1330, 5552, 62, 9612, 628, 198, 2, 24255, 17497, 628, 198, 2, 16740, 3975, 198, 198, 2, 26675, 3526, 198, 198, 2, 12287, 15635, 198, 198...
2.892473
93
#!/usr/bin/env python3 # -*- coding: utf-8 -*- """ Written by Lucas Sinclair. MIT Licensed. Contact at www.sinclair.bio """ # Built-in modules # from math import log ################################################################################ class FileSize(object): """ Container for a size in bytes with...
[ 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, 37811, 198, 25354, 416, 15257, 34927, 13, 198, 36393, 49962, 13, 198, 17829, 379, 7324, 13, 31369, 27659, 13, ...
2.736402
239
import tkinter as tk import random as rd import subprocess from tkinter import messagebox from numpy import array from time import sleep player = 'X' buttons_grid = [[0, 0, 0], [0, 0, 0], [0, 0, 0]] copied_grid = [[0, 0, 0], [0, 0, 0], [0, 0, 0]] violet = ...
[ 11748, 256, 74, 3849, 355, 256, 74, 198, 11748, 4738, 355, 374, 67, 198, 11748, 850, 14681, 198, 6738, 256, 74, 3849, 1330, 3275, 3524, 198, 6738, 299, 32152, 1330, 7177, 198, 6738, 640, 1330, 3993, 628, 198, 7829, 796, 705, 55, 6, ...
2.055046
218
# Copyright 2018 Alexis Pietak and Joel Grodstein # See "LICENSE" for further details. import numpy as np import matplotlib.pyplot as plt from matplotlib.collections import LineCollection import sim #import pdb; pdb.set_trace() # Simple functions to plot voltage or ion concentration. # 'cells' is which cells to plot ...
[ 2, 15069, 2864, 31078, 36548, 461, 290, 18623, 10299, 67, 5714, 198, 2, 4091, 366, 43, 2149, 24290, 1, 329, 2252, 3307, 13, 198, 198, 11748, 299, 32152, 355, 45941, 198, 11748, 2603, 29487, 8019, 13, 9078, 29487, 355, 458, 83, 198, ...
3.296928
879
# Generated by Django 3.0.5 on 2020-04-21 11:49 from django.conf import settings from django.db import migrations, models import django.db.models.deletion
[ 2, 2980, 515, 416, 37770, 513, 13, 15, 13, 20, 319, 12131, 12, 3023, 12, 2481, 1367, 25, 2920, 198, 198, 6738, 42625, 14208, 13, 10414, 1330, 6460, 198, 6738, 42625, 14208, 13, 9945, 1330, 15720, 602, 11, 4981, 198, 11748, 42625, 14...
3.019231
52
""" Unstructured grid generation and modification utilities Usage include: - Create a cartesian mesh - Reorder grid cells using metis """ import numpy as np from sfoda.ugrid.hybridgrid import HybridGrid from sfoda.utils.inpolygon import inpolygon def cartesian_ugrid_gen(xlims, ylims, dx, suntanspath=None, ma...
[ 37811, 198, 3118, 7249, 1522, 10706, 5270, 290, 17613, 20081, 198, 198, 28350, 2291, 25, 198, 220, 220, 220, 532, 13610, 257, 6383, 35610, 19609, 198, 220, 220, 220, 532, 797, 2875, 10706, 4778, 1262, 1138, 271, 198, 37811, 198, 11748, ...
2.010679
1,311
# # Licensed to the Apache Software Foundation (ASF) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. The ASF licenses this file # to you under the Apache License, Version 2.0 (the # "License"); you may not...
[ 2, 198, 2, 49962, 284, 262, 24843, 10442, 5693, 357, 1921, 37, 8, 739, 530, 198, 2, 393, 517, 18920, 5964, 11704, 13, 220, 4091, 262, 28536, 2393, 198, 2, 9387, 351, 428, 670, 329, 3224, 1321, 198, 2, 5115, 6634, 9238, 13, 220, ...
3.763838
271
from selenium import webdriver from selenium.webdriver.chrome.options import Options import time import json import os with open("info.json", 'rt', encoding='UTF8') as f: data = json.load(f) name = data["name"] school = data["school"] birthday = data["birthday"] cityName = data["city"] password =...
[ 220, 198, 198, 6738, 384, 11925, 1505, 1330, 3992, 26230, 198, 6738, 384, 11925, 1505, 13, 12384, 26230, 13, 46659, 13, 25811, 1330, 18634, 198, 11748, 640, 198, 11748, 33918, 198, 11748, 28686, 628, 198, 220, 220, 628, 198, 4480, 1280,...
2.055246
1,973