Skip to content

Instantly share code, notes, and snippets.

View brianray's full-sized avatar
🐍

Brian Ray brianray

🐍
  • Maven Wave Partners
  • Los Angeles | Chicago
View GitHub Profile
@brianray
brianray / parser.py
Last active February 1, 2024 01:01
example language parser
# Brian Ray <brianhray@gmail.com>
# @brianray
# https://medium.com/@brianray_7981/
# parser for POSH Syntax http://brianray.github.io/posh-syntax/
import re
def transition_skip(fsm_obj):
pass
@brianray
brianray / launch.json
Last active December 27, 2023 22:21
debug GCP Cloud Functions locally with VSCode
{
"version": "0.2.0",
"configurations": [
{
"name": "Python: Cloud Function Emulate",
"type": "python",
"request": "launch",
"module": "functions_framework",
"justMyCode": false,
"args": [
graph LR
  A((Start))--take Survey-->B((Goal Setting))
  B((Goal Setting))--1 on 1 coach-->C((Working On Concentation))
  C((Working On Concentation))--1 on 1 coach weekly-->C((Working On Concentation))

Scenarios

  1. Jailbreaking for Data Leaked from Hacker Actor: the hacker gets data out of the model by pure prompt manipulation,
  2. Intrusion from Hacker Actor: The malicious instructions pass through the application and can instruct the extension services to do bad things.
  3. Data poisoning for Training data: The source data used to train the LLM has malicious content before it is trained.
  4. Prompt Poising: hidden content or injected content unintentional from an innocent bystander.
[name] By: [by]
Data Access ...
Runtime and Cost ...
Namespaces ...
Advanced Types ...
Scheduling ...
Streaming ...
Feature Transform ...
Time Sensitivity ...
Databricks Feature Store By: Databricks
Data Access ...
Runtime and Cost ...
Namespaces ...
Advanced Types ...
Scheduling ...
Streaming ...
Feature Transform ...
Time Sensitivity ...
@brianray
brianray / gen_table_corpus.py
Created December 26, 2014 16:43
Generate Confluence Wiki table from NLTK Corpus
from nltk.downloader import Downloader
dl = Downloader()
def format(x, fields, type_name, delim):
x = x.__dict__
out = delim
for col in fields.split(delim):
if col == 'type':
out += type_name
prophet_model = Prophet(
growth='linear',
changepoints=None,
n_changepoints=25,
changepoint_range=0.8,
yearly_seasonality=10, # Fourier
weekly_seasonality=3, # Fourier
daily_seasonality='auto',
seasonality_mode='additive',
seasonality_prior_scale=10.0,
import scipy.signal as sg
def decimate_rolling(df, size=100):
out = []
for name in names[:n_samples]:
inds = np.arange(0, len(df), 8000) ## TODO
for i, j in zip(inds[:-1], inds[1:]):
dij = d[i:j]
dij = sg.decimate(dij, 2, ftype="iir")[::2]
out.append(dij)
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.