This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class SlewRateLimiter: | |
def __init__(self, slew_rate, neg_slew_rate=None, t_init=0, y_init=0.0): | |
self.slew_rate = slew_rate | |
if neg_slew_rate is None: | |
self.neg_slew_rate = -slew_rate | |
else: | |
self.neg_slew_rate = neg_slew_rate | |
self.t = t_init | |
self.y = y_init |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# https://stackoverflow.com/questions/38152081/how-do-you-quantize-a-simple-input-using-python | |
def clamp(x: float, x_min=0.0, x_max=1.0): | |
""" | |
clamp a value to be within two bounds | |
returns lo if x < lo, hi if x > hi else x | |
""" | |
return min(x_max, max(x, x_min)) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Description: Boxstarter Script | |
# Author: https://twitter.com/GhostInTheWire5 | |
# | |
# Install boxstarter: | |
# . { iwr -useb http://boxstarter.org/bootstrapper.ps1 } | iex; get-boxstarter -Force | |
# NOTE the "." above is required. | |
# | |
# Run this boxstarter by calling the following from **elevated** powershell: | |
# example: Install-BoxstarterPackage -PackageName https://gist.githubusercontent.com/ghostinthewires/033276015ba9d58d1f162e7fd47cdbd3/raw/boxstarter.ps1 -DisableReboots | |
# Learn more: http://boxstarter.org/Learn/WebLauncher |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#! /usr/bin/python | |
# coding=utf-8 | |
import requests | |
# Track ids to download | |
tracks = [ | |
'9319946', | |
'9319955', | |
... |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using Luxor, MiniFB, Colors | |
mutable struct Guilloche | |
f1::Float64 | |
f2::Float64 | |
f3::Float64 | |
f4::Float64 | |
# damping factors: increase to make the energy losses faster | |
xd1::Float64 | |
xd2::Float64 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# génération auto par gdal du fichier XML de description du service WMTS | |
gdal_translate "WMTS:https://wxs.ign.fr/an7nvfzojv5wa96dsga5nk8w/geoportail/wmts?Service=WMTS&Request=GetCapabilities&Version=1.0.0,layer=TRANSPORTS.DRONES.RESTRICTIONS" drones.xml -of WMTS | |
# téléchargement des tuiles et sortie en geotiff | |
gdal_translate drones.xml drones.tif -co COMPRESS=DEFLATE -co TILED=YES |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Function Out-AIRACCycles | |
{ | |
Param ( [DateTime] $currentDay = ( Get-Date ) | |
, [DateTime] $initialDay = ( Get-Date -Year 2015 -Month 1 -Day 8 ) | |
, $interval = 28 | |
, $culture = [System.Globalization.CultureInfo]::GetCultureInfo("en-US") ) | |
$offset = (New-TimeSpan -Start $initialDay -End ( Get-Date -Year ( $currentDay.Year - 1 ) -Month 1 -Day 1 ) ).Days | |
$offset .. ( $offset + 365 * 3 ) | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# -*- mode: ruby -*- | |
# vi: set ft=ruby : | |
# Base box: https://github.com/akrabat/packer-templates | |
Vagrant.configure("2") do |config| | |
config.vm.box = "19ft/windows2016" | |
config.vm.guest = :windows | |
config.vm.boot_timeout = 600 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
####################################################################### | |
#### Script Boxstarter maintenance PC #### | |
#### Installation et mise en route des application pour PC basique #### | |
####################################################################### | |
########## Définition des paramétre Windows | |
Set-StartScreenOptions -EnableBootToDesktop | |
Set-TaskbarOptions -Lock | |
########## Mise à jour Windows |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
NewerOlder