Skip to content

Instantly share code, notes, and snippets.

View andramarkov's full-sized avatar

Andra Markov andramarkov

View GitHub Profile
import pandas as pd
import datetime
#nama file
source = 'marketingresign_is_shipper_false.csv'
try:
mulai = datetime.datetime.now()
#baca csv, csv saya separatornya comma, ubah menjadi sep='\t' jika separator file anda tab
data = pd.read_csv(source, sep=',')
@andramarkov
andramarkov / sampleREADME.md
Created June 22, 2020 04:07 — forked from FrancesCoronel/sampleREADME.md
A sample README for all your GitHub projects.

FVCproductions

INSERT GRAPHIC HERE (include hyperlink in image)

Repository Title Goes Here

Subtitle or Short Description Goes Here

@andramarkov
andramarkov / eod_yahoo_all.py
Last active May 4, 2020 10:53
Ambil data historis EOD via yahoo, hasil nya dalam bentuk *.csv yang tersimpan di desktop (saya pakai mac), csv ini bisa di import dari amibroker
'''ini prinsipnya sama dengan EOD_direct_to_db_merged.py, bedanya ini nonmerged, pake ini karena eod model lama sering error 'date' '''
import sys
sys.path.append('/Users/andra/Downloads/adrx_repo/bitbucket/newpystock/reorg')
from datetime import datetime, timedelta
import pandas as pd
#agar bisa kayak gini maka harus bikin __init__.py di folder
from lib.yfx_fakeuseragent_modami import IntraData as ambil
import pymysql
@andramarkov
andramarkov / 01_Readme.md
Created October 15, 2019 07:01 — forked from Wildcarde/01_Readme.md
Quick demo embedding a Bokeh chart inside a Flask application

This works in a python 3.6 environment with bokeh and flask installed. To use this you need the following directory structure:

app/
 - templates/
   - hello.html
 - bokeh-slider.py
 - hello.py

After that you need to open two terminals at app/, in the first one you need to run the bokeh server with the command:

@andramarkov
andramarkov / install_and_using.md
Created September 6, 2019 03:47 — forked from sangheestyle/install_and_using.md
Install and using numba on mac

Install and using numba on mac

  • Mac version: 10.11.3
  • Python version: 3.5.1

Install

$ brew tap homebrew/versions
$ brew install llvm37
@andramarkov
andramarkov / capp_treemaps.py
Created September 5, 2019 03:59 — forked from gVallverdu/capp_treemaps.py
Treemaps with python and matplotlib
import matplotlib
import matplotlib.pyplot as plt
import pandas as pd
import squarify
# qualtities plotted
# squarre area is the town surface area (superf)
# color scale is the town population in 2011 (p11_pop)
# read data from csv file
@andramarkov
andramarkov / fibonacci_closure.go
Created February 20, 2018 04:04 — forked from tetsuok/fibonacci_closure.go
An answer of the exercise: Fibonacci closure on a tour of Go
package main
import "fmt"
// Very naive answer.
// fibonacci is a function that returns
// a function that returns an int.
func fibonacci() func() int {
n := 0
a := 0
@andramarkov
andramarkov / 44.go
Created February 20, 2018 04:04 — forked from weppos/44.go
A Tour of Go Exercise: Fibonacci closure
package main
import "fmt"
// fibonacci is a function that returns
// a function that returns an int.
func fibonacci() func() int {
f2, f1 := 0, 1
return func() int {
f := f2
@andramarkov
andramarkov / load_mega_instances.sh
Created August 13, 2017 19:04 — forked from arthurafarias/load_mega_instances.sh
Simple example script to load multiples instances of mega.co.nz client on linux.
#!/bin/sh
for d in */ ; do
HOME=$(pwd)/$d;
echo $d;
# Remove the comment by your need
# megasync # first run (configure client by client at once)
# megasync 2> /dev/null & # load all clients at non blocking way
done
@andramarkov
andramarkov / multi-git.md
Created August 8, 2017 08:02 — forked from rosswd/multi-git-win.md
Setting up a Github and Bitbucket account on the same computer.

Setting up github and bitbucket on the same computer

Github will be the main account and bitbucket the secondary.

Create SSH Keys

ssh-keygen -t rsa -C "github email"

Enter passphrase when prompted. If you see an option to save the passphrase in your keychain, do it for an easier life.