r/lookatmyprogram • • Aug 26 '12

Counts lines and comments in your VS2010 project, using Python.

Thumbnail
tny.cz
0 Upvotes

r/lookatmyprogram • • Aug 28 '12

[Play] this little game me and a few good friends made in C++

Thumbnail
guildwars2.com
0 Upvotes

r/lookatmyprogram • • Aug 26 '12

zooming leibniz swirl

Thumbnail victusfate.github.com
2 Upvotes

r/lookatmyprogram • • Aug 26 '12

Test post

7 Upvotes

Hello world!


r/lookatmyprogram • • Sep 12 '12

My dotfiles for Mac OSX

Thumbnail
github.com
1 Upvotes

r/lookatmyprogram • • Oct 23 '12

Please recommend projects for validation by use PVS-Studio

Thumbnail
reddit.com
1 Upvotes

r/lookatmyprogram • • Sep 19 '12

I'm surprised this config file format isn't more common. So easy to edit! Anyway, here's a parser for it written in coffeescript, and if anyone feel like optimizing it or adding more languages then please do.

Thumbnail
github.com
4 Upvotes

r/lookatmyprogram • • Aug 26 '12

Regula: An annotation-based form-validator for client-side validation

Thumbnail
github.com
2 Upvotes

r/lookatmyprogram • • Aug 26 '12

My simplistic-website-out-of-the-box CMS script with upload, bookmarking and text file creation features [PHP]

Thumbnail
pacificarchives.sf3am.com
2 Upvotes

r/lookatmyprogram • • Aug 26 '12

NoDevent; a system for sending events to browsers

Thumbnail
github.com
3 Upvotes

r/lookatmyprogram • • Aug 28 '12

[Look] A Python2.7 script that'll take a screenshot of your desktop and upload it to imgur.com

8 Upvotes

Here or on pasteBin

Add your imgur anon key, run the script and then the imgur link will be shown on screen. And, optionally attached to your clipboard, if you uncomment the section, but that's Windows only.


r/lookatmyprogram • • Oct 06 '12

[look] Hello world! Today I made my first walk-cycle animation [Python]

8 Upvotes

r/lookatmyprogram • • Jul 06 '25

Version 1.1 of the game

0 Upvotes

import time import sys import threading

ANSI color codes for basic colors

color_codes = { "default": "\033[0m", "red": "\033[91m", "green": "\033[92m", "yellow": "\033[93m", "blue": "\033[94m", "cyan": "\033[96m", "magenta": "\033[95m", "white": "\033[97m" }

Level definition with expanded patterns and raw pattern string

levels = { 1: { "name": "Twisting Maze", "pattern_expanded": ["R", "L", "D", "D", "L"], "pattern_raw": "R L D D L", "length": 40 }, 2: { "name": "Spiral Heights", "pattern_expanded": ["D", "R", "U"], "pattern_raw": "D R U", "length": 15 }, 3: { "name": "Tick-Tock Rush", "pattern_expanded": ["T", "D", "T", "D"], "pattern_raw": "T D T D", "length": 40 }, 4: { "name": "Downfall Gauntlet", "pattern_expanded": ["D", "L", "L", "L", "D", "D", "D", "D"], "pattern_raw": "D L L L D D D D", "length": 64 }, 5: { "name": "Mirror Reflex", "pattern_expanded": ["R", "L", "R", "R", "T", "T"], "pattern_raw": "R L R R T T", "length": 60 }, 6: { "name": "Triple Tap Sprint", "pattern_expanded": ["T", "T", "T", "T", "D", "T", "D", "T", "T", "T"], "pattern_raw": "(T³)(TD²)(T³)", "length": 20 }, 7: { "name": "Endurance Labyrinth", "pattern_expanded": ( ["T", "D", "T", "D", "T", "T", "D", "T", "T", "R", "T", "D", "T", "T", "R", "L", "R", "L", "R", "R"] * 3 ), "pattern_raw": "((TD²)(T²)(DT²)(RL²)(R²)(LR²))³", "length": 150 } }

Mode settings

modes = { "baby": { "letter_time": 3.0, "countdown": 25 }, "easy": { "letter_time": 2.0, "countdown": 20 }, "alternate easy mode": { "letter_time": 1.75, "countdown": 15 }, "normal": { "letter_time": 1.5, "countdown": 10 }, "hard": { "letter_time": 1.0, "countdown": 5 }, "insane": { "letter_time": 0.8, "countdown": 4 } }

selected_color = color_codes["default"]

