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
Click to view more! |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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
//---------------------------------------------------------------------- paper script -> javascript | |
// Define a point to start with | |
var point1 = new Point(10, 20); | |
debugger; | |
// Create a second point that is 4 times the first one. | |
// This is the same as creating a new point with x and y | |
// of point1 multiplied by 4: | |
var point2 = point1 * 4; |
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
// warning you probably want `ssh-keygen -t ed25519` for most use cases. this method lacks secure prng and uses weak rsa | |
var keypair = require('keypair') | |
var forge = require('node-forge') | |
// generates new keypair (slow) | |
var pair = keypair() | |
// creates intermediate forge key object | |
var publicKey = forge.pki.publicKeyFromPem(pair.public) |
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
Below I collected relevant links and papers more or less pertaining to the subject of tetrahedral meshes. | |
It's an ever-growing list. | |
------------------------------ | |
Relevant links: | |
http://en.wikipedia.org/wiki/Types_of_mesh | |
http://en.wikipedia.org/wiki/Tetrahedron | |
http://en.wikipedia.org/wiki/Simplicial_complex |
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
function condalist -d 'List conda environments.' | |
for dir in (ls $HOME/miniconda3/envs) | |
echo $dir | |
end | |
end | |
function condactivate -d 'Activate a conda environment' -a cenv | |
if test -z $cenv | |
echo 'Usage: condactivate <env name>' | |
return 1 |
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 ruby | |
# | |
# Git commit-msg hook. If your branch name is in the form "SYSRAP-123", automatically | |
# adds "Refs #SYSRAP-123." to commit messages unless they mention "#SYSRAP-123" already. | |
# | |
# By Henrik Nyh <http://henrik.nyh.se> 2009-09-10 under the MIT License. | |
# | |
# | |
# Install: | |
# |
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 asyncio | |
import aiohttp | |
import bs4 | |
import tqdm | |
@asyncio.coroutine | |
def get(*args, **kwargs): | |
response = yield from aiohttp.request('GET', *args, **kwargs) | |
return (yield from response.read_and_close(decode=True)) |
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
# Demo: | |
# | |
# Aggregate population per independence type for every year | |
# Sources: Population and Country Codes datasets | |
# | |
from bubbles import Pipeline | |
# List of stores with datasets. In this example we are using the "datapackage" | |
# store |
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
""" | |
Simple web server that listens for Github webhooks to implement push-to-deploy | |
with Pelican static sites | |
Settings are loaded from a json file except for SECRET which should be an | |
environment variable | |
Example `deployer.json` | |
{ |