Skip to content

Instantly share code, notes, and snippets.

View NormanEdance's full-sized avatar
💭
Life cannot just be about solving one sad problem after another.

Norman E. NormanEdance

💭
Life cannot just be about solving one sad problem after another.
  • Astana, Kazakhstan
  • 19:13 (UTC +05:00)
View GitHub Profile
@abhioncbr
abhioncbr / Apache_Superset.md
Last active November 11, 2023 09:53
Apache Superset in the production environment

Apache Superset in the production environment

Visualising data helps in building a much deeper understanding of the data and fastens analytics around the data. There are several mature paid products available in the market. Recently, I explored an open-source product name Apache-Superset which I found a very upbeat product in this space. Some prominent features of Superset are:

  • A rich set of data visualisations
  • An easy-to-use interface for exploring and visualising data
  • Create and share dashboards

After reading about Superset, I wanted to try it, and as Superset is a python programming language based project, we can easily install it using pip, but I decided to set it up as a container based on Docker. Apache-Superset GitHub Repo contains code for building and running Superset as a container. Since I wan

@vladimirtsyupko
vladimirtsyupko / gist:10964772
Created April 17, 2014 08:32
Git force pull to overwrite local files
git fetch --all
git reset --hard origin/master
git pull origin master
@DavidRockin
DavidRockin / Mailer.php
Created August 2, 2014 21:53
PHPMailer save emails to IMAP folder
<?php
class Mailer extends PHPMailer {
/**
* Save email to a folder (via IMAP)
*
* This function will open an IMAP stream using the email
* credentials previously specified, and will save the email
* to a specified folder. Parameter is the folder name (ie, Sent)
@DGrady
DGrady / subprocess_filter.py
Last active December 7, 2022 01:09
Stream data asynchronously through a subprocess in Python
"""
Problem: provide two-way communication with a subprocess in Python.
See also:
- https://kevinmccarthy.org/2016/07/25/streaming-subprocess-stdin-and-stdout-with-asyncio-in-python/
- http://eli.thegreenplace.net/2017/interacting-with-a-long-running-child-process-in-python/
"""
import asyncio
import sys
@bradland
bradland / data_validations.rb
Last active November 11, 2022 17:01
Data validations with axlsx gem
#!/usr/bin/env ruby -w -s
# -*- coding: utf-8 -*-
require 'axlsx'
## Some documentation ##
### Axlsx Gem ###
# Axlsx Docs: http://rubydoc.info/gems/axlsx/frames
# Axlsx::DataValidation: http://rubydoc.info/gems/axlsx/Axlsx/DataValidation
@sinkers
sinkers / livestreammonitor.py
Created July 14, 2014 04:50
Script for live video streaming monitoring with notifications
#!/usr/bin/python
'''
Script to monitor live streams and send an Amazon SNS if the stream is down (and possibly take restorative action)
Future:
Black detect: ffmpeg -i out.mp4 -vf blackdetect -f null -
Note the following doesn't seem to fully work without looking at the debug logs
On live ffmpeg -y -i rtmp://cp30129.live.edgefcs.net/live/videoops-videoops@50541 -vf blackdetect -t 10 -loglevel debug -f null -
'''
@ryansobol
ryansobol / symbols.md
Last active May 27, 2022 17:34
Symbols in Ruby

What's a Symbol and why is it imporant?

In Ruby, a Symbol is the most efficient way, in terms of time and memory, to represent a set of characters.

What does a Symbol look like?

Most commonly, a Symbol is a single word prefixed by a colon:

:hello
@Yelakelly
Yelakelly / sql.sql
Created January 2, 2018 12:53
MySQL - cyrillic to latin (MySQL)
DELIMITER $$
--
-- Functions
--
CREATE FUNCTION `transliterate_func`(original VARCHAR(512)) RETURNS varchar(512) CHARSET utf8
BEGIN
DECLARE translit VARCHAR(512) DEFAULT '';
DECLARE len INT(3) DEFAULT 0;
DECLARE pos INT(3) DEFAULT 1;
@Nurmukhamed
Nurmukhamed / w_bareos.ks
Last active March 10, 2022 10:22
How to setup Documentolog on Centos 7, very hardened, russian language

Введение

Обновление от 18 октября 2018

Исправлена ошибка в documentolog.ks

Заменены пакеты php на php54 от remi, изменен kickstart файл

Обнаружился новый компонент Apache Solr, создан отдельный kickstart файл

# Written by Aaron Cohen -- 1/14/2013
# Brought to you by BitTorrent, Inc.
# "We're not just two guys in a basement in Sweden." TM
#
# This work is licensed under a Creative Commons Attribution 3.0 Unported License.
# See: http://creativecommons.org/licenses/by/3.0/
import sys
import re
import socket