Skip to content

Instantly share code, notes, and snippets.

View Develer's full-sized avatar
🤓
d3-nerd

Ihor Yeromin Develer

🤓
d3-nerd
  • Stuttgart, Germany
View GitHub Profile
@Develer
Develer / my-books.json
Last active April 17, 2023 15:29
A Visual Journal #6 My Books
[
{
"title": "12 стульев",
"genre": "fiction",
"type": "d",
"status": "r",
"notes": "-"
},
{
"title": "13th tale",
@Develer
Develer / new_data.json
Created August 9, 2019 08:35
innovation data for sankey diagram
This file has been truncated, but you can view the full file.
{"head":{"vars":["innovation","Name","Description","Material_Ingredients","Industries","ISICs","UNSGs","developmentStage","BRL","TRL","BetaCategories","CommonNames","websites","emails","year_of_innovation","Innovators","innovator_locations","Organizations","org_locations","officeNumbers"]},"results":{"bindings":[{"innovation":{"type":"uri","value":"http://graphdb-service:80/repositories/dmass#Innovation11fe184d-af08-4dad-9fa4-11094c6d55f7"},"Industries":{"type":"literal","value":"Solid Waste Collection "},"Description":{"type":"literal","value":"Surabaya is the second-largest city in Indonesia and one of the largest metropolitan areas in the world. And it has a plastic problem. Namely, the city produces hundreds of tons of waste plastic daily. Surabaya is now taking steps to improve plastic recycling, and the key ingredient is public transportation. Since April 2018, Surabaya has allowed bus riders to pay for their fare with plastic waste. The further you want to go, the more plastic you need to pay. (A plast
@Develer
Develer / graph.js
Created July 26, 2019 15:57
React. Call neighbour method
import React, { Component } from 'react';
import { render } from 'react-dom';
class Parent extends Component {
constructor(props) {
super(props);
this.graphView = React.createRef();
}
render() {
Rk G Date Age Tm Opp GS MP FG FGA FG% 3P 3PA 3P% FT FTA FT% ORB DRB TRB AST STL BLK TOV PF PTS GmSc +/-
1 1 2009-10-28 20-063 OKC SAC W (+13) 0 12:59 2 2 1.000 1 1 1.000 0 0 0 2 2 0 0 0 0 3 5 3.8 -5
2 2 2009-10-30 20-065 OKC @ DET W (+8) 0 16:38 1 6 .167 0 1 .000 0 0 1 1 2 8 0 0 0 3 2 3.6 +17
3 3 2009-11-01 20-067 OKC POR L (-9) 0 17:52 2 9 .222 2 3 .667 0 0 1 2 3 2 1 1 1 2 6 3.1 +4
4 4 2009-11-03 20-069 OKC LAL L (-3) 0 17:04 3 9 .333 1 2 .500 2 2 1.000 0 1 1 3 1 0 0 2 9 6.5 +16
5 5 2009-11-06 20-072 OKC @ HOU L (-11) 0 10:02 2 3 .667 0 0 0 0 0 1 1 1 0 0 1 1 4 2.3 -8
6 6 2009-11-08 20-074 OKC ORL W (+28) 0 19:13 2 5 .400 0 1 .000 1 2 .500 1 3 4 5 2 0 0 3 5 7.8 0
7 7 2009-11-10 20-076 OKC @ SAC L (-3) 0 19:24 3 7 .429 3 5 .600 0 0 0 4 4 1 1 1 1 3 9 6.7 +1
8 8 2009-11-11 20-077 OKC @ LAC W (+4) 0 23:54 3 8 .375 0 3 .000 1 2 .500 0 5 5 8 1 1 2 1 7 8.6 +9
9 9 2009-11-14 20-080 OKC @ SAS W (+3) 0 19:57 3 6 .500 0 1 .000 2 3 .667 1 1 2 1 1 1 2 4 8 4.4 -3
init_data = [
{
param: 'whrs',
description: 'world happiness report score',
scale: 'polled inhabitants rate their quality of life from 1-10 (higher = better)',
domain: [1, 10],
data: [
{
type: 'good',
scale: 'whrsGood',
@Develer
Develer / .block
Last active June 1, 2016 12:19
Force Dragging Curved Links d3.v4
license: gpl-3.0
height: 600
// current
func (ap *AveragedPerceptron) maxScore(m map[string]float64) string {
var maxKey string
var maxVal float64 = math.SmallestNonzeroFloat64
for k, _ := range ap.Classes {
v, ok := m[k]
if !ok {
v = 0.0
}
@Develer
Develer / server.py
Created December 6, 2015 12:21
Simple aiohttp html render
import asyncio
from aiohttp import web
import jinja2
import aiohttp_jinja2
@asyncio.coroutine
def home(request):
context = {}
response = aiohttp_jinja2.render_template(
function getQueryParams() {
var href = window.location.href.split("?");
var queryParams = {};
if (href.length > 1) {
var queryString = href[1];
if (queryString) {
queryString = decodeURIComponent(queryString);
var rawParams = queryString.split("&");
$.each(rawParams, function(i, val) {
var temp_param = val.split("=");