Skip to content

Instantly share code, notes, and snippets.

View AnubhavUjjawal's full-sized avatar
🎯
Focusing

Anubhav Ujjawal AnubhavUjjawal

🎯
Focusing
View GitHub Profile
@AnubhavUjjawal
AnubhavUjjawal / out.txt
Created September 7, 2019 20:59
Output of yarn run test
anubhavujjawal@Anubhavs-MacBook-Air  ~/Desktop/work/topcoder/mockup-server   master  yarn run test
yarn run v1.16.0
$ NODE_ENV=test nyc mocha src/tests/**/*.js --exit
JSON Server is running on port 3000
Generators Tests
getUsers
✓ should return array of Users having length and password as passed in argument.
getApplicationIds
======================================================================= test session starts ========================================================================
platform darwin -- Python 3.7.0, pytest-3.3.0, py-1.8.0, pluggy-0.6.0
rootdir: /Users/anubhavujjawal/Desktop/Misc/MongoDB/M220P-mongoDB-for-python-devs/mflix-python, inifile:
plugins: flask-0.10.0
collected 43 items
tests/test_db_connection.py FFFF [100%]
============================================================================= FAILURES =============================================================================
@AnubhavUjjawal
AnubhavUjjawal / regx.chpl
Last active March 2, 2019 19:14
regx chapel confusion
use Regexp;
proc isFullString(in obj):bool {
var obj2 = obj:string;
var myRegexp = compile("a+");
writeln(obj2.match(myRegexp));
return true;
}
writeln(isFullString("abcdef"), isFullString("aaa"), isFullString("a"), isFullString(""));
@AnubhavUjjawal
AnubhavUjjawal / regx.chpl
Created March 2, 2019 16:59
regx chapel confusion
use Regexp;
proc isFullString(in obj): bool {
var obj2 = obj:string;
var myRegexp = compile("a+");
writeln(obj2.match(myRegexp));
}
writeln(isFullString("abcdef"), isFullString("aaa"), isFullString("a"), isFullString(""));
@AnubhavUjjawal
AnubhavUjjawal / lcs.chpl
Created March 1, 2019 18:41
longest common subsequence code in chapel language.
proc lcsDPTable(str1: string, str2: string) {
// writeln(str1, " ", str2);
var dpTable: [1..str1.size+1, 1..str2.size+1] int, i, j: int;
const n = str1.size;
const m = str2.size;
var lcs: string;
for i in 1..n {
for j in 1..m {
if str1[i] == str2[j] {
dpTable[i+1, j+1] = dpTable[i, j] + 1;