Skip to content

Instantly share code, notes, and snippets.

View ycopin's full-sized avatar

Yannick Copin ycopin

View GitHub Profile
@ycopin
ycopin / rstTable.py
Created July 13, 2012 19:37
reST simple table formatter
#!/usr/bin/env python
# -*- coding: utf-8 -*-
# Time-stamp: <2012-07-13 21:35:19 ycopin>
# Copyright: This document has been placed in the public domain.
"""
Table examples
--------------
A simple table example:
@ycopin
ycopin / searchUnicode.py
Created July 15, 2012 14:41
Search through unicode character descriptions.
#!/usr/bin/env python
# -*- coding: utf-8 -*-
# Time-stamp: <2012-07-15 16:39 ycopin@lyopc469>
# Copyright: This document has been placed in the public domain.
"""
Search through unicode character descriptions, e.g.::
$ searchUnicode.py letter lamda
Λ GREEK CAPITAL LETTER LAMDA &#923 0x39b
@ycopin
ycopin / imSpec.py
Created July 17, 2012 19:17
Encode a (normalized) 1D-array as ligthness component of an HLS image (or any other color system supported by colorsys).
#!/usr/bin/env python -*- coding: utf-8 -*-
"""
Source of inspiration: http://astro.u-strasbg.fr/~koppen/discharge/
"""
__version__ = "Time-stamp: <2012-08-13 13:12 ycopin@lyopc469>"
__author__ = "Yannick Copin <yannick.copin@laposte.net>"
import numpy as N
@ycopin
ycopin / taylorDiagram.py
Last active May 19, 2024 06:06
Taylor diagram for python/matplotlib [ 10.5281/zenodo.5548061 ]
#!/usr/bin/env python
# Copyright: This document has been placed in the public domain.
"""
Taylor diagram (Taylor, 2001) implementation.
Note: If you have found these software useful for your research, I would
appreciate an acknowledgment.
"""
@ycopin
ycopin / bug_hammer.py
Created February 22, 2013 11:05
Test script for matplotlib.basemap issues #100 and #101
#!/usr/bin/env python
# -*- coding: utf-8 -*-
# Time-stamp: <2013-02-22 12:00:07 ycopin>
import numpy as N
import matplotlib.pyplot as P
from mpl_toolkits.basemap import Basemap
xs = N.linspace(0,30,5)
ys = N.linspace(20,50,5)
@ycopin
ycopin / euclidator.py
Last active September 21, 2022 09:52
Euclid Acronym Translator.
#!/usr/bin/env python
# -*- coding: utf-8 -*-
"""
EUCLID Acronym translaTOR.
DEPRECATED: official repo is now https://gitlab.euclid-sgs.uk/ycopin/euclidator,
with a shiny web interface at http://ycopin.pages.euclid-sgs.uk/euclidator/
"""
@ycopin
ycopin / exitLogger.py
Created March 30, 2015 13:22
Example of implicit logging management.
#!/usr/bin/env python
# Time-stamp: <2015-03-30 15:21:15 ycopin>
from __future__ import division, print_function
"""
Example of implicit logging management.
"""
import sys, atexit, traceback
#!/usr/bin/env python
# -*- coding: utf-8 -*-
# Time-stamp: <2015-04-07 18:58:52 ycopin>
from __future__ import division, print_function
"""
Gauss-Hermite line profile.
"""
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@ycopin
ycopin / interneuclid.cls
Last active February 9, 2022 20:20
XeLaTeX template for Euclid Internal Notes.
% Time-stamp: <2015-04-14 22:08:01 ycopin>
\NeedsTeXFormat{LaTeX2e}
\ProvidesClass{interneuclid}[2015/04/09 Euclid Internal Note Class]
% All options are passed to article class
\LoadClassWithOptions{article}
\RequirePackage[utf8]{inputenc}
\RequirePackage[T1]{fontenc}