What do you want to save?
Add Code snippet
New code examples
-
Javascript 2022-02-28 02:10:24
react and reactdom dependencies cdn link
<script crossorigin src="https://unpkg.com/react@16/umd/react.development.js"></script> <script crossorigin src="https://unpkg.com/react-dom@16/umd/react-dom.development.js"></script> Add solution -
Python 2022-02-28 01:00:27
how to periodically update dash
import time from concurrent.futures import ThreadPoolExecutor, ProcessPoolExecutor import dash import dash_html_components as html import dash_core_components as dcc import plotly.graph_objs as go import numpy as np # number of seconds between re-calcul... Add solution -
Python 2022-02-27 23:10:03
how to make tic tac toe in python
#Tic Tac Toe game in python by techwithtim board = [' ' for x in range(10)] def insertLetter(letter, pos): board[pos] = letter def spaceIsFree(pos): return board[pos] == ' ' def printBoard(board): print(' | |') print(' ' + board[1]... Add solution -
-
Python 2022-02-27 03:55:15
add column python list
T = NP.random.randint(0, 10, 20).reshape(5, 4) c = NP.random.randint(0, 10, 5) r = NP.random.randint(0, 10, 4) # add a column to T, at the front: NP.insert(T, 0, c, axis=1) # add a column to T, at the end: NP.insert(T, 4, c, axis=1) # add a row to T betwe... Add solution -
Python 2022-02-26 22:10:05
python rsa
import Crypto from Crypto.PublicKey import RSA from Crypto import Random random_generator = Random.new().read key = RSA.generate(1024, random_generator) #generate public and private keys publickey = key.publickey # pub key export for exchange encrypted... Add solution -
Python 2022-02-21 00:35:02
affinity propagation cosine similarity python
# credit to Stack Overflow user in the source link import numpy as np from sklearn.metrics.pairwise import cosine_distances # some dummy data word_vectors = np.random.random((77, 300)) word_cosine = cosine_distances(word_vectors) affprop = AffinityPropa... Add solution -
Other 2022-02-19 23:45:03
how to use validation split data as validation data in callback
x = np.random.randn(150, 9) y = np.random.randint(0, 10, 150) x_train, y_train, x_val, y_val = split(x, y) train_dataset = tf.data.Dataset.from_tensor_slices((x_train, tf.one_hot(y_train, depth=10))) train_dataset = train_dataset.batch(32).repeat() val... Add solution