repo stringlengths 7 90 | file_url stringlengths 81 315 | file_path stringlengths 4 228 | content stringlengths 0 32.8k | language stringclasses 1
value | license stringclasses 7
values | commit_sha stringlengths 40 40 | retrieved_at stringdate 2026-01-04 14:38:15 2026-01-05 02:33:18 | truncated bool 2
classes |
|---|---|---|---|---|---|---|---|---|
ammirsm/llamaindex-omakase-rag | https://github.com/ammirsm/llamaindex-omakase-rag/blob/10a34b5d92660ceb5f5b544113588780176e5ca9/datastore/migrations/0004_alter_document_source_created_at_and_more.py | datastore/migrations/0004_alter_document_source_created_at_and_more.py | # Generated by Django 4.2.9 on 2024-02-25 23:19
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
("datastore", "0003_document_source_created_at_and_more"),
]
operations = [
migrations.AlterField(
model_name="document",
... | python | MIT | 10a34b5d92660ceb5f5b544113588780176e5ca9 | 2026-01-05T07:11:02.387256Z | false |
ammirsm/llamaindex-omakase-rag | https://github.com/ammirsm/llamaindex-omakase-rag/blob/10a34b5d92660ceb5f5b544113588780176e5ca9/datastore/migrations/__init__.py | datastore/migrations/__init__.py | python | MIT | 10a34b5d92660ceb5f5b544113588780176e5ca9 | 2026-01-05T07:11:02.387256Z | false | |
ammirsm/llamaindex-omakase-rag | https://github.com/ammirsm/llamaindex-omakase-rag/blob/10a34b5d92660ceb5f5b544113588780176e5ca9/datastore/migrations/0008_folder_sync_interval.py | datastore/migrations/0008_folder_sync_interval.py | # Generated by Django 4.2.9 on 2024-03-13 23:18
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
("datastore", "0007_alter_documentchunk_embedding"),
]
operations = [
migrations.AddField(
model_name="folder",
name="s... | python | MIT | 10a34b5d92660ceb5f5b544113588780176e5ca9 | 2026-01-05T07:11:02.387256Z | false |
ammirsm/llamaindex-omakase-rag | https://github.com/ammirsm/llamaindex-omakase-rag/blob/10a34b5d92660ceb5f5b544113588780176e5ca9/datastore/migrations/0009_alter_folder_cron_config.py | datastore/migrations/0009_alter_folder_cron_config.py | # Generated by Django 4.2.9 on 2024-03-22 01:50
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
("datastore", "0008_folder_sync_interval"),
]
operations = [
migrations.AlterField(
model_name="folder",
name="cron_con... | python | MIT | 10a34b5d92660ceb5f5b544113588780176e5ca9 | 2026-01-05T07:11:02.387256Z | false |
ammirsm/llamaindex-omakase-rag | https://github.com/ammirsm/llamaindex-omakase-rag/blob/10a34b5d92660ceb5f5b544113588780176e5ca9/datastore/migrations/0003_document_source_created_at_and_more.py | datastore/migrations/0003_document_source_created_at_and_more.py | # Generated by Django 4.2.9 on 2024-02-25 23:11
from django.db import migrations, models
import django.utils.timezone
class Migration(migrations.Migration):
dependencies = [
("datastore", "0002_folder_cron_config_folder_last_sync_and_more"),
]
operations = [
migrations.AddField(
... | python | MIT | 10a34b5d92660ceb5f5b544113588780176e5ca9 | 2026-01-05T07:11:02.387256Z | false |
ammirsm/llamaindex-omakase-rag | https://github.com/ammirsm/llamaindex-omakase-rag/blob/10a34b5d92660ceb5f5b544113588780176e5ca9/datastore/migrations/0007_alter_documentchunk_embedding.py | datastore/migrations/0007_alter_documentchunk_embedding.py | # Generated by Django 4.2.9 on 2024-03-03 23:41
from django.db import migrations
import pgvector.django
class Migration(migrations.Migration):
dependencies = [
("datastore", "0006_document_chunk_overlap_document_chunk_size_and_more"),
]
operations = [
migrations.AlterField(
m... | python | MIT | 10a34b5d92660ceb5f5b544113588780176e5ca9 | 2026-01-05T07:11:02.387256Z | false |
ammirsm/llamaindex-omakase-rag | https://github.com/ammirsm/llamaindex-omakase-rag/blob/10a34b5d92660ceb5f5b544113588780176e5ca9/main/views.py | main/views.py | # Create your views here.
| python | MIT | 10a34b5d92660ceb5f5b544113588780176e5ca9 | 2026-01-05T07:11:02.387256Z | false |
ammirsm/llamaindex-omakase-rag | https://github.com/ammirsm/llamaindex-omakase-rag/blob/10a34b5d92660ceb5f5b544113588780176e5ca9/main/admin.py | main/admin.py | # Register your models here.
| python | MIT | 10a34b5d92660ceb5f5b544113588780176e5ca9 | 2026-01-05T07:11:02.387256Z | false |
ammirsm/llamaindex-omakase-rag | https://github.com/ammirsm/llamaindex-omakase-rag/blob/10a34b5d92660ceb5f5b544113588780176e5ca9/main/models.py | main/models.py | # Create your models here.
| python | MIT | 10a34b5d92660ceb5f5b544113588780176e5ca9 | 2026-01-05T07:11:02.387256Z | false |
ammirsm/llamaindex-omakase-rag | https://github.com/ammirsm/llamaindex-omakase-rag/blob/10a34b5d92660ceb5f5b544113588780176e5ca9/main/__init__.py | main/__init__.py | python | MIT | 10a34b5d92660ceb5f5b544113588780176e5ca9 | 2026-01-05T07:11:02.387256Z | false | |
ammirsm/llamaindex-omakase-rag | https://github.com/ammirsm/llamaindex-omakase-rag/blob/10a34b5d92660ceb5f5b544113588780176e5ca9/main/tests.py | main/tests.py | # Create your tests here.
| python | MIT | 10a34b5d92660ceb5f5b544113588780176e5ca9 | 2026-01-05T07:11:02.387256Z | false |
ammirsm/llamaindex-omakase-rag | https://github.com/ammirsm/llamaindex-omakase-rag/blob/10a34b5d92660ceb5f5b544113588780176e5ca9/main/apps.py | main/apps.py | from django.apps import AppConfig
class MainConfig(AppConfig):
default_auto_field = "django.db.models.BigAutoField"
name = "main"
| python | MIT | 10a34b5d92660ceb5f5b544113588780176e5ca9 | 2026-01-05T07:11:02.387256Z | false |
ammirsm/llamaindex-omakase-rag | https://github.com/ammirsm/llamaindex-omakase-rag/blob/10a34b5d92660ceb5f5b544113588780176e5ca9/main/management/__init__.py | main/management/__init__.py | python | MIT | 10a34b5d92660ceb5f5b544113588780176e5ca9 | 2026-01-05T07:11:02.387256Z | false | |
ammirsm/llamaindex-omakase-rag | https://github.com/ammirsm/llamaindex-omakase-rag/blob/10a34b5d92660ceb5f5b544113588780176e5ca9/main/management/commands/seeder.py | main/management/commands/seeder.py | """
Script for seeding the database with dummy data
"""
from core.settings import GDRIVE_SERVICE_ACCOUNT, GDRIVE_TEST_FOLDER_ID, LOGIN_PASSWORD, LOGIN_USERNAME
from datastore.models import Config, Document, Folder
from django.core.management.base import BaseCommand
from django.db.utils import IntegrityError
from uac.m... | python | MIT | 10a34b5d92660ceb5f5b544113588780176e5ca9 | 2026-01-05T07:11:02.387256Z | false |
ammirsm/llamaindex-omakase-rag | https://github.com/ammirsm/llamaindex-omakase-rag/blob/10a34b5d92660ceb5f5b544113588780176e5ca9/main/management/commands/check_api.py | main/management/commands/check_api.py | import json
import requests
from core.settings import LOGIN_PASSWORD, LOGIN_USERNAME
from datastore.models import Folder
from django.core.management.base import BaseCommand
class Command(BaseCommand):
help = "This will be a command for checking the api is working when the app is running after seeder import"
... | python | MIT | 10a34b5d92660ceb5f5b544113588780176e5ca9 | 2026-01-05T07:11:02.387256Z | false |
ammirsm/llamaindex-omakase-rag | https://github.com/ammirsm/llamaindex-omakase-rag/blob/10a34b5d92660ceb5f5b544113588780176e5ca9/main/management/commands/__init__.py | main/management/commands/__init__.py | python | MIT | 10a34b5d92660ceb5f5b544113588780176e5ca9 | 2026-01-05T07:11:02.387256Z | false | |
ammirsm/llamaindex-omakase-rag | https://github.com/ammirsm/llamaindex-omakase-rag/blob/10a34b5d92660ceb5f5b544113588780176e5ca9/main/migrations/__init__.py | main/migrations/__init__.py | python | MIT | 10a34b5d92660ceb5f5b544113588780176e5ca9 | 2026-01-05T07:11:02.387256Z | false | |
ammirsm/llamaindex-omakase-rag | https://github.com/ammirsm/llamaindex-omakase-rag/blob/10a34b5d92660ceb5f5b544113588780176e5ca9/core/asgi.py | core/asgi.py | """
ASGI config for core project.
It exposes the ASGI callable as a module-level variable named ``application``.
For more information on this file, see
https://docs.djangoproject.com/en/4.2/howto/deployment/asgi/
"""
import os
from django.core.asgi import get_asgi_application
os.environ.setdefault("DJANGO_SETTINGS... | python | MIT | 10a34b5d92660ceb5f5b544113588780176e5ca9 | 2026-01-05T07:11:02.387256Z | false |
ammirsm/llamaindex-omakase-rag | https://github.com/ammirsm/llamaindex-omakase-rag/blob/10a34b5d92660ceb5f5b544113588780176e5ca9/core/utils.py | core/utils.py | from celery._state import _apps
class EnableCeleryTasks(object):
def __enter__(*args, **kwargs):
for app in _apps:
app.conf._task_always_eager = app.conf.task_always_eager
app.conf.task_always_eager = True
def __exit__(*args, **kwargs):
for app in _apps:
ap... | python | MIT | 10a34b5d92660ceb5f5b544113588780176e5ca9 | 2026-01-05T07:11:02.387256Z | false |
ammirsm/llamaindex-omakase-rag | https://github.com/ammirsm/llamaindex-omakase-rag/blob/10a34b5d92660ceb5f5b544113588780176e5ca9/core/settings.py | core/settings.py | """
Django settings for core project.
Generated by 'django-admin startproject' using Django 4.2.9.
For more information on this file, see
https://docs.djangoproject.com/en/4.2/topics/settings/
For the full list of settings and their values, see
https://docs.djangoproject.com/en/4.2/ref/settings/
"""
import os
from p... | python | MIT | 10a34b5d92660ceb5f5b544113588780176e5ca9 | 2026-01-05T07:11:02.387256Z | false |
ammirsm/llamaindex-omakase-rag | https://github.com/ammirsm/llamaindex-omakase-rag/blob/10a34b5d92660ceb5f5b544113588780176e5ca9/core/__init__.py | core/__init__.py | # This will make sure the app is always imported when
# Django starts so that shared_task will use this app.
from .celery import app as celery_app
__all__ = ["celery_app"]
| python | MIT | 10a34b5d92660ceb5f5b544113588780176e5ca9 | 2026-01-05T07:11:02.387256Z | false |
ammirsm/llamaindex-omakase-rag | https://github.com/ammirsm/llamaindex-omakase-rag/blob/10a34b5d92660ceb5f5b544113588780176e5ca9/core/celery.py | core/celery.py | # celery.py
from __future__ import absolute_import, unicode_literals
import os
from celery import Celery
from django.conf import settings
os.environ.setdefault("DJANGO_SETTINGS_MODULE", "core.settings")
app = Celery("core")
# Configure Celery using settings from Django settings.py.
app.config_from_object("django.c... | python | MIT | 10a34b5d92660ceb5f5b544113588780176e5ca9 | 2026-01-05T07:11:02.387256Z | false |
ammirsm/llamaindex-omakase-rag | https://github.com/ammirsm/llamaindex-omakase-rag/blob/10a34b5d92660ceb5f5b544113588780176e5ca9/core/wsgi.py | core/wsgi.py | """
WSGI config for core project.
It exposes the WSGI callable as a module-level variable named ``application``.
For more information on this file, see
https://docs.djangoproject.com/en/4.2/howto/deployment/wsgi/
"""
import os
from django.core.wsgi import get_wsgi_application
os.environ.setdefault("DJANGO_SETTINGS... | python | MIT | 10a34b5d92660ceb5f5b544113588780176e5ca9 | 2026-01-05T07:11:02.387256Z | false |
ammirsm/llamaindex-omakase-rag | https://github.com/ammirsm/llamaindex-omakase-rag/blob/10a34b5d92660ceb5f5b544113588780176e5ca9/core/urls.py | core/urls.py | """
URL configuration for core project.
The `urlpatterns` list routes URLs to views. For more information please see:
https://docs.djangoproject.com/en/4.2/topics/http/urls/
Examples:
Function views
1. Add an import: from my_app import views
2. Add a URL to urlpatterns: path('', views.home, name='home')
... | python | MIT | 10a34b5d92660ceb5f5b544113588780176e5ca9 | 2026-01-05T07:11:02.387256Z | false |
ammirsm/llamaindex-omakase-rag | https://github.com/ammirsm/llamaindex-omakase-rag/blob/10a34b5d92660ceb5f5b544113588780176e5ca9/core/base/models.py | core/base/models.py | import uuid
from django.db import models
class Active(models.Model):
"""
Mixin for active models
"""
is_active = models.BooleanField(default=True)
class Meta:
abstract = True
class UUID(models.Model):
"""
Mixin for UUID models
"""
uuid = models.UUIDField(default=uuid.... | python | MIT | 10a34b5d92660ceb5f5b544113588780176e5ca9 | 2026-01-05T07:11:02.387256Z | false |
ammirsm/llamaindex-omakase-rag | https://github.com/ammirsm/llamaindex-omakase-rag/blob/10a34b5d92660ceb5f5b544113588780176e5ca9/core/base/factory.py | core/base/factory.py | import factory
class BaseModelFactory(factory.django.DjangoModelFactory):
pass
| python | MIT | 10a34b5d92660ceb5f5b544113588780176e5ca9 | 2026-01-05T07:11:02.387256Z | false |
open-telemetry/opentelemetry-cpp-contrib | https://github.com/open-telemetry/opentelemetry-cpp-contrib/blob/aa24980ac92218fe332f5f8a589da2686ac13ca6/exporters/user_events/.cmake-format.py | exporters/user_events/.cmake-format.py | # Copyright The OpenTelemetry Authors
# SPDX-License-Identifier: Apache-2.0
# If comment markup is enabled, don't reflow the first comment block in
# eachlistfile. Use this to preserve formatting of your
# copyright/licensestatements.
first_comment_is_literal = True
| python | Apache-2.0 | aa24980ac92218fe332f5f8a589da2686ac13ca6 | 2026-01-05T07:11:02.543533Z | false |
open-telemetry/opentelemetry-cpp-contrib | https://github.com/open-telemetry/opentelemetry-cpp-contrib/blob/aa24980ac92218fe332f5f8a589da2686ac13ca6/exporters/prometheus/.cmake-format.py | exporters/prometheus/.cmake-format.py | # Copyright The OpenTelemetry Authors
# SPDX-License-Identifier: Apache-2.0
# If comment markup is enabled, don't reflow the first comment block in
# eachlistfile. Use this to preserve formatting of your
# copyright/licensestatements.
first_comment_is_literal = True
| python | Apache-2.0 | aa24980ac92218fe332f5f8a589da2686ac13ca6 | 2026-01-05T07:11:02.543533Z | false |
open-telemetry/opentelemetry-cpp-contrib | https://github.com/open-telemetry/opentelemetry-cpp-contrib/blob/aa24980ac92218fe332f5f8a589da2686ac13ca6/instrumentation/otel-webserver-module/scripts/gyp/r1919/gyp_main.py | instrumentation/otel-webserver-module/scripts/gyp/r1919/gyp_main.py | #!/usr/bin/env python
# Copyright (c) 2009 Google Inc. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
import sys
# TODO(mark): sys.path manipulation is some temporary testing stuff.
try:
import gyp
except ImportError, e:
import os.path
... | python | Apache-2.0 | aa24980ac92218fe332f5f8a589da2686ac13ca6 | 2026-01-05T07:11:02.543533Z | false |
open-telemetry/opentelemetry-cpp-contrib | https://github.com/open-telemetry/opentelemetry-cpp-contrib/blob/aa24980ac92218fe332f5f8a589da2686ac13ca6/instrumentation/otel-webserver-module/scripts/gyp/r1919/gyptest.py | instrumentation/otel-webserver-module/scripts/gyp/r1919/gyptest.py | #!/usr/bin/env python
# Copyright (c) 2012 Google Inc. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
__doc__ = """
gyptest.py -- test runner for GYP tests.
"""
import os
import optparse
import subprocess
import sys
class CommandRunner:
"... | python | Apache-2.0 | aa24980ac92218fe332f5f8a589da2686ac13ca6 | 2026-01-05T07:11:02.543533Z | false |
open-telemetry/opentelemetry-cpp-contrib | https://github.com/open-telemetry/opentelemetry-cpp-contrib/blob/aa24980ac92218fe332f5f8a589da2686ac13ca6/instrumentation/otel-webserver-module/scripts/gyp/r1919/setup.py | instrumentation/otel-webserver-module/scripts/gyp/r1919/setup.py | #!/usr/bin/env python
# Copyright (c) 2009 Google Inc. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
from setuptools import setup
setup(
name='gyp',
version='0.1',
description='Generate Your Projects',
author='Chromium Authors',
a... | python | Apache-2.0 | aa24980ac92218fe332f5f8a589da2686ac13ca6 | 2026-01-05T07:11:02.543533Z | false |
open-telemetry/opentelemetry-cpp-contrib | https://github.com/open-telemetry/opentelemetry-cpp-contrib/blob/aa24980ac92218fe332f5f8a589da2686ac13ca6/instrumentation/otel-webserver-module/scripts/gyp/r1919/PRESUBMIT.py | instrumentation/otel-webserver-module/scripts/gyp/r1919/PRESUBMIT.py | # Copyright (c) 2012 Google Inc. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
"""Top-level presubmit script for GYP.
See http://dev.chromium.org/developers/how-tos/depottools/presubmit-scripts
for more details about the presubmit API built... | python | Apache-2.0 | aa24980ac92218fe332f5f8a589da2686ac13ca6 | 2026-01-05T07:11:02.543533Z | false |
open-telemetry/opentelemetry-cpp-contrib | https://github.com/open-telemetry/opentelemetry-cpp-contrib/blob/aa24980ac92218fe332f5f8a589da2686ac13ca6/instrumentation/otel-webserver-module/scripts/gyp/r1919/buildbot/buildbot_run.py | instrumentation/otel-webserver-module/scripts/gyp/r1919/buildbot/buildbot_run.py | #!/usr/bin/env python
# Copyright (c) 2012 Google Inc. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
"""Argument-less script to select what to run on the buildbots."""
import os
import shutil
import subprocess
import sys
if sys.platform ... | python | Apache-2.0 | aa24980ac92218fe332f5f8a589da2686ac13ca6 | 2026-01-05T07:11:02.543533Z | false |
open-telemetry/opentelemetry-cpp-contrib | https://github.com/open-telemetry/opentelemetry-cpp-contrib/blob/aa24980ac92218fe332f5f8a589da2686ac13ca6/instrumentation/otel-webserver-module/scripts/gyp/r1919/tools/pretty_vcproj.py | instrumentation/otel-webserver-module/scripts/gyp/r1919/tools/pretty_vcproj.py | #!/usr/bin/env python
# Copyright (c) 2012 Google Inc. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
"""Make the format of a vcproj really pretty.
This script normalize and sort an xml. It also fetches all the properties
inside linked... | python | Apache-2.0 | aa24980ac92218fe332f5f8a589da2686ac13ca6 | 2026-01-05T07:11:02.543533Z | false |
open-telemetry/opentelemetry-cpp-contrib | https://github.com/open-telemetry/opentelemetry-cpp-contrib/blob/aa24980ac92218fe332f5f8a589da2686ac13ca6/instrumentation/otel-webserver-module/scripts/gyp/r1919/tools/pretty_sln.py | instrumentation/otel-webserver-module/scripts/gyp/r1919/tools/pretty_sln.py | #!/usr/bin/env python
# Copyright (c) 2012 Google Inc. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
"""Prints the information in a sln file in a diffable way.
It first outputs each projects in alphabetical order with their
dependenci... | python | Apache-2.0 | aa24980ac92218fe332f5f8a589da2686ac13ca6 | 2026-01-05T07:11:02.543533Z | false |
open-telemetry/opentelemetry-cpp-contrib | https://github.com/open-telemetry/opentelemetry-cpp-contrib/blob/aa24980ac92218fe332f5f8a589da2686ac13ca6/instrumentation/otel-webserver-module/scripts/gyp/r1919/tools/graphviz.py | instrumentation/otel-webserver-module/scripts/gyp/r1919/tools/graphviz.py | #!/usr/bin/env python
# Copyright (c) 2011 Google Inc. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
"""Using the JSON dumped by the dump-dependency-json generator,
generate input suitable for graphviz to render a dependency graph of
targets... | python | Apache-2.0 | aa24980ac92218fe332f5f8a589da2686ac13ca6 | 2026-01-05T07:11:02.543533Z | false |
open-telemetry/opentelemetry-cpp-contrib | https://github.com/open-telemetry/opentelemetry-cpp-contrib/blob/aa24980ac92218fe332f5f8a589da2686ac13ca6/instrumentation/otel-webserver-module/scripts/gyp/r1919/tools/pretty_gyp.py | instrumentation/otel-webserver-module/scripts/gyp/r1919/tools/pretty_gyp.py | #!/usr/bin/env python
# Copyright (c) 2012 Google Inc. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
"""Pretty-prints the contents of a GYP file."""
import sys
import re
# Regex to remove comments when we're counting braces.
COMMENT_RE = ... | python | Apache-2.0 | aa24980ac92218fe332f5f8a589da2686ac13ca6 | 2026-01-05T07:11:02.543533Z | false |
open-telemetry/opentelemetry-cpp-contrib | https://github.com/open-telemetry/opentelemetry-cpp-contrib/blob/aa24980ac92218fe332f5f8a589da2686ac13ca6/instrumentation/otel-webserver-module/scripts/gyp/r1919/pylib/gyp/xcodeproj_file.py | instrumentation/otel-webserver-module/scripts/gyp/r1919/pylib/gyp/xcodeproj_file.py | # Copyright (c) 2012 Google Inc. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
"""Xcode project file generator.
This module is both an Xcode project file generator and a documentation of the
Xcode project file format. Knowledge of the proje... | python | Apache-2.0 | aa24980ac92218fe332f5f8a589da2686ac13ca6 | 2026-01-05T07:11:02.543533Z | true |
open-telemetry/opentelemetry-cpp-contrib | https://github.com/open-telemetry/opentelemetry-cpp-contrib/blob/aa24980ac92218fe332f5f8a589da2686ac13ca6/instrumentation/otel-webserver-module/scripts/gyp/r1919/pylib/gyp/mac_tool.py | instrumentation/otel-webserver-module/scripts/gyp/r1919/pylib/gyp/mac_tool.py | #!/usr/bin/env python
# Copyright (c) 2012 Google Inc. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
"""Utility functions to perform Xcode-style build steps.
These functions are executed via gyp-mac-tool when using the Makefile generator.
""... | python | Apache-2.0 | aa24980ac92218fe332f5f8a589da2686ac13ca6 | 2026-01-05T07:11:02.543533Z | false |
open-telemetry/opentelemetry-cpp-contrib | https://github.com/open-telemetry/opentelemetry-cpp-contrib/blob/aa24980ac92218fe332f5f8a589da2686ac13ca6/instrumentation/otel-webserver-module/scripts/gyp/r1919/pylib/gyp/MSVSToolFile.py | instrumentation/otel-webserver-module/scripts/gyp/r1919/pylib/gyp/MSVSToolFile.py | # Copyright (c) 2012 Google Inc. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
"""Visual Studio project reader/writer."""
import gyp.common
import gyp.easy_xml as easy_xml
class Writer(object):
"""Visual Studio XML tool file writer."""
... | python | Apache-2.0 | aa24980ac92218fe332f5f8a589da2686ac13ca6 | 2026-01-05T07:11:02.543533Z | false |
open-telemetry/opentelemetry-cpp-contrib | https://github.com/open-telemetry/opentelemetry-cpp-contrib/blob/aa24980ac92218fe332f5f8a589da2686ac13ca6/instrumentation/otel-webserver-module/scripts/gyp/r1919/pylib/gyp/msvs_emulation.py | instrumentation/otel-webserver-module/scripts/gyp/r1919/pylib/gyp/msvs_emulation.py | # Copyright (c) 2012 Google Inc. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
"""
This module helps emulate Visual Studio 2008 behavior on top of other
build systems, primarily ninja.
"""
import os
import re
import subprocess
import sys
im... | python | Apache-2.0 | aa24980ac92218fe332f5f8a589da2686ac13ca6 | 2026-01-05T07:11:02.543533Z | true |
open-telemetry/opentelemetry-cpp-contrib | https://github.com/open-telemetry/opentelemetry-cpp-contrib/blob/aa24980ac92218fe332f5f8a589da2686ac13ca6/instrumentation/otel-webserver-module/scripts/gyp/r1919/pylib/gyp/ordered_dict.py | instrumentation/otel-webserver-module/scripts/gyp/r1919/pylib/gyp/ordered_dict.py | # Unmodified from http://code.activestate.com/recipes/576693/
# other than to add MIT license header (as specified on page, but not in code).
# Linked from Python documentation here:
# http://docs.python.org/2/library/collections.html#collections.OrderedDict
#
# This should be deleted once Py2.7 is available on all bot... | python | Apache-2.0 | aa24980ac92218fe332f5f8a589da2686ac13ca6 | 2026-01-05T07:11:02.543533Z | false |
open-telemetry/opentelemetry-cpp-contrib | https://github.com/open-telemetry/opentelemetry-cpp-contrib/blob/aa24980ac92218fe332f5f8a589da2686ac13ca6/instrumentation/otel-webserver-module/scripts/gyp/r1919/pylib/gyp/input_test.py | instrumentation/otel-webserver-module/scripts/gyp/r1919/pylib/gyp/input_test.py | #!/usr/bin/env python
# Copyright 2013 Google Inc. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
"""Unit tests for the input.py file."""
import gyp.input
import unittest
import sys
class TestFindCycles(unittest.TestCase):
def setUp(self... | python | Apache-2.0 | aa24980ac92218fe332f5f8a589da2686ac13ca6 | 2026-01-05T07:11:02.543533Z | false |
open-telemetry/opentelemetry-cpp-contrib | https://github.com/open-telemetry/opentelemetry-cpp-contrib/blob/aa24980ac92218fe332f5f8a589da2686ac13ca6/instrumentation/otel-webserver-module/scripts/gyp/r1919/pylib/gyp/common.py | instrumentation/otel-webserver-module/scripts/gyp/r1919/pylib/gyp/common.py | # Copyright (c) 2012 Google Inc. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
from __future__ import with_statement
import collections
import errno
import filecmp
import os.path
import re
import tempfile
import sys
# A minimal memoizing d... | python | Apache-2.0 | aa24980ac92218fe332f5f8a589da2686ac13ca6 | 2026-01-05T07:11:02.543533Z | false |
open-telemetry/opentelemetry-cpp-contrib | https://github.com/open-telemetry/opentelemetry-cpp-contrib/blob/aa24980ac92218fe332f5f8a589da2686ac13ca6/instrumentation/otel-webserver-module/scripts/gyp/r1919/pylib/gyp/xml_fix.py | instrumentation/otel-webserver-module/scripts/gyp/r1919/pylib/gyp/xml_fix.py | # Copyright (c) 2011 Google Inc. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
"""Applies a fix to CR LF TAB handling in xml.dom.
Fixes this: http://code.google.com/p/chromium/issues/detail?id=76293
Working around this: http://bugs.python.or... | python | Apache-2.0 | aa24980ac92218fe332f5f8a589da2686ac13ca6 | 2026-01-05T07:11:02.543533Z | false |
open-telemetry/opentelemetry-cpp-contrib | https://github.com/open-telemetry/opentelemetry-cpp-contrib/blob/aa24980ac92218fe332f5f8a589da2686ac13ca6/instrumentation/otel-webserver-module/scripts/gyp/r1919/pylib/gyp/MSVSSettings_test.py | instrumentation/otel-webserver-module/scripts/gyp/r1919/pylib/gyp/MSVSSettings_test.py | #!/usr/bin/env python
# Copyright (c) 2012 Google Inc. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
"""Unit tests for the MSVSSettings.py file."""
import StringIO
import unittest
import gyp.MSVSSettings as MSVSSettings
class TestSequence... | python | Apache-2.0 | aa24980ac92218fe332f5f8a589da2686ac13ca6 | 2026-01-05T07:11:02.543533Z | true |
open-telemetry/opentelemetry-cpp-contrib | https://github.com/open-telemetry/opentelemetry-cpp-contrib/blob/aa24980ac92218fe332f5f8a589da2686ac13ca6/instrumentation/otel-webserver-module/scripts/gyp/r1919/pylib/gyp/MSVSNew.py | instrumentation/otel-webserver-module/scripts/gyp/r1919/pylib/gyp/MSVSNew.py | # Copyright (c) 2012 Google Inc. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
"""New implementation of Visual Studio project generation."""
import os
import random
import gyp.common
# hashlib is supplied as of Python 2.5 as the replacemen... | python | Apache-2.0 | aa24980ac92218fe332f5f8a589da2686ac13ca6 | 2026-01-05T07:11:02.543533Z | false |
open-telemetry/opentelemetry-cpp-contrib | https://github.com/open-telemetry/opentelemetry-cpp-contrib/blob/aa24980ac92218fe332f5f8a589da2686ac13ca6/instrumentation/otel-webserver-module/scripts/gyp/r1919/pylib/gyp/ninja_syntax.py | instrumentation/otel-webserver-module/scripts/gyp/r1919/pylib/gyp/ninja_syntax.py | # This file comes from
# https://github.com/martine/ninja/blob/master/misc/ninja_syntax.py
# Do not edit! Edit the upstream one instead.
"""Python module for generating .ninja files.
Note that this is emphatically not a required piece of Ninja; it's
just a helpful utility for build-file-generation systems that alr... | python | Apache-2.0 | aa24980ac92218fe332f5f8a589da2686ac13ca6 | 2026-01-05T07:11:02.543533Z | false |
open-telemetry/opentelemetry-cpp-contrib | https://github.com/open-telemetry/opentelemetry-cpp-contrib/blob/aa24980ac92218fe332f5f8a589da2686ac13ca6/instrumentation/otel-webserver-module/scripts/gyp/r1919/pylib/gyp/input.py | instrumentation/otel-webserver-module/scripts/gyp/r1919/pylib/gyp/input.py | # Copyright (c) 2012 Google Inc. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
from compiler.ast import Const
from compiler.ast import Dict
from compiler.ast import Discard
from compiler.ast import List
from compiler.ast import Module
from co... | python | Apache-2.0 | aa24980ac92218fe332f5f8a589da2686ac13ca6 | 2026-01-05T07:11:02.543533Z | true |
open-telemetry/opentelemetry-cpp-contrib | https://github.com/open-telemetry/opentelemetry-cpp-contrib/blob/aa24980ac92218fe332f5f8a589da2686ac13ca6/instrumentation/otel-webserver-module/scripts/gyp/r1919/pylib/gyp/simple_copy.py | instrumentation/otel-webserver-module/scripts/gyp/r1919/pylib/gyp/simple_copy.py | # Copyright 2014 Google Inc. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
"""A clone of the default copy.deepcopy that doesn't handle cyclic
structures or complex types except for dicts and lists. This is
because gyp copies so large structur... | python | Apache-2.0 | aa24980ac92218fe332f5f8a589da2686ac13ca6 | 2026-01-05T07:11:02.543533Z | false |
open-telemetry/opentelemetry-cpp-contrib | https://github.com/open-telemetry/opentelemetry-cpp-contrib/blob/aa24980ac92218fe332f5f8a589da2686ac13ca6/instrumentation/otel-webserver-module/scripts/gyp/r1919/pylib/gyp/MSVSVersion.py | instrumentation/otel-webserver-module/scripts/gyp/r1919/pylib/gyp/MSVSVersion.py | # Copyright (c) 2013 Google Inc. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
"""Handle version information related to Visual Stuio."""
import errno
import os
import re
import subprocess
import sys
import gyp
import glob
class VisualStudi... | python | Apache-2.0 | aa24980ac92218fe332f5f8a589da2686ac13ca6 | 2026-01-05T07:11:02.543533Z | false |
open-telemetry/opentelemetry-cpp-contrib | https://github.com/open-telemetry/opentelemetry-cpp-contrib/blob/aa24980ac92218fe332f5f8a589da2686ac13ca6/instrumentation/otel-webserver-module/scripts/gyp/r1919/pylib/gyp/easy_xml.py | instrumentation/otel-webserver-module/scripts/gyp/r1919/pylib/gyp/easy_xml.py | # Copyright (c) 2011 Google Inc. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
import re
import os
def XmlToString(content, encoding='utf-8', pretty=False):
""" Writes the XML content to disk, touching the file only if it has changed.
... | python | Apache-2.0 | aa24980ac92218fe332f5f8a589da2686ac13ca6 | 2026-01-05T07:11:02.543533Z | false |
open-telemetry/opentelemetry-cpp-contrib | https://github.com/open-telemetry/opentelemetry-cpp-contrib/blob/aa24980ac92218fe332f5f8a589da2686ac13ca6/instrumentation/otel-webserver-module/scripts/gyp/r1919/pylib/gyp/MSVSUserFile.py | instrumentation/otel-webserver-module/scripts/gyp/r1919/pylib/gyp/MSVSUserFile.py | # Copyright (c) 2012 Google Inc. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
"""Visual Studio user preferences file writer."""
import os
import re
import socket # for gethostname
import gyp.common
import gyp.easy_xml as easy_xml
#------... | python | Apache-2.0 | aa24980ac92218fe332f5f8a589da2686ac13ca6 | 2026-01-05T07:11:02.543533Z | false |
open-telemetry/opentelemetry-cpp-contrib | https://github.com/open-telemetry/opentelemetry-cpp-contrib/blob/aa24980ac92218fe332f5f8a589da2686ac13ca6/instrumentation/otel-webserver-module/scripts/gyp/r1919/pylib/gyp/easy_xml_test.py | instrumentation/otel-webserver-module/scripts/gyp/r1919/pylib/gyp/easy_xml_test.py | #!/usr/bin/env python
# Copyright (c) 2011 Google Inc. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
""" Unit tests for the easy_xml.py file. """
import gyp.easy_xml as easy_xml
import unittest
import StringIO
class TestSequenceFunctions(... | python | Apache-2.0 | aa24980ac92218fe332f5f8a589da2686ac13ca6 | 2026-01-05T07:11:02.543533Z | false |
open-telemetry/opentelemetry-cpp-contrib | https://github.com/open-telemetry/opentelemetry-cpp-contrib/blob/aa24980ac92218fe332f5f8a589da2686ac13ca6/instrumentation/otel-webserver-module/scripts/gyp/r1919/pylib/gyp/xcode_emulation.py | instrumentation/otel-webserver-module/scripts/gyp/r1919/pylib/gyp/xcode_emulation.py | # Copyright (c) 2012 Google Inc. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
"""
This module contains classes that help to emulate xcodebuild behavior on top of
other build systems, such as make and ninja.
"""
import copy
import gyp.common... | python | Apache-2.0 | aa24980ac92218fe332f5f8a589da2686ac13ca6 | 2026-01-05T07:11:02.543533Z | true |
open-telemetry/opentelemetry-cpp-contrib | https://github.com/open-telemetry/opentelemetry-cpp-contrib/blob/aa24980ac92218fe332f5f8a589da2686ac13ca6/instrumentation/otel-webserver-module/scripts/gyp/r1919/pylib/gyp/__init__.py | instrumentation/otel-webserver-module/scripts/gyp/r1919/pylib/gyp/__init__.py | #!/usr/bin/env python
# Copyright (c) 2012 Google Inc. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
import copy
import gyp.input
import optparse
import os.path
import re
import shlex
import sys
import traceback
from gyp.common import GypErr... | python | Apache-2.0 | aa24980ac92218fe332f5f8a589da2686ac13ca6 | 2026-01-05T07:11:02.543533Z | false |
open-telemetry/opentelemetry-cpp-contrib | https://github.com/open-telemetry/opentelemetry-cpp-contrib/blob/aa24980ac92218fe332f5f8a589da2686ac13ca6/instrumentation/otel-webserver-module/scripts/gyp/r1919/pylib/gyp/MSVSProject.py | instrumentation/otel-webserver-module/scripts/gyp/r1919/pylib/gyp/MSVSProject.py | # Copyright (c) 2012 Google Inc. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
"""Visual Studio project reader/writer."""
import gyp.common
import gyp.easy_xml as easy_xml
#-------------------------------------------------------------------... | python | Apache-2.0 | aa24980ac92218fe332f5f8a589da2686ac13ca6 | 2026-01-05T07:11:02.543533Z | false |
open-telemetry/opentelemetry-cpp-contrib | https://github.com/open-telemetry/opentelemetry-cpp-contrib/blob/aa24980ac92218fe332f5f8a589da2686ac13ca6/instrumentation/otel-webserver-module/scripts/gyp/r1919/pylib/gyp/flock_tool.py | instrumentation/otel-webserver-module/scripts/gyp/r1919/pylib/gyp/flock_tool.py | #!/usr/bin/env python
# Copyright (c) 2011 Google Inc. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
"""These functions are executed via gyp-flock-tool when using the Makefile
generator. Used on systems that don't have a built-in flock."""
... | python | Apache-2.0 | aa24980ac92218fe332f5f8a589da2686ac13ca6 | 2026-01-05T07:11:02.543533Z | false |
open-telemetry/opentelemetry-cpp-contrib | https://github.com/open-telemetry/opentelemetry-cpp-contrib/blob/aa24980ac92218fe332f5f8a589da2686ac13ca6/instrumentation/otel-webserver-module/scripts/gyp/r1919/pylib/gyp/MSVSSettings.py | instrumentation/otel-webserver-module/scripts/gyp/r1919/pylib/gyp/MSVSSettings.py | # Copyright (c) 2012 Google Inc. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
"""Code to validate and convert settings of the Microsoft build tools.
This file contains code to validate and convert settings of the Microsoft
build tools. The... | python | Apache-2.0 | aa24980ac92218fe332f5f8a589da2686ac13ca6 | 2026-01-05T07:11:02.543533Z | true |
open-telemetry/opentelemetry-cpp-contrib | https://github.com/open-telemetry/opentelemetry-cpp-contrib/blob/aa24980ac92218fe332f5f8a589da2686ac13ca6/instrumentation/otel-webserver-module/scripts/gyp/r1919/pylib/gyp/MSVSUtil.py | instrumentation/otel-webserver-module/scripts/gyp/r1919/pylib/gyp/MSVSUtil.py | # Copyright (c) 2013 Google Inc. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
"""Utility functions shared amongst the Windows generators."""
import copy
import os
_TARGET_TYPE_EXT = {
'executable': '.exe',
'loadable_module': '.dll',
... | python | Apache-2.0 | aa24980ac92218fe332f5f8a589da2686ac13ca6 | 2026-01-05T07:11:02.543533Z | false |
open-telemetry/opentelemetry-cpp-contrib | https://github.com/open-telemetry/opentelemetry-cpp-contrib/blob/aa24980ac92218fe332f5f8a589da2686ac13ca6/instrumentation/otel-webserver-module/scripts/gyp/r1919/pylib/gyp/xcode_ninja.py | instrumentation/otel-webserver-module/scripts/gyp/r1919/pylib/gyp/xcode_ninja.py | # Copyright (c) 2014 Google Inc. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
"""Xcode-ninja wrapper project file generator.
This updates the data structures passed to the Xcode gyp generator to build
with ninja instead. The Xcode project i... | python | Apache-2.0 | aa24980ac92218fe332f5f8a589da2686ac13ca6 | 2026-01-05T07:11:02.543533Z | false |
open-telemetry/opentelemetry-cpp-contrib | https://github.com/open-telemetry/opentelemetry-cpp-contrib/blob/aa24980ac92218fe332f5f8a589da2686ac13ca6/instrumentation/otel-webserver-module/scripts/gyp/r1919/pylib/gyp/win_tool.py | instrumentation/otel-webserver-module/scripts/gyp/r1919/pylib/gyp/win_tool.py | #!/usr/bin/env python
# Copyright (c) 2012 Google Inc. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
"""Utility functions for Windows builds.
These functions are executed via gyp-win-tool when using the ninja generator.
"""
import os
impor... | python | Apache-2.0 | aa24980ac92218fe332f5f8a589da2686ac13ca6 | 2026-01-05T07:11:02.543533Z | false |
open-telemetry/opentelemetry-cpp-contrib | https://github.com/open-telemetry/opentelemetry-cpp-contrib/blob/aa24980ac92218fe332f5f8a589da2686ac13ca6/instrumentation/otel-webserver-module/scripts/gyp/r1919/pylib/gyp/common_test.py | instrumentation/otel-webserver-module/scripts/gyp/r1919/pylib/gyp/common_test.py | #!/usr/bin/env python
# Copyright (c) 2012 Google Inc. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
"""Unit tests for the common.py file."""
import gyp.common
import unittest
import sys
class TestTopologicallySorted(unittest.TestCase):
... | python | Apache-2.0 | aa24980ac92218fe332f5f8a589da2686ac13ca6 | 2026-01-05T07:11:02.543533Z | false |
open-telemetry/opentelemetry-cpp-contrib | https://github.com/open-telemetry/opentelemetry-cpp-contrib/blob/aa24980ac92218fe332f5f8a589da2686ac13ca6/instrumentation/otel-webserver-module/scripts/gyp/r1919/pylib/gyp/generator/android.py | instrumentation/otel-webserver-module/scripts/gyp/r1919/pylib/gyp/generator/android.py | # Copyright (c) 2012 Google Inc. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
# Notes:
#
# This generates makefiles suitable for inclusion into the Android build system
# via an Android.mk file. It is based on make.py, the standard makefile
... | python | Apache-2.0 | aa24980ac92218fe332f5f8a589da2686ac13ca6 | 2026-01-05T07:11:02.543533Z | true |
open-telemetry/opentelemetry-cpp-contrib | https://github.com/open-telemetry/opentelemetry-cpp-contrib/blob/aa24980ac92218fe332f5f8a589da2686ac13ca6/instrumentation/otel-webserver-module/scripts/gyp/r1919/pylib/gyp/generator/make.py | instrumentation/otel-webserver-module/scripts/gyp/r1919/pylib/gyp/generator/make.py | # Copyright (c) 2013 Google Inc. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
# Notes:
#
# This is all roughly based on the Makefile system used by the Linux
# kernel, but is a non-recursive make -- we put the entire dependency
# graph in fr... | python | Apache-2.0 | aa24980ac92218fe332f5f8a589da2686ac13ca6 | 2026-01-05T07:11:02.543533Z | true |
open-telemetry/opentelemetry-cpp-contrib | https://github.com/open-telemetry/opentelemetry-cpp-contrib/blob/aa24980ac92218fe332f5f8a589da2686ac13ca6/instrumentation/otel-webserver-module/scripts/gyp/r1919/pylib/gyp/generator/msvs.py | instrumentation/otel-webserver-module/scripts/gyp/r1919/pylib/gyp/generator/msvs.py | # Copyright (c) 2012 Google Inc. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
import copy
import ntpath
import os
import posixpath
import re
import subprocess
import sys
import gyp.common
import gyp.easy_xml as easy_xml
import gyp.MSVSNew a... | python | Apache-2.0 | aa24980ac92218fe332f5f8a589da2686ac13ca6 | 2026-01-05T07:11:02.543533Z | true |
open-telemetry/opentelemetry-cpp-contrib | https://github.com/open-telemetry/opentelemetry-cpp-contrib/blob/aa24980ac92218fe332f5f8a589da2686ac13ca6/instrumentation/otel-webserver-module/scripts/gyp/r1919/pylib/gyp/generator/cmake.py | instrumentation/otel-webserver-module/scripts/gyp/r1919/pylib/gyp/generator/cmake.py | # Copyright (c) 2013 Google Inc. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
"""cmake output module
This module is under development and should be considered experimental.
This module produces cmake (2.8.8+) input as its output. One CMake... | python | Apache-2.0 | aa24980ac92218fe332f5f8a589da2686ac13ca6 | 2026-01-05T07:11:02.543533Z | true |
open-telemetry/opentelemetry-cpp-contrib | https://github.com/open-telemetry/opentelemetry-cpp-contrib/blob/aa24980ac92218fe332f5f8a589da2686ac13ca6/instrumentation/otel-webserver-module/scripts/gyp/r1919/pylib/gyp/generator/ninja_test.py | instrumentation/otel-webserver-module/scripts/gyp/r1919/pylib/gyp/generator/ninja_test.py | #!/usr/bin/env python
# Copyright (c) 2012 Google Inc. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
""" Unit tests for the ninja.py file. """
import gyp.generator.ninja as ninja
import unittest
import StringIO
import sys
import TestCommon
... | python | Apache-2.0 | aa24980ac92218fe332f5f8a589da2686ac13ca6 | 2026-01-05T07:11:02.543533Z | false |
open-telemetry/opentelemetry-cpp-contrib | https://github.com/open-telemetry/opentelemetry-cpp-contrib/blob/aa24980ac92218fe332f5f8a589da2686ac13ca6/instrumentation/otel-webserver-module/scripts/gyp/r1919/pylib/gyp/generator/gypd.py | instrumentation/otel-webserver-module/scripts/gyp/r1919/pylib/gyp/generator/gypd.py | # Copyright (c) 2011 Google Inc. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
"""gypd output module
This module produces gyp input as its output. Output files are given the
.gypd extension to avoid overwriting the .gyp files that they are ... | python | Apache-2.0 | aa24980ac92218fe332f5f8a589da2686ac13ca6 | 2026-01-05T07:11:02.543533Z | false |
open-telemetry/opentelemetry-cpp-contrib | https://github.com/open-telemetry/opentelemetry-cpp-contrib/blob/aa24980ac92218fe332f5f8a589da2686ac13ca6/instrumentation/otel-webserver-module/scripts/gyp/r1919/pylib/gyp/generator/msvs_test.py | instrumentation/otel-webserver-module/scripts/gyp/r1919/pylib/gyp/generator/msvs_test.py | #!/usr/bin/env python
# Copyright (c) 2012 Google Inc. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
""" Unit tests for the msvs.py file. """
import gyp.generator.msvs as msvs
import unittest
import StringIO
class TestSequenceFunctions(uni... | python | Apache-2.0 | aa24980ac92218fe332f5f8a589da2686ac13ca6 | 2026-01-05T07:11:02.543533Z | false |
open-telemetry/opentelemetry-cpp-contrib | https://github.com/open-telemetry/opentelemetry-cpp-contrib/blob/aa24980ac92218fe332f5f8a589da2686ac13ca6/instrumentation/otel-webserver-module/scripts/gyp/r1919/pylib/gyp/generator/xcode.py | instrumentation/otel-webserver-module/scripts/gyp/r1919/pylib/gyp/generator/xcode.py | # Copyright (c) 2012 Google Inc. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
import filecmp
import gyp.common
import gyp.xcodeproj_file
import gyp.xcode_ninja
import errno
import os
import sys
import posixpath
import re
import shutil
import... | python | Apache-2.0 | aa24980ac92218fe332f5f8a589da2686ac13ca6 | 2026-01-05T07:11:02.543533Z | true |
open-telemetry/opentelemetry-cpp-contrib | https://github.com/open-telemetry/opentelemetry-cpp-contrib/blob/aa24980ac92218fe332f5f8a589da2686ac13ca6/instrumentation/otel-webserver-module/scripts/gyp/r1919/pylib/gyp/generator/xcode_test.py | instrumentation/otel-webserver-module/scripts/gyp/r1919/pylib/gyp/generator/xcode_test.py | #!/usr/bin/env python
# Copyright (c) 2013 Google Inc. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
""" Unit tests for the xcode.py file. """
import gyp.generator.xcode as xcode
import unittest
import sys
class TestEscapeXcodeDefine(unit... | python | Apache-2.0 | aa24980ac92218fe332f5f8a589da2686ac13ca6 | 2026-01-05T07:11:02.543533Z | false |
open-telemetry/opentelemetry-cpp-contrib | https://github.com/open-telemetry/opentelemetry-cpp-contrib/blob/aa24980ac92218fe332f5f8a589da2686ac13ca6/instrumentation/otel-webserver-module/scripts/gyp/r1919/pylib/gyp/generator/gypsh.py | instrumentation/otel-webserver-module/scripts/gyp/r1919/pylib/gyp/generator/gypsh.py | # Copyright (c) 2011 Google Inc. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
"""gypsh output module
gypsh is a GYP shell. It's not really a generator per se. All it does is
fire up an interactive Python session with a few local variables... | python | Apache-2.0 | aa24980ac92218fe332f5f8a589da2686ac13ca6 | 2026-01-05T07:11:02.543533Z | false |
open-telemetry/opentelemetry-cpp-contrib | https://github.com/open-telemetry/opentelemetry-cpp-contrib/blob/aa24980ac92218fe332f5f8a589da2686ac13ca6/instrumentation/otel-webserver-module/scripts/gyp/r1919/pylib/gyp/generator/__init__.py | instrumentation/otel-webserver-module/scripts/gyp/r1919/pylib/gyp/generator/__init__.py | python | Apache-2.0 | aa24980ac92218fe332f5f8a589da2686ac13ca6 | 2026-01-05T07:11:02.543533Z | false | |
open-telemetry/opentelemetry-cpp-contrib | https://github.com/open-telemetry/opentelemetry-cpp-contrib/blob/aa24980ac92218fe332f5f8a589da2686ac13ca6/instrumentation/otel-webserver-module/scripts/gyp/r1919/pylib/gyp/generator/ninja.py | instrumentation/otel-webserver-module/scripts/gyp/r1919/pylib/gyp/generator/ninja.py | # Copyright (c) 2013 Google Inc. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
import collections
import copy
import hashlib
import json
import multiprocessing
import os.path
import re
import signal
import subprocess
import sys
import gyp
imp... | python | Apache-2.0 | aa24980ac92218fe332f5f8a589da2686ac13ca6 | 2026-01-05T07:11:02.543533Z | true |
open-telemetry/opentelemetry-cpp-contrib | https://github.com/open-telemetry/opentelemetry-cpp-contrib/blob/aa24980ac92218fe332f5f8a589da2686ac13ca6/instrumentation/otel-webserver-module/scripts/gyp/r1919/pylib/gyp/generator/dump_dependency_json.py | instrumentation/otel-webserver-module/scripts/gyp/r1919/pylib/gyp/generator/dump_dependency_json.py | # Copyright (c) 2012 Google Inc. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
import collections
import os
import gyp
import gyp.common
import gyp.msvs_emulation
import json
import sys
generator_supports_multiple_toolsets = True
generator_... | python | Apache-2.0 | aa24980ac92218fe332f5f8a589da2686ac13ca6 | 2026-01-05T07:11:02.543533Z | false |
open-telemetry/opentelemetry-cpp-contrib | https://github.com/open-telemetry/opentelemetry-cpp-contrib/blob/aa24980ac92218fe332f5f8a589da2686ac13ca6/instrumentation/otel-webserver-module/scripts/gyp/r1919/pylib/gyp/generator/eclipse.py | instrumentation/otel-webserver-module/scripts/gyp/r1919/pylib/gyp/generator/eclipse.py | # Copyright (c) 2012 Google Inc. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
"""GYP backend that generates Eclipse CDT settings files.
This backend DOES NOT generate Eclipse CDT projects. Instead, it generates XML
files that can be importe... | python | Apache-2.0 | aa24980ac92218fe332f5f8a589da2686ac13ca6 | 2026-01-05T07:11:02.543533Z | false |
lbcb-sci/RiNALMo | https://github.com/lbcb-sci/RiNALMo/blob/2c2c5c14a5ae609d8c560a5d9ca32e51e0288955/train_translation_efficiency.py | train_translation_efficiency.py | import torch
import torch.nn.functional as F
import torch.nn as nn
from torch.optim import Adam
from torch.optim.lr_scheduler import LinearLR
import lightning.pytorch as pl
from lightning.pytorch.loggers.wandb import WandbLogger
from lightning.pytorch.callbacks.lr_monitor import LearningRateMonitor
from lightning.pyt... | python | Apache-2.0 | 2c2c5c14a5ae609d8c560a5d9ca32e51e0288955 | 2026-01-05T07:11:03.926260Z | false |
lbcb-sci/RiNALMo | https://github.com/lbcb-sci/RiNALMo/blob/2c2c5c14a5ae609d8c560a5d9ca32e51e0288955/train_splice_site_prediction.py | train_splice_site_prediction.py | import torch
import torch.nn as nn
from torch.optim import AdamW
import pytorch_lightning as pl
from pytorch_lightning.loggers.wandb import WandbLogger
from pytorch_lightning.callbacks.model_checkpoint import ModelCheckpoint
from pytorch_lightning.callbacks.lr_monitor import LearningRateMonitor
from pytorch_lightning... | python | Apache-2.0 | 2c2c5c14a5ae609d8c560a5d9ca32e51e0288955 | 2026-01-05T07:11:03.926260Z | false |
lbcb-sci/RiNALMo | https://github.com/lbcb-sci/RiNALMo/blob/2c2c5c14a5ae609d8c560a5d9ca32e51e0288955/train_ribosome_loading.py | train_ribosome_loading.py | import torch
import torch.nn.functional as F
import torch.nn as nn
from torch.optim import Adam
from torch.optim.lr_scheduler import LinearLR
import lightning.pytorch as pl
from lightning.pytorch.loggers.wandb import WandbLogger
from lightning.pytorch.callbacks.lr_monitor import LearningRateMonitor
from lightning.pyt... | python | Apache-2.0 | 2c2c5c14a5ae609d8c560a5d9ca32e51e0288955 | 2026-01-05T07:11:03.926260Z | false |
lbcb-sci/RiNALMo | https://github.com/lbcb-sci/RiNALMo/blob/2c2c5c14a5ae609d8c560a5d9ca32e51e0288955/train_ncrna_classification.py | train_ncrna_classification.py | import torch
import torch.nn as nn
from torch.optim import AdamW
from torch.optim.lr_scheduler import LinearLR
import lightning.pytorch as pl
from lightning.pytorch.loggers.wandb import WandbLogger
from lightning.pytorch.callbacks.model_checkpoint import ModelCheckpoint
from lightning.pytorch.callbacks.lr_monitor imp... | python | Apache-2.0 | 2c2c5c14a5ae609d8c560a5d9ca32e51e0288955 | 2026-01-05T07:11:03.926260Z | false |
lbcb-sci/RiNALMo | https://github.com/lbcb-sci/RiNALMo/blob/2c2c5c14a5ae609d8c560a5d9ca32e51e0288955/train_sec_struct_prediction.py | train_sec_struct_prediction.py | from typing import Mapping, Any
import torch
from torch import nn
from torch.optim.lr_scheduler import LinearLR
import lightning.pytorch as pl
from lightning.pytorch.loggers.wandb import WandbLogger
from lightning.pytorch.callbacks import ModelCheckpoint
from lightning.pytorch.callbacks.lr_monitor import LearningRateM... | python | Apache-2.0 | 2c2c5c14a5ae609d8c560a5d9ca32e51e0288955 | 2026-01-05T07:11:03.926260Z | false |
lbcb-sci/RiNALMo | https://github.com/lbcb-sci/RiNALMo/blob/2c2c5c14a5ae609d8c560a5d9ca32e51e0288955/train_expression_level.py | train_expression_level.py | import torch
import torch.nn.functional as F
import torch.nn as nn
from torch.optim import Adam
from torch.optim.lr_scheduler import LinearLR
import lightning.pytorch as pl
from lightning.pytorch.loggers.wandb import WandbLogger
from lightning.pytorch.callbacks.lr_monitor import LearningRateMonitor
from lightning.pyt... | python | Apache-2.0 | 2c2c5c14a5ae609d8c560a5d9ca32e51e0288955 | 2026-01-05T07:11:03.926260Z | false |
lbcb-sci/RiNALMo | https://github.com/lbcb-sci/RiNALMo/blob/2c2c5c14a5ae609d8c560a5d9ca32e51e0288955/rinalmo/pretrained.py | rinalmo/pretrained.py | import torch
from pathlib import Path
import gdown
import json
from rinalmo.data.alphabet import Alphabet
from rinalmo.model.model import RiNALMo
from rinalmo.config import model_config
DEFAULT_CACHE_DIR = Path.home() / ".cache" / "rinalmo_pretrained"
with open(Path(__file__).parent / "resources" / "model2gdisk.json... | python | Apache-2.0 | 2c2c5c14a5ae609d8c560a5d9ca32e51e0288955 | 2026-01-05T07:11:03.926260Z | false |
lbcb-sci/RiNALMo | https://github.com/lbcb-sci/RiNALMo/blob/2c2c5c14a5ae609d8c560a5d9ca32e51e0288955/rinalmo/config.py | rinalmo/config.py | import ml_collections as mlc
import copy
from rinalmo.data.alphabet import Alphabet
from rinalmo.data.constants import *
def model_config(name):
c = copy.deepcopy(default_config)
if name == "nano":
c.globals.embed_dim = 320
c.model.transformer.num_blocks = 6
c.model.transformer.num_h... | python | Apache-2.0 | 2c2c5c14a5ae609d8c560a5d9ca32e51e0288955 | 2026-01-05T07:11:03.926260Z | false |
lbcb-sci/RiNALMo | https://github.com/lbcb-sci/RiNALMo/blob/2c2c5c14a5ae609d8c560a5d9ca32e51e0288955/rinalmo/model/downstream.py | rinalmo/model/downstream.py | import torch
from torch import nn
from rinalmo.model.modules import Transformer
def _outer_concat(t1: torch.Tensor, t2: torch.Tensor):
# t1, t2: shape = B x L x E
assert t1.shape == t2.shape, f"Shapes of input tensors must match! ({t1.shape} != {t2.shape})"
seq_len = t1.shape[1]
a = t1.unsqueeze(-2).... | python | Apache-2.0 | 2c2c5c14a5ae609d8c560a5d9ca32e51e0288955 | 2026-01-05T07:11:03.926260Z | false |
lbcb-sci/RiNALMo | https://github.com/lbcb-sci/RiNALMo/blob/2c2c5c14a5ae609d8c560a5d9ca32e51e0288955/rinalmo/model/model.py | rinalmo/model/model.py | import torch
from torch import nn
from rinalmo.model.modules import Transformer, MaskedLanguageModelHead, TokenDropout
class RiNALMo(nn.Module):
def __init__(self, config):
super().__init__()
self.config = config
self.pad_tkn_idx = self.config.model.embedding['padding_idx']
self.... | python | Apache-2.0 | 2c2c5c14a5ae609d8c560a5d9ca32e51e0288955 | 2026-01-05T07:11:03.926260Z | false |
lbcb-sci/RiNALMo | https://github.com/lbcb-sci/RiNALMo/blob/2c2c5c14a5ae609d8c560a5d9ca32e51e0288955/rinalmo/model/modules.py | rinalmo/model/modules.py | import torch
from torch import nn
from torch.nn import functional as F
from rinalmo.model.attention import MultiHeadSelfAttention, FlashMultiHeadSelfAttention
import torch.utils.checkpoint as checkpoint
class TokenDropout(nn.Module):
def __init__(
self,
active: bool,
mask_ratio: float,
... | python | Apache-2.0 | 2c2c5c14a5ae609d8c560a5d9ca32e51e0288955 | 2026-01-05T07:11:03.926260Z | false |
lbcb-sci/RiNALMo | https://github.com/lbcb-sci/RiNALMo/blob/2c2c5c14a5ae609d8c560a5d9ca32e51e0288955/rinalmo/model/rope.py | rinalmo/model/rope.py | import torch
import torch.nn as nn
# Code heavily inspired by https://blog.eleuther.ai/rotary-embeddings/, GPT-NeoX (Pytorch) implementation
# and ESM2 implementation https://github.com/facebookresearch/esm/blob/main/esm/rotary_embedding.py
def rotate_half(x):
x1, x2 = x.chunk(2, dim=-1)
return torch.cat((-x2... | python | Apache-2.0 | 2c2c5c14a5ae609d8c560a5d9ca32e51e0288955 | 2026-01-05T07:11:03.926260Z | false |
lbcb-sci/RiNALMo | https://github.com/lbcb-sci/RiNALMo/blob/2c2c5c14a5ae609d8c560a5d9ca32e51e0288955/rinalmo/model/attention.py | rinalmo/model/attention.py | import torch
from torch import nn
import math
from rinalmo.model.rope import RotaryPositionEmbedding
from flash_attn import flash_attn_varlen_qkvpacked_func, flash_attn_qkvpacked_func
from flash_attn.layers.rotary import RotaryEmbedding
from flash_attn.bert_padding import unpad_input, pad_input
from einops import ... | python | Apache-2.0 | 2c2c5c14a5ae609d8c560a5d9ca32e51e0288955 | 2026-01-05T07:11:03.926260Z | false |
lbcb-sci/RiNALMo | https://github.com/lbcb-sci/RiNALMo/blob/2c2c5c14a5ae609d8c560a5d9ca32e51e0288955/rinalmo/utils/sec_struct.py | rinalmo/utils/sec_struct.py | import numpy as np
from sklearn.metrics import precision_score, recall_score
from pathlib import Path
def _read_relevant_lines(file_path: Path):
with open(file_path, 'r') as f:
lines = f.readlines()
lines = list(filter(lambda line: not line.lstrip().startswith("#"), lines)) # Ignore comment lines
... | python | Apache-2.0 | 2c2c5c14a5ae609d8c560a5d9ca32e51e0288955 | 2026-01-05T07:11:03.926260Z | false |
lbcb-sci/RiNALMo | https://github.com/lbcb-sci/RiNALMo/blob/2c2c5c14a5ae609d8c560a5d9ca32e51e0288955/rinalmo/utils/download.py | rinalmo/utils/download.py | from tqdm import tqdm, TqdmWarning
import ftplib
from pathlib import Path
import warnings
import itertools
import gzip
import shutil
import requests
from zipfile import ZipFile
import os
import tarfile
import json
import gdown
# Ignore tqdm's clamping warnings
warnings.filterwarnings("ignore", category=TqdmWarning)... | python | Apache-2.0 | 2c2c5c14a5ae609d8c560a5d9ca32e51e0288955 | 2026-01-05T07:11:03.926260Z | false |
lbcb-sci/RiNALMo | https://github.com/lbcb-sci/RiNALMo/blob/2c2c5c14a5ae609d8c560a5d9ca32e51e0288955/rinalmo/utils/prepare_mrna_te_and_el_data.py | rinalmo/utils/prepare_mrna_te_and_el_data.py | from typing import Union, Optional
from pathlib import Path
import pandas as pd
from sklearn.model_selection import KFold
DATASETS = ['Muscle', 'pc3', 'HEK']
def prepare_te_and_el_data(
data_root: Optional[Union[Path, str]],
kfold_splits: int = 10
):
data_root = Path(data_root)
for dataset in DATASE... | python | Apache-2.0 | 2c2c5c14a5ae609d8c560a5d9ca32e51e0288955 | 2026-01-05T07:11:03.926260Z | false |
lbcb-sci/RiNALMo | https://github.com/lbcb-sci/RiNALMo/blob/2c2c5c14a5ae609d8c560a5d9ca32e51e0288955/rinalmo/utils/scaler.py | rinalmo/utils/scaler.py | import torch
import torch.nn as nn
import numpy as np
# Inspired by https://scikit-learn.org/stable/modules/generated/sklearn.preprocessing.StandardScaler.html
class StandardScaler(nn.Module):
def __init__(self) -> None:
super().__init__()
self.register_buffer("_mean", torch.tensor([0.0]))
... | python | Apache-2.0 | 2c2c5c14a5ae609d8c560a5d9ca32e51e0288955 | 2026-01-05T07:11:03.926260Z | false |
lbcb-sci/RiNALMo | https://github.com/lbcb-sci/RiNALMo/blob/2c2c5c14a5ae609d8c560a5d9ca32e51e0288955/rinalmo/utils/finetune_callback.py | rinalmo/utils/finetune_callback.py | from lightning import LightningModule
from lightning.pytorch.callbacks import BaseFinetuning
from torch.optim.optimizer import Optimizer
import re
import yaml
def _is_parent_module_unfrozen(module_name, potential_parent_modules):
for potential_parent_module_name in potential_parent_modules.keys():
if modu... | python | Apache-2.0 | 2c2c5c14a5ae609d8c560a5d9ca32e51e0288955 | 2026-01-05T07:11:03.926260Z | false |
lbcb-sci/RiNALMo | https://github.com/lbcb-sci/RiNALMo/blob/2c2c5c14a5ae609d8c560a5d9ca32e51e0288955/rinalmo/utils/splice_site_metrics.py | rinalmo/utils/splice_site_metrics.py | import torch
def accuracy(tp, tn, all):
acc = ((tp + tn) / all)
return torch.round(acc * 100, decimals=2)
def precision(tp, fp):
pre = (tp / (tp + fp))
return torch.round(pre * 100, decimals=2)
def recall(tp, fn):
sn = (tp / (tp + fn))
return torch.round(sn * 100, decimals=2)
def specificity... | python | Apache-2.0 | 2c2c5c14a5ae609d8c560a5d9ca32e51e0288955 | 2026-01-05T07:11:03.926260Z | false |
lbcb-sci/RiNALMo | https://github.com/lbcb-sci/RiNALMo/blob/2c2c5c14a5ae609d8c560a5d9ca32e51e0288955/rinalmo/utils/finetune_callback_nc.py | rinalmo/utils/finetune_callback_nc.py | from lightning import LightningModule
from lightning.pytorch.callbacks import BaseFinetuning
from torch.optim.optimizer import Optimizer
import re
import yaml
def _collect_leaf_module_names(pl_module: LightningModule):
leaf_module_names = set()
for module_name, _ in pl_module.named_modules():
# Ignor... | python | Apache-2.0 | 2c2c5c14a5ae609d8c560a5d9ca32e51e0288955 | 2026-01-05T07:11:03.926260Z | false |
lbcb-sci/RiNALMo | https://github.com/lbcb-sci/RiNALMo/blob/2c2c5c14a5ae609d8c560a5d9ca32e51e0288955/rinalmo/utils/prepare_ncrna_classification_data.py | rinalmo/utils/prepare_ncrna_classification_data.py | from rpy2.robjects import r
from rpy2.robjects import pandas2ri
from rpy2.robjects.conversion import localconverter
import rpy2.robjects.packages as rpackages
from rpy2.robjects.vectors import StrVector
import pandas as pd
import numpy as np
from sklearn.tree import DecisionTreeClassifier
from sklearn.model_selection ... | python | Apache-2.0 | 2c2c5c14a5ae609d8c560a5d9ca32e51e0288955 | 2026-01-05T07:11:03.926260Z | false |
lbcb-sci/RiNALMo | https://github.com/lbcb-sci/RiNALMo/blob/2c2c5c14a5ae609d8c560a5d9ca32e51e0288955/rinalmo/utils/ncrna_classification/ExpConfiguration.py | rinalmo/utils/ncrna_classification/ExpConfiguration.py | # Adopted from https://github.com/bioinformatics-sannio/ncrna-deep
from rinalmo.utils.ncrna_classification.seqEncoders import *
nlayers=[0,1,2,3] # deep architecture layers
bnoise=[200] # boundary noise simulation
t=[1,2,5,10] # number of random (non functional) seqs for each test seq
padds = ['random'] # how paddin... | python | Apache-2.0 | 2c2c5c14a5ae609d8c560a5d9ca32e51e0288955 | 2026-01-05T07:11:03.926260Z | false |
lbcb-sci/RiNALMo | https://github.com/lbcb-sci/RiNALMo/blob/2c2c5c14a5ae609d8c560a5d9ca32e51e0288955/rinalmo/utils/ncrna_classification/seqEncoders.py | rinalmo/utils/ncrna_classification/seqEncoders.py | # Adopted from https://github.com/bioinformatics-sannio/ncrna-deep
"""Provides sequence to 2D representation conversion utilities."""
from Bio import SeqIO
from Bio.Seq import Seq
from Bio.SeqRecord import SeqRecord
#from Bio.Alphabet import IUPAC
import numpy as np
import math
import itertools
from textwrap import w... | python | Apache-2.0 | 2c2c5c14a5ae609d8c560a5d9ca32e51e0288955 | 2026-01-05T07:11:03.926260Z | false |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.