Skip to content

Instantly share code, notes, and snippets.

@stjordanis
stjordanis / llama_65b_data.txt
Created March 7, 2023 09:17 — forked from shawwn/llama_65b_data.txt
(Generated by LLaMA 65B)
I am Lieutenant Commander Data, and I am an android.
I was created by Doctor Soong in the mid-2300s on Earth's moon colony.
My positronic brain is a network of trillions of interconnected
neurons that allow me to experience consciousness and sentience as
only living beings can—and yet my mind operates at speeds far greater
than those of most unenhanced organics. This makes it possible for me
to perform complex analyses almost instantaneously while
simultaneously running thousands of background processes without any
decrease in efficiency or awareness. It also lets me communicate with
@stjordanis
stjordanis / cachedecorator.py
Created March 4, 2023 18:15 — forked from mminer/cachedecorator.py
An example of a Python decorator to simplify caching a function's result.
"""An example of a cache decorator."""
import json
from functools import wraps
from redis import StrictRedis
redis = StrictRedis()
def cached(func):
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

"typescript" "manage and configure a list of Github repositories and their settings including branch protection rules"

$ upg

    __  ______  ____ _    UPG CLI
   / / / / __ \/ __ `/    Public Beta
  / /_/ / /_/ / /_/ /
 \__,_/ .___/\__, / 🇺🇸 Built by GPT Labs
@stjordanis
stjordanis / mnist.py
Created October 4, 2022 15:05 — forked from svpino/mnist.py
CNN to solve MNIST dataset
import numpy as np
import pandas as pd
import random
import tensorflow as tf
import matplotlib.pyplot as plt
from tensorflow.keras.models import Sequential
from tensorflow.keras.layers import Flatten, Conv2D, Dense, MaxPooling2D
from tensorflow.keras.optimizers import SGD
from tensorflow.keras.utils import to_categorical
@stjordanis
stjordanis / skimr.r
Created September 21, 2022 00:51 — forked from chasemc/skimr.r
library(data.table)
library(skimr)
temp <- fread(
"curl -s https://ftp.ncbi.nlm.nih.gov/genomes/ASSEMBLY_REPORTS/assembly_summary_genbank.txt | head -n 20",
sep = "\t",
header = T
)
skim(temp)
@stjordanis
stjordanis / bash-programming-showcase.bash
Created September 16, 2022 00:08 — forked from Uplink03/bash-programming-showcase.bash
Bash programming(!) language
#!/bin/bash
# This file is supposed to give you a quick idea about what Bash can do beyond its regular job as a shell or scripting language.
# Bash is more than a scripting language. It's a half-decent programming language. It's snail slow, but half-decent otherwise.
# While it's very archane for such usage, it can be a good substitute for Perl and Python in a pinch.
# These things won't work on cut down shells (e.g. sh, ash, dash), and may explode on ZSH, which has its own,
# somewhat friendlier(!), more modern(!) ways of doing these things.
# Remember kids: always quote your variables in Bash! You're almost certainly expecting them to expand
@stjordanis
stjordanis / setting-up-msysgit-and-gpg4win.md
Created April 13, 2022 23:49 — forked from mflatischler/setting-up-msysgit-and-gpg4win.md
Setting up Git for Windows and Gpg4win (WIP)

Setting up [Git for Windows] and [Gpg4win]

This article will help you set up your development environment with git and gpg to sign your commits and manage your gpg keys for different personas.

This article will not guide you step by step to install the programms needed, explain how gpg works nor will it tell you why you should sign your git commits.

Prerequisites

rule ImprovedReflectiveDllInjector {
meta:
comment1 = "Lazarus - 1fc8fb396a22f98c1230d0d8877f3806d52c1a2723add033223753f83628c826"
comment2 = "Ramsay - 10278770a9c331d0903dde91e714d395a1242101f40ae6030436ce07ff5fcaf6"
author = "polarply"
strings:
$s1 = "DLL and target process must be same architecture"
$s2 = "Allocated memory address in remote process: 0x%p"
$s3 = "Could not get reflective loader offset"
condition:
from syslogdiag.ourlogging import logger
from math import copysign
def contracts_trade(total_trades, pos_priced, pos_forward, rolling=False):
"""
Given actual contracts decide what to trade
Note at this stage contracts are identified in as PRICE, FORWARD
Any rogue contracts not in that space would have been signalled / weeded out by now