Bigquery pivot rows to columns

Also known as Othello...

2012.01.21 22:39 trustmeimaliar Also known as Othello...


2013.01.18 07:41 kennethlaskoski Periodic Table

The Periodic Table of Elements

2023.06.10 05:11 FreshlyPeeledBananas Need help reimagining my board

Need help reimagining my board
I'm currently on a mission to simplify my component-bloated game by reducing some of them. The game is about salvaging resources from the ocean through contracts using boats and divers. If you want more details and to see the early prototypes, you can check out my previous posts here:
One group of things I want to remove from the game are the Depth chips, Depth cards, and Exploration event cards. And that's where I need your help.
I'm looking to reimagine the game board. Right now, the board is made up of nine pieces, creating a 3x3 grid. Each piece, called a region, measures 24cm x 24cm (~9.5in x ~9.5in) and is divided into smaller 3x3 sections, which are further divided into 2x2 quadrants.
The game starts with 2 revealed regions and when a player explores an unexplored region, they draw a Depth card and a Resource card. These cards determine the depth chips and resources to be placed on the revealed part of the board. Additionally, they draw an exploration event card, which could be a treasure report, an animal event, or nothing at all.
But here's the problem: there are just too many components, and it doesn't really feel like you're exploring because you can already see the seabed, so there's no real sense of revelation. Plus, the depth chips don't match up exactly with what you see, and the resources don't match the environment either, so no real immersion either.
Here's an idea I had: instead of the current larger regions, we could have smaller 2x2 sections for each piece, making them measure 16x16cm (~6.3in x ~6.3in). Each piece would have two sides: one for the sea surface and the other for the seabed. We'd start with the sea surface facing up, and when a player explores, they would flip the piece to reveal the seabed with the depths shown in the illustration. It could also incorporate other elements like animal events or treasure reports into the illustrations. Plus, this reduction in size would lead to a lower table real state also (there would be one less row and column of sections overall).
However, there's a practical challenge with this solution. Flipping the board pieces might be a bit tricky. Notching the pieces could be an option, but I'm not a big fan of that idea because it might disrupt the immersive feeling of the game.
Do you have any suggestions on how to tackle this issue and find a simple and friendly solution?
submitted by FreshlyPeeledBananas to BoardgameDesign [link] [comments]

2023.06.10 05:10 Kyojin1919 Comfort Save

What are your comfort saves?
For me, it’s either a classic Man City save where I attempt to win everything at least five years in a row or a Brighton save where I try to get them their first major trophy.
submitted by Kyojin1919 to footballmanagergames [link] [comments]

2023.06.10 05:09 TheItalianMi1f lock your doors the weather is controlling you

lock your doors the weather is controlling you submitted by TheItalianMi1f to sennyk4 [link] [comments]

2023.06.10 05:09 AutoModerator [] ✔️ Alex Cattoni – Posse Eye Brand Voice Challenge Program ✔️ Full Course Download

[] ✔️ Alex Cattoni – Posse Eye Brand Voice Challenge Program ✔️ Full Course Download
Get the course here: [] ✔️ Alex Cattoni – Posse Eye Brand Voice Challenge Program ✔️ Full Course Download
Courses proof (screenshots for example, or 1 free sample video from the course) are available upon demand, simply Contact us here

Learn How To Craft A Spellbinding Brand Voice That Helps You Stand Out, Sell Out & Effortlessly Attract Your Dream Customers – In Only 5 Days

What You Get:



Today, 89% of customers are loyal to brands that share their values and that only means one thing – it’s no longer enough to have the highest quality product or the cheapest price. If you want to stand out and rise above the noise, you’ve got to get crystal clear on who you are (really) and what you stand for. In this session, we’ll evoke your power values and unlock your conviction codes, the magnetic coordinates that call in your dream customers.


Mirror, mirror on the wall, who is the brand to rule them all? Now that you’ve identified who you are as a brand, it’s important to deeply understand who you serve. On day 2, you’ll identify your brand personality and the unique ways you reflect your values to the world. With the Mentor’s Mirror, you’ll find out how to emotionally connect with your customer’s core values, drives and desires to become the trusted source for the guidance they seek.


