repo_name stringlengths 6 97 | path stringlengths 3 341 | text stringlengths 8 1.02M |
|---|---|---|
liuxb555/earthengine-py-examples | MachineLearning/clustering.py | <filename>MachineLearning/clustering.py
import ee
import geemap
# Create a map centered at (lat, lon).
Map = geemap.Map(center=[40, -100], zoom=4)
# Load a pre-computed Landsat composite for input.
input = ee.Image('LANDSAT/LE7_TOA_1YEAR/2001')
# Define a region in which to generate a sample of the input.
region = ... |
liuxb555/earthengine-py-examples | Image/texture.py | <filename>Image/texture.py<gh_stars>10-100
import ee
import geemap
# Create a map centered at (lat, lon).
Map = geemap.Map(center=[40, -100], zoom=4)
import math
# Load a high-resolution NAIP image.
image = ee.Image('USDA/NAIP/DOQQ/m_3712213_sw_10_1_20140613')
# Zoom to San Francisco, display.
Map.setCenter(-122.46... |
liuxb555/earthengine-py-examples | ImageCollection/metadata.py | import ee
import geemap
# Create a map centered at (lat, lon).
Map = geemap.Map(center=[40, -100], zoom=4)
# Load a Landsat 8 ImageCollection for a single path-row.
collection = ee.ImageCollection('LANDSAT/LC08/C01/T1_TOA') \
.filter(ee.Filter.eq('WRS_PATH', 44)) \
.filter(ee.Filter.eq('WRS_ROW', 34)) \
... |
liuxb555/earthengine-py-examples | Gena/landsat_median.py | <reponame>liuxb555/earthengine-py-examples<gh_stars>10-100
import ee
import geemap
# Create a map centered at (lat, lon).
Map = geemap.Map(center=[40, -100], zoom=4)
collection = ee.ImageCollection('LANDSAT/LC08/C01/T1_TOA')\
.filter(ee.Filter.eq('WRS_PATH', 44))\
.filter(ee.Filter.eq('WRS_ROW', 34))\
.fi... |
liuxb555/earthengine-py-examples | GetStarted/07_image_statistics.py | import ee
import geemap
# Create a map centered at (lat, lon).
Map = geemap.Map(center=[40, -100], zoom=4)
# Load and display a Landsat TOA image.
image = ee.Image('LANDSAT/LC08/C01/T1_TOA/LC08_044034_20140318')
Map.addLayer(image, {'bands': ['B4', 'B3', 'B2'], 'max': 0.3}, 'Landsat 8')
# Create an arbitrary rectan... |
liuxb555/earthengine-py-examples | FeatureCollection/extract_image_by_polygon.py | import ee
import geemap
# Create a map centered at (lat, lon).
Map = geemap.Map(center=[40, -100], zoom=4)
# Extract landsant image based on individual polygon
def extract_landsat(feature):
geom = ee.Feature(feature).geometry()
image = ee.ImageCollection('LANDSAT/LC08/C01/T1_SR') \
.filterDate('2019-... |
liuxb555/earthengine-py-examples | Datasets/sentinel-2.py | import ee
import geemap
# Create a map centered at (lat, lon).
Map = geemap.Map(center=[40, -100], zoom=4)
img = ee.Image("COPERNICUS/S2_SR/20191115T074201_20191115T075706_T37MBM")
ndvi = img.normalizedDifference(['B8','B4'])
pal = ["red","yellow","green"]
Map.setCenter(36.9,-7.7, 12)
Map.addLayer(ndvi,{'min':0,'max'... |
lotusxai/join-face-detection-project | src/train.py | import numpy as np
import pandas as pd
import predict
import matplotlib.pyplot as plt
import seaborn as sns
from sklearn import preprocessing
import time
from datetime import datetime
import warnings
import os
warnings.filterwarnings('ignore')
# ML libraries
import lightgbm as lgb
import xgboost as xgb
from xgboost imp... |
lotusxai/join-face-detection-project | src/predict.py | import train
import os
import numpy as np
import pandas as pd
import matplotlib.pyplot as plt
import seaborn as sns
from sklearn import preprocessing
import time
from datetime import datetime
import warnings
warnings.filterwarnings('ignore')
# ML libraries
import lightgbm as lgb
import xgboost as xgb
from xgboost impo... |
lotusxai/join-face-detection-project | src/dataset.py | <gh_stars>1-10
import numpy as np
import pandas as pd
import matplotlib.pyplot as plt
import seaborn as sns
from sklearn import preprocessing
import time
from datetime import datetime
import warnings
warnings.filterwarnings('ignore')
import os
# ML libraries
import lightgbm as lgb
import xgboost as xgb
import librosa.... |
lotusxai/join-face-detection-project | src/preprocessing.py | <filename>src/preprocessing.py
import numpy as np
import pandas as pd
import predict
import matplotlib.pyplot as plt
import seaborn as sns
from sklearn import preprocessing
import time
from datetime import datetime
import warnings
import os
warnings.filterwarnings('ignore')
# ML libraries
import lightgbm as lgb
import ... |
lotusxai/join-face-detection-project | src/logistic_regression.py | <reponame>lotusxai/join-face-detection-project
# New split function, for one forecast day
import numpy as np
import pandas as pd
import matplotlib.pyplot as plt
from sklearn import linear_model
import time
|
steppi/gilda | gilda/tests/test_term.py | <filename>gilda/tests/test_term.py<gh_stars>10-100
from gilda.term import Term, get_identifiers_url
def test_standalone_get_url():
assert get_identifiers_url('UP', 'P12345') == \
'https://identifiers.org/uniprot:P12345'
assert get_identifiers_url('HGNC', '12345') == \
'https://identifiers.org/... |
steppi/gilda | benchmarks/bioid_evaluation.py | <reponame>steppi/gilda
"""This script benchmarks Gilda on the BioCreative VII BioID corpus.
It dumps multiple result tables in the results folder."""
import json
import os
from collections import defaultdict
from copy import deepcopy
from datetime import datetime
from functools import lru_cache
from textwrap import ded... |
steppi/gilda | gilda/tests/test_grounder.py | <filename>gilda/tests/test_grounder.py
from gilda.term import Term
from gilda.grounder import Grounder, filter_for_organism
from . import appreq
gr = Grounder()
def test_grounder():
entries = gr.lookup('kras')
statuses = [e.status for e in entries]
assert 'assertion' in statuses
for entry in entries... |
steppi/gilda | gilda/resources/__init__.py | <filename>gilda/resources/__init__.py<gh_stars>0
import os
import boto3
import pystow
import logging
import botocore
from gilda import __version__
logger = logging.getLogger(__name__)
HERE = os.path.abspath(os.path.dirname(__file__))
MESH_MAPPINGS_PATH = os.path.join(HERE, 'mesh_mappings.tsv')
resource_dir = pystow.... |
steppi/gilda | gilda/app/__init__.py | import argparse
from .app import app
def main():
parser = argparse.ArgumentParser(
description='Run the grounding app.')
parser.add_argument('--host', default='0.0.0.0')
parser.add_argument('--port', default=8001, type=int)
args = parser.parse_args()
app.run(host=args.host, port=args.port,... |
steppi/gilda | scripts/git_patch_process.py | <filename>scripts/git_patch_process.py
"""This is a helper script to edit the git patch created by
changes in grounding_cell_designer.py on the COVID-19 Disease Map XMLs.
The edited patch can then be applied and committed to that repo."""
import sys
def get_blocks(fname):
"""Get blocks of the diff that can be ind... |
steppi/gilda | gilda/tests/test_api.py | from gilda.tests import appreq
from gilda.api import *
def test_api_ground():
scores = ground('kras')
assert appreq(scores[0].score, 0.9845), scores
scores = ground('ROS', 'reactive oxygen')
assert scores[0].term.db == 'MESH', scores
assert scores[0].url == 'https://identifiers.org/mesh:D017382'
... |
steppi/gilda | gilda/api.py | <filename>gilda/api.py<gh_stars>10-100
__all__ = ['ground', 'get_models', 'get_names']
from gilda.grounder import Grounder
class GrounderInstance(object):
def __init__(self):
self.grounder = None
def get_grounder(self):
if self.grounder is None:
self.grounder = Grounder()
... |
steppi/gilda | gilda/term.py | class Term(object):
"""Represents a text entry corresponding to a grounded term.
Attributes
----------
norm_text : str
The normalized text corresponding to the text entry, used for lookups.
text : str
The text entry itself.
db : str
The database / name space correspondin... |
steppi/gilda | benchmarks/medmentions_responsiveness_benchmark.py | # -*- coding: utf-8 -*-
"""This script measures the responsiveness (i.e., speed) of Gilda on the
MedMentions corpus in three settings: when used as a python package,
a local web service or through the remote public web service.
"""
import pathlib
import random
import time
from textwrap import dedent
from typing impor... |
steppi/gilda | scripts/grounding_cell_designer.py | """This script can process a set of Cell Designer XML files that are
part of the COVID-19 Disease Map project, detect species with missing
grounding, ground these based on their string name with Gilda, and
serialize the changes back into XML files."""
import re
import itertools
from collections import defaultdict
from... |
steppi/gilda | benchmarks/bioid_f1_breakdown.py | <reponame>steppi/gilda
import os
import json
from bioid_evaluation import BioIDBenchmarker
HERE = os.path.dirname(os.path.abspath(__file__))
data_path = os.path.join(HERE, 'data')
try:
with open(os.path.join(data_path, 'equivalences.json')) as f:
equivalences = json.load(f)
except FileNotFoundError:
... |
steppi/gilda | scripts/generate_uniprot_chain_proonto_mappings.py | import re
import csv
import obonet
from collections import defaultdict
from gilda.term import Term
from gilda.grounder import Grounder, normalize
from biomappings.resources import append_prediction_tuples
# This is from the Reach bioresources file as a convenient
# source of pre-processed synonyms
UNIPROT = '/Users/be... |
steppi/gilda | gilda/resources/__main__.py | from . import get_grounding_terms, get_gilda_models
if __name__ == '__main__':
get_grounding_terms()
get_gilda_models()
|
steppi/gilda | setup.py | import re
from os import path
from setuptools import setup, find_packages
here = path.abspath(path.dirname(__file__))
with open(path.join(here, 'README.md'), encoding='utf-8') as fh:
long_description = fh.read()
with open(path.join(here, 'gilda', '__init__.py'), 'r') as fh:
for line in fh.readlines():
... |
steppi/gilda | benchmarks/medmentions.py | """This script grounds entries in the MedMentions data set available at
https://github.com/chanzuckerberg/MedMentions. This can serve both as a
benchmark and as a bsis for creating mappings between the namespaces
Gilda grounds to and UMLS, which is used for MedMentions groundings.
.. code-block:: bibtex
@article{... |
steppi/gilda | scripts/generate_mesh_mappings.py | <filename>scripts/generate_mesh_mappings.py
import os
from collections import defaultdict
from gilda.generate_terms import *
from indra.databases import mesh_client
resources = os.path.join(os.path.dirname(__file__), os.path.pardir,
'gilda', 'resources')
def is_protein(mesh_id):
return ... |
mgleeming/eicExtractor | eicExtractor.py | <reponame>mgleeming/eicExtractor<gh_stars>0
import os, sys, pymzml, argparse
import numpy as np
DEFAULT_EXTRACTION_WIDTH = 0.01
parser = argparse.ArgumentParser(
description = 'Extract chromatographic data from mzML files'
)
parser.add_argument('mzmlFile',
type = str,
help... |
bunto1/stats | scripts/generate_boxscore.py | <gh_stars>0
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""Generating a boxscore view/chart/table from a single game."""
# Here comes your imports
import sys
import logging as log
import pandas as pd
# Here comes your (few) global variables
# Here comes your class definitions
# Here comes your function definiti... |
bunto1/stats | scripts/parse_game_type_x.py | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""Parsing of a csv game tracking sheet of type 'X', saving data in consice and relevant manner."""
# Here comes your imports
import sys
import logging as log
import pandas as pd
# Here comes your (few) global variables
# Here comes your class definitions
# Here comes... |
bunto1/stats | scripts/boxscore.py | import pandas as pd
import matplotlib.pyplot as plt
# see: https://towardsdatascience.com/simple-little-tables-with-matplotlib-9780ef5d0bc4
players = pd.DataFrame([
("McDavid", "Connor"), \
("MacKinnon", "Nathan"), \
("Matthews", "Auston") \
], columns=["name", "prename"])
col = ["id"... |
Ecg-Ai-com/ecgai-overload | tests/test_metaclass.py | <filename>tests/test_metaclass.py
import pytest
from src.ecgai_overload.metaclass import NoMatchingOverload
from tests.mock_class import (
RootClass,
int_overload,
str_overload,
int_str_overload,
int_int_overload,
str_str_overload,
SubClass,
flt_flt_overload,
)
class TestMetaClass:
... |
Ecg-Ai-com/ecgai-overload | src/example/main.py | # from src.ecgai_overload.metaclass import overload, OverloadDict, OverloadMeta
#
#
# def overload_dict_usage():
# print("OVERLOAD DICT USAGE")
# d = OverloadDict()
#
# @overload
# def f(self):
# pass
#
# d["a"] = 1
# d["a"] = 2
# d["b"] = 3
# d["f"] = f
# d["f"] = f
# pr... |
Ecg-Ai-com/ecgai-overload | tests/mock_class.py | from src.ecgai_overload.metaclass import OverloadMeta, overload
int_overload = f'int overload'
str_overload = f'str overload'
int_str_overload = f'int, str overload'
int_int_overload = f'int, int overload'
str_str_overload = f'str, str overload'
flt_flt_overload = f'float, float overload from sub class'
# noinspecti... |
rafaank/rkpylib | rkpylib/rksocket.py | <reponame>rafaank/rkpylib<filename>rkpylib/rksocket.py
import socket
""" Yet to be developed """
def process_start(s_sock):
raw_request = s_sock.recv(32)
s_sock.send(ok_message)
s_sock.close()
sys.exit(0) #kill the child process
def create_socket_connection(ipaddr, port):
s = socket.... |
rafaank/rkpylib | rkpylib/__init__.py | <gh_stars>0
__all__ = ['rkutils', 'rkdatasource', 'rkthread','rkhttp']
|
rafaank/rkpylib | rkpylib/backups/rkhttp_globals.py | <reponame>rafaank/rkpylib
from .rkdatasource import RKDataSource
from .rkutils import RKDict
from threading import Lock
def __init_globals__(globals):
globals.register('counter', 0)
dspool = list()
dspool_lock = list()
for i in range(5):
ds = RKDataSource(server='127.0.0.1'... |
rafaank/rkpylib | rkpylib/backups/rkhttp_copy.py | import errno
import socket
import time
from rkutils import RKDict, setInterval, trace_memory_leaks
from http.server import BaseHTTPRequestHandler, HTTPServer
from urllib import parse
from socketserver import ThreadingMixIn
from threading import Thread, Lock
from rklogger import RKLogger
import json
import t... |
rafaank/rkpylib | rkpylib/rkthread.py | import threading
import queue
from enum import Enum
import time
class ThreadStatus(Enum):
NOT_STARTED = 1
IDLE = 2
RUNNING = 3
TERMINATED = 4
MAX_JOBS_PER_THREAD = 10
class RKThread(threading.Thread):
"Thread-Pool Runner thread"
def __init__(self, manager, thread_id, queue, queue_lock, on_run... |
rafaank/rkpylib | rkpylib/rkclusterlockserver.py | import ssl
from socketserver import ThreadingMixIn, TCPServer, BaseRequestHandler
from threading import Lock
import socket
import platform, os, sys, getopt
from rkclusterlock import RKClusterLock
import rkutils
import logging
help_str = '''
helo :
Welcome message from server
reg <app_name> :
Register a ne... |
rafaank/rkpylib | tests/rktest.py | <gh_stars>0
import sys
import json
import time
import datetime
import random
from bson import json_util
from rkpylib.rkdatasource import RKDataSource
from rkpylib.rkhttp import RKHTTP
import pymongo
@RKHTTP.route('/pool')
def pool_example(globals, request, response):
#ds = RKDataSource(server='172.16.31... |
rafaank/rkpylib | setup.py | from setuptools import setup, find_packages
with open('README.md') as f:
readme = f.read()
with open('LICENSE') as f:
license = f.read()
setup(
name='RKPyLib',
version='0.0.1',
description='Efficient customised python wrapper libraries ',
long_description=readme,
author='rafaank',
author_email='<EMAIL>',
ur... |
rafaank/rkpylib | tests/test_cgi.py | from http.server import HTTPServer, BaseHTTPRequestHandler
import cgi
class WebServerHandler(BaseHTTPRequestHandler):
form_html = \
'''
<form method='POST' enctype='multipart/form-data' action='/hello'>
<h2>What would you like me to say?</h2>
<input name="message" type="text"><inpu... |
rafaank/rkpylib | tests/rkmain.py | <gh_stars>0
from rkpylib.rkhttp import RKHTTPGlobals, RKHTTP
from rkpylib.rkdatasource import RKDataSource
from rkpylib.rkutils import trace_memory_leaks
from rktest import *
from test import *
import gc
import tracemalloc
import pprint
import socket
if __name__ == '__main__':
''' Function to get a free dat... |
rafaank/rkpylib | rkpylib/rkclusterlock.py | <reponame>rafaank/rkpylib
# import ssl
import socket
class RKClusterLock():
WELCOME = 'helo'
REGISTER = 'reg'
ACQUIRE = 'acq'
LOCKED = 'lck'
RELEASE = 'rel'
FAILED = 'fail'
HELP = 'help'
ERROR = 'err'
QUIT = 'quit'
SEPARATOR =... |
rafaank/rkpylib | rkpylib/backups/rkhttp_backup.py | import time
import os
import sys
import errno
from multiprocessing import Process
from http.server import BaseHTTPRequestHandler, HTTPServer
from urllib import parse
from socketserver import ForkingMixIn, ThreadingMixIn
ok_message = 'HTTP/1.0 200 OK\n\n'
nok_message = 'HTTP/1.0 404 NotFound\n\n'
class MyC... |
rafaank/rkpylib | tests/sample.py | <filename>tests/sample.py<gh_stars>0
import os
import sys
import json
import socket
import traceback
from rkpylib.rkhttp import RKHTTP
from urllib import parse
ok_response_text = 'HTTP/1.1 200 OK\n\n'
@RKHTTP.route('/hello')
def hello(globals, request, response):
response.send_response(200)
response.send_... |
rafaank/rkpylib | rkpylib/rkdatasource.py | <filename>rkpylib/rkdatasource.py
from pymongo import MongoClient
from threading import Lock
class RKDataSource():
"Wrapper class to connect to MongoDB, also implements a lock that can be used to thread-safe if the connection is used in a pool for reusability"
def __init__(self, **kwargs):
self.datab... |
rafaank/rkpylib | rkpylib/rkclusterlock_sample.py | <reponame>rafaank/rkpylib<gh_stars>0
import time
from threading import Thread, current_thread
from rkclusterlock import RKClusterLock
def runClient():
#rlock = RKClusterLock('localhost', 9191,'FKAPP')
rlock = RKClusterLock('172.16.58.3', 9191,'FKAPP')
cur_thread = current_thread()
while 1:
da... |
rafaank/rkpylib | rkpylib/rkutils.py | <gh_stars>0
import threading
import linecache
import os
import tracemalloc
class RKDict(dict):
"""Simple dot.notation access to dictionary attributes"""
__getattr__ = dict.get
__setattr__ = dict.__setitem__
__delattr__ = dict.__delitem__
def isdefined(x):
try: x
except NameError: x = None... |
rafaank/rkpylib | rkpylib/rkhttp.py | <filename>rkpylib/rkhttp.py
"""RKHTTPServer
A single-core multi-threaded HTTPServer that enables sharing of data
and information amongst http requests using a global instance of type RKHTTPGlobals.
RKHTTPGlobals
A thread-safe storage class, that makes it easy to store and retrieve variables
that can be shared amongst ... |
sffxzzp/SteamChineseChecker | cn.py | <filename>cn.py
#!/bin/python3
# -*- coding: UTF-8 -*-
import json, urllib, requests, math
from bs4 import BeautifulSoup
def main():
oricount = len(json.loads(open('data.json', 'r', encoding='utf-8').read()))
maxcount = json.loads(requests.get('https://store.steampowered.com/curator/31318556/ajaxgetfilteredrecommend... |
prman-pixar/RenderManForBlender | rman_translators/rman_openvdb_translator.py | from .rman_translator import RmanTranslator
from ..rman_sg_nodes.rman_sg_openvdb import RmanSgOpenVDB
from ..rfb_utils import filepath_utils
from ..rfb_utils import transform_utils
from ..rfb_utils import string_utils
from ..rfb_utils import scenegraph_utils
from ..rfb_utils.envconfig_utils import envconfig
from ..rfb_... |
prman-pixar/RenderManForBlender | rfb_utils/draw_utils.py | from . import shadergraph_utils
from ..rman_constants import NODE_LAYOUT_SPLIT
from .. import rman_config
from .. import rfb_icons
import bpy
import re
def draw_indented_label(layout, label, level):
for i in range(level):
layout.label(text='', icon='BLANK1')
if label:
layout.label(text=label)
... |
prman-pixar/RenderManForBlender | rman_properties/rman_properties_misc/__init__.py | from bpy.props import PointerProperty, StringProperty, BoolProperty, \
EnumProperty, IntProperty, FloatProperty, FloatVectorProperty, \
CollectionProperty, BoolVectorProperty
from ...rfb_utils import shadergraph_utils
from ...rfb_logger import rfb_log
from ... import rman_config
import bpy
class RendermanBl... |
prman-pixar/RenderManForBlender | rman_operators/rman_operators_editors/rman_operators_editors_lightmixer.py | <filename>rman_operators/rman_operators_editors/rman_operators_editors_lightmixer.py
from bpy.props import (StringProperty, BoolProperty, EnumProperty, IntProperty)
from ...rman_ui.rman_ui_base import CollectionPanel
from ...rfb_utils import scene_utils
from ...rfb_utils import shadergraph_utils
from ...rfb_logger ... |
prman-pixar/RenderManForBlender | rman_scene.py | # Translators
from .rman_translators.rman_camera_translator import RmanCameraTranslator
from .rman_translators.rman_light_translator import RmanLightTranslator
from .rman_translators.rman_lightfilter_translator import RmanLightFilterTranslator
from .rman_translators.rman_mesh_translator import RmanMeshTranslator
from .... |
prman-pixar/RenderManForBlender | rman_ui/rman_ui_volume_panels.py | from .rman_ui_base import CollectionPanel
from ..rfb_utils.draw_utils import _draw_ui_from_rman_config
from ..rfb_utils import object_utils
from ..rfb_logger import rfb_log
from bpy.types import Panel
import bpy
class VOLUME_PT_renderman_openvdb_attributes(CollectionPanel, Panel):
bl_context = "data"
bl_label ... |
prman-pixar/RenderManForBlender | rman_operators/rman_operators_editors/rman_operators_editors_stylized.py | from bpy.props import (StringProperty, BoolProperty, EnumProperty, IntProperty)
from ...rfb_utils.draw_utils import draw_node_properties_recursive
from ...rfb_utils import shadergraph_utils
from ...rfb_utils import object_utils
from ...rfb_logger import rfb_log
from ... import rfb_icons
from ...rman_operators.rman_ope... |
prman-pixar/RenderManForBlender | rfb_utils/rman_socket_utils.py | from ..rman_constants import RFB_ARRAYS_MAX_LEN, __RMAN_SOCKET_MAP__
from .shadergraph_utils import has_lobe_enable_props
def update_inputs(node):
if node.bl_idname == 'PxrMeshLightLightNode':
return
for prop_name in node.prop_names:
page_name = prop_name
if node.prop_meta[page_name]['r... |
prman-pixar/RenderManForBlender | rman_operators/rman_operators_utils.py | <gh_stars>100-1000
from ..rfb_logger import rfb_log
from ..rfb_utils import shadergraph_utils
from ..rfb_utils import string_utils
from ..rfb_utils import texture_utils
from ..rfb_utils import filepath_utils
from bpy.types import Operator
from bpy.props import StringProperty
import os
import zipfile
import bpy
import s... |
prman-pixar/RenderManForBlender | rfb_utils/osl_utils.py | <reponame>prman-pixar/RenderManForBlender<gh_stars>100-1000
from ..rfb_logger import rfb_log
import bpy
import re
import os
def readOSO(filePath):
import oslquery as oslq
oinfo = oslq.OslQuery()
oinfo.open(filePath)
shader_meta = {}
prop_names = []
shader_meta["shader"] = oinfo.shadername()
... |
prman-pixar/RenderManForBlender | rman_operators/rman_operators_printer.py | from bpy.types import Operator
from bpy.props import StringProperty, IntProperty, CollectionProperty, EnumProperty, BoolProperty
import bpy
class PRMAN_OT_Renderman_printer(Operator):
"""An operator to simply print messages."""
bl_idname = "renderman.printer"
bl_label = "RenderMan Message"
bl_options ... |
prman-pixar/RenderManForBlender | rman_translators/rman_hair_translator.py | from .rman_translator import RmanTranslator
from ..rfb_utils import object_utils
from ..rfb_utils import scenegraph_utils
from ..rman_sg_nodes.rman_sg_hair import RmanSgHair
from mathutils import Vector
import math
import bpy
import numpy as np
class RmanHairTranslator(RmanTranslator):
def __init__(self, ... |
prman-pixar/RenderManForBlender | rfb_utils/shadergraph_utils.py | from . import color_utils
from . import filepath_utils
from . import string_utils
from . import object_utils
from . import scene_utils
from ..rman_constants import RMAN_STYLIZED_FILTERS, RMAN_STYLIZED_PATTERNS, RMAN_UTILITY_PATTERN_NAMES, RFB_FLOAT3
import math
import bpy
class BlNodeInfo:
def __init__(self, sg_no... |
prman-pixar/RenderManForBlender | rfb_utils/color_manager_blender.py | import os
import bpy
import sys
from ..rfb_utils.envconfig_utils import envconfig
try:
from rman_utils.color_manager import ColorManager
except:
ColorManager = None
__clrmgr__ = None
class ColorManagerBlender(ColorManager):
def __init__(self, config_path, **kwargs):
super(ColorManagerBlender, self... |
prman-pixar/RenderManForBlender | rman_properties/rman_properties_scene/__init__.py | from bpy.props import PointerProperty, StringProperty, BoolProperty, \
EnumProperty, IntProperty, FloatProperty, \
CollectionProperty
from ...rfb_utils.envconfig_utils import envconfig
from ...rfb_utils.prefs_utils import get_pref
from ...rfb_logger import rfb_log
from ... import rman_render
from ... import rm... |
prman-pixar/RenderManForBlender | rman_properties/rman_properties_volume/__init__.py | <reponame>prman-pixar/RenderManForBlender<filename>rman_properties/rman_properties_volume/__init__.py
from bpy.props import BoolProperty, PointerProperty, StringProperty, EnumProperty
from ...rfb_logger import rfb_log
from ...rman_config import RmanBasePropertyGroup
from ...rfb_utils import filepath_utils
import os
i... |
prman-pixar/RenderManForBlender | rman_operators/rman_operators_vol_aggregates.py | from bpy.props import StringProperty, BoolProperty, EnumProperty, IntProperty, CollectionProperty, PointerProperty
from ..rfb_utils import string_utils
from ..rfb_logger import rfb_log
from ..rfb_utils import shadergraph_utils
from ..rfb_utils import scenegraph_utils
from ..rfb_utils import object_utils
from ..rfb_uti... |
prman-pixar/RenderManForBlender | rman_operators/rman_operators_editors/rman_operators_editors_vol_aggregates.py | <gh_stars>100-1000
from bpy.props import (StringProperty, BoolProperty, EnumProperty, IntProperty)
from ...rman_ui.rman_ui_base import CollectionPanel
from ...rfb_logger import rfb_log
from ...rman_operators.rman_operators_collections import return_empty_list
from ...rman_config import __RFB_CONFIG_DICT__ as rfb... |
MikeVald/CentroMultimedia | CentroMultimedia.py | import Tkinter as tk
import ttk
import PIL
from PIL import Image
from PIL import ImageTk
from vlc import Instance
import time
import os
import sys
#import pathlib
import webbrowser
class VLC:# Crea instancia de VLC
def __init__(self):
self.Player = Instance('--loop')#lo genera en modo bucle
def addP... |
lijun99/altar | cuda/cuda/bayesian/cudaCoolingStep.py | # -*- python -*-
# -*- coding: utf-8 -*-
#
# (c) 2013-2021 parasim inc
# (c) 2010-2021 california institute of technology
# all rights reserved
#
# Author(s): <NAME>
# the package
import altar
import altar.cuda
# declaration
class cudaCoolingStep:
"""
Encapsulation of the state of the calculation at some par... |
lijun99/altar | models/seismic/seismic/cuda/cudaCascaded.py | <gh_stars>1-10
# -*- python -*-
# -*- coding: utf-8 -*-
#
# (c) 2013-2021 parasim inc
# (c) 2010-2021 california institute of technology
# all rights reserved
#
# Author(s): <NAME>
# the package
import altar
import altar.cuda
from altar.cuda import cublas
from altar.cuda import libcuda
from altar.cuda.models.cudaBaye... |
lijun99/altar | models/seismic/seismic/cuda/__init__.py | <reponame>lijun99/altar<gh_stars>1-10
# -*- python -*-
# -*- coding: utf-8 -*-
#
# <NAME> <<EMAIL>>
#
# (c) 2013-2021 parasim inc
# (c) 2010-2021 california institute of technology
# all rights reserved
#
# the package
import altar
import altar.cuda
# publish the protocol for probability distributions
from altar.cuda... |
lijun99/altar | cuda/cuda/models/cudaParameterEnsemble.py | <gh_stars>1-10
# -*- python -*-
# -*- coding: utf-8 -*-
#
# (c) 2013-2021 parasim inc
# (c) 2010-2021 california institute of technology
# all rights reserved
#
# Author(s): <NAME>
# currently not used; use psets in cudaBayesian instead
# the package
import altar
import altar.cuda
# the protocol
from .cudaParameter i... |
lijun99/altar | models/seismic/examples/utils/meanModelKinematic.py | <reponame>lijun99/altar
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
#
# Author(s): <NAME>
import h5py
import numpy
def MeanModel():
"""
Compute the mean model of the AlTar step results
Also convert the AlTar2 output to theta matrix format in AlTar-1.1
"""
# open input/output
input = h5py... |
lijun99/altar | models/regression/examples/synthetic/Linear.py | # Linear Regression synthetic example data generator
import numpy as np
import matplotlib.pyplot as plt
size = 200
true_intercept = 1
true_slope = 2
x = np.linspace(0, 1, size)
# y = a x + b
true_regression_line = true_slope * x + true_intercept
# add noise
y = true_regression_line + np.random.normal(scale=.2, size=s... |
lijun99/altar | models/seismic/seismic/__init__.py | # -*- python -*-
# -*- coding: utf-8 -*-
#
#
# (c) 2013-2021 parasim inc
# (c) 2010-2021 california institute of technology
# all rights reserved
#
# Author(s): <NAME>
# the package
import altar
# publish the protocol for probability distributions
from altar.distributions import Distribution as distribution
# implem... |
lijun99/altar | altar/tests/altar/application_run.py | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
#
# <NAME> <<EMAIL>>
#
# (c) 2013-2021 parasim inc
# (c) 2010-2021 california institute of technology
# all rights reserved
#
# bootstrap
if __name__ == "__main__":
# get the class
from altar.shells import application
# instantiate
app = application(name="... |
lijun99/altar | models/gaussian/gaussian/Gaussian.py | # -*- python -*-
# -*- coding: utf-8 -*-
#
# <NAME> <<EMAIL>>
#
# (c) 2013-2021 parasim inc
# (c) 2010-2021 california institute of technology
# all rights reserved
#
# externals
import math
# the package
import altar
# declaration
class Gaussian(altar.models.bayesian, family="altar.models.gaussian"):
"""
A... |
lijun99/altar | cuda/cuda/models/cudaParameterSet.py | <filename>cuda/cuda/models/cudaParameterSet.py<gh_stars>1-10
# -*- python -*-
# -*- coding: utf-8 -*-
#
# (c) 2013-2021 parasim inc
# (c) 2010-2021 california institute of technology
# all rights reserved
#
# Author(s): <NAME>
# the package
import altar
import altar.cuda
# the base
from altar.models.Contiguous import ... |
lijun99/altar | altar/altar/data/DataObs.py | <reponame>lijun99/altar
# -*- python -*-
# -*- coding: utf-8 -*-
#
# (c) 2013-2021 parasim inc
# (c) 2010-2021 california institute of technology
# all rights reserved
#
# Author(s): <NAME>
# the package
import altar
# the protocol
class DataObs(altar.protocol, family="altar.data"):
"""
The protocol that all... |
lijun99/altar | altar/altar/simulations/Recorder.py | # -*- python -*-
# -*- coding: utf-8 -*-
#
# <NAME> <<EMAIL>>
#
# (c) 2013-2021 parasim inc
# (c) 2010-2021 california institute of technology
# all rights reserved
#
# the package
import altar
# my protocol
from .Archiver import Archiver as archiver
# an implementation of the archiver protocol
class Recorder(altar... |
lijun99/altar | cuda/cuda/norms/cudaL2.py | # -*- python -*-
# -*- coding: utf-8 -*-
#
# (c) 2013-2021 parasim inc
# (c) 2010-2021 california institute of technology
# all rights reserved
#
# Author(s): <NAME>
# the package
import altar
from altar.cuda import libcudaaltar
from altar.cuda import cublas
# my protocol
from altar.norms.L2 import L2
# declaration... |
lijun99/altar | models/seismic/seismic/cuda/cudaStatic.py | # -*- python -*-
# -*- coding: utf-8 -*-
#
# (c) 2013-2021 parasim inc
# (c) 2010-2021 california institute of technology
# all rights reserved
#
# Author(s): <NAME>
# This is a copy of cudaLinear
# If used in cascaded model, make sure its parameters are the contiguous parameters in the beginning
# Otherwise, modific... |
lijun99/altar | models/sir/sir/SIR.py | <filename>models/sir/sir/SIR.py
# -*- python -*-
# -*- coding: utf-8 -*-
#
# <NAME> <<EMAIL>>
#
# (c) 2013-2021 parasim inc
# (c) 2010-2021 california institute of technology
# all rights reserved
#
# author(s): <NAME>
# the package
import altar
from altar.models.BayesianL2 import BayesianL2
# declaration
class SIR(... |
lijun99/altar | altar/altar/simulations/GSLRNG.py | <gh_stars>1-10
# -*- python -*-
# -*- coding: utf-8 -*-
#
# <NAME> <<EMAIL>>
#
# (c) 2013-2021 parasim inc
# (c) 2010-2021 california institute of technology
# all rights reserved
#
# the package
import altar
# my protocol
from .RNG import RNG as rng
# the random number generator
class GSLRNG(altar.component, family... |
lijun99/altar | cuda/cuda/distributions/__init__.py | # -*- python -*-
# -*- coding: utf-8 -*-
#
# (c) 2013-2021 parasim inc
# (c) 2010-2021 california institute of technology
# all rights reserved
#
# Author(s): <NAME>
# the package
import altar
import altar.cuda
# use the cpu protocol
from altar.distributions.Distribution import Distribution as distribution
# get de... |
lijun99/altar | altar/altar/models/Ensemble.py | <gh_stars>1-10
# -*- python -*-
# -*- coding: utf-8 -*-
#
# <NAME> <<EMAIL>>
#
# (c) 2013-2021 parasim inc
# (c) 2010-2021 california institute of technology
# all rights reserved
#
# my superclass
from .Bayesian import Bayesian
# declaration
class Ensemble(Bayesian, family="altar.models.ensemble"):
"""
A c... |
lijun99/altar | models/regression/regression/Linear.py | <filename>models/regression/regression/Linear.py
# -*- python -*-
# -*- coding: utf-8 -*-
#
# <NAME> <<EMAIL>>
#
# (c) 2013-2021 parasim inc
# (c) 2010-2021 california institute of technology
# all rights reserved
#
# author(s): <NAME>
# the package
import altar
from altar.models.BayesianL2 import BayesianL2
# decla... |
lijun99/altar | cuda/cuda/models/cudaBayesianEnsemble.py | <gh_stars>1-10
# -*- python -*-
# -*- coding: utf-8 -*-
#
# (c) 2013-2021 parasim inc
# (c) 2010-2021 california institute of technology
# all rights reserved
#
# Author(s): <NAME>
# the package
import altar
import altar.cuda
# my superclass
from altar.models.Bayesian import Bayesian
# other
import numpy
# declara... |
lijun99/altar | altar/altar/bayesian/Metropolis.py | # -*- python -*-
# -*- coding: utf-8 -*-
#
# <NAME> <<EMAIL>>
#
# (c) 2013-2021 parasim inc
# (c) 2010-2021 california institute of technology
# all rights reserved
#
# externals
import math
# the package
import altar
# my protocol
from .Sampler import Sampler as sampler
# declaration
class Metropolis(altar.compone... |
lijun99/altar | cuda/cuda/bayesian/__init__.py | # -*- python -*-
# -*- coding: utf-8 -*-
#
# (c) 2013-2021 parasim inc
# (c) 2010-2021 california institute of technology
# all rights reserved
#
# Author(s): <NAME>
# the package
import altar
# and the protocols
from altar.bayesian.Controller import Controller as controller
from altar.bayesian.Sampler import Sampler... |
lijun99/altar | models/cdm/cdm/Source.py | # -*- python -*-
# -*- coding: utf-8 -*-
#
# <NAME> <<EMAIL>>
#
# (c) 2013-2021 parasim inc
# (c) 2010-2021 california institute of technology
# all rights reserved
#
# framework
import altar
# externals
import numpy
from math import sqrt, pi as π
# library
from .libcdm import CDM
# declaration
class Source:
""... |
lijun99/altar | altar/altar/models/BayesianL2.py | <reponame>lijun99/altar
# -*- python -*-
# -*- coding: utf-8 -*-
#
# (c) 2013-2021 parasim inc
# (c) 2010-2021 california institute of technology
# all rights reserved
#
# Author(s): <NAME>
# the package
import altar
# my protocol
from .Bayesian import Bayesian
# other
import numpy
# declaration
class BayesianL2(Ba... |
lijun99/altar | cuda/cuda/distributions/cudaGaussian.py | <filename>cuda/cuda/distributions/cudaGaussian.py
# -*- python -*-
# -*- coding: utf-8 -*-
#
# (c) 2013-2021 parasim inc
# (c) 2010-2021 california institute of technology
# all rights reserved
#
# Author(s): <NAME>
# get the package
import altar
import altar.cuda.ext.cudaaltar as libcudaaltar
# get the base
from .cu... |
lijun99/altar | cuda/cuda/distributions/cudaDistribution.py | # -*- python -*-
# -*- coding: utf-8 -*-
#
# (c) 2013-2021 parasim inc
# (c) 2010-2021 california institute of technology
# all rights reserved
#
# Author(s): <NAME>
# externals
import math
# get the package
import altar
import altar.cuda
# get the base
from altar.distributions.Base import Base
# the declaration
cl... |
lijun99/altar | altar/altar/distributions/__init__.py | # -*- python -*-
# -*- coding: utf-8 -*-
#
# <NAME> <<EMAIL>>
#
# (c) 2013-2021 parasim inc
# (c) 2010-2021 california institute of technology
# all rights reserved
#
# the package
import altar
# publish the protocol for probability distributions
from .Distribution import Distribution as distribution
# implementa... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.