Skip to content

Instantly share code, notes, and snippets.

View yvzkr's full-sized avatar
🎯
Focusing

Yavuz KURU yvzkr

🎯
Focusing
View GitHub Profile
@fturkyilmaz
fturkyilmaz / gist:a7c4eff7236e6fb5448c311ea88fd087
Created April 1, 2022 05:29
React 18 Automatic Batching
import logo from "./logo.svg";
import "./App.css";
import { useState, useEffect } from "react";
function App() {
const [count, setCount] = useState(0);
const [flag, setFlag] = useState(false);
function handleClick() {
@sandeepnmenon
sandeepnmenon / cnn.py
Last active June 16, 2020 23:25
Keras CNN with skip connections and gates
def get_cnn_architecture(weights_path=None):
input_img = Input(shape=(64,64,3)) # adapt this if using `channels_first` image data format
x1 = Conv2D(64, (3, 3), activation='relu', padding='same')(input_img)
gateFactor = Input(tensor = K.variable([0.3]))
fractionG = Multiply()([x1,gateFactor])
complement = Lambda(lambda x: x[0] - x[1])([x1,fractionG])
x = MaxPooling2D((2, 2), padding='same')(fractionG)
@ozlerhakan
ozlerhakan / docker-kurulumu.adoc
Last active September 7, 2022 14:54
Docker Kurulum Adımları

Docker Kurulumu

Linux

Linux dağıtımlarında Docker kullanma noktasında aşağıdaki uygun dağıtımın docker dokümantasyonunu takip ederek kurma ve çalıştırma işlemini gerçekleştirebilirsiniz. Linux dağıtımlarının Docker CE bağlantıları:

@jasich
jasich / scroll.cljs
Created December 11, 2016 02:28
ClojureScript scroll element into view
;; Based on https://github.com/GabrielDelepine/smooth-scroll/blob/main/smooth-scroll.js
(ns example.scroll)
(def speed 500)
(def moving-frequency 15)
(defn cur-doc-top []
(+ (.. js/document -body -scrollTop) (.. js/document -documentElement -scrollTop)))
(defn element-top [elem top]
@mlanett
mlanett / rails http status codes
Last active July 22, 2024 09:14
HTTP status code symbols for Rails
HTTP status code symbols for Rails
Thanks to Cody Fauser for this list of HTTP responce codes and their Ruby on Rails symbol mappings.
Status Code Symbol
1xx Informational
100 :continue
101 :switching_protocols
102 :processing
@x0xMaximus
x0xMaximus / BFOA.py
Last active July 13, 2022 09:29
Bacterial Foraging Optimization Algorithm
# Bacterial Foraging Optimization Algorithm
# (c) Copyright 2013 Max Nanis [max@maxnanis.com].
import os, random, math, csv
class BFOA():
def __init__(self, pop_size = 100, problem_size = 2, dimension = [-1, 1], elim_disp_steps = 1, repro_steps = 4, chem_steps = 30):
self.step_index = 0
self.run_id = os.urandom(6).encode('hex')
@mbuyco
mbuyco / readme.md
Last active May 22, 2021 20:11
CodeIgniter Password Hash Library installation tutorial by mac_devin

DISCLAIMER: I do not own any of the source codes provided below. This is only a tutorial on how to install CodeIgniter-Phpass-Library in your CodeIgniter applications. If you want to see the original tutorial, please go to this link: https://github.com/jenssegers/CodeIgniter-Phpass-Library

CodeIgniter Password Hash Library

phpass is a portable password hashing framework for use in PHP applications. The preferred (most secure) hashing method supported by phpass is the OpenBSD-style bcrypt (known in PHP as CRYPT_BLOWFISH), with a fallback to BSDI-style extended DES-based hashes (known in PHP as CRYPT_EXT_DES), and a last resort fallback to an MD5-based variable iteration count password hashing method implemented in phpass itself.

Installation

  1. Download this .zip file: https://github.com/jenssegers/CodeIgniter-Phpass-Library/archive/master.zip
  2. From the downloaded files, copy the libraries and vendor folder into your CodeIgniter application folder.
@tqheel
tqheel / commit-config.sh
Created July 19, 2012 16:09
Prevent ASP.Net Web.Config From Being Committed By Git
#Run this to reverse ignoring of changes to web.config so it gets committed.
git update-index --no-assume-unchanged path_to_file/web.config