Skip to content

Instantly share code, notes, and snippets.

View x1001000's full-sized avatar
😎
Dogfighting

十百千 x1001000

😎
Dogfighting
View GitHub Profile

創社初衷
介紹新奇/有趣/實用的
網路應用/知識/技術
(進而對網路程式開發產生興趣)

9/12

  • 技客? 駭客? 馬克小子的 wget ...
  • Coding on koding.com
  • Linux 才是王道
@x1001000
x1001000 / week2.ipynb
Last active February 6, 2019 11:01
week2.ipynb
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@x1001000
x1001000 / week3.ipynb
Last active February 6, 2019 11:00
week3.ipynb
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@x1001000
x1001000 / cifar10_part1_training_on_colab.ipynb
Last active February 6, 2019 11:00
cifar10_part1_training_on_colab.ipynb
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@x1001000
x1001000 / cifar10_part2_inference_at_local.ipynb
Last active June 30, 2021 05:34
cifar10_part2_inference_at_local.ipynb
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
MAX = 1001000
is_prime = [False,False]+[True]*(MAX-1)
primes = []
now = 2
while True:
primes.append(now)
for i in range(now*2, MAX+1, now):
is_prime[i] = False
now += 1
try:
MAX = 65535
is_prime = [False,False]+[True]*(MAX-1)
primes = []
now = 2
while True:
primes.append(now)
for i in range(now*2, MAX+1, now):
is_prime[i] = False
now += 1
try:
MAX = 1000000
is_prime = [False,False]+[True]*(MAX-1)
primes = []
now = 2
while True:
primes.append(now)
for i in range(now*2, MAX+1, now):
is_prime[i] = False
now += 1
try:
MAX = 1000000
is_prime = [False,False]+[True]*(MAX-1)
primes = []
now = 2
while True:
primes.append(now)
for i in range(now*2, MAX+1, now):
is_prime[i] = False
now += 1
try:
@x1001000
x1001000 / b837.py
Last active February 6, 2019 21:46
Fib = [0, 1] + [0 for i in range(29)] #存到第30項
def fib(n): #因為第31項超過1000000
if n > 1: #預先算看看可以得知
x = fib(n-1) if Fib[n-1]==0 else Fib[n-1]
y = fib(n-2) if Fib[n-2]==0 else Fib[n-2]
Fib[n] = x+y
return Fib[n]
fib(30) #算fib(30)使Fib[2]到Fib[30]由預設的0更新為算出來的費氏數
t = int(input())
for i in range(t): #for迴圈,令i從0到t-1,縮排執行t次