On day 3 of the Challenge, I’ll help you identify your brand DNA – the stand-out positioning strategy that makes you different from any other brand out there. You’ll crystallize the most important messaging assets in any Brand Voice, unapologetically declare your mission and map out your action plan for total world domination. Take it from me, when you fight for what you believe in and fiercely serve your customers, it’s Mission Posse-ble.


Your story is the window to your brand’s soul. It’s how your customers connect to you, rally behind you and stay with you. Every great brand has a powerful story – a domino effect of defining moments, scary pivots and late night “ahas!” that led you to where you are now… and future events, yet to happen, that will continue to guide your path as you build your empire. In this session, you’ll learn how to craft a deeply relatable brand story using our proven 3-part storytelling structure.


Now that you’ve identified all 4 elements of your brand strategy, it’s time to look through the Posse Eye to discover your Brand Rally Cry. On day 5, you’ll learn how to conjure a spellbinding Brand Voice and craft the unifying call that will captivate your customers and rally raving fans. You’ll walk away with your very own Brand Voice Guide and discover the practical ways you can use it to bring clarity to your messaging and ignite your mission.




Want a behind-the-scenes look at how the Copy Posse was born? Throughout this Challenge, you’ll discover how I crystallized my brand positioning strategy, rallied over 300,000 rad humans around the world and built a lucrative 7-figure brand in under 3 years. The best part? You’ll get a never-seen-before copy of the Copy Posse Brand Voice Guide PLUS a customizable template that you can use to Possify and glossify your very own Brand Voice Guide.


In this Q&A interview with 6 graduates of Alex’s flagship copywriting coaching program — the Copy Posse Launch Pad — you’ll discover how these aspiring copywriters used the techniques and templates that they learned from the Copy Posse (including the branding and storytelling strategies that you’ll access in this Challenge) to quit their jobs, ignite their copywriting skills from scratch and build fun, fulfilling, and lucrative businesses in less than ONE YEAR.


During this video critique, Alex shares her screen so you can look over her shoulder as she reviews and critiques 3 Challengers’ Brand Voice Guides. Watch from behind the scenes as she reveals valuable insight and copywriting tricks to help you finesse your own Brand Voice Guide, followed by answers to your most pressing questions when it comes to crafting your Rally Cry and sharing it with the world…
LIMITED-TIME BONUS #1 Sales Emails & Social Media Swipe File


Want real proof that the Copy Posse branding framework freakin’ works? Get an insider copy of my complete and confidential launch blueprint for The Posse Eye Challenge. This swipe file includes ALL sales and content emails and EVERY social media post that my team and I wrote to successfully launch the live challenge for the first time, based on our own Brand Voice Guide.


An ex-Apple veteran who worked her way from retail store employee to executive speechwriter, designing presentations given to Steve Jobs AND authoring Apple’s credo, Anita runs Cause:Effect Creative, a brand vision-writing agency that helps purpose-driven leaders and organizations rally hearts and minds around what fuels their soul.
In this video masterclass with Anita, she’ll take you through her proprietary process and powerful questions to ask for a stellar creative brief and reveal the 5 biggest takeaways when it comes to building (and writing for) a soul-aligned brand.
submitted by AutoModerator to Genkicourses_Com [link] [comments]

2023.06.10 05:08 skquestion The Doctor Park Avenue Armory rush seating

I purchased Rush tickets from TodayTix for The Doctor, and our seats were in the rear center back, in the absolute last row, as the only person behind me was a staff who seemed to have what looked like a digital prompter tablet in front of him. I did not know what his role was. Then as the show began, he made so much noise it was unbelievable. He kept turning pages of something all throughout, then kept crinkling something which I assumed was perhaps some gadget for the show but actually when I turned around I saw it was a candy wrapper. He was constantly opening his bag, taking something out, then turning some sheets over and over. He was clearly working which was simply very noisy, and the seats directly in front of him should not be sold, even for a discounted rush price, to theatergoers who want to watch theater. At some point, I realized these seats simply were not tenable, it wasn't possible to focus on the show. Rush tickets should not be a throwaway scam. We are paying for entertainment after all. It was the most aggravating, painful 2 hours (that's how long the first act was). I walked out after the first act.
submitted by skquestion to Broadway [link] [comments]

2023.06.10 05:07 aeouo I always find Azul tricky to teach