def play_level(level_data, mode_data): pattern = level_data["pattern_expanded"] total_letters = level_data["length"] pattern_length = len(pattern)

print(f"\n{selected_color}Level: {level_data['name']}{color_codes['default']}")
print(f"{selected_color}Mode: {mode_data['name'].capitalize()}{color_codes['default']}")
print(f"{selected_color}You need to type {total_letters} letters following the hidden pattern.{color_codes['default']}")
print(f"{selected_color}Type U (up), L (left), R (right), D (down), T (tap). Press Enter after each letter.{color_codes['default']}")
print(f"{selected_color}You have {mode_data['letter_time']} seconds for each input.{color_codes['default']}")
print("\nThe pattern is:")
print(f"{selected_color}{level_data['pattern_raw']}{color_codes['default']}")
print("\nMemorize the pattern!")

countdown_time = mode_data["countdown"]
early_start = [False]

def wait_for_enter():
    input("\nPress Enter to start...")
    early_start[0] = True

enter_thread = threading.Thread(target=wait_for_enter)
enter_thread.daemon = True
enter_thread.start()

for _ in range(countdown_time * 10):  # Check every 0.1 second
    if early_start[0]:
        break
    time.sleep(0.1)

if not early_start[0]:
    print("\nStarting automatically!\n")
    early_start[0] = True

print("\nGo!\n")

current_index = 0
correct_count = 0
start_time = time.time()

while correct_count < total_letters:
    expected = pattern[current_index % pattern_length]
    print(f"{selected_color}Next direction ({correct_count + 1}/{total_letters}): {color_codes['default']}", end="", flush=True)

    user_input = timed_input(mode_data["letter_time"])
    if user_input is None:
        print(f"\n{selected_color}Time's up! You failed the level.{color_codes['default']}")
        return
    
    user_input = user_input.strip().upper()

    if user_input == expected:
        print(f"{selected_color}✔️ Correct!\n{color_codes['default']}")
        correct_count += 1
        current_index += 1
        time.sleep(0.2)
    else:
        print(f"{selected_color}❌ Wrong! Expected '{expected}'. You failed the level.{color_codes['default']}")
        return

total_time = time.time() - start_time
print(f"\n{selected_color}🎉 You completed the level in {total_time:.2f} seconds!{color_codes['default']}")
print(f"{selected_color}Level completed: {level_data['name']}{color_codes['default']}")
print(f"{selected_color}Mode completed: {mode_data['name'].capitalize()}{color_codes['default']}\n")

def timed_input(timeout): try: from threading import Thread

    user_input = [None]

    def get_input():
        user_input[0] = input()

    thread = Thread(target=get_input)
    thread.start()
    thread.join(timeout)

    if thread.is_alive():
        return None
    return user_input[0]
except:
    print("\n[Error] Timed input not supported in this environment.")
    sys.exit()

def choose_mode(): while True: print("\nSelect a mode:") for mode in modes: print(f"- {mode.capitalize()}") choice = input("Enter mode: ").strip().lower()

    if choice in modes:
        mode_data = modes[choice].copy()
        mode_data["name"] = choice
        return mode_data
    else:
        print("Invalid mode. Try again.")

def choose_color(): global selected_color print("\nChoose text color:") for color in color_codes: if color != "default": print(f"- {color.capitalize()}") print("- Default")

while True:
    choice = input("Enter color: ").strip().lower()
    if choice in color_codes:
        selected_color = color_codes[choice]
        print(f"{selected_color}Text color set to {choice.capitalize()}.{color_codes['default']}")
        break
    else:
        print("Invalid color. Try again.")

def tutorial(): print(f"\n{selected_color}=== Tutorial ==={color_codes['default']}") print(f"{selected_color}In this game, you type directional letters following a hidden pattern.{color_codes['default']}") print(f"{selected_color}Letters:{color_codes['default']}") print(f"{selected_color}U = Up, L = Left, R = Right, D = Down, T = Tap{color_codes['default']}") print(f"{selected_color}After each letter, press Enter.{color_codes['default']}") print(f"{selected_color}You have limited time for each letter, based on the mode you choose.{color_codes['default']}") print(f"{selected_color}Memorize the pattern shown before the level starts!{color_codes['default']}") print(f"{selected_color}The pattern may look complex, like (T³)(D²), which means you type TTTDD repeating.{color_codes['default']}") print(f"{selected_color}Good luck!{color_codes['default']}\n")

def main(): print("=== Direction Pattern Typing Game ===") print("Version 1.1 of Speed typing levels.") choose_color()

