Skip to content

Instantly share code, notes, and snippets.

🎯
Focusing

Abdulrhman A. AlKhodiry zeroows

🎯
Focusing
Block or report user

Report or block zeroows

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@zeroows
zeroows / pytorch_losses_functions.ipynb
Created Feb 6, 2020
Some Pytorch losses examples
View pytorch_losses_functions.ipynb
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@zeroows
zeroows / pytorch-losses-in-plain-python.ipynb
Created Feb 6, 2020 — forked from yang-zhang/pytorch-losses-in-plain-python.ipynb
git/yang-zhang.github.io/ds_code/pytorch-losses-in-plain-python.ipynb
View pytorch-losses-in-plain-python.ipynb
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View keybase.md

Keybase proof

I hereby claim:

  • I am zeroows on github.
  • I am zeroows (https://keybase.io/zeroows) on keybase.
  • I have a public key ASBPKNsPnNjBOWkQbpcjRbrt-3CgfYCrZ_E6A0xaP7y3xgo

To claim this, I am signing this object:

View conv_autoencoder_keras.ipynb
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@zeroows
zeroows / cmake_cmmd.sh
Last active Aug 19, 2018
I found a great post by Adrian Rosebrock for how to install OpenCV on Ubuntu 18.04 and for the cmake command I was able to build it using Anaconda
View cmake_cmmd.sh
cmake -D CMAKE_BUILD_TYPE=RELEASE \
-D CMAKE_INSTALL_PREFIX=/usr/local \
-D INSTALL_PYTHON_EXAMPLES=ON \
-D INSTALL_C_EXAMPLES=OFF \
-D OPENCV_EXTRA_MODULES_PATH='~/Downloads/opencv/opencv_contrib-3.4.2/modules/' \
-D PYTHON3_INCLUDE_DIR='~/anaconda3/envs/tf/include/python3.6m' \
-D PYTHON_EXECUTABLE='~/anaconda3/envs/tf/bin/python' \
-D PYTHON3_LIBRARY='~/anaconda3/envs/tf/lib/libpython3.6m.so' \
-D PYTHON3_PACKAGES_PATH='~/anaconda3/envs/tf/lib/python3.6/site-packages' \
-D PYTHON3_NUMPY_INCLUDE_DIRS='~/anaconda3/envs/tf/lib/python3.6/site-packages/numpy/core/include' \
@zeroows
zeroows / Elixir
Created Sep 18, 2017 — forked from ashleyconnor/Elixir
Elixir Socket Example
View Elixir
defmodule SocketPlayground do
def listen(port) do
listen(port, &handler/1)
end
def listen(port, handler) do
IO.puts "listen"
Socket.TCP.listen!(port, packet: :line)
|> accept(handler)
end
@zeroows
zeroows / hello_server.ex
Created Sep 18, 2017 — forked from blackode/hello_server.ex
GenServer Callbacks examples
View hello_server.ex
defmodule HelloServer do
use GenServer
## Server API
def init(initial_value) do # initiating the state with the value 1 passed
{:ok,initial_value}
end
# add the value to the state and returns :ok
def handle_call({:add,value},_from,state) do
@zeroows
zeroows / RetrofitConfiguration.java
Created Apr 8, 2017
Retrofit Configuration for Spring Boot
View RetrofitConfiguration.java
import com.google.gson.Gson;
import com.google.gson.GsonBuilder;
import net.aalkhodiry.notifications.utils.LoggingInterceptor;
import okhttp3.OkHttpClient;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.context.annotation.Bean;
import retrofit2.Retrofit;
import retrofit2.adapter.rxjava.RxJavaCallAdapterFactory;
import retrofit2.converter.gson.GsonConverterFactory;
@zeroows
zeroows / RabbitmqConfiguration.java
Created Apr 8, 2017
Rabbitmq Configuration for Spring Boot <3
View RabbitmqConfiguration.java
import lombok.extern.slf4j.Slf4j;
import net.aalkhodiry.api.configurations.queues.CustomDLQueueDLQueue;
import net.aalkhodiry.api.utils.CustomJsonMessageConverter;
import org.aopalliance.intercept.Interceptor;
import org.springframework.amqp.core.AmqpAdmin;
import org.springframework.amqp.rabbit.annotation.EnableRabbit;
import org.springframework.amqp.rabbit.config.RetryInterceptorBuilder;
import org.springframework.amqp.rabbit.config.SimpleRabbitListenerContainerFactory;
import org.springframework.amqp.rabbit.connection.CachingConnectionFactory;
import org.springframework.amqp.rabbit.core.RabbitAdmin;
@zeroows
zeroows / PrometheusConfig.md
Last active Apr 6, 2017
Using Prometheus with Spring Boot - https://prometheus.io
View PrometheusConfig.md
  <dependency>
      <groupId>org.springframework.boot</groupId>
      <artifactId>spring-boot-starter-actuator</artifactId>
  </dependency>
  <!-- The client -->
  <dependency>
      <groupId>io.prometheus</groupId>
      <artifactId>simpleclient</artifactId>
      <version>0.0.18</version>
You can’t perform that action at this time.