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 | |
| import sys, csv | |
| # Checking for cli parametres | |
| if len( sys.argv ) < 4: | |
| print "Usage: %s input.csv column-label output.csv"%( sys.argv[0] ) | |
| sys.exit( 1 ) | |
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 pytohn | |
| from flask import Flask, request, jsonify, abort | |
| import time | |
| app = Flask( __name__ ) | |
| notes = {} | |
| next_note_id = 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
| public class Sorttaa { | |
| public static int sorttaa( int a, int b, int c, int monesko ){ | |
| int tmp; | |
| if ( a > b ){ | |
| tmp = b; | |
| b = a; | |
| a = tmp; |
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 | |
| import libConstraint as LC | |
| solution = LC.Solution() | |
| @solution.must_satisfy |
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 | |
| import libConstraint as LC | |
| solution = LC.Solution() | |
| @solution.must_satisfy | |
| def no_loops_constraint( params, candidate ): | |
| return len( candidate ) == len( set( candidate ) ) |
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
| // Luokat: | |
| /* | |
| create_key( y, x, version, is_current ) | |
| y << 32 | x << 12 | is_current << 10 | version | |
| */ | |
| uint64_t create_key( uint32_t y, uint32_t x, uint16_t version, bool is_current ); | |
| uint32_t get_row( uint64_t key ); | |
| uint32_t get_column( uint64_t key ); |
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 | |
| import xml.dom.minidom as dom | |
| import xml | |
| import sys | |
| def read_xml_file( fn ): | |
| return dom.parse( fn ).documentElement |
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 | |
| import sys, os | |
| basedir = "." | |
| if len( sys.argv ) > 2: | |
| basedir = sys.argv[1] | |
| string = sys.argv[-1] |
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
| public class Vektori { | |
| public double x, y, z; | |
| public static Vektori fromPolar( double r, double phi ){ | |
| return new Vektori( r * Math.cos( phi ), r * Math.sin( phi ), 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
| function fetchMultiple( datasets, predicate, finished ){ | |
| var functions = []; | |
| var results = []; | |
| for( var i = 0 ; i < datasets.length ; ++i ){ | |
| functions.push( (function(i){ return function(){ | |
| $.getJSON( datasets[i], function( response ){ | |
| results.push( predicate( response ) ); | |
| functions[i+1](); | |
| }); | |