Skip to content

Instantly share code, notes, and snippets.

View appscluster's full-sized avatar

Dr. Abdul Hamid appscluster

View GitHub Profile
@appscluster
appscluster / sysctl.conf
Created June 12, 2021 15:29 — forked from yegorg/sysctl.conf
ubuntu sysctl performance tuning
# Kernel sysctl configuration file for Linux
#
# Version 1.12 - 2015-09-30
# Michiel Klaver - IT Professional
# http://klaver.it/linux/ for the latest version - http://klaver.it/bsd/ for a BSD variant
#
# This file should be saved as /etc/sysctl.conf and can be activated using the command:
# sysctl -e -p /etc/sysctl.conf
#
# For binary values, 0 is disabled, 1 is enabled. See sysctl(8) and sysctl.conf(5) for more details.
import math
import numpy
import numpy.random as nrand
"""
Note - for some of the metrics the absolute value is returns. This is because if the risk (loss) is higher we want to
discount the expected excess return from the portfolio by a higher amount. Therefore risk should be positive.
"""
https://news.google.com/news/feeds?um=1&ned=us&hl=en&q=rick+perry&output=rss
@appscluster
appscluster / crypto_news.json
Created March 12, 2019 15:13 — forked from stungeye/crypto_news.json
News Site RSS Feeds
[
{
"url": "http://money.cnn.com",
"rss": "http://rss.cnn.com/rss/money_topstories.rss"
},
{
"url": "http://thehill.com",
"rss": "http://thehill.com/rss/syndicator/19110"
},
{
@appscluster
appscluster / Liberal Regex Pattern for All URLs
Created February 12, 2016 20:58 — forked from gruber/Liberal Regex Pattern for All URLs
Liberal, Accurate Regex Pattern for Matching All URLs
The regex patterns in this gist are intended to match any URLs,
including "mailto:[email protected]", "x-whatever://foo", etc. For a
pattern that attempts only to match web URLs (http, https), see:
https://gist.github.com/gruber/8891611
# Single-line version of pattern:
(?i)\b((?:[a-z][\w-]+:(?:/{1,3}|[a-z0-9%])|www\d{0,3}[.]|[a-z0-9.\-]+[.][a-z]{2,4}/)(?:[^\s()<>]+|\(([^\s()<>]+|(\([^\s()<>]+\)))*\))+(?:\(([^\s()<>]+|(\([^\s()<>]+\)))*\)|[^\s`!()\[\]{};:'".,<>?«»“”‘’]))
@appscluster
appscluster / Readme.md
Created December 3, 2015 20:08 — forked from iraycd/Readme.md
Python, Wheezy, uWSIG and HTTPS. SSL and TLS

In simple about SSL

  1. You should have a little knowledge about SSL/TLS.
    • In simple what it does is creates HTTPS, HTTPS helps you in securing the request and response.
    • It's a must have feature on any website. Something like when you are asking for username and password.
    • Why HTTPS?
      • HTTPS kicks man-in-the-middle in the butt, much more difficult to pull off.
      • Trust - People see HTTPS as diamonds.
      • SEO - Google fucking loves HTTPS.
  2. OpenSSL it's you create an SSL, you can later submit the certificate.
import struct
import SocketServer
from base64 import b64encode
from hashlib import sha1
from mimetools import Message
from StringIO import StringIO
class WebSocketsHandler(SocketServer.StreamRequestHandler):
magic = '258EAFA5-E914-47DA-95CA-C5AB0DC85B11'
#!/bin/bash
set -e
# This script is part of my blog post :
# http://thoughtsimproved.wordpress.com/2015/01/03/tech-recipe-setup-a-rabbitmq-cluster-on-ubuntu/
# It sets up a RabbitMQ cluster by connecting to user-provided master and slave servers
# and ringing them up to a cluster on the fly.
# RabbitMQ Clustering is described in detail here :