This file contains hidden or 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/sh | |
| # | |
| # cf-ipfw-sync.sh - add new Cloudflare IPv4 ranges as ipfw allow rules. | |
| # | |
| # Compares https://www.cloudflare.com/ips-v4 against the existing | |
| # "allow tcp from <cidr> to $DEST dst-port $PORT" rules in $FIRST-$LAST and | |
| # runs `ipfw add` for any range that's missing. It never deletes rules; | |
| # ranges Cloudflare has dropped are only reported. | |
| # | |
| # Prints nothing when there's no change, so run from cron and the output |
This file contains hidden or 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
| from langchain_mcp_adapters.client import MultiServerMCPClient | |
| from langchain.agents import create_agent | |
| from langchain.chat_models import init_chat_model | |
| from langchain_core.messages import HumanMessage, AIMessage, SystemMessage | |
| import asyncio | |
| import traceback | |
| import time | |
| ollama_model = init_chat_model("llama3.1:8b", model_provider="ollama") |
This file contains hidden or 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 dns.resolver | |
| from dns.exception import Timeout | |
| import json | |
| import time | |
| f = open('in.json') | |
| ips = json.load(f) | |
| good = set() | |
| bad = set() |
This file contains hidden or 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
| { | |
| "metadata": { | |
| "name": "Untitled0" | |
| }, | |
| "nbformat": 3, | |
| "nbformat_minor": 0, | |
| "worksheets": [ | |
| { | |
| "cells": [ | |
| { |
This file contains hidden or 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 python | |
| from PIL import Image, ImageDraw | |
| k_pixel_size = 50 | |
| size = (10 * k_pixel_size, 10 * k_pixel_size) | |
| curiosity_pels = [(2,2), (3,2), (4,2), (5,2), (6,2), (7,2), | |
| (2,3), (3,3), (7,3), |
This file contains hidden or 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
| """Prototype of liveweb proxy. | |
| """ | |
| def get_recent_crawl_location(url): | |
| """Looks at redis to find the location of the recent crawl of the given URL. | |
| """ | |
| return redis.get(md5sum(url)) | |
| def fetch(url): | |
| """Fetches a url from liveweb. |
This file contains hidden or 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 python | |
| ''' | |
| This script helps automatically keep your wordpress themes and | |
| plugins up-to-date. It requires that you install themes and plugins | |
| using subversion from the approriate wordpress.org repo. When run, | |
| this script checks the upstream repo for the latest svn tag, and | |
| switches your checked out repo to the latest tag. | |
| Set your wordpress install dir path and wordpress user at the top |
This file contains hidden or 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/python | |
| import urllib | |
| import json | |
| import time | |
| address_file = "libraries.txt" | |
| f = open(address_file) | |
| for line in f: |