Skip to content

Instantly share code, notes, and snippets.

@RamonLopezEscudero
RamonLopezEscudero / Merge_Sort.c
Last active May 2, 2024 20:51
CΓ³digo del mΓ©todo de ordenamiento "Merge Sort"
#include <stdio.h>
#include <stdlib.h>
void merge(int *array, int p, int q, int r)
{
// Declaracion de variables
int i, j, k;
int n_1 = (q - p) + 1;
int n_2 = (r - q);
int *L, *R;
@ArthurZucker
ArthurZucker / mamba_peft.py
Created March 7, 2024 09:32
Mamba peft finetuning
from datasets import load_dataset
from trl import SFTTrainer
from peft import LoraConfig
from transformers import AutoTokenizer, AutoModelForCausalLM, TrainingArguments
tokenizer = AutoTokenizer.from_pretrained("state-spaces/mamba-130m-hf")
model = AutoModelForCausalLM.from_pretrained("state-spaces/mamba-130m-hf")
dataset = load_dataset("Abirate/english_quotes", split="train")
training_args = TrainingArguments(
output_dir="./results",
num_train_epochs=3,
@leocomelli
leocomelli / git.md
Last active May 2, 2024 20:46
Lista de comandos ΓΊteis do GIT

GIT

Estados

  • Modificado (modified);
  • Preparado (staged/index)
  • Consolidado (comitted);

Ajuda

@tvst
tvst / streamlit_app.py
Last active May 2, 2024 20:46
Simple way to run heavy computations without slowing down other Streamlit users
import streamlit as st
import concurrent.futures # We'll do computations in separate processes!
import mymodule # This is where you'll do the computation
# Your st calls must go inside this IF block.
if __name__ == '__main__':
st.write("Starting a long computation on another process")
# Pick max number of concurrent processes. Depends on how heavy your computation is, and how
# powerful your machine is.
@bergmannjg
bergmannjg / rearct-native-app-in-wsl2.md
Last active May 2, 2024 20:45
Building a react native app in WSL2
#!/usr/bin/env bash
# Abort sign off on any error
set -e
# Start the benchmark timer
SECONDS=0
# Repository introspection
OWNER=$(gh repo view --json owner --jq .owner.login)
@sarahcssiqueira
sarahcssiqueira / .phpcs.xml
Created August 3, 2023 23:18
Workaround to handle PSR-4 && WordPress Coding Standards at same time
<?xml version="1.0"?>
<ruleset name="CS">
<description>PHPCS example</description>
<config name="testVersion" value="5.6-"/>
<exclude-pattern>vendor/*</exclude-pattern>
<arg value="ps"/>
<arg name="colors"/>
<arg name="parallel" value="100"/>
<arg name="extensions" value="php"/>
@sourceperl
sourceperl / main.c
Last active May 2, 2024 20:43
Test code MSP430 I2C LCD
#include <msp430g2211.h>
#define I2C_SDA BIT0 // Serial Data line
#define I2C_SCL BIT6 // Serial Clock line
/* A crude delay function. Tune by changing the counter value. */
void delay( unsigned int n ) {
volatile int i;
for( ; n; n-- ) {
@rxaviers
rxaviers / gist:7360908
Last active May 2, 2024 20:42
Complete list of github markdown emoji markup

People

:bowtie: :bowtie: πŸ˜„ :smile: πŸ˜† :laughing:
😊 :blush: πŸ˜ƒ :smiley: ☺️ :relaxed:
😏 :smirk: 😍 :heart_eyes: 😘 :kissing_heart:
😚 :kissing_closed_eyes: 😳 :flushed: 😌 :relieved:
πŸ˜† :satisfied: 😁 :grin: πŸ˜‰ :wink:
😜 :stuck_out_tongue_winking_eye: 😝 :stuck_out_tongue_closed_eyes: πŸ˜€ :grinning:
πŸ˜— :kissing: πŸ˜™ :kissing_smiling_eyes: πŸ˜› :stuck_out_tongue:

TL;DR

When Riot Games introduces the Vanguard anti-cheat to League of Legends, you should STOP playing and you should not install the anti-cheat when you get the pop-up. Vanguard is a kernel-level anticheat and these anticheats operate at a privilege level HIGHER THAN YOUR OWN. The anti-cheat can do things that even you can't do, without asking or letting you know. It's like Riot installing a camera in every room of your house and getting a copy of every key inside.

Here is just one example of what they can do: https://www.theregister.com/2013/11/20/esea_gaming_bitcoin_fine/

https://www.wired.com/2013/11/e-sports/

Who am I?