Skip to content

Instantly share code, notes, and snippets.

#include <stdio.h>
void callFunc(int (*funcp)(void)) {
printf("%d", (*funcp)());
}
int func() {
return 1;
}
@jlas
jlas / RandomizedHillClimbing.java
Created March 15, 2015 05:49
random restart in opt.RandomizedHillClimbing
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 {
@jlas
jlas / gist:10b8db183de909f26265
Last active August 29, 2015 14:24
Take a screenshot with selenium
#!/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