Git Product home page Git Product logo

snippets's Introduction

General description

This is a collection of code snippets I may have done for a number of different reasons:

  • To share some code.
  • To try something (new) and see whether it works and how, like code, tools, languages, features in them, etc.
  • To keep a recipe or small fragment of code somewhere.
  • To make some small exercise (usually considered to be a programming kata).
  • To pass some time for entertainment and amusement.

Basically this is a collection of gists, but instead of keeping them at https://gist.github.com/jmora, since that does not provide tagging capabilities I decided to keep them here in a single repository, this allows using directories to keep them sorted. Versioning control is slightly worse when mixing all these things, but I hope not to make changes in most of them once they are finished, so hopefully this won't be too messy. If gist implemented some system for folders or tags I'd switch back to that for the snippets from that point on.

Index

The snippets grouped in directories by programming language and listed here in alphabetical order. Note that py and py3 may be grouped for convenience, also in js code there may be some html or css, along with the Javascript, I consider the businesslogic is in the Javascript and the other files are auxiliary files, as it may happen with other languages, although more prominently in this case. The snippets are so far:

java/relationChecker

Snippet to check ontological relations between concepts, the main focus in this case was to test the Manchester syntax and how could that be parsed when having a repository in which ontologies could be added and removed, so you can see in the jUnit tests that there are quite a few to check the short names in Manchester syntax could be properly used and also full URIs to avoid collisions if the same short name was being used in several ontologies. I didn't go for the intermediate option of having prefixed short names because it seems to me that it has the cons of both options and the pros of none.

java/unicornPatter

Implementation for the unicorn patting puzzle. I guess the kind of expected solutions were something harder or interesting in some sense, ok, KISS. You can also see this may not work in a more general context, I could use the class name as well as the line number, ok YAGNI.

js/cesar

Interactive solution for the Cesar encoding kata. The whole text is processed again with each modification in the text but reasonable long texts can be processed in reasonable times.

js/pomodoro

Implementation for the Pomodoro kata. Please don't look at the interface. It's possible to make something that looks really great but that was out of scope, or at least it is out of scope for now.

py/hanoi

Several implementations for the Hanoi towers kata. Alas some problems can't simply be solved in a nicer way, in this case there has to be some sacrifice, either memory or CPU.

py/jsonCall and py3/jsonCall

Snippet to call a JSON service, it was developed in the context of a project and a specific service, so it includes some code to call that service with random data as a test.

snippets's People

Contributors

jmora avatar

Watchers

James Cloos avatar B'Random Cliphord EiQ 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.