Skip to content

Instantly share code, notes, and snippets.

View jsalbert's full-sized avatar
:shipit:
Focusing

Albert Jiménez jsalbert

:shipit:
Focusing
View GitHub Profile
import os
def mkdir(path):
"""
Args:
path: Path where directory will be created
Returns: Nothing. Creates directory with the path specified
from PIL import Image
def center_crop(image):
# crop to ratio, center
w, h = image.size
w_center = w/2
h_center = h/2
@jsalbert
jsalbert / circle_ci_config_1.txt
Last active March 24, 2021 07:36
Simple Circle CI Config
version: 2
jobs:
test:
docker:
- image: python:3.7
steps:
- run:
name: Run tests
command: |
pip install virtualenv
@jsalbert
jsalbert / circle_ci_config_2
Created March 24, 2021 07:47
Circle Ci Parallelism Flag
version: 2
jobs:
test:
docker:
- image: python:3.7
parallelism: 4
steps:
- run:
name: Run tests
parallel: true
@jsalbert
jsalbert / circle_ci_parallel_configuration
Created March 24, 2021 08:33
Circle CI Parallel Configuration
version: 2
jobs:
test:
docker:
- image: python:3.7
parallelism: 4
steps:
- run:
name: Run tests
parallel: true
@jsalbert
jsalbert / fcn_audio.py
Last active April 6, 2021 18:21
fcn_audio
# FCN Model
def create_model(num_classes=10, input_shape=None, dropout_ratio=None):
model = Sequential()
if input_shape is None:
model.add(Input(shape=(None, None, 1)))
else:
model.add(Input(shape=input_shape))
model.add(Conv2D(filters=16, kernel_size=(2, 4), activation='relu'))
model.add(MaxPooling2D(pool_size=(2, 3)))
model.add(Conv2D(filters=32, kernel_size=(2, 4), activation='relu'))