Skip to content

Instantly share code, notes, and snippets.

@jewelsea
jewelsea / PopupButton.java
Last active October 31, 2016 16:05
Shows how to make a small context sensitive dialog which popups on pressing a button.
import java.util.Random;
import javafx.application.Application;
import javafx.event.*;
import javafx.geometry.Pos;
import javafx.scene.Scene;
import javafx.scene.control.*;
import javafx.scene.image.ImageView;
import javafx.scene.layout.VBox;
import javafx.scene.text.TextAlignment;
import javafx.stage.Stage;
@parmentf
parmentf / GitCommitEmoji.md
Last active November 17, 2024 19:13
Git Commit message Emoji
@TheRayTracer
TheRayTracer / mushrooms_explore_a.png
Last active October 6, 2022 20:30
Using R to explore the UCI mushroom dataset reveals excellent KNN prediction results.
mushrooms_explore_a.png
@nh2
nh2 / LevMarExample.hs
Created July 14, 2016 11:54
Example on how to use the levmar Haskell package for the Levenberg–Marquardt optimisation algorithm
-- Example made with levmar-1.2.1.5
{-# LANGUAGE ViewPatterns #-}
import qualified Data.Vector.Storable as V
import Numeric.LevMar
-- | Function over X with 1 parameter (a); we want to find
-- the `a` that best fits a set of
fun a x = sin (a*x)
@calebreister
calebreister / csv.lua
Created April 28, 2017 17:21
Lua script that converts a CSV file to the LaTeX tabular format
--To include this file, use
--dofile('csv.lua') or require('csv')
--Function to convert a *SV file to a Lua array
--file: the name of the file to read
--delim: the delimeter (default ',')
function dataToTable(file, delim)
--Set initial values
if delim == nil then --allow delim to be optional
delim = ','
@rverton
rverton / chrome_headless_screenshot.py
Created July 10, 2017 08:53
Make a screenshot with a headless google chrome in python
# Install chromedriver from https://sites.google.com/a/chromium.org/chromedriver/downloads
import os
from optparse import OptionParser
from selenium import webdriver
from selenium.webdriver.chrome.options import Options
CHROME_PATH = '/usr/bin/google-chrome'
plugins {
id "org.jetbrains.intellij" version "0.2.15"
id "maven"
id "de.undercouch.download" version "3.2.0"
}
task setupPycharm() {
if (!new File('.gradle/ide').exists()){
download {
src 'https://download.jetbrains.com/python/pycharm-professional-2017.2.tar.gz'
dest '.gradle/downloads/py.tar.gz'
@BoGnY
BoGnY / README.md
Last active November 13, 2024 22:02
[WINDOWS] How to enable auto-signing Git commits with GnuPG for programs that don't support it natively

[WINDOWS] How to enable auto-signing Git commits with GnuPG for programs that don't support it natively

This is a step-by-step guide on how to enable auto-signing Git commits with GPG for every applications that don't support it natively (eg. GitHub Desktop, Eclipse, Git Tower, ...)

Requirements

  • Install GPG4Win: this software is a bundle with latest version of GnuPG v2, Kleopatra v3 certificate manager, GNU Privacy Assistant (GPA) v0.9 which is a GUI that uses GTK+, GpgOL and GpgEX that are respectively an extension for MS Outlook and an extension for Windows Explorer shell
  • Install Git for Windows: so you can have a *nix based shell, this software is a bundle with latest version of Git which use MINGW environment, a Git bash shell, a Git GUI and an extension for Windows Explorer shell (Make sure your local version of Git is at least 2.0, otherwise Git don't have support for automatically sign your commits)
  • Verify