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
@jonyrock
jonyrock / add-hash-to-stories.js
Created July 19, 2016 14:25
Sequelize migration vs data fill
'use strict';
var HASH_LENGTH = 11;
var _ = require('lodash');
var randomstring = require('randomstring');
var Promise = require('bluebird');
var Sequelize = require('sequelize');
module.exports = {
"""
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
@jonyrock
jonyrock / main.py
Last active February 20, 2018 10:49
from somemodule import A, aFoo
def myMethod(self):
print("olololo")
A.foo = myMethod
a = A()
a.foo() # olololo
aa = aFoo()
aa.foo() # olololo
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;