Skip to content

Instantly share code, notes, and snippets.

View marjinal1st's full-sized avatar
🥃
Master of Ballmer Peak

Ahmet Sezgin DURAN marjinal1st

🥃
Master of Ballmer Peak
View GitHub Profile
import cv2
camera = cv2.VideoCapture(0)
camera.set(3, 1280)
camera.set(4, 720)
while True:
ret, image = camera.read()
Verifying my Blockstack ID is secured with the address 1A8aCiG41NX637UsqKRJcKnVFEmKXNkzFz https://explorer.blockstack.org/address/1A8aCiG41NX637UsqKRJcKnVFEmKXNkzFz
@marjinal1st
marjinal1st / cl
Created April 22, 2016 11:36
Updated clinfo output
Number of platforms 1
Platform Name NVIDIA CUDA
Platform Vendor NVIDIA Corporation
Platform Version OpenCL 1.2 CUDA 7.5.23
Platform Profile FULL_PROFILE
Platform Extensions cl_khr_byte_addressable_store cl_khr_icd cl_khr_gl_sharing cl_nv_compiler_options cl_nv_device_attribute_query cl_nv_pragma_unroll cl_nv_copy_opts
Platform Extensions function suffix NV
Platform Name NVIDIA CUDA
Number of devices 1
@marjinal1st
marjinal1st / clinfo.txt
Created April 22, 2016 05:40
OpenCL info
Number of platforms 1
Platform Name NVIDIA CUDA
Platform Vendor NVIDIA Corporation
Platform Version OpenCL 1.1 CUDA 6.5.51
Platform Profile FULL_PROFILE
Platform Extensions cl_khr_byte_addressable_store cl_khr_icd cl_khr_gl_sharing cl_nv_compiler_options cl_nv_device_attribute_query cl_nv_pragma_unroll cl_nv_copy_opts
Platform Extensions function suffix NV
Platform Name NVIDIA CUDA
Number of devices 1
@marjinal1st
marjinal1st / gist:0f0f4188e096cce371d6
Created January 4, 2016 14:27 — forked from karpathy/gist:587454dc0146a6ae21fc
An efficient, batched LSTM.
"""
This is a batched LSTM forward and backward pass
"""
import numpy as np
import code
class LSTM:
@staticmethod
def init(input_size, hidden_size, fancy_forget_bias_init = 3):
@marjinal1st
marjinal1st / gist:8470400
Created January 17, 2014 09:06
Generator
require 'rails/generators'
require 'rails/generators/base'
require 'rails/generators/migration'
require 'rails/generators/active_record'
module Kebapress
module Generators
class InstallGenerator < Rails::Generators::NamedBase
source_root File.expand_path('../templates', __FILE__)
include Rails::Generators::Migration
@marjinal1st
marjinal1st / gist:8144677
Created December 27, 2013 09:45
JS Error
<!DOCTYPE html>
<!--[if IE 8]> <html class="no-js lt-ie10 lt-ie9" lang="en-us"> <![endif]-->
<!--[if IE 9]> <html class="no-js lt-ie10 lt-ie9" lang="en-us"> <![endif]-->
<!--[if lt IE 10]> <html class="no-js lt-ie10" lang="en-us"> <![endif]-->
<html class='no-js' lang='en'>
<head>
<title></title>
<meta charset='utf-8' content='text/html' http-equiv='content-type'>
<meta content='ie=edge,chrome=1' http-equiv='x-ua-compatible'>
Routes for Kebapress::Engine:
posts GET /posts(.:format) kebapress/posts#index
post GET /posts/:id(.:format) kebapress/posts#show
hq_dashboard_index GET /hq/dashboard(.:format) kebapress/hq/dashboard#index
hq_posts GET /hq/posts(.:format) kebapress/hq/posts#index
POST /hq/posts(.:format) kebapress/hq/posts#create
new_hq_post GET /hq/posts/new(.:format) kebapress/hq/posts#new
edit_hq_post GET /hq/posts/:id/edit(.:format) kebapress/hq/posts#edit
hq_post GET /hq/posts/:id(.:format) kebapress/hq/posts#show
PATCH /hq/posts/:id(.:format) kebapress/hq/posts#update
Started GET "/blog/hq/categories/new" for 127.0.0.1 at 2013-12-14 11:39:07 +0200
Processing by Kebapress::Hq::CategoriesController#new as HTML
Rendered /home/marjinal1st/Ruby/Work/kebapress/app/views/kebapress/hq/categories/_form.html.haml (55.9ms)
Rendered /home/marjinal1st/Ruby/Work/kebapress/app/views/kebapress/hq/categories/new.html.haml within layouts/hq/application (56.8ms)
Completed 500 Internal Server Error in 60ms
Rendered /home/marjinal1st/.rvm/gems/ruby-2.0.0-p247/gems/exception_notification-4.0.1/lib/exception_notifier/views/exception_notifier/_request.text.erb (0.3ms)
Rendered /home/marjinal1st/.rvm/gems/ruby-2.0.0-p247/gems/exception_notification-4.0.1/lib/exception_notifier/views/exception_notifier/_title.text.erb (0.1ms)
Rendered /home/marjinal1st/.rvm/gems/ruby-2.0.0-p247/gems/exception_notification-4.0.1/lib/exception_notifier/views/exception_notifier/_session.text.erb (0.1ms)
Rendered /home/marjinal1st/.rvm/gems/ruby-2.0.0-p247/gems/exception_notification-4.0.1/lib/exception_not
@marjinal1st
marjinal1st / gist:7870427
Created December 9, 2013 10:48
HABTM Error 2
SELECT "kebapress_posts"."id" AS t0_r0, "kebapress_posts"."title" AS t0_r1, "kebapress_posts"."body" AS t0_r2, "kebapress_posts"."published_at" AS t0_r3, "kebapress_posts"."commentable" AS t0_r4, "kebapress_posts"."published" AS t0_r5, "kebapress_posts"."author_id" AS t0_r6, "kebapress_posts"."created_at" AS t0_r7, "kebapress_posts"."updated_at" AS t0_r8, "kebapress_categories"."id" AS t1_r0, "kebapress_categories"."title" AS t1_r1, "kebapress_categories"."created_at" AS t1_r2, "kebapress_categories"."updated_at" AS t1_r3 FROM "kebapress_posts" LEFT OUTER JOIN "kebapress_categories_posts" ON "kebapress_categories_posts"."post_id" = "kebapress_posts"."id" LEFT OUTER JOIN "kebapress_categories" ON "kebapress_categories"."id" = "kebapress_categories_posts"."category_id" WHERE "categories"."id" IS NULL
SQLite3::SQLException: no such column: categories.id: SELECT "kebapress_posts"."id" AS t0_r0, "kebapress_posts"."title" AS t0_r1, "kebapress_posts"."body" AS t0_r2, "kebapress_posts"."published_at" AS t0_r3, "kebap