Skip to content

Instantly share code, notes, and snippets.

@mkawserm
mkawserm / cmdfy.cpp
Last active January 23, 2023 23:02
The code demonstrates how to use function pointer to call a method via string using c++
/* Program Name : cmdfy
* Developer : kawser
* Developer Blog: http://blog.kawser.org
* Blog Link: http://blog.kawser.org/2014/02/calling-cpp-function-fly.html
*
*
* Objective : This code demonstrates how to use function pointer
* to call a method via string
*
* IDEA : We will define some functions with similar signature and store these
@mkawserm
mkawserm / uva - 100.py
Created April 5, 2014 09:03
The 3n + 1 problem
#!/usr/bin/env python
"""
Author : kawser
Author blog : http://blog.kawser.org
Problem ID : 100
Time Limit : 3s
/*
Author : kawser
Author blog : http://blog.kawser.org
Problem ID : 100
Time Limit : 3s
OJ Link : http://uva.onlinejudge.org/index.php?option=com_onlinejudge&Itemid=8&page=show_problem&problem=36
*/
@mkawserm
mkawserm / PyDriveMount.py
Last active August 29, 2015 14:00
Mount partition or folder using python on any linux distro
#!/usr/bin/env python3
"""
Object Name : PyDriveMount
Author : kawser
Author Blog : http://blog.kawser.org
Date : 20/04/2014
Time : 1:40 PM
@mkawserm
mkawserm / A01.F90
Last active August 29, 2015 14:01
Solve Linear system using Gaussian elimination with pivot [actually partial pivot] and without pivot [ actually interchange the row with the next non zero row if the diagonal element is 0 ] using FORTRAN 90 /95
!Name : GAUSSIAN ELIMINATION
!Author : KAWSER
!Blog : http://blog.kawser.org
!Created : 15/05/2014 11:23 AM
!Updated : 19/05/2014 10:18 PM
!
!Short URL : http://goo.gl/V0QEg6
!
!Purpose : Solve Linear system using Gaussian elimination with pivot [actually partial pivot]
! and without pivot [actually interchange the row with the next non zero row if the
@mkawserm
mkawserm / Wi-fi Configuration For Raspberry Pi
Created May 16, 2014 03:31
My Raspberry Pi interfaces file contents With wi-fi configuration
auto lo
iface lo inet loopback
#allow-hotplug eth0
#auto eth0
iface eth0 inet static
address 192.168.43.2
network 192.168.43.0
@mkawserm
mkawserm / A02.F90
Last active August 29, 2015 14:01
Solve Tridiagonal Linear Systems using CROUT Factorization using FORTRAN 90/95 [LU FACTORIZATION FOR TRIDIAGONAL SYSTEM]
!Name : LU FACTORIZATION FOR TRIDIAGONAL SYSTEM
!Author : KAWSER
!Blog : http://blog.kawser.org
!Created : 22/05/2014 7:48 AM
!
!Short URL : http://goo.gl/Uu9dNV
!
!Purpose : We'll solve the system using CROUT Factorization
! for Tridiagonal Linear Systems
!
"""SocksiPy - Python SOCKS module.
Version 1.00
Copyright 2006 Dan-Haim. All rights reserved.
Redistribution and use in source and binary forms, with or without modification,
are permitted provided that the following conditions are met:
1. Redistributions of source code must retain the above copyright notice, this
list of conditions and the following disclaimer.
2. Redistributions in binary form must reproduce the above copyright notice,
/*
All code apart from getPlusones()
Copyright 2011 Martin Hawksey
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0

Guide to install PyQt5 on Mac OS X with python 3.4 virtualenv

Description

A simple guide to install PyQt5 on Mac OS X 10.9 (Maverick) and use python 3.4 on a virtualenv.

Requirements

  • xcode 5.1.1
  • python 3.4.0
  • Qt libraries 5.2.1