What do you want to save?
Add Code snippet
New code examples
-
Python 2022-03-27 11:30:13
tensorboardx
# demo.py import torch import torchvision.utils as vutils import numpy as np import torchvision.models as models from torchvision import datasets from tensorboardX import SummaryWriter resnet18 = models.resnet18(False) writer = SummaryWriter() sample_ra... Add solution -
Other 2022-03-16 23:45:06
Three-dimensional Points and Lines
ax = plt.axes(projection='3d') # Data for a three-dimensional line zline = np.linspace(0, 15, 1000) xline = np.sin(zline) yline = np.cos(zline) ax.plot3D(xline, yline, zline, 'gray') # Data for three-dimensional scattered points zdata = 15 * np.random.r... Add solution -
Python 2022-03-13 04:10:03
Circular heatmap python
from pylab import * import numpy as np from scipy.interpolate import griddata #create 5000 Random points distributed within the circle radius 100 max_r = 100 max_theta = 2.0 * np.pi number_points = 5000 points = np.random.rand(number_points,2)*[max_r,max... Add solution -
C# 2022-03-09 22:25:06
get random file in directory c#
using System.IO; using System.Collections; var files = Directory.GetFiles("C:/path_example/example", "*.png"); //.png can be changed to match any other desired extentions string randomFilePath= files[Random.Range(0,files.Length)]; //e... Add solution -
Python 2022-03-09 15:25:04
time df.apply() python
import pandas as pd import numpy as np from tqdm import tqdm # from tqdm.auto import tqdm # for notebooks df = pd.DataFrame(np.random.randint(0, int(1e8), (10000, 1000))) # Create and register a new `tqdm` instance with `pandas` # (can use tqdm_gui, op... Add solution
Best helpers
Ranking is empty