Skip to content

Instantly share code, notes, and snippets.

@nekiee13
nekiee13 / gist:c8ec43bce5fd75d20e38b31a613fd83d
Created January 30, 2024 03:56
Install Ollama under Win11 & WSL - CUDA Installation guide
CMD prompt - verify WSL2 is installed
`wsl --list --verbose`
or
`wsl -l -v`
git clone CUDA samples - I used location at disk d:\\LLM\\Ollama , so I can find samples with ease
`d: && cd d:\LLM\Ollama`
`git clone --recursive -j6 https://github.com/NVIDIA/cuda-samples.git`
@jongan69
jongan69 / Readme.md
Last active July 1, 2025 05:55
Option Premium Calculator This Python script calculates the total option premiums for a given set of stock options using the Black-Scholes option pricing model. The Black-Scholes model is widely used for estimating the theoretical price of European-style options.

Option Premium Calculator

A Python script using Black-Scholes model to calculate total option premiums for given stock options. Customize with your data and parameters.

Components: Black-Scholes Formula: The calculate_option_premium function implements the Black-Scholes formula, taking into account the current stock price (S), option strike price (K), time to expiration (T), risk-free interest rate (r), and volatility of the underlying asset (sigma). It supports both call and put options.

Black-Scholes Formula

The Black-Scholes formula is a mathematical model used for calculating the theoretical price of European-style options. The formula for the call option is given by:

@leifermendez
leifermendez / prompt-ai-learning.txt
Created December 2, 2024 20:17
prompt ai-learning
Crear una landing page diseño "pixel perfect" con muy buena UX/UI con transiciones modernas, inspirate los detalles de la captura de la landing que adjunte quiero que sea igual o casi igual, video en el centro que tiene un efecto hover, usa una imagen de upsplash que sirva como cover de un video. standard 16:9 aspect ratio.standard 16:9 aspect ratio.
Key Design Elements:
Clean, minimal design with lots of whitespace
Soft, mint/sage green background (#F7F9F8)
Modern typography with a bold headline and subtle descriptive text
Centered video player with hover effects and rounded corners
Small "Updated" badge with subtle styling
Professional navigation bar with clear hierarchy
@rautio
rautio / promise-based-dynamic-remotes.config.js
Created July 6, 2022 21:33
Example of using a promise for resolving remote URLs in module federation
// Webpack config:
module.exports = {
// ...
plugins: [
new ModuleFederationPlugin({
name: "Host",
remotes: {
RemoteA: `promise new Promise(${fetchRemoteA.toString()})`,
},
}),
@adrianherrera
adrianherrera / gen-clang-ast.py
Last active July 1, 2025 05:50
Generate a Clang AST in JSON format
#!/usr/bin/env python3
"""
Generate a Clang AST (in JSON format) from a compilation database. Adapted from
run-clang-format.py.
I use [bear](https://github.com/rizsotto/Bear) to generate the compilation
database.
Author: Adrian Herrera
@ruvnet
ruvnet / performance.md
Last active July 1, 2025 05:49
AI Trading Platform with NeuralForecast Integration

Performance Analysis Report

NeuralForecast NHITS Integration Performance Validation

Date: June 2025
Analysis Period: Complete Integration Lifecycle
Report Type: Comprehensive Performance Validation


🎯 Key Features Documented

@Ouroboros
Ouroboros / cursor.md
Last active July 1, 2025 05:48
Make Cursor Work with cppvsdbg

1. Modify cpptools/package.json

Remove this condition "when": "workspacePlatform == windows"

%USERPROFILE%\.cursor\extensions\ms-vscode.cpptools-1.23.5-win32-x64\package.json

    "type": "cppvsdbg",
    "label": "C++ (Windows)",
    "when1": "workspacePlatform == windows",
@gobinathm
gobinathm / shallow_update_git.md
Created March 6, 2017 18:24
Fix for Remote rejected shallow update not allowed after changing Git remote URL

Some Time there is a shallow update not allowed issue in your cloned GIT repo.

This means that you have to unshallow your repository. To do so you will need to add your old remote again.

git remote add origin <path-to-old-remote> After that we use git fetch to fetch the remaining history from the old remote (as suggested in this answer).

git fetch --unshallow origin And now you should be able to push into your new remote repository.

@gcsfred
gcsfred / config.conf
Created February 3, 2020 16:18
Sample integration between Elasticsearch and Amazon Personalize - entire file
[DEFAULT]
product_ranking_start = 10
product_ranking_steps_down = 0.2
cat_ranking_start = 10
cat_ranking_steps_down = 0.2
product_recommendations_campaignArn=arn:aws:personalize:us-east-2:11123456:campaign/es-test03-hrnn
product_rankings_campaignArn=arn:aws:personalize:us-east-2:222789:campaign/es-test03-rank
property1_recommendations_campaignArn=arn:aws:personalize:us-east-2:3333456:campaign/es-test03-cat-hrnn
property1_rankings_campaignArn=arn:aws:personalize:us-east-2:444789:campaign/es-test03-cat-rank
@misterburton
misterburton / tumblr-delete-all-posts.js
Last active July 1, 2025 05:40
How to Delete All Tumblr Posts via JavaScript & the Browser Console
/*
Navitage to your mass post editor:
https://www.tumblr.com/mega-editor/[blog-name]
Open your browser's JavaScript Console and paste either of the following code snippets
*/
// delete 100 tumblr posts at a time (h/t Louis Lee: http://louisrli.github.io/blog/2013/05/11/how-to-delete-all-tumblr-posts/)
javascript:$('.overlay').slice(0, 100).click(); // you must now manually hit the 'delete' button at the top-right of the page
// delete all tumblr posts (h/t Hendry Sadrak [@hendrysadrak] a commenter on Li's above-linked post)