Skip to content

Instantly share code, notes, and snippets.

Avatar
💭
Homo Sapiens

Nov05

💭
Homo Sapiens
View GitHub Profile
@tommyjtl
tommyjtl / dopa-rev5_withname.stl
Last active June 26, 2020 04:43
Ring for lovers. License under CC 4.0 BY-SA.
View dopa-rev5_withname.stl
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@Nov05
Nov05 / model.py
Last active March 11, 2020 04:33
2020-03-07 CNN-LSTM image captioning
View model.py
import torch
import torch.nn as nn
import torch.nn.functional as F
import torchvision.models as models
class EncoderCNN(nn.Module):
def __init__(self, embed_size):
# super(EncoderCNN, self).__init__()
super().__init__()
@pbochynski
pbochynski / oidc-sap-ias.md
Last active October 21, 2022 07:12
Configure Kyma with SAP IAS (oidc connector)
View oidc-sap-ias.md

Configure IAS tenant

  1. Go to your IAS tenant admin page: https://mytenant.accounts.ondemand.com/admin

  2. Go to Applications & Resources -> Tenant Settings -> OpenID Connect Configuration, and select the Name value from a dropdown list. Choose the one starting with https.

  3. Go to Applications & Resources -> Applications and add new Application. Name it (e.g. kyma) and configure it:

    • set Type to OpenID Connect
    • in OpenID Connect Configuration set name (kyma) and add RedirectURI: https://dex.mykymacluster.domain/callback
    • set HTTP Basic Authentication: provide password and copy generated User ID (e.g. T000005)
    • in Assertion Attributes make sure User Attribute E-mail is mapped to Assertion Attribute email (not mail), and First Name to name
@korakot
korakot / selenium.py
Last active April 17, 2023 19:21
Use selenium in Colab
View selenium.py
# install chromium, its driver, and selenium
!apt update
!apt install chromium-chromedriver
!pip install selenium
# set options to be headless, ..
from selenium import webdriver
options = webdriver.ChromeOptions()
options.add_argument('--headless')
options.add_argument('--no-sandbox')
options.add_argument('--disable-dev-shm-usage')
@emredjan
emredjan / json_to_csv.py
Last active October 21, 2022 01:46
Yelp Dataset Challenge JSON to CSV conversion
View json_to_csv.py
'''
Load Yelp JSON files and spit out CSV files
Does not try to reinvent the wheel and uses pandas json_normalize
Kinda hacky and requires a bit of RAM. But works, albeit naively.
Tested with Yelp JSON files in dataset challenge round 12:
https://www.yelp.com/dataset/challenge
'''
import json
@gilrosenthal
gilrosenthal / Fast.ai install script
Created July 4, 2018 20:14
Fast.ai Install on Google Colab
View Fast.ai install script
!pip install fastai
!apt-get -qq install -y libsm6 libxext6 && pip install -q -U opencv-python
import cv2
from os import path
from wheel.pep425tags import get_abbr_impl, get_impl_ver, get_abi_tag
platform = '{}{}-{}'.format(get_abbr_impl(), get_impl_ver(), get_abi_tag())
accelerator = 'cu80' if path.exists('/opt/bin/nvidia-smi') else 'cpu'
!pip install -q http://download.pytorch.org/whl/{accelerator}/torch-0.3.0.post4-{platform}-linux_x86_64.whl torchvision
@bishboria
bishboria / springer-free-maths-books.md
Last active May 18, 2023 12:57
Springer made a bunch of books available for free, these were the direct links