Skip to content

Instantly share code, notes, and snippets.

💭
codinsky

Izhaki

💭
codinsky
  • London
Block or report user

Report or block Izhaki

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@Izhaki
Izhaki / memx.js
Last active Mar 20, 2019
My memx content
View memx.js
var memxContent = [{
title: 'Force Directed Graph',
links: [{
title: 'Interactive & Dynamic Force-Directed Graphs with D3',
note: 'Simple Medium tutorial with code examples',
url: 'https://medium.com/ninjaconcept/interactive-dynamic-force-directed-graphs-with-d3-da720c6d7811',
},{
title: 'Official D3 example',
url: 'https://observablehq.com/@d3/force-directed-graph',
},{
@Izhaki
Izhaki / webdriverUpdate.js
Last active Dec 11, 2018
A small script to update webdriver if needed prior to running protractor.
View webdriverUpdate.js
const isWebdriverUpToDate = () => {
const fs = require('fs');
const path = require('path');
const SeleniumConfig = require('webdriver-manager/built/lib/config').Config;
const updateJson = path.resolve(SeleniumConfig.getSeleniumDir(), 'update-config.json');
return fs.existsSync(updateJson);
};
const updateWebdriver = () => {
View getInsertionIndex.js
// Finds the insertion index for an item in an array.
// Uses compareFn (similar to that provided to array.sort())
const getInsertionIndex = (arr, item, compareFn) => {
const itemsCount = arr.length;
// No items in array, so return insertion index 0
if (itemsCount === 0) {
return 0;
}
@Izhaki
Izhaki / imperative-vs-functional.md
Created Jul 15, 2018
Some examples of comparison between imperative and more function style - hinting the latter is not always better.
View imperative-vs-functional.md

Imperative:

export default expressions => mapIterator(row => {
  const projection = {};
  for (const colName in expressions) {
    const expression = expressions[colName];
    projection[colName] = expression(row);
  }
  return projection;
@Izhaki
Izhaki / gqlFetch.spec.ts
Created May 5, 2017
Client GraphQL Fetch ( Typescript )
View gqlFetch.spec.ts
import * as nock from 'nock'
import {
use,
expect,
} from 'chai'
import * as chaiAsPromised from 'chai-as-promised'
@Izhaki
Izhaki / CoreNLP-part-of-speech-Penn-Treebank-Project.js
Last active May 12, 2016
Part of Speech tokens used by CoreNLP, based on the Penn Treebank Project.
View CoreNLP-part-of-speech-Penn-Treebank-Project.js
// Based on http://www.ling.upenn.edu/courses/Fall_2003/ling001/penn_treebank_pos.html
// Note that CoreNLP sometimes emit POS that are not in this list, like "``" or "."
var iCoreNlpPos = [ "CC", "CD", "DT", "EX", "FW", "IN", "JJ", "JJR", "JJS", "LS", "MD", "NN", "NNS", "NNP", "NNPS", "PDT", "POS", "PRP", "PRP$", "RB", "RBR", "RBS", "RP", "SYM", "TO", "UH", "VB", "VBD", "VBG", "VBN", "VBP", "VBZ", "WDT", "WP", "WP$", "WRB" ];
You can’t perform that action at this time.