What do you want to save?
Add Code snippet
New code examples
-
TypeScript 2021-11-20 11:25:14
Shuffle a given array of elements (Fisher–Yates shuffle)
from random import randrange # Utility function to swap elements `A[i]` and `A[j]` in a list def swap(A, i, j): temp = A[i] A[i] = A[j] A[j] = temp # Function to shuffle a list `A` def shuffle(A): # read list from the lowest in... Add solution -
Python 2021-11-09 05:39:10
return code error python
from turtle import* from random import randrange from freegames import square, vector food = vector(0,0) snake = [vector(10,0)] aim = vector(0,-10) def change(x,y): aim.x=x aim.y=y def inside(head): return -200<head.x<190 and -200 <head... Add solution -
Python 2021-10-29 09:11:09
naive bayes classifier calculating sigma
# Naive Bayes On The Iris Dataset from csv import reader from random import seed from random import randrange from math import sqrt from math import exp from math import pi # Load a CSV file def load_csv(filename): dataset = list() with open(filename, ... Add solution
Best helpers
Ranking is empty