I've noticed that despite having relatively simple rules, Azul is a game that I somewhat struggle to teach.
I think I find it difficult to explain because of the gameplay loop (drafting tiles, placing tiles in the pattern lines, placing them on the mosaic, tiling the wall, scoring). Everything is so tightly connected to the steps before and after that you really need to understand it all for the game to make sense. I guess I would contrast it with Dominion. In Dominion, a new player won't grasp all the action cards or strategies, but they can at least do something like, "Oh, I'll buy a smithy and it'll give me more cards in the future. That seems good!". Even if sub-optimal, they can make a plan, execute it and see benefits. In Azul, if you don't understand a step, the whole thing stops making sense, so I feel bad.
Here's what I try to do (and what people think):
To begin, I'll lay out some piles with tiles as visual aids and explain that we are trying to make beautiful mosaics for the king. Then I have to choose how to present the gameplay loops. I'm brushing over gameplay details here, because I'm just giving the general gist of the problem I tend to have.
If I Go Up the Chain
If I Go Down the Chain
What to do? I notice most guides say to start with how to score points / the objective, but in Azul that just seems particularly confusing as a starting place. It's either dive into the minutia of "If you place this tile next to these tiles, you get this many points", while everyone wonders where the hell these tiles came from, or gloss over everything with, "You'll get points based on how tiles end up in your mosaic", which leaves everyone wondering what affects the points and how the tiles end up in the mosaic.
I've mostly followed the "If I Go Up the Chain" path when explaining. While people don't tend to have the motivation for why to do certain things, they at least mostly understand the actual mechanics once I get to the end. Writing this all out, I'm thinking that maybe the best way is to go down the chain, then back up. Start by saying something like, "I find that before you make a decision in Azul, it helps to understand the consequences of those decisions. Because of that, I like to begin by explaining the end of the game first and then work backwards to the start of the game. That way, you can see what the after-effects of a decision might be. Because I'll be working backwards, it might be unclear how we get to each step as I'm covering it, but don't worry, we will cover it. Also, once I've covered everything backwards, I'll make sure to run through it again from beginning to end, so that you can see how the game plays out. But if anything is unclear or confusing, please ask questions and I'll make sure to address them"
I suppose that might help with expectation setting, so that people can focus on the incomplete information I give at each step, then I can help synthesize it all at the end.
I don't know, anybody have thoughts? Azul is often a great gateway game, so when I teach it I don't want anyone to struggle through without getting it, then feel like they didn't really have a chance to play well because they didn't understand the details.
submitted by aeouo to boardgames [link] [comments]

2023.06.10 05:05 389Tman389 [Fun Spot Atlanta] 9 June 2023 Trip Report

[Fun Spot Atlanta] 9 June 2023 Trip Report
Today I woke up at dawn to fly across the country to Atlanta and start this years road trip. Got a few warmups with the comically fast and janky Sky Trains at the Dallas and Atlanta airports before heading straight to Fun Spot Atlanta. The approach to the park is incredible, there’s nothing but trees all around until BAM a 15 million dollar RMC pops out in the distance.
Parking was free today which was nice, so within 10 minutes of arriving we were already on ArieForce One (x6). The ops were incredibly slow with one train and the long list of tasks the 2 ride ops had to handle, but it didn’t matter and we marathoned the crap out of it! If anything the break was necessary so our shins didn’t get cut off from the crazy airtime.
ArieForce One is definitely a front row ride in all aspects other than the first drop. The airtime, sense of speed, and inversions hit much harder with a higher quality in the front. Coming into the Raven truss dive you get ejected out of our seat, and the massive over bank lifts you up with a decent intensity as well. I was surprised at how insane the first zero g roll over the arcade was and how manageable the ending airtime hills were.
To give my shins a break we went and rode the lovable E&F Miler jank that was Hurricane (x1) and Sea Serpent (x1). Hurricane had some super comfortable seats but the sharp turns were a little painful on the legs. They may be old but those E&F hurricane rides are a lot of fun. Sea Serpent was most interesting to me because they have the ride raised on some wood pallets which looks pretty strange to me.
It’s incredible to me that you can marathon a coaster as good as ArieForce (until your shins can’t take it anymore) so easily. There were quite a few people at the park on a Friday night as well so all the coasters were full every time they were run. I really hope this works out for Fun Spot. I’m rooting for them. Anyways next up is a first visit to SFOG after an incredible start to the trip
submitted by 389Tman389 to rollercoasters [link] [comments]

