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 educational purposes. | |
Do not misuse. | |
""" | |
from random import shuffle | |
import urllib | |
f = urllib.urlopen('http://www.geeksforgeeks.org/array-data-structure/') | |
li = [l.split('href="')[1] for l in f.readlines() if '<li>' in l and 'http' in l] | |
qlist = [l.split(">")[1].split('</a')[0] + '\t' + l.split('">')[0] for l in li] | |
shuffle(qlist) |
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
# Here we look if there were any | |
# _MANUAL_OVERRIDE_START_DATE or _MANUAL_OVERRIDE_END_DATE passed | |
# in config, else, it falls back to yesterday | |
# for daily runs. | |
START = "{{dag_run.conf.get('_MANUAL_OVERRIDE_START_DATE', macros.ds_add(ds, -1)) if dag_run.conf else macros.ds_add(ds, -1)}}" | |
END = "{{dag_run.conf.get('_MANUAL_OVERRIDE_END_DATE', ds) if dag_run.conf else ds}}" | |
query = """ | |
select | |
day, |
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
package codeforces.x376; | |
import java.util.Scanner; | |
/** | |
* Created by ysharma on 10/16/16. | |
*/ | |
public class B { | |
public static void main(String[] args) { |
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
package codeforces.x376; | |
import java.util.Scanner; | |
/** | |
* Created by ysharma on 10/16/16. | |
*/ | |
public class A { | |
public static void main(String[] args) { |
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
package main | |
/* Al useful imports */ | |
import ( | |
"bufio" | |
"bytes" | |
"encoding/json" | |
"flag" | |
"fmt" | |
"io/ioutil" |
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
type JsonRequest struct { | |
JsonRequestString string `json:"jsonRequestString"` | |
} | |
type JsonResponse struct { | |
JsonResponseString string `json:"jsonResponseString"` | |
} |
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
package main | |
/* All useful imports */ | |
import ( | |
"flag" | |
"fmt" | |
"net/http" | |
"encoding/json" | |
"go-going/gone/messages" | |
) |
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
package main | |
/* Al useful imports */ | |
import ( | |
"flag" | |
"fmt" | |
"net" | |
"strings" | |
"strconv" | |
"time" |
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
package practice.search; | |
/** | |
* Created by ysharma on 9/18/16. | |
*/ | |
public class BinSearch { | |
public static boolean doIt(int[] arr, int elem){ | |
// return type is boolean .. since we dont have index of elements anyways. we are working on values. | |
int start = arr[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
package practice.search; | |
import java.util.ArrayList; | |
import java.util.Collections; | |
import java.util.List; | |
import java.util.Scanner; | |
/** | |
* Created by ysharma on 8/30/16. | |
*/ |
NewerOlder