Code To Upload File on FTP Using Python Script

Recently I was working on a project and wanted to upload a file on FTP using Python.

import ftplib
from ftplib import FTP

File2Send = ‘file path’
#To upload file in root directory of FTP location
Output_Directory = “”

ftp = FTP(“ftp.ourpcgeek.com”)
ftp.login(‘user’,’password’)
file = open(File2Send, “rb”)
ftp.cwd(Output_Directory)
ftp.storbinary(‘STOR ‘ + File2Send, file)
print (“STORing File now…”)
ftp.quit()
file.close()
print(“Processign end”)

Following is the code snippet which you can use in case you want to upload file on FTP using Python script:

import ftplib

from ftplib import FTP

File2Send = ‘C:\\Users\\shamshul\\Pictures\\Saved Pictures\\test1.txt’

Output_Directory = “/upload”

   ftp = FTP(“ftp.ourpcgeek.com”)

   ftp.login(‘shamshul’,’wfv2l2Fd’)

   file = open(File2Send, “rb”)

   ftp.cwd(Output_Directory)

   ftp.storbinary(‘STOR ‘ + File2Send, file)

   print (“STORing File now…”)

   ftp.quit()

   file.close()

How to track survey score through Adobe Analytics?

Almost all the companies have surveyed and want to keep track of it for the holistic view of customer satisfaction.

In a survey the possible outcome of a score that can be any of the following numbers- 0,1,2,3,4,5,6,7,8,9,10

The business question can be that what is the best way to capture this score to then be able to calculate the average score through Adobe Analytics.

In Adobe Analytics there is no predefined formula that it can be implemented.

While solving this business problem I came up with two methods.

Method 1:

Step 1 : Take an eVar with the following setting

Step 2: Take an event with the following settings

Step 3: Create a calculate metric

Final Report:

Method 2:

  1. Take an eVar which capture the score
  2. Take counter event which captures the score
  3. Take numeric event to capture the score in the numeric format
  4. Create a calculated metric with the following settings.

 

Final Report:

Please let me know if you have any doubt through comment section, will be happy to reply on it.

Why segment is missing in Data Connector?

Data Connector is formerly known as Genesis. Adobe Data Connectors provide a complete development ecosystem to help Data Connectors partners integrate their products and services into the Adobe Experience Cloud.

Segment created in Adobe Analytics can be reused in Data Connector as Remarketing Segment.
Sometimes the segment is not available in Data Connector. There can be multiple reasons for it like

1. Data Connector owner does not have access to segment
2.The segment is not shared to owner

The major point often get missed, is the compatibility.If the segment is not compatible to Data Warehouse then it will not be available under Data Connector for re-marketing segment.

Google enters e-commerce, beware!

Search engine giant has launched search engine features in India.The user can easily put filter as per choice and browser products only rather than going to a different shopping website and checking the product.
Might be alarming for Amazon and Flipkart but good for the consumers.

Google unveiled ‘Google Shopping’ on their search page. Customers will be able to see trending products through this across different categories.

For retailers, Google is offering ‘Merchant Center’ in Hindi, which allows the seller to list their products for Google Shopping, without paying for ad campaigns.
India has 410 million internet users, however, only one-third shopped online.
As said by Google officials, Google Shopping will be a connector between retailer and consumers, the transaction and delivery of products will be done by the merchant.