Recent

Author Topic: Google Colab + FPC  (Read 567 times)

schuler

  • Full Member
  • ***
  • Posts: 161
Google Colab + FPC
« 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 :)
« Last Edit: August 27, 2019, 10:51:38 am by schuler »

nouzi

  • Full Member
  • ***
  • Posts: 176
Re: Google Colab + FPC
« Reply #1 on: August 27, 2019, 12:45:04 pm »
Good news
my english is  bad
Lazarus 2.0.6 free pascal 3.0.4
Lazarus trunk  free pascal trunk 
System : linux mint 19.3 64bit  windows 7 64bit

schuler

  • Full Member
  • ***
  • Posts: 161
Re: Google Colab + FPC
« Reply #2 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 :)
« Last Edit: September 27, 2019, 01:06:50 am by schuler »

 

TinyPortal © 2005-2018