Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

View ayoubbensakhria's full-sized avatar

Ayoub Bensakhria ayoubbensakhria

View GitHub Profile
{
"title": "A list of tasks",
"type": "object",
"required": [
"title"
],
"properties": {
"title": {
"type": "string",
"title": "Task list title"
@ayoubbensakhria
ayoubbensakhria / install-tf-gpu.md
Last active December 20, 2022 01:47
Install Tensorflow-GPU *(for NVIDIA GPUs)* for use in JupyterLab using Anaconda

Install Tensorflow-GPU (for NVIDIA GPUs) for use in JupyterLab using Anaconda

This tutorial is for computers with NVIDIA GPUs installed.

Tensorflow for GPU significantly reduces the time taken by Deep Neural Networks (like CNNs, LSTMs, etc) to complete each Epoch (compute cycle) by utilizing the CUDA cores present in the GPU for parallel processing.

The following steps are to be followed:

  1. Make sure that you have installed the latest drivers of your NVIDIA GPU for your OS.
@ayoubbensakhria
ayoubbensakhria / talib.ipy
Created January 1, 2022 22:25 — forked from trufanov-nok/talib.ipy
Installing TA-Lib on Jupyter Notebook
!wget http://prdownloads.sourceforge.net/ta-lib/ta-lib-0.4.0-src.tar.gz
!tar -xzf ta-lib-0.4.0-src.tar.gz
%cd ta-lib/
!./configure --prefix=$HOME
!make
!make install
!TA_LIBRARY_PATH=~/lib TA_INCLUDE_PATH=~/include pip install ta-lib
@ayoubbensakhria
ayoubbensakhria / update_null_values.sql
Created October 18, 2021 15:25
SQL Server Update Null Values
UPDATE [dbo].[parameters]
SET
[price] = 0
WHERE
[price] IS NULL;
name: Python application
on: [push]
jobs:
build:
runs-on: ubuntu-latest
services:
<h1>Hello World!!!</h1>
<h4>Attempting MySQL connection from php...</h4>
<?php
// I assume that you've created a new username 'user' with password 'user' for a demo purpose
$host = 'mysql';
$user = 'user';
$pass = 'user';
$conn = new mysqli($host, $user, $pass);
if ($conn->connect_error) {
version: "3.2"
services:
php:
build:
context: './php/'
args:
PHP_VERSION: ${PHP_VERSION}
networks:
- backend
volumes:
MYSQL_VERSION=8
APACHE_VERSION=2.4.32
DB_ROOT_PASSWORD=root
DB_NAME=db
DB_USERNAME=user
DB_PASSWORD=root
PROJECT_ROOT=./public_html
FROM php:7.2.7-fpm-alpine3.7
RUN apk update; \
apk upgrade;
RUN docker-php-ext-install mysqli
FROM httpd:2.4.33-alpine
RUN apk update; \
apk upgrade;
# Copy apache vhost file to proxy php requests to php-fpm container
COPY apache.conf /usr/local/apache2/conf/apache.conf
RUN echo "Include /usr/local/apache2/conf/apache.conf" \
>> /usr/local/apache2/conf/httpd.conf