Skip to content

Instantly share code, notes, and snippets.

View codinguncut's full-sized avatar

Johannes Ahlmann codinguncut

View GitHub Profile
@codinguncut
codinguncut / load.py
Last active January 20, 2024 11:47
dogs_and_cats loader
import torch
from torchvision import datasets, transforms
import pathlib
import random
def get_dogs_and_cats(*args, **kwargs):
return get_dogs_and_cats_data(*args, **kwargs)
def get_dogs_and_cats_data(split="train", resize=(32,32), n_images=None, batch_size=None, is_resnet=False, **kwargs):
if resize is None:

Required for full Cypress support

  1. get/set/clear cookies by domain
  2. screenshot page
  3. record video of page (this can be done via getUserMedia api if it supports capturing the browser tab, which we do in firefox)
  4. a way to set a proxy server for all network traffic
  5. bypass the invalid ssl cert screen/prompt

Notes

  • It is not possible to pass any command line arguments to Safari.
@codinguncut
codinguncut / alphabet kata
Created September 28, 2016 16:12
alphabet kata
import Data.Char
char_to_pos c = ord c - ord 'a'
pos_to_char p = chr (p `mod` 26 + ord('a'))
transcode_letter op key text = pos_to_char (text_offset `op` key_offset + 26)
where [key_offset, text_offset] = map char_to_pos [key, text]
encode_letter = transcode_letter (+)
decode_letter = transcode_letter (-)
@codinguncut
codinguncut / coder_dojo_ideas_html.md
Last active March 15, 2019 15:56
coder dojo ideas html
@codinguncut
codinguncut / gist:c4359d9bc6f36549b625
Last active October 26, 2017 15:29
kaggle collection
  1. feature engineering (most important by far)!!!!!
  2. simple models
  3. overfitting leaderboard
  4. ensembling
  • predict the right thing!
  • build pipeline and put something on the leaderboard
  • allocate time to play with data, explore
  • make heavy use of forums
  • understand subtleties of algos, know what tool to use when