Skip to content

Instantly share code, notes, and snippets.

@blha303
blha303 / bc_col.py
Created May 24, 2017 15:02
A tool to load a Bandcamp collection and print the urls for all included albums and tracks
#!/usr/bin/env python3
# A tool to load a Bandcamp collection and print the urls for all included albums and tracks
import requests
import click
import json
def get_data(user):
data = requests.get("https://bandcamp.com/{}".format(user)).text
if " item_details" not in data:
return False
@criztovyl
criztovyl / bandcampwishlist.php
Last active August 27, 2018 00:06
Receives or displays a wishlist of a fan on bandcamp
<?php
/*
A small PHP script to display a bandcamp wishlist
Copyright (C) 2015 Christoph "criztovyl" Schulz
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
@p01
p01 / LICENSE.txt
Last active May 23, 2024 13:46 — forked from 140bytes/LICENSE.txt
Sudoku Solver in 140bytes
DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE
Version 2, December 2004
Copyright (C) 2011 Mathieu 'p01' Henri - http://www.p01.org/releases/
Everyone is permitted to copy and distribute verbatim or modified
copies of this license document, and changing it is allowed as long
as the name is changed.
DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE
from opencv import cv as opencv
from opencv import highgui
import sys
print "Inizializzazione webcam"
camera = highgui.cvCreateCameraCapture(-1)
if (camera):
print "Camera inizializzata"
else:
import hypermedia.video.*;
OpenCV opencv;
void setup() {
size( 640, 480 );
// open video stream
opencv = new OpenCV( this );
opencv.capture( 640, 480 );
@mikeyk
mikeyk / redis_session_backend.py
Created April 8, 2011 18:01
A redis backend for Django Sessions, tested on Django 1.3+
from django.contrib.sessions.backends.base import SessionBase, CreateError
from django.conf import settings
from django.utils.encoding import force_unicode
import redis
class SessionStore(SessionBase):
""" Redis store for sessions"""
def __init__(self, session_key=None):
self.redis = redis.Redis(