Skip to content

Instantly share code, notes, and snippets.

View osbm's full-sized avatar
:shipit:
even fake things have their value

osman - オスマン osbm

:shipit:
even fake things have their value
View GitHub Profile
@osbm
osbm / main.py
Created November 24, 2021 18:26
login to cyberroam automatically. It can be controlled through system tray
from PIL import Image, ImageDraw
from pystray import MenuItem as item
import pystray # pip install pystray
import requests
import threading
import sys
import os
import time
@osbm
osbm / keras_cv_search.ipynb
Created May 4, 2022 17:57
keras_cv_search.ipynb
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@osbm
osbm / chembl25_smiles_dataset.ipynb
Created September 13, 2022 08:21
chembl25_smiles_dataset.ipynb
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@osbm
osbm / main.py
Created November 20, 2022 11:38
import os
os.environ['TF_CPP_MIN_LOG_LEVEL'] = '3' # stfu tensorflow
import tensorflow as tf
x = tf.constant(3.0)
print(x)
with tf.GradientTape() as tape:
tape.watch(x)
import numpy as np
# a decorator to measure the time of a function
def measure_time(func):
import time
def wrapper(*args, **kwargs):
start = time.time()
result = func(*args, **kwargs)
end = time.time()
print(f"{func.__name__} took {end - start} seconds")
@osbm
osbm / turkey_earthquake.js
Created February 12, 2023 00:47
This code can run in Google earth engine web editor.
var geometry =
/* color: #ffc82d */
/* shown: false */
ee.Geometry.Polygon(
[[[36.803785364345735, 37.6022824651851],
[36.84292415829105, 37.569634979372736],
[36.8896160528223, 37.548134235962486],
[36.96171383114261, 37.54377889953015],
[36.99741939754886, 37.565280899470345],
[36.97819332333011, 37.58759286852694],
import os
os.environ['TF_CPP_MIN_LOG_LEVEL'] = '3' # or any {'0', '1', '2'}
@osbm
osbm / zenodo-file-downloader.ipynb
Last active June 12, 2023 11:30
Zenodo file downloader.ipynb
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

First of all, select your version from arch archives for cuda and cuda-tools. I selected the latest 12.1 version: 12.1.1-4

Then just run these lines:

sudo pacman -U https://archive.archlinux.org/packages/c/cuda/cuda-12.1.1-4-x86_64.pkg.tar.zst
sudo pacman -U https://archive.archlinux.org/packages/c/cuda-tools/cuda-tools-12.1.1-4-x86_64.pkg.tar.zst

Now as soon as you install these packages package manager will want to update them, to disable updating these packages.