Skip to content

Instantly share code, notes, and snippets.

View wiless's full-sized avatar
💭
I may be slow to respond.

wireless wiless

💭
I may be slow to respond.
View GitHub Profile
@wiless
wiless / testplot.cpp
Last active December 18, 2015 02:29
KPlotWidget test code
#include <QApplication>
#include <QDialog>
#include <QHBoxLayout>
#include <KPlotWidget>
#include <KPlotObject>
#include <KPlotAxis>
#include <KPlotPoint>
#include <itpp/itbase.h>
int main(int argn,char *argc[])
@wiless
wiless / proxyoff
Created April 30, 2014 08:55
Turn on Manual proxy
#!/bin/sh
sed 's/ProxyType=[0-9]/ProxyType=0/' ~/.kde/share/config/kioslaverc > kioslaverc.tmp
mv kioslaverc.tmp ~/.kde/share/config/kioslaverc -f
@wiless
wiless / gocommunication.go
Created June 21, 2014 13:59
A sample code for tx-rx
package main
import (
"fmt"
// "time"
"math/rand"
)
var gcounter int
@wiless
wiless / reflectexample.go
Created June 29, 2014 09:04
Example of using reflect package in golang
package main
import (
"fmt"
"reflect"
)
func main() {
var nano car = car{5}
var donkey animal
@wiless
wiless / knowInterface.go
Last active August 29, 2015 14:03
Simple Interface
package main
import (
"fmt"
"reflect"
)
type Car struct
{
weight float32
}
@wiless
wiless / circuit.go
Last active August 29, 2015 14:04
Sample code for executing link
package main
import (
"bytes"
"encoding/binary"
"flag"
"fmt"
"math/rand"
"net"
"strconv"
@wiless
wiless / qpskber.go
Created November 26, 2014 16:56
QPSK BER simulation in Golang
package main
import (
"fmt"
"math/rand"
"math"
"io/ioutil"
"time"
"flag"
"runtime"
@wiless
wiless / qpskber.cpp
Created November 26, 2014 16:59
QPSK BER in C++
#include <math.h>
#include <complex>
#include <ctime>
#include <stdio.h>
#include <cstdlib>
#include <random>
struct result
{
double snr[20];
double ber[20];
@wiless
wiless / singlecell.go
Created November 27, 2014 19:16
Sample code to calculate rssi in a sample deployment
package main
import (
"fmt"
"github.com/grd/statistics"
"log"
"math/cmplx"
"math/rand"
"time"
"wiless/cellular/antenna"
@wiless
wiless / designer.html
Last active August 29, 2015 14:10
designer
<link rel="import" href="../cool-clock/cool-clock.html">
<link rel="import" href="../google-map/google-map.html">
<link rel="import" href="../smoothie-chart/smoothie-chart.html">
<polymer-element name="my-element">
<template>
<style>
:host {
position: absolute;