Skip to content

Instantly share code, notes, and snippets.

View Ramko9999's full-sized avatar
🎯
Focusing

Ramko9999

🎯
Focusing
View GitHub Profile

Foundational Elements

  • The Hindu calendar is entirely based on astronomy and tracks the movement of two primary celestial bodies: the sun and moon
  • It uses a geocentric model of the solar system, which places Earth at the center
  • The source of these astronomical calculations is the Surya Siddhanta, an ancient scientific treatise written around 400 AD

Calendar Structure

  1. Based on both solar and lunar movements
  2. Contains multiple elements including:
    • Uttarayana and Dakshinayana
  • Various months
Masa mismatch on 2025-01-14 01:30 PM: Original=Pausha, Computed=Magha
Masa mismatch on 2025-01-15 01:30 PM: Original=Pausha, Computed=Magha
Masa mismatch on 2025-01-16 01:30 PM: Original=Pausha, Computed=Magha
Masa mismatch on 2025-01-17 01:30 PM: Original=Pausha, Computed=Magha
Masa mismatch on 2025-01-18 01:30 PM: Original=Pausha, Computed=Magha
Masa mismatch on 2025-01-19 01:30 PM: Original=Pausha, Computed=Magha
Masa mismatch on 2025-01-20 01:30 PM: Original=Pausha, Computed=Magha
Masa mismatch on 2025-01-21 01:30 PM: Original=Pausha, Computed=Magha
Masa mismatch on 2025-01-22 01:30 PM: Original=Pausha, Computed=Magha
Masa mismatch on 2025-01-23 01:30 PM: Original=Pausha, Computed=Magha
import (
"fmt"
"io/fs"
"path/filepath"
)
// example of counting all files in a root directory
func countFiles() int {
count := 0;
filepath.WalkDir(".", func(path string, file fs.DirEntry, err error) error {
import (
"fmt"
"log"
"os"
)
/*
Suppose this was the directory structure of test:
- test
- a.txt
- b
type DirEntry interface {
// Name returns the name of the file (or subdirectory) described by the entry.
// This name is only the final element of the path (the base name), not the entire path.
// For example, Name would return "hello.go" not "/home/gopher/hello.go".
Name() string
// IsDir reports whether the entry describes a directory.
IsDir() bool
// Type returns the type bits for the entry.
import (
"log"
"os"
)
func navigate(){
os.Getwd() // Working Directory: ./folder
os.Chdir("./item"); // Working Directory: ./folder/item
import (
"log"
"os"
)
func getWd() {
dir, err = os.Getwd()
if err != nil {
log.Fatal(err);
}
import (
"log"
"os"
)
/*
os.MkdirTemp takes in the path to make the temporary dir and a pattern.
os.MkdirTemp will make a new directory with a name which is the pattern + a random string.
import (
"log"
"os"
)
func makeDir(){
err := os.Mkdir("newDirectory", 0755);
if err != nil {
log.Fatal(err);
}
import (
"log"
"os
)
func removeFile(){
err := os.Remove("./removeFolder/remove.txt");
if err != nil{
log.Fatal(err);
}