Skip to content

Instantly share code, notes, and snippets.

View brydavis's full-sized avatar

Bryan Davis brydavis

View GitHub Profile
class Person:
def __init__(self):
pass
def breathe(self):
print("I am breathing")
def eat(self):
print("I am eating")
import json
class Device:
def __init__(self):
self.battery = 100
self.power_status = True
def power_switch(self):
# if currently powered on
if self.power_status:
@brydavis
brydavis / unicorn.py
Last active June 5, 2019 06:15
`Unicorn != Pegasus`
# Let's create a unicorn
class Animal:
def __init__(self):
pass
def breathe(self):
print("I am breathing")
def eat(self):
print("I am eating")

Font Face

A mixin for writing @font-face rules in SASS.

Usage

Create a font face rule. Embedded OpenType, WOFF2, WOFF, TrueType, and SVG files are automatically sourced.

@include font-face(Samplino, fonts/Samplino);
package main
import (
"fmt"
)
func main() {
messages := make(chan int)
package main
import (
"fmt"
"log"
"regexp"
)
func main() {
reg, err := regexp.Compile("[^a-zA-Z0-9]+")
use master;
drop database if exists demo_customers;
create database demo_customers;
go
use demo_customers;
create function hello (@name varchar(20) = 'everyone') returns varchar(30)
class A():
x, y = 1, 2
def __init__(self, a, b):
self.a = a
self.b = b
def total(self):
return self.a + self.b
class B(A):
import pyodbc
connstr = "dsn=someDB;SERVER=LLJIUR2343;DATABASE=someDB;Trusted_Connection=Yes"
query = """
select top 1000 *
from people
"""
# connect to the database