2023.06.10 05:03 Aurora_Goreslinger HELP accidently took the sugar pills instead of regular ones

It is now 6 days after my period and I'm so fucking stupid I just realized I've been taking sugar pills those 6 days. I've had sex twice in this time span. If I take normal birth control tonight and plan B tomorrow will it work? I've missed up to 3 days in a row before of my birth control and never had problems but now I really fucked up.. when would be a good time to try a pregnancy test as well? I don't know how early they can detect.
submitted by Aurora_Goreslinger to birthcontrol [link] [comments]

2023.06.10 05:02 AVeryCoolGamer Rate my Prison

Rate my Prison submitted by AVeryCoolGamer to prisonarchitect [link] [comments]

2023.06.10 05:02 halcyonhal Power way off for Smartrow vs s4

I have a Smartrow that I’ve hooked up to my garmin watch. The power output just doesn’t seem to make much sense… I’ll be rowing a reasonable pace and it’ll say ~140 watts.
The s4 says 220watts. In comparison to my two bikes that have power meters, I feel like it is more likely to be in the 200w range. 140 is just nothing… particularly as you push with both legs (vs one at a time on a bike).
Kinda of frustrated as Smartrow is a pain in the butt and the only reason you really bother with it, is if you really wanted accurate data.
Has anyone else been able to validate that the power output from their Smartrow is accurate?
Not exactly sure how you’d do that but thought it’s worth asking :)
submitted by halcyonhal to smartrow [link] [comments]

2023.06.10 05:01 AutoModerator [] [Get] ✔️ Adam Bensman – 6-Figure Income Sprint ✔️ Full Course Download

[] [Get] ✔️ Adam Bensman – 6-Figure Income Sprint ✔️ Full Course Download
Get the course here: [] [Get] ✔️ Adam Bensman – 6-Figure Income Sprint ✔️ Full Course Download

*Exclusively for Copywriters With Existing Clients and 1+ Years Experience*

The Copywriter’s 6-Figure Income Sprint

My Proven “Turn Key” Business Model to Earn a Consistent – Per Month, Every Month, With Fewer Clients, Making a Deeper Impact, and Taking Back Your Life
Are you ready to transform your freelance copywriting job into a sustainable, scalable, and wildly profitable 6-figure business in as fast as 60 days like Chris?
Not only did this work for Chris, I discovered this model as I grew to per month of income in less than 24 months…
While having STRICT client boundaries, NOT working weekends, NOT working evenings, and vacationing multiple times per year…
AND delivered the best (record breaking) results for my clients.
I’m going to show you exactly how I did it.
Join me as I guide you step-by-step through an ultra-personal video-course experience to…
  • STOP providing strategy and consulting for free
  • STOP being an order taker
  • ​STOP selling “words on a page”
  • STOP bidding projects
  • STOP the never-ending cycle of prospecting for the next client
  • STOP the feast-famine cycle (best month followed by worst)
  • STOP letting clients control your life and walk all over you
And most importantly…
  • START getting paid (a lot) for strategy and consulting
  • START being an advisor to clients who respect you
  • ​START providing comprehensive strategy (first) and copywriting
  • START earning – per client (even small biz’s)
  • ​START developing deeper relationships with your clients
  • ​START earning consistent, predictable, reliable income every single month
  • ​START taking care of YOU, set boundaries, and build your business around your life
You’ll be guided through my easy-to-follow, 6-step process to learn the theory behind the pivots you’ll be making for your own businesses.
Then we’ll shift our focus to execution.
Each module has a “business assignment,” so you’ll experience wins damn-near every day you’re in there building your business.
It will all come together, one puzzle piece at a time.
You’re going to experience a massive transformation – both personally and professionally as you reposition and repackage your existing services into a high-ticket, retainer model business that will empower you to earn… or even PER MONTH with only a handful of clients that you actually LOVE working with.
But it ain’t all about the money, honey.
This is about building your LIFE first.
Because burnout happens when you are trying to fit in everything that’s truly important “when there’s time.”
(This is the miserable cycle of “fitting my life in around my business” — been there?)
What’s important for you to have more time for?
For me, it’s time with my wife, our 2 dogs, friends, mountain biking, fitness, cooking, travel, and unplugging in nature. ← All things I didn’t have time for when I was non-stop prospecting and reacting to client demands…
Listen, The Copywriter’s 6-Figure Income Sprint is no-fluff, jam-packed with value, and has literally everything you need to implement this “turn key” business plan and create your new lifestyle business earning serious money in as fast as 60 days if you apply these steps as you learn.


