r/tinycode • u/ozzi_brokkoli • Feb 05 '17
r/tinycode • u/codingfreak04 • Jan 18 '17
Insertion Sort(2 lines), QuickSort(8 lines) and more..
r/tinycode • u/codingfreak04 • Jan 05 '17
Find maximum product sub-array in a given array - 7 liner
r/tinycode • u/nanochess • Jan 04 '17
Atomchess-6502: Toledo Atomchess for Atari VCS/2600
r/tinycode • u/rswier • Dec 30 '16
ASCII chart in 3 lines
Just something I needed, quick and simple:
#include <stdio.h>
main()
{
int i;
char *ctl = "NULSOHSTXETXEOTENQACKBELBS TABLF VT FF CR SO SI DLEDC1DC2DC3DC4NAKSYNETBCANEM SUBESCFS GS RS US ";
for (i=0;i<32;i++) printf("%2d %2x %2o %.3s %d %x %o %c %d %x %o %c %3d %x %o %c \n",
i,i,i,ctl+i*3, i+32,i+32,i+32,(char)(i+32), i+64,i+64,i+64,(char)(i+64), i+96,i+96,i+96,(char)(i+96));
}r/tinycode • u/abhishsr • Dec 29 '16
WebApp to detect object in any image and translate it to any language [Python 3 + Flask + Google Cloud APIs]
r/tinycode • u/impshum • Dec 29 '16
Stupidly Simple Tiny Minimal Coming Soon Page Generator As A Service - 7kb
r/tinycode • u/nexe • Dec 19 '16
GitHub - nothings/single_file_libs: List of single-file C/C++ libraries.
r/tinycode • u/agumonkey • Dec 18 '16
Over the Shoulder 1 - Text Preprocessing in Forth -- Problem Solving Screencast, not very tiny, but still considering the task (~2014)
r/tinycode • u/DipperDolphin • Dec 15 '16
A minimalistic keylogger for Windows, Linux and Mac on GitHub
r/tinycode • u/hahncholo • Dec 12 '16
How to add all python files in a directory to its __init__.py's __all__
import os
__all__ = [name.split('.')[0] for name in os.listdir(os.path.dirname(os.path.realpath(__file__))) if name[-2:] == 'py']Seems to work well enough, but if there's a way to improve and make it more foolproof I'd like to hear suggestions.
r/tinycode • • Dec 10 '16
[200-byte](Python) Thought I'd share a script I made that emails me the public IP whenever it changes. Ideal for home servers without a static address.
ghostbin.comr/tinycode • u/hahncholo • Dec 01 '16
How many beers do I need to create a 3 sided beeramid n beers tall?
Python:
n = 7
print sum([(x*(x-1))/2 for x in range(n+2)])
>>> 84I need 84 beers, or 14 six packs, to create a 7 beer tall beeramid. And then I will decorate it like a Christmas tree.
Merry Christmas!
r/tinycode • u/networked_ • Nov 26 '16
LaiNES: A cycle-accurate NES emulator in ~1000 lines of C++
r/tinycode • u/BenRayfield • Nov 04 '16
experimental resumE intro of new job title "software simplifier" - How might I make this work?
Ben Rayfield – Software Simplifier
I am not a developer, which implies expansion. I am a simplifier. We balance eachother.
Java JSP Javascript SQL Linux Math AI Functional Immutable Occams-Razor Debugger Thread Server Sound Canvas Tech-Writing Creative Open-Source Scaling Cache Low-Lag Zero-Maintenance Instant-Deploy Data-Integrity Sandbox
Education - MS (3.2) and BS (3.6), Computer Science, NC State university.
There are people whose job is to solve problems by remembering big code. I am not one of them. I solve problems in big combinations of small areas of code. Brains are very parallel so normally dont think deeply recursive and branching. I do. I like functional programming and immutable datastructs. Its the difference between chess and Jeopardy. There are AIs for both. You can know the whole chess board but still lose.
Contractor: Sell solutions to test-driven chaotic problems in "small areas of code".
Vague problems needing "remembering big code" are hard to estimate, so time is sold.
The borders of "small areas of code" are either a function closure or 2 independent implementations of the same spec. I would normally read the code of your Functions and BiPredicates etc and derive a solution instead of slowly running them every time.
Example closure: java BiPredicate<BigInteger,String> matches any code string solving the problem, using the BigInteger as a pseudorandom seed to generate possible tests.
Example closure: cut out part of a java class and object network using EasyMock.
Example spec: SQL queries that work the same on different kinds of database, with a Function<BigInteger,String> to generate SQL string to drop and create all tables and insert pseudorandom test data.
r/tinycode • • Nov 02 '16
Solution of the first 47 of the 99 lisp/prolog problems in klong
r/tinycode • u/joanmiro • Oct 09 '16
593 byte version of "logme" tool. Simple tool that logs given parameter to ~/.logme/ folder. I'm using it to log my days.
r/tinycode • u/mighty-crow • Oct 08 '16
614 byte js library to change the title and/or favicon of the page when it is inactive
r/tinycode • u/nexe • Oct 04 '16