Skip to content

Instantly share code, notes, and snippets.

View RaghavSood's full-sized avatar

Raghav Sood RaghavSood

View GitHub Profile
def print_status_line(btc_buy, btc_sell, eth_buy, eth_sell):
global BTC_LAST_SELL
global BTC_SELL_COLOR
global BTC_LAST_BUY
global BTC_BUY_COLOR
global ETH_LAST_SELL
global ETH_SELL_COLOR
global ETH_LAST_BUY
global ETH_BUY_COLOR
global LAST_TIME
import java.lang.Math;
public class HelloWorld
{
public static void main(String[] args)
{
raghavChecksum(hexStringToByteArray("11D4030043214469E189E1A9E100000000"));
raghavChecksum(hexStringToByteArray("11D4030088214509E129E14844484449E1"));
}
import java.lang.Math;
public class HelloWorld
{
public static void main(String[] args)
{
generateCheckSum(hexStringToByteArray("11D4030043214469E189E1A9E100000000"));
generateCheckSum(hexStringToByteArray("11D4030088214509E129E14844484449E1"));
}
gistup
#!/bin/bash
# Fedora64 Ubuntu64 Ubuntu32 Fedora32
OS='Ubuntu64'
DEB=('Ubuntu' 'elementary OS' 'Lubuntu')
RPM=('Fedora' 'Centos')
DIST='Lubuntu'
SCRAPELINK='https://plex.tv/downloads?channel=plexpass'
SCRAPESTR='data-event-action="Linux" data-event-category="Download-Media-Server'
declare -A array
# =============================================================
# main PROCEDURE WRITING WORKSHEET
#
# Declare all global variables first
# I'm not using any
#
# Write the code for the body of this procedure first,
# without worrying much about saving/restoring values
# on/from the stack
#
# =============================================================
# PROCEDURE WRITING WORKSHEET
#
# How many arguments does this procedure expect?
#
# 1
#
# Where are they going to be? The first four should be in
# register $a0-$a3, rest on the stack
#
.globl fibonacci
fibonacci:
addi $sp,$sp,-12 #save in stack
sw $ra,0($sp)
sw $s0,4($sp)
sw $s1,8($sp)
add $s0,$a0,$zero
.data
.text
.globl main
main:
loop:
li $v0,5
syscall #read an int
add $a0,$v0,$zero #move to $a0
#include <stdio.h>
int fibonacci (int n) {
if (n==0){
return 0;
}
if (n==1){
return 1;
} else {
return (fibonacci(n-1)+fibonacci(n-2));