text:
package app

import (
	"fmt"
	"github.com/madflojo/tarmac"
	"github.com/pquerna/ffjson/ffjson"
	"github.com/prometheus/client_golang/prometheus"
	"github.com/prometheus/client_golang/prometheus/promauto"
	"regexp"
	"sync"
)

// metricsCallback stores and manages the user-defined metrics created via
// WASM function callbacks.
type metricsCallback struct {
	sync.Mutex
	// all contains a map of all custom defined metrics
	all map[string]string

	// counters holds a map of existing custom counters
	counters map[string]prometheus.Counter

	// gauges holds a map of existing custom gauges
	gauges map[string]prometheus.Gauge

	// histograms holds a map of existing custom summaries
	histograms map[string]prometheus.Summary
}

// ErrInvalidMetricName is an error returned when the user supplies an
// invalid formatted metric name.
var ErrInvalidMetricName = fmt.Errorf("invalid metric name")

// isMetricNameValid is a regex used to validate metric names.
var isMetricNameValid = regexp.MustCompile(`^[a-zA-Z0-9_:][a-zA-Z0-9_:]*$`)

// NewMetricsCallback will create a new instance of metrics enabling users to
// collect custom metrics.
func NewMetricsCallback() *metricsCallback {
	m := &metricsCallback{}
	m.all = make(map[string]string)
	m.counters = make(map[string]prometheus.Counter)
	m.gauges = make(map[string]prometheus.Gauge)
	m.histograms = make(map[string]prometheus.Summary)
	return m
}

// Counter will create and increment a counter metric. The expected input for
// this function is a MetricsCounter JSON.
func (m *metricsCallback) Counter(b []byte) ([]byte, error) {
	// Parse incoming Request
	var rq tarmac.MetricsCounter
	err := ffjson.Unmarshal(b, &rq)
	if err != nil {
		return []byte(""), fmt.Errorf("unable to parse input JSON - %s", err)
	}

	// Verify Name Value
	if !isMetricNameValid.MatchString(rq.Name) {
		return []byte(""), ErrInvalidMetricName
	}

	// Map Safety
	m.Lock()
	defer m.Unlock()

	// Check if counter already exists, if not create one
	_, ok := m.counters[rq.Name]
	if !ok {
		// Check if name is already used
		_, ok2 := m.all[rq.Name]
		if ok2 {
			return []byte(""), fmt.Errorf("metric name in use")
		}
		m.counters[rq.Name] = promauto.NewCounter(prometheus.CounterOpts{
			Name: rq.Name,
		})
		m.all[rq.Name] = "counter"
	}

	// Perform action
	m.counters[rq.Name].Inc()
	return []byte(""), nil
}

// Guage will create a gauge metric and either increment or decrement the value
// based on the provided input. The expected input for this function is a
// MetricsGauge JSON.
func (m *metricsCallback) Gauge(b []byte) ([]byte, error) {
	// Parse incoming Request
	var rq tarmac.MetricsGauge
	err := ffjson.Unmarshal(b, &rq)
	if err != nil {
		return []byte(""), fmt.Errorf("unable to parse input JSON - %s", err)
	}

	// Verify Name Value
	if !isMetricNameValid.MatchString(rq.Name) {
		return []byte(""), ErrInvalidMetricName
	}

	// Map Safety
	m.Lock()
	defer m.Unlock()

	// Check if gauge already exists, if not create one
	_, ok := m.gauges[rq.Name]
	if !ok {
		// Check if name is already used
		_, ok2 := m.all[rq.Name]
		if ok2 {
			return []byte(""), fmt.Errorf("metric name in use")
		}
		m.gauges[rq.Name] = promauto.NewGauge(prometheus.GaugeOpts{
			Name: rq.Name,
		})
		m.all[rq.Name] = "gauge"
	}

	// Perform action
	switch rq.Action {
	case "inc":
		m.gauges[rq.Name].Inc()
	case "dec":
		m.gauges[rq.Name].Dec()
	default:
		return []byte(""), fmt.Errorf("invalid action")
	}

	return []byte(""), nil
}

// Histogram will create a histogram or summary metric and observe the
// provided values. The expected input for this function is a
// MetricsHistogram JSON.
func (m *metricsCallback) Histogram(b []byte) ([]byte, error) {
	// Parse incoming Request
	var rq tarmac.MetricsHistogram
	err := ffjson.Unmarshal(b, &rq)
	if err != nil {
		return []byte(""), fmt.Errorf("unable to parse input JSON - %s", err)
	}

	// Verify Name Value
	if !isMetricNameValid.MatchString(rq.Name) {
		return []byte(""), ErrInvalidMetricName
	}

	// Map Safety
	m.Lock()
	defer m.Unlock()

	// Check if histogram already exists, if not create one
	_, ok := m.histograms[rq.Name]
	if !ok {
		// Check if name is already used
		_, ok2 := m.all[rq.Name]
		if ok2 {
			return []byte(""), fmt.Errorf("metric name in use")
		}
		m.histograms[rq.Name] = promauto.NewSummary(prometheus.SummaryOpts{
			Name:       rq.Name,
			Objectives: map[float64]float64{0.5: 0.05, 0.9: 0.01, 0.99: 0.001},
		})
		m.all[rq.Name] = "histogram"
	}

	// Perform action
	m.histograms[rq.Name].Observe(rq.Value)

	return []byte(""), nil
}

repository: TrendingTechnology/tarmac

repo_name: TrendingTechnology/tarmac


text:
#include <cmath>
#include <matplot/matplot.h>

int main() {
    using namespace matplot;

    auto funx = [](double s, double) { return sin(s); };
    auto funy = [](double s, double) { return cos(s); };
    auto funz = [](double s, double t) { return t / 10 * sin(1. / s); };

    tiledlayout(2, 1);
    nexttile();
    fsurf(funx, funy, funz, std::array<double, 2>{-5, +5}, "", 20);
    view(-172, 25);
    title("Decreased Mesh Density");

    nexttile();
    fsurf(funx, funy, funz, std::array<double, 2>{-5, +5}, "", 80);
    view(-172, 25);
    title("Increased Mesh Density");

    show();
    return 0;
}

license: MIT

repository: alandefreitas/matplotplusplus

license_type: permissive

repo_name: alandefreitas/matplotplusplus

branch_name: refs/heads/master

gha_license_id: MIT

extension: cpp


