Skip to content

Instantly share code, notes, and snippets.

View riccardomurri's full-sized avatar

Riccardo Murri riccardomurri

View GitHub Profile
@riccardomurri
riccardomurri / mandelbrot_r.py
Created October 2, 2018 19:42
Compute point in Mandelbrot graph with TF
#! /usr/bin/env python3
"""
Load TF graph from `./mandelbrot.save` and run it.
"""
import numpy as np
import tensorflow as tf
from tensorflow import (
constant as C_,
#! /usr/bin/env python
"""
Non-working example implementation of the Mandelbort fractal
using the TensorFlow API.
"""
import numpy as np
import tensorflow as tf
from tensorflow import (
@riccardomurri
riccardomurri / requirements.txt
Last active April 27, 2022 17:36
SHA-256 implementation using TensorFlow (Eager)
absl-py==0.3.0
apipkg==1.5
astor==0.7.1
atomicwrites==1.1.5
attrs==18.1.0
backports.weakref==1.0.post1
enum34==1.1.6
execnet==1.5.0
funcsigs==1.0.2
futures==3.2.0
@riccardomurri
riccardomurri / TODO.org
Created June 15, 2017 21:46
Notes and TO-DO items for the Python course

This are notes taken after delivering the course at University of Bern on June 8, 2017.

If you attended the course, please add your own comments and suggestions!

1 day is too short!

Covering all the material requires at least two full days (and even then, time for exercises might be too limited).

Too few exercises?

@riccardomurri
riccardomurri / eb-bootstrap-failure.ubuntu-14.04.txt
Created October 14, 2016 09:36
eb-bootstrap-failure.ubuntu-14.04.txt
ubuntu@eb-test:~$ export EASYBUILD_BOOTSTRAP_DEBUG=1
ubuntu@eb-test:~$ python bootstrap_eb.py $HOME/easybuild
[[INFO]] EasyBuild bootstrap script (version 20161006.01, MD5: c91bf277b86f693463f05119f068e4de)
[[INFO]] Found Python 2.7.6 (default, Jun 22 2015, 17:58:13) ; [GCC 4.8.2]
[[INFO]] Installation prefix /home/ubuntu/easybuild
[[DEBUG]] Going to use /tmp/tmp9MlvpR as temporary directory
[[DEBUG]] Output from modulecmd python help:
Modules Release 3.2.10 2012-12-21 (Copyright GNU GPL v2 1991):

Test report for easybuilders/easybuild-easyconfigs#2793

Test result

Build succeeded for 3 out of 3 (3 easyconfigs in this PR)

Overview of tested easyconfigs (in order)

  • SUCCESS Givaro-4.0.1-foss-2016a.eb
  • SUCCESS FFLAS-FFPACK-2.2.0-foss-2016a.eb
  • SUCCESS LinBox-1.4.0-foss-2016a.eb

Test report for easybuilders/easybuild-easyconfigs#2793

Test result

Build succeeded for 3 out of 3 (3 easyconfigs in this PR)

Overview of tested easyconfigs (in order)

  • SUCCESS Givaro-4.0.1-foss-2016a.eb
  • SUCCESS FFLAS-FFPACK-2.2.0-foss-2016a.eb
  • SUCCESS LinBox-1.4.0-foss-2016a.eb

Test report for easybuilders/easybuild-easyconfigs#2793

Test result

Build succeeded for 0 out of 0 (3 easyconfigs in this PR)

Overview of tested easyconfigs (in order)

Time info

  • start: Tue, 29 Mar 2016 20:23:00 +0000 (UTC)
  • end: Tue, 29 Mar 2016 20:23:19 +0000 (UTC)
@riccardomurri
riccardomurri / asciify.py
Last active August 29, 2015 14:27
Two simple functions for rendering a Unicode string using ASCII characters only.
# /usr/bin/env python
# -*- encoding: utf-8 -*-
#
"""
Two simple functions for rendering a Unicode string using ASCII
characters only.
The only sensible applications are on words in a Latin-derived
alphabet (i.e., anything that could be rendered in a ISO-8859-*
character set); anything else will just be replaced by a string of
diff --git a/components/9990-select-eth-device.sh b/components/9990-select-eth-device.sh
index df00666..6bc67fd 100755
--- a/components/9990-select-eth-device.sh
+++ b/components/9990-select-eth-device.sh
@@ -55,11 +55,22 @@ Select_eth_device ()
case "${ARGUMENT}" in
live-netdev=*)
NETDEV="${ARGUMENT#live-netdev=}"
+ # net device could be specified by MAC address
+ hex="[0-9A-Fa-f][0-9A-Fa-f]"