Start a new Kumite
AllAgda (Beta)BF (Beta)CCFML (Beta)ClojureCOBOL (Beta)CoffeeScriptCommonLisp (Beta)CoqC++CrystalC#D (Beta)DartElixirElm (Beta)Erlang (Beta)Factor (Beta)Forth (Beta)Fortran (Beta)F#GoGroovyHaskellHaxe (Beta)Idris (Beta)JavaJavaScriptJulia (Beta)Kotlinλ Calculus (Beta)LeanLuaNASMNim (Beta)Objective-C (Beta)OCaml (Beta)Pascal (Beta)Perl (Beta)PHPPowerShell (Beta)Prolog (Beta)PureScript (Beta)PythonR (Beta)RacketRaku (Beta)Reason (Beta)RISC-V (Beta)RubyRustScalaShellSolidity (Beta)SQLSwiftTypeScriptVB (Beta)
Show only mine

Kumite (ko͞omiˌtā) is the practice of taking techniques learned from Kata and applying them through the act of freestyle sparring.

You can create a new kumite by providing some initial code and optionally some test cases. From there other warriors can spar with you, by enhancing, refactoring and translating your code. There is no limit to how many warriors you can spar with.

A great use for kumite is to begin an idea for a kata as one. You can collaborate with other code warriors until you have it right, then you can convert it to a kata.

Ad
Ad

Used string encoded in binary

Code
Diff
  • import ctypes
    
    def decode(bin_string):
        """Print an encoded message using printf from C"""
        text_ = ''.join(chr(int(x, 2)) for x in bin_string.split()).encode("utf8")
        ctypes.CDLL("libc.so.6").printf(text_)
        
    
    decode('0b1101000 0b1100101 0b1101100 0b1101100 0b1101111 0b1010 0b110111')
    
    • import ctypes
    • ctypes.CDLL("libc.so.6").printf("hello\n7".encode("utf8"))
    • def decode(bin_string):
    • """Print an encoded message using printf from C"""
    • text_ = ''.join(chr(int(x, 2)) for x in bin_string.split()).encode("utf8")
    • ctypes.CDLL("libc.so.6").printf(text_)
    • decode('0b1101000 0b1100101 0b1101100 0b1101100 0b1101111 0b1010 0b110111')
Code
Diff
  • from functools import reduce; from operator import add; tit = lambda *x : reduce(add, x)
    • from functools import reduce; tit = lambda *x : reduce(int.__add__, x)
    • from functools import reduce; from operator import add; tit = lambda *x : reduce(add, x)
Code
Diff
  • fn vowels(s: &str) -> usize {
        s.chars().filter(|&c| "AEIOUaeiou".contains(c)).count()
    }
    • function vowels(str) {
    • //code here
    • }
    • fn vowels(s: &str) -> usize {
    • s.chars().filter(|&c| "AEIOUaeiou".contains(c)).count()
    • }
Code
Diff
  • const magick_message = x => ['codewarz', 'abracadabra!'][+x];
    
    • const magick_message = el => el ? 'abracadabra!' : 'codewarz';
    • const magick_message = x => ['codewarz', 'abracadabra!'][+x];
Code
Diff
  • pub fn bool_check(b: [bool; 3]) -> bool {
        b.iter().filter(|&&x| x).count() >= 2
    }
    • pub fn bool_check(b: [bool; 3]) -> bool {
    • b[0]as u8+b[1]as u8+b[2]as u8>1
    • b.iter().filter(|&&x| x).count() >= 2
    • }