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

different slice

Code
Diff
  • binary=lambda n:bin(n)[-7:]
    
    • binary = lambda n: bin(n)[2:]
    • binary=lambda n:bin(n)[-7:]
Code
Diff
  • or16=lambda*_:''.join(map(max,zip(*_)))
    • or16 = lambda a, b: ''.join(max(x, y) for x, y in zip(a, b))
    • or16=lambda*_:''.join(map(max,zip(*_)))
Code
Diff
  • def rec(pre,post,st):
        if pre==[]:
            st.add(tuple(post))
            return
        else:
            i=0
            while i<len(pre):
                rec(pre[0:i]+pre[i+1:],[pre[i]]+post,st)
                i+=1
            return
        
    def all_permutations(lst):
        s=set()
        rec(lst,[],s)
        return s
        
    
    • from itertools import permutations
    • all_permutations = lambda lst: list(permutations(lst))
    • def rec(pre,post,st):
    • if pre==[]:
    • st.add(tuple(post))
    • return
    • else:
    • i=0
    • while i<len(pre):
    • rec(pre[0:i]+pre[i+1:],[pre[i]]+post,st)
    • i+=1
    • return
    • def all_permutations(lst):
    • s=set()
    • rec(lst,[],s)
    • return s
Code
Diff
  • const numMinusSeven = num => Math.ceil((num / 7) + ~~(num % 7 / 7));
    
    • const numMinusSeven = num => ~~(num/7)+1;
    • const numMinusSeven = num => Math.ceil((num / 7) + ~~(num % 7 / 7));
Code
Diff
  • remainder = lambda x, y: x - (x // y) * y if y else -1
    • remainder=lambda x,y:x%y if y else-1
    • remainder = lambda x, y: x - (x // y) * y if y else -1