This file contains hidden or 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
| # originally from https://groups.google.com/a/webmproject.org/group/webp-discuss/browse_thread/thread/196ac4ea705688d8 | |
| <IfModule mod_rewrite.c> | |
| # TODO: don't forget to put | |
| # AddType image/webp .webp | |
| # in your mods-available/mime.conf | |
| # (though this is optional because we're setting | |
| # the mime type manually in the RewriteRule) | |
| # Enable rewrite |
This file contains hidden or 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
| # use ImageMagick convert | |
| # the order is important. the density argument applies to input.pdf and resize and rotate to output.pdf | |
| convert -density 90 input.pdf -rotate 0.5 -attenuate 0.2 +noise Multiplicative -colorspace Gray output.pdf |
This file contains hidden or 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
| # | |
| # Hi all, | |
| # this is the Python code I used to make the visualization "Temperature circle" | |
| # (https://twitter.com/anttilip/status/892318734244884480). | |
| # Please be aware that originally I wrote this for my tests only so the | |
| # code was not ment to be published and is a mess and has no comments. | |
| # Feel free to improve, modify, do whatever you want with it. If you decide | |
| # to use the code, make an improved version of it, or it is useful for you | |
| # in some another way I would be happy to know about it. You can contact me | |
| # for example in Twitter (@anttilip). Unchecked demo data (no quarantees) |
This file contains hidden or 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
| #!/bin/bash | |
| ## this little Gist is for Copy the Letsencrypt Cert from an Linux machine (e.g. Raspberry PI or Synology NAS) | |
| ## to the router (Fritzbox). | |
| ## It is usefull to be able to speak to the Router over DDNS without any Cert issue in the Browser. | |
| ## thanks to https://gist.github.com/mahowi for the perfect Idea | |
| ## put it in /etc/letsencrypt/renewal-hooks/post so it gets run after every renewal. | |
| ## since Fritz OS 7.25 it is needed to select a Username, from a security point of view | |
| ## it is always a good idea to have a non default user name. And as normaly a Fritz Box | |
| ## is connected to the Internet, the prefered method should be WITH Username. |
This file contains hidden or 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
| Set WshShell = WScript.CreateObject("WScript.Shell") | |
| WshShell.Run """%PROGRAMFILES(x86)%\Cisco\Cisco AnyConnect Secure Mobility Client\vpnui.exe""" | |
| WScript.Sleep 1500 | |
| WshShell.AppActivate "Cisco AnyConnect Secure Mobility Client" | |
| WshShell.SendKeys "{TAB}" | |
| WshShell.SendKeys "{TAB}" |
This file contains hidden or 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
| import json | |
| import re | |
| import urllib2 | |
| path_to_save = '' # create a directory and write the name of directory here | |
| data_file = urllib2.urlopen('https://github.com/NREL/EnergyPlus/raw/develop/weather/master.geojson') | |
| data = json.load(data_file) | |
| # or you can download master.geojson and run the below code instead of downloading from the net | |
| # with open('master.geojson') as data_file: | |
| # data = json.load(data_file) |
This file contains hidden or 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
| #Download dwebp (WebP decoder tool) https://developers.google.com/speed/webp/download | |
| #Run | |
| for %f in (*.webp) do dwebp.exe "%f" -o "%~nf.png" |
This file contains hidden or 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
| First, why don't you just export your spreadsheet as csv? Google has that feature built-in. It's under the menu File > Download as > CSV | |
| But, answering your question, it's pretty easy to wrap all values in doubles quotes. Let's say the desired values are on Sheet1 columns A to D. On Sheet2, cell A1, just place this formula: | |
| =ArrayFormula(""""&Sheet1!A:D&"""") | |
| The issue with the issue with the double quotes is that they're used as string delimiters, so to have them inside a string you have to type two consecutive. So, one " to open, two to have one "" and one " to close :) | |
| source: http://stackoverflow.com/questions/3315636/how-to-enclose-every-cell-with-double-quotes-in-google-docs-spreadsheet |
This file contains hidden or 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/env python | |
| import os | |
| import numpy as np | |
| import vtk | |
| import matplotlib.pyplot as plt | |
| def load_velocity(filename): | |
| if not os.path.exists(filename): |
This file contains hidden or 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 System; | |
| using System.Threading; | |
| static class Program { | |
| static void Main() { | |
| Console.Write("Performing some task... "); | |
| using (var progress = new ProgressBar()) { | |
| for (int i = 0; i <= 100; i++) { | |
| progress.Report((double) i / 100); |