Skip to content

Instantly share code, notes, and snippets.

View njouanin's full-sized avatar

Nicolas njouanin

  • Lllle, France
  • 17:24 (UTC +02:00)
View GitHub Profile
@njouanin
njouanin / backend.py
Last active March 9, 2024 18:22
Test backend trawlWatch
from typing import Union
from fastapi import FastAPI
from bloom.container import UseCases
use_cases = UseCases()
app = FastAPI()
def pos_to_dict(row):
class Brasserie {
}
enum EtatBrasserie {
PROJET
PILOTE
AUTONOME
INACTIF
RETIRE
@njouanin
njouanin / gist:9d2d1ce85bf5ed4c2540
Created October 5, 2014 09:02
Asyncio test for file copy
import asyncio
import os
import io
import logging
import time
logging.basicConfig(level=logging.DEBUG)
logger = logging.getLogger(__name__)
@njouanin
njouanin / gist:36292368ad15f9b87ba0
Created September 6, 2014 14:22
Jinja2 i18n test
from jinja2 import Environment, FileSystemLoader
env = Environment(loader=FileSystemLoader('theme/templates'), extensions=['jinja2.ext.i18n'])
template=env.get_template('base.html')
print(template.render())
@njouanin
njouanin / fiddle.html
Last active December 29, 2017 10:24
angularJS zero padding filter
<div ng-app="MyApp">
<h1>Zero padding filter</h1>
<div>
<input type="text" ng-model="ztext" placeholder="Type some text ..." />
</div>
<div>
<h2>Result:</h2>
<p>{{ztext | zpad:4}}</p>
</div
</div>