Skip to content

Instantly share code, notes, and snippets.

View ikondrat's full-sized avatar

Kondrat Shmoylov ikondrat

  • Lightly AI
  • Zurich
View GitHub Profile
@ikondrat
ikondrat / example-yolo.py
Created February 4, 2025 09:21
Example to run lightly-purple on YOLO8 dataset
import os
from lightly_purple import DatasetLoader
# Create a DatasetLoader instance
loader = DatasetLoader()
# Define the path to the dataset (folder containing data.yaml)
dataset_path = os.getenv("DATASET_PATH")
@ikondrat
ikondrat / example.py
Created February 4, 2025 08:57
yolo8 example
import os
from lightly_purple import DatasetLoader
# Create a DatasetLoader instance
loader = DatasetLoader()
# Define the path to the dataset (folder containing data.yaml)
dataset_path = os.getenv("DATASET_PATH")
@ikondrat
ikondrat / fetch.sh
Last active February 4, 2025 09:05
Fetch roboflow dataset
#!/bin/bash
# Check if both parameters are provided
if [ $# -ne 2 ]; then
echo "Usage: $0 <dataset_url> <target_folder>"
exit 1
fi
DATASET_URL=$1
TARGET_FOLDER=$2
@ikondrat
ikondrat / setup-dev.sh
Last active March 15, 2023 09:50
Setup dev
#!/usr/bin/env bash
# Lets have here everything we need to setup a local environment to avoid manual steps
# To use just run
# bash <(curl -sL https://gist.githubusercontent.com/ikondrat/1d6f0e3404159a0fa97dde239e213c0d/raw/d576aa60227488de195749665881483a31083a49/setup-dev.sh)
# from the root of the project
set -e
echo "Install yq yaml parser"
brew install yq jq
@ikondrat
ikondrat / fill-local-env.sh
Created March 15, 2023 09:37
fill-local-env.sh
#!/usr/bin/env bash
# Script to fetch env variables required to have a build locally
# it is used in setup-dev.sh
set -e
ENV_FILE=${1:-'apps/web/.env.local'}
SPEC_FILE=${2:-'apps/web/env.local.yml'}
eval $(assume-role -r tools-developer)
{
"version": "0.2.0",
"configurations": [
{
"type": "node",
"name": "vscode-jest-tests",
"request": "launch",
"runtimeExecutable": "${workspaceFolder}/node_modules/.bin/jest",
"args": [
"test",
{
"[javascript]": {
"editor.defaultFormatter": "esbenp.prettier-vscode",
"editor.formatOnSave": true
},
"[javascriptreact]": {
"editor.defaultFormatter": "esbenp.prettier-vscode",
"editor.formatOnSave": true
},
"[typescript]": {
{
"version": "0.2.0",
"configurations": [
{
"type": "node",
"name": "vscode-jest-tests",
"request": "launch",
"runtimeExecutable": "${workspaceFolder}/node_modules/.bin/jest",
"args": [
"test",
{
"[javascript]": {
"editor.defaultFormatter": "esbenp.prettier-vscode",
"editor.formatOnSave": true
},
"[javascriptreact]": {
"editor.defaultFormatter": "esbenp.prettier-vscode",
"editor.formatOnSave": true
},
"[typescript]": {
@ikondrat
ikondrat / settings.json
Created June 8, 2021 10:05
VS Code Esbenp plugin autoformatting example
{
"[javascript]": {
"editor.defaultFormatter": "esbenp.prettier-vscode",
"editor.formatOnSave": true
},
"[javascriptreact]": {
"editor.defaultFormatter": "esbenp.prettier-vscode",
"editor.formatOnSave": true
},
"[typescript]": {