content
stringlengths
1
1.04M
input_ids
listlengths
1
774k
ratio_char_token
float64
0.38
22.9
token_count
int64
1
774k
#!/usr/bin/env python3 # The function annotations in this module require Python 3.5 or higher. import os import textwrap from itertools import chain from typing import Dict, List, Union # Type aliases FilePath = str NotePath = str SQLSelectStatement = str def sort_notepaths(notepaths: List[NotePath]) -> List[NoteP...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 18, 198, 2, 383, 2163, 37647, 287, 428, 8265, 2421, 11361, 513, 13, 20, 393, 2440, 13, 198, 198, 11748, 28686, 198, 11748, 2420, 37150, 198, 198, 6738, 340, 861, 10141, 1330, 6333, 198, 6...
3.103314
513
from unittest import TestCase from testfixtures import LogCapture from scrapy.spidermiddlewares.urllength import UrlLengthMiddleware from scrapy.http import Response, Request from scrapy.spiders import Spider from scrapy.utils.test import get_crawler from scrapy.settings import Settings
[ 6738, 555, 715, 395, 1330, 6208, 20448, 198, 198, 6738, 1332, 69, 25506, 1330, 5972, 49630, 198, 198, 6738, 15881, 88, 13, 2777, 1304, 27171, 86, 3565, 13, 333, 297, 3286, 1330, 8799, 75, 24539, 34621, 1574, 198, 6738, 15881, 88, 13, ...
3.730769
78
from math import trunc num = float(input('Digite um número: ')) print('A porção inteira é {}.'.format(trunc(num)))
[ 6738, 10688, 1330, 40122, 198, 22510, 796, 12178, 7, 15414, 10786, 19511, 578, 23781, 299, 21356, 647, 78, 25, 705, 4008, 198, 4798, 10786, 32, 16964, 16175, 28749, 493, 68, 8704, 38251, 23884, 2637, 13, 18982, 7, 2213, 19524, 7, 22510,...
2.674419
43
"""Graphic Elements for the Pins.""" from .pin import Pin __all__ = ["Pin"]
[ 37811, 38, 22262, 26632, 329, 262, 350, 1040, 526, 15931, 198, 6738, 764, 11635, 1330, 13727, 198, 198, 834, 439, 834, 796, 14631, 28348, 8973, 198 ]
2.961538
26
# The guess API is already defined for you. # @param num, your guess # @return -1 if num is higher than the picked number # 1 if num is lower than the picked number # otherwise return 0 # def guess(num: int) -> int:
[ 2, 383, 4724, 7824, 318, 1541, 5447, 329, 345, 13, 198, 2, 2488, 17143, 997, 11, 534, 4724, 198, 2, 2488, 7783, 532, 16, 611, 997, 318, 2440, 621, 262, 6497, 1271, 198, 2, 220, 220, 220, 220, 220, 220, 220, 220, 220, 352, 611, ...
2.962025
79
#!/usr/bin/env python3 import argparse import numpy as np import pandas as pd from plotly import tools import plotly.graph_objs as go from plotly.offline import plot from celseq2.helper import print_logger, base_name, is_nonempty_file def plotly_qc(fpath, saveto, sep=',', name=''): ''' Generate a plotly ht...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 18, 198, 11748, 1822, 29572, 198, 11748, 299, 32152, 355, 45941, 198, 11748, 19798, 292, 355, 279, 67, 198, 6738, 7110, 306, 1330, 4899, 198, 11748, 7110, 306, 13, 34960, 62, 672, 8457, 355...
1.932421
2,412
#!/usr/bin/env python from operator import itemgetter
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 198, 6738, 10088, 1330, 2378, 1136, 353, 628, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 198 ]
2.114286
35
# -*- coding:utf8 -*- # !/usr/bin/env python # Copyright 2017 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...
[ 2, 532, 9, 12, 19617, 25, 40477, 23, 532, 9, 12, 198, 2, 5145, 14, 14629, 14, 8800, 14, 24330, 21015, 198, 2, 15069, 2177, 3012, 3457, 13, 1439, 6923, 33876, 13, 198, 2, 198, 2, 49962, 739, 262, 24843, 13789, 11, 10628, 362, 13,...
3.035948
306
from model.group_stations import Stations # app.group.pay(email_pay="uz.all.test@gmail.com") # app.group.pay(email_pay="uz.all.test@gmail.com")
[ 198, 198, 6738, 2746, 13, 8094, 62, 301, 602, 1330, 520, 602, 628, 628, 198, 2, 220, 220, 220, 598, 13, 8094, 13, 15577, 7, 12888, 62, 15577, 2625, 10277, 13, 439, 13, 9288, 31, 14816, 13, 785, 4943, 198, 198, 2, 220, 220, 220, ...
2.367647
68
# utility functions for manipulating MJCF XML models import xml.etree.ElementTree as ET import os import numpy as np from collections.abc import Iterable from PIL import Image from pathlib import Path from copy import deepcopy import robosuite RED = [1, 0, 0, 1] GREEN = [0, 1, 0, 1] BLUE = [0, 0, 1, 1] CYAN = [0, 1,...
[ 2, 10361, 5499, 329, 29349, 33974, 22495, 23735, 4981, 198, 198, 11748, 35555, 13, 316, 631, 13, 20180, 27660, 355, 12152, 198, 11748, 28686, 198, 11748, 299, 32152, 355, 45941, 198, 6738, 17268, 13, 39305, 1330, 40806, 540, 198, 6738, ...
2.593731
11,581
""" Notes Web App Copyright (C) 2019 DesmondTan """ ########### # Imports # ########### from app.models import User, Followers, Notes, Folders, Notes_Permissions, Notes_tag, Tags from datetime import datetime from werkzeug.security import generate_password_hash ############# # Functions # #############
[ 37811, 198, 16130, 5313, 2034, 198, 15269, 357, 34, 8, 13130, 41045, 45557, 198, 37811, 628, 198, 7804, 21017, 198, 2, 1846, 3742, 1303, 198, 7804, 21017, 198, 198, 6738, 598, 13, 27530, 1330, 11787, 11, 7281, 364, 11, 11822, 11, 3995...
3.428571
91
import logging
[ 11748, 18931, 198 ]
5
3
from django.urls import path from . import views """ IF YOU CHANGE URL MUST CHANGE IN LIST PAGES""" urlpatterns = [ path('list', views.team_list, name="team-list"), path('add', views.team_add, name="team-add"), path('update/<str:team_name>', views.team_update, name="team-update"), # if you change url ...
[ 6738, 42625, 14208, 13, 6371, 82, 1330, 3108, 198, 6738, 764, 1330, 5009, 628, 198, 37811, 16876, 7013, 5870, 27746, 10289, 17191, 5870, 27746, 3268, 39498, 350, 25552, 37811, 198, 6371, 33279, 82, 796, 685, 198, 220, 220, 220, 3108, 10...
2.609434
530
# Copyright 2018 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, 2864, 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, ...
2.294414
5,353
from .base import BaseModel from .package import *
[ 198, 6738, 764, 8692, 1330, 7308, 17633, 198, 6738, 764, 26495, 1330, 1635, 198 ]
3.714286
14
from flask import render_template,redirect,url_for, flash,request, session from .forms import RegistrationForm, LoginForm from flask_login import login_user, logout_user, login_required from ..models import User from .. import db from app import login_manager from . import auth # login route @auth.route('/login',...
[ 198, 6738, 42903, 1330, 8543, 62, 28243, 11, 445, 1060, 11, 6371, 62, 1640, 11, 7644, 11, 25927, 11, 6246, 198, 6738, 764, 23914, 1330, 24610, 8479, 11, 23093, 8479, 198, 6738, 42903, 62, 38235, 1330, 17594, 62, 7220, 11, 2604, 448, ...
3.113139
274
import pandas as pd import numpy as np from rdkit import Chem from scipy import stats import pubchempy as pcp df = pd.read_excel("../2_bbb_all_complete_CID_out_smiles_fixed_updated.xlsx") df = df[~df["logBB"].isna()] df["logBB"] = df["logBB"].astype(float) # remove molecules with logBB <= -9 df = df[df["logBB"] > -9...
[ 11748, 19798, 292, 355, 279, 67, 198, 11748, 299, 32152, 355, 45941, 198, 6738, 374, 67, 15813, 1330, 12870, 198, 6738, 629, 541, 88, 1330, 9756, 198, 11748, 2240, 2395, 3149, 88, 355, 279, 13155, 198, 198, 7568, 796, 279, 67, 13, 9...
2.02887
6,789
from flask import Flask, redirect, render_template, request, session, flash, jsonify,url_for, Response from flask_session import Session from tempfile import mkdtemp from db.postgresql import Db from werkzeug.security import check_password_hash, generate_password_hash from werkzeug.utils import secure_filename fr...
[ 6738, 42903, 1330, 46947, 11, 18941, 11, 8543, 62, 28243, 11, 2581, 11, 6246, 11, 7644, 11, 33918, 1958, 11, 6371, 62, 1640, 11, 18261, 201, 198, 6738, 42903, 62, 29891, 1330, 23575, 201, 198, 6738, 20218, 7753, 1330, 33480, 67, 29510...
2.653296
19,870
first = int(input()) second = int(input()) mod = str(divmod(first,second)) print(str(first//second)) print(str(first%second)) print(mod)
[ 11085, 796, 493, 7, 15414, 28955, 198, 12227, 796, 493, 7, 15414, 28955, 198, 198, 4666, 796, 965, 7, 7146, 4666, 7, 11085, 11, 12227, 4008, 198, 4798, 7, 2536, 7, 11085, 1003, 12227, 4008, 198, 4798, 7, 2536, 7, 11085, 4, 12227, ...
2.795918
49
"""Mk one feature matrix for sample and chrom. Use for all samples (not training). """ ###Adjusting const import was import sfConst, but trying just include: const.py include: "const.py" import argparse, csv, sys, os, pandas from functools import reduce PWD = os.getcwd().split('code')[0] sys.path.append(PWD + 'code/...
[ 37811, 44, 74, 530, 3895, 17593, 329, 6291, 290, 15358, 13, 198, 220, 220, 5765, 329, 477, 8405, 357, 1662, 3047, 737, 198, 37811, 198, 21017, 39668, 278, 1500, 1330, 373, 1330, 264, 69, 34184, 11, 475, 2111, 655, 2291, 25, 1500, 13...
2.70412
267
from django.http import JsonResponse class DTAException(Exception): """ Base exception which could represent itself as a JSON response"""
[ 6738, 42625, 14208, 13, 4023, 1330, 449, 1559, 31077, 628, 198, 4871, 360, 5603, 16922, 7, 16922, 2599, 198, 220, 220, 220, 37227, 7308, 6631, 543, 714, 2380, 2346, 355, 257, 19449, 2882, 37811, 628, 198 ]
4.055556
36
from flask_babelex import lazy_gettext from flask_wtf import FlaskForm from wtforms import SelectField, SubmitField from wtforms.validators import DataRequired from project.forms.common import event_rating_choices
[ 6738, 42903, 62, 65, 11231, 2588, 1330, 16931, 62, 1136, 5239, 198, 6738, 42903, 62, 86, 27110, 1330, 46947, 8479, 198, 6738, 266, 83, 23914, 1330, 9683, 15878, 11, 39900, 15878, 198, 6738, 266, 83, 23914, 13, 12102, 2024, 1330, 6060, ...
3.694915
59
# -*- coding: utf-8 -*- """ @author: alexyang @contact: alex.yang0326@gmail.com @file: inference.py @time: 2018/4/22 14:32 @desc: """ import os import random from argparse import ArgumentParser import numpy as np import pickle import pandas as pd from models import EntDect, RelNet, SubTransE, SubTypeVec os.env...
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 198, 37811, 198, 198, 31, 9800, 25, 257, 2588, 17859, 198, 198, 31, 32057, 25, 257, 2588, 13, 17859, 3070, 2075, 31, 14816, 13, 785, 198, 198, 31, 7753, 25, 32278, 1...
2.300175
2,292
import logging from typing import List from homeassistant.helpers.entity import Entity from gehomesdk.erd import ErdCode, ErdApplianceType from .base import ApplianceApi from ..entities import GeSacClimate, GeSacTemperatureSensor, GeErdSensor, GeErdSwitch, ErdOnOffBoolConverter _LOGGER = logging.getLogger(__name__) ...
[ 11748, 18931, 198, 6738, 19720, 1330, 7343, 198, 198, 6738, 1363, 562, 10167, 13, 16794, 364, 13, 26858, 1330, 20885, 198, 6738, 4903, 71, 2586, 34388, 13, 45744, 1330, 16455, 10669, 11, 16455, 4677, 75, 3610, 6030, 198, 198, 6738, 764,...
2.911392
158
#!/usr/bin/env python3 # -*- coding: utf-8 -*- """ Created on Wed Jul 3 12:07:10 2019 Generates plots. DOES NOT WORK! review input files! @author: modal """ import pandas as pd import numpy as np import pickle # Disable warnings in Anaconda import warnings warnings.filterwarnings('ignore') # Matplotlib forms basis...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 18, 198, 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 37811, 198, 41972, 319, 3300, 5979, 220, 513, 1105, 25, 2998, 25, 940, 13130, 198, 8645, 689, 21528, 13, 198, 182...
2.185126
15,006
from pathlib import Path import os if __name__ == '__main__': import py_wake docs_path = Path(py_wake.__file__).parents[1] / 'docs' if os.path.isdir(docs_path / 'api'): print("Switch to PDF mode") for ext in ['*.rst', 'notebooks/*.ipynb']: for f in docs_path.glob(ext): ...
[ 6738, 3108, 8019, 1330, 10644, 198, 11748, 28686, 628, 198, 198, 361, 11593, 3672, 834, 6624, 705, 834, 12417, 834, 10354, 198, 220, 220, 220, 1330, 12972, 62, 48530, 198, 220, 220, 220, 34165, 62, 6978, 796, 10644, 7, 9078, 62, 48530...
2
319
def depth(n): """ depth computes the depth of node n. """ d = 0 while n is not None: n = n.parent d += 1 return d def lca(a, b): """ Computes the least common ancestor of a and b. """ da = depth(a) db = depth(b) # ensure a is the closest to the root ...
[ 198, 198, 4299, 6795, 7, 77, 2599, 198, 220, 220, 220, 37227, 198, 220, 220, 220, 6795, 552, 1769, 262, 6795, 286, 10139, 299, 13, 198, 220, 220, 220, 37227, 198, 220, 220, 220, 288, 796, 657, 198, 220, 220, 220, 981, 299, 318, ...
2.085526
304
# coding=utf-8 """ test.test_stream ~~~~~~~~~~~~~~~~ Test stream.stream module. :copyright: (c) 2016 by Ali Ghaffaari. :license: MIT, see LICENSE for more details. """ import os import gzip import filecmp from .context import stream from . import vg_pb2 def read_alns1(fpath, **kwargs): ""...
[ 2, 19617, 28, 40477, 12, 23, 198, 198, 37811, 198, 220, 220, 220, 1332, 13, 9288, 62, 5532, 198, 220, 220, 220, 220, 27156, 628, 220, 220, 220, 6208, 4269, 13, 5532, 8265, 13, 628, 220, 220, 220, 1058, 22163, 4766, 25, 357, 66, ...
2.470403
2,534
import numpy as np from ir_sim.world import motion_omni
[ 11748, 299, 32152, 355, 45941, 198, 6738, 4173, 62, 14323, 13, 6894, 1330, 6268, 62, 296, 8461, 628, 198, 220, 220, 220, 220, 628, 220, 220, 220, 220 ]
2.428571
28
# -*- coding: utf-8 -*- from pywinauto import application import time app = application.Application() app.start("Notepad.exe") time.sleep(2) app.Notepad.edit.type_keys("Este é um teste", with_spaces = True) time.sleep(2) app.Notepad.menu_select("Arquivo ->Salvar") app.Salvar.edit.set_edit_text("pywinauto.txt")...
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 201, 198, 6738, 12972, 86, 1437, 9390, 1330, 3586, 201, 198, 11748, 640, 201, 198, 1324, 796, 3586, 13, 23416, 3419, 201, 198, 1324, 13, 9688, 7203, 3673, 47852, 13, 13499, ...
2.473054
167
#!/usr/bin/env python2 import json import logging import logging.handlers import random import pytest from openvisualizer.motehandler.moteprobe import openhdlc # ============================ logging ========================================= from openvisualizer.utils import format_string_buf LOGFILE_NAME = 'test_hd...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 17, 198, 198, 11748, 33918, 198, 11748, 18931, 198, 11748, 18931, 13, 4993, 8116, 198, 11748, 4738, 198, 198, 11748, 12972, 9288, 198, 198, 6738, 1280, 41464, 7509, 13, 76, 1258, 30281, 13, ...
2.8998
499
# Generated by Django 2.1.2 on 2018-11-04 18:49 from django.db import migrations, models
[ 2, 2980, 515, 416, 37770, 362, 13, 16, 13, 17, 319, 2864, 12, 1157, 12, 3023, 1248, 25, 2920, 198, 198, 6738, 42625, 14208, 13, 9945, 1330, 15720, 602, 11, 4981, 628 ]
2.84375
32
# Copyright 2020-2021 Huawei Technologies Co., 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.0 # # Unless required by applicable law or agre...
[ 2, 15069, 12131, 12, 1238, 2481, 43208, 21852, 1766, 1539, 12052, 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...
2.49066
803
import torch import torch.nn as nn import torch.nn.functional as F import dgl from dgl.nn.pytorch.glob import SumPooling, AvgPooling, MaxPooling """ GIN: Graph Isomorphism Networks HOW POWERFUL ARE GRAPH NEURAL NETWORKS? (Keyulu Xu, Weihua Hu, Jure Leskovec and Stefanie Jegelka, ICLR 2019) https://arxiv.o...
[ 11748, 28034, 198, 11748, 28034, 13, 20471, 355, 299, 77, 198, 11748, 28034, 13, 20471, 13, 45124, 355, 376, 198, 198, 11748, 288, 4743, 198, 6738, 288, 4743, 13, 20471, 13, 9078, 13165, 354, 13, 4743, 672, 1330, 5060, 27201, 278, 11,...
2.647059
153
# # Copyright 2018 Fiberhome # # 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,...
[ 2, 198, 2, 15069, 2864, 29933, 11195, 198, 2, 198, 2, 49962, 739, 262, 24843, 13789, 11, 10628, 362, 13, 15, 357, 1169, 366, 34156, 15341, 345, 743, 198, 2, 407, 779, 428, 2393, 2845, 287, 11846, 351, 262, 13789, 13, 921, 743, 733...
3.716763
173
words = input().split(", ") words_lengths = {word: len(word) for word in words} print_result(words_lengths)
[ 198, 10879, 796, 5128, 22446, 35312, 7, 1600, 366, 8, 198, 198, 10879, 62, 13664, 82, 796, 1391, 4775, 25, 18896, 7, 4775, 8, 329, 1573, 287, 2456, 92, 198, 4798, 62, 20274, 7, 10879, 62, 13664, 82, 8 ]
2.794872
39
# -*- coding: utf-8 -*- import numpy as np import json import algo.arranging.base as arr import algo.arranging.metrics as metrics model = research.model if model.layers_count != 2: raise ValueError("Ths research is only for 2-level hierarchical models!") for metric in metrics.metrics_list: research.report(...
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 11748, 299, 32152, 355, 45941, 198, 11748, 33918, 198, 11748, 435, 2188, 13, 3258, 4924, 13, 8692, 355, 5240, 198, 11748, 435, 2188, 13, 3258, 4924, 13, 4164, 10466, 355...
2.165422
937
#!/usr/bin/env python # -*- coding:utf-8 -*- from typing import Tuple import numpy as np import torch import torch.nn as nn from .base import BackProp class VanillaBackprop(BackProp): """ Produces gradients generated with vanilla back propagation from the image https://github.com/utkuozbulak/p...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 2, 532, 9, 12, 19617, 25, 40477, 12, 23, 532, 9, 12, 628, 198, 6738, 19720, 1330, 309, 29291, 198, 198, 11748, 299, 32152, 355, 45941, 198, 11748, 28034, 198, 11748, 28034, 13, 20471...
2.805755
139
''' Tests the data merge functions and package. .. moduleauthor:: Chris Fournier <chris.m.fournier@gmail.com> ''' from __future__ import absolute_import import unittest import os from segeval.data.tsv import (input_linear_mass_tsv, input_linear_positions_tsv) from segeval.data.samples import HEARST_1997_STARGAZER cl...
[ 7061, 6, 198, 51, 3558, 262, 1366, 20121, 5499, 290, 5301, 13, 198, 198, 492, 8265, 9800, 3712, 5180, 376, 1798, 959, 1279, 354, 2442, 13, 76, 13, 69, 1798, 959, 31, 14816, 13, 785, 29, 198, 7061, 6, 198, 6738, 11593, 37443, 834, ...
2.166667
534
import numpy as np from numba import jit from ..constants import Constants as c from .lagrange import calcLagrangeCoeffs from .lagrange import applyLagrangeCoeffs __all__ = [ "propagateUniversal", ] MU = c.MU @jit(["f8[:,:](f8[:,:], f8[:], f8[:], f8, i8, f8)"], nopython=True, cache=True) def propagateUniversal(...
[ 11748, 299, 32152, 355, 45941, 198, 6738, 997, 7012, 1330, 474, 270, 198, 198, 6738, 11485, 9979, 1187, 1330, 4757, 1187, 355, 269, 198, 6738, 764, 30909, 9521, 1330, 42302, 43, 363, 9521, 34, 2577, 487, 82, 198, 6738, 764, 30909, 952...
2.310811
1,036
import pandas as pd from bokeh.palettes import Reds REGIONAL_LINKS = [{"name": "Россия", "link": "/"}, {"name": "Москва", "link": "/moscow"}] # Categories CATEGORIES = ["total", "died", "recovered", "swabs"] CATEGORIES_STYLES = { "total": {"color_class": "red-font", "text": "выявлено", "icon_cla...
[ 11748, 19798, 292, 355, 279, 67, 198, 6738, 1489, 365, 71, 13, 18596, 23014, 1330, 14703, 198, 198, 31553, 2849, 1847, 62, 43, 17248, 50, 796, 685, 4895, 3672, 1298, 366, 140, 254, 15166, 21727, 21727, 18849, 40623, 1600, 366, 8726, 1...
1.47581
7,131
#!/usr/bin/python3 # -*- coding: utf-8 -*- import os from mr_database import MrDatabase from mr_database import LogLevel """ import of table classes """ from samples.table_schema_examples import Image db = MrDatabase(os.path.join(os.path.abspath(os.path.join(__file__, os.pardir)), 'test_functionality.db')) if __n...
[ 2, 48443, 14629, 14, 8800, 14, 29412, 18, 198, 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 198, 11748, 28686, 198, 198, 6738, 285, 81, 62, 48806, 1330, 1770, 38105, 198, 6738, 285, 81, 62, 48806, 1330, 5972, 497...
2.390438
502
from rest_framework.serializers import ModelSerializer from rest_framework import serializers from . import models
[ 6738, 1334, 62, 30604, 13, 46911, 11341, 1330, 9104, 32634, 7509, 198, 6738, 1334, 62, 30604, 1330, 11389, 11341, 198, 198, 6738, 764, 1330, 4981, 628, 628 ]
4.407407
27
''' Configy confguration container ''' # pylint: disable=W0212,R0903 import os import re from copy import deepcopy import yaml class ConfigyError(Exception): ''' Configy exception handler ''' pass env_pattern = re.compile(r".*?\${(.*?)}.*?") yaml.add_implicit_resolver("!pathex", env_pattern) yaml.ad...
[ 7061, 6, 198, 16934, 88, 1013, 70, 3924, 9290, 198, 7061, 6, 198, 2, 279, 2645, 600, 25, 15560, 28, 54, 2999, 1065, 11, 49, 2931, 3070, 198, 11748, 28686, 198, 11748, 302, 198, 6738, 4866, 1330, 2769, 30073, 198, 11748, 331, 43695, ...
2.264275
1,979
import base64 from filelock import FileLock from kaggle_environments import make import numpy as np import os from pathlib import Path import pickle import time import torch import torch.nn.functional as F from torch.cuda import amp from torch.utils.data import DataLoader from torch.utils.tensorboard import SummaryWrit...
[ 11748, 2779, 2414, 198, 6738, 2393, 5354, 1330, 9220, 25392, 198, 6738, 479, 9460, 293, 62, 268, 12103, 1330, 787, 198, 11748, 299, 32152, 355, 45941, 198, 11748, 28686, 198, 6738, 3108, 8019, 1330, 10644, 198, 11748, 2298, 293, 198, 11...
3.621795
156
from rest_framework import serializers from rest_framework.renderers import JSONRenderer, TemplateHTMLRenderer from rest_framework.response import Response from rest_framework.views import APIView from ngallery.images.models import Image
[ 6738, 1334, 62, 30604, 1330, 11389, 11341, 198, 6738, 1334, 62, 30604, 13, 10920, 19288, 1330, 19449, 49, 437, 11882, 11, 37350, 28656, 49, 437, 11882, 198, 6738, 1334, 62, 30604, 13, 26209, 1330, 18261, 198, 6738, 1334, 62, 30604, 13, ...
4.084746
59
__author__ = 'NovikovII' #!/usr/bin/env python3 # -*- coding: utf-8 -*- import json alist = [{'a':[1,2,3], 'b':(1,2,3), 'c':{'a':'List','b':'Data'}, 'd':3.14}] print(alist) json_list = json.dumps(alist) print(json_list) json_list = json.dumps(alist, separators=(',',':')) print(json_list) json_list = json.dumps(ali...
[ 834, 9800, 834, 796, 705, 20795, 1134, 709, 3978, 6, 198, 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 18, 198, 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 198, 11748, 33918, 198, 198, 49845, 796, 685, 90, 6, ...
2.236052
233
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import migrations
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 6738, 11593, 37443, 834, 1330, 28000, 1098, 62, 17201, 874, 198, 198, 6738, 42625, 14208, 13, 9945, 1330, 15720, 602, 628, 628 ]
2.805556
36
#! /usr/bin/env python3 """ * Copyright (c) 2019, Intel Corporation * * 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, co...
[ 2, 0, 1220, 14629, 14, 8800, 14, 24330, 21015, 18, 198, 37811, 198, 9, 15069, 357, 66, 8, 13130, 11, 8180, 10501, 198, 9, 198, 9, 2448, 3411, 318, 29376, 7520, 11, 1479, 286, 3877, 11, 284, 597, 1048, 16727, 257, 198, 9, 4866, 2...
3.581081
370
import collections import json import logging import gevent.queue import requests from metagrok import utils from metagrok.showdown import actor from metagrok.showdown.room import BattleRoom from metagrok.showdown.battle_queue import BattleQueue from metagrok.showdown.connection import ShowdownConnection class Clien...
[ 11748, 17268, 198, 11748, 33918, 198, 11748, 18931, 198, 198, 11748, 4903, 1151, 13, 36560, 198, 11748, 7007, 198, 198, 6738, 1138, 363, 305, 74, 1330, 3384, 4487, 198, 6738, 1138, 363, 305, 74, 13, 12860, 2902, 1330, 8674, 198, 6738, ...
2.719852
539
from pathlib import Path from autograde.cli.util import namespace_args, find_archives, traverse_archives from autograde.util import logger @namespace_args def cmd_patch(patch: str, result: str, **_) -> int: """Patch result archive(s) with results from a different run""" patch = Path(patch) result = Path(...
[ 6738, 3108, 8019, 1330, 10644, 198, 198, 6738, 1960, 519, 27585, 13, 44506, 13, 22602, 1330, 25745, 62, 22046, 11, 1064, 62, 48814, 11, 38138, 62, 48814, 198, 6738, 1960, 519, 27585, 13, 22602, 1330, 49706, 628, 198, 31, 14933, 10223, ...
2.859375
256
#!/usr/bin/env python3 # -*- coding:utf-8 -*- _author_ = 'lilu' print('hello')
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 18, 198, 2, 532, 9, 12, 19617, 25, 40477, 12, 23, 532, 9, 12, 198, 198, 62, 9800, 62, 796, 705, 75, 346, 84, 6, 198, 198, 4798, 10786, 31373, 11537, 198 ]
2.025
40
import random import math from sklearn.datasets import make_blobs from src.data.utils.places_utils import get_random_image from src.data.utils.lowpoly_utils import get_random_lowpoly_vehicle MIN_LIGHTS = 5 MAX_LIGHTS = 8 LIGHT_ENERGY_MIN = 0.4 LIGHT_ENERGY_MAX = 1 LIGHT_POSITION_VAR = 3 LIGHT_CAST_SHADOWS = True LIGH...
[ 11748, 4738, 198, 11748, 10688, 198, 6738, 1341, 35720, 13, 19608, 292, 1039, 1330, 787, 62, 2436, 8158, 198, 198, 6738, 12351, 13, 7890, 13, 26791, 13, 23625, 62, 26791, 1330, 651, 62, 25120, 62, 9060, 198, 6738, 12351, 13, 7890, 13,...
2.563644
2,459
from django.contrib.auth.models import User from core.views.config_user import ConfigUser user1 = { 'email': 'test@clarus-films.com', 'password': 'demo', 'first_name': "Clarus", 'last_name': "Films GmbH", } email = user1['email'] password = user1['password'] first_name = user1['first_name'] last_nam...
[ 6738, 42625, 14208, 13, 3642, 822, 13, 18439, 13, 27530, 1330, 11787, 198, 198, 6738, 4755, 13, 33571, 13, 11250, 62, 7220, 1330, 17056, 12982, 198, 198, 7220, 16, 796, 1391, 198, 220, 220, 220, 705, 12888, 10354, 705, 9288, 31, 565, ...
2.798969
388
#!/usr/bin/env python # -*- coding: utf-8 -*- __author__ = "Chris Griffith" from pathlib import Path import pkg_resources name = "HEVC (NVENC)" requires = "cuda-llvm" video_extension = "mkv" video_dimension_divisor = 1 icon = str(Path(pkg_resources.resource_filename(__name__, f"../../data/encoders/icon_nvenc.png"))....
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 834, 9800, 834, 796, 366, 15645, 30469, 1, 198, 6738, 3108, 8019, 1330, 10644, 198, 198, 11748, 279, 10025, 62, 37540, ...
2.745098
204
import socket,uuid # 获取主机名 hostname = socket.gethostname() #获取IP ip = socket.gethostbyname(hostname) # 获取Mac地址 print(hostname, ip, get_mac_address())
[ 11748, 17802, 11, 12303, 312, 198, 2, 5525, 236, 115, 20998, 244, 10310, 119, 17312, 118, 28938, 235, 198, 4774, 3672, 796, 17802, 13, 1136, 4774, 3672, 3419, 198, 2, 164, 236, 115, 20998, 244, 4061, 198, 541, 796, 17802, 13, 1136, ...
1.948052
77
# Copyright 2020 The FedLearner 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, 10169, 14961, 1008, 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...
2.83844
718
#!/usr/bin/python #Aplicacao de administracao de classes de servicos - Versao 7.0 #Manipula uma lista de objetos Classe import os from classe import Classe import pickle path_home = os.getenv("HOME") #Captura o caminho da pasta HOME path_home = '/home/bruno' filename=path_home+'/ryu/Bruno/classes.conf' #Nome do arqu...
[ 2, 48443, 14629, 14, 8800, 14, 29412, 198, 2, 32, 489, 291, 330, 5488, 390, 6863, 330, 5488, 390, 6097, 390, 37756, 418, 532, 18535, 5488, 767, 13, 15, 198, 2, 5124, 541, 4712, 334, 2611, 1351, 64, 390, 26181, 316, 418, 1012, 2161...
2.236623
841
# -*- coding: utf-8 -*- import argparse from abc import abstractmethod from argparse import ArgumentTypeError from pre_commit_hooks.loaderon_hooks.util.check_failed_exception import CheckFailedException
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 11748, 1822, 29572, 198, 6738, 450, 66, 1330, 12531, 24396, 198, 6738, 1822, 29572, 1330, 45751, 6030, 12331, 198, 198, 6738, 662, 62, 41509, 62, 25480, 82, 13, 29356, 2...
3.306452
62
#!/usr/bin/env python # encoding: utf-8 from models.base.config import BaseConfig
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 2, 21004, 25, 3384, 69, 12, 23, 198, 6738, 4981, 13, 8692, 13, 11250, 1330, 7308, 16934, 198 ]
3.037037
27
# -*- coding: utf-8 -*- # # SPDX-FileCopyrightText: © 2013 The freestyle-hid Authors # SPDX-License-Identifier: 0BSD # Ensure it's present. import setuptools_scm # noqa: F401 from setuptools import setup setup()
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 2, 198, 2, 30628, 55, 12, 8979, 15269, 8206, 25, 10673, 2211, 383, 2030, 10992, 12, 49675, 46665, 198, 2, 30628, 55, 12, 34156, 12, 33234, 7483, 25, 657, 21800, 198, ...
2.721519
79
print(__doc__) from collections import OrderedDict from functools import partial from time import time import matplotlib.pyplot as plt from mpl_toolkits.mplot3d import Axes3D from matplotlib.ticker import NullFormatter from sklearn import manifold, datasets # Next line to silence pyflakes. This import is needed. Axe...
[ 4798, 7, 834, 15390, 834, 8, 198, 198, 6738, 17268, 1330, 14230, 1068, 35, 713, 198, 6738, 1257, 310, 10141, 1330, 13027, 198, 6738, 640, 1330, 640, 198, 198, 11748, 2603, 29487, 8019, 13, 9078, 29487, 355, 458, 83, 198, 6738, 285, ...
2.613014
292
""" Takes a gff file and for genes with multiple mRNAs, only keeps the longest (largest sum of exon lengths). Prints out a new gff. If a proteins fasta is also provided, removes genes shorter than a given cutoff """ from __future__ import print_function import gffutils import sys from os import remove from time import...
[ 37811, 198, 51, 1124, 257, 308, 487, 2393, 290, 329, 10812, 351, 198, 48101, 285, 42336, 1722, 11, 691, 7622, 262, 14069, 198, 7, 28209, 2160, 286, 409, 261, 20428, 737, 12578, 82, 198, 448, 257, 649, 308, 487, 13, 198, 1532, 257, ...
2.414716
897
import os import numpy as np import pytest from multiml import logger from multiml.saver import Saver from multiml.task.keras.modules import MLPBlock if __name__ == '__main__': test_keras_util()
[ 11748, 28686, 198, 198, 11748, 299, 32152, 355, 45941, 198, 11748, 12972, 9288, 198, 198, 6738, 43104, 75, 1330, 49706, 198, 6738, 43104, 75, 13, 82, 8770, 1330, 311, 8770, 198, 6738, 43104, 75, 13, 35943, 13, 6122, 292, 13, 18170, 13...
2.914286
70
"""Handle config files""" import yaml from pysyte.types.dictionaries import NameSpaces
[ 37811, 37508, 4566, 3696, 37811, 198, 198, 11748, 331, 43695, 198, 198, 6738, 279, 893, 88, 660, 13, 19199, 13, 67, 2867, 3166, 1330, 6530, 4561, 2114, 628, 628 ]
3.172414
29
# Generated by Django 2.2.12 on 2020-07-20 09:22 from django.db import migrations, models
[ 2, 2980, 515, 416, 37770, 362, 13, 17, 13, 1065, 319, 12131, 12, 2998, 12, 1238, 7769, 25, 1828, 198, 198, 6738, 42625, 14208, 13, 9945, 1330, 15720, 602, 11, 4981, 628 ]
2.875
32
import os import argparse import math import time import numpy as np from tqdm import trange from tqdm import tqdm from modules.dataset import KittiDataset, euler_from_quaternion from modules.load_dataset import * from modules.box import box_encoding, box_decoding from modules.model_gcn import * from mod...
[ 11748, 28686, 201, 198, 11748, 1822, 29572, 201, 198, 11748, 10688, 201, 198, 11748, 640, 201, 198, 201, 198, 11748, 299, 32152, 355, 45941, 201, 198, 6738, 256, 80, 36020, 1330, 491, 858, 201, 198, 6738, 256, 80, 36020, 1330, 256, 80...
2.165778
2,063
nome = input('Qual é o seu nome? ') print(f'Prazer em te conhecer {nome:=^20}!')
[ 77, 462, 796, 5128, 10786, 46181, 38251, 267, 384, 84, 299, 462, 30, 705, 8, 198, 4798, 7, 69, 6, 47, 3247, 263, 795, 573, 369, 258, 2189, 1391, 77, 462, 25, 28, 61, 1238, 92, 0, 11537 ]
2.105263
38
import numpy as np from sklearn.ensemble import RandomForestRegressor from sklearn.linear_model import LogisticRegression from sklearn.metrics import f1_score, accuracy_score from sklearn.model_selection import train_test_split class ClassificationComparator: ''' Performs simple test to check and compare seve...
[ 11748, 299, 32152, 355, 45941, 198, 6738, 1341, 35720, 13, 1072, 11306, 1330, 14534, 34605, 8081, 44292, 198, 6738, 1341, 35720, 13, 29127, 62, 19849, 1330, 5972, 2569, 8081, 2234, 198, 6738, 1341, 35720, 13, 4164, 10466, 1330, 277, 16, ...
3.626263
99
import setuptools with open("README.md", "r") as fh: long_description = fh.read() setuptools.setup( name="pysixdesk", version="0.0.1", author='Xiaohan Lu,A. Mereghetti', author_email='luxh@ihep.ac.cn,Alessio.Mereghetti@cern.ch', description="A python interface to manage and control the workflo...
[ 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.588015
267
#!/usr/bin/env python #Communicate with end devices via LoRa. #Communicate with server via MQTT(hbmqtt) and HTTP POST. #Save data in the sqlite database. #Parse JSON from MQTT and LoRa protocol. #Communication module: LoRa. #Communication method with device via LoRa. #Uart port drive LoRa module. #Parse JSON between d...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 2, 30813, 5344, 351, 886, 4410, 2884, 6706, 21762, 13, 198, 2, 30813, 5344, 351, 4382, 2884, 337, 48, 15751, 7, 71, 20475, 80, 926, 8, 290, 14626, 24582, 13, 198, 2, 16928, 1366, 2...
2.474453
411
import argparse, os, json import numpy as np import matplotlib.pyplot as plt import cv2 parser = argparse.ArgumentParser() parser.add_argument('log', help='log file dumped by pyxivo to process') parser.add_argument('out_dir', help='output directory to save undistorted images') parser.add_argument('-debug', action='st...
[ 11748, 1822, 29572, 11, 28686, 11, 33918, 198, 11748, 299, 32152, 355, 45941, 198, 11748, 2603, 29487, 8019, 13, 9078, 29487, 355, 458, 83, 198, 11748, 269, 85, 17, 628, 198, 48610, 796, 1822, 29572, 13, 28100, 1713, 46677, 3419, 198, ...
2.203046
591
import asyncio from dataclasses import dataclass, field from typing import Generic, Callable, Union from .const import _T, logger, _ThingT, Logger import typing from asyncio_primitives import CustomCondition, utils as async_utils from .utils.proxy import LambdaProxy logger = logger.getChild('states') @dataclass(eq=...
[ 11748, 30351, 952, 198, 6738, 4818, 330, 28958, 1330, 4818, 330, 31172, 11, 2214, 198, 6738, 19720, 1330, 42044, 11, 4889, 540, 11, 4479, 198, 198, 6738, 764, 9979, 1330, 4808, 51, 11, 49706, 11, 4808, 51, 722, 51, 11, 5972, 1362, 1...
2.392336
1,096
#!/usr/bin/env python3 """Used to convert Python strings of JSON into human-readable JSON Useful when building AWS Lambda functions""" from ast import literal_eval from .common import main def py_to_js(obj_str): """Evaluate string and return readable result""" return rprint(literal_eval(obj_str)) def rprint...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 18, 198, 198, 37811, 38052, 284, 10385, 11361, 13042, 286, 19449, 656, 1692, 12, 46155, 19449, 198, 11041, 913, 618, 2615, 30865, 21114, 6814, 5499, 37811, 198, 198, 6738, 6468, 1330, 18875, ...
2.215543
682
# # This file is part of Zhockon Platform project. # # Copyright (C) 2009-2011 William Oliveira de Lagos <william.lagos1@gmail.com> # # Zhockon is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3...
[ 2, 198, 2, 770, 2393, 318, 636, 286, 10511, 735, 261, 19193, 1628, 13, 198, 2, 220, 198, 2, 15069, 357, 34, 8, 3717, 12, 9804, 3977, 30012, 8704, 390, 21003, 418, 1279, 10594, 1789, 13, 30909, 418, 16, 31, 14816, 13, 785, 29, 19...
3.426434
401
import matplotlib.pyplot as plt import numpy as np import pandas as pd columns_names=["name","num_file","xDim","yDim","m2","num_mics","num_comb","freq","NMSE","SSIM","pattern","p_real","p_predicted","p_previous"]
[ 11748, 2603, 29487, 8019, 13, 9078, 29487, 355, 458, 83, 198, 11748, 299, 32152, 355, 45941, 198, 11748, 19798, 292, 355, 279, 67, 198, 198, 28665, 82, 62, 14933, 28, 14692, 3672, 2430, 22510, 62, 7753, 2430, 87, 29271, 2430, 88, 2927...
2.654321
81
from tonclient.decorators import result_as from tonclient.module import TonModule from tonclient.types import ParamsOfStart, RegisteredDebot, ParamsOfFetch, \ ParamsOfExecute, ParamsOfSend, ResponseHandler, ParamsOfInit, \ ResultOfFetch, ParamsOfRemove class TonDebot(TonModule): """ Free TON debot SDK API...
[ 6738, 5680, 16366, 13, 12501, 273, 2024, 1330, 1255, 62, 292, 198, 6738, 5680, 16366, 13, 21412, 1330, 16859, 26796, 198, 6738, 5680, 16366, 13, 19199, 1330, 2547, 4105, 5189, 10434, 11, 27049, 16587, 313, 11, 2547, 4105, 5189, 37, 7569...
2.629482
1,255
from django.db.models.fields.related import ForeignKey try: from south.modelsinspector import add_introspection_rules has_south = True except ImportError: has_south = False from smart_selects import form_fields class ChainedForeignKey(ForeignKey): """ chains the choices of a previous combo box ...
[ 6738, 42625, 14208, 13, 9945, 13, 27530, 13, 25747, 13, 5363, 1330, 8708, 9218, 198, 198, 28311, 25, 198, 220, 220, 220, 422, 5366, 13, 27530, 1040, 806, 273, 1330, 751, 62, 600, 305, 31308, 62, 38785, 198, 220, 220, 220, 468, 62, ...
2.516026
312
# Generated by Django 3.0.7 on 2020-06-13 22:22 from django.db import migrations
[ 2, 2980, 515, 416, 37770, 513, 13, 15, 13, 22, 319, 12131, 12, 3312, 12, 1485, 2534, 25, 1828, 198, 198, 6738, 42625, 14208, 13, 9945, 1330, 15720, 602, 628 ]
2.766667
30
#!/usr/bin/env python # coding: utf-8 from urllib.parse import urlparse from pocsuite3.api import requests as req from pocsuite3.api import register_poc from pocsuite3.api import Output, POCBase from pocsuite3.api import POC_CATEGORY, VUL_TYPE import json register_poc(TestPOC)
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 2, 19617, 25, 3384, 69, 12, 23, 198, 6738, 2956, 297, 571, 13, 29572, 1330, 19016, 29572, 198, 6738, 279, 420, 2385, 578, 18, 13, 15042, 1330, 7007, 355, 43089, 198, 6738, 279, 420, ...
2.666667
105
from __future__ import unicode_literals from django.template.defaultfilters import slugify from django.db import models from django.core.validators import validate_comma_separated_integer_list from django.db import models from servicecatalog.models import STATE, LIVE, ACCESS_DIRECTION, BOTH, PaymentMethod, Module, Co...
[ 6738, 11593, 37443, 834, 1330, 28000, 1098, 62, 17201, 874, 198, 6738, 42625, 14208, 13, 28243, 13, 12286, 10379, 1010, 1330, 31065, 1958, 198, 6738, 42625, 14208, 13, 9945, 1330, 4981, 198, 6738, 42625, 14208, 13, 7295, 13, 12102, 2024, ...
2.871429
210
""" This script prepares SDF files which can then be used for machine learning. This includes sanitizing, filtering molecules with bad functional groups and unwanted elements, removing salts, filtering by Lipinski's rule of five and unify different tautomers. OpenEye QUACPAC and ChemAxon Marvin are required. """ from ...
[ 37811, 198, 1212, 4226, 25978, 311, 8068, 3696, 543, 460, 788, 307, 973, 329, 4572, 4673, 13, 198, 1212, 3407, 5336, 270, 2890, 11, 25431, 17745, 351, 2089, 10345, 2628, 290, 198, 403, 86, 4126, 4847, 11, 10829, 37056, 11, 25431, 416,...
2.349043
5,644
from .base_options import BaseOptions
[ 6738, 764, 8692, 62, 25811, 1330, 7308, 29046, 198 ]
4.222222
9
#ipython --pylab import scipy from mpl_toolkits.basemap import Basemap, addcyclic, shiftgrid from netCDF4 import Dataset import numpy as np import matplotlib.pyplot as plt import matplotlib.mlab as mlab import pandas import pylab Folder = 'results' species1 = ['Thunnus_obesus', 'Thunnus_albacares', 'Katsuwonus_pelamis...
[ 2, 541, 7535, 1377, 79, 2645, 397, 198, 11748, 629, 541, 88, 198, 6738, 285, 489, 62, 25981, 74, 896, 13, 12093, 368, 499, 1330, 6455, 368, 499, 11, 751, 15539, 291, 11, 6482, 25928, 198, 6738, 2010, 34, 8068, 19, 1330, 16092, 292...
2.228462
1,300
import unittest import time import app.programs.hd import app.programs.original from app.state import state, ProgramNotFound
[ 11748, 555, 715, 395, 198, 11748, 640, 198, 198, 11748, 598, 13, 23065, 82, 13, 31298, 198, 11748, 598, 13, 23065, 82, 13, 14986, 198, 6738, 598, 13, 5219, 1330, 1181, 11, 6118, 3673, 21077, 628 ]
3.527778
36
# -*- coding: utf-8 -*- # Generated by Django 1.11.2 on 2017-06-16 09:49 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, 17, 319, 2177, 12, 3312, 12, 1433, 7769, 25, 2920, 198, 6738, 11593, 37443, 834, 1330, 28000, 1098, 62, 17201, 874, 198, ...
2.736842
57
#!/usr/bin/env python # -*- coding: UTF-8 -*- # File: main.py # This code is mainly borrowed # from the official example codes of tensorpack library. # https://github.com/ppwwyyxx/tensorpack/tree/master/examples # Revised by Junsuk Choe <skykite@yonsei.ac.kr> # Weakly Supervised Object Localization (WSOL) based on VG...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 2, 532, 9, 12, 19617, 25, 41002, 12, 23, 532, 9, 12, 198, 2, 9220, 25, 1388, 13, 9078, 198, 198, 2, 770, 2438, 318, 8384, 22546, 198, 2, 422, 262, 1743, 1672, 12416, 286, 11192, ...
2.714286
602
import mx.DateTime, sys, pg, random v = sys.argv[1] ts = mx.DateTime.strptime(v, "%Y%m%d%H%M") out = open("n0r%s.tfw" % (v,), "w") out.write( """ 0.0100000000000%s 0.00000 0.00000 -0.010000000000000%s -126.000000 50.0000""" % (v, random.randint(0, 1000)) ) out.close() sys.exit(0) mydb = pg.co...
[ 11748, 285, 87, 13, 10430, 7575, 11, 25064, 11, 23241, 11, 4738, 628, 198, 85, 796, 25064, 13, 853, 85, 58, 16, 60, 198, 912, 796, 285, 87, 13, 10430, 7575, 13, 2536, 457, 524, 7, 85, 11, 36521, 56, 4, 76, 4, 67, 4, 39, 4, ...
1.921444
471
import pandas as pd from yr.libyr import Yr class YRNOLocation: """Locations for YRNO""" ATX = 'USA/Texas/Austin' TLL = 'Estonia/Harjumaa/Tallinn' RKV = 'Estonia/Lääne-Virumaa/Rakvere' class YrNoWeather: """Pulls weather data using Yr.no weather API""" def __init__(self, location: str, timez...
[ 11748, 19798, 292, 355, 279, 67, 198, 6738, 42635, 13, 8019, 2417, 1330, 575, 81, 628, 198, 4871, 575, 42336, 3535, 5040, 25, 198, 220, 220, 220, 37227, 43, 20968, 329, 575, 49, 15285, 37811, 198, 220, 220, 220, 5161, 55, 796, 705, ...
2.271468
1,083
N = int(input()) before = "" all = set() check = True for i in range(N): s = input() if i == 0: before = s all.add(s) else: if before[-1] == s[0]: before = s all.add(s) else: check = False if check: print("Yes" if len(all)==N else "No")...
[ 45, 796, 493, 7, 15414, 28955, 198, 19052, 796, 13538, 198, 439, 796, 900, 3419, 198, 9122, 796, 6407, 198, 1640, 1312, 287, 2837, 7, 45, 2599, 198, 220, 220, 220, 264, 796, 5128, 3419, 198, 220, 220, 220, 611, 1312, 6624, 657, 25...
1.834225
187
from .lf_set import LFSet from .analysis import LFAnalysis from .preprocess import preprocessor from .prelabels import PreLabels from .lf import labeling_function, ABSTAIN from .continuous_scoring import continuous_scorer
[ 6738, 764, 1652, 62, 2617, 1330, 47629, 7248, 198, 6738, 764, 20930, 1330, 47629, 32750, 198, 6738, 764, 3866, 14681, 1330, 662, 41341, 198, 6738, 764, 79, 2411, 397, 1424, 1330, 3771, 17822, 1424, 198, 6738, 764, 1652, 1330, 27393, 62,...
3.810345
58
import os import sys from netaddr import * from fabric.api import * from fabfile.config import testbed from fabfile.utils.host import * from fabfile.utils.cluster import get_all_hostnames #end get_storage_data_ip #end get_storage_host_string #end get_storage_disk_config #end get_storage_disk_config #end get_storage_l...
[ 11748, 28686, 198, 11748, 25064, 198, 6738, 2010, 29851, 1330, 1635, 198, 198, 6738, 9664, 13, 15042, 1330, 1635, 198, 198, 6738, 7843, 7753, 13, 11250, 1330, 1332, 3077, 198, 6738, 7843, 7753, 13, 26791, 13, 4774, 1330, 1635, 198, 6738...
2.693299
776
import uvicorn import app.main as main uvicorn.run(main.app)
[ 11748, 334, 25531, 1211, 198, 11748, 598, 13, 12417, 355, 1388, 198, 198, 14795, 291, 1211, 13, 5143, 7, 12417, 13, 1324, 8, 198 ]
2.583333
24
from setuptools import setup, find_packages setup( name="pybitbay", version="0.0.1", description="python api for bitbay cryptocurrency exchange", author="dominik heinisch", author_email="dominikheinisch2@gmail.com", url="https://github.com/dominikheinisch/pybitbay", license='Apache 2.0', ...
[ 6738, 900, 37623, 10141, 1330, 9058, 11, 1064, 62, 43789, 198, 198, 40406, 7, 198, 220, 220, 220, 1438, 2625, 9078, 2545, 24406, 1600, 198, 220, 220, 220, 2196, 2625, 15, 13, 15, 13, 16, 1600, 198, 220, 220, 220, 6764, 2625, 29412, ...
2.614458
166
print("connect setup") import socket HOST, PORT = "192.168.100.1",9999 #"169.254.44.240", 9999 # sock = socket.socket(socket.AF_INET, socket.SOCK_STREAM) print("trying to establish a connection") try: sock.connect((HOST, PORT)) print("connect ready") except: print("CONNECTION FAILED.") print("have you ...
[ 4798, 7203, 8443, 9058, 4943, 198, 11748, 17802, 198, 198, 39, 10892, 11, 350, 9863, 796, 366, 17477, 13, 14656, 13, 3064, 13, 16, 1600, 24214, 1303, 1, 22172, 13, 24970, 13, 2598, 13, 16102, 1600, 860, 17032, 1303, 198, 82, 735, 79...
2.652439
164
from random import randint, sample from functools import reduce N_CLASSES = 200 N_STUDENTS = 1000 # create a graph-file consisting of 200 courses and 1000 students # edges are randomly generated between students and classes classes = map(lambda ind : "class " + str(ind), range(N_CLASSES)) students = map(lambda ind : ...
[ 6738, 4738, 1330, 43720, 600, 11, 6291, 198, 6738, 1257, 310, 10141, 1330, 4646, 198, 198, 45, 62, 31631, 1546, 796, 939, 198, 45, 62, 2257, 8322, 15365, 796, 8576, 198, 198, 2, 2251, 257, 4823, 12, 7753, 17747, 286, 939, 10902, 290...
2.881773
203
import lcddriver import time import array as arr # Load the driver and set it to "display" # If you use something from the driver library use the "display." prefix first #display = lcddriver.lcd() # Main body of code # display.lcd_clear() #try: # while True: # # time.sleep(0.5) # ...
[ 11748, 300, 66, 1860, 38291, 198, 11748, 640, 198, 11748, 7177, 355, 5240, 198, 198, 2, 8778, 262, 4639, 290, 900, 340, 284, 366, 13812, 1, 198, 2, 1002, 345, 779, 1223, 422, 262, 4639, 5888, 779, 262, 366, 13812, 526, 21231, 717, ...
2.256281
199
########################################################################### # # Copyright 2017 Google 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 # # https://www.apache.org/...
[ 29113, 29113, 7804, 21017, 198, 2, 198, 2, 220, 15069, 2177, 3012, 3457, 13, 198, 2, 198, 2, 220, 49962, 739, 262, 24843, 13789, 11, 10628, 362, 13, 15, 357, 1169, 366, 34156, 15341, 198, 2, 220, 345, 743, 407, 779, 428, 2393, 284...
3.924855
346
import re from copy import copy
[ 11748, 302, 198, 6738, 4866, 1330, 4866, 628, 628, 628, 628, 198 ]
3.333333
12
# Generated by Django 2.2.6 on 2020-04-06 15:53 from django.db import migrations, models import django.utils.timezone import foodieshoot.models
[ 2, 2980, 515, 416, 37770, 362, 13, 17, 13, 21, 319, 12131, 12, 3023, 12, 3312, 1315, 25, 4310, 198, 198, 6738, 42625, 14208, 13, 9945, 1330, 15720, 602, 11, 4981, 198, 11748, 42625, 14208, 13, 26791, 13, 2435, 11340, 198, 11748, 205...
2.979592
49