https://www.youtube.com/@DreamingSpanish
Superbeginner: https://www.youtube.com/watch?v=AI997gnz-1U
雖然語速非常的慢且不自然,但至少可以 shadowing 說話的語氣,把字幕關起來可以更專心模仿。其餘有什麼細節再慢慢補上,先不用斤斤計較,以前那種鉅細靡遺搞懂任何細節的死方法,已經沒辦法面對速度很快的真實世界。教科書式的方法,還是留在古代的考試裡吧!
https://www.youtube.com/@DreamingSpanish
Superbeginner: https://www.youtube.com/watch?v=AI997gnz-1U
雖然語速非常的慢且不自然,但至少可以 shadowing 說話的語氣,把字幕關起來可以更專心模仿。其餘有什麼細節再慢慢補上,先不用斤斤計較,以前那種鉅細靡遺搞懂任何細節的死方法,已經沒辦法面對速度很快的真實世界。教科書式的方法,還是留在古代的考試裡吧!
https://www.youtube.com/watch?v=A1dkZrpZgjY&list=RDA1dkZrpZgjY
Gemini 給我一個標準義大利語現代版(有夠強的):
Una mattina mi sono svegliato,https://www.youtube.com/watch?v=aCtSXbueUlw
整個在亂聽一通。
1. Estan bian cansada. ¿E tú? Franco. ¿Cómo tu bian? → Estoy bien cansada. ¿Y tú, Franco? ¿Cómo estuvo tu día?
Hoy es un día muy soleado. Me siento como un xiaolongbao cocinado al vapor. En el metro, nadie se quiere sentarse al lado de la ventana donde pega el sol.
用 Gemini 幫我想一些簡單句子寫出來:
Tengo tres gatos. Se llaman A-Biu, Mi-Mi y Tian-Tian. A-Biu es negro, Mi-Mi es manchada y Tian-Tian es naranja. A-Biu es muy perezoso y siempre duerme. A Mi-Mi le gusta robar pescado. A Tian-Tian le gusta morder zapatos y muñecos de Pokémon.
(不確定是不是正確的,反正就先這樣。)
(中文是:我養了三隻貓,它們的名字分別是阿BIU、蜜蜜和甜甜。阿BIU是黑色的,蜜蜜身上有斑點,甜甜是橘色的。阿BIU很懶,總是睡覺。蜜蜜喜歡偷魚。甜甜喜歡啃鞋子和寶可夢娃娃。)
然後 Gemini 發音好像不夠準,就找一些聽起來順耳的AI工具,幫我把文字轉成音檔,接下來可以 shadowing。我先試 Narakeet 配上 Jacques 的聲音,很多可以選。
大切な表現
Hint: https://portal.lttc.org.tw/gogogo/doc/hint/Go1-L1.pdf
音檔: https://www.youtube.com/watch?v=chtfy_GzKRs
參考資料:超級多語達人(Kazu)公開學習秘訣,學習效率提升 300%!/ 多數人初學外語都會踩錯的第一步是什麼? | 青茶說:https://www.youtube.com/watch?v=Q3jLzZSdOC0 。疑似用錯方式學英文(3 + 3 + 4 = 10年?),這次改用新的方式學新的語言。
1. Photos
2. Websites
3. Others
雜談之一
雜記之三
沒有特別想到的標題。
def GetPrimes(n):
"""
Get all primes up to n.
Use sieve of Eratosthenes to generate all primes less or equal to n. For
example, given n = 10, then returns a list of primes [2, 3, 5, 7].
Args:
n: An integer representing the upper bound.
Returns:
A list containing all primes <= n in the increasing order.
"""
sqrt_n = int(math.sqrt(n))
visited = [False] * (n + 1)
for i in range(2, sqrt_n + 1):
if not visited[i]:
for j in range(i * i, n + 1, i):
visited[j] = True
primes = []
for i in range(2, n + 1):
if not visited[i]:
primes.append(i)
return primes
def ModInverse(a, m):
"""
Modular multiplicative inverse algorithm.
Computes modular multiplicative inverse of an integer a is an integer x such
that the product ax is congruent to 1 with respect to the modulus m.
Args:
a: An integer.
m: An integer representing modulus.
Returns:
An integer x satisfying ax = 1 (mod m). Otherwise throw an exception if
there is no such integer x.
"""
g, x, y = ExtendedGcd(a, m)
if g != 1:
raise Exception('modular inverse does not exist')
return x % m
def ExtendedGcd(a, b):
"""
Extended Euclidean algorithm.
Computes, in addition to the greatest common divisor of integers a and b,
also the coefficients of Bezout's identity, which are integers x and y such
that a x + b y = gcd(a, b).
Args:
a: An integer.
b: An integer.
Returns:
A tuple (g, x, y) satisfying a x + b y = g.
"""
if a == 0:
return (b, 0, 1)
else:
g, y, x = ExtendedGcd(b % a, a)
return (g, x - (b // a) * y, y)
def Factorize(n, primes):
"""
Factorize n by primes.
For every prime p <= sqrt(n), we examine whether n is divided by p. If so, we
compute the maximal integer value e satisfying that n is divided by p^e and n
is not divide by p^{e + 1}.
The factorization is represented by a dict(). It means that all prime factors
of n are not in order. Consider use collections.OrderedDict() instead of
dict() to keep the order of prime factors.
Args:
n: An integer representing a number to be factorized.
primes: An integer list representing all possible prime factors <= sqrt(n).
Returns:
A dictionary where the key representing a prime factor p and the
corresponding value representing the maximal integer value e satisfying that
n is divided by p^e and n is not divide by p^{e + 1}.
"""
factorization = {}
d = n
for prime in primes:
if prime * prime > d:
break
e = 0
while d % prime == 0:
d //= prime
e += 1
if e > 0:
factorization[prime] = e
if d > 1:
factorization[d] = 1
if primes[-1] * primes[-1] < d:
raise ValueError
return factorization