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 / 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++;
}
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 / 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);
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 / 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]
@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: