Skip to content

Commit

Permalink
ai: add copyright license
Browse files Browse the repository at this point in the history
  • Loading branch information
David Arroyo Menéndez committed Sep 22, 2018
1 parent 1081b50 commit a8fec5b
Show file tree
Hide file tree
Showing 8 changed files with 176 additions and 2 deletions.
22 changes: 22 additions & 0 deletions ai/8puzzle.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,25 @@
#!/usr/bin/python
# -*- coding: utf-8 -*-

# Copyright (C) 2018 David Arroyo Menéndez

# Author: David Arroyo Menéndez <[email protected]>
# Maintainer: David Arroyo Menéndez <[email protected]>

# This file is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 3, or (at your option)
# any later version.

# This file is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.

# You should have received a copy of the GNU General Public License
# along with GNU Emacs; see the file COPYING. If not, write to
# the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
# Boston, MA 02110-1301 USA,
# Solves a randomized 8-puzzle using A* algorithm with plug-in heuristics

import random
Expand Down
22 changes: 22 additions & 0 deletions ai/BackPropagationNN.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,25 @@
#!/usr/bin/python
# -*- coding: utf-8 -*-

# Copyright (C) 2018 David Arroyo Menéndez

# Author: David Arroyo Menéndez <[email protected]>
# Maintainer: David Arroyo Menéndez <[email protected]>

# This file is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 3, or (at your option)
# any later version.

# This file is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.

# You should have received a copy of the GNU General Public License
# along with GNU Emacs; see the file COPYING. If not, write to
# the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
# Boston, MA 02110-1301 USA,
# https://databoys.github.io/Feedforward/

import math
Expand Down
23 changes: 22 additions & 1 deletion ai/clustering.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,25 @@
#!/usr/bin/python
# -*- coding: utf-8 -*-

# Copyright (C) 2018 David Arroyo Menéndez

# Author: David Arroyo Menéndez <[email protected]>
# Maintainer: David Arroyo Menéndez <[email protected]>

# This file is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 3, or (at your option)
# any later version.

# This file is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.

# You should have received a copy of the GNU General Public License
# along with GNU Emacs; see the file COPYING. If not, write to
# the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
# Boston, MA 02110-1301 USA,
import matplotlib.pyplot as plt
from matplotlib import style
import numpy as np
Expand Down Expand Up @@ -28,4 +50,3 @@
plt.plot(X[i][0], X[i][1], colors[labels[i]], markersize = 10)
plt.scatter(centroids[:, 0],centroids[:, 1], marker = "x", s=150, linewidths = 5, zorder = 10)
plt.show()

22 changes: 22 additions & 0 deletions ai/knearest.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,25 @@
#!/usr/bin/python
# -*- coding: utf-8 -*-

# Copyright (C) 2018 David Arroyo Menéndez

# Author: David Arroyo Menéndez <[email protected]>
# Maintainer: David Arroyo Menéndez <[email protected]>

# This file is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 3, or (at your option)
# any later version.

# This file is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.

# You should have received a copy of the GNU General Public License
# along with GNU Emacs; see the file COPYING. If not, write to
# the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
# Boston, MA 02110-1301 USA,
import numpy as np
import matplotlib.pyplot as plt
from matplotlib import style
Expand Down
22 changes: 22 additions & 0 deletions ai/layerneuralnetwork.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,25 @@
#!/usr/bin/python
# -*- coding: utf-8 -*-

# Copyright (C) 2018 David Arroyo Menéndez

# Author: David Arroyo Menéndez <[email protected]>
# Maintainer: David Arroyo Menéndez <[email protected]>

# This file is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 3, or (at your option)
# any later version.

# This file is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.

# You should have received a copy of the GNU General Public License
# along with GNU Emacs; see the file COPYING. If not, write to
# the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
# Boston, MA 02110-1301 USA,
import numpy as np

# sigmoid function
Expand Down
22 changes: 22 additions & 0 deletions ai/linear_algebra.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,25 @@
#!/usr/bin/python
# -*- coding: utf-8 -*-

# Copyright (C) 2018 David Arroyo Menéndez

# Author: David Arroyo Menéndez <[email protected]>
# Maintainer: David Arroyo Menéndez <[email protected]>

# This file is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 3, or (at your option)
# any later version.

# This file is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.

# You should have received a copy of the GNU General Public License
# along with GNU Emacs; see the file COPYING. If not, write to
# the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
# Boston, MA 02110-1301 USA,
# -*- coding: iso-8859-15 -*-

from __future__ import division # want 3 / 2 == 1.5
Expand Down
23 changes: 22 additions & 1 deletion ai/recommender_systems.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,25 @@
#!/usr/bin/python
# -*- coding: utf-8 -*-

# Copyright (C) 2018 David Arroyo Menéndez

# Author: David Arroyo Menéndez <[email protected]>
# Maintainer: David Arroyo Menéndez <[email protected]>

# This file is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 3, or (at your option)
# any later version.

# This file is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.

# You should have received a copy of the GNU General Public License
# along with GNU Emacs; see the file COPYING. If not, write to
# the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
# Boston, MA 02110-1301 USA,
from __future__ import division
import math, random
from collections import defaultdict, Counter
Expand Down Expand Up @@ -152,4 +174,3 @@ def item_based_suggestions(user_id, include_current_interests=False):

print("suggestions for user 0")
print(item_based_suggestions(0))

22 changes: 22 additions & 0 deletions ai/rsquared.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,25 @@
#!/usr/bin/python
# -*- coding: utf-8 -*-

# Copyright (C) 2018 David Arroyo Menéndez

# Author: David Arroyo Menéndez <[email protected]>
# Maintainer: David Arroyo Menéndez <[email protected]>

# This file is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 3, or (at your option)
# any later version.

# This file is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.

# You should have received a copy of the GNU General Public License
# along with GNU Emacs; see the file COPYING. If not, write to
# the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
# Boston, MA 02110-1301 USA,
from statistics import mean
import numpy as np
import matplotlib.pyplot as plt
Expand Down

0 comments on commit a8fec5b

Please sign in to comment.