mirror of
https://github.com/TheAlgorithms/Python.git
synced 2024-11-23 21:11:08 +00:00
parent
04698538d8
commit
e7b6d2824a
|
@ -12,7 +12,7 @@ The examples presented here are:
|
|||
https://en.wikipedia.org/wiki/File:Julia_z2%2B0,25.png
|
||||
- Other examples from https://en.wikipedia.org/wiki/Julia_set
|
||||
- An exponential map Julia set, ambiantly homeomorphic to the examples in
|
||||
http://www.math.univ-toulouse.fr/~cheritat/GalII/galery.html
|
||||
https://www.math.univ-toulouse.fr/~cheritat/GalII/galery.html
|
||||
and
|
||||
https://ddd.uab.cat/pub/pubmat/02141493v43n1/02141493v43n1p27.pdf
|
||||
|
||||
|
|
|
@ -24,7 +24,7 @@ Usage:
|
|||
- $python sierpinski_triangle.py <int:depth_for_fractal>
|
||||
|
||||
Credits: This code was written by editing the code from
|
||||
http://www.riannetrujillo.com/blog/python-fractal/
|
||||
https://www.riannetrujillo.com/blog/python-fractal/
|
||||
|
||||
"""
|
||||
import sys
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
"""
|
||||
Create a Long Short Term Memory (LSTM) network model
|
||||
An LSTM is a type of Recurrent Neural Network (RNN) as discussed at:
|
||||
* http://colah.github.io/posts/2015-08-Understanding-LSTMs
|
||||
* https://colah.github.io/posts/2015-08-Understanding-LSTMs
|
||||
* https://en.wikipedia.org/wiki/Long_short-term_memory
|
||||
"""
|
||||
import numpy as np
|
||||
|
|
|
@ -28,7 +28,7 @@ Usage:
|
|||
Reference:
|
||||
https://www.microsoft.com/en-us/research/wp-content/uploads/2016/02/smo-book.pdf
|
||||
https://www.microsoft.com/en-us/research/wp-content/uploads/2016/02/tr-98-14.pdf
|
||||
http://web.cs.iastate.edu/~honavar/smo-svm.pdf
|
||||
https://web.cs.iastate.edu/~honavar/smo-svm.pdf
|
||||
"""
|
||||
|
||||
|
||||
|
@ -43,7 +43,7 @@ from sklearn.datasets import make_blobs, make_circles
|
|||
from sklearn.preprocessing import StandardScaler
|
||||
|
||||
CANCER_DATASET_URL = (
|
||||
"http://archive.ics.uci.edu/ml/machine-learning-databases/"
|
||||
"https://archive.ics.uci.edu/ml/machine-learning-databases/"
|
||||
"breast-cancer-wisconsin/wdbc.data"
|
||||
)
|
||||
|
||||
|
|
|
@ -5,7 +5,7 @@ import timeit
|
|||
"""
|
||||
Matrix Exponentiation is a technique to solve linear recurrences in logarithmic time.
|
||||
You read more about it here:
|
||||
http://zobayer.blogspot.com/2010/11/matrix-exponentiation.html
|
||||
https://zobayer.blogspot.com/2010/11/matrix-exponentiation.html
|
||||
https://www.hackerearth.com/practice/notes/matrix-exponentiation-1/
|
||||
"""
|
||||
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
"""
|
||||
Minimalist file that allows pytest to find and run the Test unittest. For details, see:
|
||||
http://doc.pytest.org/en/latest/goodpractices.html#conventions-for-python-test-discovery
|
||||
https://doc.pytest.org/en/latest/goodpractices.html#conventions-for-python-test-discovery
|
||||
"""
|
||||
|
||||
from .prime_check import Test
|
||||
|
|
|
@ -8,7 +8,7 @@ velocity and position brought about by these forces. Softening is used to preven
|
|||
numerical divergences when a particle comes too close to another (and the force
|
||||
goes to infinity).
|
||||
(Description adapted from https://en.wikipedia.org/wiki/N-body_simulation )
|
||||
(See also http://www.shodor.org/refdesk/Resources/Algorithms/EulersMethod/ )
|
||||
(See also https://www.shodor.org/refdesk/Resources/Algorithms/EulersMethod/ )
|
||||
"""
|
||||
|
||||
|
||||
|
@ -258,7 +258,7 @@ def example_1() -> BodySystem:
|
|||
Example 1: figure-8 solution to the 3-body-problem
|
||||
This example can be seen as a test of the implementation: given the right
|
||||
initial conditions, the bodies should move in a figure-8.
|
||||
(initial conditions taken from http://www.artcompsci.org/vol_1/v1_web/node56.html)
|
||||
(initial conditions taken from https://www.artcompsci.org/vol_1/v1_web/node56.html)
|
||||
>>> body_system = example_1()
|
||||
>>> len(body_system)
|
||||
3
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
|
||||
import string
|
||||
|
||||
# frequency taken from http://en.wikipedia.org/wiki/Letter_frequency
|
||||
# frequency taken from https://en.wikipedia.org/wiki/Letter_frequency
|
||||
english_letter_freq = {
|
||||
"E": 12.70,
|
||||
"T": 9.06,
|
||||
|
|
|
@ -21,4 +21,4 @@ if __name__ == "__main__":
|
|||
if link.text == "Maps":
|
||||
webbrowser.open(link.get("href"))
|
||||
else:
|
||||
webbrowser.open(f"http://google.com{link.get('href')}")
|
||||
webbrowser.open(f"https://google.com{link.get('href')}")
|
||||
|
|
|
@ -29,4 +29,4 @@ if __name__ == "__main__":
|
|||
"year": 2018,
|
||||
"hl": "en",
|
||||
}
|
||||
print(get_citation("http://scholar.google.com/scholar_lookup", params=params))
|
||||
print(get_citation("https://scholar.google.com/scholar_lookup", params=params))
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
import requests
|
||||
|
||||
APPID = "" # <-- Put your OpenWeatherMap appid here!
|
||||
URL_BASE = "http://api.openweathermap.org/data/2.5/"
|
||||
URL_BASE = "https://api.openweathermap.org/data/2.5/"
|
||||
|
||||
|
||||
def current_weather(q: str = "Chicago", appid: str = APPID) -> dict:
|
||||
|
|
|
@ -10,7 +10,7 @@ def get_gifs(query: str, api_key: str = giphy_api_key) -> list:
|
|||
Get a list of URLs of GIFs based on a given query..
|
||||
"""
|
||||
formatted_query = "+".join(query.split())
|
||||
url = f"http://api.giphy.com/v1/gifs/search?q={formatted_query}&api_key={api_key}"
|
||||
url = f"https://api.giphy.com/v1/gifs/search?q={formatted_query}&api_key={api_key}"
|
||||
gifs = requests.get(url).json()["data"]
|
||||
return [gif["url"] for gif in gifs]
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user