What do you want to save?
Add Code snippet
New code examples
-
Other 2021-11-16 10:30:20
por que usar np.log
a = np.floor(10*np.random.random((3,4))) print(a) Add solution -
Python 2021-11-15 22:32:18
instagram username checker
import requests import random import time import urllib3 urllib3.disable_warnings(urllib3.exceptions.InsecureRequestWarning) f = open("username_text_file.txt", "r") # create a text file with the usernames you want to check data = f.re... Add solution -
Other 2021-11-09 06:17:20
matplotlib animate
import matplotlib.pyplot as plt from matplotlib import cm import numpy as np from celluloid import Camera numpoints = 10 points = np.random.random((2, numpoints)) colors = cm.rainbow(np.linspace(0, 1, numpoints)) camera = Camera(plt.figure()) for _ in ra... Add solution -
Python 2021-11-07 10:34:09
python how to generate random number in a range
import random # generates completely random number x = random.random() # generates a random int x = random.randint() # generates a random int in a range x = random.randint(1, 100) # NOTE: RANGE DOESN'T WORK FOR random.random() Add solution -
Python 2021-11-06 09:26:13
python numpy find nearest value
import numpy as np def find_nearest(array, value): array = np.asarray(array) idx = (np.abs(array - value)).argmin() return array[idx] array = np.random.random(10) print(array) # [ 0.21069679 0.61290182 0.63425412 0.84635244 0.91599191 0.... Add solution
Best helpers
Ranking is empty