text:
<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE eagle SYSTEM "eagle.dtd">
<eagle version="9.1.0">
<drawing>
<settings>
<setting alwaysvectorfont="no"/>
<setting keepoldvectorfont="yes"/>
<setting verticaltext="up"/>
</settings>
<grid distance="50" unitdist="mil" unit="mil" style="lines" multiple="1" display="no" altdistance="5" altunitdist="mil" altunit="mil"/>
<layers>
<layer number="1" name="Top" color="5" fill="1" visible="yes" active="yes"/>
<layer number="2" name="Route2" color="1" fill="3" visible="no" active="yes"/>
<layer number="15" name="Route15" color="4" fill="6" visible="no" active="yes"/>
<layer number="16" name="Bottom" color="35" fill="4" visible="yes" active="yes"/>
<layer number="17" name="Pads" color="2" fill="1" visible="yes" active="yes"/>
<layer number="18" name="Vias" color="2" fill="1" visible="yes" active="yes"/>
<layer number="19" name="Unrouted" color="6" fill="1" visible="yes" active="yes"/>
<layer number="20" name="Dimension" color="15" fill="1" visible="yes" active="yes"/>
<layer number="21" name="tPlace" color="7" fill="1" visible="yes" active="yes"/>
<layer number="22" name="bPlace" color="7" fill="1" visible="yes" active="yes"/>
<layer number="23" name="tOrigins" color="15" fill="1" visible="yes" active="yes"/>
<layer number="24" name="bOrigins" color="15" fill="1" visible="yes" active="yes"/>
<layer number="25" name="tNames" color="7" fill="1" visible="yes" active="yes"/>
<layer number="26" name="bNames" color="7" fill="1" visible="yes" active="yes"/>
<layer number="27" name="tValues" color="7" fill="1" visible="no" active="yes"/>
<layer number="28" name="bValues" color="7" fill="1" visible="yes" active="yes"/>
<layer number="29" name="tStop" color="7" fill="3" visible="no" active="yes"/>
<layer number="30" name="bStop" color="7" fill="6" visible="no" active="yes"/>
<layer number="31" name="tCream" color="7" fill="4" visible="no" active="yes"/>
<layer number="32" name="bCream" color="7" fill="5" visible="no" active="yes"/>
<layer number="33" name="tFinish" color="6" fill="3" visible="no" active="yes"/>
<layer number="34" name="bFinish" color="6" fill="6" visible="no" active="yes"/>
<layer number="35" name="tGlue" color="7" fill="4" visible="no" active="yes"/>
<layer number="36" name="bGlue" color="7" fill="5" visible="no" active="yes"/>
<layer number="37" name="tTest" color="7" fill="1" visible="no" active="yes"/>
<layer number="38" name="bTest" color="7" fill="1" visible="no" active="yes"/>
<layer number="39" name="tKeepout" color="4" fill="11" visible="yes" active="yes"/>
<layer number="40" name="bKeepout" color="1" fill="11" visible="yes" active="yes"/>
<layer number="41" name="tRestrict" color="4" fill="10" visible="yes" active="yes"/>
<layer number="42" name="bRestrict" color="1" fill="10" visible="yes" active="yes"/>
<layer number="43" name="vRestrict" color="2" fill="10" visible="yes" active="yes"/>
<layer number="44" name="Drills" color="7" fill="1" visible="no" active="yes"/>
<layer number="45" name="Holes" color="7" fill="1" visible="yes" active="yes"/>
<layer number="46" name="Milling" color="3" fill="1" visible="no" active="yes"/>
<layer number="47" name="Measures" color="7" fill="1" visible="no" active="yes"/>
<layer number="48" name="Document" color="7" fill="1" visible="yes" active="yes"/>
<layer number="49" name="Reference" color="7" fill="1" visible="yes" active="yes"/>
<layer number="50" name="dxf" color="7" fill="1" visible="no" active="no"/>
<layer number="51" name="tDocu" color="38" fill="0" visible="yes" active="yes"/>
<layer number="52" name="bDocu" color="7" fill="1" visible="yes" active="yes"/>
<layer number="53" name="tGND_GNDA" color="7" fill="1" visible="no" active="no"/>
<layer number="54" name="bGND_GNDA" color="7" fill="1" visible="no" active="no"/>
<layer number="56" name="wert" color="7" fill="1" visible="no" active="no"/>
<layer number="57" name="tCAD" color="7" fill="1" visible="no" active="no"/>
<layer number="59" name="tCarbon" color="7" fill="1" visible="no" active="no"/>
<layer number="60" name="bCarbon" color="7" fill="1" visible="no" active="no"/>
<layer number="88" name="SimResults" color="9" fill="1" visible="no" active="no"/>
<layer number="89" name="SimProbes" color="9" fill="1" visible="no" active="no"/>
<layer number="90" name="Modules" color="5" fill="1" visible="no" active="no"/>
<layer number="91" name="Nets" color="2" fill="1" visible="no" active="no"/>
<layer number="92" name="Busses" color="1" fill="1" visible="no" active="no"/>
<layer number="93" name="Pins" color="2" fill="1" visible="no" active="no"/>
<layer number="94" name="Symbols" color="4" fill="1" visible="no" active="no"/>
<layer number="95" name="Names" color="7" fill="1" visible="no" active="no"/>
<layer number="96" name="Values" color="7" fill="1" visible="no" active="no"/>
<layer number="97" name="Info" color="7" fill="1" visible="no" active="no"/>
<layer number="98" name="Guide" color="6" fill="1" visible="no" active="no"/>
<layer number="99" name="SpiceOrder" color="7" fill="1" visible="no" active="no"/>
<layer number="100" name="NonViaHole" color="7" fill="1" visible="yes" active="yes"/>
<layer number="101" name="PlacementGuide" color="7" fill="1" visible="yes" active="yes"/>
<layer number="102" name="TopSilkscreen" color="7" fill="1" visible="yes" active="yes"/>
<layer number="103" name="not_populated" color="7" fill="1" visible="yes" active="yes"/>
<layer number="104" name="BottomSilkscreen" color="7" fill="1" visible="yes" active="yes"/>
<layer number="105" name="tPlate" color="7" fill="1" visible="yes" active="yes"/>
<layer number="106" name="bPlate" color="7" fill="1" visible="yes" active="yes"/>
<layer number="107" name="Crop" color="7" fill="1" visible="yes" active="yes"/>
<layer number="108" name="fp8" color="7" fill="1" visible="no" active="yes"/>
<layer number="109" name="fp9" color="7" fill="1" visible="no" active="yes"/>
<layer number="110" name="fp0" color="7" fill="1" visible="no" active="yes"/>
<layer number="111" name="LPC17xx" color="7" fill="1" visible="no" active="yes"/>
<layer number="112" name="tSilk" color="7" fill="1" visible="no" active="yes"/>
<layer number="113" name="ReferenceLS" color="7" fill="1" visible="no" active="no"/>
<layer number="114" name="Badge_Outline" color="7" fill="1" visible="yes" active="yes"/>
<layer number="115" name="ReferenceISLANDS" color="7" fill="1" visible="yes" active="yes"/>
<layer number="116" name="Patch_BOT" color="7" fill="1" visible="yes" active="yes"/>
<layer number="117" name="BACKMAAT1" color="7" fill="1" visible="no" active="no"/>
<layer number="118" name="Rect_Pads" color="7" fill="1" visible="no" active="no"/>
<layer number="119" name="KAP_TEKEN" color="7" fill="1" visible="no" active="no"/>
<layer number="120" name="KAP_MAAT1" color="7" fill="1" visible="no" active="no"/>
<layer number="121" name="_tsilk" color="7" fill="1" visible="yes" active="yes"/>
<layer number="122" name="_bsilk" color="7" fill="1" visible="yes" active="yes"/>
<layer number="123" name="tTestmark" color="7" fill="1" visible="no" active="yes"/>
<layer number="124" name="bTestmark" color="7" fill="1" visible="no" active="yes"/>
<layer number="125" name="_tNames" color="7" fill="1" visible="yes" active="yes"/>
<layer number="126" name="_bNames" color="7" fill="1" visible="no" active="yes"/>
<layer number="127" name="_tValues" color="7" fill="1" visible="no" active="yes"/>
<layer number="128" name="_bValues" color="7" fill="1" visible="no" active="yes"/>
<layer number="129" name="Mask" color="7" fill="1" visible="yes" active="yes"/>
<layer number="130" name="SMDSTROOK" color="7" fill="1" visible="no" active="no"/>
<layer number="131" name="tAdjust" color="7" fill="1" visible="no" active="yes"/>
<layer number="132" name="bAdjust" color="7" fill="1" visible="no" active="yes"/>
<layer number="133" name="bottom_silk" color="7" fill="1" visible="no" active="yes"/>
<layer number="134" name="silk_top" color="7" fill="1" visible="no" active="no"/>
<layer number="135" name="silk_bottom" color="7" fill="1" visible="no" active="no"/>
<layer number="136" name="silktop" color="7" fill="1" visible="no" active="yes"/>
<layer number="137" name="silkbottom" color="7" fill="1" visible="no" active="yes"/>
<layer number="138" name="mbTest" color="7" fill="1" visible="yes" active="yes"/>
<layer number="139" name="mtKeepout" color="7" fill="1" visible="yes" active="yes"/>
<layer number="140" name="mbKeepout" color="7" fill="1" visible="yes" active="yes"/>
<layer number="141" name="mtRestrict" color="7" fill="1" visible="yes" active="yes"/>
<layer number="142" name="mbRestrict" color="7" fill="1" visible="yes" active="yes"/>
<layer number="143" name="mvRestrict" color="7" fill="1" visible="yes" active="yes"/>
<layer number="144" name="Drill_legend" color="7" fill="1" visible="yes" active="yes"/>
<layer number="145" name="DrillLegend_01-16" color="7" fill="1" visible="no" active="yes"/>
<layer number="146" name="DrillLegend_01-20" color="7" fill="1" visible="no" active="yes"/>
<layer number="147" name="mMeasures" color="7" fill="1" visible="yes" active="yes"/>
<layer number="148" name="mDocument" color="7" fill="1" visible="yes" active="yes"/>
<layer number="149" name="mReference" color="7" fill="1" visible="yes" active="yes"/>
<layer number="150" name="Notes" color="7" fill="1" visible="no" active="yes"/>
<layer number="151" name="HeatSink" color="7" fill="1" visible="yes" active="yes"/>
<layer number="152" name="_bDocu" color="7" fill="1" visible="no" active="yes"/>
<layer number="153" name="FabDoc1" color="6" fill="1" visible="no" active="no"/>
<layer number="154" name="FabDoc2" color="2" fill="1" visible="no" active="no"/>
<layer number="155" name="FabDoc3" color="7" fill="15" visible="no" active="no"/>
<layer number="166" name="AntennaArea" color="7" fill="1" visible="no" active="yes"/>
<layer number="168" name="4mmHeightArea" color="7" fill="1" visible="no" active="yes"/>
<layer number="191" name="mNets" color="7" fill="1" visible="yes" active="yes"/>
<layer number="192" name="mBusses" color="7" fill="1" visible="yes" active="yes"/>
<layer number="193" name="mPins" color="7" fill="1" visible="yes" active="yes"/>
<layer number="194" name="mSymbols" color="7" fill="1" visible="yes" active="yes"/>
<layer number="195" name="mNames" color="7" fill="1" visible="yes" active="yes"/>
<layer number="196" name="mValues" color="7" fill="1" visible="yes" active="yes"/>
<layer number="199" name="Contour" color="7" fill="1" visible="no" active="yes"/>
<layer number="200" name="200bmp" color="7" fill="1" visible="yes" active="yes"/>
<layer number="201" name="201bmp" color="7" fill="1" visible="yes" active="yes"/>
<layer number="202" name="202bmp" color="7" fill="1" visible="yes" active="yes"/>
<layer number="203" name="203bmp" color="7" fill="1" visible="yes" active="yes"/>
<layer number="204" name="204bmp" color="7" fill="1" visible="yes" active="yes"/>
<layer number="205" name="205bmp" color="7" fill="1" visible="yes" active="yes"/>
<layer number="206" name="206bmp" color="7" fill="1" visible="yes" active="yes"/>
<layer number="207" name="207bmp" color="7" fill="1" visible="yes" active="yes"/>
<layer number="208" name="208bmp" color="7" fill="1" visible="yes" active="yes"/>
<layer number="209" name="209bmp" color="7" fill="1" visible="yes" active="yes"/>
<layer number="210" name="210bmp" color="7" fill="1" visible="yes" active="yes"/>
<layer number="211" name="211bmp" color="7" fill="1" visible="yes" active="yes"/>
<layer number="212" name="212bmp" color="7" fill="1" visible="yes" active="yes"/>
<layer number="213" name="213bmp" color="7" fill="1" visible="yes" active="yes"/>
<layer number="214" name="214bmp" color="7" fill="1" visible="yes" active="yes"/>
<layer number="215" name="215bmp" color="7" fill="1" visible="yes" active="yes"/>
<layer number="216" name="216bmp" color="7" fill="1" visible="yes" active="yes"/>
<layer number="217" name="217bmp" color="7" fill="1" visible="yes" active="yes"/>
<layer number="218" name="218bmp" color="7" fill="1" visible="yes" active="yes"/>
<layer number="219" name="219bmp" color="7" fill="1" visible="yes" active="yes"/>
<layer number="220" name="220bmp" color="7" fill="1" visible="yes" active="yes"/>
<layer number="221" name="221bmp" color="7" fill="1" visible="yes" active="yes"/>
<layer number="222" name="222bmp" color="7" fill="1" visible="yes" active="yes"/>
<layer number="223" name="223bmp" color="7" fill="1" visible="yes" active="yes"/>
<layer number="224" name="224bmp" color="7" fill="1" visible="yes" active="yes"/>
<layer number="225" name="225bmp" color="7" fill="1" visible="yes" active="yes"/>
<layer number="226" name="226bmp" color="7" fill="1" visible="yes" active="yes"/>
<layer number="227" name="227bmp" color="7" fill="1" visible="yes" active="yes"/>
<layer number="228" name="228bmp" color="7" fill="1" visible="yes" active="yes"/>
<layer number="229" name="229bmp" color="7" fill="1" visible="yes" active="yes"/>
<layer number="230" name="230bmp" color="7" fill="1" visible="yes" active="yes"/>
<layer number="231" name="Eagle3D_PG1" color="7" fill="1" visible="no" active="no"/>
<layer number="232" name="Eagle3D_PG2" color="7" fill="1" visible="no" active="no"/>
<layer number="233" name="Eagle3D_PG3" color="7" fill="1" visible="no" active="no"/>
<layer number="248" name="Housing" color="7" fill="1" visible="no" active="yes"/>
<layer number="249" name="Edge" color="7" fill="1" visible="no" active="yes"/>
<layer number="250" name="Descript" color="7" fill="1" visible="yes" active="yes"/>
<layer number="251" name="SMDround" color="7" fill="1" visible="yes" active="yes"/>
<layer number="254" name="cooling" color="7" fill="1" visible="yes" active="yes"/>
<layer number="255" name="routoute" color="7" fill="1" visible="yes" active="yes"/>
</layers>
<board>
<plain>
<wire x1="0.0635" y1="0.122" x2="28.561" y2="0.122" width="0" layer="20"/>
<wire x1="28.561" y1="0.122" x2="28.561" y2="25.5018" width="0" layer="20"/>
<wire x1="28.561" y1="25.5018" x2="0.0635" y2="25.5018" width="0" layer="20"/>
<wire x1="0.0635" y1="25.5018" x2="0.0635" y2="0.122" width="0" layer="20"/>
<text x="1.0723375" y="8.293128125" size="0.6096" layer="21" font="vector" ratio="20" rot="R90" align="bottom-center">SDI</text>
<text x="1.0723375" y="5.753128125" size="0.6096" layer="21" font="vector" ratio="20" rot="R90" align="bottom-center">CS</text>
<text x="1.0723375" y="3.35633125" size="0.6096" layer="21" font="vector" ratio="20" rot="R90" align="bottom-center">SCLK</text>
<text x="1.0723375" y="10.943925" size="0.6096" layer="21" font="vector" ratio="20" rot="R90" align="bottom-center">3.3v</text>
<text x="27.593509375" y="3.323925" size="0.6096" layer="21" font="vector" ratio="20" rot="R90" align="top-center">GND</text>
<text x="0.61001875" y="24.914525" size="0.8128" layer="21" font="vector" ratio="16" align="top-left">INNOCOMM
SIGFOX
BREAKOUT</text>
<text x="14.252109375" y="0.88805" size="0.6096" layer="21" font="vector" ratio="16" rot="R180" align="top-center">LUPPY@APPKAKI.COM</text>
<text x="0.660390625" y="21.154934375" size="0.6096" layer="21" font="vector" ratio="16" rot="R180" align="bottom-right">REV A</text>
<text x="27.593509375" y="10.816925" size="0.6096" layer="21" font="vector" ratio="20" rot="R90" align="top-center">AK</text>
<text x="27.593509375" y="9.292925" size="0.6096" layer="21" font="vector" ratio="20" rot="R90" align="top-right">RST</text>
<text x="27.593509375" y="5.990925" size="0.6096" layer="21" font="vector" ratio="20" rot="R90" align="top-center">SDO</text>
<dimension x1="8.001" y1="-4.064" x2="23.241" y2="-4.064" x3="15.621" y3="-6.35" textsize="0.5" layer="51" width="0.05"/>
<dimension x1="5.461" y1="-4.953" x2="23.241" y2="-4.953" x3="14.351" y3="-5.588" textsize="0.5" layer="51" width="0.05"/>
<dimension x1="5.461" y1="-5.588" x2="25.781" y2="-5.588" x3="15.621" y3="-4.699" textsize="0.5" layer="51" width="0.05"/>
<dimension x1="2.921" y1="-6.096" x2="25.781" y2="-6.096" x3="14.351" y3="-3.937" textsize="0.5" layer="51" width="0.05"/>
<rectangle x1="2.921" y1="3.302" x2="25.781" y2="10.922" layer="51"/>
<dimension x1="2.921" y1="3.302" x2="25.781" y2="3.302" x3="14.351" y3="-2.159" textsize="0.5" layer="51" width="0.05"/>
<dimension x1="0.0635" y1="0.122" x2="28.561" y2="0.122" x3="14.31225" y3="-8.89" textsize="1" layer="51"/>
<dimension x1="0.0635" y1="25.5018" x2="0.0635" y2="0.122" x3="-1.27" y3="12.8119" textsize="1" layer="51"/>
</plain>
<libraries>
<library name="SparkFun-Connectors">
<description>
SparkFun Connectors

This library contains electrically-functional connectors.

We've spent an enormous amount of time creating and checking these footprints and parts, but it is  the end user's responsibility to ensure correctness and suitablity for a given componet or application.

If you enjoy using this library, please buy one of our products at SparkFun.com.

Licensing: Creative Commons ShareAlike 4.0 International - https://creativecommons.org/licenses/by-sa/4.0/

You are welcome to use this library for commercial purposes. For attribution, we ask that when you begin to sell your device using our footprint, you email us with a link to the product being sold. We want bragging rights that we helped (in a very small part) to create your 8th world wonder. We would like the opportunity to feature your device on our homepage.</description>
<packages>
<package name="1X04">
<description>
Plated Through Hole - 4 Pin

Specifications:

Pin count:4

Pin pitch:0.1"

Example device(s):

CONN_04

