Skip to content

Instantly share code, notes, and snippets.

Anon5 pjha1994

Block or report user

Report or block pjha1994

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
@pjha1994
pjha1994 / blockchain.md
Created Jan 9, 2018 — forked from joepie91/blockchain.md
Is my blockchain a blockchain?
View blockchain.md

Your blockchain must have all of the following properties:

  • It's a merkle tree, or a construct with equivalent properties.
  • There is no single point of trust or authority; nodes are operated by different parties.
  • Multiple 'forks' of the blockchain may exist - that is, nodes may disagree on what the full sequence of blocks looks like.
  • In the case of such a fork, there must exist a deterministic consensus algorithm of some sort to decide what the "real" blockchain looks like (ie. which fork is "correct").
  • The consensus algorithm must be executable with only the information contained in the blockchain (or its forks), and no external input (eg. no decisionmaking from a centralized 'trust node').

If your blockchain is missing any of the above properties, it is not a blockchain, it is just a ledger.

View Effective_Engineer.md

Effective Engineer - Notes

What's an Effective Engineer?

  • They are the people who get things done. Effective Engineers produce results.

Adopt the Right Mindsets

@pjha1994
pjha1994 / install_ruby_rpi.sh
Created Dec 15, 2017 — forked from blacktm/install_ruby_rpi.sh
A Bash script to install Ruby 2.4 on the Raspberry Pi (Raspbian)
View install_ruby_rpi.sh
#!/bin/bash
# --------------------------------------------------------------------------------------------
# Installs Ruby 2.4 using rbenv/ruby-build on the Raspberry Pi (Raspbian)
#
# Run from the web:
# bash <(curl -s https://gist.githubusercontent.com/blacktm/8302741/raw/install_ruby_rpi.sh)
# --------------------------------------------------------------------------------------------
# Welcome message
View master.py
import subprocess
import httplib2
import requests
from datetime import datetime
FORMAT = '%d-%m-%Y %H:%M:%S'
my=open('log.txt','a',encoding='utf-8')
def test_internet():
my.write('\nin test_internet'+'-------------------------'+datetime.now().strftime(FORMAT)+'\n')
while(True):
try:
View gist:05a852430427738f44c0
import re
from bs4 import BeautifulSoup
from bs4 import SoupStrainer
import os
import httplib2
from datetime import datetime
c=0
def make_soup(s):
#test_internet()
View gist:f662ea5b49f128333426
import re
from bs4 import BeautifulSoup
from bs4 import SoupStrainer
import os
import httplib2
c=0
def make_soup(s):
match=re.compile('https://|http://|www.|.com|.in|.org|gov.in')
if re.search(match,s):
http = httplib2.Http()
You can’t perform that action at this time.