content
stringlengths
1
1.04M
input_ids
listlengths
1
774k
ratio_char_token
float64
0.38
22.9
token_count
int64
1
774k
import json import re from typing import List, Any from unittest import TestCase from django.core.management import call_command from django.db.models import QuerySet, Q from bib_models import DocID from main.exceptions import RefNotFoundError from main.models import RefData from main.query import ( search_refs_r...
[ 11748, 33918, 198, 11748, 302, 198, 6738, 19720, 1330, 7343, 11, 4377, 198, 6738, 555, 715, 395, 1330, 6208, 20448, 198, 198, 6738, 42625, 14208, 13, 7295, 13, 27604, 1330, 869, 62, 21812, 198, 6738, 42625, 14208, 13, 9945, 13, 27530, ...
2.358617
2,083
import discord import main from discord.ext import commands
[ 11748, 36446, 198, 11748, 1388, 198, 6738, 36446, 13, 2302, 1330, 9729, 628, 198 ]
4.428571
14
import discord from discord.ext import commands import aiohttp from .utils import Utils import requests class Steammain: """My custom cog that does stuff!""" @commands.command() async def userinfo(self, vanityurl): """Get information on a user (requires VanityURl)""" message = await self....
[ 11748, 36446, 198, 6738, 36446, 13, 2302, 1330, 9729, 198, 11748, 257, 952, 4023, 198, 6738, 764, 26791, 1330, 7273, 4487, 198, 11748, 7007, 198, 198, 4871, 2441, 6475, 391, 25, 198, 220, 220, 220, 37227, 3666, 2183, 43072, 326, 857, ...
2.424855
1,384
# -*- coding: utf-8 from django.apps import AppConfig
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 198, 6738, 42625, 14208, 13, 18211, 1330, 2034, 16934, 628 ]
2.75
20
""" MIT License Copyright (c) 2021 benevpi Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distr...
[ 37811, 198, 36393, 13789, 198, 198, 15269, 357, 66, 8, 33448, 10004, 85, 14415, 198, 198, 5990, 3411, 318, 29376, 7520, 11, 1479, 286, 3877, 11, 284, 597, 1048, 16727, 257, 4866, 198, 1659, 428, 3788, 290, 3917, 10314, 3696, 357, 1169...
3.318937
602
# Copyright (c) 2021 Advanced Micro Devices, Inc. # All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are met: # # 1. Redistributions of source code must retain the above copyright notice, # this list of condi...
[ 2, 15069, 357, 66, 8, 33448, 13435, 4527, 29362, 11, 3457, 13, 198, 2, 1439, 2489, 10395, 13, 198, 2, 198, 2, 2297, 396, 3890, 290, 779, 287, 2723, 290, 13934, 5107, 11, 351, 393, 1231, 198, 2, 17613, 11, 389, 10431, 2810, 326, ...
3.68171
421
# Author: David Burns # License: BSD import numpy as np from seglearn.datasets import load_watch from seglearn.base import TS_Data
[ 2, 6434, 25, 3271, 23592, 198, 2, 13789, 25, 347, 10305, 198, 198, 11748, 299, 32152, 355, 45941, 198, 198, 6738, 384, 70, 35720, 13, 19608, 292, 1039, 1330, 3440, 62, 8340, 198, 6738, 384, 70, 35720, 13, 8692, 1330, 26136, 62, 6601...
3
45
# -*- coding: utf-8 -*- # Licensed to the Apache Software Foundation (ASF) under one or more # contributor license agreements. See the NOTICE file distributed with # this work for additional information regarding copyright ownership. # The ASF licenses this file to You under the Apache License, Version 2.0 # (the "Lic...
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 2, 49962, 284, 262, 24843, 10442, 5693, 357, 1921, 37, 8, 739, 530, 393, 517, 198, 2, 18920, 5964, 11704, 13, 220, 4091, 262, 28536, 2393, 9387, 351, 198, 2, 428, 67...
3.924107
224
# ============================================================================ # DEV_CREATE_UPLOAD_DEPLOY.PY # ----------------- # Testing launching an S3 bucket for a project via Cloudformation # and boto3, then uploading the templates to S3 and calling 'create stack' # on # # =========================================...
[ 2, 38093, 2559, 18604, 198, 2, 5550, 53, 62, 43387, 6158, 62, 52, 6489, 41048, 62, 7206, 6489, 21414, 13, 47, 56, 198, 2, 34400, 12, 198, 2, 23983, 13925, 281, 311, 18, 19236, 329, 257, 1628, 2884, 10130, 1161, 198, 2, 290, 275, ...
2.52103
1,165
''' Created on Aug 9, 2017 @author: Hao Wu ''' from ScopeFoundry import HardwareComponent from .daq_ai_dev import DAQaiDev from PyDAQmx import * import numpy as np import time class DAQaiHW(HardwareComponent): ''' Hardware Component Class for receiving AI input for breathing, licking etc ''' nam...
[ 7061, 6, 198, 41972, 319, 2447, 860, 11, 2177, 198, 198, 31, 9800, 25, 367, 5488, 18027, 198, 7061, 6, 198, 198, 6738, 41063, 21077, 563, 1330, 28715, 21950, 198, 6738, 764, 48539, 62, 1872, 62, 7959, 1330, 17051, 48, 1872, 13603, 1...
2.345188
478
# -*- coding: utf-8 -*- """ :::::::::::::::::::::::: Critical Infrastructure Cyberspace Analysis Tool (CICAT) ::::::::::::::::::::::::::::::::::::::: NOTICE The contents of this material reflect the views of the author and/or th...
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 37811, 198, 43661, 43661, 43661, 220, 17684, 33709, 5934, 1213, 10223, 14691, 16984, 357, 34, 2149, 1404, 8, 220, 1058, 43661, 43661, 43661, 43661, 24022, 3712, 628, 220, ...
2.538058
1,905
import requests from bs4 import BeautifulSoup from collector.models import City from collector.parsers.city import update_city as upd_city ZTM_HOMEPAGE = 'http://www.ztm.waw.pl/' def parse_bus_stop_list(link: str) -> list: """ From main page where all bus stops are listed get all links assigned to bus stop ...
[ 11748, 7007, 198, 6738, 275, 82, 19, 1330, 23762, 50, 10486, 198, 198, 6738, 22967, 13, 27530, 1330, 2254, 198, 6738, 22967, 13, 79, 945, 364, 13, 19205, 1330, 4296, 62, 19205, 355, 2325, 62, 19205, 198, 198, 57, 15972, 62, 39069, 4...
2.578879
767
#!/usr/bin/python # pylint: disable=line-too-long class TimeseriesEmptyError(Exception): """raise if the specific Timeseries is length zero""" class DataLoggerRawFileMissing(Exception): """raised, when there is no available Raw Input File""" class DataLoggerLiveDataError(Exception): """raised if there is...
[ 2, 48443, 14629, 14, 8800, 14, 29412, 198, 2, 279, 2645, 600, 25, 15560, 28, 1370, 12, 18820, 12, 6511, 198, 198, 4871, 3782, 10640, 40613, 12331, 7, 16922, 2599, 198, 220, 220, 220, 37227, 40225, 611, 262, 2176, 3782, 10640, 318, 4...
3.592179
179
from __future__ import annotations import pytest from deezer import Album, Artist, PaginatedList pytestmark = pytest.mark.vcr class TestPaginatedList: """Tests for the PaginatedList class.""" @pytest.fixture() @pytest.mark.parametrize( ("index", "title"), [ (4, "Alive 2007...
[ 6738, 11593, 37443, 834, 1330, 37647, 198, 198, 11748, 12972, 9288, 198, 198, 6738, 390, 8471, 263, 1330, 23999, 11, 18902, 11, 31525, 3898, 8053, 198, 198, 9078, 9288, 4102, 796, 12972, 9288, 13, 4102, 13, 85, 6098, 628, 198, 4871, 6...
2.26506
166
import pandas as pd from rwrap import stats df = pd.read_csv("data.csv") fit = stats.glm("Y ~ X0 + X1 + X2", family=stats.gaussian(), data=df) glm_coef = stats.coef(fit) ( pd.DataFrame.from_dict(glm_coef, orient="index") .reset_index() .rename(columns={"index": "names", 0: "values"}) .to_csv("resul...
[ 11748, 19798, 292, 355, 279, 67, 198, 198, 6738, 374, 37150, 1330, 9756, 628, 198, 7568, 796, 279, 67, 13, 961, 62, 40664, 7203, 7890, 13, 40664, 4943, 198, 11147, 796, 9756, 13, 4743, 76, 7203, 56, 5299, 1395, 15, 1343, 1395, 16, ...
2.256579
152
import unittest import numpy as np import pandas as pd import xarray as xr from test.sampledata import create_highroc_dataset from xcube.dsutil import select_variables, update_variable_props, compute_dataset, add_time_coords, \ get_time_in_days_since_1970, update_global_attributes nan = float('nan')
[ 11748, 555, 715, 395, 198, 198, 11748, 299, 32152, 355, 45941, 198, 11748, 19798, 292, 355, 279, 67, 198, 11748, 2124, 18747, 355, 2124, 81, 198, 198, 6738, 1332, 13, 37687, 10137, 1045, 1330, 2251, 62, 8929, 12204, 62, 19608, 292, 31...
2.87156
109
import csv rescaffold = set(map(lambda x:x.strip(),open("../lists/rescaffold.txt").readlines())) new= mst("master_table.csv") old= mst("master_table.prior_to_rescaffolding.csv") nb_differences = 0 nb_new = 0 for accession in new: if accession not in old: nb_new += 1 continue if new[acc...
[ 11748, 269, 21370, 198, 198, 411, 66, 2001, 727, 796, 900, 7, 8899, 7, 50033, 2124, 25, 87, 13, 36311, 22784, 9654, 7203, 40720, 20713, 14, 411, 66, 2001, 727, 13, 14116, 11074, 961, 6615, 3419, 4008, 198, 198, 3605, 28, 220, 220, ...
2.181818
297
""" this document defines the cases app urls """ from django.conf.urls import patterns, url urlpatterns = patterns( 'local_sendgrid.views', url( r'^events/$', 'events', name='django_sendgrid_event' ) )
[ 37811, 428, 3188, 15738, 262, 2663, 598, 2956, 7278, 37227, 198, 6738, 42625, 14208, 13, 10414, 13, 6371, 82, 1330, 7572, 11, 19016, 628, 198, 6371, 33279, 82, 796, 7572, 7, 198, 220, 220, 220, 705, 12001, 62, 21280, 25928, 13, 33571,...
2.4
100
try: import ConfigParser except ImportError: # noinspection PyPep8Naming import configparser as ConfigParser import pkgutil from garbo.config import aws from garbo.config import dummy_storage __author__ = 'nati' def load(filename='garbo.cfg'): """ Load configuration from file, overriding defaul...
[ 28311, 25, 198, 220, 220, 220, 1330, 17056, 46677, 198, 16341, 17267, 12331, 25, 198, 220, 220, 220, 1303, 645, 1040, 14978, 9485, 47, 538, 23, 45, 3723, 198, 220, 220, 220, 1330, 4566, 48610, 355, 17056, 46677, 198, 198, 11748, 279, ...
2.654605
304
import datetime from django.shortcuts import render,redirect from django.contrib.contenttypes.models import ContentType from django.utils import timezone from django.db.models import Sum from django.core.cache import cache from read_statistics.utils import get_seven_days_read_data,get_today_hot_data,get_yesterday...
[ 11748, 4818, 8079, 201, 198, 6738, 42625, 14208, 13, 19509, 23779, 1330, 8543, 11, 445, 1060, 201, 198, 6738, 42625, 14208, 13, 3642, 822, 13, 11299, 19199, 13, 27530, 1330, 14041, 6030, 201, 198, 6738, 42625, 14208, 13, 26791, 1330, 64...
3.007353
136
from blocks.algorithms import CompositeRule, Scale, StepRule from blocks.utils import shared_floatx class BasicNesterovMomentum(StepRule): u"""Accumulates step with exponential discount. Parameters ---------- momentum : float, optional The momentum coefficient. Defaults to 0. Notes -...
[ 6738, 7021, 13, 282, 7727, 907, 1330, 49355, 31929, 11, 21589, 11, 5012, 31929, 198, 6738, 7021, 13, 26791, 1330, 4888, 62, 22468, 87, 628, 198, 4871, 14392, 45, 7834, 709, 29252, 298, 388, 7, 8600, 31929, 2599, 198, 220, 220, 220, ...
2.855442
588
from PyQt5.QtCore import QThreadPool from PyQt5.QtWidgets import ( QApplication, QLabel, QMainWindow, QWidget, QVBoxLayout, QComboBox, QPushButton, QHBoxLayout, QCheckBox, QFileDialog, ) import sys from ortho_seq_code.gui.job_runner import JobRunner if __name__ == "__main__...
[ 6738, 9485, 48, 83, 20, 13, 48, 83, 14055, 1330, 1195, 16818, 27201, 198, 6738, 9485, 48, 83, 20, 13, 48, 83, 54, 312, 11407, 1330, 357, 198, 220, 220, 220, 1195, 23416, 11, 198, 220, 220, 220, 1195, 33986, 11, 198, 220, 220, 22...
2.211921
151
# vim: tabstop=4 shiftwidth=4 softtabstop=4 from django import template from django import http from django.conf import settings from django.contrib.auth.decorators import login_required from django.shortcuts import render_to_response from django.shortcuts import redirect from django.utils.translation import ugettext ...
[ 2, 43907, 25, 7400, 11338, 28, 19, 6482, 10394, 28, 19, 2705, 8658, 11338, 28, 19, 198, 198, 6738, 42625, 14208, 1330, 11055, 198, 6738, 42625, 14208, 1330, 2638, 198, 6738, 42625, 14208, 13, 10414, 1330, 6460, 198, 6738, 42625, 14208, ...
3.598901
182
# Copyright (c) 2016 Hewlett-Packard Enterprise Development Company, L.P. # # 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...
[ 2, 15069, 357, 66, 8, 1584, 30446, 15503, 12, 11869, 446, 14973, 7712, 5834, 11, 406, 13, 47, 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, 4...
2.93643
409
from flask import current_app from redis import Redis from rq import Queue def make_redis_connection(config): """Make a connection to the Redis configuration provided in config""" host = config.get('REDIS_HOST', '127.0.0.1') port = int(config.get('REDIS_PORT', '6379')) db = config.get('REDIS_DB', 0) ...
[ 6738, 42903, 1330, 1459, 62, 1324, 198, 6738, 2266, 271, 1330, 2297, 271, 198, 6738, 374, 80, 1330, 4670, 518, 628, 198, 4299, 787, 62, 445, 271, 62, 38659, 7, 11250, 2599, 198, 220, 220, 220, 37227, 12050, 257, 4637, 284, 262, 2297...
2.292244
722
# -*- coding:utf-8 -*- #默认的数据库信息 configs = { 'debug': True, 'db':{ 'host':'127.0.0.1', 'port':3306, 'user':'root', 'password':'xxxxxxxx', 'db':'awesome', }, 'session':{ 'secret':'asdfg' } }
[ 2, 532, 9, 12, 19617, 25, 40477, 12, 23, 532, 9, 12, 198, 198, 2, 165, 119, 246, 164, 106, 97, 21410, 46763, 108, 162, 235, 106, 41753, 241, 46479, 94, 162, 223, 107, 198, 11250, 82, 796, 1391, 198, 197, 1549, 1765, 1018, 10354,...
1.575758
132
VTABLE(_Main) { <empty> Main } VTABLE(_A) { _Main A } FUNCTION(_Main_New) { memo '' _Main_New: _T2 = 4 parm _T2 _T3 = call _Alloc _T4 = VTBL <_Main> *(_T3 + 0) = _T4 return _T3 } FUNCTION(_A_New) { memo '' _A_New: _T5 = 4 parm _T5 _T6 = call _Alloc _T7 = VTBL...
[ 53, 38148, 28264, 13383, 8, 1391, 198, 220, 220, 220, 1279, 28920, 29, 198, 220, 220, 220, 8774, 198, 92, 198, 198, 53, 38148, 28264, 32, 8, 1391, 198, 220, 220, 220, 4808, 13383, 198, 220, 220, 220, 317, 198, 92, 198, 198, 42296,...
1.721008
595
from flask import Flask from flask_bcrypt import Bcrypt from flask_login import LoginManager from flask_sqlalchemy import SQLAlchemy from puddle.incog import SECRET_KEY # Flask app app = Flask(__name__) app.config['SECRET_KEY'] = SECRET_KEY app.config['SQLALCHEMY_DATABASE_URI'] = 'sqlite:///puddle.db' # Database db...
[ 6738, 42903, 1330, 46947, 198, 6738, 42903, 62, 15630, 6012, 1330, 347, 29609, 198, 6738, 42903, 62, 38235, 1330, 23093, 13511, 198, 6738, 42903, 62, 25410, 282, 26599, 1330, 16363, 2348, 26599, 198, 6738, 279, 24500, 13, 1939, 519, 1330,...
3.086538
208
import os import sys sys.path.append(os.path.abspath('../sner')) project = 'SNER' author = 'WWUNLP SNER Team' copyright = '2017, ' + author release = '0.1.1' extensions = [ 'sphinx.ext.autodoc', 'sphinx.ext.napoleon' ] source_suffix = '.rst' master_doc = 'index' pygments_style = 'sphinx' html_theme = 'alaba...
[ 11748, 28686, 198, 11748, 25064, 198, 17597, 13, 6978, 13, 33295, 7, 418, 13, 6978, 13, 397, 2777, 776, 10786, 40720, 82, 1008, 6, 4008, 198, 198, 16302, 796, 705, 15571, 1137, 6, 198, 9800, 796, 705, 17947, 4944, 19930, 11346, 1137, ...
2.388235
170
import base64 import os from typing import Union import requests from arvan_client.arvan.api import Arvan from arvan_client.vod.channel import Channel from arvan_client.vod.video import Video
[ 11748, 2779, 2414, 198, 11748, 28686, 198, 6738, 19720, 1330, 4479, 198, 198, 11748, 7007, 198, 198, 6738, 610, 10438, 62, 16366, 13, 283, 10438, 13, 15042, 1330, 943, 10438, 198, 6738, 610, 10438, 62, 16366, 13, 85, 375, 13, 17620, 1...
3.421053
57
from monitoring.monitorlib.typing import ImplicitDict class V1DSS(ImplicitDict): """Definition of a version 1 DSS instance. A v1 DSS system is a DSS instance consisting of CRDB nodes, core-service workers, and http-gateway translators, initially defined with Jsonnet in build/deploy to be applied to a...
[ 6738, 9904, 13, 41143, 8019, 13, 774, 13886, 1330, 34347, 3628, 35, 713, 628, 198, 4871, 569, 16, 5258, 50, 7, 29710, 3628, 35, 713, 2599, 198, 220, 220, 220, 37227, 36621, 286, 257, 2196, 352, 360, 5432, 4554, 13, 628, 220, 220, ...
3.228571
140
# -*- coding: utf-8 -*- """encoder all distance """ import logging from . import common from .encoder_base import EncoderBase from .barrier_dist_unit_encoder import BarrierDistUnitEncoder from .food_dist_unit_encoder import FoodDistUnitEncoder from snakai import snake_state_machine as ssm from snakai import snake_stat...
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 37811, 12685, 12342, 477, 5253, 198, 37811, 198, 11748, 18931, 198, 198, 6738, 764, 1330, 2219, 198, 6738, 764, 12685, 12342, 62, 8692, 1330, 14711, 12342, 14881, 198, 673...
2.401235
486
import os from cffi import FFI ffi = FFI() ffi.set_source("module._wrappedMyLBPH", """ // passed to the real C compiler #include "WrapMyLBPHRecognizer.h" """, extra_objects=['MyLBPHRecognizer.o', 'WrapMyLBPHRecognizer.o'], library_dirs=['/usr/local/lib'], libraries=['opencv_highgui', 'open...
[ 11748, 28686, 198, 6738, 269, 487, 72, 1330, 376, 11674, 198, 198, 487, 72, 796, 376, 11674, 3419, 198, 198, 487, 72, 13, 2617, 62, 10459, 7203, 21412, 13557, 29988, 1496, 3666, 30501, 11909, 1600, 198, 220, 220, 220, 37227, 3373, 380...
2.337243
341
#!/usr/bin/env python PATH = '/Users/scott/gitRepos/Sandbox/credit-risk-workshop-cpd/data/' COPYFROM = PATH + 'german_credit_data.csv' FINANCIAL = PATH + 'financial_data.csv' NONFINANCIAL = PATH + 'non_financial_data.csv' print('Spliting file into 2 ...') with open(COPYFROM, 'r') as original: with open(FINANCIAL...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 198, 34219, 796, 31051, 14490, 14, 1416, 1252, 14, 18300, 6207, 418, 14, 18471, 3524, 14, 43082, 12, 19121, 12, 38067, 12, 13155, 67, 14, 7890, 14, 6, 198, 34, 3185, 56, 10913, 2662,...
2.0125
400
from functools import total_ordering, wraps class Promise: """ Base class for the proxy class created in the closure of the lazy function. It's used to recognize promises in code. """ pass def lazy(func, *resultclasses): """ Turn any callable into a lazy evaluated callable. result classe...
[ 6738, 1257, 310, 10141, 1330, 2472, 62, 34555, 11, 27521, 628, 198, 4871, 34920, 25, 198, 220, 220, 220, 37227, 198, 220, 220, 220, 7308, 1398, 329, 262, 15741, 1398, 2727, 287, 262, 16512, 286, 262, 16931, 2163, 13, 198, 220, 220, ...
3.059211
304
print('=== DESAFIO 28===') print('jogo da adivinhação 1.0'.upper())
[ 198, 4798, 10786, 18604, 22196, 8579, 9399, 2579, 18604, 11537, 198, 4798, 10786, 73, 24076, 12379, 512, 452, 259, 3099, 16175, 28749, 352, 13, 15, 4458, 45828, 28955, 198 ]
2.37931
29
# coding: utf-8 from hmtl.dataset_readers.dataset_utils.ace import ACE, ACESentence
[ 2, 19617, 25, 3384, 69, 12, 23, 198, 198, 6738, 289, 16762, 75, 13, 19608, 292, 316, 62, 961, 364, 13, 19608, 292, 316, 62, 26791, 13, 558, 1330, 40488, 11, 7125, 1546, 298, 594, 198 ]
2.361111
36
import streamlit as st import pandas as pd import matplotlib.pyplot as plt import matplotlib.collections as collections from matplotlib.dates import date2num import datetime as dt import pathlib, os from matplotlib.backends.backend_agg import RendererAgg _lock = RendererAgg.lock apptitle = 'IAB1-Arduino-HumiditySenso...
[ 11748, 4269, 18250, 355, 336, 198, 11748, 19798, 292, 355, 279, 67, 198, 11748, 2603, 29487, 8019, 13, 9078, 29487, 355, 458, 83, 198, 11748, 2603, 29487, 8019, 13, 4033, 26448, 355, 17268, 198, 6738, 2603, 29487, 8019, 13, 19581, 1330,...
2.469105
793
# Time: O(k * n^2) # Space: O(n^2) # 1278 weekly contest 165 11/30/2019 # You are given a string s containing lowercase letters and an integer k. You need to : # # First, change some characters of s to other lowercase English letters. # Then divide s into k non-empty disjoint substrings such that each substr...
[ 2, 3862, 25, 220, 440, 7, 74, 1635, 299, 61, 17, 8, 198, 2, 4687, 25, 440, 7, 77, 61, 17, 8, 198, 198, 2, 1105, 3695, 10273, 8414, 21409, 1367, 14, 1270, 14, 23344, 198, 198, 2, 921, 389, 1813, 257, 4731, 264, 7268, 2793, 74...
3.07173
237
from os import system as os_system, path as os_path, chdir as os_chdir os_chdir(os_path.dirname(os_path.abspath(__file__))) pythonCommand="python" #pythonCommand="python3"
[ 6738, 28686, 1330, 1080, 355, 28686, 62, 10057, 11, 3108, 355, 28686, 62, 6978, 11, 442, 15908, 355, 28686, 62, 354, 15908, 198, 198, 418, 62, 354, 15908, 7, 418, 62, 6978, 13, 15908, 3672, 7, 418, 62, 6978, 13, 397, 2777, 776, 7,...
2.734375
64
import pymongo client = pymongo.MongoClient("mongodb+srv://user1:user1@cluster0-ks5iw.mongodb.net/test?retryWrites=true&w=majority") db = client.get_database('TEST') records = db.TEST1 file = open("test1.txt","r") f=file.readline().strip() amount=[] for x in records.find({'Item':f}): amount.append(float(x[f])) ...
[ 11748, 279, 4948, 25162, 198, 198, 16366, 796, 279, 4948, 25162, 13, 44, 25162, 11792, 7203, 31059, 375, 65, 10, 27891, 85, 1378, 7220, 16, 25, 7220, 16, 31, 565, 5819, 15, 12, 591, 20, 14246, 13, 31059, 375, 65, 13, 3262, 14, 928...
2.357143
196
# encoding=utf-8 """ Created by Xiao Aoran @ntu, sg. 2020/Jun/23 10:38 am. """ import argparse import os import numpy as np import yaml from sklearn.cluster import AgglomerativeClustering, MeanShift, estimate_bandwidth # from sklearn.metrics import adjusted_rand_score # from sklearn.datasets import load_iris # import...
[ 2, 21004, 28, 40477, 12, 23, 198, 198, 37811, 198, 41972, 416, 28249, 317, 31884, 2488, 429, 84, 11, 264, 70, 13, 12131, 14, 22396, 14, 1954, 838, 25, 2548, 716, 13, 198, 37811, 198, 198, 11748, 1822, 29572, 198, 11748, 28686, 198, ...
2.393486
1,136
import markdown from django.shortcuts import redirect, render from django.urls import reverse from django.views.generic import View from apps.bloguser.models import User from apps.cms.forms import PostAddForm, PostEditForm from apps.post.cache_manager import clear_cache from apps.post.models import Post, Category from...
[ 11748, 1317, 2902, 198, 6738, 42625, 14208, 13, 19509, 23779, 1330, 18941, 11, 8543, 198, 6738, 42625, 14208, 13, 6371, 82, 1330, 9575, 198, 6738, 42625, 14208, 13, 33571, 13, 41357, 1330, 3582, 198, 198, 6738, 6725, 13, 14036, 7220, 13...
3.419162
167
import logging import sys from seequery.translator import CQToSPARQLOWL logging.basicConfig(filename='cq_to_sparql.log', level=logging.DEBUG) cqs = [ 'Are anchovies and capers used together?', 'Are different bases available?', 'Are there any children pizzas?', 'Are toppings organic?', 'Are we inc...
[ 11748, 18931, 198, 11748, 25064, 198, 198, 6738, 766, 22766, 13, 7645, 41880, 1330, 327, 48, 2514, 4303, 1503, 9711, 3913, 43, 198, 198, 6404, 2667, 13, 35487, 16934, 7, 34345, 11639, 66, 80, 62, 1462, 62, 82, 1845, 13976, 13, 6404, ...
3.113343
697
import matplotlib.pyplot as plt, numpy as np import scipy.misc as msc import timmy.imgproc as ti from astropy.io import fits import astropy.visualization as vis img0 = msc.face()[:,:,0] # rgb image, take one channel hl = fits.open('/Users/luke/Dropbox/proj/timmy/data/phot/2020-04-01/TIC460205581-01-0196_Rc1_out.fit') ...
[ 11748, 2603, 29487, 8019, 13, 9078, 29487, 355, 458, 83, 11, 299, 32152, 355, 45941, 198, 11748, 629, 541, 88, 13, 44374, 355, 285, 1416, 198, 11748, 4628, 1820, 13, 9600, 36942, 355, 46668, 198, 6738, 6468, 28338, 13, 952, 1330, 1141...
2.216691
683
# -*- coding: utf-8 -*- import logging from pathlib import Path from dotenv import find_dotenv, load_dotenv import pickle import tensorflow as tf from text_generator import Keras_Text_Generator def main(input_filepath, output_filepath): """ Runs data processing scripts to turn raw data from (../raw) into ...
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 11748, 18931, 198, 6738, 3108, 8019, 1330, 10644, 198, 6738, 16605, 24330, 1330, 1064, 62, 26518, 24330, 11, 3440, 62, 26518, 24330, 198, 11748, 2298, 293, 198, 11748, 111...
2.729412
510
from tests.seatsioClientTest import SeatsioClientTest from tests.util.asserts import assert_that
[ 6738, 5254, 13, 325, 1381, 952, 11792, 14402, 1330, 1001, 1381, 952, 11792, 14402, 198, 6738, 5254, 13, 22602, 13, 30493, 82, 1330, 6818, 62, 5562, 628 ]
3.62963
27
import inspect import logging import uvicorn from fastapi import FastAPI, APIRouter class API: """ Base class for mSDSS related APIs. Parameters ---------- api : :class:`fastapi:fastapi.FastAPI` API object to use for creating routes. logger : :class:`logging.Logger` Object for...
[ 11748, 10104, 198, 11748, 18931, 198, 11748, 334, 25531, 1211, 198, 198, 6738, 3049, 15042, 1330, 12549, 17614, 11, 3486, 4663, 39605, 198, 198, 4871, 7824, 25, 198, 220, 220, 220, 37227, 198, 220, 220, 220, 7308, 1398, 329, 285, 50, ...
2.028472
9,764
l = ['a', 'a', 'a', 'a', 'b', 'c', 'c'] print(len(l)) # 7 l = ['a', 'a', 'a', 'a', 'b', 'c', 'c'] print(l.count('a')) # 4 print(l.count('b')) # 1 print(l.count('c')) # 2 print(l.count('d')) # 0 l = list(range(-5, 6)) print(l) # [-5, -4, -3, -2, -1, 0, 1, 2, 3, 4, 5] print([i for i in l if i < 0]) # [-5, -4, -3...
[ 75, 796, 37250, 64, 3256, 705, 64, 3256, 705, 64, 3256, 705, 64, 3256, 705, 65, 3256, 705, 66, 3256, 705, 66, 20520, 198, 198, 4798, 7, 11925, 7, 75, 4008, 198, 2, 767, 198, 198, 75, 796, 37250, 64, 3256, 705, 64, 3256, 705, 6...
1.874627
335
#!/usr/bin/env python # Simple dumper to extract kismet records and export them as a json # array import argparse from dateutil import parser as dateparser import datetime import json import struct import sqlite3 import sys import simplekml import re parser = argparse.ArgumentParser(description="Kismet to KML Log Co...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 198, 2, 17427, 288, 15829, 284, 7925, 479, 1042, 316, 4406, 290, 10784, 606, 355, 257, 33918, 198, 2, 7177, 198, 198, 11748, 1822, 29572, 198, 6738, 3128, 22602, 1330, 30751, 355, 3128...
2.40176
1,705
"""Miscellaneous utilities.""" import builtins import functools from dataclasses import dataclass from typing import Any, Dict, List, TypeVar from .serialize import serializable builtins_d = vars(builtins) T1 = TypeVar('T1') T2 = TypeVar('T2') class ADT: """Base class for an algebraic data type.""" @datacl...
[ 37811, 31281, 25673, 20081, 526, 15931, 198, 198, 11748, 3170, 1040, 198, 11748, 1257, 310, 10141, 198, 6738, 4818, 330, 28958, 1330, 4818, 330, 31172, 198, 6738, 19720, 1330, 4377, 11, 360, 713, 11, 7343, 11, 5994, 19852, 198, 198, 673...
2.482713
3,760
#!/usr/bin/env python3 # -*- coding: utf-8 -*- """ Created on Tue Apr 7 15:28:03 2020 @author: michaelmitschjr """ from sklearn.linear_model import LinearRegression from sklearn.model_selection import train_test_split import pandas as pd from sklearn.preprocessing import normalize from sklearn.svm import SVR from sk...
[ 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, 30030, 2758, 220, 767, 1315, 25, 2078, 25, 3070, 12131, 198, 198, 31, 9800, 25, 285, 4030...
2.419552
982
import json from datetime import datetime from PyQt5.QtWidgets import (QWidget, QGridLayout, QHBoxLayout, QVBoxLayout, QLabel, QFrame, QCalendarWidget, QPushButton, QTextEdit, QRadioButton, QGroupBox) from PyQt5.QtGui import QFont, QIcon, QCursor from PyQt5.QtCo...
[ 11748, 33918, 198, 6738, 4818, 8079, 1330, 4818, 8079, 198, 6738, 9485, 48, 83, 20, 13, 48, 83, 54, 312, 11407, 1330, 357, 48, 38300, 11, 1195, 41339, 32517, 11, 1195, 39, 14253, 32517, 11, 1195, 53, 14253, 32517, 11, 1195, 33986, 1...
2.417085
199
import simplejson from django.contrib.auth.models import User from django.core.urlresolvers import reverse from django.http import (HttpResponse, HttpResponseRedirect, Http404, HttpResponsePermanentRedirect) from django.shortcuts import get_object_or_404 from django.views.generic.list_detail i...
[ 11748, 2829, 17752, 198, 198, 6738, 42625, 14208, 13, 3642, 822, 13, 18439, 13, 27530, 1330, 11787, 198, 6738, 42625, 14208, 13, 7295, 13, 6371, 411, 349, 690, 1330, 9575, 198, 6738, 42625, 14208, 13, 4023, 1330, 357, 43481, 31077, 11, ...
2.267905
2,639
# _*_coding:utf-8_*_ """ @ProjectName: Chaos @Author: Javen Yan @File: SM2.py @Software: PyCharm @Time : 2019/11/27 上午11:04 """ import ctypes from ctypes import * import os current_path = os.path.dirname(os.path.abspath(__file__)) loader = ctypes.cdll.LoadLibrary soPath = os.path.join(current_path, 'ICitySMX.so') ...
[ 2, 4808, 9, 62, 66, 7656, 25, 40477, 12, 23, 62, 9, 62, 198, 37811, 198, 31, 16775, 5376, 25, 13903, 198, 31, 13838, 25, 220, 449, 4005, 10642, 198, 31, 8979, 25, 9447, 17, 13, 9078, 198, 31, 25423, 25, 9485, 1925, 1670, 198, ...
2.165574
1,830
from .AbstractReducer import AbstractReducer import numpy as np import warnings from lpproj import LocalityPreservingProjection
[ 6738, 764, 23839, 7738, 48915, 1330, 27741, 7738, 48915, 198, 11748, 299, 32152, 355, 45941, 198, 11748, 14601, 198, 6738, 300, 381, 305, 73, 1330, 15181, 1483, 25460, 14344, 16775, 295, 628 ]
4.03125
32
from rest_framework_nested.routers import NestedSimpleRouter class RelationshipRouter(NestedSimpleRouter): """ Subclass a NestedSimpleRouter - adding patch mapping """ def __init__(self, *args, **kwargs): """ Adds a patch element to route mapping :param drf_jsonapi.routers.Re...
[ 6738, 1334, 62, 30604, 62, 77, 7287, 13, 472, 1010, 1330, 399, 7287, 26437, 49, 39605, 628, 198, 4871, 39771, 49, 39605, 7, 45, 7287, 26437, 49, 39605, 2599, 198, 220, 220, 220, 37227, 198, 220, 220, 220, 3834, 4871, 257, 399, 7287,...
2.509804
204
from django.test import TestCase from django.template import Template, Context from django.contrib.contenttypes.models import ContentType from django.template.loader import render_to_string from .factories import TaggedItemFactory, TagTestArticle0Factory
[ 6738, 42625, 14208, 13, 9288, 1330, 6208, 20448, 198, 6738, 42625, 14208, 13, 28243, 1330, 37350, 11, 30532, 198, 6738, 42625, 14208, 13, 3642, 822, 13, 11299, 19199, 13, 27530, 1330, 14041, 6030, 198, 6738, 42625, 14208, 13, 28243, 13, ...
4
64
import serial import threading import moment from detectionModules.wifi.frame import Frame
[ 11748, 11389, 198, 11748, 4704, 278, 198, 11748, 2589, 198, 6738, 13326, 5841, 5028, 13, 86, 22238, 13, 14535, 1330, 25184, 628 ]
4.181818
22
# -*-encoding:utf-8-*- class HttpConnection(object): """ This class contains four methods def __init__(self): initialize def add_connection(self, name, value): add connection def get_connection(self, name): get connection def remove_connection(self, name): remove connection """ _...
[ 2, 532, 9, 12, 12685, 7656, 25, 40477, 12, 23, 12, 9, 12, 628, 198, 4871, 367, 29281, 32048, 7, 15252, 2599, 198, 220, 220, 220, 37227, 628, 220, 220, 220, 770, 1398, 4909, 1440, 5050, 628, 220, 220, 220, 825, 11593, 15003, 834, ...
2.590078
383
# -*- coding: UTF-8 -*- THUMBNAIL_CONVERT = '/usr/local/bin/convert'
[ 2, 532, 9, 12, 19617, 25, 41002, 12, 23, 532, 9, 12, 198, 198, 4221, 5883, 33, 4535, 4146, 62, 10943, 15858, 796, 31051, 14629, 14, 12001, 14, 8800, 14, 1102, 1851, 6, 198 ]
2.058824
34
from django.apps import AppConfig
[ 6738, 42625, 14208, 13, 18211, 1330, 2034, 16934, 198 ]
3.777778
9
import json import logging from PyQt5.QtCore import QObject, pyqtSignal from ..core import gen_uuid from ..core.constants import ENVIRONMENT_RECORD_TYPE, API_CALL_RECORD_TYPE from ..model.app_data import ( HttpExchange, ApiCall, ProjectInfo, AppData, Environment, ApiTestCase, )
[ 11748, 33918, 198, 11748, 18931, 198, 198, 6738, 9485, 48, 83, 20, 13, 48, 83, 14055, 1330, 1195, 10267, 11, 12972, 39568, 11712, 282, 198, 198, 6738, 11485, 7295, 1330, 2429, 62, 12303, 312, 198, 6738, 11485, 7295, 13, 9979, 1187, 13...
2.516393
122
#! python3.5 from tkinter import * import tkinter as tk from tkinter import filedialog,messagebox from tkinter.ttk import * import glob, os import sys import pickle from PIL import Image, ImageTk,ImageEnhance,ImageFilter import PIL.Image appversion = "2.0 " try: # for Python2 from Tkinter impor...
[ 2, 0, 21015, 18, 13, 20, 201, 198, 6738, 256, 74, 3849, 1330, 1635, 201, 198, 11748, 256, 74, 3849, 355, 256, 74, 201, 198, 6738, 256, 74, 3849, 1330, 5717, 498, 519, 11, 20500, 3524, 201, 198, 6738, 256, 74, 3849, 13, 926, 74, ...
2.6125
320
""" A very simple wiki search HTTP server that demonstrates useful techniques afforded by PyParallel: the ability to load large reference data structures into memory, and then query them as part of incoming request processing in parallel. """ #============================================================================...
[ 37811, 198, 32, 845, 2829, 22719, 2989, 14626, 4382, 326, 15687, 4465, 7605, 198, 2001, 585, 276, 416, 9485, 10044, 29363, 25, 262, 2694, 284, 3440, 1588, 4941, 1366, 8573, 198, 20424, 4088, 11, 290, 788, 12405, 606, 355, 636, 286, 15...
3.567801
1,851
"""Tests for TCP connection handling, including proper and timely close.""" from __future__ import absolute_import, division, print_function __metaclass__ = type import socket import time from six.moves import range, http_client, urllib import six import pytest from cheroot.test import helper, webtest timeout = ...
[ 37811, 51, 3558, 329, 23633, 4637, 9041, 11, 1390, 1774, 290, 19376, 1969, 526, 15931, 198, 198, 6738, 11593, 37443, 834, 1330, 4112, 62, 11748, 11, 7297, 11, 3601, 62, 8818, 198, 834, 4164, 330, 31172, 834, 796, 2099, 198, 198, 11748...
2.581854
11,716
from ExIt.Apprentice.BaseApprentice import BaseApprentice import random class RandomPredictor(BaseApprentice): """ This class is used for making random predictions """
[ 198, 6738, 1475, 1026, 13, 4677, 20098, 13, 14881, 4677, 20098, 1330, 7308, 4677, 20098, 198, 11748, 4738, 628, 198, 4871, 14534, 47, 17407, 273, 7, 14881, 4677, 20098, 2599, 198, 220, 220, 220, 37227, 770, 1398, 318, 973, 329, 1642, ...
3.888889
45
# coding=utf-8 # Copyright 2020 The HuggingFace Datasets Authors and the TensorFlow # Datasets Authors, DataLab Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # Unless required by...
[ 2, 19617, 28, 40477, 12, 23, 198, 2, 15069, 12131, 383, 12905, 2667, 32388, 16092, 292, 1039, 46665, 290, 262, 309, 22854, 37535, 198, 2, 16092, 292, 1039, 46665, 11, 6060, 17822, 46665, 13, 198, 2, 198, 2, 49962, 739, 262, 24843, 1...
2.581023
4,184
from typing import Any, Dict from flask import Flask from flask_marshmallow import Marshmallow from marshmallow import fields, post_load from .model import User __all__ = ["org_schema", "user_schema", "workspace_schema", "new_user_schema", "orgs_schema", "ma", "link_workspace_schema", "new_work...
[ 6738, 19720, 1330, 4377, 11, 360, 713, 198, 198, 6738, 42903, 1330, 46947, 198, 6738, 42903, 62, 76, 5406, 42725, 1330, 9786, 42725, 198, 6738, 22397, 42725, 1330, 7032, 11, 1281, 62, 2220, 198, 198, 6738, 764, 19849, 1330, 11787, 198, ...
2.651904
1,287
from __future__ import absolute_import from __future__ import print_function from __future__ import division import functools import math from collections import defaultdict import veriloggen.core.vtypes as vtypes from veriloggen.seq.seq import Seq from veriloggen.fsm.fsm import FSM import veriloggen.dataflow as _df...
[ 6738, 11593, 37443, 834, 1330, 4112, 62, 11748, 198, 6738, 11593, 37443, 834, 1330, 3601, 62, 8818, 198, 6738, 11593, 37443, 834, 1330, 7297, 198, 198, 11748, 1257, 310, 10141, 198, 11748, 10688, 198, 6738, 17268, 1330, 4277, 11600, 198, ...
2.579096
354
from sqlalchemy import Column, Integer, String, Float, Date, BigInteger from sqlalchemy.orm import declarative_base Base = declarative_base()
[ 6738, 44161, 282, 26599, 1330, 29201, 11, 34142, 11, 10903, 11, 48436, 11, 7536, 11, 4403, 46541, 198, 6738, 44161, 282, 26599, 13, 579, 1330, 2377, 283, 876, 62, 8692, 628, 198, 14881, 796, 2377, 283, 876, 62, 8692, 3419, 628, 198 ]
3.47619
42
n, m = list(map(int,input().split())) # n, m = 3, 3 # 결과 출력용 리스트 생성 arr = [0] * (m+1) # solver 함수 정의 # 로직 : 1~n까지의 자연수를 m번 출력 # 조건 : 중복 추출 가능, arr[i] >= arr[i-1] 앞자리의 원소보다는 항상 크거나 같아야한다. solve(0)
[ 77, 11, 285, 796, 1351, 7, 8899, 7, 600, 11, 15414, 22446, 35312, 3419, 4008, 198, 198, 2, 299, 11, 285, 796, 513, 11, 513, 198, 198, 2, 220, 166, 110, 108, 166, 111, 120, 23821, 114, 250, 167, 254, 98, 168, 248, 102, 31619, 9...
0.868085
235
import json import os from dotenv import load_dotenv if __name__ == "__main__": # import values for constants from .env file load_dotenv(".env") PATH_TO_METADATA = os.environ.get("PATH_TO_METADATA") URL_TO_IMAGE = os.environ.get("URL_TO_IMAGE") NEW_URL_TO_IMAGE = os.environ.get("NEW_URL_TO_IMAG...
[ 11748, 33918, 198, 11748, 28686, 198, 198, 6738, 16605, 24330, 1330, 3440, 62, 26518, 24330, 628, 198, 198, 361, 11593, 3672, 834, 6624, 366, 834, 12417, 834, 1298, 198, 220, 220, 220, 1303, 1330, 3815, 329, 38491, 422, 764, 24330, 2393...
2.375887
141
''' View for managing social properties of view ''' from django.template import Template, Context from django.conf import settings class SocialView(object): """ Uses class properties for social arguments Allows inheritance. Template language can be used e.g. share_title = "{{title}}" ...
[ 7061, 6, 198, 7680, 329, 11149, 1919, 6608, 286, 1570, 198, 7061, 6, 198, 198, 6738, 42625, 14208, 13, 28243, 1330, 37350, 11, 30532, 198, 6738, 42625, 14208, 13, 10414, 1330, 6460, 198, 198, 4871, 5483, 7680, 7, 15252, 2599, 198, 220...
2.158774
718
from recordthresher.record_maker import CrossrefRecordMaker from recordthresher.util import parseland_parse
[ 6738, 1700, 400, 411, 372, 13, 22105, 62, 10297, 1330, 23613, 23739, 48890, 198, 6738, 1700, 400, 411, 372, 13, 22602, 1330, 1582, 741, 392, 62, 29572, 628 ]
3.892857
28
from django.http import JsonResponse from .extras import checkLogin,getToDoList from .models import User , ToDoModel from .serializers import UserSerializer from rest_framework.decorators import api_view from dateutil.parser import parse from datetime import datetime # Create your views here. @api_view(['POST']) @api...
[ 6738, 42625, 14208, 13, 4023, 1330, 449, 1559, 31077, 198, 6738, 764, 2302, 8847, 1330, 2198, 47790, 11, 1136, 2514, 5211, 8053, 198, 6738, 764, 27530, 1330, 11787, 837, 1675, 5211, 17633, 198, 6738, 764, 46911, 11341, 1330, 11787, 32634,...
2.964789
142
from __future__ import division import math import torch from torch.autograd import Variable import torch.nn as nn import numpy as np import random # This is the opposite of unfold: # Combines video blocks into video frames # and averages the result due to overlapping (if true)
[ 6738, 11593, 37443, 834, 1330, 7297, 198, 11748, 10688, 198, 11748, 28034, 198, 6738, 28034, 13, 2306, 519, 6335, 1330, 35748, 198, 11748, 28034, 13, 20471, 355, 299, 77, 198, 11748, 299, 32152, 355, 45941, 198, 11748, 4738, 628, 198, 2...
3.6625
80
from __future__ import unicode_literals from django.apps import AppConfig
[ 6738, 11593, 37443, 834, 1330, 28000, 1098, 62, 17201, 874, 198, 198, 6738, 42625, 14208, 13, 18211, 1330, 2034, 16934, 628 ]
3.619048
21
from gcm import GCM #djm_HtyIxrM:APA91bHRza5mgE14gtRP06b_uv7JDgZ0bEcUBlIvgvgsH7pbsnWa3z5_aQLXRH7ehipw2-dCiFGC69zU9jWuiwzx4fVXFG-hWpdvEJCITJ5Eoe0Nf5eqFiSbLoJzNdT73tWG_OWD0yPZ gcm = GCM("AIzaSyA_LJj2iDD5sjTuJrPrkVrE6m-J-vasf9A", debug=True) token = "e322hEfMBdQ:APA91bEU6yveKVf9qYdEtZufs-86oTS9nasVdguu72lIH3dnjCtBeGO5zM...
[ 6738, 308, 11215, 1330, 20145, 44, 198, 2, 28241, 76, 62, 39, 774, 40, 87, 81, 44, 25, 2969, 32, 6420, 65, 17184, 4496, 20, 11296, 36, 1415, 13655, 20031, 3312, 65, 62, 14795, 22, 37882, 70, 57, 15, 65, 49136, 52, 3629, 40, 4511...
1.846284
592
import pandas as pd import scraperModelGS as smgs import directoryManager as dm import contactChecker as cc def getContacts(): """Google Sheets API Code. Pulls urls for all NFL Team RSS Feeds https://docs.google.com/spreadsheets/d/1p1LNyQhNhDBNEOkYQPV9xcNRe60WDlmnuiPp78hxkIs/ """ credentials = get...
[ 11748, 19798, 292, 355, 279, 67, 198, 11748, 19320, 525, 17633, 14313, 355, 895, 14542, 198, 198, 11748, 8619, 13511, 355, 288, 76, 198, 11748, 2800, 9787, 263, 355, 36624, 198, 198, 4299, 651, 4264, 8656, 33529, 198, 220, 220, 220, 3...
2.441425
2,723
# Copyright (C) 2010-2011 Richard Lincoln # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the "Software"), to # deal in the Software without restriction, including without limitation the # rights to use, copy, modify, merge, publish...
[ 2, 15069, 357, 34, 8, 3050, 12, 9804, 6219, 12406, 198, 2, 198, 2, 2448, 3411, 318, 29376, 7520, 11, 1479, 286, 3877, 11, 284, 597, 1048, 16727, 257, 4866, 198, 2, 286, 428, 3788, 290, 3917, 10314, 3696, 357, 1169, 366, 25423, 123...
3.144584
2,151
from scipy.io.wavfile import read import os import torch import numpy as np MAX_WAV_VALUE = 32768.0 def load_wav_to_torch(full_path): """ Loads wavdata into torch array """ sampling_rate, data = read(full_path) return torch.FloatTensor(data.astype(np.float32)) / MAX_WAV_VALUE, sampling_rate d...
[ 6738, 629, 541, 88, 13, 952, 13, 45137, 7753, 1330, 1100, 198, 198, 11748, 28686, 198, 11748, 28034, 198, 11748, 299, 32152, 355, 45941, 628, 198, 22921, 62, 54, 10116, 62, 39488, 796, 36203, 3104, 13, 15, 628, 198, 4299, 3440, 62, ...
2.554054
222
# coding: utf-8 # In[1]: import covid19_model as model # In[ ]: run_training()
[ 198, 2, 19617, 25, 3384, 69, 12, 23, 198, 198, 2, 554, 58, 16, 5974, 628, 198, 11748, 39849, 312, 1129, 62, 19849, 355, 2746, 628, 198, 2, 554, 58, 2361, 25, 628, 220, 220, 220, 220, 198, 5143, 62, 34409, 3419, 628 ]
2.139535
43
import cv2 import numpy as np import os img = cv2.imread('Images/grayscale.jpg') median = cv2.medianBlur(img, 3) compare = np.concatenate((img, median), axis=1) cv2.imwrite('test.jpg', compare)
[ 11748, 269, 85, 17, 198, 11748, 299, 32152, 355, 45941, 198, 11748, 28686, 198, 198, 9600, 796, 269, 85, 17, 13, 320, 961, 10786, 29398, 14, 2164, 592, 38765, 13, 9479, 11537, 198, 1150, 666, 796, 269, 85, 17, 13, 1150, 666, 3629, ...
2.361446
83
import pdb from mpi4py import MPI import xarray as xr
[ 11748, 279, 9945, 198, 6738, 285, 14415, 19, 9078, 1330, 4904, 40, 198, 11748, 2124, 18747, 355, 2124, 81, 628, 198 ]
2.666667
21
from dataclasses import dataclass, field @dataclass @dataclass
[ 198, 6738, 4818, 330, 28958, 1330, 4818, 330, 31172, 11, 2214, 628, 198, 31, 19608, 330, 31172, 628, 198, 31, 19608, 330, 31172, 628 ]
2.875
24
import os import json dossier_courant = os.path.dirname(__file__) pth=os.path.join(dossier_courant,"liste.json") if os.path.exists(pth): with open(pth,"r") as file_read: liste_course=json.load(f) else: liste_course=[]
[ 198, 11748, 28686, 198, 11748, 33918, 198, 198, 67, 30087, 62, 43220, 415, 796, 28686, 13, 6978, 13, 15908, 3672, 7, 834, 7753, 834, 8, 198, 79, 400, 28, 418, 13, 6978, 13, 22179, 7, 67, 30087, 62, 43220, 415, 553, 4868, 68, 13, ...
2.172727
110
#!/usr/bin/env python import inspect import codecs import warnings import pytest from bs4 import BeautifulSoup import lets_plot as lp from lets_plot.bistro.im import * from lets_plot.bistro.corr import * from lets_plot.geo_data import * from .parser import page_parser from .generator import generate_pages from .let...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 198, 11748, 10104, 198, 11748, 40481, 82, 198, 11748, 14601, 198, 198, 11748, 12972, 9288, 198, 6738, 275, 82, 19, 1330, 23762, 50, 10486, 198, 198, 11748, 8781, 62, 29487, 355, 300, 7...
2.95
160
import datetime from app import db
[ 11748, 4818, 8079, 198, 6738, 598, 1330, 20613, 628 ]
4
9
def is_magic_choice(attr_name: str) -> bool: """Determine iff attr_name meets magic choice formatting requirements. This is a helper for MagicKind metaclass that determines if an attribute name should be treated as a user defined magic-value choice Args: attr_name: name of an attribute R...
[ 198, 198, 4299, 318, 62, 32707, 62, 25541, 7, 35226, 62, 3672, 25, 965, 8, 4613, 20512, 25, 198, 220, 220, 220, 37227, 35, 2357, 3810, 611, 69, 708, 81, 62, 3672, 11185, 5536, 3572, 33313, 5359, 13, 628, 220, 220, 220, 770, 318, ...
2.534843
574
#========================================================================= # BflyRouterCharact_test.py #========================================================================= # Used for characterizaing router # # Author : Cheng Tan # Date : June 16, 2019 import random import pytest from pymtl3_net.bflynet.BflyRo...
[ 2, 23926, 2559, 28, 198, 2, 347, 12254, 49, 39605, 12441, 529, 62, 9288, 13, 9078, 198, 2, 23926, 2559, 28, 198, 2, 16718, 329, 2095, 23638, 278, 20264, 198, 2, 198, 2, 6434, 1058, 27692, 11818, 198, 2, 220, 220, 7536, 1058, 2795,...
3.386965
491
""" // --------------------------------------------------------------------------- // // Security Advising Modules (SAM) for Cloud IoT and Mobile Ecosystem // // Copyright (C) 2020 Instituto de Telecomunicações (www.it.pt) // Copyright (C) 2020 Universidade da Beira Interior (www.ubi.pt) // // This program is free s...
[ 37811, 198, 1003, 16529, 32284, 198, 1003, 198, 1003, 197, 24074, 8007, 1710, 3401, 5028, 357, 49302, 8, 329, 10130, 38488, 290, 12173, 412, 12541, 198, 1003, 198, 1003, 220, 15069, 357, 34, 8, 12131, 37931, 9390, 390, 44021, 403, 3970,...
3.361905
1,365
from uwimg import * print("loading data...") train = load_classification_data(b"cifar.train", b"mnist.labels", 1) test = load_classification_data(b"cifar.test", b"mnist.labels", 1) print("done") print("training model...") batch = 128 iters = 3000 rate = 0.1 momentum = .9 decay = 0.01 #m = softmax_model(train.X.cols...
[ 6738, 334, 86, 9600, 1330, 1635, 198, 198, 4798, 7203, 25138, 1366, 9313, 8, 198, 27432, 796, 3440, 62, 4871, 2649, 62, 7890, 7, 65, 1, 66, 361, 283, 13, 27432, 1600, 275, 1, 10295, 396, 13, 23912, 1424, 1600, 352, 8, 198, 9288, ...
3.417778
900
from cvangysel import language_models, nltk_utils, io_utils import logging import itertools from lxml import etree SESSION2011, SESSION2012, SESSION2013, SESSION2014 = range(2011, 2014 + 1) INPUT_FORMATS = { SESSION2011: SessionTrack2011InputFormat, SESSION2012: SessionTrack2012InputFormat, ...
[ 6738, 269, 85, 648, 88, 741, 1330, 3303, 62, 27530, 11, 299, 2528, 74, 62, 26791, 11, 33245, 62, 26791, 198, 198, 11748, 18931, 198, 11748, 340, 861, 10141, 198, 198, 6738, 300, 19875, 1330, 2123, 631, 628, 628, 628, 628, 628, 628, ...
3
138
#!/usr/bin/env python3 import sys import os try: import ictv.renderer renderer_path = ictv.renderer.__path__[0] except (TypeError, ImportError): print('ICTV core could not be found, aborting') sys.exit(-1) remove = len(sys.argv) > 1 parent_dir = os.path.dirname(os.path.abspath(__file__)) themes_dir =...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 18, 198, 11748, 25064, 198, 11748, 28686, 198, 198, 28311, 25, 198, 220, 220, 220, 1330, 220, 713, 85, 13, 10920, 11882, 198, 220, 220, 220, 9851, 11882, 62, 6978, 796, 220, 713, 85, 13, ...
2.290878
581
from utils import config_parent_import from agent import alpha_beta_pruning config_parent_import() from board import Board from lucas_pedro_tiago_agent.node import Node bd = Board() bd.print_board() bd.process_move((5,3),Board.WHITE) bd.print_board() bd.process_move((3,2),Board.BLACK) bd.print_board() abp = alpha_beta...
[ 6738, 3384, 4487, 1330, 4566, 62, 8000, 62, 11748, 198, 6738, 5797, 1330, 17130, 62, 31361, 62, 1050, 46493, 198, 11250, 62, 8000, 62, 11748, 3419, 198, 6738, 3096, 1330, 5926, 198, 6738, 17115, 292, 62, 9124, 305, 62, 20259, 3839, 62...
2.778689
122
from typing import Generator import pytest from dragn import dice from dragn.dice import D4, D6, D8, D10, D12, D20 from dragn.dice.die import DieBuilder @pytest.fixture
[ 6738, 19720, 1330, 35986, 198, 198, 11748, 12972, 9288, 198, 6738, 1553, 4660, 1330, 17963, 198, 6738, 1553, 4660, 13, 67, 501, 1330, 360, 19, 11, 360, 21, 11, 360, 23, 11, 360, 940, 11, 360, 1065, 11, 360, 1238, 198, 6738, 1553, ...
2.822581
62
# coding: utf-8 """ Azure Blockchain Workbench REST API The Azure Blockchain Workbench REST API is a Workbench extensibility point, which allows developers to create and manage blockchain applications, manage users and organizations within a consortium, integrate blockchain applications into services and plat...
[ 2, 19617, 25, 3384, 69, 12, 23, 198, 198, 37811, 198, 220, 220, 220, 22134, 29724, 5521, 26968, 30617, 7824, 628, 220, 220, 220, 383, 22134, 29724, 5521, 26968, 30617, 7824, 318, 257, 5521, 26968, 1070, 641, 2247, 966, 11, 543, 3578, ...
2.242837
3,525
__author__ = 'Matthew' import traceback from arduinoserial import ArduinoSerial from time import time import logging logging.basicConfig(filename='../beercaddy.log', level=logging.INFO) if __name__ == '__main__': try: ser = ArduinoSerial() last_command = time() last_motor_command = time(...
[ 834, 9800, 834, 796, 705, 25372, 6, 198, 198, 11748, 12854, 1891, 198, 6738, 50065, 11996, 48499, 1330, 27634, 32634, 198, 6738, 640, 1330, 640, 198, 198, 11748, 18931, 198, 6404, 2667, 13, 35487, 16934, 7, 34345, 11639, 40720, 1350, 27...
2.069038
478
import skimage.measure
[ 11748, 1341, 9060, 13, 1326, 5015, 628 ]
3.428571
7