Courses proof (screenshots for example, or 1 free sample video from the course) are available upon demand, simply Contact us here
submitted by AutoModerator to Genkicourses_Com [link] [comments]

2023.06.10 05:00 japanpole SANFL Match Thread: Baby Crows vs. Woodville West Rowey's

Since Reddit is going to end soon, I might as well go rogue and start SANFL match threads.

Watch us play 2 Eagles teams in a row
submitted by japanpole to adelaidefc [link] [comments]

2023.06.10 05:00 Rosa_Colored_Glasses Camelot shake up halfway through!

Camelot shake up halfway through!
Andrew Dunlap out at intermission, Fergie Philippe in as Arthur! Not quite sure why, but so many props to Fergie - to completely pivot from Sir Sagramore to King Arthur, absolutely stunning and marvelous.
submitted by Rosa_Colored_Glasses to Broadway [link] [comments]

2023.06.10 04:59 Mustella_ Progression Sheet Savior Updated

Since the SuckHard's calculator is updated for Savior and Haste's spreadsheet hasn't been updated for a while, I came up with a new version (with u/Haste-'s approval, ofc).

--- Maplestory Reboot Progression Sheet [Savior Updated] ---

Besides the usual 'Average' costs that Haste created, I also added a '75th percentile' column for more risk-averse people.
Quick guide on how to use it:
  1. make a copy of the spreadsheet;
  2. fulfill the bold numbers in column J;
  3. check boxes for what you already achieved;
  4. sort it using column G (averages) or H (75th %iles);
  5. the bigger the number, the more cost-efficient will be the upgrade.
Let me know if there's any wrong data; I'm also open to suggestions for next updates.
submitted by Mustella_ to Maplestory [link] [comments]

2023.06.10 04:59 Working_Page_2833 Selling Laufey Tix (ONE)

Hi guys,
I'm selling one of my tickets to Laufey for Los Angeles November 18th! I am seated at Row M Seat 39! If you look up an image it's kinda fire let's be honest. I'm only selling because I got a ticket for a more preferred date. I'm not a scammer plssssss I'm also gullible so please don't scam me I BEG. Selling for $210 but we can chat and figure out what works best for you.
submitted by Working_Page_2833 to laufeymusic [link] [comments]

2023.06.10 04:57 djsjjskssks how can i make this circle into a square

how can i make this circle into a square
how can i make the next rows of this project turn the circle shape into a square so that i can add it to a blanket? like how can i go about making the corners for this? any advice will help:)
submitted by djsjjskssks to crochet [link] [comments]

2023.06.10 04:56 butdoiknowiknow I was prescribed 0.5mg clonazepam, what routine should I follow to prevent intolerance/addiction?

I’m thinking it definitely shouldn’t be taken everyday.
How about alternative days? Or maximum 3x a week? Max 3 days in a row? Anyone know before I end up reaching that stage myself? 😂
I started taking pristiq everyday last week but I’m thinking of taking clonazepam to bide my anxiety until the pristiq starts working in a few weeks. I feel like pristiq is making me more anxious, but I’ll have to stay on till I reach its effective results in a few weeks.
submitted by butdoiknowiknow to Anxiety [link] [comments]

2023.06.10 04:54 _The_Librarian I've been playing with prompts and stuff and a post earlier had me playing around with vectorization. I'm not great a coding but here's what I have!

