Skip to content

Instantly share code, notes, and snippets.

View tarunbod's full-sized avatar

Tarun Boddupalli tarunbod

View GitHub Profile
package javajava.java;
/**
* JAVA
*/
public class Java {
public static void main(String[] javas) {
Java.java("Java");
}
@tarunbod
tarunbod / ThreeMap.java
Last active December 23, 2015 03:23
ThreeMap - A hash map with three arguments.
import java.util.HashMap;
import java.util.LinkedHashSet;
import java.util.LinkedList;
import java.util.Set;
/**
* <p/>
* The MIT License (MIT)
* <p/>
* Copyright (c) 2015 Tarun Boddupalli
@tarunbod
tarunbod / Primes.java
Created January 27, 2015 22:21
List prime factors
package primes;
/**
* ConsoleApp by Tarun Boddupalli
* <p>
* The MIT License (MIT)
* <p>
* Copyright (c) 2015 Tarun Boddupalli
* <p>
* Permission is hereby granted, free of charge, to any person obtaining a copy
/**
* TrigCalculator by Tarun Boddupalli
* <p/>
* The MIT License (MIT)
* <p/>
* Copyright (c) 2015 Tarun Boddupalli
* <p/>
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
@tarunbod
tarunbod / BungeeCordUtils.java
Created March 26, 2015 21:51
BungeeCordUtils
public class BungeeUtils {
public static void connectPlayer(Plugin plugin, Player p, String server) {
ByteArrayDataOutput out = ByteStreams.newDataOutput();
out.writeUTF("Connect");
out.writeUTF(server);
p.sendPluginMessage(plugin, "BungeeCord", out.toByteArray());
}
public static void connectAll(Plugin plugin, String server) {
Bukkit.getOnlinePlayers().forEach(p -> connectPlayer(plugin, p, server));
// Includes functions for exporting active sheet or all sheets as JSON object (also Python object syntax compatible).
// Tweak the makePrettyJSON_ function to customize what kind of JSON to export.
var FORMAT_ONELINE = 'One-line';
var FORMAT_MULTILINE = 'Multi-line';
var FORMAT_PRETTY = 'Pretty';
var LANGUAGE_JS = 'JavaScript';
var LANGUAGE_PYTHON = 'Python';
@tarunbod
tarunbod / Console.java
Last active April 29, 2016 19:03
Convenience class for reading user input
import java.util.Scanner;
/**
* Console by Tarun Boddupalli
* <p>
* The MIT License (MIT)
* <p>
* Copyright (c) 2015 Tarun Boddupalli
* <p>
* Permission is hereby granted, free of charge, to any person obtaining a copy

Keybase proof

I hereby claim:

  • I am tarunbod on github.
  • I am tarunb (https://keybase.io/tarunb) on keybase.
  • I have a public key whose fingerprint is 3CE7 4D1A AFC2 2096 DE9B D3E6 90BD 4557 58DC 03AD

To claim this, I am signing this object:

from math import *
class TrigHelper:
@staticmethod
def sin(deg):
return sin(radians(deg))
@staticmethod
def cos(deg):
return cos(radians(deg))
@tarunbod
tarunbod / TaxCalculator.java
Created September 20, 2015 20:22
Tax Calculator for single filers
import java.util.Scanner;
public class TaxCalculator {
public static void main(String[] args) {
Scanner scanner = new Scanner(System.in);
//System.out.print("Enter your gross income: ");
//double income = scanner.nextInt();
double taxed = TaxSection.getAmountTaxed(65535);
System.out.println("You must pay " + taxed + " amount in taxes.");