Skip to content

Instantly share code, notes, and snippets.

@golamSaroar
golamSaroar / autoencoders-dimensionality-reduction.ipynb
Created August 27, 2020 08:00
Dimensionality Reduction using an Autoencoder in Python
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@serazing
serazing / xr_lowess.py
Last active October 24, 2024 03:25
Lowess for xarray
import numpy as np
import numba
import xarray as xr
@numba.jit(nopython=True)
def lowess_1d(y, x, alpha=2. / 3., it=10):
"""lowess(x, y, f=2./3., iter=3) -> yest
Lowess smoother: Robust locally weighted regression.
The lowess function fits a nonparametric regression curve to a scatterplot.
The arrays x and y contain an equal number of elements; each pair
@edubd
edubd / set_operations_dataframes.py
Last active September 6, 2022 05:55
set operations applied to pandas DataFrames
#Set Operations applied to pandas DataFrames
import pandas as pd
#(1)-Defining the DataFrames
# 1.1 Python students
P = pd.DataFrame ({"name":["Elizabeth","Darcy"],
"email":["bennet@xyz.com","darcy@acmecorpus.com"]})
# 1.2 SQL students
@wekurtz
wekurtz / matplotlib-interactive-mode.md
Last active March 28, 2020 20:59
Matplotlib hangs in PyCharm (MacOS)

My environment

  • MacOS Sierra v10.12.6
  • PyCharm Community 2018.3
  • Python v3.6.8
  • Matplotlib v2.2.3

Symptom

  1. This snippet hangs in PyCharm:
@timothydmorton
timothydmorton / scattersky-operation-demo.py
Created September 26, 2017 16:55
Playing with custom operations in holoviews
import holoviews as hv
hv.notebook_extension('bokeh')
import param
from holoviews.operation.datashader import datashade, dynspread
import colorcet as cc
import datashader
import numpy as np
import pandas as pd
@pierrejoubert73
pierrejoubert73 / markdown-details-collapsible.md
Last active October 10, 2025 13:30
How to add a collapsible section in markdown.

How to add a collapsible section in markdown

1. Example

Click me

Heading

  1. Foo
  2. Bar
    • Baz
  • Qux
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@ZhengRui
ZhengRui / updateMatplotlibPlot.py
Last active March 28, 2020 21:31
Update Matplotlib Plot
#! /usr/bin/env python
import matplotlib
import matplotlib.pyplot as plt
matplotlib.style.use("ggplot")
import numpy as np
import time
def newfig(l):