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
EnergyType | Financing Rate | Costtype | Region | 2020 | 2030 | 2050 | |
---|---|---|---|---|---|---|---|
Nuclear | 8 | Capital costs ($/kW) | United States | 5000 | 4800 | 4500 | |
Coal | 8 | Capital costs ($/kW) | United States | 2100 | 2100 | 2100 | |
Gas CCGT | 8 | Capital costs ($/kW) | United States | 1000 | 1000 | 1000 | |
Solar PV | 3.7 | Capital costs ($/kW) | United States | 1140 | 620 | 420 | |
Wind onshore | 3.7 | Capital costs ($/kW) | United States | 1540 | 1420 | 1320 | |
Wind offshore | 4.5 | Capital costs ($/kW) | United States | 4040 | 2080 | 1480 | |
Nuclear | 8 | Capital costs ($/kW) | European Union | 6600 | 5100 | 4500 | |
Coal | 8 | Capital costs ($/kW) | European Union | 2000 | 2000 | 2000 | |
Gas CCGT | 8 | Capital costs ($/kW) | European Union | 1000 | 1000 | 1000 |
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
package d3 | |
import ( | |
"bufio" | |
"io" | |
"regexp" | |
"strconv" | |
) | |
func Must(err error) { |
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
package d2 | |
import ( | |
"bufio" | |
"bytes" | |
"io" | |
"regexp" | |
"strconv" | |
) |
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
package d1 | |
import ( | |
"bufio" | |
"io" | |
"regexp" | |
"unicode/utf8" | |
) | |
func Must(err error) { |
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
// https://leetcode.com/problems/remove-element/description/ | |
func removeElement(nums []int, val int) int { | |
if len(nums) == 0 { | |
return 0 | |
} | |
writeptr := len(nums)-1 | |
readptr := 0 | |
// replace val with number from the back |
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
package rand7 | |
import ( | |
"math/rand" | |
"testing" | |
) | |
func rand5() int { | |
return rand.Intn(5) + 1 | |
} |
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
package towerofseven | |
import ( | |
"testing" | |
) | |
// greatest power of seven within the range of int32 | |
const sevenPowEleven = 1977326743 | |
// returns whether an integer number 'n' == 7**int(x) (a positive integer power of 7) |
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
package towerofsevens | |
/* | |
Task: | |
Find a fast way, to determine whether a number (any int32 integer) is a power of 7? | |
Example Input and Output: | |
TowerOfSevens(-7) -> false | |
TowerOfSevens(0) -> false | |
TowerOfSevens(1) -> true |
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
[user] | |
email = [email protected] | |
name = PatrickVienne | |
[push] | |
default = upstream | |
[core] | |
trustctime = false | |
editor = vim | |
autocrlf = input | |
filemode = false |
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
package ringbuffer_safe | |
import ( | |
"log" | |
"os" | |
"os/signal" | |
"runtime" | |
"sync/atomic" | |
"time" | |
) |
NewerOlder