Skip to content

Instantly share code, notes, and snippets.

@syberkitten
syberkitten / gist:7d3a1a045c82b2b62ea25382f551facf
Last active June 13, 2023 07:15
Simple Pyenv Usage: Setting Up a Pyenv Virtual Environment with Python and Virtualenv
# Setting Up a Pyenv Virtual Environment with Python 3.10.11
Follow the instructions below to set up a new virtual environment, named "privategpt", utilizing Python 3.10.11 via Pyenv.
## 1. Installing Python 3.10.11 with Pyenv
Enter the command below to install Python 3.10:
```bash
pyenv install 3.10.11
@robcowie
robcowie / tornado_socket_server.py
Created May 16, 2011 15:48
Simple example of creating a socket server with Tornado
import errno
import functools
import socket
from tornado import ioloop, iostream
class Connection(object):
def __init__(self, connection):
self.stream = iostream.IOStream(connection)
self._read()