Skip to content

Instantly share code, notes, and snippets.

View pureexe's full-sized avatar
💻
No

Pakkapon Phongthawee pureexe

💻
No
View GitHub Profile
@pureexe
pureexe / utserver.conf
Last active February 22, 2019 13:42 — forked from jpillora/utserver.conf
utserver config
##
## utserver.conf
## Configuration settings template for μTorrent for Linux.
## Taken from μTorrent Server manual for version alpha-3.3.
## ©2013 BitTorrent, Inc.
## Compiled by Rich.T.
##
##
## Command-line Arguments
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
PS C:\Users\pakkapon\Documents\Github\matlab-inpaint-speed-analysis\experiment-05\avs> .\test.ps1
Working on splitbergman-normal.avs
Guessed Channel Layout for Input Stream #0.1 : stereo
Input #0, avisynth, from 'splitbergman-normal.avs':
Duration: 00:01:00.06, start: 0.000000, bitrate: 0 kb/s
Stream #0:0: Video: rawvideo (BGR[24] / 0x18524742), bgr24, 720x70, 23.98 fps, 23.98 tbr, 23.98 tbn, 23.98 tbc
Stream #0:1: Audio: pcm_f32le, 48000 Hz, stereo, flt, 3072 kb/s
Guessed Channel Layout for Input Stream #1.1 : stereo
Input #1, avisynth, from 'original_crop.avs':
Duration: 00:01:00.06, start: 0.000000, bitrate: 0 kb/s
function [Tx,Ty] = GradU(w,b)
h = 1;
w1 = w
w2 = w
b1 = b
b2 = b
T1=w1-b1
T2=w2-b2
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% A MATLAB code to demonstrate the GFP-SOR method for
% Total Variation denoising model (ROF model)
%
% Min { alpha*Tv(u) + (1/2)*int(u-z)^2 } (*)
% u
%
% This is equaivalent to solve the following PDE:
%
% -alpha*div[Grad(u)/|Grad(u)|]+(u-z) = 0
1
FOUND => 1
2
3
4
5
6
FOUND => 6
7
8
function [result,t] = fdm(a,b,h,alpha,beta,p,q,r)
t = a+h:h:b-h;
n = length(t);
forward = @(t) 1 + (p(t).*(h./2));
center = @(t) q(t).*(h.^2) - 2;
backward = @(t) 1 - (p(t).*(h./2));
right = @(t) r(t).*(h.^2);
A = spdiags([forward(t).',center(t).',backward(t).'],[-1,0,1],n,n);
F = right(t).';
F(1) = F(1) - alpha;
#include<stdio.h>
double func(double x){
return x*x;
}
double trapzoid(double (*f)(double),double a,int n,double b){
int k;
double sum_odd = 0, sum_even = 0,h;
n = n * 2; //simpson จะแบ่งช่วงย่อยเป็นช่วงคู่และช่วงคี่
h = (b-a)/n;
for(k = 0;k<n - k;k++){
#include<stdio.h>
double func(double x){
return x*x;
}
double trapzoid(double (*f)(double),double a,double h,double b){
int i,n;
double sum = 0;
n = (b-a)/h;
sum += f(a)/2;
for(i = 1;i < n;i++){
#include<stdio.h>
#include<math.h>
double f(double x,double h){
return (sin(x+h)-sin(x))/h;
}
int main(){
double h = 1 / pow(2,16);
double a1 = (4*f(1,h) - f(1,2*h))/3;
printf("cos(1) = %.12f \nd/dx sin(1) = %.12f",cos(1),a1);
return 0;