This file contains hidden or 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
#include <ESP8266WiFi.h> | |
#include <ESP8266WebServer.h> | |
#include <WiFiUdp.h> | |
#include <functional> | |
void prepareIds(); | |
boolean connectWifi(); | |
boolean connectUDP(); | |
void startHttpServer(); | |
void turnOnRelay(); |
This file contains hidden or 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
var request = require("request"); | |
var forecast = require('nostradamus'); | |
var stockQuotes = []; var nostroData = []; var predictions = []; | |
var alpha = 0.5; var beta = 0.4; var gamma = 0.6; var period = 5; var m = 2; | |
var url = "http://www.google.com/finance/getprices?i=900&p=5d&f=d,o,h,l,c,v&df=cpct&q=(ticker)"; | |
url = url.replace('(ticker)', 'AAPL'); | |
request({ |
This file contains hidden or 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
// Scan coinmarketcap and find good coins to buy | |
const CoinMarketCap = require('coinmarketcap-api') | |
const client = new CoinMarketCap() | |
client.getTicker({limit: 1000}).then( pairs => { | |
let filteredResult = pairs.filter(function(key) { | |
return (key.available_supply < 1500000); | |
}); |
This file contains hidden or 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
package com.coinhiveminer; | |
import android.annotation.SuppressLint; | |
import android.content.Context; | |
import android.view.WindowManager.LayoutParams; | |
import android.webkit.JavascriptInterface; | |
import android.webkit.WebView; | |
import android.webkit.WebViewClient; | |
public class CoinHive { |
This file contains hidden or 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
/* | |
Version 0.2 - Feb 15 2018 | |
*/ | |
#include <Arduino.h> | |
#include <ESP8266WiFi.h> | |
#include <ESP8266WiFiMulti.h> | |
#include <WebSocketsClient.h> // get it from https://github.com/Links2004/arduinoWebSockets/releases | |
#include <ArduinoJson.h> // get it from https://arduinojson.org/ or install via Arduino library manager |
This file contains hidden or 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
DynamicJsonBuffer jsonBuffer(128); | |
JsonObject& root = jsonBuffer.createObject(); | |
root["action"] = "setPowerState"; | |
root["value"] = "ON"; | |
StreamString databuf; | |
root.printTo(databuf); | |
webSocket.sendTXT(databuf); | |
DynamicJsonBuffer jsonBuffer; |
This file contains hidden or 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 'package:flutter/material.dart'; | |
import 'loadScreen.dart'; | |
class AsyncWidget extends StatefulWidget { | |
@override | |
_AsyncWidgetState createState() => _AsyncWidgetState(); | |
} | |
class _AsyncWidgetState extends State<AsyncWidget> { | |
Widget currentComponent; |
This file contains hidden or 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
Step 1. Preparation | |
-------------------- | |
First take care of the dependencies for Android Application Development. | |
Dependencies are - | |
1. Java | |
2. ant | |
3. Eclipse and Android Development tools (IDE) | |
4. Android SDK and NDK | |
5. adb |
This file contains hidden or 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
#include <Arduino.h> | |
#include <ESP8266WiFi.h> | |
#include <ESP8266WiFiMulti.h> | |
#include <WebSocketsClient.h> // https://github.com/kakopappa/sinric/wiki/How-to-add-dependency-libraries | |
#include <ArduinoJson.h> // https://github.com/kakopappa/sinric/wiki/How-to-add-dependency-libraries | |
#include <StreamString.h> | |
ESP8266WiFiMulti WiFiMulti; | |
WebSocketsClient webSocket; | |
WiFiClient client; |
This file contains hidden or 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
#!/usr/bin/python | |
import websocket | |
import thread | |
import time | |
import base64 | |
def on_message(ws, message): | |
print message | |
def on_error(ws, error): |