Skip to content

Instantly share code, notes, and snippets.

@javierguzman
javierguzman / TermsAndConditions.tsx
Created July 19, 2020 13:40
Example of terms and conditions in different languages using markdown and dynamic import
import React, { useEffect, useState } from 'react';
import i18next from 'i18next';
import { getCurrentLanguage } from '@Utils/language';
import ReactMarkdown from 'react-markdown';
import Loader from '@Loader';
type MarkdownContent = string | undefined;
const TermsAndConditions = (): JSX.Element => {
const currentLanguage = getCurrentLanguage(i18next.languages); // it returns i18next.languages[0] -> 'es', 'fr', 'en' etc.
const [getTermsAndConditions, setTermsAndConditions] = useState<MarkdownContent>(undefined);
@plouvart
plouvart / colorimetry_transfert.py
Last active April 20, 2023 12:01
Transfert the colorimetry from one image to another
from PIL import Image
from pathlib import Path
import numpy as np
import sys
def adjust(
in_f1: Path,
in_f2: Path,
out_f: Path,