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
Dear all, | |
We are organising, starting Wednesday on the 2nd of December, a reading group on an introductory book for machine learning. | |
The book is called "The Elements of Statistical Learning" and is freely available online: http://statweb.stanford.edu/~tibs/ElemStatLearn/. | |
The book requires some basic background in Linear Algebra and Probability Theory usually covered in maths undergraduate courses. | |
The reading group will take place every Wednesday between 17:30 - 19:30 in X-Men Origins Seminar Room, Kathleen Lonsdale Building, 5 Gower Place. |
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
#!/bin/bash | |
awk -F'\t' 'BEGIN {print "<head><meta charset="UTF-8"></head><body><table>"} {print "<tr><td>"$1"</td><td>"$2"</td></tr>"} END {print "</table></body>"}' MySpanish.txt > MySpanish.txt.html |
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 numpy as np | |
class Board: | |
def __init__(self): | |
self.turn = 0 | |
self.state = np.full((3, 3), "_") | |
def __str__(self): | |
r = f"{self.player()}'s turn\n{self.state}'" | |
if self.winner() is not None: | |
r += f"\nWinner: {self.winner()}" |
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
# EC, Field are in http://afiodorov.github.io/2019/06/18/elliptic/ | |
from dataclasses import dataclass | |
from random import randint | |
@dataclass | |
class Signature: | |
sig: int | |
pp: EC.Point | |
randomx: int |
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
package main | |
import ( | |
"fmt" | |
"math" | |
"sort" | |
"time" | |
) | |
// Data holds Value & Time when value was observed |
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 pickle | |
from datetime import datetime, timedelta | |
from functools import wraps | |
from hashlib import sha224 | |
from pathlib import Path | |
from time import time | |
from typing import Optional | |
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 | |
import os | |
import openai | |
import argparse | |
import sys | |
openai.api_key = os.getenv("OPENAI_API_KEY") | |
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 | |
import psutil | |
import time | |
if __name__ == "__main__": | |
while True: | |
procs = [] | |
for proc in psutil.process_iter(): |
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 Image : pytorch/pytorch | |
Image Runtype : jupyter_direc ssh_direc ssh_proxy | |
Environment : [["JUPYTER_DIR", "/"], ["-p 41654:41654", "1"]] | |
pip install torch bitsandbytes sentencepiece "protobuf<=3.20.2" git+https://github.com/huggingface/transformers flask python-dotenv Flask-HTTPAuth accelerate | |
!mv /opt/conda/lib/python3.10/site-packages/bitsandbytes/libbitsandbytes_cuda116.so /opt/conda/lib/python3.10/site-packages/bitsandbytes/libbitsandbytes_cpu.so |
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 asyncio | |
import websockets | |
async def client_to_server(client, server): | |
async for message in client: | |
await server.send(message) | |
async def server_to_client(client, server): | |
async for message in server: |
OlderNewer