Skip to content

Instantly share code, notes, and snippets.

View pbamotra's full-sized avatar
🎯
Focusing

Pankesh Bamotra pbamotra

🎯
Focusing
View GitHub Profile
@JSONOrona
JSONOrona / parser.py
Last active January 4, 2021 16:37
Python command line argument example using argparse module
#!/usr/bin/python
''' Python command line argument example using argparse module
Example output:
./parser.py --server=pyserver --port=8080,443,25,22,21 --keyword=pyisgood
Server name: [ pyserver ]
@bmurphy1
bmurphy1 / form-validator.js
Last active August 29, 2015 13:56 — forked from ksolo/form-validator.js
Form Validation
// shorthand for $(document).ready();
$(function(){
$("button").on("click", function(e) {
var email = $("input:text").val();
var pass = $("input:password").val();
var errors = 0;
if (!validateEmail(email)) { console.log("Must be valid email address"); errors++; }
if (pass.length < 8) { console.log("Password must be at least 8 characters"); errors++; }
if (!validatePassCapitals()) { console.log("Password must have at least one capital character"); errors++; }
if (!validatePassDigits()) { console.log("Password must have at least one digit (0-9)"); errors++;}
@Alos
Alos / Dog.java
Last active August 29, 2015 13:56
Filter list in Java using Google Guava
package com.alos;
public class Dog {
private String name;
public Dog(String aName) {
this.name = aName;
}
public String getName() {
@speric
speric / gist:6096965
Created July 28, 2013 01:20
vimtutor Lesson Summaries
Lesson 1 SUMMARY
1. The cursor is moved using either the arrow keys or the hjkl keys.
h (left) j (down) k (up) l (right)
2. To start Vim from the shell prompt type: vim FILENAME <ENTER>
3. To exit Vim type: <ESC> :q! <ENTER> to trash all changes.
OR type: <ESC> :wq <ENTER> to save the changes.
@dacamo76
dacamo76 / README.md
Last active September 26, 2017 21:49
Installing scikit-learn on Amazon Linux AMI on EC2

To install scikit-learn easily run the following command.

curl https://gist.githubusercontent.com/dacamo76/4780765/raw/c3779996d8f6b13caaaa48d33aa1585684c7f8e6/scikit-learn-install.sh | sh

Please look over the shell file being run to make sure no evil is done to your machine.

@entaroadun
entaroadun / gist:1653794
Created January 21, 2012 20:10
Recommendation and Ratings Public Data Sets For Machine Learning

Movies Recommendation:

Music Recommendation: