This file contains hidden or 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
buddha() { | |
# Set PKR and KTM as the default arguments, converting airports to uppercase | |
local FROM=$(echo "${1:-PKR}" | tr "[:lower:]" "[:upper:]") | |
local TO=$(echo "${2:-KTM}" | tr "[:lower:]" "[:upper:]") | |
# Convert the airports to uppercase | |
local FROM=echo $FROM | tr "[:lower:]" "[:upper:]" | |
local LOWER="" |
This file contains hidden or 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 math | |
import pandas as pd | |
import json | |
from requests.api import get | |
def get_url(offset: int): | |
return f"https://api.data.gov.in/catalog/2c1fd4a5-67c7-4672-a2c6-a0a76c2f00da?api-key=579b464db66ec23bdd000001cdd3946e44ce4aad7209ff7b23ac571b&format=json&offset={offset}&limit=10&filters[month]=06&filters[year]=2021" | |
def records_count() -> int: | |
url = get_url(0) |
This file contains hidden or 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
#! /bin/bash | |
# Array of packages that must be kept although unused | |
must_keep_packages=('react-dom') | |
# Function to handle checking/printing if a package is unused and removable | |
function handle_package() { | |
local package=$1 | |
# Skip this package is an important, must-keep package. | |
# Otherwise add it to the unused packages list |
This file contains hidden or 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
from typing import List | |
class Player: | |
def __init__(self, name:str): | |
self.name = name | |
self.earnings = {} | |
def earn_from(self, p, amount): | |
current_earning_from_p = self.earnings.get(p, 0) |
This file contains hidden or 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
* / _ \ /___)/ _ \| | | |/ _ \ / _ \ / ___) _ \| \ | |
*| |_| |___ | |_| | |_| | |_| | |_| ( (__| |_| | | | | | |
* \___/(___/ \___/ \__ |\___/ \___(_)____)___/|_|_|_| | |
* (____/ | |
* OSOYOO Servo Steering Robot Lesson 5 Wifi Control STA mode | |
* Tutorial link: https://osoyoo.com/?p=37202 | |
* CopyRIGHT www.osoyoo.com | |
*/ | |
#include <PWMServo.h> | |
#ifndef HAVE_HWSERIAL1 |
This file contains hidden or 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
// This is a rudimentary reverse proxy created for education | |
// Don't use it in production. Create ReverseProxy found in http.httputil | |
package main | |
import ( | |
"fmt" | |
"io" | |
"log" | |
"net/http" | |
"net/url" |
This file contains hidden or 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
from pathlib import Path | |
folder = "/home/LC/chapsu01/raw_data/Summer 2012/April 16, 2012/m23" | |
folder = Path(folder) | |
# Use * to select all files | |
# Use prefixes and suffixes followed/preceded by * to select files | |
# matching that pattern. For example dark*.fit to select all files whose name | |
# start with 'dark' and ends with '.fit' |
This file contains hidden or 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
# Boilerplate to allow importing `trout` | |
import sys | |
if ".." not in sys.path: | |
sys.path.append("..") | |
if "." not in sys.path: | |
sys.path.append(".") | |
from trout.exceptions import StarNotPresentInReferenceException |
This file contains hidden or 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
# Boilerplate to allow importing `trout` | |
import sys | |
if ".." not in sys.path: | |
sys.path.append("..") | |
if "." not in sys.path: | |
sys.path.append(".") | |
This file contains hidden or 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 math | |
from m23.extract import extract_stars | |
from m23.norm import normalize_log_files | |
from m23.utils import get_radius_folder_name | |
from m23.internight_normalize import internight_normalize | |
from m23.file.aligned_combined_file import AlignedCombinedFile | |
from m23.file.reference_log_file import ReferenceLogFile | |
from m23.file.log_file_combined_file import LogFileCombinedFile | |
from pathlib import Path |
NewerOlder