Skip to content

Instantly share code, notes, and snippets.

@michaelgrossopt
michaelgrossopt / Fall-Spice-Harvest-2020.md
Created Oct 16, 2020
Northern Paladins Old School Fall Spice Harvest 2020
View Fall-Spice-Harvest-2020.md

The Northern Paladins would like to ask for you help in support of our charity choice - Every Meal (www.everymeal.org). Their goal is to provide children in need with meals outside of school. And with most schools doing a hybrid or remote based model these kids aren't even getting their regular school supplied lunch with one study estimating that food insecurity among children will increase by more than 50% through December 2020.

To support them in their mission we have set up a remote raffle with the items below. Each raffle ticket is $1. If you want multiple tickets (even if split across multiple items) be sure to bundle into one donation to minimize transaction costs. Shipping will be covered by the Northern Paladins at no expense to you. Follow the steps below:

  1. Make a donation to the Northern Paladin's fundraiser here https://secure.givelively.org/donate/every-meal/northern-paladins (feel free to show your name as "Anonymous" if desired, we're using the honor system and won't be cross-referencing
View gist:d0642b94a13a57c14917a6468439c280
##############################
########## GEOMETRY ##########
##############################
:start geometry definition:
:start geometry:
name = phantom4
library = egs_ndgeometry
type = EGS_XYZGeometry
@takoikatakotako
takoikatakotako / ContentView.swift
Created Oct 16, 2020
AppStorage を使って UserDefault の値を監視する
View ContentView.swift
import SwiftUI
struct ContentView: View {
@AppStorage("FAVORITE_POKEMON_NAME") var favoritePokemonName: String = ""
var body: some View {
VStack(spacing: 16) {
Text("Your favorite pokemon is, \(favoritePokemonName)")
Button("Snorlax is my mavorite pokemon.") {
@abhishekbadha
abhishekbadha / PY0101EN-5-1-Numpy1D.ipynb
Created Oct 16, 2020
Created on Skills Network Labs
View PY0101EN-5-1-Numpy1D.ipynb
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View SourceKittenOutput.json
{
"key.diagnostic_stage" : "source.diagnostic.stage.swift.parse",
"key.length" : 163,
"key.offset" : 0,
"key.substructure" : [
{
"key.accessibility" : "source.lang.swift.accessibility.internal",
"key.bodylength" : 107,
"key.bodyoffset" : 54,
"key.elements" : [
@Emilio-gonza
Emilio-gonza / PY0101EN-3-1-Conditions.ipynb
Created Oct 16, 2020
Created on Skills Network Labs
View PY0101EN-3-1-Conditions.ipynb
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@KunYi
KunYi / fix_code_update.sh
Created Oct 16, 2020
for fixed mismatch issues of visual studio code when run apt update
View fix_code_update.sh
#!/bin/bash -e
#
# for fixed mismatch issues of visual studio code when run apt update
#
wget http://packages.microsoft.com/repos/vscode/dists/stable/InRelease
sudo mv InRelease /var/lib/apt/lists/packages.microsoft.com_repos_vscode_dists_stable_InRelease -vf
wget http://packages.microsoft.com/repos/vscode/dists/stable/main/binary-amd64/Packages
sudo mv Packages /var/lib/apt/lists/packages.microsoft.com_repos_vscode_dists_stable_main_binary-amd64_Packages -vf
@zest1116
zest1116 / test.md
Created Oct 16, 2020
Hello World Markdown
View test.md

Hello World

This is content converted from Markdown!

Here's a JSON sample:

{
  "foo": "bar"
}
@TianYongwei
TianYongwei / leetcode_template.md
Created Oct 16, 2020
leetcode editor :idea 插件模板 velocity
View leetcode_template.md

CodeFileName

LeetCode$!velocityTool.leftPadZeros(${question.frontendQuestionId},4)$!velocityTool.camelCaseName(${question.titleSlug})

CodeTemplate

#set( $className = "LeetCode$!velocityTool.leftPadZeros(${question.frontendQuestionId},4)$!velocityTool.camelCaseName(${question.titleSlug})")
#set( $code = ${question.code} )
#set( $code = $code.replace("//leetcode submit region begin(Prohibit modification and deletion)", "") )
View find_duplicates.py
# script find in this answer https://stackoverflow.com/a/5419576/7059156
from collections import defaultdict
def list_duplicates(seq):
tally = defaultdict(list)
for i,item in enumerate(seq):
tally[item].append(i)
return ((key,locs) for key,locs in tally.items()
if len(locs)>1)
You can’t perform that action at this time.