This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
celeryd > /tmp/celery.log 2>&1 3>&1 & |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
for i in `ps aux | grep [c]eleryd | awk '{print $2}'`; do kill -9 $i; done |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Codenames for Debian suites according to their alias. Update these when | |
# needed. | |
UNSTABLE_CODENAME="sid" | |
TESTING_CODENAME="wheezy" | |
STABLE_CODENAME="squeeze" | |
STABLE_BACKPORTS_SUITE="$STABLE_CODENAME-backports" | |
# Required to test installation into pbuilder chroot. | |
PBUILDERSATISFYDEPENDSCMD="/usr/lib/pbuilder/pbuilder-satisfydepends-gdebi" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
oq-engine debian packaging | |
####### | |
Preface | |
####### | |
The purpose of this document is to share a different approach to debian/ubuntu | |
packaging of oq-engine. | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class Main { | |
public static void main(String[] args) { | |
Thread thread = new Thread(new GameKernel()); | |
thread.run(); | |
} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import java.awt.Dimension; | |
import javax.swing.JFrame; | |
import javax.swing.JScrollPane; | |
public class GameWindow extends JFrame { | |
private JScrollPane viewer; | |
private GameCanvas canvas; | |
public static final Dimension SIZE = new Dimension(800, 600); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import java.awt.Canvas; | |
import java.awt.Color; | |
import java.awt.Graphics2D; | |
import java.awt.image.BufferStrategy; | |
public class GameCanvas extends Canvas { | |
private BufferStrategy strategy; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import java.awt.event.ActionEvent; | |
import java.awt.event.ActionListener; | |
import javax.swing.Timer; | |
public class GameKernel implements Runnable { | |
public static int playerX = 400; | |
public static int playerY = 300; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def weighted_quantile(weights, curves, quantile): | |
""" | |
:param weights: | |
Array of weights, 1 for each input curve. | |
:param curves: | |
2D array of curve PoEs. Each row represents the PoEs for a single curve | |
:param quantile: | |
Quantile value to calculate. Should in the range [0.0, 1.0]. | |
""" | |
# Each curve needs to be associated with a weight: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def compute_quantile_curve(curves, quantile): | |
""" | |
Compute the quantile aggregate of a set of curves. This method is used in | |
the case where hazard curves are computed using the Monte-Carlo logic tree | |
sampling approach. In this case, the weights are implicit. | |
:param curves: | |
2D array-like collection of hazard curve PoE values. Each element | |
should be a sequence of PoE `float` values. Example:: |
OlderNewer