Online resume
ayushgoel111@gmail.com
+91-9990673920
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
- (void)makeNetworkCall { | |
NSURL *URL = nil; // replace with own URL | |
[[NSURLSession sharedSession] dataTaskWithURL:URL | |
completionHandler: | |
^(NSData *data, NSURLResponse *response, NSError *error) { | |
if (error != nil) { | |
NSLog(@"Got error for request with URL: %@", URL); | |
[self handleError:error]; | |
return; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
for i in `find . -name '*.m'`; | |
do | |
if [[ -f $i ]]; then | |
line_count=`wc -l "$i" | awk {'print $1'}` | |
if [[ $line_count -gt 1000 ]]; then | |
echo $line_count " " $i | |
fi | |
fi | |
done |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// https://www.hackerrank.com/challenges/insertionsort1 | |
#include <stdio.h> | |
#include <string.h> | |
#include <math.h> | |
#include <stdlib.h> | |
#include <assert.h> | |
void print_ar(int size, int *ar) { | |
for (int i = 0; i < size; ++i) { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//https://www.hackerrank.com/challenges/cipher | |
#include <stdio.h> | |
#include <string.h> | |
#include <math.h> | |
#include <stdlib.h> | |
char xor(char a, char b) { | |
int ai = a-'0'; | |
int bi = b-'0'; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//https://www.hackerrank.com/challenges/coin-change | |
#include <stdio.h> | |
#include <string.h> | |
#include <math.h> | |
#include <stdlib.h> | |
int coins[55]; | |
long sol[255]; | |
int m; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <stdio.h> | |
#include <string.h> | |
#include <math.h> | |
#include <stdlib.h> | |
long max(long a, long b) { | |
return (a > b) ? a : b; | |
} | |
long get_contiguous_solution(int n, int *a) { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# coding: utf-8 | |
#!/usr/bin/env python | |
import urllib2, re, os | |
#from BeautifulSoup import BeautifulSoup | |
#import simplejson as json | |
import json | |
user_agent = 'Mozilla/5.0 (Windows; U; Windows NT 5.1; en-GB; rv:1.9.0.3) Gecko/2008092417 Firefox/3.0.3' | |
def fetchPage(url): |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# def xx(num): | |
# n = 0 | |
# while n < num: | |
# yield n | |
# print(n) | |
# n += 1 | |
# x = xx(12) | |
# for i in x: | |
# print("asd", i) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
import random | |
import itertools | |
def rindex(alist, value): | |
return len(alist) - alist[-1::-1].index(value) - 1 | |
def getAvailability(arr, val): | |
return [i.count(val) > 0 for i in arr] |
NewerOlder