Skip to content

Instantly share code, notes, and snippets.

View subwaymatch's full-sized avatar

Ye Joo Park subwaymatch

View GitHub Profile
@mathebox
mathebox / color_conversion.py
Created April 12, 2015 16:47
Python methods to convert colors between RGB, HSV and HSL
import math
def rgb_to_hsv(r, g, b):
r = float(r)
g = float(g)
b = float(b)
high = max(r, g, b)
low = min(r, g, b)
h, s, v = high, high, high
#!/usr/bin/env python
# -*- coding: utf-8 -*-
#
# pegasos.py
#
# Copyright 2013 nipun batra <nipunb@iiitd.ac.in>
#
# 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 2 of the License, or
@cdata
cdata / package.json
Created July 5, 2011 02:40
Skeleton for package.json
{
"name" : "SomeName",
"description" : "A description.",
"keywords" : ["some", "name", "foo", "bar"],
"homepage" : "http://some.name/",
"version" : "1",
"author" : {
"name" : "Christopher Joel",
"email" : "chris@scriptolo.gy",
"url" : "http://scriptolo.gy"
//
// Regular Expression for URL validation
//
// Author: Diego Perini
// Created: 2010/12/05
// Updated: 2018/09/12
// License: MIT
//
// Copyright (c) 2010-2018 Diego Perini (http://www.iport.it)
//