Skip to content

Instantly share code, notes, and snippets.

@ColeFrench
ColeFrench / HCS Comp Workshop #2 - Today's xkcd.ipynb
Last active November 4, 2020 15:56
HCS Comp Workshop #2 - Today's xkcd
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@ColeFrench
ColeFrench / cachesim.c
Created May 2, 2020 15:11
Better template for PA5: Cache Simulator.
/??/
*
░█████╗░░█████╗░░█████╗░██╗░░██╗███████╗
██╔══██╗██╔══██╗██╔══██╗██║░░██║██╔════╝
██║░░╚═╝███████║██║░░╚═╝███████║█████╗░░
██║░░██╗██╔══██║██║░░██╗██╔══██║██╔══╝░░
╚█████╔╝██║░░██║╚█████╔╝██║░░██║███████╗
░╚════╝░╚═╝░░╚═╝░╚════╝░╚═╝░░╚═╝╚══════╝
░██████╗██╗███╗░░░███╗██╗░░░██╗██╗░░░░░░█████╗░████████╗░█████╗░██████╗░
@ColeFrench
ColeFrench / select_with_filter.py
Last active August 5, 2019 15:38
select_with_filter - PyMOL command to select atoms which pass a predicate
#!/usr/bin/env python3
from pymol import cmd
from typing import Callable, Union
if True:
def select_with_filter(name: str,
selection='',
predicate: Union[Callable[[str], bool],
/**
* The digital pin that receives input from the ultrasonic sensor.
*/
const int echoPin = 2;
/**
* The digital pin that sends output to the ultrasonic sensor.
*/
const int trigPin = 4;
void setup() {
/**
* The digital pin that receives input from the ultrasonic sensor.
*/
const int echoPin = 2;
/**
* The digital pin that sends output to the ultrasonic sensor.
*/
const int trigPin = 4;
void setup() {
@ColeFrench
ColeFrench / run.bat
Created June 15, 2017 01:04
Password-protected CLI to run any command.
@echo off
title Run
mode con:cols=80 lines=10
py -3 run.py %*
@ColeFrench
ColeFrench / virtualenvwrapper-powershell-fix-3.6.0.reg
Created February 20, 2017 01:39
Unofficial fixes to ensure the successful installation of virtualenvwrapper-powershell on Windows with Python v3.6.0.
Windows Registry Editor Version 5.00
[HKEY_CURRENT_USER\Software\Python\PythonCore\3.6.0\InstallPath]
@="C:\Python36"
[HKEY_CURRENT_USER\Software\Python\PythonCore\3.6.0\PythonPath]
@="C:\Python36;C:\Python36\Lib\;C:\Python36\DLLs\"
; Pre-install:
; In downloaded virtualenvwrapper-powershell repo:
@ColeFrench
ColeFrench / BloombergsMoney.java
Last active November 20, 2016 04:11
Program created at Bloomberg Startup to get total money converted from other currencies.
import java.util.Scanner;
public class BloombergsMoney {
public static void main(String[] args) {
Scanner in = new Scanner(System.in);
double amount = 0;
double sum = 0;
System.out.println("Welcome back, Mr. Bloomberg!");
System.out.println("\nHow much JPY did you acquire on your trip?");
@ColeFrench
ColeFrench / records.c
Last active August 2, 2016 20:17
Records Manager source code for Fundamentals of C course
#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
#include <string.h>
#include <ctype.h>
#include <time.h>
/* Displays an argument error */
int print_arg_err(char *error)
{