Skip to content

Instantly share code, notes, and snippets.

View boseji's full-sized avatar
💭
Accelerating dreams into infinity.

Abhijit Bose boseji

💭
Accelerating dreams into infinity.
View GitHub Profile
@boseji
boseji / blink-EM1.c
Created November 23, 2012 15:47
EFM32 in Energy Mode EM1 for Blinking LEDs using TIMER0
@boseji
boseji / antconf.bat
Last active December 27, 2015 07:29
Ant Build Setup Scripts for windows
@ECHO OFF
@REM SET JAVA_PATH= set your JDK install path here - not the bin directory
@REM SET ANT_PATH= set your Ant extracted path here - not the bin directory
@SET JAVA_HOME=%JAVA_PATH%
@SET ANT_HOME=%ANT_PATH%
@SET PATH=%JAVA_PATH%\bin;%ANT_PATH%\bin;%PATH%
@CLS
@ECHO ANT Build Environment Setup Done
@boseji
boseji / antconf.sh
Last active December 27, 2015 07:29
ANT Build Scripts for Linux
#!/bin/sh
set +v
#export JAVA_PATH= set your JDK install path here - not the bin directory
#export ANT_PATH= set your Ant extracted path here - not the bin directory
export JAVA_HOME=$JAVA_PATH
export ANT_HOME=$ANT_PATH
export PATH=$JAVA_PATH/bin:$ANT_PATH/bin:$PATH
clear
echo ANT Build Environment Setup Done
@boseji
boseji / build.xml
Created November 3, 2013 11:43
Basic Framework of ANT Build Script
<?xml version="1.0" encoding="UTF-8"?>
<project basedir="." default="compile" name="jNeelSer">
</project>
@boseji
boseji / build.xml
Last active December 27, 2015 07:29
jNeelSerial Ant Build Script
<?xml version="1.0" encoding="UTF-8"?>
<!--
jNeelSerial Build Script
........................
@copy © Abhijit Bose , A.D.H.A.R Labs Research Bharat(India), 2013.
jNeelSerial is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
@boseji
boseji / sqr_1ch_random.py
Created November 4, 2013 00:27
Python code for Raspberry Pi to generate Pulse train on GPIO 7 pin 26 of P1
#!/usr/bin/python
#######
# This program would generate Squence pulse train on GPIO 7 Pin 26 of P1
#######
import RPi.GPIO as GPIO
from time import sleep
import sys
import signal
def signal_handler(signal, frame):
@boseji
boseji / sqr_1ch_1k_50p.py
Created November 4, 2013 00:30
Python code for Raspberry Pi to generate a square wave of 50% duty cycle on GPIO7 pin 26 of P1 with 1kHz frequency
#!/usr/bin/python
#######
# This program would generate PWM on GPIO 7 Pin 26 of P1
# with 50% Dutycyle at 1kHz
#######
import RPi.GPIO as GPIO
from time import sleep
GPIO.setmode(GPIO.BCM)
GPIO.setup(7,GPIO.OUT)
@boseji
boseji / sqr_1ch_1k_20p.py
Created November 4, 2013 00:32
Python code for Raspberry Pi to generate square wave at 20% duty cycle at GPIO7 pin 26 of P1 with 1kHz frequency
#!/usr/bin/python
#####
# This program would generate PWM on GPIO7 Pin 26 of P1
# with 20% Duty Cycle at 1kHz
######
import RPi.GPIO as GPIO
from time import sleep
GPIO.setmode(GPIO.BCM)
GPIO.setup(7,GPIO.OUT)
@boseji
boseji / runner.py
Created February 24, 2014 04:54
Runner function for executing Python scripts from inside a Python script
import os,sys,importlib
from os import path
def Runner(sRootPath):
''' Runs all the scripts in lower directories
@param sRootPath Specifies the Path from which Script Running should start
@return None
'''
try:
for root, dirs, files in os.walk(sRootPath):
#bypass dir with _ and __ , Process only if some files
@boseji
boseji / runscript.py
Created February 24, 2014 05:00
Run Script to actually execute a Python script from inside a Python File
import os,sys,importlib
from os import path
def RunScript(sPath,sFile,bDirect=2):
''' Run a Python Script via differenct Methods
@param sPath Sting containing Only the
Absolute Path of the File to Execute
@param sFile String containing Only the File Name to Execute
@param bDirect Flag indicates how to run the Script
0 = Run using Exec Technique
1 = Run directly in Shell