Skip to content

Instantly share code, notes, and snippets.

View existeundelta's full-sized avatar

ExisteUnDelta existeundelta

  • Barcelona
View GitHub Profile
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@existeundelta
existeundelta / pspark_config.py
Created February 28, 2018 08:47 — forked from robenalt/pspark_config.py
Sample pyspark context setting with configs params
# Set up spark configuration
conf = SparkConf().setMaster("yarn-client").setAppName("sparK-mer")
#conf = SparkConf().setMaster("local[16]").setAppName("sparK-mer")
conf.set("yarn.nodemanager.resource.cpu_vcores",args.C)
# Saturate with executors
conf.set("spark.executor.instances",executorInstances)
conf.set("spark.executor.heartbeatInterval","5s")
# cores per executor
conf.set("spark.executor.cores",args.E)
# set driver cores
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@existeundelta
existeundelta / README.txt
Created April 2, 2021 18:37 — forked from miraculixx/README.txt
coin toss sequence, probability experiment in response to @nntaleb https://twitter.com/nntaleb/status/1377576808590282761
Question by @nntaleb
Throw a coin, H=head, T= Tail. Which sequence one is more likely?
A={H,T,H,T,H,T,H,T,H,T,T,H,T,H,H,T,T,T,H,H}
B={H,H,H,H,H,H,H,H,H,H,H,H,H,H,H,H,H,H,H,H}
C={H,H,H,H,H,H,H,H,H,H,T,T,T,T,T,T,T,T,T,T}
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@existeundelta
existeundelta / search-gpt.py
Created February 12, 2023 09:02 — forked from iamarcel/search-gpt.py
Basic GPT-3 + Bing Answering Machine
import os
import openai
import requests
from pprint import pprint
import dotenv
dotenv.load_dotenv()
openai_api_key = os.environ.get("OPENAI_API_KEY")
bing_search_api_key = os.environ['BING_SEARCH_V7_SUBSCRIPTION_KEY']
@existeundelta
existeundelta / agent.py
Created February 23, 2023 06:25 — forked from wiseman/agent.py
Langchain example: self-debugging
from io import StringIO
import sys
from typing import Dict, Optional
from langchain.agents import load_tools
from langchain.agents import initialize_agent
from langchain.agents.tools import Tool
from langchain.llms import OpenAI