Skip to content

Instantly share code, notes, and snippets.

View Valindo's full-sized avatar

Valindo Fiell Godinho Valindo

  • India
View GitHub Profile
@Valindo
Valindo / main.py
Created March 5, 2019 05:59
Sheryl
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:
@Valindo
Valindo / index.py
Last active February 24, 2019 11:13
Score items in an array based on presence in other arrays
#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]
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],
@Valindo
Valindo / invaders.js
Created July 14, 2018 10:33
Space Invaders Examples from Phaser.io
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);
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
@Valindo
Valindo / pattern.java
Created September 5, 2017 07:37
pattern.java
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++;
}
[{
"id": 1,
"name": "Customer A",
"number": 1000,
"countries": [
{
"name": "India",
"cities": [{
"id": 100,
"name": "Goa",
[
{
"label": 1500883688,
"value": 0
},
{
"label": 1500883748,
"value": 6
},
{
#!/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
}
#!/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"