Giter Club home page Giter Club logo

ray's Introduction

ray

q1 - 4th occurance of a string in a file


q1.sh - fast and dirty bash one-liner - assumes string exists at least 4 times in file ./q1.sh inputfile string


q1-simple.py - fast and dirty python that reads line by line, doesn't read the rest of the file after finding 4th string - assumes file exists and is readable, prints nothing if 4th occurance not found

./q1-simple.py input APPLE


That was 3 minutes in - I wrote a more polished pep8-compliant q1 in python that does some error checking, but assumes the whole file fits in memory easily

./q1.py input string

It will print nice errors if it can't open the input file, there is (limited) command line argument checking, and if not found it will let you know it couldn't find it.


q2.c - count bits in an unsigned byte - use 'Make' to build - compiles with gcc on my macbook, linux or freebsd (with gcc) I added a little main function to demonstrate it.

ray's People

Contributors

minektur avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.