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
| 'system': | |
| [ | |
| { | |
| 'type': 'text', | |
| 'text': "You are Claude Code, Anthropic's official CLI for Claude.", | |
| 'cache_control': {'type': 'ephemeral'} | |
| }, | |
| { | |
| 'type': 'text', | |
| 'text': 'You are an interactive CLI tool that helps users with software engineering tasks. |
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
| Running a VPN Server with OpenVPN and Stunnel | |
| May 4, 2016 | |
| The Raspberry Pi that I setup as a web server has also been doing double duty as a VPN server. I use OpenVPN, and wrap it with Stunnel since I sometimes need to use the VPN in countries that filter their Internet access. Stunnel makes the VPN look like HTTPS traffic, so this gets around deep packet inspection. | |
| Install the Software and Generate Certificates/Keys | |
| Installing the software takes just one command: | |
| sudo apt-get install openvpn stunnel4 | |
| Some prep work: |
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 flask import Flask | |
| from flask import request | |
| from werkzeug.datastructures import FileStorage | |
| from pydantic import BaseModel | |
| app = Flask(__name__) | |
| class FormData(BaseModel): | |
| file_path: str |
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 datetime import date, datetime | |
| import streamlit as st | |
| import pandas as pd | |
| import mplfinance as mpf | |
| from pandas_datareader import data as pdr | |
| @st.experimental_memo(persist='disk') | |
| def get_historical_data(symbol, start_date = None): | |
| df = pdr.get_data_yahoo(symbol, start=start_date, end=datetime.now()) | |
| for col in df.columns: |
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
| def readmail(volume): | |
| time.sleep(1.5) | |
| m = imaplib.IMAP4_SSL("imap.gmail.com") | |
| m.login(user, pwd) | |
| m.select('"[Gmail]/All Mail"') | |
| resp, items = m.search(None, | |
| "NOT SEEN FROM tradingview") | |
| items = items[0].split() | |
| for emailid in items: | |
| resp, data = m.fetch(emailid, |
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
| """ | |
| # spherical_coords.py | |
| Convert between (theta, phi) and (azimuth, elevation) coordinate systems. | |
| Author: Danny Price | |
| License: MIT | |
| ## Overview |
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 | |
| MINIMUM_ARGS=2 # Require a database name and table name(s). Change to 1 if need to do whole database and only provide database name | |
| # These are the two servers being worked on | |
| # Change configuration here | |
| FROM_MYSQL_HOST=localhost | |
| FROM_USERNAME=myuser | |
| FROM_PASSWORD=mypas |
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/bash | |
| gdb -p "$1" -batch -ex 'set {short}$rip = 0x050f' -ex 'set $rax=231' -ex 'set $rdi=0' -ex 'cont' |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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 python3 | |
| import inspect | |
| import argparse | |
| import fire | |
| from docstring_parser import parse | |
| from prompt_toolkit.completion import Completer, Completion, FuzzyCompleter | |
| from prompt_toolkit import PromptSession | |
| from search.lsgrep import SearchFiles |
NewerOlder