Giter Club home page Giter Club logo

codewars's People

Contributors

jdpopkin avatar jfmercer avatar shime avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

codewars's Issues

Cannot complete setup via "codewars setup --token <api access token>"

I am on a macbook running Mojave 10.14.4.
I have run npm install -g codewars-client. However, when I then run:
codewars setup --token <my token went here> I get:

fs.js:134
  throw new ERR_INVALID_CALLBACK();
  ^

TypeError [ERR_INVALID_CALLBACK]: Callback must be a function
    at maybeCallback (fs.js:134:9)
    at Object.writeFile (fs.js:1180:14)
    at /usr/local/lib/node_modules/codewars-client/index.js:76:8
    at /usr/local/lib/node_modules/codewars-client/node_modules/mkdirp/index.js:48:26
    at FSReqCallback.oncomplete (fs.js:160:5)

I have wrapped my token as a string "12345" and also as blank text 12345.
Apologies as I am new to raising issues on GitHub and this issue relates to a previous issue that has already been closed - I don't know whether to re-open an old issue or make a new issue as I don't know the protocol.

Thanks! Love the idea of this cli - it means I will get to upskill in my coding and zsh/neovim usage all at once!

Setup is broken

I cannot setup codewars. codewars setup --token "MYTOKEN" always returns the error pictured below. I have tried MYTOKEN both with and without the quotation marks. Additionally, I have tried this on node 0.8.28, 0.10.40, 0.11.16, 0.12.7, 4.0.0, and 4.1.0.

image

If I can help to debug the error, please let me know how.

Verify is not working for me

When I train this kata (an example, they all have the same problem).

{
  "_data": {
    "success": true,
    "name": "Square(n) Sum",
    "slug": "square-n-sum",
    "description": "Complete the `squareSum`/`square_sum`/`SquareSum` method so that it squares each number passed into it and then sums the results together.\n\nFor example:\n```javascript\nsquareSum([1, 2, 2]); // should return 9\n```\n```coffeescript\nsquareSum([1, 2, 2]) # should return 9\n```\n```python\nsquare_sum([1, 2, 2]) # should return 9\n```\n```ruby\nsquareSum([1, 2, 2]) # should return 9\n```\n```crystal\nsquareSum([1, 2, 2]) # should return 9\n```\n```haskell\nsquareSum [1, 2, 2] -- should return 9\n```\n```dart\nsquareSum([1, 2, 2]); // should return 9\n```\n```rust\nsquare_sum([1, 2, 2]) // should return 9\n```\n```cpp\nsquare_sum({1, 2, 2}); // should return 9\n```\n```csharp\nKata.SquareSum(new int[] {1, 2, 2}) # should return 9\n```\n```c\nconst int values[] = { 1, 2, 2 };\nconst size_t count = sizeof(values)/sizeof(values[0]);\n\nsquare_sum(values, count); // should return 9\n```\n",
    "author": null,
    "rank": -8,
    "averageCompletion": 39604.54756929734,
    "tags": [
      "Fundamentals",
      "Arithmetic",
      "Mathematics",
      "Algorithms",
      "Logic",
      "Numbers",
      "Arrays",
      "Data Types",
      "Lists",
      "Data Structures"
    ],
    "session": {
      "projectId": "5b6d9b0d68cb2eef1b0000e4",
      "solutionId": "5b6d9b0eb3d9774eaf000002",
      "setup": "function squareSum(numbers){\n\n}",
      "exampleFixture": "Test.assertEquals(squareSum([1,2]), 5)\nTest.assertEquals(squareSum([0, 3, 4, 5]), 50)",
      "code": null,
      "recentlyAttempted": null
    }
  },
  "name": "Square(n) Sum",
  "description": "Complete the `squareSum`/`square_sum`/`SquareSum` method so that it squares each number passed into it and then sums the results together.\n\nFor example:\n```javascript\nsquareSum([1, 2, 2]); // should return 9\n```\n```coffeescript\nsquareSum([1, 2, 2]) # should return 9\n```\n```python\nsquare_sum([1, 2, 2]) # should return 9\n```\n```ruby\nsquareSum([1, 2, 2]) # should return 9\n```\n```crystal\nsquareSum([1, 2, 2]) # should return 9\n```\n```haskell\nsquareSum [1, 2, 2] -- should return 9\n```\n```dart\nsquareSum([1, 2, 2]); // should return 9\n```\n```rust\nsquare_sum([1, 2, 2]) // should return 9\n```\n```cpp\nsquare_sum({1, 2, 2}); // should return 9\n```\n```csharp\nKata.SquareSum(new int[] {1, 2, 2}) # should return 9\n```\n```c\nconst int values[] = { 1, 2, 2 };\nconst size_t count = sizeof(values)/sizeof(values[0]);\n\nsquare_sum(values, count); // should return 9\n```\n",
  "slug": "square-n-sum",
  "setup": "function squareSum(numbers){\n\n}",
  "tests": "Test.assertEquals(squareSum([1,2]), 5)\nTest.assertEquals(squareSum([0, 3, 4, 5]), 50)",
  "solutionId": "5b6d9b0eb3d9774eaf000002",
  "projectId": "5b6d9b0d68cb2eef1b0000e4",
  "rank": "8"
}

And provide this solution in an index.js file.

function squareSum(numbers){
	return numbers.reduce(function(sum, number){
		return sum + (number*number)
	}, 0);
}

and verify as

$ codewars verify index.js

I get the following result:

Nope. Your solution is incorrect. :(

## Stack trace

undefined

## Tests

Sometimes this error appears:

(node:90314) MaxListenersExceededWarning: Possible EventEmitter memory leak detected.  11 exit listeners added.  Use emitter.setMaxListeners() to increase limit

The solution is verified and passes if I paste it into the Codewars.com browser editor.

Added language support

When I check out the documentation in the CLI it says that only JavaScript and Ruby are supported. Are there any plans to add other languages (Python) to the supported languages?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.