Skip to content

Instantly share code, notes, and snippets.

View keitheis's full-sized avatar

Keith Yang keitheis

View GitHub Profile
@kkdai
kkdai / github-isssue-rag-langchain.ipynb
Last active February 21, 2024 03:36
Github Issues LangChain RAG Q&A 的 Colab
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@swalkinshaw
swalkinshaw / tutorial.md
Last active November 13, 2023 08:40
Designing a GraphQL API
@ramalho
ramalho / coro_life.py
Last active October 16, 2024 16:54
John Conway's Game of Life implemented with coroutines, by Brett Slatkin
#!/usr/bin/env python3
# Copyright 2014 Brett Slatkin, Pearson Education Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
@rach
rach / conftest.py
Last active August 29, 2015 14:13
Fixture to check if resolve
@pytest.fixture
def url_checker():
from pyramid.scripts.pviews import PViewsCommand
from pyramid.request import Request
from pyramid.paster import bootstrap
def view_match(url):
pviews = PViewsCommand([None, os.path.join(here, '../', 'development.ini'), url],
quiet=True)
config_uri = pviews.args[0]
@Tantas
Tantas / l2tp_ipsec_setup_arch_linux_raspberry_pi.sh
Last active December 14, 2019 01:38
Guide to install L2TP-IPSEC VPN Server on a Raspberry Pi with ArchLinux
#!/bin/bash
# Guide to install L2TP-IPSEC VPN Server on a Raspberry Pi with ArchLinux
# Used parts of several instructions,
# http://nls.io/setup-an-ipsec-l2tp-vpn-with-text-or-ldap-auth-on-arch-linux/
# https://smileykeith.com/2014/01/27/ipsec-l2tp-vpn-on-a-raspberry-pi-running-arch-linux/
# http://linux.tips/tutorials/how-to-setup-l2tp-vpn-server-on-raspberry-pi
# Tested and works with OSX and iOS 7.1 supplied vpn client
@staltz
staltz / introrx.md
Last active November 17, 2024 01:08
The introduction to Reactive Programming you've been missing
@Janiczek
Janiczek / info.md
Last active January 2, 2016 06:09
TodoMVC in Om. See file info.md.

TodoMVC in Om + Sablono + core.async (well, core.async not so much in the end)

This is a result of a three-ish hours long try to understand Om better on a TodoMVC example. Next steps would be finishing implementing rest of the functionality as dictated by the app specification, and then refactoring. And then some more refactoring. And then ...

I recorded a screencast of this: http://youtu.be/7j133D79Vaw

淡入 一群身著制服,表情嚴肅的軍官。)

會議桌的主位上,一位資深高階 將軍 正在說話。

將軍:報告已經證實了,紐約市已經…被殭屍占領了。

上校:又來了?明明 28 天前才發生過一次殭屍入侵!

將軍:這些僵屍…不一樣。它們是… 哲學 僵屍。

@sontek
sontek / gist:5660624
Created May 28, 2013 05:09
Small application using Pyramid, SQLAlchemy, and dogpile.cache
from wsgiref.simple_server import make_server
from pyramid.config import Configurator
from pyramid.response import Response
from pyramid.compat import text_type
from sqlalchemy.orm import scoped_session
from sqlalchemy.orm import sessionmaker
from sqlalchemy import create_engine
from sqlalchemy.ext.declarative import declarative_base