Skip to content

Instantly share code, notes, and snippets.

@caiorss
caiorss / regression.m
Created December 25, 2016 21:09
matlab
% CODED BY GALINA STRELTSOVA
%
% REGRESSION ANALYSIS OF DATA USING 2 DIFFERENT IMPLEMENTATIONS OF LINEAR
% REGRESSION, PRINCIPAL COMPONENT ANALYSIS DIMENSIONALITY REDUCTION,
% PRINCIPAL COMPONENT ANALYSIS REGRESSION AND PARTIAL LEAST SQUARES
% REGRESSION. THESE METHODS ARE COMPARED USING PLOTS, WHICH REPRESENT
% CORRESPONDING RESIDUALS OF THE DATA TO FIND OUT WHICH TYPE OF REGRESSION
% WORKS BETTER FOR US. ANALYSIS IS PERFORMED USING MOST POPULAR AND COMMON
% ALGORITHMS OF REGRESSION
%
@caiorss
caiorss / matlab script.m
Created December 25, 2016 21:09
matlab
% POLNEWTON Calcola i coefficienti del polinomio interpolatore
% utilizzando la forma di Newton con le differenze
% divise
%
% Uso:
% c = polnewton (x,y)
%
% Dati di ingresso:
% x vettore dei nodi
% y vettore dei valori della funzione da interpolare nei nodi
@caiorss
caiorss / zadanie1.m
Created December 25, 2016 21:08 — forked from szubster/zadanie1.m
matlab
clear all;
Fs=32768;
x =linspace(0,1,Fs);
y=sin(2*pi*0.133*Fs*x)/2 + sin(2*pi*sqrt(2)/10*Fs*x)/2;
sygnal_widmo(y,'przed');
y2 = y * 10;
y2 = ceil(y2);
@caiorss
caiorss / Icon.cs
Created December 20, 2016 00:19
Load window icon from assembly
using System;
using System.Resources;
class MyClass : Form {
MyClass() {
// Stuff
ResourceManager resources = new ResourceManager("AssemblyName.ResourceFile", GetType().Assembly);
this.Icon = ((System.Drawing.Icon)(resources.GetObject("ResourceName")));
}
}
@caiorss
caiorss / FindConflictingReferences.cs
Created December 20, 2016 00:17 — forked from brianlow/FindConflictingReferences.cs
Find conflicting assembly references
using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Reflection;
using NUnit.Framework;
namespace MyProject
{
[TestFixture]
@caiorss
caiorss / ManifestReader.cs
Created December 19, 2016 21:33 — forked from DevJohnC/ManifestReader.cs
Reading a custom attribute from an assembly without loading it for execution.
//
// Author: John Carruthers ([email protected])
//
// Copyright (C) 2014 John Carruthers
//
// Permission is hereby granted, free of charge, to any person obtaining
// a copy of this software and associated documentation files (the
// "Software"), to deal in the Software without restriction, including
// without limitation the rights to use, copy, modify, merge, publish,
// distribute, sublicense, and/or sell copies of the Software, and to
@caiorss
caiorss / assembly_metadata.cs
Created December 19, 2016 21:21 — forked from leandrosilva/assembly_metadata.cs
Live samples on how to read the metadatas of .NET solutions, projects and assemblies with C#
using System;
using System.Reflection;
using System.Security.Permissions;
[assembly:AssemblyVersionAttribute("1.0.2000.0")]
public class Metadata
{
private int factor;
@caiorss
caiorss / build.fsx
Created December 19, 2016 20:00 — forked from RussellPolitzky/build.fsx
Sample FAKE build script.
#r @"..\packages\FAKE.2.15.4\tools\FakeLib.dll"
open System
open Fake
open Fake.FileSystemHelper
open System.Diagnostics
let baseDir = __SOURCE_DIRECTORY__
let targetPlatform = "net-4.5"
let nunitPath = @"C:\Program Files (x86)\NUnit 2.6.3\bin"
@caiorss
caiorss / Setup.fsx
Created December 19, 2016 19:59 — forked from ovatsus/Setup.fsx
Script to setup F# Interactive session, loading everything in the current solution
#r "System.Xml.Linq"
open System
open System.IO
open System.Xml.Linq
let script = seq {
//TODO: this currently loads fsproj's in alphabeticall order, we should instead
//build the dependencies graph of the fsproj's and load them in topological sort order