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
sentence_list=['Tom drinks milk', 'Jack plays cricket', 'Tim ate rice'] | |
tag_list={'Tom':'NP','Tim':'NP','Jack':'NP','drinks':'VF','milk':'NN','plays':'VF','cricket':'NN','ate':'VF','rice':'NN'} | |
tag_list_keys = tag_list.keys() | |
subject_list=[] | |
object_list=[] | |
verb_list=[] | |
def classify(item): | |
if item in tag_list_keys: |
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
#Declare Constants For Score | |
X_SCORE = 3 | |
Y_SCORE = 2 | |
Z_SCORE = 1 | |
compare_list=[0, 1, 2, 3, 4, 5, 6, 7, 8, 10, 14, 16, 17, 18, 19, 20, 21, 22] | |
x=[0, 1, 2, 3, 4, 18, 19, 20, 21, 22] | |
y=[2, 3, 4, 8, 14, 17, 20, 21] | |
z=[5, 1, 6, 3, 7, 10, 16, 21, 22, 2, 8] |
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
var body = {"soap:envelope":{"$":{"xmlns:soap":"http://www.w3.org/2003/05/soap-envelope","xmlns:loc":"http://www.globe.com/warcraft/wsdl/locationmgt/"},"soap:header":[""],"soap:body":[{"loc:getlocationbymsisdn":[{"_":"Optional: Optional: Optional: Optional: Optional: Optional:","csp_txid":["127917398719237"],"cp_id":["10"],"cp_userid":["123"],"cp_password":["akshdkahdk"],"serviceid":["12312313"],"productid":["1243143"],"msisdn":["091234567891"]}]}]}} | |
const { | |
"soap:envelope": { | |
"soap:body": [{ | |
"loc:getlocationbymsisdn": [{ | |
"csp_txid": [txid], | |
"cp_id": [cpid], | |
"cp_userid": [cpuserid], | |
"cp_password": [cppassword], |
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
var game = new Phaser.Game(800, 600, Phaser.AUTO, 'phaser-example', { preload: preload, create: create, update: update, render: render }); | |
function preload() { | |
game.load.image('bullet', 'assets/games/invaders/bullet.png'); | |
game.load.image('enemyBullet', 'assets/games/invaders/enemy-bullet.png'); | |
game.load.spritesheet('invader', 'assets/games/invaders/invader32x32x4.png', 32, 32); | |
game.load.image('ship', 'assets/games/invaders/player.png'); | |
game.load.spritesheet('kaboom', 'assets/games/invaders/explode.png', 128, 128); |
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
def index | |
@purchase_orders = if current_user.admin? then PurchaseOrder.all else current_user.purchase_orders end | |
render_success @purchase_orders, {include: :purchase_entries} | |
end |
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
class Pattern{ | |
public static void main(String args[]){ | |
int count = 0; | |
for(int i = 4;i>=0; i--){ | |
for(int j = 1; j<=i; j++){ | |
System.out.print(count+j); | |
} | |
System.out.println(""); | |
count++; | |
} |
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
[{ | |
"id": 1, | |
"name": "Customer A", | |
"number": 1000, | |
"countries": [ | |
{ | |
"name": "India", | |
"cities": [{ | |
"id": 100, | |
"name": "Goa", |
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
[ | |
{ | |
"label": 1500883688, | |
"value": 0 | |
}, | |
{ | |
"label": 1500883748, | |
"value": 6 | |
}, | |
{ |
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
#!/bin/bash | |
start() { | |
sudo usb_modeswitch -W -I -v 12d1 -p 1446 -M 55534243123456780000000000000011063000000100010000000000000000 | |
sudo ifdown wlan0 | |
sleep 10 | |
while : ; do | |
sudo wvdial | |
sleep 900 | |
done | |
} |
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
#!/bin/bash | |
for sysdevpath in $(find /sys/bus/usb/devices/usb*/ -name dev); do | |
( | |
syspath="${sysdevpath%/dev}" | |
devname="$(udevadm info -q name -p $syspath)" | |
[[ "$devname" == "bus/"* ]] && continue | |
eval "$(udevadm info -q property --export -p $syspath)" | |
[[ -z "$ID_SERIAL" ]] && continue | |
echo "/dev/$devname - $ID_SERIAL" |
NewerOlder