</description>
<wire x1="6.985" y1="1.27" x2="8.255" y2="1.27" width="0.2032" layer="21"/>
<wire x1="8.255" y1="1.27" x2="8.89" y2="0.635" width="0.2032" layer="21"/>
<wire x1="8.89" y1="-0.635" x2="8.255" y2="-1.27" width="0.2032" layer="21"/>
<wire x1="3.81" y1="0.635" x2="4.445" y2="1.27" width="0.2032" layer="21"/>
<wire x1="4.445" y1="1.27" x2="5.715" y2="1.27" width="0.2032" layer="21"/>
<wire x1="5.715" y1="1.27" x2="6.35" y2="0.635" width="0.2032" layer="21"/>
<wire x1="6.35" y1="-0.635" x2="5.715" y2="-1.27" width="0.2032" layer="21"/>
<wire x1="5.715" y1="-1.27" x2="4.445" y2="-1.27" width="0.2032" layer="21"/>
<wire x1="4.445" y1="-1.27" x2="3.81" y2="-0.635" width="0.2032" layer="21"/>
<wire x1="6.985" y1="1.27" x2="6.35" y2="0.635" width="0.2032" layer="21"/>
<wire x1="6.35" y1="-0.635" x2="6.985" y2="-1.27" width="0.2032" layer="21"/>
<wire x1="8.255" y1="-1.27" x2="6.985" y2="-1.27" width="0.2032" layer="21"/>
<wire x1="-0.635" y1="1.27" x2="0.635" y2="1.27" width="0.2032" layer="21"/>
<wire x1="0.635" y1="1.27" x2="1.27" y2="0.635" width="0.2032" layer="21"/>
<wire x1="1.27" y1="-0.635" x2="0.635" y2="-1.27" width="0.2032" layer="21"/>
<wire x1="1.27" y1="0.635" x2="1.905" y2="1.27" width="0.2032" layer="21"/>
<wire x1="1.905" y1="1.27" x2="3.175" y2="1.27" width="0.2032" layer="21"/>
<wire x1="3.175" y1="1.27" x2="3.81" y2="0.635" width="0.2032" layer="21"/>
<wire x1="3.81" y1="-0.635" x2="3.175" y2="-1.27" width="0.2032" layer="21"/>
<wire x1="3.175" y1="-1.27" x2="1.905" y2="-1.27" width="0.2032" layer="21"/>
<wire x1="1.905" y1="-1.27" x2="1.27" y2="-0.635" width="0.2032" layer="21"/>
<wire x1="-1.27" y1="0.635" x2="-1.27" y2="-0.635" width="0.2032" layer="21"/>
<wire x1="-0.635" y1="1.27" x2="-1.27" y2="0.635" width="0.2032" layer="21"/>
<wire x1="-1.27" y1="-0.635" x2="-0.635" y2="-1.27" width="0.2032" layer="21"/>
<wire x1="0.635" y1="-1.27" x2="-0.635" y2="-1.27" width="0.2032" layer="21"/>
<wire x1="8.89" y1="0.635" x2="8.89" y2="-0.635" width="0.2032" layer="21"/>
<pad name="1" x="0" y="0" drill="1.016" diameter="1.8796" rot="R90"/>
<pad name="2" x="2.54" y="0" drill="1.016" diameter="1.8796" rot="R90"/>
<pad name="3" x="5.08" y="0" drill="1.016" diameter="1.8796" rot="R90"/>
<pad name="4" x="7.62" y="0" drill="1.016" diameter="1.8796" rot="R90"/>
<rectangle x1="7.366" y1="-0.254" x2="7.874" y2="0.254" layer="51"/>
<rectangle x1="4.826" y1="-0.254" x2="5.334" y2="0.254" layer="51"/>
<rectangle x1="2.286" y1="-0.254" x2="2.794" y2="0.254" layer="51"/>
<rectangle x1="-0.254" y1="-0.254" x2="0.254" y2="0.254" layer="51"/>
<text x="-1.27" y="1.397" size="0.6096" layer="25" font="vector" ratio="20">>NAME</text>
<text x="-1.27" y="-2.032" size="0.6096" layer="27" font="vector" ratio="20">>VALUE</text>
</package>
</packages>
</library>
<library name="Seeed-Capacitor">
<packages>
<package name="C0402">
<description>0402
</description>
<smd name="1" x="0" y="0.4625" dx="0.5" dy="0.5" layer="1" roundness="50" rot="R270"/>
<smd name="2" x="0" y="-0.4625" dx="0.5" dy="0.5" layer="1" roundness="50" rot="R270"/>
<text x="0.635" y="1.27" size="0.889" layer="25" ratio="11" rot="R270">>NAME</text>
<text x="-1.524" y="1.397" size="0.635" layer="27" font="vector" ratio="10" rot="R270">>VALUE</text>
<polygon width="0.0254" layer="51">
<vertex x="0.254" y="0.508"/>
<vertex x="0.254" y="-0.508"/>
<vertex x="-0.254" y="-0.508"/>
<vertex x="-0.254" y="0.508"/>
</polygon>
<wire x1="0.3945" y1="-0.712" x2="0.2675" y2="-0.839" width="0.0762" layer="21" curve="-90"/>
<wire x1="0.2675" y1="-0.839" x2="-0.2675" y2="-0.839" width="0.0762" layer="21"/>
<wire x1="-0.2675" y1="-0.839" x2="-0.3945" y2="-0.712" width="0.0762" layer="21" curve="-90"/>
<wire x1="-0.3945" y1="-0.712" x2="-0.3945" y2="0.712" width="0.0762" layer="21"/>
<wire x1="-0.3945" y1="0.712" x2="-0.2675" y2="0.839" width="0.0762" layer="21" curve="-90"/>
<wire x1="-0.2675" y1="0.839" x2="0.2675" y2="0.839" width="0.0762" layer="21"/>
<wire x1="0.2675" y1="0.839" x2="0.3945" y2="0.712" width="0.0762" layer="21" curve="-90"/>
<wire x1="0.3945" y1="0.712" x2="0.3945" y2="-0.712" width="0.0762" layer="21"/>
</package>
<package name="AVX-A">
<wire x1="-2.0955" y1="0.8255" x2="2.0955" y2="0.8255" width="0.127" layer="21"/>
<wire x1="2.0955" y1="0.8255" x2="2.0955" y2="-0.8255" width="0.127" layer="21"/>
<wire x1="2.0955" y1="-0.8255" x2="-2.0955" y2="-0.8255" width="0.127" layer="21"/>
<wire x1="-2.0955" y1="-0.8255" x2="-2.0955" y2="0.8255" width="0.127" layer="21"/>
<wire x1="-0.4445" y1="0" x2="0.0635" y2="0" width="0.127" layer="21"/>
<wire x1="-0.1905" y1="-0.254" x2="-0.1905" y2="0.254" width="0.127" layer="21"/>
<smd name="+" x="-1.27" y="0" dx="1.27" dy="1.27" layer="1"/>
<smd name="-" x="1.27" y="0" dx="1.27" dy="1.27" layer="1" rot="R180"/>
<text x="-1.905" y="1.016" size="0.889" layer="25" ratio="11">>NAME</text>
<text x="-1.905" y="-2.159" size="0.635" layer="27" ratio="10">>VALUE</text>
<rectangle x1="-2.159" y1="-0.889" x2="2.159" y2="0.889" layer="39"/>
</package>
</packages>
</library>
<library name="innocomm-sigfox-breakout">
<packages>
<package name="INNOCOMM-SN10-12">
<wire x1="0" y1="0" x2="0" y2="21.5" width="0.1" layer="21"/>
<wire x1="0" y1="0" x2="15" y2="0" width="0.1" layer="21"/>
<wire x1="15" y1="0" x2="15" y2="21.5" width="0.1" layer="21"/>
<wire x1="0" y1="21.5" x2="15" y2="21.5" width="0.1" layer="21"/>
<smd name="1" x="0.5" y="14" dx="1.4" dy="0.8" layer="1"/>
<smd name="2" x="0.5" y="12.8" dx="1.4" dy="0.8" layer="1"/>
<smd name="3" x="0.5" y="11.6" dx="1.4" dy="0.8" layer="1"/>
<smd name="4" x="0.5" y="10.4" dx="1.4" dy="0.8" layer="1"/>
<smd name="5" x="0.5" y="9.2" dx="1.4" dy="0.8" layer="1"/>
<smd name="6" x="0.5" y="8" dx="1.4" dy="0.8" layer="1"/>
<smd name="7" x="0.5" y="6.8" dx="1.4" dy="0.8" layer="1"/>
<smd name="8" x="0.5" y="5.6" dx="1.4" dy="0.8" layer="1"/>
<smd name="9" x="0.5" y="4.4" dx="1.4" dy="0.8" layer="1"/>
<smd name="10" x="0.5" y="3.2" dx="1.4" dy="0.8" layer="1"/>
<smd name="11" x="0.5" y="2" dx="1.4" dy="0.8" layer="1"/>
<smd name="12" x="2.1" y="0.5" dx="1.4" dy="0.8" layer="1" rot="R90"/>
<smd name="13" x="3.3" y="0.5" dx="1.4" dy="0.8" layer="1" rot="R90"/>
<smd name="14" x="4.5" y="0.5" dx="1.4" dy="0.8" layer="1" rot="R90"/>
<smd name="15" x="5.7" y="0.5" dx="1.4" dy="0.8" layer="1" rot="R90"/>
<smd name="16" x="6.9" y="0.5" dx="1.4" dy="0.8" layer="1" rot="R90"/>
<smd name="17" x="8.1" y="0.5" dx="1.4" dy="0.8" layer="1" rot="R90"/>
<smd name="18" x="9.3" y="0.5" dx="1.4" dy="0.8" layer="1" rot="R90"/>
<smd name="19" x="10.5" y="0.5" dx="1.4" dy="0.8" layer="1" rot="R90"/>
<smd name="20" x="11.7" y="0.5" dx="1.4" dy="0.8" layer="1" rot="R90"/>
<smd name="21" x="12.9" y="0.5" dx="1.4" dy="0.8" layer="1" rot="R90"/>
<smd name="22" x="14.5" y="2" dx="1.4" dy="0.8" layer="1"/>
<smd name="23" x="14.5" y="3.2" dx="1.4" dy="0.8" layer="1"/>
<smd name="24" x="14.5" y="4.4" dx="1.4" dy="0.8" layer="1"/>
<smd name="25" x="14.5" y="5.6" dx="1.4" dy="0.8" layer="1"/>
<smd name="26" x="14.5" y="6.8" dx="1.4" dy="0.8" layer="1"/>
<smd name="27" x="14.5" y="8" dx="1.4" dy="0.8" layer="1"/>
<smd name="28" x="14.5" y="9.2" dx="1.4" dy="0.8" layer="1"/>
<smd name="29" x="14.5" y="10.4" dx="1.4" dy="0.8" layer="1"/>
<smd name="30" x="14.5" y="11.6" dx="1.4" dy="0.8" layer="1"/>
<smd name="31" x="14.5" y="12.8" dx="1.4" dy="0.8" layer="1"/>
<text x="0" y="21.844" size="1.016" layer="25">>Name</text>
<text x="0" y="-1.48" size="1.016" layer="27">>Value</text>
<dimension x1="0" y1="21.5" x2="15" y2="21.5" x3="7.5" y3="24.892" textsize="0.4" layer="51" width="0.02" extwidth="0.02" extlength="0.02" extoffset="0.02"/>
<dimension x1="15" y1="0" x2="15" y2="21.5" x3="17.272" y3="10.75" textsize="0.4" layer="51" width="0.02" extwidth="0.02" extlength="0.02" extoffset="0.02"/>
<rectangle x1="0" y1="0" x2="7.5" y2="10.75" layer="51"/>
<dimension x1="7.5" y1="0" x2="7.5" y2="10.75" x3="-1.778" y3="5.375" textsize="0.4" layer="51" width="0.02" extwidth="0.02" extlength="0.02" extoffset="0.02"/>
<dimension x1="0" y1="0" x2="7.5" y2="0" x3="3.75" y3="24.13" textsize="0.4" layer="51" width="0.02" extwidth="0.02" extlength="0.02" extoffset="0.02"/>
<wire x1="0" y1="11.43" x2="0.14" y2="11.43" width="0.05" layer="51"/>
<wire x1="10.16" y1="0" x2="10.16" y2="0.14" width="0.05" layer="51"/>
<rectangle x1="2.1" y1="0.3" x2="7.5" y2="10.75" layer="51"/>
<dimension x1="2.1" y1="0.3" x2="7.5" y2="0.3" x3="4.8" y3="-2.921" textsize="0.4" layer="51" width="0.02" extwidth="0.02" extlength="0.02" extoffset="0.02"/>
<dimension x1="2.1" y1="0.3" x2="2.1" y2="10.75" x3="-1.016" y3="5.525" textsize="0.4" layer="51" width="0.02" extwidth="0.02" extlength="0.02" extoffset="0.02"/>
<rectangle x1="2.1" y1="0.3" x2="3.3" y2="2.3" layer="51"/>
<dimension x1="2.1" y1="2.3" x2="3.3" y2="2.3" x3="2.7" y3="-2.159" textsize="0.4" layer="51" width="0.02" extwidth="0.02" extlength="0.02" extoffset="0.02"/>
<circle x="7.5" y="10.75" radius="0.283978125" width="0.02" layer="51"/>
<rectangle x1="0.3" y1="10.75" x2="7.5" y2="14" layer="51"/>
<dimension x1="0.3" y1="14" x2="7.5" y2="14" x3="3.9" y3="23.368" textsize="0.4" layer="51" width="0.02" extwidth="0.02" extlength="0.02" extoffset="0.02"/>
<dimension x1="0.3" y1="10.75" x2="0.3" y2="14" x3="-2.413" y3="12.375" textsize="0.4" layer="51" width="0.02" extwidth="0.02" extlength="0.02" extoffset="0.02"/>
<smd name="32" x="14.5" y="14" dx="1.4" dy="0.8" layer="1"/>
<rectangle x1="-0.4" y1="13.6" x2="1" y2="14.4" layer="51"/>
<rectangle x1="7.5" y1="0.3" x2="14.7" y2="10.75" layer="51"/>
<dimension x1="7.5" y1="0.3" x2="14.7" y2="0.3" x3="11.1" y3="-3.81" textsize="0.4" layer="51" width="0.02" extwidth="0.02" extlength="0.02" extoffset="0.02"/>
<rectangle x1="7.5" y1="2" x2="14.7" y2="10.75" layer="51"/>
<dimension x1="14.7" y1="2" x2="14.7" y2="10.75" x3="16.383" y3="6.375" textsize="0.4" layer="51" width="0.02" extwidth="0.02" extlength="0.02" extoffset="0.02"/>
<rectangle x1="12.9" y1="2" x2="15" y2="3.2" layer="51"/>
<dimension x1="11.6" y1="2" x2="11.6" y2="3.2" x3="16.002" y3="2.6" textsize="0.4" layer="51" width="0.01"/>
<rectangle x1="0" y1="2" x2="2.1" y2="3.2" layer="51"/>
<dimension x1="2.1" y1="2" x2="2.1" y2="3.2" x3="3.937" y3="2.6" textsize="0.4" layer="51" width="0.01"/>
<rectangle x1="-0.4" y1="12.8" x2="1" y2="14" layer="51"/>
<dimension x1="1.4" y1="12.8" x2="1.4" y2="14" x3="-1.778" y3="13.4" textsize="0.4" layer="51" width="0.01"/>
<dimension x1="1.4" y1="13.6" x2="1.4" y2="14.4" x3="-1.143" y3="14" textsize="0.4" layer="51" width="0.01"/>
<rectangle x1="0" y1="14.4" x2="1" y2="16.2" layer="51"/>
<dimension x1="0" y1="16.129" x2="1" y2="16.129" x3="0.5" y3="17.78" textsize="0.4" layer="51" width="0.01"/>
<circle x="0.5" y="14" radius="0.1" width="0.01" layer="51"/>
<dimension x1="-0.4" y1="14.4" x2="1" y2="14.4" x3="0.3" y3="14.732" textsize="0.4" layer="51" width="0.01"/>
<circle x="14.5" y="14" radius="0.1" width="0.01" layer="51"/>
<rectangle x1="7.5" y1="10.75" x2="14.7" y2="14" layer="51"/>
<dimension x1="7.5" y1="14" x2="14.7" y2="14" x3="11.1" y3="23.368" textsize="0.4" layer="51" width="0.01"/>
<circle x="2.1" y="0.5" radius="0.1" width="0.01" layer="51"/>
<circle x="12.9" y="0.5" radius="0.1" width="0.01" layer="51"/>
<dimension x1="0.3" y1="10.75" x2="7.5" y2="10.75" x3="3.9" y3="-3.81" textsize="0.4" layer="51" width="0.01"/>
<circle x="0.5" y="2" radius="0.1" width="0.01" layer="51"/>
<circle x="14.5" y="2" radius="0.1" width="0.01" layer="51"/>
<dimension x1="14.7" y1="10.75" x2="14.7" y2="14" x3="16.383" y3="12.375" textsize="0.4" layer="51" width="0.01"/>
<rectangle x1="12.9" y1="12.795" x2="15" y2="13.995" layer="51"/>
<dimension x1="12.9" y1="12.795" x2="12.9" y2="13.995" x3="15.748" y3="13.395" textsize="0.4" layer="51" width="0.01"/>
<rectangle x1="14" y1="13.65" x2="15" y2="14.35" layer="51"/>
<rectangle x1="0" y1="13.65" x2="1" y2="14.35" layer="51"/>
<dimension x1="14" y1="14.35" x2="15" y2="14.35" x3="14.5" y3="14.605" textsize="0.1" layer="51" width="0.01"/>
<dimension x1="14" y1="13.65" x2="14" y2="14.35" x3="13.589" y3="14" textsize="0.1" layer="51" width="0.01"/>
<dimension x1="0" y1="14.35" x2="1" y2="14.35" x3="0.5" y3="14.478" textsize="0.1" layer="51" width="0.01"/>
<dimension x1="1" y1="13.65" x2="1" y2="14.35" x3="1.397" y3="14" textsize="0.1" layer="51" width="0.01"/>
<rectangle x1="12.55" y1="0" x2="13.25" y2="1" layer="51"/>
<rectangle x1="1.755" y1="0" x2="2.455" y2="1" layer="51"/>
<dimension x1="13.25" y1="0" x2="13.25" y2="1" x3="13.462" y3="0.5" textsize="0.1" layer="51" width="0.01"/>
<dimension x1="12.55" y1="1" x2="13.25" y2="1" x3="12.9" y3="1.27" textsize="0.1" layer="51" width="0.01"/>
<dimension x1="1.755" y1="1" x2="2.455" y2="1" x3="2.105" y3="1.27" textsize="0.1" layer="51" width="0.01"/>
<dimension x1="1.755" y1="0" x2="1.755" y2="1" x3="1.651" y3="0.5" textsize="0.1" layer="51" width="0.01"/>
<rectangle x1="7.5" y1="0.3" x2="12.9" y2="10.75" layer="51"/>
<dimension x1="7.5" y1="0.3" x2="12.9" y2="0.3" x3="10.2" y3="-2.921" textsize="0.4" layer="51" width="0.01"/>
<rectangle x1="0" y1="2" x2="2" y2="10.75" layer="51"/>
<dimension x1="2" y1="2" x2="2" y2="10.75" x3="-0.381" y3="6.375" textsize="0.4" layer="51" width="0.01"/>
</package>
</packages>
</library>
<library name="SparkFun-Aesthetics">
<description>
SparkFun Aesthetics

