Lazarus

Programming => General => Topic started by: schuler on August 27, 2019, 10:21:29 am

Title: Google Colab + FPC
Post by: schuler on August 27, 2019, 10:21:29 am
:) Hello :)
Just found that it's possible to install FPC in Google Colab ( https://colab.research.google.com/notebooks/welcome.ipynb ).

Just installed with:
Quote
!apt-get install fpc fpc-source lazarus

Found it interesting and decided to share. Installing lazarus might be useful for running lazbuild.
After installing the above, you can test with this:
Quote
!apt-get install subversion
Get the pascal source code with:
Quote
!svn checkout https://svn.code.sf.net/p/cai/svncode/trunk cai-svncode
Compile with:
Quote
!lazbuild cai-svncode/lazarus/experiments/supersimple/supersimple.lpi
And then run with (you can find the bin path from the linker when compiling):
Quote
!cai-svncode/lazarus/bin/x86_64-linux/bin/supersimple

:) Wish everyone happy pascal coding :)
Title: Re: Google Colab + FPC
Post by: nouzi on August 27, 2019, 12:45:04 pm
Good news
Title: Re: Google Colab + FPC
Post by: schuler on September 25, 2019, 06:32:07 pm
Just prepared a better example (neural networks / computer vision / CIFAR-10 image classifier):
https://colab.research.google.com/github/joaopauloschuler/neural-api/blob/master/examples/SimpleImageClassifier/SimpleImageClassifierCPU.ipynb

In the case that you would like to look at the source code before running:
https://github.com/joaopauloschuler/neural-api/tree/master/examples/SimpleImageClassifier

It's slow but it works.

:) wish everyone happy pascal coding :)
TinyPortal © 2005-2018