Dataset Viewer
Auto-converted to Parquet Duplicate
repo_name
stringlengths
6
112
path
stringlengths
4
204
copies
stringclasses
257 values
size
stringlengths
4
7
content
stringlengths
585
1.04M
license
stringclasses
15 values
0asa/scikit-learn
examples/cluster/plot_mini_batch_kmeans.py
265
4081
""" ==================================================================== Comparison of the K-Means and MiniBatchKMeans clustering algorithms ==================================================================== We want to compare the performance of the MiniBatchKMeans and KMeans: the MiniBatchKMeans is faster, but give...
bsd-3-clause
MJJoyce/climate
mccsearch/code/mainProgTemplate.py
5
4713
# # 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 "License"); you may n...
apache-2.0
CurryEleison/elblogreader
downloadrecent.py
1
1724
from AwsElbLogUtil import LogFileList, LogFileDownloader, UTC from datetime import datetime import boto3 import pandas as pd def main(): s3 = boto3.resource('s3') # reftime = datetime(2016, 11, 23, 23, 30, 00, 0, UTC()) # Set up to get recent logfiles loglistgetter = LogFileList(s3res = s3, minimumfil...
mit
oliverlee/sympy
sympy/external/tests/test_importtools.py
91
1215
from sympy.external import import_module # fixes issue that arose in addressing issue 6533 def test_no_stdlib_collections(): ''' make sure we get the right collections when it is not part of a larger list ''' import collections matplotlib = import_module('matplotlib', __import__kwargs={...
bsd-3-clause
ledbetdr/keras
tests/auto/test_regularizers.py
75
2372
import unittest import numpy as np np.random.seed(1337) # for reproducibility from keras.models import Sequential from keras.layers.core import Merge, Dense, Activation, Flatten, ActivityRegularization from keras.layers.embeddings import Embedding from keras.datasets import mnist from keras.utils import np_utils from ...
mit
jm-begon/scikit-learn
examples/ensemble/plot_ensemble_oob.py
259
3265
""" ============================= OOB Errors for Random Forests ============================= The ``RandomForestClassifier`` is trained using *bootstrap aggregation*, where each new tree is fit from a bootstrap sample of the training observations :math:`z_i = (x_i, y_i)`. The *out-of-bag* (OOB) error is the average er...
bsd-3-clause
nkmk/python-snippets
notebook/warnings_basic.py
1
2904
import warnings import pandas as pd df = pd.DataFrame([[0, 1, 2], [3, 4, 5]]) df.ix[0, 0] = 0 # /usr/local/lib/python3.7/site-packages/ipykernel_launcher.py:1: FutureWarning: # .ix is deprecated. Please use # .loc for label based indexing or # .iloc for positional indexing # # See the documentation here: # http://p...
mit
guaix-ucm/megaradrp
megaradrp/recipes/calibration/arc.py
2
31646
# # Copyright 2015-2021 Universidad Complutense de Madrid # # This file is part of Megara DRP # # SPDX-License-Identifier: GPL-3.0+ # License-Filename: LICENSE.txt # """Arc Calibration Recipe for Megara""" from __future__ import division, print_function import traceback from datetime import datetime import numpy fr...
gpl-3.0
danieljl/keras-image-captioning
keras_image_captioning/hyperparam_search.py
1
9552
import fire import itertools import os import signal import sh import sys import traceback from concurrent.futures import ThreadPoolExecutor from random import uniform from threading import Lock, Semaphore from time import sleep from tempfile import gettempdir, NamedTemporaryFile from .config import (active_config, w...
mit
jorge2703/scikit-learn
examples/applications/plot_species_distribution_modeling.py
254
7434
""" ============================= Species distribution modeling ============================= Modeling species' geographic distributions is an important problem in conservation biology. In this example we model the geographic distribution of two south american mammals given past observations and 14 environmental varia...
bsd-3-clause
SitiBanc/1061_NCTU_IOMDS
0927/Homework2/0927_HW2-1.py
1
1427
#!/usr/bin/env python3 # -*- coding: utf-8 -*- """ Created on Wed Sep 27 20:51:56 2017 @author: sitibanc """ import math from scipy.stats import norm import numpy as np import matplotlib.pyplot as plt # Black-Sholes定價模型 def blscall(s, l, t, r, sigma): d1 = math.log(s/l) + ( r + 0.5 * sigma ** 2) * t / sigma * mat...
apache-2.0
JPFrancoia/scikit-learn
examples/linear_model/plot_lasso_coordinate_descent_path.py
63
2945
""" ===================== Lasso and Elastic Net ===================== Lasso and elastic net (L1 and L2 penalisation) implemented using a coordinate descent. The coefficients can be forced to be positive. """ print(__doc__) # Author: Alexandre Gramfort <alexandre.gramfort@inria.fr> # License: BSD 3 clause from itert...
bsd-3-clause
Caranarq/01_Dmine
05_Industria/P0502/P0502.py
1
2972
# -*- coding: utf-8 -*- """ Started on fri, aug 3rd, 2018 @author: carlos.arana """ # Librerias utilizadas import pandas as pd import sys module_path = r'D:\PCCS\01_Dmine\Scripts' if module_path not in sys.path: sys.path.append(module_path) from VarInt.VarInt import VarInt from classes.Meta import Meta from Compi...
gpl-3.0
mbalassi/streaming-performance
src/test/resources/Performance/LatencyHistogram.py
1
2941
# -*- coding: utf-8 -*- import matplotlib.pyplot as plt import numpy as np import os import sys def read_csv_dir(csv_dir): retval = [] fnameList = [] for fname in os.listdir(csv_dir): if '.csv' in fname: fnameList.append(fname) for fname in fnameList: csv_list = read_csv(cs...
apache-2.0
alisidd/tensorflow
tensorflow/contrib/keras/api/keras/applications/vgg16/__init__.py
57
1133
# Copyright 2016 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...
apache-2.0
LucaDiStasio/thinPlyMechanics
python/curvatureImageAnalysis.py
1
2256
# -*- coding: utf-8 -*- ''' ===================================================================================== Copyright (c) 2016-2018 Université de Lorraine & Luleå tekniska universitet Author: Luca Di Stasio <luca.distasio@gmail.com> <luca.distasio@ingpec.eu> This program is free software...
apache-2.0
jwiggins/scikit-image
doc/tools/plot_pr.py
34
4128
import json import urllib import dateutil.parser from collections import OrderedDict from datetime import datetime, timedelta from dateutil.relativedelta import relativedelta import numpy as np import matplotlib.pyplot as plt from matplotlib.ticker import FuncFormatter from matplotlib.transforms import blended_transfo...
bsd-3-clause
End of preview. Expand in Data Studio
README.md exists but content is empty.
Downloads last month
11