This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import fs from "fs"; | |
import path from "path"; | |
const root = "src/localization"; | |
const removeComment = (filePath) => { | |
const data = fs.readFileSync(filePath); | |
const json = JSON.parse(data); | |
Object.entries(json).forEach(([key, value]) => { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
'use strict'; | |
let obj = require('./dataOut.json'); | |
var fs = require('fs'); | |
//json variables | |
let scan_type = obj[0].scan_type; | |
let date_time = obj[0].date_time; | |
let source_address = obj[0].source_address; | |
let source_lat = obj[0].source_lat; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const fs = require('fs'); | |
const argv = require('yargs').argv; | |
const ProgressBar = require('progress'); | |
const graph = require('ngraph.graph')(); | |
const createLayout = require('ngraph.offline.layout'); | |
const toBinary = require('ngraph.tobinary'); | |
const file = fs.readFileSync(argv.i, 'utf-8'); | |
const data = file.replace(/ /g, '').split('\r\n'); | |
let current = 0; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
this script selects values from database final.smallgraph utilizing the following libraries: | |
http://expressjs.com/en/guide/routing.html | |
https://github.com/mysqljs/mysql | |
*/ | |
let mysql = require('mysql'); | |
let express = require('express'); | |
let app = express(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?xml version="1.0" encoding="UTF-8"?> | |
<gexf xmlns="http://www.gexf.net/1.3" version="1.3" xmlns:viz="http://www.gexf.net/1.3/viz" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.gexf.net/1.3 http://www.gexf.net/1.3/gexf.xsd"> | |
<meta lastmodifieddate="2016-06-13"> | |
<creator>Gephi 0.9</creator> | |
<description></description> | |
</meta> | |
<graph defaultedgetype="directed" mode="static"> | |
<attributes class="node" mode="static"> | |
<attribute id="weighted indegree" title="Weighted In-Degree" type="double"> | |
<default>0.0</default> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
'use strict'; | |
let fs = require('fs'); | |
function solution(A) | |
{ | |
var lines = A.split(/\r?\n/g); | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
'use strict'; | |
/* | |
This script parses files, then utilizes the following libraries in order: | |
1.) https://github.com/anvaka/ngraph.graph x | |
2.) https://github.com/anvaka/ngraph.offline.layout x(change ngraph.native for million+ node files) | |
3.) https://github.com/anvaka/ngraph.tobinary x | |
4.) https://github.com/anvaka/pm |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
'use strict'; | |
/* | |
This script parses files, then utilizes the following libraries in order: | |
1.) https://github.com/anvaka/ngraph.graph | |
2.) https://github.com/anvaka/ngraph.offline.layout (change ngraph.native for million+ node files) | |
3.) https://github.com/anvaka/ngraph.tobinary | |
4.) https://github.com/anvaka/pm |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//this script parses files | |
//splits on newlines & carriage return + erases whitespace | |
//don't forget to remove logs after | |
fs = require('fs'); | |
//require https://github.com/anvaka/ngraph.graph/ | |
var g = require('ngraph.graph')(); | |
var newData; | |
//var src; | |
//var dst; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//this script parses files | |
//splits on newlines & carriage return + erases whitespace | |
//don't forget to remove logs after | |
fs = require('fs'); | |
var newData; | |
//read in the UTF8 data | |
fs.readFile('data/data.csv', 'utf8', function (err, data) { | |
//log an error if something goes wrong | |
if (err) { |
NewerOlder