Skip to content

Instantly share code, notes, and snippets.

Avatar
🎯
Focusing on Excellence in Cloud and Python

Mayur S. Patil (मयूर पाटील) ramlaxman

🎯
Focusing on Excellence in Cloud and Python
View GitHub Profile
View demon.c
#include <stdio.h>
char gridChar(int i) {
switch(i) {
case -1:
return 'X';
case 0:
return ' ';
case 1:
return 'O';
View ttt.c
//Tic-tac-toe playing AI. Exhaustive tree-search. WTFPL
//Matthew Steel 2009, www.www.repsilat.com
#include <stdio.h>
char gridChar(int i) {
switch(i) {
case -1:
return 'X';
case 0:
@ramlaxman
ramlaxman / FCFS.py
Created Nov 27, 2017 — forked from tanayseven/FCFS.py
FCFS (First Come First Serve) Process scheduling using python
View FCFS.py
#!/usr/bin/env python
process_queue = []
total_wtime = 0
n = int(raw_input('Enter the total no of processes: '))
for i in xrange(n):
process_queue.append([])#append a list object to the list
process_queue[i].append(raw_input('Enter p_name: '))
process_queue[i].append(int(raw_input('Enter p_arrival: ')))
total_wtime += process_queue[i][1]
process_queue[i].append(int(raw_input('Enter p_bust: ')))
View ssh-check.sh
#!/usr/bin/sh
dnf install openssh
service sshd start
chkconfig sshd on
echo Do you want to continue? [Y/N]
read ans
if [ $ans == 'N' ]
then
echo "SSH check completed. Have a nice day."
View Your first .travis.yml
"Hello World" with Travis CI
Here, we will set up a first Travis CI job, based around a simple "hello world" example, to get you up and running with Travis CI.
Sign in to GitHub
If you do not already have an account, then visit GitHub and create a free account.
If you already have an account, then visit GitHub and sign in.
In the following text, replace USERNAME with your GitHub user name.
@ramlaxman
ramlaxman / git tutorials.md
Last active May 9, 2018 — forked from jaseemabid/git tutorials.md
Awesome git tutorials I am finding here and there
View git tutorials.md

A bunch of good git tutorials

Intro to git

View Bash-Tips.sh
# to open multiple files in vi
vi {f1,f2,f3}
# when opening first file
# press INS button
# save file with `:wn`
# when you are done with last file `:wa`
# now to save and quit `:wq`
@ramlaxman
ramlaxman / Python-tips.md
Last active Nov 22, 2018
Python-tips.md
View Python-tips.md

Introduction

  • Lists, strings, and tuples are ordered collections that are very similar in general structure but have specific differences that must be understood for them to be used properly.

  • Sets and dictionaries are unordered collections.

  • To make sets and dict ordered, we need to use: Frozensets and Ordered Dictionary.

  • The possible state values for a boolean object are True and False with standard boolean operators,and, or, and not.

@ramlaxman
ramlaxman / The Technical Interview Cheat Sheet.md
Last active Apr 3, 2019 — forked from tsiege/The Technical Interview Cheat Sheet.md
This is my technical interview cheat sheet. Feel free to fork it or do whatever you want with it. PLEASE let me know if there are any errors or if anything crucial is missing. I will add more links soon.
View The Technical Interview Cheat Sheet.md

Studying for a Tech Interview Sucks, so Here's a Cheat Sheet to Help

This list is meant to be a both a quick guide and reference for further research into these topics. It's basically a summary of that comp sci course you never took or forgot about, so there's no way it can cover everything in depth. It also will be available as a gist on Github for everyone to edit and add to.

Data Structure Basics

Array

Definition:

  • Stores data elements based on an sequential, most commonly 0 based, index.
View Ethical Hacking Practs
Geolocation
# show hosts
# show domains
# add hosts
github.com
# use hosts-hosts/resolve
# show hosts
# run 1
# show hosts
# use freegeoip