Skip to content

Instantly share code, notes, and snippets.

View hackintoshrao's full-sized avatar
📚
Exploring AI agents on code search and understanding

Karthic Rao hackintoshrao

📚
Exploring AI agents on code search and understanding
View GitHub Profile
@hackintoshrao
hackintoshrao / find_chess_corner.py
Created December 14, 2017 15:51
Find and draw chess board corners for camera caliberation using Opencv
import numpy as np
import cv2
import matplotlib.pyplot as plt
import matplotlib.image as mpimg
import glob
# prepare object points
#Enter the number of inside corners in x
nx = 9
#Enter the number of inside corners in y
@hackintoshrao
hackintoshrao / guess.rs
Created January 18, 2023 07:32
sample to showcase the concept of shadowing in Rust.
fn main() {
println!("Guess the number!");
let secret_number = rand::thread_rng().gen_range(1, 101);
println!("The secret number is: {}", secret_number);
println!("Please input your guess.");
let mut guess = String::new();
@hackintoshrao
hackintoshrao / sum.go
Last active April 5, 2022 07:37
Simple program for concurrently summing up numbers.
package main
import "fmt"
// function to add an array of numbers.
func sum(s []int, c chan int) {
sum := 0
for _, v := range s {
sum += v
}
{
"data": {
"getInt": 12,
"getString": null
},
"errors": [
{
"message": "Failed to get string!",
}
]
@hackintoshrao
hackintoshrao / extend-minfs-docker.sh
Created January 19, 2017 03:56
Extending Minfs docker container to use Minfs.
# fetch code.
$ go get github.com/minio/minfs
# cd to directory.
$ cd $GOPATH/src/github.com/minio/minfs
# build the docker container for Minfs.
$ docker build minio/minfs .
# Run Minfs Docker container.
<div id="my-component">
<header>
<!-- children with the `slot="header"` attribute will go here -->
<slot name="header" />
</header>
<main>
<!-- children without a `slot` (or with the `slot="default"`) attribute will go here -->
<slot />
</main>
<footer>
---
export interface Props {
post: any;
}
const { post } = Astro.props;
---
<article class="post-preview">
<header>
<section>
{allPosts.map(p => <BlogPostPreview post={p} />)}
</section>
---
// Import your components in your component script...
import SomeComponent from './SomeComponent.astro';
---
<!-- ... then use them in your HTML! -->
<div>
<SomeComponent />
</div>