content
stringlengths
1
1.04M
input_ids
listlengths
1
774k
ratio_char_token
float64
0.38
22.9
token_count
int64
1
774k
# For large systems, each fuel market tier is a category of capacity expansion, and # it can be built fractionally. For small systems, each fuel market tier is one # capacity-expansion project, and it must be fully built and/or activated each period. # To do this, we add binary variables and confine additions and acti...
[ 2, 1114, 1588, 3341, 11, 1123, 5252, 1910, 14249, 318, 257, 6536, 286, 5339, 7118, 11, 290, 198, 2, 340, 460, 307, 3170, 13390, 453, 13, 1114, 1402, 3341, 11, 1123, 5252, 1910, 14249, 318, 530, 220, 198, 2, 5339, 12, 11201, 5487, ...
4.103093
194
from PyQt5.QtCore import pyqtSignal, Qt, QSize from PyQt5.QtWidgets import QLabel, QListWidget, QListWidgetItem, QFileDialog from PyQt5.QtWidgets import QWidget, QVBoxLayout, QHBoxLayout, QStyle, QSizePolicy, QPushButton, QAbstractItemView # For testing individual widget if __name__ == "__main__": import sys ...
[ 6738, 9485, 48, 83, 20, 13, 48, 83, 14055, 1330, 12972, 39568, 11712, 282, 11, 33734, 11, 1195, 10699, 198, 6738, 9485, 48, 83, 20, 13, 48, 83, 54, 312, 11407, 1330, 1195, 33986, 11, 1195, 8053, 38300, 11, 1195, 8053, 38300, 7449, ...
2.622857
175
""" This module contains some utility callbacks for Keras training. """ # System from time import time # Externals import tensorflow as tf class TimingCallback(tf.keras.callbacks.Callback): """A Keras Callback which records the time of each epoch""" #class LearningRateScheduleCallback(tf.keras.callbacks.Callbac...
[ 37811, 198, 1212, 8265, 4909, 617, 10361, 869, 10146, 329, 17337, 292, 3047, 13, 198, 37811, 198, 198, 2, 4482, 198, 6738, 640, 1330, 640, 198, 198, 2, 1475, 759, 874, 198, 11748, 11192, 273, 11125, 355, 48700, 198, 198, 4871, 5045, ...
2.469314
277
from django.apps import AppConfig
[ 6738, 42625, 14208, 13, 18211, 1330, 2034, 16934, 628 ]
3.888889
9
""" Otter twisted application plugins for the various services. """ from twisted.application.service import ServiceMaker OtterMetrics = ServiceMaker( "Otter Metrics Collector", "otter.metrics", "Collects metrics for a region on an interval basis", "otter-metrics" )
[ 37811, 198, 46, 83, 353, 19074, 3586, 20652, 329, 262, 2972, 2594, 13, 198, 37811, 198, 198, 6738, 19074, 13, 31438, 13, 15271, 1330, 4809, 48890, 198, 198, 46, 83, 353, 9171, 10466, 796, 4809, 48890, 7, 198, 220, 220, 220, 366, 46,...
3.166667
90
import os import shutil import requests
[ 11748, 28686, 198, 11748, 4423, 346, 198, 11748, 7007, 628, 628, 628, 628, 628, 198 ]
3.333333
15
import timeit from typing import Any, Dict, Iterable, Mapping, Callable, Optional, Set from models.solver import Solver import pandas as pd def get_stats_df( solvers: Iterable[Solver], constructive: Optional[Callable[..., Set[int]]], local_search: Callable[..., Set[int]], ...
[ 11748, 640, 270, 198, 6738, 19720, 1330, 4377, 11, 360, 713, 11, 40806, 540, 11, 337, 5912, 11, 4889, 540, 11, 32233, 11, 5345, 198, 198, 6738, 4981, 13, 82, 14375, 1330, 4294, 332, 198, 198, 11748, 19798, 292, 355, 279, 67, 628, ...
2.19783
1,567
"""This module provides helper functionality with JWT.""" from datetime import datetime import jwt from app.utils.errors import TokenError def generate_token(secret_key, private_claims=None, exp_days=None): """Return encoded json web token.""" token_exp = None now = int(datetime.now().timestamp()) ...
[ 37811, 1212, 8265, 3769, 31904, 11244, 351, 449, 39386, 526, 15931, 198, 198, 6738, 4818, 8079, 1330, 4818, 8079, 198, 198, 11748, 474, 46569, 198, 198, 6738, 598, 13, 26791, 13, 48277, 1330, 29130, 12331, 628, 198, 4299, 7716, 62, 3000...
2.730994
342
# Python Standard Library Imports import json # Third Party (PyPI) Imports import requests import rollbar # HTK Imports from htk.lib.redfin.constants import * from htk.utils.urls import build_url_with_query_params
[ 2, 11361, 8997, 10074, 1846, 3742, 198, 11748, 33918, 198, 198, 2, 10467, 3615, 357, 20519, 11901, 8, 1846, 3742, 198, 11748, 7007, 198, 11748, 4836, 5657, 198, 198, 2, 7154, 42, 1846, 3742, 198, 6738, 289, 30488, 13, 8019, 13, 445, ...
3.191176
68
import numpy as np import imutils import cv2 import argparse
[ 11748, 299, 32152, 355, 45941, 198, 11748, 545, 26791, 198, 11748, 269, 85, 17, 198, 11748, 1822, 29572, 628 ]
3.263158
19
#!/usr/bin/env python import sys import h5py import numpy as np from rdkit import Chem, DataStructs from rdkit.Chem import rdMolDescriptors as rdmd from tqdm import tqdm from functools import wraps from time import time def timing(f): """ Decorator to measure execution time, adapted from # https://mediu...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 198, 11748, 25064, 198, 198, 11748, 289, 20, 9078, 198, 11748, 299, 32152, 355, 45941, 198, 6738, 374, 67, 15813, 1330, 12870, 11, 6060, 44909, 82, 198, 6738, 374, 67, 15813, 13, 41829...
2.285944
1,245
#!/usr/bin/env python # -*- coding: utf-8 -*- # Copyright 1999-2017 Alibaba Group Holding Ltd. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 2, 15069, 7358, 12, 5539, 41992, 4912, 31703, 12052, 13, 198, 2, 198, 2, 49962, 739, 262, 24843, 13789, 11, 10628, 36...
2.263736
1,456
"""Plot templates for the FOOOF module.""" import numpy as np from fooof.core.modutils import safe_import, check_dependency plt = safe_import('.pyplot', 'matplotlib') ################################################################################################### #################################################...
[ 37811, 43328, 24019, 329, 262, 376, 6684, 19238, 8265, 526, 15931, 198, 198, 11748, 299, 32152, 355, 45941, 198, 198, 6738, 22944, 1659, 13, 7295, 13, 4666, 26791, 1330, 3338, 62, 11748, 11, 2198, 62, 45841, 1387, 198, 198, 489, 83, 7...
2.486656
1,911
#!/usr/bin/env python # -*- coding: utf-8; py-indent-offset:4 -*- ############################################################################### # # Copyright (C) 2015, 2016, 2017 Daniel Rodriguez # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public Li...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 26, 12972, 12, 521, 298, 12, 28968, 25, 19, 532, 9, 12, 198, 29113, 29113, 7804, 4242, 21017, 198, 2, 198, 2, 15069, 357, 34, 8, 185...
3.097978
643
# -*- coding: utf-8 -*- # Generated by Django 1.9.3 on 2019-01-13 06:18 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, 24, 13, 18, 319, 13130, 12, 486, 12, 1485, 9130, 25, 1507, 198, 6738, 11593, 37443, 834, 1330, 28000, 1098, 62, 17201, 874, 198, 1...
2.719298
57
from gbdxtools import Interface from gbdxtools.s3 import S3 from auth_mock import get_mock_gbdx_session import vcr import os import tempfile import unittest """ How to use the mock_gbdx_session and vcr to create unit tests: 1. Add a new test that is dependent upon actually hitting GBDX APIs. 2. Decorate the test with ...
[ 6738, 308, 17457, 742, 10141, 1330, 26491, 198, 6738, 308, 17457, 742, 10141, 13, 82, 18, 1330, 311, 18, 198, 6738, 6284, 62, 76, 735, 1330, 651, 62, 76, 735, 62, 70, 17457, 87, 62, 29891, 198, 11748, 410, 6098, 198, 11748, 28686, ...
3.238434
281
#!/home/sam/shared-space/linux-system/anaconda3/bin/python from math import factorial import sympy as sp from bistochastic import generate_matrix import fpiter from polynomials import product_polynomial from functionals import elementary_symmetric_differential_operator import numpy.random SEED = 1 numpy.random.seed(S...
[ 2, 48443, 11195, 14, 37687, 14, 28710, 12, 13200, 14, 23289, 12, 10057, 14, 272, 330, 13533, 18, 14, 8800, 14, 29412, 198, 198, 6738, 10688, 1330, 1109, 5132, 198, 11748, 10558, 88, 355, 599, 198, 6738, 275, 396, 5374, 3477, 1330, 7...
3.067797
118
from pypy.rpython.rmodel import inputconst from pypy.rpython.ootypesystem import ootype from pypy.rpython.ootypesystem.rclass import InstanceRepr, mangle, OBJECT from pypy.rpython.rvirtualizable2 import AbstractVirtualizable2InstanceRepr VABLERTI = OBJECT
[ 6738, 279, 4464, 88, 13, 81, 29412, 13, 81, 19849, 1330, 5128, 9979, 198, 6738, 279, 4464, 88, 13, 81, 29412, 13, 1025, 9497, 6781, 1330, 267, 8690, 198, 6738, 279, 4464, 88, 13, 81, 29412, 13, 1025, 9497, 6781, 13, 81, 4871, 1330...
3
86
import random
[ 11748, 4738 ]
6.5
2
import pandas as pd from laptimize.branch_and_bound_solver import BranchAndBoundSolver from laptimize.lap_model import LAPModel from laptimize.log import LogFactory class Solver: """This class does solving non linear optimization problems using piecewise linear approximated programming branch and bond techni...
[ 11748, 19798, 292, 355, 279, 67, 198, 198, 6738, 10882, 48439, 13, 1671, 3702, 62, 392, 62, 7784, 62, 82, 14375, 1330, 20551, 1870, 49646, 50, 14375, 198, 6738, 10882, 48439, 13, 37796, 62, 19849, 1330, 406, 2969, 17633, 198, 6738, 10...
2.003372
3,559
from unittest import TestCase import pandas as pd from moonstone.parsers.transform.base import TransformBase
[ 6738, 555, 715, 395, 1330, 6208, 20448, 198, 198, 11748, 19798, 292, 355, 279, 67, 198, 198, 6738, 8824, 6440, 13, 79, 945, 364, 13, 35636, 13, 8692, 1330, 26981, 14881, 628 ]
3.5
32
from typing import Any, Dict, Iterable, List, Optional from fastapi import Depends from rubrix.server.commons.es_wrapper import ElasticsearchWrapper, create_es_wrapper from rubrix.server.commons.helpers import unflatten_dict from rubrix.server.commons.settings import settings from rubrix.server.datasets.dao import ( ...
[ 6738, 19720, 1330, 4377, 11, 360, 713, 11, 40806, 540, 11, 7343, 11, 32233, 198, 198, 6738, 3049, 15042, 1330, 2129, 2412, 198, 6738, 6437, 8609, 13, 15388, 13, 9503, 684, 13, 274, 62, 48553, 1330, 48567, 12947, 36918, 2848, 11, 2251,...
1.993303
3,733
import time import unittest import os import numpy as np import torch.nn.functional as F from torch import nn import torch from fastNLP import DataSet from fastNLP import Instance from fastNLP import BCELoss from fastNLP import CrossEntropyLoss from fastNLP import AccuracyMetric from fastNLP import SGD from fastNLP i...
[ 11748, 640, 198, 11748, 555, 715, 395, 198, 11748, 28686, 198, 198, 11748, 299, 32152, 355, 45941, 198, 11748, 28034, 13, 20471, 13, 45124, 355, 376, 198, 6738, 28034, 1330, 299, 77, 198, 11748, 28034, 198, 198, 6738, 3049, 45, 19930, ...
3.471545
123
# Copyright (c) 2016 Shreyas Kulkarni (shyran@gmail.com) # # 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...
[ 2, 15069, 357, 66, 8, 1584, 911, 4364, 292, 509, 12171, 1501, 72, 357, 1477, 2417, 272, 31, 14816, 13, 785, 8, 198, 2, 220, 198, 2, 2448, 3411, 318, 29376, 7520, 11, 1479, 286, 3877, 11, 284, 597, 1048, 16727, 257, 4866, 198, 2,...
2.80597
938
from rest_framework import serializers from .models import School, Student, Activity, Assignment
[ 6738, 1334, 62, 30604, 1330, 11389, 11341, 198, 6738, 764, 27530, 1330, 3961, 11, 13613, 11, 24641, 11, 50144, 628, 628, 198 ]
4.590909
22
#!/usr/bin/env python # # ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ # # Jiao Lin # California Institute of Technology # (C) 2007-2010 All Rights Reserved # # {LicenseText} # # ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 2, 198, 2, 220, 27156, 27156, 27156, 27156, 15116, 8728, 4907, 198, 2, 198, 2, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, ...
2.451613
217
# Generated by Django 3.1.5 on 2021-01-10 09:04 from django.conf import settings from django.db import migrations, models import django.db.models.deletion
[ 2, 2980, 515, 416, 37770, 513, 13, 16, 13, 20, 319, 33448, 12, 486, 12, 940, 7769, 25, 3023, 198, 198, 6738, 42625, 14208, 13, 10414, 1330, 6460, 198, 6738, 42625, 14208, 13, 9945, 1330, 15720, 602, 11, 4981, 198, 11748, 42625, 1420...
3.019231
52
# Copyright (c) 2004-2006 gocept gmbh & co. kg # See also LICENSE.txt # $Id$ import unittest from DateTime import DateTime from Products.CMFCore.utils import getToolByName from Products.AlphaFlow.tests.AlphaFlowTestCase import AlphaFlowTestCase from Products.AlphaFlow.activities.interfaces import \ IAlarmWorkI...
[ 2, 15069, 357, 66, 8, 5472, 12, 13330, 467, 984, 308, 2022, 71, 1222, 763, 13, 14211, 198, 2, 4091, 635, 38559, 24290, 13, 14116, 198, 2, 720, 7390, 3, 198, 198, 11748, 555, 715, 395, 198, 198, 6738, 7536, 7575, 1330, 7536, 7575, ...
3.324138
145
from evawiz_basic import *
[ 6738, 819, 707, 528, 62, 35487, 1330, 1635, 628 ]
3.111111
9
import queue from collections import Counter, OrderedDict import random import matplotlib.pyplot as plt class FIFO(Policy): "Notice that things close to 0 are closer to being evicted" if __name__ == "__main__": # raise Exception hit_rate = [] for file in ["ftrace_combined.c...
[ 11748, 16834, 198, 6738, 17268, 1330, 15034, 11, 14230, 1068, 35, 713, 198, 11748, 4738, 198, 11748, 2603, 29487, 8019, 13, 9078, 29487, 355, 458, 83, 198, 220, 220, 220, 220, 220, 220, 220, 220, 198, 198, 4871, 376, 5064, 46, 7, 36...
1.91944
571
{ "name": "Clear User Access rights", "summary": """Useful tool to reset user rights""", "version": "12.0.1.1.0", "author": "IT-Projects LLC, Ivan Yelizariev", "license": "Other OSI approved licence", # MIT "support": "apps@itpp.dev", "website": "https://it-projects.info", "category": "...
[ 90, 198, 220, 220, 220, 366, 3672, 1298, 366, 19856, 11787, 8798, 2489, 1600, 198, 220, 220, 220, 366, 49736, 1298, 37227, 11041, 913, 2891, 284, 13259, 2836, 2489, 15931, 1600, 198, 220, 220, 220, 366, 9641, 1298, 366, 1065, 13, 15, ...
2.497778
225
import serial, argparse from gui.controller import Controller if __name__ == '__main__': parser = argparse.ArgumentParser() # Arduino connecton configuration parser.add_argument('port', type=str, default='', help='Where to find the Arduino.') parser.add_argument('--baudrate', type=int, default=9600, help='Baud...
[ 11748, 11389, 11, 1822, 29572, 198, 6738, 11774, 13, 36500, 1330, 22741, 198, 198, 361, 11593, 3672, 834, 6624, 705, 834, 12417, 834, 10354, 198, 220, 30751, 796, 1822, 29572, 13, 28100, 1713, 46677, 3419, 198, 220, 1303, 27634, 2018, 2...
3.023747
379
import random ANSWERS = [ "of course not you idiot", "sure, why not", "do i look like an oracle to you?", "yes, obviously", "no", "yes", "literally kys", "absolutely haram", "idk, probably", "is grass green? is the sky blue? is taiwan numbah wan?" ]
[ 11748, 4738, 198, 198, 15037, 54, 4877, 796, 685, 198, 220, 220, 220, 366, 1659, 1781, 407, 345, 22324, 1600, 198, 220, 220, 220, 366, 19532, 11, 1521, 407, 1600, 198, 220, 220, 220, 366, 4598, 1312, 804, 588, 281, 393, 6008, 284, ...
2.385246
122
# 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 # distributed under the...
[ 2, 49962, 739, 262, 24843, 13789, 11, 10628, 362, 13, 15, 357, 1169, 366, 34156, 15341, 198, 2, 345, 743, 407, 779, 428, 2393, 2845, 287, 11846, 351, 262, 13789, 13, 198, 2, 921, 743, 7330, 257, 4866, 286, 262, 13789, 379, 198, 2,...
3.815686
255
# coding=utf-8 import RPi.GPIO as GPIO #引入RPi.GPIO模块,并实例化为GPIO,简化后面的模块调用 import time #引入time模块 import sys GPIO.setmode(GPIO.BOARD) #定义GPIO编码方式 print(len(sys.argv)) if (len(sys.argv) == 3): param1 = 1 if sys.argv[1].lower() == 'false' else 0 param2 = 1 if sys.argv[2].lower() == 'false' else 0 GP...
[ 2, 19617, 28, 40477, 12, 23, 198, 11748, 25812, 72, 13, 16960, 9399, 355, 50143, 220, 220, 1303, 28156, 243, 17739, 98, 20031, 72, 13, 16960, 9399, 162, 101, 94, 161, 251, 245, 171, 120, 234, 33176, 114, 22522, 252, 160, 122, 233, ...
1.459877
324
import argparse import cv2 import numpy as np import os import random import shutil import openface import openface.helper from openface.data import iterImgs fileDir = os.path.dirname(os.path.realpath(__file__)) modelDir = os.path.join(fileDir, '.', 'models') dlibModelDir = os.path.join(modelDir, 'dlib') openfaceModel...
[ 11748, 1822, 29572, 198, 11748, 269, 85, 17, 198, 11748, 299, 32152, 355, 45941, 198, 11748, 28686, 198, 11748, 4738, 198, 11748, 4423, 346, 198, 11748, 1280, 2550, 198, 11748, 1280, 2550, 13, 2978, 525, 198, 6738, 1280, 2550, 13, 7890,...
2.858268
127
""" utility functions for working with DataFrames """ import pandas as pd from sklearn.model_selection import train_test_split class Data: """ For use with dataframes and the many things you want to do to them """ def check_null(self): """ Prints the columns with and ammounts of null...
[ 37811, 198, 315, 879, 5499, 329, 1762, 351, 6060, 35439, 198, 37811, 198, 198, 11748, 19798, 292, 355, 279, 67, 198, 6738, 1341, 35720, 13, 19849, 62, 49283, 1330, 4512, 62, 9288, 62, 35312, 628, 198, 4871, 6060, 25, 198, 220, 220, ...
2.326316
475
# -*- coding: utf-8 -*- # # Copyright (c) 2018 Leland Stanford Junior University # Copyright (c) 2018 The Regents of the University of California # # This file is part of pelicun. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions ...
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 2, 198, 2, 15069, 357, 66, 8, 2864, 406, 8822, 13863, 20000, 2059, 198, 2, 15069, 357, 66, 8, 2864, 383, 3310, 658, 286, 262, 2059, 286, 3442, 198, 2, 198, 2, 770,...
1.711328
9,516
# -*- coding:utf-8 -*- from sqlalchemy.ext.declarative import declarative_base from sqlalchemy import Column, Integer, String, ForeignKey, create_engine from sqlalchemy.orm import sessionmaker Base = declarative_base() engine = create_engine('mysql+pymysql://macd:macd@localhost/test') User.metadata.cr...
[ 2, 532, 9, 12, 19617, 25, 40477, 12, 23, 532, 9, 12, 201, 198, 201, 198, 6738, 44161, 282, 26599, 13, 2302, 13, 32446, 283, 876, 1330, 2377, 283, 876, 62, 8692, 201, 198, 6738, 44161, 282, 26599, 1330, 29201, 11, 34142, 11, 10903,...
2.664865
185
#!/usr/bin/python import json import os.path import re import subprocess zs_api_config_file = '/.zsapi.ini' zs_api_target = 'localadmin' if os.path.isfile("/usr/local/zend/bin/zs-client.sh"): extensions_details = subprocess.check_output(["/usr/local/zend/bin/zs-client.sh", "configurationExtensionsList", "--target...
[ 2, 48443, 14629, 14, 8800, 14, 29412, 198, 198, 11748, 33918, 198, 11748, 28686, 13, 6978, 198, 11748, 302, 198, 11748, 850, 14681, 198, 198, 89, 82, 62, 15042, 62, 11250, 62, 7753, 796, 705, 11757, 89, 82, 15042, 13, 5362, 6, 198, ...
2.813333
300
# Copyright 2020 The TensorFlow Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applica...
[ 2, 15069, 12131, 383, 309, 22854, 37535, 46665, 13, 1439, 6923, 33876, 13, 198, 2, 198, 2, 49962, 739, 262, 24843, 13789, 11, 10628, 362, 13, 15, 357, 1169, 366, 34156, 15341, 198, 2, 345, 743, 407, 779, 428, 2393, 2845, 287, 11846,...
3.705502
309
__all__ = ("QuietExit", "EmbedExit") class QuietExit(Exception): """ An exception that is silently ignored by its error handler added in :ref:`cogs_error_handlers`. The primary purpose of this class is to allow a command to be exited from within a nested call without having to propagate return va...
[ 834, 439, 834, 796, 5855, 4507, 1155, 30337, 1600, 366, 31567, 276, 30337, 4943, 628, 198, 4871, 37355, 30337, 7, 16922, 2599, 198, 220, 220, 220, 37227, 198, 220, 220, 220, 1052, 6631, 326, 318, 24595, 9514, 416, 663, 4049, 21360, 20...
2.846154
403
import pytest from abstract_open_traffic_generator.flow import * from abstract_open_traffic_generator.flow_ipv4 import * from abstract_open_traffic_generator.config import Config from abstract_open_traffic_generator.control import * def test_phb_ecn(serializer, api, tx_port, rx_port): """ This will test that ...
[ 11748, 12972, 9288, 198, 6738, 12531, 62, 9654, 62, 9535, 2108, 62, 8612, 1352, 13, 11125, 1330, 1635, 198, 6738, 12531, 62, 9654, 62, 9535, 2108, 62, 8612, 1352, 13, 11125, 62, 541, 85, 19, 1330, 1635, 198, 6738, 12531, 62, 9654, 6...
2.181034
464
from utuby.youtube_video_info import info from utuby.youtube_comments import comments from utuby.utils import * class youtube: """ Collects info. and comments from the multi-media content in YouTube when url is given. :param youtubeid: Unique identification for every multimedia in YouTube. """
[ 6738, 3384, 549, 88, 13, 11604, 62, 15588, 62, 10951, 1330, 7508, 198, 6738, 3384, 549, 88, 13, 11604, 62, 15944, 1330, 3651, 198, 6738, 3384, 549, 88, 13, 26791, 1330, 1635, 198, 198, 4871, 35116, 25, 628, 220, 220, 220, 37227, 198...
3.556818
88
from enum import Enum
[ 6738, 33829, 1330, 2039, 388, 198 ]
3.666667
6
import codemoninitdir if __name__ == "__main__": success, failed = 0, 0 # test 1 print("Running test 'Codemon init dir':") if codemoninitdir.codemoninitdir() == 0: success += 1 else: failed += 1 # print test results print("***** Test results *****") print("Total: ", success + failed) print("Succe...
[ 11748, 14873, 7966, 15003, 15908, 198, 198, 361, 11593, 3672, 834, 6624, 366, 834, 12417, 834, 1298, 198, 220, 1943, 11, 4054, 796, 657, 11, 657, 198, 220, 1303, 1332, 352, 198, 220, 3601, 7203, 28768, 1332, 705, 43806, 7966, 2315, 26...
3.024793
121
import argparse import json import os import csv import math import numpy as np from glob import glob from pathlib import Path from sklearn.metrics import log_loss total = 0 correct = 0 true_positive = 0 true_negative = 0 false_positive = 0 false_negative = 0 if __name__=="__main__": parser = argparse.ArgumentPar...
[ 11748, 1822, 29572, 198, 11748, 33918, 198, 11748, 28686, 198, 11748, 269, 21370, 198, 11748, 10688, 198, 11748, 299, 32152, 355, 45941, 198, 6738, 15095, 1330, 15095, 198, 6738, 3108, 8019, 1330, 10644, 198, 6738, 1341, 35720, 13, 4164, ...
2.007407
1,215
import os import argparse from pathlib import Path parser = argparse.ArgumentParser(description='') ori_data_dir = '../data/full_data' ''' data_dir - tmp - imgs tags.csv ''' if __name__ == "__main__": parser.add_argument('--data_dir', dest='data_dir', help='Please specify an empty fold...
[ 11748, 28686, 198, 11748, 1822, 29572, 198, 6738, 3108, 8019, 1330, 10644, 198, 198, 48610, 796, 1822, 29572, 13, 28100, 1713, 46677, 7, 11213, 28, 7061, 8, 198, 10145, 62, 7890, 62, 15908, 796, 705, 40720, 7890, 14, 12853, 62, 7890, ...
2.2
355
import setuptools with open("README.md", "r") as fh: long_description = fh.read() setuptools.setup( name="lisenta", version="0.0.1", author="Lisa-Yao Gan", author_email="ga27bil@mytum.de", description="A fun little program that lets you transcribe and generate piano music", long_descriptio...
[ 11748, 900, 37623, 10141, 198, 198, 4480, 1280, 7203, 15675, 11682, 13, 9132, 1600, 366, 81, 4943, 355, 277, 71, 25, 198, 220, 220, 220, 890, 62, 11213, 796, 277, 71, 13, 961, 3419, 198, 198, 2617, 37623, 10141, 13, 40406, 7, 198, ...
2.581481
270
from pypy.interpreter.error import OperationError from pypy.interpreter.baseobjspace import Wrappable class GeneratorIterator(Wrappable): "An iterator created by a generator." def descr__iter__(self): """x.__iter__() <==> iter(x)""" return self.space.wrap(self) def descr_next(self): ...
[ 6738, 279, 4464, 88, 13, 3849, 3866, 353, 13, 18224, 1330, 14680, 12331, 198, 6738, 279, 4464, 88, 13, 3849, 3866, 353, 13, 8692, 26801, 13200, 1330, 27323, 381, 540, 628, 198, 4871, 35986, 37787, 7, 36918, 381, 540, 2599, 198, 220, ...
2.142395
618
import io import os import re import keras import random import numpy as np import pandas as pd from keras_preprocessing.sequence import pad_sequences from keras_preprocessing.text import Tokenizer from scipy.sparse import coo_matrix from sklearn import preprocessing from sklearn.preprocessing import scale ##########...
[ 11748, 33245, 198, 11748, 28686, 198, 11748, 302, 198, 11748, 41927, 292, 198, 11748, 4738, 198, 198, 11748, 299, 32152, 355, 45941, 198, 11748, 19798, 292, 355, 279, 67, 198, 6738, 41927, 292, 62, 3866, 36948, 13, 43167, 1330, 14841, 6...
2.413043
3,312
from __future__ import division import boost.python boost.python.import_ext("scitbx_linalg_ext") from scitbx_linalg_ext import *
[ 6738, 11593, 37443, 834, 1330, 7297, 198, 11748, 5750, 13, 29412, 198, 39521, 13, 29412, 13, 11748, 62, 2302, 7203, 1416, 270, 65, 87, 62, 75, 1292, 70, 62, 2302, 4943, 198, 6738, 629, 270, 65, 87, 62, 75, 1292, 70, 62, 2302, 1330...
2.804348
46
import torch import torch.nn as nn import torch.optim as optim import torch.nn.functional as F import gym, time import numpy as np from spinup.utils.logx import EpochLogger from core import actor_critic as ac if __name__ == '__main__': import argparse parser = argparse.ArgumentParser() parser.add_argume...
[ 11748, 28034, 198, 11748, 28034, 13, 20471, 355, 299, 77, 198, 11748, 28034, 13, 40085, 355, 6436, 198, 11748, 28034, 13, 20471, 13, 45124, 355, 376, 198, 198, 11748, 11550, 11, 640, 198, 11748, 299, 32152, 355, 45941, 198, 198, 6738, ...
2.611111
396
import unittest import k3mime import k3ut dd = k3ut.dd
[ 11748, 555, 715, 395, 198, 198, 11748, 479, 18, 76, 524, 198, 11748, 479, 18, 315, 198, 198, 1860, 796, 479, 18, 315, 13, 1860, 628, 198 ]
2.185185
27
s = input().split("print")[1] print(eval(s))
[ 82, 796, 5128, 22446, 35312, 7203, 4798, 4943, 58, 16, 60, 198, 4798, 7, 18206, 7, 82, 4008, 198 ]
2.368421
19
import os import pytest import yaml from kuku.types import Context from kuku.values import resolve HERE = os.path.abspath(os.path.dirname(__file__)) VALUES_STAGING_FILE = os.path.join(HERE, "fixtures/values/values-staging.yaml") VALUES_PRODUCTION_FILE = os.path.join(HERE, "fixtures/values/values-production.yaml") ...
[ 11748, 28686, 198, 198, 11748, 12972, 9288, 198, 11748, 331, 43695, 198, 198, 6738, 479, 33263, 13, 19199, 1330, 30532, 198, 6738, 479, 33263, 13, 27160, 1330, 10568, 198, 198, 39, 9338, 796, 28686, 13, 6978, 13, 397, 2777, 776, 7, 41...
1.769111
641
from django.db import models from shop.models import Product from collection.choices import CollectionCategoryChoices
[ 6738, 42625, 14208, 13, 9945, 1330, 4981, 198, 6738, 6128, 13, 27530, 1330, 8721, 198, 198, 6738, 4947, 13, 6679, 1063, 1330, 12251, 27313, 22164, 1063, 628 ]
4.444444
27
from __future__ import absolute_import import sys import time import datetime import subprocess
[ 6738, 11593, 37443, 834, 1330, 4112, 62, 11748, 198, 198, 11748, 25064, 198, 11748, 640, 198, 11748, 4818, 8079, 198, 11748, 850, 14681, 628 ]
4.083333
24
try: import cv2 except (NameError, ImportError, ModuleNotFoundError): print('cv2 package installed not found') def live_stream(): '''Stream your live video''' cam = cv2.VideoCapture(cv2.CAP_DSHOW) while True: ret, frame = cam.read() # Getting frame frame = cv2.fli...
[ 28311, 25, 201, 198, 220, 220, 220, 1330, 269, 85, 17, 201, 198, 201, 198, 16341, 357, 5376, 12331, 11, 17267, 12331, 11, 19937, 3673, 21077, 12331, 2599, 201, 198, 220, 220, 220, 3601, 10786, 33967, 17, 5301, 6589, 407, 1043, 11537, ...
2.230548
347
# Generated by Django 3.1.6 on 2021-09-01 10:43 from django.db import migrations
[ 2, 2980, 515, 416, 37770, 513, 13, 16, 13, 21, 319, 33448, 12, 2931, 12, 486, 838, 25, 3559, 198, 198, 6738, 42625, 14208, 13, 9945, 1330, 15720, 602, 628 ]
2.766667
30
from ...interface.models import LisaUser from django.contrib.auth import login, logout from mongoengine.queryset import DoesNotExist from tastypie_mongoengine import resources as mongoresources from tastypie.http import HttpUnauthorized, HttpForbidden, HttpAccepted from tastypie import fields from tastypie.utils import...
[ 6738, 2644, 39994, 13, 27530, 1330, 15378, 12982, 198, 6738, 42625, 14208, 13, 3642, 822, 13, 18439, 1330, 17594, 11, 2604, 448, 198, 6738, 285, 25162, 18392, 13, 10819, 893, 316, 1330, 8314, 3673, 3109, 396, 198, 6738, 14854, 4464, 494...
3.736842
152
import matplotlib.pyplot as plt import numpy as np from scipy.constants import hbar, pi from lmfit import Model, fit_report #plt.style.use('presentation.mplstyle') attenuation = 52 #dB k = 2*pi*513e3 ke = 0.7*k w0 = 2*pi*6.310792e9 ####################### w = w0 - (2*pi*5.2656*1e6) pth = 'D:\\data\\2...
[ 11748, 2603, 29487, 8019, 13, 9078, 29487, 355, 458, 83, 201, 198, 11748, 299, 32152, 355, 45941, 201, 198, 6738, 629, 541, 88, 13, 9979, 1187, 1330, 289, 5657, 11, 31028, 201, 198, 6738, 300, 76, 11147, 1330, 9104, 11, 4197, 62, 13...
2.161765
408
import logging from azure.identity import DefaultAzureCredential from azure.keyvault.keys import KeyClient from azure.keyvault.keys.crypto import CryptographyClient, EncryptionAlgorithm logger = logging.getLogger(__name__) get_secret = DecryptEncrypt()
[ 11748, 18931, 198, 6738, 35560, 495, 13, 738, 414, 1330, 15161, 26903, 495, 34, 445, 1843, 198, 6738, 35560, 495, 13, 2539, 85, 1721, 13, 13083, 1330, 7383, 11792, 198, 6738, 35560, 495, 13, 2539, 85, 1721, 13, 13083, 13, 29609, 78, ...
3.282051
78
"""Contains the used variables and functions to provide logging functionality. See Also -------- FeatureCollection: its `logging_file_path` of the `calculate` method. """ __author__ = "Jeroen Van Der Donckt" import logging import pandas as pd import re from ..utils.logging import logging_file_to_df, remove_inner_b...
[ 37811, 4264, 1299, 262, 973, 9633, 290, 5499, 284, 2148, 18931, 11244, 13, 198, 198, 6214, 4418, 198, 982, 198, 38816, 36307, 25, 663, 4600, 6404, 2667, 62, 7753, 62, 6978, 63, 286, 262, 4600, 9948, 3129, 378, 63, 2446, 13, 198, 198...
2.723738
1,723
""" Base exchange class implementation. """ from __future__ import annotations import logging import pprint from typing import Any import ccxt from ccxt.async_support import Exchange as CCXTExchange from pydantic import BaseModel from pydantic import PrivateAttr from mcookbook.config.live import LiveConfig from mcoo...
[ 37811, 198, 14881, 5163, 1398, 7822, 13, 198, 37811, 198, 6738, 11593, 37443, 834, 1330, 37647, 198, 198, 11748, 18931, 198, 11748, 279, 4798, 198, 6738, 19720, 1330, 4377, 198, 198, 11748, 36624, 742, 198, 6738, 36624, 742, 13, 292, 13...
2.341024
1,777
"""Base class for task classes. This has almost no implementation; the debugging methods are injected by tasks_ros. This allows us to test task classes outside ROS. """
[ 37811, 14881, 1398, 329, 4876, 6097, 13, 198, 198, 1212, 468, 2048, 645, 7822, 26, 262, 28769, 5050, 389, 25077, 416, 198, 83, 6791, 62, 4951, 13, 770, 3578, 514, 284, 1332, 4876, 6097, 2354, 48263, 13, 198, 37811, 198 ]
4.25
40
from __future__ import division import endpoints from google.appengine.api import taskqueue from Crypto.Hash import SHA256 from google.appengine.ext import ndb from domain import Bet, PostStatus from models import User, UserForm, UserMiniForm, TrendsMessage, TrendUserMessage, RankingsMessage, UserRankingProfileMe...
[ 6738, 11593, 37443, 834, 1330, 7297, 201, 198, 11748, 886, 13033, 201, 198, 6738, 23645, 13, 1324, 18392, 13, 15042, 1330, 4876, 36560, 201, 198, 6738, 36579, 13, 26257, 1330, 25630, 11645, 201, 198, 6738, 23645, 13, 1324, 18392, 13, 23...
3.680851
141
# Copyright 2015 Google 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 required by applicable law or ag...
[ 2, 15069, 1853, 3012, 3457, 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, 262, 13789, ...
3.271689
438
import os import psutil try: import configparser except ImportError: import ConfigParser as configparser from xml.sax import saxutils def get_old_entries(dirpath, at_least=5): """ Get a list of n least recently modified entries of dirpath except the most recently modified entry if any :p...
[ 11748, 28686, 198, 11748, 26692, 22602, 198, 28311, 25, 198, 220, 220, 220, 1330, 4566, 48610, 198, 16341, 17267, 12331, 25, 198, 220, 220, 220, 1330, 17056, 46677, 355, 4566, 48610, 198, 6738, 35555, 13, 82, 897, 1330, 46909, 26791, 62...
2.755981
209
from enum import Enum from typing import Optional
[ 6738, 33829, 1330, 2039, 388, 198, 6738, 19720, 1330, 32233, 628, 198 ]
4.333333
12
import os import uvicorn from fastapi import FastAPI from fastapi.staticfiles import StaticFiles from starlette.middleware.cors import CORSMiddleware from app.api.router import api_router from app.core.config import settings from app.core.logging import setup_logging from app.middleware.logger import LoggerMiddleware...
[ 11748, 28686, 198, 198, 11748, 334, 25531, 1211, 198, 6738, 3049, 15042, 1330, 12549, 17614, 198, 6738, 3049, 15042, 13, 12708, 16624, 1330, 36125, 25876, 198, 6738, 3491, 21348, 13, 27171, 1574, 13, 66, 669, 1330, 23929, 12310, 2509, 157...
2.458015
524
if __name__ == "__main__": puzzle_input = read_input("day7.txt") print(f"Part 1: {part1(puzzle_input)}") print(f"Part 2: {part2(puzzle_input)}")
[ 628, 198, 198, 361, 11593, 3672, 834, 6624, 366, 834, 12417, 834, 1298, 198, 220, 220, 220, 15027, 62, 15414, 796, 1100, 62, 15414, 7203, 820, 22, 13, 14116, 4943, 198, 220, 220, 220, 3601, 7, 69, 1, 7841, 352, 25, 1391, 3911, 16,...
2.205479
73
from setuptools import setup setup( name='loman', version='0.3.0', packages=['loman'], url='https://github.com/janusassetallocation/loman', license='BSD', author='Ed Parcell', author_email='edparcell@gmail.com', description='Loman tracks state of computations, and the dependencies betwe...
[ 6738, 900, 37623, 10141, 1330, 9058, 198, 198, 40406, 7, 198, 220, 220, 220, 1438, 11639, 75, 5185, 3256, 198, 220, 220, 220, 2196, 11639, 15, 13, 18, 13, 15, 3256, 198, 220, 220, 220, 10392, 28, 17816, 75, 5185, 6, 4357, 198, 220...
2.716172
303
# Copyright 2019 The Texar 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 ...
[ 2, 15069, 13130, 383, 3567, 283, 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, ...
2.165167
11,782
import os.path from argparse import ArgumentParser, Namespace from sys import stdout from utils.config import COOKIE
[ 11748, 28686, 13, 6978, 198, 6738, 1822, 29572, 1330, 45751, 46677, 11, 28531, 10223, 198, 6738, 25064, 1330, 14367, 448, 198, 198, 6738, 3384, 4487, 13, 11250, 1330, 327, 15308, 10008, 628, 628 ]
3.666667
33
from django.conf.urls import url from . import views urlpatterns = [ url(r'buy.',views.buy_product), url(r'',views.show_product), ]
[ 6738, 42625, 14208, 13, 10414, 13, 6371, 82, 1330, 19016, 198, 6738, 764, 1330, 5009, 198, 198, 6371, 33279, 82, 796, 685, 198, 220, 220, 220, 19016, 7, 81, 6, 17846, 2637, 11, 33571, 13, 17846, 62, 11167, 828, 198, 220, 220, 220, ...
2.448276
58
#!/usr/bin/env python # Licensed to Cloudera, Inc. under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. Cloudera, Inc. licenses this file # to you under the Apache License, Version 2.0 (the # "License"); you ma...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 2, 49962, 284, 1012, 280, 1082, 64, 11, 3457, 13, 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.695274
2,645
# -*- coding: utf-8 -*- # Generated by Django 1.11.4 on 2018-04-28 18:42 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, 13, 19, 319, 2864, 12, 3023, 12, 2078, 1248, 25, 3682, 198, 6738, 11593, 37443, 834, 1330, 28000, 1098, 62, 17201, 874, 198, ...
2.736842
57
# # MIT License # # (C) Copyright 2019, 2021-2022 Hewlett Packard Enterprise Development LP # # Permission is hereby granted, free of charge, to any person obtaining a # copy of this software and associated documentation files (the "Software"), # to deal in the Software without restriction, including without limitation...
[ 2, 198, 2, 17168, 13789, 198, 2, 198, 2, 357, 34, 8, 15069, 13130, 11, 33448, 12, 1238, 1828, 30446, 15503, 6400, 446, 14973, 7712, 18470, 198, 2, 198, 2, 2448, 3411, 318, 29376, 7520, 11, 1479, 286, 3877, 11, 284, 597, 1048, 1672...
2.740514
4,744
from django.urls import path from . import views # from rest_framework import routers # router = routers.DefaultRouter() # router.register('getinfo', views.getinfo) urlpatterns = [ path('kvupdate1', views.kvupdate1, name='kvupdate1') ]
[ 6738, 42625, 14208, 13, 6371, 82, 1330, 3108, 198, 6738, 764, 1330, 5009, 198, 2, 422, 1334, 62, 30604, 1330, 41144, 198, 198, 2, 20264, 796, 41144, 13, 19463, 49, 39605, 3419, 198, 2, 20264, 13, 30238, 10786, 1136, 10951, 3256, 5009,...
2.987654
81
#Imports from n2v.models import Config, CARE import numpy as np from n2v.utils import plot_some, plot_history from n2v.utils.n2v_utils import manipulate_val_data import urllib import os import zipfile import json from os.path import join from skimage import io with open('experiment.json', 'r') as f: exp_params ...
[ 2, 3546, 3742, 198, 198, 6738, 299, 17, 85, 13, 27530, 1330, 17056, 11, 47342, 198, 11748, 299, 32152, 355, 45941, 198, 6738, 299, 17, 85, 13, 26791, 1330, 7110, 62, 11246, 11, 7110, 62, 23569, 198, 6738, 299, 17, 85, 13, 26791, 1...
2.576733
404
# users/app/app.py import os from flask import Flask from app.api.utils.extensions import ( db, bcrypt, jwt, cors ) from app.api.utils.func import JSONEncoder def create_app(app_info=None): """Create Flask application in factory pattern """ app = Flask(__name__) app.config.from_object(os.enviro...
[ 2, 2985, 14, 1324, 14, 1324, 13, 9078, 198, 198, 11748, 28686, 198, 198, 6738, 42903, 1330, 46947, 198, 198, 6738, 598, 13, 15042, 13, 26791, 13, 2302, 5736, 1330, 357, 198, 220, 220, 220, 20613, 11, 275, 29609, 11, 474, 46569, 11, ...
2.474453
274
from discord.ext import commands import requests import json
[ 6738, 36446, 13, 2302, 1330, 9729, 198, 11748, 7007, 198, 11748, 33918, 628 ]
4.769231
13
import numpy as np import matplotlib.pyplot as plt import pandas as pd from pavlov import runs, stats from rebar import dotdict from . import json import activelo
[ 11748, 299, 32152, 355, 45941, 198, 11748, 2603, 29487, 8019, 13, 9078, 29487, 355, 458, 83, 198, 11748, 19798, 292, 355, 279, 67, 198, 6738, 45549, 27086, 1330, 4539, 11, 9756, 198, 6738, 3405, 283, 1330, 16605, 11600, 198, 6738, 764, ...
3.395833
48
''' submodules to handle Catalogs used in the project ''' import os import numpy as np import h5py from astropy.io import fits from astropy.table import Table as aTable from astropy.cosmology import FlatLambdaCDM # -- local -- from . import util as UT class Catalog(object): ''' parent object for the objects...
[ 7061, 6, 198, 198, 7266, 18170, 284, 5412, 44515, 82, 973, 287, 262, 1628, 628, 198, 7061, 6, 198, 11748, 28686, 220, 198, 11748, 299, 32152, 355, 45941, 198, 11748, 289, 20, 9078, 198, 6738, 6468, 28338, 13, 952, 1330, 11414, 220, ...
1.978609
19,073
import rx import rx.operators as ops from rx.subject import Subject obs1 = Subject() obs2 = Subject() obs3 = Subject() higher_order = Subject() higher_order.pipe(ops.switch_latest()).subscribe( on_next=lambda i: print("on_next {}".format(i)), on_error=lambda e: print("on_error: {}".format(e)), on_complete...
[ 11748, 374, 87, 198, 11748, 374, 87, 13, 3575, 2024, 355, 39628, 198, 6738, 374, 87, 13, 32796, 1330, 15540, 198, 198, 8158, 16, 796, 15540, 3419, 198, 8158, 17, 796, 15540, 3419, 198, 8158, 18, 796, 15540, 3419, 198, 46503, 62, 287...
2.296578
263
from util import isint data_base = Relocatable(Relocatable.data, 0) main_base = Relocatable(Relocatable.main, 0) wk_base = Relocatable(Relocatable.wk, 0)
[ 6738, 7736, 1330, 318, 600, 628, 198, 7890, 62, 8692, 796, 4718, 420, 21156, 7, 6892, 420, 21156, 13, 7890, 11, 657, 8, 198, 12417, 62, 8692, 796, 4718, 420, 21156, 7, 6892, 420, 21156, 13, 12417, 11, 657, 8, 198, 43021, 62, 8692,...
2.689655
58
""" Module defining a Falcon resource to provide login session info Copyright (C) 2016 ERT Inc. """ import falcon import api.json as json from api.auth import auth route = "user" class User(): """ Falcon resource object providing API login session info """ def on_get(self, request, resp): "...
[ 37811, 198, 26796, 16215, 257, 17621, 8271, 284, 2148, 17594, 6246, 7508, 198, 198, 15269, 357, 34, 8, 1584, 13793, 51, 3457, 13, 198, 37811, 198, 11748, 24215, 1102, 198, 198, 11748, 40391, 13, 17752, 355, 33918, 198, 6738, 40391, 13, ...
2.748768
609
"""Talk model.""" from typing import Any from django.db import models from django.utils.translation import gettext_lazy as _ from domain import utils class Talk(models.Model): """Talk submission.""" name = models.CharField(_("name"), max_length=255, unique=True) slug = models.SlugField(unique=True, bl...
[ 37811, 25685, 2746, 526, 15931, 198, 198, 6738, 19720, 1330, 4377, 198, 198, 6738, 42625, 14208, 13, 9945, 1330, 4981, 198, 6738, 42625, 14208, 13, 26791, 13, 41519, 1330, 651, 5239, 62, 75, 12582, 355, 4808, 198, 198, 6738, 7386, 1330,...
2.608696
299
# -*- coding: utf-8 -*-# ''' # Name: HowNNWorks # Description: # Author: super # Date: 2020/5/24 ''' import numpy as np import matplotlib.pyplot as plt from HelperClass2.NeuralNet_2_0 import * train_data_name = "../data/ch08.train.npz" test_data_name = "../data/ch08.test.npz" if __name__ =...
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 2, 198, 7061, 6, 198, 2, 6530, 25, 220, 220, 220, 220, 220, 220, 220, 220, 1374, 6144, 23044, 198, 2, 12489, 25, 220, 220, 198, 2, 6434, 25, 220, 220, 220, 220, 220, ...
2.131687
486
import os import numpy as np import torch import pickle
[ 11748, 28686, 198, 11748, 299, 32152, 355, 45941, 198, 11748, 28034, 198, 11748, 2298, 293, 198 ]
3.5
16
from dataTable import *
[ 6738, 1366, 10962, 1330, 1635 ]
4.6
5
# Copyright 2017 Databricks, 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 agreed to in writin...
[ 2, 15069, 2177, 16092, 397, 23706, 11, 3457, 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, 19...
2.627965
2,403
#!/usr/bin/python3 -tt from xclib.configuration import get_args from xclib.authops import perform DEFAULT_LOG_DIR = '/var/log/xcauth' DESC = '''XMPP server authentication against JSXC>=3.2.0 on Nextcloud. See https://jsxc.org or https://github.com/jsxc/xmpp-cloud-auth.''' EPILOG = '''-I, -R, and -A take precedenc...
[ 2, 48443, 14629, 14, 8800, 14, 29412, 18, 532, 926, 198, 198, 6738, 2124, 565, 571, 13, 11250, 3924, 1330, 651, 62, 22046, 198, 6738, 2124, 565, 571, 13, 18439, 2840, 1330, 1620, 198, 198, 7206, 38865, 62, 25294, 62, 34720, 796, 310...
2.464602
226
from flask import Flask import os #from model import LSCCNN basedir = os.path.abspath(os.path.dirname(__file__)) app = Flask(__name__) app.config.from_object(__name__) # Load model #checkpoint_path = path_to_gcp_bucket #model = LSCCNN(checkpoint_path=checkpoint_path) #model.eval() #model.cuda() ?? from app import ...
[ 6738, 42903, 1330, 46947, 198, 11748, 28686, 198, 198, 2, 6738, 2746, 1330, 30948, 4093, 6144, 198, 198, 3106, 343, 796, 28686, 13, 6978, 13, 397, 2777, 776, 7, 418, 13, 6978, 13, 15908, 3672, 7, 834, 7753, 834, 4008, 198, 198, 1324...
2.650407
123
# Please note that if you uncomment and press multiple times, the program will keep appending to the file. d = {'simple_key':'hello'} answer1 = d['simple_key'] print(answer1)# Please note that if you uncomment and press multiple times, the program will keep appending to the file. d = {'k1':{'k2':'hello'}} answer2 =...
[ 2, 4222, 3465, 326, 611, 345, 8820, 434, 290, 1803, 3294, 1661, 11, 262, 1430, 481, 1394, 598, 1571, 284, 262, 2393, 13, 198, 198, 67, 796, 1391, 6, 36439, 62, 2539, 10354, 6, 31373, 6, 92, 198, 198, 41484, 16, 796, 288, 17816, ...
2.706081
296
import numpy as np import numpy.random as npr import numpy.testing as npt import pytest from impute import FpcImpute @pytest.mark.usefixtures('rae_case')
[ 11748, 299, 32152, 355, 45941, 198, 11748, 299, 32152, 13, 25120, 355, 299, 1050, 198, 11748, 299, 32152, 13, 33407, 355, 299, 457, 198, 198, 11748, 12972, 9288, 198, 198, 6738, 848, 1133, 1330, 376, 14751, 26950, 1133, 628, 198, 31, ...
2.821429
56
import sys sys.path.append('./test/tests') from driver import driver, Keys driver.get("http://www.python.org") assert "Python" in driver.title elem = driver.find_element_by_name("q") elem.clear() elem.send_keys("pycon") elem.send_keys(Keys.RETURN) assert "No results found." not in driver.page_source #import test_exam...
[ 11748, 25064, 198, 17597, 13, 6978, 13, 33295, 7, 4458, 14, 9288, 14, 41989, 11537, 198, 198, 6738, 4639, 1330, 4639, 11, 26363, 198, 26230, 13, 1136, 7203, 4023, 1378, 2503, 13, 29412, 13, 2398, 4943, 198, 30493, 366, 37906, 1, 287, ...
2.911565
147
# -*- coding: utf-8 -*- from model.contact import Contact
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 6738, 2746, 13, 32057, 1330, 14039 ]
2.85
20
# This is an python GUI program which is used to conver the current vlue for different conutries. # importing the modules from tkinter import * # creating a class called CurrencyConverter # definfing a init function for the class TipCal # function to convert values # function to cl...
[ 2, 770, 318, 281, 21015, 25757, 1430, 543, 318, 973, 284, 6718, 262, 1459, 410, 75, 518, 329, 1180, 369, 315, 1678, 13, 201, 198, 201, 198, 2, 33332, 262, 13103, 201, 198, 6738, 256, 74, 3849, 1330, 1635, 201, 198, 201, 198, 2, ...
2.896825
126