Skip to content

Instantly share code, notes, and snippets.

View kardolus's full-sized avatar
🔥
crushing it

Guillermo Kardolus kardolus

🔥
crushing it
View GitHub Profile
@kardolus
kardolus / 30425.jsx
Last active March 11, 2016 17:47
Benchmark PhotoShop Actions in Extended Javascript
var ORIGINAL = 'E:\\FILES\\30425\\ORIGINAL'; // input folder
var PRE_PROCESSED = 'E:\\FILES\\30425\\PRE_PROCESSED'; // output folder
var benchmarkFile = 'E:\\LOG\\benchmark.csv'; // time messurements
/**
* The functions you combine in this method will be benchmark tested
* @param fileName - Target file
*/
function psAction(fileName){
psOpenFile(fileName);
--[[
URLs MUST conform to RFC 1738, that is, an URL is a string in the form:
[ftp://][<user>[:<password>]@]<host>[:<port>][/<path>][type=a|i]
--]]
local ftp = require("socket.ftp")
local ltn12 = require("ltn12")
local url = require("socket.url")
local socket = require("socket")
local pretty = require("pl.pretty")
@kardolus
kardolus / Heap.java
Last active February 20, 2016 04:42
BinaryHeap implemented using an array.
package us.kardol.datastructure;
import java.util.Arrays;
/**
* Created by Guillermo Kardolus on 2/13/16.
*
* Wikipedia:
* the heap property: If A is a parent node of B then the key of node A is ordered with respect to the key of
* node B with the same ordering applying across the heap.
@kardolus
kardolus / Set.java
Last active February 24, 2016 17:33
Implementation of a Set with an array.
package us.kardol.datastructure;
/**
* Created by Guillermo Kardolus on 2/24/16.
*/
public class Set {
private int size = 0;
private int capacity = 4;
private Object[] elements = new Object[capacity];
import java.io.*;
import java.util.*;
class Solution {
public static void main(String[] args) {
Test test = new Test();
test.runTests();
}
}
import java.io.*;
import java.util.*;
class Solution {
public static void main(String[] args) {
Test test = new Test();
test.runTests();
}
}
import java.io.*;
import java.util.*;
class Solution {
public static void main(String[] args) {
Test test = new Test();
test.runTests();
}
}
@kardolus
kardolus / Sorting Algorithms
Last active September 18, 2017 22:32
Sorting in Java
import java.io.*;
import java.util.*;
class Solution {
public static void main(String[] args) {
int[] original = {100, 113, 110, 85, 105, 102, 86, 63, 81, 101, 94, 106,
101, 79, 94, 90, 97};
int[] input = null;
@kardolus
kardolus / bst.java
Created September 18, 2017 12:21
BST
import java.io.*;
import java.util.*;
class Solution {
public static void main(String... args){
System.out.println("Coding a Binary Search Tree");
int[] original = {100, 113, 110, 85, 105, 102, 86, 63, 81, 101, 94, 106,
101, 79, 94, 90, 97};