This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Feature: BDD-Python-Sample | |
Scenario: First Python scenario | |
Given StringHelper sinifindan kopya olusturacagim | |
When RemoveDiacritics metoduna parametre olarak "Merhaba Dünya Ben Maraşlı" ve "True" gececegim | |
Then Sonuc "merhaba dunya ben marasli" seklinde olmali |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
open FSharp.Data | |
open XPlot.GoogleCharts |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
let wikiUrl = "https://en.wikipedia.org/wiki/All-time_table_of_the_FIFA_World_Cup" | |
type FifaProvider = HtmlProvider<"https://en.wikipedia.org/wiki/All-time_table_of_the_FIFA_World_Cup"> | |
let fifaWiki = FifaProvider.Load(wikiUrl) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
let source = | |
( | |
[| for row in fifaWiki.Tables.``All-time table``.Rows -> | |
row.``Name of Team``, row.Pld, row.GF |] | |
|> Array.map(fun(name, numberOfMatches, goalsFor) -> | |
let teamName = System.Text.RegularExpressions.Regex.Replace(name, "\[\d+\]", "") | |
teamName, goalsFor, numberOfMatches) | |
|> Array.sortByDescending(fun(name, goals, matches) -> (goals)) | |
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
let options = | |
Options( | |
colorAxis = ColorAxis(colors = [|"yellow"; "red"|]) | |
) | |
source | |
|> Chart.Geo | |
|> Chart.WithOptions options | |
|> Chart.WithLabels ["Goal Count"; "Match Count"] | |
|> Chart.Show |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Marker to tell the VCL compiler that this VCL has been adapted to the | |
# new 4.0 format. | |
vcl 4.0; | |
# Default backend definition. Set this to point to your content server. | |
backend default { | |
.host = "127.0.0.1"; | |
.port = "8080"; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
docker pull python:latest | |
docker run --name python -v C:/python-scripts:/etc/scripts -p 1905:1905 -it python:latest /bin/bash |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--name python # container bundan sonra "python" ismiyle çağrılacak | |
-v C:/python-scripts:/etc/scripts # container içerisindeki /etc/scripts klasörü lokal bilgisayarımdaki C:/python-scripts klasörü ile eşlenecek. Böylece lokal bilgisayarımda bu klasörde yapılan bir değişiklik otomatik olarak container'a da yansıyacak. | |
-p 1905:1905 # container'ın 1905 portu ile lokal bilgisayarımın 1905 portu eşleniyor. | |
-it python:latest /bin/bash # bu container "python:latest" olarak indirilen image'ı kullanacak ve container shell komutları çalıştırılabilir (interaktif) olarak aktif olacak. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import tornado.ioloop | |
import tornado.web | |
class MainHandler(tornado.web.RequestHandler): | |
def get(self): | |
self.write("Docker container'da yaşayan bir garip Tornado uygulaması...") | |
def make_app(): | |
return tornado.web.Application([ | |
(r"/", MainHandler), |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
docker pull ubuntu:latest | |
docker run -p 6081:6081 --link python:tornado-app -v C:/Varnish:/etc/varnish/ -it ubuntu:latest /bin/bash |
OlderNewer