-
Find a quote preceded by a space. Capture one or more letters or spaces. Find another quote. Lookahead to find a character that is not a letter. If the character following the last quote were a letter, it would be a contraction. The replacement string should have a leading space because we do capture a space before the first quote.
-
First big new attempt, see detailed explanation at 675e6a1. Capture a whitespace character or opening brace (from an italics or bold LaTeX command). Match a quote. Capture one or more of any character, but the least amount possible. Match a quote. Capture a whitespace character or closing brace. Put it back together with the captured whitepsace or braces at the ends and captured text between new quotes.
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
import math | |
def roundUp(x,y): | |
return int(math.ceil(float(x)/y)) | |
d = input('Distance: ') #10 #distance of path betweem source and controller | |
SPAWN_ENERGY_CAPACITY = 300 | |
CONTROLLER_STRUCTURES = { "extension": { 3: 10 } } | |
STRUCTURE_EXTENSION = "extension" | |
EXTENSION_ENERGY_CAPACITY = { 3: 50 } |
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
; Make repeated hotkey uses work, each time closing and re-launching StepMania, and only re-showing the task bar when the game is manually closed (instead of using the hotkey to relaunch it). | |
#NoEnv ; Recommended for performance and compatibility with future AutoHotkey releases. | |
; #Warn ; Enable warnings to assist with detecting common errors. | |
SendMode Input ; Recommended for new scripts due to its superior speed and reliability. | |
SetWorkingDir %A_ScriptDir% ; Ensures a consistent starting directory. | |
#SingleInstance force ; automatically replace old instance of script when launched again | |
#MaxThreadsPerHotkey 999 ; allows multiple instances of the hotkey subroutine to run, each temporarily halting the previous |
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
#include <iostream> | |
#include <math.h> | |
const int HEART_SIZE = 20; | |
const int HALF_SIZE = HEART_SIZE / 2; | |
bool is_in_love(int x, int y); | |
int main(void) | |
{ |
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
SetDateCreatedToDateAdded () { SetFile -d "$(date -j -f '%Y-%m-%d %H:%M:%S' "$(mdls $1 | grep -w kMDItemDateAdded | awk '{print $3,$4}')" +"%m/%d/%Y %H:%M:%S")" $1; } |
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
<p> | |
This is the top of the page. Pretend there is a ton of content here. | |
<br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br> | |
<br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br> | |
<br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br> | |
Here is the bottom. | |
Check out <a href="https://developer.mozilla.org/en-US/docs/Web/CSS/@media">CSS media queries</a>. | |
</p> | |
<a href="#" class="back2top">Back to top<a> | |
<style> |
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
class Motor(object): | |
def __init__(self): | |
pass | |
motorA = Motor() | |
motorB = Motor() | |
motorC = Motor() | |
motorD = Motor() | |
Motor.__init__ = lambda: None | |
del Motor |
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
//https://raw.githubusercontent.com/seth10/watch/31f9083a07451147009f5e92a93645e02fa69217/14seg/14seg.ino | |
#include "Adafruit_LEDBackpack.h" | |
char *message = " Hello world! "; | |
Adafruit_AlphaNum4 alpha4; | |
void setup() { | |
alpha4.begin(); |
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
# import some stuff we'll need | |
from GroveDevices import Grove_Moisture_Sensor | |
from PiStorms_GRX import PiStorms_GRX | |
import numpy as np | |
import time | |
# create a sensor (on port BAA1), the PiStorms object, and an empty list to hold the data | |
sensor = Grove_Moisture_Sensor("BAA1") | |
psm = PiStorms_GRX() | |
data = [] |
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
history | awk '{ print $2; }' | sort | uniq | |
# | |
alias | |
br | |
bt | |
cat | |
cd | |
chmod | |
clear | |
cp |
NewerOlder