index
int64
repo_name
string
branch_name
string
path
string
content
string
import_graph
string
26,920
benterris/chordstransposer
refs/heads/master
/chordstransposer/__init__.py
from .transposer import transpose, transpose_by
{"/chordstransposer/transposer.py": ["/chordstransposer/config.py"], "/chordstransposer/__init__.py": ["/chordstransposer/transposer.py"]}
26,946
eracle/instagram_private_api
refs/heads/master
/instagram_web_api/client.py
# Copyright (c) 2017 https://github.com/ping # # This software is released under the MIT License. # https://opensource.org/licenses/MIT # -*- coding: utf-8 -*- import gzip import hashlib import json import logging import random import re import string import time import warnings from functools import wraps from io im...
{"/instagram_web_api/client.py": ["/instagram_web_api/compatpatch.py", "/instagram_web_api/errors.py", "/instagram_web_api/common.py"], "/tests/web/__init__.py": ["/tests/web/client.py", "/tests/web/media.py", "/tests/web/user.py", "/tests/web/upload.py", "/tests/web/feed.py", "/tests/web/unauthenticated.py", "/tests/w...
26,947
eracle/instagram_private_api
refs/heads/master
/tests/web/client.py
from ..common import ( WebApiTestBase, WebClientError as ClientError, WebClientLoginError as ClientLoginError, WebClient as Client, compat_mock, compat_urllib_error ) class ClientTests(WebApiTestBase): """Tests for client related functions.""" @staticmethod def init_all(api): ret...
{"/instagram_web_api/client.py": ["/instagram_web_api/compatpatch.py", "/instagram_web_api/errors.py", "/instagram_web_api/common.py"], "/tests/web/__init__.py": ["/tests/web/client.py", "/tests/web/media.py", "/tests/web/user.py", "/tests/web/upload.py", "/tests/web/feed.py", "/tests/web/unauthenticated.py", "/tests/w...
26,948
eracle/instagram_private_api
refs/heads/master
/tests/web/media.py
import unittest from ..common import WebApiTestBase, WebClientError as ClientError, compat_mock class MediaTests(WebApiTestBase): """Tests for media related functions.""" @staticmethod def init_all(api): return [ { 'name': 'test_media_info', 'test': Me...
{"/instagram_web_api/client.py": ["/instagram_web_api/compatpatch.py", "/instagram_web_api/errors.py", "/instagram_web_api/common.py"], "/tests/web/__init__.py": ["/tests/web/client.py", "/tests/web/media.py", "/tests/web/user.py", "/tests/web/upload.py", "/tests/web/feed.py", "/tests/web/unauthenticated.py", "/tests/w...
26,949
eracle/instagram_private_api
refs/heads/master
/tests/web/unauthenticated.py
from ..common import WebApiTestBase class UnauthenticatedTests(WebApiTestBase): """Tests for endpoints with authentication""" @staticmethod def init_all(api): return [ { 'name': 'test_unauthenticated_tag_feed', 'test': UnauthenticatedTests('test_unauth...
{"/instagram_web_api/client.py": ["/instagram_web_api/compatpatch.py", "/instagram_web_api/errors.py", "/instagram_web_api/common.py"], "/tests/web/__init__.py": ["/tests/web/client.py", "/tests/web/media.py", "/tests/web/user.py", "/tests/web/upload.py", "/tests/web/feed.py", "/tests/web/unauthenticated.py", "/tests/w...
26,950
eracle/instagram_private_api
refs/heads/master
/setup.py
from os import path import io try: from setuptools import setup except ImportError: from distutils.core import setup try: import unittest.mock has_mock = True except ImportError: has_mock = False __author__ = 'ping <lastmodified@gmail.com>' __version__ = '1.6.0' packages = [ 'instagram_privat...
{"/instagram_web_api/client.py": ["/instagram_web_api/compatpatch.py", "/instagram_web_api/errors.py", "/instagram_web_api/common.py"], "/tests/web/__init__.py": ["/tests/web/client.py", "/tests/web/media.py", "/tests/web/user.py", "/tests/web/upload.py", "/tests/web/feed.py", "/tests/web/unauthenticated.py", "/tests/w...
26,951
eracle/instagram_private_api
refs/heads/master
/tests/web/compatpatch.py
import copy import re import time from ..common import WebApiTestBase, WebClientCompatPatch as ClientCompatPatch class CompatPatchTests(WebApiTestBase): """Tests for ClientCompatPatch.""" @staticmethod def init_all(api): return [ { 'name': 'test_compat_media', ...
{"/instagram_web_api/client.py": ["/instagram_web_api/compatpatch.py", "/instagram_web_api/errors.py", "/instagram_web_api/common.py"], "/tests/web/__init__.py": ["/tests/web/client.py", "/tests/web/media.py", "/tests/web/user.py", "/tests/web/upload.py", "/tests/web/feed.py", "/tests/web/unauthenticated.py", "/tests/w...
26,952
eracle/instagram_private_api
refs/heads/master
/tests/web/__init__.py
# flake8: noqa from .client import ClientTests from .media import MediaTests from .user import UserTests from .upload import UploadTests from .feed import FeedTests from .unauthenticated import UnauthenticatedTests from .compatpatch import CompatPatchTests
{"/instagram_web_api/client.py": ["/instagram_web_api/compatpatch.py", "/instagram_web_api/errors.py", "/instagram_web_api/common.py"], "/tests/web/__init__.py": ["/tests/web/client.py", "/tests/web/media.py", "/tests/web/user.py", "/tests/web/upload.py", "/tests/web/feed.py", "/tests/web/unauthenticated.py", "/tests/w...
26,953
eracle/instagram_private_api
refs/heads/master
/tests/private/__init__.py
# flake8: noqa from .accounts import AccountTests from .collections import CollectionsTests from .discover import DiscoverTests from .feed import FeedTests from .friendships import FriendshipTests from .live import LiveTests from .locations import LocationTests from .media import MediaTests from .misc import MiscTests ...
{"/instagram_web_api/client.py": ["/instagram_web_api/compatpatch.py", "/instagram_web_api/errors.py", "/instagram_web_api/common.py"], "/tests/web/__init__.py": ["/tests/web/client.py", "/tests/web/media.py", "/tests/web/user.py", "/tests/web/upload.py", "/tests/web/feed.py", "/tests/web/unauthenticated.py", "/tests/w...
26,954
eracle/instagram_private_api
refs/heads/master
/tests/web/feed.py
from ..common import WebApiTestBase class FeedTests(WebApiTestBase): """Tests for media related functions.""" @staticmethod def init_all(api): return [ { 'name': 'test_tag_feed', 'test': FeedTests('test_tag_feed', api), }, { ...
{"/instagram_web_api/client.py": ["/instagram_web_api/compatpatch.py", "/instagram_web_api/errors.py", "/instagram_web_api/common.py"], "/tests/web/__init__.py": ["/tests/web/client.py", "/tests/web/media.py", "/tests/web/user.py", "/tests/web/upload.py", "/tests/web/feed.py", "/tests/web/unauthenticated.py", "/tests/w...
26,955
eracle/instagram_private_api
refs/heads/master
/instagram_web_api/compatpatch.py
# -*- coding: utf-8 -*- import re class ClientCompatPatch(object): """Utility to make entities from the private api similar to the ones from the public one by adding the necessary properties, and if required, remove any incompatible properties (to save storage space for example). """ IG_IMAGE_URL...
{"/instagram_web_api/client.py": ["/instagram_web_api/compatpatch.py", "/instagram_web_api/errors.py", "/instagram_web_api/common.py"], "/tests/web/__init__.py": ["/tests/web/client.py", "/tests/web/media.py", "/tests/web/user.py", "/tests/web/upload.py", "/tests/web/feed.py", "/tests/web/unauthenticated.py", "/tests/w...
26,956
eracle/instagram_private_api
refs/heads/master
/instagram_web_api/__init__.py
# flake8: noqa from .client import Client from .compatpatch import ClientCompatPatch from .errors import ( ClientError, ClientLoginError, ClientCookieExpiredError, ClientConnectionError, ClientForbiddenError, ClientThrottledError,ClientBadRequestError, ) from .common import ClientDeprecationWarning __ver...
{"/instagram_web_api/client.py": ["/instagram_web_api/compatpatch.py", "/instagram_web_api/errors.py", "/instagram_web_api/common.py"], "/tests/web/__init__.py": ["/tests/web/client.py", "/tests/web/media.py", "/tests/web/user.py", "/tests/web/upload.py", "/tests/web/feed.py", "/tests/web/unauthenticated.py", "/tests/w...
26,957
eracle/instagram_private_api
refs/heads/master
/tests/test_web_api.py
import unittest import argparse import os import json import sys import logging import re import warnings from .common import ( __webversion__ as __version__, to_json, from_json, WebClient as Client, WebClientError as ClientError, WebClientLoginError as ClientLoginError, WebClientCookieExpiredE...
{"/instagram_web_api/client.py": ["/instagram_web_api/compatpatch.py", "/instagram_web_api/errors.py", "/instagram_web_api/common.py"], "/tests/web/__init__.py": ["/tests/web/client.py", "/tests/web/media.py", "/tests/web/user.py", "/tests/web/upload.py", "/tests/web/feed.py", "/tests/web/unauthenticated.py", "/tests/w...
26,958
eracle/instagram_private_api
refs/heads/master
/tests/web/user.py
import unittest import time from ..common import WebApiTestBase, WebClientError as ClientError, compat_mock class UserTests(WebApiTestBase): """Tests for user related functions.""" @staticmethod def init_all(api): return [ { 'name': 'test_user_info', '...
{"/instagram_web_api/client.py": ["/instagram_web_api/compatpatch.py", "/instagram_web_api/errors.py", "/instagram_web_api/common.py"], "/tests/web/__init__.py": ["/tests/web/client.py", "/tests/web/media.py", "/tests/web/user.py", "/tests/web/upload.py", "/tests/web/feed.py", "/tests/web/unauthenticated.py", "/tests/w...
26,959
eracle/instagram_private_api
refs/heads/master
/tests/web/upload.py
import unittest import time try: # python 2.x from urllib2 import urlopen except ImportError: # python 3.x from urllib.request import urlopen import json from ..common import WebApiTestBase, MockResponse, compat_mock class UploadTests(WebApiTestBase): """Tests for ClientCompatPatch.""" @stat...
{"/instagram_web_api/client.py": ["/instagram_web_api/compatpatch.py", "/instagram_web_api/errors.py", "/instagram_web_api/common.py"], "/tests/web/__init__.py": ["/tests/web/client.py", "/tests/web/media.py", "/tests/web/user.py", "/tests/web/upload.py", "/tests/web/feed.py", "/tests/web/unauthenticated.py", "/tests/w...
26,960
eracle/instagram_private_api
refs/heads/master
/instagram_web_api/common.py
class ClientDeprecationWarning(DeprecationWarning): pass class ClientPendingDeprecationWarning(PendingDeprecationWarning): pass class ClientExperimentalWarning(UserWarning): pass
{"/instagram_web_api/client.py": ["/instagram_web_api/compatpatch.py", "/instagram_web_api/errors.py", "/instagram_web_api/common.py"], "/tests/web/__init__.py": ["/tests/web/client.py", "/tests/web/media.py", "/tests/web/user.py", "/tests/web/upload.py", "/tests/web/feed.py", "/tests/web/unauthenticated.py", "/tests/w...
26,961
eracle/instagram_private_api
refs/heads/master
/misc/checkpoint.py
import re import gzip from io import BytesIO try: # python 2.x from urllib2 import urlopen, Request from urllib import urlencode, unquote_plus except ImportError: # python 3.x from urllib.request import urlopen, Request from urllib.parse import urlencode, unquote_plus import sys class Checkpo...
{"/instagram_web_api/client.py": ["/instagram_web_api/compatpatch.py", "/instagram_web_api/errors.py", "/instagram_web_api/common.py"], "/tests/web/__init__.py": ["/tests/web/client.py", "/tests/web/media.py", "/tests/web/user.py", "/tests/web/upload.py", "/tests/web/feed.py", "/tests/web/unauthenticated.py", "/tests/w...
26,962
eracle/instagram_private_api
refs/heads/master
/instagram_web_api/errors.py
# -*- coding: utf-8 -*- class ClientError(Exception): """Generic error class, catch-all for most client issues. """ def __init__(self, msg, code=None): self.code = code or 0 super(ClientError, self).__init__(msg) @property def msg(self): return self.args[0] class ClientL...
{"/instagram_web_api/client.py": ["/instagram_web_api/compatpatch.py", "/instagram_web_api/errors.py", "/instagram_web_api/common.py"], "/tests/web/__init__.py": ["/tests/web/client.py", "/tests/web/media.py", "/tests/web/user.py", "/tests/web/upload.py", "/tests/web/feed.py", "/tests/web/unauthenticated.py", "/tests/w...
26,972
jkwaters/Robot-Rendezvous
refs/heads/master
/test.py
import shift tests = 100 bigSteps = False # ROBOTS move 1 hop per iteration # FULL RING OF ROBOTS # for nodes in (10 ** exponent for exponent in range(1,4)): # totalIterations = 0 # totalShifts = 0 # numRobots = int(nodes/2) # for i in range(0,tests): # result = shift.rendezvouz(nodes, numRobo...
{"/test.py": ["/shift.py"], "/main.py": ["/shift.py"]}
26,973
jkwaters/Robot-Rendezvous
refs/heads/master
/brainstorming/Robot.py
import random as r class Robot: 'Common base class for all employees' totalRobots = 0 def __init__(self, position, movement=1, direction=1): self.position = position # zero to n self.movement = movement # how far self.direction = direction # either +1 or -1 Robot.to...
{"/test.py": ["/shift.py"], "/main.py": ["/shift.py"]}
26,974
jkwaters/Robot-Rendezvous
refs/heads/master
/main.py
import shift nodes = shift.inputNumber("How many nodes? ") numRobots = shift.inputNumber("How many robots? ") bigSteps = shift.yes_or_no("Can the robots take bigger steps?") verbose = shift.yes_or_no("verbose output?") result = shift.rendezvouz(nodes, numRobots, bigSteps, output=True, verbose=verbose) iterations = re...
{"/test.py": ["/shift.py"], "/main.py": ["/shift.py"]}
26,975
jkwaters/Robot-Rendezvous
refs/heads/master
/shift.py
import random def inputNumber(message): while True: try: userInput = int(input(message)) except ValueError: print("Not an integer! Try again.") continue else: return userInput break def yes_or_no(question): reply = str(input(quest...
{"/test.py": ["/shift.py"], "/main.py": ["/shift.py"]}
26,976
jkwaters/Robot-Rendezvous
refs/heads/master
/brainstorming/Cycle.py
import Robot class Cycle: """Doubly linked list""" totalRobots = 0 # nodes = 100 def __init__(self, nodes=100, robots): self.nodes = nodes self.cycle = [None] * nodes self.startingRobots = robots # initialize robots in cycle def initRobots(self):
{"/test.py": ["/shift.py"], "/main.py": ["/shift.py"]}
26,984
yujianke100/Sub-Bipartite-Graph-Creator
refs/heads/main
/gui/Ui_design.py
# -*- coding: utf-8 -*- # Form implementation generated from reading ui file 'c:\Users\shinshi\Desktop\Sub-Bipartite-Graph-Creator\gui\design.ui' # # Created by: PyQt5 UI code generator 5.15.4 # # WARNING: Any manual changes made to this file will be lost when pyuic5 is # run again. Do not edit this file unless you k...
{"/utils/data_cut.py": ["/utils/os_control.py"], "/utils/data_generate.py": ["/utils/os_control.py"], "/main.py": ["/gui/Ui_design.py", "/utils/crawler.py", "/utils/unpacker.py", "/utils/data_cut.py", "/utils/data_generate.py"], "/utils/crawler.py": ["/utils/os_control.py"]}
26,985
yujianke100/Sub-Bipartite-Graph-Creator
refs/heads/main
/utils/os_control.py
import os from shutil import rmtree def ensure_dir(path): if(not os.path.exists(path)): os.makedirs(path) def label_save(path, data): with open(path, 'w') as f: for i in data: f.write(str(i) + '\n') def edge_save(path, data): with open(path, 'w') as f: for i in data:...
{"/utils/data_cut.py": ["/utils/os_control.py"], "/utils/data_generate.py": ["/utils/os_control.py"], "/main.py": ["/gui/Ui_design.py", "/utils/crawler.py", "/utils/unpacker.py", "/utils/data_cut.py", "/utils/data_generate.py"], "/utils/crawler.py": ["/utils/os_control.py"]}
26,986
yujianke100/Sub-Bipartite-Graph-Creator
refs/heads/main
/utils/unpacker.py
# -*- coding: utf-8 -*- # https://blog.csdn.net/luoye7422/article/details/41950937 from tarfile import open # 数据解压 def unpacker(data): archive = open( './output/datas_tar/download.tsv.{}.tar.bz2'.format(data), 'r:bz2') archive.debug = 0 for tarinfo in archive: archive.extract(tarinfo, r'./o...
{"/utils/data_cut.py": ["/utils/os_control.py"], "/utils/data_generate.py": ["/utils/os_control.py"], "/main.py": ["/gui/Ui_design.py", "/utils/crawler.py", "/utils/unpacker.py", "/utils/data_cut.py", "/utils/data_generate.py"], "/utils/crawler.py": ["/utils/os_control.py"]}
26,987
yujianke100/Sub-Bipartite-Graph-Creator
refs/heads/main
/utils/data_cut.py
# -*- coding: utf-8 -*- from numpy import genfromtxt, array from utils.os_control import * import openpyxl # 读入数据集(图) def read_data(graph, root_dir): try: data = genfromtxt(find_file(root_dir + graph), dtype=int, delimiter='\t', comments='%') data = data[data[:, 3].argsort...
{"/utils/data_cut.py": ["/utils/os_control.py"], "/utils/data_generate.py": ["/utils/os_control.py"], "/main.py": ["/gui/Ui_design.py", "/utils/crawler.py", "/utils/unpacker.py", "/utils/data_cut.py", "/utils/data_generate.py"], "/utils/crawler.py": ["/utils/os_control.py"]}
26,988
yujianke100/Sub-Bipartite-Graph-Creator
refs/heads/main
/utils/data_generate.py
# -*- coding: utf-8 -*- from numpy import genfromtxt, array, zeros from utils.os_control import * # 数据生成过程 def data_generate(timestamp): s_path = './output/output/{}/datas/'.format(timestamp) t_path = './output/output/{}/data/'.format(timestamp) data_name = 'BIPARTITE' graph_types = listdir(s_path) ...
{"/utils/data_cut.py": ["/utils/os_control.py"], "/utils/data_generate.py": ["/utils/os_control.py"], "/main.py": ["/gui/Ui_design.py", "/utils/crawler.py", "/utils/unpacker.py", "/utils/data_cut.py", "/utils/data_generate.py"], "/utils/crawler.py": ["/utils/os_control.py"]}
26,989
yujianke100/Sub-Bipartite-Graph-Creator
refs/heads/main
/main.py
# -*- coding: utf-8 -*- import sys from PyQt5.QtWidgets import QApplication, QHBoxLayout, QVBoxLayout, QWidget, QCheckBox, QSplashScreen, QLabel, QDialog, QMessageBox from PyQt5.QtGui import QPixmap, QFont, QTextCursor from PyQt5.QtCore import QObject, pyqtSignal, QEventLoop, Qt, QTimer from gui.Ui_design import Ui_For...
{"/utils/data_cut.py": ["/utils/os_control.py"], "/utils/data_generate.py": ["/utils/os_control.py"], "/main.py": ["/gui/Ui_design.py", "/utils/crawler.py", "/utils/unpacker.py", "/utils/data_cut.py", "/utils/data_generate.py"], "/utils/crawler.py": ["/utils/os_control.py"]}
26,990
yujianke100/Sub-Bipartite-Graph-Creator
refs/heads/main
/utils/crawler.py
# -*- coding: utf-8 -*- from requests_html import HTMLSession from time import time from requests import get from utils.os_control import * s_path = './output/datas_tar/' t_path = './output/datas_origin/' # 爬虫获取数据集 def get_datasets(ui): url = 'http://konect.cc/networks/' headers = { 'user-agent': 'Moz...
{"/utils/data_cut.py": ["/utils/os_control.py"], "/utils/data_generate.py": ["/utils/os_control.py"], "/main.py": ["/gui/Ui_design.py", "/utils/crawler.py", "/utils/unpacker.py", "/utils/data_cut.py", "/utils/data_generate.py"], "/utils/crawler.py": ["/utils/os_control.py"]}
26,991
zhihanyang2022/d4rl_evaluations
refs/heads/main
/qlearning_dataset_with_mc_return.py
import numpy as np from tqdm import tqdm from collections import deque GAMMA = 0.99 def compute_mc_returns(rewards): mc_return = 0 mc_returns = deque() for r in reversed(rewards): mc_return = r + GAMMA * mc_return mc_returns.appendleft(mc_return) # using deque is more efficient lol re...
{"/brac/scripts/train_bc.py": ["/my_helper_functions.py"], "/bcq/scripts/run_script.py": ["/my_helper_functions.py"], "/cql/d4rl/examples/cql_mujoco_new.py": ["/my_helper_functions.py", "/qlearning_dataset_with_mc_return.py", "/qlearning_dataset_with_next_action.py"]}
26,992
zhihanyang2022/d4rl_evaluations
refs/heads/main
/qlearning_dataset_with_next_action.py
import collections import numpy as np import gym import d4rl Trajectory = collections.namedtuple('Trajectory', 'states actions rewards dones frames') def _parse_v0(env_id): env = gym.make(env_id) dataset = env.get_dataset() obs, acs, rs, dones =\ dataset['observations'], dataset['actions'], data...
{"/brac/scripts/train_bc.py": ["/my_helper_functions.py"], "/bcq/scripts/run_script.py": ["/my_helper_functions.py"], "/cql/d4rl/examples/cql_mujoco_new.py": ["/my_helper_functions.py", "/qlearning_dataset_with_mc_return.py", "/qlearning_dataset_with_next_action.py"]}
26,993
zhihanyang2022/d4rl_evaluations
refs/heads/main
/my_helper_functions.py
import os import numpy as np import gym import d4rl def get_dataset_size(dataset_name:str) -> int: env = gym.make(dataset_name) dataset = env.get_dataset() dataset_size = len(dataset['rewards']) return dataset_size def get_log_dir( base_dir:str, algo_dir:str, env_dir:str, ...
{"/brac/scripts/train_bc.py": ["/my_helper_functions.py"], "/bcq/scripts/run_script.py": ["/my_helper_functions.py"], "/cql/d4rl/examples/cql_mujoco_new.py": ["/my_helper_functions.py", "/qlearning_dataset_with_mc_return.py", "/qlearning_dataset_with_next_action.py"]}
26,994
zhihanyang2022/d4rl_evaluations
refs/heads/main
/brac/scripts/train_bc.py
# coding=utf-8 # Copyright 2020 The Google Research Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicab...
{"/brac/scripts/train_bc.py": ["/my_helper_functions.py"], "/bcq/scripts/run_script.py": ["/my_helper_functions.py"], "/cql/d4rl/examples/cql_mujoco_new.py": ["/my_helper_functions.py", "/qlearning_dataset_with_mc_return.py", "/qlearning_dataset_with_next_action.py"]}
26,995
zhihanyang2022/d4rl_evaluations
refs/heads/main
/bcq/scripts/run_script.py
import argparse import gym import numpy as np import os import torch import d4rl import uuid import json import sys # added/modified by Zhihan sys.path.append("bcq/") import continuous_bcq.BCQ import continuous_bcq.DDPG as DDPG import continuous_bcq.utils as utils sys.path.append(".") import my_helper_functions as...
{"/brac/scripts/train_bc.py": ["/my_helper_functions.py"], "/bcq/scripts/run_script.py": ["/my_helper_functions.py"], "/cql/d4rl/examples/cql_mujoco_new.py": ["/my_helper_functions.py", "/qlearning_dataset_with_mc_return.py", "/qlearning_dataset_with_next_action.py"]}
26,996
zhihanyang2022/d4rl_evaluations
refs/heads/main
/cql/d4rl/examples/cql_mujoco_new.py
import sys sys.path.append('.') import my_helper_functions as mhf from qlearning_dataset_with_mc_return import qlearning_dataset_with_mc_return from qlearning_dataset_with_next_action import qlearning_dataset_wonjoon, qlearning_dataset_with_next_action_v0, qlearning_dataset_with_next_action_v2 sys.path.append('cql/d4...
{"/brac/scripts/train_bc.py": ["/my_helper_functions.py"], "/bcq/scripts/run_script.py": ["/my_helper_functions.py"], "/cql/d4rl/examples/cql_mujoco_new.py": ["/my_helper_functions.py", "/qlearning_dataset_with_mc_return.py", "/qlearning_dataset_with_next_action.py"]}
26,997
re0ah/Color-detector-openCV
refs/heads/main
/main.py
import cv2 import numpy as np import json import time import telegram def nothing(x): pass class Color_cv: """ Класс для цветового маскирования изображений """ settings_default = { "low - hue": 0, "low - sat": 0, "low...
{"/main.py": ["/telegram.py"]}
26,998
re0ah/Color-detector-openCV
refs/heads/main
/telegram.py
import telebot import json from threading import Thread def save_user_id(user_id): with open("telegram_user_list.json", "w") as write_file: data = { "id": user_id } json.dump(data, write_file) def load_user_id() -> dict: try: with open("telegram_user_lis...
{"/main.py": ["/telegram.py"]}
26,999
rendaman0215/housesearch_backend
refs/heads/master
/house/migrations/0008_reviews_rate.py
# Generated by Django 3.1.2 on 2021-05-04 08:10 from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('house', '0007_expense_landarea'), ] operations = [ migrations.AddField( model_name='reviews', name='rate', ...
{"/housesearch_backend/urls.py": ["/house/urls.py"], "/house/admin.py": ["/house/models.py"], "/house/serializer.py": ["/house/models.py"], "/house/views.py": ["/house/models.py", "/house/serializer.py", "/house/permission.py"]}
27,000
rendaman0215/housesearch_backend
refs/heads/master
/house/migrations/0012_auto_20210507_1312.py
# Generated by Django 3.1.2 on 2021-05-07 04:12 from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('house', '0011_auto_20210505_1427'), ] operations = [ migrations.RenameField( model_name='expense', old_name='comment...
{"/housesearch_backend/urls.py": ["/house/urls.py"], "/house/admin.py": ["/house/models.py"], "/house/serializer.py": ["/house/models.py"], "/house/views.py": ["/house/models.py", "/house/serializer.py", "/house/permission.py"]}
27,001
rendaman0215/housesearch_backend
refs/heads/master
/house/migrations/0028_auto_20210624_1229.py
# Generated by Django 3.1.2 on 2021-06-24 03:29 from django.db import migrations class Migration(migrations.Migration): dependencies = [ ('house', '0027_expense_hidden'), ] operations = [ migrations.RenameField( model_name='expense', old_name='hidden', ...
{"/housesearch_backend/urls.py": ["/house/urls.py"], "/house/admin.py": ["/house/models.py"], "/house/serializer.py": ["/house/models.py"], "/house/views.py": ["/house/models.py", "/house/serializer.py", "/house/permission.py"]}
27,002
rendaman0215/housesearch_backend
refs/heads/master
/house/migrations/0026_auto_20210622_1603.py
# Generated by Django 3.1.2 on 2021-06-22 07:03 from django.db import migrations, models import django.utils.timezone class Migration(migrations.Migration): dependencies = [ ('house', '0025_auto_20210605_0321'), ] operations = [ migrations.AddField( model_name='makercard', ...
{"/housesearch_backend/urls.py": ["/house/urls.py"], "/house/admin.py": ["/house/models.py"], "/house/serializer.py": ["/house/models.py"], "/house/views.py": ["/house/models.py", "/house/serializer.py", "/house/permission.py"]}
27,003
rendaman0215/housesearch_backend
refs/heads/master
/house/migrations/0019_auto_20210520_0023.py
# Generated by Django 3.1.2 on 2021-05-19 15:23 from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('house', '0018_auto_20210520_0013'), ] operations = [ migrations.AddField( model_name='expense', name='status', ...
{"/housesearch_backend/urls.py": ["/house/urls.py"], "/house/admin.py": ["/house/models.py"], "/house/serializer.py": ["/house/models.py"], "/house/views.py": ["/house/models.py", "/house/serializer.py", "/house/permission.py"]}
27,004
rendaman0215/housesearch_backend
refs/heads/master
/house/migrations/0009_auto_20210505_1346.py
# Generated by Django 3.1.2 on 2021-05-05 04:46 import django.core.validators from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('house', '0008_reviews_rate'), ] operations = [ migrations.RenameField( model_name='reviews', ...
{"/housesearch_backend/urls.py": ["/house/urls.py"], "/house/admin.py": ["/house/models.py"], "/house/serializer.py": ["/house/models.py"], "/house/views.py": ["/house/models.py", "/house/serializer.py", "/house/permission.py"]}
27,005
rendaman0215/housesearch_backend
refs/heads/master
/house/migrations/0013_auto_20210507_1810.py
# Generated by Django 3.1.2 on 2021-05-07 09:10 from django.db import migrations class Migration(migrations.Migration): dependencies = [ ('house', '0012_auto_20210507_1312'), ] operations = [ migrations.RenameField( model_name='expense', old_name='images', ...
{"/housesearch_backend/urls.py": ["/house/urls.py"], "/house/admin.py": ["/house/models.py"], "/house/serializer.py": ["/house/models.py"], "/house/views.py": ["/house/models.py", "/house/serializer.py", "/house/permission.py"]}
27,006
rendaman0215/housesearch_backend
refs/heads/master
/house/migrations/0011_auto_20210505_1427.py
# Generated by Django 3.1.2 on 2021-05-05 05:27 from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('house', '0010_reviews_avgrate'), ] operations = [ migrations.AlterField( model_name='reviews', name='avgrate', ...
{"/housesearch_backend/urls.py": ["/house/urls.py"], "/house/admin.py": ["/house/models.py"], "/house/serializer.py": ["/house/models.py"], "/house/views.py": ["/house/models.py", "/house/serializer.py", "/house/permission.py"]}
27,007
rendaman0215/housesearch_backend
refs/heads/master
/house/urls.py
from . import views from django.urls import path from rest_framework import routers from rest_framework_jwt.views import obtain_jwt_token, refresh_jwt_token router = routers.DefaultRouter() router.register(r'v1/makers', views.MakerCardViewSet) router.register(r'v1/reviews', views.ReviewViewSet) router.register(r'v1/...
{"/housesearch_backend/urls.py": ["/house/urls.py"], "/house/admin.py": ["/house/models.py"], "/house/serializer.py": ["/house/models.py"], "/house/views.py": ["/house/models.py", "/house/serializer.py", "/house/permission.py"]}
27,008
rendaman0215/housesearch_backend
refs/heads/master
/housesearch_backend/urls.py
from django.contrib import admin from django.conf.urls import url from django.urls import path,include from django.conf import settings from django.conf.urls.static import static from house.urls import router as house_router urlpatterns = [ path('admin/', admin.site.urls), url('api/', include(house_router.urls...
{"/housesearch_backend/urls.py": ["/house/urls.py"], "/house/admin.py": ["/house/models.py"], "/house/serializer.py": ["/house/models.py"], "/house/views.py": ["/house/models.py", "/house/serializer.py", "/house/permission.py"]}
27,009
rendaman0215/housesearch_backend
refs/heads/master
/house/permission.py
from rest_framework.permissions import BasePermission, SAFE_METHODS class IsMeOrAdminOrGuestOrOthers(BasePermission): def has_permission(self, request, view): if request.method in SAFE_METHODS: return True return request.user.is_authenticated def has_object_permission(self, request,...
{"/housesearch_backend/urls.py": ["/house/urls.py"], "/house/admin.py": ["/house/models.py"], "/house/serializer.py": ["/house/models.py"], "/house/views.py": ["/house/models.py", "/house/serializer.py", "/house/permission.py"]}
27,010
rendaman0215/housesearch_backend
refs/heads/master
/house/migrations/0017_expense_maker_name.py
# Generated by Django 3.1.2 on 2021-05-19 11:40 from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('house', '0016_reviews_maker_name'), ] operations = [ migrations.AddField( model_name='expense', name='maker_name', ...
{"/housesearch_backend/urls.py": ["/house/urls.py"], "/house/admin.py": ["/house/models.py"], "/house/serializer.py": ["/house/models.py"], "/house/views.py": ["/house/models.py", "/house/serializer.py", "/house/permission.py"]}
27,011
rendaman0215/housesearch_backend
refs/heads/master
/house/admin.py
from django.contrib import admin from .models import MakerCard, Reviews, Expense admin.site.register(MakerCard) admin.site.register(Reviews) admin.site.register(Expense)
{"/housesearch_backend/urls.py": ["/house/urls.py"], "/house/admin.py": ["/house/models.py"], "/house/serializer.py": ["/house/models.py"], "/house/views.py": ["/house/models.py", "/house/serializer.py", "/house/permission.py"]}
27,012
rendaman0215/housesearch_backend
refs/heads/master
/house/migrations/0016_reviews_maker_name.py
# Generated by Django 3.1.2 on 2021-05-12 14:39 from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('house', '0015_auto_20210508_1846'), ] operations = [ migrations.AddField( model_name='reviews', name='maker_name', ...
{"/housesearch_backend/urls.py": ["/house/urls.py"], "/house/admin.py": ["/house/models.py"], "/house/serializer.py": ["/house/models.py"], "/house/views.py": ["/house/models.py", "/house/serializer.py", "/house/permission.py"]}
27,013
rendaman0215/housesearch_backend
refs/heads/master
/house/serializer.py
from rest_framework import serializers from .models import MakerCard, Reviews, Expense class MakerCardSerializer(serializers.ModelSerializer): image_url = serializers.SerializerMethodField() class Meta: model = MakerCard fields = ('pk', 'name', 'name_hira', 'name_kata', 'name_eng', 'image_url',...
{"/housesearch_backend/urls.py": ["/house/urls.py"], "/house/admin.py": ["/house/models.py"], "/house/serializer.py": ["/house/models.py"], "/house/views.py": ["/house/models.py", "/house/serializer.py", "/house/permission.py"]}
27,014
rendaman0215/housesearch_backend
refs/heads/master
/house/migrations/0032_auto_20210625_1638.py
# Generated by Django 3.1.2 on 2021-06-25 07:38 from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('house', '0031_remove_expense_layoutimage'), ] operations = [ migrations.AddField( model_name='expense', name='expima...
{"/housesearch_backend/urls.py": ["/house/urls.py"], "/house/admin.py": ["/house/models.py"], "/house/serializer.py": ["/house/models.py"], "/house/views.py": ["/house/models.py", "/house/serializer.py", "/house/permission.py"]}
27,015
rendaman0215/housesearch_backend
refs/heads/master
/house/migrations/0024_auto_20210605_0309.py
# Generated by Django 3.1.2 on 2021-06-04 18:09 from django.db import migrations, models import uuid class Migration(migrations.Migration): dependencies = [ ('house', '0023_auto_20210604_0256'), ] operations = [ migrations.RemoveField( model_name='expense', name=...
{"/housesearch_backend/urls.py": ["/house/urls.py"], "/house/admin.py": ["/house/models.py"], "/house/serializer.py": ["/house/models.py"], "/house/views.py": ["/house/models.py", "/house/serializer.py", "/house/permission.py"]}
27,016
rendaman0215/housesearch_backend
refs/heads/master
/house/migrations/0007_expense_landarea.py
# Generated by Django 3.1.2 on 2021-05-04 07:52 from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('house', '0006_auto_20210429_1458'), ] operations = [ migrations.AddField( model_name='expense', name='landarea', ...
{"/housesearch_backend/urls.py": ["/house/urls.py"], "/house/admin.py": ["/house/models.py"], "/house/serializer.py": ["/house/models.py"], "/house/views.py": ["/house/models.py", "/house/serializer.py", "/house/permission.py"]}
27,017
rendaman0215/housesearch_backend
refs/heads/master
/house/migrations/0029_auto_20210624_1253.py
# Generated by Django 3.1.2 on 2021-06-24 03:53 from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('house', '0028_auto_20210624_1229'), ] operations = [ migrations.RemoveField( model_name='reviews', name='attachcomme...
{"/housesearch_backend/urls.py": ["/house/urls.py"], "/house/admin.py": ["/house/models.py"], "/house/serializer.py": ["/house/models.py"], "/house/views.py": ["/house/models.py", "/house/serializer.py", "/house/permission.py"]}
27,018
rendaman0215/housesearch_backend
refs/heads/master
/house/migrations/0006_auto_20210429_1458.py
# Generated by Django 3.1.2 on 2021-04-29 05:58 from django.db import migrations class Migration(migrations.Migration): dependencies = [ ('house', '0005_auto_20210429_1419'), ] operations = [ migrations.AlterModelOptions( name='expense', options={'verbose_name': ...
{"/housesearch_backend/urls.py": ["/house/urls.py"], "/house/admin.py": ["/house/models.py"], "/house/serializer.py": ["/house/models.py"], "/house/views.py": ["/house/models.py", "/house/serializer.py", "/house/permission.py"]}
27,019
rendaman0215/housesearch_backend
refs/heads/master
/house/migrations/0014_auto_20210508_0057.py
# Generated by Django 3.1.2 on 2021-05-07 15:57 from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('house', '0013_auto_20210507_1810'), ] operations = [ migrations.AlterField( model_name='expense', name='image', ...
{"/housesearch_backend/urls.py": ["/house/urls.py"], "/house/admin.py": ["/house/models.py"], "/house/serializer.py": ["/house/models.py"], "/house/views.py": ["/house/models.py", "/house/serializer.py", "/house/permission.py"]}
27,020
rendaman0215/housesearch_backend
refs/heads/master
/house/migrations/0015_auto_20210508_1846.py
# Generated by Django 3.1.2 on 2021-05-08 09:46 from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('house', '0014_auto_20210508_0057'), ] operations = [ migrations.AddField( model_name='makercard', name='name_eng', ...
{"/housesearch_backend/urls.py": ["/house/urls.py"], "/house/admin.py": ["/house/models.py"], "/house/serializer.py": ["/house/models.py"], "/house/views.py": ["/house/models.py", "/house/serializer.py", "/house/permission.py"]}
27,021
rendaman0215/housesearch_backend
refs/heads/master
/house/migrations/0003_auto_20210429_1408.py
# Generated by Django 3.1.2 on 2021-04-29 05:08 from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('house', '0002_expense_reviews'), ] operations = [ migrations.RenameField( model_name='expense', old_name='content', ...
{"/housesearch_backend/urls.py": ["/house/urls.py"], "/house/admin.py": ["/house/models.py"], "/house/serializer.py": ["/house/models.py"], "/house/views.py": ["/house/models.py", "/house/serializer.py", "/house/permission.py"]}
27,022
rendaman0215/housesearch_backend
refs/heads/master
/house/migrations/0021_makercard_images.py
# Generated by Django 3.1.2 on 2021-05-19 15:43 from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('house', '0020_auto_20210520_0042'), ] operations = [ migrations.AddField( model_name='makercard', name='images', ...
{"/housesearch_backend/urls.py": ["/house/urls.py"], "/house/admin.py": ["/house/models.py"], "/house/serializer.py": ["/house/models.py"], "/house/views.py": ["/house/models.py", "/house/serializer.py", "/house/permission.py"]}
27,023
rendaman0215/housesearch_backend
refs/heads/master
/house/views.py
# Model, Form, Serializer, Permissionをimport from .models import MakerCard, Reviews, Expense from .serializer import MakerCardSerializer, ReviewSerializer, ExpenseSerializer from .permission import IsAdminOrReadOnly, IsMeOrAdminOrGuestOrOthers # REST FRAMEWORK系 from rest_framework import viewsets, status, generics fro...
{"/housesearch_backend/urls.py": ["/house/urls.py"], "/house/admin.py": ["/house/models.py"], "/house/serializer.py": ["/house/models.py"], "/house/views.py": ["/house/models.py", "/house/serializer.py", "/house/permission.py"]}
27,024
rendaman0215/housesearch_backend
refs/heads/master
/house/migrations/0027_expense_hidden.py
# Generated by Django 3.1.2 on 2021-06-23 16:45 from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('house', '0026_auto_20210622_1603'), ] operations = [ migrations.AddField( model_name='expense', name='hidden', ...
{"/housesearch_backend/urls.py": ["/house/urls.py"], "/house/admin.py": ["/house/models.py"], "/house/serializer.py": ["/house/models.py"], "/house/views.py": ["/house/models.py", "/house/serializer.py", "/house/permission.py"]}
27,025
rendaman0215/housesearch_backend
refs/heads/master
/house/migrations/0005_auto_20210429_1419.py
# Generated by Django 3.1.2 on 2021-04-29 05:19 from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('house', '0004_auto_20210429_1418'), ] operations = [ migrations.AlterField( model_name='expense', name='images', ...
{"/housesearch_backend/urls.py": ["/house/urls.py"], "/house/admin.py": ["/house/models.py"], "/house/serializer.py": ["/house/models.py"], "/house/views.py": ["/house/models.py", "/house/serializer.py", "/house/permission.py"]}
27,026
rendaman0215/housesearch_backend
refs/heads/master
/house/models.py
from django.db import models from django.db.models import Avg from django.core.validators import MaxValueValidator, MinValueValidator class MakerCard(models.Model): id = models.AutoField(primary_key=True) description = models.TextField() name = models.CharField(max_length=100) name_hira = models.CharFi...
{"/housesearch_backend/urls.py": ["/house/urls.py"], "/house/admin.py": ["/house/models.py"], "/house/serializer.py": ["/house/models.py"], "/house/views.py": ["/house/models.py", "/house/serializer.py", "/house/permission.py"]}
27,031
yuanchen8911/serverless-chatbot
refs/heads/master
/tig_faas_bot/FaaS_Functions/Slack_Version/post-message-slack/handler.py
import os import json import sys import logging import requests SLACK_BOT_TOKEN_SECRET_NAME = os.getenv("SLACK_BOT_TOKEN_SECRET_NAME", 'slack_bot_token') SLACK_BOT_TOKEN = None SLACK_POST_URL = os.getenv("SLACK_POST_URL", 'https://slack.com/api/chat.postMessage') from .general_utility import load_faas_secret from .ge...
{"/tig_faas_bot/FaaS_Functions/Slack_Version/bot-crud-slack/handler.py": ["/tig_faas_bot/FaaS_Functions/Slack_Version/bot-crud-slack/eve_mongo_utility.py"], "/tig_faas_bot/FaaS_Functions/Slack_Version/nlp-webhook-slack/handler.py": ["/tig_faas_bot/FaaS_Functions/Slack_Version/nlp-webhook-slack/faas_function_call_utilit...
27,032
yuanchen8911/serverless-chatbot
refs/heads/master
/tig_faas_bot/FaaS_Functions/Slack_Version/bot-crud-slack/eve_mongo_utility.py
""" Utility for CRUD operation of the python-eve. Build with python requests. """ import os import sys import json import requests import logging # Entry point for access from docker container to host machine. # Setting Python-Eve: app.run(host='0.0.0.0'), then use one of the following entry point.{docker0/docker_gwb...
{"/tig_faas_bot/FaaS_Functions/Slack_Version/bot-crud-slack/handler.py": ["/tig_faas_bot/FaaS_Functions/Slack_Version/bot-crud-slack/eve_mongo_utility.py"], "/tig_faas_bot/FaaS_Functions/Slack_Version/nlp-webhook-slack/handler.py": ["/tig_faas_bot/FaaS_Functions/Slack_Version/nlp-webhook-slack/faas_function_call_utilit...
27,033
yuanchen8911/serverless-chatbot
refs/heads/master
/tig_faas_bot/FaaS_Functions/Slack_Version/script_build_deploy_bot_functions.py
"""Script for Build and Deploy Functions """ import os import sys import logging import subprocess def execute_and_print_result(command): """Execute and print running result of a command Arguments: command {str} -- bash command """ p = subprocess.Popen(command, shell=True, stdout=subproc...
{"/tig_faas_bot/FaaS_Functions/Slack_Version/bot-crud-slack/handler.py": ["/tig_faas_bot/FaaS_Functions/Slack_Version/bot-crud-slack/eve_mongo_utility.py"], "/tig_faas_bot/FaaS_Functions/Slack_Version/nlp-webhook-slack/handler.py": ["/tig_faas_bot/FaaS_Functions/Slack_Version/nlp-webhook-slack/faas_function_call_utilit...
27,034
yuanchen8911/serverless-chatbot
refs/heads/master
/tig_faas_bot/Eve_MongoDB/settings.py
""" Setting for the python-eve. """ MONGO_HOST = 'localhost' MONGO_PORT = 27017 MONGO_DBNAME = 'db_faas_bot' # Setting ALLOW_UNKNOWN = True cause we don't wan't to setting schema for each resource below. ALLOW_UNKNOWN = True # Enable reads (GET), inserts (POST) and DELETE for resources/collections # (if you omit ...
{"/tig_faas_bot/FaaS_Functions/Slack_Version/bot-crud-slack/handler.py": ["/tig_faas_bot/FaaS_Functions/Slack_Version/bot-crud-slack/eve_mongo_utility.py"], "/tig_faas_bot/FaaS_Functions/Slack_Version/nlp-webhook-slack/handler.py": ["/tig_faas_bot/FaaS_Functions/Slack_Version/nlp-webhook-slack/faas_function_call_utilit...
27,035
yuanchen8911/serverless-chatbot
refs/heads/master
/tig_faas_bot/Utility/product_info_utility.py
""" Utility for product info related operartions """ import sys import uuid import logging from pymongo import MongoClient def generate_uuid_str(): """Generate uuid str of length 32 (UUID4) Returns: str -- uuid str of length 32 (UUID4) """ return str(uuid.uuid4()) def read_product_info...
{"/tig_faas_bot/FaaS_Functions/Slack_Version/bot-crud-slack/handler.py": ["/tig_faas_bot/FaaS_Functions/Slack_Version/bot-crud-slack/eve_mongo_utility.py"], "/tig_faas_bot/FaaS_Functions/Slack_Version/nlp-webhook-slack/handler.py": ["/tig_faas_bot/FaaS_Functions/Slack_Version/nlp-webhook-slack/faas_function_call_utilit...
27,036
yuanchen8911/serverless-chatbot
refs/heads/master
/tig_faas_bot/FaaS_Functions/Slack_Version/nlp-webhook-slack/faas_function_call_utility.py
""" Utility for Asynchronous / Synchronous call a FaaS function """ import sys import json import logging import requests def get_function_url(is_async, base_url, function_name): """Get the function url for HTTP call Arguments: is_async {bool} -- is asynchronous base_url {str} -- FaaS ad...
{"/tig_faas_bot/FaaS_Functions/Slack_Version/bot-crud-slack/handler.py": ["/tig_faas_bot/FaaS_Functions/Slack_Version/bot-crud-slack/eve_mongo_utility.py"], "/tig_faas_bot/FaaS_Functions/Slack_Version/nlp-webhook-slack/handler.py": ["/tig_faas_bot/FaaS_Functions/Slack_Version/nlp-webhook-slack/faas_function_call_utilit...
27,037
yuanchen8911/serverless-chatbot
refs/heads/master
/tig_faas_bot/FaaS_Functions/Slack_Version/slack-event-webhook-slack/handler.py
import os import sys import logging import json from .faas_function_call_utility import call_faas_function from .general_utility import get_pretty_JSON FAAS_GATEWAY_URL = os.getenv('FAAS_GATEWAY_URL', 'http://gateway:8080') FUNCTION_NAME_QUERY_DIALOGFLOW_SLACK = os.getenv('FUNCTION_NAME_QUERY_DIALOGFLOW_SLACK', 'quer...
{"/tig_faas_bot/FaaS_Functions/Slack_Version/bot-crud-slack/handler.py": ["/tig_faas_bot/FaaS_Functions/Slack_Version/bot-crud-slack/eve_mongo_utility.py"], "/tig_faas_bot/FaaS_Functions/Slack_Version/nlp-webhook-slack/handler.py": ["/tig_faas_bot/FaaS_Functions/Slack_Version/nlp-webhook-slack/faas_function_call_utilit...
27,038
yuanchen8911/serverless-chatbot
refs/heads/master
/tig_faas_bot/FaaS_Functions/Slack_Version/bot-crud-slack/handler.py
""" FaaS function for operating database - MongoDB """ import sys import logging import json from .eve_mongo_utility import perform_document_insert from .eve_mongo_utility import perform_document_query from .eve_mongo_utility import perform_document_update from .eve_mongo_utility import perform_document_delete from .e...
{"/tig_faas_bot/FaaS_Functions/Slack_Version/bot-crud-slack/handler.py": ["/tig_faas_bot/FaaS_Functions/Slack_Version/bot-crud-slack/eve_mongo_utility.py"], "/tig_faas_bot/FaaS_Functions/Slack_Version/nlp-webhook-slack/handler.py": ["/tig_faas_bot/FaaS_Functions/Slack_Version/nlp-webhook-slack/faas_function_call_utilit...
27,039
yuanchen8911/serverless-chatbot
refs/heads/master
/tig_faas_bot/Eve_MongoDB/mongo_eve.py
""" Script for starting the simplest python-eve. No auth. """ import sys import logging from eve import Eve app = Eve() def main(): logging.basicConfig(stream=sys.stderr, level=logging.DEBUG) logging.info("Start Python-Eve...") app.run(host='0.0.0.0') if __name__ == '__main__': main()
{"/tig_faas_bot/FaaS_Functions/Slack_Version/bot-crud-slack/handler.py": ["/tig_faas_bot/FaaS_Functions/Slack_Version/bot-crud-slack/eve_mongo_utility.py"], "/tig_faas_bot/FaaS_Functions/Slack_Version/nlp-webhook-slack/handler.py": ["/tig_faas_bot/FaaS_Functions/Slack_Version/nlp-webhook-slack/faas_function_call_utilit...
27,040
yuanchen8911/serverless-chatbot
refs/heads/master
/tig_faas_bot/FaaS_Functions/Slack_Version/nlp-webhook-slack/handler.py
""" Webhook for the NLP module(Google's Dialogflow). """ import os import sys import json import logging import requests from .faas_function_call_utility import call_faas_function from .general_utility import get_pretty_JSON FAAS_GATEWAY_URL = os.getenv("FAAS_GATEWAY_URL", 'http://gateway:8080') FUNCTION_NAME_GET_OP...
{"/tig_faas_bot/FaaS_Functions/Slack_Version/bot-crud-slack/handler.py": ["/tig_faas_bot/FaaS_Functions/Slack_Version/bot-crud-slack/eve_mongo_utility.py"], "/tig_faas_bot/FaaS_Functions/Slack_Version/nlp-webhook-slack/handler.py": ["/tig_faas_bot/FaaS_Functions/Slack_Version/nlp-webhook-slack/faas_function_call_utilit...
27,041
yuanchen8911/serverless-chatbot
refs/heads/master
/tig_faas_bot/Utility/__init__.py
from . import eve_mongo_utility from . import general_utility
{"/tig_faas_bot/FaaS_Functions/Slack_Version/bot-crud-slack/handler.py": ["/tig_faas_bot/FaaS_Functions/Slack_Version/bot-crud-slack/eve_mongo_utility.py"], "/tig_faas_bot/FaaS_Functions/Slack_Version/nlp-webhook-slack/handler.py": ["/tig_faas_bot/FaaS_Functions/Slack_Version/nlp-webhook-slack/faas_function_call_utilit...
27,042
yuanchen8911/serverless-chatbot
refs/heads/master
/tig_faas_bot/FaaS_Functions/Slack_Version/query-dialogflow-slack/handler.py
import os import sys import logging import json import requests from .faas_function_call_utility import call_faas_function from .general_utility import get_pretty_JSON from .general_utility import load_faas_secret FAAS_GATEWAY_URL = os.getenv('FAAS_GATEWAY_URL', 'http://gateway:8080') FUNCTION_NAME_POST_MESSAGE_SLACK...
{"/tig_faas_bot/FaaS_Functions/Slack_Version/bot-crud-slack/handler.py": ["/tig_faas_bot/FaaS_Functions/Slack_Version/bot-crud-slack/eve_mongo_utility.py"], "/tig_faas_bot/FaaS_Functions/Slack_Version/nlp-webhook-slack/handler.py": ["/tig_faas_bot/FaaS_Functions/Slack_Version/nlp-webhook-slack/faas_function_call_utilit...
27,043
yuanchen8911/serverless-chatbot
refs/heads/master
/tig_faas_bot/FaaS_Functions/Slack_Version/get-user-selected-option-from-slack-slack/handler.py
import os import sys import logging import json import requests from urllib.parse import parse_qs from .faas_function_call_utility import call_faas_function from .general_utility import get_pretty_JSON FAAS_GATEWAY_URL = os.getenv("FAAS_GATEWAY_URL", 'http://gateway:8080') FUNCTION_NAME_QUERY_DIALOGFLOW_SLACK = os.ge...
{"/tig_faas_bot/FaaS_Functions/Slack_Version/bot-crud-slack/handler.py": ["/tig_faas_bot/FaaS_Functions/Slack_Version/bot-crud-slack/eve_mongo_utility.py"], "/tig_faas_bot/FaaS_Functions/Slack_Version/nlp-webhook-slack/handler.py": ["/tig_faas_bot/FaaS_Functions/Slack_Version/nlp-webhook-slack/faas_function_call_utilit...
27,044
yuanchen8911/serverless-chatbot
refs/heads/master
/tig_faas_bot/FaaS_Functions/Slack_Version/nlp-webhook-slack/general_utility.py
""" General Utility for FaaS functions """ import sys import logging import json def get_pretty_JSON(json_dict): """pretty json str Arguments: json_dict {dict} -- json dict Returns: str -- json str after pretty """ pretty_JSON_str = json.dumps(json_dict, indent=4) ret...
{"/tig_faas_bot/FaaS_Functions/Slack_Version/bot-crud-slack/handler.py": ["/tig_faas_bot/FaaS_Functions/Slack_Version/bot-crud-slack/eve_mongo_utility.py"], "/tig_faas_bot/FaaS_Functions/Slack_Version/nlp-webhook-slack/handler.py": ["/tig_faas_bot/FaaS_Functions/Slack_Version/nlp-webhook-slack/faas_function_call_utilit...
27,045
mgieger/Titanic-survival-analysis
refs/heads/master
/forestclf/main.py
from preprocessor import Preprocessor from sklearn.ensemble import RandomForestClassifier from sklearn.ensemble import GradientBoostingClassifier from forestclf.ensemblerunner import EnsembleRunner import pprint import itertools as iter import sys def main(): """ columns = [ 'pclass', 'name', ...
{"/forestclf/main.py": ["/forestclf/ensemblerunner.py"]}
27,046
mgieger/Titanic-survival-analysis
refs/heads/master
/DNN/main.py
import json import math import os import time from preprocessor import Preprocessor from keras import optimizers from keras.layers import Dense, Activation, Dropout from keras.models import Sequential import numpy as np import pandas as pd from sklearn.metrics import classification_report, confusion_matrix def save...
{"/forestclf/main.py": ["/forestclf/ensemblerunner.py"]}
27,047
mgieger/Titanic-survival-analysis
refs/heads/master
/forestclf/ensemblerunner.py
import numpy as np import preprocessor from sklearn.externals.six import StringIO from sklearn.tree import export_graphviz import pydotplus #import matplotlib.pyplot as plt import os class EnsembleRunner(object): def __init__(self, data, clf): training_data = data["training"] testing_data = data[...
{"/forestclf/main.py": ["/forestclf/ensemblerunner.py"]}
27,048
xiaoyanguoke/klb
refs/heads/master
/webadmin/models.py
# -*- coding:utf-8 -*- from django.db import models class ebusiness_members(models.Model): father = models.ForeignKey('self', default='', null=True, blank=True, verbose_name='父级渠道') username = models.CharField(max_length=255, default='', verbose_name='渠道方的用户名') passwd = models.CharField(max_length=255, de...
{"/members/urls.py": ["/members/views.py"], "/ebusiness/urls.py": ["/ebusiness/views.py"], "/ClientAdmin/forms.py": ["/webadmin/models.py"], "/bxservice/ZhongHuaViews.py": ["/bxservice/zhonghua.py", "/bxservice/ansheng.py", "/bxservice/yangguang.py"], "/bxservice/urls.py": ["/bxservice/ZhongHuaViews.py", "/bxservice/vi...
27,049
xiaoyanguoke/klb
refs/heads/master
/members/urls.py
# -*- coding:utf-8 -*- from django.conf.urls import patterns,include,url from members.views import * urlpatterns = patterns('', url(r'^$',Index,name="index"), url(r'^login/$',Login,name="login"), url(r'login/wechat/$',WechatLogin,name="WechatLogin")...
{"/members/urls.py": ["/members/views.py"], "/ebusiness/urls.py": ["/ebusiness/views.py"], "/ClientAdmin/forms.py": ["/webadmin/models.py"], "/bxservice/ZhongHuaViews.py": ["/bxservice/zhonghua.py", "/bxservice/ansheng.py", "/bxservice/yangguang.py"], "/bxservice/urls.py": ["/bxservice/ZhongHuaViews.py", "/bxservice/vi...
27,050
xiaoyanguoke/klb
refs/heads/master
/klbapp/appclass.py
# -*- coding:utf-8 -*- from LYZ.settings import * from datetime import datetime import time,urllib,json,sys,httplib,urllib2,re # 字符串加密解密 class AppBaseStr(object): def __init__(self, key=SECRET_KEY): self.__src_key = key self.__key = self.__get_strascii(self.__src_key, True) def encode(self, v...
{"/members/urls.py": ["/members/views.py"], "/ebusiness/urls.py": ["/ebusiness/views.py"], "/ClientAdmin/forms.py": ["/webadmin/models.py"], "/bxservice/ZhongHuaViews.py": ["/bxservice/zhonghua.py", "/bxservice/ansheng.py", "/bxservice/yangguang.py"], "/bxservice/urls.py": ["/bxservice/ZhongHuaViews.py", "/bxservice/vi...
27,051
xiaoyanguoke/klb
refs/heads/master
/ebusiness/urls.py
# -*- coding:utf-8 -*- from django.conf.urls import patterns, include, url from ebusiness.views import * urlpatterns = patterns('', url(r'^$', initVehicleBaseInfo, name="index"), url(r'^initVehicleBaseInfo/$', initVehicleBaseInfo, name="initVehicleBaseInfo"), ...
{"/members/urls.py": ["/members/views.py"], "/ebusiness/urls.py": ["/ebusiness/views.py"], "/ClientAdmin/forms.py": ["/webadmin/models.py"], "/bxservice/ZhongHuaViews.py": ["/bxservice/zhonghua.py", "/bxservice/ansheng.py", "/bxservice/yangguang.py"], "/bxservice/urls.py": ["/bxservice/ZhongHuaViews.py", "/bxservice/vi...
27,052
xiaoyanguoke/klb
refs/heads/master
/webadmin/views.py
# -*- coding:utf-8 -*- from django.shortcuts import * from LYZ.common import * from webadmin.forms import UserForms, UserAuth,DefineCodeForms,AutoCreateUser from webadmin.models import ebusiness_members from django.core.paginator import Paginator, InvalidPage, EmptyPage, PageNotAnInteger from LYZ.klb_class import KLBCo...
{"/members/urls.py": ["/members/views.py"], "/ebusiness/urls.py": ["/ebusiness/views.py"], "/ClientAdmin/forms.py": ["/webadmin/models.py"], "/bxservice/ZhongHuaViews.py": ["/bxservice/zhonghua.py", "/bxservice/ansheng.py", "/bxservice/yangguang.py"], "/bxservice/urls.py": ["/bxservice/ZhongHuaViews.py", "/bxservice/vi...
27,053
xiaoyanguoke/klb
refs/heads/master
/ClientAdmin/forms.py
# -*- coding:utf-8 -*- from django import forms from django.contrib.auth.hashers import make_password, check_password from webadmin.models import ebusiness_members STATUS_OPTIONS = (("0", "激活"),("1", "未激活")) class AddUserForms(forms.Form): username = forms.CharField( required=True, max_length=40, ...
{"/members/urls.py": ["/members/views.py"], "/ebusiness/urls.py": ["/ebusiness/views.py"], "/ClientAdmin/forms.py": ["/webadmin/models.py"], "/bxservice/ZhongHuaViews.py": ["/bxservice/zhonghua.py", "/bxservice/ansheng.py", "/bxservice/yangguang.py"], "/bxservice/urls.py": ["/bxservice/ZhongHuaViews.py", "/bxservice/vi...
27,054
xiaoyanguoke/klb
refs/heads/master
/bxservice/common.py
# -*-coding:utf-8 -*- import cookielib import random import string import urllib import urllib2 import re import time import json import datetime import base64 import os import httplib from django.core.exceptions import ObjectDoesNotExist from bxservice.models import bxcarvin from bxservice.models import bxcarinfo from...
{"/members/urls.py": ["/members/views.py"], "/ebusiness/urls.py": ["/ebusiness/views.py"], "/ClientAdmin/forms.py": ["/webadmin/models.py"], "/bxservice/ZhongHuaViews.py": ["/bxservice/zhonghua.py", "/bxservice/ansheng.py", "/bxservice/yangguang.py"], "/bxservice/urls.py": ["/bxservice/ZhongHuaViews.py", "/bxservice/vi...
27,055
xiaoyanguoke/klb
refs/heads/master
/ebusiness/views.py
# -*- coding:utf-8 -*- from django.shortcuts import * from ebusiness.forms import initVehicleBaseInfoForm,EditInfoForm from LYZ.klb_class import KLBCode,PingAn,GetCarVin,UrlCode,KLBOAuth from ebusiness.models import vin_as_car_yg from bxservice.ZhongHuaAction import * from bxservice.ansheng import * from bxservice.yang...
{"/members/urls.py": ["/members/views.py"], "/ebusiness/urls.py": ["/ebusiness/views.py"], "/ClientAdmin/forms.py": ["/webadmin/models.py"], "/bxservice/ZhongHuaViews.py": ["/bxservice/zhonghua.py", "/bxservice/ansheng.py", "/bxservice/yangguang.py"], "/bxservice/urls.py": ["/bxservice/ZhongHuaViews.py", "/bxservice/vi...
27,056
xiaoyanguoke/klb
refs/heads/master
/members/templatetags/__init__.py
__author__ = 'fengdaye'
{"/members/urls.py": ["/members/views.py"], "/ebusiness/urls.py": ["/ebusiness/views.py"], "/ClientAdmin/forms.py": ["/webadmin/models.py"], "/bxservice/ZhongHuaViews.py": ["/bxservice/zhonghua.py", "/bxservice/ansheng.py", "/bxservice/yangguang.py"], "/bxservice/urls.py": ["/bxservice/ZhongHuaViews.py", "/bxservice/vi...
27,057
xiaoyanguoke/klb
refs/heads/master
/LYZ/settings.py
# -*- coding:utf-8 -*- import os BASE_DIR = os.path.dirname(os.path.dirname(__file__)) WEB_ROOT = BASE_DIR.replace('\\','/') PUBLIC_DIR=os.path.join(WEB_ROOT,'public/').replace('\\','/') FONTS_DIR=os.path.join(WEB_ROOT,'fonts/').replace('\\','/') # 网页模版目录 TEMPLATE_DIRS = ( os.path.join(WEB_ROOT,'templates/').repl...
{"/members/urls.py": ["/members/views.py"], "/ebusiness/urls.py": ["/ebusiness/views.py"], "/ClientAdmin/forms.py": ["/webadmin/models.py"], "/bxservice/ZhongHuaViews.py": ["/bxservice/zhonghua.py", "/bxservice/ansheng.py", "/bxservice/yangguang.py"], "/bxservice/urls.py": ["/bxservice/ZhongHuaViews.py", "/bxservice/vi...
27,058
xiaoyanguoke/klb
refs/heads/master
/bxservice/ZhongHuaViews.py
# -*- coding:utf-8 -*- from django.shortcuts import * from bxservice.zhonghua import * from bxservice.ansheng import * from bxservice.yangguang import * import dicttoxml def ZhongHuaIndex(request): YGServ = YangGuang() Z = YGServ.Send() return HttpResponse(Z)
{"/members/urls.py": ["/members/views.py"], "/ebusiness/urls.py": ["/ebusiness/views.py"], "/ClientAdmin/forms.py": ["/webadmin/models.py"], "/bxservice/ZhongHuaViews.py": ["/bxservice/zhonghua.py", "/bxservice/ansheng.py", "/bxservice/yangguang.py"], "/bxservice/urls.py": ["/bxservice/ZhongHuaViews.py", "/bxservice/vi...
27,059
xiaoyanguoke/klb
refs/heads/master
/bxservice/urls.py
# -*- coding:utf-8 -*- from django.conf.urls import patterns,include,url from bxservice.ZhongHuaViews import * from bxservice.views import * urlpatterns = patterns('', url(r'^PriceList/$',PriceList,name="PriceList"), url(r'^zh/$',ZhongHuaIndex,name="ZhongHuaIndex"), ...
{"/members/urls.py": ["/members/views.py"], "/ebusiness/urls.py": ["/ebusiness/views.py"], "/ClientAdmin/forms.py": ["/webadmin/models.py"], "/bxservice/ZhongHuaViews.py": ["/bxservice/zhonghua.py", "/bxservice/ansheng.py", "/bxservice/yangguang.py"], "/bxservice/urls.py": ["/bxservice/ZhongHuaViews.py", "/bxservice/vi...
27,060
xiaoyanguoke/klb
refs/heads/master
/bxservice/zhonghua.py
# -*- coding:utf-8 -*- from LYZ.common import makeNew from common import * import datetime, random, urllib, urllib2, time from LYZ.settings import * from suds.client import * import sys, xmltodict import json import re import dicttoxml reload(sys) sys.setdefaultencoding('utf-8') # 中华保险 class ZhongHua(object): # ...
{"/members/urls.py": ["/members/views.py"], "/ebusiness/urls.py": ["/ebusiness/views.py"], "/ClientAdmin/forms.py": ["/webadmin/models.py"], "/bxservice/ZhongHuaViews.py": ["/bxservice/zhonghua.py", "/bxservice/ansheng.py", "/bxservice/yangguang.py"], "/bxservice/urls.py": ["/bxservice/ZhongHuaViews.py", "/bxservice/vi...
27,061
xiaoyanguoke/klb
refs/heads/master
/ClientAdmin/views.py
# -*- coding:utf-8 -*- from django.shortcuts import * from ClientAdmin.forms import AddUserForms from django.contrib.auth.hashers import make_password, check_password def Index(request): return render_to_response('ClientAdmin/Index.html', {}, context_instance=RequestContext(request)) def Login(request): return ...
{"/members/urls.py": ["/members/views.py"], "/ebusiness/urls.py": ["/ebusiness/views.py"], "/ClientAdmin/forms.py": ["/webadmin/models.py"], "/bxservice/ZhongHuaViews.py": ["/bxservice/zhonghua.py", "/bxservice/ansheng.py", "/bxservice/yangguang.py"], "/bxservice/urls.py": ["/bxservice/ZhongHuaViews.py", "/bxservice/vi...
27,062
xiaoyanguoke/klb
refs/heads/master
/ClientAdmin/templatetags/function.py
# -*- coding:utf-8 -*- import re ''' $函数名:CheckStrFormat $介绍:检查字符串格式 $参数:str(string) $返回:int 1邮件2手机3中文 ''' def CheckStrFormat(str): # 判断用户登录方式:手机号,邮件地址,用户名 PhoneRegex = "^(13[0-9]|15[012356789]|17[678]|18[0-9]|14[57])[0-9]{8}$" # 手机号正则 EmailRegex = "^([a-zA-Z0-9_\.\-])+\@(([a-zA-Z0-9\-])+\.)+([a-zA-Z0-9...
{"/members/urls.py": ["/members/views.py"], "/ebusiness/urls.py": ["/ebusiness/views.py"], "/ClientAdmin/forms.py": ["/webadmin/models.py"], "/bxservice/ZhongHuaViews.py": ["/bxservice/zhonghua.py", "/bxservice/ansheng.py", "/bxservice/yangguang.py"], "/bxservice/urls.py": ["/bxservice/ZhongHuaViews.py", "/bxservice/vi...
27,063
xiaoyanguoke/klb
refs/heads/master
/members/views.py
# -*- coding:utf-8 -*- from django.shortcuts import * from LYZ.settings import * from django.contrib.auth.hashers import make_password, check_password from django.contrib.auth.decorators import login_required from django.contrib.auth import authenticate, login, logout from django.contrib.auth.models import User from dj...
{"/members/urls.py": ["/members/views.py"], "/ebusiness/urls.py": ["/ebusiness/views.py"], "/ClientAdmin/forms.py": ["/webadmin/models.py"], "/bxservice/ZhongHuaViews.py": ["/bxservice/zhonghua.py", "/bxservice/ansheng.py", "/bxservice/yangguang.py"], "/bxservice/urls.py": ["/bxservice/ZhongHuaViews.py", "/bxservice/vi...
27,064
xiaoyanguoke/klb
refs/heads/master
/ebusiness/models.py
# -*- coding:utf-8 -*- from django.db import models class vin_as_car_yg(models.Model): vehicleFgwCode = models.CharField(max_length=255,default="",blank=True,null="") value = models.CharField(max_length=255,default="",blank=True,null="") key = models.CharField(max_length=255,default="",blank=True,null="") ...
{"/members/urls.py": ["/members/views.py"], "/ebusiness/urls.py": ["/ebusiness/views.py"], "/ClientAdmin/forms.py": ["/webadmin/models.py"], "/bxservice/ZhongHuaViews.py": ["/bxservice/zhonghua.py", "/bxservice/ansheng.py", "/bxservice/yangguang.py"], "/bxservice/urls.py": ["/bxservice/ZhongHuaViews.py", "/bxservice/vi...