Skip to content

Instantly share code, notes, and snippets.

View muatik's full-sized avatar
:bowtie:
a little more busy these days

Mustafa Atik muatik

:bowtie:
a little more busy these days
View GitHub Profile
@muatik
muatik / books.json
Last active December 10, 2015 02:38
These are the json formats for The Project Open Corpus.
{
"at": 1356360832,
"authors": [
"J. M. Barrie"
],
"name": "Peter Pan",
"text": "All children, except one, grow up. They soon know that they will grow up, and the way Wendy knew ...",
"raw": {} // bibliographic record
}
@muatik
muatik / APICALLS.json
Last active December 14, 2015 04:29
The API calls of Trend Analyzer. This file is used in the api console.
var APICALLS=[
{
"title": "Start an analysis",
"description": "<p>With this request, you can start an analysis. An analysis may take a long time,</p><p>depending upon content on which the analysis will be performed.</p><p><strong>Resource Path:</strong> /analysis</p><p><strong>HTTP Request Type:</strong> PUT</p><h3>Resource Parameters</h3><p>These parameters must be provided in resource as shown below:</p><p><b>Example:</b> /analysis/daily/2013-02-16 15:30</p><p><b>Example:</b> /analysis/hourly/2013-02-21 06:30</p><table class='params'><thead><tr><th>Parameter</th><th>Required</th><th>Description</th><th>Example</th></tr></thead><tbody><tr><td>interval</td><td>YES</td><td>The interval of analysis. This can be one of the followings: hourly, daily, weekly, monthly</td><td>daily</td></tr><tr><td>date</td><td>YES</td><td>The date od analysis. YYY-MM-HH:MM</td><td>2013-01-15 19:00</td></tr></tbody></table><h3>Restriction Paramters</h3><p>These parameters must be provided as HTTP post fields as
@muatik
muatik / events.json
Created May 14, 2013 20:37
where is the party?
{
"events":[
{
"title":"the foo party",
"lat":1111,
"long":1111,
"description":"go to the party, surely you will have fun!",
"startDate":1111 // unixtimestamp
}
]
{
"entries" : [
{
"project" : "project's code name",
"date" : 1378125312,
"type" : "info",
"text" : "the cache file has just been saved."
},
{
"project" : "project's code name",
{
"terms": {
"search" : "Search",
"goUp" : "Go up",
"topic" : "Topic",
"settings" : "Settings",
"help" : "Help",
"soon" : "Soon"
},
"actions" : {
-- Turkce isimler sozlugu twitter : http://twitter.com/tserpico
CREATE TABLE `isimler` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`isimler` varchar(255) DEFAULT NULL,
`cinsiyet` varchar(255) DEFAULT NULL COMMENT 'erkek : E , kadın : K , uniseks : U',
PRIMARY KEY (`id`)
) ENGINE=InnoDB;
-- ----------------------------
Aad M
Aadam M
Aaden M
Aadje F
Aadu M
Aaf ?F
Aafke ?
Aafkea F
Aafko M
Aage M
-- MySQL dump 10.13 Distrib 5.1.51, for pc-linux-gnu (i686)
--
-- Host: 127.0.0.1 Database: world
-- ------------------------------------------------------
-- Server version 5.1.51-debug-log
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
/*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */;
/*!40103 SET @OLD_TIME_ZONE=@@TIME_ZONE */;
[
{
"city": "Oranjestad",
"code": "AW"
},
{
"city": "Kabul",
"code": "AF"
},
{
@muatik
muatik / python_builtin_sockets.py
Created November 5, 2014 12:39
a very first example of sockets in python
import socket
import select
class Server(object):
def __init__(self):
self.port = 8002
self.socket = socket.socket( socket.AF_INET, socket.SOCK_STREAM )
self.socket.setsockopt( socket.SOL_SOCKET, socket.SO_REUSEADDR, 1 )
self.socket.bind(('', self.port))
self.socket.listen(5)