This library contiains non-functional items such as logos, build/ordering notes, frame blocks, etc.

We've spent an enormous amount of time creating and checking these footprints and parts, but it is  the end user's responsibility to ensure correctness and suitablity for a given componet or application.

If you enjoy using this library, please buy one of our products at SparkFun.com.

Licensing: Creative Commons ShareAlike 4.0 International - https://creativecommons.org/licenses/by-sa/4.0/

You are welcome to use this library for commercial purposes. For attribution, we ask that when you begin to sell your device using our footprint, you email us with a link to the product being sold. We want bragging rights that we helped (in a very small part) to create your 8th world wonder. We would like the opportunity to feature your device on our homepage.</description>
<packages>
<package name="BREADBOARD_SPACING">
<description>
Breadboard Spacing

Standard breadboard spacing, including power rails and a 30mil gap between row sets.

Devices using:

BREADBOARD_PATTERN

</description>
<wire x1="-24.13" y1="1.27" x2="-24.13" y2="-1.27" width="0.254" layer="51"/>
<wire x1="-21.59" y1="1.27" x2="-21.59" y2="-1.27" width="0.254" layer="51"/>
<wire x1="-13.97" y1="1.27" x2="-13.97" y2="-1.27" width="0.254" layer="51"/>
<wire x1="-11.43" y1="1.27" x2="-11.43" y2="-1.27" width="0.254" layer="51"/>
<wire x1="-8.89" y1="1.27" x2="-8.89" y2="-1.27" width="0.254" layer="51"/>
<wire x1="-6.35" y1="1.27" x2="-6.35" y2="-1.27" width="0.254" layer="51"/>
<wire x1="-3.81" y1="1.27" x2="-3.81" y2="-1.27" width="0.254" layer="51"/>
<wire x1="13.97" y1="1.27" x2="13.97" y2="-1.27" width="0.254" layer="51"/>
<wire x1="3.81" y1="1.27" x2="3.81" y2="-1.27" width="0.254" layer="51"/>
<wire x1="6.35" y1="1.27" x2="6.35" y2="-1.27" width="0.254" layer="51"/>
<wire x1="8.89" y1="1.27" x2="8.89" y2="-1.27" width="0.254" layer="51"/>
<wire x1="11.43" y1="1.27" x2="11.43" y2="-1.27" width="0.254" layer="51"/>
<wire x1="24.13" y1="1.27" x2="24.13" y2="-1.27" width="0.254" layer="51"/>
<wire x1="21.59" y1="1.27" x2="21.59" y2="-1.27" width="0.254" layer="51"/>
<text x="0" y="1.905" size="1.27" layer="51" font="vector" ratio="15" align="bottom-center">Breadboard row spacing:</text>
</package>
</packages>
</library>
<library name="Seeed-Inductor">
<packages>
<package name="L0402">
<smd name="1" x="-0.4625" y="0" dx="0.5" dy="0.5" layer="1" roundness="50"/>
<smd name="2" x="0.4625" y="0" dx="0.5" dy="0.5" layer="1" roundness="50"/>
<text x="-1.27" y="0.635" size="0.889" layer="25" ratio="11">>NAME</text>
<text x="-1.27" y="-1.524" size="0.889" layer="27" font="vector" ratio="11">>VALUE</text>
<wire x1="0.712" y1="0.3945" x2="0.839" y2="0.2675" width="0.0762" layer="21" curve="-90"/>
<wire x1="0.839" y1="0.2675" x2="0.839" y2="-0.2675" width="0.0762" layer="21"/>
<wire x1="0.839" y1="-0.2675" x2="0.712" y2="-0.3945" width="0.0762" layer="21" curve="-90"/>
<wire x1="0.712" y1="-0.3945" x2="-0.712" y2="-0.3945" width="0.0762" layer="21"/>
<wire x1="-0.712" y1="-0.3945" x2="-0.839" y2="-0.2675" width="0.0762" layer="21" curve="-90"/>
<wire x1="-0.839" y1="-0.2675" x2="-0.839" y2="0.2675" width="0.0762" layer="21"/>
<wire x1="-0.839" y1="0.2675" x2="-0.712" y2="0.3945" width="0.0762" layer="21" curve="-90"/>
<wire x1="-0.712" y1="0.3945" x2="0.712" y2="0.3945" width="0.0762" layer="21"/>
</package>
</packages>
</library>
<library name="Seeed-Resistor">
<packages>
<package name="R0402">
<smd name="1" x="0" y="0.4625" dx="0.5" dy="0.5" layer="1" roundness="50" rot="R270"/>
<smd name="2" x="0" y="-0.4625" dx="0.5" dy="0.5" layer="1" roundness="50" rot="R270"/>
<text x="0.635" y="1.27" size="0.889" layer="25" ratio="11" rot="R270">>NAME</text>
<text x="-1.524" y="1.27" size="0.889" layer="27" font="vector" ratio="11" rot="R270">>VALUE</text>
<wire x1="0.3945" y1="0.839" x2="0.3945" y2="-0.839" width="0.0762" layer="21"/>
<wire x1="0.3945" y1="-0.839" x2="-0.3945" y2="-0.839" width="0.0762" layer="21"/>
<wire x1="-0.3945" y1="-0.839" x2="-0.3945" y2="0.839" width="0.0762" layer="21"/>
<wire x1="-0.3945" y1="0.839" x2="0.3945" y2="0.839" width="0.0762" layer="21"/>
</package>
</packages>
</library>
<library name="Seeed-Connector">
<packages>
<package name="U-FL3P-SMD-2.6X2.6X1.0MM">
<wire x1="-1.397" y1="1.3" x2="-0.9" y2="1.3" width="0.127" layer="51"/>
<wire x1="-0.9" y1="1.3" x2="0.9" y2="1.3" width="0.127" layer="51"/>
<wire x1="0.9" y1="1.3" x2="1.397" y2="1.3" width="0.127" layer="51"/>
<wire x1="1.397" y1="1.3" x2="1.397" y2="-1.3" width="0.127" layer="21"/>
<wire x1="-1.397" y1="1.3" x2="-1.397" y2="0.762" width="0.127" layer="51"/>
<wire x1="-1.397" y1="-1.3" x2="-1.397" y2="-0.762" width="0.127" layer="51"/>
<smd name="GND1" x="0" y="1.5" dx="2.2" dy="1.05" layer="1" roundness="50"/>
<smd name="GND2" x="0" y="-1.5" dx="2.2" dy="1.05" layer="1" roundness="50"/>
<smd name="D" x="-1.524" y="0" dx="1.05" dy="1" layer="1" roundness="50" rot="R180"/>
<text x="-1.905" y="2.54" size="0.889" layer="25" ratio="11">>NAME</text>
<text x="0.127" y="-0.508" size="0.254" layer="33" ratio="10" rot="R90">>name</text>
<text x="-1.905" y="-3.175" size="0.889" layer="27" ratio="11">>VALUE</text>
<rectangle x1="-2.159" y1="-1.016" x2="-1.397" y2="1.016" layer="51"/>
<rectangle x1="-1.397" y1="-2.032" x2="1.397" y2="2.032" layer="39"/>
<rectangle x1="-1" y1="-0.95" x2="1.1" y2="0.95" layer="41"/>
<wire x1="-0.9" y1="1.3" x2="-0.9" y2="1.5" width="0.127" layer="21"/>
<wire x1="-0.9" y1="1.5" x2="0.9" y2="1.5" width="0.127" layer="51"/>
<wire x1="0.9" y1="1.5" x2="0.9" y2="1.3" width="0.127" layer="51"/>
<wire x1="1.397" y1="-1.3" x2="0.9" y2="-1.3" width="0.127" layer="51"/>
<wire x1="0.9" y1="-1.3" x2="-0.9" y2="-1.3" width="0.127" layer="51"/>
<wire x1="-0.9" y1="-1.3" x2="-1.397" y2="-1.3" width="0.127" layer="51"/>
<wire x1="0.9" y1="-1.3" x2="0.9" y2="-1.5" width="0.127" layer="51"/>
<wire x1="0.9" y1="-1.5" x2="-0.9" y2="-1.5" width="0.127" layer="51"/>
<wire x1="-0.9" y1="-1.5" x2="-0.9" y2="-1.3" width="0.127" layer="51"/>
<rectangle x1="1.397" y1="-0.508" x2="2.032" y2="0.508" layer="21"/>
<wire x1="1.4" y1="1.3" x2="1.3" y2="1.3" width="0.127" layer="21"/>
<wire x1="-1.2" y1="1.3" x2="-1.4" y2="1.3" width="0.127" layer="21"/>
<wire x1="-1.4" y1="1.3" x2="-1.4" y2="0.9" width="0.127" layer="21"/>
<wire x1="-1.4" y1="0.9" x2="-2.1" y2="0.9" width="0.127" layer="21"/>
<wire x1="-2.1" y1="0.9" x2="-2.1" y2="0.8" width="0.127" layer="21"/>
<wire x1="-2.1" y1="0.7" x2="-2.1" y2="0.5" width="0.127" layer="21"/>
<wire x1="-2.1" y1="-0.6" x2="-2.1" y2="-0.8" width="0.127" layer="21"/>
<wire x1="-2.1" y1="-0.9" x2="-2.1" y2="-1" width="0.127" layer="21"/>
<wire x1="-2.1" y1="-1" x2="-1.4" y2="-1" width="0.127" layer="21"/>
<wire x1="-1.4" y1="-1" x2="-1.4" y2="-1.3" width="0.127" layer="21"/>
<wire x1="-1.4" y1="-1.3" x2="-1.2" y2="-1.3" width="0.127" layer="21"/>
<wire x1="-1.4" y1="-1" x2="-1.4" y2="-0.9" width="0.127" layer="21"/>
<wire x1="-1.4" y1="-0.9" x2="-1.4" y2="-0.8" width="0.127" layer="21"/>
<wire x1="-1.4" y1="-0.8" x2="-2.1" y2="-0.8" width="0.127" layer="21"/>
<wire x1="-2.1" y1="-0.8" x2="-2.1" y2="-0.9" width="0.127" layer="21"/>
<wire x1="-2.1" y1="-0.9" x2="-1.4" y2="-0.9" width="0.127" layer="21"/>
<wire x1="-1.4" y1="0.9" x2="-1.4" y2="0.8" width="0.127" layer="21"/>
<wire x1="-1.4" y1="0.8" x2="-2.1" y2="0.8" width="0.127" layer="21"/>
<wire x1="-2.1" y1="0.8" x2="-2.1" y2="0.7" width="0.127" layer="21"/>
<wire x1="-2.1" y1="0.7" x2="-1.4" y2="0.7" width="0.127" layer="21"/>
<wire x1="1.4" y1="-1.3" x2="1.3" y2="-1.3" width="0.127" layer="21"/>
</package>
</packages>
</library>
</libraries>
<attributes>
<attribute name="MPN" value=""/>
</attributes>
<variantdefs>
</variantdefs>
<classes>
<class number="0" name="default" width="0" drill="0">
</class>
</classes>
<designrules name="SeeedStudio_2layer_DRU_no_angle_20140221">
<description language="de">EAGLE Design Rules

