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
# install DSPy: pip install dspy | |
import dspy | |
# Ollam is now compatible with OpenAI APIs | |
# | |
# To get this to work you must include `model_type='chat'` in the `dspy.OpenAI` call. | |
# If you do not include this you will get an error. | |
# | |
# I have also found that `stop='\n\n'` is required to get the model to stop generating text after the ansewr is complete. | |
# At least with mistral. |
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
#base image in which all stages are executed | |
image: alpine | |
# Ordered stages of the CI pipeline | |
stages: | |
- build_and_push | |
build and push docker image: | |
stage: build_and_push | |
only: | |
variables: |
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
# This is a basic workflow to help you get started with Actions | |
name: Build, Release app to Github Pages and Firebase Hosting | |
# name: Test, Build and Release apk | |
# Controls when the action will run. Triggers the workflow on push or pull request | |
# events but only for the master branch | |
on: | |
push: | |
branches: | |
- master |
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
''' | |
*------------------------------------------------------------- | |
* Copyright (c) Ahmed Sayed. All rights reserved. | |
* Licensed under the MIT License. | |
* Title: SpringerBooks.py | |
* Date: 2020-05-01 11:33:21 | |
*------------------------------------------------------------- | |
Excute the following commands to install the dependencies before running the script: |
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
import React from 'react' | |
import PropTypes from 'prop-types' | |
import axios from 'axios' | |
class H5PVideoState { | |
constructor(h5pVideoClass) { | |
this.h5pVideoClass = h5pVideoClass | |
this.lastState = null | |
this.lastCurrentTime = null |
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 React from 'react' | |
import PropTypes from 'prop-types' | |
import axios from 'axios' | |
const H5pContent = ({ iframeSrc }) => { | |
const handleContentRef = dom => { | |
if (dom) { | |
dom.onload = () => { | |
dom.contentWindow.H5P.externalDispatcher.on('xAPI', function(event) { | |
console.log('INITIAL STATEMENT ON externalDispatcher') |
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
# Docker machine | |
curl -L https://github.com/docker/machine/releases/download/v0.16.0/docker-machine-`uname -s`-`uname -m` >/tmp/docker-machine && | |
chmod +x /tmp/docker-machine && | |
sudo cp /tmp/docker-machine /usr/local/bin/docker-machine |
NewerOlder