Skip to content

Instantly share code, notes, and snippets.

View csharpforevermore's full-sized avatar
🏠
Working from home

LunaRandle csharpforevermore

🏠
Working from home
View GitHub Profile

Frontend Development

Looking for something else? Take a look at the awesome collection of other awesome lists.

Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@csharpforevermore
csharpforevermore / join.py
Created June 16, 2018 15:03 — forked from finswimmer/join.py
Join multiple pandas dataframes
import glob
import sys
import pandas
def read_filenames(names):
for arg in names:
if "*" in arg:
for file in glob.glob(arg):
yield file
@csharpforevermore
csharpforevermore / pdconcat.py
Created June 16, 2018 15:07 — forked from phobson/pdconcat.py
funky pandas concat
import numpy
import pandas
numpy.random.seed(0)
index1 = pandas.MultiIndex.from_product(
[['A'], ['b'], ['one', 'two']],
names=['City', 'Street', 'House']
)
index2 = pandas.MultiIndex.from_product(
SELECT STRAIGHT_JOIN categories.id, categories.title, categories.game_count, categories.display_order FROM `categories` INNER JOIN `category_namespaces` ON `category_namespaces`.`category_id` = `categories`.`id` WHERE `categories`.`type` IN ('ClickJogos::GameCategory') AND `categories`.`published` = 1 AND (category_namespaces.namespace = 'jgo') ORDER BY
CASE
WHEN categories.id LIKE '447%' THEN 1
WHEN categories.id LIKE '448%' THEN 2
ELSE 3
END, categories.game_count DESC;
@csharpforevermore
csharpforevermore / Rename-Files.ps1
Created February 27, 2020 18:28 — forked from auberginehill/Rename-Files.ps1
A Windows PowerShell script for renaming files.
<#
Rename-Files.ps1
#>
# Find all wmv-files with a string "oldstring" and replace "oldstring" with "newstring" in the filename
Get-ChildItem *.wmv -Filter "*oldstring*" | ForEach { Rename-Item $_ -NewName $_.Name.Replace("oldstring","newstring") }
# Change the file extension of all .jpeg files to .jpg