content
stringlengths
1
1.04M
input_ids
listlengths
1
774k
ratio_char_token
float64
0.38
22.9
token_count
int64
1
774k
import importlib from django import forms from s3file.apps import S3FileConfig from s3file.forms import S3FileInputMixin
[ 11748, 1330, 8019, 198, 198, 6738, 42625, 14208, 1330, 5107, 198, 198, 6738, 264, 18, 7753, 13, 18211, 1330, 311, 18, 8979, 16934, 198, 6738, 264, 18, 7753, 13, 23914, 1330, 311, 18, 8979, 20560, 35608, 259, 628 ]
3.263158
38
from django.contrib.sites.models import Site
[ 6738, 42625, 14208, 13, 3642, 822, 13, 49315, 13, 27530, 1330, 14413, 628 ]
3.538462
13
"""These methods are copied from https://github.com/Kyubyong/dc_tts/""" import os import copy import librosa import scipy.io.wavfile import numpy as np from tqdm import tqdm from scipy import signal from hparams import HParams as hp def spectrogram2wav(mag): '''# Generate wave file from linear magnitude spectro...
[ 37811, 4711, 5050, 389, 18984, 422, 3740, 1378, 12567, 13, 785, 14, 30630, 549, 88, 506, 14, 17896, 62, 83, 912, 14, 37811, 198, 198, 11748, 28686, 198, 11748, 4866, 198, 11748, 9195, 4951, 64, 198, 11748, 629, 541, 88, 13, 952, 13,...
2.111859
1,931
# Copyright (c) DEV Corporation. All rights reserved. # Licensed under MIT License.
[ 2, 15069, 357, 66, 8, 5550, 53, 10501, 13, 1439, 2489, 10395, 13, 198, 2, 49962, 739, 17168, 13789, 13, 198 ]
4
21
""" Django settings for medical project. Generated by 'django-admin startproject' using Django 3.0.8. For more information on this file, see https://docs.djangoproject.com/en/3.0/topics/settings/ For the full list of settings and their values, see https://docs.djangoproject.com/en/3.0/ref/settings/ """ import os fr...
[ 37811, 198, 35, 73, 14208, 6460, 329, 3315, 1628, 13, 198, 198, 8645, 515, 416, 705, 28241, 14208, 12, 28482, 923, 16302, 6, 1262, 37770, 513, 13, 15, 13, 23, 13, 198, 198, 1890, 517, 1321, 319, 428, 2393, 11, 766, 198, 5450, 1378...
2.365615
1,838
import dataclasses import enum from typing import Any @dataclasses.dataclass
[ 11748, 4818, 330, 28958, 198, 11748, 33829, 198, 6738, 19720, 1330, 4377, 628, 198, 198, 31, 19608, 330, 28958, 13, 19608, 330, 31172, 198 ]
3.333333
24
from deepsegment import DeepSegment # The default language is 'en' segmenter = DeepSegment('en') segmenter.segment('I am Batman i live in gotham') # ['I am Batman', 'i live in gotham']
[ 6738, 2769, 325, 5154, 1330, 10766, 41030, 434, 198, 2, 383, 4277, 3303, 318, 705, 268, 6, 198, 325, 5154, 263, 796, 10766, 41030, 434, 10786, 268, 11537, 198, 325, 5154, 263, 13, 325, 5154, 10786, 40, 716, 9827, 1312, 2107, 287, 30...
2.983871
62
# -*- coding: utf-8 -*- from django.core.urlresolvers import reverse from django.db import models from django.utils.translation import ugettext_lazy as _
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 6738, 42625, 14208, 13, 7295, 13, 6371, 411, 349, 690, 1330, 9575, 198, 6738, 42625, 14208, 13, 9945, 1330, 4981, 198, 6738, 42625, 14208, 13, 26791, 13, 41519, 1330, 33...
2.961538
52
import sys; sys.path.append("..") from policies import max_min_fairness, max_min_fairness_strategy_proof import random import time import numpy as np np.set_printoptions(precision=3, suppress=True)
[ 11748, 25064, 26, 25064, 13, 6978, 13, 33295, 7203, 492, 4943, 198, 6738, 4788, 1330, 3509, 62, 1084, 62, 22043, 1108, 11, 3509, 62, 1084, 62, 22043, 1108, 62, 2536, 4338, 62, 13288, 198, 198, 11748, 4738, 198, 11748, 640, 198, 198, ...
3.076923
65
import os import os.path from print_function import * # Exemple # main.py server start # main.py server start /home/user/kafka/config/server.propersties # main.py server stop # main.py server restart # main.py server restart /home/user/kafka/config/server.propersties KAFKA_HOME = str(os.getenv("KAFKA_HOME"...
[ 11748, 28686, 201, 198, 11748, 28686, 13, 6978, 201, 198, 6738, 3601, 62, 8818, 1330, 1635, 201, 198, 201, 198, 2, 1475, 368, 1154, 201, 198, 2, 1388, 13, 9078, 4382, 923, 201, 198, 2, 1388, 13, 9078, 4382, 923, 1220, 11195, 14, 7...
2.511364
176
# -------------------------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. # -----------------------------------------------------------------...
[ 2, 16529, 1783, 10541, 201, 198, 2, 15069, 357, 66, 8, 5413, 10501, 13, 1439, 2489, 10395, 13, 201, 198, 2, 49962, 739, 262, 17168, 13789, 13, 4091, 13789, 13, 14116, 287, 262, 1628, 6808, 329, 5964, 1321, 13, 201, 198, 2, 16529, ...
3.481953
471
""" Gathers up all of the expenses and breaks down the values by month. """ import time import math from operator import itemgetter from gnucash_reports.collate.bucket import PeriodCollate, CategoryCollate, AccountCollate from gnucash_reports.collate.bucket_generation import decimal_generator from gnucash_reports.coll...
[ 37811, 198, 38, 1032, 82, 510, 477, 286, 262, 9307, 290, 9457, 866, 262, 3815, 416, 1227, 13, 198, 37811, 198, 11748, 640, 198, 11748, 10688, 198, 6738, 10088, 1330, 2378, 1136, 353, 198, 198, 6738, 19967, 1229, 1077, 62, 48922, 13, ...
3.036617
1,939
import pandas as pd import numpy as np import sklearn import joblib from flask import Flask, render_template, request, url_for app = Flask(__name__) @app.route('/') @app.route('/predict', methods=['GET', 'POST']) if __name__ == '__main__': app.run(debug=True)
[ 11748, 19798, 292, 355, 279, 67, 201, 198, 11748, 299, 32152, 355, 45941, 201, 198, 11748, 1341, 35720, 201, 198, 11748, 1693, 8019, 201, 198, 6738, 42903, 1330, 46947, 11, 8543, 62, 28243, 11, 2581, 11, 19016, 62, 1640, 201, 198, 201...
2.469565
115
from typing import Tuple from math import prod with open('input', 'r') as fd: bus_lines_raw = fd.readlines()[1].strip().split(',') bus_lines = list(map(int, filter(lambda bl: bl != 'x', bus_lines_raw))) bl_offsets = [i for i, n in enumerate(bus_lines_raw) if n != 'x'] # For an explanation of how this works, lo...
[ 6738, 19720, 1330, 309, 29291, 198, 6738, 10688, 1330, 40426, 198, 198, 4480, 1280, 10786, 15414, 3256, 705, 81, 11537, 355, 277, 67, 25, 198, 220, 220, 220, 1323, 62, 6615, 62, 1831, 796, 277, 67, 13, 961, 6615, 3419, 58, 16, 4083,...
2.715543
341
""" Concerned with storing and returning books from a list. """ books = [] # def delete_book(name): # This is considered as a Bad Practice. # for book in books: # if book['name'] == name: # books.remove(book) """ SCOPE - as in <line 26> : global books states that books in local ...
[ 37811, 198, 3103, 49990, 351, 23069, 290, 8024, 3835, 422, 257, 1351, 13, 198, 37811, 198, 12106, 796, 17635, 628, 628, 198, 198, 2, 825, 12233, 62, 2070, 7, 3672, 2599, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1303, ...
2.705036
139
# Licensed under a 3-clause BSD style license - see LICENSE.rst """Fit and illustrate example spectral data in XSPEC format. Run `xspec_fake.py` first to generate the example input file. """
[ 2, 49962, 739, 257, 513, 12, 565, 682, 347, 10305, 3918, 5964, 532, 766, 38559, 24290, 13, 81, 301, 198, 37811, 31805, 290, 19418, 1672, 37410, 1366, 287, 1395, 48451, 5794, 13, 198, 198, 10987, 4600, 87, 16684, 62, 30706, 13, 9078, ...
3.555556
54
# -*- coding: utf-8 -*- # @Author : William # @Project : TextGAN-william # @FileName : text_process.py # @Time : Created at 2019-05-14 # @Blog : http://zhiweil.ml/ # @Description : # Copyrights (C) 2018. All Rights Reserved. import nltk import os import torch import config as cfg de...
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 2, 2488, 13838, 220, 220, 220, 220, 220, 220, 1058, 3977, 198, 2, 2488, 16775, 220, 220, 220, 220, 220, 1058, 8255, 45028, 12, 10594, 1789, 198, 2, 2488, 8979, 5376, ...
2.274237
2,228
import json from os.path import expanduser, exists from os import makedirs conoha_home = expanduser('~/.conoha') config_path = f'{conoha_home}/config.json' credential_path = f'{conoha_home}/credential.json' token_path = f'{conoha_home}/token.json' if not exists(conoha_home): makedirs(conoha_home)
[ 11748, 33918, 198, 6738, 28686, 13, 6978, 1330, 4292, 7220, 11, 7160, 198, 6738, 28686, 1330, 285, 4335, 17062, 198, 198, 1102, 28083, 62, 11195, 796, 4292, 7220, 10786, 93, 11757, 1102, 28083, 11537, 198, 11250, 62, 6978, 796, 277, 6, ...
2.596639
119
#!/usr/bin/env python # # Copyright (c) 2013 Juniper Networks, Inc. All rights reserved. # # # sandesh_msg_test # import unittest import sys import os import socket import test_utils import time import uuid from itertools import chain sys.path.insert(1, sys.path[0]+'/../../../python') from pysandesh.sandesh_base i...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 198, 2, 198, 2, 15069, 357, 66, 8, 2211, 7653, 9346, 27862, 11, 3457, 13, 1439, 2489, 10395, 13, 198, 2, 198, 198, 2, 198, 2, 6450, 5069, 62, 19662, 62, 9288, 198, 2, 198, 198, ...
2.795455
220
from turtle import * side = 50 COUNT = 8 checker(side)
[ 6738, 28699, 1330, 1635, 198, 1589, 796, 2026, 198, 34, 28270, 796, 807, 628, 198, 9122, 263, 7, 1589, 8, 198 ]
2.714286
21
# flake8: noqa from .base import * from .distillation import * from .metrics import * from .regularizations import * from .unsupervised import * from .losses import *
[ 2, 781, 539, 23, 25, 645, 20402, 198, 6738, 764, 8692, 1330, 1635, 198, 6738, 764, 17080, 40903, 1330, 1635, 198, 6738, 764, 4164, 10466, 1330, 1635, 198, 6738, 764, 16338, 4582, 1330, 1635, 198, 6738, 764, 403, 16668, 16149, 1330, 16...
3.34
50
#!/usr/bin/env python """ Fluentd queue check for v3 """ import argparse import time import subprocess import math from dateutil import parser from datetime import datetime from openshift_tools.monitoring.ocutil import OCUtil from openshift_tools.monitoring.metric_sender import MetricSender import logging logging....
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 37811, 198, 220, 34070, 298, 67, 16834, 2198, 329, 410, 18, 198, 37811, 198, 198, 11748, 1822, 29572, 198, 11748, 640, 198, 11748, 850, 14681, 198, 11748, 10688, 198, 6738, 3128, 22602, ...
2.78744
207
import discord import os import inspect from discord.ext import commands class Community(): """Commands for The Bad Server community""" @property @commands.command() async def source(self, ctx, *, command: str = None): """Displays the Bad Bot's source""" if command is Non...
[ 11748, 36446, 198, 11748, 28686, 198, 11748, 10104, 198, 6738, 36446, 13, 2302, 1330, 9729, 198, 198, 4871, 8108, 33529, 198, 220, 220, 220, 37227, 6935, 1746, 329, 383, 7772, 9652, 2055, 37811, 198, 220, 220, 220, 220, 198, 220, 220, ...
2.423559
399
from machine_learning_library.model_discriminant_analysis import Classification import numpy as np
[ 6738, 4572, 62, 40684, 62, 32016, 13, 19849, 62, 15410, 3036, 42483, 62, 20930, 1330, 40984, 198, 11748, 299, 32152, 355, 45941, 628 ]
4.347826
23
# Generated by Django 3.0.7 on 2020-06-12 08:38 from django.db import migrations, models import django.db.models.deletion
[ 2, 2980, 515, 416, 37770, 513, 13, 15, 13, 22, 319, 12131, 12, 3312, 12, 1065, 8487, 25, 2548, 198, 198, 6738, 42625, 14208, 13, 9945, 1330, 15720, 602, 11, 4981, 198, 11748, 42625, 14208, 13, 9945, 13, 27530, 13, 2934, 1616, 295, ...
2.818182
44
import ast import functools from typing import Iterable from typing import List from typing import Optional from typing import Tuple from tokenize_rt import Offset from tokenize_rt import Token from pyupgrade._ast_helpers import ast_to_offset from pyupgrade._data import register from pyupgrade._data import State from...
[ 11748, 6468, 198, 11748, 1257, 310, 10141, 198, 6738, 19720, 1330, 40806, 540, 198, 6738, 19720, 1330, 7343, 198, 6738, 19720, 1330, 32233, 198, 6738, 19720, 1330, 309, 29291, 198, 198, 6738, 11241, 1096, 62, 17034, 1330, 3242, 2617, 198,...
3.268293
164
import itertools import matplotlib.pyplot as plt import numpy as np import pandas as pd import plotly.express as px from scipy.optimize import minimize, LinearConstraint, NonlinearConstraint from tqdm import tqdm from utils import constraint_cost, calc_time, calc_cost, ConstraintTime, f_ey, f_conv, f_ideal, ...
[ 11748, 340, 861, 10141, 201, 198, 201, 198, 11748, 2603, 29487, 8019, 13, 9078, 29487, 355, 458, 83, 201, 198, 11748, 299, 32152, 355, 45941, 201, 198, 11748, 19798, 292, 355, 279, 67, 201, 198, 11748, 7110, 306, 13, 42712, 355, 279, ...
1.649712
3,126
from __future__ import print_function import argparse import random import torch import torch.optim as optim import torch.utils.data from torch.autograd import Variable import numpy as np import os import utils from torch_geometric.data import Data, Dataset,DataLoader from torch_scatter import scatter_mean import torch...
[ 6738, 11593, 37443, 834, 1330, 3601, 62, 8818, 198, 11748, 1822, 29572, 198, 11748, 4738, 198, 11748, 28034, 198, 11748, 28034, 13, 40085, 355, 6436, 198, 11748, 28034, 13, 26791, 13, 7890, 198, 6738, 28034, 13, 2306, 519, 6335, 1330, 3...
2.600092
2,163
import sixdegrees import numpy as np import scipy.sparse as sprs from scipy.special import binom import matplotlib.pyplot as pl N_meas = 1000 betas = np.logspace(-3,0,10) k = 8. N = 100 for beta in betas: hist = np.zeros((N,)) for meas in range(N_meas): _, row, col = sixdegrees.modified_sma...
[ 11748, 2237, 13500, 6037, 220, 198, 11748, 299, 32152, 355, 45941, 198, 11748, 629, 541, 88, 13, 82, 29572, 355, 599, 3808, 198, 6738, 629, 541, 88, 13, 20887, 1330, 9874, 296, 220, 198, 198, 11748, 2603, 29487, 8019, 13, 9078, 29487,...
1.964876
484
import pygame, copy from pygame.locals import * ########################################################################## ## Character ## ## -------------------------------------------------------------------- ## ## Class that defines an instance of an on-scr...
[ 11748, 12972, 6057, 11, 4866, 198, 6738, 12972, 6057, 13, 17946, 874, 1330, 1635, 198, 198, 29113, 29113, 7804, 2235, 198, 2235, 15684, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 2...
3.797814
183
default_json_pool = { "previousState": "Closing", "stateTransitionTime": "2021-03-18T14:34:51Z", "previousStateTransitionTime": "2021-03-18T14:34:39Z", "lastModified": "2021-03-18T14:34:51Z", "elasticProperty": { "isElastic": False, "minTotalSlots": 1, "maxTotalSlots"...
[ 198, 12286, 62, 17752, 62, 7742, 796, 1391, 198, 220, 220, 220, 366, 3866, 1442, 9012, 1298, 220, 366, 2601, 2752, 1600, 198, 220, 220, 220, 366, 5219, 8291, 653, 7575, 1298, 220, 366, 1238, 2481, 12, 3070, 12, 1507, 51, 1415, 25, ...
1.869622
1,534
import unittest from gocdapi.go import Go from gocdapi.pipeline import Pipeline from gocdapi.stage import Stage if __name__ == '__main__': unittest.main()
[ 11748, 555, 715, 395, 198, 198, 6738, 308, 420, 67, 15042, 13, 2188, 1330, 1514, 198, 6738, 308, 420, 67, 15042, 13, 79, 541, 4470, 1330, 37709, 198, 6738, 308, 420, 67, 15042, 13, 14247, 1330, 15371, 628, 198, 198, 361, 11593, 3672...
2.672131
61
# -*- coding: utf-8 -*- """ Created on Mon Jan 4 16:39:41 2021 This will be used to query an FTP server to download csv data from the sensors of interest. @author: sHristov """ import os import time import datetime import logging import gzip import typing import urllib.error import urllib.request ...
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 201, 198, 37811, 201, 198, 41972, 319, 2892, 2365, 220, 604, 1467, 25, 2670, 25, 3901, 33448, 201, 198, 201, 198, 1212, 481, 307, 973, 284, 12405, 281, 45854, 4382, 284, 43...
2.288058
1,097
#!/bin/env python3 import time import gex with gex.Client(gex.TrxRawUSB()) as client: ow = gex.OneWire(client, 'ow') # print("Presence: ", ow.test_presence()) print("Devices:", ow.search()) while True: (a, b) = meas2(6558392391241695016, 1802309978572980008) # a = meas(655839239124169...
[ 2, 48443, 8800, 14, 24330, 21015, 18, 198, 11748, 640, 198, 198, 11748, 308, 1069, 198, 198, 4480, 308, 1069, 13, 11792, 7, 25636, 13, 2898, 87, 27369, 27155, 28955, 355, 5456, 25, 198, 220, 220, 220, 12334, 796, 308, 1069, 13, 3198...
2.006515
921
#coding:utf-8 # # id: bugs.core_5018 # title: Regression: Non-indexed predicates may not be applied immediately after retrieval when tables are being joined # decription: # tracker_id: CORE-5018 # min_versions: ['3.0'] # versions: 3.0 # qmid: None import pytest from firebird.qa import...
[ 2, 66, 7656, 25, 40477, 12, 23, 198, 2, 198, 2, 4686, 25, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 11316, 13, 7295, 62, 20, 29159, 198, 2, 3670, 25, 220, 220, 220, 220, 220, 220, 220, 3310, 2234, 25, 8504, 12, 9630, ...
2.090508
1,812
from torch import random import torch from torch.nn.modules import linear import torch.optim as optim import torch.nn.functional as F from torch.nn.utils import clip_grad_norm_ import logging import numpy as np import random from value_network import ValueNetwork, ConvValueNetwork
[ 6738, 28034, 1330, 4738, 198, 11748, 28034, 198, 6738, 28034, 13, 20471, 13, 18170, 1330, 14174, 198, 11748, 28034, 13, 40085, 355, 6436, 198, 11748, 28034, 13, 20471, 13, 45124, 355, 376, 198, 6738, 28034, 13, 20471, 13, 26791, 1330, 1...
3.944444
72
from sky_iot.utils import UtilsTool _init() read_config()
[ 6738, 6766, 62, 5151, 13, 26791, 1330, 7273, 4487, 25391, 198, 198, 62, 15003, 3419, 198, 198, 961, 62, 11250, 3419 ]
2.809524
21
#!/usr/bin/python import sys,subprocess #user and group id id=171 if len(sys.argv) == 2: if sys.argv[1] == "create-glint-user": create_group() add_user() elif sys.argv[1] == "remove-glint-user": remove_user() #remove_group() else: show_usage() else: show_usage()...
[ 2, 48443, 14629, 14, 8800, 14, 29412, 198, 198, 11748, 25064, 11, 7266, 14681, 198, 2, 7220, 290, 1448, 4686, 198, 312, 28, 27192, 198, 198, 361, 18896, 7, 17597, 13, 853, 85, 8, 6624, 362, 25, 198, 220, 220, 220, 611, 25064, 13, ...
2.018868
159
from django.apps import apps from django.test import TestCase from model_bakery import baker from rest_framework import serializers from api.serializers.common import MappedSerializerMixin from api.serializers.registration import UserSerializer from common.constants import models Profile = apps.get_model(models.PROFI...
[ 6738, 42625, 14208, 13, 18211, 1330, 6725, 198, 6738, 42625, 14208, 13, 9288, 1330, 6208, 20448, 198, 6738, 2746, 62, 65, 33684, 1330, 46412, 198, 6738, 1334, 62, 30604, 1330, 11389, 11341, 198, 198, 6738, 40391, 13, 46911, 11341, 13, 1...
3.761364
88
import os import pickle def var_to_pickle(var, filename): ''' Writes the given variable to a pickle file Args: var (any): variable to be written to pickle file filename (str): path and filename of pickle file Returns: None ''' try: with open(filename, 'wb') as...
[ 11748, 28686, 198, 11748, 2298, 293, 628, 198, 4299, 1401, 62, 1462, 62, 27729, 293, 7, 7785, 11, 29472, 2599, 198, 220, 220, 220, 705, 7061, 198, 220, 220, 220, 12257, 274, 262, 1813, 7885, 284, 257, 2298, 293, 2393, 628, 220, 220,...
2.254364
401
from dbgen import Model from . import schema # noqa: F401 from .generators import add_generators
[ 6738, 20613, 5235, 1330, 9104, 198, 6738, 764, 1330, 32815, 220, 1303, 645, 20402, 25, 376, 21844, 198, 6738, 764, 8612, 2024, 1330, 751, 62, 8612, 2024, 628 ]
3.535714
28
import bisect import collections import functools import math import operator try: import graphviz GRAPHVIZ_INSTALLED = True except ImportError: GRAPHVIZ_INSTALLED = False from .. import base from .. import utils from . import enum def find_best_split(class_counts, feature_counts, split_enum): "...
[ 11748, 47457, 478, 198, 11748, 17268, 198, 11748, 1257, 310, 10141, 198, 11748, 10688, 198, 11748, 10088, 198, 198, 28311, 25, 198, 220, 220, 220, 1330, 4823, 85, 528, 198, 220, 220, 220, 10863, 31300, 12861, 57, 62, 38604, 7036, 1961, ...
2.298723
1,175
from influxdb import InfluxDBClient import json import config import blegateway influxCONFIG = config.get_config('influx') ids = config.get_config('identifiers')
[ 6738, 25065, 9945, 1330, 4806, 22564, 11012, 11792, 198, 11748, 33918, 198, 11748, 4566, 198, 11748, 275, 34637, 1014, 198, 198, 10745, 22564, 10943, 16254, 796, 4566, 13, 1136, 62, 11250, 10786, 10745, 22564, 11537, 198, 2340, 796, 4566, ...
3.446809
47
"""The data models used in ARL: .. note:: There are two visibility formats: :class:`BlockVisibility` is conceived as an ingest and calibration format. The visibility data are kept in a block of shape (number antennas, number antennas, number channels, number polarisation). One block is kept per integr...
[ 37811, 464, 1366, 4981, 973, 287, 5923, 43, 25, 198, 198, 492, 3465, 3712, 198, 220, 220, 220, 1318, 389, 734, 20742, 17519, 25, 628, 220, 220, 220, 1058, 4871, 25, 63, 12235, 15854, 2247, 63, 318, 21581, 355, 281, 26151, 290, 36537...
2.200369
11,394
#tk13.pyw import tkinter as tk root = tk.Tk() root.geometry('300x200') lb = tk.Label(text='This is a Label,This is a label,This is a Label') ms = tk.Label(text='This is a Message.This is a a Message.This is a Message.This is a Message') [widget.pack()for widget in (lb,ms)] root.mainloop()
[ 2, 30488, 1485, 13, 9078, 86, 198, 11748, 256, 74, 3849, 355, 256, 74, 198, 198, 15763, 796, 256, 74, 13, 51, 74, 3419, 198, 15763, 13, 469, 15748, 10786, 6200, 87, 2167, 11537, 198, 23160, 796, 256, 74, 13, 33986, 7, 5239, 11639,...
2.621622
111
from itertools import izip_longest outpath = "redd-test/" dir = "redd-test/house_1/" with open(dir+'channel_5_6.dat') as f3,\ open(dir+'channel_6_7.dat') as f4, open(dir+'channel_7_5.dat') as f5, open(dir+'channel_8_5.dat') as f6,\ open(dir+'channel_9_3.dat') as f7, open(dir+'channel_11_9.dat') as f8, open(d...
[ 6738, 340, 861, 10141, 1330, 220, 528, 541, 62, 6511, 395, 198, 198, 448, 6978, 796, 366, 26504, 12, 9288, 30487, 198, 198, 15908, 796, 366, 26504, 12, 9288, 14, 4803, 62, 16, 30487, 198, 198, 4480, 1280, 7, 15908, 10, 6, 17620, 6...
1.823653
2,376
import argparse import subprocess from typing import Iterable, Optional, Tuple from attr import attrib, attrs __version__ = '0.15.0' Command = Tuple[str, ...] @attrs(frozen=True) TOOLS = [ CommandTool('flake8', default_files=()), CommandTool( 'isort', run_params=('-c',), fix_params=(), default_f...
[ 11748, 1822, 29572, 198, 11748, 850, 14681, 198, 6738, 19720, 1330, 40806, 540, 11, 32233, 11, 309, 29291, 198, 198, 6738, 708, 81, 1330, 708, 822, 11, 708, 3808, 198, 198, 834, 9641, 834, 796, 705, 15, 13, 1314, 13, 15, 6, 628, 1...
2.294872
234
import numpy as np import math import matplotlib.pyplot as plt from matplotlib import cm # Create random input and output data x = np.linspace(-math.pi, math.pi, 2000) y = np.sin(x) # Randomly initialize weights a = np.random.randn() b = np.random.randn() c = np.random.randn() d = np.random.randn() learning_rate =...
[ 11748, 299, 32152, 355, 45941, 198, 11748, 10688, 198, 11748, 2603, 29487, 8019, 13, 9078, 29487, 355, 458, 83, 198, 6738, 2603, 29487, 8019, 1330, 12067, 198, 198, 2, 13610, 4738, 5128, 290, 5072, 1366, 198, 87, 796, 45941, 13, 21602, ...
2.159737
914
# Copyright (c) 2015 Microsoft Corporation from z3 import * set_option(auto_config=True) x, y = Ints('x y') print eq(x + y, x + y) print eq(x + y, y + x) n = x + y print eq(n, x + y) # x2 is eq to x x2 = Int('x') print eq(x, x2) # the integer variable x is not equal to # the real variable x print eq(Int('x'), Real(...
[ 198, 2, 15069, 357, 66, 8, 1853, 5413, 10501, 198, 6738, 1976, 18, 1330, 1635, 198, 2617, 62, 18076, 7, 23736, 62, 11250, 28, 17821, 8, 198, 198, 87, 11, 331, 796, 2558, 82, 10786, 87, 331, 11537, 198, 4798, 37430, 7, 87, 1343, ...
2.414815
135
# This is a script that turns a KaTrain AI into a sort-of GTP compatible bot import json import random import sys import time import os import json import traceback import math os.environ["KCFG_KIVY_LOG_LEVEL"] = os.environ.get("KCFG_KIVY_LOG_LEVEL", "warning") from katrain.core.ai import generate_ai_move from katra...
[ 2, 770, 318, 257, 4226, 326, 4962, 257, 11611, 44077, 9552, 656, 257, 3297, 12, 1659, 402, 7250, 11670, 10214, 198, 11748, 33918, 198, 11748, 4738, 198, 11748, 25064, 198, 11748, 640, 198, 11748, 28686, 198, 11748, 33918, 198, 11748, 12...
2.127159
3,531
''' The follwing code runs a test lstm network on the CIFAR dataset I will explicitly write the networks here for ease of understanding One convlstm layer right after the first cnn cnn_dropout = 0.4 rnn_dropout = 0.2 , WITH cnivlstm_dropout samples = 10, h = 256, epochs = 50, convlstm activation = relu - out.3732...
[ 7061, 6, 198, 464, 22752, 5469, 2438, 4539, 257, 1332, 300, 301, 76, 3127, 319, 262, 327, 5064, 1503, 27039, 220, 198, 198, 40, 481, 11777, 3551, 262, 7686, 994, 329, 10152, 286, 4547, 220, 198, 198, 3198, 3063, 75, 301, 76, 7679, ...
2.174104
8,673
import pytest """ Test Dependency Installation The purpose is to check if core dependencies are installed properly. Typically, failure to these tests indicate an incorrection installation or wrong activation of the virtual environment (i.e. conda, venv, etc.). """
[ 11748, 12972, 9288, 198, 198, 37811, 6208, 37947, 1387, 32588, 198, 198, 464, 4007, 318, 284, 2198, 611, 4755, 20086, 389, 6589, 6105, 13, 198, 49321, 11, 5287, 284, 777, 5254, 7603, 281, 5970, 8243, 9988, 220, 198, 273, 2642, 14916, ...
4.33871
62
from treys import Evaluator, Deck from treys.card import pretty d = Deck.fresh() print(d) print(pretty(d))
[ 6738, 2054, 893, 1330, 26439, 84, 1352, 11, 20961, 198, 6738, 2054, 893, 13, 9517, 1330, 2495, 198, 198, 67, 796, 20961, 13, 48797, 3419, 198, 4798, 7, 67, 8, 198, 4798, 7, 37784, 7, 67, 4008, 628, 198 ]
2.820513
39
#!/usr/bin/env python r""" This module provides command execution functions such as cmd_fnc and cmd_fnc_u. """ import sys import subprocess robot_env = 1 try: from robot.libraries.BuiltIn import BuiltIn except ImportError: robot_env = 0 import gen_print as gp import gen_valid as gv import gen_misc as gm if r...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 198, 81, 37811, 198, 1212, 8265, 3769, 3141, 9706, 5499, 884, 355, 23991, 62, 69, 10782, 290, 23991, 62, 69, 10782, 62, 84, 13, 198, 37811, 198, 198, 11748, 25064, 198, 11748, 850, 1...
2.048904
1,779
import turtle as trt distance = 70 angle = 90 for compteur in range(4): if compteur == 0: trt.color("blue") elif compteur == 1: trt.color("red") elif compteur == 2: trt.color("green") else : trt.color("orange") trt.write(compteur) trt.forward(distance) trt.left(angle) trt.done()
[ 11748, 28699, 355, 491, 83, 198, 198, 30246, 796, 4317, 198, 9248, 796, 4101, 198, 198, 1640, 401, 457, 23365, 287, 2837, 7, 19, 2599, 198, 197, 361, 401, 457, 23365, 6624, 657, 25, 198, 197, 197, 2213, 83, 13, 8043, 7203, 17585, ...
2.214815
135
#!/usr/bin/python # # Author: Jashua R. Cloutier (contact via sourceforge username:senexcanis) # # Copyright (C) 2010, Jashua R. Cloutier # All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions # are met: # # * Re...
[ 2, 48443, 14629, 14, 8800, 14, 29412, 198, 2, 198, 2, 6434, 25, 449, 1077, 6413, 371, 13, 1012, 448, 959, 357, 32057, 2884, 2723, 30293, 20579, 25, 6248, 1069, 5171, 271, 8, 198, 2, 198, 2, 15069, 357, 34, 8, 3050, 11, 449, 1077...
2.164682
11,926
from csv_cti.blueprints.web_api import web_api from flask import request,current_app,render_template from csv_cti.blueprints.op.md5_token import encrypt_md5 from csv_cti.blueprints.op.tiers import Tiers_op #tiers @web_api.route('/tiers-add/',methods=['POST']) @web_api.route('/tiers-rm/',methods=['POST']) @web_api.ro...
[ 6738, 269, 21370, 62, 310, 72, 13, 17585, 17190, 13, 12384, 62, 15042, 1330, 3992, 62, 15042, 198, 6738, 42903, 1330, 2581, 11, 14421, 62, 1324, 11, 13287, 62, 28243, 198, 6738, 269, 21370, 62, 310, 72, 13, 17585, 17190, 13, 404, 13...
2.404762
168
x = lst(1,2,3,4,5,6,7,8,9,10,11,12) print x x.move_even_to_end() print x x.reverse() print x
[ 220, 220, 220, 220, 220, 220, 220, 220, 198, 87, 796, 300, 301, 7, 16, 11, 17, 11, 18, 11, 19, 11, 20, 11, 21, 11, 22, 11, 23, 11, 24, 11, 940, 11, 1157, 11, 1065, 8, 198, 4798, 2124, 198, 87, 13, 21084, 62, 10197, 62, 1...
1.59375
64
import argparse import pandas as pd import numpy as np import os # from os.path import join import sys import logging # import joblib from sklearn.externals import joblib from sklearn.tree import DecisionTreeRegressor from sklearn.ensemble import RandomForestRegressor, AdaBoostRegressor, GradientBoostingRegressor...
[ 11748, 1822, 29572, 198, 11748, 19798, 292, 355, 279, 67, 198, 11748, 299, 32152, 355, 45941, 198, 11748, 28686, 198, 2, 422, 28686, 13, 6978, 1330, 4654, 198, 11748, 25064, 198, 11748, 18931, 198, 198, 2, 1330, 1693, 8019, 198, 6738, ...
2.389841
1,634
from discretize.utils import ( exampleLrmGrid, meshTensor, closestPoints, ExtractCoreMesh )
[ 6738, 1221, 1186, 1096, 13, 26791, 1330, 357, 198, 220, 220, 220, 1672, 43, 26224, 41339, 11, 19609, 51, 22854, 11, 11706, 40710, 11, 29677, 14055, 37031, 198, 8, 198 ]
3.2
30
import asyncio import pytest from typing import List from tests.setup_nodes import setup_full_system from src.util.ints import uint32 from src.types.full_block import FullBlock from src.util.make_test_constants import make_test_constants_with_genesis from tests.time_out_assert import time_out_assert, time_out_assert_cu...
[ 11748, 30351, 952, 198, 11748, 12972, 9288, 198, 6738, 19720, 1330, 7343, 198, 6738, 5254, 13, 40406, 62, 77, 4147, 1330, 9058, 62, 12853, 62, 10057, 198, 6738, 12351, 13, 22602, 13, 29503, 1330, 20398, 2624, 198, 6738, 12351, 13, 19199...
2.585253
217
from __future__ import annotations from typing import Type, Union from enum import Enum import inspect from ..base_schema import Schema from ..dom import DOMElement from ..base_schema import SchemaPrimitive, SchemaEnum def resolve_arg_to_schema(arg: Union[Type, Schema]) -> Schema: """ Resolve an argument ...
[ 6738, 11593, 37443, 834, 1330, 37647, 198, 198, 6738, 19720, 1330, 5994, 11, 4479, 198, 6738, 33829, 1330, 2039, 388, 198, 198, 11748, 10104, 198, 198, 6738, 11485, 8692, 62, 15952, 2611, 1330, 10011, 2611, 198, 6738, 11485, 3438, 1330, ...
2.491484
411
############################## # support query serve for front web system # filename:query.py # author: liwei # StuID: 1711350 # date: 2019.12.1 ############################## #查询构建 from whoosh import highlight from whoosh import qparser from whoosh import index from flask import Flask from flask import request...
[ 14468, 7804, 4242, 2235, 198, 2, 1104, 12405, 4691, 329, 2166, 3992, 1080, 198, 2, 29472, 25, 22766, 13, 9078, 198, 2, 1772, 25, 220, 7649, 42990, 198, 2, 520, 84, 2389, 25, 220, 220, 1596, 1157, 14877, 198, 2, 3128, 25, 220, 220,...
1.531307
4,903
""" Make time series plots. """ import galene as ga import datetime data_id_list = [ 'cmems-nrt', 'run001', 'run002', ] var_list = ['slev', 'temp'] start_time = datetime.datetime(2016, 6, 1) end_time = datetime.datetime(2018, 7, 1) for var in var_list: dataset_list = [] for data_id in data_id_lis...
[ 37811, 198, 12050, 640, 2168, 21528, 13, 198, 37811, 198, 11748, 9426, 1734, 355, 31986, 198, 11748, 4818, 8079, 198, 198, 7890, 62, 312, 62, 4868, 796, 685, 198, 220, 220, 220, 705, 11215, 5232, 12, 77, 17034, 3256, 198, 220, 220, ...
1.948944
568
import numpy as np import copy from . import cv #TODO need to refactaring
[ 11748, 299, 32152, 355, 45941, 198, 11748, 4866, 198, 198, 6738, 764, 1330, 269, 85, 198, 198, 2, 51, 3727, 46, 761, 284, 1006, 529, 1723 ]
2.884615
26
""" three-layers logistic regression model for not-MNIST dataset Got ~ 87% accuracy. not-MNIST: http://yaroslavvb. blogspot. it/2011/09/notmnist-dataset.html author: ANDY (andy929910266@gmail.com) """ import os os.environ['TF_CPP_MIN_LOG_LEVEL'] = '2' import numpy as np import tensorflow as tf import time impor...
[ 37811, 198, 197, 15542, 12, 75, 6962, 2604, 2569, 20683, 2746, 329, 407, 12, 39764, 8808, 27039, 198, 197, 30074, 5299, 10083, 4, 9922, 13, 198, 197, 1662, 12, 39764, 8808, 25, 2638, 1378, 88, 283, 26388, 85, 65, 13, 4130, 20485, 13...
2.751333
1,500
import click from collections import defaultdict import importlib import logging import redis import structlog from .redis_scripts import RedisScripts from ._internal import * from .exceptions import * from .retry import * from .schedule import * from .task import Task from .worker import Worker __all__ = ['TaskTige...
[ 11748, 3904, 198, 6738, 17268, 1330, 4277, 11600, 198, 11748, 1330, 8019, 198, 11748, 18931, 198, 11748, 2266, 271, 198, 11748, 2878, 6404, 198, 198, 6738, 764, 445, 271, 62, 46521, 1330, 2297, 271, 7391, 82, 198, 198, 6738, 47540, 3253...
2.405542
1,191
# auxiliary from MDAOfabric.accessories import * # solvers from MDAOfabric.solvers import *
[ 2, 37419, 198, 6738, 337, 5631, 5189, 397, 1173, 13, 15526, 1749, 1330, 1635, 198, 198, 2, 1540, 690, 198, 6738, 337, 5631, 5189, 397, 1173, 13, 34453, 690, 1330, 1635, 198 ]
2.90625
32
# -*- coding: utf-8 -*- # Form implementation generated from reading ui file 'AnalysisPlotWidgetTemplate.ui' # # Created: Mon Aug 16 15:31:49 2010 # by: PyQt4 UI code generator 4.5.4 # # WARNING! All changes made in this file will be lost! from PyQt4 import QtCore, QtGui from acq4.pyqtgraph.PlotWidget import Pl...
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 198, 2, 5178, 7822, 7560, 422, 3555, 334, 72, 2393, 705, 32750, 43328, 38300, 30800, 13, 9019, 6, 198, 2, 198, 2, 15622, 25, 2892, 2447, 1467, 1315, 25, 3132, 25, 29...
2.836207
116
r""" Balanced Incomplete Block Designs (BIBD) This module gathers everything related to Balanced Incomplete Block Designs. One can build a BIBD (or check that it can be built) with :func:`balanced_incomplete_block_design`:: sage: BIBD = designs.balanced_incomplete_block_design(7,3) In particular, Sage can build ...
[ 81, 37811, 198, 24597, 2903, 554, 20751, 9726, 49282, 357, 3483, 14529, 8, 198, 198, 1212, 8265, 43609, 2279, 3519, 284, 38984, 554, 20751, 9726, 49282, 13, 1881, 460, 1382, 257, 198, 3483, 14529, 357, 273, 2198, 326, 340, 460, 307, 3...
2.030018
24,785
import numpy as np from collections import OrderedDict from GenPlayground import GenPlayground if __name__ == '__main__': np.set_printoptions(linewidth=200) IP, IP_cycle, IP_pe = GenPlayground() # print(IP_cycle) # print(IP_pe) Gen_CTRL(IP, IP_cycle, IP_pe)
[ 11748, 299, 32152, 355, 45941, 198, 6738, 17268, 1330, 14230, 1068, 35, 713, 198, 198, 6738, 5215, 11002, 2833, 1330, 5215, 11002, 2833, 628, 198, 361, 11593, 3672, 834, 6624, 705, 834, 12417, 834, 10354, 198, 220, 220, 220, 45941, 13, ...
2.517857
112
# -------------------------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. # --------------------------------------------------------------------...
[ 2, 16529, 1783, 10541, 198, 2, 15069, 357, 66, 8, 5413, 10501, 13, 1439, 2489, 10395, 13, 198, 2, 49962, 739, 262, 17168, 13789, 13, 4091, 13789, 13, 14116, 287, 262, 1628, 6808, 329, 5964, 1321, 13, 198, 2, 16529, 1783, 10541, 198,...
3.272353
1,700
from django.apps import AppConfig
[ 6738, 42625, 14208, 13, 18211, 1330, 2034, 16934, 628 ]
3.888889
9
import signal from telegram.ext import Updater, CommandHandler, MessageHandler, Filters from telegram import Sticker, InlineKeyboardButton, InlineKeyboardMarkup import logging from Utils import telegram_util, twitch_util, config_util if __name__ == '__main__': config = config_util.get_config() logging.basicC...
[ 11748, 6737, 198, 6738, 573, 30536, 13, 2302, 1330, 3205, 67, 729, 11, 9455, 25060, 11, 16000, 25060, 11, 7066, 1010, 198, 6738, 573, 30536, 1330, 520, 15799, 11, 554, 1370, 9218, 3526, 21864, 11, 554, 1370, 9218, 3526, 9704, 929, 198...
2.610909
275
import matplotlib.pyplot as plt import numpy as np from scipy.stats import norm import math import matplotlib.colors as colors from matplotlib import cm from matplotlib import rc __author__ = 'ernesto' # if use latex or mathtext rc('text', usetex=False) rc('mathtext', fontset='cm') # auxiliar function for plot tick...
[ 11748, 2603, 29487, 8019, 13, 9078, 29487, 355, 458, 83, 198, 11748, 299, 32152, 355, 45941, 198, 6738, 629, 541, 88, 13, 34242, 1330, 2593, 198, 11748, 10688, 198, 11748, 2603, 29487, 8019, 13, 4033, 669, 355, 7577, 198, 198, 6738, 2...
2.276432
1,693
"""Generate a matplotlib canvas and add it to a QWidget contained in a QMainWindow. This will provide the display and interactions for the PyCCD plots.""" from lcmap_tap.logger import log, exc_handler from lcmap_tap.Plotting import POINTS, LINES import sys import datetime as dt import numpy as np import pkg_resource...
[ 37811, 8645, 378, 257, 2603, 29487, 8019, 21978, 290, 751, 340, 284, 257, 1195, 38300, 7763, 287, 257, 1195, 13383, 27703, 13, 220, 770, 481, 2148, 262, 198, 13812, 290, 12213, 329, 262, 9485, 4093, 35, 21528, 526, 15931, 198, 198, 67...
2.501748
572
""" Miscellaneous functions for working with files """ import os def canonicalize_path(path: str): """Converts a path string to its canonical form (easier for comparisons)""" return os.path.abspath(os.path.realpath(os.path.expanduser(path)))
[ 37811, 198, 198, 31281, 25673, 5499, 329, 1762, 351, 3696, 198, 198, 37811, 198, 198, 11748, 28686, 198, 198, 4299, 40091, 1096, 62, 6978, 7, 6978, 25, 965, 2599, 198, 220, 220, 220, 37227, 3103, 24040, 257, 3108, 4731, 284, 663, 4009...
3.135802
81
import os import _winreg def get_python_executables(): """ Find the Maya installation paths using _winreg. The path to the python executable is extended from the installation path. The dictionary is made up of keys that are made up of the Maya versions found installed and a path to the executable...
[ 11748, 28686, 198, 11748, 4808, 5404, 2301, 628, 198, 4299, 651, 62, 29412, 62, 18558, 315, 2977, 33529, 198, 220, 220, 220, 37227, 198, 220, 220, 220, 9938, 262, 26041, 9988, 13532, 1262, 4808, 5404, 2301, 13, 383, 3108, 284, 262, 21...
1.950455
989
"""A rule that provides file(s) specific via DefaultInfo from a given target's DefaultInfo or OutputGroupInfo """ load( "//lib/private:output_files.bzl", _make_output_files = "make_output_files", _output_files = "output_files", ) output_files = _output_files make_output_files = _make_output_files
[ 37811, 32, 3896, 326, 3769, 2393, 7, 82, 8, 2176, 2884, 15161, 12360, 422, 257, 1813, 2496, 338, 15161, 12360, 393, 25235, 13247, 12360, 198, 37811, 198, 198, 2220, 7, 198, 220, 220, 220, 366, 1003, 8019, 14, 19734, 25, 22915, 62, 1...
2.971429
105
"""This script converts a collection of MIDI files to multitrack pianorolls. """ import os import json import argparse import warnings import pretty_midi from pypianoroll import Multitrack from utils import make_sure_path_exists, change_prefix, findall_endswith from config import CONFIG if CONFIG['multicore']...
[ 37811, 1212, 4226, 26161, 257, 4947, 286, 33439, 3696, 284, 41785, 39638, 43923, 273, 33421, 13, 201, 198, 37811, 201, 198, 11748, 28686, 201, 198, 11748, 33918, 201, 198, 11748, 1822, 29572, 201, 198, 11748, 14601, 201, 198, 11748, 2495,...
2.191004
1,623
from flask import request, current_app import jwt from app.models.auth import User from app.api import api # required_token decorator
[ 6738, 42903, 1330, 2581, 11, 1459, 62, 1324, 198, 11748, 474, 46569, 198, 198, 6738, 598, 13, 27530, 13, 18439, 1330, 11787, 198, 6738, 598, 13, 15042, 1330, 40391, 628, 198, 2, 2672, 62, 30001, 11705, 1352, 198 ]
3.605263
38
#!/usr/bin/env python # -*- coding: utf-8 -*- """Fetches audit log data from the Mimecast API and saves to a folder for Sumo Logic data collection""" import base64 import hashlib import hmac import json import logging import os import pickle import uuid import time import datetime import sys from os.path import dirna...
[ 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, 37, 316, 2052, 14984, 2604, 1366, 422, 262, 337, 524, 2701, 7824, 290, 16031, 284, 257, 9483, 329, 5060, ...
2.570166
905
import unittest from core.poly_parser import * if __name__ == '__main__': unittest.main()
[ 11748, 555, 715, 395, 198, 6738, 4755, 13, 35428, 62, 48610, 1330, 1635, 628, 198, 198, 361, 11593, 3672, 834, 6624, 705, 834, 12417, 834, 10354, 198, 220, 220, 220, 555, 715, 395, 13, 12417, 3419, 198 ]
2.621622
37
from typing import List, Optional from dataclasses import dataclass from botbuilder.schema import ActivityTypes, Activity from botbuilder.core import MessageFactory from botbuilder.dialogs import ( WaterfallDialog, WaterfallStepContext, DialogTurnResult, PromptOptions, Choice, ChoicePrompt, ) fr...
[ 6738, 19720, 1330, 7343, 11, 32233, 198, 6738, 4818, 330, 28958, 1330, 4818, 330, 31172, 198, 6738, 10214, 38272, 13, 15952, 2611, 1330, 24641, 31431, 11, 24641, 198, 6738, 10214, 38272, 13, 7295, 1330, 16000, 22810, 198, 6738, 10214, 382...
3.202186
183
# Theory: Introduction to Python # Computer science has been around for a while, and # programming languages are one of its main tools. These are # designed to help us implement software to run on a computer. # Just as natural languages for people, they serve as a # communication tool, only between people and machines....
[ 2, 17003, 25, 22395, 284, 11361, 198, 2, 13851, 3783, 468, 587, 1088, 329, 257, 981, 11, 290, 198, 2, 8300, 8950, 389, 530, 286, 663, 1388, 4899, 13, 2312, 389, 198, 2, 3562, 284, 1037, 514, 3494, 3788, 284, 1057, 319, 257, 3644, ...
4.026342
987
from __future__ import print_function import pytest import requests from jenkinsapi.jenkins import Requester from jenkinsapi.custom_exceptions import JenkinsAPIException from mock import patch @patch('jenkinsapi.jenkins.Requester.AUTH_COOKIE', 'FAKE') @patch('jenkinsapi.jenkins.Requester.AUTH_COOKIE', '...
[ 6738, 11593, 37443, 834, 1330, 3601, 62, 8818, 198, 11748, 12972, 9288, 198, 11748, 7007, 198, 6738, 474, 268, 5331, 15042, 13, 48796, 5331, 1330, 9394, 7834, 198, 6738, 474, 268, 5331, 15042, 13, 23144, 62, 1069, 11755, 1330, 21835, 17...
3.008772
114
from flask import Blueprint, flash, redirect, render_template, request, url_for from flask_login import login_required from app.dao.rent import get_all_rentcodes from app.dao.money import get_acc_descs, get_moneydets, get_money_item, toggle_cleared from app.main.money import collect_search_filter, mget_money_acc, mget...
[ 6738, 42903, 1330, 39932, 11, 7644, 11, 18941, 11, 8543, 62, 28243, 11, 220, 2581, 11, 19016, 62, 1640, 198, 6738, 42903, 62, 38235, 1330, 17594, 62, 35827, 198, 6738, 598, 13, 67, 5488, 13, 1156, 1330, 651, 62, 439, 62, 1156, 40148...
2.70098
408
from synonym_dict import SynonymDict, SynonymSet class QuantitySynonyms(SynonymSet): """ QuantitySynonyms are string terms that all refer to the same quantity of measure. They must all have the same unit, because they are used to define the unit of measure of flowables. To repeat: quantity instances t...
[ 6738, 6171, 5177, 62, 11600, 1330, 16065, 5177, 35, 713, 11, 16065, 5177, 7248, 628, 628, 198, 198, 4871, 39789, 29934, 43612, 7, 29934, 5177, 7248, 2599, 198, 220, 220, 220, 37227, 198, 220, 220, 220, 39789, 29934, 43612, 389, 4731, ...
2.885417
288
import os import sys from algorithms import dijkstra, floyd from utils import * TASK1_START = 0 print '-'*35 + '\ntask1 - shortest ways from ({})\n'.format(TASK1_START + 1) + '-'*35 g_list, g_mat = read_graph_list('task1.in') dist, prev, table = dijkstra(g_list, TASK1_START) user_interaction(prev, dist, g_mat) wri...
[ 11748, 28686, 198, 11748, 25064, 198, 198, 6738, 16113, 1330, 2566, 73, 74, 12044, 11, 781, 12192, 198, 6738, 3384, 4487, 1330, 1635, 628, 628, 198, 51, 1921, 42, 16, 62, 2257, 7227, 796, 657, 198, 4798, 705, 19355, 9, 2327, 1343, 7...
2.288372
215
bashCommand = "rostopic pub -1 /spray_onoff std_msgs/Float32 1.0" import subprocess process = subprocess.Popen(bashCommand.split(), stdout=subprocess.PIPE) output, error = process.communicate()
[ 41757, 21575, 796, 366, 305, 11338, 291, 2240, 532, 16, 1220, 34975, 323, 62, 261, 2364, 14367, 62, 907, 14542, 14, 43879, 2624, 352, 13, 15, 1, 198, 11748, 850, 14681, 198, 14681, 796, 850, 14681, 13, 47, 9654, 7, 41757, 21575, 13,...
2.969231
65
from fastapi import FastAPI from config import ServiceConfig from apps.libs import init_app
[ 6738, 3049, 15042, 1330, 12549, 17614, 198, 198, 6738, 4566, 1330, 4809, 16934, 198, 6738, 6725, 13, 8019, 82, 1330, 2315, 62, 1324, 628 ]
3.916667
24
import os from office365.sharepoint.client_context import ClientContext SITE_URL = os.getenv('SITE_URL') USER = os.getenv('USER') PASS = os.getenv('PASS') DESTINATION = os.getenv('DESTINATION') FILE = os.getenv('FILE') FILE_ON_SERVER = os.getenv('FILE_ON_SERVER') if __name__ == "__main__": main()
[ 11748, 28686, 198, 6738, 2607, 24760, 13, 20077, 4122, 13, 16366, 62, 22866, 1330, 20985, 21947, 198, 198, 50, 12709, 62, 21886, 796, 28686, 13, 1136, 24330, 10786, 50, 12709, 62, 21886, 11537, 198, 29904, 796, 28686, 13, 1136, 24330, 1...
2.571429
119
# Copyright (c) Facebook, Inc. and its affiliates. # All rights reserved. # # This source code is licensed under the license found in the # LICENSE file in the root directory of this source tree. # import torch import torch.nn as nn import torch.nn.functional as F from crlapi.core import CLModel from crlapi.sl.clmodel...
[ 2, 15069, 357, 66, 8, 3203, 11, 3457, 13, 290, 663, 29116, 13, 198, 2, 1439, 2489, 10395, 13, 198, 2, 198, 2, 770, 2723, 2438, 318, 11971, 739, 262, 5964, 1043, 287, 262, 198, 2, 38559, 24290, 2393, 287, 262, 6808, 8619, 286, 42...
3.42246
187
from ibm_db_sa import requirements Requirements = requirements.Requirements
[ 6738, 24283, 76, 62, 9945, 62, 11400, 1330, 5359, 198, 198, 42249, 796, 5359, 13, 42249, 198 ]
4.529412
17
from datetime import datetime, time, timedelta from PyShift.test.base_test import BaseTest from PyShift.workschedule.work_schedule import WorkSchedule
[ 6738, 4818, 8079, 1330, 4818, 8079, 11, 640, 11, 28805, 12514, 198, 6738, 9485, 33377, 13, 9288, 13, 8692, 62, 9288, 1330, 7308, 14402, 198, 6738, 9485, 33377, 13, 5225, 2395, 5950, 13, 1818, 62, 15952, 5950, 1330, 5521, 27054, 5950, ...
2.009174
109
# -*- coding: utf-8 -*- """ ppmeasurements.util ~~~~~~~~~~~~~~ This module contains utility functions for parsing information, checking for non-global IP address, convert traceroutes to machine-readable structures, etc. :author: Muzammil Abdul Rehman :copyright: Northeastern University © ...
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 37811, 628, 220, 220, 220, 9788, 1326, 5015, 902, 13, 22602, 198, 220, 220, 220, 220, 15116, 8728, 4907, 628, 220, 220, 220, 770, 8265, 4909, 10361, 5499, 329, 32096, ...
2.181818
1,485
# Copyright (c) 2019-2021, Jonas Eschle, Jim Pivarski, Eduardo Rodrigues, and Henry Schreiner. # # Distributed under the 3-clause BSD license, see accompanying file LICENSE # or https://github.com/scikit-hep/vector for details. import pytest import vector
[ 2, 15069, 357, 66, 8, 13130, 12, 1238, 2481, 11, 40458, 8678, 354, 293, 11, 5395, 350, 452, 945, 4106, 11, 40766, 13109, 16114, 947, 11, 290, 8616, 3059, 260, 7274, 13, 198, 2, 198, 2, 4307, 6169, 739, 262, 513, 12, 565, 682, 34...
3.158537
82
# vim:set ts=8 sw=2 sts=2 et: """Store signals.""" import itertools import struct import wave SAMPLE_SIZE = 16 # In bits class WaveStream(object): """A stream of PCM audio data.""" def __init__(self, channels, sample_rate, sample_size): """Initialize a WaveStream with integer samples. Args: c...
[ 2, 43907, 25, 2617, 40379, 28, 23, 1509, 28, 17, 39747, 28, 17, 2123, 25, 198, 198, 37811, 22658, 10425, 526, 15931, 198, 198, 11748, 340, 861, 10141, 198, 11748, 2878, 198, 11748, 6769, 628, 198, 49302, 16437, 62, 33489, 796, 1467, ...
2.937118
1,145
# encoding=utf-8 import logging logger = logging.getLogger(__name__)
[ 2, 21004, 28, 40477, 12, 23, 198, 11748, 18931, 198, 198, 6404, 1362, 796, 18931, 13, 1136, 11187, 1362, 7, 834, 3672, 834, 8, 198 ]
2.8
25
import xml.etree.ElementTree as ET from pprint import pprint as pp import re # from OMDB xmlstring = '''<?xml version="1.0" encoding="UTF-8"?> <root response="True"> <movie title="The Prestige" year="2006" rated="PG-13" released="20 Oct 2006" runtime="130 min" genre="Drama, Mystery, Sci-Fi" director="Christ...
[ 11748, 35555, 13, 316, 631, 13, 20180, 27660, 355, 12152, 201, 198, 6738, 279, 4798, 1330, 279, 4798, 355, 9788, 201, 198, 11748, 302, 201, 198, 201, 198, 201, 198, 2, 422, 32468, 11012, 201, 198, 19875, 8841, 796, 705, 7061, 47934, ...
2.874818
687