index
int64
repo_name
string
branch_name
string
path
string
content
string
import_graph
string
82,211
sif/CS4753
refs/heads/master
/aseph/lab1a/forms.py
# Sifer Aseph from django import forms from django.forms import ModelForm from django.forms import formset_factory from .models import Image class ImageForm(forms.ModelForm): """For reference: https://docs.djangoproject.com/en/1.10/ref/forms/fields/ ImageForm inherits from Django's Form. ImageForm class wi...
{"/aseph/lab1a/views.py": ["/aseph/lab1a/models.py", "/aseph/lab1a/forms.py"], "/aseph/lab1a/forms.py": ["/aseph/lab1a/models.py"]}
82,238
GarGarrison/calendar_service
refs/heads/master
/models.py
import sys,os path = os.path.join(os.getcwd(),"gen-py") sys.path.append(path) import calendar_service.ttypes as tt from sqlalchemy import Column, DateTime, String, Integer, Boolean, ForeignKey from sqlalchemy.ext.declarative import declarative_base Base = declarative_base() 'creator', 'deadline', 'description', '...
{"/controllers/ExtraWeekendController.py": ["/models.py"], "/controllers/EventController.py": ["/models.py"], "/controllers/TaskController.py": ["/models.py"], "/controllers/UserController.py": ["/models.py"], "/server.py": ["/models.py", "/controllers/UserController.py", "/controllers/EventController.py", "/controller...
82,239
GarGarrison/calendar_service
refs/heads/master
/controllers/ExtraWeekendController.py
from models import ExtraWeekend import calendar_service.ttypes as tt import json class ExtraController: def add_weekend(self, ew): extra = ExtraWeekend(ew) self.session.add(extra) self.session.commit() print("Processing extra weekend {0} {1}".format(ew.date, ew.weekend)) retu...
{"/controllers/ExtraWeekendController.py": ["/models.py"], "/controllers/EventController.py": ["/models.py"], "/controllers/TaskController.py": ["/models.py"], "/controllers/UserController.py": ["/models.py"], "/server.py": ["/models.py", "/controllers/UserController.py", "/controllers/EventController.py", "/controller...
82,240
GarGarrison/calendar_service
refs/heads/master
/controllers/EventController.py
from models import Event, User import calendar_service.ttypes as tt import json from sqlalchemy import func, extract import datetime as dt etypes = tt.EventType._VALUES_TO_NAMES class EventController: def add_event(self, entity): try: uids = [ uid for (uid,) in self.session.query(User.uid).all(...
{"/controllers/ExtraWeekendController.py": ["/models.py"], "/controllers/EventController.py": ["/models.py"], "/controllers/TaskController.py": ["/models.py"], "/controllers/UserController.py": ["/models.py"], "/server.py": ["/models.py", "/controllers/UserController.py", "/controllers/EventController.py", "/controller...
82,241
GarGarrison/calendar_service
refs/heads/master
/controllers/TaskController.py
from models import Task,User import calendar_service.ttypes as tt import json etypes = [ tt.TaskType.TASK, tt.TaskType.REMINDER ] priorities = [ tt.TaskPriority.HIGH, tt.TaskPriority.MID, tt.TaskPriority.LOW ] e...
{"/controllers/ExtraWeekendController.py": ["/models.py"], "/controllers/EventController.py": ["/models.py"], "/controllers/TaskController.py": ["/models.py"], "/controllers/UserController.py": ["/models.py"], "/server.py": ["/models.py", "/controllers/UserController.py", "/controllers/EventController.py", "/controller...
82,242
GarGarrison/calendar_service
refs/heads/master
/controllers/UserController.py
from models import User, Department, UserRole, UserGroup import calendar_service.ttypes as tt import json import datetime as dt from sqlalchemy import func uranks = tt.RankType._VALUES_TO_NAMES class UserController: def add_user(self, entity): if entity.uid == None: raise tt.InvalidValueException(1,...
{"/controllers/ExtraWeekendController.py": ["/models.py"], "/controllers/EventController.py": ["/models.py"], "/controllers/TaskController.py": ["/models.py"], "/controllers/UserController.py": ["/models.py"], "/server.py": ["/models.py", "/controllers/UserController.py", "/controllers/EventController.py", "/controller...
82,243
GarGarrison/calendar_service
refs/heads/master
/server.py
#!/usr/bin/env python3 import sys,os path = os.path.join(os.getcwd(),"gen-py") sys.path.append(path) from calendar_service import CalendarManager from thrift.transport import TSocket from thrift.transport import TTransport from thrift.protocol import TBinaryProtocol from thrift.server import TServer # from thrift.pr...
{"/controllers/ExtraWeekendController.py": ["/models.py"], "/controllers/EventController.py": ["/models.py"], "/controllers/TaskController.py": ["/models.py"], "/controllers/UserController.py": ["/models.py"], "/server.py": ["/models.py", "/controllers/UserController.py", "/controllers/EventController.py", "/controller...
82,244
GarGarrison/calendar_service
refs/heads/master
/client.py
import sys,os path = os.path.join(os.getcwd(),"gen-py") sys.path.append(path) from calendar_service import CalendarManager import calendar_service.ttypes as tt from thrift.transport import THttpClient from thrift.protocol import TJSONProtocol from thrift.transport import TSocket from thrift.protocol import TBinaryP...
{"/controllers/ExtraWeekendController.py": ["/models.py"], "/controllers/EventController.py": ["/models.py"], "/controllers/TaskController.py": ["/models.py"], "/controllers/UserController.py": ["/models.py"], "/server.py": ["/models.py", "/controllers/UserController.py", "/controllers/EventController.py", "/controller...
82,261
rahulsingh4040/myshortner4040
refs/heads/master
/shortener/migrations/0005_auto_20190104_1114.py
# Generated by Django 2.1.1 on 2019-01-04 11:14 from django.db import migrations, models import shortener.validators class Migration(migrations.Migration): dependencies = [ ('shortener', '0004_auto_20190103_1515'), ] operations = [ migrations.AlterField( model_name='kirrurl'...
{"/shortener/migrations/0005_auto_20190104_1114.py": ["/shortener/validators.py"], "/shortener/views.py": ["/shortener/models.py"], "/shortener/models.py": ["/shortener/validators.py"]}
82,262
rahulsingh4040/myshortner4040
refs/heads/master
/shortener/views.py
from django.shortcuts import render, get_object_or_404 from django.http import HttpResponse, HttpResponseRedirect from django.views import View from .models import KirrURL from .forms import SubmitUrlForm class HomeView(View): def get(self, request, *args, **kwargs): the_form = SubmitUrlForm() context = { "ti...
{"/shortener/migrations/0005_auto_20190104_1114.py": ["/shortener/validators.py"], "/shortener/views.py": ["/shortener/models.py"], "/shortener/models.py": ["/shortener/validators.py"]}
82,263
rahulsingh4040/myshortner4040
refs/heads/master
/shortener/validators.py
from django.core.validators import URLValidator from django.core.exceptions import ValidationError def validate_url(value): url_validator = URLValidator() value_1_invalid = False value_2_invalid = False try: url_validator(value) except: value_1_invalid = True value_2_url = "http://" + value try: url_...
{"/shortener/migrations/0005_auto_20190104_1114.py": ["/shortener/validators.py"], "/shortener/views.py": ["/shortener/models.py"], "/shortener/models.py": ["/shortener/validators.py"]}
82,264
rahulsingh4040/myshortner4040
refs/heads/master
/shortener/hosts.py
from django.conf import settings from django_hosts import patterns, host #from shortener.hostsconf import urls as redirect_urls host_patterns = patterns('', host(r'myshortner4040.herokuapp.com', settings.ROOT_URLCONF, name='www'), # host(r'(?!www).*', 'shortener.hostsconf.urls', name='wildcard'), )
{"/shortener/migrations/0005_auto_20190104_1114.py": ["/shortener/validators.py"], "/shortener/views.py": ["/shortener/models.py"], "/shortener/models.py": ["/shortener/validators.py"]}
82,265
rahulsingh4040/myshortner4040
refs/heads/master
/shortener/models.py
from django.db import models from .utils import create_shortcode from django.conf import settings from .validators import validate_url from django_hosts.resolvers import reverse SHORTCODE_MAX = getattr(settings, "SHORTCODE_MAX", 15) # Create your models here. class KirrURL(models.Model): url = models.CharField(max_l...
{"/shortener/migrations/0005_auto_20190104_1114.py": ["/shortener/validators.py"], "/shortener/views.py": ["/shortener/models.py"], "/shortener/models.py": ["/shortener/validators.py"]}
82,266
rahulsingh4040/myshortner4040
refs/heads/master
/Scripts/django-admin.py
#!c:\users\rahul_singh\envs\myshortner4040\scripts\python.exe from django.core import management if __name__ == "__main__": management.execute_from_command_line()
{"/shortener/migrations/0005_auto_20190104_1114.py": ["/shortener/validators.py"], "/shortener/views.py": ["/shortener/models.py"], "/shortener/models.py": ["/shortener/validators.py"]}
82,283
CodeLabClub/hello-pie
refs/heads/master
/start.py
import socket import time import pigpio as pigpio import paho.mqtt.client as mqtt import json from devices.IRProximitySensorFC51 import IRProximitySensorFC51 from devices.LED import LED from devices.MotorDriverTB6612FNG import MotorDriverTB6612FNG, MotorSelection, FNGMotor from devices.PortExpanderMCP23017 import Port...
{"/start.py": ["/devices/StepperDriverULN2003.py"]}
82,284
CodeLabClub/hello-pie
refs/heads/master
/devices/StepperDriverULN2003.py
import time import pigpio from devices.AbstractGPIO import AbstractGPIO class StepperDriverULN2003: pi: pigpio.pi = None enable_pin = 5 coil_A_1_pin = None # IN2 coil_A_2_pin = None # IN4 coil_B_1_pin = None # IN1 coil_B_2_pin = None # IN3 step_count = 8 seq = [0, 0, 0, 0, 0, 0...
{"/start.py": ["/devices/StepperDriverULN2003.py"]}
82,287
lengmoXXL/page_query
refs/heads/main
/tests/test_manual_http_urls.py
import requests from page_query.rule.manual_http_urls import ManualHttpUrls def test_download_www_baidu_com(): urls = ['https://pie.dev/get'] for url in urls: r = requests.get(url) assert r.status_code == 200 def test_manual_http_urls_rule_www_baidu_com(): rule = ManualHttpUrls('www_bai...
{"/tests/test_manual_http_urls.py": ["/page_query/rule/manual_http_urls.py"], "/tests/test_manual_http_urls_glob_md.py": ["/page_query/rule/manual_http_urls_glob_md.py"], "/page_query/main.py": ["/page_query/rule/manual_http_urls.py", "/page_query/rule/manual_file_urls.py", "/page_query/rule/manual_http_urls_glob_md.py...
82,288
lengmoXXL/page_query
refs/heads/main
/tests/test_manual_http_urls_glob_md.py
from pathlib import Path from page_query.rule.manual_http_urls_glob_md import ManualHttpUrlsGlobMarkdown def test_manual_http_urls_glob_md(tmp_path: Path): example_file = tmp_path / 'a_b_c.md' example_file.write_text('\n'.join([ "```yaml", "tags: [a]", "http_urls:", "- https://...
{"/tests/test_manual_http_urls.py": ["/page_query/rule/manual_http_urls.py"], "/tests/test_manual_http_urls_glob_md.py": ["/page_query/rule/manual_http_urls_glob_md.py"], "/page_query/main.py": ["/page_query/rule/manual_http_urls.py", "/page_query/rule/manual_file_urls.py", "/page_query/rule/manual_http_urls_glob_md.py...
82,289
lengmoXXL/page_query
refs/heads/main
/page_query/main.py
#!python3 import logging import yaml import click from typing import List from pathlib import Path from elasticsearch import Elasticsearch from rich.console import Console from rich.text import Text from rich.table import Table, Column from rich import box from rich.progress import track from page_query.rule.manual...
{"/tests/test_manual_http_urls.py": ["/page_query/rule/manual_http_urls.py"], "/tests/test_manual_http_urls_glob_md.py": ["/page_query/rule/manual_http_urls_glob_md.py"], "/page_query/main.py": ["/page_query/rule/manual_http_urls.py", "/page_query/rule/manual_file_urls.py", "/page_query/rule/manual_http_urls_glob_md.py...
82,290
lengmoXXL/page_query
refs/heads/main
/tests/v_0_1_0/test_yaml_parser.py
import yaml def test_yaml_safe_load_example(): text = '\n'.join([ 'elasticsearch_url: "http://localhost:9200"', 'rules:', ' - type: manual_http_urls', ' title: www_baidu_com', ' tags: []', ' summary: the baidu website', ' http_urls: ["https:...
{"/tests/test_manual_http_urls.py": ["/page_query/rule/manual_http_urls.py"], "/tests/test_manual_http_urls_glob_md.py": ["/page_query/rule/manual_http_urls_glob_md.py"], "/page_query/main.py": ["/page_query/rule/manual_http_urls.py", "/page_query/rule/manual_file_urls.py", "/page_query/rule/manual_http_urls_glob_md.py...
82,291
lengmoXXL/page_query
refs/heads/main
/page_query/rule/manual_http_urls_glob_md.py
import glob import logging import re import requests import yaml import hashlib from pathlib import Path from typing import Dict, List class ManualHttpUrlsGlobMarkdown: file_name_validator = re.compile('([a-zA-Z0-9]+)(_([a-zA-Z0-9]+))*[.]md') meta_begin_mark = '```yaml' meta_end_mark = '```' def __...
{"/tests/test_manual_http_urls.py": ["/page_query/rule/manual_http_urls.py"], "/tests/test_manual_http_urls_glob_md.py": ["/page_query/rule/manual_http_urls_glob_md.py"], "/page_query/main.py": ["/page_query/rule/manual_http_urls.py", "/page_query/rule/manual_file_urls.py", "/page_query/rule/manual_http_urls_glob_md.py...
82,292
lengmoXXL/page_query
refs/heads/main
/tests/test_manual_file_urls.py
from pathlib import Path from page_query.rule.manual_file_urls import ManualFileUrls def test_load_example_file(tmp_path): example_path = tmp_path / 'example' example_path.write_bytes(b'abc\ncde\n') assert example_path.read_bytes() == b'abc\ncde\n' def test_manual_file_urls_rule_example_file(tmp_path: ...
{"/tests/test_manual_http_urls.py": ["/page_query/rule/manual_http_urls.py"], "/tests/test_manual_http_urls_glob_md.py": ["/page_query/rule/manual_http_urls_glob_md.py"], "/page_query/main.py": ["/page_query/rule/manual_http_urls.py", "/page_query/rule/manual_file_urls.py", "/page_query/rule/manual_http_urls_glob_md.py...
82,293
lengmoXXL/page_query
refs/heads/main
/setup.py
from setuptools import setup, find_packages setup( name='page_query', version='0.1.5', description='collect, index and query pages from everywhere', author='amazinglzy', author_email='forlearn_lzy@163.com', packages=find_packages(), include_package_data=True, install_requires=[ ...
{"/tests/test_manual_http_urls.py": ["/page_query/rule/manual_http_urls.py"], "/tests/test_manual_http_urls_glob_md.py": ["/page_query/rule/manual_http_urls_glob_md.py"], "/page_query/main.py": ["/page_query/rule/manual_http_urls.py", "/page_query/rule/manual_file_urls.py", "/page_query/rule/manual_http_urls_glob_md.py...
82,294
lengmoXXL/page_query
refs/heads/main
/tests/v_0_1_1/test_table_view.py
from rich.console import COLOR_SYSTEMS, Console from rich.table import Table, Column def test_table_view(): table = Table( Column("Title", style='green'), Column("Tags"), Column("Summary"), Column("Urls"), ) table.add_row("grep process 混入了一个中文 with pid in linux"*5, "linux,...
{"/tests/test_manual_http_urls.py": ["/page_query/rule/manual_http_urls.py"], "/tests/test_manual_http_urls_glob_md.py": ["/page_query/rule/manual_http_urls_glob_md.py"], "/page_query/main.py": ["/page_query/rule/manual_http_urls.py", "/page_query/rule/manual_file_urls.py", "/page_query/rule/manual_http_urls_glob_md.py...
82,295
lengmoXXL/page_query
refs/heads/main
/tests/v_0_1_2/test_hash.py
import hashlib def test_hash_page(): page = { 'title': 'abc', 'tags': ['a', 'b'], 'summary': 'dsfke', 'urls': [ 'htt' ] } hv = hashlib.md5() hv.update(page['title'].encode('utf-8')) hv.update(('\n'.join(page['tags'])).encode('utf-8')) hv.upd...
{"/tests/test_manual_http_urls.py": ["/page_query/rule/manual_http_urls.py"], "/tests/test_manual_http_urls_glob_md.py": ["/page_query/rule/manual_http_urls_glob_md.py"], "/page_query/main.py": ["/page_query/rule/manual_http_urls.py", "/page_query/rule/manual_file_urls.py", "/page_query/rule/manual_http_urls_glob_md.py...
82,296
lengmoXXL/page_query
refs/heads/main
/tests/v_0_1_2/test_elasticsearch_index_with_key.py
from elasticsearch import Elasticsearch def test_index_elasticsearch(): es = Elasticsearch(hosts=['http://localhost:9200']) if not es.indices.exists(index='tldr-test'): es.indices.create(index='tldr-test') es.delete_by_query(index='tldr-test', body={'query': {'match_all': {}}}) r = es.index( ...
{"/tests/test_manual_http_urls.py": ["/page_query/rule/manual_http_urls.py"], "/tests/test_manual_http_urls_glob_md.py": ["/page_query/rule/manual_http_urls_glob_md.py"], "/page_query/main.py": ["/page_query/rule/manual_http_urls.py", "/page_query/rule/manual_file_urls.py", "/page_query/rule/manual_http_urls_glob_md.py...
82,297
lengmoXXL/page_query
refs/heads/main
/tests/v_0_1_1/test_glob_and_parse.py
import glob import re import yaml from pathlib import Path def test_glob_fiels(): files = glob.glob('docs/*.md') assert len(files) > 0, files def test_parse_file_name(): fn = 'grep_process_in_linux.md' pattern = re.compile('([a-zA-Z0-9]+)(_([a-zA-Z0-9]+))*[.]md') pattern.fullmatch(fn) asser...
{"/tests/test_manual_http_urls.py": ["/page_query/rule/manual_http_urls.py"], "/tests/test_manual_http_urls_glob_md.py": ["/page_query/rule/manual_http_urls_glob_md.py"], "/page_query/main.py": ["/page_query/rule/manual_http_urls.py", "/page_query/rule/manual_file_urls.py", "/page_query/rule/manual_http_urls_glob_md.py...
82,298
lengmoXXL/page_query
refs/heads/main
/page_query/rule/manual_file_urls.py
import hashlib import logging from typing import Dict, List from pathlib import Path class ManualFileUrls: def __init__(self, title: str, tags: List[str], summary: str, file_urls: List[str]) -> None: self._title = title self._tags = tags self._summary = summary ...
{"/tests/test_manual_http_urls.py": ["/page_query/rule/manual_http_urls.py"], "/tests/test_manual_http_urls_glob_md.py": ["/page_query/rule/manual_http_urls_glob_md.py"], "/page_query/main.py": ["/page_query/rule/manual_http_urls.py", "/page_query/rule/manual_file_urls.py", "/page_query/rule/manual_http_urls_glob_md.py...
82,299
lengmoXXL/page_query
refs/heads/main
/tests/v_0_1_0/test_elasticsearch_stub.py
from elasticsearch import Elasticsearch def test_index_elasticsearch(): es = Elasticsearch(hosts=['http://localhost:9200']) r = es.index( index='tldr', body={ 'title': 'python reverse list', 'tag': ['python'], 'summary': 'list(reversed(lst))', 'bo...
{"/tests/test_manual_http_urls.py": ["/page_query/rule/manual_http_urls.py"], "/tests/test_manual_http_urls_glob_md.py": ["/page_query/rule/manual_http_urls_glob_md.py"], "/page_query/main.py": ["/page_query/rule/manual_http_urls.py", "/page_query/rule/manual_file_urls.py", "/page_query/rule/manual_http_urls_glob_md.py...
82,300
lengmoXXL/page_query
refs/heads/main
/page_query/rule/manual_http_urls.py
import requests import logging import hashlib from typing import Dict, List class ManualHttpUrls: def __init__(self, title: str, tags: List[str], summary: str, http_urls: List[str]) -> None: self._title = title self._tags = tags self._summary = summary self...
{"/tests/test_manual_http_urls.py": ["/page_query/rule/manual_http_urls.py"], "/tests/test_manual_http_urls_glob_md.py": ["/page_query/rule/manual_http_urls_glob_md.py"], "/page_query/main.py": ["/page_query/rule/manual_http_urls.py", "/page_query/rule/manual_file_urls.py", "/page_query/rule/manual_http_urls_glob_md.py...
82,301
fagan2888/microconventions
refs/heads/master
/explanations/morton.py
from microconventions.zcurve_conventions import ZCurveConventions import numpy as np def show_morton_distribution(): """ Visually verify that zcurves are N(0,1) for the independent case """ zc = ZCurveConventions() import matplotlib.pyplot as plt from scipy.stats import probplot zs = list() for...
{"/explanations/morton.py": ["/microconventions/zcurve_conventions.py"], "/tests/test_conventions.py": ["/microconventions/conventions.py"], "/tests/test_horizon_conventions.py": ["/microconventions/horizon_conventions.py"], "/tests/test_stats_conventions.py": ["/microconventions/stats_conventions.py"], "/microconventi...
82,302
fagan2888/microconventions
refs/heads/master
/tests/test_conventions.py
from microconventions.conventions import MicroConventions from pprint import pprint def test_constructor(): mc = MicroConventions() for mandatory in ['min_balance','min_len','DELAYS']: assert mandatory in mc.__dict__ def test_stream_conventions(): mc = MicroConventions() assert mc.is_valid_na...
{"/explanations/morton.py": ["/microconventions/zcurve_conventions.py"], "/tests/test_conventions.py": ["/microconventions/conventions.py"], "/tests/test_horizon_conventions.py": ["/microconventions/horizon_conventions.py"], "/tests/test_stats_conventions.py": ["/microconventions/stats_conventions.py"], "/microconventi...
82,303
fagan2888/microconventions
refs/heads/master
/tests/test_horizon_conventions.py
from microconventions.horizon_conventions import HorizonConventions from microconventions import MicroConventions def test_horizon_names(): questions = [{'name': 'z1~cop.json', 'delay': 70} ] answers = [ '70::z1~cop.json' ] hc = HorizonConventions(delays=[70,310,910]) for q, a in zip(questions, answe...
{"/explanations/morton.py": ["/microconventions/zcurve_conventions.py"], "/tests/test_conventions.py": ["/microconventions/conventions.py"], "/tests/test_horizon_conventions.py": ["/microconventions/horizon_conventions.py"], "/tests/test_stats_conventions.py": ["/microconventions/stats_conventions.py"], "/microconventi...
82,304
fagan2888/microconventions
refs/heads/master
/tests/test_stats_conventions.py
from microconventions.stats_conventions import StatsConventions import numpy as np def test_cdf_invcdf(): normcdf = StatsConventions._normcdf_function() norminv = StatsConventions._norminv_function() for x in np.random.randn(100): x1 = norminv(normcdf(x)) assert abs(x-x1)<1e-4 def test_mea...
{"/explanations/morton.py": ["/microconventions/zcurve_conventions.py"], "/tests/test_conventions.py": ["/microconventions/conventions.py"], "/tests/test_horizon_conventions.py": ["/microconventions/horizon_conventions.py"], "/tests/test_stats_conventions.py": ["/microconventions/stats_conventions.py"], "/microconventi...
82,305
fagan2888/microconventions
refs/heads/master
/microconventions/zcurve_conventions.py
import pymorton, itertools, math from microconventions.type_conventions import List from microconventions.stats_conventions import StatsConventions class ZCurveConventions(): """ Conventions for projections R^2->R and R^3->R """ def __init__(self, **kwargs): super().__init__(**kwargs) def zcurve...
{"/explanations/morton.py": ["/microconventions/zcurve_conventions.py"], "/tests/test_conventions.py": ["/microconventions/conventions.py"], "/tests/test_horizon_conventions.py": ["/microconventions/horizon_conventions.py"], "/tests/test_stats_conventions.py": ["/microconventions/stats_conventions.py"], "/microconventi...
82,306
fagan2888/microconventions
refs/heads/master
/microconventions/type_conventions.py
from typing import List, Union, Any, Optional KeyList = List[Optional[str]] NameList = List[Optional[str]] Value = Union[str,int] ValueList = List[Optional[Value]] DelayList = List[Optional[int]]
{"/explanations/morton.py": ["/microconventions/zcurve_conventions.py"], "/tests/test_conventions.py": ["/microconventions/conventions.py"], "/tests/test_horizon_conventions.py": ["/microconventions/horizon_conventions.py"], "/tests/test_stats_conventions.py": ["/microconventions/stats_conventions.py"], "/microconventi...
82,307
fagan2888/microconventions
refs/heads/master
/microconventions/url_conventions.py
from pprint import pprint from getjson import getjson CONFIG_URL = 'http://config.microprediction.org/config.json' FAILOVER_CONFIG_URL = 'http://stableconfig.microprediction.org/config.json' API_URL = 'http://api.microprediction.org' FAILOVER_API_URL = 'http://stableapi.microprediction.org' de...
{"/explanations/morton.py": ["/microconventions/zcurve_conventions.py"], "/tests/test_conventions.py": ["/microconventions/conventions.py"], "/tests/test_horizon_conventions.py": ["/microconventions/horizon_conventions.py"], "/tests/test_stats_conventions.py": ["/microconventions/stats_conventions.py"], "/microconventi...
82,308
fagan2888/microconventions
refs/heads/master
/tests/test_leaderboard_conventions.py
from microconventions.leaderboard_conventions import LeaderboardConventions import datetime # Looking for leaderboards? def test_custom_leaderboard_names(): rc = LeaderboardConventions() questions = [ {'name':'z1~cop.json','sponsor':'big bird'}, {'name': 'z1~cop.json', 'sponsor': 'big bird',...
{"/explanations/morton.py": ["/microconventions/zcurve_conventions.py"], "/tests/test_conventions.py": ["/microconventions/conventions.py"], "/tests/test_horizon_conventions.py": ["/microconventions/horizon_conventions.py"], "/tests/test_stats_conventions.py": ["/microconventions/stats_conventions.py"], "/microconventi...
82,309
fagan2888/microconventions
refs/heads/master
/microconventions/stats_conventions.py
import numpy as np class StatsConventions(): # Statistics standard library introduced normal distribution but only in versions above 3.8 # This adds a tiny amount of backward compatability but note that scipy is not a formal dependency so some users # will need to install that of their own volition. Pytho...
{"/explanations/morton.py": ["/microconventions/zcurve_conventions.py"], "/tests/test_conventions.py": ["/microconventions/conventions.py"], "/tests/test_horizon_conventions.py": ["/microconventions/horizon_conventions.py"], "/tests/test_stats_conventions.py": ["/microconventions/stats_conventions.py"], "/microconventi...
82,310
fagan2888/microconventions
refs/heads/master
/microconventions/stream_conventions.py
import re, uuid from microconventions.misc_conventions import MiscConventions class StreamConventions(object): # Conventions for names of streams def __init__(self, **kwargs): super().__init__(**kwargs) @staticmethod def sep(): return '::' @staticmethod def is_plain_name(name...
{"/explanations/morton.py": ["/microconventions/zcurve_conventions.py"], "/tests/test_conventions.py": ["/microconventions/conventions.py"], "/tests/test_horizon_conventions.py": ["/microconventions/horizon_conventions.py"], "/tests/test_stats_conventions.py": ["/microconventions/stats_conventions.py"], "/microconventi...
82,311
fagan2888/microconventions
refs/heads/master
/microconventions/leaderboard_conventions.py
from microconventions.horizon_conventions import HorizonConventions from microconventions.sep_conventions import SepConventions class LeaderboardConventions(SepConventions): def __init__(self,**kwargs): super().__init__(**kwargs) self.LEADERBOARD = "leaderboard" + self.SEP self.CUSTOM_LEAD...
{"/explanations/morton.py": ["/microconventions/zcurve_conventions.py"], "/tests/test_conventions.py": ["/microconventions/conventions.py"], "/tests/test_horizon_conventions.py": ["/microconventions/horizon_conventions.py"], "/tests/test_stats_conventions.py": ["/microconventions/stats_conventions.py"], "/microconventi...
82,312
fagan2888/microconventions
refs/heads/master
/tests/test_stream_conventions.py
from microconventions.stream_conventions import StreamConventions def test_is_valid_name(): nc = StreamConventions() s = 'dog-7214.json' assert nc.is_valid_name(s), "oops" for s in ["25824ee3-d9bf-4923-9be7-19d6c2aafcee.json"]: assert nc.is_valid_name(s),"Got it wrong for "+s def test_its_t...
{"/explanations/morton.py": ["/microconventions/zcurve_conventions.py"], "/tests/test_conventions.py": ["/microconventions/conventions.py"], "/tests/test_horizon_conventions.py": ["/microconventions/horizon_conventions.py"], "/tests/test_stats_conventions.py": ["/microconventions/stats_conventions.py"], "/microconventi...
82,313
fagan2888/microconventions
refs/heads/master
/tests/test_key_conventions.py
from microconventions.key_conventions import KeyConventions def test__is_valid_key(): kc = KeyConventions() s = kc.create_key(difficulty=6) assert kc.is_valid_key(s), "Thought " + s +" should be valid." assert kc.is_valid_key("too short" )==False, "Thought " + s +" should be invalid"
{"/explanations/morton.py": ["/microconventions/zcurve_conventions.py"], "/tests/test_conventions.py": ["/microconventions/conventions.py"], "/tests/test_horizon_conventions.py": ["/microconventions/horizon_conventions.py"], "/tests/test_stats_conventions.py": ["/microconventions/stats_conventions.py"], "/microconventi...
82,314
fagan2888/microconventions
refs/heads/master
/microconventions/value_conventions.py
import json, sys # Conventions about published values class ValueConventions(object): def __init__(self, **kwargs): super().__init__(**kwargs) @staticmethod def is_scalar_value(value): try: fv = float(value) return True except: return False ...
{"/explanations/morton.py": ["/microconventions/zcurve_conventions.py"], "/tests/test_conventions.py": ["/microconventions/conventions.py"], "/tests/test_horizon_conventions.py": ["/microconventions/horizon_conventions.py"], "/tests/test_stats_conventions.py": ["/microconventions/stats_conventions.py"], "/microconventi...
82,315
fagan2888/microconventions
refs/heads/master
/tests/test_misc_conventions.py
from microconventions import MicroConventions def test_misc(): mc = MicroConventions() assert mc.DELAYED=='delayed::' assert mc.HISTORY=='history::' assert mc.BACKLINKS=='backlinks::' assert mc.LAGGED=='lagged::' assert mc.LAGGED_VALUES=='lagged_values::' assert mc.LAGGED_TIMES=='lagged_tim...
{"/explanations/morton.py": ["/microconventions/zcurve_conventions.py"], "/tests/test_conventions.py": ["/microconventions/conventions.py"], "/tests/test_horizon_conventions.py": ["/microconventions/horizon_conventions.py"], "/tests/test_stats_conventions.py": ["/microconventions/stats_conventions.py"], "/microconventi...
82,316
fagan2888/microconventions
refs/heads/master
/microconventions/conventions.py
from getjson import getjson from microconventions.stats_conventions import StatsConventions from microconventions.key_conventions import KeyConventions from microconventions.stream_conventions import StreamConventions from microconventions.leaderboard_conventions import LeaderboardConventions from microconventions.valu...
{"/explanations/morton.py": ["/microconventions/zcurve_conventions.py"], "/tests/test_conventions.py": ["/microconventions/conventions.py"], "/tests/test_horizon_conventions.py": ["/microconventions/horizon_conventions.py"], "/tests/test_stats_conventions.py": ["/microconventions/stats_conventions.py"], "/microconventi...
82,317
fagan2888/microconventions
refs/heads/master
/tests/test_sep_conventions.py
from microconventions.sep_conventions import SepConventions def test_i_am_writing_tests_while_watching_ozark(): conv = SepConventions() assert SepConventions.sep() == '::' assert conv.SEP == '::' assert SepConventions.tilde() == '~' assert conv.TILDE== '~'
{"/explanations/morton.py": ["/microconventions/zcurve_conventions.py"], "/tests/test_conventions.py": ["/microconventions/conventions.py"], "/tests/test_horizon_conventions.py": ["/microconventions/horizon_conventions.py"], "/tests/test_stats_conventions.py": ["/microconventions/stats_conventions.py"], "/microconventi...
82,318
fagan2888/microconventions
refs/heads/master
/microconventions/misc_conventions.py
from microconventions.sep_conventions import SepConventions class MiscConventions(SepConventions): def __init__(self, **kwargs): super().__init__(**kwargs) self.DELAYED = "delayed" + self.SEP self.CDF = 'cdf' + self.SEP self.LINKS = "links" + self.SEP self.BACKLINKS = "back...
{"/explanations/morton.py": ["/microconventions/zcurve_conventions.py"], "/tests/test_conventions.py": ["/microconventions/conventions.py"], "/tests/test_horizon_conventions.py": ["/microconventions/horizon_conventions.py"], "/tests/test_stats_conventions.py": ["/microconventions/stats_conventions.py"], "/microconventi...
82,319
fagan2888/microconventions
refs/heads/master
/microconventions/key_conventions.py
import muid, time from muid.mining import mine_once class KeyConventions(): """ Conventions for write_keys, which are Memorable Unique Identifiers (MUIDs) See www.muid.org for more information """ def __init__(self,**kwargs): super().__init__(**kwargs) @staticmethod def is_valid_key(key): ...
{"/explanations/morton.py": ["/microconventions/zcurve_conventions.py"], "/tests/test_conventions.py": ["/microconventions/conventions.py"], "/tests/test_horizon_conventions.py": ["/microconventions/horizon_conventions.py"], "/tests/test_stats_conventions.py": ["/microconventions/stats_conventions.py"], "/microconventi...
82,320
fagan2888/microconventions
refs/heads/master
/microconventions/horizon_conventions.py
from microconventions.type_conventions import List from microconventions.sep_conventions import SepConventions class HorizonConventions(SepConventions): def __init__(self,delays:List[int],**kwargs): super().__init__(**kwargs) self.DELAYS = delays @staticmethod def horizon_name(name, delay...
{"/explanations/morton.py": ["/microconventions/zcurve_conventions.py"], "/tests/test_conventions.py": ["/microconventions/conventions.py"], "/tests/test_horizon_conventions.py": ["/microconventions/horizon_conventions.py"], "/tests/test_stats_conventions.py": ["/microconventions/stats_conventions.py"], "/microconventi...
82,359
nowl/idledrones
refs/heads/master
/naming.py
from collections import defaultdict from random import random, randint def total_word(totals, word, chainlen=2): prev = None norm = word.strip().lower() for c in range(len(word) - chainlen): a = norm[c:c+chainlen] if prev: tot = totals[prev].get(a, 0) totals[prev][a]...
{"/resources.py": ["/events.py"], "/discoveries.py": ["/utils.py", "/name_prefix_suffix.py", "/events.py"], "/idrones.py": ["/mongo.py"]}
82,360
nowl/idledrones
refs/heads/master
/backend.py
from discoveries import run_discovery from resources import gen_resources from mongo import MongoInterface from datetime import datetime, timedelta from time import sleep from collections import defaultdict trades = defaultdict(lambda: 0) def reset_trades(): for key in trades: trades[key] = 0 def append_...
{"/resources.py": ["/events.py"], "/discoveries.py": ["/utils.py", "/name_prefix_suffix.py", "/events.py"], "/idrones.py": ["/mongo.py"]}
82,361
nowl/idledrones
refs/heads/master
/resources.py
from events import log_event from collections import defaultdict BASE_EXTRACTION = 10 def update_resources(disc, res): for typ, pot in disc.iteritems(): res[typ] += BASE_EXTRACTION * pot def gen_resources(mint, user): discoveries = mint.get_discoveries(user) new_resources = defaultdict(lambd...
{"/resources.py": ["/events.py"], "/discoveries.py": ["/utils.py", "/name_prefix_suffix.py", "/events.py"], "/idrones.py": ["/mongo.py"]}
82,362
nowl/idledrones
refs/heads/master
/utils.py
from random import random def check_roll(prob): return random() <= prob # choice stuff def make_pdf_from_choices(choices): # create factors factors = [] prev = choices[0][1] for c in choices[1:]: v = c[1] factors.append(float(v) / prev) prev = v def rec(factors, ...
{"/resources.py": ["/events.py"], "/discoveries.py": ["/utils.py", "/name_prefix_suffix.py", "/events.py"], "/idrones.py": ["/mongo.py"]}
82,363
nowl/idledrones
refs/heads/master
/mongo.py
from pymongo import Connection import datetime from functools import wraps def fail_safe(typ): def fail_safe_f(f): @wraps(f) def decorator(*args, **kwds): try: return f(*args, **kwds) except: return typ return decorator ret...
{"/resources.py": ["/events.py"], "/discoveries.py": ["/utils.py", "/name_prefix_suffix.py", "/events.py"], "/idrones.py": ["/mongo.py"]}
82,364
nowl/idledrones
refs/heads/master
/events.py
from datetime import datetime def trim_events(events): # TODO trim this based on time and number return events[0:50] def log_event(mint, user, event): events = mint.get_events(user) cur_time = datetime.utcnow() formatted_time = cur_time.strftime('%m/%d/%y %I:%M:%S %p') new_event = {'timestamp'...
{"/resources.py": ["/events.py"], "/discoveries.py": ["/utils.py", "/name_prefix_suffix.py", "/events.py"], "/idrones.py": ["/mongo.py"]}
82,365
nowl/idledrones
refs/heads/master
/discoveries.py
from utils import Choices, check_roll from random import random from name_prefix_suffix import get_name from events import log_event GLOBAL_DISCOVERY_CHANCE = 0.05 discovery_types = Choices(("system", 5), ("planet", 20), ("asteroid", 1), ("...
{"/resources.py": ["/events.py"], "/discoveries.py": ["/utils.py", "/name_prefix_suffix.py", "/events.py"], "/idrones.py": ["/mongo.py"]}
82,366
nowl/idledrones
refs/heads/master
/name_prefix_suffix.py
from random import randint prefixes = ['lo', 'tu', 'to', 'sm', 'aess', 'shun', 'eth', 'sma', 'ac', 'pla', 'as', 'pra', 'plak', 'ithe', 'klu', 'ofen', 'ish', 'aing', 'clex', 'ush', 'raish', 'it', 'daesh', 'ouff', 'kre', 'thi', 'er', 'ini', 'untuen', 'plol', 'gem', 'sh', 'kel', 'on', ...
{"/resources.py": ["/events.py"], "/discoveries.py": ["/utils.py", "/name_prefix_suffix.py", "/events.py"], "/idrones.py": ["/mongo.py"]}
82,367
nowl/idledrones
refs/heads/master
/idrones.py
from flask import Flask, request, session, g, redirect, url_for, \ abort, render_template, flash from mongo import MongoInterface from functools import wraps import urllib, urllib2, json app = Flask(__name__) BROWSER_ID_URL = "https://browserid.org/verify" LOCAL_SERVER = "http://localhost:5000" @app.before_r...
{"/resources.py": ["/events.py"], "/discoveries.py": ["/utils.py", "/name_prefix_suffix.py", "/events.py"], "/idrones.py": ["/mongo.py"]}
82,371
timonFuss/hs-rm-prog3
refs/heads/master
/dict.py
''' Created on 02.02.2018 @author: tfuss001 ''' dic = {'a':22,'b':42,'c':34,'d':112,} print(sorted(dic.items(),key = lambda x : x[1], reverse=False))
{"/Aufgabe40.py": ["/Aufgabe39.py"]}
82,372
timonFuss/hs-rm-prog3
refs/heads/master
/Aufgabe40.py
''' Created on 19.01.2018 @author: tfuss001 ''' from Aufgabe39 import Messwerte class Messreihe: def __init__(self, value=None): lst = [] for line in value: if line not in lst: lst.append(line) a = Messreihe(open('./messwerte.csv',"r"))
{"/Aufgabe40.py": ["/Aufgabe39.py"]}
82,373
timonFuss/hs-rm-prog3
refs/heads/master
/test.py
''' Created on 02.02.2018 @author: tfuss001 ''' from operator import itemgetter import collections def statistiken(dateiname): lines = [] dic = {} bool = False with open(dateiname) as file: lines = [line.strip().split(";") for line in file] lines.sort(key = lambda x : x[1]) pr...
{"/Aufgabe40.py": ["/Aufgabe39.py"]}
82,374
timonFuss/hs-rm-prog3
refs/heads/master
/Aufgabe33.py
''' Created on 22.12.2017 @author: tfuss001 ''' #i. print([ele*ele*ele for ele in range(1,11) if ele%2==0]) print(list(filter(lambda x: x%2==0,map(lambda x: x*x*x,range(1,11))))) #ii. zahl = 123 print([ele for ele in range(2,zahl) if zahl % ele == 0]) print(list(filter(lambda x: zahl%x == 0 ,map(lambda x: x,range...
{"/Aufgabe40.py": ["/Aufgabe39.py"]}
82,375
timonFuss/hs-rm-prog3
refs/heads/master
/folgen.py
''' Created on 01.02.2018 @author: tfuss001 ''' def lucasfolge(): vorher = 1 zweiVorher = 2 yield zweiVorher yield vorher aktuell = vorher + zweiVorher while True: yield aktuell aktuell, vorher, zweiVorher = aktuell+vorher, aktuell, vorher def pellfo...
{"/Aufgabe40.py": ["/Aufgabe39.py"]}
82,376
timonFuss/hs-rm-prog3
refs/heads/master
/validCSV.py
''' Created on 01.02.2018 @author: tfuss001 ''' import re class Syntaxfehler(Exception): pass class Spaltenfehler(Exception): pass def validCSV(filename = None): pattern = re.compile(r'^"[0-9]+","[a-zA-Z]+","[a-zA-Z]+"$') for line in filename: if not line.startswith("#"): line =...
{"/Aufgabe40.py": ["/Aufgabe39.py"]}
82,377
timonFuss/hs-rm-prog3
refs/heads/master
/Aufgabe36.py
''' Created on 22.12.2017 @author: tfuss001 ''' lis=[] #alle Maenner absteigend nach Wohnort sortiert print(sorted([splitted for splitted in [line.strip().split(";") for line in open("./a36-bonz.txt","r")] if splitted[0] == "Herr"],key=lambda x: x[3])) #die Summe aller Gehaelter aller Frauen print(sum([int(splitte...
{"/Aufgabe40.py": ["/Aufgabe39.py"]}
82,378
timonFuss/hs-rm-prog3
refs/heads/master
/Aufgabe47.py
''' Created on 25.01.2018 @author: tfuss001 ''' import re #Datum in der Form TT.MM.JJJJ, (Tag.Monat.Jahr) pattern = re.compile(r'[\d]{2}.[\d]{2}.[\d]{4}') match = pattern.match("25.01.2018") print(match.group()) #Euro-Betraege pattern = re.compile(r'([\d]{0,3}.)*,[\d]{2}( EUR)?') match = pattern.match("1.223,56 EU...
{"/Aufgabe40.py": ["/Aufgabe39.py"]}
82,379
timonFuss/hs-rm-prog3
refs/heads/master
/Aufgabe31.py
#!/usr/bin/env python ''' Created on 11.01.2018 @author: tfuss001 ''' import sys name = sys.argv[1] #Textzeilen ermittlen zeilen = 0 woerter = 0 buchstabe = 0 for line in open("./"+name,"r"): zeilen += 1 #Woerter ermitteln for word in line.split(" "): woerter += 1 #Buchstab...
{"/Aufgabe40.py": ["/Aufgabe39.py"]}
82,380
timonFuss/hs-rm-prog3
refs/heads/master
/Statistik.py
''' Created on 02.02.2018 @author: tfuss001 ''' def statistiken(dateiname): dic = {} bool = True with open(dateiname) as file: lines = [lines.strip().split(";") for lines in file] for line in lines: bool = True #wenn noch nicht im dic -> einfuegen if lin...
{"/Aufgabe40.py": ["/Aufgabe39.py"]}
82,381
timonFuss/hs-rm-prog3
refs/heads/master
/Aufgabe32.py
''' Created on 11.01.2018 @author: tfuss001 ''' def einlesen(): lst = [line.rstrip() for line in open("./a32-fahrzeiten.txt","r")] lst = list([ele.split(";") for ele in lst]) print(lst) def auskunft(linie, start, ziel): return 1 einlesen()
{"/Aufgabe40.py": ["/Aufgabe39.py"]}
82,382
timonFuss/hs-rm-prog3
refs/heads/master
/generatoren.py
''' Created on 01.02.2018 @author: tfuss001 ''' def werteGenerator(): x = 0 while True: yield x x = x + 1 def generatorMax(werteGenerator, anzahl): i = 0 while i < anzahl: yield next(werteGenerator) i += 1 def generatorSprung(werteGenerator, sprungliste): i = 0 ...
{"/Aufgabe40.py": ["/Aufgabe39.py"]}
82,383
timonFuss/hs-rm-prog3
refs/heads/master
/Aufgabe39.py
''' Created on 14.01.2018 @author: tfuss001 ''' class Messwerte(): zeitpunkt = None temp = None def __init__(self, *value): if len(value) == 1: liste = value[0].split(",") self.zeitpunkt = liste[0][1:-1] self.temp = float(liste[1]) else: ...
{"/Aufgabe40.py": ["/Aufgabe39.py"]}
82,384
timonFuss/hs-rm-prog3
refs/heads/master
/Aufgabe34.py
''' Created on 11.01.2018 @author: tfuss001 ''' wird = "irjmnzltacogdeksvbphxqyuwf" aus = list(map(chr, range(97,123))) wird = list(wird) import sys #name = sys.argv[1] print([[word for word in line.split()] for line in open("./hotzenplotz.txt","r")])
{"/Aufgabe40.py": ["/Aufgabe39.py"]}
82,385
timonFuss/hs-rm-prog3
refs/heads/master
/Aufgabe30.py
''' Created on 15.12.2017 @author: tfuss001 ''' def ggTr(a,b): if a==b: return a else: if a>b: return ggT(a-b,b) else : return ggT(b-a,a) def ggT(x, y): while x > 0 and y > 0: if x >= y: x = x - y else: y = y - x ...
{"/Aufgabe40.py": ["/Aufgabe39.py"]}
82,386
timonFuss/hs-rm-prog3
refs/heads/master
/Aufgabe27.py
''' Created on 11.01.2018 @author: tfuss001 ''' def dreh(lst): if len(lst) == 1: return lst else: print(str(lst[1:]) + "+" + str(lst[0])) return dreh(lst[1:]) +[lst[0]] lst=[1,2,3,4,5] print(dreh(lst))
{"/Aufgabe40.py": ["/Aufgabe39.py"]}
82,387
timonFuss/hs-rm-prog3
refs/heads/master
/Aufgabe38.py
''' Created on 14.01.2018 @author: tfuss001 ''' import itertools #print(list(itertools.permutations([1,2,3,4]))) def permutationen(seq): if len(seq) <=1: yield seq else: for perm in permutationen(seq[1:]): for i in range(len(seq)): yield perm[:i] + seq[0:1] + pe...
{"/Aufgabe40.py": ["/Aufgabe39.py"]}
82,401
jironghuang/risk_parity
refs/heads/main
/risk_parity_class.py
#!/usr/bin/env python3 # -*- coding: utf-8 -*- """ Created on Tue Jan 5 12:35:14 2021 @author: jirong """ import riskparityportfolio as rp import numpy as np import pandas as pd import yfinance as yf import functools import re import pyfolio import sys import util as ut #User-defined function def risk_parity_weight...
{"/risk_parity_class.py": ["/util.py"], "/risk_parity_sensitivity_forecasts.py": ["/util.py", "/risk_parity_class.py"]}
82,402
jironghuang/risk_parity
refs/heads/main
/util.py
import datetime as dt import pandas as pd import numpy as np from pandas.tseries.holiday import USFederalHolidayCalendar from datetime import datetime import yfinance as yf import re import matplotlib.pyplot as plt import os import socket def get_first_business_day_ofmonth(start_date = '2015-01-01', end_date = '2021-1...
{"/risk_parity_class.py": ["/util.py"], "/risk_parity_sensitivity_forecasts.py": ["/util.py", "/risk_parity_class.py"]}
82,403
jironghuang/risk_parity
refs/heads/main
/risk_parity_sensitivity_forecasts.py
#!/usr/bin/env python3 # -*- coding: utf-8 -*- """ Created on Wed Jan 6 17:36:38 2021 @author: jirong """ import util as ut import risk_parity_class as risk import pandas as pd import numpy as np import pyfolio import seaborn as sns import matplotlib.pyplot as plt import matp...
{"/risk_parity_class.py": ["/util.py"], "/risk_parity_sensitivity_forecasts.py": ["/util.py", "/risk_parity_class.py"]}
82,416
TEDmk/TradingDataProvider
refs/heads/master
/trading_data_provider/providers/provider.py
import abc from datetime import datetime, timedelta class Provider: def __init__(self, ) -> None: self.id = None self.name = None @abc.abstractmethod def get_historical_candles( self, trade_pair: str, start_date: datetime, end_date: datetime, delta...
{"/trading_data_provider/models/candle.py": ["/trading_data_provider/models/provider.py"], "/trading_data_provider/models/provider.py": ["/trading_data_provider/providers/provider.py"], "/trading_data_provider/models/__init__.py": ["/trading_data_provider/models/provider.py", "/trading_data_provider/models/candle.py"]}
82,417
TEDmk/TradingDataProvider
refs/heads/master
/trading_data_provider/models/candle.py
from sqlalchemy import ( Table, Column, ForeignKey, PrimaryKeyConstraint, ) from sqlalchemy.types import DateTime, Float from sqlalchemy.orm import mapper, relationship from dataclasses import dataclass from datetime import datetime from trading_data_provider.models.provider import Provider from trading...
{"/trading_data_provider/models/candle.py": ["/trading_data_provider/models/provider.py"], "/trading_data_provider/models/provider.py": ["/trading_data_provider/providers/provider.py"], "/trading_data_provider/models/__init__.py": ["/trading_data_provider/models/provider.py", "/trading_data_provider/models/candle.py"]}
82,418
TEDmk/TradingDataProvider
refs/heads/master
/setup.py
import os from setuptools import setup here = os.path.abspath(os.path.dirname(__file__)) requires = [] tests_require = ["pytest", "pycov", "mypy"] dev_require = ["flake8", "black"] setup( name="TradingDataProvider", version="0.1.0", description="Get trading data", packages=["trading_data_provider"]...
{"/trading_data_provider/models/candle.py": ["/trading_data_provider/models/provider.py"], "/trading_data_provider/models/provider.py": ["/trading_data_provider/providers/provider.py"], "/trading_data_provider/models/__init__.py": ["/trading_data_provider/models/provider.py", "/trading_data_provider/models/candle.py"]}
82,419
TEDmk/TradingDataProvider
refs/heads/master
/trading_data_provider/models/provider.py
from sqlalchemy import ( Table, Column, ForeignKey, PrimaryKeyConstraint, ) from sqlalchemy.orm import mapper from sqlalchemy.types import String from dataclasses import dataclass import uuid from trading_data_provider.models.type import GUID from trading_data_provider.providers.provider import Provider...
{"/trading_data_provider/models/candle.py": ["/trading_data_provider/models/provider.py"], "/trading_data_provider/models/provider.py": ["/trading_data_provider/providers/provider.py"], "/trading_data_provider/models/__init__.py": ["/trading_data_provider/models/provider.py", "/trading_data_provider/models/candle.py"]}
82,420
TEDmk/TradingDataProvider
refs/heads/master
/alembic/versions/d5a0ab2f898d_initial.py
"""initial Revision ID: d5a0ab2f898d Revises: Create Date: 2020-05-30 00:16:04.225937 """ from alembic import op import sqlalchemy as sa import trading_data_provider # revision identifiers, used by Alembic. revision = 'd5a0ab2f898d' down_revision = None branch_labels = None depends_on = None def upgrade(): # ...
{"/trading_data_provider/models/candle.py": ["/trading_data_provider/models/provider.py"], "/trading_data_provider/models/provider.py": ["/trading_data_provider/providers/provider.py"], "/trading_data_provider/models/__init__.py": ["/trading_data_provider/models/provider.py", "/trading_data_provider/models/candle.py"]}
82,421
TEDmk/TradingDataProvider
refs/heads/master
/trading_data_provider/models/__init__.py
from trading_data_provider.models.provider import provider_table from trading_data_provider.models.candle import candle_table
{"/trading_data_provider/models/candle.py": ["/trading_data_provider/models/provider.py"], "/trading_data_provider/models/provider.py": ["/trading_data_provider/providers/provider.py"], "/trading_data_provider/models/__init__.py": ["/trading_data_provider/models/provider.py", "/trading_data_provider/models/candle.py"]}
82,439
jramosss/spotify-playlist-downloader
refs/heads/master
/classes/youtube.py
from __future__ import unicode_literals import youtube_dl as ytdl from youtubesearchpython import VideosSearch from pprint import pprint from utils.utils import print_in_green, print_in_red class YoutubeUtils: def isChosen(self, strr: str): strr = strr.lower() wanted_words = ['lyrics', 'letra'] ...
{"/classes/youtube.py": ["/utils/utils.py"], "/classes/spotify.py": ["/utils/utils.py"], "/main.py": ["/classes/spotify.py", "/classes/youtube.py", "/utils/utils.py"]}
82,440
jramosss/spotify-playlist-downloader
refs/heads/master
/classes/spotify.py
from utils.utils import print_in_red import spotipy from spotipy.oauth2 import SpotifyClientCredentials from os import environ from dotenv import load_dotenv import spotify_uri from re import search from os import listdir FILES = listdir('.') if '.env' in FILES: load_dotenv('./.env') CLIENT_ID = environ["SPOTIPY_...
{"/classes/youtube.py": ["/utils/utils.py"], "/classes/spotify.py": ["/utils/utils.py"], "/main.py": ["/classes/spotify.py", "/classes/youtube.py", "/utils/utils.py"]}
82,441
jramosss/spotify-playlist-downloader
refs/heads/master
/main.py
from classes.spotify import SpotifyUtils from classes.youtube import YoutubeUtils from os import system from os.path import isdir from platform import system as psystem from optparse import OptionParser from utils.utils import print_in_green, print_in_red # https://open.spotify.com/playlist/7vmhdvmFLeEs6gNoUg1dmF?si=c...
{"/classes/youtube.py": ["/utils/utils.py"], "/classes/spotify.py": ["/utils/utils.py"], "/main.py": ["/classes/spotify.py", "/classes/youtube.py", "/utils/utils.py"]}
82,442
jramosss/spotify-playlist-downloader
refs/heads/master
/utils/utils.py
RED = '\033[91m' GREEN = '\033[92m' CLEAN = '\033[39m' def clean(): print(CLEAN) def print_in_red(msg): print(RED + msg) clean() def print_in_green(msg): print(GREEN + msg) clean()
{"/classes/youtube.py": ["/utils/utils.py"], "/classes/spotify.py": ["/utils/utils.py"], "/main.py": ["/classes/spotify.py", "/classes/youtube.py", "/utils/utils.py"]}
82,459
kennydude/Search-Engine
refs/heads/master
/sources/videos.py
from engine import getJson, shorten import config, magic, urllib, config def youtube(q_query, raw_query, page): config.result_class = ' thumbnails' results = [] s = ((page-1)*12) + 1 j = getJson('https://gdata.youtube.com/feeds/api/videos?alt=json&q=%s&start-index=%i&max-results=12' % (q_query, s)) for v in j['fe...
{"/sources/videos.py": ["/engine.py", "/magic.py"], "/sources/images.py": ["/engine.py", "/magic.py"], "/widget.py": ["/engine.py"], "/sources/__init__.py": ["/sources/web.py", "/sources/images.py", "/sources/music.py", "/sources/videos.py"], "/sources/music.py": ["/engine.py", "/magic.py"], "/magic.py": ["/engine.py"]...
82,460
kennydude/Search-Engine
refs/heads/master
/sources/images.py
from engine import getJson, shorten import config, magic, urllib, config header = ''' <h2> <button class='btn hider'> <i class="icon-chevron-down"></i> </button> Results from %s</h2> ''' __b58chars = '123456789abcdefghijkmnopqrstuvwxyzABCDEFGHJKLMNPQRSTUVWXYZ' __b58base = len(__b58chars) # let's not bother hard-codin...
{"/sources/videos.py": ["/engine.py", "/magic.py"], "/sources/images.py": ["/engine.py", "/magic.py"], "/widget.py": ["/engine.py"], "/sources/__init__.py": ["/sources/web.py", "/sources/images.py", "/sources/music.py", "/sources/videos.py"], "/sources/music.py": ["/engine.py", "/magic.py"], "/magic.py": ["/engine.py"]...
82,461
kennydude/Search-Engine
refs/heads/master
/internal_search.py
from whoosh.index import create_in, open_dir from whoosh.fields import * import os schema = Schema(title=TEXT(stored=True), link=TEXT(stored=True), official=BOOLEAN(stored=True), content=TEXT(stored=True), twitter=TEXT(stored=True), keywords=KEYWORD(stored=True,commas=True, lowercase=True) ) if 'REQUEST_ME...
{"/sources/videos.py": ["/engine.py", "/magic.py"], "/sources/images.py": ["/engine.py", "/magic.py"], "/widget.py": ["/engine.py"], "/sources/__init__.py": ["/sources/web.py", "/sources/images.py", "/sources/music.py", "/sources/videos.py"], "/sources/music.py": ["/engine.py", "/magic.py"], "/magic.py": ["/engine.py"]...
82,462
kennydude/Search-Engine
refs/heads/master
/widget.py
# Widgets for Search Front Page def revisionWidget(c): import json, random j = json.load(open("asset/revision.json", 'r')) return "<strong>Revision Byte:</strong><br/>%s" % random.choice(j) def websiteSnippetWidget(c): import engine j = engine.getBeatifulXML(c[0]) if len(c) == 3: w = c[2] else: w = "%s" x...
{"/sources/videos.py": ["/engine.py", "/magic.py"], "/sources/images.py": ["/engine.py", "/magic.py"], "/widget.py": ["/engine.py"], "/sources/__init__.py": ["/sources/web.py", "/sources/images.py", "/sources/music.py", "/sources/videos.py"], "/sources/music.py": ["/engine.py", "/magic.py"], "/magic.py": ["/engine.py"]...
82,463
kennydude/Search-Engine
refs/heads/master
/sources/__init__.py
''' Template def source(q_query, raw_query, page): return [] ''' import cgi source = cgi.FieldStorage().getvalue('source') if not source: sources = [ 'goodies', 'whoosh', 'ddg', 'localwiki', 'bing' ] else: from sources.web import * from sources.images import * from sources.music import * from sources.videos ...
{"/sources/videos.py": ["/engine.py", "/magic.py"], "/sources/images.py": ["/engine.py", "/magic.py"], "/widget.py": ["/engine.py"], "/sources/__init__.py": ["/sources/web.py", "/sources/images.py", "/sources/music.py", "/sources/videos.py"], "/sources/music.py": ["/engine.py", "/magic.py"], "/magic.py": ["/engine.py"]...
82,464
kennydude/Search-Engine
refs/heads/master
/sources/music.py
from engine import getJson, shorten, getBeatifulXML import config, magic, urllib, config, re def lastfm(q_query, raw_query, page): results = [] j = getJson("http://ws.audioscrobbler.com/2.0/?method=artist.search&artist=%s&api_key=%s&format=json&limit=3" % (q_query, config.lastfm_key)) if "artist" in j['results']['a...
{"/sources/videos.py": ["/engine.py", "/magic.py"], "/sources/images.py": ["/engine.py", "/magic.py"], "/widget.py": ["/engine.py"], "/sources/__init__.py": ["/sources/web.py", "/sources/images.py", "/sources/music.py", "/sources/videos.py"], "/sources/music.py": ["/engine.py", "/magic.py"], "/magic.py": ["/engine.py"]...
82,465
kennydude/Search-Engine
refs/heads/master
/magic.py
from engine import * def youtubeVideo(url, r): import urlparse u = urlparse.urlparse(url) v = urlparse.parse_qs(u.query)['v'][0] return { "url" : r['Url'], "display_url" : r['DisplayUrl'], "title" : r['Title'], "snippet" : '<iframe width="400" height="225" src="http://www.youtube.com/embed/%s"></iframe>' %...
{"/sources/videos.py": ["/engine.py", "/magic.py"], "/sources/images.py": ["/engine.py", "/magic.py"], "/widget.py": ["/engine.py"], "/sources/__init__.py": ["/sources/web.py", "/sources/images.py", "/sources/music.py", "/sources/videos.py"], "/sources/music.py": ["/engine.py", "/magic.py"], "/magic.py": ["/engine.py"]...
82,466
kennydude/Search-Engine
refs/heads/master
/hashbang.py
import os ua = os.environ['HTTP_USER_AGENT'].lower() if 'firefox' in ua: addons = 'https://addons.mozilla.org/en-US/firefox/search/?q=%s' ''' Information: "ddg" == becomes ==> !ddg Value can be string with %s for direct search-only Tuple for shortcut availability [0] = Direct no other words [1] = Search ''' r...
{"/sources/videos.py": ["/engine.py", "/magic.py"], "/sources/images.py": ["/engine.py", "/magic.py"], "/widget.py": ["/engine.py"], "/sources/__init__.py": ["/sources/web.py", "/sources/images.py", "/sources/music.py", "/sources/videos.py"], "/sources/music.py": ["/engine.py", "/magic.py"], "/magic.py": ["/engine.py"]...
82,467
kennydude/Search-Engine
refs/heads/master
/sources/web.py
from engine import getJson import config, magic, urllib def add_normal(r, results): results.append({ "url" : r['Url'], "display_url" : r['DisplayUrl'], "title" : r['Title'], "snippet" : r['Description'], "style" : "bing" }) debug_info = "" def set_debug_info(v): global debug_info debug_info = v def bin...
{"/sources/videos.py": ["/engine.py", "/magic.py"], "/sources/images.py": ["/engine.py", "/magic.py"], "/widget.py": ["/engine.py"], "/sources/__init__.py": ["/sources/web.py", "/sources/images.py", "/sources/music.py", "/sources/videos.py"], "/sources/music.py": ["/engine.py", "/magic.py"], "/magic.py": ["/engine.py"]...
82,468
kennydude/Search-Engine
refs/heads/master
/index.py
''' Create internal index ''' import glob, os.path, os, time import internal_search as search print ">> @kennydude Search Backend update script" print ">> Updates the backend. We're going to do that now" print "> Indexing..." writer = search.ix.writer() i = 0 for f in glob.glob("index/*.txt"): s = open(f, "r").rea...
{"/sources/videos.py": ["/engine.py", "/magic.py"], "/sources/images.py": ["/engine.py", "/magic.py"], "/widget.py": ["/engine.py"], "/sources/__init__.py": ["/sources/web.py", "/sources/images.py", "/sources/music.py", "/sources/videos.py"], "/sources/music.py": ["/engine.py", "/magic.py"], "/magic.py": ["/engine.py"]...
82,469
kennydude/Search-Engine
refs/heads/master
/engine.py
''' @kennydude Search Engine ''' import cgi, json, urllib2, sys, urllib, os.path, hashlib, time import StringIO debug_output = True from mako.template import Template from mako.lookup import TemplateLookup def join_bxml(x): o = '' for i in x: o += i.string return o def tplate(f, context): print get_tplate(f, ...
{"/sources/videos.py": ["/engine.py", "/magic.py"], "/sources/images.py": ["/engine.py", "/magic.py"], "/widget.py": ["/engine.py"], "/sources/__init__.py": ["/sources/web.py", "/sources/images.py", "/sources/music.py", "/sources/videos.py"], "/sources/music.py": ["/engine.py", "/magic.py"], "/magic.py": ["/engine.py"]...