Merge branch 'master' into alphabetize

This commit is contained in:
Derek Reinhardt 2018-10-03 10:58:03 -04:00 committed by GitHub
commit adf0597935
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 132 additions and 8 deletions

View File

@ -1,4 +1,4 @@
![Open Source Love](https://img.shields.io/badge/Open%20Source-%E2%9D%A4-pink.svg)
![Open Source Love](https://img.shields.io/badge/Open%20Source-%E2%9D%A4-pink.svg)
![First Timers Only](https://img.shields.io/badge/first--timers--only-friendly-blue.svg?style=flat)
![Up For Grabs](https://img.shields.io/badge/up--for--grabs-friendly-green.svg?style=flat)
@ -88,12 +88,26 @@ Start adding your names here:
- I'm currently working as a Virtualization Specialist
- [![twitter-alt][twitter-img]](https://twitter.com/ankso)
[![github-alt][github-img]](https://github.com/anksos)
### Anush93
- I am a young developer in Sri Lanka
- I'm currently a undergraduate
- My hobbies include:
- Coding
- Gaming
- Nature Photography
- [![github-alt][github-img]](https://github.com/Anush93)
### Anshima Chaudhary
- I'm a contributor :)
- I study CS
- My hobbies include coding, debating and dancing
- [![github-alt][github-img]](https://github.com/anshima1)
- I'm a contributor :)
- I study CS
- My hobbies include coding, debating and dancing
- [![github-alt][github-img]](https://github.com/anshima1)
### Aditya Choudhary
- Software Engineer in India
- [![twitter-alt][twitter-img]](https://twitter.com/webmasteradi)
[![github-alt][github-img]](https://github.com/adich23)
### Anush93
- I am a young developer in Sri Lanka
@ -105,8 +119,8 @@ Start adding your names here:
- [![github-alt][github-img]](https://github.com/Anush93)
### Arjun Rajpal
- Software Engineer and a ML Enthusiast
- [![github-alt][github-img]](https://github.com/arjunrajpal)
- Software Engineer and a ML Enthusiast
- [![github-alt][github-img]](https://github.com/arjunrajpal)
# B
@ -156,6 +170,13 @@ Start adding your names here:
# C
### Celso Uliana
- Last year student.
- Perl and Node enthusiastic.
- Regex, automating and graphs.
- [![github-alt][github-img]](https://github.com/CelsoUliana)
[![facebook-alt][facebook-img]](https://www.facebook.com/profile.php?id=100009599017240&ref=bookmarks)
### Charlye
- Student of Development of multiplatform applications - Last year.
- Working in the Povisa hospital (Programming and systems).
@ -281,6 +302,11 @@ Start adding your names here:
- [![twitter-alt][twitter-img]](https://twitter.com/GeekRanters)
[![github-alt][github-img]](https://github.com/karengeerts)
### Karthik Raja T.
- A full stack developer.
- I like to code and build applications.
- [![github-alt][github-img]](https://github.com/Karthik-0)
### Kundan Kumar
- I am a high school graduate.
- I love AI, programming and web development.
@ -296,6 +322,13 @@ Start adding your names here:
- [![twitter-alt][twitter-img]](https://twitter.com/WitchScript)
[![github-alt][github-img]](https://github.com/LaurenReilly)
### Lincoln Anders
- 1st year CS major at Georgia Tech
- MERN full stack, primary interest in backend APIs
- Node.js, Java, Bash, Swift
- [![twitter-alt][twitter-img]](https://twitter.com/lincolnanders5)
[![github-alt][github-img]](https://github.com/lincolnanders5)
### Luke Oliff
- Technical Writer working for @auth0
- [![twitter-alt][twitter-img]](https://twitter.com/mroliff)
@ -371,6 +404,13 @@ Start adding your names here:
- [![twitter-alt][twitter-img]](https://twitter.com/rahman_younus)
[![github-alt][github-img]](https://github.com/rahman95)
### Ravi Thella
- React Developer
- Hobbies:
- Programming
- Watching Tennis
- [![github-alt][github-img]](https://github.com/ravikishorethella)
### Ravindra Kumar Meena
- Computer Sciene & Engineering Student
- Hobbies:
@ -393,7 +433,7 @@ Start adding your names here:
- I love Python :heart:
- Connect with me on social media platform
- [![twitter-alt][twitter-img]](https://twitter.com/rowhitswami)
[![facebook-alt][facebook-img]](https://facebook.com/rowhitswami)
[![facebook-alt][facebook-img]](https://facebook.com/rowhitswami)
[![github-alt][github-img]](https://github.com/rowhitswami)
### Rui Li

84
code/simcache.pl Normal file
View File

@ -0,0 +1,84 @@
#!/usr/bin/perl -w
use strict;
use warnings;
############################################################
### Usage: simcache.pl n_blocks n_blocksPerSet(associativity) n_wordsPerBlock TracerFile
### ex : simcache.pl 128 1 4 trace1.txt
### output: n_access n_missRate n_substitutions
### ex : 300 20 35
###
### Celso A. Uliana Junior - Aug 2016
############################################################
die "Usage: simcache.pl n_blocks n_blocksPerSet(associativity) n_wordsPerBlock TracerFile\n " if ( @ARGV != 4 );
my $n_set = ( my $blocks = shift) / ( my $assoc = shift);
my $n_words = shift;
my $tracerfile = shift;
my %cs;
my $i = 0, my $j = 0;
my $n_access, my $n_miss, my $n_substitutions, my $n_missRate;
my $n_log_words = log($n_words)/log(2);
############################################################
# If tracerfile is not .txt adds .txt to the string
############################################################
if($tracerfile !~ /^\w+\.(doc|txt)$/){
$tracerfile = $tracerfile . ".txt";
}
############################################################
# Reading tracer file
############################################################
open TRC , "$tracerfile" or die "Couldn't open the file $tracerfile\n" ;
my $test = 0 ;
my $test2 = 0 ;
my $test3 = 0 ;
my $hit = 0 ;
while( <TRC> ){
chomp ;
if( $n_set == $blocks ){
if( $cs{int(($_ / 4) % $n_set)}[0] ){
$test = int(($_ / 4) % $n_set);
$test2 = int( ($_ / 4) / $n_set );
$test3 = $cs{int(($_ / 4) % $n_set)}[2] ;
print "indice = $test // tag esperada = $test2 // tag no hash = $test3 \n";
if( $cs{int(($_ / 4) % $n_set)}[2] != int( ($_ / 4) / $n_set ) ){
$n_miss++;
$n_substitutions++;
$cs{(int($_ / 4) % $n_set)}[2] = int( ($_ / 4) / $n_set );
}
else{
$hit++;
}
}
else{
$cs{int(($_ / 4) % $n_set)}[0] = 1;
$n_miss++ ;
$cs{int(($_ / 4) % $n_set)}[2] = int( ($_ / 4) / $n_set);
}
}
$n_access++;
}
print "hits = $hit // misses = $n_miss\n";
close TRC;
############################################################
# Print the n_acess n_missrate n_substitutions
############################################################
printf ("%d %d %d \n", $n_access, (($n_miss / $n_access) * 100), $n_substitutions);
exit(0);
############################################################