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/env python | |
"""Script to get firebase bearer token. | |
This requires the GOOGLE_APPLICATION_CREDENTIALS environmental variable to be | |
set to a valid service account credential. This is usually done by the | |
`gcloud auth activate-service-account` command with a JSON key file. This | |
account will need the iam.serviceAccounts.signBlob permission, which can be | |
granted by the Service Account Token Creator role. | |
SPDX-License-Identifier: Apache-2.0 |
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/env python3 | |
# SPDX-License-Identifier: Apache-2.0 | |
import base64 | |
import urllib.request | |
import json | |
# Documentation of OpenMRS API here: | |
# https://wiki.openmrs.org/display/docs/REST+Web+Services+API+For+Clients |
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
# A systemd service to register with a dyndns Google domain. | |
# SPDX-License-Identifier: Apache-2.0 | |
# Too cheap to pay for a constant static IP for your ephemeral working box? | |
# This service interacts with the Google Domains dynamic DNS API to register | |
# on boot. | |
# | |
# Setup instrucionts | |
# 1. See https://support.google.com/domains/answer/6147083 to setup Google | |
# domain for dyndns and obtain the username and password. Note that these |
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
from lxml.etree import parse, Element, SubElement, \ | |
ElementTree, register_namespace, ParseError, XPath, \ | |
XMLParser | |
from cobra.io.sbml3 import namespaces, strnum, ns | |
def add_in_flux_bounds(filename, outfile=None, min_value=-1000, | |
max_value=1000): | |
if outfile is None or outfile == "": |
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
import os | |
import wx | |
import time | |
import ctypes | |
import matplotlib | |
matplotlib.use('WXAgg') | |
from matplotlib.figure import Figure | |
from matplotlib.backends.backend_wx import _load_bitmap | |
from matplotlib.backends.backend_wxagg import \ | |
FigureCanvasWxAgg as FigCanvas, \ |
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
make scipoptlib SHARED=true ZLIB=false READLINE=false GMP=false VERBOSE=true | |
# now run ar cs with the obj files in the previous command | |
ar d lib/libscipopt.a libscipopt-3.2.0.linux.x86_64.gnu.opt.so | |
# need to make sure linking occurs with g++ to use this |
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
First, checkout the 1.6 code. | |
Copy the spxdefines.h over to src | |
make SHARED=true GMP=true ZLIB=false VERBOSE=true | |
ar crs libsoplex.a obj/*/lib/* | |
Then in soplex16_mods (will need to adjust paths) | |
g++ -Wno-main -shared -Wl,-soname,soplex_1.6_lib.so -DWITH_LONG_DOUBLE -o soplex_1.6_lib.so -fPIC soplexmain_python_callable_basis_read_write.cpp -lsoplex -L/home/aebrahim/soplex -I/home/aebrahim/soplex/src |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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 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
export CBC_SOURCE_DIR=$HOME/build/Cbc-2.9.5 | |
export CYLP_SOURCE_DIR=$HOME/CyLP | |
export COIN_INSTALL_DIR=$CBC_SOURCE_DIR/COIN_INSTALL | |
# first build cbc | |
cd $CBC_SOURCE_DIR | |
./configure --enable-static --with-gnu-ld --with-pic --prefix=$COIN_INSTALL_DIR | |
make install |
NewerOlder