Last active
June 7, 2024 15:10
-
-
Save karimelgazar/f1e0ab742bc1374b18cb0e50c98f7a8d to your computer and use it in GitHub Desktop.
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
أهم أوامر جوجل كولاب |
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
الزر يظهر فى منتصف الشاشة | |
--------------------------- | |
[![Open In Colab](https://colab.research.google.com/assets/colab-badge.svg)](YOUR_NOTEBOOK_LINK) | |
=============================================================== | |
الزر يظهر فى شمال الشاشة (باستخدام ال HTML) | |
--------------------------- | |
<a href="YOUR_NOTEBOOK_LINK"><img align="left" src="https://colab.research.google.com/assets/colab-badge.svg" alt="Open in Colab" title="Open and Execute in Google Colaboratory"></a> |
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
cd PATH_TO_YOUR_PROJECT_FOLDER | |
!git clone GITHUB_PROJECT_URL |
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
# مكان وضع هذا الكود | |
--- | |
:نفذ الآتى | |
1. Ctrl+Shift+I | |
2. console tab | |
3. ضع الكود الموجود بالأسفل | |
# النوع الأول (لا يتوقف طالما بدأ) | |
--- | |
```javascript | |
function ClickConnect(){ | |
console.log("Connnect Clicked - Start"); | |
document.querySelector("#top-toolbar > colab-connect-button").shadowRoot.querySelector("#connect").click(); | |
console.log("Connnect Clicked - End"); | |
}; | |
setInterval(ClickConnect, 60000) //reconnect every minute(60 seconds) | |
``` | |
--- | |
--- | |
# النوع الأول (يمكن إيقافه) | |
------------------------------------------------------------------------------------------- | |
```javascript | |
var startClickConnect = function startClickConnect(){ | |
var clickConnect = function clickConnect(){ | |
console.log("Connnect Clicked - Start"); | |
document.querySelector("#top-toolbar > colab-connect-button").shadowRoot.querySelector("#connect").click(); | |
console.log("Connnect Clicked - End"); | |
}; | |
var intervalId = setInterval(clickConnect, 60000); | |
var stopClickConnectHandler = function stopClickConnect() { | |
console.log("Connnect Clicked Stopped - Start"); | |
clearInterval(intervalId); | |
console.log("Connnect Clicked Stopped - End"); | |
}; | |
return stopClickConnectHandler; | |
}; | |
``` | |
### لتشغيل النوع الثانى | |
------------ | |
```javascript | |
var stopClickConnect = startClickConnect(); | |
``` | |
### لإيقاف النوع الثانى | |
----------------------------- | |
```javascript | |
stopClickConnect(); | |
``` |
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
%cd "/content/drive/My Drive/" | |
lib_path = "./projects/lib/" | |
!mkdir -p $lib_path | |
import sys | |
!pip install --target=$lib_path LIBRARY_NAME | |
sys.path.insert(0, lib_path) | |
import LIBRARY_NAME |
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
#https://github.com/Kaggle/kaggle-api | |
# !ls ~/.kaggle | |
# root == ~ | |
! mkdir /root/.kaggle | |
!ln -sf "/content/drive/My Drive/projects/kaggle/kaggle.json" ~/.kaggle | |
! chmod 600 ~/.kaggle/kaggle.json | |
# !kaggle competitions files COMP_NAME | |
!kaggle competitions download COMP_NAME -f FILE_NAME |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment