Skip to content

Instantly share code, notes, and snippets.

0xb0c29550Fbfe0423728ADAB0C7356c0e26add4c6
0xb0c29550Fbfe0423728ADAB0C7356c0e26add4c6
@parthi2929
parthi2929 / MyFirstToken.sol
Last active December 1, 2017 06:06
First ERC20 compliant token creation for learning purposes
pragma solidity ^0.4.0;
interface ERC20 {
function totalSupply() public constant returns (uint _totalSupply);
function balanceOf(address _owner) public constant returns (uint balance);
function transfer(address _to, uint _value) public returns (bool success);
function transferFrom(address _from , address _to, uint _value) public returns (bool success);
function approve(address _spender, uint _value) public returns (bool success);
function allowance(address _owner, address _spender) public constant returns (uint remaining);
event Transfer(address indexed _from, address indexed _to, uint _value);
@parthi2929
parthi2929 / route.js
Last active December 9, 2017 04:25
trying to deploy rinkeby web3 in nodejs server.. giving error: Invalid JSON RPC response: ""
var socketServer;
var Web3 = require('web3');
var web3 = new Web3();
var coursetroContract;
var coursetro;
exports.initialize = function(socketServer)
{
@parthi2929
parthi2929 / Candlestick RSI Dummy OHLC.html
Created December 9, 2017 02:23
Highcharts candle stick demo with rsi indicator - data source is a dummy google sheets OHLC random (but structured) data
<!DOCTYPE html><html>
<head>
<title>Test</title>
<script type='text/javascript' src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.3/jquery.min.js"></script>
<script type='text/javascript' src="http://code.highcharts.com/stock/highstock.js"></script>
<script type='text/javascript' src="http://code.highcharts.com/stock/modules/data.js"></script>
<script src="https://code.highcharts.com/stock/indicators/indicators.js"></script>
<script src="https://code.highcharts.com/stock/indicators/rsi.js"></script>
<script type='text/javascript'> </script>
@parthi2929
parthi2929 / mongoose_ohlc_dummy_1.js
Last active January 11, 2018 14:56
File to push OHLC data to data array (working with ugly work around : separate schema for read)
var mongoose = require('mongoose');
var ohlcSchema = mongoose.Schema(
{
_id:{type: Number, unique: true},
data: [Number]
},
{
collection:'ohlc-min-DB'
}
@parthi2929
parthi2929 / dummy_ohlc_1.html
Created January 11, 2018 12:30
created from dummy ohlc generated and stored in mongdb cloud
<!DOCTYPE html>
<html lang="en">
<head>
<title>Ticker Client Example</title>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0-beta.2/css/bootstrap.min.css">
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.2.1/jquery.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.12.6/umd/popper.min.js"></script>
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0-beta.2/js/bootstrap.min.js"></script>
{ "_id" : 1, "__v" : 0, "data" : [ [ 1518449823, 569998, 569998, 569998, 569998, 36 ], [ 1518449853, 569998, 569998, 569998, 569998, 36 ], [ 1518449933, 569998, 569998, 569998, 569998, 36 ], [ 1518449973, 569998, 569998, 569998, 569998, 36 ], [ 1518450063, 569998, 569998, 569998, 569998, 36 ], [ 1518450093, 569998, 569998, 569998, 569998, 36 ], [ 1518450183, 569998, 569998, 569998, 569998, 36 ], [ 1518450213, 569998, 569998, 569998, 569998, 36 ], [ 1518450303, 569998, 569998, 563050, 563050, 36 ], [ 1518450333, 563050, 563050, 563050, 563050, 36 ], [ 1518450423, 563050, 563050, 563050, 563050, 36 ], [ 1518450453, 563050, 563050, 563050, 563050, 36 ], [ 1518450543, 563050, 563050, 563050, 563050, 36 ], [ 1518450573, 563050, 563050, 563050, 563050, 36 ], [ 1518450663, 563050, 568999, 563050, 568999, 36 ], [ 1518450693, 568999, 568999, 568999, 568999, 36 ], [ 1518450783, 568999, 568999, 568999, 568999, 36 ], [ 1518450813, 568999, 568999, 568999, 568999, 36 ], [ 1518450903, 568999, 568999, 563351, 563351, 36 ], [
@parthi2929
parthi2929 / crypto_ticker_api_vba.txt
Created February 14, 2018 08:27
For me, I am getting a strange error which I could not resolve. Below is my code. (check problem area). Error screenshot: http://i.cubeupload.com/mRjQt5.png
Private Sub Refresh_Click()
Dim http As Object, JSON As Object, i As Integer
Dim posBTC As Integer, posETH As Integer, posINR As Integer, posUSDT As Integer
Dim baseCol As Integer, buyCol As Integer, sellCol As Integer, targetCol As Integer, valueCol As Integer
Dim JSON1 As Dictionary
Set http = CreateObject("MSXML2.XMLHTTP")
'Coindelta
@parthi2929
parthi2929 / simple_kalman_filter.py
Created March 29, 2018 05:48
This script attempts to do programmatically the concept explained in awesome video tutorial from Michel van Biezen.
"""
This script attempts to program and visualize the concept explained in
video tutorial from Michel van Biezen here:
https://www.youtube.com/watch?v=PZrFFg5_Sd0&t=40s
The aforementioned video is 5th part of the series
"""
import matplotlib.pyplot as plt
import numpy as np