Skip to content

Instantly share code, notes, and snippets.

View araa47's full-sized avatar
🛠️
Building 24*7

Akshay araa47

🛠️
Building 24*7
  • Hong Kong
View GitHub Profile
@araa47
araa47 / PyNixDirEnvReadme.md
Last active February 8, 2024 10:51
Python3 Dev Environment with Pipenv using Nix and direnv for Linux and macOS

System Set-Up

  1. Install nix on your system curl https://nixos.org/nix/install | sh
  2. . ~/.nix-profile/etc/profile.d/nix.sh
  3. Install direnv nix-env -i direnv
  4. Add hook into shell by running eval "$(direnv hook bash)" , you will need to add this to .bash_profile to make it presistant

Project Set-Up

Create a shell.nix file in your project with the following content. This has python 3.7 and pipenv as buildInputs

@araa47
araa47 / PrecisionVolumeControl.json
Last active August 7, 2019 07:51
Karabiner-Elements Complex Modification to Increment/Decrement Volume with higher precision on mac. You may need to change f11 to your volume up key and f12 to volume down key. You may also need to change the modifers to "left_shift" and "left_option". The reason for the weird mapping is because of my mechanical keyboard
{
"title": "Volume Precision Control",
"rules": [
{
"description": "Precise Volume Increment",
"manipulators": [
{
"type": "basic",
"from": {
"key_code": "f11",

Volume Control for Mx Master 3s linux

  1. sudo apt install cmake libevdev-dev libudev-dev libconfig++-dev xbindkeys xautomation
  2. Install https://github.com/PixlOne/logiops
  3. Copy config file into /etc.logid.cfg
  4. Change name in file to "Mx Master 3"
  5. Make custom configs
  6. Create a file called .xbindkeysrc in /home/user/ dir
  7. Paste contents
@araa47
araa47 / Error.md
Last active September 16, 2020 12:43

Web3 py request

# savings = web3 contract 
filter = savings.events.Deposit.createFilter(fromBlock=10871949)
deposit_events = filter.get_all_entries()

or

Code

ARCHIVE_NODE = "https://..."
INFURA_WS_URL = "wss://"


from web3 import Web3

def init_web3_archive():

Code

from ocean_utils.agreements.service_factory import ServiceDescriptor

from ocean_lib.ocean.ocean import Ocean
from ocean_lib.web3_internal.wallet import Wallet
from ocean_lib.ocean.util import to_base_18
from ocean_lib.data_provider.data_service_provider import DataServiceProvider
from dotenv import load_dotenv
@araa47
araa47 / Ocean.ipynb
Last active October 9, 2020 08:06
MarketPlace Flow OceanPy
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@araa47
araa47 / Publish.ipynb
Last active October 9, 2020 12:48
Ocean Rinkeby Publish Test
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
export ADDRESS_FILE=/root/.ocean/ocean-contracts/artifacts/address.json
aquarius exists

Welcome to
,-._
_.-' '--.
.' _ -`\_
/ .----.`_.'----'
This post links my 3Box profile to my Github account! Web3 social profiles by 3Box.
✅ did:3:bafyreiayvhy4ap5khhjmijl2opphknfkoecy54tkkeuyxyqktgqyg3tcoq ✅
Create your profile today to start building social connection and trust online at https://3Box.io/