Skip to content

Instantly share code, notes, and snippets.

View budhash's full-sized avatar

Budhaditya budhash

  • San Francisco Bay Area
View GitHub Profile
@ruvnet
ruvnet / q.py
Last active September 25, 2024 03:42
Q* (Q-Star)
# - Q* (Q-Star)
# /\__/\ - q.py
# ( o.o ) - v0.0.1
# >^< - by @rUv
# 01110010 01110101 01110110
# This is a proof of concept implementation of the Q* (AGI) leak from OpenAi
# This Python code defines a sophisticated Q-learning agent for reinforcement learning.
# It includes dynamic exploration, learning from experiences, and checks for convergence.
# The agent's capabilities are refined iteratively to optimize its decision-making strategy in a given environment.
@huytd
huytd / wordle.md
Last active November 1, 2024 05:07
Wordle in less than 50 lines of Bash

image

How to use:

./wordle.sh

Or try the unlimit mode:

//
// ContentView.swift
// MadeForYouCard
//
// Created by AppleDesignDev on 1/24/22.
//
import SwiftUI
struct ContentView: View {
@ageis
ageis / YubiKey-GPG-SSH-guide.md
Last active October 30, 2024 07:49
Technical guide for using YubiKey series 4 for GPG and SSH

YubiKey 4 series GPG and SSH setup guide

Written for fairly adept technical users, preferably of Debian GNU/Linux, not for absolute beginners.

You'll probably be working with a single smartcard, so you'll want only one primary key (1. Sign & Certify) and two associated subkeys (2. Encrypt, 3. Authenticate). I've published a Bash function which automates this slightly special key generation process.

@andkirby
andkirby / slack.sh
Last active June 5, 2024 09:55
Shell/Bash script for sending slack messages.
#!/usr/bin/env bash
####################################################################################
# Slack Bash console script for sending messages.
####################################################################################
# Installation
# $ curl -s https://gist.githubusercontent.com/andkirby/67a774513215d7ba06384186dd441d9e/raw --output /usr/bin/slack
# $ chmod +x /usr/bin/slack
####################################################################################
# USAGE
# Send message to slack channel/user
@darylteo
darylteo / ArrayOrObject.java
Last active November 8, 2022 10:48
Jackson Deserializer based on several StackOverflow posts.
import java.util.List;
@Data
public class ArrayOrObject<T> {
private List<T> data;
private Boolean isObject;
}
@msbanik
msbanik / elasticsearch-with-typeahead-js-editted.markdown
Created August 20, 2016 17:21
ElasticSearch with Typeahead.js - editted
package com.budhash.common.utils;
//import com.github.drapostolos.typeparser.TypeParser;
import org.apache.commons.lang3.StringUtils;
import java.util.*;
import java.util.function.Function;
import java.util.stream.Collectors;
public class Converter {
@steinwaywhw
steinwaywhw / One Liner to Download the Latest Release from Github Repo.md
Last active November 3, 2024 22:54
One Liner to Download the Latest Release from Github Repo
  • Use curl to get the JSON response for the latest release
  • Use grep to find the line containing file URL
  • Use cut and tr to extract the URL
  • Use wget to download it
curl -s https://api.github.com/repos/jgm/pandoc/releases/latest \
| grep "browser_download_url.*deb" \
| cut -d : -f 2,3 \
| tr -d \" \
@geowarin
geowarin / CompletableExecutors.java
Created June 12, 2015 18:34
ExecutorService that handles CompletableFutures
package completable.async;
import java.util.Collection;
import java.util.List;
import java.util.concurrent.*;
import static java.util.concurrent.Executors.callable;
/**