Skip to content

Instantly share code, notes, and snippets.

@nimacks
nimacks / job-opportunities-with-aws-amplify.md
Last active June 21, 2022 05:49
Job Opportunities with AWS Amplify
@MrEliptik
MrEliptik / text_preprocessing.py
Created January 14, 2019 12:01
A python script to preprocess text (remove URL, lowercase, tokenize, etc..)
import re, string, unicodedata
import nltk
import contractions
import inflect
from nltk import word_tokenize, sent_tokenize
from nltk.corpus import stopwords
from nltk.stem import LancasterStemmer, WordNetLemmatizer
def replace_contractions(text):
"""Replace contractions in string of text"""
@iMerica
iMerica / index.js
Created December 28, 2018 21:18
Django/DRF File Uploading to S3
const notifyDjango = (url) => {
// Record the URL of the file you've uploaded along with any data
// that is relevent to you.
}
const uploadToS3 = (file, url) => {
// Upload the file here
// See https://git.io/fhIz5 as a great example of handling all S3 upload edge cases.
}
@KrabCode
KrabCode / graph.pde
Last active September 29, 2021 11:59
graph.pde
float xRange = 160;
float yRange = 5.f;
float xDetail = 10;
float yDetail = 10;
float markerStroke = .8f;
float lineStroke = 1.f;
float plotLineStroke = 1f;
@mrkrndvs
mrkrndvs / export-named-sheet-as-csv.gs
Last active January 27, 2024 00:02 — forked from mderazon/export-to-csv.gs
Google apps script to export an individual sheet as csv file
/*
* script to export data of the named sheet as an individual csv files
* sheet downloaded to Google Drive and then downloaded as a CSV file
* file named according to the name of the sheet
* original author: Michael Derazon (https://gist.github.com/mderazon/9655893)
*/
function onOpen() {
var ss = SpreadsheetApp.getActiveSpreadsheet();
var csvMenuEntries = [{name: "Download Primary Time File", functionName: "saveAsCSV"}];
@samuel-fonseca
samuel-fonseca / bible_books_list.json
Created September 16, 2017 23:34
A JSON list of all the Bible books, the number of chapters, and the number of verses.
{
"books": [
{
"book": "Genesis",
"verses": 1533,
"chapters": 50
},
{
"book": "Exodus",
"verses": 1213,

Advanced JavaScript Learning Resources

This is a list of advanced JavaScript learning resources from people who responded to this [Tweet][13] and this [Tweet][20].

  • [You Don't Know JS][3]

  • [Frontend Masters courses by Kyle Simpson][12]

  • [@mpjme][6]'s [YouTube videos][5]

@jagrosh
jagrosh / Growing A Discord Server.md
Last active February 17, 2024 04:29
Tips for creating and growing a new Discord server

This guide is kept up-to-date as Discord and available resources change!
A basic server template is available here

Creating and Growing a Discord Server

logo

Introduction

Hello! I'm jagrosh#4824! I'm writing this guide to try to help new server owners set up and grow their servers, which is a commonly-requested topic. It's very easy to go about this the wrong way, so it's best to be prepared and make smart decisions so that your community can flourish!

Background

@kevinweber
kevinweber / e.164.phoneNumber.js
Last active April 23, 2021 19:14
Convert string to match E.164 phone number pattern (e.g. +1234567890)
/**
* Convert string to match E.164 phone number pattern (e.g. +1234567890),
* otherwise return empty string.
*/
function enforcePhoneNumberPattern(string) {
let newString = string.match(/[0-9]{0,14}/g);
if (newString === null) {
return '';
}