Die Standard-Design-Rules sind so gewählt, dass sie für
die meisten Anwendungen passen. Sollte ihre Platine
besondere Anforderungen haben, treffen Sie die erforderlichen
Einstellungen hier und speichern die Design Rules unter
einem neuen Namen ab.</description>
<description language="en">EAGLE Design Rules

The default Design Rules have been set to cover
a wide range of applications. Your particular design
may have different requirements, so please make the
necessary adjustments and save your customized
design rules under a new name.</description>
<description language="zh">Seeed Studio EAGLE Design Rules
</description>
<param name="layerSetup" value="(1*16)"/>
<param name="mtCopper" value="0.035mm 0.0175mm 0.035mm 0.035mm 0.035mm 0.035mm 0.035mm 0.035mm 0.035mm 0.035mm 0.035mm 0.035mm 0.035mm 0.035mm 0.0175mm 0.035mm"/>
<param name="mtIsolate" value="1.5mm 1.1mm 0.2mm 0.15mm 0.2mm 0.15mm 0.2mm 0.15mm 0.2mm 0.15mm 0.2mm 0.15mm 0.2mm 0.15mm 0.2mm"/>
<param name="mdWireWire" value="6mil"/>
<param name="mdWirePad" value="6mil"/>
<param name="mdWireVia" value="6mil"/>
<param name="mdPadPad" value="6mil"/>
<param name="mdPadVia" value="6mil"/>
<param name="mdViaVia" value="6mil"/>
<param name="mdSmdPad" value="0mil"/>
<param name="mdSmdVia" value="0mil"/>
<param name="mdSmdSmd" value="0mil"/>
<param name="mdViaViaSameLayer" value="8mil"/>
<param name="mnLayersViaInSmd" value="2"/>
<param name="mdCopperDimension" value="10mil"/>
<param name="mdDrill" value="10mil"/>
<param name="mdSmdStop" value="0mil"/>
<param name="msWidth" value="6mil"/>
<param name="msDrill" value="12mil"/>
<param name="msMicroVia" value="12mil"/>
<param name="msBlindViaRatio" value="0.5"/>
<param name="rvPadTop" value="0.25"/>
<param name="rvPadInner" value="0.25"/>
<param name="rvPadBottom" value="0.25"/>
<param name="rvViaOuter" value="0.25"/>
<param name="rvViaInner" value="0.25"/>
<param name="rvMicroViaOuter" value="0.25"/>
<param name="rvMicroViaInner" value="0.25"/>
<param name="rlMinPadTop" value="10mil"/>
<param name="rlMaxPadTop" value="20mil"/>
<param name="rlMinPadInner" value="10mil"/>
<param name="rlMaxPadInner" value="20mil"/>
<param name="rlMinPadBottom" value="10mil"/>
<param name="rlMaxPadBottom" value="20mil"/>
<param name="rlMinViaOuter" value="6mil"/>
<param name="rlMaxViaOuter" value="20mil"/>
<param name="rlMinViaInner" value="6mil"/>
<param name="rlMaxViaInner" value="20mil"/>
<param name="rlMinMicroViaOuter" value="4mil"/>
<param name="rlMaxMicroViaOuter" value="20mil"/>
<param name="rlMinMicroViaInner" value="4mil"/>
<param name="rlMaxMicroViaInner" value="20mil"/>
<param name="psTop" value="-1"/>
<param name="psBottom" value="-1"/>
<param name="psFirst" value="0"/>
<param name="psElongationLong" value="100"/>
<param name="psElongationOffset" value="100"/>
<param name="mvStopFrame" value="1"/>
<param name="mvCreamFrame" value="0"/>
<param name="mlMinStopFrame" value="2mil"/>
<param name="mlMaxStopFrame" value="2mil"/>
<param name="mlMinCreamFrame" value="0mil"/>
<param name="mlMaxCreamFrame" value="0mil"/>
<param name="mlViaStopLimit" value="100mil"/>
<param name="srRoundness" value="0"/>
<param name="srMinRoundness" value="0mil"/>
<param name="srMaxRoundness" value="0mil"/>
<param name="slThermalIsolate" value="10mil"/>
<param name="slThermalsForVias" value="0"/>
<param name="dpMaxLengthDifference" value="10mm"/>
<param name="dpGapFactor" value="2.5"/>
<param name="checkAngle" value="0"/>
<param name="checkFont" value="1"/>
<param name="checkRestrict" value="0"/>
<param name="checkStop" value="0"/>
<param name="checkValues" value="0"/>
<param name="checkNames" value="1"/>
<param name="checkWireStubs" value="1"/>
<param name="checkPolygonWidth" value="0"/>
<param name="useDiameter" value="13"/>
<param name="maxErrors" value="50"/>
</designrules>
<autorouter>
<pass name="Default">
<param name="RoutingGrid" value="50mil"/>
<param name="AutoGrid" value="1"/>
<param name="Efforts" value="0"/>
<param name="TopRouterVariant" value="1"/>
<param name="tpViaShape" value="round"/>
<param name="PrefDir.1" value="a"/>
<param name="PrefDir.2" value="0"/>
<param name="PrefDir.3" value="0"/>
<param name="PrefDir.4" value="0"/>
<param name="PrefDir.5" value="0"/>
<param name="PrefDir.6" value="0"/>
<param name="PrefDir.7" value="0"/>
<param name="PrefDir.8" value="0"/>
<param name="PrefDir.9" value="0"/>
<param name="PrefDir.10" value="0"/>
<param name="PrefDir.11" value="0"/>
<param name="PrefDir.12" value="0"/>
<param name="PrefDir.13" value="0"/>
<param name="PrefDir.14" value="0"/>
<param name="PrefDir.15" value="0"/>
<param name="PrefDir.16" value="a"/>
<param name="cfVia" value="8"/>
<param name="cfNonPref" value="5"/>
<param name="cfChangeDir" value="2"/>
<param name="cfOrthStep" value="2"/>
<param name="cfDiagStep" value="3"/>
<param name="cfExtdStep" value="0"/>
<param name="cfBonusStep" value="1"/>
<param name="cfMalusStep" value="1"/>
<param name="cfPadImpact" value="4"/>
<param name="cfSmdImpact" value="4"/>
<param name="cfBusImpact" value="0"/>
<param name="cfHugging" value="3"/>
<param name="cfAvoid" value="4"/>
<param name="cfPolygon" value="10"/>
<param name="cfBase.1" value="0"/>
<param name="cfBase.2" value="1"/>
<param name="cfBase.3" value="1"/>
<param name="cfBase.4" value="1"/>
<param name="cfBase.5" value="1"/>
<param name="cfBase.6" value="1"/>
<param name="cfBase.7" value="1"/>
<param name="cfBase.8" value="1"/>
<param name="cfBase.9" value="1"/>
<param name="cfBase.10" value="1"/>
<param name="cfBase.11" value="1"/>
<param name="cfBase.12" value="1"/>
<param name="cfBase.13" value="1"/>
<param name="cfBase.14" value="1"/>
<param name="cfBase.15" value="1"/>
<param name="cfBase.16" value="0"/>
<param name="mnVias" value="20"/>
<param name="mnSegments" value="9999"/>
<param name="mnExtdSteps" value="9999"/>
<param name="mnRipupLevel" value="10"/>
<param name="mnRipupSteps" value="100"/>
<param name="mnRipupTotal" value="100"/>
</pass>
<pass name="Follow-me" refer="Default" active="yes">
</pass>
<pass name="Busses" refer="Default" active="yes">
<param name="cfNonPref" value="4"/>
<param name="cfBusImpact" value="4"/>
<param name="cfHugging" value="0"/>
<param name="mnVias" value="0"/>
</pass>
<pass name="Route" refer="Default" active="yes">
</pass>
<pass name="Optimize1" refer="Default" active="yes">
<param name="cfVia" value="99"/>
<param name="cfExtdStep" value="10"/>
<param name="cfHugging" value="1"/>
<param name="mnExtdSteps" value="1"/>
<param name="mnRipupLevel" value="0"/>
</pass>
<pass name="Optimize2" refer="Optimize1" active="yes">
<param name="cfNonPref" value="0"/>
<param name="cfChangeDir" value="6"/>
<param name="cfExtdStep" value="0"/>
<param name="cfBonusStep" value="2"/>
<param name="cfMalusStep" value="2"/>
<param name="cfPadImpact" value="2"/>
<param name="cfSmdImpact" value="2"/>
<param name="cfHugging" value="0"/>
</pass>
<pass name="Optimize3" refer="Optimize2" active="yes">
<param name="cfChangeDir" value="8"/>
<param name="cfPadImpact" value="0"/>
<param name="cfSmdImpact" value="0"/>
</pass>
<pass name="Optimize4" refer="Optimize3" active="yes">
<param name="cfChangeDir" value="25"/>
</pass>
</autorouter>
<elements>
<element name="U1" library="innocomm-sigfox-breakout" package="INNOCOMM-SN10-12" value="SN10-12" x="6.84244375" y="2.62373125" smashed="yes">
<attribute name="DESCRIPTION" value="SIGFOX module for Zone 2 / Zone 4" x="6.84244375" y="2.62373125" size="1.778" layer="27" display="off"/>
<attribute name="MANUFACTURER" value="InnoComm" x="6.84244375" y="2.62373125" size="1.778" layer="27" display="off"/>
<attribute name="MPN" value="SN10-12" x="6.84244375" y="2.62373125" size="1.778" layer="27" display="off"/>
<attribute name="NAME" x="6.58844375" y="2.62373125" size="0.6096" layer="25" font="vector" ratio="20" align="bottom-right"/>
<attribute name="URL" value="https://www.arrow.com/zh-cn/products/sn10-12/innocomm-mobile-technology-corporation" x="6.84244375" y="2.62373125" size="1.778" layer="27" display="off"/>
<attribute name="VALUE" x="6.84244375" y="1.14373125" size="1.016" layer="27"/>
</element>
<element name="RF1" library="Seeed-Connector" package="U-FL3P-SMD-2.6X2.6X1.0MM" value="U-FL / ??? / 320110048" x="25.019" y="21.336" smashed="yes" rot="R90">
<attribute name="DESCRIPTION" value="SMD U-FL Female CONN-Gold;3P-L2.6*W2.6*H1.25mm" x="25.019" y="21.336" size="1.778" layer="27" rot="R90" display="off"/>
<attribute name="MANUFACTURER" value="I-PEX" x="25.019" y="21.336" size="1.778" layer="27" rot="R90" display="off"/>
<attribute name="NAME" x="27.94" y="20.574" size="0.6096" layer="25" font="vector" ratio="20" rot="R90"/>
<attribute name="NAME" x="25.527" y="21.463" size="0.254" layer="33" ratio="10" rot="R180"/>
<attribute name="SKU" value="320110048" x="25.019" y="21.336" size="1.778" layer="27" rot="R90" display="off"/>
<attribute name="VALUE" x="28.194" y="19.431" size="0.889" layer="27" ratio="11" rot="R90"/>
</element>
<element name="C1" library="Seeed-Capacitor" package="C0402" value="33pf / CC0402JRNPO9BN330 / 302010000" x="5.2824875" y="15.87176875" smashed="yes">
<attribute name="DESCRIPTION" value="SMD CAP Ceramic 33pF-50V-5%-NPO" x="5.2824875" y="15.87176875" size="1.778" layer="27" display="off"/>
<attribute name="MANUFACTURER" value="YAGEO" x="5.2824875" y="15.87176875" size="1.778" layer="27" display="off"/>
<attribute name="MPN" value="CC0402JRNPO9BN330" x="5.2824875" y="15.87176875" size="1.778" layer="27" display="off"/>
<attribute name="NAME" x="5.2824875" y="14.72876875" size="0.6096" layer="25" font="vector" ratio="20" align="top-center"/>
<attribute name="SKU" value="302010000" x="5.2824875" y="15.87176875" size="1.778" layer="27" display="off"/>
<attribute name="VALUE" x="3.7584875" y="17.26876875" size="0.635" layer="27" font="vector" ratio="10" rot="R270"/>
</element>
<element name="C2" library="Seeed-Capacitor" package="AVX-A" value="47uf / TAJC476K006RNJ / 302020005" x="2.921" y="16.65394375" smashed="yes" rot="R90">
<attribute name="DESCRIPTION" value="SMD CAP Tantalum 47uF-6.3V" x="2.921" y="16.65394375" size="1.778" layer="27" rot="R90" display="off"/>
<attribute name="MANUFACTURER" value="AVX" x="2.921" y="16.65394375" size="1.778" layer="27" rot="R90" display="off"/>
<attribute name="MPN" value="TAJC476K006RNJ" x="2.921" y="16.65394375" size="1.778" layer="27" rot="R90" display="off"/>
<attribute name="NAME" x="2.921" y="13.60594375" size="0.6096" layer="25" font="vector" ratio="20" rot="R180" align="top-center"/>
<attribute name="SKU" value="302020005" x="2.921" y="16.65394375" size="1.778" layer="27" rot="R90" display="off"/>
<attribute name="VALUE" x="5.08" y="14.74894375" size="0.635" layer="27" ratio="10" rot="R90"/>
</element>
<element name="BREADBRD1" library="SparkFun-Aesthetics" package="BREADBOARD_SPACING" value="BREADBOARD_PATTERN" x="14.3515375" y="-5.37535625"/>
<element name="C3" library="Seeed-Capacitor" package="C0402" value="100pf / CC0402JRNPO9BN101 / 302010012" x="24.5618" y="15.4178" smashed="yes" rot="R90">
<attribute name="DESCRIPTION" value="SMD CAP Ceramic 100pF-50V-5%-NPO" x="24.5618" y="15.4178" size="1.778" layer="27" rot="R90" display="off"/>
<attribute name="MANUFACTURER" value="YAGEO" x="24.5618" y="15.4178" size="1.778" layer="27" rot="R90" display="off"/>
<attribute name="MPN" value="CC0402JRNPO9BN101" x="24.5618" y="15.4178" size="1.778" layer="27" rot="R90" display="off"/>
<attribute name="NAME" x="24.0538" y="14.1478" size="0.6096" layer="25" font="vector" ratio="20"/>
<attribute name="SKU" value="302010012" x="24.5618" y="15.4178" size="1.778" layer="27" rot="R90" display="off"/>
<attribute name="VALUE" x="23.1648" y="13.8938" size="0.635" layer="27" font="vector" ratio="10"/>
</element>
<element name="R1" library="Seeed-Resistor" package="R0402" value="0R / RC0402JR-070RL / 301010000" x="25.019" y="17.526" smashed="yes" rot="R180">
<attribute name="DESCRIPTION" value="SMD RES 0R-5%-1/16W" x="25.019" y="17.526" size="1.778" layer="27" rot="R180" display="off"/>
<attribute name="MANUFACTURER" value="YAGEO" x="25.019" y="17.526" size="1.778" layer="27" rot="R180" display="off"/>
<attribute name="MPN" value="RC0402JR-070RL" x="25.019" y="17.526" size="1.778" layer="27" rot="R180" display="off"/>
<attribute name="NAME" x="26.289" y="17.145" size="0.6096" layer="25" font="vector" ratio="20" rot="R90"/>
<attribute name="SKU" value="301010000" x="25.019" y="17.526" size="1.778" layer="27" rot="R180" display="off"/>
<attribute name="VALUE" x="26.543" y="16.256" size="0.889" layer="27" font="vector" ratio="11" rot="R90"/>
</element>
<element name="L1" library="Seeed-Inductor" package="L0402" value="47NH / LQW15AN47NJ00D / 303010107" x="26.67" y="14.9606" smashed="yes" rot="R270">
<attribute name="DESCRIPTION" value="SMD Inductor;47nH-5%-210mA-0402" x="26.67" y="14.9606" size="1.778" layer="27" rot="R270" display="off"/>
<attribute name="MANUFACTURER" value="Murata" x="26.67" y="14.9606" size="1.778" layer="27" rot="R270" display="off"/>
<attribute name="MPN" value="LQW15AN47NJ00D" x="26.67" y="14.9606" size="1.778" layer="27" rot="R270" display="off"/>
<attribute name="NAME" x="27.432" y="15.4686" size="0.6096" layer="25" font="vector" ratio="20" rot="R270"/>
<attribute name="SKU" value="303010107" x="26.67" y="14.9606" size="1.778" layer="27" rot="R270" display="off"/>
<attribute name="VALUE" x="25.146" y="16.2306" size="0.889" layer="27" font="vector" ratio="11" rot="R270"/>
</element>
<element name="J1" library="SparkFun-Connectors" package="1X04" value="4 x Plated Holes" x="2.921" y="3.302" smashed="yes" rot="R90">
<attribute name="NAME" x="3.175" y="0.762" size="0.6096" layer="25" font="vector" ratio="20" rot="R90"/>
<attribute name="PROD_ID" value="CONN-09696" x="2.921" y="3.302" size="1.778" layer="27" rot="R90" display="off"/>
<attribute name="VALUE" x="4.953" y="2.032" size="0.6096" layer="27" font="vector" ratio="20" rot="R90"/>
</element>
<element name="J2" library="SparkFun-Connectors" package="1X04" value="4 x Plated Holes" x="25.781" y="3.302" smashed="yes" rot="R90">
<attribute name="NAME" x="26.035" y="0.635" size="0.6096" layer="25" font="vector" ratio="20" rot="R90"/>
<attribute name="PROD_ID" value="CONN-09696" x="25.781" y="3.302" size="1.778" layer="27" rot="R90" display="off"/>
<attribute name="VALUE" x="27.813" y="2.032" size="0.6096" layer="27" font="vector" ratio="20" rot="R90"/>
</element>
</elements>
<signals>
<signal name="GND">
<polygon width="0.3048" layer="2">
<vertex x="32.7025" y="27.305"/>
<vertex x="54.2925" y="27.305"/>
<vertex x="54.2925" y="52.705"/>
<vertex x="32.7025" y="52.705"/>
</polygon>
<contactref element="U1" pad="3"/>
<contactref element="U1" pad="4"/>
<contactref element="U1" pad="7"/>
<contactref element="U1" pad="6"/>
<contactref element="U1" pad="5"/>
<contactref element="C1" pad="1"/>
<contactref element="U1" pad="1"/>
<contactref element="U1" pad="8"/>
<contactref element="U1" pad="11"/>
<contactref element="U1" pad="27"/>
<contactref element="U1" pad="12"/>
<contactref element="U1" pad="21"/>
<contactref element="J2" pad="1"/>
<contactref element="C2" pad="-"/>
<contactref element="U1" pad="32"/>
<contactref element="RF1" pad="GND1"/>
<contactref element="RF1" pad="GND2"/>
<contactref element="U1" pad="30"/>
<contactref element="L1" pad="2"/>
<wire x1="2.864978125" y1="17.907" x2="2.921" y2="17.92394375" width="0.254" layer="1"/>
<wire x1="2.864978125" y1="17.907" x2="4.191" y2="17.907" width="0.4064" layer="1"/>
<wire x1="4.191" y1="17.907" x2="5.2824875" y2="16.8155125" width="0.4064" layer="1"/>
<wire x1="5.2824875" y1="16.8155125" x2="5.2824875" y2="16.33426875" width="0.4064" layer="1"/>
<via x="5.969" y="8.763" extent="1-16" drill="0.55"/>
<via x="5.461" y="4.572" extent="1-16" drill="0.55"/>
<via x="22.352" y="2.921" extent="1-16" drill="0.55"/>
<via x="22.987" y="10.668" extent="1-16" drill="0.55"/>
<wire x1="21.34244375" y1="14.22373125" x2="22.22526875" y2="14.22373125" width="0.254" layer="1"/>
<wire x1="22.22526875" y1="14.22373125" x2="22.479" y2="13.97" width="0.254" layer="1"/>
<wire x1="26.67" y1="14.4981" x2="26.67" y2="12.573" width="0.254" layer="1"/>
<wire x1="26.67" y1="12.573" x2="24.892" y2="12.573" width="0.254" layer="1"/>
<wire x1="24.892" y1="12.573" x2="24.003" y2="11.684" width="0.254" layer="1"/>
<wire x1="7.34244375" y1="4.62373125" x2="7.2907125" y2="4.572" width="0.254" layer="1"/>
<wire x1="7.2907125" y1="4.572" x2="5.461" y2="4.572" width="0.254" layer="1"/>
<wire x1="7.34244375" y1="8.22373125" x2="6.50826875" y2="8.22373125" width="0.254" layer="1"/>
<wire x1="6.50826875" y1="8.22373125" x2="5.969" y2="8.763" width="0.254" layer="1"/>
<wire x1="7.34244375" y1="14.22373125" x2="6.73073125" y2="14.22373125" width="0.254" layer="1"/>
<wire x1="6.73073125" y1="14.22373125" x2="5.969" y2="13.462" width="0.254" layer="1"/>
<wire x1="5.969" y1="13.462" x2="5.969" y2="12.446" width="0.254" layer="1"/>
<wire x1="5.969" y1="12.446" x2="5.969" y2="12.319" width="0.254" layer="1"/>
<wire x1="5.969" y1="12.319" x2="5.969" y2="11.176" width="0.254" layer="1"/>
<wire x1="5.969" y1="11.176" x2="5.969" y2="11.049" width="0.254" layer="1"/>
<wire x1="5.969" y1="11.049" x2="5.969" y2="10.16" width="0.254" layer="1"/>
<wire x1="5.969" y1="10.16" x2="5.969" y2="9.906" width="0.254" layer="1"/>
<wire x1="5.969" y1="9.906" x2="5.969" y2="8.89" width="0.254" layer="1"/>
<wire x1="5.969" y1="8.89" x2="5.969" y2="8.763" width="0.254" layer="1"/>
<via x="5.969" y="17.399" extent="1-16" drill="0.55"/>
<wire x1="7.34244375" y1="16.62373125" x2="6.46373125" y2="16.62373125" width="0.254" layer="1"/>
<wire x1="6.46373125" y1="16.62373125" x2="6.096" y2="16.256" width="0.254" layer="1"/>
<wire x1="6.096" y1="16.256" x2="5.36075625" y2="16.256" width="0.254" layer="1"/>
<wire x1="5.36075625" y1="16.256" x2="5.2824875" y2="16.33426875" width="0.254" layer="1"/>
<wire x1="5.969" y1="17.399" x2="5.969" y2="16.383" width="0.254" layer="1"/>
<wire x1="5.969" y1="16.383" x2="6.096" y2="16.256" width="0.254" layer="1"/>
<wire x1="21.34244375" y1="16.62373125" x2="22.21173125" y2="16.62373125" width="0.254" layer="1"/>
<wire x1="22.21173125" y1="16.62373125" x2="22.479" y2="16.891" width="0.254" layer="1"/>
<wire x1="22.479" y1="16.891" x2="22.479" y2="22.733" width="0.254" layer="1"/>
<wire x1="22.479" y1="22.733" x2="22.86" y2="23.114" width="0.254" layer="1"/>
<wire x1="22.86" y1="23.114" x2="23.495" y2="23.114" width="0.254" layer="1"/>
<wire x1="23.495" y1="23.114" x2="23.876" y2="23.114" width="0.254" layer="1"/>
<wire x1="23.876" y1="23.114" x2="24.511" y2="23.749" width="0.254" layer="1"/>
<wire x1="24.511" y1="23.749" x2="25.527" y2="23.749" width="0.254" layer="1"/>
<wire x1="26.162" y1="23.114" x2="26.543" y2="23.114" width="0.254" layer="1"/>
<wire x1="25.527" y1="23.749" x2="26.162" y2="23.114" width="0.254" layer="1"/>
<wire x1="26.543" y1="23.114" x2="26.543" y2="21.36" width="0.254" layer="1"/>
<wire x1="26.543" y1="21.36" x2="26.519" y2="21.336" width="0.254" layer="1"/>
<wire x1="23.519" y1="21.336" x2="23.519" y2="23.09" width="0.254" layer="1"/>
<wire x1="23.519" y1="23.09" x2="23.495" y2="23.114" width="0.254" layer="1"/>
<via x="23.114" y="24.257" extent="1-16" drill="0.55"/>
<wire x1="23.114" y1="24.257" x2="23.495" y2="23.876" width="0.254" layer="1"/>
<wire x1="23.495" y1="23.876" x2="23.495" y2="23.114" width="0.254" layer="1"/>
<wire x1="7.34244375" y1="13.02373125" x2="6.67373125" y2="13.02373125" width="0.254" layer="1"/>
<wire x1="6.67373125" y1="13.02373125" x2="5.969" y2="12.319" width="0.254" layer="1"/>
<wire x1="7.34244375" y1="11.82373125" x2="6.74373125" y2="11.82373125" width="0.254" layer="1"/>
<wire x1="6.74373125" y1="11.82373125" x2="5.969" y2="11.049" width="0.254" layer="1"/>
<wire x1="7.34244375" y1="10.62373125" x2="6.68673125" y2="10.62373125" width="0.254" layer="1"/>
<wire x1="6.68673125" y1="10.62373125" x2="5.969" y2="9.906" width="0.254" layer="1"/>
<wire x1="7.34244375" y1="9.42373125" x2="6.62973125" y2="9.42373125" width="0.254" layer="1"/>
<wire x1="6.62973125" y1="9.42373125" x2="5.969" y2="8.763" width="0.254" layer="1"/>
<wire x1="8.94244375" y1="3.12373125" x2="8.1047125" y2="2.286" width="0.254" layer="1"/>
<wire x1="8.1047125" y1="2.286" x2="6.858" y2="2.286" width="0.254" layer="1"/>
<wire x1="6.858" y1="2.286" x2="6.477" y2="2.667" width="0.254" layer="1"/>
<wire x1="6.477" y1="2.667" x2="6.477" y2="3.937" width="0.254" layer="1"/>
<wire x1="6.477" y1="3.937" x2="5.842" y2="4.572" width="0.254" layer="1"/>
<wire x1="5.842" y1="4.572" x2="5.461" y2="4.572" width="0.254" layer="1"/>
<wire x1="19.74244375" y1="3.12373125" x2="20.447" y2="2.419175" width="0.254" layer="1"/>
<wire x1="20.447" y1="2.419175" x2="20.447" y2="2.413" width="0.254" layer="1"/>
<wire x1="20.447" y1="2.413" x2="21.844" y2="2.413" width="0.254" layer="1"/>
<wire x1="21.844" y1="2.413" x2="22.352" y2="2.921" width="0.254" layer="1"/>
<wire x1="24.003" y1="11.684" x2="24.003" y2="10.668" width="0.254" layer="1"/>
<wire x1="24.003" y1="10.668" x2="22.987" y2="10.668" width="0.254" layer="1"/>
<wire x1="21.34244375" y1="10.62373125" x2="21.3867125" y2="10.668" width="0.254" layer="1"/>
<wire x1="21.3867125" y1="10.668" x2="22.479" y2="10.668" width="0.254" layer="1"/>
<wire x1="22.479" y1="10.668" x2="22.987" y2="10.668" width="0.254" layer="1"/>
<wire x1="22.479" y1="13.97" x2="22.479" y2="10.668" width="0.254" layer="1"/>
<wire x1="23.114" y1="24.257" x2="22.352" y2="24.257" width="0.508" layer="16"/>
<wire x1="22.352" y1="24.257" x2="21.971" y2="24.638" width="0.508" layer="16"/>
<wire x1="21.971" y1="24.638" x2="6.223" y2="24.638" width="0.508" layer="16"/>
<wire x1="6.223" y1="24.638" x2="5.969" y2="24.384" width="0.508" layer="16"/>
<wire x1="5.969" y1="24.384" x2="5.969" y2="17.399" width="0.508" layer="16"/>
<wire x1="5.969" y1="8.763" x2="5.969" y2="8.255" width="0.508" layer="16"/>
<wire x1="5.969" y1="8.255" x2="5.461" y2="7.747" width="0.508" layer="16"/>
<wire x1="5.461" y1="7.747" x2="5.461" y2="4.572" width="0.508" layer="16"/>
<wire x1="22.352" y1="2.921" x2="25.4" y2="2.921" width="0.508" layer="16"/>
<wire x1="25.4" y1="2.921" x2="25.781" y2="3.302" width="0.508" layer="16"/>
<wire x1="22.352" y1="2.921" x2="24.13" y2="4.699" width="0.508" layer="16"/>
<wire x1="24.13" y1="4.699" x2="24.13" y2="8.636" width="0.508" layer="16"/>
<wire x1="24.13" y1="8.636" x2="22.987" y2="9.779" width="0.508" layer="16"/>
<wire x1="5.461" y1="4.572" x2="5.461" y2="2.794" width="0.508" layer="16"/>
<wire x1="5.461" y1="2.794" x2="6.604" y2="1.651" width="0.508" layer="16"/>
<wire x1="22.352" y1="1.397" x2="22.352" y2="2.921" width="0.508" layer="16"/>
<wire x1="5.969" y1="17.399" x2="6.223" y2="17.145" width="0.508" layer="16"/>
<wire x1="6.223" y1="13.716" x2="5.334" y2="12.827" width="0.508" layer="16"/>
<wire x1="5.334" y1="12.827" x2="5.334" y2="9.652" width="0.508" layer="16"/>
<wire x1="5.334" y1="9.652" x2="5.969" y2="9.017" width="0.508" layer="16"/>
<wire x1="5.969" y1="9.017" x2="5.969" y2="8.763" width="0.508" layer="16"/>
<wire x1="6.223" y1="17.145" x2="6.223" y2="13.716" width="0.508" layer="16"/>
<wire x1="22.987" y1="9.779" x2="22.987" y2="10.668" width="0.508" layer="16"/>
<wire x1="6.604" y1="1.651" x2="14.732" y2="1.651" width="0.508" layer="16"/>
<wire x1="14.732" y1="1.651" x2="14.986" y2="1.397" width="0.508" layer="16" curve="90"/>
<wire x1="14.986" y1="1.397" x2="22.352" y2="1.397" width="0.508" layer="16"/>
</signal>
<signal name="3.3V">
<polygon width="0.3048" layer="15">
<vertex x="32.7025" y="38.1"/>
<vertex x="54.2925" y="38.1"/>
<vertex x="54.2925" y="27.305"/>
<vertex x="32.7025" y="27.305"/>
</polygon>
</signal>
<signal name="SPI_AK">
<contactref element="U1" pad="22"/>
<contactref element="J2" pad="4"/>
<wire x1="21.34244375" y1="4.62373125" x2="22.27673125" y2="4.62373125" width="0.254" layer="1"/>
<wire x1="22.733" y1="5.08" x2="22.733" y2="8.382" width="0.254" layer="1"/>
<wire x1="22.733" y1="8.382" x2="24.003" y2="9.652" width="0.254" layer="1"/>
<wire x1="24.003" y1="9.652" x2="24.765" y2="9.652" width="0.254" layer="1"/>
<wire x1="24.765" y1="9.652" x2="25.781" y2="10.668" width="0.254" layer="1"/>
<wire x1="25.781" y1="10.668" x2="25.781" y2="10.922" width="0.254" layer="1"/>
<wire x1="22.27673125" y1="4.62373125" x2="22.733" y2="5.08" width="0.254" layer="1"/>
</signal>
<signal name="RST_N">
<contactref element="U1" pad="18"/>
<contactref element="J2" pad="3"/>
<wire x1="16.14244375" y1="3.12373125" x2="16.14244375" y2="2.14555625" width="0.254" layer="1"/>
<wire x1="16.14244375" y1="2.14555625" x2="16.51" y2="1.778" width="0.254" layer="1"/>
<wire x1="16.51" y1="1.778" x2="22.606" y2="1.778" width="0.254" layer="1"/>
<wire x1="22.606" y1="1.778" x2="23.241" y2

