working on it ...


Explore Public Snippets

Sort by

Found 2.9M snippets

    public by simonwalker modified Tuesday at 8:01:04 AM  109  1  3  0

    Magento 2 Custom Registration Fields Extension | FME

    Pursue a user experience design of the sign-up form by adding easy to answer fields using Magento 2 Custom registration fields Extension. This extension empowers you to put 13 types of fields on a registration form to intake data from users.Now the next thing is that you can apply validation on custom fields to avoid errors while entering data. The
    // Enter here the actual content of the snippet.												

    public by gchimera modified Monday at 9:53:58 PM  22  0  1  0

    Show new activity

    val intent = Intent(this,

    public by ZeeRQ modified Mar 15, 2019  22  0  2  0


    // 	ULTIMATE SEO OPTIMIZER for Magento 2
    Magento 2 Ultimate SEO Optimizer extension is all in one pack of seven SEO Extensions for your store that significantly reduces your search optimization work load and cost. This Magento 2 SEO extension gives you a combination of 7 powerful tools that automate your SEO tasks such as creating:
     (1) SEO Meta tags
     (2) Image Alt tags
     (3) Rich Snippets
     (4) Sitemap
     (5) No-Follow No-Index tags
     (6) Canonical Tags
     (7) Multilingual Hreflang tags.
     This makes your online presence SEO equipped and improves your online rankings on SERPs.
    Key Features:
    •	Add Extended Google Rich Snippet Tags
    •	Handle Content Language Duplicates with Hreflang Tags
    •	Add No Index No Follow Tags to Any Page
    •	Add Canonical Tags to Prevent Duplication
    •	Auto-create SEO Meta Title, Description & Keywords
    •	Generate SEO Optimized Alt Tags for Product Images
    •	Build XML & HTML Sitemaps for Store
    To explore more about SEO Extension For Magento 2 visit following URL

    public by samuelcrockford modified Mar 14, 2019  58  1  3  0

    Centre child inside its parent - Old School Way

    How to centre a div vertically and horizontally inside its parent
    /* Center a div - The old school way*/
    .parent { /* Center my child relative to me */
      position: relative;
    .child { /* Center me inside my parent*/
        position: absolute;
        top: 50%;
        left: 50%;
        transform: translate(-50%, -50%);

    public by eduros93 modified Mar 1, 2019  97  3  2  -1

    4D+ Data Visualization

    plt, pd, sns, faceting, parallel coordinates
    # Parallel coordinates
    # Each data point is a line showing the value of each dim as it goes from
    #   left to right. You can se relation between dimensions, particularly
    #   relations with the "class_column", which is the hue variable
    # Image in comments
    from pandas.plotting import parallel_coordinates
    parallel_coordinates(df, class_column='targetCol', 
                          color=('#FFE888', '#FF9999'))
    # 2D faceting of 2D scatterplots (4D)
    # Image in comments
    g = sns.FacetGrid(data, col="colFacet",  row="rowFacet")
    g =, "xCol", "yCol", edgecolor="w")
    # Line plot
    # Computes the mean of the y variable for each of the x values
    #   You can encode a third dim by using a line for each value of the dim
    #   You add a 4th (and 5th if you want) with facets
    # Image in comments
    grid = sns.FacetGrid(df, row='facetRowVar', size=2.2, aspect=1.6), 'xVar', 'yVar', 'lineVar', palette='deep')

    public by eduros93 modified Mar 1, 2019  50  1  1  0

    3D Data visualization

    plt, pd, sns, faceting, boxplot, pairplot, scatter, scatterplot, density plot
    # Pairplot (image in comments)
    g = sns.pairplot(train[selectedCols], hue='target', palette = 'seismic',
                    size=1.2, diag_kind = 'kde',diag_kws=dict(shade=True),
    # Boxplot faceted for 2nd dim and grouped for 3rd dim (image in comments)
    sns.boxplot(x="facetCol", y="boxplotCol", hue="hueCol", data=df)
    # 1st dim facet, 2nd and 3rd dims are the scatter plot
    #   the hue dimension is used to give statistical info of the y axis var
    #   We discretize the facet variable to have a finite number of facets
    #   We discretize the y axis variable to then show the quartiles in the plot
    #   Image in comments
    df['discreteFacetVar'] = pd.qcut(df['facetVar'], 
                                    q=quantile_list, labels=quantile_labels)
    df['discreteYaxisVar'] = pd.qcut(df['yaxisVar'], 
                                    q=quantile_list, labels=quantile_labels)
    g = sns.FacetGrid(df, col="discreteFacetVar", 
                      hue='discreteYaxisVar'), "xaxisVar", "yaxisVar", alpha=.7)
    # Like scatterplot but showing density. Scatter plot 2.0
    # 3rd dim is hue, we made a manual hue by plotting twice
    #   each time with a different color
    # Image in comments
    plot1 = sns.kdeplot(df1['col1'], df1['col2'],
                      cmap="YlOrBr", shade=True, shade_lowest=False)
    plot2 = sns.kdeplot(df2['col1'], df2['col2'],
                      cmap="Reds", shade=True, shade_lowest=False)

    public by eduros93 modified Mar 1, 2019  45  0  2  0

    2D Data Visualization

    correlation, heatmap, plt, sns, pd, eda
    # 1:
    # Correlation matrix (Pearson correlation)
    def plotCorr(df):
      plt.title('Pearson Correlation of Features', y=1.05, size=15)
                  square=True, linecolor='white', annot=True)			                
    # 2:
    # Focused correlation matrix
    #   Apply some condition on the correlation of the cols over the target col
    #   before plotting it
    corr = df.corr()
    mask = (corr["targetCol"] > 0.4) + (corr["targetCol"] < -0.4)
    selectedCols = corr.loc[mask].index.values
    # 3:
    # Joint plot (image in comments)
    sns.jointplot(x='col1', y='col2', data=df,
                   kind='reg', space=0, size=5, ratio=4)
    # Grouped bar plot
    # Perform discrete histogram on column x and group by coulmn on hue
    sns.countplot(x="histCol", hue="groupCol", data=df)
    # Faceted boxplot
    # As many boxplots of "y" as values has "x"
    sns.boxplot(x="discreteCol", y="continuousCol", data=df)
    # Distplot with 2nd dim as hue (image in comments)
    #   We use FacetGrid to encode the hue beacuse distplot doesn't have it
    #   (last time I checked anyway)
    g = sns.FacetGrid(wines, hue='hueCol'), 'histCol', kde=False, bins=15)

    public by eduros93 modified Mar 1, 2019  27  0  1  0

    Feature engineering with Pandas

    preprocessing, eda, pd
    # Length of str
    train['Name_length'] = train['Name'].apply(len)
    # create binary variable
    train['Has_Cabin'] = train["Cabin"].apply(lambda x: 0 if type(x) == float else 1)
    # create binary var using filters
    dataset['IsAlone'] = 0
        dataset.loc[dataset['FamilySize'] == 1, 'IsAlone'] = 1
    # fill na's with median or other statistic
    dataset['Fare'] = dataset['Fare'].fillna(train['Fare'].median())
    # divide variable into quantiles
    train['CategoricalFare'] = pd.qcut(train['Fare'], 4)
    # divide variable into equal-range bins
    train['CategoricalAge'] = pd.cut(train['Age'], 5)
    # write a function that receives a value from a series and outputs the value of  a
    # new feature
     dataset['Title'] = dataset['Name'].apply(get_title)
    # replace problematic values
    dataset['Title'] = dataset['Title'].replace('Ms', 'Miss')
    # replace in batch with a mapping
    dataset['Sex'] = dataset['Sex'].map( {'female': 0, 'male': 1} ).astype(int)
    # assign a value to a whole filtered selection
    dataset.loc[(dataset['Fare'] > 7.91) & (dataset['Fare'] <= 14.454), 'Fare'] = 1
    # batch replacing in a column
    dataset['Title'] = dataset['Title'].replace(weirdTitlesList, 'Rare')
    # fill nan's with specific guesses for subgroups
    dataset.loc[ (dataset.Age.isnull()) & (dataset.Sex == i) 
                  & (dataset.Pclass == j),'Age'] = myGuess

    public by ADSInfoworld modified Feb 23, 2019  36  0  1  0

    Professional Logo Designing Company in Delhi

    If you are looking for a creative professional Logo Design for your 
    corporate business. We offer Corporate unique Logo Designing services
    and website designing at reasonable cost. We don’t use templates; 
    We are Logo designing company that design creative logo for any type 
    of business that give a unique name fame in industry as per client 
    More info visit

    public by Magesolution modified Feb 19, 2019  47  2  3  0

    Configurable Product Purchase Variables for Magento 2

    This extension facilitates customers to purchase a number of products with variable options.For example, when you intend to to buy a T-Shirt on a default Magento store, you are not able to buy a number of products with the same style or size but with different colors in one purchase. Instead you can only add each of item to cart one by one. This e		
    • Public Snippets
    • Channels Snippets