Skip to content

Instantly share code, notes, and snippets.

; Gist support
(require 'gist)
import math
def is_prime(n):
for i in range(2, int(math.sqrt(n)) + 1):
if n % i == 0:
return False
return True
cur_no = 1
count = 0
while count < 10001:

Spicing up Cheese - Sexier Form and More Function

Goals of the Project

The aim of this project is to make Cheese sexier than it is right now. ["It should help its users get laid"][1]. This can be accomplished with a slicker UI and a few more features.

Motivation

While Cheese is an easy to use webcam application, it lacks a bit in the coolness department. There are only a limited set of effects, and no live preview. You can't make cool pictures without having to resort to GIMP or Photoshop. I'd like Cheese to be a one-stop cool picture production factory - Take a shot, picking one of several effects shown live to you, and directly post to wherever the user would like to show off (flickr, Facebook, etc).

# PROTOTYPE CODE
# ANYONE USING THIS WILL BE SHOT
import sys
import time
from ConfigParser import SafeConfigParser
import pygst
pygst.require("0.10")
using Gst;
using GLib;
MainLoop loop;
private bool bus_callback(Bus bus, Message message)
{
switch(message.type)
{
case MessageType.ERROR:
// Prototype code - Messy, Undocumented and Will crash at some point
// Pipeline: fakevideosrc -> (effects loaded from the files specified in commandline) -> ogg output
// Compile: valac --pkg gstreamer-0.10 --pkg gee-1.0 effects.vala
// Run: ./effects output.ogg noir.effect warptv.effect
// Author: Yuvi Panda (me@yuvi.in)
using Gst;
using GLib;
using Gee;
// Author: Unkown
#include<stdio.h>
#include<conio.h>
#include<graphics.h>
#include<stdlib.h>
void main()
{
int gd=DETECT,gm,n;
float r=0,g=0,b=0;
float y=0,i=0,q=0;
from math import *
import sys
x = {}
n = int(sys.argv[1])
def place(k, i):
if (i in x.values()):
return False
j = 1
VALA_CFLAGS = \
--thread \
--vapidir vapi \
--pkg config \
--pkg gtk+-2.0
AM_CPPFLAGS = \
-DBINDIR=\"$(bindir)\" \
-DDATADIR=\"$(datadir)\" \
-DPREFIX=\""$(prefix)"\" \
// Lex program to pretty-format json file. ***WARNING-Amateurish***
%{
int string=0;
int gi=0;
void indent(int i);
int prev_close=0;
%}
%%
\\\" { //Matching an escaped double quote