Skip to content

Instantly share code, notes, and snippets.

@alecgorge
alecgorge / page_replacement.py
Last active July 12, 2021 23:09 — forked from pallabpain/page_replacement
Page Replacement simulation in Python w/fixed optimal algorithm
a = [1,2,3,4,2,1,5,6,2,1,2,3,7,6,3,2,1,2,3,6]
n = len(a)
m = 2
#Function to accept reference string and frame size.
def accept():
global a,n,m
a = []
n = input("\n Enter the size of reference string : ")
for i in range(n):
@alecgorge
alecgorge / Create iOS Icons.jsx
Last active December 23, 2015 16:59 — forked from twonjosh/Create iOS Icons.jsx
iOS 7 sizes
// Photoshop Script to Create iPhone Icons from iTunesArtwork
//
// WARNING!!! In the rare case that there are name collisions, this script will
// overwrite (delete perminently) files in the same folder in which the selected
// iTunesArtwork file is located. Therefore, to be safe, before running the
// script, it's best to make sure the selected iTuensArtwork file is the only
// file in its containing folder.
//
// Copyright (c) 2010 Matt Di Pasquale
// Added tweaks Copyright (c) 2012 by Josh Jones http://www.appsbynight.com