Mar 292016
 
3.182 views

Python Pygame ve Thread Uygulaması

Python Pygame ve Thread Uygulaması

Al Sweigart tarafından Python 2 ve 3 için uyumlu şekilde yazılmış “threadworms” isimli bir uygulama var. Proje https://github.com/asweigart/threadworms adresinde paylaşılıyor.

Programın içinde ayrıntılı açıklamaların bulunması özellikle thread, pygame veya Python konusunda öğretici örnek arayanlar için onu daha değerli hale getiriyor.

Açıklamalar İngilizce. Ben de dil sorunu olan arkadaşlarımız için kodların arasına serpiştirilmiş açıklamaları büyük oranda Türkçeleştirdim. Kalan kısmını da en kısa zamanda halletmeye çalışacağım.

Tamamlanmamamış haliyle bile bu açıklamaların işe yarayacağını düşünüyorum.

Türkçe açıklamaları içeren dosyaya https://github.com/ahmetax/threadworms adresinden ulaşabilirsiniz. Orijinal kod dosyasının adı: threadworms.py. Türkçe açıklamaları içeren dosya adı ise: threadworms-tr.py. Her iki dosyadaki kodlar aynı. Sadece açıklamalar ve bazı parametreler farklı.

Bu program, thread kullanımı açısından da çok yararlı ve güzel bir örnek. Solucanların işgal ettiği hücrelerin çakışmamasını sağlayan kilit mekanizmaları adım adım açıklanıyor.

Solucan sayısını, kullanılan renkleri, hücre boyutlarını, yatay ve düşey hücre sayısını değiştirmeniz mümkün. Solucanların hızını da ayarlayabilirsiniz.

setGridSquares(squares) satırının başındaki # işaretini kaldırırsanız, squares değişkeni tarafından tanımlanan engeller ızgara üzerinde etkin hale gelir.

Thread ve/veya pygame konusunda kendinizi geliştirmek istiyorsanız, bu örneği mutlaka inceleyin!

Ahmet Aksoy

Mar 242016
 
3.267 views

Hürriyet Gazetesinde Yıllara Göre Sözcük Kullanımı

Hürriyet Gazetesinde Yıllara Göre Sözcük KullanımıHürriyet Gazetesi arşivlerini yıllara göre tarama çalışmamız devam ediyor. 2010 ve 2011 yıllarına ait taramalar tamamlandı. (2012, 2013, 2014 ve 2015 te tamam.)

Aşağıda, elde ettiğimiz sözcük frekans listelerinin başında yer alan sözcükleri karşılaştıran bir tablomuz var. Gördüğünüz gibi listeler neredeyse birbirlerinin aynısı. Sadece küçük yer değiştirmeler mevcut. İlk 12 sözcük tamamen birbirinin eşi.

Ancak listeyi uzatırsak, daha alt bölgelerdeki değişimlerin giderek daha büyük boyutlara ulaştığını görürüz. Çünkü aşağılara indikçe, sözcükler arasındaki frekans farklılıkları küçülmekte; bu da kaymaların giderek daha fazla basamağı kapsama olasılığını arttırmaktadır.

Diğer yıllara ait sonuçları da taramalar bittikçe tabloya ekleyeceğim.

Henüz gerçekleştirmediğim bir çalışmada bazı kişi, yer ve kurum isimlerinin kullanım sıklığının yıllara göre değişimini saptamayı planlıyorum. Böyle bir rapor kişi, yer ve kurumların günlük haberler açısından popülerliğinin nasıl değiştiğini gösterecektir. İlginç sonuçlar çıkacağını umuyorum.

Evet, 2013 yılının sonuçlarını da listeye ekledim. Hala, ilk 11 sözcüğün sıralaması aynı.

2014 ve yılına ait veriler de sıralamanın ilk 11 sıralamasını değiştirmedi.

Hürriyet Gazetesinde Yıllara Göre En sık kullanılan ilk 30 sözcük
  2010 2011 2012 2013 2014 2015 2016
