content
stringlengths
1
1.05M
input_ids
listlengths
1
883k
ratio_char_token
float64
1
22.9
token_count
int64
1
883k
import castle from typing import Tuple if __name__ == '__main__': main()
[ 11748, 16669, 198, 198, 6738, 19720, 1330, 309, 29291, 628, 628, 628, 628, 198, 198, 361, 11593, 3672, 834, 6624, 705, 834, 12417, 834, 10354, 198, 220, 220, 220, 1388, 3419, 198 ]
2.71875
32
#!/usr/bin/env python3 # Copyright 2018 Brocade Communications Systems LLC. 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 also obtain a copy of the License at # http://www.apache.org/licenses/LICENS...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 18, 198, 198, 2, 15069, 2864, 2806, 46395, 14620, 11998, 11419, 13, 220, 1439, 2489, 10395, 13, 198, 2, 198, 2, 49962, 739, 262, 24843, 13789, 11, 10628, 362, 13, 15, 357, 1169, 366, 3415...
3.029891
736
from django.shortcuts import render,redirect,reverse from . import forms,models from django.db.models import Sum from django.contrib.auth.models import Group from django.http import HttpResponseRedirect from django.contrib.auth.decorators import login_required,user_passes_test from django.conf import settings from djan...
[ 6738, 42625, 14208, 13, 19509, 23779, 1330, 8543, 11, 445, 1060, 11, 50188, 198, 6738, 764, 1330, 5107, 11, 27530, 198, 6738, 42625, 14208, 13, 9945, 13, 27530, 1330, 5060, 198, 6738, 42625, 14208, 13, 3642, 822, 13, 18439, 13, 27530, ...
4.437819
587
import random import numpy as np import itertools import re from collections import defaultdict import os def convert_to_simple_label(tag, rep="disf1_uttseg"): """Takes the complex tag set and gives back the simple, smaller version with ten tags: """ disftag = "<f/>" if "<rm-" in tag: di...
[ 11748, 4738, 198, 11748, 299, 32152, 355, 45941, 198, 11748, 340, 861, 10141, 198, 11748, 302, 198, 6738, 17268, 1330, 4277, 11600, 198, 11748, 28686, 628, 628, 198, 4299, 10385, 62, 1462, 62, 36439, 62, 18242, 7, 12985, 11, 1128, 2625,...
1.856602
14,533
from rest_framework.pagination import PageNumberPagination
[ 6738, 1334, 62, 30604, 13, 79, 363, 1883, 1330, 7873, 15057, 47, 363, 1883 ]
4.142857
14
''' @author Gabriel Flores Checks the primality of an integer. ''' def is_prime(x): ''' Checks the primality of an integer. ''' sqrt = int(x ** (1/2)) for i in range(2, sqrt, 1): if x % i == 0: return False return True if __name__ == "__main__": main()
[ 7061, 6, 198, 197, 31, 9800, 17371, 40222, 198, 197, 7376, 4657, 262, 2684, 1483, 286, 281, 18253, 13, 198, 7061, 6, 198, 198, 4299, 318, 62, 35505, 7, 87, 2599, 198, 197, 7061, 6, 198, 197, 197, 7376, 4657, 262, 2684, 1483, 286, ...
2.347826
115
#!/usr/bin/env python """Plot the performance of different variants of the string routines for one size. """ import libplot import pylab if __name__ == '__main__': main()
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 198, 37811, 43328, 262, 2854, 286, 1180, 17670, 286, 262, 4731, 31878, 198, 1640, 530, 2546, 13, 198, 37811, 198, 198, 11748, 9195, 29487, 198, 198, 11748, 279, 2645, 397, 628, 198, 36...
3.103448
58
import sqlite3 import time, datetime, random import matplotlib matplotlib.use("Agg") #added due to error, possibly due to install configuration import matplotlib.pyplot as plt print(matplotlib.get_backend()) import matplotlib.dates as mdates from matplotlib import style style.use('fivethirtyeight') conn = sqlite3...
[ 11748, 44161, 578, 18, 198, 11748, 640, 11, 4818, 8079, 11, 4738, 198, 11748, 2603, 29487, 8019, 198, 6759, 29487, 8019, 13, 1904, 7203, 46384, 4943, 198, 2, 29373, 2233, 284, 4049, 11, 5457, 2233, 284, 2721, 8398, 198, 198, 11748, 26...
2.553977
352
import json import os from urllib.parse import parse_qs from urllib.parse import urlparse import pytest import responses from freezegun import freeze_time from jwkest import BadSignature from jwkest.jwk import SYMKey from oic.oauth2.message import MissingSigningKey from oic.oauth2.message import WrongSigningAlgorithm...
[ 11748, 33918, 198, 11748, 28686, 198, 6738, 2956, 297, 571, 13, 29572, 1330, 21136, 62, 48382, 198, 6738, 2956, 297, 571, 13, 29572, 1330, 19016, 29572, 198, 198, 11748, 12972, 9288, 198, 11748, 9109, 198, 6738, 1479, 89, 1533, 403, 133...
2.60339
885
#!/usr/bin/env python # -*- coding: utf-8 -*- import os import io from codecs import open from setuptools import setup, find_packages REQUIRES = [ 'appdirs>=1.4.3,<2.0', 'carto>=1.6.0,<2.0', 'jinja2>=2.10.1,<3.0', 'pandas>=0.24.2<1.0', 'shapely>=1.6.4,<2.0', 'tqdm>=4.32.1,<5.0', 'unideco...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 198, 11748, 28686, 198, 11748, 33245, 198, 6738, 40481, 82, 1330, 1280, 198, 6738, 900, 37623, 10141, 1330, 9058, 11, 1...
2.185919
909
#!/usr/bin/env python # This code is part of the Biopython distribution and governed by its # license. Please see the LICENSE file that should have been included # as part of this package. """Run BioSQL tests using MySQL.""" import unittest # Really do want "import *" to get all the test clases: from common_BioSQL ...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 2, 770, 2438, 318, 636, 286, 262, 8436, 404, 7535, 6082, 290, 21825, 416, 663, 198, 2, 5964, 13, 220, 4222, 766, 262, 38559, 24290, 2393, 326, 815, 423, 587, 3017, 198, 2, 355, 636...
3.008798
341
# Generated by Django 2.2.6 on 2020-04-05 07:50 from django.db import migrations, models
[ 2, 2980, 515, 416, 37770, 362, 13, 17, 13, 21, 319, 12131, 12, 3023, 12, 2713, 8753, 25, 1120, 198, 198, 6738, 42625, 14208, 13, 9945, 1330, 15720, 602, 11, 4981, 628 ]
2.84375
32
# Copyright (C) 2015 UCSC Computational Genomics Lab # # 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, 357, 34, 8, 1853, 14417, 6173, 22476, 864, 5215, 31994, 3498, 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, ...
3.32
550
from datetime import date import dash import dash_bootstrap_components as dbc import dash_core_components as dcc import dash_html_components as html import pandas as pd import plotly.express as px from dash.dependencies import Input, Output test_data = pd.read_csv("data/world_data.csv") today = date.today() external...
[ 6738, 4818, 8079, 1330, 3128, 198, 11748, 14470, 198, 11748, 14470, 62, 18769, 26418, 62, 5589, 3906, 355, 288, 15630, 198, 11748, 14470, 62, 7295, 62, 5589, 3906, 355, 288, 535, 198, 11748, 14470, 62, 6494, 62, 5589, 3906, 355, 27711, ...
1.49442
4,391
from collections import OrderedDict import skimage.io as io from config import get_config config = get_config() _cache = LRUCache(config["data_queue_len"])
[ 6738, 17268, 1330, 14230, 1068, 35, 713, 198, 198, 11748, 1341, 9060, 13, 952, 355, 33245, 198, 198, 6738, 4566, 1330, 651, 62, 11250, 198, 198, 11250, 796, 651, 62, 11250, 3419, 628, 198, 198, 62, 23870, 796, 37491, 9598, 4891, 7, ...
3.134615
52
import numpy from heapq import * import time
[ 11748, 299, 32152, 198, 6738, 24575, 80, 1330, 1635, 198, 11748, 640, 628, 198 ]
3.357143
14
import logging import time from qupy.framing.slip import Slip from qupy.interface.serial import SerialPort from qupy.interface.errors import InterfaceTimeoutError, InterfaceIOError, InterfaceError from qupy.comm.client import CommClient logging.basicConfig(level=logging.DEBUG) if __name__ == '__main__': s = Se...
[ 11748, 18931, 198, 11748, 640, 198, 198, 6738, 627, 9078, 13, 19298, 278, 13, 6649, 541, 1330, 49988, 198, 6738, 627, 9078, 13, 39994, 13, 46911, 1330, 23283, 13924, 198, 6738, 627, 9078, 13, 39994, 13, 48277, 1330, 26491, 48031, 12331,...
1.949477
574
import torch from transformers import PreTrainedTokenizerFast from transformers import BartForConditionalGeneration abs_summary = AbsSummarization()
[ 11748, 28034, 198, 6738, 6121, 364, 1330, 3771, 2898, 1328, 30642, 7509, 22968, 198, 6738, 6121, 364, 1330, 13167, 1890, 25559, 1859, 8645, 341, 198, 198, 8937, 62, 49736, 796, 13051, 13065, 3876, 1634, 3419 ]
4.257143
35
# -*- coding: utf-8 -*- import tempfile from dp_tornado.engine.helper import Helper as dpHelper
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 628, 198, 11748, 20218, 7753, 198, 198, 6738, 288, 79, 62, 45910, 4533, 13, 18392, 13, 2978, 525, 1330, 5053, 525, 355, 288, 79, 47429, 628 ]
2.564103
39
import requests from bs4 import BeautifulSoup import json import re # Range of Roll Number - User Input start_roll = int(input("Starting Roll Number: ")) end_roll = int(input("Ending Roll Number: ")) # Semester - User Input sem = int(input("Which Semester[1-8]: ")) # Verbosity verbose = int(input("Verbo...
[ 11748, 7007, 201, 198, 6738, 275, 82, 19, 1330, 23762, 50, 10486, 201, 198, 11748, 33918, 201, 198, 11748, 302, 201, 198, 201, 198, 2, 13667, 286, 8299, 7913, 532, 11787, 23412, 201, 198, 9688, 62, 2487, 796, 493, 7, 15414, 7203, 22...
2.389006
473
#!/usr/bin/env python __author__ = "Adeel Ahmad" __email__ = "adeelahmad14@hotmail.com" __status__ = "Production" import matplotlib.pyplot as plt import numpy as np import skimage as ski import Image def cartoonify(im, display=False): """ function receives an image and add its gradient magnitude in it and add it ...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 198, 834, 9800, 834, 796, 366, 2782, 68, 417, 24152, 1, 198, 834, 12888, 834, 796, 366, 671, 417, 993, 9937, 1415, 31, 8940, 4529, 13, 785, 1, 198, 834, 13376, 834, 796, 366, 35027...
2.125
664
from dataclasses import dataclass import json import re
[ 6738, 4818, 330, 28958, 1330, 4818, 330, 31172, 198, 11748, 33918, 198, 11748, 302, 198 ]
3.733333
15
# -*- coding: utf-8 -*- """Demo37_PythonforDataScience.ipynb # PYTHON FOR DATA SCIENCE We will take our python programming skills a step further and process large data in it. Python is an excellent language for deployment. Hence we will be using open source data during the learning process!! This will make sure we un...
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 37811, 11522, 78, 2718, 62, 37906, 1640, 6601, 26959, 13, 541, 2047, 65, 198, 198, 2, 350, 56, 4221, 1340, 7473, 42865, 6374, 42589, 198, 1135, 481, 1011, 674, 21015, ...
2.558848
1,215
# Copyright 2017 QuantRocket - 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 ...
[ 2, 15069, 2177, 16972, 50218, 532, 1439, 6923, 33876, 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,...
2.867701
1,353
from ink2canvas.lib.simpletransform import parseTransform
[ 6738, 16882, 17, 5171, 11017, 13, 8019, 13, 36439, 35636, 1330, 21136, 41762 ]
4.384615
13
#!/usr/bin/env python # -*- coding: utf-8 -*- """ Kay management script. :Copyright: (c) 2009 Accense Technology, Inc. All rights reserved. :license: BSD, see LICENSE for more details. """ import sys import os import logging sys.path = [os.path.abspath(os.path.dirname(__file__))] + sys.path import kay kay.setup_en...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 198, 37811, 198, 37247, 4542, 4226, 13, 198, 198, 25, 15269, 25, 357, 66, 8, 3717, 6366, 1072, 8987, 11, 3457, 13, ...
2.631841
201
from pymicro.crystal.microstructure import * from pymicro.crystal.texture import * from pymicro.examples import PYMICRO_EXAMPLES_DATA_DIR from matplotlib import pyplot as plt, colors, colorbar, cm import pathlib as pl '''This example demonstrate how a field can be used to color each symbol on the pole figure with th...
[ 6738, 279, 4948, 2500, 13, 20470, 7757, 13, 24055, 301, 5620, 1330, 1635, 198, 6738, 279, 4948, 2500, 13, 20470, 7757, 13, 41293, 1330, 1635, 198, 6738, 279, 4948, 2500, 13, 1069, 12629, 1330, 350, 56, 49884, 13252, 62, 6369, 2390, 64...
2.529595
642
import time import sys import os import numpy as np import torch import torch.nn as nn import torchvision.models as models from torch.nn.utils.rnn import pack_padded_sequence from model.base_torch import BaseModel from model.utils.general import init_dir, get_logger from model.utils.general import Progb...
[ 11748, 640, 201, 198, 11748, 25064, 201, 198, 11748, 28686, 201, 198, 201, 198, 11748, 299, 32152, 355, 45941, 201, 198, 11748, 28034, 201, 198, 11748, 28034, 13, 20471, 355, 299, 77, 201, 198, 11748, 28034, 10178, 13, 27530, 355, 4981,...
3.154362
298
#!/usr/bin/python # Copyright (c) 2011, the Dart project authors. Please see the AUTHORS file # for details. All rights reserved. Use of this source code is governed by a # BSD-style license that can be found in the LICENSE file. """This entry point runs all script tests.""" import logging.config import unittest if ...
[ 2, 48443, 14629, 14, 8800, 14, 29412, 198, 2, 15069, 357, 66, 8, 2813, 11, 262, 29032, 1628, 7035, 13, 220, 4222, 766, 262, 37195, 20673, 2393, 198, 2, 329, 3307, 13, 1439, 2489, 10395, 13, 5765, 286, 428, 2723, 2438, 318, 21825, ...
2.853175
252
""" 11367. Report Card Time : xCrypt0r : Python 3 : 29,380 KB : 64 ms : 2020 9 18 """ if __name__ == '__main__': main()
[ 37811, 198, 1157, 27824, 13, 6358, 5172, 3862, 198, 198, 25, 2124, 23919, 15, 81, 198, 25, 11361, 513, 198, 1058, 2808, 11, 23734, 14204, 198, 1058, 5598, 13845, 198, 1058, 12131, 860, 1248, 198, 37811, 198, 198, 361, 11593, 3672, 834...
2.363636
55
from __future__ import print_function, division, absolute_import import copy import numpy as np import skimage.draw import skimage.measure from .. import imgaug as ia from .utils import normalize_shape, project_coords # TODO functions: square(), to_aspect_ratio(), contains_point() # TODO add tests for ndarray...
[ 6738, 11593, 37443, 834, 1330, 3601, 62, 8818, 11, 7297, 11, 4112, 62, 11748, 198, 198, 11748, 4866, 198, 198, 11748, 299, 32152, 355, 45941, 198, 11748, 1341, 9060, 13, 19334, 198, 11748, 1341, 9060, 13, 1326, 5015, 198, 198, 6738, 1...
2.138771
17,936
#!/usr/bin/env python from twisted.internet import endpoints from twisted.internet import protocol from twisted.internet import defer from twisted.mail import imap4 from scanner_relay.pipeline import Pipeline from scanner_relay.authentication import PassStoreFetcher, PlainPasswordFetcher import logging # Global con...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 198, 6738, 19074, 13, 37675, 1330, 886, 13033, 198, 6738, 19074, 13, 37675, 1330, 8435, 198, 6738, 19074, 13, 37675, 1330, 29135, 198, 6738, 19074, 13, 4529, 1330, 545, 499, 19, 198, 1...
3.05122
410
""" Created by akiselev on 2019-06-14 There is a horizontal row of cubes. The length of each cube is given. You need to create a new vertical pile of cubes. The new pile should follow these directions: if is on top of then . When stacking the cubes, you can only pick up either the leftmost or the rightmost cube ...
[ 37811, 628, 15622, 416, 47594, 786, 2768, 319, 13130, 12, 3312, 12, 1415, 198, 220, 198, 1318, 318, 257, 16021, 5752, 286, 34896, 13, 383, 4129, 286, 1123, 23441, 318, 1813, 13, 921, 761, 284, 2251, 257, 649, 11723, 14540, 286, 34896,...
3.105943
387
# # # File: flask_web_py3.py # # # import os import json import redis import urllib import flask from flask import Flask from flask import render_template,jsonify from flask_httpauth import HTTPDigestAuth from flask import request, session, url_for from redis_support_py3.graph_query_support_py3 impo...
[ 2, 201, 198, 2, 201, 198, 2, 220, 9220, 25, 42903, 62, 12384, 62, 9078, 18, 13, 9078, 201, 198, 2, 201, 198, 2, 201, 198, 2, 201, 198, 11748, 28686, 201, 198, 11748, 33918, 201, 198, 11748, 2266, 271, 201, 198, 11748, 2956, 297,...
2.434211
760
import os import logging from typing import Optional import click from git_talk.lib.changelog import generate_changelog from git_talk.lib.changelog.presenter import MarkdownPresenter from git_talk.lib.changelog.repository import GitRepository # @click.command() # @click.option( # "-r", # ...
[ 201, 198, 201, 198, 201, 198, 11748, 28686, 201, 198, 11748, 18931, 201, 198, 6738, 19720, 1330, 32233, 201, 198, 201, 198, 11748, 3904, 201, 198, 201, 198, 6738, 17606, 62, 16620, 13, 8019, 13, 354, 8368, 519, 1330, 7716, 62, 354, ...
2.793064
865
# Copyright (c) Stanford University # # This source code is patent protected and being made available under the # terms explained in the ../LICENSE-Academic and ../LICENSE-GOV files. # Author: Mario J Srouji # Email: msrouji@stanford.edu import copy import sys sys.path.append("../FormatParsers/") sys.path.append("../...
[ 2, 15069, 357, 66, 8, 13863, 2059, 198, 2, 198, 2, 770, 2723, 2438, 318, 12701, 6861, 290, 852, 925, 1695, 739, 262, 198, 2, 2846, 4893, 287, 262, 11485, 14, 43, 2149, 24290, 12, 12832, 49113, 290, 11485, 14, 43, 2149, 24290, 12, ...
3.254098
122
import tensorflow as tf def MultiBoxLoss(num_class=2, neg_pos_ratio=3): """multi-box loss""" return multi_box_loss
[ 11748, 11192, 273, 11125, 355, 48700, 628, 198, 198, 4299, 15237, 14253, 43, 793, 7, 22510, 62, 4871, 28, 17, 11, 2469, 62, 1930, 62, 10366, 952, 28, 18, 2599, 198, 220, 220, 220, 37227, 41684, 12, 3524, 2994, 37811, 628, 220, 220, ...
2.490196
51
import unittest import random from time import sleep import os from bingmaps import * # TODO: enter your key for testing api_key = '' if __name__ == '__main__': unittest.main()
[ 11748, 555, 715, 395, 198, 11748, 4738, 198, 6738, 640, 1330, 3993, 198, 11748, 28686, 198, 198, 6738, 275, 278, 31803, 1330, 1635, 198, 198, 2, 16926, 46, 25, 3802, 534, 1994, 329, 4856, 198, 15042, 62, 2539, 796, 10148, 198, 220, ...
2.728571
70
from cds.CloudflareWrapper import suggest_set_up, cf_config_filename from .FirewallWrapper import FirewallWrapper import logging as log
[ 6738, 269, 9310, 13, 18839, 2704, 533, 36918, 2848, 1330, 1950, 62, 2617, 62, 929, 11, 30218, 62, 11250, 62, 34345, 198, 6738, 764, 13543, 11930, 36918, 2848, 1330, 3764, 11930, 36918, 2848, 198, 11748, 18931, 355, 2604, 628, 198 ]
3.45
40
# -*- coding: utf-8 -*- # Generated by Django 1.11 on 2019-10-24 16:07 from __future__ import unicode_literals from django.db import migrations, models
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 2, 2980, 515, 416, 37770, 352, 13, 1157, 319, 13130, 12, 940, 12, 1731, 1467, 25, 2998, 198, 6738, 11593, 37443, 834, 1330, 28000, 1098, 62, 17201, 874, 198, 198, 6738...
2.8
55
# -*- coding: utf-8 -*- # cython: language_level=3 # Copyright (c) 2020 Nekokatt # # 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...
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 2, 3075, 400, 261, 25, 3303, 62, 5715, 28, 18, 198, 2, 15069, 357, 66, 8, 12131, 37167, 482, 1078, 198, 2, 198, 2, 2448, 3411, 318, 29376, 7520, 11, 1479, 286, 387...
3.322222
720
# -*- coding: utf-8 -*- # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software ...
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 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, 13...
3.808612
209
# Saul Castro # Hiralben Hirpara # config file format import random # list to string with sep 'char' # string to list, count # compare words, return 0 for no match, # 1 if end of a == start of b # 2 if end of b == start of a if __name__ == '__main__': readInput()
[ 2, 31603, 21193, 198, 2, 367, 21093, 11722, 29379, 1845, 64, 628, 198, 2, 4566, 2393, 5794, 198, 11748, 4738, 220, 198, 198, 2, 1351, 284, 4731, 351, 41767, 705, 10641, 6, 628, 198, 2, 4731, 284, 1351, 11, 954, 198, 198, 2, 8996, ...
2.936842
95
from global_utils import * # target word TARGET_WORD = 'right' if __name__ == '__main__': parser = argparse.ArgumentParser() parser.add_argument( '--wavfile', help='Path to the .wav files', required=False ) parser.add_argument( '--indir', help='Absolute pat...
[ 6738, 3298, 62, 26791, 220, 1330, 1635, 198, 198, 2, 2496, 1573, 198, 51, 46095, 62, 54, 12532, 796, 705, 3506, 6, 628, 198, 198, 361, 11593, 3672, 834, 6624, 705, 834, 12417, 834, 10354, 198, 220, 220, 220, 30751, 796, 1822, 29572,...
2.378378
185
# Copyright 2019 Quantapix 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 l...
[ 2, 15069, 13130, 16972, 499, 844, 46665, 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, 11846, 351, ...
4.266667
180
import pygame, sys, random, time from pygame.locals import * # Create a Scoreboard class (from scratch) # Instance variables: screen, x, y, score, and font (size 30) # Methods: draw (and __init__) # Create a scoreboard at location 5, 5 # Draw the scoreboard in the game loop def main(): pygame.init() ...
[ 11748, 12972, 6057, 11, 25064, 11, 4738, 11, 640, 198, 6738, 12972, 6057, 13, 17946, 874, 1330, 1635, 628, 628, 198, 198, 2, 13610, 257, 15178, 3526, 1398, 357, 6738, 12692, 8, 198, 2, 220, 220, 2262, 590, 9633, 25, 3159, 11, 2124, ...
2.098266
1,038
from guniflask.config import settings from guniflask.web import blueprint, get_route
[ 6738, 2485, 361, 75, 2093, 13, 11250, 1330, 6460, 198, 6738, 2485, 361, 75, 2093, 13, 12384, 1330, 30881, 11, 651, 62, 38629, 628 ]
3.583333
24
from ._base_trainer import _BaseTrainer, MeasureMemory import pathlib import torch.multiprocessing as mp import torch from torch import nn import horovod.torch as hvd import numpy as np import xarray as xr import itertools from .flow_dataset import FlowDataset from .unet import UNet import sys from .visualization impor...
[ 6738, 47540, 8692, 62, 2213, 10613, 1330, 4808, 14881, 2898, 10613, 11, 24291, 30871, 198, 11748, 3108, 8019, 198, 11748, 28034, 13, 16680, 541, 305, 919, 278, 355, 29034, 198, 11748, 28034, 198, 6738, 28034, 1330, 299, 77, 198, 11748, ...
3.226087
115
from spinup import vpg import tensorflow as tf import numpy as np from gym.spaces import Box, Discrete from envs.focal_point_task_us_env import FocalPointTaskUsEnv from envs.phantom import ( ScatterersPhantom, Ball, Teddy ) from envs.imaging import ImagingSystem, Probe from envs.generator import ConstPhanto...
[ 6738, 7906, 929, 1330, 410, 6024, 198, 11748, 11192, 273, 11125, 355, 48700, 198, 11748, 299, 32152, 355, 45941, 198, 6738, 11550, 13, 2777, 2114, 1330, 8315, 11, 8444, 8374, 198, 6738, 551, 14259, 13, 69, 4374, 62, 4122, 62, 35943, 6...
2.590106
283
import sys,os sys.path.append('/home/zongdaoming/cv/multi-organ/multi-organ-ijcai') from lib.losses.BaseClass import _AbstractDiceLoss from lib.losses.basic import *
[ 11748, 25064, 11, 418, 198, 17597, 13, 6978, 13, 33295, 10786, 14, 11195, 14, 89, 506, 6814, 3383, 14, 33967, 14, 41684, 12, 9971, 14, 41684, 12, 9971, 12, 2926, 66, 1872, 11537, 198, 6738, 9195, 13, 22462, 274, 13, 14881, 9487, 133...
2.741935
62
# encoding: utf-8 # # Copyright (c) 2019 Dean Jackson <deanishe@deanishe.net> # # MIT Licence. See http://opensource.org/licenses/MIT # # Created on 2019-09-06 # """Overlay check mark on icons.""" from __future__ import print_function, absolute_import from Cocoa import ( NSBitmapImageRep, NSPNGFileType, ...
[ 2, 21004, 25, 3384, 69, 12, 23, 198, 2, 198, 2, 15069, 357, 66, 8, 13130, 11325, 6612, 1279, 2934, 272, 271, 258, 31, 2934, 272, 271, 258, 13, 3262, 29, 198, 2, 198, 2, 17168, 10483, 594, 13, 4091, 2638, 1378, 44813, 1668, 13, ...
2.638581
451
import datetime from threading import Thread from time import sleep import DBC.dbcreate as dbc
[ 11748, 4818, 8079, 198, 6738, 4704, 278, 1330, 14122, 198, 6738, 640, 1330, 3993, 198, 198, 11748, 360, 2749, 13, 9945, 17953, 355, 288, 15630, 198 ]
3.692308
26
# Copyright 2016 Google LLC 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 ag...
[ 2, 15069, 1584, 3012, 11419, 1439, 2489, 10395, 13, 198, 2, 198, 2, 49962, 739, 262, 24843, 13789, 11, 10628, 362, 13, 15, 357, 1169, 366, 34156, 15341, 198, 2, 345, 743, 407, 779, 428, 2393, 2845, 287, 11846, 351, 262, 13789, 13, ...
3.081633
392
A = ['a','b'] B = ['c','b','a'] print compareHash(A, B)
[ 32, 796, 37250, 64, 41707, 65, 20520, 198, 33, 796, 37250, 66, 41707, 65, 41707, 64, 20520, 198, 198, 4798, 8996, 26257, 7, 32, 11, 347, 8, 198 ]
2.035714
28
# Importing required packages: import pandas as pd from tkinter import * from tkinter.ttk import * root = Tk() # To visualize input DataFrame: def generate_plot(gui_root, df, x_axis, y_axis=None, plot={'type':None, 'hue':None}, aesthetics={'style':'whitegrid', 'palette':'...
[ 2, 17267, 278, 2672, 10392, 25, 201, 198, 11748, 19798, 292, 355, 279, 67, 201, 198, 6738, 256, 74, 3849, 1330, 1635, 201, 198, 6738, 256, 74, 3849, 13, 926, 74, 1330, 1635, 201, 198, 201, 198, 15763, 796, 309, 74, 3419, 201, 198,...
2.125915
1,366
import os import torch from torch.utils.data import DataLoader, TensorDataset import requests import io import zipfile from .data_reader import read_vocabulary, read_lm_data, lm_data_producer from .pre_process_wikitext import pre_process def get_dataset(dataset, batch_size, device): """ Returns data iterator...
[ 11748, 28686, 198, 11748, 28034, 198, 6738, 28034, 13, 26791, 13, 7890, 1330, 6060, 17401, 11, 309, 22854, 27354, 292, 316, 198, 11748, 7007, 198, 11748, 33245, 198, 11748, 19974, 7753, 198, 198, 6738, 764, 7890, 62, 46862, 1330, 1100, ...
2.332437
1,116
from tkinter import * #Cria a nossa tela instancia = Tk() #D um ttulo a tela instancia.title('Calculadora para Estatstica') #D um tamanho a tela instancia.geometry("800x600") #D um cone ao aplicativo #instancia.wm_iconbitmap('icone.ico') #Inicia o programa instancia.mainloop()
[ 6738, 256, 74, 3849, 1330, 1635, 198, 198, 2, 34, 7496, 257, 299, 793, 64, 256, 10304, 198, 8625, 1192, 544, 796, 309, 74, 3419, 198, 198, 2, 35, 23781, 256, 83, 43348, 257, 256, 10304, 198, 8625, 1192, 544, 13, 7839, 10786, 9771,...
2.319672
122
# -*- coding: utf-8 -*- """ Created on Sat Mar 19 09:42:09 2022 @author: iaala """ import requests import sql_configs import datetime import os from bs4 import BeautifulSoup import time from find_tables import ( table_information_one, table_information_two, table_information_three, table_information_...
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 37811, 198, 41972, 319, 7031, 1526, 678, 7769, 25, 3682, 25, 2931, 33160, 198, 198, 31, 9800, 25, 220, 544, 6081, 198, 37811, 198, 198, 11748, 7007, 198, 11748, 44161, ...
2.778947
190
from django.urls import resolve, reverse from django.test import TestCase from matches.views import matches_index from matches.models import Match
[ 6738, 42625, 14208, 13, 6371, 82, 1330, 10568, 11, 9575, 198, 6738, 42625, 14208, 13, 9288, 1330, 6208, 20448, 198, 6738, 7466, 13, 33571, 1330, 7466, 62, 9630, 198, 6738, 7466, 13, 27530, 1330, 13225, 628 ]
4.111111
36
from typing import Callable, Tuple import numpy as np def posterior_factory(y: np.ndarray, sigma_y: float, sigma_theta: float) -> Tuple[Callable]: """The banana distribution is a distribution that exhibits a characteristic banana-shaped ridge that resembles the posterior that can emerge from models that ...
[ 6738, 19720, 1330, 4889, 540, 11, 309, 29291, 198, 198, 11748, 299, 32152, 355, 45941, 628, 198, 4299, 34319, 62, 69, 9548, 7, 88, 25, 45941, 13, 358, 18747, 11, 264, 13495, 62, 88, 25, 12178, 11, 264, 13495, 62, 1169, 8326, 25, 1...
2.318458
2,465
from binaryninja import ( Architecture, BranchType, FlagRole, InstructionInfo, LowLevelILFlagCondition, RegisterInfo, ) from .instructions import TYPE3_INSTRUCTIONS, Instruction, Registers from .lifter import Lifter
[ 6738, 13934, 35073, 6592, 1330, 357, 198, 220, 220, 220, 29778, 11, 198, 220, 220, 220, 20551, 6030, 11, 198, 220, 220, 220, 19762, 47445, 11, 198, 220, 220, 220, 46486, 12360, 11, 198, 220, 220, 220, 7754, 4971, 4146, 34227, 48362, ...
3.025
80
__all__ = [ 'session', 'event', 'profile', 'consent', 'segment', 'source', 'rule', 'entity' ]
[ 834, 439, 834, 796, 685, 198, 220, 220, 220, 705, 29891, 3256, 198, 220, 220, 220, 705, 15596, 3256, 198, 220, 220, 220, 705, 13317, 3256, 198, 220, 220, 220, 705, 5936, 298, 3256, 198, 220, 220, 220, 705, 325, 5154, 3256, 198, 22...
1.909091
66
from salience_metrics import auc_judd, auc_shuff, cc, nss, similarity, normalize_map """ DHF1K paper: "we employ five classic met-rics, namely Normalized Scanpath Saliency (NSS), Sim-ilarity Metric (SIM), Linear Correlation Coefficient (CC),AUC-Judd (AUC-J), and shuffled AUC (s-AUC)."" """ import cv2 import o...
[ 6738, 3664, 1240, 62, 4164, 10466, 1330, 257, 1229, 62, 73, 4185, 11, 257, 1229, 62, 1477, 1648, 11, 36624, 11, 299, 824, 11, 26789, 11, 3487, 1096, 62, 8899, 198, 37811, 198, 35, 29567, 16, 42, 3348, 25, 366, 732, 220, 1873, 220,...
2.408246
1,237
import pytest from thefuck.rules.pacman_invalid_option import get_new_command from thefuck.rules.pacman_invalid_option import match from thefuck.types import Command good_output = """community/shared_meataxe 1.0-3 A set of programs for working with matrix representations over finite fields """ bad_output = "erro...
[ 11748, 12972, 9288, 198, 198, 6738, 262, 31699, 13, 38785, 13, 33587, 805, 62, 259, 12102, 62, 18076, 1330, 651, 62, 3605, 62, 21812, 198, 6738, 262, 31699, 13, 38785, 13, 33587, 805, 62, 259, 12102, 62, 18076, 1330, 2872, 198, 6738, ...
3.46
100
# Copyright 2019 D-Wave Systems Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or...
[ 2, 15069, 13130, 360, 12, 39709, 11998, 3457, 13, 198, 2, 198, 2, 220, 220, 220, 49962, 739, 262, 24843, 13789, 11, 10628, 362, 13, 15, 357, 1169, 366, 34156, 15341, 198, 2, 220, 220, 220, 345, 743, 407, 779, 428, 2393, 2845, 287,...
2.228444
3,375
import os
[ 11748, 28686, 628, 628 ]
3.25
4
from django import forms from django.core import validators from django.core.exceptions import ValidationError from leasing.enums import ( InfillDevelopmentCompensationState, LeaseState, TenantContactType, ) from leasing.models import Contact, DecisionMaker, District, LeaseType, Municipality from leasing.v...
[ 6738, 42625, 14208, 1330, 5107, 198, 6738, 42625, 14208, 13, 7295, 1330, 4938, 2024, 198, 6738, 42625, 14208, 13, 7295, 13, 1069, 11755, 1330, 3254, 24765, 12331, 198, 198, 6738, 42150, 13, 268, 5700, 1330, 357, 198, 220, 220, 220, 4806...
3.63
100
# polls/management/commands/create_admin_user.py import sys import logging from django.core.management.base import BaseCommand, CommandError from django.contrib.auth.models import User from django.conf import settings
[ 2, 9231, 14, 27604, 14, 9503, 1746, 14, 17953, 62, 28482, 62, 7220, 13, 9078, 198, 11748, 25064, 198, 11748, 18931, 198, 198, 6738, 42625, 14208, 13, 7295, 13, 27604, 13, 8692, 1330, 7308, 21575, 11, 9455, 12331, 198, 6738, 42625, 142...
3.666667
60
import unirest import json import requests import os import subprocess import time import argparse rootUrl = "https://api.unsplash.com/" unirest.default_header("Accept", "application/json") unirest.default_header("Accept-Version", "v1") unirest.default_header("Authorization","<CLIENT-ID>") while True: parser = a...
[ 11748, 555, 557, 301, 198, 11748, 33918, 198, 11748, 7007, 198, 11748, 28686, 198, 11748, 850, 14681, 198, 11748, 640, 198, 11748, 1822, 29572, 198, 198, 15763, 28165, 796, 366, 5450, 1378, 15042, 13, 13271, 489, 1077, 13, 785, 30487, 1...
2.977876
226
# Copyright (c) 2017, Somia Reality Oy # All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions # are met: # 1. Redistributions of source code must retain the above copyright # notice, this list of conditions an...
[ 2, 15069, 357, 66, 8, 2177, 11, 9995, 544, 22520, 39447, 198, 2, 1439, 2489, 10395, 13, 198, 2, 198, 2, 2297, 396, 3890, 290, 779, 287, 2723, 290, 13934, 5107, 11, 351, 393, 1231, 198, 2, 17613, 11, 389, 10431, 2810, 326, 262, 1...
3.454756
431
from datetime import datetime
[ 6738, 4818, 8079, 1330, 4818, 8079, 628 ]
4.428571
7
from caching.base import CachingManager, CachingMixin from django.db import models from tsdata.models import CensusProfile PURPOSE_CHOICES = ( (1, "Speed Limit Violation"), (2, "Stop Light/Sign Violation"), (3, "Driving While Impaired"), (4, "Safe Movement Violation"), (5, "Vehicle Equipment Violat...
[ 6738, 40918, 13, 8692, 1330, 327, 8103, 13511, 11, 327, 8103, 35608, 259, 198, 6738, 42625, 14208, 13, 9945, 1330, 4981, 198, 6738, 40379, 7890, 13, 27530, 1330, 20962, 37046, 198, 198, 47, 4261, 48933, 62, 44899, 34444, 796, 357, 198, ...
2.515206
559
from .login import LoginForm from .registration import RegistrationForm
[ 6738, 764, 38235, 1330, 23093, 8479, 201, 198, 6738, 764, 2301, 33397, 1330, 24610, 8479, 201, 198 ]
4.352941
17
from django.urls import path from django.contrib import admin from rest_framework_swagger.views import get_swagger_view from .views import notification schema_view = get_swagger_view(title='MAIL API') urlpatterns = [ path('front/betsy/irish/embargo/admin/', admin.site.urls), # Swagger API path( ...
[ 6738, 42625, 14208, 13, 6371, 82, 1330, 3108, 198, 6738, 42625, 14208, 13, 3642, 822, 1330, 13169, 198, 6738, 1334, 62, 30604, 62, 2032, 7928, 13, 33571, 1330, 651, 62, 2032, 7928, 62, 1177, 198, 198, 6738, 764, 33571, 1330, 14483, 19...
2.497738
221
from unittest import mock SOCK_STREAM = 0 set_interface = mock.Mock() interface = mock.MagicMock() getaddrinfo = mock.Mock() socket = mock.Mock()
[ 6738, 555, 715, 395, 1330, 15290, 198, 198, 50, 11290, 62, 2257, 32235, 796, 657, 198, 198, 2617, 62, 39994, 796, 15290, 13, 44, 735, 3419, 198, 39994, 796, 15290, 13, 22975, 44, 735, 3419, 198, 1136, 29851, 10951, 796, 15290, 13, 4...
2.759259
54
# -*- coding: utf-8 -*- import api,points from api.bottle import * II_PATH=os.path.dirname(__file__) or '.' TEMPLATE_PATH.insert(0,II_PATH) def _point_msg(pauth,tmsg): msgfrom, addr = points.check_hash(pauth) if not addr: return 'auth error!' cfg = api.load_echo(False) mo = api.toss(msgfrom,'%s,%s' %...
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 198, 11748, 40391, 11, 13033, 198, 6738, 40391, 13, 10985, 293, 1330, 1635, 198, 198, 3978, 62, 34219, 28, 418, 13, 6978, 13, 15908, 3672, 7, 834, 7753, 834, 8, 393, ...
1.928889
450
#!/usr/bin/env python from ncclient import manager import sys from lxml import etree # Set the device variables DEVICES = ['172.16.30.101', '172.16.30.102'] USER = 'admin' PASS = 'admin' PORT = 830 LOOPBACK_IP = { '172.16.30.101': '10.99.99.1/24', '172.16.30.102': '10.99.99.2/24' } DEVICE_NAMES = {'172.16.3...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 198, 6738, 299, 535, 75, 1153, 1330, 4706, 198, 11748, 25064, 198, 6738, 300, 19875, 1330, 2123, 631, 628, 198, 2, 5345, 262, 3335, 9633, 198, 198, 39345, 34444, 796, 37250, 23628, 13,...
1.749369
1,189
# To run this file, Win Start > cmd > file dir > run: python spacex_dash_app.py # Import required libraries import pandas as pd import dash from dash import html from dash import dcc from dash.dependencies import Input, Output import plotly.express as px # Read the airline data into pandas dataframe spacex_df = pd.rea...
[ 2, 1675, 1057, 428, 2393, 11, 7178, 7253, 1875, 23991, 1875, 2393, 26672, 1875, 1057, 25, 21015, 2272, 87, 62, 42460, 62, 1324, 13, 9078, 198, 2, 17267, 2672, 12782, 198, 11748, 19798, 292, 355, 279, 67, 198, 11748, 14470, 198, 6738, ...
2.167623
1,569
""" The best randomly-searched ResNet reported in the paper. In the original paper there is a bug. This network sums together layers after the ReLU nonlinearity, which are not Gaussian, and also do not have mean 0. As a result, the overall network does not converge to a Gaussian process. The defined kernel is still va...
[ 37811, 198, 464, 1266, 15456, 12, 325, 283, 1740, 1874, 7934, 2098, 287, 262, 3348, 13, 198, 198, 818, 262, 2656, 3348, 612, 318, 257, 5434, 13, 770, 3127, 21784, 1978, 11685, 706, 198, 1169, 797, 41596, 1729, 29127, 414, 11, 543, 3...
2.581227
554
import matplotlib.pyplot as plt import numpy as np # daily search trend for keyword 'flowers' for a year d = [ 1.04, 1.04, 1.16, 1.22, 1.46, 2.34, 1.16, 1.12, 1.24, 1.30, 1.44, 1.22, 1.26, 1.34, 1.26, 1.40, 1.52, 2.56, 1.36, 1.30, 1.20, 1.12, 1.12, 1.12, 1.06, 1.06, 1.00, 1.02, 1.04, 1.02, 1.06, 1.02, 1.04, 0.98, 0...
[ 11748, 2603, 29487, 8019, 13, 9078, 29487, 355, 458, 83, 198, 11748, 299, 32152, 355, 45941, 198, 198, 2, 4445, 2989, 5182, 329, 21179, 705, 2704, 3618, 6, 329, 257, 614, 198, 67, 796, 685, 198, 352, 13, 3023, 11, 352, 13, 3023, 1...
1.638581
1,804
from dataclasses import dataclass import logging from attributes import get_ability_modifier from sourcetree.utils import ( get_feats_list, get_feat_perks, get_feat_proficiencies, get_feat_requirements, ) from stdio import prompt log = logging.getLogger("thespian.tweaks")
[ 6738, 4818, 330, 28958, 1330, 4818, 330, 31172, 198, 11748, 18931, 198, 198, 6738, 12608, 1330, 651, 62, 1799, 62, 4666, 7483, 198, 6738, 11348, 66, 316, 631, 13, 26791, 1330, 357, 198, 220, 220, 220, 651, 62, 5036, 1381, 62, 4868, ...
2.757009
107
import os import platform import numpy if __name__ == '__main__': trainFolder = 'C:\Users\l.valavanis\Desktop\Clef2013\TrainSet' testFolder = 'C:\Users\l.valavanis\Desktop\Clef2013\TestSet' # # trainFolder = 'C:\Users\l.valavanis\Desktop\Clef2013\SampleImages - Copy' # testFolder = 'C:\Users\l.va...
[ 11748, 28686, 198, 11748, 3859, 198, 11748, 299, 32152, 628, 198, 361, 11593, 3672, 834, 6624, 705, 834, 12417, 834, 10354, 628, 220, 220, 220, 4512, 41092, 796, 705, 34, 7479, 14490, 59, 75, 13, 2100, 12421, 271, 59, 36881, 59, 34349...
2.509847
914
# -*- coding: utf-8 -*- # Copyright (c) 2018 Tigera, Inc. 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 re...
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 2, 15069, 357, 66, 8, 2864, 17030, 64, 11, 3457, 13, 1439, 2489, 10395, 13, 198, 2, 198, 2, 49962, 739, 262, 24843, 13789, 11, 10628, 362, 13, 15, 357, 1169, 366, ...
2.399819
2,211
if __name__ == '__main__': with open('input.txt') as f: seq1 = f.readline().strip() seq2 = f.readline().strip() with open('BLOSUM62.txt') as f1: lines = [line.strip().split() for line in f1.readlines()] matrix = {(i[0], i[1]): int(i[2]) for i in lines} penalty = 5 a...
[ 628, 628, 198, 198, 361, 11593, 3672, 834, 6624, 705, 834, 12417, 834, 10354, 198, 220, 220, 220, 351, 1280, 10786, 15414, 13, 14116, 11537, 355, 277, 25, 198, 220, 220, 220, 220, 220, 220, 220, 33756, 16, 796, 277, 13, 961, 1370, ...
2.232804
189
import os, sys project_path = os.path.dirname(os.path.dirname(os.path.abspath(__file__))) sys.path.append(project_path) import pickle if __name__ == "__main__": file_name = project_path + '/data/pathway_train_example.pkl' with open(file_name, 'rb') as f: data = pickle.load(f) trees_to_plot = [d[...
[ 11748, 28686, 11, 25064, 198, 198, 16302, 62, 6978, 796, 28686, 13, 6978, 13, 15908, 3672, 7, 418, 13, 6978, 13, 15908, 3672, 7, 418, 13, 6978, 13, 397, 2777, 776, 7, 834, 7753, 834, 22305, 198, 17597, 13, 6978, 13, 33295, 7, 1630...
2.365169
178
''' Homework assignment for the 'Python is easy' course by Pirple. Written be Ed Yablonsky. Snowman(Hangman) game. ''' from os import ( name as os_name, system as system_call, ) from os.path import ( abspath, dirname, join as join_path, ) ''' Screen displays game output ''' ''' Input represent...
[ 7061, 6, 198, 28718, 6433, 16237, 329, 262, 705, 37906, 318, 2562, 6, 1781, 416, 10334, 1154, 13, 198, 198, 25354, 307, 1717, 575, 23117, 684, 2584, 13, 198, 198, 28974, 805, 7, 39, 648, 805, 8, 983, 13, 198, 7061, 6, 198, 198, ...
2.817734
203
""" Created on Jul 5, 2012 @author: lichtens """ import csv import os
[ 37811, 198, 41972, 319, 5979, 642, 11, 2321, 198, 198, 31, 9800, 25, 300, 30830, 641, 198, 37811, 198, 11748, 269, 21370, 198, 11748, 28686, 198 ]
2.730769
26
""" ========================================================== Fitting model on imbalanced datasets and how to fight bias ========================================================== This example illustrates the problem induced by learning on datasets having imbalanced classes. Subsequently, we compare different approac...
[ 37811, 198, 10052, 4770, 2559, 855, 198, 37, 2535, 2746, 319, 545, 27753, 40522, 290, 703, 284, 1907, 10690, 198, 10052, 4770, 2559, 855, 198, 198, 1212, 1672, 21290, 262, 1917, 18268, 416, 4673, 319, 40522, 1719, 198, 320, 27753, 6097,...
3.223756
3,839
#!/usr/bin/python import argparse import re parser = argparse.ArgumentParser(description='Fix page breaks in War of The Rebellion text') parser.add_argument('files', nargs='*', help='Files to process') args = parser.parse_args() for file in args.files: outfile = open(file + ".joined-pagebreak", ...
[ 2, 48443, 14629, 14, 8800, 14, 29412, 198, 198, 11748, 1822, 29572, 198, 11748, 302, 198, 198, 48610, 796, 1822, 29572, 13, 28100, 1713, 46677, 7, 11213, 11639, 22743, 2443, 9457, 287, 1810, 286, 383, 34848, 2420, 11537, 198, 48610, 13,...
1.998482
1,976
if __name__ == "__main__": main("test") main("puzzle")
[ 198, 198, 361, 11593, 3672, 834, 6624, 366, 834, 12417, 834, 1298, 198, 220, 220, 220, 1388, 7203, 9288, 4943, 198, 220, 220, 220, 1388, 7203, 79, 9625, 4943, 198 ]
2.166667
30
import numpy as np import tensorflow as tf import tf_seal.python.ops.seal_ops as ops from tensorflow.python.keras.utils import tf_utils from tensorflow.python.client import session as tf_session from tensorflow.python.framework import ops as tf_ops # def __sub__(self, other): # other = convert_to_tensor(other...
[ 11748, 299, 32152, 355, 45941, 198, 11748, 11192, 273, 11125, 355, 48700, 198, 198, 11748, 48700, 62, 325, 282, 13, 29412, 13, 2840, 13, 325, 282, 62, 2840, 355, 39628, 198, 198, 6738, 11192, 273, 11125, 13, 29412, 13, 6122, 292, 13, ...
2.908784
592
from django.core.exceptions import ObjectDoesNotExist from django.contrib import admin from django.utils.translation import ugettext_lazy as _ from django.shortcuts import render from django.conf import settings from .models import Language, Type, MusicFocus, Category, Topic, RTRCategory, Host, Note, RRule, Schedule, ...
[ 6738, 42625, 14208, 13, 7295, 13, 1069, 11755, 1330, 9515, 13921, 3673, 3109, 396, 198, 6738, 42625, 14208, 13, 3642, 822, 1330, 13169, 198, 6738, 42625, 14208, 13, 26791, 13, 41519, 1330, 334, 1136, 5239, 62, 75, 12582, 355, 4808, 198,...
3.422642
265
import hashlib import json from time import time import pytest from app.chaine.blockchain import Blockchain def test_block_creation(a_valid_block, proof=123, previous_hash='abc'): bc = Blockchain() block_a_tester = bc.new_block(proof, previous_hash) assert block_a_tester['index'] == a_valid_block[...
[ 11748, 12234, 8019, 198, 11748, 33918, 198, 6738, 640, 1330, 640, 198, 11748, 12972, 9288, 198, 198, 6738, 598, 13, 354, 5718, 13, 9967, 7983, 1330, 29724, 628, 628, 628, 628, 198, 4299, 1332, 62, 9967, 62, 38793, 7, 64, 62, 12102, ...
2.639269
219
# from django.conf.urls import patterns, url, include # from django.views.generic import TemplateView # from . import views, APP_NAME # # urlpatterns = patterns('', # url(r'^$', views.index, name='%s.index' % APP_NAME), # ) from django.urls import path, re_path, include from . import views, APP_NAME from .api impo...
[ 2, 422, 42625, 14208, 13, 10414, 13, 6371, 82, 1330, 7572, 11, 19016, 11, 2291, 198, 2, 422, 42625, 14208, 13, 33571, 13, 41357, 1330, 37350, 7680, 198, 2, 422, 764, 1330, 5009, 11, 43504, 62, 20608, 198, 2, 198, 2, 19016, 33279, ...
2.605882
340
import os import glob import json from pathlib import Path from flask_restful import Api, Resource, reqparse from flask_jwt_extended import jwt_required from flask import Flask, request, escape, make_response, send_from_directory import utils # incase you can't install ansi2html it's won't break the api try: from ...
[ 11748, 28686, 198, 11748, 15095, 198, 11748, 33918, 198, 6738, 3108, 8019, 1330, 10644, 198, 6738, 42903, 62, 2118, 913, 1330, 5949, 72, 11, 20857, 11, 43089, 29572, 198, 6738, 42903, 62, 73, 46569, 62, 2302, 1631, 1330, 474, 46569, 62,...
3.086093
151
"""Module with hahomematic services.""" from __future__ import annotations from datetime import datetime import logging from hahomematic.const import ( ATTR_ADDRESS, ATTR_INTERFACE_ID, ATTR_NAME, ATTR_PARAMETER, ATTR_VALUE, HmPlatform, ) from hahomematic.device import HmDevice from hahomematic...
[ 37811, 26796, 351, 387, 26452, 368, 1512, 2594, 526, 15931, 198, 6738, 11593, 37443, 834, 1330, 37647, 198, 198, 6738, 4818, 8079, 1330, 4818, 8079, 198, 11748, 18931, 198, 198, 6738, 387, 26452, 368, 1512, 13, 9979, 1330, 357, 198, 220...
2.404287
2,706
# Generated by Django 3.2.3 on 2021-06-03 00:35 from django.db import migrations, models
[ 2, 2980, 515, 416, 37770, 513, 13, 17, 13, 18, 319, 33448, 12, 3312, 12, 3070, 3571, 25, 2327, 198, 198, 6738, 42625, 14208, 13, 9945, 1330, 15720, 602, 11, 4981, 628 ]
2.84375
32
# Copyright (c) 2018, 2019, Oracle and/or its affiliates. All rights reserved. # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. # # The Universal Permissive License (UPL), Version 1.0 # # Subject to the condition set forth below, permission is hereby granted to any # person obtaining a copy of this softw...
[ 2, 15069, 357, 66, 8, 2864, 11, 13130, 11, 18650, 290, 14, 273, 663, 29116, 13, 1439, 2489, 10395, 13, 198, 2, 8410, 5626, 8355, 5781, 6375, 22657, 46, 6089, 27975, 38162, 9947, 5626, 34444, 6375, 12680, 45811, 39837, 1137, 13, 198, ...
3.407306
1,095
from brownie import accounts, Wei, chain, ApeToken, ApeVaultFactory, ApeDistributor, ApeRegistry, ApeRouter, FeeRegistry, MockRegistry, MockVaultFactory, MockToken, MockVault
[ 6738, 7586, 494, 1330, 5504, 11, 29341, 11, 6333, 11, 317, 431, 30642, 11, 317, 431, 53, 1721, 22810, 11, 317, 431, 20344, 2455, 273, 11, 317, 431, 8081, 4592, 11, 317, 431, 49, 39605, 11, 28522, 8081, 4592, 11, 44123, 8081, 4592, ...
3.050847
59
from django.contrib.auth.mixins import PermissionRequiredMixin from django.urls import reverse_lazy from django.views.generic import DetailView, ListView, UpdateView from .models import Committee
[ 6738, 42625, 14208, 13, 3642, 822, 13, 18439, 13, 19816, 1040, 1330, 2448, 3411, 37374, 35608, 259, 198, 6738, 42625, 14208, 13, 6371, 82, 1330, 9575, 62, 75, 12582, 198, 6738, 42625, 14208, 13, 33571, 13, 41357, 1330, 42585, 7680, 11, ...
3.589286
56