Skip to content

Instantly share code, notes, and snippets.

View Imorate's full-sized avatar
🎯
Focusing

Amir Mohammad Hl Imorate

🎯
Focusing
View GitHub Profile
@Imorate
Imorate / VarianceCalculation.java
Last active April 14, 2020 19:06
Variance calculation for Data Mining course
public class VarianceCalculation {
public static void main(String[] args) {
double[] example = {30, 36, 47, 50, 52, 52, 56, 60, 63, 70, 70, 110};
System.out.println("Mean: " + calculateMean(example));
System.out.println("Variance: " + calculateVariance(example));
}
public static double calculateVariance(double[] nums) {
double mean = calculateMean(nums);
double sum = 0;

Keybase proof

I hereby claim:

  • I am imorate on github.
  • I am imorate (https://keybase.io/imorate) on keybase.
  • I have a public key ASCgpbIzR2Yqh5WA_gUYs6a8xPmZNTe2yQAeYonz1XgUkQo

To claim this, I am signing this object:

@Imorate
Imorate / ResistanceCalculation.java
Created April 26, 2021 20:01
Serial or parallel resistance calculation
import java.util.Scanner;
class ResistanceCalculation {
public static void main(String[] args) {
Scanner scanner = new Scanner(System.in);
int calculationType = 1;
System.out.println("Enter the type of calculation:");
System.out.println("1. Serial");
System.out.println("2. Parallel");
calculationType = scanner.nextInt();
@Imorate
Imorate / mixin.yml
Created November 1, 2021 05:29
Clash for windows - Mixin yml config
mixin:
tun:
enable: true
stack: gvisor
dns-hijack:
- 198.18.0.2:53
auto-route: true
auto-detect-interface: true
dns:
enable: true
@Imorate
Imorate / README.md
Created January 20, 2022 13:51
Wordle initialization command

cat /usr/share/dict/words | tr '[:upper:]' '[:lower:]'

@Imorate
Imorate / diff.sh
Created May 19, 2022 23:28
Diff two command stdout
diff <(ls) <(ls -ltrh)
@Imorate
Imorate / cut.sh
Created May 20, 2022 00:57
Cut output tab delimeter
cut -d "," -f 1,3 text.txt --output-delimiter=$'\t'
@Imorate
Imorate / imozsh.zsh-theme
Created June 2, 2022 00:11
Imozsh theme based on Skill theme
#!/bin/bash
GREEN="%{$fg_bold[green]%}"
YELLOW="%{$fg_bold[yellow]%}"
CYAN="%{$fg_bold[cyan]%}"
RED="%{$fg_bold[red]%}"
WHITE="%{$fg_bold[white]%}"
RESET="%{$reset_color%}"
ZSH_THEME_GIT_PROMPT_PREFIX="$WHITE "

راست به چپ فارسی

تبدیل "چپ به راست" به "راست به چپ" با استفاده از کاراکتر .

@Imorate
Imorate / ngork.yml
Created August 25, 2022 14:00
Ngrok sample for Laragon
version: "2"
tunnels:
website:
addr: website.test:80
proto: http
host_header: rewrite