Skip to content

Instantly share code, notes, and snippets.

provider "aws" {
region = "us-east-1"
}
# Main VPC
# https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/vpc
resource "aws_vpc" "main" {
cidr_block = "10.0.0.0/18"
tags = {
@ahmadhori
ahmadhori / mlops-platforms-functional-requirements.csv
Created February 19, 2022 00:05
Functional requirements for a MLOps platform
Requirement Description Priority
Automation & Scheduling Data science code should run at the end on the cloud Thus deploying and scheduling this code ideally should be done easily by a data scientist without the need for a data engineer to do this. Must have
@ahmadhori
ahmadhori / table.csv
Last active February 18, 2022 23:58
Test table in Medium
firstname lastname age
X Y 27
Y Z 30
#!/bin/python
import sys
import os
import json
class Stream(object):
def __init__(self, content):
@ahmadhori
ahmadhori / linear_flow_batch.py
Created October 29, 2021 00:19
example flow with a step uses batch decorator
from metaflow import FlowSpec, step, batch
class LinearFlow(FlowSpec):
@step
def start(self):
print('This step is running on local machine')
self.next(self.a)
@batch(memory=60000, cpu=1). # using batch to execute step on AWS
@ahmadhori
ahmadhori / inspect_flows.py
Created October 29, 2021 00:18
inspecting metaflow historical runs
from metaflow import Flow
flow = Flow('ModelCreationFlow'). # which flow you want to inspect
for run in flow: # iterate over all the historical runs
if run.successful:
print(run.finished_at) # print when was the run
run_id = run.id # get the run id
df_predection = Flow("ModelCreationFlow")[run_id].data.df_predection
@ahmadhori
ahmadhori / linear_flow.py
Created October 29, 2021 00:13
metaflow example flow
from metaflow import FlowSpec, step
class LinearFlow(FlowSpec):
@step
def start(self):
self.my_var = 'hello world'
self.next(self.a)
@step
var page = require('webpage').create();
//viewportSize being the actual size of the headless browser
page.viewportSize = { width: 1027, height: 763 };
//the clipRect is the portion of the page you are taking a screenshot of
//page.clipRect = { top: 0, left: 0, width: 1024, height: 768 };
//the rest of the code is the same as the previous example
page.open('http://www.kooora.com/', function() {
page.render('github.png');
phantom.exit();
});
عقارات للبيع
عقارات للبيع في مدينة دمشق
http://www.dallalonline.com/realestates/for-sale/%D8%AF%D9%85%D8%B4%D9%82
عقارات للبيع في مدينة اللاذقية
http://www.dallalonline.com/realestates/for-sale/%D8%A7%D9%84%D9%84%D8%A7%D8%B0%D9%82%D9%8A%D8%A9
عقارات للبيع في مدينة حلب
http://www.dallalonline.com/realestates/for-sale/%D8%AD%D9%84%D8%A8
عقارات للبيع في مدينة حمص
http://www.dallalonline.com/realestates/for-sale/%D8%AD%D9%85%D8%B5
عقارات للبيع في مدينة النبك