Skip to content

Instantly share code, notes, and snippets.

View tecoholic's full-sized avatar

Arunmozhi tecoholic

View GitHub Profile
@tecoholic
tecoholic / test.js
Last active August 29, 2015 14:13
A Sample Snippet showing Unit Testing of JS Libraries using CasperJS
/*
Method 1: By loading the library through a web page.
The usability is pretty limited due to what can be returned through evaluate() is limited.
*/
casper.test.begin("Setting up test", 3, function suite(test){
casper.start("http://localhost/livetransit/test/", function(){
// Asserting pages would help
test.assertTitle("Test page", "page exists as expected");
});
#!/usr/bin/python
#-------------------------------------------------------------------------------
# File: wordint_sort.py
# Author: Arunomzhi P
# Date: Fri 29 May 2015
# Email: [email protected]
# Description: Sort a given line consisting of string and integer while retaining
# the position of string and integer.
# Usage: python wordint_sort.py
###############################################################################
# Filename: marsrover.py
# Author: Arunmozhi
# Email: [email protected]
# Date: 29 May 2015
###############################################################################
import sys
class Rover:
def __init__(self,pos):
###############################################################################
# Filename: marsrover.py
# Author: Arunmozhi
# Email: [email protected]
# Date: 29 May 2015
###############################################################################
import sys
from math import sqrt
class Rover:
language: python
python:
- 2.7
install:
- pip install -r requirements.txt
- nvm install 0.10
- npm install
delivery_id_confirmations = [1,2,3,4,5,6,7,8,9,10,
1,2,3,5,6,7,8,9,10] # 4 missing
def find_unique_id(id_array):
for num in id_array:
if id_array.count(num) == 1:
print "Missing Delivery Man ID: {0}".format(num)
@tecoholic
tecoholic / t1.py
Last active November 26, 2015 17:15
import unittest
import time
import random
a = 8
b = 0
c = 0
d = 0
@tecoholic
tecoholic / app.py
Last active February 25, 2016 18:42
dummy gluuapi to help easily develop the web UI client
from flask import Flask, make_response
from flask_restful import Resource, Api
app = Flask(__name__)
@app.route('/')
def index():
return 'You are using the dummy version of gluu-api'
<?php
session_start();
include("db_con.php");
?>
<html>
<head><title>PHP: Parse and Retrieve Data from XLSX Files | SPYROZONE.NET</title>
<meta charset="utf-8">
<!--<meta http-equiv="X-UA-Compatible" content="IE=edge">-->
<meta name="viewport" content="width=device-width, initial-scale=1">
<!-- jQuery -->