Skip to content

Instantly share code, notes, and snippets.

View yasar11732's full-sized avatar

Yaşar Arabacı yasar11732

View GitHub Profile
$(function() {
$( ".slider" ).slider(
{
min: 1950,
max: 2010,
step:1,
slide: function( event, ui ) {
$( "#sene" ).text( ui.value );
}
}
from urllib import urlencode
from os import makedirs
from os.path import dirname
import json
from datetime import datetime
def lookup(screenname=False, user_id=False):
if screenname is False and user_id is False:
raise ValueError("Suppy either screenname or user_id")
package com.github.yasar.AllStupidThings;
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
public class WhileLooper {
public static void main(String[] args) {
Integer num;
for i in range(0,input("Bir sayi giriniz:\t")):
print i + 1
#include <stdio.h>
int main() {
int n;
printf("Lutfen bir sayi giriniz:\t");
scanf ("%d",&n);
int i = 0;
do {
i++;
printf("%d\n");
from BeautifulSoup import BeautifulSoup
basit_html = """
<html><head><title>Başlık buraya>/title></head>
<body><p>Paragraf 1<img src="http://www.blogcdn.com/wow.joystiq.com/media/2008/01/maiev.jpg"></p><p class="hebele">Paragraf 2</p></body>
</html>"""
soup = BeautifulSoup(basit_html)
imgs = soup("img") # img taglarının listesini al
for img in imgs:
print img["src"]
# -*- coding: utf-8 -*-
from conf import POSTS
import os
from glob import iglob
from utils import parse_headers
from string import Template
from datetime import datetime
post_template = Template("""<!--
.. title: $title
@yasar11732
yasar11732 / debugging.py
Created October 25, 2013 23:44
This is a python decorator to print debugging messages
# -*- coding: cp1254 -*-
import inspect
import ast
def make_print_node(s):
return ast.Print(dest=None, values=[ast.Str(s=s)], nl=True)
def make_print_with_percent_formatting(s, *args):
if not args:
return make_print_node(s)
from __future__ import print_function, unicode_literals
import time
from random import randint
from itertools import repeat
class Timer(object):
def __init__(self, name = "Unnamed", verbose=False):
self.name = name
self.verbose = verbose
# -*- coding: utf-8 -*-
from __future__ import unicode_literals, print_function
from PIL import Image
import numpy as np
from os.path import join
from functools import partial
import sys