Skip to content

Instantly share code, notes, and snippets.

View polinabee's full-sized avatar

Polina Berenstein polinabee

  • lvmh
  • paris
View GitHub Profile
@polinabee
polinabee / NumberGuesser_.idea_compiler.xml
Created September 4, 2016 08:17
CS111B Assignment 3: Number Guesser
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="CompilerConfiguration">
<resourceExtensions />
<wildcardResourcePatterns>
<entry name="!?*.java" />
<entry name="!?*.form" />
<entry name="!?*.class" />
<entry name="!?*.groovy" />
<entry name="!?*.scala" />
@polinabee
polinabee / palindrome.js
Last active March 10, 2022 10:13
Have the function PalindromeTwo(str) take the str parameter being passed and return the string true if the parameter is a palindrome, (the string is the same forward as it is backward) otherwise return the string false. The parameter entered may have punctuation and symbols but they should not affect whether the string is in fact a palindrome. F…
function PalindromeTwo(str) {
if (str.toLowerCase().replace(/[^a-z]/g, '') == str.toLowerCase().replace(/[^a-z]/g, '').split('').reverse().join('')){
return true;
}
return false;
}
PalindromeTwo(readline());
@polinabee
polinabee / index.html
Created September 4, 2016 23:57
Weather Machine
<head>
<script type=”text/javascript”></script>
</head>
<body align="center">
<p>
<h3><div id='location'></div></h3>
<h4><div id='weather'></div></h4>
<button id='c-button'>Celsius</button>
@polinabee
polinabee / google-graphs-gdp.markdown
Created September 7, 2016 23:30
Google Graphs: GDP
PBFinal.html
Details
Activity
PBFinal.html
Sharing Info
General Info
Type
HTML
Size
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@polinabee
polinabee / index.html
Created September 25, 2016 02:30
Test for QGIS to Leaflet plugin
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="initial-scale=1,user-scalable=no,maximum-scale=1,width=device-width">
<meta name="mobile-web-app-capable" content="yes">
<meta name="apple-mobile-web-app-capable" content="yes">
<link rel="stylesheet" href="css/leaflet.css" />
@polinabee
polinabee / df_to_postgres.py
Last active March 9, 2021 07:58
Pandas Dataframe to PostgreSQL Quick Conversion
import os
import psycopg2
from psycopg2.extras import execute_batch
import pandas as pd
def get_tuples(d):
datadict = d.to_dict('records')
return [tuple(d.values()) for d in datadict]
import pandas as pd
import numpy as np
import datetime
from sklearn import preprocessing
import category_encoders as ce
from sklearn.impute import IterativeImputer
from sklearn.linear_model import BayesianRidge
@polinabee
polinabee / kmeans-implementation.ipynb
Last active December 18, 2020 14:19
K-Means clustering algorithm from scratch
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.