Skip to content

Instantly share code, notes, and snippets.

View mertyildiran's full-sized avatar
:octocat:
Doing some octopus work

M. Mert Yildiran mertyildiran

:octocat:
Doing some octopus work
View GitHub Profile
@pinge
pinge / iphone.ubuntu.md
Last active September 14, 2024 08:18
mounting iPhone storage in Ubuntu 16.04 LTS

mounting iPhone storage in Ubuntu 16.04 LTS

check if your device was recognized correctly

$ dmesg | grep ipheth
[62051.385352] ipheth 1-5:4.2: Apple iPhone USB Ethernet device attached
[62051.385437] usbcore: registered new interface driver ipheth

create mounting point and make it writable (optional)

@rohitner
rohitner / skfuzzy.ipynb
Created March 3, 2018 16:22
basic use of scikit-fuzzy
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@arnobroekhof
arnobroekhof / docker-compose-influxdb.yml
Created March 1, 2018 12:02
Docker compose file for influxdb and grafana
version: "3.2"
# run script
# docker swarm init
# docker stack deploy timeseries -c docker-compose.yml
services:
influxdb:
image: influxdb:latest
ports:
- 8086:8086
@jerodg
jerodg / windows_and_office_kms_setup.adoc
Last active April 3, 2025 15:39
Activate Windows and Office Using KMS Server

Microsoft Windows and Office KMS Setup

def triplet_loss(y_true, y_pred, alpha = 0.2):
    """
    Implementation of the triplet loss function
    Arguments:
    y_true -- true labels, required when you define a loss in Keras, not used in this function.
    y_pred -- python list containing three objects:
            anchor:   the encodings for the anchor data
            positive: the encodings for the positive data (similar to anchor)
            negative: the encodings for the negative data (different from anchor)
@mertyildiran
mertyildiran / cairo-xshape-example.c
Created July 1, 2017 21:31
Transparent drawing using Xlib and Cairo
/* compile with:
* gcc $(pkg-config xext x11 cairo-xlib-xrender --cflags --libs) cairo-xshape-example.c
* https://github.com/jordansissel/experiments/blob/master/randomcode/cairo-xshape-example.c
*/
#include <cairo-xlib.h>
#include <X11/Xlib.h>
#include <X11/Xutil.h>
#include <stdio.h>
#include <X11/extensions/shape.h>
@mjdietzx
mjdietzx / waya-dl-setup.sh
Last active October 14, 2024 12:19
Install CUDA Toolkit v8.0 and cuDNN v6.0 on Ubuntu 16.04
#!/bin/bash
# install CUDA Toolkit v8.0
# instructions from https://developer.nvidia.com/cuda-downloads (linux -> x86_64 -> Ubuntu -> 16.04 -> deb (network))
CUDA_REPO_PKG="cuda-repo-ubuntu1604_8.0.61-1_amd64.deb"
wget http://developer.download.nvidia.com/compute/cuda/repos/ubuntu1604/x86_64/${CUDA_REPO_PKG}
sudo dpkg -i ${CUDA_REPO_PKG}
sudo apt-get update
sudo apt-get -y install cuda
@xentec
xentec / setup-cross-cc.sh
Last active February 6, 2025 19:49
Alpine Linux cross-compiler setup script
#!/bin/sh
CTARGET="$1"
if [ -z "$CTARGET" ]; then
program=$(basename $0)
echo "usage: $program TARGET_ARCH"
return 1
fi
# get abuild configurables
@Brainiarc7
Brainiarc7 / ffmpeg-livestream-to-streaming-sites-vaapi-nvenc.md
Last active August 18, 2024 02:58
ffmpeg livestreaming to youtube via Nvidia's NVENC and Intel's VAAPI on supported hardware

Streaming your Linux desktop to Youtube and Twitch via Nvidia's NVENC and VAAPI:

Considerations to take when live streaming:

The following best practice observations apply when using a hardware-based encoder for live streaming to any platform:

  1. Set the buffer size (-bufsize:v) equal to the target bitrate (-b:v). You want to ensure that you're encoding in CBR mode.

  2. Set up the encoders as shown:

@irfaan008
irfaan008 / EnableGpsAutomaticallyInAndroid.java
Last active June 25, 2020 10:26
Enable Gps automatically if it is turned off. Similar to what OLA cab does. However to comply with policy it shows a popup to user with OK and CANCEL button. Still its better than showing location setting screen to user
package com.irinnovative.enablegps;
import android.app.Activity;
import android.content.Intent;
import android.content.IntentSender;
import android.os.Bundle;
import android.support.annotation.NonNull;
import android.support.annotation.Nullable;
import com.google.android.gms.common.api.GoogleApiClient;