Install and use qwt under macOS*:
After downloading it from here https://sourceforge.net/projects/qwt/:
cd qwt-6.1.5
mkdir build && cd build
qmake ..
make -j4
sudo make install # this command install stuff inside /usr/local/| *.user | |
| Makefile* | |
| .qmake.stash | |
| release | |
| debug | |
| *.swp | |
| *~ |
| #include "notify.h" | |
| #include <QPixmapCache> | |
| #include <QApplication> | |
| #include <QDesktopWidget> | |
| #include <QPainter> | |
| #include <QTimer> | |
| Notify::Notify(QWidget* parent) : | |
| QWidget(parent) |
| #pragma once | |
| #include <stdio.h> | |
| #include <time.h> | |
| void StartTimer(void); | |
| double StopTimer(void); |
After downloading it from here https://sourceforge.net/projects/qwt/:
cd qwt-6.1.5
mkdir build && cd build
qmake ..
make -j4
sudo make install # this command install stuff inside /usr/local/| ############################################################################################## | |
| ### K-Means Python Implementation ### | |
| ### http://konukoii.com/blog/2017/01/15/5-min-tutorial-k-means-clustering-in-python/ ### | |
| ############################################################################################## | |
| import random | |
| import math | |
| #Euclidian Distance between two d-dimensional points | |
| def eucldist(p0,p1): |
| #!/usr/bin/python2 | |
| # Copyright (C) 2016 Sixten Bergman | |
| # License WTFPL | |
| # | |
| # This program is free software. It comes without any warranty, to the extent | |
| # permitted by applicable law. | |
| # You can redistribute it and/or modify it under the terms of the Do What The | |
| # Fuck You Want To Public License, Version 2, as published by Sam Hocevar. See |
| <Style x:Key="ExpanderRightHeaderStyle" TargetType="{x:Type ToggleButton}"> | |
| <Setter Property="Template"> | |
| <Setter.Value> | |
| <ControlTemplate TargetType="{x:Type ToggleButton}"> | |
| <Border Padding="{TemplateBinding Padding}"> | |
| <Grid Background="Transparent" SnapsToDevicePixels="False"> | |
| <Grid.RowDefinitions> | |
| <RowDefinition Height="19"/> | |
| <RowDefinition Height="*"/> | |
| </Grid.RowDefinitions> |
| <Window x:Class="Sandbox.MainWindow" | |
| xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" | |
| xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" | |
| Title="MainWindow" Height="900" Width="1100"> | |
| <StackPanel> | |
| <StackPanel Margin="20,0,0,0"> | |
| <RadioButton Content="Choice One"/> | |
| <RadioButton Content="Choice Two"/> | |
| <RadioButton Content="Choice Three"/> |
| <Application x:Class="LOSD.App" | |
| xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" | |
| xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" | |
| xmlns:local="clr-namespace:LOSD" | |
| Startup="App_Startup" | |
| Exit="App_Exit" | |
| > | |
| <Application.Resources> | |
| </Application.Resources> |
| class Base : INotifyPropertyChanged | |
| { | |
| public event PropertyChangedEventHandler PropertyChanged; | |
| protected virtual void OnPropertyChanged(string propertyName) | |
| { | |
| this.VerifyPropertyName(propertyName); | |
| PropertyChangedEventHandler handler = this.PropertyChanged; | |
| if (handler != null) | |
| { |