Skip to content

Instantly share code, notes, and snippets.

@mejariamol
mejariamol / mem2.cpp
Created December 25, 2018 10:18
code 2 | C++ code to illustrate behind the scene
#include <iostream>
using namespace std;
// This method is used to get
// pretty addresses.
int addr(void * p) {
return (long)p%1000;
};
int main() {
@mejariamol
mejariamol / mem.cpp
Last active December 25, 2018 09:59
C++ code to illustrate behind the scene => memory
#include <iostream>
using namespace std;
int main() {
int zeroArr[2];
int i;
for (i=0; i<2; i++) {
zeroArr[i] = 0;
}
int oneArr[2];
@mejariamol
mejariamol / codejam-qr17-b.cpp
Created September 8, 2018 18:32
Code Jam QR 17 - Tidy Numbers
#include <iostream>
using namespace std;
int len;
char n[18], ans[18];
int length(char *s) {
int i = 0;
while(s[i] != '\0') i++;
return i;
@mejariamol
mejariamol / code.cpp
Last active August 26, 2018 16:41
Solution Code for Oversized Pancake Flipper
#include <iostream>
using namespace std;
char s[1002];
int flips[1002];
int ans, ind, currFlips, length, k;
bool fail;
void init() {
ans = 0;
@mejariamol
mejariamol / GSoC-Final-Submission.md
Last active August 29, 2017 05:03
GSoC 2017 Final Product, Amol Mejari - FOSSASIA

GSoC 2017 Final Product, Amol Mejari - FOSSASIA

Open Event Organizer Android Application

I worked on Open Event Organizer, an Android Application for Event Organizers and Entry Managers in this summer with Areeb Jamal. It is a client side application for another project under FOSSASIA named Open Event Organizer Server.

Goals accomplished during the GSoC Period

The core features implemented in the app are:

@mejariamol
mejariamol / error.log
Created April 21, 2017 04:06
internal server error
Exception on / [GET]
Traceback (most recent call last):
File "/usr/local/lib/python2.7/dist-packages/flask/app.py", line 1982, in wsgi_app
response = self.full_dispatch_request()
File "/usr/local/lib/python2.7/dist-packages/flask/app.py", line 1614, in full_dispatch_request
rv = self.handle_user_exception(e)
File "/usr/local/lib/python2.7/dist-packages/flask_restplus/api.py", line 557, in error_router
return original_handler(e)
File "/usr/local/lib/python2.7/dist-packages/flask_cors/extension.py", line 161, in wrapped_function
return cors_after_request(app.make_response(f(*args, **kwargs)))
@mejariamol
mejariamol / gunicorn.txt
Created April 12, 2017 04:50
gunicorn error log
[2017-04-12 15:46:25 +0000] [2856] [INFO] Starting gunicorn 19.7.1
[2017-04-12 15:46:25 +0000] [2856] [INFO] Listening at: http://0.0.0.0:5000 (2856)
[2017-04-12 15:46:25 +0000] [2856] [INFO] Using worker: eventlet
[2017-04-12 15:46:25 +0000] [2861] [INFO] Booting worker with pid: 2861
[2017-04-12 15:46:25 +0000] [2861] [ERROR] Exception in worker process
Traceback (most recent call last):
File "/usr/local/lib/python2.7/dist-packages/gunicorn/arbiter.py", line 578, in spawn_worker
worker.init_process()
File "/usr/local/lib/python2.7/dist-packages/gunicorn/workers/geventlet.py", line 102, in init_process
self.patch()
@mejariamol
mejariamol / pip.log
Created April 10, 2017 12:13
pip error log
This file has been truncated, but you can view the full file.
------------------------------------------------------------
/usr/bin/pip run on Mon Apr 10 23:11:31 2017
Requirement already satisfied (use --upgrade to upgrade): pycparser==2.14 in /usr/local/lib/python2.7/dist-packages (from -r requirements/common.txt (line 1))
Requirement already satisfied (use --upgrade to upgrade): Flask>=0.12,<1 in /usr/local/lib/python2.7/dist-packages (from -r requirements/common.txt (line 2))
Requirement already satisfied (use --upgrade to upgrade): Flask-Script>=2.0.5,<2.1 in /usr/local/lib/python2.7/dist-packages (from -r requirements/common.txt (line 3))
Requirement already satisfied (use --upgrade to upgrade): Flask-SQLAlchemy>=2.1,<2.2 in /usr/local/lib/python2.7/dist-packages (from -r requirements/common.txt (line 4))
Requirement already satisfied (use --upgrade to upgrade): Flask-Migrate>=2.0.0,<3 in /usr/local/lib/python2.7/dist-packages (from -r requirements/common.txt (line 5))
Requirement already satisfied (use --upgrade to upgrade): Flask-Login>=0.4,<1 in /usr/local/lib/