01 ve ve ve ve ve ve
02 bir bir bir bir bir bir
03 bu bu bu bu bu bu
04 da da da da da da
05 de de de de de de
06 için için için için için için
07 ile ile ile ile ile ile
08 çok çok çok çok çok çok
09 olarak olarak olarak olarak olarak olarak
10 daha daha daha daha daha daha
11 en en en en en en
12 olan olan olan türkiye olan ise
13 türkiye ise türkiye ise ise olan
14 ise türkiye ise olan türkiye türkiye
15 dedi dedi dedi sonra sonra sonra
16 sonra sonra ilk dedi kadar kadar
17 olduğunu ilk sonra ilk her dedi
18 kadar olduğunu kadar kadar gibi her
19 ilk kadar olduğunu olduğunu dedi gibi
20 büyük büyük büyük her ilk var
21 gibi bin her gibi bin ilk
22 bin gibi gibi var var bin
23 başkanı her var bin ne olduğunu
24 söyledi başkanı başkanı büyük o büyük
25 nin söyledi bin son yeni ne
26 her yeni son yıl büyük yeni
27 yıl son yeni ama olduğunu başkanı
28 yeni yüzde yıl başkanı son ama
29 ın var nin yeni ama o
30 var yıl söyledi o ilgili yıl

Ahmet Aksoy
DerlemTR Proje Yöneticisi

Şub 062016
 
2.931 views

Microsoft Testing Underwater Data Centers

Microsoft Testing Underwater Data Centers

Photo Credits: Microsoft Research

Companies like Microsoft and Google are searching for better solutions for the geometrical increase in the volume of data transmissions demanded by their consumers. They are using more hardwares, and more energy to maintain their services. The by-product of it is the excessive heat to be removed.

Microsoft, now tries to solve that unwanted heat created by the data centers with a different strategy. Instead of using a cooling system running with liquid nitrogene, they are dipping their data centers into the ocean in steel tubes.

They are also planning to produce the required energy by the data centers using some off-shore power generators.

They hope that it will help somewhat for the global warming problems.

Maybe there are some cool solutions for our future under the depths of the oceans. Who knows?

Ahmet Aksoy

Reference:

Şub 012016
 
3.277 views

Super-fast 5G Internet by Solar Powered Drones

In an article by BEC Crew in ScienceAlert.com it is said that Google is working on a secret project codenamed Skybender.

Super-fast 5G Internet

In the project a data transmission 40 times faster than the fastest wireless services is aimed.

The new data transmission will be made in a new spectrum with millimetric waves which covers a frequency range from 30 GHz to 300GHz.

Test are being maintained already in New Mexico.

“According to Engadget, Google has permission from the Federal Communications Commission (FCC) to continue testing their drones in US airspace till July this year, at which point we’ll probably hear more about the success or failure of Skybender. Regardless of what happens though, we get the feeling that those millimetre waves aren’t going to be left vacant for much longer.”

Reference:

Oca 022016
 
4.224 views

New scientific discoveries of 2015

New scientific discoveries of 2015

Image Credits: www.howchina.cn

In 2015 there were some interesting scientific discoveries that possible will affect our future.

Here is a small derivation from some of these discoveries:

  • Supermassive black hole: It has a mass whic is 12 million times larger than our own sun.
  • Two more unknown planets estimated to to be existing farther than Pluto.
  • Human skeletal muscles raised in the laboratories that can respond like native tissue to external stimuli.
  • A high quality graphene produced at a cost of 1000 times cheaper than the average cost at Delt University.
  • The first human epigenome map is completed.
  • Researchers from North Carolina University discovered a new phase of carbon which gives the ability to produce diamond at room temperatures and normal athospheric pressures.
  • NASA finds possible evidence of flowing water on Mars
  • EM Drive becomes a reality according to scientists
  • New Horizons space probe reached Pluto
  • Scientist discovered the first warm-blooded fish
  • New species found in the Himalayas

I wish the best for everybody in 2016.

Ahmet Aksoy

References:

Ara 222015
 
5.545 views

Dry Ice or Flowing Water on Mars Surface

Dry Ice or Flowing Water on Mars Surface

Branched gullies Jim Secosky/NASA

Recently some of the formations on the slopes of the craters on Mars were assumed to be the evidence of seasonal flowing water. However, now there is a different proposal for the formation of these structures.

According to the new proposal, the main actor might be dry ice, not flowing liquid water.

It is known that most of the seasonal icecaps and frost are formed by CO2. When sun rays penetrate to the depth of dry ice layers, it may cause sublimination (vaporising without entering a liquidation phase). This process might create a frictionless surface layer and cause the dry ice to behave like a flowing liquid carrying some deposit together with it.

So, actual reason of the formation of gullies might be flowing dry ice instead of liquid water flow.

I hope, that puzzle will be solved in a short time.

Ahmet Aksoy

References: