Table des matières
- 2026:
- 2025:
4 billet(s) pour septembre 2026
| Notes HTTP Strict Transport Security - HSTS | 2026/09/18 11:04 | Jean-Baptiste |
| Notes GNU Linux GPU carte graphiques | 2026/09/08 15:49 | Jean-Baptiste |
| Notes GNU Linux graphique | 2026/09/08 15:42 | Jean-Baptiste |
| Notes urlencoding - passer des mots de passe en HTTPS | 2026/09/03 17:58 | Jean-Baptiste |
Notes install OpenFOAM
Intro
OpenFOAM (Open Field Operation and Manipulation) est un Logiciel Libre de Mécanique des fluides numérique ou CFD en anglais (pour Computational Fluid Dynamics)
Voir également :
Voir Cluster MPI
Voir tuto :
Install sur Debian Jessie
Cette install prendra de la place sur /opt/ (500Mo)
/etc/apt/sources.list.d/openfoam.list
deb http://www.openfoam.org/download/ubuntu trusty main # deb-src http://www.openfoam.org/download/ubuntu trusty main
apt-get update wget http://fr.archive.ubuntu.com/ubuntu/pool/main/b/boost1.54/libboost-thread1.54.0_1.54.0-4ubuntu3_amd64.deb wget http://fr.archive.ubuntu.com/ubuntu/pool/main/b/boost1.54/libboost-system1.54.0_1.54.0-4ubuntu3.1_amd64.deb dpkg -i libboost*.deb apt-get install openfoam30 paraviewopenfoam44
** To use OpenFOAM please add ** ** . /opt/openfoam30/etc/bashrc ** ** To your ~/.bashrc
Test
# cp -r $FOAM_TUTORIALS $FOAM_RUN cp -r /opt/openfoam30/tutorials/incompressible/icoFoam/elbow/ ~ cd ~/elbow fluentMeshToFoam elbow.msh ls constant/polyMesh/
Un peu de graphique
#paraview system/controlDict & paraFoam &
Dans le fenêtre “Open Data With…”, sélectionner OpenFOAM, ou si plusieurs OpenFOAM Le 2em chez moi
Puis dans le fenêtre principale cliquez sur “Apply”
Depuis le terminal, lançons une nouvelle simulation (calcul)
icoFoam
Ordres :
fluentMeshToFoam
icoFoam
paraview (paraFoam)
Notes
Notes
- blockMesh (building the mesh)
- icoFoam (running compiled executable)
- paraFoam (opening the paraview to view results)
Notes ODBC
Voir :
- odbc_avec_freetds Exemple d'ODBC avec microsoft SQL Server
- DB API 2.0
apt-get install unixodbc odbcinst
apt-get install odbc-postgresql libsqliteodbc libmyodbc
Sur Debian à ne pas éditer directement, c'est en installant odbc-postgresql, libsqliteodbc, libmyodbc que ce fichier sera mis à jour
/etc/odbcinst.ini
[SQLite] Description=SQLite ODBC Driver Driver=/usr/lib/odbc/libsqliteodbc.so Setup=/usr/lib/odbc/libsqliteodbc.so UsageCount=1 [SQLite3] Description=SQLite3 ODBC Driver Driver=/usr/lib/odbc/libsqlite3odbc.so Setup=/usr/lib/odbc/libsqlite3odbc.so UsageCount=1 [MySQL] Description = ODBC Driver for MySQL Driver = libmyodbc.so Setup = libodbcmyS.so FileUsage = 1 CPTimeout = CPReuse = [PostgreSQL ANSI] Description = PostgreSQL ODBC driver (ANSI version) Driver = psqlodbca.so Setup = libodbcpsqlS.so Debug = 0 CommLog = 1 UsageCount = 2 [PostgreSQL Unicode] Description = PostgreSQL ODBC driver (Unicode version) Driver = psqlodbcw.so Setup = libodbcpsqlS.so Debug = 0 CommLog = 1 UsageCount = 2
~/.odbc.ini ou /etc/odbc.ini
[mydb1] Description = MySQL MyDB1 Driver = MySQL Server = localhost Database = mydb1 Port = 3306 Socket = Option = Stmt = [mydb2] Description = MySQL MyDB2 Driver = MySQL Server = localhost Database = mydb2 Port = 3306 Socket = Option = Stmt = [tracdb] Description=SQLite3 Trac Driver=SQLite3 Database=/home/jean/trac.db # optional lock timeout in milliseconds #Timeout=2000
Vérifier la connexion avec iusql
iusql tracdb
iusql mydb1 root P@ssw0rd
Connaître le schéma de la base
Equivalent à show tables
$ iusql -d, -b SQLiteODBC <<< "help" ,,contacts,TABLE,
Équivalent à describe table
$ iusql -d, -b SQLiteODBC <<< "help contacts" ,,contacts,contact_id,4,INTEGER,9,10,10,0,1,,NULL,4,,16384,1,YES ,,contacts,first_name,-1,TEXT,0,65536,10,0,0,,NULL,-1,,16384,2,NO ,,contacts,last_name,-1,TEXT,0,65536,10,0,0,,NULL,-1,,16384,3,NO ,,contacts,email,-1,TEXT,0,65536,10,0,0,,NULL,-1,,16384,4,NO ,,contacts,phone,-1,TEXT,0,65536,10,0,0,,NULL,-1,,16384,5,NO
Exemple en Python
import sqlalchemy from sqlalchemy.exc import DBAPIError engine = sqlalchemy.create_engine('mysql+pyodbc://tracdb', encoding='utf-8') try: engine.connect() except DBAPIError: pass for row in engine.execute('select * from client'): print (row)
Autres
odbcinst -j unixODBC 2.3.11 DRIVERS............: /etc/odbcinst.ini SYSTEM DATA SOURCES: /etc/odbc.ini FILE DATA SOURCES..: /etc/ODBCDataSources USER DATA SOURCES..: /root/.odbc.ini SQLULEN Size.......: 8 SQLLEN Size........: 8 SQLSETPOSIROW Size.: 8
Notes OCS Inventory
Voir :
Voir aussi :
- Rudder
CREATE USER 'ocsweb'@'localhost' IDENTIFIED BY 'ocsweb'; GRANT ALL PRIVILEGES ON ocsweb.* TO "ocsweb"@"localhost" IDENTIFIED BY 'ocsweb'; FLUSH PRIVILEGES;
WARNING: You will not be able to build any deployment package with size greater than 100MB You must raise both post_max_size and upload_max_filesize in your php.ini to encrease this limit.
WARNING: If you change default database name (ocsweb), don't forget to update your ocs engine files (file z-ocsinventory-server.conf)
try setting the global max_allowed_packet MySQL value to at least 2MB in your server config file.
Web USER : admin PASS : admin
Notes ocaml
Voir :
Exemple de factorielle
let rec fact n = if (n=0) then 1 else n*(fact(n-1));;
