Skip to content

Instantly share code, notes, and snippets.

@jimmychu0807
jimmychu0807 / string-conversion.rs
Created November 21, 2019 10:20
Conversion between String, str, Vec<u8>, Vec<char> in Rust
use std::str;
fn main() {
// -- FROM: vec of chars --
let src1: Vec<char> = vec!['j','{','"','i','m','m','y','"','}'];
// to String
let string1: String = src1.iter().collect::<String>();
// to str
let str1: &str = &src1.iter().collect::<String>();
// to vec of byte
@topherPedersen
topherPedersen / lib.rs
Last active May 1, 2024 00:41
Solana 101: Hello, World Rust/Solana Program (from Figment.io's Solana 101 Course)
use borsh::{BorshDeserialize, BorshSerialize};
use solana_program::{
account_info::{next_account_info, AccountInfo},
entrypoint,
entrypoint::ProgramResult,
msg,
program_error::ProgramError,
pubkey::Pubkey,
};
@vasanthk
vasanthk / System Design.md
Last active May 1, 2024 00:40
System Design Cheatsheet

System Design Cheatsheet

Picking the right architecture = Picking the right battles + Managing trade-offs

Basic Steps

  1. Clarify and agree on the scope of the system
  • User cases (description of sequences of events that, taken together, lead to a system doing something useful)
    • Who is going to use it?
    • How are they going to use it?

A simple Docker and Docker Compose install script for Ubuntu

Usage

  1. sh install-docker.sh
  2. log out
  3. log back in

Links

@ruvnet
ruvnet / readme.md
Last active May 1, 2024 00:37
Sentient Systems: A Declarative Approach to Cognitive Architecture for Embodied Intelligence

Sentient Systems Architecture (SSA): Unlocking Embodied Intelligence

Introduction

Artificial Intelligence (AI) has evolved rapidly, with language models like GPT-4 capturing attention. However, the real future of AI lies in embodied intelligence—systems that can interact with the physical world through robotics and sensory perception. Unlike disembodied language models that operate in digital spaces, embodied AI must navigate complex environments, interpret sensory data, and perform physical tasks. This shift towards embodied intelligence opens the door to groundbreaking applications and significant economic impact.

Unique Challenges of Embodied Intelligence

Developing embodied AI systems is far more complex than working with traditional language models. Embodied agents need to:

Adapt to ever-changing real-world conditions.

@EvgenyOrekhov
EvgenyOrekhov / A simple Docker and Docker Compose install script for Ubuntu.md
Last active May 1, 2024 00:37
A simple Docker and Docker Compose install script for Ubuntu

A simple Docker and Docker Compose install script for Ubuntu

Usage

  1. sh install-docker.sh
  2. log out
  3. log back in

Links

@pH-7
pH-7 / alfred-workflows.md
Last active May 1, 2024 00:37
My Alfred workflows

My Alfred productivity workflows

@pH-7
pH-7 / show-last-tags.sh
Last active May 1, 2024 00:37
Show the last three git tags (very handy) - https://github.com/pH-7
git tag --sort=-creatordate | head -n3
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Game</title>
<style>
body {
margin: 0;
overflow: hidden;
@Vido
Vido / portifolio.py
Created July 4, 2023 15:23
Modelo de Markowitz com dados da Binance
import numpy as np
import pandas as pd
import matplotlib.pyplot as plt
import scipy.optimize as sco
from quotes import tickers
df = pd.read_pickle("quotes.pkl")
logrets = np.log(df / df.shift(1))
rmean = logrets.mean() * 365