Skip to content

Instantly share code, notes, and snippets.

View Yonet's full-sized avatar
🎯
Focusing

Yönet Yonet

🎯
Focusing
View GitHub Profile
@Yonet
Yonet / cleanListingsData.js
Created January 12, 2023 20:34
Cleaning the Airbnb data
const { readFile } = require('node:fs/promises');
const { writeFile } = require('node:fs/promises');
const { resolve } = require('node:path');
const deletePropertiesList = ["scrape_id", "source", "last_scraped", "scrape_id", "name", "summary", "space", "description", "experiences_offered", "price", "accomodates", "picture_url", "last_scraped", "source", "host_id", "host_name", "host_since", "host_location", "host_about", "host_response_time", "host_response_rate", "host_acceptance_rate", "host_is_superhost", "host_thumbnail_url", "host_picture_url", "host_neighbourhood", "host_listings_count", "host_total_listings_count", "host_verifications", "host_has_profile_pic", "host_identity_verified", "street", "neighbourhood", "neighbourhood_cleansed", "neighbourhood_group_cleansed", "city", "state", "zipcode", "market", "smart_location", "country_code", "country", "is_location_exact", "room_type", "accommodates", "bathrooms", "bedrooms", "beds", "bed_type", "amenities", "square_feet", "weekly_price", "cleaning_fee"
[
{
"id": 43366490,
"listing_url": "https://www.airbnb.com/rooms/43366490",
"neighborhood_overview": "LOCATION:- central and easy to get to & from:<br />5 minutes (walking) - Orthodox Temple<br />20 minutes - Miami Beach<br />7 minutes - Aventura Mall <br />10 minutes - Gulfstream: shopping/dining/casino/clubs<br />12 minutes - Sunny Isles beach<br />15 minutes - State park with kayaking(rentals)/bike trails/bbq pavilions. <br />15 minutes - Marina / Deep sea fishing charters<br />20-25 minutes - Miami/Ft Lauderdale airports.<br />8 minutes - Aventura hospital, <br />9 minutes (walking) Temple.",
"latitude": 25.96367,
"longitude": -80.18432,
"property_type": "Entire home",
"bathrooms_text": "2 baths",
"last_review": "2022-09-18",
// Atom settings
@Yonet
Yonet / .block
Created September 18, 2016 20:36
Wars II
license: mit
@Yonet
Yonet / .block
Created September 18, 2016 20:35
Wars II
license: mit
@Yonet
Yonet / introrx.md
Last active September 11, 2016 23:01 — forked from staltz/introrx.md
The introduction to Reactive Programming you've been missing
<html>
<head>
<title>Froyo Machine!</title>
<style>
#machine {
float:left;
width:40%;
border:3px outset gray;
}
div#power > img {
@Yonet
Yonet / gist:fd79a36c61fc27518cae
Created July 12, 2015 04:23
Implementation of sqRoot
var sqRoot = function(n){
var upper = n;
var lower = 1;
var results = [1];
var search = function(){
var mid = Math.floor((upper + lower) /2);
var current = mid * mid;
var chairs = {
totalNodes: 1,
nodes: {1:{next: null, prev: null, val: 1}},
addNextNode: addNextNode,
removeNode: removeNode
}
function removeNode(node){
node.prev.next = node.next;
node.next.prev = node.prev;
var flatten = function(obj, cKey, returnObj) {
result = returnObj || {};
for(var key in obj) {
var newKey = cKey ? cKey + '.'+ key : key;
if(!(obj[key] instanceof Object)) {
result[newKey] = obj[key];
}
else if (obj[key] instanceof Object){
flatten(obj[key], newKey, result);
}