Skip to content

Instantly share code, notes, and snippets.

View ZoomQuiet's full-sized avatar
🖖
Sayeahooo

Zoom.Quiet ZoomQuiet

🖖
Sayeahooo
View GitHub Profile
@ZoomQuiet
ZoomQuiet / replace_parameters.py
Created March 30, 2019 02:21 — forked from kchawla-pi/replace_parameters.py
A python decorator for deprecating parameters from a function/method
"""
Gist made by Kshitij Chawla (Github name: kchawla-pi) for the Nilearn library in Feb/March 2019.
GPLv3
"""
def replace_parameters(replacement_params,
end_version='future',
lib_name='Nilearn',
):
"""
@ZoomQuiet
ZoomQuiet / build-opencv-for-pyenv.py
Created March 21, 2019 10:17 — forked from pohmelie/build-opencv-for-pyenv.py
Build opencv for ubuntu 16.04 with pyenv
import pathlib
import sys
import sh
def clone_if_not_exists(name, url, **kwargs):
if not pathlib.Path(name).exists():
print("Cloning", url, "...")
sh.git.clone(url, name, depth=1, **kwargs)
@ZoomQuiet
ZoomQuiet / slack_slash_cmd.py
Created October 14, 2018 15:28 — forked from devStepsize/slack_slash_cmd.py
Server-side logic to handle a Slack slash command using Python and Flask
'''
This is an example of the server-side logic to handle slash commands in
Python with Flask.
Detailed documentation of Slack slash commands:
https://api.slack.com/slash-commands
Slash commands style guide:
https://medium.com/slack-developer-blog/slash-commands-style-guide-4e91272aa43a#.6zmti394c
'''
#!/usr/bin/env python
#
# clock_skew.py
# This script reads json data from /tmp/sigsci-agents.json
# and prints a message if an agent's clock skew is greater
# or equal to the defined thresholds.
#
# SigSciApiPy (https://github.com/signalsciences/SigSciApiPy) is
# an easy way to pull agent data from the Signal Sciences API and
# save it to /tmp/sigsci-agents.json
#!/usr/bin/env bash
# clock_skew.sh - Check remote hosts for clock skew (time drift), and
# output a warning or alert message based on defined thresholds.
#
# Instructions:
# Create a hosts.txt file that contains the list of hosts to be checked.
#
# hosts.txt should contain one host entry per line, and username and
# port fields are optional. Format:
#
@ZoomQuiet
ZoomQuiet / gist:eb2de7e594e76587bd65b49e03aee66d
Created October 11, 2018 04:03 — forked from holms/gist:5005629
midnight commander dark color theme
Edit mc’s ini file (either ~/.mc/ini or ~/.config/mc/ini) and look for the line [Colors]. Then, change the line base_color to this:
[Colors]
base_color=linux:normal=white,black:marked=yellow,black:input=,green:menu=black:menusel=white:menuhot=red,:menuhotsel=black,red:dfocus=white,black:dhotnormal=white,black:dhotfocus=white,black:executable=,black:directory=white,black:link=white,black:device=white,black:special=white,black:core=,black:stalelink=red,black:editnormal=white,black
@ZoomQuiet
ZoomQuiet / main.dart
Created July 22, 2018 06:50
flutter 101 GDG Zhuhai demo for demo floatingActionButton
import 'package:flutter/material.dart';
void main() => runApp(new MyApp());
class MyApp extends StatelessWidget {
// This widget is the root of your application.
@override
Widget build(BuildContext context) {
return new MaterialApp(
title: 'Flutter Demo',
@ZoomQuiet
ZoomQuiet / clean_audio.sh
Created December 18, 2017 07:29 — forked from devoncrouse/clean_audio.sh
Using Sox (http://sox.sourceforge.net) to remove background noise and/or silence from audio files (individually, or in batch).
# Create background noise profile from mp3
/usr/bin/sox noise.mp3 -n noiseprof noise.prof
# Remove noise from mp3 using profile
/usr/bin/sox input.mp3 output.mp3 noisered noise.prof 0.21
# Remove silence from mp3
/usr/bin/sox input.mp3 output.mp3 silence -l 1 0.3 5% -1 2.0 5%
# Remove noise and silence in a single command
#!/usr/bin/env python
#
# Send/receive UDP multicast packets.
# Requires that your OS kernel supports IP multicast.
#
# Usage:
# mcast -s (sender, IPv4)
# mcast -s -6 (sender, IPv6)
# mcast (receivers, IPv4)
# mcast -6 (receivers, IPv6)
@ZoomQuiet
ZoomQuiet / Keybase proof zoomquiet.md
Created September 21, 2017 09:17
Keybase proof zoomquiet

Keybase proof

I hereby claim:

  • I am zoomquiet on github.
  • I am zoomquiet (https://keybase.io/zoomquiet) on keybase.
  • I have a public key whose fingerprint is 76C7 C4B5 7EAC 2F88 8DD3 0D33 7D2A 56E7 AF6B 4916

To claim this, I am signing this object: