Skip to content

Instantly share code, notes, and snippets.

View eleco's full-sized avatar
🏠
Working from home

Elec eleco

🏠
Working from home
View GitHub Profile
import asyncio
from pyppeteer import launch
async def get_article_titles(keywords):
# launch browser in headless mode
browser = await launch({"headless": False, "args": ["--start-maximized"]})
# create a new page
page = await browser.newPage()
A backup of http://sites.google.com/site/redcodenl/creating-shazam-in-java-1 just in case
Why is this necessary? Read http://sites.google.com/site/redcodenl/patent-infringement
Please fork, tweet about, etc.
----
Creating Shazam in Java
A couple of days ago I encountered this article: How Shazam Works
This got me interested in how a program like Shazam works… And more importantly, how hard is it to program something similar in Java?
@eleco
eleco / trending_pennystocks.py
Created May 2, 2021 14:03 — forked from lipton-green-tea/trending_pennystocks.py
A piece of code that sorts sentimentinvestor.com stocks to find promising penny stocks based on fundamental data.
@eleco
eleco / src_main_java_foo_bar_Trade.java
Created December 1, 2013 19:30
jbehave spring example
package foo.bar;
public class Trade {
int price;
Trade (int price){
this.price = price;
}
@eleco
eleco / JsonUtils.java
Created July 25, 2014 15:28
transform json native object to java map
import sun.org.mozilla.javascript.internal.Context;
import sun.org.mozilla.javascript.internal.NativeArray;
import sun.org.mozilla.javascript.internal.NativeObject;
import sun.org.mozilla.javascript.internal.Scriptable;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
@eleco
eleco / MultithreadTest.java
Created September 30, 2013 11:19
Synchronized vs AtomicReference
import com.google.common.base.Stopwatch;
import java.util.Date;
import java.util.List;
import java.util.concurrent.Callable;
import java.util.concurrent.ExecutorService;
import java.util.concurrent.Executors;
import java.util.concurrent.TimeUnit;
import java.util.concurrent.atomic.AtomicReference;

Executive Program in Algorithmic Trading (QuantInsti)

Python Sessions by Dr. Yves J. Hilpisch | The Python Quants GmbH

Online, 27. & 28. January 2018

@eleco
eleco / RandomBitcoinWalk.java
Created April 15, 2018 15:17
An experiment in generating a random walk for the bitcoins prices
package com.megalit;
import java.util.ArrayList;
import java.util.List;
import java.util.Random;
import java.util.concurrent.Callable;
import java.util.concurrent.ExecutorService;
import java.util.concurrent.Executors;
import java.util.concurrent.Future;
public class PerformanceUtil {
/*
A utility to detect slow running functions
*/
public static final int WARN_THRESHOLD_MILLIS =1000;
public static <T> T timed(Executable<T> function) {
@eleco
eleco / ReadMe.md
Created June 16, 2016 19:34 — forked from dobesv/ReadMe.md
Login script for custom auth0 database to auth via WordPress XML-RPC

You must provide the following configuration variables:

  1. WP_XMLRPC_URL = https://www.yourdomain.com/xmlrpc.php (replace with your domain and use http:// if you don't have SSL support)
  2. WP_ADMIN_USER = admin (use your own admin username)
  3. WP_ADMIN_PASSWORD = somepassword (use your own admin password)