(by @andrestaltz)
If you prefer to watch video tutorials with live-coding, then check out this series I recorded with the same contents as in this article: Egghead.io - Introduction to Reactive Programming.
(by @andrestaltz)
If you prefer to watch video tutorials with live-coding, then check out this series I recorded with the same contents as in this article: Egghead.io - Introduction to Reactive Programming.
import numpy as np | |
x = np.linspace(0, 10, 51) | |
A = 42 | |
mu = 4.2 | |
sigma = 0.666 | |
c = 10 | |
sig_y = 3*np.ones(len(x)) #np.sqrt(y) |
import numpy as np | |
from scipy.optimize import leastsq | |
import time | |
# Load data from file | |
rawdata = np.genfromtxt('./gaussianData.xye') | |
x = rawdata[:, 0] | |
y = rawdata[:, 1] | |
sy = rawdata[:, 2] |
use ndarray::{array, Array1}; | |
use rusfun::{curve_fit, func1d, size_distribution}; | |
use std::fs::File; | |
use std::io::{BufRead, BufReader, Result}; | |
fn main() { | |
// read data | |
let (x, y, sy) = read_column_file("./gaussianData.xye").unwrap_or_else(|err| { | |
eprintln!("Error reading data file: {}", err); | |
std::process::exit(1); |
var LM = require('ml-levenberg-marquardt'); | |
var fs = require('fs'); | |
function gaussianFunction([A, mu, sigma, c]) { | |
return (x) => A * Math.exp(-0.5*((x-mu)/sigma)**2) + c; | |
} | |
fs.readFile('../gaussianData.xye', 'utf8', async function(err, data) { |
import numpy as np | |
import lmfit | |
from numpy.polynomial.hermite import hermgauss | |
file_path = "./example_data.xye" | |
savefile_path = './magnetization_fit.dat' | |
quadrature_degree = 21 # integer number between 2 and 100 | |
# use kB/muB in Langevin function -> mu is in units of Bohr magneton | |
kB = 1.380649e-23 # J/K |
from dataclasses import dataclass | |
import re, datetime | |
LEETTIME = "1337" | |
LEET_HOUR = "13" | |
LEET_MINUTE = "37" | |
datasrc = "./whatsapplog.txt" | |
scores = {} | |
class Score: |