Skip to content

Instantly share code, notes, and snippets.

View rtt's full-sized avatar
🚍
' DROP TABLE user_statuses; --

Rich Taylor rtt

🚍
' DROP TABLE user_statuses; --
View GitHub Profile
@rtt
rtt / tinder-api-documentation.md
Last active April 20, 2024 17:01
Tinder API Documentation

Tinder API documentation

Note: this was written in April/May 2014 and the API may has definitely changed since. I have nothing to do with Tinder, nor its API, and I do not offer any support for anything you may build on top of this. Proceed with caution

http://rsty.org/

I've sniffed most of the Tinder API to see how it works. You can use this to create bots (etc) very trivially. Some example python bot code is here -> https://gist.github.com/rtt/5a2e0cfa638c938cca59 (horribly quick and dirty, you've been warned!)

@rtt
rtt / gist:5a2e0cfa638c938cca59
Created August 14, 2014 09:46
example python tinderbot
# encoding: utf8 1,1 Top# encoding: utf8
import argparse
from datetime import datetime
import json
from random import randint
import requests
import sys
from time import sleep
def part1(input_data):
output = input_data.split('\n')
fs = []
cwd = ""
for line in output:
line = line.split()
if line[0] == '$':
# command
def partN(input_data, step):
for i, window in enumerate(
[input_data[i:i + step] for i in range(len(input_data) - step)]):
if len(set(window)) == step:
return i + step
if __name__ == '__main__':
def partN(input_data, step):
for i, window in enumerate(
[input_data[i:i + step] for i in range(len(input_data) - step)]):
if len(set(window)) == step:
return i + step
if __name__ == '__main__':
with open('./input.txt') as f:
import re
def partN(input_data, one_at_a_time):
step = 4
instructions = []
stack_data, instruction_data = input_data.split('\n\n')
cols = int(stack_data.strip().split()[-1]) # ugh?
stacks = [''] * cols
stacks_data_lines = list(reversed(stack_data.split('\n')[:-1]))
def part1(inp):
overlaps = 0
for pair in inp:
bounds = []
for elf in pair.split(','):
lower, upper = elf.split('-')
bounds.append(set(range(int(lower), int(upper) + 1)))
from string import ascii_letters
from itertools import zip_longest
def chunk(things, num):
things = [iter(things)] * num
return zip_longest(fillvalue=None, *things)
def part1(inp):
def run():
with open('./input.txt') as f:
data = f.read()
calorie_counts = {}
for elf, calories in enumerate(data.split('\n\n'), start=1):
calorie_counts[elf] = sum(map(int, calories.strip().split('\n')))
def valid_loc(loc):
'''Validates a lat,lng string value to ensure both lat and lng are within their correct bounds'''
try:
lng, lat = loc.split(',')
lng = float(lng)
lat = float(lat)
except:
pass
else: