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
from sqlalchemy.ext.declarative import declarative_base | |
from sqlalchemy.ext.hybrid import hybrid_property | |
from sqlalchemy import Column, String, Date, ForeignKey, Integer, Enum, DateTime, func | |
Base = declarative_base() | |
class CommonColumns(Base): | |
__abstract__ = True |
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 <string> | |
#include <vector> | |
#include <cstdlib> | |
#include <ctime> | |
#include <set> | |
using namespace std; | |
vector<int> get_indexes(string input_string, char letter){ | |
/* Return a vector of integers indicating the indexes where the char is |
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 <string> | |
#include <vector> | |
#include <cstdlib> | |
#include <ctime> | |
#include <set> | |
using namespace std; | |
vector<int> get_indexes(string input_string, char letter){ | |
/* Return a vector of integers indicating the indexes where the char is |
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
""" | |
Hello foo. | |
This line won't output. | |
Foo Bar. | |
foooooooooo | |
""" | |
# The above text is in the ./file.txt file | |
def lines_with_foo(filepath): | |
with open(filepath) as infile: |
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 <array> | |
#include <map> | |
using namespace std; | |
// prototype swapArrays | |
void swapArrays(array<int, 5>& stdArray, int oldArray[5]); | |
bool containsPair(int hand[]) { | |
// Return a true if hand contains a pair else false |
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 Gitless < Formula | |
desc "Gitless: a version control system" | |
homepage "http://gitless.com/" | |
url "https://github.com/scottsideleau/gitless/archive/master.tar.gz" | |
version "0.8.3" | |
sha256 "df212d6a3d377f90c46d03fd4216ecbbeb40055b62c0fe73b9c3aa165ea8f0af" | |
depends_on :python if MacOS.version <= :snow_leopard | |
depends_on "libgit2" |
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
2016-10-14 14:41:25 -0700 | |
/usr/local/Cellar/gitless/0.8.4/libexec/bin/pip | |
install | |
-v | |
--no-deps | |
--no-binary | |
:all: | |
--ignore-installed | |
/private/tmp/gitless--cffi-20161014-50894-1qhyea5/cffi-1.8.3 |
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
#!/bin/bash | |
##################################################### | |
# Name: Bash CheatSheet for Mac OSX | |
# | |
# A little overlook of the Bash basics | |
# | |
# Usage: | |
# | |
# Author: J. Le Coupanec | |
# Date: 2014/11/04 |
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 json | |
def introspect(func): | |
def inner(*args, **kwargs): | |
result = func(*args, **kwargs) | |
print('name:', func.__name__) | |
print('doc:', func.__doc__) | |
print('args:', args) | |
return result |
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
Script started on Mon 05 Dec 2016 02:54:46 PM PST | |
[sfitzpa1@hills pair]$ ls | |
example.script users_client.py users_service.py | |
[sfitzpa1@hills pair]$ echo "Run server in background by appending & to command" && ./users_service.py & | |
[1] 7158 | |
[sfitzpa1@hills pair]$ Run server in background by appending & to command | |
running server: | |
echo "Communicate with server using client script" && ./users_client.py fitz boyd | |
Communicate with server using client script | |
127.0.0.1 - - [05/Dec/2016 14:55:41] "GET /?strings=fitz,boyd HTTP/1.1" 200 - |
OlderNewer