Skip to content

Instantly share code, notes, and snippets.

@jlas
jlas / gist:10b8db183de909f26265
Last active Aug 29, 2015
Take a screenshot with selenium
View gist:10b8db183de909f26265
#!/usr/bin/env python
'''Script for taking a screenshot with selenium
Install selenium using pip:
[sudo] pip install selenium
'''
import os
from selenium import webdriver
@jlas
jlas / RandomizedHillClimbing.java
Created Mar 15, 2015
random restart in opt.RandomizedHillClimbing
View RandomizedHillClimbing.java
package opt;
import shared.Instance;
/**
* A randomized hill climbing algorithm
* @author Andrew Guillory gtg008g@mail.gatech.edu
* @version 1.0
*/
public class RandomizedHillClimbing extends OptimizationAlgorithm {
View funcptr.c
#include <stdio.h>
void callFunc(int (*funcp)(void)) {
printf("%d", (*funcp)());
}
int func() {
return 1;
}