Skip to content

Instantly share code, notes, and snippets.

View zavsnar's full-sized avatar

Alex Surov zavsnar

View GitHub Profile
@zavsnar
zavsnar / dns-sync.sh
Created June 19, 2020 05:55 — forked from matthiassb/dns-sync.sh
Init.d script for keeping WSL resolv.conf in-sync with Windows
#! /bin/bash
### BEGIN INIT INFO
# Provides: dns-sync
# Required-Start:
# Required-Stop:
# Default-Start: S
# Default-Stop:
# Short-Description: Synchronizes /etc/resolv.conf in WLS with Windows DNS - Matthias Brooks
### END INIT INFO
@zavsnar
zavsnar / som_clustering
Last active August 29, 2015 14:10
Clustering with Self-Organizing Map (SOM).
# coding=utf8
"""
Neural net. Self-Organizing Map (SOM) or Kohonen Layer for unsupervised machine learning
"""
import logging
import numpy as np
from scipy import sparse
from scipy.sparse import issparse, csr_matrix