Skip to content

Instantly share code, notes, and snippets.

@tiagovla
tiagovla / diffusion_equation_solution.py
Last active March 25, 2022 06:53
Python Solution of the Diffusion Equation | Lecture 73 | Numerical Methods for Engineers
import matplotlib.pyplot as plt
import numpy as np
import scipy.sparse
import scipy.sparse.linalg
def main() -> None:
diffusion = 1
length = 1
n_points = 500
@tiagovla
tiagovla / grammarly_playonlinux.sh
Created April 6, 2021 04:14
Script to install grammarly on linux using PlayOnLinux.
#!/usr/bin/env playonlinux-bash
# Date : (2021-04-05 04-20)
# Last revision : (2021-04-05 06-09)
# Wine version used : 6.3 staging
# Distribution used to test : Ubuntu 20.04 LTS
# Author : tiagovla
# PlayOnLinux : 4.3.4
# Script licence : MIT
[ "$PLAYONLINUX" = "" ] && exit 0
@tiagovla
tiagovla / grammarly_wine.sh
Created April 6, 2021 04:11
Script used to install grammarly using wine on linux.
#!/bin/bash
PREFIX="$HOME/.grammarly"
GRAMMARLY_URL="https://download-editor.grammarly.com/windows/GrammarlySetup.exe"
grammarly_install(){
WINEARCH=win32 WINEPREFIX=$PREFIX winetricks --force dotnet452
cd $PREFIX
wget $GRAMMARLY_URL
WINEPREFIX=$PREFIX winetricks win7
twitch-videoad.js application/javascript
(function() {
if ( /(^|\.)twitch\.tv$/.test(document.location.hostname) === false ) { return; }
var realFetch = window.fetch;
window.fetch = function(input, init) {
if ( arguments.length >= 2 && typeof input === 'string' && input.includes('/access_token') ) {
var url = new URL(arguments[0]);
url.searchParams.forEach(function(value, key) {
url.searchParams.delete(key);
});
(defun c:lines_arc(/ obj ang1 dist ptt inc pt pts)
(princ "\nSelect an Arc: ")
(setq obj (ssget ":S"))
(princ "\nSelect a Point: ")
(setq ptt (getpoint))
(if obj
(progn
(setq obj (vlax-EName->vla-Object (ssname obj 0))
inc 10.0