Skip to content

Instantly share code, notes, and snippets.

View zmofei's full-sized avatar
🏠
Working from home

Mofei Zhu zmofei

🏠
Working from home
View GitHub Profile
@zmofei
zmofei / data.geojson
Created July 7, 2025 08:04
GeoJSON data for visualization - Created by Mofei Dev Tools
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@zmofei
zmofei / data.geojson
Created July 7, 2025 08:03
GeoJSON data for visualization - Created by Mofei Dev Tools
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@zmofei
zmofei / data.geojson
Created July 7, 2025 08:01
GeoJSON data for visualization - Created by Mofei Dev Tools
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@zmofei
zmofei / quick-smolagents-demo.ipynb
Created May 9, 2025 17:45
quick-smolagents-demo.ipynb
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@zmofei
zmofei / index.html
Created July 13, 2022 09:06
Personal Website - Yahia Refaiea [Beta]
<div class="wrapper">
<canvas id="stars"></canvas>
<canvas id="yahia"></canvas>
<div class="container">
<div class="template color-yellow" data-template="home">
<main>
<h1><span>A
<mark>21 years</mark> old</span><span> interaction designer</span></h1>
<div class="p"><span>hello@yahiarefaiea.com</span><span>(+963) 96 2295 406</span></div>
<div class="links">
@zmofei
zmofei / index.html
Created July 13, 2022 09:06
Personal Website - Yahia Refaiea [Beta]
<div class="wrapper">
<canvas id="stars"></canvas>
<canvas id="yahia"></canvas>
<div class="container">
<div class="template color-yellow" data-template="home">
<main>
<h1><span>A
<mark>21 years</mark> old</span><span> interaction designer</span></h1>
<div class="p"><span>hello@yahiarefaiea.com</span><span>(+963) 96 2295 406</span></div>
<div class="links">
const fs = require('fs');
const path = require('path');
const exec = require('child_process').exec;
const language = process.env.LAN || 'it';
// [_ar, _de, _es _fr, _it, _ja]
const fscontest = fs.readFileSync(path.resolve(__dirname, `./country_label.json`))
const byline = fscontest.toString().split('\n').map((item) => {
return [JSON.parse(item).properties[`name_en`].replace(',', '-'), JSON.parse(item).properties[`name_${language}`].replace(',', '-')]
const fs = require('fs');
const path = require('path');
const exec = require('child_process').exec;
const language = process.env.LAN;
//
const fscontest = fs.readFileSync(path.resolve(__dirname, `./${language}.csv`))
const byline = fscontest.toString().split('\n').map(data => data.split("\",\"").map(data => data.replace(/"/g, '').replace(/,/g, ' ')))
byline.shift()
const readline = require('readline');
const rl = readline.createInterface({
input: process.stdin,
crlfDelay: Infinity
});
const dt = '2021-04-01';
let sequentialId = +new Date(dt);
const fs = require('fs');
const _get = JSON.parse(fs.readFileSync('./china.geojson'));
const geo = _get.coordinates[0]
// console.log(geo)
const cache = new Set();
let newC = [];
geo.forEach(v => {
let name = `${v[0]},${v[1]}`;
if (cache.has(name)) {