This file contains hidden or 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
| gsettings set org.gnome.desktop.background picture-uri "" | |
| gsettings set org.gnome.desktop.background primary-color '#249C44' |
This file contains hidden or 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
| conky.config = { | |
| background=true, | |
| alignment='top_right', | |
| use_xft = true, | |
| font = 'DejaVu Sans Mono:size=10', | |
| double_buffer=true, | |
| own_window=true, | |
| own_window_transparent=true, | |
| own_window_argb_visual=true, |
This file contains hidden or 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
| FROM alpine | |
| RUN apk add --update nodejs npm | |
| RUN npm install -g wscat2 | |
| CMD wscat -c ws://<IP>:8000/ws -k |
This file contains hidden or 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
| <html> | |
| <body> | |
| <script type="text/javascript"> | |
| var wSocket = new WebSocket("ws://your-ip:8000/ws") | |
| wSocket.onopen = function() { | |
| console.log('websocket opened') | |
| }; | |
| wSocket.onmessage = function (evt) { |
This file contains hidden or 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
| package main | |
| import ( | |
| "log" | |
| "net/http" | |
| "github.com/gorilla/mux" | |
| "github.com/gorilla/websocket" | |
| ) |
This file contains hidden or 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
| // index | |
| const http = require('http'); | |
| const handler = (req, res) => { | |
| res.writeHead(200, {'Content-Type': 'application/json; charset=utf-8'}); | |
| res.end(JSON.stringify({message: 'REST API Örneği'})); | |
| }; | |
| const server = http.createServer(handler); |
This file contains hidden or 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
| from functools import singledispatch | |
| @singledispatch | |
| def power(x, y=2): | |
| return x ** y | |
| @power.register(str) | |
| def _(x, y=2): |
This file contains hidden or 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
| from threading import Thread, Event | |
| import time | |
| path = '/dbfs/databricks-datasets/' | |
| stop_event = Event() | |
| files = [] | |
| def find_files(path): | |
| for i in os.listdir(path): |
This file contains hidden or 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
| def fibo(n): | |
| if n == 0 or n == 1: | |
| return n | |
| return fibo(n-1) + fibo(n-2) | |
This file contains hidden or 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
| def gcd(n, m): | |
| while n: | |
| n, m = m % n, n | |
| return m |