Code Monkey home page Code Monkey logo

bigdiff-code's People

Contributors

brennan-m avatar doubleshow avatar sangheestyle avatar

Stargazers

 avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

Forkers

cuplv

bigdiff-code's Issues

Traverse n-th depth for root_path

https://github.com/thlorenz/readdirp

first depth only

var fs = require('fs');
fs.readdirSync('dir')

However, we need to know one more depth.

> var readdirp = require('readdirp');
> readdirp({root:'repos', depth:1}, function(fileInfo) {}, function (err, res) {console.log});
...
     { name: 'SMSSync',
       path: 'ushahidi/SMSSync',
       fullPath: '/home/sangheestyle_gmail_com/repos/ushahidi/SMSSync',
       parentDir: 'ushahidi',
       fullParentDir: '/home/sangheestyle_gmail_com/repos/ushahidi',
       stat: [Object] } ],

Cannot read property 'items' of undefined

UPDATED: 2013-12-04 83 items
UPDATED: 2013-12-11 90 items
Progress: 360/366 ...
UPDATED: 2013-12-17 78 items
UPDATED: 2013-12-08 93 items
{ [Error: getaddrinfo ENOTFOUND api.github.com]
  code: 'ENOTFOUND',
  errno: 'ENOTFOUND',
  syscall: 'getaddrinfo',
  hostname: 'api.github.com' }
