Skip to content

Instantly share code, notes, and snippets.

View abelardojarab's full-sized avatar

Abelardo Jara-Berrocal abelardojarab

View GitHub Profile
@abelardojarab
abelardojarab / set_smi_power_limit_nvidia.md
Last active July 11, 2021 10:00
Set and get power limit under Linux for NVIDIA cards

Get device numbers

$ nvidia-smi -L
GPU 0: GeForce GTX 1070 (UUID: GPU-2a97b3b6-2318-aa98-f163-d164eb9d54fd)
GPU 1: GeForce GTX 1070 Ti (UUID: GPU-d2085209-9bc9-f2ac-9983-dd7b4a0627dd)
GPU 2: TITAN Xp COLLECTORS EDITION (UUID: GPU-1334cd53-38d9-7e44-4634-6e8290de0795)

Set maximum power limit

@abelardojarab
abelardojarab / find_biggest_directories_linux.md
Created January 29, 2018 03:44
Find directories consuming most disk space in Linux

In console type:

$ du -ha * | sort -rh | head -5
@abelardojarab
abelardojarab / ethereum_commands.md
Last active January 29, 2018 15:09
Useful Ethereum commands (geth)

Starting geth in console mode

$ ./build/bin/geth --fast --cache=2048 --verbosity "1" --jitvm console

Inside the console

@abelardojarab
abelardojarab / dump_dev_feature_list.py
Created February 1, 2018 07:14
Dump device feature list (Python code) - list PCI feature devices
#!/usr/bin/python
"""Dump Device Feature List"""
# Copyright(c) 2015-2017, Intel Corporation
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are met:
#
# * Redistributions of source code must retain the above copyright notice,
# this list of conditions and the following disclaimer.
# * Redistributions in binary form must reproduce the above copyright notice,
@abelardojarab
abelardojarab / fpgainfo.py
Created February 1, 2018 07:17
fpgainfo (Intel OPAE utility)
#!/usr/bin/env python
# Copyright(c) 2017, Intel Corporation
##
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are met:
##
# * Redistributions of source code must retain the above copyright notice,
# this list of conditions and the following disclaimer.
# * Redistributions in binary form must reproduce the above copyright notice,
# this list of conditions and the following disclaimer in the documentation
@abelardojarab
abelardojarab / fpgacommon.py
Created February 1, 2018 07:18
fpgacommon (Intel FPGA utility)
# Copyright(c) 2017, Intel Corporation
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are met:
#
# * Redistributions of source code must retain the above copyright notice,
# this list of conditions and the following disclaimer.
# * Redistributions in binary form must reproduce the above copyright notice,
# this list of conditions and the following disclaimer in the documentation
# and/or other materials provided with the distribution.
@abelardojarab
abelardojarab / sysfs.py
Created February 1, 2018 07:21
sysfs.py (Intel FPGA utility)
# Copyright(c) 2017, Intel Corporation
##
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are met:
##
# * Redistributions of source code must retain the above copyright notice,
# this list of conditions and the following disclaimer.
# * Redistributions in binary form must reproduce the above copyright notice,
# this list of conditions and the following disclaimer in the documentation
# and/or other materials provided with the distribution.
@abelardojarab
abelardojarab / compile_run_ethminer_cuda.md
Last active February 17, 2018 07:04
Compile and run ethminer in CUDA mode

Compiling ethminer in CUDA mode

$ cmake .. -DETHASHCL=OFF -DETHASHCUDA=ON -DCOMPUTE=61

Running ethminer in CUDA mode (-U)

@abelardojarab
abelardojarab / zenbot_strategy.md
Last active January 29, 2023 18:20
zenbot strategy

Current strategy

$  ./zenbot.sh trade gdax.eth-USD --trend_ema 20 -period 7m --max_slippage_pct 0.48 --poll_trades 6000 --order_poll_time 6000 --order_adjust_time 6000 --oversold_rsi_periods=1000 --oversold_rsi=1000 --rsi_periods=1100 --neutral_rate=0.1 --max_sell_loss_pct=0.85 --max_buy_loss_pct=5 --buy_pct=100 --sell_pct=100 --selector gdax.eth-usd  --markup_sell_pct 0.25  --markdown_buy_pct 0.00  --reset-profit

The role of buy & sell percentages (PCT)

@abelardojarab
abelardojarab / virbr0_ifconfig_explanation.md
Created February 21, 2018 04:18
What is the virbr0 interface

The virbr0, or "Virtual Bridge 0" interface is used for NAT (Network Address Translation). It is provided by the libvirt library, and virtual environments sometimes use it to connect to the outside network.

Type the following command:

$ ifconfig

Sample outputs:

virbr0 Link encap:Ethernet HWaddr 00:00:00:00:00:00