index
int64
repo_name
string
branch_name
string
path
string
content
string
import_graph
string
13,927
mao-liu/bricklayer
refs/heads/master
/bricklayer/catalog/crawler.py
""" delta_tables crawlers two functions supported - restore delta tables from delta_log location - update existing delta table from delta_log location ``` """ import typing import logging from pathlib import Path from pyspark.sql import SparkSession from . import dbricks_catalog class Crawler(): ...
{"/bricklayer/catalog/crawler.py": ["/bricklayer/catalog/__init__.py"], "/bricklayer/api/__init__.py": ["/bricklayer/__init__.py"]}
13,928
mao-liu/bricklayer
refs/heads/master
/bricklayer/__init__.py
import json import logging import sys from logging import NullHandler # Set default logging handler to avoid "No handler found" warnings. logging.getLogger(__name__).addHandler(NullHandler()) logging.getLogger("py4j").setLevel(logging.ERROR) logging.basicConfig( level='INFO', stream=sys.stdout, format='[{l...
{"/bricklayer/catalog/crawler.py": ["/bricklayer/catalog/__init__.py"], "/bricklayer/api/__init__.py": ["/bricklayer/__init__.py"]}
13,929
mao-liu/bricklayer
refs/heads/master
/bricklayer/api/__init__.py
""" Wrappers for databricks_cli api and bring some sanity back with namespaces. Usage: ``` import DBSApi # export notebook db = DBSApi() db.export_notebook( source_path='/Repos/deploy/dac-dbs-volume-projection-validation/02_validation_notebooks/90_run_vp_6', target_path= '/db...
{"/bricklayer/catalog/crawler.py": ["/bricklayer/catalog/__init__.py"], "/bricklayer/api/__init__.py": ["/bricklayer/__init__.py"]}
13,930
mao-liu/bricklayer
refs/heads/master
/bricklayer/catalog/dbricks_catalog.py
"""Module to access the databricks catalog""" from typing import Iterator from pyspark.sql.utils import AnalysisException from pyspark.sql import SparkSession class DbricksTable: """A table found in the databricks catalog""" def __init__(self, database_name, table_name , table_version, info, spark): s...
{"/bricklayer/catalog/crawler.py": ["/bricklayer/catalog/__init__.py"], "/bricklayer/api/__init__.py": ["/bricklayer/__init__.py"]}
13,931
mao-liu/bricklayer
refs/heads/master
/setup.py
import setuptools with open('bricklayer/__version__.py') as fd: version = fd.read().split('=')[1].strip().strip("'") with open("README.md", "r", encoding="utf-8") as fh: long_description = fh.read() setuptools.setup( name="bricklayer", version=version, author="Intelematics", description="Inte...
{"/bricklayer/catalog/crawler.py": ["/bricklayer/catalog/__init__.py"], "/bricklayer/api/__init__.py": ["/bricklayer/__init__.py"]}
13,932
mao-liu/bricklayer
refs/heads/master
/bricklayer/display/map/__init__.py
''' Module to display a folium map in databricks notebooks''' import math import pyspark from pyspark.sql import SparkSession import pandas as pd import folium import shapely.wkt as wkt import shapely.geometry import shapely.geometry.base class Layer(): ''' Layer to be rendered in the map ''' def __init__...
{"/bricklayer/catalog/crawler.py": ["/bricklayer/catalog/__init__.py"], "/bricklayer/api/__init__.py": ["/bricklayer/__init__.py"]}
13,933
mao-liu/bricklayer
refs/heads/master
/bricklayer/catalog/__init__.py
from . import dbricks_catalog from . import crawler
{"/bricklayer/catalog/crawler.py": ["/bricklayer/catalog/__init__.py"], "/bricklayer/api/__init__.py": ["/bricklayer/__init__.py"]}
13,935
LuisDiego19FV/Graficas-SR6
refs/heads/master
/bmp_processor.py
#bmp_processor #Por Luis Diego Fernandez #V_A import sys import math import struct import random import numpy as np class bmpImage: # Define init(). Attributes Initializer def __init__(self, new_width, new_height): # image data self.image_data = bytes() # image attributes self.width = 0 self.height = 0 ...
{"/SR6.py": ["/bmp_processor.py"]}
13,936
LuisDiego19FV/Graficas-SR6
refs/heads/master
/SR6.py
#SR5 #Luis Diego Fernandez import sys import bmp_processor import numpy as np # image image = bmp_processor.bmpImage(600,600) print(image.get_bmp_processor_info()) #Decide color image.glClearColor(0,0,0) image.glColor(0,0,0) image.glClear() image_skeleton = image.glObjReader("obj/earth") image.glLoadTextureImage('...
{"/SR6.py": ["/bmp_processor.py"]}
13,959
vinnn/FSND_Capstone
refs/heads/main
/src/api.py
######################################################### #I# IMPORTS ######################################################### # print('__file__={0:<35} | __name__={1:<25} | __package__={2:<25}'.format(__file__,__name__,str(__package__))) import os from flask import Flask, request, jsonify, abort from sqlalchemy imp...
{"/src/api.py": ["/src/database/models.py"], "/src/test_api.py": ["/src/api.py", "/src/database/models.py"]}
13,960
vinnn/FSND_Capstone
refs/heads/main
/src/test_api.py
# ----------------------------------------------------------------------------# # Imports. # ----------------------------------------------------------------------------# # print('__file__={0:<35} | __name__={1:<25} | __package__={2:<25}'.format(__file__,__name__,str(__package__))) import os import unittest import js...
{"/src/api.py": ["/src/database/models.py"], "/src/test_api.py": ["/src/api.py", "/src/database/models.py"]}
13,961
vinnn/FSND_Capstone
refs/heads/main
/src/database/models.py
######################################################### #I# IMPORTS ######################################################### import os from sqlalchemy import Column, String, Integer from flask_sqlalchemy import SQLAlchemy import json ######################################################### #I# DATABASE CONFIGURA...
{"/src/api.py": ["/src/database/models.py"], "/src/test_api.py": ["/src/api.py", "/src/database/models.py"]}
13,962
TurnA-Lab/auto-rename-pic
refs/heads/master
/pick_stu_number.py
#!/usr/bin/env python3 # -*- coding: utf-8 -*- __author__ = 'iskye' import os import re import string from shutil import copyfile from typing import List import beeprint import cv2 import numpy from cnocr import CnOcr from cnstd import CnStd from tqdm import tqdm class PickStuNumber: def __init__(self, path: s...
{"/desktop.py": ["/pick_stu_number.py"], "/console.py": ["/pick_stu_number.py"]}
13,963
TurnA-Lab/auto-rename-pic
refs/heads/master
/desktop.py
#!/usr/bin/env python3 # -*- coding: utf-8 -*- __author__ = 'iskye' import ctypes import platform import subprocess import PySimpleGUI as sg from pick_stu_number import PickStuNumber def exe_cmd_subprocess(command, *args): try: sp = subprocess.Popen([command, *args], shell=True, stdout=subprocess.PIPE...
{"/desktop.py": ["/pick_stu_number.py"], "/console.py": ["/pick_stu_number.py"]}
13,964
TurnA-Lab/auto-rename-pic
refs/heads/master
/console.py
#!/usr/bin/env python3 # -*- coding: utf-8 -*- __author__ = 'iskye' import click from pick_stu_number import PickStuNumber @click.command() @click.option('--path', default='.', help='图片或者图片所在文件夹的路径') @click.option('--show-img', default=False, help='是否展示处理图片过程') @click.option('--show-info', default=False, help='是否展...
{"/desktop.py": ["/pick_stu_number.py"], "/console.py": ["/pick_stu_number.py"]}
13,989
luozhouyang/datas
refs/heads/master
/bajiuwang/html_downloader.py
import time import argparse import os from urllib import request class Downloader: def __init__(self, base_url, record_file, save_folder, ranges): cur_path = os.path.dirname(__file__) self.record_file = record_file if not self.record_file: self.record_file = os.path.join(cur_...
{"/bajiuwang/html_parser.py": ["/bajiuwang/patterns.py", "/bajiuwang/item.py"], "/bajiuwang/csv_analyzer.py": ["/bajiuwang/csv_image_generator.py", "/bajiuwang/csv_table_printer.py", "/bajiuwang/csv_xlsx_saver.py"]}
13,990
luozhouyang/datas
refs/heads/master
/zuyouw/zuyouw_html_download.py
import time from urllib import request headers = { 'Connection': 'keep-alive', 'Cache-Control': 'max-age=0', 'Accept': 'text/html', 'X-Requested-With': 'XMLHttpRequest', 'User-Agent': 'Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/41.0.2272.89 Safari/537.36', 'DN...
{"/bajiuwang/html_parser.py": ["/bajiuwang/patterns.py", "/bajiuwang/item.py"], "/bajiuwang/csv_analyzer.py": ["/bajiuwang/csv_image_generator.py", "/bajiuwang/csv_table_printer.py", "/bajiuwang/csv_xlsx_saver.py"]}
13,991
luozhouyang/datas
refs/heads/master
/bajiuwang/csv_xlsx_saver.py
from openpyxl import Workbook import os class XLSXSaver: def __init__(self, filename, ages, services, educations, origins, cities): self.filename = os.path.join(os.path.dirname(__file__), "xlsx", filename) self.ages_all_dict = ages[0] self.ages_men_dict = ages[1] self.ages_women_d...
{"/bajiuwang/html_parser.py": ["/bajiuwang/patterns.py", "/bajiuwang/item.py"], "/bajiuwang/csv_analyzer.py": ["/bajiuwang/csv_image_generator.py", "/bajiuwang/csv_table_printer.py", "/bajiuwang/csv_xlsx_saver.py"]}
13,992
luozhouyang/datas
refs/heads/master
/zuyouw/zuyouw_html_parser.py
import os headline = "身  份,用 户 名,用户 ID,性  别,婚姻状态,年  龄,学  历,身  高,月薪收入,星  座,职  业,所在地区,自我介绍," \ "个性描述,相貌自评,体  重,体  型,魅力部位,发  型,发  色,脸  型,租友类型,方便联系时间," \ "提供的线上服务,收  费,提供的线下租友服务,收  费" class Item: def __init__(self, identify, name, id, gender, marriage, age, education, height, incoming, constel...
{"/bajiuwang/html_parser.py": ["/bajiuwang/patterns.py", "/bajiuwang/item.py"], "/bajiuwang/csv_analyzer.py": ["/bajiuwang/csv_image_generator.py", "/bajiuwang/csv_table_printer.py", "/bajiuwang/csv_xlsx_saver.py"]}
13,993
luozhouyang/datas
refs/heads/master
/zuyouw/zuyou77.py
import bs4 from urllib import request headers = { 'Connection': 'keep-alive', 'Cache-Control': 'max-age=0', 'Accept': 'text/html', 'X-Requested-With': 'XMLHttpRequest', 'User-Agent': 'Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/41.0.2272.89 Safari/537.36', 'DNT...
{"/bajiuwang/html_parser.py": ["/bajiuwang/patterns.py", "/bajiuwang/item.py"], "/bajiuwang/csv_analyzer.py": ["/bajiuwang/csv_image_generator.py", "/bajiuwang/csv_table_printer.py", "/bajiuwang/csv_xlsx_saver.py"]}
13,994
luozhouyang/datas
refs/heads/master
/bajiuwang/item.py
class Item: def __init__(self, name="", id="", gender="", age="", birth="", constellation="", height="", weight="", size="", degree="", marriage="", occupational="", lives="", origin="", area="", payment="", serve_time="", language="", serve_type="", hobbits="", c...
{"/bajiuwang/html_parser.py": ["/bajiuwang/patterns.py", "/bajiuwang/item.py"], "/bajiuwang/csv_analyzer.py": ["/bajiuwang/csv_image_generator.py", "/bajiuwang/csv_table_printer.py", "/bajiuwang/csv_xlsx_saver.py"]}
13,995
luozhouyang/datas
refs/heads/master
/bajiuwang/csv_table_printer.py
from prettytable import PrettyTable class TablePrinter: def __init__(self, ages, services, educations, origins, cities): self.ages_all_dict = ages[0] self.ages_men_dict = ages[1] self.ages_women_dict = ages[2] self.services_all_dict = services[0] self.services_men_dict = s...
{"/bajiuwang/html_parser.py": ["/bajiuwang/patterns.py", "/bajiuwang/item.py"], "/bajiuwang/csv_analyzer.py": ["/bajiuwang/csv_image_generator.py", "/bajiuwang/csv_table_printer.py", "/bajiuwang/csv_xlsx_saver.py"]}
13,996
luozhouyang/datas
refs/heads/master
/bajiuwang/html_parser.py
import os from bajiuwang.patterns import Patterns from bajiuwang.item import Item files = os.listdir("/home/allen/PycharmProjects/datas/www89yn_data") infos = [] def _parse_line(line, type=1): contents = line.split(":") if len(contents) != 2: return "" if type == 1: result = Patterns.PAT...
{"/bajiuwang/html_parser.py": ["/bajiuwang/patterns.py", "/bajiuwang/item.py"], "/bajiuwang/csv_analyzer.py": ["/bajiuwang/csv_image_generator.py", "/bajiuwang/csv_table_printer.py", "/bajiuwang/csv_xlsx_saver.py"]}
13,997
luozhouyang/datas
refs/heads/master
/bajiuwang/csv_analyzer.py
import csv from collections import Counter, OrderedDict import jieba from .csv_image_generator import ImageGenerator from .csv_table_printer import TablePrinter from .csv_xlsx_saver import XLSXSaver jieba.load_userdict("/home/allen/PycharmProjects/datas/jieba_dict.txt") class Analyzer: def __init__(self, csv_...
{"/bajiuwang/html_parser.py": ["/bajiuwang/patterns.py", "/bajiuwang/item.py"], "/bajiuwang/csv_analyzer.py": ["/bajiuwang/csv_image_generator.py", "/bajiuwang/csv_table_printer.py", "/bajiuwang/csv_xlsx_saver.py"]}
13,998
luozhouyang/datas
refs/heads/master
/bajiuwang/patterns.py
import re class Patterns: # <li>可去地区:<span>待议 </span></li> # <li>是否收费:<span>收费<FONT COLOR=#888888>..</FONT></span></li> # <li>服务时间:<span>待议 </span></li> # <li>使用语种:<span>普通话 </span></li> # <li>提供服务:<span>待议</span></li> # <li>兴趣爱好:<span>聊天, 赚钱 </span></li> # <li>性格类型:<span>阳光, 活泼可爱 </span>...
{"/bajiuwang/html_parser.py": ["/bajiuwang/patterns.py", "/bajiuwang/item.py"], "/bajiuwang/csv_analyzer.py": ["/bajiuwang/csv_image_generator.py", "/bajiuwang/csv_table_printer.py", "/bajiuwang/csv_xlsx_saver.py"]}
13,999
luozhouyang/datas
refs/heads/master
/bajiuwang/csv_image_generator.py
import os import matplotlib.pyplot as plt class ImageGenerator: def __init__(self, ages, services, educations, origins, cities): self.ages_all_dict = ages[0] self.ages_men_dict = ages[1] self.ages_women_dict = ages[2] self.services_all_dict = services[0] self.services_men...
{"/bajiuwang/html_parser.py": ["/bajiuwang/patterns.py", "/bajiuwang/item.py"], "/bajiuwang/csv_analyzer.py": ["/bajiuwang/csv_image_generator.py", "/bajiuwang/csv_table_printer.py", "/bajiuwang/csv_xlsx_saver.py"]}
14,018
ClaudioDavi/dagscience
refs/heads/master
/tests/test_steps.py
from dagscience.step_manager import Step from .mock_workflow import MockGetData, MockPreprocess, MockTrain, MockSaveModel import os import configparser class TestStep(): step = Step(MockGetData(), MockPreprocess(), MockTrain(), MockSaveModel()) def test_step_writer(self): self.step.st...
{"/tests/test_steps.py": ["/dagscience/step_manager.py", "/tests/mock_workflow.py"], "/dagscience/workflow.py": ["/dagscience/step_manager.py"]}
14,019
ClaudioDavi/dagscience
refs/heads/master
/dagscience/workflow.py
from abc import ABC, abstractmethod import logging from .step_manager import Step class DagflowCycle: """ Every cicle on a DAG workflow begins with run. To implement a workflow you should build all the Tasks classes according to your needs and then pass them as parameters to the DagFlowCicle Objec...
{"/tests/test_steps.py": ["/dagscience/step_manager.py", "/tests/mock_workflow.py"], "/dagscience/workflow.py": ["/dagscience/step_manager.py"]}
14,020
ClaudioDavi/dagscience
refs/heads/master
/tests/mock_workflow.py
from dagscience import workflow class MockGetData(workflow.TaskGetData): def __init__(self): pass def load_from_source(self, *args, **kwargs): pass def load_from_filesystem(self, *args, **kwargs): pass def save(self, data, *args, **kwargs): pass class MockPreproces...
{"/tests/test_steps.py": ["/dagscience/step_manager.py", "/tests/mock_workflow.py"], "/dagscience/workflow.py": ["/dagscience/step_manager.py"]}
14,021
ClaudioDavi/dagscience
refs/heads/master
/setup.py
from setuptools import setup, find_packages setup(name='dagscience', version='0.1.0beta', description='Machine Learning Engineering Workflow Simplified', url='http://github.com/claudiodavi/dagscience', author='Claudio Davi', author_email='cdavisouza@gmail.com', license='MIT', ...
{"/tests/test_steps.py": ["/dagscience/step_manager.py", "/tests/mock_workflow.py"], "/dagscience/workflow.py": ["/dagscience/step_manager.py"]}
14,022
ClaudioDavi/dagscience
refs/heads/master
/dagscience/step_manager.py
import logging import os import configparser import traceback class Step(): """ Steps to be executed to create the machine learning model """ logger = logging.getLogger(__name__) default = { "STEPS": { "STEP_1": 'ready', "STEP_2": 'ready', "STEP_3": 'rea...
{"/tests/test_steps.py": ["/dagscience/step_manager.py", "/tests/mock_workflow.py"], "/dagscience/workflow.py": ["/dagscience/step_manager.py"]}
14,023
meswapnilwagh/remote-tools
refs/heads/master
/scp_r2r.py
#!/usr/bin/env python """Use scp to copy files bewteen two remote hosts directly. Copies the ssh key needed to get from host1 to host2. Requires ~/.ssh/config file """ import os from optparse import OptionParser from paramiko import SSHConfig def main(): USAGE = "usage: %prog [options] host1:path1 host2:path2" ...
{"/rml_cat.py": ["/multilog.py"]}
14,024
meswapnilwagh/remote-tools
refs/heads/master
/multilog.py
"""Assumes SSH config file at ~/.ssh/config """ import fnmatch import gzip import os import re import sys from paramiko import SSHClient, SSHConfig def rml_cat(host, glob, skip_files=0): rml = RemoteMultiLog() rml.connect(host) lines = rml.get_lines(glob, skip_files) for line in lines: print l...
{"/rml_cat.py": ["/multilog.py"]}
14,025
meswapnilwagh/remote-tools
refs/heads/master
/rml_cat.py
#!/usr/bin/env python """Print lines for all files matching glob pattern on a remote host """ from optparse import OptionParser from multilog import rml_cat def main(): USAGE = "usage: %prog [options] host:glob" parser = OptionParser(usage=USAGE) parser.add_option("--skip-files", ac...
{"/rml_cat.py": ["/multilog.py"]}
14,028
royaflash/amira
refs/heads/master
/tests/s3_test.py
# -*- coding: utf-8 -*- from __future__ import absolute_import from __future__ import unicode_literals import boto import pytest from boto.s3.key import Key from mock import ANY from mock import MagicMock from mock import patch from amira.results_uploader import FileMetaInfo from amira.s3 import S3Handler from amira....
{"/tests/s3_test.py": ["/amira/s3.py"], "/tests/sqs_test.py": ["/amira/sqs.py"]}
14,029
royaflash/amira
refs/heads/master
/amira/sqs.py
# -*- coding: utf-8 -*- from __future__ import absolute_import from __future__ import unicode_literals import logging from collections import namedtuple import boto.sqs import simplejson from boto.sqs.message import RawMessage # 10 is the maximum number of messages to read at once: # http://docs.aws.amazon.com/AWSS...
{"/tests/s3_test.py": ["/amira/s3.py"], "/tests/sqs_test.py": ["/amira/sqs.py"]}
14,030
royaflash/amira
refs/heads/master
/amira/s3.py
# -*- coding: utf-8 -*- from __future__ import absolute_import from __future__ import unicode_literals import logging import boto from boto.s3.key import Key from amira.results_uploader import ResultsUploader class S3Handler(object): """Handles the operations with S3, like retrieving the key (object) conte...
{"/tests/s3_test.py": ["/amira/s3.py"], "/tests/sqs_test.py": ["/amira/sqs.py"]}
14,031
royaflash/amira
refs/heads/master
/tests/sqs_test.py
# -*- coding: utf-8 -*- from __future__ import absolute_import from __future__ import unicode_literals import boto import pytest import simplejson from mock import MagicMock from amira.sqs import SqsHandler from amira.sqs import SqsQueueNotFoundException TEST_DATA_DIR_PATH = 'tests/data' @pytest.fixture def mock_...
{"/tests/s3_test.py": ["/amira/s3.py"], "/tests/sqs_test.py": ["/amira/sqs.py"]}
14,040
MotazBellah/currency-converter-exchangeratesAPI
refs/heads/master
/app.py
import os import datetime from flask import Flask, render_template, request, redirect, url_for, jsonify import httplib2 import json from wtform_fields import * app = Flask(__name__) app.secret_key = os.urandom(12).hex() # set secret key to cross site requset forgery # to generate a token when WTF submitted app.config...
{"/app.py": ["/wtform_fields.py"], "/convert_test.py": ["/app.py"]}
14,041
MotazBellah/currency-converter-exchangeratesAPI
refs/heads/master
/wtform_fields.py
from flask_wtf import FlaskForm from wtforms import StringField, FloatField, SelectField from wtforms.validators import InputRequired, Length, ValidationError import datetime CURRENCY_TYPE = [("EUR", "EUR"), ("USD", "USD"), ("JPY", "JPY"), ("BGN", "BGN"), ("CZK", "CZK"), ("GBP", "GBP"), ...
{"/app.py": ["/wtform_fields.py"], "/convert_test.py": ["/app.py"]}
14,042
MotazBellah/currency-converter-exchangeratesAPI
refs/heads/master
/convert_test.py
from flask import current_app from app import app import unittest import json class AppTestCase(unittest.TestCase): # executed prior to each test def setUp(self): self.app = app app.config['TESTING'] = True self.app.config['WTF_CSRF_ENABLED'] = False self.app_context = self.app....
{"/app.py": ["/wtform_fields.py"], "/convert_test.py": ["/app.py"]}
14,052
aleph-im/aleph-client
refs/heads/master
/src/aleph_client/commands/message.py
import json import os.path import subprocess import tempfile from pathlib import Path from typing import Dict, List, Optional import typer from aleph.sdk import AlephClient, AuthenticatedAlephClient from aleph.sdk.account import _load_account from aleph.sdk.conf import settings as sdk_settings from aleph.sdk.models im...
{"/tests/integration/itest_aggregates.py": ["/tests/integration/toolkit.py", "/tests/integration/config.py"], "/src/aleph_client/vm/cache.py": ["/src/aleph_client/conf.py"], "/tests/unit/test_vm_app.py": ["/tests/unit/test_app/main.py"], "/tests/integration/itest_forget.py": ["/tests/integration/config.py", "/tests/int...
14,053
aleph-im/aleph-client
refs/heads/master
/tests/integration/itest_aggregates.py
import json from typing import Dict import pytest from aleph.sdk import AuthenticatedAlephClient from aleph.sdk.types import Account from tests.integration.toolkit import try_until from .config import REFERENCE_NODE, TARGET_NODE async def create_aggregate_on_target( account: Account, key: str, content:...
{"/tests/integration/itest_aggregates.py": ["/tests/integration/toolkit.py", "/tests/integration/config.py"], "/src/aleph_client/vm/cache.py": ["/src/aleph_client/conf.py"], "/tests/unit/test_vm_app.py": ["/tests/unit/test_app/main.py"], "/tests/integration/itest_forget.py": ["/tests/integration/config.py", "/tests/int...
14,054
aleph-im/aleph-client
refs/heads/master
/src/aleph_client/vm/app.py
from dataclasses import dataclass from typing import ( Any, Awaitable, Callable, Dict, List, Mapping, MutableMapping, Optional, ) AsgiApplication = Callable @dataclass class EventHandler: filters: List[Dict] handler: Callable def matches(self, scope: Mapping[str, Any]) ->...
{"/tests/integration/itest_aggregates.py": ["/tests/integration/toolkit.py", "/tests/integration/config.py"], "/src/aleph_client/vm/cache.py": ["/src/aleph_client/conf.py"], "/tests/unit/test_vm_app.py": ["/tests/unit/test_app/main.py"], "/tests/integration/itest_forget.py": ["/tests/integration/config.py", "/tests/int...
14,055
aleph-im/aleph-client
refs/heads/master
/tests/integration/config.py
TARGET_NODE = "http://163.172.70.92:4024" REFERENCE_NODE = "https://api2.aleph.im" TEST_CHANNEL = "INTEGRATION_TESTS"
{"/tests/integration/itest_aggregates.py": ["/tests/integration/toolkit.py", "/tests/integration/config.py"], "/src/aleph_client/vm/cache.py": ["/src/aleph_client/conf.py"], "/tests/unit/test_vm_app.py": ["/tests/unit/test_app/main.py"], "/tests/integration/itest_forget.py": ["/tests/integration/config.py", "/tests/int...
14,056
aleph-im/aleph-client
refs/heads/master
/examples/store.py
import asyncio import click from aleph.sdk.chains.common import get_fallback_private_key from aleph.sdk.chains.ethereum import ETHAccount from aleph.sdk.client import AuthenticatedAlephClient from aleph_message.models import StoreMessage from aleph_message.status import MessageStatus DEFAULT_SERVER = "https://api2.al...
{"/tests/integration/itest_aggregates.py": ["/tests/integration/toolkit.py", "/tests/integration/config.py"], "/src/aleph_client/vm/cache.py": ["/src/aleph_client/conf.py"], "/tests/unit/test_vm_app.py": ["/tests/unit/test_app/main.py"], "/tests/integration/itest_forget.py": ["/tests/integration/config.py", "/tests/int...
14,057
aleph-im/aleph-client
refs/heads/master
/tests/integration/conftest.py
import asyncio import pytest from aleph.sdk.chains.common import get_fallback_private_key from aleph.sdk.chains.ethereum import ETHAccount @pytest.fixture def fixture_account(): private_key = get_fallback_private_key() return ETHAccount(private_key) # Fixes the "Event loop is closed" error that happens whe...
{"/tests/integration/itest_aggregates.py": ["/tests/integration/toolkit.py", "/tests/integration/config.py"], "/src/aleph_client/vm/cache.py": ["/src/aleph_client/conf.py"], "/tests/unit/test_vm_app.py": ["/tests/unit/test_app/main.py"], "/tests/integration/itest_forget.py": ["/tests/integration/config.py", "/tests/int...
14,058
aleph-im/aleph-client
refs/heads/master
/src/aleph_client/vm/cache.py
import abc import fnmatch import re import threading from functools import lru_cache from typing import Any, Dict, List, NewType, Optional, Union import aiohttp from aiohttp import ClientSession from ..conf import settings CacheKey = NewType("CacheKey", str) @lru_cache() def _get_fallback_session(thread_id: Option...
{"/tests/integration/itest_aggregates.py": ["/tests/integration/toolkit.py", "/tests/integration/config.py"], "/src/aleph_client/vm/cache.py": ["/src/aleph_client/conf.py"], "/tests/unit/test_vm_app.py": ["/tests/unit/test_app/main.py"], "/tests/integration/itest_forget.py": ["/tests/integration/config.py", "/tests/int...
14,059
aleph-im/aleph-client
refs/heads/master
/tests/unit/test_app/main.py
from fastapi import FastAPI from aleph_client.vm.app import AlephApp # Create a test app http_app = FastAPI() app = AlephApp(http_app=http_app) @app.get("/") async def index(): return {"index": "/"} @app.event(filters=[]) async def aleph_event(event): print("aleph_event", event)
{"/tests/integration/itest_aggregates.py": ["/tests/integration/toolkit.py", "/tests/integration/config.py"], "/src/aleph_client/vm/cache.py": ["/src/aleph_client/conf.py"], "/tests/unit/test_vm_app.py": ["/tests/unit/test_app/main.py"], "/tests/integration/itest_forget.py": ["/tests/integration/config.py", "/tests/int...
14,060
aleph-im/aleph-client
refs/heads/master
/examples/metrics.py
""" Server metrics upload. """ # -*- coding: utf-8 -*- import os import platform import time import psutil from aleph.sdk import AuthenticatedAlephClient from aleph.sdk.account import _load_account def get_sysinfo(): uptime = int(time.time() - psutil.boot_time()) sysinfo = { "uptime": uptime, ...
{"/tests/integration/itest_aggregates.py": ["/tests/integration/toolkit.py", "/tests/integration/config.py"], "/src/aleph_client/vm/cache.py": ["/src/aleph_client/conf.py"], "/tests/unit/test_vm_app.py": ["/tests/unit/test_app/main.py"], "/tests/integration/itest_forget.py": ["/tests/integration/config.py", "/tests/int...
14,061
aleph-im/aleph-client
refs/heads/master
/src/aleph_client/main.py
"""This module only exists for backward compatibility and will be removed in a future release. """ import warnings warnings.warn( "`aleph_client.main` is deprecated and will be removed. " "Use `aleph_client.synchronous` instead.", DeprecationWarning, )
{"/tests/integration/itest_aggregates.py": ["/tests/integration/toolkit.py", "/tests/integration/config.py"], "/src/aleph_client/vm/cache.py": ["/src/aleph_client/conf.py"], "/tests/unit/test_vm_app.py": ["/tests/unit/test_app/main.py"], "/tests/integration/itest_forget.py": ["/tests/integration/config.py", "/tests/int...
14,062
aleph-im/aleph-client
refs/heads/master
/examples/httpgateway.py
""" Server metrics upload. """ import click from aiohttp import web from aleph.sdk import AuthenticatedAlephClient from aleph.sdk.chains.common import get_fallback_private_key from aleph.sdk.chains.ethereum import ETHAccount app = web.Application() routes = web.RouteTableDef() @routes.get("/") async def hello(reque...
{"/tests/integration/itest_aggregates.py": ["/tests/integration/toolkit.py", "/tests/integration/config.py"], "/src/aleph_client/vm/cache.py": ["/src/aleph_client/conf.py"], "/tests/unit/test_vm_app.py": ["/tests/unit/test_app/main.py"], "/tests/integration/itest_forget.py": ["/tests/integration/config.py", "/tests/int...
14,063
aleph-im/aleph-client
refs/heads/master
/src/aleph_client/vm/__init__.py
""" Aleph helpers for apps running inside aleph.im Virtual Machines. """
{"/tests/integration/itest_aggregates.py": ["/tests/integration/toolkit.py", "/tests/integration/config.py"], "/src/aleph_client/vm/cache.py": ["/src/aleph_client/conf.py"], "/tests/unit/test_vm_app.py": ["/tests/unit/test_app/main.py"], "/tests/integration/itest_forget.py": ["/tests/integration/config.py", "/tests/int...
14,064
aleph-im/aleph-client
refs/heads/master
/tests/unit/test_vm_cache.py
import pytest from aleph_client.vm.cache import TestVmCache, sanitize_cache_key @pytest.mark.asyncio async def test_local_vm_cache(): cache = TestVmCache() assert (await cache.get("doesnotexist")) is None assert len(await (cache.keys())) == 0 key = "thisdoesexist" value = "yay, I exist!" awai...
{"/tests/integration/itest_aggregates.py": ["/tests/integration/toolkit.py", "/tests/integration/config.py"], "/src/aleph_client/vm/cache.py": ["/src/aleph_client/conf.py"], "/tests/unit/test_vm_app.py": ["/tests/unit/test_app/main.py"], "/tests/integration/itest_forget.py": ["/tests/integration/config.py", "/tests/int...
14,065
aleph-im/aleph-client
refs/heads/master
/tests/unit/test_chain_ethereum.py
from dataclasses import asdict, dataclass from pathlib import Path from tempfile import NamedTemporaryFile import pytest from aleph.sdk.chains.ethereum import get_fallback_account @dataclass class Message: chain: str sender: str type: str item_hash: str def test_get_fallback_account(): with Nam...
{"/tests/integration/itest_aggregates.py": ["/tests/integration/toolkit.py", "/tests/integration/config.py"], "/src/aleph_client/vm/cache.py": ["/src/aleph_client/conf.py"], "/tests/unit/test_vm_app.py": ["/tests/unit/test_app/main.py"], "/tests/integration/itest_forget.py": ["/tests/integration/config.py", "/tests/int...
14,066
aleph-im/aleph-client
refs/heads/master
/tests/unit/test_vm_app.py
import asyncio import pytest from fastapi.testclient import TestClient from tests.unit.test_app.main import app # Note: for some reason, the test client must be declared at the same level as the import. client = TestClient(app) @pytest.mark.asyncio async def test_app_event(): # Call the app with an ASGI conte...
{"/tests/integration/itest_aggregates.py": ["/tests/integration/toolkit.py", "/tests/integration/config.py"], "/src/aleph_client/vm/cache.py": ["/src/aleph_client/conf.py"], "/tests/unit/test_vm_app.py": ["/tests/unit/test_app/main.py"], "/tests/integration/itest_forget.py": ["/tests/integration/config.py", "/tests/int...
14,067
aleph-im/aleph-client
refs/heads/master
/tests/integration/toolkit.py
import asyncio import time from typing import Awaitable, Callable, TypeVar T = TypeVar("T") async def try_until( coroutine: Callable[..., Awaitable[T]], condition: Callable[[T], bool], timeout: float, time_between_attempts: float = 0.5, *args, **kwargs, ) -> T: start_time = time.monotoni...
{"/tests/integration/itest_aggregates.py": ["/tests/integration/toolkit.py", "/tests/integration/config.py"], "/src/aleph_client/vm/cache.py": ["/src/aleph_client/conf.py"], "/tests/unit/test_vm_app.py": ["/tests/unit/test_app/main.py"], "/tests/integration/itest_forget.py": ["/tests/integration/config.py", "/tests/int...
14,068
aleph-im/aleph-client
refs/heads/master
/src/aleph_client/utils.py
import logging import os from pathlib import Path from shutil import make_archive from typing import Tuple, Type from zipfile import BadZipFile, ZipFile from aleph.sdk.types import GenericMessage from aleph_message.models import MessageType from aleph_message.models.program import Encoding from aleph_client.conf impo...
{"/tests/integration/itest_aggregates.py": ["/tests/integration/toolkit.py", "/tests/integration/config.py"], "/src/aleph_client/vm/cache.py": ["/src/aleph_client/conf.py"], "/tests/unit/test_vm_app.py": ["/tests/unit/test_app/main.py"], "/tests/integration/itest_forget.py": ["/tests/integration/config.py", "/tests/int...
14,069
aleph-im/aleph-client
refs/heads/master
/src/aleph_client/commands/aggregate.py
from pathlib import Path from typing import Optional import typer from aleph.sdk.account import _load_account from aleph.sdk.client import AuthenticatedAlephClient from aleph.sdk.conf import settings as sdk_settings from aleph.sdk.types import AccountFromPrivateKey from aleph_message.models import MessageType from al...
{"/tests/integration/itest_aggregates.py": ["/tests/integration/toolkit.py", "/tests/integration/config.py"], "/src/aleph_client/vm/cache.py": ["/src/aleph_client/conf.py"], "/tests/unit/test_vm_app.py": ["/tests/unit/test_app/main.py"], "/tests/integration/itest_forget.py": ["/tests/integration/config.py", "/tests/int...
14,070
aleph-im/aleph-client
refs/heads/master
/src/aleph_client/commands/utils.py
import logging from typing import Dict, List, Optional, Union from aleph.sdk.types import GenericMessage from pygments import highlight from pygments.formatters.terminal256 import Terminal256Formatter from pygments.lexers import JsonLexer from typer import echo from datetime import datetime def colorful_json(obj: st...
{"/tests/integration/itest_aggregates.py": ["/tests/integration/toolkit.py", "/tests/integration/config.py"], "/src/aleph_client/vm/cache.py": ["/src/aleph_client/conf.py"], "/tests/unit/test_vm_app.py": ["/tests/unit/test_app/main.py"], "/tests/integration/itest_forget.py": ["/tests/integration/config.py", "/tests/int...
14,071
aleph-im/aleph-client
refs/heads/master
/tests/unit/test_commands.py
import subprocess from pathlib import Path from tempfile import NamedTemporaryFile import pytest from aleph.sdk.chains.common import generate_key from typer.testing import CliRunner from aleph_client.__main__ import app from typing import Generator runner = CliRunner() @pytest.fixture def empty_account_file() -> G...
{"/tests/integration/itest_aggregates.py": ["/tests/integration/toolkit.py", "/tests/integration/config.py"], "/src/aleph_client/vm/cache.py": ["/src/aleph_client/conf.py"], "/tests/unit/test_vm_app.py": ["/tests/unit/test_app/main.py"], "/tests/integration/itest_forget.py": ["/tests/integration/config.py", "/tests/int...
14,072
aleph-im/aleph-client
refs/heads/master
/src/aleph_client/conf.py
import os from pathlib import Path from shutil import which from typing import Optional from pydantic import BaseSettings, Field class Settings(BaseSettings): CONFIG_HOME: Optional[str] = None # In case the user does not want to bother with handling private keys himself, # do an ugly and insecure write ...
{"/tests/integration/itest_aggregates.py": ["/tests/integration/toolkit.py", "/tests/integration/config.py"], "/src/aleph_client/vm/cache.py": ["/src/aleph_client/conf.py"], "/tests/unit/test_vm_app.py": ["/tests/unit/test_app/main.py"], "/tests/integration/itest_forget.py": ["/tests/integration/config.py", "/tests/int...
14,073
aleph-im/aleph-client
refs/heads/master
/src/aleph_client/commands/account.py
import base64 import logging from pathlib import Path from typing import Optional import typer from aleph.sdk.account import _load_account from aleph.sdk.chains.common import generate_key from aleph.sdk.chains.ethereum import ETHAccount from aleph.sdk.conf import settings as sdk_settings from aleph.sdk.types import Ac...
{"/tests/integration/itest_aggregates.py": ["/tests/integration/toolkit.py", "/tests/integration/config.py"], "/src/aleph_client/vm/cache.py": ["/src/aleph_client/conf.py"], "/tests/unit/test_vm_app.py": ["/tests/unit/test_app/main.py"], "/tests/integration/itest_forget.py": ["/tests/integration/config.py", "/tests/int...
14,074
aleph-im/aleph-client
refs/heads/master
/tests/integration/itest_forget.py
from typing import Callable, Dict import pytest from aleph.sdk import AlephClient, AuthenticatedAlephClient from aleph.sdk.types import Account from .config import REFERENCE_NODE, TARGET_NODE, TEST_CHANNEL from .toolkit import try_until from aleph.sdk import AlephClient async def create_and_forget_post( account...
{"/tests/integration/itest_aggregates.py": ["/tests/integration/toolkit.py", "/tests/integration/config.py"], "/src/aleph_client/vm/cache.py": ["/src/aleph_client/conf.py"], "/tests/unit/test_vm_app.py": ["/tests/unit/test_app/main.py"], "/tests/integration/itest_forget.py": ["/tests/integration/config.py", "/tests/int...
14,075
aleph-im/aleph-client
refs/heads/master
/src/aleph_client/exceptions.py
from abc import ABC class QueryError(ABC, ValueError): """The result of an API query is inconsistent.""" pass class MessageNotFoundError(QueryError): """A message was expected but could not be found.""" pass class MultipleMessagesError(QueryError): """Multiple messages were found when a sing...
{"/tests/integration/itest_aggregates.py": ["/tests/integration/toolkit.py", "/tests/integration/config.py"], "/src/aleph_client/vm/cache.py": ["/src/aleph_client/conf.py"], "/tests/unit/test_vm_app.py": ["/tests/unit/test_app/main.py"], "/tests/integration/itest_forget.py": ["/tests/integration/config.py", "/tests/int...
14,076
aleph-im/aleph-client
refs/heads/master
/tests/unit/test_utils.py
from aleph_message.models import ( AggregateMessage, ForgetMessage, MessageType, PostMessage, ProgramMessage, StoreMessage, ) from aleph_client.utils import get_message_type_value def test_get_message_type_value(): assert get_message_type_value(PostMessage) == MessageType.post assert ...
{"/tests/integration/itest_aggregates.py": ["/tests/integration/toolkit.py", "/tests/integration/config.py"], "/src/aleph_client/vm/cache.py": ["/src/aleph_client/conf.py"], "/tests/unit/test_vm_app.py": ["/tests/unit/test_app/main.py"], "/tests/integration/itest_forget.py": ["/tests/integration/config.py", "/tests/int...
14,077
aleph-im/aleph-client
refs/heads/master
/tests/unit/conftest.py
# -*- coding: utf-8 -*- """ Dummy conftest.py for aleph_client. If you don't know what this is for, just leave it empty. Read more about conftest.py under: https://pytest.org/latest/plugins.html """ from pathlib import Path from tempfile import NamedTemporaryFile import aleph.sdk.chains.ethereum as et...
{"/tests/integration/itest_aggregates.py": ["/tests/integration/toolkit.py", "/tests/integration/config.py"], "/src/aleph_client/vm/cache.py": ["/src/aleph_client/conf.py"], "/tests/unit/test_vm_app.py": ["/tests/unit/test_app/main.py"], "/tests/integration/itest_forget.py": ["/tests/integration/config.py", "/tests/int...
14,078
aleph-im/aleph-client
refs/heads/master
/src/aleph_client/commands/files.py
import logging from pathlib import Path from typing import Optional import typer from aleph.sdk import AuthenticatedAlephClient from aleph.sdk.account import _load_account from aleph.sdk.conf import settings as sdk_settings from aleph.sdk.types import AccountFromPrivateKey, StorageEnum from aleph_message.models import...
{"/tests/integration/itest_aggregates.py": ["/tests/integration/toolkit.py", "/tests/integration/config.py"], "/src/aleph_client/vm/cache.py": ["/src/aleph_client/conf.py"], "/tests/unit/test_vm_app.py": ["/tests/unit/test_app/main.py"], "/tests/integration/itest_forget.py": ["/tests/integration/config.py", "/tests/int...
14,079
aleph-im/aleph-client
refs/heads/master
/tests/unit/test_remote_account.py
from unittest.mock import patch import pytest from aleph.sdk.chains.ethereum import ETHAccount from aleph.sdk.chains.remote import AccountProperties, RemoteAccount @pytest.mark.asyncio async def test_remote_storage(): host = "http://localhost:8888" private_key = ( b"xRR\xd4P\xdb9\x93(U\xa7\xd5\x81\xb...
{"/tests/integration/itest_aggregates.py": ["/tests/integration/toolkit.py", "/tests/integration/config.py"], "/src/aleph_client/vm/cache.py": ["/src/aleph_client/conf.py"], "/tests/unit/test_vm_app.py": ["/tests/unit/test_app/main.py"], "/tests/integration/itest_forget.py": ["/tests/integration/config.py", "/tests/int...
14,080
aleph-im/aleph-client
refs/heads/master
/tests/unit/test_chain_nuls1_compat.py
"""The NULS1 implementation switched from lib `secp256k1` to `coincurve`. This file tests that both implementations returns identical results. """ from pathlib import Path from tempfile import NamedTemporaryFile import pytest import secp256k1 from aleph.sdk.chains.common import get_fallback_private_key from aleph.sdk...
{"/tests/integration/itest_aggregates.py": ["/tests/integration/toolkit.py", "/tests/integration/config.py"], "/src/aleph_client/vm/cache.py": ["/src/aleph_client/conf.py"], "/tests/unit/test_vm_app.py": ["/tests/unit/test_app/main.py"], "/tests/integration/itest_forget.py": ["/tests/integration/config.py", "/tests/int...
14,081
aleph-im/aleph-client
refs/heads/master
/tests/unit/test_chain_solana.py
import json from dataclasses import asdict, dataclass from pathlib import Path from tempfile import NamedTemporaryFile import base58 import pytest from aleph.sdk.chains.common import get_verification_buffer from aleph.sdk.chains.sol import SOLAccount, get_fallback_account from nacl.signing import VerifyKey @dataclas...
{"/tests/integration/itest_aggregates.py": ["/tests/integration/toolkit.py", "/tests/integration/config.py"], "/src/aleph_client/vm/cache.py": ["/src/aleph_client/conf.py"], "/tests/unit/test_vm_app.py": ["/tests/unit/test_app/main.py"], "/tests/integration/itest_forget.py": ["/tests/integration/config.py", "/tests/int...
14,082
aleph-im/aleph-client
refs/heads/master
/src/aleph_client/commands/help_strings.py
IPFS_HASH = "IPFS Content identifier (CID)" CHANNEL = "Aleph.im network channel where the message is located" PRIVATE_KEY = "Your private key. Cannot be used with --private-key-file" PRIVATE_KEY_FILE = "Path to your private key file" REF = "Checkout https://aleph-im.gitbook.io/aleph-js/api-resources-reference/posts"
{"/tests/integration/itest_aggregates.py": ["/tests/integration/toolkit.py", "/tests/integration/config.py"], "/src/aleph_client/vm/cache.py": ["/src/aleph_client/conf.py"], "/tests/unit/test_vm_app.py": ["/tests/unit/test_app/main.py"], "/tests/integration/itest_forget.py": ["/tests/integration/config.py", "/tests/int...
14,083
aleph-im/aleph-client
refs/heads/master
/tests/unit/test_chain_tezos.py
from dataclasses import asdict, dataclass from pathlib import Path from tempfile import NamedTemporaryFile import pytest from aleph.sdk.chains.tezos import TezosAccount, get_fallback_account @dataclass class Message: chain: str sender: str type: str item_hash: str def test_get_fallback_account(tezo...
{"/tests/integration/itest_aggregates.py": ["/tests/integration/toolkit.py", "/tests/integration/config.py"], "/src/aleph_client/vm/cache.py": ["/src/aleph_client/conf.py"], "/tests/unit/test_vm_app.py": ["/tests/unit/test_app/main.py"], "/tests/integration/itest_forget.py": ["/tests/integration/config.py", "/tests/int...
14,084
aleph-im/aleph-client
refs/heads/master
/tests/integration/itest_posts.py
import pytest from aleph_message.models import PostMessage from aleph.sdk.exceptions import MessageNotFoundError from tests.integration.toolkit import try_until from .config import REFERENCE_NODE, TARGET_NODE from aleph.sdk import AuthenticatedAlephClient from aleph.sdk.conf import settings as sdk_settings from aleph.s...
{"/tests/integration/itest_aggregates.py": ["/tests/integration/toolkit.py", "/tests/integration/config.py"], "/src/aleph_client/vm/cache.py": ["/src/aleph_client/conf.py"], "/tests/unit/test_vm_app.py": ["/tests/unit/test_app/main.py"], "/tests/integration/itest_forget.py": ["/tests/integration/config.py", "/tests/int...
14,085
aleph-im/aleph-client
refs/heads/master
/src/aleph_client/commands/program.py
import json import logging from base64 import b16decode, b32encode from pathlib import Path from typing import Dict, List, Optional from zipfile import BadZipFile import typer from aleph.sdk import AuthenticatedAlephClient from aleph.sdk.account import _load_account from aleph.sdk.conf import settings as sdk_settings ...
{"/tests/integration/itest_aggregates.py": ["/tests/integration/toolkit.py", "/tests/integration/config.py"], "/src/aleph_client/vm/cache.py": ["/src/aleph_client/conf.py"], "/tests/unit/test_vm_app.py": ["/tests/unit/test_app/main.py"], "/tests/integration/itest_forget.py": ["/tests/integration/config.py", "/tests/int...
14,086
aleph-im/aleph-client
refs/heads/master
/tests/unit/test_chain_nuls1.py
import pytest from aleph.sdk.chains.nuls1 import NulsSignature from coincurve.keys import PrivateKey SECRET = ( b"\xc4\xfe\xe65\x96\x14\xb4:\r: \x05;\x12j\x9bJ" b"\x14\x0eY\xe3BY\x0f\xd6\xee\xfc\x9d\xfe\x8fv\xbc" ) @pytest.mark.asyncio async def test_sign_data(): private_key = PrivateKey(SECRET) sig...
{"/tests/integration/itest_aggregates.py": ["/tests/integration/toolkit.py", "/tests/integration/config.py"], "/src/aleph_client/vm/cache.py": ["/src/aleph_client/conf.py"], "/tests/unit/test_vm_app.py": ["/tests/unit/test_app/main.py"], "/tests/integration/itest_forget.py": ["/tests/integration/config.py", "/tests/int...
14,087
aleph-im/aleph-client
refs/heads/master
/src/aleph_client/__main__.py
""" Aleph Client command-line interface. """ import typer from .commands import account, aggregate, files, message, program app = typer.Typer() app.add_typer(account.app, name="account", help="Manage account") app.add_typer( aggregate.app, name="aggregate", help="Manage aggregate messages on aleph.im" ) app.ad...
{"/tests/integration/itest_aggregates.py": ["/tests/integration/toolkit.py", "/tests/integration/config.py"], "/src/aleph_client/vm/cache.py": ["/src/aleph_client/conf.py"], "/tests/unit/test_vm_app.py": ["/tests/unit/test_app/main.py"], "/tests/integration/itest_forget.py": ["/tests/integration/config.py", "/tests/int...
14,089
kritik123/Pavement-Damage-Detection
refs/heads/master
/project_gui_shi_main_right.py
import sys try: import Tkinter as tk except ImportError: import tkinter as tk try: import ttk py3 = False except ImportError: import tkinter.ttk as ttk py3 = True import project_gui_shi_main_right_support import os.path from tkinter import filedialog from PIL import ImageTk,Image from pr...
{"/project_gui_shi_main_right.py": ["/prediction.py"]}
14,090
kritik123/Pavement-Damage-Detection
refs/heads/master
/prediction.py
# from keras.preprocessing import image import tensorflow as tf from tensorflow.keras.preprocessing import image import numpy as np # from keras.models import load_model model=tf.keras.models.load_model('C:\\Users\\KRITIK SHIVANSHU\\Desktop\\Pavement_condition_assessment-master\\testing_model_first.h5') def pred(...
{"/project_gui_shi_main_right.py": ["/prediction.py"]}
14,143
mdrdatalab/pykraken
refs/heads/master
/connection.py
# -*- coding: utf-8 -*- """ Created on Sat Jun 24 05:58:36 2017 @author: michael """ import http.client import urllib.request import urllib.parse import urllib.error class Connection(object): def __init__(self, uri='api.kraken.com', timeout=30): self.headers = { 'User-Agent': 'p...
{"/priceHistory.py": ["/queries.py"], "/api.py": ["/connection.py"], "/portfolioHistory.py": ["/queries.py"], "/queries.py": ["/api.py"], "/simPortfolio-v0.py": ["/queries.py"]}
14,144
mdrdatalab/pykraken
refs/heads/master
/priceHistory.py
# -*- coding: utf-8 -*- """ Created on Sun Jul 2 20:05:15 2017 @author: michael """ import queries import time import csv import os.path import datetime import numpy as np def get_history(asset): pairs = queries.get_pairs() pairs = list(pairs.keys()) last = 0 trades = [] #TODO: I don't lik...
{"/priceHistory.py": ["/queries.py"], "/api.py": ["/connection.py"], "/portfolioHistory.py": ["/queries.py"], "/queries.py": ["/api.py"], "/simPortfolio-v0.py": ["/queries.py"]}
14,145
mdrdatalab/pykraken
refs/heads/master
/api.py
# -*- coding: utf-8 -*- """ Created on Sat Jun 24 06:19:39 2017 @author: michael """ import json import urllib.request import urllib.parse import urllib.error import time import hashlib import hmac import base64 import connection class API(object): def __init__(self, key='', secret='', conn=None): ...
{"/priceHistory.py": ["/queries.py"], "/api.py": ["/connection.py"], "/portfolioHistory.py": ["/queries.py"], "/queries.py": ["/api.py"], "/simPortfolio-v0.py": ["/queries.py"]}
14,146
mdrdatalab/pykraken
refs/heads/master
/portfolioHistory.py
# -*- coding: utf-8 -*- """ Created on Sun Jul 2 18:48:06 2017 @author: michael """ import queries import datetime as dt import pandas as pd ledger = pd.DataFrame.from_dict(queries.get_ledger(), orient='index').sort_values(by=['time']) assets = list(set(ledger['asset']))
{"/priceHistory.py": ["/queries.py"], "/api.py": ["/connection.py"], "/portfolioHistory.py": ["/queries.py"], "/queries.py": ["/api.py"], "/simPortfolio-v0.py": ["/queries.py"]}
14,147
mdrdatalab/pykraken
refs/heads/master
/queries.py
# -*- coding: utf-8 -*- """ Created on Sat Jul 1 14:16:38 2017 @author: michael """ import api k = api.API() k.load_key('kraken.key') ###Public def get_pairs(): '''Returns pairs''' pairs = k.query_public('AssetPairs') # TODO: error handling # TODO: clean up returned data return pairs[...
{"/priceHistory.py": ["/queries.py"], "/api.py": ["/connection.py"], "/portfolioHistory.py": ["/queries.py"], "/queries.py": ["/api.py"], "/simPortfolio-v0.py": ["/queries.py"]}
14,148
mdrdatalab/pykraken
refs/heads/master
/simPortfolio-v0.py
# -*- coding: utf-8 -*- """ Created on Wed Jul 19 18:32:51 2017 @author: michael """ import queries #TODO make this work for all pairs... #works for XXBT, XETH #TODO make one for historical prices... class portfolio(): def __init__(self, initial_funds): self.initial_funds = initial_funds s...
{"/priceHistory.py": ["/queries.py"], "/api.py": ["/connection.py"], "/portfolioHistory.py": ["/queries.py"], "/queries.py": ["/api.py"], "/simPortfolio-v0.py": ["/queries.py"]}
14,149
aths2041/myproject
refs/heads/main
/blog/admin.py
from django.contrib import admin from .models import Post, Contact # Register your models here. # @admin.register(Post) # class PostModelAdmin(admin.ModelAdmin): # list_display = ['id', 'title', 'desc', 'title_tag', 'post_date', 'post_image'] admin.site.register(Post) admin.site.register(Contact)
{"/blog/admin.py": ["/blog/models.py"], "/blog/views.py": ["/blog/models.py"]}
14,150
aths2041/myproject
refs/heads/main
/blog/migrations/0004_alter_post_post_date.py
# Generated by Django 3.2.4 on 2021-07-13 07:43 from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('blog', '0003_auto_20210713_1047'), ] operations = [ migrations.AlterField( model_name='post', name='post_date', ...
{"/blog/admin.py": ["/blog/models.py"], "/blog/views.py": ["/blog/models.py"]}
14,151
aths2041/myproject
refs/heads/main
/blog/views.py
from django.shortcuts import render, HttpResponseRedirect from .forms import SignUpForm, LoginForm, PostForm from django.contrib import messages from django.contrib.auth import authenticate, login, logout from .models import Post, Contact from django.contrib.auth.models import Group # home def home(request): post...
{"/blog/admin.py": ["/blog/models.py"], "/blog/views.py": ["/blog/models.py"]}
14,152
aths2041/myproject
refs/heads/main
/blog/migrations/0008_alter_post_slug.py
# Generated by Django 3.2.4 on 2021-07-16 06:41 from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('blog', '0007_post_author'), ] operations = [ migrations.AlterField( model_name='post', name='slug', fiel...
{"/blog/admin.py": ["/blog/models.py"], "/blog/views.py": ["/blog/models.py"]}
14,153
aths2041/myproject
refs/heads/main
/blog/models.py
from django.db import models from django.db.models.signals import pre_save from myblog.utils import unique_slug_generator from ckeditor.fields import RichTextField # Create your models here. class Post(models.Model): title = models.CharField(max_length=200) # desc = models.TextField() desc = RichTextField(...
{"/blog/admin.py": ["/blog/models.py"], "/blog/views.py": ["/blog/models.py"]}
14,165
jjisnow/gmail_response_bot
refs/heads/master
/canned_response_bot.py
from __future__ import print_function import base64 import email import os import pprint import time from email.mime.text import MIMEText from email.utils import parseaddr import httplib2 from apiclient import discovery from apiclient import errors from oauth2client import client from oauth2client import tools from o...
{"/canned_response_bot.py": ["/canned_reply_config.py"]}
14,166
jjisnow/gmail_response_bot
refs/heads/master
/canned_reply_config.py
# Your email - gets added in the "from" field when you write your reply to = 'your email <your@email.com' # a list of blacklisted senders whom this applies to. Emails must be surrounded by '' # and separated by commas, and the list inside [] senders = ['boring@mail.com', 'spammer@mail.com'] # the standard reply text ...
{"/canned_response_bot.py": ["/canned_reply_config.py"]}
14,190
saisua/BeerProgramming
refs/heads/master
/run_server.py
#!./python3.7/python import Server #, front import logging #from wx import App from multiprocessing import Process, Manager from re import finditer, sub from random import randint import time, datetime # This function gets executed when you run # python run_server.py and its use is to deploy # the main ...
{"/run_server.py": ["/Server.py"], "/play.py": ["/Client.py", "/front.py"]}
14,191
saisua/BeerProgramming
refs/heads/master
/play.py
#!./python3.7/python import Client , front from wx import App from multiprocessing import Process import logging from selenium.webdriver.support.ui import WebDriverWait from selenium.webdriver.common.by import By from selenium.webdriver.common.desired_capabilities import DesiredCapabilities from selenium.comm...
{"/run_server.py": ["/Server.py"], "/play.py": ["/Client.py", "/front.py"]}
14,192
saisua/BeerProgramming
refs/heads/master
/front.py
# Imports import logging, wx from re import split as multisplit from cv2 import imread # Main function for testing def __main(): # level = logging. + [CRITICAL, ERROR, WARNING, INFO, DEBUGGING] logging.basicConfig(format='%(asctime)s %(levelname)s | %(message)s', level=logging.DEBUG) return ...
{"/run_server.py": ["/Server.py"], "/play.py": ["/Client.py", "/front.py"]}
14,193
saisua/BeerProgramming
refs/heads/master
/Client.py
import socket import logging import time # This function gets executed when you run # python Client.py and its use is to test the code # so it will usually be empty def main(): return import sys #multiprocessing_logging.install_mp_handler() logging.basicConfig(format="%(asctime)s %(levelna...
{"/run_server.py": ["/Server.py"], "/play.py": ["/Client.py", "/front.py"]}
14,194
saisua/BeerProgramming
refs/heads/master
/Server.py
from multiprocessing import Process, Manager import socket, logging import typing # This function gets executed when you run # python Server.py and its use is to test the code # so it will usually be empty def main(): logging.error("Run run_server instead") """ The Server class is the main bu...
{"/run_server.py": ["/Server.py"], "/play.py": ["/Client.py", "/front.py"]}
14,198
fumpen/marbar
refs/heads/master
/marbar/score_board/migrations/0001_initial.py
# Generated by Django 2.1.1 on 2018-10-26 15:02 from django.db import migrations, models import django.db.models.deletion class Migration(migrations.Migration): initial = True dependencies = [ ('management', '0001_initial'), ] operations = [ migrations.CreateModel( name...
{"/marbar/score_board/views.py": ["/marbar/score_board/models.py"], "/marbar/management/admin.py": ["/marbar/management/models.py"], "/marbar/management/views.py": ["/marbar/management/models.py", "/marbar/management/forms.py"]}
14,199
fumpen/marbar
refs/heads/master
/marbar/management/urls.py
from django.urls import path from . import views urlpatterns = [ path('', views.general_management, name='management_view'), path('login/', views.crude_login_view, name='login_view'), path('login_post/', views.crude_login, name='login'), path('logout/', views.logout_user, name='logout'), path('cre...
{"/marbar/score_board/views.py": ["/marbar/score_board/models.py"], "/marbar/management/admin.py": ["/marbar/management/models.py"], "/marbar/management/views.py": ["/marbar/management/models.py", "/marbar/management/forms.py"]}
14,200
fumpen/marbar
refs/heads/master
/marbar/management/forms.py
from django import forms from django.contrib.auth.models import User from management.models import MarBar, Event from score_board.models import ScoreUnit from django.db import transaction from django.core.exceptions import ObjectDoesNotExist from django.contrib import messages STD_FORM = [('1A', 1), ('2A', 1), ('3A',...
{"/marbar/score_board/views.py": ["/marbar/score_board/models.py"], "/marbar/management/admin.py": ["/marbar/management/models.py"], "/marbar/management/views.py": ["/marbar/management/models.py", "/marbar/management/forms.py"]}