Skip to content

Instantly share code, notes, and snippets.

View nobane's full-sized avatar
🍔
github trained chatgpt on code without permission

nobane

🍔
github trained chatgpt on code without permission
View GitHub Profile
@bweigel
bweigel / clean_output_from_ipynb.sh
Created July 3, 2017 22:47
Clean Jupyter notebooks from output using jq
#!/bin/bash
cat $1 | jq '. + {"cells": [.cells[] | if .cell_type == "code" then . + {"outputs" : []} else . end]}'
@gocarlos
gocarlos / Eigen Cheat sheet
Last active September 10, 2024 02:31
Cheat sheet for the linear algebra library Eigen: http://eigen.tuxfamily.org/
// A simple quickref for Eigen. Add anything that's missing.
// Main author: Keir Mierle
#include <Eigen/Dense>
Matrix<double, 3, 3> A; // Fixed rows and cols. Same as Matrix3d.
Matrix<double, 3, Dynamic> B; // Fixed rows, dynamic cols.
Matrix<double, Dynamic, Dynamic> C; // Full dynamic. Same as MatrixXd.
Matrix<double, 3, 3, RowMajor> E; // Row major; default is column-major.
Matrix3f P, Q, R; // 3x3 float matrix.
anonymous
anonymous / api.py
Created May 19, 2014 17:27
Example of DRF code.
from django.shortcuts import get_object_or_404
from rest_framework import generics, serializers, status
from rest_framework.exceptions import APIException
from kitsune.wiki.models import Document
class DocumentShortSerializer(serializers.ModelSerializer):
products = serializers.SlugRelatedField(many=True, slug_field='slug')
@pcworld
pcworld / _README.md
Last active June 19, 2024 03:06
Linux Spotify Ad Mute
@artlung
artlung / flash-block-detector.js
Created December 1, 2011 22:17
Flash Block Detector
/*
Flash Blocker Detector
v0.1 of 2010-03-12
This script detects whether popular Flash blocking extensions are installed
and active on the current page. It is highly sensitive to the inner workings
of the extensions themselves, and it can only detect the current version
(at time of writing) of the following extensions:
* FlashBlock for Chromium / Google Chrome (#1)