This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"data": { | |
"getInt": 12, | |
"getString": null | |
}, | |
"errors": [ | |
{ | |
"message": "Failed to get string!", | |
} | |
] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 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. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<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> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--- | |
export interface Props { | |
post: any; | |
} | |
const { post } = Astro.props; | |
--- | |
<article class="post-preview"> | |
<header> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<section> | |
{allPosts.map(p => <BlogPostPreview post={p} />)} | |
</section> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--- | |
// Import your components in your component script... | |
import SomeComponent from './SomeComponent.astro'; | |
--- | |
<!-- ... then use them in your HTML! --> | |
<div> | |
<SomeComponent /> | |
</div> |
NewerOlder