Can anyone explain how this code can be converted to work on a Arduino Uno I was hoping someone could help, im totally new to this. I wish to use this code for a Raspberry Pi on an Arduino Uno with the Adafruit SD data logging shield. It is for recording reed switch closures on a tipping bucket rain gauge. The interrupt and bounce time are to allow program interrupts and false tip suppression. I am looking to tie it in with the RTC and SD storage options on the Arduino. Any help appreciated.

#!/usr/bin/python3
import RPi.GPIO as GPIO
import time

# this many mm per bucket tip
CALIBRATION = 0.200
# which GPIO pin the gauge is connected to
PIN = 17
# file to log rainfall data in
LOGFILE = "log.csv"

GPIO.setmode(GPIO.BCM)  
GPIO.setup(PIN, GPIO.IN, pull_up_down=GPIO.PUD_UP)

# variable to keep track of how much rain
rain = 0

# the call back function for each bucket tip
def cb(channel):
    global rain
    rain = rain + CALIBRATION

# register the call back for pin interrupts
GPIO.add_event_detect(PIN, GPIO.FALLING, callback=cb, bouncetime=300)

# open the log file
file = open(LOGFILE, "a")

# display and log results
while True:
    line = "%i, %f" % (time.time(), rain)
    print(line)
    file.write(line + "\n")
    file.flush()
    rain = 0
    time.sleep(5)

# close the log file and exit nicely
file.close()
GPIO.cleanup()
This should help get you started but don't expect it to actually work as it is. Note that i did not test this at all, it's for example purposes.  if there is a specific programming problem it should be addressed separately instead of handing out working code.  

const int CALIBRATION = 0.200;   //Calibration Constant
int pin = 2;                     //Pin it's on, this is int0 for uno.
volatile int rain = 0;           //Used in interrupt routine

void setup() {
    Serial.begin(9600);
    pinMode(pin, INPUT);
    attachInterrupt(digitalPinToInterrupt(pin), cn, FALLING);
}

void loop() {

     /* Output OR LOG DATA HERE
        Also You need a Time Library and RTC (Real Time CLock) the above
        code is for a raspberry pi that has all that. */

}

void cb() {
    rain = rain + CALIBRATION;
}