This file contains 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
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 |
This file contains 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 java.lang.Math; | |
public class HelloWorld | |
{ | |
public static void main(String[] args) | |
{ | |
raghavChecksum(hexStringToByteArray("11D4030043214469E189E1A9E100000000")); | |
raghavChecksum(hexStringToByteArray("11D4030088214509E129E14844484449E1")); | |
} |
This file contains 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 java.lang.Math; | |
public class HelloWorld | |
{ | |
public static void main(String[] args) | |
{ | |
generateCheckSum(hexStringToByteArray("11D4030043214469E189E1A9E100000000")); | |
generateCheckSum(hexStringToByteArray("11D4030088214509E129E14844484449E1")); | |
} | |
This file contains 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
gistup |
This file contains 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 | |
# 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 |
This file contains 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
# ============================================================= | |
# 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 | |
# |
This file contains 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
# ============================================================= | |
# 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 | |
# |
This file contains 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
.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 |
This file contains 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
.data | |
.text | |
.globl main | |
main: | |
loop: | |
li $v0,5 | |
syscall #read an int | |
add $a0,$v0,$zero #move to $a0 |
This file contains 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
#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)); |