My reddit account was banned after testing, so I'll leave experimenting and integration aside for some time. I am posting this short code snippet here anyway, just for my own convenience when I decide to pull it out again.
Thursday, February 22, 2024
Using Python to post to reddit programmatically
Sunday, February 18, 2024
Google Search Console for keyword research
Awesome trick for finding your gaps in content. The original post on reddit is here:
Google search console for keyword research is super powerful [archive]
For my own copy-paste convenience, the regex expression is:
(?i)^(who|what|where|when|why|how)
Open-ended:
(?i)^(.*who.*|.*what.*|.*where.*|.*when.*|.*why.*|.*how.*)
Few notes:
- I didn't find 'Search Results', instead I clicked on 'Performance', chose 12 month period and added query by clicking on the '+ New' button.
- One of the commenters is giving an additional tip here to cross-reference the impression and click data from Search Console with Google Trends.
- One of the commenters is suggesting to use an 'open-ended' variation of regex here. In my test case I haven't noticed any difference.
- This will not show you the keywords that your content is not ranking for. For that kind of research you need to use other tools, e.g. Google Ads.
Wednesday, February 14, 2024
Novine.eu - web portal sa kratkim vijestima, dizajn odluke
Web stranica je dostupna ovdje: Novine.eu - kratke vijesti
Slijedi nekakav tok misli vezanih uz UX/UI design projekta, kopiran iz komunikacije sa kolegama, da ga imam na jednom mjestu, a ne u 100 različitih chat-ova.
2024.02.14:
Kako je sve work in progress, ovo nije konačna verzija footera. U principu ... odlučio sam se riješiti headera jer želim da u prvom fokusu bude kraćenje vijesti, a u drugom tek čitanje ostalih vijesti koje su već skraćene. Pa je header (zajedno sa mode toggle-om) završio u footeru. Tako da su glavne kategorije ostale u većem fontu. Ali ... morat ću dodati i linkove na društvene mreže u footer, oni će biti manji, tako da još moram vidjeti kako će se sve to uklopiti.
Da, stalno vidljiv mode toggle ... u početku sam mislio - pa ne mijenjaju ljudi valjda cijelo vrijeme dark/light mode, valjda imaju neku preferencu i to je to. Ali onda sam shvatio da se vijesti čitaju i na otvorenom i na zatvorenom i kad tuče sunce i sl. ... pa je to plus argument za stalno dostupan toggle. Inače ideja je da se footer pojavi na prvom scroll-u i da ostane sticky na dnu ekrana. Tako da bi bio dostupan gotovo uvijek. Moguće i uvjek, imam neke ideje koji bi mi oslobodile više vertikalnog prostora.
2024.02.17:
Razmišljao sam o sidebaru! I to iz razloga što onaj trenutni burger na svome mobitelu zapravo ne mogu dohvatiti palcem. Što je u suprotnosti sa infographicsima koje smo vidjeli na predavanjima. Tako da bi sidebar najvjerojatnije bio sa desne strane. Ali, za sada ostaje burger menu. Generalno, 70% surfera dolazi sa mobitela, a trenutni copy-paste linkova na mobitelima je prekompliciran za korištenje, pa sam se odlučio prioritet ipak dati razvoju nekog jednostavnog app-a koji bi skratio taj proces. Mislim da mi je to trenutno najslabija karika.
Da, prebacio sam blok za skraćivanje na vrh. Bio je sa strane zbog nekakvog zamišljenog boljeg iskorištavanja prostora na širokim ekranima. Ali, kako sam dodao novu (i najelegantniju) opciju unosa linkova za kraćenje (možeš pogledat), trebalo mi je više prostora. Na accordion ne bi išao, kad već korisnik ne krati vijesti, neka barem klikne na neku od već skraćenih. Stoga ih ne bi sakrivao iza ekstra klika, pogotovo što mi je ideja dodati stupac 'Najčitanije' ... ili čak zamijeniti 'Posljednje skraćeno' sa njim. Ali da, nisam se još odlučio bi li koristio klasičnu paginaciju, 'učitaj više' ili infinite scroll za ostatak vijesti.
Da,
menu je trenutno prisutan samo prvoj stranici. Više razloga ...
kategorije i pod-kategorije još nisu do kraja razrađene. Svaki portal ih
ima nešto drugačije definirane, ja ih još nisam ni 'popisao' sve, pa
sam ostavio to za kasnije. Inače, negdje sam pročitao da su mega-menu-i
loši za SEO. Nisam siguran da li je to istina ili ne. Kao, nije dobro
kad svaka stranica linka na svaku drugu. Pa sam kao neki eksperiment
odlučio da 'leaf' stranice (u mom slučaju - članci) na dnu zapravo uopće
nemaju menu sa rubrikama. U protivnom, npr. članak iz rubrike 'Znanost'
bi imao link na rubriku 'Crna kronika'. Google-ov ranking algoritam je
tajna, tako da nitko zapravo ne zna da li to znači šta ili ne.
Tuesday, February 13, 2024
UserWarning: Detected filter using positional arguments. Prefer using the 'filter' keyword argument instead.
If you are receiving that warning with your google datastore queries, you can resolve the it by using google.cloud.datastore.query.PropertyFilter(property_name, operator, value)
(docs). The code snippet would be the following:
from google.cloud import datastore
from google.cloud.datastore.query import PropertyFilter
query = datastore.Client().query(kind="MyKind")
query.add_filter(filter=PropertyFilter("property", "=", value))
Sunday, February 11, 2024
OpenAI Whisper i hrvatski jezik
Virtualni seks i zamjena za obitelj, naziv
je posljednje epizode Explore [1] na kojoj sam odlučio isprobati
OpenAI-ov Whisper [2] za prepoznavanje hrvatskog jezika. Moj zaključak:
neupotrebljivo. Neupotrebljivo u smislu da se opet treba poslušati audio
kako bi se korigirao prepoznati dialog i, u nekim slučajevima, da bi se
shvatilo o čemu se uopće govori.
Kod prepoznavanja govora do
sada sam najbolje rezultate imao s Google Transcribe-om, ali on postoji
samo na mobilnim uređajima. Google Docs također ima voice input, ali on
ne podržava naš jezik. Ako poznajete neki speech-to-text konverter koji
ima besplatan API ili je open-source pa se može instalirati na vlastito
računalo, a da radi s hrvatskim jezikom - molim javite. Ne radim ništa
ozbiljno, samo eksperimentiram.
Ostaje mi da nekom drugom prilikom isprobam text-to-speech, ali o tom po tom.
Za ilustraciju Whisper-a, slijedi dio 'prepoznate' konverzacije (isti timestamp kojim počinje i [1]):
I
ovi zepla koji sad stavili na tržište svoje VR? Ima nekoliko
proizvođaćali bez niz ozemaca, japanaca, amerikanaca sa tenoradi. Znači
Kina pokušava naprajeti svoj uređaj tog tipa, ali to je tehnologija, ono
kaj zkažo, ovo je absolutno vrh tehnologije, su uređaj za litografiju
mikroprocesore. Dobro, silicija? Silicija vrti šte čestice su daraši i
gleda šta se desi. Mi om problem sa atomskom fizikom, da mi nemožemo
doznaš šta je nutra. I onda zamisli se... U nutra gdje? U atomu.
Zamislimo sad, mislimo netko koje gleda auti se voze po cesti, je
zanimena skako ti automobili su napravljene, ali ti ne možeš sad doći
razmontirati auto. I onda šta se radi ciclotron? Uzme dan auto s jedne
strane, uzme auto s jedne strane, onda ih sudari velikom brzinom i
gledaš koji komadi lete. Zagljuče, ha, kotac je dio auto. Onda leti
karboraтор, karboraтор je dio auto, ali kako karboraтора, da treba moži
jaće zaletiti te auto, da se bolje razbija, onda je zaletiti, i onda
umisto karboraтора sad leti vijak, leti membrana, leti je opruga i ti
svatiš kako funkcionira auto, tako da bezkonašno puta sudaraš auto i
gledaš, da leti je ciclotron, naprosto zalječeš atome jednog drugoga ili
čestice i gledaš, da letio. Dobro, taj boson Hicksov još. No i dalje,
samost je trebalo zašto je to sve skupa zaljepljeno. Znači ko je ljepilo
drži skupa, to sve skupa gravitacija, i onda ideš još ja će razbiti, da
vidiš da lete je zavareni komadi, kažem, vidi ovo je zavareno, tu je
ljepilo. Došli smo do kraja ovog audiodijela, hvala vam ljepa, poštavan i
slušati ili eksplore i do slušanja čujemo se opeti i moćemo
interaktivno uživati jedni u drugima sljedeći gutirka. Hvala ljepa i do
slušanja. Do slušanja.
[1] https://www.youtube.com/watch?v=9QUQBYyUels&t=2829
[2] https://openai.com/research/whisper
Tuesday, February 6, 2024
Plus hosting alternativa
06:22 AM Pokušavam unijeti TXT record kako bi u Google Search Console-i autentificirao vlastitu domenu. Plus Hosting DNS
editor daje poruku: "Greška pri spremanju zapisa!". Šaljem support
request. Prilikom klika na "Send" pomislim kako su prošli dani kada su
promptno reagirali i kako odgovor sigurno neću dobiti prije 09:00 AM.
10:45
AM Stiže odgovor. Da ja njima pošaljem DNS zapis i da će ga oni
podesiti. Nope. Nemam namjeru čekati satima kad god poželim nešto
ažurirati. Pitam zar ne mogu sam podesiti vlastitu domenu.
10:54
AM Da oni moraju vidjeti koja se pogreška javlja i da je svakako
jednostavnije da oni podese domenu. Šaljem odgovor da sam im već rekao
koja se pogreška javlja.
11:04 Stiže odgovor da im moram
poslati DNS zapis kojeg želim podesiti, jer da možda postoji već isti
pa da se promjene ne mogu spremiti. Inače, DNS editor nema niti jedan
meni vidljiv zapis. Šaljem odgovor da otključaju domenu i da je prenosim
kod nekog drugog registrara.
Sljedeći
dan: odabrao sam spaceship. Domena prebačena u jednoj minuti, u drugoj
minuti sam podesio DNS record. eu domene u spaceship-u su €4.64 dok su u
Plus-u €9.29.
Plus Hosting, hvala još jednom što odluku o prelasku kod drugog registrara činite tako jednostavnom!
Monday, February 5, 2024
Planet.com partners in agriculture sector
Agrograph
Actionable Data for Managing Ag Risk- Standardized Credit Risk Analysis
- Automated Farmland Valuation
- Verified Sustainability Reporting
- Modern Crop Insurance Solutions
https://agrograph.com/
https://www.linkedin.com/company/agrograph/
https://twitter.com/agrograph
Arva intelligence
Profitable sustainability through data-driven agronomics.https://arvaintelligence.com/
https://www.linkedin.com/company/arva-intelligence/
https://twitter.com/ArvaIntel
https://www.facebook.com/arvaintelligence
https://www.instagram.com/arvaintelligence
Earth PBC
We’re a public benefit corporation that’s built a social network for the protection of forests, oceans, biodiversity and human rights.https://earthpbc.com/
https://www.linkedin.com/company/earthpbc/about/
https://twitter.com/earthpbc
https://www.instagram.com/earthpbc
ERM
Shaping a sustainable future with the world’s leading organizations.https://www.erm.com/
https://www.linkedin.com/company/erm/
Eye in the sky
https://eits.in/https://twitter.com/EYEINTHESKYTEC1
farnQA
FarmQA provides nuts-n-bolts digital tools for agronomists and other agribusiness. See all aspects of your operation in a single view including your fields, crop scouting reports, weather data, spray records, satellite imagery and more.https://www.farmqa.com/
https://www.linkedin.com/company/farmqa/
https://twitter.com/farm_qa
https://www.youtube.com/@farmqa2421
https://www.instagram.com/farmqa
Global green monitoring
Global Green Monitoring uses NASA Satellites to capture detailed photos of greenery, including dense forest cover, and converts those images to uncover deforestation, logging, disease, poor water flow and other disturbance events. This innovation takes urban planning, forestry and agriculture to the next level.https://www.globalgreenmonitoring.org/
i-Cultivier
Making advanced research and technology accessible to improve food and support agriculturehttps://i-cultiver.com/
https://www.linkedin.com/company/i-cultiver/about/
https://twitter.com/i_cultiver
https://www.instagram.com/icultiver
Interpine Innovation
Interpine Innovation is a forest consulting and data management company specializing in information technology and optimal decision making across the forest industry. We have a committed management team of professional foresters and backed up by qualified technicians and data analysts that provide credible solutions for forestry-based companies. By basing our core business in the central hub of New Zealand forestry since 1983, Interpine has been able to develop contemporary and applicable ideas, systems and services that have greatly benefited the local, national and international forest industries.https://interpine.nz/
https://www.linkedin.com/company/interpine-innovation/
https://twitter.com/interpine_nz
https://www.youtube.com/@InterpineInnovation
Nave Analytics, Inc.
Nave Analytics helps agriculture professionals recommend the correct amount of water at the correct time to their clients by fusing satellite, weather, and telemetry data into a singular data stream. Nave Analytics generates 3-D maps of soil water content across the entire field instead of a single point and offers an API integration with the customer's existing user interface.https://www.naveanalytics.com/
https://www.linkedin.com/company/nave-analytics-inc/
QUDEX
QUDEX is a Land Management SaaS and Business ESG AI SaaS platform that uses AI to convert environmental data into actionable insights. Our platform is revolutionizing land conservation and the revaluation of degraded lands. By leveraging the pioneering technology of Quantitative Environmental Data Evaluation (QUDE), we provide businesses across industries with a tool to mitigate their environmental impact. QUDEX offers an advanced, yet intuitive solution for companies seeking to seamlessly incorporate sustainable practices into their core operations, contributing to a healthier and more sustainable world.
https://qudex.ai/
https://www.instagram.com/qudexai
Swift Geospatial
Swift Geospatial is a GIS and Remote Sensing company specializing in Agriculture, Mining, Forestry and Sustainability monitoring solutions.
https://swiftgeospatial.solutions/
https://www.linkedin.com/company/swift-geospatial/?viewAsMember=true
https://www.youtube.com/@swiftgeospatial5228
Vulcan AI
We are a Singapore-based AI company focused on building AgTech solutions utilizing Vision and Generative AI with remote sensing technology to help improve yield sustainably. Our AI solutions have been trained and calibrated on millions of ground- validated tree level data points, thus allowing a quick-start for our clients without having to go through extensive data collection and training exercise. We help clients detect yield risks, health and nutrient issues across crops such as forestry, maize, oil palm and cassava.
https://www.vulcan-ai.com/
https://www.linkedin.com/company/vulcan-agritech/
Sunday, February 4, 2024
How to switch between minified and non-minified javascript/css/html in Flask (Python)?
You can separate your development (human readable) and deployment (minified) files into distinct folders, as illustrated below:
source/
├─ static/
├─ static_dev/
├─ templates/
├─ templates_dev/
...
In your Python code, make your Flask app use the root URL as a static path:
app = Flask(__name__, static_url_path="")
You can switch between development and deployment folders based on your environment or global variable. That really depends on your system and your preferences, so the following code assumes that variable check is abstracted by a function:
if is_development_environment():
app.static_folder = "static_dev"
app.template_folder = "templates_dev"
I am often using Google App engine for my own projects, so the code in my case is:
if not os.getenv("GAE_ENV", "").startswith("standard"):
...
Finally, you need to instruct your minify scripts to pick source files from development folders and use deployment folders as output destination. Also make sure that only deployment folders are uploaded to your server, and that they are ignored by your source code control system.
In my case, I need to add the following two lines to .gitignore:
/static/
/templates/
And the following to .gcloudignore:/static_dev
/templates_dev
Let me know if you are interested in ant script that does copying/minifying.