Skip to content

Instantly share code, notes, and snippets.

@archion
archion / ifort_2017
Created January 14, 2018 07:43
Module file for intel fortran
#%Module1.0
#installe par François
proc ModulesHelp { } {
puts stderr "Intel Compiler "
}
module-whatis "Intel compiler 2017.3"
conflict compiler/intel
@archion
archion / is_in.f90
Last active September 14, 2017 13:15
Point in polygon
function is_in(r,T) result(flag)
logical :: flag
real(8) :: T(:,:),r(:)
integer :: i,j
j=size(T,1)-1
flag=.false.
do i=1,size(T,1)
if((T(i,2)>r(2))/=(T(j,2)>r(2))) then
flag=(flag.neqv.((T(i,1)+(r(2)-T(i,2))*(T(j,1)-T(i,1))/(T(j,2)-T(i,2)))>r(1)))
endif
@archion
archion / gnuplot.plt
Last active July 13, 2017 11:47
gnuplot template
reset
sx=4
sy=3
x1lb="X"
y1lb="Y"
#x2lb="X"
#y2lb="Y"
#zlb="Z"
lmg=7
rmg=5
@archion
archion / loop.f90
Last active February 19, 2017 10:38
Rust performance
! ifort loop.f90
program main
implicit none
real(8) :: vec(20000)
integer :: i,j
do j=1,1000000
do i=1,size(vec)
vec(i)=i
enddo
enddo
@archion
archion / list_with_memory_leak.f90
Last active October 21, 2016 10:29
Fortran Problem
module M_list
implicit none
type t_list
integer :: num=0
type(t_node), pointer :: curt
type(t_node), pointer :: head
type(t_node), pointer :: tail
contains
procedure :: insert
final :: delete_list
@archion
archion / notepad++
Last active September 23, 2025 03:19
notepad++ run command
名称:Open containing folder 命令: explorer $(CURRENT_DIRECTORY)
名称:Open current dir cmd 命令: cmd /K cd /d "$(CURRENT_DIRECTORY)"
名称:Send via Outlook 命令: outlook /a "$(FULL_CURRENT_PATH)"
名称:gdb fortran 命令: cmd /k gdb "$(CURRENT_DIRECTORY)\$(NAME_PART)"
名称:compile& run fortran 命令: cmd /k cd /d "$(CURRENT_DIRECTORY)" & gfortran -g -Wall -Wtabs -o "$(CURRENT_DIRECTORY)\$(NAME_PART)" "$(FULL_CURRENT_PATH)" & echo =====是否开始运行?===== & PAUSE & "$(CURRENT_DIRECTORY)\$(NAME_PART).exe" & PAUSE & EXIT
名称:compile with lapack 命令: cmd /k cd /d "$(CURRENT_DIRECTORY)" & gfortran -g -Wall -Wtabs -o "$(CURRENT_DIRECTORY)\$(NAME_PART)" "$(FULL_CURRENT_PATH)" -llapack& echo =====是否开始运行?===== & PAUSE & "$(CURRENT_DIRECTORY)\$(NAME_PART).exe" & PAUSE & EXIT
名称:compile with lapack and OMP 命令: cmd /k cd /d "$(CURRENT_DIRECTORY)" & gfortran -g -Wall -Wtabs -o "$(CURRENT_DIRECTORY)\$(NAME_PART)" "$(FULL_CURRENT_PATH)" -llapack -fopenmp& echo =====是否开始运行?===== & PAUSE & "$(CURRENT_DIRECTORY)\$(NAME_PART).exe" & PAUSE & EXIT
名称:Latex 命令: cmd
@archion
archion / BibTeXCitekey.js
Last active October 20, 2015 11:15
Zotero BibTeX Key
{
"translatorID": "233",
"label": "BibTeXCitekey",
"creator": "Simon Kornblith, Richard Karnesky and Emiliano heyns, modified by Yu",
"target": "bib",
"minVersion": "2.1.9",
"maxVersion": "",
"priority": 200,
"configOptions": {
"getCollections": true
@archion
archion / jabref_timestamp
Created April 19, 2015 11:54
Add the timestamp field to your jabref bib database file
#!/bin/bash
#https://github.com/kaka768/jabref_timestamp
#WARNING
#although this shell script will backup your .bib database, I strongly recommend that back-up your .bib database before use this script!
#
#The best working directory to execute this script is the directory which containing your .bib file and your pdf file
#execute in a terminal: sh timestamp.sh "yourbibfile.bib"
#this work is inspired by http://sourceforge.net/p/jabref/discussion/318825/thread/30dfdfca
########################################################################
#Emilio José Juárez Pérez www.emiliojuarez.es