Skip to content

Instantly share code, notes, and snippets.

View famuyiwadayo's full-sized avatar
🏠
Working from home

Famuyiwa Dayo famuyiwadayo

🏠
Working from home
View GitHub Profile
@famuyiwadayo
famuyiwadayo / soundnodeapp.py
Created April 18, 2020 13:59 — forked from robsonke/soundnodeapp.py
This lets soundnodeapp uses your own client id and eliminates the api limit.
import getpass
import json
import re
import requests
client_id = re.compile(',client_id:"(.*?)"').search(requests.get(re.compile('src="https://a-v2.sndcdn.com/assets/app-.*.js"').search(requests.get('https://soundcloud.com/').text).group()[5:-1]).text).group()[12:-1]
username = raw_input('Username: ')
password = getpass.getpass()
const std = @import("std");
const Self = @This();
fn runLoop(self: *Self) !void {
var gpa = std.heap.GeneralPurposeAllocator(.{}){};
const allocator = gpa.allocator();
var server = std.http.Server.init(allocator, .{ .reuse_address = true, .kernel_backlog = 64 });
defer server.deinit();
var listen_address = try std.net.Address.resolveIp("0.0.0.0", 8080);
// https://leetcode.com/problems/3sum/
const unique = (array) => Array.from(
new Set(array.map(x => JSON.stringify(x))),
x => JSON.parse(x)
)
const combinations = (array) => new Array(1 << array.length)
.fill()
.map((_, i) => array.filter((_, j) => i & (1 << j)))
const std = @import("std");
const print = std.debug.print;
const quadtree = @import("quadtree.zig");
const Point = quadtree.Point;
const QuadTree = quadtree.QuadTree;
const Rectangle = quadtree.Rectangle;
pub fn main() !void {
const GeneralPurposeAllocator = std.heap.GeneralPurposeAllocator;
var gpa = GeneralPurposeAllocator(.{}){};