Skip to content

Instantly share code, notes, and snippets.

View rbmarliere's full-sized avatar

Ricardo B. Marliere rbmarliere

View GitHub Profile
@sparack
sparack / tweepy_migration_guide.md
Created April 14, 2022 00:31
A guide to migrating your code in Python that uses Tweepy from the Twitter API v1.1 to the Twitter API v2

Guide to migrating your code from Twitter API v1.1 to v2 with Tweepy in Python

Tweepy is a popular library that allows developers to interact with the Twitter API in Python. Since the launch of the new Twitter API v2, Tweepy has been updated to support the new API. Many students and developers continue to use the old Twitter API v1.1 in Tweepy, because they are unware of the new API v2 or because they do not know how to migrate their code to use v2.

In this guide, I will show you how you can migrate your Tweepy code in Python that uses the old Twitter API v1.1 to use the new Twitter API v2.

In order to use the Twitter API, you first need to sign up for access. Once you have access, you need to get your keys and tokens from the developer portal to connect to the Twitter API. To learn how to get your keys and tokens based on your access levels, check out t

@rtkay123
rtkay123 / Smart HTTP Git and CGIT on Nginx server with Auth on push
Last active May 1, 2024 11:57
Installing Git and Cgit to Debian NGINX server (with smart http and authentication on push)
# Just some notes on enabling smart http with nginx as well as authentication on push for repos
# install git, cgit and apache2-utils (for authentication)
apt install git cgit apache2-utils fcgiwrap
# create a git user
adduser git
su git
cd
mkdir .ssh && chmod 700 .ssh
touch .ssh/authorized_keys && chmod 600 .ssh/authorized_keys
/*
* wofi style. Colors are from authors below.
* Base16 Gruvbox dark, medium
* Author: Dawid Kurek (dawikur@gmail.com), morhetz (https://github.com/morhetz/gruvbox)
*
*/
@define-color base00 #282828;
@define-color base01 #3C3836;
@define-color base02 #504945;
@define-color base03 #665C54;
@svpino
svpino / neural-network-from-scratch.py
Last active July 25, 2023 18:04
An implementation of a neural network from scratch
import numpy as np
def sigmoid(x):
return 1 / (1 + np.exp(-x))
def neural_network(X, y):
learning_rate = 0.1
W1 = np.random.rand(2, 4)
W2 = np.random.rand(4, 1)
@sainnhe
sainnhe / gruvbox-material-alacritty.yml
Last active June 17, 2024 07:24
Gruvbox Material for Alacritty
# The definition of color schemes.
schemes:
gruvbox_material_hard_dark: &gruvbox_material_hard_dark
primary:
background: '0x1d2021'
foreground: '0xd4be98'
normal:
black: '0x32302f'
red: '0xea6962'
green: '0xa9b665'
@cc32d9
cc32d9 / how_nodeos_writes_snapshots.md
Last active December 28, 2021 23:21
How nodeos writes snapshots

How EOSIO nodeos writes snapshots

EOSIO commit c6a7ec0dd816f98a6840f59dca9fed04efd9f7a5 (v2.0.6).

plugins/producer_plugin/producer_plugin.cpp line 1156: producer_plugin::create_snapshot is called by HTTP API call.

plugins/producer_plugin/producer_plugin.cpp line 1187: opens the output stream,

@aymericbeaumet
aymericbeaumet / delete-likes-from-twitter.md
Last active June 16, 2024 21:36
[Recipe] Delete all your likes/favorites from Twitter

Ever wanted to delete all your likes/favorites from Twitter but only found broken/expensive tools? You are in the right place.

  1. Go to: https://twitter.com/{username}/likes
  2. Open the console and run the following JavaScript code:
setInterval(() => {
  for (const d of document.querySelectorAll('div[data-testid="unlike"]')) {
    d.click()
 }
@G-UK
G-UK / Debootstrap Debian Arm64 OS for Raspberry Pi 3 & 4.md
Last active April 20, 2024 16:00
Build a 64bit Debian OS for the Raspberry Pi using Debootstrap

Introduction

The objective of these instructions is to create a complete Arm64 OS (Userland and Kernel) using Debian Debootstrap and RPI-Update for use on the Raspberry Pi 3 and 4.

Prerequisites:

  • An existing Debian/Raspbian system (any architecture will do)
  • An empty SD card formatted as per a standard Raspbian installation mounted to /mnt/sd on the build system
    • 1st Partition 0-256MB = FAT32 (Mount to /mnt/sd/boot)
    • 2nd Partition 256MB+ = EXT4 (Mount to /mnt/sd)

Set-up basic Debian system

@redjade
redjade / on_ramcost.md
Last active November 23, 2018 14:14
on_ramcost.md

Intro

Please remind that this gist is for documenting and understanding what is going on current ram cost approaches and its consequences technically.

Ideal state after eosio resignation below:

  • EOS token stat
    • max_supply : 10000000000
    • supply : 1000000000
  • RAM Bancor state
@chrisdone
chrisdone / gist:02e165a0004be33734ac2334f215380e
Last active June 10, 2024 19:30
Build and run minimal Linux / Busybox systems in Qemu

Common

export OPT=/opt
export BUILDS=/some/where/mini_linux
mkdir -p $BUILDS

Linux kernel