I hereby claim:
- I am debpu06 on github.
- I am debpu06 (https://keybase.io/debpu06) on keybase.
- I have a public key whose fingerprint is 5F85 B734 390B E39C BC1A B71B 8AC8 CCC7 3F1B F9DF
To claim this, I am signing this object:
I hereby claim:
To claim this, I am signing this object:
using System; | |
using System.Collections.Generic; | |
using System.Configuration; | |
using System.Linq; | |
using System.Threading.Tasks; | |
using System.Web; | |
using System.Web.Http; | |
using EPiServer.Commerce.Catalog.ContentTypes; | |
using EPiServer.Core; | |
using EPiServer.Personalization; |
/* | |
--- | |
name: Image Gallery | |
category: Javascript | |
example: https://www.uspoloassnglobal.com/collections/Polo-Player-Inspired | |
description: Load the optimal image size for each tile: Get the clients screen resolution and multiply it by the dimensions of the tile. If client changes media query, then refresh these images. | |
--- | |
``` | |
*/ |
import { graphql } from "gatsby" | |
export const FiftyFiftyContentQuery = graphql` | |
fragment FiftyFiftyContent on ContentfulFiftyFifty { | |
id | |
sys { | |
contentType { | |
sys { | |
id | |
} |
import { graphql } from "gatsby" | |
export const TextQuery = graphql` | |
fragment TextBlock on ContentfulTextBlock { | |
id | |
bodyContent { | |
json | |
} | |
sys { | |
contentType { |
import React from 'react' | |
import { BLOCKS, MARKS } from '@contentful/rich-text-types'; | |
import { documentToReactComponents } from '@contentful/rich-text-react-renderer'; | |
import { GatsbyImage, getImage } from "gatsby-plugin-image" | |
const Bold = ({ children }) => <b>{children}</b>; | |
const Text = ({ children }) => <p className="align-center">{children}</p>; | |
const richTextImages = {}; |
import { SITE_OWNER_GITHUB, SITE_OWNER_LINKEDIN, SITE_OWNER_TWITTER, SITE_OWNER, SITE_URL } from '../../lib/constants' | |
export default function PostSchema({ post }) { | |
const url = post.canonicalUrl !== undefined && post.canonicalUrl !== null ? post.canonicalUrl : `${SITE_URL}/blog/${post.slug}`; | |
return ( | |
<script | |
defer | |
type="application/ld+json" |
pp = PdfPages(outputfolder + 'my_pdf_name.pdf') # create a new instance of PdfPages specifying the file location | |
figs = [fig1, fig2, fig3] # all of the figures to add to the file in a list | |
for fig in figs: # loop through each figure | |
fig.savefig(pp, format='pdf') # save that figure to the file, specifying pdf format | |
pp.close() # close the file |
# Starting point | |
class State: | |
def __init__(self, name, pop,s_intercept=0,d_intercept=100): | |
self.name = name | |
self.population = pop | |
#supply function parameters | |
self.supply_intercept=s_intercept | |
self.supply_slope=1 | |
import pandas as pd | |
import os | |
# Sample code to calculate the Beta coefficient; Assume we have the following 9 weeks prices for a stock and the market index | |
Stock_WeeklyPrice = [20,35,40,37,22,34,55,35,42] | |
Market_WeeklyPrice = [300, 340, 400, 320, 200, 300, 500, 380, 400] | |
def calculate_beta(stock_weekly_price, market_weekly_price): | |
# A useful code to calculate the percentage change within a series is called np.Series.pct_change() | |
# It returns the percentage change between the current and a prior element, which can be seen as (P_t / P_(t-1))-100% |