Skip to content

Instantly share code, notes, and snippets.

pragma solidity 0.5.16;
interface Token {
/// @return total amount of tokens
function totalSupply() external view returns (uint256 supply);
/// @param _owner The address from which the balance will be retrieved
/// @return The balance
function balanceOf(address _owner) external view returns (uint256 balance);

Rules of Laws and Reforms Group(to avoid infighting and promote healthy discussions)

  1. We shall discuss in detail and try to understand about the working of any proposed system or law. This means reading the articles and also if somebody suggests any law reading the proposed law draft and giving your opinion and suggesting changes. This takes time but if we want to change our country we need to invest our time.
  2. As far as possible we do not take names of any political parties or persons unless there context to do so. Focus should be solely on discussing about details and sections of proposed systems and laws.
  3. As educated and responsible members of society, favouritism of any person or party should be avoided. Importance should be given to the issue that we are trying to solve. Support of good issues or systems or laws which is proven to bring about change and reduce graft or corruption is most welcome.
  4. Personal attacks on members should be avoided.
  5. Posting any forwards unless relevant to the grou
import json
from eth_utils import encode_hex
from web3 import HTTPProvider, Web3
from solc import compile_source
from web3.contract import ConciseContract
# Solidity source code
contract_source_code = '''
import requests
import time
def payment():
return requests.post('http://localhost:5011/api/v1/payments/0xb0723f82B595De47920C9A1605b7dF754d8cDe5C/0xf1a500EA6B3afDcF98C8ff466dB68875003Bb686',
headers={ 'Content-Type': 'application/json', }, json={ 'amount': 1 })
$ ./install-lts-kernel-v3.sh
Do not just run this. Examine and judge. Run at own risk.
Do not run on virtualbox.
Intended to be used on ssd/harddisk.
Press enter to continue
Installing with yay
[sudo] password for krishna:
import requests
import time
def payment():
return requests.post('http://localhost:5012/api/v1/payments/0x610f3c3C1998FAd6A659A9f5Bb83962DA27eAf1d/0x80Cf7AcFde7Cb110675cD7B478c167cF1A5b2f0e',
headers={ 'Content-Type': 'application/json', }, json={ 'amount': 1 })
#include <iostream>
using std::cout;
using std::cin;
struct Array {
int *A;
int size;
int length;
};
@agatsoh
agatsoh / python3.7.3_on_MX_Linux_18_1.md
Last active September 8, 2020 05:52
Install python 3.7 on MX Linux 18.1

Installing Python 3.7.3 on MX-linux 18.1

I was following this blog to install python 3.7.3 on my MX-linux 18.1 machine. Step by step procedure is as follows

  1. Install the pre-requisites

sudo apt-get install build-essential checkinstall
sudo apt-get install libreadline-gplv2-dev libncursesw5-dev libssl-dev \
 libsqlite3-dev tk-dev libgdbm-dev libc6-dev libbz2-dev libffi-dev
@agatsoh
agatsoh / list-unit-files
Created October 12, 2018 05:29
systemctl list-unit-files --state=enabled output
systemctl list-unit-files --state=enabled
UNIT FILE STATE
var-lib-snapd-snap-core-5328.mount enabled
org.cups.cupsd.path enabled
autovt@.service enabled
avahi-daemon.service enabled
bluetooth.service enabled
dbus-org.bluez.service enabled
dbus-org.freedesktop.Avahi.service enabled
dbus-org.freedesktop.NetworkManager.service enabled
@agatsoh
agatsoh / oct_11_2018_20_26_49
Created October 11, 2018 17:01
journalctl -keb -1 output at the particular time.
[krishna@krishna-pc ~]$ journalctl -keb -1
Oct 11 20:24:53 krishna-pc kernel: RSP: 002b:00007ffcc35a6aa8 EFLAGS: 00000206 ORIG_RAX: 0000000000000053
Oct 11 20:24:53 krishna-pc kernel: RAX: ffffffffffffffda RBX: 00007ffcc35a6b60 RCX: 00007ff4031d337b
Oct 11 20:24:53 krishna-pc kernel: RDX: 0000000000000000 RSI: 00000000000001ff RDI: 00007ffcc35a6b60
Oct 11 20:24:53 krishna-pc kernel: RBP: 0000000000000012 R08: 0000000000000000 R09: 0000562b4a330bd0
Oct 11 20:24:53 krishna-pc kernel: R10: 0000000000000011 R11: 0000000000000206 R12: 00000000000001c0
Oct 11 20:24:53 krishna-pc kernel: R13: 0000000000000078 R14: 00007ffcc35a6b76 R15: 0000000000000000
Oct 11 20:24:57 krishna-pc kernel: watchdog: BUG: soft lockup - CPU#7 stuck for 22s! [TaskSchedulerFo:3697]
Oct 11 20:24:57 krishna-pc kernel: Modules linked in: ccm rfcomm fuse bnep uvcvideo btusb btrtl btbcm videobuf2_vmalloc btintel videobuf2_memops videobuf2_v4l2 videobuf2_common bluetooth vid>
Oct 11 20:24:57 krishna-pc kernel: ghash_clmulni_intel vfat zstd_deco