Skip to content

Instantly share code, notes, and snippets.

View marius92mc's full-sized avatar

Marius-Constantin Melemciuc marius92mc

  • Bucharest, Romania
View GitHub Profile
@molivier
molivier / gist:271bba5d67de1583a8e3
Last active May 24, 2025 22:39
Set $GOPATH on Mac OSX : bash_profile
# Edit ~/.bash_profile
export GOPATH=/Users/$USER/go
export PATH=$GOPATH/bin:$PATH
# Reload profile : source ~/.bash_profile
@devStepsize
devStepsize / slack_slash_cmd.py
Created April 21, 2016 23:12
Server-side logic to handle a Slack slash command using Python and Flask
'''
This is an example of the server-side logic to handle slash commands in
Python with Flask.
Detailed documentation of Slack slash commands:
https://api.slack.com/slash-commands
Slash commands style guide:
https://medium.com/slack-developer-blog/slash-commands-style-guide-4e91272aa43a#.6zmti394c
'''
import py4j
from pyspark.sql.functions import monotonically_increasing_id
# very important to cache this.
df = df.select(monotonically_increasing_id().alias("index"), "*")\
.cache()
MAX = 34359738368
def mod_binary_search(round, previous_winner, dataset):
# round starts at 0, previous_winner starts at 0
@adimanea
adimanea / emacs.md
Last active March 3, 2019 09:14
My emacs tips, tricks & config
@enricofoltran
enricofoltran / main.go
Last active April 6, 2025 09:48
A simple golang web server with basic logging, tracing, health check, graceful shutdown and zero dependencies
package main
import (
"context"
"flag"
"fmt"
"log"
"net/http"
"os"
"os/signal"