repo_full_name stringlengths 6 93 | repo_url stringlengths 25 112 | repo_api_url stringclasses 28
values | owner stringclasses 28
values | repo_name stringclasses 28
values | description stringclasses 28
values | stars int64 617 98.8k | forks int64 31 355 ⌀ | watchers int64 990 999 ⌀ | license stringclasses 2
values | default_branch stringclasses 2
values | repo_created_at timestamp[s]date 2012-07-24 23:12:50 2025-06-16 08:07:28 ⌀ | repo_updated_at timestamp[s]date 2026-02-23 15:23:15 2026-05-03 18:52:12 ⌀ | repo_topics listlengths 0 13 ⌀ | repo_languages unknown | is_fork bool 1
class | open_issues int64 3 104 ⌀ | file_path stringlengths 3 208 | file_name stringclasses 509
values | file_extension stringclasses 1
value | file_size_bytes int64 101 84k ⌀ | file_url stringclasses 627
values | file_raw_url stringclasses 627
values | file_sha stringclasses 624
values | language stringclasses 8
values | parsed_at stringdate 2026-05-04 01:12:36 2026-05-04 19:41:55 | text stringlengths 100 102k |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
microsoft/routeros-scanner | https://github.com/microsoft/routeros-scanner | null | null | null | null | 977 | null | null | mit | null | null | null | null | null | null | null | query_nvd.py | null | null | null | null | null | null | Python | 2026-05-04T01:36:27.527843 | # Copyright (c) Microsoft Corporation.
# Licensed under the MIT License.
import requests
import collections
import sys
from retry import retry
class NvdApiError(Exception):
"""Exception raised for errors in the API request """
def __init__(self, params, msg):
self.message = f"Received an error durin... |
microsoft/routeros-scanner | https://github.com/microsoft/routeros-scanner | null | null | null | null | 977 | null | null | mit | null | null | null | null | null | null | null | main.py | null | null | null | null | null | null | Python | 2026-05-04T01:36:27.528620 | # Copyright (c) Microsoft Corporation.
# Licensed under the MIT License.
import argparse
import json
import traceback
import paramiko
import os
import datetime
import sys
import re
from commands.fwnat import FWNat
from commands.dns import DNS
from commands.files import Files
from commands.fwrules import FW
from comma... |
microsoft/routeros-scanner | https://github.com/microsoft/routeros-scanner | null | null | null | null | 977 | null | null | mit | null | null | null | null | null | null | null | nvd.py | null | null | null | null | null | null | Python | 2026-05-04T01:36:27.529054 | # Copyright (c) Microsoft Corporation.
# Licensed under the MIT License.
import json
class Comparison(object):
SMALLER = -1
SAME = 0
BIGGER = 1
class CVEValidator(object):
def __init__(self, jsonfname):
with open(jsonfname, 'r') as fjson:
self._all_cpe_match_data = json.loads... |
TTPlanetPig/Comfyui_TTP_Toolset | https://github.com/TTPlanetPig/Comfyui_TTP_Toolset | null | null | null | null | 977 | null | null | mit | null | null | null | null | null | null | null | LTXVFirstLastFrameControl_TTP.py | null | null | null | null | null | null | Python | 2026-05-04T01:36:29.750222 | """
LTX First Last Frame Control with Middle Frame and Context Support
包含三个节点:
1. LTXVContext_TTP: 视频续接context节点
2. LTXVMiddleFrame_TTP: 可串联的中间帧节点
3. LTXVFirstLastFrameControl_TTP: 首尾帧控制节点
Author: TTP
"""
import torch
import comfy.utils
from comfy_api.latest import io
class LTXVContext_TTP:
""... |
TTPlanetPig/Comfyui_TTP_Toolset | https://github.com/TTPlanetPig/Comfyui_TTP_Toolset | null | null | null | null | 977 | null | null | mit | null | null | null | null | null | null | null | __init__.py | null | null | null | null | null | null | Python | 2026-05-04T01:36:29.766639 | from .TTP_toolsets import NODE_CLASS_MAPPINGS as TOOLSET_MAPPINGS, NODE_DISPLAY_NAME_MAPPINGS as TOOLSET_DISPLAY
from .LTXVFirstLastFrameControl_TTP import LTXVFirstLastFrameControl_TTP, LTXVMiddleFrame_TTP, LTXVContext_TTP
NODE_CLASS_MAPPINGS = {
**TOOLSET_MAPPINGS,
"LTXVFirstLastFrameControl_TTP": LTXVF... |
TTPlanetPig/Comfyui_TTP_Toolset | https://github.com/TTPlanetPig/Comfyui_TTP_Toolset | null | null | null | null | 977 | null | null | mit | null | null | null | null | null | null | null | TTP_toolsets.py | null | null | null | null | null | null | Python | 2026-05-04T01:36:29.773101 | import cv2
import numpy as np
from PIL import Image, ImageFilter, ImageChops, ImageEnhance
import node_helpers
import torch
import comfy.model_management
import comfy.samplers
import comfy.sample
import comfy.utils
import latent_preview
from typing import Any, List, Tuple, Optional, Union, Dict
def pil2ten... |
mbrossar/ai-imu-dr | https://github.com/mbrossar/ai-imu-dr | null | null | null | null | 977 | null | null | mit | null | null | null | null | null | null | null | src/train_torch_filter.py | null | null | null | null | null | null | Python | 2026-05-04T01:36:31.774839 | import os
import time
import torch
import matplotlib.pyplot as plt
import numpy as np
from termcolor import cprint
from utils_torch_filter import TORCHIEKF
from utils import prepare_data
import copy
max_loss = 2e1
max_grad_norm = 1e0
min_lr = 1e-5
criterion = torch.nn.MSELoss(reduction="sum")
lr_initprocesscov_net = 1... |
mbrossar/ai-imu-dr | https://github.com/mbrossar/ai-imu-dr | null | null | null | null | 977 | null | null | mit | null | null | null | null | null | null | null | src/utils_torch_filter.py | null | null | null | null | null | null | Python | 2026-05-04T01:36:31.783929 | import torch
import matplotlib.pyplot as plt
import numpy as np
import os
import time
from termcolor import cprint
from utils_numpy_filter import NUMPYIEKF
from utils import prepare_data
class InitProcessCovNet(torch.nn.Module):
def __init__(self):
super(InitProcessCovNet, self).__init__()
... |
mbrossar/ai-imu-dr | https://github.com/mbrossar/ai-imu-dr | null | null | null | null | 977 | null | null | mit | null | null | null | null | null | null | null | src/main_kitti.py | null | null | null | null | null | null | Python | 2026-05-04T01:36:31.808438 | import os
import shutil
import numpy as np
from collections import namedtuple
import glob
import time
import datetime
import pickle
import torch
import matplotlib.pyplot as plt
from termcolor import cprint
from navpy import lla2ned
from collections import OrderedDict
from dataset import BaseDataset
from utils_torch_fil... |
mbrossar/ai-imu-dr | https://github.com/mbrossar/ai-imu-dr | null | null | null | null | 977 | null | null | mit | null | null | null | null | null | null | null | src/utils_numpy_filter.py | null | null | null | null | null | null | Python | 2026-05-04T01:36:31.811073 | import matplotlib.pyplot as plt
import numpy as np
np.set_printoptions(precision=2)
import scipy.linalg
from termcolor import cprint
from utils import *
class NUMPYIEKF:
Id2 = np.eye(2)
Id3 = np.eye(3)
Id6 = np.eye(6)
IdP = np.eye(21)
def __init__(self, parameter_class=None):
# variables... |
mbrossar/ai-imu-dr | https://github.com/mbrossar/ai-imu-dr | null | null | null | null | 977 | null | null | mit | null | null | null | null | null | null | null | src/utils_plot.py | null | null | null | null | null | null | Python | 2026-05-04T01:36:31.813689 | import matplotlib
import os
from termcolor import cprint
import matplotlib.pyplot as plt
import numpy as np
from itertools import chain
from utils import *
from utils_torch_filter import TORCHIEKF
def results_filter(args, dataset):
for i in range(0, len(dataset.datasets)):
plt.close('all')
dataset... |
mbrossar/ai-imu-dr | https://github.com/mbrossar/ai-imu-dr | null | null | null | null | 977 | null | null | mit | null | null | null | null | null | null | null | src/dataset.py | null | null | null | null | null | null | Python | 2026-05-04T01:36:31.814326 | from torch.utils.data.dataset import Dataset
import torch
import numpy as np
from termcolor import cprint
import pickle
import matplotlib.pyplot as plt
import os
from collections import OrderedDict
class BaseDataset(Dataset):
pickle_extension = ".p"
"""extension of the file saved in pickle format"""
file_... |
mbrossar/ai-imu-dr | https://github.com/mbrossar/ai-imu-dr | null | null | null | null | 977 | null | null | mit | null | null | null | null | null | null | null | src/utils.py | null | null | null | null | null | null | Python | 2026-05-04T01:36:32.608303 | import os
import numpy as np
import torch
import matplotlib.pyplot as plt
def prepare_data(args, dataset, dataset_name, i, idx_start=None, idx_end=None, to_numpy=False):
# get data
t, ang_gt, p_gt, v_gt, u = dataset.get_data(dataset_name)
# get start instant
if idx_start is None:
idx_start = ... |
giswqs/qgis-earthengine-examples | https://github.com/giswqs/qgis-earthengine-examples | null | null | null | null | 977 | null | null | mit | null | null | null | null | null | null | null | Algorithms/CloudMasking/landsat457_surface_reflectance.py | null | null | null | null | null | null | Python | 2026-05-04T01:36:35.149609 | import ee
from ee_plugin import Map
# This example demonstrates the use of the Landsat 4, 5 or 7
# surface reflectance QA band to mask clouds.
# cloudMaskL457 = function(image) {
def cloudMaskL457(image):
qa = image.select('pixel_qa')
# If the cloud bit (5) is set and the cloud confidence (7) is high
# or the... |
giswqs/qgis-earthengine-examples | https://github.com/giswqs/qgis-earthengine-examples | null | null | null | null | 977 | null | null | mit | null | null | null | null | null | null | null | Algorithms/CloudMasking/landsat8_surface_reflectance-copy.py | null | null | null | null | null | null | Python | 2026-05-04T01:36:35.150574 | import ee
from ee_plugin import Map
# This example demonstrates the use of the pixel QA band to mask
# clouds in surface reflectance (SR) data. It is suitable
# for use with any of the Landsat SR datasets.
# Function to cloud mask from the pixel_qa band of Landsat 8 SR data.
# function maskL8sr(image) {
def maskL8... |
giswqs/qgis-earthengine-examples | https://github.com/giswqs/qgis-earthengine-examples | null | null | null | null | 977 | null | null | mit | null | null | null | null | null | null | null | Algorithms/Segmentation/segmentation_snic.py | null | null | null | null | null | null | Python | 2026-05-04T01:36:35.153175 | # # GitHub URL: https://github.com/giswqs/qgis-earthengine-examples/tree/master/Algorithms/Segmentation/segmentation_snic.py
# import ee
# from ee_plugin import Map
# imageCollection = ee.ImageCollection("USDA/NAIP/DOQQ"),
# geometry = ee.Geometry.Polygon(
# [[[-121.89511299133301, 38.98496606984683],
# ... |
giswqs/qgis-earthengine-examples | https://github.com/giswqs/qgis-earthengine-examples | null | null | null | null | 977 | null | null | mit | null | null | null | null | null | null | null | Algorithms/center_pivot_irrigation_detector.py | null | null | null | null | null | null | Python | 2026-05-04T01:36:35.154668 | import ee
from ee_plugin import Map
# Center-pivot Irrigation Detector.
#
# Finds circles that are 500m in radius.
Map.setCenter(-106.06, 37.71, 12)
# A nice NDVI palette.
palette = [
'FFFFFF', 'CE7E45', 'DF923D', 'F1B555', 'FCD163', '99B718',
'74A901', '66A000', '529400', '3E8601', '207401', '056201',
'004C0... |
giswqs/qgis-earthengine-examples | https://github.com/giswqs/qgis-earthengine-examples | null | null | null | null | 977 | null | null | mit | null | null | null | null | null | null | null | Algorithms/CloudMasking/landsat8_toa_reflectance_qa_band.py | null | null | null | null | null | null | Python | 2026-05-04T01:36:35.156016 | import ee
from ee_plugin import Map
# This example demonstrates the use of the Landsat 8 QA band to mask clouds.
# Function to mask clouds using the quality band of Landsat 8.
# maskL8 = function(image) {
def maskL8(image):
qa = image.select('BQA')
#/ Check that the cloud bit is off.
# See https:#www.usgs.gov... |
giswqs/qgis-earthengine-examples | https://github.com/giswqs/qgis-earthengine-examples | null | null | null | null | 977 | null | null | mit | null | null | null | null | null | null | null | Algorithms/CloudMasking/sentinel-2.py | null | null | null | null | null | null | Python | 2026-05-04T01:36:35.157494 | import ee
from ee_plugin import Map
# This example uses the Sentinel-2 QA band to cloud mask
# the collection. The Sentinel-2 cloud flags are less
# selective, so the collection is also pre-filtered by the
# CLOUDY_PIXEL_PERCENTAGE flag, to use only relatively
# cloud-free granule.
# Function to mask clouds using ... |
giswqs/qgis-earthengine-examples | https://github.com/giswqs/qgis-earthengine-examples | null | null | null | null | 977 | null | null | mit | null | null | null | null | null | null | null | Algorithms/landsat_radiance.py | null | null | null | null | null | null | Python | 2026-05-04T01:36:35.158461 | import ee
from ee_plugin import Map
# Load a raw Landsat scene and display it.
raw = ee.Image('LANDSAT/LC08/C01/T1/LC08_044034_20140318')
Map.centerObject(raw, 10)
Map.addLayer(raw, {'bands': ['B4', 'B3', 'B2'], 'min': 6000, 'max': 12000}, 'raw')
# Convert the raw data to radiance.
radiance = ee.Algorithms.Landsat.... |
giswqs/qgis-earthengine-examples | https://github.com/giswqs/qgis-earthengine-examples | null | null | null | null | 977 | null | null | mit | null | null | null | null | null | null | null | Algorithms/landsat_path_row_limit.py | null | null | null | null | null | null | Python | 2026-05-04T01:36:35.159578 | # GitHub URL: https://github.com/giswqs/qgis-earthengine-examples/tree/master/Algorithms/landsat_path_row_limit.py
import ee
from ee_plugin import Map
point = ee.Geometry.Point(-98.7011, 47.2624)
collection = ee.ImageCollection('LANDSAT/LC8_L1T_TOA') \
.filterBounds(point) \
.filterDate('2016-01-01', '2018-12-3... |
giswqs/qgis-earthengine-examples | https://github.com/giswqs/qgis-earthengine-examples | null | null | null | null | 977 | null | null | mit | null | null | null | null | null | null | null | Algorithms/CloudMasking/modis_surface_reflectance_qa_band.py | null | null | null | null | null | null | Python | 2026-05-04T01:36:35.160444 | import ee
from ee_plugin import Map
# Modis Cloud Masking example.
# Calculate how frequently a location is labeled as clear (i.e. non-cloudy)
# according to the "internal cloud algorithm flag" of the MODIS "state 1km"
# QA band.
# A function to mask out pixels that did not have observations.
# maskEmptyPixels = fu... |
giswqs/qgis-earthengine-examples | https://github.com/giswqs/qgis-earthengine-examples | null | null | null | null | 977 | null | null | mit | null | null | null | null | null | null | null | Algorithms/landsat_cloud_score.py | null | null | null | null | null | null | Python | 2026-05-04T01:36:36.151285 | import ee
from ee_plugin import Map
# Load a cloudy Landsat scene and display it.
cloudy_scene = ee.Image('LANDSAT/LC08/C01/T1_TOA/LC08_044034_20140926')
Map.centerObject(cloudy_scene)
Map.addLayer(cloudy_scene, {'bands': ['B4', 'B3', 'B2'], 'max': 0.4}, 'TOA', False)
# Add a cloud score band. It is automatically ... |
giswqs/qgis-earthengine-examples | https://github.com/giswqs/qgis-earthengine-examples | null | null | null | null | 977 | null | null | mit | null | null | null | null | null | null | null | Array/decorrelation_stretch.py | null | null | null | null | null | null | Python | 2026-05-04T01:36:36.888628 | import ee
from ee_plugin import Map
# Decorrelation Stretch
def dcs(image, region, scale):
# function dcs(image, region, scale) {
bandNames = image.bandNames()
# The axes are numbered, so to make the following code more
# readable, give the axes names.
imageAxis = 0
bandAxis = 1
# Compute the mean of ... |
giswqs/qgis-earthengine-examples | https://github.com/giswqs/qgis-earthengine-examples | null | null | null | null | 977 | null | null | mit | null | null | null | null | null | null | null | Array/eigen_analysis.py | null | null | null | null | null | null | Python | 2026-05-04T01:36:37.677681 | # GitHub URL: https://github.com/giswqs/qgis-earthengine-examples/tree/master/Array/eigen_analysis.py
import ee
from ee_plugin import Map
# Compute the Principal Components of a Landsat 8 image.
# Load a landsat 8 image, select the bands of interest.
image = ee.Image('LANDSAT/LC8_L1T/LC80440342014077LGN00') \
... |
giswqs/qgis-earthengine-examples | https://github.com/giswqs/qgis-earthengine-examples | null | null | null | null | 977 | null | null | mit | null | null | null | null | null | null | null | Array/linear_regression.py | null | null | null | null | null | null | Python | 2026-05-04T01:36:38.806103 | import ee
from ee_plugin import Map
# Simple regression of year versus NDVI.
# Define the start date and position to get images covering Montezuma Castle,
# Arizona, from 2000-2010.
start = '2000-01-01'
end = '2010-01-01'
lng = -111.83533
lat = 34.57499
region = ee.Geometry.Point(lng, lat)
# Filter to Landsat 7 im... |
giswqs/qgis-earthengine-examples | https://github.com/giswqs/qgis-earthengine-examples | null | null | null | null | 977 | null | null | mit | null | null | null | null | null | null | null | Array/quality_mosaic.py | null | null | null | null | null | null | Python | 2026-05-04T01:36:39.946446 | import ee
from ee_plugin import Map
# Array-based quality mosaic.
# Returns a mosaic built by sorting each stack of pixels by the first band
# in descending order, and taking the highest quality pixel.
# function qualityMosaic(bands) {
def qualityMosaic(bands):
# Convert to an array, and declare names for the axe... |
giswqs/qgis-earthengine-examples | https://github.com/giswqs/qgis-earthengine-examples | null | null | null | null | 977 | null | null | mit | null | null | null | null | null | null | null | Array/spectral_unmixing.py | null | null | null | null | null | null | Python | 2026-05-04T01:36:40.643906 | import ee
from ee_plugin import Map
# Array-based spectral unmixing.
# Create a mosaic of Landsat 5 images from June through September, 2007.
allBandMosaic = ee.ImageCollection('LANDSAT/LT05/C01/T1') \
.filterDate('2007-06-01', '2007-09-30') \
.select('B[0-7]') \
.median()
# Create some representative endmem... |
giswqs/qgis-earthengine-examples | https://github.com/giswqs/qgis-earthengine-examples | null | null | null | null | 977 | null | null | mit | null | null | null | null | null | null | null | Algorithms/landsat_surface_reflectance.py | null | null | null | null | null | null | Python | 2026-05-04T01:36:40.775710 | import ee
from ee_plugin import Map
# You can access pre-computed surface reflectance images directly from the SR collections. For example, to load a Landsat 7 surface reflectance image, use:
srImage = ee.Image('LANDSAT/LE07/C01/T1_SR/LE07_044034_19990707')
# The surface reflectance datasets for Collection 1 Landsa... |
giswqs/qgis-earthengine-examples | https://github.com/giswqs/qgis-earthengine-examples | null | null | null | null | 977 | null | null | mit | null | null | null | null | null | null | null | Algorithms/resampling.py | null | null | null | null | null | null | Python | 2026-05-04T01:36:40.788871 | import ee
from ee_plugin import Map
# Load a Landsat image over San Francisco, California, UAS.
landsat = ee.Image('LANDSAT/LC08/C01/T1_TOA/LC08_044034_20160323')
# Set display and visualization parameters.
Map.setCenter(-122.37383, 37.6193, 15)
visParams = {'bands': ['B4', 'B3', 'B2'], 'max': 0.3}
# Display the L... |
giswqs/qgis-earthengine-examples | https://github.com/giswqs/qgis-earthengine-examples | null | null | null | null | 977 | null | null | mit | null | null | null | null | null | null | null | Algorithms/landsat_simple_composite.py | null | null | null | null | null | null | Python | 2026-05-04T01:36:40.790848 | import ee
from ee_plugin import Map
# Load a raw Landsat 5 ImageCollection for a single year.
collection = ee.ImageCollection('LANDSAT/LT05/C01/T1') \
.filterDate('2010-01-01', '2010-12-31')
# Create a cloud-free composite with default parameters.
composite = ee.Algorithms.Landsat.simpleComposite(collection)
#... |
giswqs/qgis-earthengine-examples | https://github.com/giswqs/qgis-earthengine-examples | null | null | null | null | 977 | null | null | mit | null | null | null | null | null | null | null | Array/array_transformations.py | null | null | null | null | null | null | Python | 2026-05-04T01:36:40.795872 | import ee
from ee_plugin import Map
import math
# This function masks the input with a threshold on the simple cloud score.
def cloudMask(img):
cloudscore = ee.Algorithms.Landsat.simpleCloudScore(img).select('cloud')
return img.updateMask(cloudscore.lt(50))
# cloudMask = function(img) {
# cloudscore = ee.Algo... |
giswqs/qgis-earthengine-examples | https://github.com/giswqs/qgis-earthengine-examples | null | null | null | null | 977 | null | null | mit | null | null | null | null | null | null | null | Algorithms/reduce_resolution.py | null | null | null | null | null | null | Python | 2026-05-04T01:36:40.841032 | import ee
from ee_plugin import Map
# Load a MODIS EVI image.
modis = ee.Image(ee.ImageCollection('MODIS/006/MOD13A1').first()) \
.select('EVI')
# Display the EVI image near La Honda, California.
Map.setCenter(-122.3616, 37.5331, 12)
Map.addLayer(modis, {'min': 2000, 'max': 5000}, 'MODIS EVI')
# Get informatio... |
giswqs/qgis-earthengine-examples | https://github.com/giswqs/qgis-earthengine-examples | null | null | null | null | 977 | null | null | mit | null | null | null | null | null | null | null | Algorithms/ntl_linear_fit.py | null | null | null | null | null | null | Python | 2026-05-04T01:36:40.852316 | import ee
from ee_plugin import Map
# Compute the trend of nighttime lights from DMSP.
# Add a band containing image date as years since 1990.
def createTimeBand(img):
year = img.date().difference(ee.Date('1990-01-01'), 'year')
return ee.Image(year).float().addBands(img)
# function createTimeBand(img) {
# ye... |
giswqs/qgis-earthengine-examples | https://github.com/giswqs/qgis-earthengine-examples | null | null | null | null | 977 | null | null | mit | null | null | null | null | null | null | null | Array/array_images.py | null | null | null | null | null | null | Python | 2026-05-04T01:36:40.886204 | import ee
from ee_plugin import Map
# Define an Array of Tasseled Cap coefficients.
coefficients = ee.Array([
[0.3037, 0.2793, 0.4743, 0.5585, 0.5082, 0.1863],
[-0.2848, -0.2435, -0.5436, 0.7243, 0.0840, -0.1800],
[0.1509, 0.1973, 0.3279, 0.3406, -0.7112, -0.4572],
[-0.8242, 0.0849, 0.4392, -0.0580, 0.2012, ... |
giswqs/qgis-earthengine-examples | https://github.com/giswqs/qgis-earthengine-examples | null | null | null | null | 977 | null | null | mit | null | null | null | null | null | null | null | Algorithms/sentinel-1_filtering.py | null | null | null | null | null | null | Python | 2026-05-04T01:36:40.905791 | import ee
from ee_plugin import Map
# Load the Sentinel-1 ImageCollection.
sentinel1 = ee.ImageCollection('COPERNICUS/S1_GRD') \
.filterBounds(ee.Geometry.Point(-122.37383, 37.6193))
# Filter by metadata properties.
vh = sentinel1 \
.filter(ee.Filter.listContains('transmitterReceiverPolarisation', 'VV')) \
... |
giswqs/qgis-earthengine-examples | https://github.com/giswqs/qgis-earthengine-examples | null | null | null | null | 977 | null | null | mit | null | null | null | null | null | null | null | Array/array_sorting.py | null | null | null | null | null | null | Python | 2026-05-04T01:36:40.948297 | import ee
from ee_plugin import Map
# Define an arbitrary region of interest as a point.
roi = ee.Geometry.Point(-122.26032, 37.87187)
# Use these bands.
bandNames = ee.List(['B2', 'B3', 'B4', 'B5', 'B6', 'B7', 'B10', 'B11'])
# Load a Landsat 8 collection.
collection = ee.ImageCollection('LANDSAT/LC08/C01/T1_TOA')... |
giswqs/qgis-earthengine-examples | https://github.com/giswqs/qgis-earthengine-examples | null | null | null | null | 977 | null | null | mit | null | null | null | null | null | null | null | AssetManagement/export_FeatureCollection.py | null | null | null | null | null | null | Python | 2026-05-04T01:36:41.205780 | import ee
from ee_plugin import Map
fromFT = ee.FeatureCollection('ft:1CLldB-ULPyULBT2mxoRNv7enckVF0gCQoD2oH7XP')
polys = fromFT.geometry()
centroid = polys.centroid()
lng, lat = centroid.getInfo()['coordinates']
print("lng = {}, lat = {}".format(lng, lat))
Map.setCenter(lng, lat, 10)
Map.addLayer(fromFT)
taskParam... |
giswqs/qgis-earthengine-examples | https://github.com/giswqs/qgis-earthengine-examples | null | null | null | null | 977 | null | null | mit | null | null | null | null | null | null | null | AssetManagement/export_ImageCollection.py | null | null | null | null | null | null | Python | 2026-05-04T01:36:41.329974 | import ee
from ee_plugin import Map
# USDA NAIP ImageCollection
collection = ee.ImageCollection('USDA/NAIP/DOQQ')
# create an roi
polys = ee.Geometry.Polygon(
[[[-99.29615020751953, 46.725459351792374],
[-99.2116928100586, 46.72404725733022],
[-99.21443939208984, 46.772037733479884],
... |
giswqs/qgis-earthengine-examples | https://github.com/giswqs/qgis-earthengine-examples | null | null | null | null | 977 | null | null | mit | null | null | null | null | null | null | null | AssetManagement/export_csv.py | null | null | null | null | null | null | Python | 2026-05-04T01:36:41.378913 | import os, ee, datetime, csv, time
startTime = datetime.datetime(2001, 1, 1)
endTime = datetime.datetime(2001, 2, 1)
lst = ee.ImageCollection('FORA0125_H002').filterDate(startTime, endTime)
# Get the time series at these points.
points = [ee.Geometry.Point(-85.16516, 30.850000000000001)]
collection = ee.FeatureCol... |
giswqs/qgis-earthengine-examples | https://github.com/giswqs/qgis-earthengine-examples | null | null | null | null | 977 | null | null | mit | null | null | null | null | null | null | null | AssetManagement/export_raster.py | null | null | null | null | null | null | Python | 2026-05-04T01:36:41.385603 | import ee
from ee_plugin import Map
collection = ee.ImageCollection('USDA/NAIP/DOQQ')
polys = ee.Geometry.Polygon(
[[[-99.29615020751953, 46.725459351792374],
[-99.2116928100586, 46.72404725733022],
[-99.21443939208984, 46.772037733479884],
[-99.30267333984375, 46.7732134341993... |
giswqs/qgis-earthengine-examples | https://github.com/giswqs/qgis-earthengine-examples | null | null | null | null | 977 | null | null | mit | null | null | null | null | null | null | null | AssetManagement/export_vector.py | null | null | null | null | null | null | Python | 2026-05-04T01:36:41.438441 | import os, ee, datetime, csv, time
startTime = datetime.datetime(2001, 1, 1)
endTime = datetime.datetime(2001, 2, 1)
lst = ee.ImageCollection('FORA0125_H002').filterDate(startTime, endTime)
# Get the time series at these points.
points = [ee.Geometry.Point(-85.16516, 30.850000000000001)]
collection = ee.FeatureCol... |
giswqs/qgis-earthengine-examples | https://github.com/giswqs/qgis-earthengine-examples | null | null | null | null | 977 | null | null | mit | null | null | null | null | null | null | null | AssetManagement/export_TimeSeries.py | null | null | null | null | null | null | Python | 2026-05-04T01:36:41.457229 | # from IPython.display import Image
import ee
# define the geometry
geometry = ee.Geometry.Polygon([[116.49078369140625, 39.82219623803342],
[116.49456024169922, 39.763105626443306],
[116.57455444335938, 39.76336953661037],
... |
giswqs/qgis-earthengine-examples | https://github.com/giswqs/qgis-earthengine-examples | null | null | null | null | 977 | null | null | mit | null | null | null | null | null | null | null | AssetManagement/exporting_data.py | null | null | null | null | null | null | Python | 2026-05-04T01:36:41.461258 | import ee
from ee_plugin import Map
image = ee.Image('USDA/NAIP/DOQQ/m_4609915_sw_14_1_20100629')
# downConfig = {'scale':30, "maxPixels": 1.0E13, 'driveFolder':'test', 'CRS': 'EPGS:31983', 'region': roiExample }
#
# task = ee.batch.Export.image(image.select( ['B2', 'B3' ,'B4', 'B5', 'B6']).toDouble(), 'sirgas2002... |
giswqs/qgis-earthengine-examples | https://github.com/giswqs/qgis-earthengine-examples | null | null | null | null | 977 | null | null | mit | null | null | null | null | null | null | null | AssetManagement/export_TimeSeries2.py | null | null | null | null | null | null | Python | 2026-05-04T01:36:41.483407 | from functools import reduce
import ee
ee.Initialize();
# samples = ee.FeatureCollection("ft:1_8mT4yfCqVfVMr9zykhdXszdjxcpxtUSA6F2KqyZ");
samples = ee.FeatureCollection(ee.Geometry.MultiPoint([[116.49078369140625, 39.82219623803342],
[116.49456024169922, 39.7631... |
giswqs/qgis-earthengine-examples | https://github.com/giswqs/qgis-earthengine-examples | null | null | null | null | 977 | null | null | mit | null | null | null | null | null | null | null | Basemaps/qgis_basemaps.py | null | null | null | null | null | null | Python | 2026-05-04T01:36:41.629578 | """
This script should be run from the Python consol inside QGIS.
It adds online sources to the QGIS Browser.
Each source should contain a list with the folowing items (string type):
[sourcetype, title, authconfig, password, referer, url, username, zmax, zmin]
You can add or remove sources from the sources section of... |
giswqs/qgis-earthengine-examples | https://github.com/giswqs/qgis-earthengine-examples | null | null | null | null | 977 | null | null | mit | null | null | null | null | null | null | null | AssetManagement/export_table.py | null | null | null | null | null | null | Python | 2026-05-04T01:36:41.646397 | import ee
from ee_plugin import Map
fromFT = ee.FeatureCollection('ft:1CLldB-ULPyULBT2mxoRNv7enckVF0gCQoD2oH7XP')
polys = fromFT.geometry()
centroid = polys.centroid()
lng, lat = centroid.getInfo()['coordinates']
# print("lng = {}, lat = {}".format(lng, lat))
# Map.setCenter(lng, lat, 10)
# Map.addLayer(fromFT)
cou... |
giswqs/qgis-earthengine-examples | https://github.com/giswqs/qgis-earthengine-examples | null | null | null | null | 977 | null | null | mit | null | null | null | null | null | null | null | Datasets/Terrain/alos_chili.py | null | null | null | null | null | null | Python | 2026-05-04T01:36:41.758783 | import ee
from ee_plugin import Map
dataset = ee.Image('CSP/ERGo/1_0/Global/ALOS_CHILI')
alosChili = dataset.select('constant')
alosChiliVis = {
'min': 0.0,
'max': 255.0,
}
Map.setCenter(-105.8636, 40.3439, 11)
Map.addLayer(alosChili, alosChiliVis, 'ALOS CHILI')
|
giswqs/qgis-earthengine-examples | https://github.com/giswqs/qgis-earthengine-examples | null | null | null | null | 977 | null | null | mit | null | null | null | null | null | null | null | Datasets/Terrain/alos_global_dsm.py | null | null | null | null | null | null | Python | 2026-05-04T01:36:41.906434 | import ee
from ee_plugin import Map
dataset = ee.Image('JAXA/ALOS/AW3D30_V1_1')
elevation = dataset.select('AVE')
elevationVis = {
'min': 0.0,
'max': 4000.0,
'palette': ['0000ff', '00ffff', 'ffff00', 'ff0000', 'ffffff'],
}
Map.setCenter(136.85, 37.37, 4)
Map.addLayer(elevation, elevationVis, 'Elevation')
|
giswqs/qgis-earthengine-examples | https://github.com/giswqs/qgis-earthengine-examples | null | null | null | null | 977 | null | null | mit | null | null | null | null | null | null | null | Datasets/Terrain/alos_mtpi.py | null | null | null | null | null | null | Python | 2026-05-04T01:36:41.934162 | import ee
from ee_plugin import Map
dataset = ee.Image('CSP/ERGo/1_0/Global/ALOS_mTPI')
alosMtpi = dataset.select('AVE')
alosMtpiVis = {
'min': -200.0,
'max': 200.0,
'palette': ['0b1eff', '4be450', 'fffca4', 'ffa011', 'ff0000'],
}
Map.setCenter(-105.8636, 40.3439, 11)
Map.addLayer(alosMtpi, alosMtpiVis, 'ALOS ... |
giswqs/qgis-earthengine-examples | https://github.com/giswqs/qgis-earthengine-examples | null | null | null | null | 977 | null | null | mit | null | null | null | null | null | null | null | Datasets/Terrain/alos_landforms.py | null | null | null | null | null | null | Python | 2026-05-04T01:36:41.935347 | import ee
from ee_plugin import Map
dataset = ee.Image('CSP/ERGo/1_0/Global/ALOS_landforms')
landforms = dataset.select('constant')
landformsVis = {
'min': 11.0,
'max': 42.0,
'palette': [
'141414', '383838', '808080', 'EBEB8F', 'F7D311', 'AA0000', 'D89382',
'DDC9C9', 'DCCDCE', '1C6330', '68AA63', 'B5C9... |
giswqs/qgis-earthengine-examples | https://github.com/giswqs/qgis-earthengine-examples | null | null | null | null | 977 | null | null | mit | null | null | null | null | null | null | null | Datasets/Terrain/canada_dem.py | null | null | null | null | null | null | Python | 2026-05-04T01:36:42.027469 | import ee
from ee_plugin import Map
dataset = ee.ImageCollection('NRCan/CDEM')
elevation = dataset.select('elevation').mosaic()
elevationVis = {
'min': -50.0,
'max': 1500.0,
'palette': ['0905ff', 'ffefc4', 'ffffff'],
}
Map.setCenter(-139.3643, 63.3213, 9)
Map.addLayer(elevation, elevationVis, 'Elevation')
|
giswqs/qgis-earthengine-examples | https://github.com/giswqs/qgis-earthengine-examples | null | null | null | null | 977 | null | null | mit | null | null | null | null | null | null | null | Datasets/Terrain/alos_topo_diversity.py | null | null | null | null | null | null | Python | 2026-05-04T01:36:42.037264 | import ee
from ee_plugin import Map
dataset = ee.Image('CSP/ERGo/1_0/Global/ALOS_topoDiversity')
alosTopographicDiversity = dataset.select('constant')
alosTopographicDiversityVis = {
'min': 0.0,
'max': 1.0,
}
Map.setCenter(-111.313, 39.724, 6)
Map.addLayer(
alosTopographicDiversity, alosTopographicDiversityV... |
giswqs/qgis-earthengine-examples | https://github.com/giswqs/qgis-earthengine-examples | null | null | null | null | 977 | null | null | mit | null | null | null | null | null | null | null | Datasets/Terrain/hydrosheds_dem.py | null | null | null | null | null | null | Python | 2026-05-04T01:36:42.039824 | import ee
from ee_plugin import Map
dataset = ee.Image('WWF/HydroSHEDS/03CONDEM')
elevation = dataset.select('b1')
elevationVis = {
'min': -50.0,
'max': 3000.0,
'gamma': 2.0,
}
Map.setCenter(-121.652, 38.022, 8)
Map.addLayer(elevation, elevationVis, 'Elevation')
dataset = ee.Image('WWF/HydroSHEDS/03VFDEM')
e... |
giswqs/qgis-earthengine-examples | https://github.com/giswqs/qgis-earthengine-examples | null | null | null | null | 977 | null | null | mit | null | null | null | null | null | null | null | Datasets/Terrain/srtm.py | null | null | null | null | null | null | Python | 2026-05-04T01:36:42.154604 | import ee
from ee_plugin import Map
image = ee.Image('srtm90_v4')
# path = image.getDownloadUrl({
# 'scale': 30,
# 'crs': 'EPSG:4326',
# 'region': '[[-120, 35], [-119, 35], [-119, 34], [-120, 34]]'
# })
vis_params = {'min': 0, 'max': 3000}
Map.addLayer(image, vis_params, 'SRTM') |
giswqs/qgis-earthengine-examples | https://github.com/giswqs/qgis-earthengine-examples | null | null | null | null | 977 | null | null | mit | null | null | null | null | null | null | null | Datasets/Terrain/srtm_chili.py | null | null | null | null | null | null | Python | 2026-05-04T01:36:42.317870 | import ee
from ee_plugin import Map
dataset = ee.Image('CSP/ERGo/1_0/Global/SRTM_CHILI')
srtmChili = dataset.select('constant')
srtmChiliVis = {
'min': 0.0,
'max': 255.0,
}
Map.setCenter(-105.8636, 40.3439, 11)
Map.addLayer(srtmChili, srtmChiliVis, 'SRTM CHILI')
|
giswqs/qgis-earthengine-examples | https://github.com/giswqs/qgis-earthengine-examples | null | null | null | null | 977 | null | null | mit | null | null | null | null | null | null | null | Datasets/Terrain/srtm_mtpi.py | null | null | null | null | null | null | Python | 2026-05-04T01:36:42.328685 | import ee
from ee_plugin import Map
dataset = ee.Image('CSP/ERGo/1_0/Global/SRTM_mTPI')
srtmMtpi = dataset.select('elevation')
srtmMtpiVis = {
'min': -200.0,
'max': 200.0,
'palette': ['0b1eff', '4be450', 'fffca4', 'ffa011', 'ff0000'],
}
Map.setCenter(-105.8636, 40.3439, 11)
Map.addLayer(srtmMtpi, srtmMtpiVis, ... |
giswqs/qgis-earthengine-examples | https://github.com/giswqs/qgis-earthengine-examples | null | null | null | null | 977 | null | null | mit | null | null | null | null | null | null | null | Datasets/Terrain/srtm_landforms.py | null | null | null | null | null | null | Python | 2026-05-04T01:36:42.411121 | import ee
from ee_plugin import Map
dataset = ee.Image('CSP/ERGo/1_0/Global/SRTM_landforms')
landforms = dataset.select('constant')
landformsVis = {
'min': 11.0,
'max': 42.0,
'palette': [
'141414', '383838', '808080', 'EBEB8F', 'F7D311', 'AA0000', 'D89382',
'DDC9C9', 'DCCDCE', '1C6330', '68AA63', 'B5C9... |
giswqs/qgis-earthengine-examples | https://github.com/giswqs/qgis-earthengine-examples | null | null | null | null | 977 | null | null | mit | null | null | null | null | null | null | null | Datasets/Terrain/us_lithology.py | null | null | null | null | null | null | Python | 2026-05-04T01:36:42.482957 | import ee
from ee_plugin import Map
dataset = ee.Image('CSP/ERGo/1_0/US/lithology')
lithology = dataset.select('b1')
lithologyVis = {
'min': 0.0,
'max': 20.0,
'palette': [
'356EFF', 'ACB6DA', 'D6B879', '313131', 'EDA800', '616161', 'D6D6D6',
'D0DDAE', 'B8D279', 'D5D378', '141414', '6DB155', '9B6D55', '... |
giswqs/qgis-earthengine-examples | https://github.com/giswqs/qgis-earthengine-examples | null | null | null | null | 977 | null | null | mit | null | null | null | null | null | null | null | Datasets/Terrain/srtm_topo_diversity.py | null | null | null | null | null | null | Python | 2026-05-04T01:36:42.489338 | import ee
from ee_plugin import Map
dataset = ee.Image('CSP/ERGo/1_0/Global/SRTM_topoDiversity')
srtmTopographicDiversity = dataset.select('constant')
srtmTopographicDiversityVis = {
'min': 0.0,
'max': 1.0,
}
Map.setCenter(-111.313, 39.724, 6)
Map.addLayer(
srtmTopographicDiversity, srtmTopographicDiversityV... |
giswqs/qgis-earthengine-examples | https://github.com/giswqs/qgis-earthengine-examples | null | null | null | null | 977 | null | null | mit | null | null | null | null | null | null | null | Datasets/Terrain/us_ned_chili.py | null | null | null | null | null | null | Python | 2026-05-04T01:36:42.594590 | import ee
from ee_plugin import Map
dataset = ee.Image('CSP/ERGo/1_0/US/CHILI')
usChili = dataset.select('constant')
usChiliVis = {
'min': 0.0,
'max': 255.0,
}
Map.setCenter(-105.8636, 40.3439, 11)
Map.addLayer(usChili, usChiliVis, 'US CHILI')
|
giswqs/qgis-earthengine-examples | https://github.com/giswqs/qgis-earthengine-examples | null | null | null | null | 977 | null | null | mit | null | null | null | null | null | null | null | Datasets/Terrain/us_ned_landforms.py | null | null | null | null | null | null | Python | 2026-05-04T01:36:42.595203 | import ee
from ee_plugin import Map
dataset = ee.Image('CSP/ERGo/1_0/US/landforms')
landforms = dataset.select('constant')
landformsVis = {
'min': 11.0,
'max': 42.0,
'palette': [
'141414', '383838', '808080', 'EBEB8F', 'F7D311', 'AA0000', 'D89382',
'DDC9C9', 'DCCDCE', '1C6330', '68AA63', 'B5C98E', 'E1F... |
giswqs/qgis-earthengine-examples | https://github.com/giswqs/qgis-earthengine-examples | null | null | null | null | 977 | null | null | mit | null | null | null | null | null | null | null | Datasets/Terrain/us_ned.py | null | null | null | null | null | null | Python | 2026-05-04T01:36:42.602098 | import ee
from ee_plugin import Map
dataset = ee.Image('USGS/NED')
elevation = dataset.select('elevation')
elevationVis = {
'min': 0.0,
'max': 4000.0,
'gamma': 1.6,
}
Map.setCenter(-100.55, 40.71, 5)
Map.addLayer(elevation, elevationVis, 'Elevation')
|
ezyang/ghstack | https://github.com/ezyang/ghstack | null | null | null | null | 977 | null | null | mit | null | null | null | null | null | null | null | src/ghstack/cherry_pick.py | null | null | null | null | null | null | Python | 2026-05-04T01:36:44.629211 | #!/usr/bin/env python3
import logging
import re
import ghstack.github
import ghstack.github_utils
import ghstack.shell
def main(
pull_request: str,
github: ghstack.github.GitHubEndpoint,
sh: ghstack.shell.Shell,
remote_name: str,
stack: bool = False,
) -> None:
params = ghstack.github_utils... |
ezyang/ghstack | https://github.com/ezyang/ghstack | null | null | null | null | 977 | null | null | mit | null | null | null | null | null | null | null | src/ghstack/action.py | null | null | null | null | null | null | Python | 2026-05-04T01:36:44.630951 | #!/usr/bin/env python3
import logging
from typing import Optional
import ghstack.github
import ghstack.github_utils
import ghstack.shell
def main(
pull_request: str,
github: ghstack.github.GitHubEndpoint,
sh: Optional[ghstack.shell.Shell] = None,
close: bool = False,
) -> None:
params = ghstack... |
ezyang/ghstack | https://github.com/ezyang/ghstack | null | null | null | null | 977 | null | null | mit | null | null | null | null | null | null | null | conftest.py | null | null | null | null | null | null | Python | 2026-05-04T01:36:44.643094 | # mypy: ignore-errors
import pathlib
import runpy
import expecttest
import ghstack.test_prelude
import pytest
# Adapted from https://stackoverflow.com/questions/56807698/how-to-run-script-as-pytest-test
def pytest_collect_file(file_path: pathlib.Path, parent):
# NB: script name must not end with py, due to ... |
ezyang/ghstack | https://github.com/ezyang/ghstack | null | null | null | null | 977 | null | null | mit | null | null | null | null | null | null | null | src/ghstack/checkout.py | null | null | null | null | null | null | Python | 2026-05-04T01:36:44.644312 | #!/usr/bin/env python3
import logging
import re
import ghstack.github
import ghstack.github_utils
import ghstack.shell
def main(
pull_request: str,
github: ghstack.github.GitHubEndpoint,
sh: ghstack.shell.Shell,
remote_name: str,
same_base: bool = False,
) -> None:
params = ghstack.github_u... |
ezyang/ghstack | https://github.com/ezyang/ghstack | null | null | null | null | 977 | null | null | mit | null | null | null | null | null | null | null | emitter.py | null | null | null | null | null | null | Python | 2026-05-04T01:36:44.645939 | #!/usr/bin/env python3
# Helper binary used by test_shell.py to print interleaved sequences
# of strings to stderr/stdout.
import itertools
import sys
from typing import Iterator, Sequence, Tuple, TypeVar
T = TypeVar("T")
def grouper(n: int, iterable: Sequence[T]) -> Iterator[Tuple[T, ...]]:
"grouper(3, 'ABCDE... |
ezyang/ghstack | https://github.com/ezyang/ghstack | null | null | null | null | 977 | null | null | mit | null | null | null | null | null | null | null | src/ghstack/circleci.py | null | null | null | null | null | null | Python | 2026-05-04T01:36:44.656316 | #!/usr/bin/env python3
from abc import ABCMeta, abstractmethod
from typing import Any
class CircleCIEndpoint(metaclass=ABCMeta):
async def get(self, path: str, **kwargs: Any) -> Any:
"""
Send a GET request to endpoint 'path'.
Returns: parsed JSON response
"""
return await... |
ezyang/ghstack | https://github.com/ezyang/ghstack | null | null | null | null | 977 | null | null | mit | null | null | null | null | null | null | null | src/ghstack/__init__.py | null | null | null | null | null | null | Python | 2026-05-04T01:36:44.657310 | #!/usr/bin/env python3
import sys
if sys.version_info >= (3, 8):
import importlib.metadata as importlib_metadata
else:
import importlib_metadata
__version__ = importlib_metadata.version("ghstack") # type: ignore[no-untyped-call]
|
ezyang/ghstack | https://github.com/ezyang/ghstack | null | null | null | null | 977 | null | null | mit | null | null | null | null | null | null | null | smoketest_cache.py | null | null | null | null | null | null | Python | 2026-05-04T01:36:44.659103 | import ghstack.cache
print(ghstack.cache.get("test", "foo"))
ghstack.cache.put("test", "foo", "bar")
print(ghstack.cache.get("test", "foo"))
|
ezyang/ghstack | https://github.com/ezyang/ghstack | null | null | null | null | 977 | null | null | mit | null | null | null | null | null | null | null | src/ghstack/cache.py | null | null | null | null | null | null | Python | 2026-05-04T01:36:44.689243 | #!/usr/bin/env python3
# A simple, key-value cache.
# - Concurrency safe
# - Handles eviction
import os
import sqlite3
from typing import Optional
_handle: Optional[sqlite3.Connection] = None
CACHE_SIZE = 1000
CURRENT_VERSION = 1
def _db_conn() -> sqlite3.Connection:
global _handle
fn = os.path.expanduser(... |
ezyang/ghstack | https://github.com/ezyang/ghstack | null | null | null | null | 977 | null | null | mit | null | null | null | null | null | null | null | src/ghstack/github.py | null | null | null | null | null | null | Python | 2026-05-04T01:36:45.647611 | #!/usr/bin/env python3
from abc import ABCMeta, abstractmethod
from typing import Any, Sequence
import ghstack.diff
class NotFoundError(RuntimeError):
pass
class GitHubEndpoint(metaclass=ABCMeta):
@abstractmethod
def graphql(self, query: str, **kwargs: Any) -> Any:
"""
Args:
... |
ezyang/ghstack | https://github.com/ezyang/ghstack | null | null | null | null | 977 | null | null | mit | null | null | null | null | null | null | null | src/ghstack/config.py | null | null | null | null | null | null | Python | 2026-05-04T01:36:45.648624 | #!/usr/bin/env python3
import configparser
import getpass
import logging
import os
import re
import shutil
import subprocess
from pathlib import Path
from typing import NamedTuple, Optional, Tuple
import requests
import ghstack.logs
DEFAULT_GHSTACKRC_PATH = Path.home() / ".ghstackrc"
GHSTACKRC_PATH_VAR = "GHSTACKRC... |
ezyang/ghstack | https://github.com/ezyang/ghstack | null | null | null | null | 977 | null | null | mit | null | null | null | null | null | null | null | src/ghstack/git.py | null | null | null | null | null | null | Python | 2026-05-04T01:36:45.649461 | #!/usr/bin/env python3
import re
from functools import cached_property
from typing import List, Pattern
import ghstack.diff
import ghstack.shell
from ghstack.types import GitCommitHash, GitTreeHash
RE_RAW_COMMIT_ID = re.compile(r"^(?P<boundary>-?)(?P<commit>[a-f0-9]+)$", re.MULTILINE)
RE_RAW_AUTHOR = re.compile(
... |
ezyang/ghstack | https://github.com/ezyang/ghstack | null | null | null | null | 977 | null | null | mit | null | null | null | null | null | null | null | src/ghstack/circleci_real.py | null | null | null | null | null | null | Python | 2026-05-04T01:36:45.653562 | #!/usr/bin/env python3
import json
import logging
import re
from typing import Any, Optional
import aiohttp
import ghstack.cache
import ghstack.circleci
RE_BUILD_PATH = re.compile(r"^project/github/[^/]+/[^/]+/[0-9]+$")
class RealCircleCIEndpoint(ghstack.circleci.CircleCIEndpoint):
rest_endpoint: str = "https... |
ezyang/ghstack | https://github.com/ezyang/ghstack | null | null | null | null | 977 | null | null | mit | null | null | null | null | null | null | null | src/ghstack/forensics.py | null | null | null | null | null | null | Python | 2026-05-04T01:36:45.654594 | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
# This script looks at all commits downloads their logs and prints them
# for you
import re
from typing import Any, Dict
import aiohttp
import ghstack.circleci
import ghstack.github
import ghstack.github_utils
RE_CIRCLECI_URL = re.compile(r"^https://circleci.com/gh/py... |
ezyang/ghstack | https://github.com/ezyang/ghstack | null | null | null | null | 977 | null | null | mit | null | null | null | null | null | null | null | src/ghstack/diff.py | null | null | null | null | null | null | Python | 2026-05-04T01:36:45.655912 | #!/usr/bin/env python3
import re
from dataclasses import dataclass
from typing import Optional, Pattern
from ghstack.types import GitHubNumber, GitTreeHash
RE_GH_METADATA = re.compile(
r"gh-metadata: (?P<owner>[^/]+) (?P<repo>[^/]+) (?P<number>[0-9]+) "
r"gh/(?P<username>[a-zA-Z0-9-]+)/(?P<ghnum>[0-9]+)/head... |
ezyang/ghstack | https://github.com/ezyang/ghstack | null | null | null | null | 977 | null | null | mit | null | null | null | null | null | null | null | src/ghstack/cli.py | null | null | null | null | null | null | Python | 2026-05-04T01:36:45.656910 | import asyncio
import contextlib
import sys
from typing import Generator, List, Optional, Tuple
import click
import ghstack
import ghstack.action
import ghstack.checkout
import ghstack.cherry_pick
import ghstack.circleci_real
import ghstack.config
import ghstack.github_real
import ghstack.land
import ghstack.log
impo... |
ezyang/ghstack | https://github.com/ezyang/ghstack | null | null | null | null | 977 | null | null | mit | null | null | null | null | null | null | null | src/ghstack/github_real.py | null | null | null | null | null | null | Python | 2026-05-04T01:36:45.658069 | #!/usr/bin/env python3
import json
import logging
import re
import time
from typing import Any, Dict, Optional, Sequence, Tuple, Union
import requests
import ghstack.github
MAX_RETRIES = 5
INITIAL_BACKOFF_SECONDS = 60
class RealGitHubEndpoint(ghstack.github.GitHubEndpoint):
"""
A class representing a GitH... |
ezyang/ghstack | https://github.com/ezyang/ghstack | null | null | null | null | 977 | null | null | mit | null | null | null | null | null | null | null | src/ghstack/github_fake.py | null | null | null | null | null | null | Python | 2026-05-04T01:36:45.659026 | #!/usr/bin/env python3
import dataclasses
import os.path
import re
from dataclasses import dataclass
from typing import Any, cast, Dict, List, NewType, Optional, Sequence
import graphql
from typing_extensions import TypedDict
import ghstack.diff
import ghstack.github
import ghstack.shell
GraphQLId = NewType("GraphQ... |
ezyang/ghstack | https://github.com/ezyang/ghstack | null | null | null | null | 977 | null | null | mit | null | null | null | null | null | null | null | src/ghstack/land.py | null | null | null | null | null | null | Python | 2026-05-04T01:36:46.566040 | #!/usr/bin/env python3
import logging
import re
from typing import List, Tuple
import ghstack.git
import ghstack.github
import ghstack.github_utils
import ghstack.shell
from ghstack.diff import PullRequestResolved
from ghstack.types import GitCommitHash
def lookup_pr_to_orig_ref_and_closed(
github: ghstack.gith... |
ezyang/ghstack | https://github.com/ezyang/ghstack | null | null | null | null | 977 | null | null | mit | null | null | null | null | null | null | null | src/ghstack/gpg_sign.py | null | null | null | null | null | null | Python | 2026-05-04T01:36:46.569042 | """This module determines if the commits need to be signed.
We need to do this manually, because ghstack uses commit-tree instead of commit.
commit-tree command doesn't pick up commit.gpgsign git config
The porcelain git behavior w.r.t. signing is
when both `commit.gpgsign` and `user.signingkey` are set, the commit i... |
ezyang/ghstack | https://github.com/ezyang/ghstack | null | null | null | null | 977 | null | null | mit | null | null | null | null | null | null | null | src/ghstack/logs.py | null | null | null | null | null | null | Python | 2026-05-04T01:36:46.593102 | #!/usr/bin/env python3
import contextlib
import datetime
import functools
import logging
import os
import re
import shutil
import subprocess
import sys
import uuid
from typing import Dict, Iterator, Optional
DATETIME_FORMAT = "%Y-%m-%d_%Hh%Mm%Ss"
RE_LOG_DIRNAME = re.compile(
r"(\d{4}-\d\d-\d\d_\d\dh\d\dm\d\ds)_... |
ezyang/ghstack | https://github.com/ezyang/ghstack | null | null | null | null | 977 | null | null | mit | null | null | null | null | null | null | null | src/ghstack/github_utils.py | null | null | null | null | null | null | Python | 2026-05-04T01:36:46.679030 | #!/usr/bin/env python3
import re
from typing import Optional
from typing_extensions import TypedDict
import ghstack.github
import ghstack.shell
from ghstack.types import GitHubRepositoryId
GitHubRepoNameWithOwner = TypedDict(
"GitHubRepoNameWithOwner",
{
"owner": str,
"name": str,
},
)
... |
ezyang/ghstack | https://github.com/ezyang/ghstack | null | null | null | null | 977 | null | null | mit | null | null | null | null | null | null | null | src/ghstack/types.py | null | null | null | null | null | null | Python | 2026-05-04T01:36:47.131436 | #!/usr/bin/env python3
from typing import NewType
# A bunch of commonly used type definitions.
PhabricatorDiffNumberWithD = NewType(
"PhabricatorDiffNumberWithD", str
) # aka "D1234567"
GitHubNumber = NewType("GitHubNumber", int) # aka 1234 (as in #1234)
# GraphQL ID that identifies Repository from GitHubb s... |
ezyang/ghstack | https://github.com/ezyang/ghstack | null | null | null | null | 977 | null | null | mit | null | null | null | null | null | null | null | src/ghstack/trailers.py | null | null | null | null | null | null | Python | 2026-05-04T01:36:47.163368 | #!/usr/bin/env python3
import re
from typing import List, Tuple
# Compile regexes once at module level for better performance
TRAILER_RE = re.compile(r"^([A-Za-z0-9_-]+)(\s*:\s*)(.*)$")
CONTINUATION_RE = re.compile(r"^\s+\S.*$")
# Git-generated trailer prefixes
GIT_GENERATED_PREFIXES = ["Signed-off-by: ", "(cherry p... |
ezyang/ghstack | https://github.com/ezyang/ghstack | null | null | null | null | 977 | null | null | mit | null | null | null | null | null | null | null | src/ghstack/unlink.py | null | null | null | null | null | null | Python | 2026-05-04T01:36:47.212231 | #!/usr/bin/env python3
import logging
import re
import textwrap
from typing import List, Optional, Set
import ghstack.diff
import ghstack.git
import ghstack.github
import ghstack.github_utils
import ghstack.gpg_sign
import ghstack.shell
from ghstack.types import GitCommitHash
RE_GHSTACK_SOURCE_ID = re.compile(r"^ghs... |
ezyang/ghstack | https://github.com/ezyang/ghstack | null | null | null | null | 977 | null | null | mit | null | null | null | null | null | null | null | test_shell.py | null | null | null | null | null | null | Python | 2026-05-04T01:36:47.262237 | #!/usr/bin/env python3
import logging
import sys
import unittest
from dataclasses import dataclass
from typing import Any, List
import expecttest
import ghstack.shell
@dataclass
class ConsoleMsg:
pass
@dataclass
class out(ConsoleMsg):
msg: str
@dataclass
class err(ConsoleMsg):
msg: str
@dataclass... |
ezyang/ghstack | https://github.com/ezyang/ghstack | null | null | null | null | 977 | null | null | mit | null | null | null | null | null | null | null | tools/linter/adapters/flake8_linter.py | null | null | null | null | null | null | Python | 2026-05-04T01:36:47.787118 | import argparse
import json
import logging
import os
import re
import subprocess
import sys
import time
from enum import Enum
from typing import Any, Dict, List, NamedTuple, Optional, Pattern, Set
IS_WINDOWS: bool = os.name == "nt"
def eprint(*args: Any, **kwargs: Any) -> None:
print(*args, file=sys.stderr, flu... |
ezyang/ghstack | https://github.com/ezyang/ghstack | null | null | null | null | 977 | null | null | mit | null | null | null | null | null | null | null | tools/linter/adapters/lintrunner_version_linter.py | null | null | null | null | null | null | Python | 2026-05-04T01:36:47.826014 | import json
import subprocess
import sys
from enum import Enum
from typing import NamedTuple, Optional, Tuple
LINTER_CODE = "LINTRUNNER_VERSION"
class LintSeverity(str, Enum):
ERROR = "error"
WARNING = "warning"
ADVICE = "advice"
DISABLED = "disabled"
class LintMessage(NamedTuple):
path: Optio... |
ezyang/ghstack | https://github.com/ezyang/ghstack | null | null | null | null | 977 | null | null | mit | null | null | null | null | null | null | null | tools/linter/adapters/mypy_linter.py | null | null | null | null | null | null | Python | 2026-05-04T01:36:47.826485 | import argparse
import json
import logging
import os
import re
import subprocess
import sys
import time
from enum import Enum
from pathlib import Path
from typing import Any, Dict, List, NamedTuple, Optional, Pattern
IS_WINDOWS: bool = os.name == "nt"
def eprint(*args: Any, **kwargs: Any) -> None:
print(*args, ... |
ezyang/ghstack | https://github.com/ezyang/ghstack | null | null | null | null | 977 | null | null | mit | null | null | null | null | null | null | null | tools/linter/adapters/ufmt_linter.py | null | null | null | null | null | null | Python | 2026-05-04T01:36:48.295337 | import argparse
import concurrent.futures
import json
import logging
import os
import sys
from enum import Enum
from pathlib import Path
from typing import Any, List, NamedTuple, Optional
from ufmt.core import ufmt_string
from ufmt.util import make_black_config
from usort import Config as UsortConfig
IS_WINDOWS: boo... |
ezyang/ghstack | https://github.com/ezyang/ghstack | null | null | null | null | 977 | null | null | mit | null | null | null | null | null | null | null | src/ghstack/status.py | null | null | null | null | null | null | Python | 2026-05-04T01:36:51.322382 | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
import asyncio
import logging
import re
import aiohttp
from typing_extensions import TypedDict
import ghstack.circleci
import ghstack.github
import ghstack.github_utils
RE_CIRCLECI_URL = re.compile(r"^https://circleci.com/gh/pytorch/pytorch/([0-9]+)")
def strip_sccac... |
ezyang/ghstack | https://github.com/ezyang/ghstack | null | null | null | null | 977 | null | null | mit | null | null | null | null | null | null | null | src/ghstack/rage.py | null | null | null | null | null | null | Python | 2026-05-04T01:36:51.479426 | #!/usr/bin/env python3
import datetime
import os
import tempfile
from typing import Dict, NewType
import ghstack
import ghstack.logs
RawIndex = NewType("RawIndex", int)
FilteredIndex = NewType("FilteredIndex", int)
def get_argv(log_dir: str) -> str:
argv = "Unknown"
argv_fn = os.path.join(log_dir, "argv")
... |
ezyang/ghstack | https://github.com/ezyang/ghstack | null | null | null | null | 977 | null | null | mit | null | null | null | null | null | null | null | src/ghstack/shell.py | null | null | null | null | null | null | Python | 2026-05-04T01:36:51.492288 | #!/usr/bin/env python3
import asyncio
import logging
import os
import shlex
import subprocess
import sys
from typing import Any, Dict, IO, Optional, overload, Sequence, Tuple, TypeVar, Union
# Shell commands generally return str, but with exitcode=True
# they return a bool, and if stdout is piped straight to sys.stdo... |
ezyang/ghstack | https://github.com/ezyang/ghstack | null | null | null | null | 977 | null | null | mit | null | null | null | null | null | null | null | src/ghstack/log.py | null | null | null | null | null | null | Python | 2026-05-04T01:36:51.496814 | #!/usr/bin/env python3
import subprocess
import sys
from typing import List, Optional, Tuple
import ghstack.diff
import ghstack.github
import ghstack.github_utils
import ghstack.shell
def _resolve_refs(
*,
github: ghstack.github.GitHubEndpoint,
params: ghstack.github_utils.GitHubPullRequestParams,
) -> ... |
ezyang/ghstack | https://github.com/ezyang/ghstack | null | null | null | null | 977 | null | null | mit | null | null | null | null | null | null | null | src/ghstack/submit.py | null | null | null | null | null | null | Python | 2026-05-04T01:36:51.513593 | #!/usr/bin/env python3
import dataclasses
import itertools
import logging
import os
import re
from dataclasses import dataclass
from typing import Any, Dict, Iterator, List, Optional, Sequence, Set, Tuple
import ghstack
import ghstack.git
import ghstack.github
import ghstack.github_utils
import ghstack.gpg_sign
impor... |
ezyang/ghstack | https://github.com/ezyang/ghstack | null | null | null | null | 977 | null | null | mit | null | null | null | null | null | null | null | src/ghstack/test_prelude.py | null | null | null | null | null | null | Python | 2026-05-04T01:36:51.572936 | import argparse
import atexit
import contextlib
import io
import os
import re
import shutil
import stat
import sys
import tempfile
from typing import Any, Callable, Iterator, List, Optional, Sequence, Tuple, Union
from expecttest import assert_expected_inline
import ghstack.checkout
import ghstack.cherry_pick
import... |
MakotoKurauchi/helix | https://github.com/MakotoKurauchi/helix | null | null | null | null | 977 | null | null | mit | null | null | null | null | null | null | null | FontConverter/hex2img.py | null | null | null | null | null | null | Python | 2026-05-04T01:36:53.458677 | # Hex to Image Converter
# Copyright (c) 2018 MakotoKurauchi
# MIT License
from PIL import Image
from numpy import *
import sys
argvs = sys.argv
argc = len(argvs)
if (argc != 3):
print ('Usage: $ python %s file output-file' % argvs[0])
quit()
f = open(argvs[1])
txt = f.read()
f.close()
lines = txt.split('\n')
ar... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.