extension: brd


text:
="2.413" width="0.254" layer="1"/>
<wire x1="23.241" y1="2.413" x2="23.241" y2="4.445" width="0.254" layer="1"/>
<wire x1="23.241" y1="4.445" x2="23.495" y2="4.699" width="0.254" layer="1"/>
<wire x1="23.495" y1="4.699" x2="23.495" y2="6.731" width="0.254" layer="1"/>
<wire x1="25.146" y1="8.382" x2="25.781" y2="8.382" width="0.254" layer="1"/>
<wire x1="23.495" y1="6.731" x2="25.146" y2="8.382" width="0.254" layer="1"/>
</signal>
<signal name="ANT">
<contactref element="U1" pad="31"/>
<contactref element="C3" pad="1"/>
<wire x1="21.34244375" y1="15.42373125" x2="24.09336875" y2="15.42373125" width="0.254" layer="1"/>
<wire x1="24.09336875" y1="15.42373125" x2="24.0993" y2="15.4178" width="0.254" layer="1"/>
</signal>
<signal name="3V3">
<contactref element="U1" pad="2"/>
<contactref element="C1" pad="2"/>
<contactref element="J1" pad="4"/>
<contactref element="C2" pad="+"/>
<wire x1="5.2824875" y1="15.40926875" x2="5.29695" y2="15.42373125" width="0.254" layer="1"/>
<wire x1="2.921" y1="10.922" x2="2.921" y2="15.38394375" width="0.6096" layer="1"/>
<wire x1="2.921" y1="15.38394375" x2="2.946325" y2="15.40926875" width="0.254" layer="1"/>
<wire x1="2.946325" y1="15.40926875" x2="5.2824875" y2="15.40926875" width="0.4064" layer="1"/>
<wire x1="5.29695" y1="15.42373125" x2="7.34244375" y2="15.42373125" width="0.4064" layer="1"/>
</signal>
<signal name="SPI_SDI">
<contactref element="U1" pad="9"/>
<contactref element="J1" pad="3"/>
<wire x1="2.921" y1="8.382" x2="4.826" y2="8.382" width="0.254" layer="1"/>
<wire x1="4.826" y1="8.382" x2="6.18426875" y2="7.02373125" width="0.254" layer="1"/>
<wire x1="6.18426875" y1="7.02373125" x2="7.34244375" y2="7.02373125" width="0.254" layer="1"/>
</signal>
<signal name="SPI_CS">
<contactref element="U1" pad="10"/>
<contactref element="J1" pad="2"/>
<wire x1="2.921" y1="5.842" x2="2.93926875" y2="5.82373125" width="0.254" layer="1"/>
<wire x1="2.93926875" y1="5.82373125" x2="7.34244375" y2="5.82373125" width="0.254" layer="1"/>
</signal>
<signal name="SPI_SCLK">
<contactref element="U1" pad="13"/>
<contactref element="J1" pad="1"/>
<wire x1="10.16" y1="3.106175" x2="10.14244375" y2="3.12373125" width="0.254" layer="1"/>
<wire x1="2.921" y1="3.302" x2="4.699" y2="3.302" width="0.254" layer="1"/>
<wire x1="4.699" y1="3.302" x2="4.699" y2="1.651" width="0.254" layer="1"/>
<wire x1="4.699" y1="1.651" x2="5.334" y2="1.016" width="0.254" layer="1"/>
<wire x1="5.334" y1="1.016" x2="9.271" y2="1.016" width="0.254" layer="1"/>
<wire x1="9.271" y1="1.016" x2="10.16" y2="1.905" width="0.254" layer="1"/>
<wire x1="10.16" y1="1.905" x2="10.16" y2="3.106175" width="0.254" layer="1"/>
</signal>
<signal name="SPI_SDO">
<contactref element="U1" pad="14"/>
<contactref element="J2" pad="2"/>
<wire x1="11.34244375" y1="3.12373125" x2="11.34244375" y2="1.61155625" width="0.254" layer="1"/>
<wire x1="11.34244375" y1="1.61155625" x2="11.938" y2="1.016" width="0.254" layer="1"/>
<wire x1="11.938" y1="1.016" x2="22.987" y2="1.016" width="0.254" layer="1"/>
<wire x1="22.987" y1="1.016" x2="24.257" y2="2.286" width="0.254" layer="1"/>
<wire x1="24.257" y1="2.286" x2="24.257" y2="4.064" width="0.254" layer="1"/>
<wire x1="24.257" y1="4.064" x2="25.781" y2="5.588" width="0.254" layer="1"/>
<wire x1="25.781" y1="5.588" x2="25.781" y2="5.842" width="0.254" layer="1"/>
</signal>
<signal name="ESD">
<contactref element="C3" pad="2"/>
<contactref element="R1" pad="1"/>
<contactref element="L1" pad="1"/>
<wire x1="25.0243" y1="15.4178" x2="25.0243" y2="17.0582" width="0.254" layer="1"/>
<wire x1="25.0243" y1="17.0582" x2="25.019" y2="17.0635" width="0.254" layer="1"/>
<wire x1="25.0243" y1="15.4178" x2="26.6647" y2="15.4178" width="0.254" layer="1"/>
<wire x1="26.6647" y1="15.4178" x2="26.67" y2="15.4231" width="0.254" layer="1"/>
</signal>
<signal name="RF">
<contactref element="R1" pad="2"/>
<contactref element="RF1" pad="D"/>
<wire x1="25.019" y1="17.9885" x2="25.019" y2="19.812" width="0.254" layer="1"/>
</signal>
</signals>
<mfgpreviewcolors>
<mfgpreviewcolor name="soldermaskcolor" color="0xC8008000"/>
<mfgpreviewcolor name="silkscreencolor" color="0xFFFEFEFE"/>
<mfgpreviewcolor name="backgroundcolor" color="0xFF282828"/>
<mfgpreviewcolor name="coppercolor" color="0xFFFFBF00"/>
<mfgpreviewcolor name="substratecolor" color="0xFF786E46"/>
</mfgpreviewcolors>
</board>
</drawing>
<compatibility>
<note version="6.3" minversion="6.2.2" severity="warning">
Since Version 6.2.2 text objects can contain more than one line,
which will not be processed correctly with this version.
</note>
</compatibility>
</eagle>


