index int64 | repo_name string | branch_name string | path string | content string | import_graph string |
|---|---|---|---|---|---|
29,259 | indifferentalex/botticelli | refs/heads/master | /examples/utilities_calibration.py | from context import botticelli
from botticelli import utilities as canvas
print(canvas.mouse_position())
# canvas.move_mouse_to(0.5, 0.5, canvas.banal_mouse) | {"/examples/calibration.py": ["/botticelli/utilities/__init__.py"], "/botticelli/__init__.py": ["/botticelli/scene.py", "/botticelli/action.py", "/botticelli/trigger.py"], "/examples/utilities_calibration.py": ["/botticelli/__init__.py"], "/botticelli/utilities/__init__.py": ["/botticelli/utilities/canvas.py"]} |
29,260 | indifferentalex/botticelli | refs/heads/master | /setup.py | from setuptools import setup
setup(name = 'botticelli',
version = '0.2',
description = 'A framework for building bots',
url = 'https://github.com/indifferentalex/botticelli',
author = 'indifferentalex',
author_email = 'indifferentalex@outlook.com',
license = 'MIT',
packages = ... | {"/examples/calibration.py": ["/botticelli/utilities/__init__.py"], "/botticelli/__init__.py": ["/botticelli/scene.py", "/botticelli/action.py", "/botticelli/trigger.py"], "/examples/utilities_calibration.py": ["/botticelli/__init__.py"], "/botticelli/utilities/__init__.py": ["/botticelli/utilities/canvas.py"]} |
29,261 | indifferentalex/botticelli | refs/heads/master | /botticelli/utilities/__init__.py | from .canvas import *
| {"/examples/calibration.py": ["/botticelli/utilities/__init__.py"], "/botticelli/__init__.py": ["/botticelli/scene.py", "/botticelli/action.py", "/botticelli/trigger.py"], "/examples/utilities_calibration.py": ["/botticelli/__init__.py"], "/botticelli/utilities/__init__.py": ["/botticelli/utilities/canvas.py"]} |
29,262 | indifferentalex/botticelli | refs/heads/master | /botticelli/utilities/canvas.py | """
The canvas is a utility module that provides a series of helper functions to
interact with the current workspace. Reader functions can be used to detect
what is going on (they work by considering the screen as a XY plane of RGB
values) and writer functions (simulating mouse and keyboard input).
"""
# reader librar... | {"/examples/calibration.py": ["/botticelli/utilities/__init__.py"], "/botticelli/__init__.py": ["/botticelli/scene.py", "/botticelli/action.py", "/botticelli/trigger.py"], "/examples/utilities_calibration.py": ["/botticelli/__init__.py"], "/botticelli/utilities/__init__.py": ["/botticelli/utilities/canvas.py"]} |
29,263 | indifferentalex/botticelli | refs/heads/master | /examples/getting_started.py | from context import botticelli
# write any routines to run
def dig(params):
params["depth"] += 1
print("hello world from depth " + str(params["depth"]))
return params
def climb(params):
print("goodbye world from depth " + str(params["depth"]))
params["depth"] -= 1
return params
# write scene detec... | {"/examples/calibration.py": ["/botticelli/utilities/__init__.py"], "/botticelli/__init__.py": ["/botticelli/scene.py", "/botticelli/action.py", "/botticelli/trigger.py"], "/examples/utilities_calibration.py": ["/botticelli/__init__.py"], "/botticelli/utilities/__init__.py": ["/botticelli/utilities/canvas.py"]} |
29,264 | indifferentalex/botticelli | refs/heads/master | /botticelli/action.py | import time
class Action:
"""
An action is initiliazed with a name, a routine, a wait for duration,
an array of triggers and a recovery action. The action is performed
by calling the perform function. Once the routine is run, the perform
function will loop for all triggers checking if any of their scenes
h... | {"/examples/calibration.py": ["/botticelli/utilities/__init__.py"], "/botticelli/__init__.py": ["/botticelli/scene.py", "/botticelli/action.py", "/botticelli/trigger.py"], "/examples/utilities_calibration.py": ["/botticelli/__init__.py"], "/botticelli/utilities/__init__.py": ["/botticelli/utilities/canvas.py"]} |
29,265 | indifferentalex/botticelli | refs/heads/master | /examples/detector_inspector.py | from context import botticelli
from botticelli.utilities import canvas
from botticelli.utilities import detector_inspector
# The detector inspector ignores params returned by the detectors,
# all cases should be written explicity
def detect_green(params):
return (canvas.color_present(
166,
... | {"/examples/calibration.py": ["/botticelli/utilities/__init__.py"], "/botticelli/__init__.py": ["/botticelli/scene.py", "/botticelli/action.py", "/botticelli/trigger.py"], "/examples/utilities_calibration.py": ["/botticelli/__init__.py"], "/botticelli/utilities/__init__.py": ["/botticelli/utilities/canvas.py"]} |
29,272 | viman39/summeraizer | refs/heads/master | /lib.py | import json
import re
from word_part_of_speech import get_part_of_speech, contains_date_or_time
import math
# array cu toate cuvintele irelevante pentru text ( sursa: https://github.com/stopwords-iso/stopwords-ro )
# in aceast array sunt incluse si pronumele si adverbele pentru a nu fi considerate de clasificatorul d... | {"/lib.py": ["/word_part_of_speech.py"], "/main.py": ["/lib.py"]} |
29,273 | viman39/summeraizer | refs/heads/master | /main.py | from information import text, percent
import nltk
import lib
from termcolor import colored
# impartim textul in propozitii
print("Tokenize...")
sentences = nltk.tokenize.sent_tokenize(text)
# calculam frecventa cuvintelor
print("Word frequency...")
word_frequency = lib.word_counter(text)
# calculam punctajele pentru... | {"/lib.py": ["/word_part_of_speech.py"], "/main.py": ["/lib.py"]} |
29,274 | viman39/summeraizer | refs/heads/master | /word_part_of_speech.py | import urllib.request
import re
import math
from arrays import months, days
# functie peuristica pentru determina daca un cuvant este verb sau substantiv
def get_part_of_speech(word):
word = word.lower().replace('ฤ', 'a').replace('รฎ', 'i').replace('ศ', 's').replace('ศ', 't').replace('รข', 'a')
# luam continut... | {"/lib.py": ["/word_part_of_speech.py"], "/main.py": ["/lib.py"]} |
29,275 | V3RS/musicflix | refs/heads/main | /app/models/list.py | from .db import db
List = db.Table('lists',
db.Column('profile_id', db.Integer,
db.ForeignKey('users.id')),
db.Column('music_video_id', db.Integer,
db.ForeignKey('music_videos.id')),
)
| {"/app/seeds/reviews.py": ["/app/models/__init__.py"], "/app/models/music_video.py": ["/app/models/list.py"], "/app/api/review_routes.py": ["/app/models/__init__.py"], "/app/api/list_routes.py": ["/app/models/__init__.py"], "/app/seeds/users.py": ["/app/models/__init__.py"], "/app/models/__init__.py": ["/app/models/mus... |
29,276 | V3RS/musicflix | refs/heads/main | /app/seeds/reviews.py | from app.models import db, Review
def seed_reviews():
for i in range(1, 64):
if i % 2 == 0:
rev1 = Review(comment="Taylor Swift could have done it better! Shoulda been Taylor. I love Taylor <3!",
rating=3, user_id=2, music_video_id=i)
rev2 = Review(commen... | {"/app/seeds/reviews.py": ["/app/models/__init__.py"], "/app/models/music_video.py": ["/app/models/list.py"], "/app/api/review_routes.py": ["/app/models/__init__.py"], "/app/api/list_routes.py": ["/app/models/__init__.py"], "/app/seeds/users.py": ["/app/models/__init__.py"], "/app/models/__init__.py": ["/app/models/mus... |
29,277 | V3RS/musicflix | refs/heads/main | /app/models/review.py | from .db import db
from sqlalchemy.orm import relationship
class Review(db.Model):
__tablename__ = 'reviews'
id = db.Column(db.Integer, primary_key=True)
comment = db.Column(db.Text, nullable=False)
rating = db.Column(db.Integer)
user_id = db.Column(db.Integer, db.ForeignKey('users.id'), nullabl... | {"/app/seeds/reviews.py": ["/app/models/__init__.py"], "/app/models/music_video.py": ["/app/models/list.py"], "/app/api/review_routes.py": ["/app/models/__init__.py"], "/app/api/list_routes.py": ["/app/models/__init__.py"], "/app/seeds/users.py": ["/app/models/__init__.py"], "/app/models/__init__.py": ["/app/models/mus... |
29,278 | V3RS/musicflix | refs/heads/main | /app/models/music_video.py | from .db import db
from sqlalchemy.orm import relationship
from .list import List
class MusicVideo(db.Model):
__tablename__ = 'music_videos'
id = db.Column(db.Integer, primary_key=True, nullable=False)
title = db.Column(db.String(255), nullable=False)
artist = db.Column(db.String, nullable=False)
... | {"/app/seeds/reviews.py": ["/app/models/__init__.py"], "/app/models/music_video.py": ["/app/models/list.py"], "/app/api/review_routes.py": ["/app/models/__init__.py"], "/app/api/list_routes.py": ["/app/models/__init__.py"], "/app/seeds/users.py": ["/app/models/__init__.py"], "/app/models/__init__.py": ["/app/models/mus... |
29,279 | V3RS/musicflix | refs/heads/main | /app/api/review_routes.py | from flask import Blueprint, jsonify, request
from flask_login import login_required
from app.models import Review, db, MusicVideo
from sqlalchemy import select
from app.forms import ReviewForm
review_routes = Blueprint('reviews', __name__)
@review_routes.route('/post', methods=['POST'])
def post_review():
form ... | {"/app/seeds/reviews.py": ["/app/models/__init__.py"], "/app/models/music_video.py": ["/app/models/list.py"], "/app/api/review_routes.py": ["/app/models/__init__.py"], "/app/api/list_routes.py": ["/app/models/__init__.py"], "/app/seeds/users.py": ["/app/models/__init__.py"], "/app/models/__init__.py": ["/app/models/mus... |
29,280 | V3RS/musicflix | refs/heads/main | /app/models/profile.py | from .db import db
from sqlalchemy.orm import relationship
class Profile(db.Model):
__tablename__ = 'profiles'
id = db.Column(db.Integer, primary_key=True)
name = db.Column(db.String, nullable=False)
picture = db.Column(db.String, nullable=False)
user_id = db.Column(db.Integer, db.ForeignKey('us... | {"/app/seeds/reviews.py": ["/app/models/__init__.py"], "/app/models/music_video.py": ["/app/models/list.py"], "/app/api/review_routes.py": ["/app/models/__init__.py"], "/app/api/list_routes.py": ["/app/models/__init__.py"], "/app/seeds/users.py": ["/app/models/__init__.py"], "/app/models/__init__.py": ["/app/models/mus... |
29,281 | V3RS/musicflix | refs/heads/main | /app/forms/review_form.py | from flask_wtf import FlaskForm
from wtforms import StringField, IntegerField
from wtforms.validators import DataRequired
class ReviewForm(FlaskForm):
comment = StringField('comment', validators=[DataRequired()])
rating = IntegerField('rating', validators=[DataRequired()])
music_video_id = IntegerField(
... | {"/app/seeds/reviews.py": ["/app/models/__init__.py"], "/app/models/music_video.py": ["/app/models/list.py"], "/app/api/review_routes.py": ["/app/models/__init__.py"], "/app/api/list_routes.py": ["/app/models/__init__.py"], "/app/seeds/users.py": ["/app/models/__init__.py"], "/app/models/__init__.py": ["/app/models/mus... |
29,282 | V3RS/musicflix | refs/heads/main | /app/api/list_routes.py |
from flask import Blueprint, jsonify, request
from flask_login import login_required
from app.models import User, MusicVideo, db
list_routes = Blueprint('list', __name__)
@list_routes.route('/get/<int:user_id>')
def get_list(user_id):
user_list = User.query.get(user_id).music_video.all()
return {"list": [mv... | {"/app/seeds/reviews.py": ["/app/models/__init__.py"], "/app/models/music_video.py": ["/app/models/list.py"], "/app/api/review_routes.py": ["/app/models/__init__.py"], "/app/api/list_routes.py": ["/app/models/__init__.py"], "/app/seeds/users.py": ["/app/models/__init__.py"], "/app/models/__init__.py": ["/app/models/mus... |
29,283 | V3RS/musicflix | refs/heads/main | /app/seeds/users.py | from werkzeug.security import generate_password_hash
from app.models import db, User
# Adds a demo user, you can add other users here if you want
def seed_users():
demo = User(username='Demo', email='demo@demo.com',
password='password')
hoose = User(username='Dr.Hoosey', email='drhoosey@hoos... | {"/app/seeds/reviews.py": ["/app/models/__init__.py"], "/app/models/music_video.py": ["/app/models/list.py"], "/app/api/review_routes.py": ["/app/models/__init__.py"], "/app/api/list_routes.py": ["/app/models/__init__.py"], "/app/seeds/users.py": ["/app/models/__init__.py"], "/app/models/__init__.py": ["/app/models/mus... |
29,284 | V3RS/musicflix | refs/heads/main | /app/models/__init__.py | from .db import db
from .user import User
from .music_video import MusicVideo
from .review import Review
from .list import List
| {"/app/seeds/reviews.py": ["/app/models/__init__.py"], "/app/models/music_video.py": ["/app/models/list.py"], "/app/api/review_routes.py": ["/app/models/__init__.py"], "/app/api/list_routes.py": ["/app/models/__init__.py"], "/app/seeds/users.py": ["/app/models/__init__.py"], "/app/models/__init__.py": ["/app/models/mus... |
29,285 | V3RS/musicflix | refs/heads/main | /app/api/mv_routes.py | from flask import Blueprint, jsonify, request
from app.models import MusicVideo
import random
mv_routes = Blueprint('music_videos', __name__)
@mv_routes.route('/')
def get_mvs():
all = MusicVideo.query.all()
pop = MusicVideo.query.filter_by(genre="Pop").all()
rap = MusicVideo.query.filter_by(genre="Rap")... | {"/app/seeds/reviews.py": ["/app/models/__init__.py"], "/app/models/music_video.py": ["/app/models/list.py"], "/app/api/review_routes.py": ["/app/models/__init__.py"], "/app/api/list_routes.py": ["/app/models/__init__.py"], "/app/seeds/users.py": ["/app/models/__init__.py"], "/app/models/__init__.py": ["/app/models/mus... |
29,286 | V3RS/musicflix | refs/heads/main | /app/seeds/music_videos.py | from app.models import db, MusicVideo
def seed_music_videos():
# 21 pop music videos
mvPop1 = MusicVideo(title="Earth", genre="Pop", artist="Lil Dicky", coverart="https://upload.wikimedia.org/wikipedia/en/7/73/Lil_Dicky_-_Earth.png",
video_url="https://www.youtube.com/watch?v=pvuN_WvF... | {"/app/seeds/reviews.py": ["/app/models/__init__.py"], "/app/models/music_video.py": ["/app/models/list.py"], "/app/api/review_routes.py": ["/app/models/__init__.py"], "/app/api/list_routes.py": ["/app/models/__init__.py"], "/app/seeds/users.py": ["/app/models/__init__.py"], "/app/models/__init__.py": ["/app/models/mus... |
29,287 | V3RS/musicflix | refs/heads/main | /migrations/versions/20210404_150056_.py | """empty message
Revision ID: fd930e908bf4
Revises:
Create Date: 2021-04-04 15:00:56.158468
"""
from alembic import op
import sqlalchemy as sa
# revision identifiers, used by Alembic.
revision = 'fd930e908bf4'
down_revision = None
branch_labels = None
depends_on = None
def upgrade():
# ### commands auto gene... | {"/app/seeds/reviews.py": ["/app/models/__init__.py"], "/app/models/music_video.py": ["/app/models/list.py"], "/app/api/review_routes.py": ["/app/models/__init__.py"], "/app/api/list_routes.py": ["/app/models/__init__.py"], "/app/seeds/users.py": ["/app/models/__init__.py"], "/app/models/__init__.py": ["/app/models/mus... |
29,288 | jlu368/hw1 | refs/heads/master | /bfs.py | from queue import Queue, LifoQueue
def bfs(start): # Implementation of BFS search algorithm
queue = Queue() # Using queue structure
queue.put((start, [start]))
expansion = 0
visited = set() # Frontier to keep track of nodes that have been visited
# Prevent repeated state
whi... | {"/multiple_goal.py": ["/newstar.py"], "/maze_parse.py": ["/bfs.py", "/greedy_search.py", "/newstar.py", "/multiple_goal.py"]} |
29,289 | jlu368/hw1 | refs/heads/master | /greedy_search.py | import math, heapq
# Implementation of greedy algorithm (Complete)
# This implementation of greedy does not guarantee to find an optimal solution,
# but it is complete.
def greedy(start, goal):
openset = set() # Openset is a set that contains all the visited but not necessarily expanded nodes
opendict = {}
closese... | {"/multiple_goal.py": ["/newstar.py"], "/maze_parse.py": ["/bfs.py", "/greedy_search.py", "/newstar.py", "/multiple_goal.py"]} |
29,290 | jlu368/hw1 | refs/heads/master | /multiple_goal.py | import newstar, heapq
from queue import LifoQueue
# This function starts the process of solving a maze for multiple dots.
# Params:
# start - Node that signifies the starting position in the maze
# goals - Array of nodes that are all goal states
#
# Returns:
# The solution to the maze as an array of nodes, and t... | {"/multiple_goal.py": ["/newstar.py"], "/maze_parse.py": ["/bfs.py", "/greedy_search.py", "/newstar.py", "/multiple_goal.py"]} |
29,291 | jlu368/hw1 | refs/heads/master | /newstar.py | import math, heapq
# In this a star search implentation, we used manhattan distance to determine
# the heuristic value. Since in this case, Manhattan distance is the closest path
# cost from current node to goal (Diagonal is not allowed), we can conclude that
# our heuristic function never overestimate the true cos... | {"/multiple_goal.py": ["/newstar.py"], "/maze_parse.py": ["/bfs.py", "/greedy_search.py", "/newstar.py", "/multiple_goal.py"]} |
29,292 | jlu368/hw1 | refs/heads/master | /maze_parse.py | import bfs, astar_search, greedy_search, newstar, multiple_goal, sys
import copy, time
import suboptimal
from string import ascii_letters
class Node():
top = None
bottom = None
left = None
right = None
wall = False
point = False
x = -1
y = -1
order = None
manhattan = 0
def ... | {"/multiple_goal.py": ["/newstar.py"], "/maze_parse.py": ["/bfs.py", "/greedy_search.py", "/newstar.py", "/multiple_goal.py"]} |
29,300 | flekschas/jupyter-scatter | refs/heads/main | /jscatter/__init__.py | try:
from importlib.metadata import PackageNotFoundError, version
except ImportError:
from importlib_metadata import PackageNotFoundError, version # type: ignore
try:
__version__ = version("jupyter-scatter")
except PackageNotFoundError:
__version__ = "uninstalled"
from .jscatter import Scatter, plot
... | {"/jscatter/__init__.py": ["/jscatter/jscatter.py", "/jscatter/compose.py", "/jscatter/color_maps.py"], "/jscatter/encodings_test.py": ["/jscatter/encodings.py"], "/jscatter/jscatter_test.py": ["/jscatter/jscatter.py", "/jscatter/utils.py"], "/jscatter/utils_test.py": ["/jscatter/utils.py"], "/jscatter/utils.py": ["/js... |
29,301 | flekschas/jupyter-scatter | refs/heads/main | /jscatter/encodings_test.py | from functools import reduce
from .encodings import Encodings
def test_encodings():
enc = Encodings()
assert len(enc.data) == 0
assert enc.max == 2
enc.set('color', 'test')
assert len(enc.data) == 1
assert len(enc.visual) == 1
assert enc.data[enc.visual['color'].data].component == 2
... | {"/jscatter/__init__.py": ["/jscatter/jscatter.py", "/jscatter/compose.py", "/jscatter/color_maps.py"], "/jscatter/encodings_test.py": ["/jscatter/encodings.py"], "/jscatter/jscatter_test.py": ["/jscatter/jscatter.py", "/jscatter/utils.py"], "/jscatter/utils_test.py": ["/jscatter/utils.py"], "/jscatter/utils.py": ["/js... |
29,302 | flekschas/jupyter-scatter | refs/heads/main | /jscatter/jscatter_test.py | import numpy as np
import pandas as pd
from .jscatter import Scatter, component_idx_to_name
from .utils import to_ndc, create_default_norm
def test_component_idx_to_name():
assert component_idx_to_name(2) == 'valueA'
assert component_idx_to_name(3) == 'valueB'
assert component_idx_to_name(4) is None
a... | {"/jscatter/__init__.py": ["/jscatter/jscatter.py", "/jscatter/compose.py", "/jscatter/color_maps.py"], "/jscatter/encodings_test.py": ["/jscatter/encodings.py"], "/jscatter/jscatter_test.py": ["/jscatter/jscatter.py", "/jscatter/utils.py"], "/jscatter/utils_test.py": ["/jscatter/utils.py"], "/jscatter/utils.py": ["/js... |
29,303 | flekschas/jupyter-scatter | refs/heads/main | /jscatter/utils_test.py | from .utils import sorting_to_dict
def test_sorting_to_dict():
d = sorting_to_dict([1, 3, 2, 0])
assert d == { 0: 3, 1: 0, 2: 2, 3: 1 }
| {"/jscatter/__init__.py": ["/jscatter/jscatter.py", "/jscatter/compose.py", "/jscatter/color_maps.py"], "/jscatter/encodings_test.py": ["/jscatter/encodings.py"], "/jscatter/jscatter_test.py": ["/jscatter/jscatter.py", "/jscatter/utils.py"], "/jscatter/utils_test.py": ["/jscatter/utils.py"], "/jscatter/utils.py": ["/js... |
29,304 | flekschas/jupyter-scatter | refs/heads/main | /jscatter/color_maps.py | from matplotlib.colors import to_rgba
okabe_ito = [
to_rgba('#56B4E9'), # sky blue
to_rgba('#E69F00'), # orange
to_rgba('#009E73'), # blueish green
to_rgba('#F0E442'), # yellow
to_rgba('#0072B2'), # blue
to_rgba('#D55E00'), # vermilion
to_rgba('#CC79A7'), # reddish purple
to_rgba('#0000... | {"/jscatter/__init__.py": ["/jscatter/jscatter.py", "/jscatter/compose.py", "/jscatter/color_maps.py"], "/jscatter/encodings_test.py": ["/jscatter/encodings.py"], "/jscatter/jscatter_test.py": ["/jscatter/jscatter.py", "/jscatter/utils.py"], "/jscatter/utils_test.py": ["/jscatter/utils.py"], "/jscatter/utils.py": ["/js... |
29,305 | flekschas/jupyter-scatter | refs/heads/main | /jscatter/utils.py | from matplotlib.colors import LogNorm, PowerNorm, Normalize
import ipywidgets as widgets
from urllib.parse import urlparse
from typing import Union
from .types import Labeling
def to_uint8(x):
return int(max(0, min(x * 255, 255)))
def to_hex(color):
if isinstance(color, list):
rgb = [to_uint8(c) for c... | {"/jscatter/__init__.py": ["/jscatter/jscatter.py", "/jscatter/compose.py", "/jscatter/color_maps.py"], "/jscatter/encodings_test.py": ["/jscatter/encodings.py"], "/jscatter/jscatter_test.py": ["/jscatter/jscatter.py", "/jscatter/utils.py"], "/jscatter/utils_test.py": ["/jscatter/utils.py"], "/jscatter/utils.py": ["/js... |
29,306 | flekschas/jupyter-scatter | refs/heads/main | /jscatter/jscatter.py | from __future__ import annotations
import math
import matplotlib.pyplot as plt
import matplotlib
import numpy as np
import pandas as pd
from matplotlib.colors import to_rgba, Normalize, LogNorm, PowerNorm, LinearSegmentedColormap, ListedColormap
from typing import Optional, Union, List, Tuple, Set
from .encodings imp... | {"/jscatter/__init__.py": ["/jscatter/jscatter.py", "/jscatter/compose.py", "/jscatter/color_maps.py"], "/jscatter/encodings_test.py": ["/jscatter/encodings.py"], "/jscatter/jscatter_test.py": ["/jscatter/jscatter.py", "/jscatter/utils.py"], "/jscatter/utils_test.py": ["/jscatter/utils.py"], "/jscatter/utils.py": ["/js... |
29,307 | flekschas/jupyter-scatter | refs/heads/main | /jscatter/compose.py | from uuid import uuid4
from ipywidgets.widgets import GridBox, HTML, Layout, VBox
from itertools import zip_longest
from typing import List, Optional, Union, Tuple
from .jscatter import Scatter
AXES_LABEL_SIZE = 16;
AXES_PADDING_Y = 20;
AXES_PADDING_Y_WITH_LABEL = AXES_PADDING_Y + AXES_LABEL_SIZE;
def compose(
s... | {"/jscatter/__init__.py": ["/jscatter/jscatter.py", "/jscatter/compose.py", "/jscatter/color_maps.py"], "/jscatter/encodings_test.py": ["/jscatter/encodings.py"], "/jscatter/jscatter_test.py": ["/jscatter/jscatter.py", "/jscatter/utils.py"], "/jscatter/utils_test.py": ["/jscatter/utils.py"], "/jscatter/utils.py": ["/js... |
29,308 | flekschas/jupyter-scatter | refs/heads/main | /jscatter/widget.py | import base64
import IPython.display as ipydisplay
import ipywidgets as widgets
import matplotlib.pyplot as plt
import numpy as np
import anywidget
import pathlib
from traitlets import Bool, Dict, Enum, Float, Int, List, Set, Unicode, Union
from traittypes import Array
from .utils import to_hex, with_left_label
SELE... | {"/jscatter/__init__.py": ["/jscatter/jscatter.py", "/jscatter/compose.py", "/jscatter/color_maps.py"], "/jscatter/encodings_test.py": ["/jscatter/encodings.py"], "/jscatter/jscatter_test.py": ["/jscatter/jscatter.py", "/jscatter/utils.py"], "/jscatter/utils_test.py": ["/jscatter/utils.py"], "/jscatter/utils.py": ["/js... |
29,309 | flekschas/jupyter-scatter | refs/heads/main | /jscatter/encodings.py | import numpy as np
import pandas as pd
from dataclasses import dataclass
from functools import reduce
from math import floor
from typing import List, Tuple, Union, Optional
def create_legend(encoding, norm, categories, labeling=None, linspace_num=5, category_order=None):
variable = labeling.get('variable') if labe... | {"/jscatter/__init__.py": ["/jscatter/jscatter.py", "/jscatter/compose.py", "/jscatter/color_maps.py"], "/jscatter/encodings_test.py": ["/jscatter/encodings.py"], "/jscatter/jscatter_test.py": ["/jscatter/jscatter.py", "/jscatter/utils.py"], "/jscatter/utils_test.py": ["/jscatter/utils.py"], "/jscatter/utils.py": ["/js... |
29,310 | flekschas/jupyter-scatter | refs/heads/main | /jscatter/types.py | from enum import Enum
from typing import Union, Tuple
from typing_extensions import NotRequired, TypedDict
Rgb = Tuple[float, float, float]
Rgba = Tuple[float, float, float, float]
Color = Union[str, Rgb, Rgba]
# To distinguish between None and an undefined (optional) argument, where None
# is used for unsetting and ... | {"/jscatter/__init__.py": ["/jscatter/jscatter.py", "/jscatter/compose.py", "/jscatter/color_maps.py"], "/jscatter/encodings_test.py": ["/jscatter/encodings.py"], "/jscatter/jscatter_test.py": ["/jscatter/jscatter.py", "/jscatter/utils.py"], "/jscatter/utils_test.py": ["/jscatter/utils.py"], "/jscatter/utils.py": ["/js... |
29,312 | Frihet/lasso | refs/heads/master | /urls.py | from django.conf.urls.defaults import *
from django.conf import settings
# Uncomment the next two lines to enable the admin:
from django.contrib import admin
admin.autodiscover()
urlpatterns = patterns('',
(r'^lasso_warehandling/costlog/', include('lasso_warehandling.urls.costlog')),
(r'^lasso_warehandling/... | {"/lasso_warehandling/admin.py": ["/extendable_permissions.py", "/utils/__init__.py"], "/lasso_customer/models.py": ["/lasso_global/models.py", "/utils/modelhelpers.py"], "/lasso_auth/management/commands/lasso_setup_standard_groups.py": ["/lasso_auth/models.py"], "/lasso_customer/admin.py": ["/extendable_permissions.py... |
29,313 | Frihet/lasso | refs/heads/master | /lasso_global/models.py | # -*- coding: utf-8 -*-
from django.utils.translation import ugettext_lazy as _
from django.db import models
from django.db.models.signals import *
from django import forms
import datetime
from lasso.utils import *
import django.contrib.auth.models
import decimal
_name = _("Lasso_Global")
_name2 = _("lasso_global")
#... | {"/lasso_warehandling/admin.py": ["/extendable_permissions.py", "/utils/__init__.py"], "/lasso_customer/models.py": ["/lasso_global/models.py", "/utils/modelhelpers.py"], "/lasso_auth/management/commands/lasso_setup_standard_groups.py": ["/lasso_auth/models.py"], "/lasso_customer/admin.py": ["/extendable_permissions.py... |
29,314 | Frihet/lasso | refs/heads/master | /lasso_auth/models.py | from django.db import models
import django.contrib.auth.models
from django.db.models.signals import *
class User(django.contrib.auth.models.User):
class Meta:
proxy = True
@property
def group(self):
return ', '.join(unicode(group) for group in self.groups.order_by('name').all())
def user_p... | {"/lasso_warehandling/admin.py": ["/extendable_permissions.py", "/utils/__init__.py"], "/lasso_customer/models.py": ["/lasso_global/models.py", "/utils/modelhelpers.py"], "/lasso_auth/management/commands/lasso_setup_standard_groups.py": ["/lasso_auth/models.py"], "/lasso_customer/admin.py": ["/extendable_permissions.py... |
29,315 | Frihet/lasso | refs/heads/master | /lasso_warehandling/models.py | # -*- coding: utf-8 -*-
from django.utils.translation import ugettext_lazy as _
from django.db import models
from lasso.lasso_customer.models import *
from lasso.lasso_global.models import *
from django.db.models.signals import *
from django import forms
import datetime
from lasso.utils import *
import django.contrib.a... | {"/lasso_warehandling/admin.py": ["/extendable_permissions.py", "/utils/__init__.py"], "/lasso_customer/models.py": ["/lasso_global/models.py", "/utils/modelhelpers.py"], "/lasso_auth/management/commands/lasso_setup_standard_groups.py": ["/lasso_auth/models.py"], "/lasso_customer/admin.py": ["/extendable_permissions.py... |
29,316 | Frihet/lasso | refs/heads/master | /lasso_auth/__init__.py | # vim: set ts=8 sw=4 sts=4 et ai:
# From http://code.djangoproject.com/attachment/ticket/11154/osso.core.management.__init__.py
# See http://code.djangoproject.com/ticket/11154 for discussion
from django.conf import settings
from django.contrib.auth.management import create_permissions, _get_all_permissions
from djan... | {"/lasso_warehandling/admin.py": ["/extendable_permissions.py", "/utils/__init__.py"], "/lasso_customer/models.py": ["/lasso_global/models.py", "/utils/modelhelpers.py"], "/lasso_auth/management/commands/lasso_setup_standard_groups.py": ["/lasso_auth/models.py"], "/lasso_customer/admin.py": ["/extendable_permissions.py... |
29,317 | Frihet/lasso | refs/heads/master | /utils/__init__.py | import datetime
from django.db import models
from django import forms
from django.utils.translation import ugettext_lazy as _
import django.utils.safestring
import django.core.urlresolvers
from django.utils.encoding import StrAndUnicode, force_unicode
from django.utils.safestring import mark_safe
from django.forms.util... | {"/lasso_warehandling/admin.py": ["/extendable_permissions.py", "/utils/__init__.py"], "/lasso_customer/models.py": ["/lasso_global/models.py", "/utils/modelhelpers.py"], "/lasso_auth/management/commands/lasso_setup_standard_groups.py": ["/lasso_auth/models.py"], "/lasso_customer/admin.py": ["/extendable_permissions.py... |
29,318 | Frihet/lasso | refs/heads/master | /lasso_warehandling/templatetags/datatypes.py | from django import template
from django.core.serializers import serialize
from django.db.models.query import QuerySet
from django.utils import simplejson
import django.db.models.base
import django.utils.safestring
import django.template.defaultfilters
register = template.Library()
def nth_filter(value, param):
tr... | {"/lasso_warehandling/admin.py": ["/extendable_permissions.py", "/utils/__init__.py"], "/lasso_customer/models.py": ["/lasso_global/models.py", "/utils/modelhelpers.py"], "/lasso_auth/management/commands/lasso_setup_standard_groups.py": ["/lasso_auth/models.py"], "/lasso_customer/admin.py": ["/extendable_permissions.py... |
29,319 | Frihet/lasso | refs/heads/master | /lasso_warehandling/views.py | # Create your views here.
from django.utils.translation import ugettext_lazy as _
from django.http import *
from lasso.lasso_warehandling.models import *
from lasso.lasso_customer.models import *
from django.shortcuts import *
from django.contrib.admin.views.decorators import *
from django import template
from django.c... | {"/lasso_warehandling/admin.py": ["/extendable_permissions.py", "/utils/__init__.py"], "/lasso_customer/models.py": ["/lasso_global/models.py", "/utils/modelhelpers.py"], "/lasso_auth/management/commands/lasso_setup_standard_groups.py": ["/lasso_auth/models.py"], "/lasso_customer/admin.py": ["/extendable_permissions.py... |
29,320 | Frihet/lasso | refs/heads/master | /lasso_warehandling/admin.py | # -*- coding: utf-8 -*-
from django.utils.translation import ugettext_lazy as _
from lasso.lasso_warehandling.models import *
from lasso.lasso_warehouse.models import *
from django.db import models
from lasso.lasso_customer.models import *
from django.contrib import admin
from django.db.models.signals import *
from dja... | {"/lasso_warehandling/admin.py": ["/extendable_permissions.py", "/utils/__init__.py"], "/lasso_customer/models.py": ["/lasso_global/models.py", "/utils/modelhelpers.py"], "/lasso_auth/management/commands/lasso_setup_standard_groups.py": ["/lasso_auth/models.py"], "/lasso_customer/admin.py": ["/extendable_permissions.py... |
29,321 | Frihet/lasso | refs/heads/master | /utils/modelhelpers.py | import django.db.models.fields.related
import django.contrib.admin.util
class SubclasModelMixin(object):
@classmethod
def get_model_subclass_relations(cls, other = None):
if other: cls = other
res = {}
for name in dir(cls):
attr = getattr(cls, name)
if isinstance... | {"/lasso_warehandling/admin.py": ["/extendable_permissions.py", "/utils/__init__.py"], "/lasso_customer/models.py": ["/lasso_global/models.py", "/utils/modelhelpers.py"], "/lasso_auth/management/commands/lasso_setup_standard_groups.py": ["/lasso_auth/models.py"], "/lasso_customer/admin.py": ["/extendable_permissions.py... |
29,322 | Frihet/lasso | refs/heads/master | /lasso_customer/models.py | from django.utils.translation import ugettext_lazy as _
from django.db import models
from django.contrib import admin
from django.contrib.auth.models import Group, User, UserManager, Permission
from django.db.models.signals import *
from lasso_global.models import *
import utils.modelhelpers
import re
import decimal
_... | {"/lasso_warehandling/admin.py": ["/extendable_permissions.py", "/utils/__init__.py"], "/lasso_customer/models.py": ["/lasso_global/models.py", "/utils/modelhelpers.py"], "/lasso_auth/management/commands/lasso_setup_standard_groups.py": ["/lasso_auth/models.py"], "/lasso_customer/admin.py": ["/extendable_permissions.py... |
29,323 | Frihet/lasso | refs/heads/master | /excware.py | import settings
class ExcWare(object):
def process_exception(self, request, exception):
if settings.DEBUG_IN_TERMINAL:
import pdb, sys, traceback
sys.last_traceback = sys.exc_info()[2]
print "===============================================================================... | {"/lasso_warehandling/admin.py": ["/extendable_permissions.py", "/utils/__init__.py"], "/lasso_customer/models.py": ["/lasso_global/models.py", "/utils/modelhelpers.py"], "/lasso_auth/management/commands/lasso_setup_standard_groups.py": ["/lasso_auth/models.py"], "/lasso_customer/admin.py": ["/extendable_permissions.py... |
29,324 | Frihet/lasso | refs/heads/master | /lasso_warehandling/urls/costlog.py | from django.conf.urls.defaults import *
from django.conf import settings
urlpatterns = patterns('',
(r'^(?P<year>\d+)/(?P<month>\d+)/for/auto/(?P<entry>\d+)$', 'lasso_warehandling.views.costlog'),
(r'^(?P<year>\d+)/for/auto/(?P<entry>\d+)$', 'lasso_warehandling.views.costlog'),
(r'^for/auto/(?P<entry>\d+)$... | {"/lasso_warehandling/admin.py": ["/extendable_permissions.py", "/utils/__init__.py"], "/lasso_customer/models.py": ["/lasso_global/models.py", "/utils/modelhelpers.py"], "/lasso_auth/management/commands/lasso_setup_standard_groups.py": ["/lasso_auth/models.py"], "/lasso_customer/admin.py": ["/extendable_permissions.py... |
29,325 | Frihet/lasso | refs/heads/master | /lasso_import/management/commands/flsimport.py | # -*- coding: utf-8 -*-
import datetime
import codecs
from django.core.management.base import BaseCommand, CommandError
from optparse import make_option
from lasso.utils import *
import django.contrib.auth.models
class Command(BaseCommand):
args = ''
option_list = BaseCommand.option_list + (
make_opt... | {"/lasso_warehandling/admin.py": ["/extendable_permissions.py", "/utils/__init__.py"], "/lasso_customer/models.py": ["/lasso_global/models.py", "/utils/modelhelpers.py"], "/lasso_auth/management/commands/lasso_setup_standard_groups.py": ["/lasso_auth/models.py"], "/lasso_customer/admin.py": ["/extendable_permissions.py... |
29,326 | Frihet/lasso | refs/heads/master | /lasso_global/admin.py | # -*- coding: utf-8 -*-
from lasso.lasso_global.models import *
from django.contrib import admin
admin.site.register(Insurance)
admin.site.register(Origin)
admin.site.register(TransportCondition)
admin.site.register(VehicleType)
| {"/lasso_warehandling/admin.py": ["/extendable_permissions.py", "/utils/__init__.py"], "/lasso_customer/models.py": ["/lasso_global/models.py", "/utils/modelhelpers.py"], "/lasso_auth/management/commands/lasso_setup_standard_groups.py": ["/lasso_auth/models.py"], "/lasso_customer/admin.py": ["/extendable_permissions.py... |
29,327 | Frihet/lasso | refs/heads/master | /lasso_labelprinting/urls.py | from django.conf.urls.defaults import *
from django.conf import settings
import os.path
urlpatterns = patterns('',
(r'^print$', 'lasso_labelprinting.views.print_labels'),
(r'^adresses$', 'lasso_labelprinting.views.addresses'),
)
| {"/lasso_warehandling/admin.py": ["/extendable_permissions.py", "/utils/__init__.py"], "/lasso_customer/models.py": ["/lasso_global/models.py", "/utils/modelhelpers.py"], "/lasso_auth/management/commands/lasso_setup_standard_groups.py": ["/lasso_auth/models.py"], "/lasso_customer/admin.py": ["/extendable_permissions.py... |
29,328 | Frihet/lasso | refs/heads/master | /lasso_warehandling/urls/entry.py | from django.conf.urls.defaults import *
from django.conf import settings
urlpatterns = patterns('',
(r'^(?P<entry_id>\d+)/print$', 'lasso_warehandling.views.entry_print'),
)
| {"/lasso_warehandling/admin.py": ["/extendable_permissions.py", "/utils/__init__.py"], "/lasso_customer/models.py": ["/lasso_global/models.py", "/utils/modelhelpers.py"], "/lasso_auth/management/commands/lasso_setup_standard_groups.py": ["/lasso_auth/models.py"], "/lasso_customer/admin.py": ["/extendable_permissions.py... |
29,329 | Frihet/lasso | refs/heads/master | /lasso_warehouse/models.py | from django.utils.translation import ugettext_lazy as _
from django.db import models
from lasso.lasso_warehandling.models import *
_name = _("Lasso_Warehouse")
_name2 = _("lasso_warehouse")
class Warehouse(models.Model):
class Meta:
verbose_name = _('Warehouse')
verbose_name_plural = _('Warehouses... | {"/lasso_warehandling/admin.py": ["/extendable_permissions.py", "/utils/__init__.py"], "/lasso_customer/models.py": ["/lasso_global/models.py", "/utils/modelhelpers.py"], "/lasso_auth/management/commands/lasso_setup_standard_groups.py": ["/lasso_auth/models.py"], "/lasso_customer/admin.py": ["/extendable_permissions.py... |
29,330 | Frihet/lasso | refs/heads/master | /lasso_warehandling/management/commands/logstorage.py | from django.core.management.base import BaseCommand, CommandError
class Command(BaseCommand):
args = ''
help = 'Logs all used storage for the day'
def handle(self, *args, **options):
import lasso_warehandling.models
for entry_row in lasso_warehandling.models.EntryRow.objects.all():
... | {"/lasso_warehandling/admin.py": ["/extendable_permissions.py", "/utils/__init__.py"], "/lasso_customer/models.py": ["/lasso_global/models.py", "/utils/modelhelpers.py"], "/lasso_auth/management/commands/lasso_setup_standard_groups.py": ["/lasso_auth/models.py"], "/lasso_customer/admin.py": ["/extendable_permissions.py... |
29,331 | Frihet/lasso | refs/heads/master | /lasso_labelprinting/models.py | from django.utils.translation import ugettext_lazy as _
from django.db import models
_name = _("Lasso_Labelprinting")
_name2 = _("lasso_labelprinting")
class Address(models.Model):
class Meta:
verbose_name = _('Address')
verbose_name_plural = _('Addresses')
customer_nr = models.IntegerField(v... | {"/lasso_warehandling/admin.py": ["/extendable_permissions.py", "/utils/__init__.py"], "/lasso_customer/models.py": ["/lasso_global/models.py", "/utils/modelhelpers.py"], "/lasso_auth/management/commands/lasso_setup_standard_groups.py": ["/lasso_auth/models.py"], "/lasso_customer/admin.py": ["/extendable_permissions.py... |
29,332 | Frihet/lasso | refs/heads/master | /lasso_labelprinting/views.py | # -*- coding: utf-8 -*-
from django.utils.translation import ugettext_lazy as _
from django.shortcuts import *
from django.contrib.admin.views.decorators import *
from django import template
from django.core.urlresolvers import *
from django.http import *
import lasso_labelprinting.models
import os
import tempfile
impo... | {"/lasso_warehandling/admin.py": ["/extendable_permissions.py", "/utils/__init__.py"], "/lasso_customer/models.py": ["/lasso_global/models.py", "/utils/modelhelpers.py"], "/lasso_auth/management/commands/lasso_setup_standard_groups.py": ["/lasso_auth/models.py"], "/lasso_customer/admin.py": ["/extendable_permissions.py... |
29,333 | Frihet/lasso | refs/heads/master | /utils/latex.py | import tempfile
import subprocess
import django.http
import django.template.loader
import os.path
import shutil
def render_to_response(template, dct, context_instance):
if 'request' in context_instance and context_instance['request'].GET.get('format', '') == 'tex':
return django.http.HttpResponse(django.te... | {"/lasso_warehandling/admin.py": ["/extendable_permissions.py", "/utils/__init__.py"], "/lasso_customer/models.py": ["/lasso_global/models.py", "/utils/modelhelpers.py"], "/lasso_auth/management/commands/lasso_setup_standard_groups.py": ["/lasso_auth/models.py"], "/lasso_customer/admin.py": ["/extendable_permissions.py... |
29,334 | Frihet/lasso | refs/heads/master | /lasso_auth/management/commands/lasso_setup_standard_groups.py | from django.core.management.base import BaseCommand, CommandError
from django.db.models import Q
import lasso_auth.models
import django.contrib.auth.models
def permissions_to_query(*perm):
res = None
for p in perm:
cp = Q(content_type__app_label=p[0], content_type__name=p[1], codename=p[2])
if ... | {"/lasso_warehandling/admin.py": ["/extendable_permissions.py", "/utils/__init__.py"], "/lasso_customer/models.py": ["/lasso_global/models.py", "/utils/modelhelpers.py"], "/lasso_auth/management/commands/lasso_setup_standard_groups.py": ["/lasso_auth/models.py"], "/lasso_customer/admin.py": ["/extendable_permissions.py... |
29,335 | Frihet/lasso | refs/heads/master | /lasso_warehouse/admin.py | from django.db import models
from django.contrib import admin
from lasso.lasso_warehandling.models import *
from lasso.lasso_warehouse.models import *
admin.site.register(Warehouse)
admin.site.register(Row)
class EmptyPalletSpaceAdmin(admin.ModelAdmin):
def queryset(self, request):
qs = super(EmptyPalletS... | {"/lasso_warehandling/admin.py": ["/extendable_permissions.py", "/utils/__init__.py"], "/lasso_customer/models.py": ["/lasso_global/models.py", "/utils/modelhelpers.py"], "/lasso_auth/management/commands/lasso_setup_standard_groups.py": ["/lasso_auth/models.py"], "/lasso_customer/admin.py": ["/extendable_permissions.py... |
29,336 | Frihet/lasso | refs/heads/master | /extendable_permissions.py | from django.utils.safestring import mark_safe
from django.contrib.contenttypes.models import ContentType
from django import template
from django.shortcuts import get_object_or_404, render_to_response
from django.contrib import admin
import django.forms.util
class ExtendablePermissionAdminMixin(object):
def get_mod... | {"/lasso_warehandling/admin.py": ["/extendable_permissions.py", "/utils/__init__.py"], "/lasso_customer/models.py": ["/lasso_global/models.py", "/utils/modelhelpers.py"], "/lasso_auth/management/commands/lasso_setup_standard_groups.py": ["/lasso_auth/models.py"], "/lasso_customer/admin.py": ["/extendable_permissions.py... |
29,337 | Frihet/lasso | refs/heads/master | /lasso_warehouse/urls/overview.py | from django.conf.urls.defaults import *
from django.conf import settings
import os.path
urlpatterns = patterns('',
(r'^js$', 'lasso_warehouse.views.overview_js'),
(r'^$', 'lasso_warehouse.views.overview'),
)
| {"/lasso_warehandling/admin.py": ["/extendable_permissions.py", "/utils/__init__.py"], "/lasso_customer/models.py": ["/lasso_global/models.py", "/utils/modelhelpers.py"], "/lasso_auth/management/commands/lasso_setup_standard_groups.py": ["/lasso_auth/models.py"], "/lasso_customer/admin.py": ["/extendable_permissions.py... |
29,338 | Frihet/lasso | refs/heads/master | /lasso_customer/admin.py | # -*- coding: utf-8 -*-
from django.utils.translation import ugettext_lazy as _
from django.db import models
from lasso.lasso_customer.models import *
from django.contrib import admin
from django.db.models.signals import *
from extendable_permissions import *
from django import forms
admin.site.register(UnitWorkType)
... | {"/lasso_warehandling/admin.py": ["/extendable_permissions.py", "/utils/__init__.py"], "/lasso_customer/models.py": ["/lasso_global/models.py", "/utils/modelhelpers.py"], "/lasso_auth/management/commands/lasso_setup_standard_groups.py": ["/lasso_auth/models.py"], "/lasso_customer/admin.py": ["/extendable_permissions.py... |
29,339 | Frihet/lasso | refs/heads/master | /lasso_auth/admin.py | # -*- coding: utf-8 -*-
from lasso.lasso_auth.models import *
from django.contrib import admin
class UserAdmin(admin.ModelAdmin):
exclude = ('user_permissions', 'is_staff', 'is_superuser')
list_display_links = list_display = ('id', 'username', 'email', 'first_name', 'last_name', 'is_active', 'group', 'last_log... | {"/lasso_warehandling/admin.py": ["/extendable_permissions.py", "/utils/__init__.py"], "/lasso_customer/models.py": ["/lasso_global/models.py", "/utils/modelhelpers.py"], "/lasso_auth/management/commands/lasso_setup_standard_groups.py": ["/lasso_auth/models.py"], "/lasso_customer/admin.py": ["/extendable_permissions.py... |
29,340 | Frihet/lasso | refs/heads/master | /lasso_warehouse/views.py | # Create your views here.
from django.http import *
from lasso.lasso_warehouse.models import *
from django.shortcuts import *
from django.contrib.admin.views.decorators import *
from django import template
from django.core.urlresolvers import *
@staff_member_required
def overview(request, *arg, **kw):
info = {}
... | {"/lasso_warehandling/admin.py": ["/extendable_permissions.py", "/utils/__init__.py"], "/lasso_customer/models.py": ["/lasso_global/models.py", "/utils/modelhelpers.py"], "/lasso_auth/management/commands/lasso_setup_standard_groups.py": ["/lasso_auth/models.py"], "/lasso_customer/admin.py": ["/extendable_permissions.py... |
29,341 | seunghany/dayoung-api | refs/heads/main | /com_dayoung_api/ext/routes.py | # from com_dayoung_api.home.api import Home
# from com_dayoung_api.movie.api import Movie, Movies
# from com_dayoung_api.review.api import Review, Reviews
# from com_dayoung_api.user.api import User, Users, Auth, Access
import logging
from flask import Blueprint
from flask_restful import Api
from com_dayoung_api.resou... | {"/com_dayoung_api/ext/routes.py": ["/com_dayoung_api/resources/user.py", "/com_dayoung_api/resources/actor.py"], "/com_dayoung_api/actor_dont_use_this/dao.py": ["/com_dayoung_api/ext/db.py"], "/com_dayoung_api/resources/actor.py": ["/com_dayoung_api/ext/db.py", "/com_dayoung_api/resources/crawling.py"], "/com_dayoung_... |
29,342 | seunghany/dayoung-api | refs/heads/main | /com_dayoung_api/resources/test.py | x= (1,2)
print(x[0]) | {"/com_dayoung_api/ext/routes.py": ["/com_dayoung_api/resources/user.py", "/com_dayoung_api/resources/actor.py"], "/com_dayoung_api/actor_dont_use_this/dao.py": ["/com_dayoung_api/ext/db.py"], "/com_dayoung_api/resources/actor.py": ["/com_dayoung_api/ext/db.py", "/com_dayoung_api/resources/crawling.py"], "/com_dayoung_... |
29,343 | seunghany/dayoung-api | refs/heads/main | /com_dayoung_api/resources/crawling.py | import requests
from bs4 import BeautifulSoup
import re # ์ ๊ท์ ์ฌ์ฉ
from pandas import DataFrame
class Crawling:
'''
Crawls data from wikipedia with following information
attributes: ['์ฌ์ง', '๋์ด','์ด๋ฆ','๋ณธ๋ช
','์ข
๊ต','์์์ฌ', '๋ฐฐ์ฐ์', '์๋
','๋ฐ๋ท๋
๋']
returns Dataframe with above attributes
'''
... | {"/com_dayoung_api/ext/routes.py": ["/com_dayoung_api/resources/user.py", "/com_dayoung_api/resources/actor.py"], "/com_dayoung_api/actor_dont_use_this/dao.py": ["/com_dayoung_api/ext/db.py"], "/com_dayoung_api/resources/actor.py": ["/com_dayoung_api/ext/db.py", "/com_dayoung_api/resources/crawling.py"], "/com_dayoung_... |
29,344 | seunghany/dayoung-api | refs/heads/main | /com_dayoung_api/actor_dont_use_this/dao.py | from com_dayoung_api.ext.db import db, openSession
from com_dayoung_api.actor.service import ActorService
from com_dayoung_api.actor.dto import ActorDto
import pandas as pd
import json
class ActorDao(ActorDto):
@classmethod
def find_all(cls):
sql = cls.query
df = pd.read_sql(sql.statement, sql... | {"/com_dayoung_api/ext/routes.py": ["/com_dayoung_api/resources/user.py", "/com_dayoung_api/resources/actor.py"], "/com_dayoung_api/actor_dont_use_this/dao.py": ["/com_dayoung_api/ext/db.py"], "/com_dayoung_api/resources/actor.py": ["/com_dayoung_api/ext/db.py", "/com_dayoung_api/resources/crawling.py"], "/com_dayoung_... |
29,345 | seunghany/dayoung-api | refs/heads/main | /com_dayoung_api/resources/actor.py | from flask import request
from flask_restful import Resource, reqparse
import json
from com_dayoung_api.ext.db import db, openSession
import pandas as pd
from sqlalchemy import func
from com_dayoung_api.resources.crawling import Crawling
class ActorPreprocess(object):
def __init__(self):
self.c = Crawling... | {"/com_dayoung_api/ext/routes.py": ["/com_dayoung_api/resources/user.py", "/com_dayoung_api/resources/actor.py"], "/com_dayoung_api/actor_dont_use_this/dao.py": ["/com_dayoung_api/ext/db.py"], "/com_dayoung_api/resources/actor.py": ["/com_dayoung_api/ext/db.py", "/com_dayoung_api/resources/crawling.py"], "/com_dayoung_... |
29,346 | seunghany/dayoung-api | refs/heads/main | /com_dayoung_api/__init__.py | import time
curr = time.strftime('%H%M%S')
print(f'===========================================')
print(f'=== com_sba_api initialized at {curr} =====')
print(f'===========================================')
| {"/com_dayoung_api/ext/routes.py": ["/com_dayoung_api/resources/user.py", "/com_dayoung_api/resources/actor.py"], "/com_dayoung_api/actor_dont_use_this/dao.py": ["/com_dayoung_api/ext/db.py"], "/com_dayoung_api/resources/actor.py": ["/com_dayoung_api/ext/db.py", "/com_dayoung_api/resources/crawling.py"], "/com_dayoung_... |
29,347 | seunghany/dayoung-api | refs/heads/main | /note.py | # self vs cls
# Function and method arguments:
# Always use self for the first argument to instance methods.
# Always use cls for the first argument to class methods.
# cls implies that method belongs to the class while self implies
# that the method is related to instance of the class,
# therefore member with cls ... | {"/com_dayoung_api/ext/routes.py": ["/com_dayoung_api/resources/user.py", "/com_dayoung_api/resources/actor.py"], "/com_dayoung_api/actor_dont_use_this/dao.py": ["/com_dayoung_api/ext/db.py"], "/com_dayoung_api/resources/actor.py": ["/com_dayoung_api/ext/db.py", "/com_dayoung_api/resources/crawling.py"], "/com_dayoung_... |
29,348 | seunghany/dayoung-api | refs/heads/main | /note_database.py |
# Database ๋ง๋ค๊ธฐ
from flask import Flask
# ํ์ผ: /app.py => main.py
url = "url"
app = Flask(__name__) # 1
app.config['SECRET_KEY'] = 'this is secret' # 2 ๊ผญ ํ์ํ์ง ์๋๋ฏ
app.config['SQLALCHEMY_DATABASE_URI'] = 'sqlite:///site.db' # 3
app.config['SQLALCHEMY_TRACK_MODIFICAT... | {"/com_dayoung_api/ext/routes.py": ["/com_dayoung_api/resources/user.py", "/com_dayoung_api/resources/actor.py"], "/com_dayoung_api/actor_dont_use_this/dao.py": ["/com_dayoung_api/ext/db.py"], "/com_dayoung_api/resources/actor.py": ["/com_dayoung_api/ext/db.py", "/com_dayoung_api/resources/crawling.py"], "/com_dayoung_... |
29,349 | seunghany/dayoung-api | refs/heads/main | /com_dayoung_api/actor_dont_use_this/crawling.py | import requests
from bs4 import BeautifulSoup
import re # ์ ๊ท์ ์ฌ์ฉ
import csv
from pandas import DataFrame
class Crawling:
'''
Crawls data from wikipedia with following information
attributes: ['์ฌ์ง', '๋์ด','์ด๋ฆ','๋ณธ๋ช
','์ข
๊ต','์์์ฌ', '๋ฐฐ์ฐ์', '์๋
','๋ฐ๋ท๋
๋']
returns Dataframe with above attributes
... | {"/com_dayoung_api/ext/routes.py": ["/com_dayoung_api/resources/user.py", "/com_dayoung_api/resources/actor.py"], "/com_dayoung_api/actor_dont_use_this/dao.py": ["/com_dayoung_api/ext/db.py"], "/com_dayoung_api/resources/actor.py": ["/com_dayoung_api/ext/db.py", "/com_dayoung_api/resources/crawling.py"], "/com_dayoung_... |
29,350 | seunghany/dayoung-api | refs/heads/main | /com_dayoung_api/actor_dont_use_this/__init__.py | import logging
from flask import Blueprint
from flask_restful import Api
from com_dayoung_api.actor.api import Actor
actor = Blueprint('actor', __name__, url_prefix='/api/actor')
actors = Blueprint('actors', __name__, url_prefix='/api/actors')
auth = Blueprint('auth', __name__, url_prefix='/api/auth')
access = Bluepri... | {"/com_dayoung_api/ext/routes.py": ["/com_dayoung_api/resources/user.py", "/com_dayoung_api/resources/actor.py"], "/com_dayoung_api/actor_dont_use_this/dao.py": ["/com_dayoung_api/ext/db.py"], "/com_dayoung_api/resources/actor.py": ["/com_dayoung_api/ext/db.py", "/com_dayoung_api/resources/crawling.py"], "/com_dayoung_... |
29,351 | seunghany/dayoung-api | refs/heads/main | /com_dayoung_api/actor_dont_use_this/dto.py | from com_dayoung_api.ext.db import db
from com_dayoung_api.actor.service import ActorService
from sqlalchemy.orm import Session, sessionmaker
from sqlalchemy import create_engine
class ActorDto(db.Model):
__tablename__ = 'actors'
__table_args__={'mysql_collate':'utf8_general_ci'}
# columns=['photoUrl', 'ag... | {"/com_dayoung_api/ext/routes.py": ["/com_dayoung_api/resources/user.py", "/com_dayoung_api/resources/actor.py"], "/com_dayoung_api/actor_dont_use_this/dao.py": ["/com_dayoung_api/ext/db.py"], "/com_dayoung_api/resources/actor.py": ["/com_dayoung_api/ext/db.py", "/com_dayoung_api/resources/crawling.py"], "/com_dayoung_... |
29,352 | seunghany/dayoung-api | refs/heads/main | /com_dayoung_api/actor_dont_use_this/api.py | from typing import List
from flask_restful import Resource, reqparse
from com_dayoung_api.actor.dao import ActorDao
from com_dayoung_api.actor.dto import ActorDto, ActorVo
import json
from flask import jsonify
from flask import request
parser = reqparse.RequestParser() # only allow price changes, no name changes allow... | {"/com_dayoung_api/ext/routes.py": ["/com_dayoung_api/resources/user.py", "/com_dayoung_api/resources/actor.py"], "/com_dayoung_api/actor_dont_use_this/dao.py": ["/com_dayoung_api/ext/db.py"], "/com_dayoung_api/resources/actor.py": ["/com_dayoung_api/ext/db.py", "/com_dayoung_api/resources/crawling.py"], "/com_dayoung_... |
29,353 | seunghany/dayoung-api | refs/heads/main | /com_dayoung_api/actor_dont_use_this/service.py | from com_dayoung_api.actor.crawling import Crawling
class ActorService:
def __init__(self):
actors_name = ['์ ์งํ', "์ด๋ณํ", "์์์ง"]
actors_name = ['์ ์งํ']
actors_name =["์์ง", "์ด๋ณํ","์ ์งํ","์์์ง","์์ํฌ","๊ฐ๋์","ํ์ ์ฐ","๊นํ์","ํ๋น" ,"์ก๊ฐํธ"]
self.crawl = Crawling(actors_name) ... | {"/com_dayoung_api/ext/routes.py": ["/com_dayoung_api/resources/user.py", "/com_dayoung_api/resources/actor.py"], "/com_dayoung_api/actor_dont_use_this/dao.py": ["/com_dayoung_api/ext/db.py"], "/com_dayoung_api/resources/actor.py": ["/com_dayoung_api/ext/db.py", "/com_dayoung_api/resources/crawling.py"], "/com_dayoung_... |
29,354 | seunghany/dayoung-api | refs/heads/main | /com_dayoung_api/resources/user.py | import os
import json
from flask import request
from flask_restful import Resource, reqparse
from com_dayoung_api.ext.db import db, openSession # db ์ ํ Dayoungdb ์์
import pandas as pd
from com_dayoung_api.utils.file_helper import FileReader
from sqlalchemy import func
from sqlalchemy.ext.hybrid import hybrid_property... | {"/com_dayoung_api/ext/routes.py": ["/com_dayoung_api/resources/user.py", "/com_dayoung_api/resources/actor.py"], "/com_dayoung_api/actor_dont_use_this/dao.py": ["/com_dayoung_api/ext/db.py"], "/com_dayoung_api/resources/actor.py": ["/com_dayoung_api/ext/db.py", "/com_dayoung_api/resources/crawling.py"], "/com_dayoung_... |
29,355 | seunghany/dayoung-api | refs/heads/main | /run.py | from main import app
app.run(host='127.0.0.1', port='8080', debug=True)
'''
from flask import Flask
from flask_restful import Resource, Api
app = Flask(__name__)
api = Api(app)
class Rest(Resource):
def get(self):
return {'rest': 'Good !'}
def post(self):
return {'rest': 'post success !'}
... | {"/com_dayoung_api/ext/routes.py": ["/com_dayoung_api/resources/user.py", "/com_dayoung_api/resources/actor.py"], "/com_dayoung_api/actor_dont_use_this/dao.py": ["/com_dayoung_api/ext/db.py"], "/com_dayoung_api/resources/actor.py": ["/com_dayoung_api/ext/db.py", "/com_dayoung_api/resources/crawling.py"], "/com_dayoung_... |
29,356 | seunghany/dayoung-api | refs/heads/main | /main.py | """
This is main file
Creates table for use and connects database to SQLALCHEMY
"""
from flask import Flask
from flask_restful import Api
from flask_cors import CORS
from com_dayoung_api.ext.db import url, db
from com_dayoung_api.ext.routes import initialize_routes
from com_dayoung_api.resources.user import UserDao
... | {"/com_dayoung_api/ext/routes.py": ["/com_dayoung_api/resources/user.py", "/com_dayoung_api/resources/actor.py"], "/com_dayoung_api/actor_dont_use_this/dao.py": ["/com_dayoung_api/ext/db.py"], "/com_dayoung_api/resources/actor.py": ["/com_dayoung_api/ext/db.py", "/com_dayoung_api/resources/crawling.py"], "/com_dayoung_... |
29,357 | seunghany/dayoung-api | refs/heads/main | /com_dayoung_api/ext/db.py | from flask_sqlalchemy import SQLAlchemy
from sqlalchemy.ext.declarative import declarative_base
from sqlalchemy import create_engine
from sqlalchemy.orm import sessionmaker
db = SQLAlchemy()
config = {
'user' : 'root',
'password' : 'root',
'host': '127.0.0.1',
'port' : '3306',
'database' : 'dayoungd... | {"/com_dayoung_api/ext/routes.py": ["/com_dayoung_api/resources/user.py", "/com_dayoung_api/resources/actor.py"], "/com_dayoung_api/actor_dont_use_this/dao.py": ["/com_dayoung_api/ext/db.py"], "/com_dayoung_api/resources/actor.py": ["/com_dayoung_api/ext/db.py", "/com_dayoung_api/resources/crawling.py"], "/com_dayoung_... |
29,364 | Czshippee/Resnet50_MNIST | refs/heads/main | /mnist_reader.py | def load_mnist(path):
import os
import pandas as pd
import numpy as np
"""Load MNIST data from 'path'"""
data = pd.read_csv(path).values
trainsize = int(0.95*len(data))
train_data = data[0:trainsize, 1:]
train_label = data[0:trainsize, 0]
test_data = data[trainsize:, 1:]
tes... | {"/dataset_minst.py": ["/mnist_reader.py"], "/main.py": ["/dataset_minst.py", "/mnist_reader.py"]} |
29,365 | Czshippee/Resnet50_MNIST | refs/heads/main | /dataset_minst.py | from torchvision.datasets.vision import VisionDataset
import torchvision.transforms as transforms
import warnings
from PIL import Image
import os
import os.path
import numpy as np
import torch
import codecs
import string
from typing import Any, Callable, Dict, List, Optional, Tuple
from urllib.error import URLError
imp... | {"/dataset_minst.py": ["/mnist_reader.py"], "/main.py": ["/dataset_minst.py", "/mnist_reader.py"]} |
29,366 | Czshippee/Resnet50_MNIST | refs/heads/main | /main.py | import os
import torch
import torchvision
import torch.nn as nn
import torchvision.transforms as transforms
from dataset_minst import *
import time
import numpy as np
import argparse
from mnist_reader import *
from dataset_minst import *
import pdb
from datetime import datetime
from confusionmeter import *
import timm... | {"/dataset_minst.py": ["/mnist_reader.py"], "/main.py": ["/dataset_minst.py", "/mnist_reader.py"]} |
29,375 | OfalWoz/Bird_projekt | refs/heads/master | /run.py | import pygame
import sys
from player import Player
from tor_two_one import Tor_two_one
from tor_one_two import Tor_one_two
from tor_two_two import Tor_two_two
from pygame import mixer
class Two_two(object):
def __init__(self):
#konfiguracja
self.FPS = 60
click = False
pygame.init(... | {"/run.py": ["/player.py", "/tor_one_two.py"], "/tor_one_two.py": ["/run.py"]} |
29,376 | OfalWoz/Bird_projekt | refs/heads/master | /player.py | import pygame
from pygame.math import Vector2
class Player(object):
def __init__(self, game):
self.clock = pygame.time.Clock()
self.minutes = 0
self.seconds = 0
self.milliseconds = 0
self.font = pygame.font.Font(None, 32)
self.last_minutes = 0
self.last_sec... | {"/run.py": ["/player.py", "/tor_one_two.py"], "/tor_one_two.py": ["/run.py"]} |
29,377 | OfalWoz/Bird_projekt | refs/heads/master | /tor_one_two.py | import pygame
import sys
from pygame.math import Vector2
class Win_red(object):
def __init__(self):
click = False
# konfiguracja
self.FPS = 60
pygame.init()
self.szerokosc = 1280
self.wysokosc = 720
self.screen = pygame.display.set_mode((self.szerokosc, self... | {"/run.py": ["/player.py", "/tor_one_two.py"], "/tor_one_two.py": ["/run.py"]} |
29,378 | OfalWoz/Bird_projekt | refs/heads/master | /setup.py | from distutils.core import setup
import py2exe
setup(console= ['run.py'])
print('juz')
#DATA_FILES = ['bird_menu.png', 'bolid_blue_down.png', 'bolid_blue_down_left.png', 'bolid_blue_down_right.png', 'bolid_blue_up.png', 'bolid_blue_up_left.png'
# , 'bolid_blue_up_right.png', 'bolid_blue_right.png', 'bolid... | {"/run.py": ["/player.py", "/tor_one_two.py"], "/tor_one_two.py": ["/run.py"]} |
29,413 | mdelorme/potential_escapers_vis | refs/heads/master | /jacobi_surface.py | import numpy as np
import sys, os
import OpenGL.GL as gl
import vispy
from vispy import app, scene, visuals, gloo, io
from vispy.visuals import transforms
from vispy.visuals.line import line
from vispy.geometry.isosurface import isosurface
### Overriding mesh for the Isosurface, dimming the lighting ...
import mesh_ov... | {"/jacobi_surface.py": ["/mesh_override.py"]} |
29,414 | mdelorme/potential_escapers_vis | refs/heads/master | /mesh_override.py | from vispy.visuals import mesh
import numpy as np
### Overriding IsoSurface shaders, we don't want that bad default lighting
mesh.shading_vertex_template = """
varying vec3 v_normal_vec;
varying vec3 v_light_vec;
varying vec3 v_eye_vec;
varying vec4 v_ambientk;
varying vec4 v_light_color;
varying vec4 v_base_color;
... | {"/jacobi_surface.py": ["/mesh_override.py"]} |
29,415 | nliaoTW/simple_rest_service | refs/heads/main | /profile_api/apps.py | from django.apps import AppConfig
class SimpleRestApiConfig(AppConfig):
name = 'profile_api'
| {"/profile_api/views/__init__.py": ["/profile_api/views/ProfileViewSet.py", "/profile_api/views/UserLoginApiView.py", "/profile_api/views/UserProfileFeedViewSet.py"], "/profile_api/models/__init__.py": ["/profile_api/models/ProfileFeedItem.py"]} |
29,416 | nliaoTW/simple_rest_service | refs/heads/main | /profile_api/views/UserLoginApiView.py | from rest_framework.authtoken.views import ObtainAuthToken
from rest_framework.settings import api_settings
class UserLoginApiView(ObtainAuthToken):
"""Handle creating authentication tokens"""
renderer_classes = api_settings.DEFAULT_RENDERER_CLASSES | {"/profile_api/views/__init__.py": ["/profile_api/views/ProfileViewSet.py", "/profile_api/views/UserLoginApiView.py", "/profile_api/views/UserProfileFeedViewSet.py"], "/profile_api/models/__init__.py": ["/profile_api/models/ProfileFeedItem.py"]} |
29,417 | nliaoTW/simple_rest_service | refs/heads/main | /profile_api/tests/views/tests_HelloApiView.py | from django.test import TestCase
from rest_framework.test import APIRequestFactory
from profile_api.views.HelloApiView import HelloApiView
class HelloApiViewUnitTests(TestCase):
def test_get(self):
req = APIRequestFactory().get('/')
resp = HelloApiView.get(self, req)
self.assertEqual(resp.... | {"/profile_api/views/__init__.py": ["/profile_api/views/ProfileViewSet.py", "/profile_api/views/UserLoginApiView.py", "/profile_api/views/UserProfileFeedViewSet.py"], "/profile_api/models/__init__.py": ["/profile_api/models/ProfileFeedItem.py"]} |
29,418 | nliaoTW/simple_rest_service | refs/heads/main | /profile_api/tests/views/tests_HelloViewSet.py | from django.test import TestCase
from rest_framework.test import APIRequestFactory
from profile_api.views.HelloViewSet import HelloViewSet
class HelloApiViewUnitTests(TestCase):
def test_list(self):
req = APIRequestFactory().get('/')
resp = HelloViewSet.list(self, req)
self.assertEqual(re... | {"/profile_api/views/__init__.py": ["/profile_api/views/ProfileViewSet.py", "/profile_api/views/UserLoginApiView.py", "/profile_api/views/UserProfileFeedViewSet.py"], "/profile_api/models/__init__.py": ["/profile_api/models/ProfileFeedItem.py"]} |
29,419 | nliaoTW/simple_rest_service | refs/heads/main | /profile_api/views/__init__.py | from .HelloApiView import *
from .HelloViewSet import *
from .ProfileViewSet import *
from .UserLoginApiView import *
from .UserProfileFeedViewSet import *
| {"/profile_api/views/__init__.py": ["/profile_api/views/ProfileViewSet.py", "/profile_api/views/UserLoginApiView.py", "/profile_api/views/UserProfileFeedViewSet.py"], "/profile_api/models/__init__.py": ["/profile_api/models/ProfileFeedItem.py"]} |
29,420 | nliaoTW/simple_rest_service | refs/heads/main | /profile_api/models/ProfileFeedItem.py | from django.db import models
from django.conf import settings
class ProfileFeedItem(models.Model):
"""Profile status update"""
user_profile = models.ForeignKey(
settings.AUTH_USER_MODEL,
on_delete=models.CASCADE
)
status_text=models.CharField(max_length=255)
created_on=models.Date... | {"/profile_api/views/__init__.py": ["/profile_api/views/ProfileViewSet.py", "/profile_api/views/UserLoginApiView.py", "/profile_api/views/UserProfileFeedViewSet.py"], "/profile_api/models/__init__.py": ["/profile_api/models/ProfileFeedItem.py"]} |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.