index
int64
repo_name
string
branch_name
string
path
string
content
string
import_graph
string
54,270
aploium/my_utils
refs/heads/master
/requestfuzz/bare.py
#!/usr/bin/env python3 # coding=utf-8 from __future__ import absolute_import, division, print_function, unicode_literals from future.builtins import * import six import cgi import copy import json from io import BytesIO if six.PY3: from http.server import BaseHTTPRequestHandler from urllib import parse else: ...
{"/requestfuzz/datastructure.py": ["/requestfuzz/__init__.py"], "/err_hunter/err_hunter/__init__.py": ["/err_hunter/err_hunter/traceback2.py", "/err_hunter/err_hunter/mylogger.py", "/err_hunter/err_hunter/mylogging.py"], "/requestfuzz/tests/test_datastructure.py": ["/requestfuzz/__init__.py"], "/disk_kv_storge/disk_tim...
54,271
aploium/my_utils
refs/heads/master
/executor_buffmap.py
#!/usr/bin/env python3 # coding=utf-8 from __future__ import unicode_literals, division import sys import time import functools import logging from concurrent.futures import TimeoutError logger = logging.getLogger(__name__) if sys.version_info[0] == 2: import itertools izip = itertools.izip else: iz...
{"/requestfuzz/datastructure.py": ["/requestfuzz/__init__.py"], "/err_hunter/err_hunter/__init__.py": ["/err_hunter/err_hunter/traceback2.py", "/err_hunter/err_hunter/mylogger.py", "/err_hunter/err_hunter/mylogging.py"], "/requestfuzz/tests/test_datastructure.py": ["/requestfuzz/__init__.py"], "/disk_kv_storge/disk_tim...
54,272
aploium/my_utils
refs/heads/master
/raw2requests.py
#!/usr/bin/env python3 # coding=utf-8 """Construct a requests.Response from raw http response bytes(including headers)""" import io __author__ = "Aploium <i@z.codes>" class FakeSocket: def __init__(self, data=None): self.bytes_io = io.BytesIO(data) def close(self): pass def make...
{"/requestfuzz/datastructure.py": ["/requestfuzz/__init__.py"], "/err_hunter/err_hunter/__init__.py": ["/err_hunter/err_hunter/traceback2.py", "/err_hunter/err_hunter/mylogger.py", "/err_hunter/err_hunter/mylogging.py"], "/requestfuzz/tests/test_datastructure.py": ["/requestfuzz/__init__.py"], "/disk_kv_storge/disk_tim...
54,273
aploium/my_utils
refs/heads/master
/requests_connection_pool.py
# coding=utf-8 """ 本模块提供了一个线程安全的 keep-alive 链接池 requests的连接在每个session中是自动 keep-alive 的, 在 `connection_keep_alive` 关闭时, 每次请求都会创建一个新的session, 并发起一次新的请求, 则会带来相当大的连接开销(时间上) 通过保持并复用 requests 的session, 可以极大地减少requests在请求远程服务器时的连接延迟 以前的版本是线程不安全, 当并发数大时会出现 ConnectionResetError """ import time import requests ...
{"/requestfuzz/datastructure.py": ["/requestfuzz/__init__.py"], "/err_hunter/err_hunter/__init__.py": ["/err_hunter/err_hunter/traceback2.py", "/err_hunter/err_hunter/mylogger.py", "/err_hunter/err_hunter/mylogging.py"], "/requestfuzz/tests/test_datastructure.py": ["/requestfuzz/__init__.py"], "/disk_kv_storge/disk_tim...
54,274
aploium/my_utils
refs/heads/master
/requestfuzz/tests/test_mutants.py
#!/usr/bin/env python3 # coding=utf-8 from __future__ import absolute_import, division, print_function, unicode_literals from future.builtins import * import collections import json from future.backports.urllib import parse from requestfuzz import FuzzableRequest from requestfuzz.payload import Payload from requestfu...
{"/requestfuzz/datastructure.py": ["/requestfuzz/__init__.py"], "/err_hunter/err_hunter/__init__.py": ["/err_hunter/err_hunter/traceback2.py", "/err_hunter/err_hunter/mylogger.py", "/err_hunter/err_hunter/mylogging.py"], "/requestfuzz/tests/test_datastructure.py": ["/requestfuzz/__init__.py"], "/disk_kv_storge/disk_tim...
54,275
aploium/my_utils
refs/heads/master
/requestfuzz/__init__.py
#!/usr/bin/env python3 # coding=utf-8 from __future__ import absolute_import, division, print_function, unicode_literals from future.builtins import * from future import standard_library as _standard_library _standard_library.install_aliases() from .datastructure import ( OrderedMultiDict, HTTPHeaders, QueryDict,...
{"/requestfuzz/datastructure.py": ["/requestfuzz/__init__.py"], "/err_hunter/err_hunter/__init__.py": ["/err_hunter/err_hunter/traceback2.py", "/err_hunter/err_hunter/mylogger.py", "/err_hunter/err_hunter/mylogging.py"], "/requestfuzz/tests/test_datastructure.py": ["/requestfuzz/__init__.py"], "/disk_kv_storge/disk_tim...
54,276
aploium/my_utils
refs/heads/master
/requestfuzz/plugin.py
#!/usr/bin/env python3 # coding=utf-8 from __future__ import absolute_import, division, print_function, unicode_literals from future.builtins import * import collections import weakref try: # 供type hint使用 from .request import FuzzableRequest except: pass class FzPluginBase(object): """ 用于以插件形式给 Fuz...
{"/requestfuzz/datastructure.py": ["/requestfuzz/__init__.py"], "/err_hunter/err_hunter/__init__.py": ["/err_hunter/err_hunter/traceback2.py", "/err_hunter/err_hunter/mylogger.py", "/err_hunter/err_hunter/mylogging.py"], "/requestfuzz/tests/test_datastructure.py": ["/requestfuzz/__init__.py"], "/disk_kv_storge/disk_tim...
54,277
aploium/my_utils
refs/heads/master
/err_hunter/err_hunter/mylogging.py
# coding=utf-8 from __future__ import absolute_import, unicode_literals import logging import json import copy import logging.handlers from . import logger_global_custom_data from .third_party import logzero from .mylogger import MultiprocessRotatingFileHandler import inspect # 更多logging的level # 注释掉的是标准level # CRIT...
{"/requestfuzz/datastructure.py": ["/requestfuzz/__init__.py"], "/err_hunter/err_hunter/__init__.py": ["/err_hunter/err_hunter/traceback2.py", "/err_hunter/err_hunter/mylogger.py", "/err_hunter/err_hunter/mylogging.py"], "/requestfuzz/tests/test_datastructure.py": ["/requestfuzz/__init__.py"], "/disk_kv_storge/disk_tim...
54,278
aploium/my_utils
refs/heads/master
/requestfuzz/tests/test_rebuild_bare.py
#!/usr/bin/env python3 # coding=utf-8 from __future__ import absolute_import, division, print_function, unicode_literals from future.builtins import * import pytest from requestfuzz import FuzzableRequest def _fmt_line_sep(bare, line_sep=b"\r\n"): return line_sep.join(bare.splitlines(False)) def test_rebuild_...
{"/requestfuzz/datastructure.py": ["/requestfuzz/__init__.py"], "/err_hunter/err_hunter/__init__.py": ["/err_hunter/err_hunter/traceback2.py", "/err_hunter/err_hunter/mylogger.py", "/err_hunter/err_hunter/mylogging.py"], "/requestfuzz/tests/test_datastructure.py": ["/requestfuzz/__init__.py"], "/disk_kv_storge/disk_tim...
54,279
aploium/my_utils
refs/heads/master
/err_hunter/demo_filelog.py
#!/usr/bin/env python3 # coding=utf-8 import err_hunter err_hunter.basicConfig("INFO", logfile="file.log", file_level="DEBUG", maxBytes=1024 * 1024, backupCount=5, ) logger = err_hunter.getLogger() logger.error("err") logger.warning("warning") logger.info("info") logger....
{"/requestfuzz/datastructure.py": ["/requestfuzz/__init__.py"], "/err_hunter/err_hunter/__init__.py": ["/err_hunter/err_hunter/traceback2.py", "/err_hunter/err_hunter/mylogger.py", "/err_hunter/err_hunter/mylogging.py"], "/requestfuzz/tests/test_datastructure.py": ["/requestfuzz/__init__.py"], "/disk_kv_storge/disk_tim...
54,280
aploium/my_utils
refs/heads/master
/requestfuzz/utils.py
#!/usr/bin/env python3 # coding=utf-8 from __future__ import absolute_import, division, print_function, unicode_literals from future.builtins import * import six import collections from tldextract import TLDExtract try: import cchardet except ImportError: try: import chardet as cchardet except Im...
{"/requestfuzz/datastructure.py": ["/requestfuzz/__init__.py"], "/err_hunter/err_hunter/__init__.py": ["/err_hunter/err_hunter/traceback2.py", "/err_hunter/err_hunter/mylogger.py", "/err_hunter/err_hunter/mylogging.py"], "/requestfuzz/tests/test_datastructure.py": ["/requestfuzz/__init__.py"], "/disk_kv_storge/disk_tim...
54,281
aploium/my_utils
refs/heads/master
/requestfuzz/csrf.py
#!/usr/bin/env python3 # coding=utf-8 """CSRF工具箱""" from __future__ import absolute_import, division, print_function, unicode_literals from future.builtins import * import weakref import re import requests import logging from requests.exceptions import RequestException from .datastructure import OrderedMultiDict fro...
{"/requestfuzz/datastructure.py": ["/requestfuzz/__init__.py"], "/err_hunter/err_hunter/__init__.py": ["/err_hunter/err_hunter/traceback2.py", "/err_hunter/err_hunter/mylogger.py", "/err_hunter/err_hunter/mylogging.py"], "/requestfuzz/tests/test_datastructure.py": ["/requestfuzz/__init__.py"], "/disk_kv_storge/disk_tim...
54,282
aploium/my_utils
refs/heads/master
/disk_kv_storge/__init__.py
#!/usr/bin/env python3 # coding=utf-8 from __future__ import unicode_literals import sys import os import json import collections import tempfile engines = {} best_engine = None try: try: from . import leveldb_engine except (ImportError, ValueError): # noinspection PyUnresolvedReferences ...
{"/requestfuzz/datastructure.py": ["/requestfuzz/__init__.py"], "/err_hunter/err_hunter/__init__.py": ["/err_hunter/err_hunter/traceback2.py", "/err_hunter/err_hunter/mylogger.py", "/err_hunter/err_hunter/mylogging.py"], "/requestfuzz/tests/test_datastructure.py": ["/requestfuzz/__init__.py"], "/disk_kv_storge/disk_tim...
54,283
aploium/my_utils
refs/heads/master
/requestfuzz/recursive_parse.py
# coding=utf-8 from __future__ import absolute_import, division, print_function, unicode_literals from future.builtins import * import six import collections import json import string import copy import cgi import weakref import base64 import re from io import BytesIO if six.PY3: from urllib import parse else: ...
{"/requestfuzz/datastructure.py": ["/requestfuzz/__init__.py"], "/err_hunter/err_hunter/__init__.py": ["/err_hunter/err_hunter/traceback2.py", "/err_hunter/err_hunter/mylogger.py", "/err_hunter/err_hunter/mylogging.py"], "/requestfuzz/tests/test_datastructure.py": ["/requestfuzz/__init__.py"], "/disk_kv_storge/disk_tim...
54,284
aploium/my_utils
refs/heads/master
/calling_statistic.py
#!/usr/bin/env python3 # coding=utf-8 """ 调用速率统计 支持py3与py2 """ from __future__ import print_function, division import time import functools import os try: from collections import Callable except: pass def calling_static(period=1.0, printer=print, timer=None, max_qps=None, qps_resolution=0....
{"/requestfuzz/datastructure.py": ["/requestfuzz/__init__.py"], "/err_hunter/err_hunter/__init__.py": ["/err_hunter/err_hunter/traceback2.py", "/err_hunter/err_hunter/mylogger.py", "/err_hunter/err_hunter/mylogging.py"], "/requestfuzz/tests/test_datastructure.py": ["/requestfuzz/__init__.py"], "/disk_kv_storge/disk_tim...
54,291
bmaximuml/groups
refs/heads/master
/models.py
from flask_sqlalchemy import SQLAlchemy db = SQLAlchemy() properties = db.Table('properties', db.Column('group_id', db.Integer, db.ForeignKey('group.id'), primary_key=True), db.Column('property_id', db.Integer, db.ForeignKey('property.id'), primary_key=True), db.Column('value', db.String(50), nullable=T...
{"/application.py": ["/exceptions.py", "/models.py"], "/setup.py": ["/exceptions.py"]}
54,292
bmaximuml/groups
refs/heads/master
/exceptions.py
class EnvironmentUnsetError(Exception): def __init__(self, *variables): self.variables = variables def __str__(self): return f"Environment variable(s) not set: {repr(self.variables)}"
{"/application.py": ["/exceptions.py", "/models.py"], "/setup.py": ["/exceptions.py"]}
54,293
bmaximuml/groups
refs/heads/master
/application.py
from datetime import datetime from email.message import EmailMessage from exceptions import EnvironmentUnsetError from flask import Flask, render_template from os import environ from smtplib import SMTP_SSL from wtforms import Form, StringField, SubmitField, TextAreaField from wtforms.fields.html5 import EmailField fro...
{"/application.py": ["/exceptions.py", "/models.py"], "/setup.py": ["/exceptions.py"]}
54,294
bmaximuml/groups
refs/heads/master
/setup.py
from os import environ from setuptools import setup, find_packages from exceptions import EnvironmentUnsetError required_env_vars = [ 'WFB_PROJECT_NAME', 'WFB_FLASK_SECRET_KEY' ] for var in required_env_vars: if var not in environ: raise EnvironmentUnsetError(var) optional_setup = {} if 'WFB_AUTH...
{"/application.py": ["/exceptions.py", "/models.py"], "/setup.py": ["/exceptions.py"]}
54,296
jagheterfredrik/sheet
refs/heads/master
/sheet/shargh.py
import sheet.server import argh from argparse import ArgumentParser from argh.assembling import add_commands class ShargumentParserExit(Exception): def __init__(self, status, message): super(ShargumentParserExit, self).__init__(self) self.status = status self.message = message class Shargu...
{"/sheet/auth/base.py": ["/sheet/auth/broker.py"], "/sheet/auth/ldappubkey.py": ["/sheet/auth/__init__.py", "/sheet/auth/broker.py"], "/sheet/auth/pubkeydirectory.py": ["/sheet/auth/__init__.py", "/sheet/auth/broker.py"]}
54,297
jagheterfredrik/sheet
refs/heads/master
/sheet/auth/base.py
import paramiko from sheet.auth.broker import Broker @Broker.register class BaseAuthHandler(paramiko.ServerInterface): "Provides base class for authentication, never use directly." __id__ = 'BaseAuth' def __init__(self): self.command = None def check_channel_request(self, kind, channel): ...
{"/sheet/auth/base.py": ["/sheet/auth/broker.py"], "/sheet/auth/ldappubkey.py": ["/sheet/auth/__init__.py", "/sheet/auth/broker.py"], "/sheet/auth/pubkeydirectory.py": ["/sheet/auth/__init__.py", "/sheet/auth/broker.py"]}
54,298
jagheterfredrik/sheet
refs/heads/master
/sheet/auth/broker.py
class AuthBroker(object): def __init__(self): self.providers = {} def register(self, classdef): name = classdef.__id__ if name in self.providers: print 'Provider', name, 'defined more than once' self.providers[name] = classdef return classdef def get(self, name): if not name in self.providers: pr...
{"/sheet/auth/base.py": ["/sheet/auth/broker.py"], "/sheet/auth/ldappubkey.py": ["/sheet/auth/__init__.py", "/sheet/auth/broker.py"], "/sheet/auth/pubkeydirectory.py": ["/sheet/auth/__init__.py", "/sheet/auth/broker.py"]}
54,299
jagheterfredrik/sheet
refs/heads/master
/sheet/util.py
def constant_time_compare(val1, val2): """Returns True if the two strings are equal, False otherwise. The time taken is independent of the number of characters that match. Taken from Django Source Code """ if len(val1) != len(val2): return False result = 0 for x, y in zip(val1, val...
{"/sheet/auth/base.py": ["/sheet/auth/broker.py"], "/sheet/auth/ldappubkey.py": ["/sheet/auth/__init__.py", "/sheet/auth/broker.py"], "/sheet/auth/pubkeydirectory.py": ["/sheet/auth/__init__.py", "/sheet/auth/broker.py"]}
54,300
jagheterfredrik/sheet
refs/heads/master
/sheet/server.py
import socket import sys import traceback import paramiko import threading import yaml from paramiko.rsakey import RSAKey from sheet.auth.broker import Broker from sheet.auth import * class Server(): def __init__(self, cb, config=None, address='', port=58337, backlog=100): self.cb = cb # Parse c...
{"/sheet/auth/base.py": ["/sheet/auth/broker.py"], "/sheet/auth/ldappubkey.py": ["/sheet/auth/__init__.py", "/sheet/auth/broker.py"], "/sheet/auth/pubkeydirectory.py": ["/sheet/auth/__init__.py", "/sheet/auth/broker.py"]}
54,301
jagheterfredrik/sheet
refs/heads/master
/sheet/auth/ldappubkey.py
import paramiko import ldap from sheet.auth import base from sheet.auth.broker import Broker from sheet import util @Broker.register class LdapPubkeyAuthHandler(base.BaseAuthHandler): """Auth based on public keys stored in LDAP. Anonymously binds to LDAP in order to look up the public key for the connec...
{"/sheet/auth/base.py": ["/sheet/auth/broker.py"], "/sheet/auth/ldappubkey.py": ["/sheet/auth/__init__.py", "/sheet/auth/broker.py"], "/sheet/auth/pubkeydirectory.py": ["/sheet/auth/__init__.py", "/sheet/auth/broker.py"]}
54,302
jagheterfredrik/sheet
refs/heads/master
/test.py
from sheet import shargh import time def main(name='unknown user'): return 'Hello {0}!'.format(name) def work(): yield 'Working...' time.sleep(2) yield 'DONE!' return shargh.serve_commands([main, work], config='test_conf.yaml')
{"/sheet/auth/base.py": ["/sheet/auth/broker.py"], "/sheet/auth/ldappubkey.py": ["/sheet/auth/__init__.py", "/sheet/auth/broker.py"], "/sheet/auth/pubkeydirectory.py": ["/sheet/auth/__init__.py", "/sheet/auth/broker.py"]}
54,303
jagheterfredrik/sheet
refs/heads/master
/sheet/auth/pubkeydirectory.py
import paramiko from os.path import isfile, normpath, join from sheet.auth import base from sheet.auth.broker import Broker from sheet import util @Broker.register class PubkeyDirectoryAuthHandler(base.BaseAuthHandler): """Allows public keys in a specified filesystem directory where the filename matches the u...
{"/sheet/auth/base.py": ["/sheet/auth/broker.py"], "/sheet/auth/ldappubkey.py": ["/sheet/auth/__init__.py", "/sheet/auth/broker.py"], "/sheet/auth/pubkeydirectory.py": ["/sheet/auth/__init__.py", "/sheet/auth/broker.py"]}
54,304
jagheterfredrik/sheet
refs/heads/master
/sheet/auth/__init__.py
__all__ = ['base', 'broker', 'ldappubkey', 'spotifypubkeydirectory', 'pubkeydirectory']
{"/sheet/auth/base.py": ["/sheet/auth/broker.py"], "/sheet/auth/ldappubkey.py": ["/sheet/auth/__init__.py", "/sheet/auth/broker.py"], "/sheet/auth/pubkeydirectory.py": ["/sheet/auth/__init__.py", "/sheet/auth/broker.py"]}
54,308
PoWeiChiao/OCT
refs/heads/main
/model/ResUNet.py
import torch import torch.nn as nn from torch.nn import functional as F class DoubleConv(nn.Module): def __init__(self, in_channels, out_channels): super().__init__() self.in_channels = in_channels self.out_channels = out_channels self.double_conv = nn.Sequential( nn.Con...
{"/eval.py": ["/model/UNet.py", "/utils/dataset.py"], "/train.py": ["/model/UNet.py", "/utils/dataset.py"]}
54,309
PoWeiChiao/OCT
refs/heads/main
/model/UNet.py
import torch import torch.nn as nn from torch.nn import functional as F class DoubleConv(nn.Module): def __init__(self, in_channels, out_channels): super().__init__() self.in_channels = in_channels self.out_channels = out_channels self.double_conv = nn.Sequential( nn.Con...
{"/eval.py": ["/model/UNet.py", "/utils/dataset.py"], "/train.py": ["/model/UNet.py", "/utils/dataset.py"]}
54,310
PoWeiChiao/OCT
refs/heads/main
/utils/generator.py
import glob import os import shutil def main(): root = 'D:/pytorch/Segmentation/Drishti' raw_data_dir = 'Drishti-GS1_files' target = 'data' separator = ['Test', 'Training'] for s in separator: images_list = glob.glob(os.path.join(root, raw_data_dir, s, 'Images', '*.png')) for image...
{"/eval.py": ["/model/UNet.py", "/utils/dataset.py"], "/train.py": ["/model/UNet.py", "/utils/dataset.py"]}
54,311
PoWeiChiao/OCT
refs/heads/main
/eval.py
import cv2 as cv import glob import numpy as np import os from PIL import Image from tqdm import tqdm import torch from torch.utils.data import DataLoader from torchvision import transforms from model.UNet import UNet, NestedUNet from utils.dataset import DrishtiDataset def save(save_dir, image): cv.imwrite(save_d...
{"/eval.py": ["/model/UNet.py", "/utils/dataset.py"], "/train.py": ["/model/UNet.py", "/utils/dataset.py"]}
54,312
PoWeiChiao/OCT
refs/heads/main
/utils/dataset.py
import glob import os import numpy as np import random from PIL import Image import torch from torch.utils.data import Dataset from torchvision import transforms class DrishtiDataset(Dataset): def __init__(self, data_dir, image_transforms, is_random=True): self.data_dir = data_dir self.image_transf...
{"/eval.py": ["/model/UNet.py", "/utils/dataset.py"], "/train.py": ["/model/UNet.py", "/utils/dataset.py"]}
54,313
PoWeiChiao/OCT
refs/heads/main
/train.py
import os from tqdm import tqdm import torch import torch.nn as nn import torch.optim as optim from torch.utils.data import DataLoader from torchvision import transforms from model.UNet import UNet, NestedUNet from utils.dataset import DrishtiDataset from utils.DiceLoss import DiceLoss from utils.logger import Logger ...
{"/eval.py": ["/model/UNet.py", "/utils/dataset.py"], "/train.py": ["/model/UNet.py", "/utils/dataset.py"]}
54,333
kinow/hummingbird
refs/heads/master
/hummingbird/processes/wps_hdh_qachecker.py
import tarfile from pywps import Process from pywps import LiteralInput from pywps import ComplexInput, ComplexOutput from pywps import Format from pywps.app.Common import Metadata import logging LOGGER = logging.getLogger("PYWPS") class QualityChecker(Process): def __init__(self): inputs = [ ...
{"/hummingbird/processes/wps_hdh_qachecker.py": ["/hummingbird/processing.py"], "/tests/test_wps_hdh.py": ["/hummingbird/processes/wps_hdh_cfchecker.py"], "/hummingbird/processes/wps_hdh_cfchecker.py": ["/hummingbird/processing.py"]}
54,334
kinow/hummingbird
refs/heads/master
/tests/test_wps_hdh.py
import pytest from pywps import Service from pywps.tests import assert_response_success from .common import TESTDATA, client_for from hummingbird.processes.wps_hdh_cfchecker import HDHCFChecker @pytest.mark.skip(reason="no way of currently testing this") @pytest.mark.online def test_wps_qa_cfchecker(): client = ...
{"/hummingbird/processes/wps_hdh_qachecker.py": ["/hummingbird/processing.py"], "/tests/test_wps_hdh.py": ["/hummingbird/processes/wps_hdh_cfchecker.py"], "/hummingbird/processes/wps_hdh_cfchecker.py": ["/hummingbird/processing.py"]}
54,335
kinow/hummingbird
refs/heads/master
/hummingbird/processing.py
import os import glob import subprocess from subprocess import check_output, CalledProcessError from .utils import fix_filename, make_dirs import logging LOGGER = logging.getLogger("PYWPS") def ncgen(cdl_file, output_file=None): ''' Returns NetCDF file from CDL file. ''' output_file = output_file or...
{"/hummingbird/processes/wps_hdh_qachecker.py": ["/hummingbird/processing.py"], "/tests/test_wps_hdh.py": ["/hummingbird/processes/wps_hdh_cfchecker.py"], "/hummingbird/processes/wps_hdh_cfchecker.py": ["/hummingbird/processing.py"]}
54,336
kinow/hummingbird
refs/heads/master
/hummingbird/processes/wps_hdh_cfchecker.py
from pywps import Process from pywps import LiteralInput from pywps import ComplexInput, ComplexOutput from pywps import Format from pywps.app.Common import Metadata import logging LOGGER = logging.getLogger("PYWPS") class HDHCFChecker(Process): def __init__(self): inputs = [ ComplexInput('da...
{"/hummingbird/processes/wps_hdh_qachecker.py": ["/hummingbird/processing.py"], "/tests/test_wps_hdh.py": ["/hummingbird/processes/wps_hdh_cfchecker.py"], "/hummingbird/processes/wps_hdh_cfchecker.py": ["/hummingbird/processing.py"]}
54,349
RayaneDev/JVCTopicLive
refs/heads/main
/app.py
from flask import Flask, request, render_template from TopaxAPI import get_html, get_last_link, get_new_posts import bs4 as bs import vars import json app = Flask(__name__, static_url_path='/static') @app.route("/") def index(): return render_template('index.html') @app.route("/watchTopic/", methods=['GET']...
{"/app.py": ["/TopaxAPI.py", "/vars.py"], "/TopaxAPI.py": ["/vars.py"]}
54,350
RayaneDev/JVCTopicLive
refs/heads/main
/TopaxAPI.py
import urllib.request import bs4 as bs import vars def get_html(url) : webUrl = urllib.request.urlopen(url) data = webUrl.read() return data.decode('utf-8') def get_last_link() : link = vars.soup.find_all('div', {'class': 'bloc-liste-num-page'})[0].find_all('span')[::-1] index = 1 if link[0]....
{"/app.py": ["/TopaxAPI.py", "/vars.py"], "/TopaxAPI.py": ["/vars.py"]}
54,351
RayaneDev/JVCTopicLive
refs/heads/main
/vars.py
topax = None soup = None data = None lastPost = False # ID du dernier post newPage = False
{"/app.py": ["/TopaxAPI.py", "/vars.py"], "/TopaxAPI.py": ["/vars.py"]}
54,352
RayaneDev/JVCTopicLive
refs/heads/main
/appCLI.py
import urllib.request import bs4 as bs import threading topax = "https://www.jeuxvideo.com/forums/42-51-67196854-1-0-1-0-direct-le-senat-examine-la-loi-pass-sanitaire.htm" def get_html(url) : webUrl = urllib.request.urlopen(topax) data = webUrl.read() return data.decode('utf-8') def get_last_link() : ...
{"/app.py": ["/TopaxAPI.py", "/vars.py"], "/TopaxAPI.py": ["/vars.py"]}
54,357
apl-ocean-engineering/yolo_4channel
refs/heads/master
/ProcessImageDirectory.py
#!/usr/bin/env python3 # COPY THIS SCRIPT TO THE LOCATION OF "IMAGES" FOLDER CONTAINING ALL IMAGES # Note: same location as labelme_manipulation script import glob import os import cv2 import numpy from shutil import copy2 from natsort import natsorted # deals with python sorting weirdness (images with varying # of di...
{"/BG_Subtraction.py": ["/ProcessImageDirectory.py"]}
54,358
apl-ocean-engineering/yolo_4channel
refs/heads/master
/BG_Subtraction.py
#!/usr/bin/env python3 # TODO: # - try out different methods of background subtraction # - current: Mixture of Gaussians # - constantly update background model throughout all pictures # - reset background ever N number of frames (since the camera is moving) # - visualize how they can ...
{"/BG_Subtraction.py": ["/ProcessImageDirectory.py"]}
54,360
phanivallur/Realty
refs/heads/master
/realty.py
# -*- coding: utf-8 -*- import scrapy from scrapy_splash import SplashRequest from bs4 import BeautifulSoup from locality import Locality import json import operator class RealtySpider(scrapy.Spider): name = 'realty' allowed_domains = ['99acres.com'] #start_urls = ['https://www.99acres.com/property-rates-...
{"/realty.py": ["/locality.py"]}
54,361
phanivallur/Realty
refs/heads/master
/locality.py
class Locality: def __init__(self,area,sqft_price,qbyq,trends,onebhk,twobhk,threebhk): self.area=area self.sqft_price=sqft_price self.qbyq=qbyq self.trends=trends self.onebhk=onebhk self.twobhk=twobhk self.threebhk=threebhk def __str__(self): retu...
{"/realty.py": ["/locality.py"]}
54,367
yohoc/busstation
refs/heads/master
/rm/bus_stop.py
# -*- coding: utf-8 -*- import requests import json url = 'http://restapi.amap.com/v3/bus/linename?offset=20&city=guangzhou&keywords=540%E8%B7%AF&language=zh&key=1d55ec451057366bda9ebe2352f82e6f&page=1&extensions=all&scode=e23e9e96e58467fb7f7daa5687288238&ts=1481770522211' #url = 'http://restapi.amap.com/v3/bus/linena...
{"/app/main/forms.py": ["/app/models.py"]}
54,368
yohoc/busstation
refs/heads/master
/rm/bus_data.py
# -*- coding: utf-8 -*- import requests import json import time import sqlite3 # 导入: from sqlalchemy import Column, String, create_engine, Integer from sqlalchemy.orm import sessionmaker from sqlalchemy.ext.declarative import declarative_base #模拟微信客户端header headers = { 'Host': 'wxbus.gzyyjt.net', 'Upgrade-Insecure-R...
{"/app/main/forms.py": ["/app/models.py"]}
54,369
yohoc/busstation
refs/heads/master
/app/main/forms.py
# -*- coding: utf-8 -*- from flask_wtf import Form from wtforms import StringField, SubmitField from wtforms.validators import Required from wtforms import ValidationError from ..models import Bus class BusNum(Form): num = StringField(u'公交路数', validators=[Required()]) submit = SubmitField(u'查询') def validate_num(se...
{"/app/main/forms.py": ["/app/models.py"]}
54,370
yohoc/busstation
refs/heads/master
/rm/bus_s.py
# -*- coding: utf-8 -*- import requests import json import time headers = { 'Host': 'wxbus.gzyyjt.net', 'Upgrade-Insecure-Requests': '1', 'Connection': 'keep-alive', 'Accept-Encoding': 'gzip, deflate', 'Accept': 'text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8', 'Cookie': 'JSESSIONID=8F70E1A8D269...
{"/app/main/forms.py": ["/app/models.py"]}
54,371
yohoc/busstation
refs/heads/master
/rm/bus_station.py
# -*- coding: utf-8 -*- from flask import Flask, render_template, redirect, url_for, flash from flask_script import Manager, Shell from flask_bootstrap import Bootstrap from flask_wtf import Form from flask_sqlalchemy import SQLAlchemy from wtforms import StringField, SubmitField from wtforms.validators import Required...
{"/app/main/forms.py": ["/app/models.py"]}
54,372
yohoc/busstation
refs/heads/master
/config.py
# -*- coding: utf-8 -*- import os basedir = os.path.abspath(os.path.dirname(__file__)) class Config: SECRET_KEY = os.environ.get('SECRET_KEY') or 'hard to guess string' SQLALCHEMY_COMMIT_ON_TEARDOWN = True SQLALCHEMY_TRACK_MODIFICATIONS = True @staticmethod def init_app(app): pass class DevelopmentConfig(Conf...
{"/app/main/forms.py": ["/app/models.py"]}
54,373
yohoc/busstation
refs/heads/master
/app/models.py
# -*- coding: utf-8 -*- from . import db # 定义User对象: class Bus(db.Model): # 表的名字: __tablename__ = 'businfo' # 表的结构: id = db.Column(db.Integer, primary_key=True) bus_num = db.Column(db.String(20)) route_id = db.Column(db.String(5)) direction = db.Column(db.String(1)) bus = db.Column(db.String(2000)) def __rep...
{"/app/main/forms.py": ["/app/models.py"]}
54,374
yohoc/busstation
refs/heads/master
/app/main/views.py
# -*- coding: utf-8 -*- from flask import Flask, render_template, redirect, url_for, flash ,request from flask_bootstrap import Bootstrap from forms import BusNum from flask_sqlalchemy import SQLAlchemy from wtforms import StringField, SubmitField from wtforms.validators import Required import requests from . import ma...
{"/app/main/forms.py": ["/app/models.py"]}
54,390
erickstm87/movie_trailers
refs/heads/master
/entertainment_center.py
#!/usr/bin/python import fresh_tomatoes import media Dial_M = media.Movie("Dial M for Murder", "To pull off the perfect murder", "http://www.homevideos.com/movies-covers/dialm.jpg", "https://www.youtube.com/watch?v=JWP_hrNHSN4") Fight_Club = media.Movie("Fight Club", "Please Don't Discuss It!",'http://ia.media-imdb.co...
{"/entertainment_center.py": ["/media.py"]}
54,391
erickstm87/movie_trailers
refs/heads/master
/media.py
#!/usr/bin/python import webbrowser class Movie(): valid_ratings = ['Best', 'Better', 'Incredible'] def __init__(self,movie_title,movie_storyline,poster_image_url,trailer_youtube_url): self.title = movie_title self.storyline = movie_storyline self.poster_image_url = poster_image_url ...
{"/entertainment_center.py": ["/media.py"]}
54,393
pulinau/sumo_rl_driving
refs/heads/main
/github-release/action.py
#!python3 __author__ = "Changjian Li, Aman Jhunjhunwala" from include import * def get_action_space(): action_space = spaces.Dict({"lane_change": spaces.Discrete(len(ActionLaneChange)), "accel_level": spaces.Discrete(len(ActionAccel)) }) return action_space ...
{"/main.py": ["/sumo_gym.py", "/dqn.py", "/sumo_cfgs.py", "/dqn_cfgs.py", "/workers.py"], "/sumo_cfgs.py": ["/sumo_gym.py"], "/github-release/sumo_gym.py": ["/observation.py", "/reward.py"], "/examples.py": ["/sumo_cfgs.py", "/sumo_gym.py"], "/github-release/main.py": ["/observation.py", "/sumo_gym.py", "/dqn.py"], "/t...
54,394
pulinau/sumo_rl_driving
refs/heads/main
/main.py
#!python3 __author__ = "Changjian Li" import argparse from sumo_gym import * from dqn import * import random import multiprocessing as mp from sumo_cfgs import sumo_cfg from dqn_cfgs import cfg_validity, cfg_safety, cfg_regulation, cfg_speed_comfort from workers import run_env, run_QAgent if __name__ == "__main__"...
{"/main.py": ["/sumo_gym.py", "/dqn.py", "/sumo_cfgs.py", "/dqn_cfgs.py", "/workers.py"], "/sumo_cfgs.py": ["/sumo_gym.py"], "/github-release/sumo_gym.py": ["/observation.py", "/reward.py"], "/examples.py": ["/sumo_cfgs.py", "/sumo_gym.py"], "/github-release/main.py": ["/observation.py", "/sumo_gym.py", "/dqn.py"], "/t...
54,395
pulinau/sumo_rl_driving
refs/heads/main
/github-release/reward.py
#!/bin/python3 __author__ = "Changjian Li" from include import * def get_reward_list(env): r_safety = get_reward_safety(env) r_regulation = get_reward_regulation(env) r_comfort = get_reward_comfort(env) r_speed = get_reward_speed(env) return [r_safety, r_regulation, r_comfort, r_speed] def get_reward_saf...
{"/main.py": ["/sumo_gym.py", "/dqn.py", "/sumo_cfgs.py", "/dqn_cfgs.py", "/workers.py"], "/sumo_cfgs.py": ["/sumo_gym.py"], "/github-release/sumo_gym.py": ["/observation.py", "/reward.py"], "/examples.py": ["/sumo_cfgs.py", "/sumo_gym.py"], "/github-release/main.py": ["/observation.py", "/sumo_gym.py", "/dqn.py"], "/t...
54,396
pulinau/sumo_rl_driving
refs/heads/main
/sumo_cfgs.py
#!python3 __author__ = "Changjian Li" from include import * from sumo_gym import SumoCfg # -------------------------- # SUMO # -------------------------- SUMO_BIN = "/home/ken/project/sumo-bin/bin/sumo" SUMO_TIME_STEP = 0.1 # "--net-file" and "route_file" NET_XML_FILE = "/home/ken/project/sumo-rl/sumo_opena...
{"/main.py": ["/sumo_gym.py", "/dqn.py", "/sumo_cfgs.py", "/dqn_cfgs.py", "/workers.py"], "/sumo_cfgs.py": ["/sumo_gym.py"], "/github-release/sumo_gym.py": ["/observation.py", "/reward.py"], "/examples.py": ["/sumo_cfgs.py", "/sumo_gym.py"], "/github-release/main.py": ["/observation.py", "/sumo_gym.py", "/dqn.py"], "/t...
54,397
pulinau/sumo_rl_driving
refs/heads/main
/github-release/sumo_gym.py
#!python3 __author__ = "Changjian Li" from copy import deepcopy import random from action import get_action_space, disable_collision_check, enable_collision_check, act, infer_action from observation import get_observation_space, get_veh_dict, get_obs_dict from reward import get_reward_list from utils import class_var...
{"/main.py": ["/sumo_gym.py", "/dqn.py", "/sumo_cfgs.py", "/dqn_cfgs.py", "/workers.py"], "/sumo_cfgs.py": ["/sumo_gym.py"], "/github-release/sumo_gym.py": ["/observation.py", "/reward.py"], "/examples.py": ["/sumo_cfgs.py", "/sumo_gym.py"], "/github-release/main.py": ["/observation.py", "/sumo_gym.py", "/dqn.py"], "/t...
54,398
pulinau/sumo_rl_driving
refs/heads/main
/examples.py
#!python3 __author__ = "Changjian Li" from sumo_cfgs import sumo_cfg from sumo_gym import * import multiprocessing as mp import random def run_env(sumo_cfg, max_ep): id = random.randint(0, 65536) env = MultiObjSumoEnv(sumo_cfg) mem = [] for ep in range(max_ep): print("env id: {}".format(id), "episode: {}...
{"/main.py": ["/sumo_gym.py", "/dqn.py", "/sumo_cfgs.py", "/dqn_cfgs.py", "/workers.py"], "/sumo_cfgs.py": ["/sumo_gym.py"], "/github-release/sumo_gym.py": ["/observation.py", "/reward.py"], "/examples.py": ["/sumo_cfgs.py", "/sumo_gym.py"], "/github-release/main.py": ["/observation.py", "/sumo_gym.py", "/dqn.py"], "/t...
54,399
pulinau/sumo_rl_driving
refs/heads/main
/github-release/main.py
#!python3 __author__ = "Changjian Li" from action import * from observation import * from sumo_gym import * import tensorflow as tf import keras from keras.layers import Input, Dense, Conv1D, Lambda from keras.models import Model, Sequential from keras.optimizers import Adam from keras import utils from dqn import *...
{"/main.py": ["/sumo_gym.py", "/dqn.py", "/sumo_cfgs.py", "/dqn_cfgs.py", "/workers.py"], "/sumo_cfgs.py": ["/sumo_gym.py"], "/github-release/sumo_gym.py": ["/observation.py", "/reward.py"], "/examples.py": ["/sumo_cfgs.py", "/sumo_gym.py"], "/github-release/main.py": ["/observation.py", "/sumo_gym.py", "/dqn.py"], "/t...
54,400
pulinau/sumo_rl_driving
refs/heads/main
/test.py
from include import * from sumo_cfgs import * from sumo_gym import * from observation import * from action import * SUMO_BIN = "/home/ken/project/sumo-bin/bin/sumo-gui" NET_XML_FILE = "/home/ken/project/sumo-rl/sumo_openai_gym/roundabout/roundabout.net.xml" ROU_XML_FILE_LIST = ["/home/ken/project/sumo-rl/sumo_openai_...
{"/main.py": ["/sumo_gym.py", "/dqn.py", "/sumo_cfgs.py", "/dqn_cfgs.py", "/workers.py"], "/sumo_cfgs.py": ["/sumo_gym.py"], "/github-release/sumo_gym.py": ["/observation.py", "/reward.py"], "/examples.py": ["/sumo_cfgs.py", "/sumo_gym.py"], "/github-release/main.py": ["/observation.py", "/sumo_gym.py", "/dqn.py"], "/t...
54,401
pulinau/sumo_rl_driving
refs/heads/main
/traffic/generate.py
#!python3 import subprocess import random import os randomTrip = "~/project/sumo-bin/tools/randomTrips.py" #mean = "4" #" --binomial=" + mean + \ for i in range(3000, 4000): period = random.randrange(1, 4)/500 temp0_file_name = "temp0.rou.xml" randomTripArg = " -n test.net.xml -r " + temp0_file_name + \ ...
{"/main.py": ["/sumo_gym.py", "/dqn.py", "/sumo_cfgs.py", "/dqn_cfgs.py", "/workers.py"], "/sumo_cfgs.py": ["/sumo_gym.py"], "/github-release/sumo_gym.py": ["/observation.py", "/reward.py"], "/examples.py": ["/sumo_cfgs.py", "/sumo_gym.py"], "/github-release/main.py": ["/observation.py", "/sumo_gym.py", "/dqn.py"], "/t...
54,402
pulinau/sumo_rl_driving
refs/heads/main
/workers.py
#!python3 __author__ = "Changjian Li" from include import * from action import * from observation import * from sumo_gym import * from dqn import * import random random.seed() import multiprocessing as mp import queue from copy import deepcopy import os from sumo_cfgs import sumo_cfg class returnX(): def __init__...
{"/main.py": ["/sumo_gym.py", "/dqn.py", "/sumo_cfgs.py", "/dqn_cfgs.py", "/workers.py"], "/sumo_cfgs.py": ["/sumo_gym.py"], "/github-release/sumo_gym.py": ["/observation.py", "/reward.py"], "/examples.py": ["/sumo_cfgs.py", "/sumo_gym.py"], "/github-release/main.py": ["/observation.py", "/sumo_gym.py", "/dqn.py"], "/t...
54,403
pulinau/sumo_rl_driving
refs/heads/main
/observation.py
#!python3 __author__ = "Changjian Li" import heapq from copy import deepcopy from include import * def get_observation_space(env): observation_space = spaces.Dict({"ego_speed": spaces.Box(0, env.MAX_VEH_SPEED, shape=(1,), dtype=np.float32), "ego_dist_to_end_of_lane": spaces.Box(0, env.OBSERVATION_RADI...
{"/main.py": ["/sumo_gym.py", "/dqn.py", "/sumo_cfgs.py", "/dqn_cfgs.py", "/workers.py"], "/sumo_cfgs.py": ["/sumo_gym.py"], "/github-release/sumo_gym.py": ["/observation.py", "/reward.py"], "/examples.py": ["/sumo_cfgs.py", "/sumo_gym.py"], "/github-release/main.py": ["/observation.py", "/sumo_gym.py", "/dqn.py"], "/t...
54,404
pulinau/sumo_rl_driving
refs/heads/main
/dqn.py
#!python3 __author__ = "Changjian Li" from include import * from sumo_cfgs import * from utils import class_vars import random import tensorflow as tf import numpy as np from replay_mem import ReplayMemory, ReplayMemoryManager from action import loosen_correct_actions import time import multiprocessing as mp import qu...
{"/main.py": ["/sumo_gym.py", "/dqn.py", "/sumo_cfgs.py", "/dqn_cfgs.py", "/workers.py"], "/sumo_cfgs.py": ["/sumo_gym.py"], "/github-release/sumo_gym.py": ["/observation.py", "/reward.py"], "/examples.py": ["/sumo_cfgs.py", "/sumo_gym.py"], "/github-release/main.py": ["/observation.py", "/sumo_gym.py", "/dqn.py"], "/t...
54,405
pulinau/sumo_rl_driving
refs/heads/main
/replay_mem.py
#!python3 __author__ = "Changjian Li" import random import time import multiprocessing as mp from multiprocessing.managers import BaseManager from copy import deepcopy class ReplayMemory(): """ Replay memory for dynamic n-step look-ahead. Since the problem domain has very sparse reward, instead of using a fixed...
{"/main.py": ["/sumo_gym.py", "/dqn.py", "/sumo_cfgs.py", "/dqn_cfgs.py", "/workers.py"], "/sumo_cfgs.py": ["/sumo_gym.py"], "/github-release/sumo_gym.py": ["/observation.py", "/reward.py"], "/examples.py": ["/sumo_cfgs.py", "/sumo_gym.py"], "/github-release/main.py": ["/observation.py", "/sumo_gym.py", "/dqn.py"], "/t...
54,406
pulinau/sumo_rl_driving
refs/heads/main
/load_pretrain.py
#!python3 __author__ = "Changjian Li" import numpy as np from replay_mem import ReplayMemory from dqn import * from dqn_cfgs import * from sumo_cfgs import sumo_cfg def load_pretrain(): agt = DQNAgent(sumo_cfg, cfg_safety) with open("examples.npz", "rb") as file: npzfile = np.load(file) mem = npzfile[npz...
{"/main.py": ["/sumo_gym.py", "/dqn.py", "/sumo_cfgs.py", "/dqn_cfgs.py", "/workers.py"], "/sumo_cfgs.py": ["/sumo_gym.py"], "/github-release/sumo_gym.py": ["/observation.py", "/reward.py"], "/examples.py": ["/sumo_cfgs.py", "/sumo_gym.py"], "/github-release/main.py": ["/observation.py", "/sumo_gym.py", "/dqn.py"], "/t...
54,407
pulinau/sumo_rl_driving
refs/heads/main
/github-release/utils.py
#!python3 __author__ = "Changjian Li" import inspect def class_vars(obj): return {k:v for k, v in inspect.getmembers(obj) if not k.startswith('__') and not callable(k)}
{"/main.py": ["/sumo_gym.py", "/dqn.py", "/sumo_cfgs.py", "/dqn_cfgs.py", "/workers.py"], "/sumo_cfgs.py": ["/sumo_gym.py"], "/github-release/sumo_gym.py": ["/observation.py", "/reward.py"], "/examples.py": ["/sumo_cfgs.py", "/sumo_gym.py"], "/github-release/main.py": ["/observation.py", "/sumo_gym.py", "/dqn.py"], "/t...
54,408
pulinau/sumo_rl_driving
refs/heads/main
/sumo_gym.py
#!python3 __author__ = "Changjian Li" import random random.seed() from action import get_action_space, disable_collision_check, enable_collision_check, act, infer_action from observation import get_observation_space, get_veh_dict, get_obs_dict, get_lanelet_dict, get_edge_dict from reward import get_reward_list from ut...
{"/main.py": ["/sumo_gym.py", "/dqn.py", "/sumo_cfgs.py", "/dqn_cfgs.py", "/workers.py"], "/sumo_cfgs.py": ["/sumo_gym.py"], "/github-release/sumo_gym.py": ["/observation.py", "/reward.py"], "/examples.py": ["/sumo_cfgs.py", "/sumo_gym.py"], "/github-release/main.py": ["/observation.py", "/sumo_gym.py", "/dqn.py"], "/t...
54,409
pulinau/sumo_rl_driving
refs/heads/main
/reward.py
#!/bin/python3 __author__ = "Changjian Li" from include import * import numpy as np def get_reward_list(env): r_validity, d_validity = None, None r_safety, d_safety, violation_safety = get_reward_safety(env) r_regulation, d_regulation, violation_yield, violation_turn = get_reward_regulation(env) r_speed_comfo...
{"/main.py": ["/sumo_gym.py", "/dqn.py", "/sumo_cfgs.py", "/dqn_cfgs.py", "/workers.py"], "/sumo_cfgs.py": ["/sumo_gym.py"], "/github-release/sumo_gym.py": ["/observation.py", "/reward.py"], "/examples.py": ["/sumo_cfgs.py", "/sumo_gym.py"], "/github-release/main.py": ["/observation.py", "/sumo_gym.py", "/dqn.py"], "/t...
54,410
pulinau/sumo_rl_driving
refs/heads/main
/github-release/observation.py
#!python3 __author__ = "Changjian Li" import heapq from math import pi from include import * def get_observation_space(env): observation_space = spaces.Dict({"ego_speed": spaces.Box(0, env.MAX_VEH_SPEED, shape=(1,), dtype=np.float32), "ego_dist_to_end_of_lane": spaces.Box(0, env.OBSERVATION_RADIUS, sh...
{"/main.py": ["/sumo_gym.py", "/dqn.py", "/sumo_cfgs.py", "/dqn_cfgs.py", "/workers.py"], "/sumo_cfgs.py": ["/sumo_gym.py"], "/github-release/sumo_gym.py": ["/observation.py", "/reward.py"], "/examples.py": ["/sumo_cfgs.py", "/sumo_gym.py"], "/github-release/main.py": ["/observation.py", "/sumo_gym.py", "/dqn.py"], "/t...
54,411
pulinau/sumo_rl_driving
refs/heads/main
/mp.py
import multiprocessing as mp parent_conn_list, child_conn_list = zip(*[mp.Pipe() for _ in range(4)]) Simulation(conn, sumo_cfg) if __name__ == "__main__": parser = argparse.ArgumentParser() parser.add_argument("--play") args = parser.parse_args() env_list = [MultiObjSumoEnv(sumo_cfg) for i in range(6)] ...
{"/main.py": ["/sumo_gym.py", "/dqn.py", "/sumo_cfgs.py", "/dqn_cfgs.py", "/workers.py"], "/sumo_cfgs.py": ["/sumo_gym.py"], "/github-release/sumo_gym.py": ["/observation.py", "/reward.py"], "/examples.py": ["/sumo_cfgs.py", "/sumo_gym.py"], "/github-release/main.py": ["/observation.py", "/sumo_gym.py", "/dqn.py"], "/t...
54,412
pulinau/sumo_rl_driving
refs/heads/main
/github-release/include.py
import sys SUMO_TOOLS_DIR = "/home/ken/project/sumo-bin/tools" try: sys.path.append(SUMO_TOOLS_DIR) except ImportError: print("Please modify SUMO_TOOLS_DIR to the location of sumo tools") import traci import sumolib import numpy as np import gym from gym import spaces from enum import Enum, auto # simulation cla...
{"/main.py": ["/sumo_gym.py", "/dqn.py", "/sumo_cfgs.py", "/dqn_cfgs.py", "/workers.py"], "/sumo_cfgs.py": ["/sumo_gym.py"], "/github-release/sumo_gym.py": ["/observation.py", "/reward.py"], "/examples.py": ["/sumo_cfgs.py", "/sumo_gym.py"], "/github-release/main.py": ["/observation.py", "/sumo_gym.py", "/dqn.py"], "/t...
54,413
pulinau/sumo_rl_driving
refs/heads/main
/dqn_cfgs.py
#!python3 __author__ = "Changjian Li" import numpy as np import tensorflow as tf from include import * from sumo_cfgs import * from dqn import DQNCfg def reshape_validity(obs_dict): out = np.array([obs_dict["ego_exists_left_lane"], obs_dict["ego_exists_right_lane"], obs_dict["ego_in_intersection"]], dtype=np.int32...
{"/main.py": ["/sumo_gym.py", "/dqn.py", "/sumo_cfgs.py", "/dqn_cfgs.py", "/workers.py"], "/sumo_cfgs.py": ["/sumo_gym.py"], "/github-release/sumo_gym.py": ["/observation.py", "/reward.py"], "/examples.py": ["/sumo_cfgs.py", "/sumo_gym.py"], "/github-release/main.py": ["/observation.py", "/sumo_gym.py", "/dqn.py"], "/t...
54,414
PatJByrne/msd_project
refs/heads/master
/distance_from_lat_long.py
# coding: utf-8 # In[32]: import numpy as np Earth_Radius = 6.371e6 degrees = np.pi/180. pixel_to_meter = 500./(497-300) def distance(pt1,pt2): '''Trick is to assume that the point of intest is the 'North Pole'. We're modeling the Earth as a round ball, so starting from zero is fine. Distance takes no re...
{"/Graph_dictionary.py": ["/distance_from_lat_long.py"], "/Map_Graph_Plot.py": ["/Graph_dictionary.py", "/distance_from_lat_long.py"]}
54,415
PatJByrne/msd_project
refs/heads/master
/Clean and Model Data.py
# coding: utf-8 # This notebook takes csv's that contain data that was scraped from the orienteering website and cleans it to prepare it for a model. # In[1]: # In[2]: from __future__ import print_function import csv as csv import numpy as np import pandas as pd import matplotlib.pyplot as plt #mpl.rcParams.upda...
{"/Graph_dictionary.py": ["/distance_from_lat_long.py"], "/Map_Graph_Plot.py": ["/Graph_dictionary.py", "/distance_from_lat_long.py"]}
54,416
PatJByrne/msd_project
refs/heads/master
/Data_grouping.py
''' Program - Groups data based on teams and checkpoints Input - Race_data_team_splits_checkpoints.csv Output - Team_wise_points.txt, Point_wise_time.txt Author - Shivangi Saxena ''' import csv from collections import defaultdict with open('Race_data_team_splits_checkpoints.csv', newline = '') as ip, open('Team_wi...
{"/Graph_dictionary.py": ["/distance_from_lat_long.py"], "/Map_Graph_Plot.py": ["/Graph_dictionary.py", "/distance_from_lat_long.py"]}
54,417
PatJByrne/msd_project
refs/heads/master
/Graph_dictionary.py
# coding: utf-8 # In[3]: import re from collections import OrderedDict import distance_from_lat_long from copy import deepcopy import matplotlib.pyplot as plt #%matplotlib inline def split_to_time(splt): [hr,mn,sc] = splt.split(':') time = int(hr)*60**2 + int(mn)*60 + int(sc) return(time) class Nod...
{"/Graph_dictionary.py": ["/distance_from_lat_long.py"], "/Map_Graph_Plot.py": ["/Graph_dictionary.py", "/distance_from_lat_long.py"]}
54,418
PatJByrne/msd_project
refs/heads/master
/Map_Graph_Plot.py
# -*- coding: utf-8 -*- # <nbformat>3.0</nbformat> # <codecell> import Graph_dictionary import distance_from_lat_long from collections import OrderedDict team_graph = Graph_dictionary.team_grapher() edge_count = OrderedDict() max_edge = 0 for team in team_graph.keys(): course_map = team_graph[team] for node i...
{"/Graph_dictionary.py": ["/distance_from_lat_long.py"], "/Map_Graph_Plot.py": ["/Graph_dictionary.py", "/distance_from_lat_long.py"]}
54,459
yurifw/Alpha
refs/heads/master
/alpha.py
#!/usr/bin/python import random import os def generate_random_key(size, path): """generates a random key with size = to size (in bytes) and save it to path (path should include file name)""" key = bytearray() for i in range(size): key.append(random.randrange(0, 255)) f = open(path, 'w+') f...
{"/gui.py": ["/alpha.py"]}
54,460
yurifw/Alpha
refs/heads/master
/gui.py
#!/usr/bin/python from Tkconstants import RIGHT, LEFT, RAISED, X, BOTTOM, TOP, END from Tkinter import Tk, Frame, BOTH, Entry, BooleanVar, LabelFrame import tkFileDialog from ttk import Button, Style, Label, Combobox, Radiobutton import alpha class Example(Frame): input_method = "" def __init__(self, parent...
{"/gui.py": ["/alpha.py"]}
54,487
PiCindy/Data-Science
refs/heads/main
/extraction.py
import re import nltk import wptools import wikipedia import pandas as pd from SPARQLWrapper import SPARQLWrapper, JSON def create_list(q, k): ''' Creation of a list of k persons of category q. Input: q (str): category id k (int): nb of persons Output: List of k persons id of category q ...
{"/main.py": ["/extraction.py", "/clustering.py", "/preprocessing.py", "/classification.py"]}
54,488
PiCindy/Data-Science
refs/heads/main
/clustering.py
import pandas as pd from nltk import word_tokenize from sklearn import metrics from sklearn.feature_extraction.text import CountVectorizer from sklearn.feature_extraction.text import TfidfVectorizer from sklearn.cluster import AgglomerativeClustering def clustering(data, n, m): """Clustering algorithm Input: ...
{"/main.py": ["/extraction.py", "/clustering.py", "/preprocessing.py", "/classification.py"]}
54,489
PiCindy/Data-Science
refs/heads/main
/main.py
import extraction import clustering import preprocessing import classification import pandas as pd import argparse if __name__ == "__main__": parser = argparse.ArgumentParser() parser.add_argument('--classification', dest='classification', action='store_true') parser.add_argument('--no-classification', de...
{"/main.py": ["/extraction.py", "/clustering.py", "/preprocessing.py", "/classification.py"]}
54,490
PiCindy/Data-Science
refs/heads/main
/preprocessing.py
import nltk import pandas as pd from nltk.corpus import stopwords def preprocessing(text): """ Application of all preprocessing methods on the text. Input: text (string): a Wikipedia summary or Wikidata description Output: processed: the text after preprocessing """ # Tokenize the text ...
{"/main.py": ["/extraction.py", "/clustering.py", "/preprocessing.py", "/classification.py"]}
54,491
PiCindy/Data-Science
refs/heads/main
/classification.py
import nltk import pandas as pd import sklearn from sklearn.metrics import classification_report, accuracy_score, confusion_matrix from sklearn.feature_extraction.text import TfidfVectorizer # import tf-idf vectorizer from sklearn from sklearn.model_selection import train_test_split from sklearn.linear_model import S...
{"/main.py": ["/extraction.py", "/clustering.py", "/preprocessing.py", "/classification.py"]}
54,492
Delsoc/PCA2
refs/heads/master
/main.py
#from docutils.nodes import paragraph import Init import stimulus_activation import unit_adaption import numpy as np import UnitSpecificDimensionLineFitting import matplotlib.pyplot as plt def main(): # 1: PREALLOCATION AND INITIALIZATION repetitions = 10 parameters, units = Init.initialize() np.zer...
{"/main.py": ["/Init.py", "/stimulus_activation.py", "/unit_adaption.py", "/UnitSpecificDimensionLineFitting.py"], "/test.py": ["/Init.py"], "/Init.py": ["/Parameter.py", "/units.py"], "/unit_adaption.py": ["/eforrlsa.py"]}
54,493
Delsoc/PCA2
refs/heads/master
/stimulus_activation.py
from copy import deepcopy import math import random import numpy as np def stimulus_activation(parameter,units): parameter.xvalue = math.ceil((parameter.rows-1) * random.uniform(0.1, 1.0))#hier p.rows-1 ,bei matlab nicht Shape =parameter.shape.astype(np.float) parameter.x = Shape[parameter.xvalue, :].T ...
{"/main.py": ["/Init.py", "/stimulus_activation.py", "/unit_adaption.py", "/UnitSpecificDimensionLineFitting.py"], "/test.py": ["/Init.py"], "/Init.py": ["/Parameter.py", "/units.py"], "/unit_adaption.py": ["/eforrlsa.py"]}
54,494
Delsoc/PCA2
refs/heads/master
/UnitSpecificDimensionLineFitting.py
from copy import deepcopy import math import numpy as np from scipy.linalg import orth #from tables import parameters def Find(liste, units, p): for i in range(len(liste)): if (liste[i] > units.totalVariance * p.dimThreshold): return i return 0 def UnitSpecificDimensionLineFitting(parame...
{"/main.py": ["/Init.py", "/stimulus_activation.py", "/unit_adaption.py", "/UnitSpecificDimensionLineFitting.py"], "/test.py": ["/Init.py"], "/Init.py": ["/Parameter.py", "/units.py"], "/unit_adaption.py": ["/eforrlsa.py"]}
54,495
Delsoc/PCA2
refs/heads/master
/units.py
import random from copy import deepcopy import numpy as np import numpy.matlib # rand=round(random.uniform(0.1, 1.0),4) class units(): def __init__(self, pm): # Protecs a Unit for n Iterations after the Dimension changed self.protect = 100 # Unit specific Output Dimension self.out...
{"/main.py": ["/Init.py", "/stimulus_activation.py", "/unit_adaption.py", "/UnitSpecificDimensionLineFitting.py"], "/test.py": ["/Init.py"], "/Init.py": ["/Parameter.py", "/units.py"], "/unit_adaption.py": ["/eforrlsa.py"]}
54,496
Delsoc/PCA2
refs/heads/master
/test.py
import Init import random import numpy as np import numpy.matlib #import eforrlsa from copy import deepcopy #c = np.matlib.repmat(5, 3,1) #print(np.dot(c.T,c)) '''pm = Parameter.Parameter() print(pm.criterion) print(pm.shape[0]) init.initialize() print(pm.rows) print(pm.columns) print(pm.log_precomp) parameters,units...
{"/main.py": ["/Init.py", "/stimulus_activation.py", "/unit_adaption.py", "/UnitSpecificDimensionLineFitting.py"], "/test.py": ["/Init.py"], "/Init.py": ["/Parameter.py", "/units.py"], "/unit_adaption.py": ["/eforrlsa.py"]}
54,497
Delsoc/PCA2
refs/heads/master
/Parameter.py
import scipy.io as sio import math '''Datasets: 0. cameraman 1. circles 2. PHM 3. careercon 4. waveData 5. waveDataNoNoise ''' Datasets = ["cameraman.mat", "circles.mat", "PHM.mat", "careercon.mat", "waveData.mat", "waveDataNoNoise.mat"] '''criterion: 0. Eigenvalue-Ooe 1. Eigenvalue-ave...
{"/main.py": ["/Init.py", "/stimulus_activation.py", "/unit_adaption.py", "/UnitSpecificDimensionLineFitting.py"], "/test.py": ["/Init.py"], "/Init.py": ["/Parameter.py", "/units.py"], "/unit_adaption.py": ["/eforrlsa.py"]}
54,498
Delsoc/PCA2
refs/heads/master
/eforrlsa.py
#EFORRLSA (Moeller, 2002) #Interlocking of learning and orthonormalization in RRLSA import numpy as np import math from copy import deepcopy def eforrlsa(units): #Anlegen der lokalen Variablen V = deepcopy(units.weight) EFO_L2 = np.zeros((units.outdimension, 1)) EFO_p = np.zeros((units.outdimension,...
{"/main.py": ["/Init.py", "/stimulus_activation.py", "/unit_adaption.py", "/UnitSpecificDimensionLineFitting.py"], "/test.py": ["/Init.py"], "/Init.py": ["/Parameter.py", "/units.py"], "/unit_adaption.py": ["/eforrlsa.py"]}
54,499
Delsoc/PCA2
refs/heads/master
/test2.py
def test1(liste): liste[0] = 3 return 0
{"/main.py": ["/Init.py", "/stimulus_activation.py", "/unit_adaption.py", "/UnitSpecificDimensionLineFitting.py"], "/test.py": ["/Init.py"], "/Init.py": ["/Parameter.py", "/units.py"], "/unit_adaption.py": ["/eforrlsa.py"]}
54,500
Delsoc/PCA2
refs/heads/master
/Init.py
#diese funktion ist nur da, um es "nah am MatLabCode" zu halten import Parameter import units def initialize(): pm = Parameter.Parameter() #Parameter werden initialisiert (in Parameter.py) us =units.units(pm) #noch units initialiseren return (pm,us) #als Rückgabewert noch Parameter und unit...
{"/main.py": ["/Init.py", "/stimulus_activation.py", "/unit_adaption.py", "/UnitSpecificDimensionLineFitting.py"], "/test.py": ["/Init.py"], "/Init.py": ["/Parameter.py", "/units.py"], "/unit_adaption.py": ["/eforrlsa.py"]}
54,501
Delsoc/PCA2
refs/heads/master
/unit_adaption.py
from copy import deepcopy from setuptools.command.easy_install import easy_install import eforrlsa import numpy as np def unit_adaption(parameter, units): units.alpha = (parameter.epsilon_init - parameter.epsilon_final) * units.Dt ** parameter.phi + parameter.epsilon_final # Update the center of a unit, Eq...
{"/main.py": ["/Init.py", "/stimulus_activation.py", "/unit_adaption.py", "/UnitSpecificDimensionLineFitting.py"], "/test.py": ["/Init.py"], "/Init.py": ["/Parameter.py", "/units.py"], "/unit_adaption.py": ["/eforrlsa.py"]}
54,502
RealGeeks/django-cache-purge-hooks
refs/heads/master
/cache_purge_hooks/backends/varnishbackend.py
import logging import subprocess from django.conf import settings logger = logging.getLogger('django.cache_purge_hooks') VARNISHADM_HOST = getattr(settings, 'VARNISHADM_HOST', 'localhost') VARNISHADM_PORT = getattr(settings, 'VARNISHADM_PORT', 6082) VARNISHADM_SECRET = getattr(settings, 'VARNISHADM_SECRET', '/etc/va...
{"/sampleproject/sample/models.py": ["/cache_purge_hooks/__init__.py"], "/tests/test_nginx_backend.py": ["/cache_purge_hooks/backends/nginxbackend.py"], "/tests/test_import_backend.py": ["/cache_purge_hooks/manager.py"], "/tests/test_hooks_get_called.py": ["/sampleproject/sample/models.py"], "/cache_purge_hooks/shortcu...