Skip to content

Instantly share code, notes, and snippets.

View 8331.py
series = pd.Series([2, 4, 6, "sadf", np.nan])
>>> series.hasnans
True
@HuckleberryL
HuckleberryL / resources.md
Created Aug 3, 2021 — forked from fffaraz/resources.md
CS 306 - Linux/UNIX Programming
View resources.md
@alewolf
alewolf / wooptpm-add-custom-dimensions-to-ga-ua.php
Created Aug 3, 2021
add custom dimensions to Google Universal Analytics in woopt WooCommerce Pixel Manager
View wooptpm-add-custom-dimensions-to-ga-ua.php
<?
add_filter('wooptpm_ga_ua_parameters', function ($analytics_parameters, $analytics_id){
$analytics_parameters['custom_map'] = [
'dimension1' => 'ecomm_prodid',
'dimension2' => 'ecomm_pageType',
'dimension3' => 'ecomm_totalValue',
];
return $analytics_parameters;
View 8330.py
# Autocorrelation of tip at lag_10
>>> time_series["tip"].autocorr(lag=8)
0.07475238789967077
@HugsLibRecordKeeper
HugsLibRecordKeeper / output_log.txt
Created Aug 3, 2021
Rimworld output log published using HugsLib
View output_log.txt
Log uploaded on Tuesday, August 3, 2021, 2:08:45 AM
Loaded mods:
Harmony(brrainz.harmony)[mv:1.1.1.0]: 0Harmony(2.1.1), HarmonyMod(1.1.1)
Core(Ludeon.RimWorld): (no assemblies)
Royalty(Ludeon.RimWorld.Royalty): (no assemblies)
Ideology(Ludeon.RimWorld.Ideology): (no assemblies)
RimHUD(Jaxe.RimHUD): RimHUD(1.8.0)
HugsLib(UnlimitedHugs.HugsLib)[ov:9.0.0]: 0Harmony(av:2.1.1,fv:1.2.0.1), HugsLib(av:1.0.0,fv:9.0.0)
Humanoid Alien Races(erdelf.HumanoidAlienRaces): 0Harmony(av:2.1.1,fv:2.1.0), AlienRace(1.0.0)
Mod Manager(Fluffy.ModManager)[mv:3.8.1038]: 0ColourPicker(av:4.0.0,fv:4.1.1082), FluffyUI(av:4.0.0,fv:4.1.1082), ModManager(av:4.0.0,fv:4.1.1082), SemanticVersioning(2.0.0), YamlDotNet(av:11.0.0,fv:11.2.1)
View git_with_visual_studio.txt
https://developercommunity.visualstudio.com/t/error-encountered-while-pushing-to-the-remote-repo-3/308898
Solution for me:
Close VS
Delete (or rename) folder "C:\Program Files (x86)\Microsoft Visual Studio\2017{Community|Professional|Enterprise}\Common7\IDE\CommonExtensions\Microsoft\TeamFoundation\Team Explorer\Git"
Open VS and try to push a commit to a remote repo!
View 8329.py
time_series = tips[["tip"]]
time_series["lag_1"] = time_series["tip"].shift(1)
time_series["lag_2"] = time_series["tip"].shift(2)
time_series["lag_3"] = time_series["tip"].shift(3)
time_series["lag_4"] = time_series["tip"].shift(4)
# time_series['lag_k'] = time_series['tip'].shift(k)
>>> time_series.head()
View 8328.py
series = pd.bdate_range("2021-01-01", "2021-01-31") # A period of one month
>>> len(series)
21
View 8327.py
from datetime import datetime
>>> data.between_time("09:45", "12:00")