Skip to content

Instantly share code, notes, and snippets.

View haydarai's full-sized avatar

Haydar Ali Ismail haydarai

View GitHub Profile
@haydarai
haydarai / studio64.exe.vmoptions
Created February 5, 2017 09:39
My custom Android Studio VM options
# custom Android Studio VM options
#
# *DO NOT* modify this file directly. If there is a value that you would like to override,
# please add it to your user specific configuration file.
#
# See http://tools.android.com/tech-docs/configuration
#
-server
-Xms1G
@haydarai
haydarai / Split train-test dataset.py
Last active December 23, 2020 18:04
Split the data to train and test dataset
X_train, X_test, Y_train, Y_test = sklearn.model_selection.train_test_split(X, Y, test_size = 0.33, random_state = 5)
print(X_train.shape)
print(X_test.shape)
print(Y_train.shape)
print(Y_test.shape)
@haydarai
haydarai / Linear regression.py
Last active December 23, 2020 18:03
Running linear regression, followed by fitting linear model, and plot the differences between actual and predicted value
from sklearn.linear_model import LinearRegression
lm = LinearRegression()
lm.fit(X_train, Y_train)
Y_pred = lm.predict(X_test)
plt.scatter(Y_test, Y_pred)
plt.xlabel("Prices: $Y_i$")
plt.ylabel("Predicted prices: $\hat{Y}_i$")
```
[INFO] ERROR in ./src/pages/account-2-fa-setup/Account2FaSetup.vue?vue&type=style&index=0&lang=css& (./node_modules/css-loader!./node_modules/vue-loader/lib/loaders/stylePostLoader.js!./node_modules/sass-loader/lib/loader.js!./node_modules/vue-loader/lib??vue-loader-options!./src/pages/account-2-fa-setup/Account2FaSetup.vue?vue&type=style&index=0&lang=css&)
[INFO] Module build failed (from ./node_modules/sass-loader/lib/loader.js):
[INFO] Error: Missing binding /Users/haydar/Workspace/src/taigers/iconverse/iconverse-admin/iconverse-admin-frontend/node_modules/node-sass/vendor/darwin-x64-59/binding.node
[INFO] Node Sass could not find a binding for your current environment: OS X 64-bit with Node.js 9.x
[INFO]
[INFO] Found bindings for the following environments:
[INFO] - OS X 64-bit with Node.js 8.x
[INFO]
[INFO] This usually happens because your environment has changed since running `npm install`.

Virtus

Activity tracker for sales

Environment Setup

  1. Copy and paste .env.example as .env and change variables inside the file accordingly
  2. Put firebase service account file in keys folder as firebase.json

Build Setup

function Human (name) {
this.name = name;
}
Human.prototype.sayHello = function () {
setTimeout(function () {
console.log(this.name);
}, 0)
}
var url = 'elastic/tw_post_ews*/_search?q=ori_post:' + this.dt_oripost.id +
'&size=' + total;
var urltop10 = 'elastic/tw_post_ews*/_search?size=' + total;
console.log("ini url", url);
// var url_chart = 'elastic/_search?&size='+total;
//SENTIMEN
var body = {
"query": {
"range": {
# -*- coding: utf-8 -*-
import os
import scrapy
import unidecode
import re
import uuid
from dotenv import load_dotenv
from elasticsearch import Elasticsearch
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
{
"Afghanistan": [
{
"Date": 1999,
"Imports": "15",
"Exports": "20"
},
{
"Date": 2008,
"Imports": "42",