Skip to content

Instantly share code, notes, and snippets.

View cywf's full-sized avatar
:shipit:
Tinkering

Kylo P cywf

:shipit:
Tinkering
View GitHub Profile
@cywf
cywf / smart-contracts.md
Created January 14, 2024 17:25
Explore the essential concepts behind smart contracts on both Ethereum and Solana blockchains. This comprehensive guide delves into the mechanics, security practices, and real-world applications of smart contracts. It also highlights the importance of ethical vulnerability disclosure, the role of blockchain security firms, and the transformative…

Introduction

Smart contracts are a pivotal aspect of blockchain platforms like Ethereum and Solana. They enable automated transactions and agreements to be carried out without the need for intermediaries. Below, we'll explore how smart contracts are implemented in both Ethereum using Solidity and Solana using Rust.

Ethereum Smart Contracts with Solidity

Ethereum smart contracts are written in Solidity, a high-level language specifically designed for Ethereum. Here's a simple example of a smart contract written in Solidity that manages a decentralized voting process:

// SPDX-License-Identifier: GPL-3.0
pragma solidity >=0.7.0 <0.9.0;
@cywf
cywf / sol-attack-sim.md
Created January 13, 2024 18:24
Solana Smart Contract Attack Simulation Guide

Overview

This guide provides instructions for developers on how to simulate an attack on a Solana smart contract using the Solana Test Validator. The steps include creating attacker and victim addresses, funding the victim address, and documenting the testing process.

Prerequisites

  • Solana CLI installed and configured.
  • Solana Test Validator running.

Steps

  1. Create Attacker and Victim Addresses Generate new keypairs for the attacker and victim:

Technical Debt: Concept and Resolution in Rust

Introduction to Technical Debt

Technical debt is a metaphor reflecting the implied cost of additional rework caused by choosing an easy, limited, or quick solution now instead of using a better approach that would take longer. Similar to financial debt, technical debt accumulates interest, meaning that the longer it remains unpaid, the more time and resources it will take to resolve.

@cywf
cywf / gpt4-vision.md
Created October 20, 2023 21:23
Delve into the remarkable capabilities of OpenAI's GPT-4 Vision (GPT-4V), a significant stride towards multimodal AI. This article explores how GPT-4V incorporates image understanding with textual analysis, its various capabilities like object detection, visual question answering, and data analysis, and its potential real-world applications. Dis…

GPT-4 Vision: Bridging Text and Imagery in AI

Introduction

OpenAI's GPT-4 Vision (GPT-4V) represents a significant stride towards multimodal AI, a domain where AI systems can understand and interact with the world using multiple modes of input and output. The GPT-4V specifically incorporates image understanding with textual analysis, thus paving the way for more intuitive and versatile AI applications. The evolution from GPT-4 to GPT-4V was highly anticipated, and now with its release, a new chapter in AI capabilities has been unveiled.

GPT-4V Capabilities

Visual Inputs Integration

GPT-4V enriches ChatGPT with image understanding, allowing for a variety of visual tasks to be performed alongside textual tasks. This fusion of visual and textual inputs empowers GPT-4V to analyze a diverse range of visuals including photographs, screenshots, and documents containing both text and images.

@cywf
cywf / autogen.md
Created October 20, 2023 21:10
Explore Microsoft's AutoGen, a groundbreaking framework designed to simplify the orchestration, automation, and optimization of Large Language Model (LLM) workflows. Delve into its core features including multi-agent conversations, workflow orchestration, and enhanced LLM inference. This article provides insights into getting started with AutoGe…

AutoGen: Microsoft's Gateway to Advanced LLM Workflows

Introduction

Microsoft's AutoGen is a novel framework designed to orchestrate, automate, and optimize Large Language Model (LLM) workflows. It facilitates the creation of next-gen LLM applications through multi-agent conversations, making complex workflows more manageable and efficient.

Core Features

Multi-Agent Conversation Framework

AutoGen introduces a multi-agent conversation framework that forms the backbone of its operation. It enables the development of customizable agents based on LLMs, tools, humans, or a mix of these elements. These agents can engage in conversations to accomplish tasks, supporting complex conversation patterns and interactions.

@cywf
cywf / memgpt.md
Created October 20, 2023 20:53
This article delves into MemGPT, a novel system developed by researchers at UC Berkeley to address the limited context window issue prevalent in Large Language Models (LLMs). By drawing inspiration from traditional operating system memory management, MemGPT introduces a hierarchical memory architecture allowing LLMs to handle extended contexts e…

MemGPT: A Leap Towards Unbounded Context in Large Language Models

Introduction

In the realm of artificial intelligence, Large Language Models (LLMs) like GPT-3 have been groundbreaking in processing and generating human-like text. However, their prowess is hindered by the fixed context window—the maximum number of tokens they can process at a time. This limitation curtails their capability in handling long-term reasoning or memory-centric tasks such as analyzing extensive documents or maintaining coherent, multi-session conversations. MemGPT emerges as a beacon of advancement in overcoming these constraints, introducing a memory management system inspired by traditional operating systems (OS) to LLMs.

Background

MemGPT, developed by researchers at UC Berkeley, is engineered to manage the memory of LLMs efficiently, thereby extending the context window beyond its inherent limitations. The core inspiration for MemGPT stems from the hierarchical memory systems utilized in conventional operating syste

@cywf
cywf / privacy-protection.md
Created October 13, 2023 21:31
200+ Ways to Protect Your Privacy

Protecting Your Offline Privacy - at Home, in Public, and Everywhere In-Between

  1. Hang On to Your Privacy by "The Shred"
  2. Shut off the Junk Mail Data Siphon
  3. Watch out for falsely requested personal data via phone
  4. Protect your payment details when you order delivery food
  5. Don't fax private documents
  6. Lock up your personal private documents
  7. Only carry the necessities
  8. Keep your personal items close (and your personal data closer)
@cywf
cywf / prompt-engineering.md
Created September 28, 2023 07:05
Mastering Prompt Engineering: A Deep Dive into Language Model Mechanics

Introduction

Prompt Engineering is a burgeoning field that sits at the crossroads of Natural Language Processing (NLP), Machine Learning (ML), and Human-Computer Interaction. It's about crafting the right prompts to elicit desired responses from Language Models (LMs). This article embarks on an exploration into the three core LLM (Large Language Model) concepts, journeying through the latent and emergent properties of language models, all under the illuminating light of Bloom's Taxonomy.

3 Fundamental LLM Concepts

Reductive Operations

Reductive operations are about condensing information. They take a large amount of text and produce a smaller, more manageable output, ensuring the essence remains intact.

  • Summarization: Condensing information while retaining the core message.
@cywf
cywf / synced-htb-writeup.md
Created September 10, 2023 04:39
HackTheBox Write-up: Synced

Machine Details:

  • Machine Name: Synced
  • IP Address: 10.129.239.186
  • User: cywf

What I Did:

  1. NMAP Scan: I initiated the exploration with an NMAP scan to identify open ports and services on the target machine.
@cywf
cywf / mongod-htb-writeup.md
Created September 10, 2023 03:41
HackTheBox Write-up: MonGod

Machine Details:

  • Machine Name: MonGod
  • IP Address: 10.129.60.233
  • User: cywf

What I Did:

1. NMAP Scan: I started by running an NMAP scan to identify open ports and services running on the target machine.