Yes it's thrown together pretty messily. I was playing with the concept of dual-sided prompting using the "role" part of gpt3.5turbo. Which is why it's just a simple SQL table instead of anything actually good.
The vectors are pretty simple at the moment but I just thought I'd throw this out there for people who are smarter than me that can take it further. Eventually I want to be able to search through the vectors via time.
import datetime import pickle import openai import sqlite3 import os from openai import OpenAIError from sklearn.feature_extraction.text import TfidfVectorizer import config from config import ( API_FILE, CONVERSATION_OUTPUT_FILE, REMOVE_OUTPUT_STRINGS_FILE, USER_NAME, BOT_NAME, DATABASE_NAME, delete_table_on_exit, MAX_TOKENS, TEMPERATURE, TOP_P, PRESENCE_PENALTY, FREQUENCY_PENALTY, BEST_OF, STOP_SEQUENCES, ) DESCRIPTION_TEXT, DIRECTIVE_TEXT = config.load_all_files() def authenticate_openai(): try: with open(API_FILE, "r") as file: openai.api_key = except: print("Failed to authenticate with OpenAI API. Please check your credentials and try again.") exit() def create_tables(): with sqlite3.connect(f"{DATABASE_NAME}.db") as conn: cursor = conn.cursor() cursor.execute(""" CREATE TABLE IF NOT EXISTS conversation_history ( id INTEGER PRIMARY KEY, user_prompt TEXT, chatbot_response TEXT, vector BLOB, timestamp TEXT ) """) conn.commit() return conn vectorizer = TfidfVectorizer() def generate_vector(user_prompt, chatbot_response): # combine the user and chatbot responses into one "document" document = user_prompt + " " + chatbot_response # fit_transform expects a list of documents, and we only have one, # so we wrap our single document in a list vectors = vectorizer.fit_transform([document]) # fit_transform returns a sparse matrix, but we need to store our vector # in the database as a simple list, so we convert the matrix to an array # and then convert the array to a list dense_vector = vectors.toarray() vector = dense_vector.tolist() return vector def build_messages(conversation_history, DESCRIPTION_TEXT, DIRECTIVE_TEXT): messages = [{"role": "system", "content": DESCRIPTION_TEXT, "name": BOT_NAME}] for exchange in conversation_history: messages.append({"role": "user", "content": exchange[USER_NAME], "name": USER_NAME}) if exchange[BOT_NAME]: messages.append({"role": "assistant", "content": exchange[BOT_NAME], "name": BOT_NAME}) messages.append({"role": "system", "content": DIRECTIVE_TEXT, "name": BOT_NAME}) return messages def generate_response(conversation_history, max_tokens=MAX_TOKENS): try: messages = build_messages(conversation_history, DESCRIPTION_TEXT, DIRECTIVE_TEXT) # print("Generated messages:", messages) response = openai.ChatCompletion.create( model="gpt-3.5-turbo", messages=messages, max_tokens=MAX_TOKENS, n=BEST_OF, temperature=TEMPERATURE, top_p=TOP_P, frequency_penalty=FREQUENCY_PENALTY, presence_penalty=PRESENCE_PENALTY, stop=STOP_SEQUENCES if STOP_SEQUENCES else None, ) generated_text = response.choices[0].message['content'].strip() # print("Generated text:", generated_text) if not generated_text: raise Exception("ChatGPT failed to generate a response.") return generated_text except OpenAIError as e: delete_last_row(conn) print(f"Error: {str(e)}") raise Exception("ChatGPT failed to generate a response.") def clean_response_text(text): text = ' '.join(text.split()) text = '\n'.join(line.strip() for line in text.splitlines() if line.strip()) return text def insert_conversation(conn, user_prompt, chatbot_response, vector): timestamp = # get the current time in ISO 8601 format with conn: cursor = conn.cursor() # convert the vector to a binary string using pickle vector_blob = pickle.dumps(vector) cursor.execute("INSERT INTO conversation_history (user_prompt, chatbot_response, vector, timestamp) VALUES (?, ?, ?, ?)", (user_prompt, chatbot_response, vector_blob, timestamp)) conn.commit() def get_conversation_history(cursor, max_tokens=4096): rows = [] token_count = 0 for row in cursor.execute("SELECT id, user_prompt, chatbot_response FROM conversation_history ORDER BY id DESC"): user_prompt_len = len(row[1]) if row[1] is not None else 0 chatbot_response_len = len(row[2]) if row[2] is not None else 0 row_token_count = user_prompt_len + chatbot_response_len if token_count + row_token_count < max_tokens: token_count += row_token_count rows.append(row) else: break rows.reverse() conversations = [{"id": row[0], USER_NAME: row[1], BOT_NAME: row[2]} for row in rows] return conversations def sort_conversations(conversations): sorted_conversations = sorted(conversations, key=lambda x: x['id'], reverse=False) return sorted_conversations def delete_last_row(conn): cursor = conn.cursor() cursor.execute("DELETE FROM conversation_history WHERE id = (SELECT MAX(id) FROM conversation_history)") conn.commit() def print_conversation_history(cursor): conversation_history = get_conversation_history(cursor) for exchange in conversation_history: if exchange[USER_NAME]: print(f"\n{USER_NAME}: {exchange[USER_NAME]}") if exchange[BOT_NAME]: print(f"\n{BOT_NAME}: {exchange[BOT_NAME]}") return conversation_history def write_conversation_to_file(text): now = timestamp = now.strftime("%Y-%m-%d %H:%M:%S") with open(CONVERSATION_OUTPUT_FILE, 'a', encoding='utf-8') as f: f.write(f"---START---{timestamp}---\n{text}\n---END---\n") def close_connection(conn): conn.close() conn = sqlite3.connect(f"{DATABASE_NAME}.db") create_tables() def main_loop(): cursor = conn.cursor() while True: user_input = input(f"\n{USER_NAME}: ") if user_input.lower() == "exit": break if user_input.lower() == "delete memory": delete_last_row(conn) print("Deleted memory.") continue # initially insert the user_prompt with placeholder chatbot_response and vector insert_conversation(conn, user_input, None, None) conversation_history = get_conversation_history(cursor, max_tokens=4096 - MAX_TOKENS) try: output = generate_response(conversation_history) clean_response = clean_response_text(output) print(f"\n{BOT_NAME}: {clean_response}") vector = generate_vector(user_input, clean_response) # update the placeholder chatbot_response and vector in the last inserted row vector_blob = pickle.dumps(vector) cursor.execute("UPDATE conversation_history SET chatbot_response = ?, vector = ? WHERE id = (SELECT MAX(id) FROM conversation_history)", (clean_response, vector_blob)) conn.commit() write_conversation_to_file(user_input) write_conversation_to_file(clean_response) except Exception as e: print(e) continue if delete_table_on_exit: cursor.execute("DROP TABLE conversation_history") conn.commit() # Close the database connection conn.close() if __name__ == "__main__": authenticate_openai() main_loop() 
Here's the that goes with it:
# folders and files API_FILE = "openai_api_key.txt" CONVERSATION_OUTPUT_FILE = "conversationlog.txt" REMOVE_OUTPUT_STRINGS_FILE = "removeoutputstrings.txt" # names USER_NAME = "User" BOT_NAME = "CDB" DATABASE_NAME = f"{BOT_NAME}" # bools delete_table_on_exit = False # gpt config MAX_TOKENS = 1024 TEMPERATURE = 0.5 TOP_P = 1.0 PRESENCE_PENALTY = 1.1 FREQUENCY_PENALTY = 1 BEST_OF = 1 STOP_SEQUENCES = None # file loader DESCRIPTION_NAME = "Contrarian" DIRECTIVE_NAME = "ContrarianDi" DESCRIPTION_FOLDER = "descriptions" DIRECTIVE_FOLDER = "directives" DESCRIPTION_FILE_NAME = DESCRIPTION_NAME + ".txt" DIRECTIVE_FILE_NAME = DIRECTIVE_NAME + ".txt" def get_file_path(folder, file_name): return f"{folder}/{file_name}" def load_file(file): with open(file, 'r', encoding='utf8') as f: text = return text def load_all_files(): DESCRIPTION_TEXT = load_file(get_file_path(DESCRIPTION_FOLDER, DESCRIPTION_FILE_NAME)) DIRECTIVE_TEXT = load_file(get_file_path(DIRECTIVE_FOLDER, DIRECTIVE_FILE_NAME)) return DESCRIPTION_TEXT, DIRECTIVE_TEXT 
submitted by _The_Librarian to LocalLLaMA [link] [comments]

