Skip to content

Instantly share code, notes, and snippets.

View MBtech's full-sized avatar

M. Bilal MBtech

View GitHub Profile
@MBtech
MBtech / rotten-tomatoes-rating-diff.html
Created December 11, 2023 01:17
rotten-tomatoes-rating-diff
This file has been truncated, but you can view the full file.
<html>
<head><meta charset="utf-8" /></head>
<body>
<div> <script type="text/javascript">window.PlotlyConfig = {MathJaxConfig: 'local'};</script>
<script type="text/javascript">/**
* plotly.js v2.27.0
* Copyright 2012-2023, Plotly, Inc.
* All rights reserved.
* Licensed under the MIT license
@MBtech
MBtech / mongodb_shell_commands.md
Created February 19, 2021 17:10 — forked from michaeltreat/mongodb_shell_commands.md
Quick Cheat Sheet for Mongo DB Shell commands.

MongoDB Shell Commands Cheat Sheet.

This is a Cheat Sheet for interacting with the Mongo Shell ( mongo on your command line). This is for MongoDB Community Edition.

Preface:

Mongo Manual can help you with getting started using the Shell.

FAQ for MongoDB Fundamentals and other FAQs can be found in the side-bar after visiting that link.

@MBtech
MBtech / mongodb_cheat_sheet.md
Created February 17, 2021 22:36 — forked from bradtraversy/mongodb_cheat_sheet.md
MongoDB Cheat Sheet

MongoDB Cheat Sheet

Show All Databases

show dbs

Show Current Database

@MBtech
MBtech / spark-cluster.yaml
Created January 21, 2021 08:25
Spark Cluster on Kubernetes with History Server
# Default values for spark-services.
# This is a YAML-formatted file.
# Declare variables to be passed into your templates.
tags:
livy: true
historyserver: true
jupyterhub: false
nameOverride: ""
@MBtech
MBtech / Dockerfile
Created May 24, 2020 04:47 — forked from orenitamar/Dockerfile
Installing numpy, scipy, pandas and matplotlib in Alpine (Docker)
# Below are the dependencies required for installing the common combination of numpy, scipy, pandas and matplotlib
# in an Alpine based Docker image.
FROM alpine:3.4
RUN echo "http://dl-8.alpinelinux.org/alpine/edge/community" >> /etc/apk/repositories
RUN apk --no-cache --update-cache add gcc gfortran python python-dev py-pip build-base wget freetype-dev libpng-dev openblas-dev
RUN ln -s /usr/include/locale.h /usr/include/xlocale.h
RUN pip install numpy scipy pandas matplotlib
@MBtech
MBtech / setup.md
Created January 8, 2020 06:27 — forked from wuweiweiwu/setup.md
Setting up Hadoop, Yarn, and Giraph for Distributed Systems Lab at University of Minnesota
@MBtech
MBtech / ansible-summary.md
Created August 16, 2018 18:26 — forked from andreicristianpetcu/ansible-summary.md
This is an ANSIBLE Cheat Sheet from Jon Warbrick

An Ansible summary

Jon Warbrick, July 2014, V3.2 (for Ansible 1.7)

Configuration file

intro_configuration.html

First one found from of

@MBtech
MBtech / embed-fonts.sh
Last active October 5, 2022 17:20
Latex Embedded all fonts used in .pdf figures (test it on copy of your figures first to make sure they look fine after conversion)
#!/bin/bash
cd $1
for file in $(ls *.pdf | cut -d "." -f 1);
do
echo $file
pdf2ps $file.pdf $file.ps
ps2pdf -dSAFER -dNOPLATFONTS -sPAPERSIZE=letter -dEmbedAllFonts=true -dPDFSETTINGS=/prepress $file.ps $file.pdf
rm $file.ps
@MBtech
MBtech / testgist.java
Last active September 16, 2016 14:39
TestGist
class Dog {
public static void bark() {
System.out.print("woof ");
}
}
class Basenji extends Dog {
public static void bark() { }
}
public class Bark {
public static void main(String args[]) {
@MBtech
MBtech / random_gen.py
Created August 12, 2016 22:53
Generating random text with english words
import requests
import random
import sys
#Pass the number of lines as the first arguument to the program
n_lines = int(sys.argv[1])
words_low = 10
words_high = 20
word_site = "http://svnweb.freebsd.org/csrg/share/dict/words?view=co&content-type=text/plain"
f = open("random_data.txt",'w+')
response = requests.get(word_site)