Skip to content

Instantly share code, notes, and snippets.

Phaninder Pasupula pasupulaphani

Block or report user

Report or block pasupulaphani

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
pasupulaphani / IOTA-Java-tx-example
Last active Jan 7, 2019
new IOTA Java API (1.0.0-beta.5) transaction example
View IOTA-Java-tx-example
package iotaApi;
import java.util.ArrayList;
import java.util.List;
// jota - 1.0.0-beta1
import jota.IotaAPI;
import jota.dto.response.GetNewAddressResponse;
import jota.dto.response.GetNodeInfoResponse;
import jota.error.ArgumentException;
pasupulaphani / IOTA-NodeJs-tx-example
Created Oct 30, 2018
new IOTA NodeJs API (1.0.0-beta.5) transaction example
View IOTA-NodeJs-tx-example
const { composeAPI } = require('@iota/core') //1.0.0-beta.5
const { asciiToTrytes } = require('@iota/converter') //1.0.0-beta.5
const iota = composeAPI({
provider: ''
async function makeTx(seed, address) {
const transfers = [{
address: address,
pasupulaphani / OraclizeAgeOfPresidentProof.sol
Last active Jul 17, 2018
Trusted proof of data from a datasource using Oraclize
View OraclizeAgeOfPresidentProof.sol
pragma solidity ^0.4.0;
import "";
contract OraclizeAgeOfPresidentProof is usingOraclize {
string public result;
constructor() {
oraclize_setProof(proofType_Android | proofStorage_IPFS);
oraclize_setCustomGasPrice(2 * 1000000000);
function update() payable {
pasupulaphani / ERC20Coin.sol
Created May 27, 2018
Created using remix-ide: Realtime Ethereum Contract Compiler and Runtime. Load this file by pasting this gists URL or ID at
View ERC20Coin.sol
pragma solidity ^0.4.0;
contract ERC20Coin{
function totalSupply() constant returns (uint256 totalSupply);
function balanceOf(address _owner) constant returns (uint256 balance);
function transfer(address _to, uint256 _value) returns (bool success);
function transferFrom(address _from, address _to, uint256 _value) returns (bool success);
function approve(address _spender, uint256 _value) returns (bool success);
function allowance(address _owner, address _spender) constant returns (uint256 remaining);
View genesis_public_key
View gist:b57b7443379695fb34f4dc3421f3a7f8
Verifying my Blockstack ID is secured with the address 1AiCWcSHLmsK9Q2yC48Jdhq5sjtvwCZwSo
pasupulaphani /
Created Aug 21, 2016 — forked from alexbowe/
Demonstration of extracting key phrases with NLTK in Python
import nltk
text = """The Buddha, the Godhead, resides quite as comfortably in the circuits of a digital
computer or the gears of a cycle transmission as he does at the top of a mountain
or in the petals of a flower. To think otherwise is to demean the Buddha...which is
to demean oneself."""
# Used when tokenizing words
sentence_re = r'''(?x) # set flag to allow verbose regexps
([A-Z])(\.[A-Z])+\.? # abbreviations, e.g. U.S.A.
pasupulaphani / get_resp.js
Last active Aug 29, 2015
Handling requests and parsing responses via http.get or http.response
View get_resp.js
var Fiber = require('fibers')
var getResp = function (url, callback) {
var fn = Fiber(function () {
var resp = handleRequest(url);
if (resp.statusCode != 200) {
//handle success response
} else {
//handle other responses here
pasupulaphani / after_res_hooks.js
Last active Apr 30, 2020
Mongoose connection best practices
View after_res_hooks.js
var db = mongoose.connect('mongodb://localhost:27017/DB');
// In middleware
app.use(function (req, res, next) {
// action after response
var afterResponse = function() {{req: req}, "End request");
// any other clean ups
View ardrone-mission.js
var autonomy = require('ardrone-autonomy');
var mission = autonomy.createMission();
.zero() // current position/orientation as the base state of the kalman filter
.go({x:0, y:0, z:1.5})
You can’t perform that action at this time.