/home/sanghee/Dev/bigdiff-code/lib/github.js:179
    github.insertRepo(data['items'], function (err) {
                          ^
TypeError: Cannot read property 'items' of undefined
    at /home/sanghee/Dev/bigdiff-code/lib/github.js:179:27
    at /home/sanghee/Dev/bigdiff-code/node_modules/octonode/lib/octonode/search.js:26:18
    at Request._callback (/home/sanghee/Dev/bigdiff-code/node_modules/octonode/lib/octonode/client.js:195:20)
    at self.callback (/home/sanghee/Dev/bigdiff-code/node_modules/octonode/node_modules/request/request.js:373:22)
    at Request.emit (events.js:107:17)
    at Request.onRequestError (/home/sanghee/Dev/bigdiff-code/node_modules/octonode/node_modules/request/request.js:971:8)
    at ClientRequest.emit (events.js:107:17)
    at TLSSocket.socketErrorListener (_http_client.js:272:9)
    at TLSSocket.emit (events.js:129:20)
    at net.js:923:16

real    18m12.186s
user    0m12.973s
sys 0m0.640s

Error: Failed to lookup view "search_commits" in views directory "./views"

Error: Failed to lookup view "search_commits" in views directory "./views"
   at EventEmitter.app.render (/home/sanghee/dev/bigdiff-code/node_modules/express/lib/application.js:555:17)
   at ServerResponse.res.render (/home/sanghee/dev/bigdiff-code/node_modules/express/lib/response.js:938:7)
   at /home/sanghee/dev/bigdiff-code/app.js:80:7
   at Layer.handle [as handle_request] (/home/sanghee/dev/bigdiff-code/node_modules/express/lib/router/layer.js:82:5)
   at next (/home/sanghee/dev/bigdiff-code/node_modules/express/lib/router/route.js:110:13)
   at Route.dispatch (/home/sanghee/dev/bigdiff-code/node_modules/express/lib/router/route.js:91:3)
   at Layer.handle [as handle_request] (/home/sanghee/dev/bigdiff-code/node_modules/express/lib/router/layer.js:82:5)
   at /home/sanghee/dev/bigdiff-code/node_modules/express/lib/router/index.js:267:22
   at Function.proto.process_params (/home/sanghee/dev/bigdiff-code/node_modules/express/lib/router/index.js:321:12)
   at next (/home/sanghee/dev/bigdiff-code/node_modules/express/lib/router/index.js:261:10)

Split library and application for running service.

We might want to split library and application one day. For example, we can make bigdiff-code more general purpose and publish it into npm. If so, we can use this npm when we develop service for our server.

pros:

  • We can use npm and use it for more public way. (Practice and good for showing what you do)
  • Clear to maintain. It means we can make git repo of library for public and another for service implementation for private.

cons:

  • Have two git repo.

parsing error when the result have no item

parsing error when the result have no item

UPDATED: 2010-02-08 7 items
/home/sangheestyle_gmail_com/dev/bigdiff-code/lib/github.js:161
            pageNum = headers.link.split(',')[1].match(regex)[1];
                                                ^
TypeError: Cannot read property 'match' of undefined
    at /home/sangheestyle_gmail_com/dev/bigdiff-code/lib/github.js:161:49
    at /home/sangheestyle_gmail_com/dev/bigdiff-code/node_modules/octonode/lib/octonode/search.js:31:18
    at Client.errorHandle (/home/sangheestyle_gmail_com/dev/bigdiff-code/node_modules/octonode/lib/octonode/client.
js:183:14)
    at Request._callback (/home/sangheestyle_gmail_com/dev/bigdiff-code/node_modules/octonode/lib/octonode/client.j
s:197:24)
    at Request.self.callback (/home/sangheestyle_gmail_com/dev/bigdiff-code/node_modules/octonode/node_modules/requ
est/request.js:373:22)
    at Request.emit (events.js:110:17)
    at Request.<anonymous> (/home/sangheestyle_gmail_com/dev/bigdiff-code/node_modules/octonode/node_modules/reques
t/request.js:1318:14)
    at Request.emit (events.js:129:20)
    at IncomingMessage.<anonymous> (/home/sangheestyle_gmail_com/dev/bigdiff-code/node_modules/octonode/node_module
s/request/request.js:1266:12)
    at IncomingMessage.emit (events.js:129:20)

Errors from server during search/git

Problem on server

TypeError: undefined is not a function
   at Object.git.execCommand (/home/sangheestyle_gmail_com/dev/bigdiff-code/lib/git.js:133:16)
   at Object.git.log (/home/sangheestyle_gmail_com/dev/bigdiff-code/lib/git.js:61:21)
   at /home/sangheestyle_gmail_com/dev/bigdiff-code/index.js:42:7
   at Layer.handle [as handle_request] (/home/sangheestyle_gmail_com/dev/bigdiff-code/node_modules/express/lib/router/layer.js:82:5)
   at next (/home/sangheestyle_gmail_com/dev/bigdiff-code/node_modules/express/lib/router/route.js:110:13)
   at Route.dispatch (/home/sangheestyle_gmail_com/dev/bigdiff-code/node_modules/express/lib/router/route.js:91:3)
   at Layer.handle [as handle_request] (/home/sangheestyle_gmail_com/dev/bigdiff-code/node_modules/express/lib/router/layer.js:82:5)
   at /home/sangheestyle_gmail_com/dev/bigdiff-code/node_modules/express/lib/router/index.js:267:22
   at Function.proto.process_params (/home/sangheestyle_gmail_com/dev/bigdiff-code/node_modules/express/lib/router/index.js:321:12)
   at next (/home/sangheestyle_gmail_com/dev/bigdiff-code/node_modules/express/lib/router/index.js:261:10)

Parse error

UPDATED: 2010-02-07 3 items
UPDATED: 2010-02-08 7 items
Progress: 40/1886 ...
/home/sanghee/Dev/bigdiff-code/lib/github.js:215
numberOfPages = headers.link.split(',')[1].match(regex)[1];
^
TypeError: Cannot read property 'match' of undefined
at /home/sanghee/Dev/bigdiff-code/lib/github.js:215:51

REL: bigdiff-code 0.1.0 release schedule

We need to release bigdiff-code 0.1.0.

Release Schedule

The releases:

  • 0.1.0: Feburary 22, 2015
  • 0.1.1: Feburary 24, 2015

Features for 0.1.0

Misc

This version is for our presentation.

How can we insert data into DB more gracefully?

How can we make the following part more gracefully? For example, how can we avoid using many ? mark?

 var insertRepo = 'INSERT INTO bigdiff.repo_info (id, name, full_name, owner_login, '
    + 'owner_id, owner_url, private, html_url, description, url, clone_url, size, '
    + 'stargazers_count, watchers_count, language, has_issues, forks_count, '
    + 'open_issues_count, score) VALUES(?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, '
    + '?, ?, ?, ?, ?, ?);';

de2a466

Using mongodb instead of Cassandra

I think mongodb might be better to this project in terms of rich query features. Here is my plan.

a. I make a feature branch: mongodb
b. replace cassandra part to by mongodb

REL: bigdiff-code 0.1.1 release schedule

We need to release bigdiff-code 0.1.1.

Release Schedule

The releases:

  • 0.1.0: Feburary 22, 2015
  • 0.1.1: Feburary 24, 2015

Features for 0.1.1

Misc

This version is for our presentation.

Server: fatal: bad default revision 'HEAD'

Not Found in CyanogenMod/android_packages_apps_Calendarfatal: bad default revision 'HEAD'child_process.js:1382 throw err; ^Error: Command failed: git log --pretty=format:'{ "id": "%H", "author_name": "%an", "author_email": "%ae", "date": "%ad", "subject": "%s", "body": "%b"},' -G".setTag([^,|^(],[^,])" -- *.javafatal: bad default revision 'HEAD' at checkExecSyncError (child_process.js:1339:13) at execSync (child_process.js:1379:13) at Object.git.execCommand (/home/sangheestyle_gmail_com/dev/bigdiff-code/lib/git.js:148:16) at Object.git.log (/home/sangheestyle_gmail_com/dev/bigdiff-code/lib/git.js:67:21) at ReaddirpReadable. (/home/sangheestyle_gmail_com/dev/bigdiff-code/app.js:41:13) at ReaddirpReadable.emit (events.js:107:17) at ReaddirpReadable. (/home/sangheestyle_gmail_com/dev/bigdiff-code/node_modules/readdirp/node_modules/readable-stream/lib/stream_readable.js:786:14) at ReaddirpReadable.emit (events.js:104:17) at emitReadable (/home/sangheestyle_gmail_com/dev/bigdiff-code/node_modules/readdirp/node_modules/readable-stream/lib/_stream_readable.js:448:10) at emitReadable (/home/sangheestyle_gmail_com/dev/bigdiff-code/node_modules/readdirp/node_modules/readable-stream/lib/_stream_readable.js:444:5)sangheestyle_gmail_com@instance-1:~/dev/bigdiff-code$

Error from server during clone

Cloned: bgcngm/mtk-tools
Username for 'https://github.com': Cloned: lasar/titanium-lib
Cloned: perry/sass-font-face
Cloned: vowei/iQuery
Cloned: teamblueridge/a

It's not really error but need to figure out what's the Username for ... part

Show status of DB or whatever on server

I think we can show what happen in our server on web page. (NOT NOW) For example,

a. clone status (e.g. how many git repo stored or list repo name)
b. update status
c. trend graph

Whatever.

JSON.parse error for git log format

$ node searchCommits.js 
undefined:1
: "Sun Mar 24 20:32:24 2013 +0100", "subject": "Renamed adapter to "BaseAdapte
                                                                    ^
SyntaxError: Unexpected token B
    at Object.parse (native)
    at Object.git.log (/home/sanghee/Dev/bigdiff-code/lib/git.js:63:17)
    at ReaddirpReadable.<anonymous> (/home/sanghee/Dev/bigdiff-code/examples/searchCommits.js:21:11)
    at ReaddirpReadable.emit (events.js:107:17)

what's the good log naming?

Our code generates ton of log with console.log() so we might want to make some good prefix for someday. This is because the way will allow us to grep some pattern easily for logging or error analysis.

83 Issues Stored in DB.
98 Issues Stored in DB.
Cloned: 47deg/android-swipelistview
18 Issues Stored in DB.
Cloned: Comcast/FreeFlow
Cloned: emilsjolander/StickyListHeaders
251 Issues Stored in DB.
Cloned: redsolution/xabber-android

Let's think about what's the good log naming sense.

crawling for reviews of google play

Need to get reviews from google play for apps. Here is a basic code snippet. I worked.

var request = require('request');
var cheerio = require('cheerio');

// Set the headers
var headers = { 'User-Agent': 'Wild/0.0.1'
              , 'Content-Type': 'application/x-www-form-urlencoded'
              }

// Configure the request
var options = { url: 'https://play.google.com/store/getreviews'
              , method: 'POST'
              , headers: headers
              , form: { 'reviewType': 0
                      , 'pageNum': 1
                      , 'id': 'com.github.mobile'
                      , 'reviewSortOrder': 2
                      }
              }

// Start the request
request(options, function (error, response, body) {
    if (!error && response.statusCode == 200) {
        var htmlString = JSON.parse(body.slice(7, -1))[2];
        var reviews = [];
        $ = cheerio.load(htmlString);
        $('.single-review').each(function(i, elem) {
          reviews[i] = $(this).text();
        });
        console.log(reviews[0]);
    }
})

Error from filter and clone on server (get issues on rate limit)

From server

{ [Error: API rate limit exceeded for sangheestyle.] message: 'API rate limit exceeded for sangheestyle.', statusCode: 403, headers: { server: 'GitHub.com', date: 'Wed, 25 Feb 2015 07:09:58 GMT', 'content-type': 'application/json; charset=utf-8', 'content-length': '124', connection: 'close', status: '403 Forbidden', 'x-ratelimit-limit': '5000', 'x-ratelimit-remaining': '0', 'x-ratelimit-reset': '1424850215', 'x-github-media-type': 'github.v3; format=json', 'x-xss-protection': '1; mode=block', 'x-frame-options': 'deny', 'content-security-policy': 'default-src 'none'', 'access-control-allow-credentials': 'true', 'access-control-expose-headers': 'ETag, Link, X-GitHub-OTP, X-RateLimit-Limit, X-RateLimit-Remaining, X-RateLimit-Reset, X-OAuth-Scopes, X-Accepted-OAuth-Scopes, X-Poll-Interval', 'access-control-allow-origin': '*', 'x-github-request-id': '689A4A5D:11B4:4AD3456:54ED7545', 'strict-transport-security': 'max-age=31536000; includeSubdomains; preload', 'x-content-type-options': 'nosniff' } }

github.js function github.getRepoIssues hangs sometimes

When you run github.js, getRepoIssues works approximately 50% of the time, the other times it will hang for some unknown reason. It is crucial to repair this. Is it a problem that I implemented a recursive method in order to gather all issues with pagination?

Search harvested repos for instances of stack traces that appear in issues on the repo or stack traces

From Ken,

Search harvested repos for instances of stack traces that appear in issues on the repo or stack traces in commit logs (even small snippets of stack traces)

This will involve coming up with a set of heuristics for how to search for stack traces: i.e. search for the words "Exception" and "throws" in the indexed documents and then see what comes back to identify other terms that can be used to find stack traces.

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.