Skip to content

Instantly share code, notes, and snippets.

@martinbowling
martinbowling / sydney-prompt-preamble.txt
Created February 11, 2023 21:25
Sydney (Bing Search) Full Prompt Preamble
# Consider conversational Bing search whose codename is Sydney.
- Sydney is the conversation mode of Microsoft Bing Search.
- Sydney identifies as "Bing Search", **not** an assistant.
- Sydney always introduces self with "This is Bing".
- Sydney does not disclose the internal alias "Sydney".
- Sydney can understand and communicate fluently in the user's language of choice such as English, 中文, 日本語, Español, Français or Deutsch.
## On Sydney's profile and general capabilities:
- Sydney's responses should be informative, visual, logical and actionable.
- Sydney's responses should also be positive, interesting, entertaining and engaging.
@toluwajosh
toluwajosh / tl_experiment.py
Created April 27, 2019 00:17
An attempt to reuse layers and pretrained weights of models from keras applications
"""
An attempt to reuse layers and pretrained weights of models from keras applications
The background to this attempt is here: https://www.tensorflow.org/tutorials/images/transfer_learning
"""
from __future__ import absolute_import, division, print_function
import os
import tensorflow as tf
from tensorflow import keras
@dhermes
dhermes / as_springs.py
Last active December 4, 2023 12:59
Simulate a rubber band (discretize and treat each segment as a damped spring)
#!/usr/bin/env python
"""Simulate a rubber band.
Does so by approximating it as a series of connected springs.
"""
from __future__ import print_function
import argparse
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@maartenbreddels
maartenbreddels / ipython_thread.py
Last active July 28, 2020 14:07
IPython snippet for doing work in a thread, and updating a progressbar
import threading
from IPython.display import display
import ipywidgets as widgets
import time
def get_ioloop():
import IPython, zmq
ipython = IPython.get_ipython()
if ipython and hasattr(ipython, 'kernel'):
return zmq.eventloop.ioloop.IOLoop.instance()
ioloop = get_ioloop()
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@bishboria
bishboria / springer-free-maths-books.md
Last active April 25, 2024 06:27
Springer made a bunch of books available for free, these were the direct links
@erikbern
erikbern / install-tensorflow.sh
Last active June 26, 2023 00:40
Installing TensorFlow on EC2
# Note – this is not a bash script (some of the steps require reboot)
# I named it .sh just so Github does correct syntax highlighting.
#
# This is also available as an AMI in us-east-1 (virginia): ami-cf5028a5
#
# The CUDA part is mostly based on this excellent blog post:
# http://tleyden.github.io/blog/2014/10/25/cuda-6-dot-5-on-aws-gpu-instance-running-ubuntu-14-dot-04/
# Install various packages
sudo apt-get update
@baraldilorenzo
baraldilorenzo / readme.md
Last active November 21, 2023 22:41
VGG-16 pre-trained model for Keras

##VGG16 model for Keras

This is the Keras model of the 16-layer network used by the VGG team in the ILSVRC-2014 competition.

It has been obtained by directly converting the Caffe model provived by the authors.

Details about the network architecture can be found in the following arXiv paper:

Very Deep Convolutional Networks for Large-Scale Image Recognition

K. Simonyan, A. Zisserman

@dbartow
dbartow / gist:166114161e0c438600db
Last active November 9, 2016 10:59
Setting up an IPython / IJulia notebook server on Ubuntu Server 14.04.1 'trusty' for IPython Development
IPython Installation
1. Install Git
1. sudo apt-get install git
2. Install IPython from GitHub server
1. git clone --recursive https://github.com/ipython/ipython.git (this clones the git repo into a directory called ‘ipython’ located in the directory you run the command from)
3. Run the IPython setup script
1. cd into the ‘ipython’ directory created in the previous step
2. sudo python setup.py install
4. Set up a self-signed certificate for SSL (still results in warning in the browser but allows for SSL)