Skip to content

Instantly share code, notes, and snippets.

View fcole90's full-sized avatar

Fabio Colella fcole90

View GitHub Profile
@fcole90
fcole90 / main_bisect.c
Last active July 14, 2023 19:45
Simple generic bisect
#include <stdio.h>
#define array_len(x) ((sizeof (x) == 0) ? (0) : (sizeof (x) / sizeof (x[0])))
char *my_word_list[] = {
"abc",
"bcd",
"def",
"fgh"
};
const myWord = "sprot"
const dictionatyOfWords = {
"sport": "pop",
"ports": "pop2",
"port": "A winter sport",
"sports": "A marionette",
"trops": "A marionette",
}
@fcole90
fcole90 / latex_to_unicode.py
Created May 30, 2020 09:07
Convert simple inline LateX to unicode
import re
__SYMBOLS_DICTIONARY__ = {
# Greek Letters
"Gamma": "Γ",
"Delta": "Δ",
"Lambda": "Λ",
"Phi": "Φ",
"Pi": "Π",
"Psi": "Ψ",
@fcole90
fcole90 / blip.sh
Created March 9, 2018 13:37
Helper script to make blip use easier: https://github.com/mauro-idsia/blip
#!/usr/bin/env bash
# Helper script to run blip in a single command.
# Obtain the absolute path of this script.
# Solution from: https://stackoverflow.com/a/246128
SOURCE="${BASH_SOURCE[0]}"
while [ -h "$SOURCE" ]; do # resolve $SOURCE until the file is no longer a symlink
DIR="$( cd -P "$( dirname "$SOURCE" )" && pwd )"
SOURCE="$(readlink "$SOURCE")"
>>> import tensorflow
# possible namespace for /root/tensorflow
# /usr/local/lib/python3.4/dist-packages/tensorflow/__pycache__/__init__.cpython-34.pyc matches /usr/local/lib/python3.4/dist-packages/tensorflow/__init__.py
# code object from '/usr/local/lib/python3.4/dist-packages/tensorflow/__pycache__/__init__.cpython-34.pyc'
# /usr/lib/python3.4/__pycache__/__future__.cpython-34.pyc matches /usr/lib/python3.4/__future__.py
# code object from '/usr/lib/python3.4/__pycache__/__future__.cpython-34.pyc'
import '__future__' # <_frozen_importlib.SourceFileLoader object at 0x7f9710ed98d0>
# /usr/local/lib/python3.4/dist-packages/tensorflow/python/__pycache__/__init__.cpython-34.pyc matches /usr/local/lib/python3.4/dist-packages/tensorflow/python/__init__.py
# code object from '/usr/local/lib/python3.4/dist-packages/tensorflow/python/__pycache__/__init__.cpython-34.pyc'
# /usr/lib/python3.4/ctypes/__pycache__/__init__.cpython-34.pyc matches /usr/lib/python3.4/ctypes/__init__.py
>>> import tensorflow
# possible namespace for /root/tensorflow
# /usr/local/lib/python3.4/dist-packages/tensorflow/__pycache__/__init__.cpython-34.pyc matches /usr/local/lib/python3.4/dist-packages/tensorflow/__init__.py
# code object from '/usr/local/lib/python3.4/dist-packages/tensorflow/__pycache__/__init__.cpython-34.pyc'
# /usr/lib/python3.4/__pycache__/__future__.cpython-34.pyc matches /usr/lib/python3.4/__future__.py
# code object from '/usr/lib/python3.4/__pycache__/__future__.cpython-34.pyc'
import '__future__' # <_frozen_importlib.SourceFileLoader object at 0x7f7047d4c8d0>
# /usr/local/lib/python3.4/dist-packages/tensorflow/python/__pycache__/__init__.cpython-34.pyc matches /usr/local/lib/python3.4/dist-packages/tensorflow/python/__init__.py
# code object from '/usr/local/lib/python3.4/dist-packages/tensorflow/python/__pycache__/__init__.cpython-34.pyc'
# /usr/lib/python3.4/ctypes/__pycache__/__init__.cpython-34.pyc matches /usr/lib/python3.4/ctypes/__init__.py
System Information:
OS Version:
Linux Distribution: Ubuntu 16.04 LTS
Kernel Version: 4.4.0-24-generic #43-Ubuntu SMP Wed Jun 8 19:27:37 UTC 2016
Hardware Info:
Machine Type ASUSTeK COMPUTER INC. X550JK 1.0
CPU Type GenuineIntel x86_64
CPU Info Intel(R) Core(TM) i7-4710HQ CPU @ 2.50GHz
CPU Speed 3500 MHz
@fcole90
fcole90 / log
Created May 3, 2016 17:04
log tensorflow: import statement @line 69
(tensorflow-py3)root@tensorflow:~# python3 -v
import _frozen_importlib # frozen
import imp # builtin
import sys # builtin
# installing zipimport hook
# installed zipimport hook
# /root/tensorflow-py3/lib/python3.4/encodings/__pycache__/__init__.cpython-34.pyc matches /root/tensorflow-py3/lib/python3.4/encodings/__init__.py
# code object from '/root/tensorflow-py3/lib/python3.4/encodings/__pycache__/__init__.cpython-34.pyc'
# /root/tensorflow-py3/lib/python3.4/__pycache__/codecs.cpython-34.pyc matches /root/tensorflow-py3/lib/python3.4/codecs.py
# code object from '/root/tensorflow-py3/lib/python3.4/__pycache__/codecs.cpython-34.pyc'