Skip to content

Instantly share code, notes, and snippets.

View shahmoradi's full-sized avatar
Stand with the people of Iran and Ukraine

Amir Shahmoradi shahmoradi

Stand with the people of Iran and Ukraine
View GitHub Profile
#!/usr/bin/python
"""
Parses Fortran Namelists
based on Fortran Namelist parser for Python prog/scripts by Stephane Chamberland (stephane.chamberland@ec.gc.ca)
http://code.google.com/p/fortran-namelist/
Updated by Volodymyr Vladymyrov (http://stackoverflow.com/users/1296661/vvladymyrov) to parse format presented
in http://stackoverflow.com/questions/14165733/regular-expression-parsing-key-value-pairs-in-namelist-input-file
added support for
1)
$NAMELIST
@shahmoradi
shahmoradi / ANSI.md
Created March 4, 2022 03:02 — forked from fnky/ANSI.md
ANSI Escape Codes

ANSI Escape Sequences

Standard escape codes are prefixed with Escape:

  • Ctrl-Key: ^[
  • Octal: \033
  • Unicode: \u001b
  • Hexadecimal: \x1B
  • Decimal: 27
@shahmoradi
shahmoradi / fortran_namelist.xml
Created December 27, 2021 12:36 — forked from ivan-pi/fortran_namelist.xml
Fortran namelist configuration file for Notepad++
<NotepadPlus>
<UserLang name="Fortran Namelist" ext="nml" udlVersion="2.1">
<Settings>
<Global caseIgnored="yes" allowFoldOfComments="no" foldCompact="no" forcePureLC="0" decimalSeparator="0" />
<Prefix Keywords1="no" Keywords2="no" Keywords3="no" Keywords4="no" Keywords5="no" Keywords6="no" Keywords7="no" Keywords8="no" />
</Settings>
<KeywordLists>
<Keywords name="Comments">00! 01 02 03 04</Keywords>
<Keywords name="Numbers, prefix1">.</Keywords>
<Keywords name="Numbers, prefix2"></Keywords>