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
''' | |
Game rules: | |
- You can play as many games until you have cash left in account | |
- In each game you can play 5 turns. | |
- For each turn winner will be announced. | |
- If you have the card 25 or 43, you should throw that card to win | |
- If you win you get 500 Rs. | |
- If you lose, 500 will be deducted from your account. | |
''' | |
import random |
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
State/Union Territory | Constituency Name | |
---|---|---|
Andhra Pradesh | Araku | |
Andhra Pradesh | Srikakulam | |
Andhra Pradesh | Vizianagaram | |
Andhra Pradesh | Visakhapatnam | |
Andhra Pradesh | Anakapalli | |
Andhra Pradesh | Kakinada | |
Andhra Pradesh | Amalapuram | |
Andhra Pradesh | Rajahmundry | |
Andhra Pradesh | Narasapuram |
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
fun getReadingTime(content: String): String { | |
val totalWords = content.trim().split(" ").size | |
// 275 words can be read in a minute. | |
val wordsPerMinute = 275.toDouble() | |
val wordsPerSecond = (wordsPerMinute / 60) | |
val totalReadingTimeSeconds = totalWords / wordsPerSecond | |
val readingTimeMinutes = Math.round(totalReadingTimeSeconds / 60.toDouble()) |
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 cv2 | |
import sys | |
if len(sys.argv) == 1: | |
print "Pic path should be provided as argument" | |
sys.exit(0) | |
# Get input pic name as commad line argument | |
img_name = sys.argv[1] |
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
public class Peacock { | |
public Object getUtility(Context context, Utility utility){ | |
switch(utility){ | |
case TOAST: | |
return ToastUtil.class.cast(new ToastUtil(context)); | |
case ALERT: | |
return AlertUtil.class.cast(new AlertUtil(context)); | |
default: |
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 os | |
import sys | |
def pretty(): | |
print "***************************************************" | |
return | |
base_directory = "/Users/adhithyan-3592/Documents/workspace" | |
template = """import java.util.Scanner; |
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
tell current application | |
do shell script "pmset -g everything | grep Cycles" | |
set status to the result | |
set AC to word 1 of status | |
if AC contains "No" then | |
tell application "Finder" | |
if not (exists file "battery-stats.txt" of desktop) then | |
make new file at desktop with properties {name:"battery-stats.txt"} |