This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/usr/bin/env python | |
| # -*- coding: utf-8 -*- | |
| #Description: Permet le contrôle de la souris avec une manette. | |
| #Author: Wrap http://linuxfr.org/users/wrap | |
| # Originally posted at http://linuxfr.org/users/wrap/journaux/un-petit-script-pour-les-utilisateurs-de-manette | |
| import pygame | |
| from pygame.locals import * | |
| import Xlib,time |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| From AMFPN@NEUVM1.BITNET Tue Oct 31 20:46:54 1989 | |
| From: Per Nielsen <AMFPN@NEUVM1.BITNET> | |
| Subject: Hacker test (was: Forwarded mail for FREETALK) | |
| 1 | |
| THE HACKER TEST - Version 1.0 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <html> | |
| <head> | |
| <title>Hello react</title> | |
| <link rel="stylesheet" type="text/css" href="http://cdn.jsdelivr.net/foundation/5.0.2/css/foundation.css"> | |
| <script src="http://cdnjs.cloudflare.com/ajax/libs/react/0.8.0/react.min.js"></script> | |
| <script src="http://code.jquery.com/jquery-1.10.0.min.js"></script> | |
| <script src="http://cdnjs.cloudflare.com/ajax/libs/showdown/0.3.1/showdown.min.js"></script> | |
| </head> | |
| <body> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| dom = React.DOM | |
| CommentBox = React.createClass | |
| getInitialState: -> | |
| {data: []} | |
| loadCommentsFromServer: -> | |
| $.ajax | |
| url: 'comments.json', |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| (setq lines-data '(("-" (lambda (y-offset)(* 1 y-offset))) | |
| ("=" (lambda (y-offset)(* 2 y-offset))))) | |
| (defun exec-cdr () | |
| (mapc (lambda (c) (message "Value: %S" (nth 1 c))) lines-data) | |
| (funcall (cadar lines-data) 10)) | |
| (defun line-down-repeat () | |
| (dotimes (iteration 5) | |
| (dotimes (n steps) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| (defn polling [fun] | |
| (println "[polling] started") | |
| (loop [] | |
| (if (not (realized? fun)) | |
| (recur))) | |
| (println "[polling] result: " (deref fun)) | |
| (println "[polling] end") | |
| (deref fun)) | |
| (do |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // Define a class | |
| AwesomeClass = function () { | |
| this.hello = function(param) { | |
| console.log("[base method] ", param); | |
| return param; | |
| }; | |
| }; | |
| // Create an instance | |
| awesome_object = new AwesomeClass(); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| def filter_fixme(data): | |
| return filter( | |
| lambda x: 'fixme' in x.get('tags', []), data | |
| ) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| function Point(x, y, proto) { | |
| var p = Object.create(proto || Point.prototype); | |
| p.x = x; | |
| p.y = y; | |
| return p; | |
| }; | |
| Point.prototype = { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| if (!window.app) { | |
| window.app = {} | |
| } | |
| window.app.Cow = function(name) { | |
| this.name = name || 'Anon cow'; | |
| } | |
| window.app.Cow.prototype = { | |
| greets: function(target) { |