Skip to content

Instantly share code, notes, and snippets.

Avatar

@hpiedcoq hpiedcoq

View GitHub Profile
@hpiedcoq
hpiedcoq / gist:faf09da6dd71a1a77a7672b8a56d1bd1
Created Jul 22, 2019
R - test if internet is up - If not loop and retest
View gist:faf09da6dd71a1a77a7672b8a56d1bd1
#Create the function that tests the DNS of qwant
testCon = function(){!is.null(curl::nslookup('qwant.com', error= FALSE))}
#Insert this in the script :
while(!testCon()){
print('Internet is Down, let's pause 5 seconds and retest before keeping on')
Sys.sleep(5)
}
View OpenOffice Export to JSON
'OpenOffice Basic macro for exporting a .ods spreadsheet to JSON (and CSV)
'Project-specific formating I implemented: cull empty or "0" entries, '^' as separator value for the csv
REM ***** BASIC *****
Sub Main
'First export to CSV which we will later use as the source for the export to json
Dim Propval(1) as New com.sun.star.beans.PropertyValue
Propval(0).Name = "FilterName"
@hpiedcoq
hpiedcoq / gist:d00579348d4939f41742
Last active Aug 29, 2015
Transformer des horaires français gmt+1 en horaires standards
View gist:d00579348d4939f41742
[
{
"op": "core/text-transform",
"description": "Text transform on cells in column Column 2 using expression value.toDate()",
"engineConfig": {
"facets": [],
"mode": "row-based"
},
"columnName": "Column 2",
"expression": "value.toDate()",
@hpiedcoq
hpiedcoq / gist:e0c32ef72727ce65e80c
Created Mar 27, 2015
Log IP traité via OpenRefine
View gist:e0c32ef72727ce65e80c
[
{
"op": "core/row-removal",
"description": "Remove rows",
"engineConfig": {
"facets": [
{
"expression": "row.starred",
"invert": false,
"selectError": false,
You can’t perform that action at this time.