text:
package device

import (
	"runtime"
	"syscall"
)

func GetCoreOfCpu() int64 {
	return int64(runtime.NumCPU()) - 1
}

func GetTotalMemory() int64 {
	in := &syscall.Sysinfo_t{}
	err := syscall.Sysinfo(in)
	if err != nil {
		return 0
	}
	total := ((int64(in.Totalram) * int64(in.Unit)) / int64(1048576)) - 512
	return total
}

func GetFreeCpu() int64 {
	return GetCoreOfCpu() - CPU_USAGE
}

func GetFreeMemmory() int64 {
	return int64(GetTotalMemory()) - int64(MEMORY_USAGE)
}

branch_name: refs/heads/main

extension: go


text:
package examples

import (
	"fmt"

	"github.com/MasterOfBinary/go-opencl/opencl"
)

func ExampleSimple() {
	const (
		dataSize = 32

		programCode = `
kernel void kern(global float* out)
{
	size_t i = get_global_id(0);
	out[i] = i;
}
`
	)

	var device = getFirstDevice(opencl.DeviceTypeAll)

	context, err := device.CreateContext()
	if err != nil {
		panic(err)
	}
	defer context.Release()

	var commandQueue opencl.CommandQueue
	commandQueue, err = context.CreateCommandQueue(device)
	if err != nil {
		panic(err)
	}
	defer commandQueue.Release()

	var program opencl.Program
	program, err = context.CreateProgramWithSource(programCode)
	if err != nil {
		panic(err)
	}
	defer program.Release()

	var log string
	err = program.Build(device, &log)
	if err != nil {
		fmt.Println(log)
		panic(err)
	}

	kernel, err := program.CreateKernel("kern")
	if err != nil {
		panic(err)
	}
	defer kernel.Release()

	buffer, err := context.CreateBuffer([]opencl.MemFlags{opencl.MemWriteOnly}, dataSize*4)
	if err != nil {
		panic(err)
	}
	defer buffer.Release()

	err = kernel.SetArg(0, buffer.Size(), &buffer)
	if err != nil {
		panic(err)
	}

	err = commandQueue.EnqueueNDRangeKernel(kernel, 1, []uint64{dataSize})
	if err != nil {
		panic(err)
	}

	commandQueue.Flush()
	commandQueue.Finish()

	data := make([]float32, dataSize)

	err = commandQueue.EnqueueReadBuffer(buffer, true, data)
	if err != nil {
		panic(err)
	}

	for _, item := range data {
		fmt.Printf("%v ", item)
	}
	fmt.Println()
	// Output:
	// 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31
}


