Skip to content

Instantly share code, notes, and snippets.

Avatar
🦔
! fox

Espoir Murhabazi espoirMur

🦔
! fox
View GitHub Profile
View gist:c2a8c13346c975830ecc889042b5d38f
#################### INPUT FILES #############
Tk().withdraw()
files = tkFileDialog.askopenfilenames()
lst = list(files)
dataframe = pd.DataFrame()
for FileName in lst:
df = pd.read_excel(str(FileName))
#add this to remove white spaces in the Vehicle columns
View gist:15634107912d061251f16e23f53deffd
<html lang="en" >
<style type="text/css">
.progress {
width: 100%;
height: 20px;
}
.progress-wrap {
background: #00a651;
margin: 20px 0;
overflow: hidden;
@espoirMur
espoirMur / optimal_marking.py
Created Mar 25, 2018
Solution about player marking algorithm.
View optimal_marking.py
def optimal_markings(input_graph):
"""
The following function will return the most optimal marking for an input graph.
To do it, we will try all possibles markings, and check if they are valid markings by using the previous function.
Once all valid markings are found,
we need to sort them according to the number of the element it required to achieve a full marking.
The most optimal markings are the markings with the lowest number of players.
"""
results_counts = []
@espoirMur
espoirMur / pylinter_sublim.txt
Created May 21, 2018
Install Pylinter In Sublimetext on mac
View pylinter_sublim.txt
make sure that pip is installed :
to install pip globaly not in a virtual environment do this
**step 1: download pip**
curl https://bootstrap.pypa.io/get-pip.py -o get-pip.py
step 2 : install it with sudo :
**sudo python get-pip.py**
@espoirMur
espoirMur / Python3 Virtualenv Setup.md
Created Sep 8, 2018 — forked from pandafulmanda/Python3 Virtualenv Setup.md
Setting up and using Python3 Virtualenv on Mac
View Python3 Virtualenv Setup.md

Python3 Virtualenv Setup

Requirements
  • Python 3
  • Pip 3
$ brew install python3
@espoirMur
espoirMur / README-Template.md
Created Oct 30, 2018 — forked from PurpleBooth/README-Template.md
A template to make good README.md
View README-Template.md

Project Title

One Paragraph of project description goes here

Getting Started

These instructions will get you a copy of the project up and running on your local machine for development and testing purposes. See deployment for notes on how to deploy the project on a live system.

Prerequisites

@espoirMur
espoirMur / nginx_proxy_config.md
Created Oct 31, 2018 — forked from soheilhy/nginxproxy.md
How to proxy web apps using nginx?
View nginx_proxy_config.md

Virtual Hosts on nginx (CSC309)

When hosting our web applications, we often have one public IP address (i.e., an IP address visible to the outside world) using which we want to host multiple web apps. For example, one may wants to host three different web apps respectively for example1.com, example2.com, and example1.com/images on the same machine using a single IP address.

How can we do that? Well, the good news is Internet browsers

@espoirMur
espoirMur / canRate.js
Created Feb 3, 2019
Test for rating a given article
View canRate.js
const canRate = done => {
request(app)
.post(`/api/v1/post/${post.id}/rating`)
.set('Authorization', `Bearer ${user.token}`)
.send({ userId: user.id, postId: post.id, rating: 4 })
.end((err, res) => {
expect(res.status).toBe(201);
expect(res.body.rating).toBeDefined();
ratingId = res.body.rating.id;
expect(res.body.message).toBe('Post rated successfully');
@espoirMur
espoirMur / .zshrc
Last active Jan 7, 2020 — forked from deepu105/.zshrc
My .zshrc
View .zshrc
## Usefull configurations
export TERM="xterm-256color" # This sets up colors properly
# set shell
export SHELL=/usr/bin/zsh
# If you come from bash you might have to change your $PATH.
export NODE_PATH=$NODE_PATH:$HOME/.npm-global/lib/node_modules
export JAVA_HOME=/usr/java/latest
@espoirMur
espoirMur / a_file.txt
Last active Mar 11, 2020
Read a file containing integer and return the average of the integer in the file. the file can have path to another file which contain integer.
View a_file.txt
1
2
3
4
5
another_file.txt
3
4
5
6