Skip to content

Instantly share code, notes, and snippets.

View jonyrock's full-sized avatar
💭
chilling protocol in progress

Alexey Velikiy jonyrock

💭
chilling protocol in progress
View GitHub Profile
"""
Thomas Kahn
thomas.b.kahn@gmail.com
"""
from __future__ import absolute_import
from math import sqrt
import multiprocessing as mp
import numpy as np
from six.moves import range
var date = new Date('2017-06-10 16:49:29');
var names = [ 'Samsung Galaxy S8', 'HTC U11', 'LG G6', 'Sony Xperia XZ', 'Honor 9', 'iPhone 7', 'OnePlus 5' ];
var charges = [];
var chargeDir = [];
const N = names.length;
const SWAP_TIME = Math.round(24 * 60 * 60 * 1000 / N); // 24 hours divided
const fs = require('fs');
const path = require('path');
const IN_DIR = '/Users/alex/Downloads/meteocons-icons/SVG';
const OUT_DIR = '/Users/alex/Projects/grafana-plugins-exploring/grafana-ico-line-plugin/src/assets/weather-dark';
const topFiles = fs
.readdirSync(IN_DIR)
.filter(
var _updateBundleTag = 4073,
MemberSettings, __extends, sb;
(function(n) {
var t = function() {
function n() {}
return n.getDayName = function(n) {
var t = this.getDayName2(n);
return t.charAt(0) == "S" ? "<b>" + t + "<\/b>" : t
}, n.getDayName2 = function(n) {
return n instanceof Date || (n = new Date(n)), ["Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday"][n.getDay() % 7]
var _updateBundleTag = 4073,
MemberSettings, __extends, sb;
(function(n) {
var t = function() {
function n() {}
return n.getDayName = function(n) {
var t = this.getDayName2(n);
return t.charAt(0) == "S" ? "<b>" + t + "<\/b>" : t
}, n.getDayName2 = function(n) {
return n instanceof Date || (n = new Date(n)), ["Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday"][n.getDay() % 7]
/*
node.js script for importing data from csv file to influxdb
*/
// CONFIG
const SHEMA_NAME = 'places';
const INPUT_FILE = './places-canada.csv';
const INFLUX_DB_URL = 'http://127.0.0.1:8086/placesCanada';
/*
Terminator.js -- Overlay day/night region on a Leaflet map
based on https://github.com/joergdietrich/Leaflet.Terminator
*/
/*
Calculate the present UTC Julian Date. Function is valid after
the beginning of the UNIX epoch 1970-01-01 and ignores leap
seconds.
*/
<template>
<div></div>
</template>
<script>
export default {
mounted: function() {
var div = this.$el;
@jonyrock
jonyrock / .block
Last active December 29, 2016 01:44
SierpinskiTriangle
license: mit
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" height="600" width="600" id="svg" style="display:none">
<g id="yes">
<path d="M427.151,85.781h27.331l-38.608,72.151v43.283h-24.121v-43.283l-39.94-72.151h28.428l23.964,50.277L427.151,85.781z"></path>
<path d="M553.467,106.221h-61.084v24.512h56.073v20.048h-56.073v29.681h63.905v20.753H468.81V85.781h84.657V106.221z"></path>
<path d="M592.307,165.583c0.746,5.274,2.213,9.215,4.396,11.826c3.998,4.751,10.848,7.126,20.551,7.126
c5.811,0,10.529-0.626,14.152-1.88c6.877-2.4,10.316-6.864,10.316-13.392c0-3.811-1.686-6.761-5.053-8.849
c-3.371-2.036-8.713-3.837-16.027-5.404l-12.498-2.741c-12.283-2.714-20.721-5.664-25.314-8.849
c-7.779-5.326-11.668-13.652-11.668-24.982c0-10.337,3.805-18.925,11.414-25.765c7.611-6.839,18.789-10.259,33.537-10.259
c12.312,0,22.816,3.224,31.512,9.671c8.693,6.449,13.252,15.807,13.676,28.076h-23.182c-0.428-6.943-3.531-11.877-9.312-14.801
c-3.855-1.931-8.645-2.897-14.371-2.897c-6.369,0-11.455,1.253-15.254,