Skip to content

Instantly share code, notes, and snippets.

View jacomyal's full-sized avatar

Alexis Jacomy jacomyal

View GitHub Profile
@jacomyal
jacomyal / celegans.json
Created April 3, 2025 09:50
celegans.json
{"type":"gephi-lite","version":"0.6.1","graphDataset":{"nodeRenderingData":{"0":{"label":"1","x":-218.8529052734375,"y":-137.57313537597656},"1":{"label":"2","x":-222.01121520996094,"y":-194.1942596435547},"2":{"label":"3","x":63.01418685913086,"y":-327.2149658203125},"3":{"label":"4","x":-47.67985916137695,"y":-421.4658203125},"4":{"label":"5","x":232.1230010986328,"y":-276.08306884765625},"5":{"label":"6","x":200.5511474609375,"y":-347.1112060546875},"6":{"label":"7","x":162.6657257080078,"y":-317.7107238769531},"7":{"label":"8","x":103.01333618164062,"y":-409.2578125},"8":{"label":"9","x":158.7241668701172,"y":-344.1167907714844},"9":{"label":"10","x":113.21092224121094,"y":-445.6382751464844},"10":{"label":"11","x":166.29388427734375,"y":-377.6233215332031},"11":{"label":"12","x":168.0863800048828,"y":-425.8984069824219},"12":{"label":"13","x":37.53132629394531,"y":-369.04742431640625},"13":{"label":"14","x":11.531533241271973,"y":-479.9667663574219},"14":{"label":"15","x":46.395591735839844,"y":-469.1419
@jacomyal
jacomyal / celegans.json
Last active April 3, 2025 09:46
A GEXF graph of the C Elegans network, with a particular setup to represent the uncertainty of the Louvain method for community detection.
This file has been truncated, but you can view the full file.
<?xml version="1.0" encoding="UTF-8"?>
<gexf version="1.2" xmlns="http://www.gexf.net/1.2draft" xmlns:viz="http:///www.gexf.net/1.1draft/viz">
<meta>
<title>celegans.gexf</title>
</meta>
<graph defaultedgetype="undirected">
<attributes class="node">
<attribute id="meanAmbiguityScore" title="meanAmbiguityScore" type="double"/>
<attribute id="rawSize" title="rawSize" type="double"/>
</attributes>
@jacomyal
jacomyal / graph.gexf
Last active March 3, 2025 16:20 — forked from theophilec/graph.gexf
Restaurant Graph Clean
This file has been truncated, but you can view the full file.
<?xml version="1.0" encoding="UTF-8"?>
<gexf version="1.2" xmlns="http://www.gexf.net/1.2draft" xmlns:viz="http:///www.gexf.net/1.1draft/viz">
<meta>
<title>graph.gexf</title>
<description>github.com/theophilec/foudinge</description>
</meta>
<graph defaultedgetype="undirected">
<attributes class="node">
<attribute id="type" title="type" type="string"/>
<attribute id="rawSize" title="rawSize" type="double"/>
@jacomyal
jacomyal / logImageData.js
Last active June 20, 2024 09:00
Quick snippet to log ImageData in the Chrome JavaScript console
function logImageData(imageData, size = 0) {
const canvas = document.createElement("canvas");
canvas.width = size || imageData.width;
canvas.height = size || imageData.height;
const ctx = canvas.getContext("2d");
if (!ctx) throw new Error("Could not get 2d context");
ctx.putImageData(imageData, 0, 0);
const dataURL = canvas.toDataURL();
console.log(
@jacomyal
jacomyal / test2.gexf
Last active January 26, 2023 14:45
test2.gexf
This file has been truncated, but you can view the full file.
<?xml version="1.0" encoding="UTF-8"?>
<gexf version="1.2" xmlns="http://www.gexf.net/1.2draft" xmlns:viz="http:///www.gexf.net/1.1draft/viz">
<meta/>
<graph defaultedgetype="directed">
<attributes class="node">
<attribute id="nodedef" title="nodedef" type="string"/>
<attribute id="occurrences" title="occurrences" type="integer"/>
<attribute id="rawSize" title="rawSize" type="string"/>
</attributes>
<attributes class="edge">
@jacomyal
jacomyal / test.gexf
Created January 26, 2023 14:41
test.gexf
<?xml version="1.0" encoding="UTF-8"?>
<gexf version="1.2" xmlns="http://www.gexf.net/1.2draft" xmlns:viz="http:///www.gexf.net/1.1draft/viz">
<meta/>
<graph defaultedgetype="directed">
<nodes/>
<edges/>
</graph>
</gexf>
@jacomyal
jacomyal / README.md
Created October 22, 2018 07:48
GIPAD 2018 cours 2

TODO

@jacomyal
jacomyal / index.html
Last active October 15, 2018 09:43
GIPAD intro JavaScript
<html>
<head>
<title>Introduction au JavaScript</title>
</head>
<body>
<div id="root"></div>
<div id="form">
<input type="text" id="name-input" />
@jacomyal
jacomyal / README.md
Created December 12, 2014 10:51
A problem with Function.prototype.bind polyfill

I met an issue with the common polyfill for Function.prototype.bind, found on the MDN, and I do not know where to fix it.

Here is the polyfill:

if (!Function.prototype.bind) {
  Function.prototype.bind = function(oThis) {
    if (typeof this !== 'function') {
      // closest thing possible to the ECMAScript 5
      // internal IsCallable function
 throw new TypeError('Function.prototype.bind - what is trying to be bound is not callable');
@jacomyal
jacomyal / reduceUsecases.js
Created May 17, 2013 13:54
When and how I mostly use Array.prototype.reduce.
/**
* Here are the kind of cases I like to use Array.prototype.reduce to deal
* with:
*/
/**
* We have an array of users sorted by name. The "reduce" method can be really
* useful here:
*/
var users = [