2023.06.10 04:53 katnerys-targaryen Roommates with Benefits Chapter Eleven Preview

submitted by katnerys-targaryen to Choices [link] [comments]

2023.06.10 04:51 docXfamas [H] June Choice and other bundled games [W] Paypal, TF2 keys



JUNE 2023 games
MAY 2023 games
APRIL 2023 games
MARCH 2023 games
Safe in Our World Charity Bundle 2023
FEBRUARY 2023 games
Survival Instinct Bundle
JANUARY 2023 games
DECEMBER 2022 Monthly Bundle Leftovers
Black Friday VR Voyager's Pack
NOVEMBER 2022 Monthly Bundle Leftovers


MY REP Wishlist
TF2 keys/ Csgo Cases
submitted by docXfamas to SteamGameSwap [link] [comments]

2023.06.10 04:44 TheAviotorDemNutzz Since we talk a lot about rates, here is an informative take on why rates will likely hit 5.25%

I think people will need to prepare of rates to hit 5.25%. I don't want to mince words, the BoC will likely hike at least one more time, but likely twice more, because it would be extremely unusual for them to go into a pause, hike, and then pause again, also taking into consideration they said yesterday:
Bank of Canada deputy governor Paul Beaudry says recent economic data suggests the risk of sticky inflation has gone up, prompting the central bank’s decision to raise interest rates on Wednesday. Beaudry said economic data released since April “tipped the balance” for the central bank. “We've had an accumulation of evidence – on many fronts, over time and across a whole set – that tell us that inflation seems to be more sticky and it's going to be harder to get it down to that 2 per cent," Beaudry said. Beaudry says the rapid rise in consumer spending took the central bank by surprise, while buyers appear to be returning to the housing market. “When we looked at the dynamics in inflation combined with excess demand, that really has increased the risk that we are not going to be able to get inflation down without a bit more monetary tightening,” Beaudry said
If they are thinking core inflation is getting sticky then there is is a good chance there could be 2 more hikes in store. It is also very important to note even if a recession starts they might not be able to cut rates, it's important to look at history and see what happened the last time we had this level of inflation. From the WSJ:
Were the Fed to ease because of growth fears before inflation has been vanquished, it would risk repeating its stop-and-go tightening of the 1970s, which economists now see as a costly policy error. To avoid that mistake, “the Fed may not be able to pivot and cut rates quickly or at all” if a recession begins later this year, said Krishna Guha, vice chairman of Evercore ISI, in a recent report.
“Stop-and-go” refers to how the Fed oscillated between raising rates to tame inflation and then backing off to shore up growth—succeeding at neither. It began in the late 1960s, when Chairman William McChesney Martin Jr. paused rate rises during a recession scare. It worsened under Fed Chairman Arthur Burns, who raised rates significantly between 1972 and 1974 but cut them the following year in the midst of a sharp recession. Inflation fell but settled at still-elevated levels.
“The problem in the 1970s was you tightened. You hit the labor market. And you eased up, and you never took care of the problem,” said Peter Hooper, global head of economic research at Deutsche Bank. Ultimately, it took a change in tactics by the Fed in 1981 under Chairman Paul Volcker to raise rates to far higher levels for inflation to come down and stay down.
Mr. Hooper, who began his career at the Fed in 1973, thinks Mr. Powell won’t repeat those mistakes because the central bank has exhaustively studied them.
So I would make arrangements for what you need to do with rates at 5.25% today, instead of in a panic a couple months down the line.
Thanks to u/_wpgbrownie_ for this insightful compilation.
submitted by TheAviotorDemNutzz to TorontoRealEstate [link] [comments]

