Skip to content

Instantly share code, notes, and snippets.

View aneury1's full-sized avatar
🎯
Focusing

Aneury Perez aneury1

🎯
Focusing
  • BairesDev
  • Dominican Republic
View GitHub Profile
#include <iostream>
#include <string>
#include <unordered_map>
#include <winsock2.h>
#include <ws2tcpip.h>
#include <thread>
#include <vector>
#include <iostream>
#include <string>
#include <vector>
QGuiApplication app(argc, argv);
QQmlApplicationEngine engine;
const QUrl url( "qrc:/main.qml" );
QObject::connect(&engine, &QQmlApplicationEngine::objectCreated, &app,
[url](QObject *obj, const QUrl &objUrl) {
if (!obj && url == objUrl)
QCoreApplication::exit(-1);
},
Qt::QueuedConnection);
std::vector<std::thread> threads;
int num_threads = std::thread::hardware_concurrency();
for (int i = 0; i < num_threads; ++i) {
threads.emplace_back([&](){
while (true) {
// Wait for a task to be added to the queue
std::unique_lock<std::mutex> lock(queue_mutex);
while (task_queue.empty()) {
condition.wait(lock);
}
#include <iostream>
#include <map>
#include <string>
#include <vector>
std::vector<std::string> split(const std::string& s, char sep) {
std::vector<std::string> ret;
std::string test;
for (char c : s) {
if (c == sep) {
#!/usr/bin/sh
echo "APP"
if [ $# -gt 0 ]
then
app_name="$1"
echo "APP NAME: ${app_name}"
cargo generate --git https://github.com/CosmWasm/cw-template.git --name $app_name
fi
import { useState, useEffect, useCallback } from "react";
const useFetch = (url, options = {}, retries = 3) => {
const [data, setData] = useState(null);
const [loading, setLoading] = useState(false);
const [error, setError] = useState(null);
const [retryCount, setRetryCount] = useState(0);
const [isCancelled, setIsCancelled] = useState(false);
const fetchData = useCallback(async () => {
import fiona
import numpy
import matplotlib.pyplot as plotter
import folium
import geopandas
import pyproj
from sklearn import linear_model
from shapely.geometry import Point, Polygon
from sklearn.cluster import KMeans
import numpy as np
# recuerda importar.
def AlgorithmLinearRegresion():
x = col_weight
y = col_weight2
X = x.reshape(-1, 1)
model = LinearRegression()
model.fit(X, y)
x_test = np.array([6]).reshape(-1, 1)
y_pred = model.predict(x_test)
@aneury1
aneury1 / lcf.py
Last active February 27, 2023 14:05
import fiona
import numpy
import matplotlib.pyplot as plotter
import folium
import geopandas
import pyproj
from sklearn import linear_model
from shapely.geometry import Point, Polygon
from sklearn.cluster import KMeans
import numpy as np
@aneury1
aneury1 / basy.py
Last active February 26, 2023 02:48
import folium
import geopandas
import pyproj
from sklearn import linear_model
from shapely.geometry import Point, Polygon
from sklearn.cluster import KMeans
import numpy as np
import matplotlib.pyplot as plt