index int64 | repo_name string | branch_name string | path string | content string | import_graph string |
|---|---|---|---|---|---|
31,446 | beancount/fava | refs/heads/main | /tests/test_core_watcher.py | from __future__ import annotations
import time
from typing import TYPE_CHECKING
from fava.core.watcher import Watcher
if TYPE_CHECKING: # pragma: no cover
from pathlib import Path
def test_watcher_file(tmp_path: Path) -> None:
file1 = tmp_path / "file1"
file2 = tmp_path / "file2"
file1.write_text(... | {"/tests/test_application.py": ["/tests/conftest.py"], "/tests/test_serialisation.py": ["/tests/conftest.py"], "/tests/test_json_api.py": ["/tests/conftest.py"], "/tests/test_core_file.py": ["/tests/conftest.py"], "/tests/test_extensions.py": ["/tests/conftest.py"], "/tests/test_core_query_shell.py": ["/tests/conftest.... |
31,447 | beancount/fava | refs/heads/main | /tests/test_core.py | from __future__ import annotations
import datetime
from pathlib import Path
from typing import TYPE_CHECKING
import pytest
from fava.helpers import FavaAPIError
if TYPE_CHECKING: # pragma: no cover
from fava.beans.abc import Directive
from fava.core import FavaLedger
def test_apiexception() -> None:
... | {"/tests/test_application.py": ["/tests/conftest.py"], "/tests/test_serialisation.py": ["/tests/conftest.py"], "/tests/test_json_api.py": ["/tests/conftest.py"], "/tests/test_core_file.py": ["/tests/conftest.py"], "/tests/test_extensions.py": ["/tests/conftest.py"], "/tests/test_core_query_shell.py": ["/tests/conftest.... |
31,448 | beancount/fava | refs/heads/main | /tests/test_core_commodities.py | from __future__ import annotations
from typing import TYPE_CHECKING
if TYPE_CHECKING: # pragma: no cover
from fava.core import FavaLedger
def test_commodity_names(example_ledger: FavaLedger) -> None:
assert example_ledger.commodities.name("USD") == "US Dollar"
assert example_ledger.commodities.name("NO... | {"/tests/test_application.py": ["/tests/conftest.py"], "/tests/test_serialisation.py": ["/tests/conftest.py"], "/tests/test_json_api.py": ["/tests/conftest.py"], "/tests/test_core_file.py": ["/tests/conftest.py"], "/tests/test_extensions.py": ["/tests/conftest.py"], "/tests/test_core_query_shell.py": ["/tests/conftest.... |
31,449 | beancount/fava | refs/heads/main | /tests/test_core_documents.py | from __future__ import annotations
from pathlib import Path
from typing import TYPE_CHECKING
import pytest
from fava.core.documents import filepath_in_document_folder
from fava.core.documents import is_document_or_import_file
from fava.helpers import FavaAPIError
if TYPE_CHECKING: # pragma: no cover
from fava.... | {"/tests/test_application.py": ["/tests/conftest.py"], "/tests/test_serialisation.py": ["/tests/conftest.py"], "/tests/test_json_api.py": ["/tests/conftest.py"], "/tests/test_core_file.py": ["/tests/conftest.py"], "/tests/test_extensions.py": ["/tests/conftest.py"], "/tests/test_core_query_shell.py": ["/tests/conftest.... |
31,450 | beancount/fava | refs/heads/main | /src/fava/core/charts.py | """Provide data suitable for Fava's charts."""
from __future__ import annotations
from collections import defaultdict
from dataclasses import dataclass
from dataclasses import fields
from dataclasses import is_dataclass
from datetime import date
from datetime import timedelta
from decimal import Decimal
from typing im... | {"/tests/test_application.py": ["/tests/conftest.py"], "/tests/test_serialisation.py": ["/tests/conftest.py"], "/tests/test_json_api.py": ["/tests/conftest.py"], "/tests/test_core_file.py": ["/tests/conftest.py"], "/tests/test_extensions.py": ["/tests/conftest.py"], "/tests/test_core_query_shell.py": ["/tests/conftest.... |
31,451 | beancount/fava | refs/heads/main | /src/fava/__init__.py | """Fava - A web interface for Beancount."""
from __future__ import annotations
from contextlib import suppress
from importlib.metadata import PackageNotFoundError
from importlib.metadata import version
with suppress(PackageNotFoundError):
__version__ = version(__name__)
LOCALES = [
"bg",
"ca",
"de",
... | {"/tests/test_application.py": ["/tests/conftest.py"], "/tests/test_serialisation.py": ["/tests/conftest.py"], "/tests/test_json_api.py": ["/tests/conftest.py"], "/tests/test_core_file.py": ["/tests/conftest.py"], "/tests/test_extensions.py": ["/tests/conftest.py"], "/tests/test_core_query_shell.py": ["/tests/conftest.... |
31,452 | beancount/fava | refs/heads/main | /src/fava/core/module_base.py | """Base class for the "modules" of FavaLedger."""
from __future__ import annotations
from typing import TYPE_CHECKING
if TYPE_CHECKING: # pragma: no cover
from fava.core import FavaLedger
class FavaModule:
"""Base class for the "modules" of FavaLedger."""
def __init__(self, ledger: FavaLedger) -> None... | {"/tests/test_application.py": ["/tests/conftest.py"], "/tests/test_serialisation.py": ["/tests/conftest.py"], "/tests/test_json_api.py": ["/tests/conftest.py"], "/tests/test_core_file.py": ["/tests/conftest.py"], "/tests/test_extensions.py": ["/tests/conftest.py"], "/tests/test_core_query_shell.py": ["/tests/conftest.... |
31,453 | beancount/fava | refs/heads/main | /tests/test_util.py | from __future__ import annotations
from typing import Iterable
from typing import TYPE_CHECKING
from werkzeug.test import Client
from werkzeug.wrappers import Response
from fava.util import listify
from fava.util import next_key
from fava.util import send_file_inline
from fava.util import simple_wsgi
from fava.util ... | {"/tests/test_application.py": ["/tests/conftest.py"], "/tests/test_serialisation.py": ["/tests/conftest.py"], "/tests/test_json_api.py": ["/tests/conftest.py"], "/tests/test_core_file.py": ["/tests/conftest.py"], "/tests/test_extensions.py": ["/tests/conftest.py"], "/tests/test_core_query_shell.py": ["/tests/conftest.... |
31,454 | beancount/fava | refs/heads/main | /src/fava/core/filters.py | """Entry filters."""
from __future__ import annotations
import re
from abc import ABC
from abc import abstractmethod
from typing import Any
from typing import Callable
from typing import Iterable
from typing import TYPE_CHECKING
import ply.yacc # type: ignore[import]
from beancount.core import account
from beancount... | {"/tests/test_application.py": ["/tests/conftest.py"], "/tests/test_serialisation.py": ["/tests/conftest.py"], "/tests/test_json_api.py": ["/tests/conftest.py"], "/tests/test_core_file.py": ["/tests/conftest.py"], "/tests/test_extensions.py": ["/tests/conftest.py"], "/tests/test_core_query_shell.py": ["/tests/conftest.... |
31,455 | beancount/fava | refs/heads/main | /src/fava/core/attributes.py | """Attributes for auto-completion."""
from __future__ import annotations
from typing import TYPE_CHECKING
from fava.core.module_base import FavaModule
from fava.util.date import END_OF_YEAR
from fava.util.ranking import ExponentialDecayRanker
if TYPE_CHECKING: # pragma: no cover
from fava.beans.abc import Direc... | {"/tests/test_application.py": ["/tests/conftest.py"], "/tests/test_serialisation.py": ["/tests/conftest.py"], "/tests/test_json_api.py": ["/tests/conftest.py"], "/tests/test_core_file.py": ["/tests/conftest.py"], "/tests/test_extensions.py": ["/tests/conftest.py"], "/tests/test_core_query_shell.py": ["/tests/conftest.... |
31,456 | beancount/fava | refs/heads/main | /tests/test_core_tree.py | from __future__ import annotations
from typing import TYPE_CHECKING
from fava.core.tree import Tree
if TYPE_CHECKING: # pragma: no cover
from fava.core import FavaLedger
from .conftest import SnapshotFunc
def test_tree() -> None:
tree = Tree()
assert len(tree) == 1
tree.get("account:name:a:b:... | {"/tests/test_application.py": ["/tests/conftest.py"], "/tests/test_serialisation.py": ["/tests/conftest.py"], "/tests/test_json_api.py": ["/tests/conftest.py"], "/tests/test_core_file.py": ["/tests/conftest.py"], "/tests/test_extensions.py": ["/tests/conftest.py"], "/tests/test_core_query_shell.py": ["/tests/conftest.... |
31,457 | beancount/fava | refs/heads/main | /tests/test_plugins_tag_discovered_documents.py | from __future__ import annotations
from pathlib import Path
from textwrap import dedent
from beancount.loader import load_file
from fava.beans.abc import Document
def test_tag_discovered_plugin(tmp_path: Path) -> None:
# Create sample files
assets_cash = tmp_path / "documents" / "Assets" / "Cash"
asset... | {"/tests/test_application.py": ["/tests/conftest.py"], "/tests/test_serialisation.py": ["/tests/conftest.py"], "/tests/test_json_api.py": ["/tests/conftest.py"], "/tests/test_core_file.py": ["/tests/conftest.py"], "/tests/test_extensions.py": ["/tests/conftest.py"], "/tests/test_core_query_shell.py": ["/tests/conftest.... |
31,458 | beancount/fava | refs/heads/main | /src/fava/util/date.py | """Date-related functionality.
Note:
Date ranges are always tuples (start, end) from the (inclusive) start date
to the (exclusive) end date.
"""
from __future__ import annotations
import datetime
import re
from dataclasses import dataclass
from datetime import timedelta
from enum import Enum
from itertools im... | {"/tests/test_application.py": ["/tests/conftest.py"], "/tests/test_serialisation.py": ["/tests/conftest.py"], "/tests/test_json_api.py": ["/tests/conftest.py"], "/tests/test_core_file.py": ["/tests/conftest.py"], "/tests/test_extensions.py": ["/tests/conftest.py"], "/tests/test_core_query_shell.py": ["/tests/conftest.... |
31,459 | beancount/fava | refs/heads/main | /tests/test_internal_api.py | """Tests for Fava's main Flask app."""
from __future__ import annotations
from typing import TYPE_CHECKING
from fava.core.charts import dumps
from fava.internal_api import ChartApi
from fava.internal_api import get_ledger_data
if TYPE_CHECKING: # pragma: no cover
from flask import Flask
from .conftest impo... | {"/tests/test_application.py": ["/tests/conftest.py"], "/tests/test_serialisation.py": ["/tests/conftest.py"], "/tests/test_json_api.py": ["/tests/conftest.py"], "/tests/test_core_file.py": ["/tests/conftest.py"], "/tests/test_extensions.py": ["/tests/conftest.py"], "/tests/test_core_query_shell.py": ["/tests/conftest.... |
31,460 | beancount/fava | refs/heads/main | /tests/test_core_charts.py | from __future__ import annotations
from decimal import Decimal
from typing import TYPE_CHECKING
import pytest
from fava.core.charts import dumps
from fava.util.date import Interval
if TYPE_CHECKING: # pragma: no cover
from fava.core import FavaLedger
from .conftest import GetFavaLedger
from .conftest ... | {"/tests/test_application.py": ["/tests/conftest.py"], "/tests/test_serialisation.py": ["/tests/conftest.py"], "/tests/test_json_api.py": ["/tests/conftest.py"], "/tests/test_core_file.py": ["/tests/conftest.py"], "/tests/test_extensions.py": ["/tests/conftest.py"], "/tests/test_core_query_shell.py": ["/tests/conftest.... |
31,461 | beancount/fava | refs/heads/main | /src/fava/core/group_entries.py | """Entries grouped by type."""
from __future__ import annotations
from collections import defaultdict
from typing import NamedTuple
from fava.beans import abc
from fava.beans.account import get_entry_accounts
class EntriesByType(NamedTuple):
"""Entries grouped by type."""
Balance: list[abc.Balance]
Clo... | {"/tests/test_application.py": ["/tests/conftest.py"], "/tests/test_serialisation.py": ["/tests/conftest.py"], "/tests/test_json_api.py": ["/tests/conftest.py"], "/tests/test_core_file.py": ["/tests/conftest.py"], "/tests/test_extensions.py": ["/tests/conftest.py"], "/tests/test_core_query_shell.py": ["/tests/conftest.... |
31,462 | beancount/fava | refs/heads/main | /contrib/pythonanywhere/fava/fava_pythonanywhere_com_wsgi.py | """fava wsgi application"""
from __future__ import annotations
from fava.application import create_app
application = create_app(
[
"/home/fava/example.beancount",
"/home/fava/budgets-example.beancount",
"/home/fava/huge-example.beancount",
],
)
| {"/tests/test_application.py": ["/tests/conftest.py"], "/tests/test_serialisation.py": ["/tests/conftest.py"], "/tests/test_json_api.py": ["/tests/conftest.py"], "/tests/test_core_file.py": ["/tests/conftest.py"], "/tests/test_extensions.py": ["/tests/conftest.py"], "/tests/test_core_query_shell.py": ["/tests/conftest.... |
31,463 | beancount/fava | refs/heads/main | /contrib/scripts.py | #!/usr/bin/env python3
"""Various utilities."""
from __future__ import annotations
import json
from os import environ
from pathlib import Path
from typing import Iterable
import requests
from beancount.query import query_env
from beancount.query import query_parser
from click import echo
from click import group
from ... | {"/tests/test_application.py": ["/tests/conftest.py"], "/tests/test_serialisation.py": ["/tests/conftest.py"], "/tests/test_json_api.py": ["/tests/conftest.py"], "/tests/test_core_file.py": ["/tests/conftest.py"], "/tests/test_extensions.py": ["/tests/conftest.py"], "/tests/test_core_query_shell.py": ["/tests/conftest.... |
31,464 | beancount/fava | refs/heads/main | /tests/test_core_attributes.py | from __future__ import annotations
from typing import TYPE_CHECKING
from fava.core.attributes import get_active_years
from fava.util.date import FiscalYearEnd
if TYPE_CHECKING: # pragma: no cover
from fava.beans.abc import Directive
from fava.core import FavaLedger
def test_get_active_years(load_doc_entri... | {"/tests/test_application.py": ["/tests/conftest.py"], "/tests/test_serialisation.py": ["/tests/conftest.py"], "/tests/test_json_api.py": ["/tests/conftest.py"], "/tests/test_core_file.py": ["/tests/conftest.py"], "/tests/test_extensions.py": ["/tests/conftest.py"], "/tests/test_core_query_shell.py": ["/tests/conftest.... |
31,465 | beancount/fava | refs/heads/main | /tests/test_core_number.py | from __future__ import annotations
from decimal import Decimal
from typing import TYPE_CHECKING
from babel.core import Locale
from fava.core.number import get_locale_format
if TYPE_CHECKING: # pragma: no cover
import pytest
from fava.core import FavaLedger
def test_get_locale_format() -> None:
local... | {"/tests/test_application.py": ["/tests/conftest.py"], "/tests/test_serialisation.py": ["/tests/conftest.py"], "/tests/test_json_api.py": ["/tests/conftest.py"], "/tests/test_core_file.py": ["/tests/conftest.py"], "/tests/test_extensions.py": ["/tests/conftest.py"], "/tests/test_core_query_shell.py": ["/tests/conftest.... |
31,466 | beancount/fava | refs/heads/main | /tests/test_core_filters.py | from __future__ import annotations
import datetime
from typing import TYPE_CHECKING
import pytest
from beancount.core.account import has_component
from fava.beans import create
from fava.beans.account import get_entry_accounts
from fava.core.filters import AccountFilter
from fava.core.filters import AdvancedFilter
f... | {"/tests/test_application.py": ["/tests/conftest.py"], "/tests/test_serialisation.py": ["/tests/conftest.py"], "/tests/test_json_api.py": ["/tests/conftest.py"], "/tests/test_core_file.py": ["/tests/conftest.py"], "/tests/test_extensions.py": ["/tests/conftest.py"], "/tests/test_core_query_shell.py": ["/tests/conftest.... |
31,467 | beancount/fava | refs/heads/main | /src/fava/core/accounts.py | """Account close date and metadata."""
from __future__ import annotations
import datetime
from dataclasses import dataclass
from dataclasses import field
from typing import Dict
from typing import TYPE_CHECKING
from fava.beans.abc import Balance
from fava.beans.abc import Close
from fava.beans.flags import FLAG_UNREA... | {"/tests/test_application.py": ["/tests/conftest.py"], "/tests/test_serialisation.py": ["/tests/conftest.py"], "/tests/test_json_api.py": ["/tests/conftest.py"], "/tests/test_core_file.py": ["/tests/conftest.py"], "/tests/test_extensions.py": ["/tests/conftest.py"], "/tests/test_core_query_shell.py": ["/tests/conftest.... |
31,468 | beancount/fava | refs/heads/main | /tests/test_templates.py | from __future__ import annotations
from typing import TYPE_CHECKING
from flask import get_template_attribute
from fava.beans import create
if TYPE_CHECKING: # pragma: no cover
from flask import Flask
from fava.core import FavaLedger
def test_render_amount(app: Flask, example_ledger: FavaLedger) -> None:... | {"/tests/test_application.py": ["/tests/conftest.py"], "/tests/test_serialisation.py": ["/tests/conftest.py"], "/tests/test_json_api.py": ["/tests/conftest.py"], "/tests/test_core_file.py": ["/tests/conftest.py"], "/tests/test_extensions.py": ["/tests/conftest.py"], "/tests/test_core_query_shell.py": ["/tests/conftest.... |
31,473 | tinystone21/cooking_blog | refs/heads/master | /main/packages.py | from django.contrib.auth import authenticate, login, get_user_model
from django.forms import modelformset_factory
from django.http import HttpResponseRedirect
from django.shortcuts import render, redirect
from django.contrib import messages
from django.urls import reverse_lazy
from django.views.generic import (
Lis... | {"/main/service.py": ["/main/forms.py"], "/main/urls.py": ["/main/views.py"], "/main/views.py": ["/main/packages.py", "/main/forms.py", "/main/service.py"]} |
31,474 | tinystone21/cooking_blog | refs/heads/master | /main/admin.py | from django.contrib import admin
from django.contrib.auth import get_user_model
from main.models import Image, Recipe, Category, Comment
class ImageInlineAdmin(admin.TabularInline):
model = Image
fields = ('image', )
max_num = 5
@admin.register(Recipe)
class RecipeAdmin(admin.ModelAdmin):
inlines =... | {"/main/service.py": ["/main/forms.py"], "/main/urls.py": ["/main/views.py"], "/main/views.py": ["/main/packages.py", "/main/forms.py", "/main/service.py"]} |
31,475 | tinystone21/cooking_blog | refs/heads/master | /main/service.py | from main.forms import UserRegistrationForm
class UserRegistrationService:
@classmethod
def create_user(cls, request):
form = UserRegistrationForm(request.POST)
if form.is_valid():
user = form.save(commit=False)
cd = form.cleaned_data
user.email = cd['email'... | {"/main/service.py": ["/main/forms.py"], "/main/urls.py": ["/main/views.py"], "/main/views.py": ["/main/packages.py", "/main/forms.py", "/main/service.py"]} |
31,476 | tinystone21/cooking_blog | refs/heads/master | /main/urls.py | from django.urls import path
from .views import (
MainPageView, CategoryDetailView,
RecipeDetailView, add_recipe, RecipeUpdateView,
RecipeDeleteView, UserRegistrationView, AuthorizationView
)
urlpatterns = [
path('', MainPageView.as_view(), name='home'),
path(
'category/<str:slug>/', Cate... | {"/main/service.py": ["/main/forms.py"], "/main/urls.py": ["/main/views.py"], "/main/views.py": ["/main/packages.py", "/main/forms.py", "/main/service.py"]} |
31,477 | tinystone21/cooking_blog | refs/heads/master | /account/models.py | from django.contrib.auth.models import AbstractUser
from django.db import models
class User(AbstractUser):
email = models.EmailField(unique=True)
username = models.CharField(max_length=44)
image = models.ImageField(upload_to='users')
USERNAME_FIELD = 'email'
REQUIRED_FIELDS = ['username']
cl... | {"/main/service.py": ["/main/forms.py"], "/main/urls.py": ["/main/views.py"], "/main/views.py": ["/main/packages.py", "/main/forms.py", "/main/service.py"]} |
31,478 | tinystone21/cooking_blog | refs/heads/master | /main/forms.py | from datetime import datetime
from django import forms
from django.contrib.auth import get_user_model
from main.models import Recipe, Image, Comment
class RecipeForm(forms.ModelForm):
created = forms.DateTimeField(
initial=datetime.now().strftime('%Y-%m-%d'),
required=False
)
class Meta... | {"/main/service.py": ["/main/forms.py"], "/main/urls.py": ["/main/views.py"], "/main/views.py": ["/main/packages.py", "/main/forms.py", "/main/service.py"]} |
31,479 | tinystone21/cooking_blog | refs/heads/master | /main/views.py | from main.packages import *
from main.forms import (
RecipeForm, ImageForm, CommentForm,
UserRegistrationForm, AuthorizationForm
)
from main.models import Recipe, Comment, Category, Image
from main.service import UserRegistrationService
User = get_user_model()
class MainPageView(ListView):
model = Recip... | {"/main/service.py": ["/main/forms.py"], "/main/urls.py": ["/main/views.py"], "/main/views.py": ["/main/packages.py", "/main/forms.py", "/main/service.py"]} |
31,482 | Niraj-Kamdar/badger-rewards-bot | refs/heads/main | /bot.py | # bot.py
import json
import logging
import os
from discord.ext import commands, tasks
from web3 import Web3
from utils import fetch_rewards_tree, formatter, summary
UPDATE_INTERVAL_SECONDS = 300
TEST = True if os.getenv("ENV") == "TEST" else False
WEB3_INFURA_HTTP_URL = os.getenv("WEB3_INFURA_HTTP_URL")
logging.bas... | {"/bot.py": ["/utils.py"], "/utils.py": ["/cgMapping.py"]} |
31,483 | Niraj-Kamdar/badger-rewards-bot | refs/heads/main | /utils.py | import json
import os
from collections import Counter, defaultdict
import boto3
import discord
from pycoingecko import CoinGeckoAPI
from cgMapping import cgMapping
cg = CoinGeckoAPI()
def download_tree(fileName, test=False):
if test:
with open("data/rewards.json") as f:
rewards = json.load(... | {"/bot.py": ["/utils.py"], "/utils.py": ["/cgMapping.py"]} |
31,484 | Niraj-Kamdar/badger-rewards-bot | refs/heads/main | /cgMapping.py | cgMapping = {
"0x3472A5A71965499acd81997a54BBA8D852C6E53d": {
"id": "badger-dao",
"decimals": 18,
"name": "badger",
},
"0x798D1bE841a82a273720CE31c822C61a67a601C3": {
"id": "digg",
"decimals": 9,
"name": "digg",
},
"0x20c36f062a31865bED8a5B1e512D9a1A20... | {"/bot.py": ["/utils.py"], "/utils.py": ["/cgMapping.py"]} |
31,497 | orena1/neuron_reduce | refs/heads/master | /example/example.py | #reduction of L5_PC using Neuron_Reduce
from __future__ import division
import os
import logging
from neuron import gui,h
import numpy as np
import neuron_reduce
import time
import matplotlib.pyplot as plt
logging.basicConfig(level=os.environ.get("LOGLEVEL", "DEBUG"))
#Create a L5_PC model
h.load_file('L5PCbiophys... | {"/example/example.py": ["/neuron_reduce/__init__.py"], "/neuron_reduce/__init__.py": ["/neuron_reduce/subtree_reductor_func.py"], "/neuron_reduce/subtree_reductor_func.py": ["/neuron_reduce/reducing_methods.py"], "/tests/test_script_helper.py": ["/neuron_reduce/__init__.py"]} |
31,498 | orena1/neuron_reduce | refs/heads/master | /tests/TestsFiles/Test_8_C1_Marasco/Morphology_replace_user05.py | name = 'geo5038801mod'
apical_dendriteEnd = 79
total_user5 = 70
f = open(name + '.hoc','r')
new_ls = ''
for line in f:
if 'user5[' in line and 'create' not in line and 'append' not in line:
parts = line.split('user5[')
#sdfs
if '{user5[51] connect user5[52](0),... | {"/example/example.py": ["/neuron_reduce/__init__.py"], "/neuron_reduce/__init__.py": ["/neuron_reduce/subtree_reductor_func.py"], "/neuron_reduce/subtree_reductor_func.py": ["/neuron_reduce/reducing_methods.py"], "/tests/test_script_helper.py": ["/neuron_reduce/__init__.py"]} |
31,499 | orena1/neuron_reduce | refs/heads/master | /tests/run_all_tests.py | #!/usr/bin/env python
import os
WRITE_UNIT_TEST_VECTORS = False
PLOT_VOLTAGES = False
BASE_PATH = os.path.abspath(os.path.dirname(__file__))
TESTDATA_PATH = os.path.join(BASE_PATH, 'TestsFiles')
def run_reduce(morphology_file,
model_file,
frequency,
synapse_file,
... | {"/example/example.py": ["/neuron_reduce/__init__.py"], "/neuron_reduce/__init__.py": ["/neuron_reduce/subtree_reductor_func.py"], "/neuron_reduce/subtree_reductor_func.py": ["/neuron_reduce/reducing_methods.py"], "/tests/test_script_helper.py": ["/neuron_reduce/__init__.py"]} |
31,500 | orena1/neuron_reduce | refs/heads/master | /neuron_reduce/__init__.py | from .subtree_reductor_func import subtree_reductor
import os
def run_tests():
pp = os.path.realpath(__file__)
pp = os.path.dirname(pp)
print(pp)
execfile(pp + '/../tests/run_all_tests.py')
| {"/example/example.py": ["/neuron_reduce/__init__.py"], "/neuron_reduce/__init__.py": ["/neuron_reduce/subtree_reductor_func.py"], "/neuron_reduce/subtree_reductor_func.py": ["/neuron_reduce/reducing_methods.py"], "/tests/test_script_helper.py": ["/neuron_reduce/__init__.py"]} |
31,501 | orena1/neuron_reduce | refs/heads/master | /neuron_reduce/subtree_reductor_func.py | '''
function subtree_reductor():
which reduces a morphologically detailed cell instance into a morphologically
simplified cell instance, according to NeuroReduce and merges synapses of the
same type (same reverse potential, tau1, and tau2) that are mapped to the same
segment. (see more in Readme on tool and usage)
... | {"/example/example.py": ["/neuron_reduce/__init__.py"], "/neuron_reduce/__init__.py": ["/neuron_reduce/subtree_reductor_func.py"], "/neuron_reduce/subtree_reductor_func.py": ["/neuron_reduce/reducing_methods.py"], "/tests/test_script_helper.py": ["/neuron_reduce/__init__.py"]} |
31,502 | orena1/neuron_reduce | refs/heads/master | /neuron_reduce/reducing_methods.py | '''
This file contains the reduction algorithm itself
added the method by Guy to find L and X
'''
import collections
import contextlib
import logging
import math
import cmath
from neuron import h
logger = logging.getLogger(__name__)
CableParams = collections.namedtuple('CableParams',
... | {"/example/example.py": ["/neuron_reduce/__init__.py"], "/neuron_reduce/__init__.py": ["/neuron_reduce/subtree_reductor_func.py"], "/neuron_reduce/subtree_reductor_func.py": ["/neuron_reduce/reducing_methods.py"], "/tests/test_script_helper.py": ["/neuron_reduce/__init__.py"]} |
31,503 | orena1/neuron_reduce | refs/heads/master | /tests/test_script_helper.py | '''Test script for subtree reductor:
May be used to test the NeuroReduce reduction as performed by
subtree_reductor() in subtree_reductor_func.py. Receives as arguments a
Neurolucida full morphology file, a model template file, the total approximate
number of segments in the reduced model (-1 for default calculati... | {"/example/example.py": ["/neuron_reduce/__init__.py"], "/neuron_reduce/__init__.py": ["/neuron_reduce/subtree_reductor_func.py"], "/neuron_reduce/subtree_reductor_func.py": ["/neuron_reduce/reducing_methods.py"], "/tests/test_script_helper.py": ["/neuron_reduce/__init__.py"]} |
31,505 | kaandocal/evolutica | refs/heads/master | /master/actuator.py | import numpy as np
import heapq
# Actuator of an agent (incomplete)
class Actuator:
def __init__(self, agent):
self.agent = agent
self.goal = None
self.steps = []
# reorient and find a new goal
def reflect(self):
#check sensor inputs and create list of potential targets an... | {"/vis.py": ["/master/world.py", "/master/food.py", "/master/sensor.py"], "/master/sensor.py": ["/master/food.py", "/master/entity.py"], "/master/agent.py": ["/master/entity.py", "/master/actuator.py", "/master/sensor.py", "/master/food.py", "/master/gfx.py"], "/run.py": ["/master/entity.py", "/master/world.py", "/mast... |
31,506 | kaandocal/evolutica | refs/heads/master | /vis.py | import master.world
import master.food
import master.sensor
import matplotlib.pyplot as plt
import pickle
import sys
filename = sys.argv[1]
inp = open(filename, "rb")
world = pickle.load(inp)
living = []
extinct = []
multiplied = []
for ent in world.halloffame:
if not ent.deceased:
living.append(ent)
... | {"/vis.py": ["/master/world.py", "/master/food.py", "/master/sensor.py"], "/master/sensor.py": ["/master/food.py", "/master/entity.py"], "/master/agent.py": ["/master/entity.py", "/master/actuator.py", "/master/sensor.py", "/master/food.py", "/master/gfx.py"], "/run.py": ["/master/entity.py", "/master/world.py", "/mast... |
31,507 | kaandocal/evolutica | refs/heads/master | /master/sensor.py | import numpy as np
from .food import Food
from .entity import Ghost
import pygame
class Sensor():
def __init__(self, world, type, resolution = 0):
self.world = world
self.type = type
self.resolution = min(15,max(0,resolution))
#return list of elements perceived, weighted by perception... | {"/vis.py": ["/master/world.py", "/master/food.py", "/master/sensor.py"], "/master/sensor.py": ["/master/food.py", "/master/entity.py"], "/master/agent.py": ["/master/entity.py", "/master/actuator.py", "/master/sensor.py", "/master/food.py", "/master/gfx.py"], "/run.py": ["/master/entity.py", "/master/world.py", "/mast... |
31,508 | kaandocal/evolutica | refs/heads/master | /master/gfx.py | import pygame
images = {}
default_size = None
# Since pygame images cannot be pickled, this returns a handle to the image loaded
def load_image(name, size = None):
if not name in images.keys():
img = pygame.image.load('img/{}.bmp'.format(name))
images[name] = img
return (name, size)
# Retur... | {"/vis.py": ["/master/world.py", "/master/food.py", "/master/sensor.py"], "/master/sensor.py": ["/master/food.py", "/master/entity.py"], "/master/agent.py": ["/master/entity.py", "/master/actuator.py", "/master/sensor.py", "/master/food.py", "/master/gfx.py"], "/run.py": ["/master/entity.py", "/master/world.py", "/mast... |
31,509 | kaandocal/evolutica | refs/heads/master | /master/agent.py | from .entity import Entity
from .actuator import Actuator
from .sensor import Sensor, Nose, Ear, Brain, Eye
from .food import Food, foodtypes
from .gfx import load_image, get_image
# agent class
import numpy as np
names = [ 'Larry', 'Patrick', 'Hannah', 'Angelina', 'Bert', 'Margaret', 'Bob', 'Vicky', 'Oliver', 'Emily... | {"/vis.py": ["/master/world.py", "/master/food.py", "/master/sensor.py"], "/master/sensor.py": ["/master/food.py", "/master/entity.py"], "/master/agent.py": ["/master/entity.py", "/master/actuator.py", "/master/sensor.py", "/master/food.py", "/master/gfx.py"], "/run.py": ["/master/entity.py", "/master/world.py", "/mast... |
31,510 | kaandocal/evolutica | refs/heads/master | /run.py | #import modules
import pygame, sys, random
#import some useful constants
from pygame.locals import *
#import classes
from master.entity import Entity
from master.world import World
from master.agent import Agent
from master.sensor import Nose, Ear, Eye, Brain, sensortypes
from master.food import Food, FoodType
import... | {"/vis.py": ["/master/world.py", "/master/food.py", "/master/sensor.py"], "/master/sensor.py": ["/master/food.py", "/master/entity.py"], "/master/agent.py": ["/master/entity.py", "/master/actuator.py", "/master/sensor.py", "/master/food.py", "/master/gfx.py"], "/run.py": ["/master/entity.py", "/master/world.py", "/mast... |
31,511 | kaandocal/evolutica | refs/heads/master | /master/entity.py | class Entity:
# x und y geben die Koordinaten des Objekt Entity an (Typ Integer)
def __init__(self, world, x, y, type = None):
self.name = None
self.world = world
self.type = type
self.x = x
self.y = y
self.deceased = None
# update fu... | {"/vis.py": ["/master/world.py", "/master/food.py", "/master/sensor.py"], "/master/sensor.py": ["/master/food.py", "/master/entity.py"], "/master/agent.py": ["/master/entity.py", "/master/actuator.py", "/master/sensor.py", "/master/food.py", "/master/gfx.py"], "/run.py": ["/master/entity.py", "/master/world.py", "/mast... |
31,512 | kaandocal/evolutica | refs/heads/master | /master/data.py | from .world import World
from .agent import Agent
import pickle
# Pickles the world into a file
def dump(self):
i = 0
while True:
filename = "saves/save{}".format(i)
try:
out = open(filename, "rb")
except IOError:
break
i += 1
out = open(filename, "w... | {"/vis.py": ["/master/world.py", "/master/food.py", "/master/sensor.py"], "/master/sensor.py": ["/master/food.py", "/master/entity.py"], "/master/agent.py": ["/master/entity.py", "/master/actuator.py", "/master/sensor.py", "/master/food.py", "/master/gfx.py"], "/run.py": ["/master/entity.py", "/master/world.py", "/mast... |
31,513 | kaandocal/evolutica | refs/heads/master | /master/world.py | from .agent import Agent
from .food import Food, Distributor
from .entity import Entity
from .gfx import load_image, get_image
import numpy as np
import pygame
#represents the world grid with all entities
class World:
TILE_WALL = 1
def __init__(self, filename):
worldmap = load_image(filename, (0,0))
... | {"/vis.py": ["/master/world.py", "/master/food.py", "/master/sensor.py"], "/master/sensor.py": ["/master/food.py", "/master/entity.py"], "/master/agent.py": ["/master/entity.py", "/master/actuator.py", "/master/sensor.py", "/master/food.py", "/master/gfx.py"], "/run.py": ["/master/entity.py", "/master/world.py", "/mast... |
31,514 | kaandocal/evolutica | refs/heads/master | /master/food.py | import numpy as np
from .entity import Entity
from .gfx import load_image, get_image
class FoodType:
def __init__(self, name, shelflife, nutritional_value, smells, sounds, visible):
self.name = name
self.image = load_image(name)
self.shelflife = shelflife
self.nutritional_value = nu... | {"/vis.py": ["/master/world.py", "/master/food.py", "/master/sensor.py"], "/master/sensor.py": ["/master/food.py", "/master/entity.py"], "/master/agent.py": ["/master/entity.py", "/master/actuator.py", "/master/sensor.py", "/master/food.py", "/master/gfx.py"], "/run.py": ["/master/entity.py", "/master/world.py", "/mast... |
31,590 | momentum-cohort-2019-02/w6-apile-puppy-power | refs/heads/master | /core/urls.py | from django.urls import path, include
from core import views as core_views
urlpatterns = [
path('', core_views.index, name='index'),
path('postlink/<int:pk>', core_views.PostLinkDetailView.as_view(), name='postlink-detail'),
path('postlink/<int:pk>/vote/', core_views.postlink_vote_view,
name="postlink-... | {"/core/views.py": ["/core/models.py"], "/core/forms.py": ["/core/models.py"], "/core/admin.py": ["/core/models.py"]} |
31,591 | momentum-cohort-2019-02/w6-apile-puppy-power | refs/heads/master | /core/migrations/0003_auto_20190322_1426.py | # Generated by Django 2.1.7 on 2019-03-22 19:26
from django.db import migrations
class Migration(migrations.Migration):
dependencies = [
('core', '0002_auto_20190321_2247'),
]
operations = [
migrations.RenameField(
model_name='comment',
old_name='post',
... | {"/core/views.py": ["/core/models.py"], "/core/forms.py": ["/core/models.py"], "/core/admin.py": ["/core/models.py"]} |
31,592 | momentum-cohort-2019-02/w6-apile-puppy-power | refs/heads/master | /core/migrations/0002_auto_20190321_2247.py | # Generated by Django 2.1.7 on 2019-03-22 03:47
from django.db import migrations
class Migration(migrations.Migration):
dependencies = [
('core', '0001_initial'),
]
operations = [
migrations.RenameField(
model_name='vote',
old_name='post',
new_name='p... | {"/core/views.py": ["/core/models.py"], "/core/forms.py": ["/core/models.py"], "/core/admin.py": ["/core/models.py"]} |
31,593 | momentum-cohort-2019-02/w6-apile-puppy-power | refs/heads/master | /core/views.py | from django.shortcuts import render, redirect, get_object_or_404
from core.models import PostLink, User, Vote, Comment, HashTag
from django.contrib.auth.decorators import login_required
from django.contrib import messages
from django.views.decorators.http import require_http_methods
from django.views import generic
fro... | {"/core/views.py": ["/core/models.py"], "/core/forms.py": ["/core/models.py"], "/core/admin.py": ["/core/models.py"]} |
31,594 | momentum-cohort-2019-02/w6-apile-puppy-power | refs/heads/master | /core/forms.py | from django import forms
from django.forms import ModelForm
from core.models import PostLink, Comment, Vote, HashTag, User
class CommentForm(forms.ModelForm):
model = Comment
fields = ['post_comment']
class PostForm(forms.ModelForm):
class Meta:
model = Post
fields = ('title', 'post_li... | {"/core/views.py": ["/core/models.py"], "/core/forms.py": ["/core/models.py"], "/core/admin.py": ["/core/models.py"]} |
31,595 | momentum-cohort-2019-02/w6-apile-puppy-power | refs/heads/master | /core/models.py | from django.db import models
from autoslug import AutoSlugField
from django.urls import reverse
from django.contrib.auth import get_user_model
# Create your models here.
User = get_user_model()
class HashTag(models.Model):
topic = models.CharField(max_length=50)
def __str__(self):
return self.topic... | {"/core/views.py": ["/core/models.py"], "/core/forms.py": ["/core/models.py"], "/core/admin.py": ["/core/models.py"]} |
31,596 | momentum-cohort-2019-02/w6-apile-puppy-power | refs/heads/master | /core/admin.py | from django.contrib import admin
from core.models import PostLink, Comment, Vote, HashTag, User
# Register your models here.
@admin.register(PostLink)
class PostLinkAdmin(admin.ModelAdmin):
list_display = ('title', 'description', 'post_url', 'slug')
@admin.register(Comment)
class CommentAdmin(admin.ModelAdmin):
... | {"/core/views.py": ["/core/models.py"], "/core/forms.py": ["/core/models.py"], "/core/admin.py": ["/core/models.py"]} |
31,597 | alex3305/pyscinanled | refs/heads/master | /examples/example_simple.py | # Hack to allow relative import above top level package
import sys
import os
folder = os.path.dirname(os.path.abspath(__file__)) # noqa
sys.path.insert(0, os.path.normpath("%s/.." % folder)) # noqa
import argparse
import time
from pyscinanled import ScinanLed
parser = argparse.ArgumentParser()
parser.a... | {"/examples/example_simple.py": ["/pyscinanled/__init__.py"], "/pyscinanled/btle_connection.py": ["/pyscinanled/const.py"], "/pyscinanled/const.py": ["/pyscinanled/effect.py"], "/examples/example_effect.py": ["/pyscinanled/__init__.py"], "/pyscinanled/__init__.py": ["/pyscinanled/btle_connection.py", "/pyscinanled/effe... |
31,598 | alex3305/pyscinanled | refs/heads/master | /pyscinanled/btle_connection.py | import logging
import time
from .const import CHAR_START_HANDLE, CHAR_END_HANDLE, CHAR_UUID
from bluepy.btle import UUID, Peripheral, BTLEException
_LOGGER = logging.getLogger(__name__)
class BtleConnection:
def __init__(self, mac: str, retries: int):
self._mac = mac
self._device =... | {"/examples/example_simple.py": ["/pyscinanled/__init__.py"], "/pyscinanled/btle_connection.py": ["/pyscinanled/const.py"], "/pyscinanled/const.py": ["/pyscinanled/effect.py"], "/examples/example_effect.py": ["/pyscinanled/__init__.py"], "/pyscinanled/__init__.py": ["/pyscinanled/btle_connection.py", "/pyscinanled/effe... |
31,599 | alex3305/pyscinanled | refs/heads/master | /pyscinanled/const.py | from .effect import Effect
BRIGHTNESS_MIN = 10
BRIGHTNESS_MAX = 110
CHAR_START_HANDLE = 0x0024
CHAR_END_HANDLE = 0x0024
CHAR_UUID = "0000fff1-0000-1000-8000-00805f9b34fb"
COMMAND_BRIGHTNESS = [0x03, 0x01, 0x01]
COMMAND_EFFECT = [0x05, 0x01, 0x02, 0x03]
COMMAND_SWITCH = [0x01, 0x01, 0x01]
DEFAULT_RETRIE... | {"/examples/example_simple.py": ["/pyscinanled/__init__.py"], "/pyscinanled/btle_connection.py": ["/pyscinanled/const.py"], "/pyscinanled/const.py": ["/pyscinanled/effect.py"], "/examples/example_effect.py": ["/pyscinanled/__init__.py"], "/pyscinanled/__init__.py": ["/pyscinanled/btle_connection.py", "/pyscinanled/effe... |
31,600 | alex3305/pyscinanled | refs/heads/master | /pyscinanled/effect.py | import random
class Effect:
def __init__(self, name: str, value: int):
self._name = name
self._value = value
@property
def Name(self):
return self._name
@property
def Value(self):
return self._value
@staticmethod
def get_effect(effects: l... | {"/examples/example_simple.py": ["/pyscinanled/__init__.py"], "/pyscinanled/btle_connection.py": ["/pyscinanled/const.py"], "/pyscinanled/const.py": ["/pyscinanled/effect.py"], "/examples/example_effect.py": ["/pyscinanled/__init__.py"], "/pyscinanled/__init__.py": ["/pyscinanled/btle_connection.py", "/pyscinanled/effe... |
31,601 | alex3305/pyscinanled | refs/heads/master | /examples/example_effect.py | # Hack to allow relative import above top level package
import sys
import os
folder = os.path.dirname(os.path.abspath(__file__)) # noqa
sys.path.insert(0, os.path.normpath("%s/.." % folder)) # noqa
import argparse
import time
from pyscinanled import ScinanLed, Effect, EFFECT_LIST
parser = argparse.Arg... | {"/examples/example_simple.py": ["/pyscinanled/__init__.py"], "/pyscinanled/btle_connection.py": ["/pyscinanled/const.py"], "/pyscinanled/const.py": ["/pyscinanled/effect.py"], "/examples/example_effect.py": ["/pyscinanled/__init__.py"], "/pyscinanled/__init__.py": ["/pyscinanled/btle_connection.py", "/pyscinanled/effe... |
31,602 | alex3305/pyscinanled | refs/heads/master | /pyscinanled/__init__.py | from .btle_connection import BtleConnection
from .effect import Effect
from .led import ScinanLed
from .const import BRIGHTNESS_MIN, BRIGHTNESS_MAX, DEFAULT_RETRIES, EFFECT_LIST
| {"/examples/example_simple.py": ["/pyscinanled/__init__.py"], "/pyscinanled/btle_connection.py": ["/pyscinanled/const.py"], "/pyscinanled/const.py": ["/pyscinanled/effect.py"], "/examples/example_effect.py": ["/pyscinanled/__init__.py"], "/pyscinanled/__init__.py": ["/pyscinanled/btle_connection.py", "/pyscinanled/effe... |
31,603 | alex3305/pyscinanled | refs/heads/master | /pyscinanled/led.py | from .btle_connection import BtleConnection
from .const import BRIGHTNESS_MAX, BRIGHTNESS_MIN, DEFAULT_RETRIES, \
COMMAND_BRIGHTNESS, COMMAND_EFFECT, COMMAND_SWITCH
from .effect import Effect
class ScinanLed:
def __init__(self, mac: str, retries: int = DEFAULT_RETRIES):
self._connection = Bt... | {"/examples/example_simple.py": ["/pyscinanled/__init__.py"], "/pyscinanled/btle_connection.py": ["/pyscinanled/const.py"], "/pyscinanled/const.py": ["/pyscinanled/effect.py"], "/examples/example_effect.py": ["/pyscinanled/__init__.py"], "/pyscinanled/__init__.py": ["/pyscinanled/btle_connection.py", "/pyscinanled/effe... |
31,607 | jackfirth/flask-negotiate | refs/heads/master | /tests.py | import unittest
from flask import Flask
from flask_negotiate2 import consumes, produces
HTML = 'text/html'
JSON = 'application/json'
XML = 'application/xml'
ANY_TEXT = 'text/*'
ANY = '*/*'
UNSUPPORTED_CODE = 415
NOT_ACCEPTABLE_CODE = 406
CONSUMES_JSON_ONLY = '/consumes_json_only'
CONSUMES_JSON_AND_HTML = '/consumes... | {"/tests.py": ["/flask_negotiate2.py"]} |
31,608 | jackfirth/flask-negotiate | refs/heads/master | /flask_negotiate2.py | from functools import wraps
from itertools import groupby
from operator import itemgetter
from collections import defaultdict
from flask import request
from werkzeug.exceptions import UnsupportedMediaType, NotAcceptable
def build_groups(acceptable):
"""
Build the group information used by the MimeTypeMatcher... | {"/tests.py": ["/flask_negotiate2.py"]} |
31,611 | Vrcelj1979/List-of-topics-and-topic-details | refs/heads/master | /handlers/topics.py | from handlers.base import BaseHandler
from google.appengine.api import users
from models.topic import Topic
class TopicAdd(BaseHandler):
def get(self):
return self.render_template("topic_add.html")
def post(self):
user = users.get_current_user()
if not user:
return self.wr... | {"/main.py": ["/handlers/topics.py"]} |
31,612 | Vrcelj1979/List-of-topics-and-topic-details | refs/heads/master | /main.py | #!/usr/bin/env python
import webapp2
from handlers.base import CookieAlertHandler, MainHandler
from handlers.topics import TopicAdd, TopicDetailsHandler, TitleTopicHandler
app = webapp2.WSGIApplication([
webapp2.Route('/', MainHandler, name="main-page"),
webapp2.Route('/topic/add', TopicAdd, name="topic-add"),... | {"/main.py": ["/handlers/topics.py"]} |
31,618 | VarunVedant/mwdb-project | refs/heads/master | /feature_descriptor.py | """
Class to compute Feature Descriptors for each model.
"""
import img_util as iu
import config
import os
import json
import operator
import math
import numpy as np
from skimage import feature
from skimage import io
from skimage.feature import hog
from skimage.transform import rescale
class feature_descriptor:
... | {"/feature_descriptor.py": ["/img_util.py", "/config.py"], "/main_ramya.py": ["/feature_models.py", "/config.py"], "/phase1_main.py": ["/task1.py", "/task2.py", "/task3.py"], "/task2.py": ["/feature_descriptor.py"], "/task1.py": ["/feature_descriptor.py"], "/task3.py": ["/feature_descriptor.py"]} |
31,619 | VarunVedant/mwdb-project | refs/heads/master | /img_util.py | # Utility class containing utilities for img processing
import cv2
import numpy as np
from scipy import misc
class img_util:
@staticmethod
def open_image_grayscale(path):
"""
Opens image in grayscale
:param path(string): The complete path where the image can be found
:return(numpy.ndarray): Image as 2D m... | {"/feature_descriptor.py": ["/img_util.py", "/config.py"], "/main_ramya.py": ["/feature_models.py", "/config.py"], "/phase1_main.py": ["/task1.py", "/task2.py", "/task3.py"], "/task2.py": ["/feature_descriptor.py"], "/task1.py": ["/feature_descriptor.py"], "/task3.py": ["/feature_descriptor.py"]} |
31,620 | VarunVedant/mwdb-project | refs/heads/master | /main_ramya.py | import cv2
import feature_models
import csv
import glob
import time
import os
import config
task_number = input('Choose from the following options: \n'
'1. Task1: Compute feature descriptor of a single image\n'
'2. Task2: Compute feature descriptors on a folder of images... | {"/feature_descriptor.py": ["/img_util.py", "/config.py"], "/main_ramya.py": ["/feature_models.py", "/config.py"], "/phase1_main.py": ["/task1.py", "/task2.py", "/task3.py"], "/task2.py": ["/feature_descriptor.py"], "/task1.py": ["/feature_descriptor.py"], "/task3.py": ["/feature_descriptor.py"]} |
31,621 | VarunVedant/mwdb-project | refs/heads/master | /phase1_main.py | """
Phase 1 Project's main code
"""
import sys
import task1
import task2
import task3
def main():
while True:
print('Choose which task u want to execute: \n(Note - Execute Task 2 before Task 3)')
ch = input('\n1. Task 1\n2. Task 2\n3. Task 3\n4. Exit\nEnter Choice: ')
if ch == '1':
task1.task1()
elif ch ==... | {"/feature_descriptor.py": ["/img_util.py", "/config.py"], "/main_ramya.py": ["/feature_models.py", "/config.py"], "/phase1_main.py": ["/task1.py", "/task2.py", "/task3.py"], "/task2.py": ["/feature_descriptor.py"], "/task1.py": ["/feature_descriptor.py"], "/task3.py": ["/feature_descriptor.py"]} |
31,622 | VarunVedant/mwdb-project | refs/heads/master | /task2.py | """Task 2 Code
1. Accepts Path of folder with set of images
2. Accepts the type of model to use (LBP or HOG)
3. Computes feature descriptors for all images in the folder
4. Stores the feature descriptor for each image as JSON in a file corresponding to the chosen model.
"""
import feature_descriptor as ... | {"/feature_descriptor.py": ["/img_util.py", "/config.py"], "/main_ramya.py": ["/feature_models.py", "/config.py"], "/phase1_main.py": ["/task1.py", "/task2.py", "/task3.py"], "/task2.py": ["/feature_descriptor.py"], "/task1.py": ["/feature_descriptor.py"], "/task3.py": ["/feature_descriptor.py"]} |
31,623 | VarunVedant/mwdb-project | refs/heads/master | /task1.py | """Task 1 Code
1. Accepts Image ID from the user
2. Accepts the type of model to use (LBP or HOG)
3. Displays Feature Descriptor in Human Readable Form
"""
import feature_descriptor
def task1():
img_id = input('\nEnter the image ID: ')
while True:
feat_ch = input('\n1. LBP\n2. HOG\n3. Exi... | {"/feature_descriptor.py": ["/img_util.py", "/config.py"], "/main_ramya.py": ["/feature_models.py", "/config.py"], "/phase1_main.py": ["/task1.py", "/task2.py", "/task3.py"], "/task2.py": ["/feature_descriptor.py"], "/task1.py": ["/feature_descriptor.py"], "/task3.py": ["/feature_descriptor.py"]} |
31,624 | VarunVedant/mwdb-project | refs/heads/master | /task3.py | """Task 3 Code
1. Accepts Image ID, Model (LBP or HOG), value 'k'.
2. Finds k most similar images to the given image ID.
3. Displays matching score for each match in the list.
"""
import feature_descriptor as fd
def task3():
query_img_id = input('\nImage ID: ')
k = int(input('\nEnter the number of... | {"/feature_descriptor.py": ["/img_util.py", "/config.py"], "/main_ramya.py": ["/feature_models.py", "/config.py"], "/phase1_main.py": ["/task1.py", "/task2.py", "/task3.py"], "/task2.py": ["/feature_descriptor.py"], "/task1.py": ["/feature_descriptor.py"], "/task3.py": ["/feature_descriptor.py"]} |
31,625 | VarunVedant/mwdb-project | refs/heads/master | /feature_models.py | import cv2
import math
import numpy as np
import statistics
from scipy.stats.mstats import skew
import matplotlib.pyplot as plt
# a method that partitions a input image into 100 * 100 windows
def get_100_by_100_windows(input_image):
vertical_partitions = input_image.shape[1] / 100
horizontal_partitions = inpu... | {"/feature_descriptor.py": ["/img_util.py", "/config.py"], "/main_ramya.py": ["/feature_models.py", "/config.py"], "/phase1_main.py": ["/task1.py", "/task2.py", "/task3.py"], "/task2.py": ["/feature_descriptor.py"], "/task1.py": ["/feature_descriptor.py"], "/task3.py": ["/feature_descriptor.py"]} |
31,626 | VarunVedant/mwdb-project | refs/heads/master | /config.py | # Project Constants
# Base Path of the project
PROJ_BASE_PATH = '/media/binary-war-lord/Files/Personal Stuff/Projects/MWDB/Working_Area/'
# Path to the 11k image dataset
IMG_LIST_PATH = "/media/binary-war-lord/Files/Personal Stuff/Projects/MWDB/Working_Area/Hands/"
# IMG_LIST_PATH = "/media/binary-war-lord/Files/Pers... | {"/feature_descriptor.py": ["/img_util.py", "/config.py"], "/main_ramya.py": ["/feature_models.py", "/config.py"], "/phase1_main.py": ["/task1.py", "/task2.py", "/task3.py"], "/task2.py": ["/feature_descriptor.py"], "/task1.py": ["/feature_descriptor.py"], "/task3.py": ["/feature_descriptor.py"]} |
31,656 | Allaeddineattia/Vocal_Music_Player | refs/heads/master | /setup.py | from gtts import gTTS
import os
from datetime import datetime
import requests
print('setup mode')
def getPaths():
paths=["./music_mp3","./saves","/usr/lib/vocal_player","/usr/lib/vocal_player/instruction","/usr/lib/vocal_player/minute.mp3","/usr/lib/vocal_player/time.mp3"]
paths.extend(["/usr/lib/vocal_player/m... | {"/main.py": ["/setup.py"]} |
31,657 | Allaeddineattia/Vocal_Music_Player | refs/heads/master | /main.py | try :
import setup
except:
print('\n!!!!!!!\nsuper user mode is needed.\nre-execute the program as superuser.\nsudo python main.py\n!!!!!!!!')
exit(0)
from gtts import gTTS
from playsound import playsound
import os
from random import shuffle
import requests
class autoInstruct:
value=False
#----------... | {"/main.py": ["/setup.py"]} |
31,664 | aakarpanth2003/turtleartdesign | refs/heads/master | /myFunctions.py |
def polygon(t, s, d):
a = 360/s
for times in range(s):
t.forward(d)
t.right(a)
def jump(t,x,y):
t.penup()
t.goto(x,y)
t.pendown()
def cool(t,d,c1,c2):
t.color(c1)
polygon(t,4,d)
t.color(c2)
polygon(t,3,d)
... | {"/project.py": ["/myFunctions.py"]} |
31,665 | aakarpanth2003/turtleartdesign | refs/heads/master | /project.py | import turtle
from myFunctions import*
from random import*
turtle.colormode(255)
ak = turtle.Turtle()
x = (randint(0,350))
y = (randint(0,350))
ak.width(1)
ak.speed(187348458)
turtle.bgcolor("black")
for times in range(100):
ak.color(times,255,255-times)
ak.circle(80-times)
... | {"/project.py": ["/myFunctions.py"]} |
31,760 | webclinic017/streamlit-stock-analysis | refs/heads/main | /stock_trends.py | import pandas as pd
import numpy as np
from pandas import json_normalize
#from selenium.webdriver.support.expected_conditions import element_selection_state_to_be
#import matplotlib.pyplot as plt
#import seaborn as sns
import streamlit as st
import base64
import plotly.express as px
from PIL import Image
import plotly.... | {"/app.py": ["/home.py", "/stock_trends.py", "/stock_analysis.py", "/crypto.py", "/option_chain_activity.py"], "/functions.py.py": ["/home.py", "/stock_trends.py", "/stock_analysis.py"]} |
31,761 | webclinic017/streamlit-stock-analysis | refs/heads/main | /stock_analysis.py | # -*- coding: utf-8 -*-
"""
Created on Sun Mar 21 10:10:39 2021
@author: ROBERTLJ
"""
import pandas as pd
import numpy as np
from pandas import json_normalize
import json
#from selenium.webdriver.support.expected_conditions import element_selection_state_to_be
#import matplotlib.pyplot as plt
#import seaborn as sns
imp... | {"/app.py": ["/home.py", "/stock_trends.py", "/stock_analysis.py", "/crypto.py", "/option_chain_activity.py"], "/functions.py.py": ["/home.py", "/stock_trends.py", "/stock_analysis.py"]} |
31,762 | webclinic017/streamlit-stock-analysis | refs/heads/main | /home.py | import streamlit as st
import base64
from PIL import Image
def app():
st.markdown("<h1 style='text-align: center;'>Superior Returns Stock Analysis Home Page</h1>", unsafe_allow_html=True)
col1, col2, col3 = st.beta_columns([1,2,1])
#st.title('Stock Trends')
with col2:
bull = Image.open('b... | {"/app.py": ["/home.py", "/stock_trends.py", "/stock_analysis.py", "/crypto.py", "/option_chain_activity.py"], "/functions.py.py": ["/home.py", "/stock_trends.py", "/stock_analysis.py"]} |
31,763 | webclinic017/streamlit-stock-analysis | refs/heads/main | /app.py | import pandas as pd
import numpy as np
from pandas import json_normalize
#from selenium.webdriver.support.expected_conditions import element_selection_state_to_be
#import matplotlib.pyplot as plt
#import seaborn as sns
import streamlit as st
import base64
import plotly.express as px
from PIL import Image
import plotly.... | {"/app.py": ["/home.py", "/stock_trends.py", "/stock_analysis.py", "/crypto.py", "/option_chain_activity.py"], "/functions.py.py": ["/home.py", "/stock_trends.py", "/stock_analysis.py"]} |
31,764 | webclinic017/streamlit-stock-analysis | refs/heads/main | /option_chain_activity.py | import pandas as pd
import numpy as np
from pandas import json_normalize
import json
#from selenium.webdriver.support.expected_conditions import element_selection_state_to_be
#import matplotlib.pyplot as plt
#import seaborn as sns
import streamlit as st
import base64
import plotly.express as px
from PIL import Image
im... | {"/app.py": ["/home.py", "/stock_trends.py", "/stock_analysis.py", "/crypto.py", "/option_chain_activity.py"], "/functions.py.py": ["/home.py", "/stock_trends.py", "/stock_analysis.py"]} |
31,765 | webclinic017/streamlit-stock-analysis | refs/heads/main | /functions.py.py | import streamlit as st
import base64
from PIL import Image
## web crawling packages
import time
from datetime import date
from datetime import datetime
import datetime
import requests
from lxml import html
import csv
import home
import stock_trends
import stock_analysis
PAGES = {
"Home": home,
"Stock Analysi... | {"/app.py": ["/home.py", "/stock_trends.py", "/stock_analysis.py", "/crypto.py", "/option_chain_activity.py"], "/functions.py.py": ["/home.py", "/stock_trends.py", "/stock_analysis.py"]} |
31,766 | webclinic017/streamlit-stock-analysis | refs/heads/main | /crypto.py | import pandas as pd
import numpy as np
from pandas import json_normalize
#from selenium.webdriver.support.expected_conditions import element_selection_state_to_be
#import matplotlib.pyplot as plt
#import seaborn as sns
import streamlit as st
import base64
import plotly.express as px
from PIL import Image
import plotly.... | {"/app.py": ["/home.py", "/stock_trends.py", "/stock_analysis.py", "/crypto.py", "/option_chain_activity.py"], "/functions.py.py": ["/home.py", "/stock_trends.py", "/stock_analysis.py"]} |
31,767 | webclinic017/streamlit-stock-analysis | refs/heads/main | /get_stock_tickers.py | import requests
import time
import pandas as pd
import numpy as np
from lxml import html
import csv
from selenium import webdriver
from selenium.webdriver.common.keys import Keys
from selenium.webdriver.support.select import Select
"""
## This script is for scraping available stock tickers. Having a list available to ... | {"/app.py": ["/home.py", "/stock_trends.py", "/stock_analysis.py", "/crypto.py", "/option_chain_activity.py"], "/functions.py.py": ["/home.py", "/stock_trends.py", "/stock_analysis.py"]} |
31,783 | migueldelafuente1/taurus_runner | refs/heads/main | /src_taurus_runner/t_result.py | '''
Created on Jan 21, 2021
@author: Miguel
'''
from t_sources import Enum
# import pandas as pd
#===============================================================================
# OUTPUT RECOVER OF THE FILES
#===============================================================================
class ResultException(BaseExc... | {"/src_taurus_runner/t_runner.py": ["/src_taurus_runner/t_sources.py"], "/main.py": ["/src_taurus_runner/t_sources.py", "/src_taurus_runner/t_runner.py"]} |
31,784 | migueldelafuente1/taurus_runner | refs/heads/main | /src_taurus_runner/t_runner.py | '''
Created on Jan 7, 2021
@author: Miguel
'''
import os
import subprocess
import shutil
from src_taurus_runner.t_sources import InputSource, InteractionArgs, \
WaveFunctionArgs, IterationArgs, ConstrainsArgs, ParticleNumberArgs
from t_result import Result
class RunnerException(BaseException):
pass
class _... | {"/src_taurus_runner/t_runner.py": ["/src_taurus_runner/t_sources.py"], "/main.py": ["/src_taurus_runner/t_sources.py", "/src_taurus_runner/t_runner.py"]} |
31,785 | migueldelafuente1/taurus_runner | refs/heads/main | /src_taurus_runner/t_sources.py | '''
Created on Jan 3, 2021
@author: Miguel
'''
import inspect
class Enum(object):
@classmethod
def members(cls):
result = []
for i in inspect.getmembers(cls):
name = i[0]
value = i[1]
if not name.startswith('_'):
if not inspect... | {"/src_taurus_runner/t_runner.py": ["/src_taurus_runner/t_sources.py"], "/main.py": ["/src_taurus_runner/t_sources.py", "/src_taurus_runner/t_runner.py"]} |
31,786 | migueldelafuente1/taurus_runner | refs/heads/main | /main.py | '''
Created on Jan 3, 2021
@author: Miguel
'''
from src_taurus_runner.t_sources import InteractionArgs, WaveFunctionArgs, \
ParticleNumberArgs, IterationArgs, ConstrainsArgs, InputSource
from src_taurus_runner.t_runner import IsotopeRunner, ConstraintsRunner
from t_runner import SingleRunner
if __na... | {"/src_taurus_runner/t_runner.py": ["/src_taurus_runner/t_sources.py"], "/main.py": ["/src_taurus_runner/t_sources.py", "/src_taurus_runner/t_runner.py"]} |
31,794 | Rui-code/test-game | refs/heads/master | /asteroid.py | import pygame
import random
class Asteroid(pygame.sprite.Sprite):
def __init__(self, group):
super().__init__(group)
self.image = pygame.image.load('data2/asteroid.png').convert_alpha()
self.image = pygame.transform.scale(self.image, [70, 70])
self.rect = self.image.get_rect()
... | {"/main2.py": ["/asteroid.py", "/pink_ship.py", "/projectile.py"]} |
31,795 | Rui-code/test-game | refs/heads/master | /pink_ship.py | import pygame
class PinkShip(pygame.sprite.Sprite):
def __init__(self, group):
super().__init__(group)
self.image = pygame.image.load('data2/pink_ship.png').convert_alpha()
self.image = pygame.transform.scale(self.image, [80, 65])
self.rect = self.image.get_rect()
self.re... | {"/main2.py": ["/asteroid.py", "/pink_ship.py", "/projectile.py"]} |
31,796 | Rui-code/test-game | refs/heads/master | /projectile.py | import pygame
import random
class Projectile(pygame.sprite.Sprite):
def __init__(self, group):
super().__init__(group)
self.image = pygame.image.load('data2/projectile.png').convert_alpha()
self.image = pygame.transform.scale(self.image, [20, 20])
self.rect = self.image.get_rect()... | {"/main2.py": ["/asteroid.py", "/pink_ship.py", "/projectile.py"]} |
31,797 | Rui-code/test-game | refs/heads/master | /main2.py | import os
import sys
import pygame
import random
from asteroid import Asteroid
from pink_ship import PinkShip
from projectile import Projectile
dir_path = os.getcwd()
sys.path.append(dir_path)
if getattr(sys, 'frozen', False):
os.chdir(sys._MEIPASS)
pygame.init()
SCREEN_RES = [840, 480]
display = pygame.displa... | {"/main2.py": ["/asteroid.py", "/pink_ship.py", "/projectile.py"]} |
31,809 | Turbo-wang/tmw6102 | refs/heads/master | /utils/test_utils.py | from os import listdir
from os.path import isfile, join
import base64
import gzip
import sys
import numpy
import os
import random
import re
import pickle
# sys.path.append("../")
sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
import configs.config
# import lib.model_cnn
from collections i... | {"/utils/train_utils.py": ["/configs/config.py"]} |
31,810 | Turbo-wang/tmw6102 | refs/heads/master | /lib/wordVec.py | # -*- coding=utf-8 -*-
import numpy as np
from scipy.spatial.distance import cosine
def load_wordVec_mem(vector_file):
vector_dict = {}
with open(vector_file) as vector:
# wordslist = vector.readlines()
for word in vector:
tmp = word.split()
vector_dict[tmp[0]] = tmp[1:]... | {"/utils/train_utils.py": ["/configs/config.py"]} |
31,811 | Turbo-wang/tmw6102 | refs/heads/master | /utils/tmp.py | import re
re_obj = re.compile('((?<=http://)(\w+-?\w\\.?)+?(?=/))')
para_en_for_train = open('../data/para_for_train.en','w')
para_fr_for_train = open('../data/para_for_train.fr','w')
with open('../data/para.en') as para_en:
for line in para_en:
if re.search('http://', line):
continue
e... | {"/utils/train_utils.py": ["/configs/config.py"]} |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.