Skip to content

Instantly share code, notes, and snippets.

/******************************************************************************
*
* Function Name: manualCopy
*
* Description: Manually copies data from memory to memory. This is used by
* sysFastMemCopy to copy a few lingering bytes at the beginning and end.
*
*****************************************************************************/
inline void manualCopy( uint8 *pDest, uint8 *pSrc, uint32 len )
#include "pebble_os.h"
#include "pebble_app.h"
#include "pebble_fonts.h"
#define MY_UUID { 0x39, 0x20, 0xBF, 0x15, 0xE4, 0xDA, 0x4E, 0x77, 0x9C, 0xDB, 0x3E, 0xD1, 0xCB, 0x6F, 0x28, 0xFB }
PBL_APP_INFO(MY_UUID,
"Hello World App", "ElctronicsMadeEasy",
1, 0, /* App version */
DEFAULT_MENU_ICON,
APP_INFO_STANDARD_APP);
%panthgompkins with heart beat detection
% [email protected]
clc;
clear all
close all
x1 = load('ecg3.dat');
y=length(x1);
fs = 200;
N = length (x1);
t = [0:N-1]/fs;
@rkrishnasanka
rkrishnasanka / EC521_GraderTool.py
Last active August 29, 2015 14:06
Prints out corrects , partials and wrongs from the detail string
def parseDetail(line):
corrects = 0
wrongs = 0
partials = 0
for i in range(0,len(line)):
c = line[i]
if c=='+': corrects=corrects+1
if c=='-': wrongs=wrongs+1
@rkrishnasanka
rkrishnasanka / Synflood.py
Created October 18, 2014 19:45
Synflood Implementation
'''
Syn flood program in python using raw sockets (Linux)
Silver Moon ([email protected])
'''
# some imports
import socket, sys
from struct import *
@rkrishnasanka
rkrishnasanka / Packet.cs
Created November 21, 2014 01:59
Generic Packet Class
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
class Packet
{
// ----------------
@rkrishnasanka
rkrishnasanka / pdftoimg.py
Created December 31, 2015 21:58
PDF to IMG Conversion script using imagemagick and wand
from wand.image import Image
# Converting first page into JPG
with Image(filename="/thumbnail.pdf[0]") as img:
img.save(filename="/temp.jpg")
# Resizing this image
with Image(filename="/temp.jpg") as img:
img.resize(200, 150)
img.save(filename="/thumbnail_resize.jpg")
//FFT.cpp
#include<iostream.h>
#include<conio.h>
#include<math.h>
#include<dos.h>
#include<complex.h>
#define pi 3.141592654
void main()
int g1=12;
int g2=11;
int g3=10;
int g4=9;
float mi,x1,x2,pi,w1,w2;
int count1,count2;
void setup(){
Serial.begin(9600);
pi=(22.0/7.0);
import sys
import base64
import struct
key = 'ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAAADQ1IiOUdFSuqJ2l0fhs= root@kali'
# get the second field from the public key file.
keydata = base64.b64decode(
key.split(None)[1])