This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#pandas datetimeindex docs: https://pandas.pydata.org/pandas-docs/stable/generated/pandas.DatetimeIndex.html | |
#efficient way to extract year from string format date | |
df['year'] = pd.DatetimeIndex(df['birth_date']).year | |
df.head() | |
#pandas datetimeindex docs: https://pandas.pydata.org/pandas-docs/stable/generated/pandas.DatetimeIndex.html | |
df['month'] = pd.DatetimeIndex(df['birth_date']).month | |
df.head() | |
#if the date format comes in datetime, we can also extract the day/month/year using the to_period function |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Parallel.ForEach(File.ReadLines("file.txt"), (line, _, lineNumber) => | |
{ | |
// processing code here | |
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
<div class="loading"> | |
<div class="outer"></div> | |
<div class="inner"></div> | |
</div> | |
*/ | |
/* Loading indicator */ | |
.loading { | |
position: relative; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
<div class="spinner"></div> | |
*/ | |
.spinner { | |
height:60px; | |
width:60px; | |
margin:0 auto; | |
position:relative; | |
-webkit-animation: rotation .6s infinite linear; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function new-template { | |
<# | |
.SYNOPSIS | |
Brief description of what the function does | |
.DESCRIPTION | |
A better description | |
.NOTES | |
Function Name : new-template | |
Author : Adam Stone | |
Requires : PowerShell V2 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<html> | |
<head> | |
<style> | |
.circle-timer, .pie-timer { | |
width: 220px; | |
height: 220px; | |
position: relative; | |
box-shadow: #ccc 0 0 25px; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?xml version="1.0" encoding="UTF-8" ?> | |
<Response> | |
<Say>Hello World</Say> | |
</Response> |