This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
module Main where | |
config_input_cells = 1 :: Int | |
config_hidden_layer_cells = 10 :: Int | |
config_hidden_layers = 2 :: Int | |
config_output_cells = 1 :: Int | |
-- [ [ (Threshhold, [Connection Weights] ) ] ] | |
type Net = [ [ (Double, [Double] ) ] ] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
""" Classifies a point as belonging to a cluster of points """ | |
from math import sqrt | |
from random import shuffle | |
WIDTH = 28 | |
HEIGHT = 28 | |
POINT_TO_CLASSIFY = (2,4) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
## Q | |
CSS: | |
Explain the difference between visibility:hidden; and display:none; | |
## A | |
Visibility:Hidden; - It is not visible but takes up it's original space. | |
Display:None; - It is hidden and takes up absolutely no space as if it was never there. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import random | |
class MM(object): | |
def __init__(self): | |
# Wordlist form = ['this','is','words'] | |
# Graph form = [((1,1)],[(2,1)],[]] | |
# [((count, index)],[(count, index)],[]] | |
self.wordlist = [] | |
self.graphlist = [] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
module SAScan where | |
import Network.Shpider | |
import System.Posix.Unistd | |
import Data.List | |
import Char | |
firstUser = "theprototype" | |
toLoad = False | |
savedFile = "SASaved" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
;A list of your grades. Change this to reflect your grades and run the program. | |
( def grades '(\a \b \c \d \f \d \c \b \a) ) | |
;Function for mapping grades to numbers and then averaging them. | |
( def gpaList '{\a 4, \b 3, \c 2, \d 1, \f 0} ) | |
( defn gpa [grades] (double (/ ( reduce + (map (fn [x] (get gpaList x)) grades ) ) (count grades) ) ) ) | |
;Prints out your GPA | |
( println (gpa grades ) ) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
------------------------------------ | |
------------------------------------ | |
------------------------------------ | |
------------------------------------ | |
------------------------------------ | |
------------------------------------ | |
------------------------------------ | |
------------------------------------ | |
------------------------------------ | |
--------------xx-------------------- |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from random import randint | |
#GE | |
#Constants | |
gens = 150 | |
popNum = 30 | |
mutRate = 20 # Rate of mutation = 1/mutRate | |
goal = 97 | |
chromosomeLength = 24 # Must be a multiple of 5 - 1. Example: 14, 19, 24, 29, 34 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
module GE where | |
import System.Random | |
import Data.List (elemIndex) | |
import Control.Monad (foldM) | |
type Aminal = [Int] | |
type Population = [Aminal] | |
gen = 10 {- GENERATIONS -} | |
pop = 10 {- POPULATION NUMBER -} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/python | |
#An experimental falling(or rising, in this case) sand game coded by Lambdanaut | |
import pygame, sys, os, random | |
from pygame.locals import * | |
if sys.platform == 'win32' or sys.platform == 'win64': | |
os.environ['SDL_VIDEO_CENTERED'] = '1' | |
#Init Variables | |
def popRoom(x,y): | |
room = [] |
OlderNewer