Skip to content

Instantly share code, notes, and snippets.

@aparrish
aparrish / predictive-text-concatenated-word-vectors.ipynb
Created July 18, 2018 22:24
Predictive text with concatenated word vectors. Code examples released under CC0 https://creativecommons.org/choose/zero/, other text released under CC BY 4.0 https://creativecommons.org/licenses/by/4.0/
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@jfstenuit
jfstenuit / Huawei WWAN.md
Last active September 6, 2025 07:44
Using a Huawei WWAN dongle on Linux

Introduction

Installing Huawei E3531 Surf Stick on Linux

May be a valuable insight for more modern surf sticks like Huawei E8231 and the likes ...

Linux is currently Ubuntu, Debian or Raspbian should be similar

The problem

This Huawei Surf stick has several USB mode. It appears first as CD-ROM-like device, so that Windows users can install their driver, then switches mode to appear as "something else". By defaut, this is a network card (virtually connected to a router),

Google Query String Parameters

Google Search

Query:

http://...

| URL Parameter | Accepted Values | Description |

@jovianlin
jovianlin / clustering_cosine_similarity_matrix.py
Last active December 21, 2020 07:53
Clustering cosine similarity matrix
"""
### Problem Statement ###
Let's say you have a square matrix which consists of cosine similarities (values between 0 and 1).
This square matrix can be of any size.
You want to get clusters which maximize the values between elemnts in the cluster.
For example, for the following matrix:
| A | B | C | D
A | 1.0 | 0.1 | 0.6 | 0.4
B | 0.1 | 1.0 | 0.1 | 0.2
@initbrain
initbrain / livebox_utility.py
Last active November 4, 2023 17:35
Script de renouvellement d'adresse IP (prise en charge des Livebox 1 et 2)
#!/usr/bin/env python
# -*- coding:utf-8 -*-
# Julien Deudon (initbrain)
# Livebox_utility v0.2 du 26/09/2011
# Testé sous Windows XP SP3 (32bits) avec VirtualBox
# et sous Windows 7 Pro SP1 (64bits) grâce à Py2exe :
# https://www.initbrain.fr/static/code/Livebox_utility.rar
import urllib2, base64, re