Skip to content

Instantly share code, notes, and snippets.

View hpiedcoq's full-sized avatar

@hpiedcoq hpiedcoq

View GitHub Profile
<?xml version='1.0' encoding='UTF-8'?>
<gexf xmlns="http://gexf.net/1.3" version="1.3" xmlns:viz="http://gexf.net/1.3/viz" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://gexf.net/1.3 http://gexf.net/1.3/gexf.xsd">
<meta lastmodifieddate="2022-05-26">
<creator>Gephi 0.9.3</creator>
<description></description>
</meta>
<graph defaultedgetype="directed" mode="static">
<attributes class="node" mode="static">
<attribute id="status" title="status" type="string"/>
<attribute id="pages_total" title="pages_total" type="integer"/>
@hpiedcoq
hpiedcoq / gist:faf09da6dd71a1a77a7672b8a56d1bd1
Created July 22, 2019 08:31
R - test if internet is up - If not loop and retest
#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)
}
'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 August 29, 2015 14:17
Transformer des horaires français gmt+1 en horaires standards
[
{
"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 March 27, 2015 14:02
Log IP traité via OpenRefine
[
{
"op": "core/row-removal",
"description": "Remove rows",
"engineConfig": {
"facets": [
{
"expression": "row.starred",
"invert": false,
"selectError": false,