This file contains hidden or 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
/* | |
* foobar - Shubham Chaudhary | |
* Nitul Datt | |
Alice and Bob are being held at Azkaban(Prison). They want to escape and join Dumbledore's Army. Alice wants to tell Bob about the details of the plan but wants to keep their escape plan from Dementors(the guards). So Alice encrypts the message before passing the chits to Bob's cell. However Bob was careless and he disposed the chits in his cell's waste paper bin. The clever Dementor found the chits but couldn't make out what they said. So he hired a computer programmer to decode the message for him. Please help the Dementor to decypher the message.The code key that Alice used for this simple coding is a one for one character substitution based upon a single arithmetic manipulation of the printable portion of the ASCII character set.INPUTThe Encrypted message in a single line. The maximum number of charaters in a message is 100. (DO NOT PRINT ANY PROMPT MESSAGE TO ENTER THE ENCRYPTED MESSAGE.)OUTPUTThe decrypted message in a single line. (Do not print a |
This file contains hidden or 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
/* | |
* foobar - Shubham Chaudhary | |
* Nitul Datt | |
*/ | |
#include <stdio.h> | |
#include <stdlib.h> | |
int fastread() | |
{ | |
unsigned int input; |
This file contains hidden or 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
/* | |
* foobar - Shubham Chaudhary | |
* Nitul Datt | |
Pythagorean Math TestPythagoras is teaching mathematics to a class of N students. He wants to test if his students understood his new theorem. He gives his students the length of the sides of a triangle and they have to tell him if it is a right triangle.InputFirst line an integer N, the number of students. 0<N<=50Next N lines each containing 3 integers a, b and c which are the length of the sides of the triangle. 0<a,b,c. (DO NOT PRINT ANY PROMPT MESSAGE TO READ THE INPUT.)OutputIf the given triangle is right angled print "RIGHT TRIANGLE" in a single line. If the given triangle is not right angled print "NOT RIGHT TRIANGLE" in a single line. (DO NOT PRINT ANY MESSAGE OTHER THAN THE SPECIFIED OUTPUT.)Sample input23 5 43 2 1Sample outputRIGHT TRIANGLENOT RIGHT TRIANGLE | |
*/ | |
#include <stdio.h> | |
#include <math.h> | |
#include <stdlib.h> |
This file contains hidden or 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
/* | |
* foobar - Shubham Chaudhary | |
* Nitul Datt | |
TranslatorIn a country of Neverland there are two types of programmers, People who program using a language X(X people) and people who program using a language Y(Y people). Both are equally good languages but there is no translator that could translate X language to Y and vice versa.Apologists of X and Y can argue for hours proving each other that their programming language is the best one. Y people will tell that their programs are clearer and less prone to errors, while X people will laugh at their inability to instantiate an array of generics or tell them that their programs are slow and have long source code.Another issue that X and Y people could never agree on is identifier naming. In Y a multiword identifier is constructed in the following manner: the first word is written starting from the small letter, and the following ones are written starting from the capital letter, no separators are used. All other letters are small. Examples of a Y identi |
This file contains hidden or 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
/* | |
* Team Fork | |
*/ | |
#include <list> | |
#include <utility> | |
#include <functional> | |
#include<algorithm> //min(), max(), reverse(), sort(), next_permutation(), prev_permutation(), swap() | |
#include<iostream> | |
#include<cassert> //assert() |
This file contains hidden or 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
######################################################################### | |
# | |
# Makefile - This Makefile compiles all c files in given folder | |
# Copyright (c) 2014-2015 Shubham Chaudhary <[email protected]> | |
# | |
######################################################################### | |
#SPECIFIED_SRC_FILE = $(foreach d,$(SPECIFIED_SRC_DIRS),$(wildcard $(addprefix $(d)/*,*.c))) | |
#CC = gcc |
This file contains hidden or 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 bash | |
PACKAGE=com.example.demo | |
ACTIVITY=.MainActivity | |
APK_LOCATION=app/build/outputs/apk/app-debug.apk | |
echo "Package: $PACKAGE" | |
echo "Building the project with tasks: $TASKS" | |
./gradlew $TASKS |
This file contains hidden or 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
tasks.withType(Test) { | |
testLogging { | |
// set options for log level LIFECYCLE | |
events "passed", "skipped", "failed", "standardOut" | |
showExceptions true | |
exceptionFormat "short" | |
showCauses true | |
showStackTraces true |
This file contains hidden or 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 com.peplet.hulkdownloader.app.background.utils; | |
import android.content.Context; | |
import android.content.SharedPreferences; | |
import android.provider.Settings.Secure; | |
import android.support.annotation.NonNull; | |
import android.telephony.TelephonyManager; | |
import java.io.UnsupportedEncodingException; | |
import java.util.UUID; |
This file contains hidden or 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
import numpy as np | |
import pickle | |
def load_and_cache(filename): | |
output = None | |
cache_dir = '/tmp/my_project_cache/' | |
os.makedirs(cache_dir, mode=0o744, exist_ok=True) | |
cache = cache_dir + filename + '.pkl' | |
if not os.path.exists(cache): | |
output = np.genfromtxt(filename, dtype=float, delimiter=',') # TODO: Fill your logic |
OlderNewer