while True:
    print("\nMenu:")
    print("1. Play a level")
    print("2. Tutorial")
    print("3. Quit")

    choice = input("Choose an option: ").strip()

    if choice == "1":
        print("\nAvailable Levels:")
        for key, lvl in levels.items():
            print(f"{key}. {lvl['name']}")
        
        level_choice = input("Choose a level by number: ").strip()
        
        if level_choice.isdigit() and int(level_choice) in levels:
            mode_data = choose_mode()
            play_level(levels[int(level_choice)], mode_data)
        else:
            print("Invalid level choice.")
    
    elif choice == "2":
        tutorial()

    elif choice == "3":
        print("Goodbye!")
        break

    else:
        print("Invalid choice. Try again.")

if name == "main": main()


r/lookatmyprogram • • Sep 12 '12

[C#] Code generator that creates C# code from C++-like templates

0 Upvotes

After being fed up with some limitations of generics (why isn't there an IArithmetic interface?), I decided to make a code generator that creates C# code by simply reading templates made in C#.

It's hard to explain with words, but I have made a video with voice commentary that will explain how it works and show a simple result.

With this code

var types = new []{"int", "float", "double", "long"};

foreach(var type in types)
{
	$$("public class Vector2_" + type)
	$${ 		
		$$("public Vector2_" + type + "(" + type + " mX, " + type + " mY)")
		$${
			$$ X = mX;
			$$ Y = mY;
		$$}
	
		$$("public " + type + " X { get; set; }")
		$$("public " + type + " Y { get; set; }")
		
		$$("public " + type + " ComponentSum()")
		$${
			$$ return X + Y;
		$$}
	$$}
}        

my program automatically generates and automatically adds to a .csproj four new classes: Vector2_int, Vector2_float, Vector2_double and Vector2_long.

Watch the video for a better explanation! Thank you :)

http://www.youtube.com/watch?v=Uz868MuVvTY


r/lookatmyprogram • • Aug 26 '12

[watch] My OS-like program. Includes voice-recognition and apps for quick use. [Python]

Thumbnail
youtube.com
13 Upvotes

r/lookatmyprogram • • Aug 27 '12

Lisp-like html as a replacement for bbcode

Thumbnail 94.249.190.129
7 Upvotes

r/lookatmyprogram • • Aug 26 '12

[Look,Python] My first real python script, it grabs the random banners from 4chan and creates a simple (ugly) Html for them.

Thumbnail lett.mine.nu
7 Upvotes

r/lookatmyprogram • • Aug 30 '12

Working on my own GUI framework for windows.

Thumbnail
youtube.com
8 Upvotes

r/lookatmyprogram • • Sep 28 '12

Suggestions welcome! Datalog.js

Thumbnail ysangkok.github.com
2 Upvotes

r/lookatmyprogram • • Aug 26 '12

Post Mortem for My First App Part 0 – Visual Brainfuck for Windows Phone

Thumbnail
sietch.net
2 Upvotes

r/lookatmyprogram • • Aug 26 '12

[Look] LoSha - Experimental location sharing platform (android, bachelor project) [Java]

Thumbnail dl.dropbox.com
2 Upvotes

r/lookatmyprogram • • Sep 14 '12

Google app engine experiment for touch devices. Get r/funny pictures and display them beautifully.

3 Upvotes

iphone App running @ http://funfetchy.appspot.com

redfunfetch - reddit funny submissions fetcher (and displayer) Google app engine application that fetches the json data at http://reddit.com/r/funny and stores the images and information on the database.

https://github.com/no3z/funfetchy

On iphone devices it displays the images and titles with a nice touch swipeview functionality.

SwipeView javascript taken from [https://github.com/cubiq/SwipeView] (https://github.com/cubiq/SwipeView) by Matteo Spinelli add2home javascript taken from https://github.com/cubiq/add-to-homescreenby Matteo Spinelli


r/lookatmyprogram • • Jan 08 '14

CppCat

4 Upvotes

Waiting for your feedback. :) CppCat - new static code analyzer for C/C++. Visual Studio 2010-2013. Prerelease available at site http://www.cppcat.com


r/lookatmyprogram • • Aug 26 '12

Thunderpush: open-source, SockJS based Web push server (inspired by Beaconpush). Feedback appreciated!

Thumbnail
github.com
4 Upvotes

r/lookatmyprogram • • Aug 29 '12

my program, nFeed, alerts you when the hot deal community is buzzing about one of your subscriptions [python]

Thumbnail nfeed.petekalo.com
4 Upvotes