Skip to content

Instantly share code, notes, and snippets.

View Geek-a-Byte's full-sized avatar
🖤
What doesn't kill you makes you stronger

Nazia Shehnaz Joynab Geek-a-Byte

🖤
What doesn't kill you makes you stronger
View GitHub Profile
@Geek-a-Byte
Geek-a-Byte / AwesomeCourses.md
Created January 15, 2024 06:16 — forked from Amir22010/AwesomeCourses.md
List of awesome university courses for learning Computer Science!

Awesome Courses Awesome

Introduction

There is a lot of hidden treasure lying within university pages scattered across the internet. This list is an attempt to bring to light those awesome courses which make their high-quality material i.e. assignments, lectures, notes, readings & examinations available online for free.

Table of Contents

@Geek-a-Byte
Geek-a-Byte / github_desktop_ubuntu.sh
Created July 29, 2023 13:54 — forked from berkorbay/github_desktop_ubuntu.md
To install Github Desktop for Ubuntu
## Follow this link for further updates to Github Desktop for Ubuntu https://github.com/shiftkey/desktop/releases/latest
# UPDATE (2022-11-07): Thanks to Sxvxgee's message, the updated code is as follows
sudo wget https://github.com/shiftkey/desktop/releases/download/release-3.1.1-linux1/GitHubDesktop-linux-3.1.1-linux1.deb
### Uncomment below line if you have not installed gdebi-core before
# sudo apt-get install gdebi-core
sudo gdebi GitHubDesktop-linux-3.1.1-linux1.deb
# UPDATE (2021-10-18): Thanks to Amin Yahyaabadi's message, the updated code is as follows
# https://stackoverflow.com/questions/58935672/i-get-brokenpipeerror-errno-32-broken-pipe-error-in-python
from requests.exceptions import ConnectionError
def retry_on_connectionerror(f, max_retries=5):
retries = 0
while retries < max_retries:
try:
return f()
except ConnectionError:
retries += 1
!pip install nexusformat # one time run
import nexusformat.nexus as nx
f = nx.nxload('/content/sample.h5')
print(f.tree)
## or
global_model = load_model('/content/sample.h5')
global_model.summary()
import requests
def download_file_from_google_drive(id, destination):
URL = "https://docs.google.com/uc?export=download"
session = requests.Session()
response = session.get(URL, params = { 'id' : id }, stream = True)
token = get_confirm_token(response)
!pip install gdown==3.6.0
my_file_id = "1-5qd5G2e9Y5AvgHRkeXncNvgcC-N783J"
!gdown https://drive.google.com/uc?id={my_file_id}
import tensorflow as tf
from tensorflow.keras.models import load_model
from google.colab import drive
drive.mount('/content/gdrive')
model_save_name = "test.h5"
path = F"/content/cervical_cancer_global_model.h5"
%cp "{path}" "/content/gdrive/MyDrive/Thesis_A_10/global_model_weights/{model_save_name}"
%%writefile app.py
from __future__ import print_function
import streamlit as st
from googleapiclient.errors import HttpError
from googleapiclient.http import MediaFileUpload
from googleapiclient.discovery import build
from oauth2client.service_account import ServiceAccountCredentials
import os
# https://www.youtube.com/watch?v=MUD-pBOnvdo&t=8s&ab_channel=1littlecoder
#install streamlit, one time execution
!pip install streamlit
#import streamlit
import streamlit as st
# Commented out IPython magic to ensure Python compatibility.
# %%writefile app.py
!pip install pyforest
!pip install lazypredict
import pyforest
import lazypredict
from lazypredict.Supervised import LazyClassifier
clf = LazyClassifier(verbose=0, predictions=True, ignore_warnings=False, custom_metric=None)
models, predictions = clf.fit(X_train, X_test, y_train, y_test)