2023.06.10 04:44 Dismal-Principle-260 Technology Consulting vs Software Development

Hi people!
I seek advice regarding a couple of career choices that I need to make. I am a fresh graduate with a master's in computer science and around 3 YOE working with developing cloud platforms for a couple of Big Tech companies (before I started my Master's).
I got an offer from a Big 4 for the position of a Senior Technology Consultant in their Financial Services organization, and started with them in mid May. But I got an interview callback from one other company (a prominent clearing house) in my first week with my current employer. I went ahead with the interview, and was able to secure an offer. It's a senior developer position.
I have a fair idea of what to expect from the second offer in terms of long term career prospects, but I am not able to identify what upside/downside I might have if I stick at my current Big4 position. I want to stay in the financial services domain for the next few years, and want to pivot to the quant side eventually if I can. Can someone tell me which place might be better for me if I want to do that? I want to stay fairly technically oriented during my career. What are the other upside of being a consultant with a big 4(if any) that I might not be aware of? It's still early weeks for me with the company, so I'm not able to gauge it well enough.
A couple of side note questions:
  1. Will it look bad for me in future job searches that I left a company 1 month into the job?
  2. I wanted to know what's the average bump in TC one would expect in my position? I am technically a lateral hire, but it's also just been 3 weeks since I graduated. FYI, I have been offered a ~13% bump in TC with my initial offer.
Thank you for your help in advance!
submitted by Dismal-Principle-260 to Big4 [link] [comments]