Skip to content

Instantly share code, notes, and snippets.

View MuLx10's full-sized avatar
🔥
Tornado 🌪️

Mehul Kumar Nirala MuLx10

🔥
Tornado 🌪️
View GitHub Profile
@MuLx10
MuLx10 / FittingBestDistribution.py
Last active April 10, 2021 06:09
Fitting empirical distribution to theoretical ones with Scipy
%matplotlib inline
import warnings
import numpy as np
import pandas as pd
import scipy.stats as st
import statsmodels as sm
import matplotlib
import matplotlib.pyplot as plt
@MuLx10
MuLx10 / tensor_board_logger.py
Created April 5, 2021 17:49 — forked from wassname/tensor_board_logger.py
A generic tensorboard logger for scalars and histograms or distributions
import tensorflow as tf
import numpy as np
class TensorBoardLogger(object):
"""
Log scalar and histograms/distributions to tensorboard.
Usage:
```
@MuLx10
MuLx10 / Multiple_Subplots.ipynb
Created March 18, 2020 11:42
Subplots using matplotlib
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@MuLx10
MuLx10 / download_from_kaggle.py
Last active March 4, 2020 15:00
Download Submission file from IPython notebook (Kaggle, Collab, etc.)
import base64
import pandas as pd
from IPython.display import HTML
def create_download_link( df, title = "Download CSV file", filename = "submission.csv"):
csv = df.to_csv(index = False)
b64 = base64.b64encode(csv.encode())
payload = b64.decode()
html = '<a download="{filename}" href="data:text/csv;base64,{payload}" target="_blank">{title}</a>'
html = html.format(payload=payload,title=title,filename=filename)
@MuLx10
MuLx10 / buchi auto
Created April 20, 2018 06:24
Buchi
Formally, a deterministic Büchi automaton is a tuple A = (Q,Σ,δ,q0,F) that consists of the following components:
Q is a finite set. The elements of Q are called the states of A.
Σ is a finite set called the alphabet of A.
δ: Q × Σ → Q is a function, called the transition function of A.
q0 is an element of Q, called the initial state of A.
F⊆Q is the acceptance condition. A accepts exactly those runs in which at least one of the infinitely often occurring states is in F.
In a non-deterministic Büchi automaton, the transition function δ is replaced with a transition relation Δ that returns a set of states, and the single initial state q0 is replaced by a set I of initial states. Generally, the term Büchi automaton without qualifier refers to non-deterministic Büchi automata.
@MuLx10
MuLx10 / sublime_key.txt
Created December 25, 2017 14:14
Sublime text Keys
## Sublime Text 3 Serial key build is 3103
—– BEGIN LICENSE —–
Michael Barnes
Single User License
EA7E-821385
8A353C41 872A0D5C DF9B2950 AFF6F667
C458EA6D 8EA3C286 98D1D650 131A97AB
AA919AEC EF20E143 B361B1E7 4C8B7F04
B085E65E 2F5F5360 8489D422 FB8FC1AA
###
### $ bash install-(ubuntu-16.04).sh
### or $ ./install-(ubuntu-16.04).sh
###
###ROS Kinetic
sudo sh -c 'echo "deb http://packages.ros.org/ros/ubuntu $(lsb_release -sc) main" > /etc/apt/sources.list.d/ros-latest.list'
sudo apt-key adv --keyserver hkp://ha.pool.sks-keyservers.net:80 --recv-key 421C365BD9FF1F717815A3895523BAEEB01FA116
sudo apt-get update