-
Search for album on Apple Music.
-
Open album art image in new tab.
Example (which gives 12KB image):
We can play around with the last few parameters to get much better resolution and quality (and change file format).
void testBisector() { | |
PVector C = new PVector(100, 300); | |
PVector B = new PVector(mouseX, mouseY); | |
PVector A = new PVector(500, 500); | |
float r = 100; | |
float[] angle = new float[1]; // To store the calculated angle | |
PVector point = findPointOnBisector(A, B, C, r, angle); | |
stroke(0); |
# Ensure ffprobe is available in the system's PATH or specify its full path | |
$ffprobePath = "ffprobe" | |
$files = Get-ChildItem -Path "." -File | Where-Object { $_.Extension -eq ".mp3" -or $_.Extension -eq ".flac" } | |
Write-Host "Found $($files.Count) files to process." | |
# Store album information | |
$albums = @{} |
def modified_duration(y, m): | |
""" | |
Approximates the modified duration of a risk-free bond at par value. | |
:param y: Yield-to-maturity in decimal terms | |
:param m: Maturity in years | |
:return: Modified duration of a risk-free bond | |
""" | |
return (1-(1/(1+0.5*y)**(2*m)))/(y) |
def print_first_non_null_dates(df): | |
non_null_dates = {} | |
for column in df.columns: | |
non_null_values = df[column].dropna() | |
if not non_null_values.empty: | |
first_non_null_date = non_null_values.index[0] | |
non_null_dates[column] = first_non_null_date | |
sorted_dates = sorted(non_null_dates.items(), key=lambda x: x[1]) |
Search for album on Apple Music.
Open album art image in new tab.
Example (which gives 12KB image):
We can play around with the last few parameters to get much better resolution and quality (and change file format).
/** | |
* Computes a pair of magic numbers used to optimise integer division by a fixed | |
* divisor <code>d</code>. | |
* <p> | |
* The function is given the maximum value of the dividend <code>nmax</code> and | |
* the divisor <code>d</code>. It returns a pair of integers: the magic number | |
* <code>m</code> and a shift amount <code>p</code>. | |
* <p> | |
* To divide a dividend x by d, one multiplies x by m and then shifts the (full | |
* length) product right p bits: <code>x / d === ((x * m) >> p)</code>. |
public class T2Q extends java.applet.Applet { | |
public static void main(String[] args) { | |
T2Q applet = new T2Q(); | |
applet.init(); | |
applet.start(); | |
// Create a window (JFrame) and make applet the content pane. | |
javax.swing.JFrame window = new javax.swing.JFrame("T2Q"); | |
window.setContentPane(applet); |
import org.locationtech.jts.geom.Coordinate; | |
import java.util.ArrayList; | |
import java.util.List; | |
/** | |
* Implementation of linear minimum area enclosing triangle algorithm. | |
* Computational and Applied Mathematics, 35(2), 423–438. | |
* doi:10.1007/s40314-014-0198-8 | |
* |
package com.badlogic.gdx; | |
/** | |
* A simple implementation of the ear cutting algorithm to triangulate simple | |
* polygons without holes. For more information: | |
* <ul> | |
* <li><a href= | |
* "http://cgm.cs.mcgill.ca/~godfried/teaching/cg-projects/97/Ian/algorithm2.html">http://cgm.cs.mcgill.ca/~godfried/ | |
* teaching/cg-projects/97/Ian/algorithm2.html</a></li> | |
* <li><a href= |
http://momentsingraphics.de/CubicRoots.html#_Blinn06a | |
Returns the three real roots of the cubic polynomial (of form 1 + 2x + 3x^2 + 4x^3) | |
float3 SolveCubic(float4 Coefficient){ | |
// Normalize the polynomial | |
Coefficient.xyz/=Coefficient.w; | |
// Divide middle coefficients by three | |
Coefficient.yz/=3.0f; | |
// Compute the Hessian and the discrimant |