text:
// Copyright © 2018 Shawn Catanzarite <me@shawncatz.com>
//
// 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
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.

package cmd

import (
	"fmt"
	"sort"

	"github.com/spf13/cobra"
)

// sprintCmd represents the sprint command
var sprintCmd = &cobra.Command{
	Use:   "sprint",
	Short: "List sprints",
	Long:  "List sprints",
	Run: func(cmd *cobra.Command, args []string) {
		a, err := cmd.Flags().GetBool("all")
		if err != nil {
			printErr("failed to get option 'all'")
		}
		boards, err := getBoards()
		if err != nil {
			printErr("error finding boards: %s\n", err)
			return
		}
		for _, e := range boards {
			fmt.Printf("%d: (%s) %s\n", e.ID, e.Type, e.Name)
			sprints, err := getSprints(e.ID, a)
			if err != nil {
				printErr("error finding sprints: %s\n", err)
				return
			}

			sort.Sort(SprintCompletedDate(sprints))
			for _, s := range sprints {
				if a || s.State != "closed" {
					fmt.Printf("   %3d: (%s) %s\n", s.ID, s.EndDate, s.Name)
				}
			}
		}
	},
}

func init() {
	rootCmd.AddCommand(sprintCmd)

	// Here you will define your flags and configuration settings.

	// Cobra supports Persistent Flags which will work for this command
	// and all subcommands, e.g.:
	// sprintCmd.PersistentFlags().String("foo", "", "A help for foo")

	// Cobra supports local flags which will only run when this command
	// is called directly, e.g.:
	sprintCmd.Flags().BoolP("all", "a", false, "Show all sprints")
}

repository: shawncatz/jira

repo_name: shawncatz/jira


text:
#include "preamble.h"
#if MODEL == 11

#include <stdio.h>
#include <stdlib.h>
#include <math.h>
#include <time.h>
#include <string.h>

#include "filzbach.h"

void pause(){PAUSE}

/************************************************************/
/* global variables                                         */
/************************************************************/

/* some things needed for book-keeping (see below for how each one is used) */
int numdata;

/************************************************************/
/* function headers                                         */
/************************************************************/

void fake_data();
void read_data();
void setup_parameters();
void fit_model();
void final_output();

/* custom functions */
double model_biomass(int ii, int code);

/************************************************************/
void fake_data()
{
	/* use this to create fake data to test your analysis, before you try real data */
	/* do we get these parameters back out again? */
	double meanmassabv, meanmassblw, biomassabv, biomassblw, G0=0.05, vinside=0.20, vfert=0.40, vshade=-0.30, mref=5.0, sigma = 0.20;
	double potvolume,alpha=5.0,beta=0.50;
	double inside, fert, shade, day;
	double sigmaabv,sigmablw;
	int ii;

	/* create internal table to hold data */
	table_create("mydata");
	table_setnumrows("mydata", 500);
	table_addcolumn("mydata", "inside");
	table_addcolumn("mydata", "fert");
	table_addcolumn("mydata", "shade");
	table_addcolumn("mydata", "potvolume");
	table_addcolumn("mydata", "day");
	table_addcolumn("mydata", "biomassabv");
	table_addcolumn("mydata", "biomassblw");
	table_addcolumn("mydata", "predmass1"); // this for model predictions
	table_addcolumn("mydata", "predmass2"); // this for model predictions

	sigmaabv = parameter_getvalue("sigmaabv");
	sigmablw = parameter_getvalue("sigmablw");

	for(ii=1 ; ii<=500 ; ii++)
	{
	    /* draw random conditions and sample day */
		if(random(0.0,1.0)<0.50)
			inside = 1.0;
		else
			inside = 0.0;
		if(random(0.0,1.0)<0.50)
			shade = 1.0;
		else
			shade = 0.0;
		potvolume = ((double)((int)(random(0.0,1.0)*5.0)))/2.0;
		fert = (double)((int)(random(0.0,1.0)*5.0));
		day = random(0.0,1.0)*100.0;

		/* write the y value to the data (as if reading real data) */
		table_writevalue("mydata","inside",ii,inside);
		table_writevalue("mydata","shade",ii,shade);
		table_writevalue("mydata","fert",ii,fert);
		table_writevalue("mydata","potvolume",ii,potvolume);
		table_writevalue("mydata","day",ii,day);

		/* get expected size after correct no. days */
		meanmassabv = model_biomass(ii,0);
		meanmassblw = model_biomass(ii,1);

		/* generate actual biomass as a draw from a log-normal around this expectation */
		biomassabv = exp(normal_draw(log(meanmassabv),sigmaabv));
		biomassblw = exp(normal_draw(log(meanmassblw),sigmablw));

		/* write fake biomasses into data table */
		table_writevalue("mydata","biomassabv",ii,biomassabv);
		table_writevalue("mydata","biomassblw",ii,biomassblw);
	}

	/* how many data in all? */
	numdata = 500;

	/* immediately output fake data */
	table_output("mydata","./workspace/fake_data.txt");

	return;
}

/************************************************************/
double model_biomass(int ii, int code)
{
	int dd=0;
	double grate, grateabv, grateblw, massabv, massblw;
	double f;
	double imassabv, imassblw, G0, vinside, vshade, vfert, alpha, beta, gamma0;
	double inside, shade, fert, potv, day, gmax, mref;
	double gamma1;

	/* get model parameters from list held by metropolis header */
	imassabv = parameter_getvalue("inmassabv");
	imassblw = parameter_getvalue("inmassblw");
	G0 = parameter_getvalue("G0");
	// mref = parameter_getvalue("mref");
	vinside = parameter_getvalue("vinside");
	vshade = parameter_getvalue("vshade");
	vfert = parameter_getvalue("vfert");
	alpha = parameter_getvalue("alpha");
	beta = parameter_getvalue("beta");
	gamma0 = parameter_getvalue("gamma0");
	gamma1 = parameter_getvalue("gamma1");

	/* get conditions for this plant */
	inside = table_getvalue("mydata","inside",ii);
	shade = table_getvalue("mydata","shade",ii);
	fert = table_getvalue("mydata","fert",ii);
	day = table_getvalue("mydata","day",ii);
	potv = table_getvalue("mydata","potvolume",ii);

	/* calculate gmax */
	gmax = G0 * exp( vinside*inside + vshade*shade + vfert*fert );
	gmax *= pow(potv,beta);
	/* calculate mrepow(potv,beta);f as a function of pot volume */
	mref = alpha * pow(potv,beta);

	massabv = imassabv;
	massblw = imassblw;
	for(dd=0 ; dd<(int)day ; dd++)
	{
		if(massabv<mref)
			grate = gmax * (massabv/mref);
		else
			grate = gmax;

		f = logistic(gamma0 + gamma1*fert);

		grateabv = f * grate;
		grateblw = (1.0-f) * grate;

		massabv+=grateabv;
		massblw+=grateblw;
	}

	if(code==0)
		return massabv;
	else
		return massblw;
}

/************************************************************/
void read_data()
{
	/* read from external file to internal table */

    table_read("mydata","./workspace/EgDataz1_plantgrowth.txt",5);
	numdata = table_numrows("mydata");

	table_addcolumn("mydata","predmass1"); // this for model predictions
	table_addcolumn("mydata","predmass2"); // this for model predictions

	return;

}

/************************************************************/
void setup_parameters()
{
	/* each line defines one new parameter for our model */

	parameter_create("inmassabv",  0.00010, 1.0,  0.25,  1, 0, 1);
	parameter_create("inmassblw",  0.00010, 1.0,  0.25,  1, 0, 1);
	parameter_create("G0",         0.00010, 1.0,  0.050, 1, 0, 1);
//  parameter_create("mref",       0.10,    20.0, 2.0,   1, 0, 1);
	parameter_create("vinside",   -2.0,     2.0,  0.20,  0, 0, 1);
	parameter_create("vshade",    -2.0,     2.0, -0.20,  0, 0, 1);
	parameter_create("vfert",     -2.0,     2.0,  0.30,  0, 0, 1);
	parameter_create("sigmaabv",   0.0010,  2.0,  0.20,  1, 0, 1);
	parameter_create("sigmablw",   0.0010,  2.0,  0.20,  1, 0, 1);
	parameter_create("alpha",      0.10,    20.0, 2.0,   1, 0, 1);
	parameter_create("beta",       0.10,    1.90, 0.50,  1, 0, 1);
	parameter_create("gamma0",    -5.0,     5.0,  1.0,   0, 0, 1);
	parameter_create("gamma1",    -0.50,    0.50, 0.10,  0, 0, 1);

	parameter_showall();

	PAUSE

	return;
}
/************************************************************/

void likelihood()
{
	/* writes the log-likelihood given current parameter values */
	int ii;
	double prob1,prob2;
	double omassabv, omassblw;
	double sigmaabv, sigmablw;
	double pmassabv, pmassblw;

	/* set sum over log-likelihood to zero */
	set_metr_ltotnew(0.0);
	set_metr_number_ok(0);

	/* get current values for noise parameters */
	sigmaabv = parameter_getvalue("sigmaabv");
	sigmablw = parameter_getvalue("sigmablw");

	/* loop over data */
	for(ii=1 ; ii<=numdata ; ii++)
	{

		/* get observed biomass */
		omassabv = table_getvalue("mydata","biomassabv",ii);
		omassblw = table_getvalue("mydata","biomassblw",ii);

		/* predict expected final biomass */
		pmassabv = model_biomass(ii, 0);
		pmassblw = model_biomass(ii, 1);

		/* write pmass into prediction column (nb would not be allowable under OMP parallel chains: serial chains only) */
		table_writevalue("mydata","predmass1",ii,pmassabv);
		/* write the second column, which has noise like the real data */
		table_writevalue("mydata","predmass2",ii,pmassblw);

		/* get probability for these observed masses */
		prob1 = normal_density(log(omassabv),log(pmassabv),sigmaabv);
		prob2 = normal_density(log(omassblw),log(pmassblw),sigmablw);
		inc_metr_ltotnew(log(prob1) + log(prob2));
		inc_metr_number_ok(2);
	}

	return;
}

/************************************************/
void final_output()
{
	char fname[100];

        /* create file name for output -- outp is the 'path' */
        get_filzbach_path(fname, 100);
	/* now your bit */
	strcat(fname,"_my_output.txt");

	/* we're ouputting predictions */
	/* in this case, one set of preds with params set at posterior means */
	/* but could output an ensemble of predictions, with each set with param vector drawn at random */
	/* see the commented out line below... */
	params_set_to_posterior_mean();
	// params_draw_random_vector();
	/* in this case it's the likelihood function that writes the preds into the table */
	likelihood();
	/* output */
	table_output("mydata",fname);

	return;

}

/* ************************************************* */
/* The control function that calls everything else.  */
/* ************************************************* */
int main()
{
	atexit(pause);
  // set the likelihood function pointer
  pfn_likelihood = &likelihood;

  initialize_filzbach();
  name_analysis("Egz1PlantGrowth");
  setup_parameters();
  fake_data(); // either fake data (to test routine) or read data (to do for real)
  // read_data();
  runmcmc(50000, 50000, 5000, 5000);
  final_output();
}

#endif

repository: vassilyl/Filzbach

repo_name: vassilyl/Filzbach


text:
// gotodlg.cpp : implementation file
//
// This is a part of the Microsoft Foundation Classes C++ library.
// Copyright (c) Microsoft Corporation.  All rights reserved.
//
// This source code is only intended as a supplement to the
// Microsoft Foundation Classes Reference and related
// electronic documentation provided with the library.
// See these sources for detailed information regarding the
// Microsoft Foundation Classes product.
//

#include "stdafx.h"
#include "np.h"
#include "gotodlg.h"

#ifdef _DEBUG
#undef THIS_FILE
static char BASED_CODE THIS_FILE[] = __FILE__;
#endif

/////////////////////////////////////////////////////////////////////////////
// CGotoDlg dialog

CGotoDlg::CGotoDlg(CWnd* pParent /*=NULL*/)
    : CDialog(CGotoDlg::IDD, pParent)
{
    //{{AFX_DATA_INIT(CGotoDlg)
    m_nLineNum = 1;
    //}}AFX_DATA_INIT
}

void CGotoDlg::DoDataExchange(CDataExchange* pDX)
{
    CDialog::DoDataExchange(pDX);
    //{{AFX_DATA_MAP(CGotoDlg)
    DDX_Text(pDX, IDC_GOTO_LINE, m_nLineNum);
    //}}AFX_DATA_MAP
}

BEGIN_MESSAGE_MAP(CGotoDlg, CDialog)
    //{{AFX_MSG_MAP(CGotoDlg)
    //}}AFX_MSG_MAP
END_MESSAGE_MAP()

void CGotoDlg::OnCancel()
{
    // TODO: Add extra cleanup here

    CDialog::OnCancel();
}

repository: JetAr/ZDoc

repo_name: JetAr/ZDoc


text:
# Copyright (C) 2016 Maciej Sobkowski <maciejjo@maciejjo.pl>
# Released under the MIT license (see COPYING.MIT for the terms)

DESCRIPTION = "node.js realtime framework server"
HOMEPAGE = "http://socket.io/"
SECTION = "js/devel"
LICENSE = "MIT"
LIC_FILES_CHKSUM = "file://${COREBASE}/LICENSE;md5=4d92cd373abda3937c2bc47fbc49d690"

DEPENDS = "opencv"
RDEPENDS_${PN} = "opencv"

PACKAGE_ARCH = "all"

SRC_URI = "git://github.com/peterbraden/node-opencv.git;branch=master"
SRCREV = "870ffb56c2baeea0b0086124fe89c424ed2e0609"

do_compile[noexec] = "1"

inherit npm-install-global

S = "${WORKDIR}/git"

repository: maciejjo/meta-pavubot

repo_name: maciejjo/meta-pavubot

extension: bb