Skip to content

Instantly share code, notes, and snippets.

View Alababdiy's full-sized avatar

Muli-Users Alababdiy

View GitHub Profile
@benbalter
benbalter / parse-csv.php
Created July 24, 2012 22:28
Parse CSV into Associative Array
<?php
$lines = explode( "\n", file_get_contents( 'input.csv' ) );
$headers = str_getcsv( array_shift( $lines ) );
$data = array();
foreach ( $lines as $line ) {
$row = array();
foreach ( str_getcsv( $line ) as $key => $field )
@timmyreilly
timmyreilly / ConnectingToAzureSQLFromPython
Created October 13, 2017 23:02
Using Flask_SQLAlchemy to connect to Azure SQL
#!/usr/bin/env python
import os
import urllib.parse
from flask import Flask
from flask_sqlalchemy import SQLAlchemy
# Configure Database URI:
params = urllib.parse.quote_plus("DRIVER={SQL Server};SERVER=sqlhost.database.windows.net;DATABASE=pythonSQL;UID=username@sqldb;PWD=password56789")
@tanaikech
tanaikech / submit.md
Created August 20, 2018 01:03
Replacing Text to Image for Google Document using Google Apps Script

Replacing Text to Image for Google Document using Google Apps Script

This is a sample script for replacing text to image for Google Document using Google Apps Script (GAS). There is a method for replacing text to text at Class Text of DocumentApp. But there are not methods for replacing text to image. So I created this sample script.

Demo :

This sample image was created by k3-studio.

Usage :

@edwinlee
edwinlee / Code.gs
Last active March 30, 2025 10:17
Sync a Google Sheets spreadsheet to a Firebase Realtime database
/**
* Copyright 2019 Google LLC.
* SPDX-License-Identifier: Apache-2.0
*/
function getEnvironment() {
var environment = {
spreadsheetID: "<REPLACE WITH YOUR SPREADSHEET ID>",
firebaseUrl: "<REPLACE WITH YOUR REALTIME DB URL>"
};
# Freelancing Reviews Samples
=======================================================================
****
=======================================================================
## Buyer Reviews to Sellers
=======================================================================
@tomthorogood
tomthorogood / app.py
Created April 5, 2021 15:06
VCards in python+flask
# Simplistic example using send_file to send the contents generated in the service
@app.route("/vcard/<href_token>")
def get_person_vcard(request: requests.HTTPRequest, href_token: str):
vcard_stream = self.vcard_service.get_vcard(b64decode(href_token.encode('UTF-8')).decode('UTF-8'))
return send_file(vcard_stream, mimetype='text/vcard')
# Freelancing Reviews Samples
=======================================================================
****
=======================================================================
## Buyer Reviews to Sellers
=======================================================================