max_stars_repo_path stringlengths 4 237 | max_stars_repo_name stringlengths 6 117 | max_stars_count int64 0 95.2k | id stringlengths 1 7 | content stringlengths 12 593k | input_ids listlengths 7 549k |
|---|---|---|---|---|---|
integration-testing/test/test_single_network_one.py | MicrohexHQ/CasperLabs | 0 | 151763 | import os
import logging
import pytest
import json
from pathlib import Path
from pytest import fixture, raises
from test.cl_node.contract_address import contract_address
from test.cl_node.common import testing_root_path, HELLO_NAME_CONTRACT
from test.cl_node.casperlabs_accounts import Account, GENESIS_ACCOUNT
from test... | [
1,
1053,
2897,
13,
5215,
12183,
13,
5215,
11451,
1688,
13,
5215,
4390,
13,
3166,
2224,
1982,
1053,
10802,
13,
3166,
11451,
1688,
1053,
5713,
15546,
29892,
1153,
4637,
13,
3166,
1243,
29889,
695,
29918,
3177,
29889,
1285,
1461,
29918,
73... |
cleaning/partition_domains_fixed_block_size.py | AGLDWG/ld-link-harvester | 0 | 95143 | import pandas as pd
IN_FILE = 'aus-domain-urls.txt'
START_IDX = 1186
BLOCK_SIZE = 100
OUT_FILE_PREFIX = 'partition_data/aus-domain-urls'
data = pd.read_csv(IN_FILE)
data_length = len(data)
for i in range(int(data_length - START_IDX / BLOCK_SIZE)):
if i == 0:
lower_bound = START_IDX
else:
lower... | [
1,
1053,
11701,
408,
10518,
13,
13,
1177,
29918,
7724,
353,
525,
1485,
29899,
7247,
29899,
26045,
29889,
3945,
29915,
13,
25826,
29918,
1367,
29990,
353,
29871,
29896,
29896,
29947,
29953,
13,
29933,
21339,
29918,
14226,
353,
29871,
29896,
... |
simple_chatbot/responses.py | Codingplace42/django-simple-chatbot | 9 | 120528 | <reponame>Codingplace42/django-simple-chatbot
from abc import ABC, abstractmethod
from random import choice
class BaseResponse(ABC):
@abstractmethod
def get_response(self):
pass
class GenericRandomResponse(BaseResponse):
choices = ()
def get_response(self):
return choice(self.choice... | [
1,
529,
276,
1112,
420,
29958,
29907,
3689,
6689,
29946,
29906,
29914,
14095,
29899,
12857,
29899,
13496,
7451,
13,
3166,
25638,
1053,
16417,
29892,
9846,
5696,
13,
3166,
4036,
1053,
7348,
13,
13,
13,
1990,
7399,
5103,
29898,
19658,
1125,... |
saleor/core/transactions.py | fairhopeweb/saleor | 15,337 | 1534 | from contextlib import contextmanager
from django.db import DatabaseError
from ..core.tracing import traced_atomic_transaction
@contextmanager
def transaction_with_commit_on_errors():
"""Perform transaction and raise an error in any occurred."""
error = None
with traced_atomic_transaction():
try... | [
1,
515,
3030,
1982,
1053,
3030,
12847,
13,
13,
3166,
9557,
29889,
2585,
1053,
5470,
2392,
13,
13,
3166,
6317,
3221,
29889,
29873,
945,
292,
1053,
16703,
287,
29918,
21641,
29918,
20736,
13,
13,
13,
29992,
4703,
12847,
13,
1753,
10804,
... |
test/python_unit/collision.py | proyan/hpp-fcl | 0 | 188747 | <filename>test/python_unit/collision.py
import unittest
from test_case import TestCase
import hppfcl
hppfcl.switchToNumpyArray()
import numpy as np
def tetahedron():
pts = hppfcl.StdVec_Vec3f()
pts.append(np.array((0, 0, 0)))
pts.append(np.array((0, 1, 0)))
pts.append(np.array((1, 0, 0)))
pts.app... | [
1,
529,
9507,
29958,
1688,
29914,
4691,
29918,
5441,
29914,
22017,
2459,
29889,
2272,
13,
5215,
443,
27958,
13,
3166,
1243,
29918,
4878,
1053,
4321,
8259,
13,
5215,
298,
407,
29888,
695,
13,
13,
29623,
29888,
695,
29889,
15123,
1762,
80... |
turdshovel/_stubs/System/Collections/Generic.py | daddycocoaman/turdshovel | 39 | 117303 | # encoding: utf-8
# module System.Collections.Generic calls itself Generic
# from mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089, System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089, Microsoft.Bcl.AsyncInterfaces, Version=1.0.0.0, Culture=neutral, PublicKeyToken=<KEY... | [
1,
396,
8025,
29901,
23616,
29899,
29947,
30004,
13,
29937,
3883,
2184,
29889,
19466,
29889,
15809,
5717,
3528,
3251,
293,
30004,
13,
29937,
515,
286,
1557,
272,
1982,
29892,
10079,
29922,
29946,
29889,
29900,
29889,
29900,
29889,
29900,
29... |
LinkUp/core/apis/algorithm_api.py | Justin-sd/LinkUp | 0 | 67204 | from ..models import *
from .availability_calendar_api import *
from .calendar_api import *
import json
from datetime import datetime, timedelta
def get_best(event_id):
"""
:param event_id: the id of the event we want to get best times of
:return: A list of sorted pairs: [ (time, [users]), (time, [users]... | [
1,
515,
6317,
9794,
1053,
334,
13,
3166,
869,
485,
737,
3097,
29918,
23392,
29918,
2754,
1053,
334,
13,
3166,
869,
23392,
29918,
2754,
1053,
334,
13,
5215,
4390,
13,
3166,
12865,
1053,
12865,
29892,
5335,
287,
2554,
13,
13,
13,
1753,
... |
src/starter/models.py | rehive/django-starter | 2 | 149545 | from logging import getLogger
import datetime
from uuid import uuid4
from django.contrib.postgres.fields import JSONField
from django.db import models
from django.utils.timezone import utc
logger = getLogger('django')
class Message(models.Model):
first_name = models.CharField(max_length=300, null=True, blank=Tr... | [
1,
515,
12183,
1053,
679,
16363,
13,
13,
5215,
12865,
13,
3166,
318,
5416,
1053,
318,
5416,
29946,
13,
13,
3166,
9557,
29889,
21570,
29889,
2490,
7201,
29889,
9621,
1053,
4663,
3073,
13,
3166,
9557,
29889,
2585,
1053,
4733,
13,
3166,
... |
app/home/views.py | 1IllI1/BBS_MIGRATE | 0 | 31423 | # coding:utf8
# 调用蓝图
from . import home
from flask import render_template, redirect, url_for, flash, session, request,current_app
from app.home.forms import RegistForm, LoginForm, UserdetailForm, PwdForm, CommentForm, PostForm
from app.models import User, UserLoginLog, Comment, Post,Col
from werkzeug.security import ge... | [
1,
396,
14137,
29901,
9420,
29947,
13,
29937,
29871,
31268,
30406,
235,
150,
160,
30861,
13,
3166,
869,
1053,
3271,
13,
3166,
29784,
1053,
4050,
29918,
6886,
29892,
6684,
29892,
3142,
29918,
1454,
29892,
11013,
29892,
4867,
29892,
2009,
2... |
networks/larflow/models/larflow_uresnet.py | LArbys/ublarcvserver | 2 | 221 | <filename>networks/larflow/models/larflow_uresnet.py
import torch.nn as nn
import torch as torch
import math
import torch.utils.model_zoo as model_zoo
###########################################################
#
# U-ResNet
# U-net witih ResNet modules
#
# Semantic segmentation network used by MicroBooNE
# to label tr... | [
1,
529,
9507,
29958,
11618,
29879,
29914,
4675,
1731,
29914,
9794,
29914,
4675,
1731,
29918,
1973,
1212,
29889,
2272,
13,
5215,
4842,
305,
29889,
15755,
408,
302,
29876,
13,
5215,
4842,
305,
408,
4842,
305,
13,
5215,
5844,
13,
5215,
484... |
relaax/algorithms/ddpg/parameter_server.py | deeplearninc/relaax | 71 | 6738 | from __future__ import absolute_import
from relaax.server.parameter_server import parameter_server_base
from relaax.server.common import session
from . import ddpg_model
class ParameterServer(parameter_server_base.ParameterServerBase):
def init_session(self):
self.session = session.Session(ddpg_model.Sha... | [
1,
515,
4770,
29888,
9130,
1649,
1053,
8380,
29918,
5215,
13,
3166,
10208,
1165,
29889,
2974,
29889,
15501,
29918,
2974,
1053,
3443,
29918,
2974,
29918,
3188,
13,
3166,
10208,
1165,
29889,
2974,
29889,
9435,
1053,
4867,
13,
13,
3166,
869,... |
PyBank/main.py | fannie-chang/Python-Challenge | 0 | 123615 | <reponame>fannie-chang/Python-Challenge<filename>PyBank/main.py
# Import os module to read CSV file
import os
import csv
# Path to collect data from the PyBank folder
budget_csv = os.path.join('..' ,'PyBank','Resources','budget_data.csv')
# Open the file
with open(budget_csv, newline='') as csvfile:
csvreader... | [
1,
529,
276,
1112,
420,
29958,
29888,
812,
347,
29899,
305,
574,
29914,
11980,
29899,
1451,
11768,
29966,
9507,
29958,
19737,
29933,
804,
29914,
3396,
29889,
2272,
13,
13,
29937,
16032,
2897,
3883,
304,
1303,
16874,
934,
13,
13,
5215,
2... |
aiidalab_widgets_base/export.py | danielhollas/aiidalab-widgets-base | 2 | 68805 | <filename>aiidalab_widgets_base/export.py
"""Widgets to manage AiiDA export."""
import os
from IPython.display import display
from ipywidgets import Button
class ExportButtonWidget(Button):
"""Export Node button."""
def __init__(self, process, **kwargs):
self.process = process
if "descriptio... | [
1,
529,
9507,
29958,
1794,
23670,
370,
29918,
8030,
29879,
29918,
3188,
29914,
15843,
29889,
2272,
13,
15945,
29908,
8801,
29879,
304,
10933,
319,
2236,
7698,
5609,
1213,
15945,
13,
5215,
2897,
13,
13,
3166,
5641,
1656,
29889,
4990,
1053,... |
flopy/utils/mfgrdfile.py | pjhaest/flopy | 0 | 162412 | import numpy as np
import collections
from ..utils.utils_def import FlopyBinaryData
from ..utils.reference import SpatialReference
class MfGrdFile(FlopyBinaryData):
def __init__(self, filename, precision='double', verbose=False):
"""
Class constructor.
"""
super(MfGrdFile, sel... | [
1,
1053,
12655,
408,
7442,
13,
5215,
16250,
13,
13,
3166,
6317,
13239,
29889,
13239,
29918,
1753,
1053,
26043,
2272,
25196,
1469,
13,
3166,
6317,
13239,
29889,
5679,
1053,
1706,
15238,
7422,
13,
13,
1990,
341,
29888,
3338,
29881,
2283,
... |
dataworkspace/dataworkspace/tests/eventlog/test_views.py | uktrade/jupyterhub-data-auth-admin | 1 | 130622 | <filename>dataworkspace/dataworkspace/tests/eventlog/test_views.py
from django.urls import reverse
from dataworkspace.tests import factories
from dataworkspace.tests.common import BaseAdminTestCase
class TestEventLogAdmin(BaseAdminTestCase):
def test_event_log_csv_download(self):
event1 = factories.Event... | [
1,
529,
9507,
29958,
1272,
1287,
3493,
29914,
1272,
1287,
3493,
29914,
21150,
29914,
3696,
1188,
29914,
1688,
29918,
7406,
29889,
2272,
13,
3166,
9557,
29889,
26045,
1053,
11837,
13,
13,
3166,
848,
1287,
3493,
29889,
21150,
1053,
2114,
38... |
onirim/card/_base.py | cwahbong/onirim-py | 0 | 148550 | """
Inner module for enumerations and base types.
"""
import logging
from onirim import util
LOGGER = logging.getLogger(__name__)
class Color(util.AutoNumberEnum):
"""
Enumerated colors of cards.
Attributes:
red
blue
green
yellow
"""
red = ()
blue = ()
... | [
1,
9995,
13,
27748,
3883,
363,
22447,
800,
322,
2967,
4072,
29889,
13,
15945,
29908,
13,
13,
5215,
12183,
13,
13,
3166,
373,
381,
326,
1053,
3667,
13,
13,
13,
14480,
17070,
353,
12183,
29889,
657,
16363,
22168,
978,
1649,
29897,
13,
... |
DAG/pipeline/service.py | zj-myidea/MYIDEA | 0 | 78966 | <gh_stars>0
from .model import Vertex, Graph, Edge,db, Pipeline, Track
from .config import getlogger
from functools import wraps
from collections import defaultdict
logger = getlogger(__name__,'./recode.log')
def transactional(fn):
@wraps(fn)
def wrapper(*args, **kwargs):
ret = fn(*args, **kwargs)... | [
1,
529,
12443,
29918,
303,
1503,
29958,
29900,
13,
3166,
869,
4299,
1053,
1798,
4776,
29892,
12367,
29892,
21086,
29892,
2585,
29892,
349,
23828,
29892,
17026,
13,
3166,
869,
2917,
1053,
679,
21707,
13,
3166,
2090,
312,
8789,
1053,
11463,... |
bin/snaptools_wrapper.py | mr-c/sc-atac-seq-pipeline | 0 | 130559 | <filename>bin/snaptools_wrapper.py
#!/usr/bin/env python3
from argparse import ArgumentParser
from os import fspath
from pathlib import Path
from subprocess import run
from typing import Callable, Dict, List, Tuple, Union
import snaptools_defaults
from utils import find_base_index_path, identity
# 3-tuples:
# [0] co... | [
1,
529,
9507,
29958,
2109,
29914,
29879,
1056,
415,
8789,
29918,
17699,
29889,
2272,
13,
29937,
14708,
4855,
29914,
2109,
29914,
6272,
3017,
29941,
13,
3166,
1852,
5510,
1053,
23125,
11726,
13,
3166,
2897,
1053,
285,
1028,
493,
13,
3166,
... |
api/app.py | sai-krishna-msk/KickAssist | 0 | 8588 | <gh_stars>0
from ml_model.model import KickModel
import numpy as np
import pandas as pd
import eli5
import joblib
import flask
from flask import Flask, render_template, request, jsonify
app = Flask(__name__)
model_oh = joblib.load('ml_model/estimators/model_oh.sav')
model_hel = joblib.load('ml_model/estimators/model... | [
1,
529,
12443,
29918,
303,
1503,
29958,
29900,
13,
3166,
286,
29880,
29918,
4299,
29889,
4299,
1053,
476,
860,
3195,
13,
5215,
12655,
408,
7442,
13,
5215,
11701,
408,
10518,
13,
5215,
560,
29875,
29945,
13,
5215,
4982,
1982,
13,
5215,
... |
wbia/algo/verif/clf_helpers.py | WildMeOrg/wildbook-ia | 20 | 71552 | # -*- coding: utf-8 -*-
"""
This module is a work in progress, as such concepts are subject to change.
MAIN IDEA:
`MultiTaskSamples` serves as a structure to contain and manipulate a set of
samples with potentially many different types of labels and features.
"""
import logging
import utool as ut
import ubelt ... | [
1,
396,
448,
29930,
29899,
14137,
29901,
23616,
29899,
29947,
448,
29930,
29899,
13,
15945,
29908,
13,
4013,
3883,
338,
263,
664,
297,
6728,
29892,
408,
1316,
22001,
526,
4967,
304,
1735,
29889,
13,
13,
29032,
15004,
29909,
29901,
13,
1... |
src/RNN_utils.py | SergioEG/ScalableAVITM | 3 | 152536 | <reponame>SergioEG/ScalableAVITM<filename>src/RNN_utils.py
"""
Grouping all parsers specifications here
@authors: <NAME> (<EMAIL>) AND
<NAME> (<EMAIL>)
"""
import argparse
import pickle
from pandas import read_csv
import numpy as np
from sklearn.feature_extraction.text import CountVectorizer
import loggin... | [
1,
529,
276,
1112,
420,
29958,
1748,
5346,
11787,
29914,
29636,
519,
7520,
1806,
29924,
29966,
9507,
29958,
4351,
29914,
29934,
10262,
29918,
13239,
29889,
2272,
13,
13,
15945,
29908,
13,
4782,
292,
599,
610,
4253,
2702,
800,
1244,
13,
... |
migrations/versions/5ae213c6353_.py | eugeneandrienko/PyArtistsGallery | 0 | 193247 | """empty message
Revision ID: 5ae213c6353
Revises: 3c73f5517a2
Create Date: 2015-07-01 16:08:50.298141
"""
# revision identifiers, used by Alembic.
revision = '<KEY>'
down_revision = '3c73f5517a2'
from alembic import op
import sqlalchemy as sa
def upgrade():
op.drop_index('ix_pictures_path_to_image')
op.d... | [
1,
9995,
6310,
2643,
13,
13,
1123,
4924,
3553,
29901,
29871,
29945,
3660,
29906,
29896,
29941,
29883,
29953,
29941,
29945,
29941,
13,
1123,
1730,
267,
29901,
29871,
29941,
29883,
29955,
29941,
29888,
29945,
29945,
29896,
29955,
29874,
29906,
... |
zink/templatetags/markdownify.py | jw/zink | 2 | 195206 | <reponame>jw/zink
import logging
from django import template
import mistune
from pygments import highlight
from pygments.formatters import html
from pygments.lexers import get_lexer_by_name, guess_lexer
from pygments.util import ClassNotFound
logger = logging.getLogger(__name__)
register = template.Library()
class... | [
1,
529,
276,
1112,
420,
29958,
29926,
29893,
29914,
29920,
682,
13,
5215,
12183,
13,
13,
3166,
9557,
1053,
4472,
13,
5215,
5862,
1540,
13,
3166,
19484,
1860,
1053,
12141,
13,
3166,
19484,
1860,
29889,
4830,
2153,
1053,
3472,
13,
3166,
... |
build/lib/tnetwork/DCD/analytics/dynamic_partition.py | Yquetzal/tnetwork | 4 | 87368 | import tnetwork as tn
import sklearn
import sklearn.metrics
import scipy
import statistics
import networkx as nx
from tnetwork.DCD.analytics.onmi import onmi
import numpy as np
__all__ = ["longitudinal_similarity", "consecutive_sn_similarity", "similarity_at_each_step", "entropy_by_node","nb_node_change","quality_at_e... | [
1,
1053,
260,
11618,
408,
260,
29876,
13,
5215,
2071,
19668,
13,
5215,
2071,
19668,
29889,
2527,
10817,
13,
5215,
4560,
2272,
13,
5215,
13964,
13,
5215,
3564,
29916,
408,
302,
29916,
13,
3166,
260,
11618,
29889,
29928,
6530,
29889,
7054... |
core/homography.py | Kaktusava/Vis-MVSNet | 131 | 153493 | import time
import os
import torch
from utils.utils import NanError
def depth2class(depth, depth_start, depth_interval, depth_num, inv=False):
if not inv:
return (depth - depth_start) / (depth_interval + 1e-9)
else:
depth_end = depth_start + (depth_num-1) * depth_interval
inv_interv =... | [
1,
1053,
931,
13,
5215,
2897,
13,
5215,
4842,
305,
13,
13,
3166,
3667,
29879,
29889,
13239,
1053,
25701,
2392,
13,
13,
13,
1753,
10809,
29906,
1990,
29898,
19488,
29892,
10809,
29918,
2962,
29892,
10809,
29918,
19207,
29892,
10809,
29918,... |
calixis/plan/submodels/weighted.py | kyleady/SectorsOfInequity | 0 | 72591 | from django.db import models
from django.forms.models import model_to_dict
class Weighted_Value(models.Model):
class Meta:
abstract = True
def get_weights_as_str(self):
weights = []
has_conditional_weights = False
for weight in self.weights.all():
if not ... | [
1,
515,
9557,
29889,
2585,
1053,
4733,
30004,
13,
3166,
9557,
29889,
9514,
29889,
9794,
1053,
1904,
29918,
517,
29918,
8977,
30004,
13,
30004,
13,
1990,
1334,
523,
287,
29918,
1917,
29898,
9794,
29889,
3195,
1125,
30004,
13,
1678,
770,
... |
tests/test_github.py | xhusar2/repocribro | 5 | 136567 | <filename>tests/test_github.py
import pytest
REPOSITORY = 'MarekSuchanek/pyplayground'
NOT_REPOSITORY = 'MarekSuchanek/pyplaygroundzzzz7'
def test_login_bad(github_api):
assert not github_api.login('random_code')
def test_get_user_self(github_api):
user = github_api.get('/user')
assert user.is_ok
a... | [
1,
529,
9507,
29958,
21150,
29914,
1688,
29918,
3292,
29889,
2272,
13,
5215,
11451,
1688,
13,
13,
1525,
24815,
1806,
18929,
353,
525,
29924,
598,
29895,
29903,
987,
273,
1416,
29914,
2272,
1456,
2057,
29915,
13,
12256,
29918,
1525,
24815,... |
qsBack/app/urls.py | joest67/qsProj | 0 | 58903 | from django.conf.urls import patterns, url
from qs import views
urlpatterns = patterns('',
url(r'^$', views.index, name='index'),
url(r'^sendqs/$', views.sendqs, name='sendqs'),
url(r'^show/$', views.showall, name='showall'),
)
| [
1,
515,
9557,
29889,
5527,
29889,
26045,
1053,
15038,
29892,
3142,
13,
13,
3166,
3855,
29879,
1053,
8386,
13,
13,
2271,
11037,
29879,
353,
15038,
877,
742,
13,
1678,
3142,
29898,
29878,
29915,
29985,
29938,
742,
8386,
29889,
2248,
29892,
... |
6.0_prs_random_forest.py.py | psohn/Forest_Fires_Regression | 2 | 53061 | <reponame>psohn/Forest_Fires_Regression
### because how can you not use random forest regression on a forest fire
### regression? this is lazily coded and uncommented. purely for entertainment
### and completion
import pandas as pd
from sklearn.ensemble import RandomForestClassifier
from sklearn.metrics import r... | [
1,
529,
276,
1112,
420,
29958,
567,
6547,
29914,
2831,
342,
29918,
29943,
2658,
29918,
4597,
23881,
13,
2277,
29937,
1363,
920,
508,
366,
451,
671,
4036,
13569,
17855,
373,
263,
13569,
3974,
30004,
13,
2277,
29937,
17855,
29973,
445,
33... |
ch02-安装OpenCV/最简单-使用pip安装opencv-python和opencv-contrib-python/test_video.py | makelove/OpenCV-Python-Tutorial | 2,875 | 47463 | # -*- coding: utf-8 -*-
# @Time : 2017/8/2 10:46
# @Author : play4fun
# @File : test_video.py
# @Software: PyCharm
"""
test_video.py:
"""
import numpy as np
import cv2
from matplotlib import pyplot as plt
cap = cv2.VideoCapture('../../data/vtest.avi')#不支持读取视频
# cap = cv2.VideoCapture('output.avi')
# cap = cv2... | [
1,
396,
448,
29930,
29899,
14137,
29901,
23616,
29899,
29947,
448,
29930,
29899,
13,
29937,
732,
2481,
1678,
584,
29871,
29906,
29900,
29896,
29955,
29914,
29947,
29914,
29906,
29871,
29896,
29900,
29901,
29946,
29953,
13,
29937,
732,
13720,
... |
tools/train.py | RocketFlash/SiameseNet | 24 | 1611133 | import os
import sys
BASE_DIR = os.path.dirname(os.path.abspath(__file__))
ROOT_DIR = os.path.dirname(BASE_DIR)
sys.path.append(ROOT_DIR)
import numpy as np
from embedding_net.models import EmbeddingNet, TripletNet, SiameseNet
from tensorflow.keras.callbacks import TensorBoard, LearningRateScheduler
from tensorflow.k... | [
1,
1053,
2897,
13,
5215,
10876,
13,
13,
25416,
29918,
9464,
353,
2897,
29889,
2084,
29889,
25721,
29898,
359,
29889,
2084,
29889,
370,
1028,
493,
22168,
1445,
1649,
876,
13,
21289,
29918,
9464,
353,
2897,
29889,
2084,
29889,
25721,
29898,... |
osprey/open.py | cjbassi/claw | 14 | 107087 | import subprocess
import sys
config_dir_path = None
history_file_path = None
log_file_path = None
def open(path):
if sys.platform == 'darwin':
subprocess.Popen(['open', path])
elif sys.platform == 'win32':
subprocess.Popen(['start', '', path])
else:
subprocess.Popen(['xdg-open', p... | [
1,
1053,
1014,
5014,
13,
5215,
10876,
13,
13,
2917,
29918,
3972,
29918,
2084,
353,
6213,
13,
18434,
29918,
1445,
29918,
2084,
353,
6213,
13,
1188,
29918,
1445,
29918,
2084,
353,
6213,
13,
13,
13,
1753,
1722,
29898,
2084,
1125,
13,
167... |
django_render/url_patterns_maker/url_patterns_maker.py | jasonmaoverlord/django_render | 76 | 81123 | <gh_stars>10-100
#!/usr/bin/env python
# -*- coding: utf-8 -*-
# Last modified: <NAME> (<EMAIL>)
"""urlpatterns_maker
This urlpatterns_maker is used to auto load url configurations loosely distributed in the ``views`` package.
Usage:
1. got views like this
#################################### my_app/views/defa... | [
1,
529,
12443,
29918,
303,
1503,
29958,
29896,
29900,
29899,
29896,
29900,
29900,
13,
29937,
14708,
4855,
29914,
2109,
29914,
6272,
3017,
13,
29937,
448,
29930,
29899,
14137,
29901,
23616,
29899,
29947,
448,
29930,
29899,
13,
29937,
9208,
9... |
mlops/data_validation/__init__.py | colingwuyu/mlops | 1 | 58361 | <reponame>colingwuyu/mlops
from mlops.data_validation.view import view_report
| [
1,
529,
276,
1112,
420,
29958,
1054,
292,
29893,
8631,
29884,
29914,
29885,
417,
567,
13,
3166,
286,
417,
567,
29889,
1272,
29918,
18157,
29889,
1493,
1053,
1776,
29918,
12276,
13,
2
] |
DML/datasets_ids.py | yuichikano/Fashion-Image-Retrieval-System | 0 | 1613209 | # Copyright 2019 <NAME> and <NAME>
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in wri... | [
1,
396,
14187,
1266,
29871,
29906,
29900,
29896,
29929,
529,
5813,
29958,
322,
529,
5813,
29958,
13,
29937,
13,
29937,
10413,
21144,
1090,
278,
13380,
19245,
29892,
10079,
29871,
29906,
29889,
29900,
313,
1552,
376,
29931,
293,
1947,
1496,
... |
tests/component_tests/test_session.py | lsawade/radical.pilot | 0 | 121768 | # pylint: disable=protected-access, unused-argument
__copyright__ = 'Copyright 2020, The RADICAL-Cybertools Team'
__license__ = 'MIT'
import glob
import os
import shutil
from unittest import TestCase, mock
import radical.pilot as rp
TEST_CASES_PATH = '%s/test_cases' % os.path.dirname(__file__)
# --------------... | [
1,
396,
282,
2904,
524,
29901,
11262,
29922,
24681,
29899,
5943,
29892,
443,
3880,
29899,
23516,
13,
13,
1649,
8552,
1266,
1649,
353,
525,
11882,
1266,
29871,
29906,
29900,
29906,
29900,
29892,
450,
390,
3035,
2965,
1964,
29899,
29733,
49... |
js_search/cms_apps.py | compoundpartners/js-search | 0 | 133077 | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.utils.translation import ugettext_lazy as _
from cms.app_base import CMSApp
from cms.apphook_pool import apphook_pool
from . import DEFAULT_APP_NAMESPACE
class SearchApp(CMSApp):
name = _('Search')
app_name = DEFAULT_APP_NAMESPACE... | [
1,
396,
448,
29930,
29899,
14137,
29901,
23616,
29899,
29947,
448,
29930,
29899,
13,
13,
3166,
4770,
29888,
9130,
1649,
1053,
29104,
29918,
20889,
1338,
13,
13,
3166,
9557,
29889,
13239,
29889,
3286,
18411,
1053,
318,
657,
726,
29918,
433... |
model/gif2png.py | THCloud9/naruto | 20 | 119220 | <reponame>THCloud9/naruto<filename>model/gif2png.py
#-*- coding: UTF-8 -*-
import os
from PIL import Image
def analyseImage(path):
'''''
Pre-process pass over the image to determine the mode (full or additive).
Necessary as assessing single frames isn't reliable. Need to know the mode ... | [
1,
529,
276,
1112,
420,
29958,
4690,
20442,
29929,
29914,
24156,
3066,
29966,
9507,
29958,
4299,
29914,
18660,
29906,
2732,
29889,
2272,
13,
29937,
29899,
29930,
29899,
14137,
29901,
18351,
29899,
29947,
448,
29930,
29899,
1678,
6756,
13,
5... |
ambry/dbexceptions.py | kball/ambry | 1 | 1605968 | """Common exception objects
Copyright (c) 2013 Clarinova. This file is licensed under the terms of the
Revised BSD License, included in this distribution as LICENSE.txt
"""
import textwrap
class BundleError(Exception):
def __init__(self, message, *args, **kwargs):
# Call the base class constructor with ... | [
1,
9995,
18877,
3682,
3618,
13,
13,
11882,
1266,
313,
29883,
29897,
29871,
29906,
29900,
29896,
29941,
15183,
262,
4273,
29889,
910,
934,
338,
7794,
21144,
1090,
278,
4958,
310,
278,
13,
1123,
11292,
350,
7230,
19245,
29892,
5134,
297,
... |
test_file.py | lulivi/gh-actions-tests | 0 | 66498 | <reponame>lulivi/gh-actions-tests
import pathlib
from os import environ
import path # type: ignore
def sample_function(text: str) -> None:
print(f"This is a test function")
print(f"The argument value is {text}")
def main() -> None:
"""Multiples errors."""
print("Sample file with bad formatting!!!"... | [
1,
529,
276,
1112,
420,
29958,
29880,
352,
8107,
29914,
12443,
29899,
7387,
29899,
21150,
13,
5215,
2224,
1982,
13,
3166,
2897,
1053,
12471,
13,
13,
5215,
2224,
29871,
396,
1134,
29901,
11455,
13,
13,
13,
1753,
4559,
29918,
2220,
29898,... |
build_dataset.py | KrishnaGarg/named-entity-recognition | 1 | 95575 | <gh_stars>1-10
import csv
import os
import sys
def load_dataset(path_csv):
"""Load dataset from csv file"""
with open(path_csv, encoding="windows-1252") as f:
csv_file = csv.reader(f, delimiter=',')
dataset = []; words = []; tags = []
# Each line of csv corresponds to one word
for idx, row in enumerate(csv... | [
1,
529,
12443,
29918,
303,
1503,
29958,
29896,
29899,
29896,
29900,
13,
5215,
11799,
13,
5215,
2897,
13,
5215,
10876,
13,
13,
1753,
2254,
29918,
24713,
29898,
2084,
29918,
7638,
1125,
13,
12,
15945,
29908,
5896,
8783,
515,
11799,
934,
1... |
sdk/python/pulumi_azure/automation/connection.py | suresh198526/pulumi-azure | 0 | 165971 | <gh_stars>0
# coding=utf-8
# *** WARNING: this file was generated by the Pulumi Terraform Bridge (tfgen) Tool. ***
# *** Do not edit by hand unless you're certain you know what you are doing! ***
import warnings
import pulumi
import pulumi.runtime
from typing import Any, Mapping, Optional, Sequence, Union
from .. impo... | [
1,
529,
12443,
29918,
303,
1503,
29958,
29900,
13,
29937,
14137,
29922,
9420,
29899,
29947,
13,
29937,
18610,
399,
25614,
29901,
445,
934,
471,
5759,
491,
278,
27477,
15547,
20839,
689,
16230,
313,
13264,
1885,
29897,
21704,
29889,
18610,
... |
start.py | AndersonOyama/TCC | 0 | 121507 | import re
from spellchecker import SpellChecker
def countSpellError(file):
spell = SpellChecker(language='pt')
lines = []
with open(file, 'r') as f:
lines = [word.replace('.', '').replace(',','') for line in f for word in line.split()]
f.close()
count = 0
misspelled = spell.unknown(li... | [
1,
1053,
337,
13,
13,
3166,
24779,
3198,
261,
1053,
1706,
514,
5596,
261,
13,
13,
1753,
2302,
5592,
514,
2392,
29898,
1445,
1125,
13,
13,
1678,
24779,
353,
1706,
514,
5596,
261,
29898,
11675,
2433,
415,
1495,
13,
1678,
3454,
353,
51... |
test-projects/django_1_0/urls.py | TheLitvinoff/django-async | 13 | 182659 | from django.conf.urls.defaults import *
from django.contrib import admin
admin.autodiscover()
urlpatterns = patterns('',
# Enable Slumber
(r'^slumber/', include('slumber.urls')),
# Uncomment the next line to enable the admin:
(r'^admin/(.*)', admin.site.root),
)
| [
1,
515,
9557,
29889,
5527,
29889,
26045,
29889,
4381,
29879,
1053,
334,
13,
3166,
9557,
29889,
21570,
1053,
4113,
13,
13,
13,
6406,
29889,
1300,
397,
10669,
957,
580,
13,
13,
2271,
11037,
29879,
353,
15038,
877,
742,
13,
1678,
396,
11... |
dockerimp.py | N4SJAMK/dockerimp | 0 | 195181 | #!/usr/bin/env python
DOCUMENTATION = '''
---
module: dockerimp
short_description: improved docker container management module
description:
- Manage docker containers with ansible
options:
name:
description:
- Set the name of the container
required: false
default: null
... | [
1,
18787,
4855,
29914,
2109,
29914,
6272,
3017,
13,
13,
28665,
5005,
3919,
8098,
353,
14550,
13,
5634,
13,
5453,
29901,
10346,
6574,
13,
12759,
29918,
8216,
29901,
16710,
10346,
5639,
10643,
3883,
13,
8216,
29901,
13,
1678,
448,
2315,
4... |
test/sql/test_insert.py | smarkets/sqlalchemy | 1 | 1607613 | <filename>test/sql/test_insert.py<gh_stars>1-10
#! coding:utf-8
from sqlalchemy import Column, Integer, MetaData, String, Table,\
bindparam, exc, func, insert, select
from sqlalchemy.dialects import mysql, postgresql
from sqlalchemy.engine import default
from sqlalchemy.testing import AssertsCompiledSQL,\
asse... | [
1,
529,
9507,
29958,
1688,
29914,
2850,
29914,
1688,
29918,
7851,
29889,
2272,
29966,
12443,
29918,
303,
1503,
29958,
29896,
29899,
29896,
29900,
13,
29937,
29991,
14137,
29901,
9420,
29899,
29947,
13,
13,
3166,
4576,
284,
305,
6764,
1053,
... |
shadow/apis/item.py | f1uzz/shadow | 1 | 16634 | from functools import lru_cache
from typing import Optional
import requests
from .patches import Patches
class Item:
"""
Manipulation of static item data
"""
ITEM_URL = f"http://ddragon.leagueoflegends.com/cdn/{Patches.get_current_patch()}/data/en_US/item.json"
items = requests.get(ITEM_URL).js... | [
1,
515,
2090,
312,
8789,
1053,
301,
582,
29918,
8173,
13,
3166,
19229,
1053,
28379,
13,
13,
5215,
7274,
13,
13,
3166,
869,
5041,
267,
1053,
349,
905,
267,
13,
13,
13,
1990,
10976,
29901,
13,
1678,
9995,
13,
1678,
2315,
666,
2785,
... |
data/data_utils.py | hjonnala/deeplab2 | 0 | 91394 | <filename>data/data_utils.py
# coding=utf-8
# Copyright 2022 The Deeplab2 Authors.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unles... | [
1,
529,
9507,
29958,
1272,
29914,
1272,
29918,
13239,
29889,
2272,
13,
29937,
14137,
29922,
9420,
29899,
29947,
13,
29937,
14187,
1266,
29871,
29906,
29900,
29906,
29906,
450,
897,
29872,
572,
370,
29906,
13189,
943,
29889,
13,
29937,
13,
... |
project/graddetmf.py | felixzheng02/pypkpd | 9 | 185599 | <gh_stars>1-10
"""
## Function translated automatically using 'matlab.to.r()'
## Author: <NAME>, <NAME>
"""
import numpy as np
from project.cell import cell
from project.size import size
from project.zeros import zeros
from project.mftot import mftot
from project.mf_all import mf_all
from project.get_... | [
1,
529,
12443,
29918,
303,
1503,
29958,
29896,
29899,
29896,
29900,
13,
15945,
19451,
13,
30004,
13,
30004,
13,
2277,
6680,
20512,
6336,
773,
525,
2922,
8205,
29889,
517,
29889,
29878,
580,
29915,
30004,
13,
2277,
13361,
29901,
529,
5813,... |
main.py | Meat0Project/ChatBot | 4 | 1682 | '''
Made by - <NAME>
Purpose - Python mini project
Date - 18 october 2020
'''
from chatterbot import ChatBot
from chatterbot.trainers import ChatterBotCorpusTrainer
form termcolor import cprint
import time
chatbot = ChatBot('Bot')
trainer = ChatterBotCorpusTrainer(chatbot)
trainer.train('chatterbot.corpus.english')
... | [
1,
14550,
13,
29924,
1943,
491,
448,
529,
5813,
29958,
13,
29925,
332,
4220,
448,
5132,
20629,
2060,
13,
2539,
29871,
448,
29871,
29896,
29947,
4725,
4950,
29871,
29906,
29900,
29906,
29900,
13,
12008,
13,
3166,
521,
2620,
7451,
1053,
6... |
188.py | RafaelHuang87/Leet-Code-Practice | 0 | 138961 | <filename>188.py
class Solution:
def maxProfit(self, k: int, prices: List[int]) -> int:
n, res = len(prices), 0
if n < 2:
return 0
if k > n // 2:
for i in range(1, n):
if prices[i] > prices[i - 1]:
res += prices[i] - prices[i - 1]
... | [
1,
529,
9507,
29958,
29896,
29947,
29947,
29889,
2272,
13,
1990,
24380,
29901,
13,
1678,
822,
4236,
1184,
9202,
29898,
1311,
29892,
413,
29901,
938,
29892,
26094,
29901,
2391,
29961,
524,
2314,
1599,
938,
29901,
13,
4706,
302,
29892,
620,... |
run_create_ec2_keypair.py | HardBoiledSmith/johanna | 64 | 119448 | <reponame>HardBoiledSmith/johanna<filename>run_create_ec2_keypair.py
#!/usr/bin/env python3
import os
import subprocess
from multiprocessing import Process
env = dict(os.environ)
def read_file(file_path):
f = open(file_path)
lines = list()
for ll in f.readlines():
lines.append(ll)
f.close()
... | [
1,
529,
276,
1112,
420,
29958,
29950,
538,
8431,
2356,
29209,
29914,
29926,
1148,
9713,
29966,
9507,
29958,
3389,
29918,
3258,
29918,
687,
29906,
29918,
446,
1478,
1466,
29889,
2272,
13,
29937,
14708,
4855,
29914,
2109,
29914,
6272,
3017,
... |
exercises/es/test_04_10.py | mariacamilagl/spacy-course | 0 | 167693 | def test():
assert len(TRAINING_DATA) == 4, "Los datos de entrenamiento no concuerdan – esperaba 4 ejemplos."
assert all(
len(entry) == 2 and isinstance(entry[1], dict) for entry in TRAINING_DATA
), "Formato incorrecto de los datos de entrenamiento. Esperaba una lista de tuples dónde el segundo elem... | [
1,
822,
1243,
7295,
13,
1678,
4974,
7431,
29898,
29911,
4717,
1177,
4214,
29918,
14573,
29897,
1275,
29871,
29946,
29892,
376,
29286,
18683,
316,
875,
1267,
9993,
694,
3022,
29884,
2018,
273,
785,
17451,
5363,
29871,
29946,
8574,
16305,
3... |
python_fundamentals/lists_basics_exs/football_cards.py | deboradyankova/python_education | 0 | 1605434 | <gh_stars>0
team_a_players = 11
team_b_players = 11
cards_list = set(input().split())
is_terminated = False
for player in cards_list:
if player.startswith('A'):
team_a_players -= 1
else:
team_b_players -= 1
if team_a_players < 7 or team_b_players < 7:
is_terminated ... | [
1,
529,
12443,
29918,
303,
1503,
29958,
29900,
13,
14318,
29918,
29874,
29918,
1456,
414,
353,
29871,
29896,
29896,
30004,
13,
14318,
29918,
29890,
29918,
1456,
414,
353,
29871,
29896,
29896,
30004,
13,
30004,
13,
28160,
29918,
1761,
353,
... |
modules/image/image_processing/prnet/utils/rotate_vertices.py | AK391/PaddleHub | 1 | 132611 | # Copyright (c) 2021 PaddlePaddle Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by appli... | [
1,
396,
14187,
1266,
313,
29883,
29897,
29871,
29906,
29900,
29906,
29896,
349,
22352,
29925,
22352,
13189,
943,
29889,
2178,
26863,
2538,
9841,
29889,
13,
29937,
13,
29937,
10413,
21144,
1090,
278,
13380,
19245,
29892,
10079,
29871,
29906,
... |
src/ethogram.py | dstern/SongExplorer | 5 | 1602902 | <reponame>dstern/SongExplorer
#!/usr/bin/python3
# apply per-class thresholds to discretize probabilities
# ethogram.py <logdir> <model> <thresholds-file> <tf-file> <wav-tic-rate>
# e.g.
# ethogram.py `pwd`/trained-classifier 1k 50 `pwd`/groundtruth-data/round1/20161207T102314_ch1_p1.tf 5000
import sys
import os
i... | [
1,
529,
276,
1112,
420,
29958,
22992,
824,
29914,
29903,
549,
1252,
14716,
13,
29937,
14708,
4855,
29914,
2109,
29914,
4691,
29941,
13,
13,
29937,
3394,
639,
29899,
1990,
266,
3781,
3361,
304,
766,
4838,
675,
2070,
11614,
13,
29871,
13,... |
tests/test_script.py | sharad28/Tensile_-_compressive_strength | 1 | 1611631 | import unittest
from main import app
import os
class TestToPerform(unittest.TestCase):
def setUp(self):
self.app = app.test_client()
def tearDown(self):
pass
def test_page(self):
response = self.app.get('/', follow_redirects=True)
print(response)
self.assertEqual... | [
1,
1053,
443,
27958,
13,
13,
3166,
1667,
1053,
623,
13,
5215,
2897,
13,
13,
13,
1990,
4321,
1762,
5894,
689,
29898,
348,
27958,
29889,
3057,
8259,
1125,
13,
1678,
822,
731,
3373,
29898,
1311,
1125,
13,
4706,
1583,
29889,
932,
353,
6... |
ad2/aula_09/leitura_com_close.py | renzon/fundamentos-de-programacao | 6 | 138559 | <gh_stars>1-10
arquivo = open('exemplo.txt', 'r', encoding='utf8')
for linha in arquivo:
print(linha.strip())
arquivo.close()
| [
1,
529,
12443,
29918,
303,
1503,
29958,
29896,
29899,
29896,
29900,
13,
19862,
4243,
353,
1722,
877,
735,
13141,
29889,
3945,
742,
525,
29878,
742,
8025,
2433,
9420,
29947,
1495,
13,
13,
1454,
6276,
2350,
297,
19325,
4243,
29901,
13,
16... |
bin/analyze_path.py | sjtuzyk/chandra-acis-analysis | 3 | 104108 | <reponame>sjtuzyk/chandra-acis-analysis
#!/usr/bin/env python3
#
# Copyright (c) 2017-2018 <NAME> <<EMAIL>>
# MIT license
#
"""
Extract the object name and observation ID from the directory path.
The base directory of the object data has the format: <name>_oi<obsid>
"""
import os
import argparse
from _context impor... | [
1,
529,
276,
1112,
420,
29958,
29879,
29926,
9161,
20973,
29914,
305,
10738,
29899,
562,
275,
29899,
15916,
13,
29937,
14708,
4855,
29914,
2109,
29914,
6272,
3017,
29941,
13,
29937,
13,
29937,
14187,
1266,
313,
29883,
29897,
29871,
29906,
... |
Collection_Resources/Email_Integration.py | data4d/Data_Collect | 0 | 199085 | <reponame>data4d/Data_Collect
# Email Integration for Notifications
import sys
import smtplib
from email.mime.text import MIMEText
from email.mime.multipart import MIMEMultipart
## Import Passwords - Importing Passwords from a file stored elsewhere on my computer
# sys.path.append('C:/Users/GTayl/Desktop/Finance Mo... | [
1,
529,
276,
1112,
420,
29958,
1272,
29946,
29881,
29914,
1469,
29918,
28916,
13,
396,
22608,
17100,
362,
363,
2216,
8232,
13,
13,
5215,
10876,
13,
5215,
1560,
9392,
1982,
13,
3166,
4876,
29889,
29885,
603,
29889,
726,
1053,
341,
8890,
... |
scripts/git2types/git2_type_rebase.py | git24j/git24j | 25 | 125347 | import re
from .git2_types import Git2Type
from .git2_type_common import (
Git2TypeConstObject,
Git2TypeOutObject,
PAT1_STR,
PAT2_STR,
PAT3_STR,
)
class Git2TypeConstRebaseOptions(Git2TypeConstObject):
PAT = re.compile(PAT1_STR + "(?P<obj_name>rebase_options)" + PAT2_STR)
class Git2TypeOutRe... | [
1,
1053,
337,
13,
13,
3166,
869,
5559,
29906,
29918,
8768,
1053,
11786,
29906,
1542,
13,
3166,
869,
5559,
29906,
29918,
1853,
29918,
9435,
1053,
313,
13,
1678,
11786,
29906,
1542,
12075,
2061,
29892,
13,
1678,
11786,
29906,
1542,
3744,
... |
app.py | Andrew-Ritchie/Web-Based-Dashboard-for-Nanoindentation-Experiments | 1 | 1602932 | import dash
import dash_bootstrap_components as dbc
from flask_caching import Cache
app = dash.Dash(external_stylesheets=[dbc.themes.BOOTSTRAP])
app.config.suppress_callback_exceptions = True
cache = Cache(app.server, config={
'CACHE_TYPE': 'filesystem',
'CACHE_DIR': 'cache-directory'
})
server = app.server... | [
1,
1053,
12569,
13,
5215,
12569,
29918,
8704,
29918,
14036,
408,
4833,
29883,
13,
3166,
29784,
29918,
29883,
9733,
1053,
28540,
13,
13,
13,
13,
932,
353,
12569,
29889,
29928,
1161,
29898,
23176,
29918,
9783,
354,
1691,
11759,
11140,
29889... |
PytoTests/test_pyto.py | snazari/Pyto | 701 | 67576 | <gh_stars>100-1000
"""
Tests for Pyto before submitting to the App Store.
"""
import unittest
import runpy
import sys
import os
class TestPyto(unittest.TestCase):
def test_lib(self):
from Lib import (apps, location, mainthread, motion,
multipeer, music, notification_center, notifications,
... | [
1,
529,
12443,
29918,
303,
1503,
29958,
29896,
29900,
29900,
29899,
29896,
29900,
29900,
29900,
13,
15945,
29908,
13,
24376,
363,
10772,
517,
1434,
11834,
5367,
304,
278,
2401,
14491,
29889,
13,
15945,
29908,
13,
13,
5215,
443,
27958,
13,... |
CodingInterviews/python/48_add.py | YorkFish/git_study | 0 | 62080 | #!/usr/bin/env python3
# coding:utf-8
class Solution:
def Add(self, num1, num2):
"""
num1 ^ num2: 不计进位的相加
(num1 & num2) << 1: 进位
循环至进位为零
~(num1 ^ 0xffffffff): 模仿 C,当 num1 为负数时,把它从无符号数转为有符号数
C 的 int 的高位是符号位,Python 没有
"""
while num2 != 0:
... | [
1,
18787,
4855,
29914,
2109,
29914,
6272,
3017,
29941,
13,
29937,
14137,
29901,
9420,
29899,
29947,
13,
13,
13,
1990,
24380,
29901,
13,
1678,
822,
3462,
29898,
1311,
29892,
954,
29896,
29892,
954,
29906,
1125,
13,
4706,
9995,
13,
4706,
... |
Server/website/serializers.py | HarshShah1997/Rotary-Website | 0 | 121020 | """
Author: harsh
"""
from rest_framework.serializers import ModelSerializer
from website.models import Event, Announcement, BoardMember, Photo
class EventSerializer(ModelSerializer):
class Meta:
model = Event
fields = '__all__'
class AnnouncementSerializer(ModelSerializer):
class Meta:
... | [
1,
9995,
13,
13720,
29901,
4023,
845,
13,
15945,
29908,
13,
13,
3166,
1791,
29918,
4468,
29889,
15550,
19427,
1053,
8125,
17679,
13,
13,
3166,
4700,
29889,
9794,
1053,
6864,
29892,
8081,
1309,
13561,
29892,
12590,
13404,
29892,
1963,
3747... |
linkedSPLs/LinkedSPLs-update/mappings/ChEBI-DrugBank-bio2rdf-mapping/scripts/backups/parseDBIdAndUNIIsByInChikey.py | kqingcan/bio2rdf-scripts | 76 | 137787 | <gh_stars>10-100
'''
Created 03/20/2014
@authors: <NAME>
@summary: parse inchikey and drugbank_id from drugbank.xml then parse
inchikey, FDA Preferred Term and UNII from UNIIs records
match the results from drugbank and results of parse UNIIs
records output terms: FDA Preferred Term, UNI... | [
1,
529,
12443,
29918,
303,
1503,
29958,
29896,
29900,
29899,
29896,
29900,
29900,
13,
12008,
13,
20399,
29871,
29900,
29941,
29914,
29906,
29900,
29914,
29906,
29900,
29896,
29946,
13,
13,
29992,
5150,
943,
29901,
529,
5813,
29958,
13,
13,
... |
groclient/constants.py | eric-gro/api-client | 18 | 6915 | """Constants about the Gro ontology that can be imported and re-used anywhere."""
REGION_LEVELS = {
'world': 1,
'continent': 2,
'country': 3,
'province': 4, # Equivalent to state in the United States
'district': 5, # Equivalent to county in the United States
'city': 6,
'market': 7,
'o... | [
1,
9995,
26570,
1048,
278,
6070,
4625,
3002,
393,
508,
367,
19673,
322,
337,
29899,
3880,
12214,
1213,
15945,
13,
13,
18166,
2725,
29918,
1307,
29963,
6670,
29903,
353,
426,
13,
1678,
525,
11526,
2396,
29871,
29896,
29892,
13,
1678,
525... |
processing/router.py | uncharted-distil/distil-auto-ml | 2 | 49246 | <filename>processing/router.py
#!/usr/bin/env python
"""
distil/router.py
"""
import logging
import sys
from copy import deepcopy
from typing import Sequence, Tuple
from d3m.metadata import problem as _problem
logger = logging.getLogger(__name__)
SMALL_DATASET_THRESH = 2000
# --
# Detect semantic problem typ... | [
1,
529,
9507,
29958,
19170,
29914,
15140,
29889,
2272,
13,
29937,
14708,
4855,
29914,
2109,
29914,
6272,
3017,
13,
13,
15945,
29908,
13,
1678,
1320,
309,
29914,
15140,
29889,
2272,
13,
15945,
29908,
13,
13,
5215,
12183,
13,
5215,
10876,
... |
src/resource_resolver/core/ResourceProxy.py | Moyoka22/resource-resolver | 0 | 102860 | <reponame>Moyoka22/resource-resolver<gh_stars>0
import logging
import shutil
from io import StringIO, TextIOBase
from pathlib import Path
import tempfile
from typing import IO, Literal, Union, cast
from .errors import ResourceResolverError
from .managers import ManagerRegistry
class ResourceProxy:
GET_AS_FORMATS... | [
1,
529,
276,
1112,
420,
29958,
29924,
12602,
17029,
29906,
29906,
29914,
10314,
29899,
9778,
369,
29966,
12443,
29918,
303,
1503,
29958,
29900,
13,
5215,
12183,
13,
5215,
528,
4422,
13,
3166,
12013,
1053,
1714,
5971,
29892,
3992,
5971,
51... |
orange3/Orange/tests/test_domain.py | rgschmitz1/BioDepot-workflow-builder | 54 | 63788 | # Test methods with long descriptive names can omit docstrings
# pylint: disable=missing-docstring
import warnings
from time import time
from numbers import Real
from itertools import starmap, chain
import unittest
import pickle
import numpy as np
from numpy.testing import assert_array_equal
from Orange.data import (... | [
1,
396,
4321,
3519,
411,
1472,
29037,
573,
2983,
508,
288,
2415,
1574,
19651,
13,
29937,
282,
2904,
524,
29901,
11262,
29922,
27259,
29899,
1514,
1807,
13,
5215,
18116,
13,
3166,
931,
1053,
931,
13,
3166,
3694,
1053,
8195,
13,
3166,
4... |
utils/save_result.py | AnnLIU15/SegCovid | 0 | 146313 | <reponame>AnnLIU15/SegCovid
import os
import cv2
import numpy as np
def torch2imgs(output):
'''
函数为将torch数据转为2维图片保存
'''
shapeOFoutput = output.shape
if len(shapeOFoutput) == 3 and shapeOFoutput[0] > 1:
# 将one-hot结果选取最大值
imgs_array = output.argmax(dim=0).clone().detach().cpu().nump... | [
1,
529,
276,
1112,
420,
29958,
2744,
29876,
5265,
29965,
29896,
29945,
29914,
17669,
29907,
586,
333,
13,
5215,
2897,
13,
13,
5215,
13850,
29906,
13,
5215,
12655,
408,
7442,
13,
13,
13,
1753,
4842,
305,
29906,
2492,
29879,
29898,
4905,
... |
test/dpt_tests/dpt_float_test.py | kistlin/xknx | 1 | 130004 | """Unit test for KNX 2 and 4 byte float objects."""
import math
import struct
from unittest.mock import patch
import pytest
from xknx.dpt import (
DPT2ByteFloat,
DPT4ByteFloat,
DPTElectricCurrent,
DPTElectricPotential,
DPTEnthalpy,
DPTFrequency,
DPTHumidity,
DPTLux,
DPTPartsPerMill... | [
1,
9995,
8325,
1243,
363,
476,
29940,
29990,
29871,
29906,
322,
29871,
29946,
7023,
5785,
3618,
1213,
15945,
13,
5215,
5844,
13,
5215,
2281,
13,
3166,
443,
27958,
29889,
17640,
1053,
13261,
13,
13,
5215,
11451,
1688,
13,
13,
3166,
921,
... |
liftaway/low_level.py | elj/liftaway | 0 | 167872 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
"""Liftaway Low-Level (GPIO and PCA) module."""
import random
import busio
import RPi.GPIO as GPIO
from adafruit_pca9685 import PCA9685
from board import SCL, SDA
from liftaway.constants import control_outputs
i2c_bus = busio.I2C(SCL, SDA)
pca = PCA9685(i2c_bus)
def i... | [
1,
18787,
4855,
29914,
2109,
29914,
6272,
3017,
13,
29937,
448,
29930,
29899,
14137,
29901,
23616,
29899,
29947,
448,
29930,
29899,
13,
15945,
29908,
29931,
361,
941,
1582,
17511,
29899,
10108,
313,
29954,
2227,
29949,
322,
349,
5454,
29897... |
examples/retrieve/owners_retrieve.py | jhurd-tc/threatconnect-python | 0 | 127972 | # -*- coding: utf-8 -*-
""" standard """
import ConfigParser
from random import randint
import sys
""" custom """
from threatconnect import ThreatConnect
from threatconnect.Config.FilterOperator import FilterSetOperator
# configuration file
config_file = "tc.conf"
# retrieve configuration file
config = ConfigParser... | [
1,
396,
448,
29930,
29899,
14137,
29901,
23616,
29899,
29947,
448,
29930,
29899,
13,
13,
15945,
29908,
3918,
9995,
13,
5215,
12782,
11726,
13,
3166,
4036,
1053,
20088,
524,
13,
5215,
10876,
13,
13,
15945,
29908,
2888,
9995,
13,
3166,
28... |
anime_downloader/__version__.py | cmjesz/anime-downloader | 1 | 110593 | __version__ = '4.0.0.r1'
| [
1,
4770,
3259,
1649,
353,
525,
29946,
29889,
29900,
29889,
29900,
29889,
29878,
29896,
29915,
13,
2
] |
drogher/package/fedex.py | thisisnotmyuserid/drogher | 13 | 14932 | <filename>drogher/package/fedex.py
import itertools
from .base import Package
class FedEx(Package):
shipper = 'FedEx'
class FedExExpress(FedEx):
barcode_pattern = r'^\d{34}$'
@property
def tracking_number(self):
return self.barcode[20:22].lstrip('0') + self.barcode[22:]
@property
... | [
1,
529,
9507,
29958,
29881,
9102,
2276,
29914,
5113,
29914,
29888,
287,
735,
29889,
2272,
13,
5215,
4256,
8504,
13,
13,
3166,
869,
3188,
1053,
22029,
13,
13,
13,
1990,
17972,
1252,
29898,
14459,
1125,
13,
1678,
528,
29875,
2496,
353,
... |
tests/eth_detectors.py | Srinivas11789/manticore | 0 | 57757 | <filename>tests/eth_detectors.py
"""
File name is purposefully not test_* to run this test separately.
"""
import inspect
import shutil
import struct
import tempfile
import unittest
import os
from manticore.core.smtlib import operators
from eth_general import make_mock_evm_state
from manticore.ethereum import Mantico... | [
1,
529,
9507,
29958,
21150,
29914,
621,
29918,
4801,
11142,
29889,
2272,
13,
15945,
29908,
13,
2283,
1024,
338,
6437,
3730,
451,
1243,
24563,
304,
1065,
445,
1243,
16949,
29889,
13,
15945,
29908,
13,
13,
5215,
16096,
13,
5215,
528,
4422... |
dataactcore/migrations/versions/20b5109967bf_.py | brianherman/data-act-broker-backend | 1 | 138424 | """empty message
Revision ID: 20b5109967bf
Revises: 17ec44522729, <PASSWORD>
Create Date: 2017-04-03 11:25:27.381702
"""
# revision identifiers, used by Alembic.
revision = '<KEY>'
down_revision = ('17ec44522729', '<PASSWORD>')
branch_labels = None
depends_on = None
from alembic import op
import sqlalchemy as sa
... | [
1,
9995,
6310,
2643,
13,
13,
1123,
4924,
3553,
29901,
29871,
29906,
29900,
29890,
29945,
29896,
29900,
29929,
29929,
29953,
29955,
1635,
13,
1123,
1730,
267,
29901,
29871,
29896,
29955,
687,
29946,
29946,
29945,
29906,
29906,
29955,
29906,
... |
python/edna/src/edna/emit/StdoutEmit.py | prernaagarwal/cs6235Project | 3 | 75778 | from edna.emit import BaseEmit
from sys import stdout
class StdoutEmit(BaseEmit):
"""An Emitter that writes to Stdout"""
def write(self):
"""Writes the message to the standard output. Ideally, the message should be a string. This is useful only for debugging."""
# NOT an efficient method, but ... | [
1,
515,
1226,
1056,
29889,
21976,
1053,
7399,
29923,
2415,
13,
13,
3166,
10876,
1053,
27591,
13,
13,
1990,
624,
29881,
449,
29923,
2415,
29898,
5160,
29923,
2415,
1125,
13,
1678,
9995,
2744,
382,
2415,
357,
393,
15873,
304,
624,
29881,
... |
tests/creditcrawler_test.py | Mivinci/cqupt-piper | 3 | 16606 | import requests
from bs4 import BeautifulSoup
from prettytable import PrettyTable
# html = requests.get(
# 'http://jwzx.cqu.pt/student/xkxfTj.php',
# cookies={'PHPSESSID': 'o2r2fpddrj892dp1ntqddcp2hv'}).text
# soup = BeautifulSoup(html, 'html.parser')
# for tr in soup.find('table', {'id': 'AxfTjTable'}).find... | [
1,
1053,
7274,
13,
3166,
24512,
29946,
1053,
25685,
29903,
1132,
13,
3166,
5051,
2371,
1053,
4721,
4349,
3562,
13,
13,
29937,
3472,
353,
7274,
29889,
657,
29898,
13,
29937,
268,
525,
1124,
597,
29926,
29893,
29920,
29916,
29889,
29883,
... |
antlr/SevenBillionHumansParser.py | behrmann/7billionhumans | 45 | 28907 | from antlr4 import *
from antlr4.error.ErrorListener import ErrorListener
from antlr.SBHasmLexer import SBHasmLexer
from antlr.SBHasmListener import SBHasmListener
from antlr.SBHasmParser import SBHasmParser
class MyErrorListener(ErrorListener):
def __init__(self):
super(MyErrorListener, self).__init__(... | [
1,
515,
3677,
29212,
29946,
1053,
334,
13,
3166,
3677,
29212,
29946,
29889,
2704,
29889,
2392,
3962,
1053,
4829,
3962,
13,
13,
3166,
3677,
29212,
29889,
1744,
29950,
11625,
29931,
735,
261,
1053,
317,
29933,
29950,
11625,
29931,
735,
261,... |
analyzer/codechecker_analyzer/analyzers/clangsa/ctu_autodetection.py | ryankurte/codechecker | 1,601 | 97498 | # -------------------------------------------------------------------------
#
# Part of the CodeChecker project, under the Apache License v2.0 with
# LLVM Exceptions. See LICENSE for license information.
# SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
#
# ---------------------------------------------------... | [
1,
396,
448,
2683,
2683,
2683,
2683,
1378,
13,
29937,
13,
29937,
29871,
3455,
310,
278,
5920,
5596,
261,
2060,
29892,
1090,
278,
13380,
19245,
325,
29906,
29889,
29900,
411,
13,
29937,
29871,
27624,
9219,
8960,
29879,
29889,
2823,
365,
... |
stsc_autograd.py | NathanHowell/STSC | 27 | 162068 | from autograd import numpy as npy
from functools import reduce
from scipy.optimize import minimize
from autograd import grad
def generate_Givens_rotation(i, j, theta, size):
g = npy.eye(size)
c = npy.cos(theta)
s = npy.sin(theta)
g[i, i] = 0
g[j, j] = 0
g[j, i] = 0
g[i, j] = 0
ii_mat =... | [
1,
515,
1120,
468,
3665,
1053,
12655,
408,
302,
2272,
13,
3166,
2090,
312,
8789,
1053,
10032,
13,
3166,
4560,
2272,
29889,
20640,
675,
1053,
6260,
675,
13,
3166,
1120,
468,
3665,
1053,
4656,
13,
13,
13,
1753,
5706,
29918,
29954,
440,
... |
grpc_api_client/grpc/api.py | djtaylor/python-grpc-api-client | 0 | 184513 | <reponame>djtaylor/python-grpc-api-client
import json
from importlib import import_module
from google.protobuf.json_format import MessageToJson
class gRPC_API_Response(object):
"""
Class object for handling responses from Dex gRPC server.
"""
def __init__(self, response, output_handler, fields):
... | [
1,
529,
276,
1112,
420,
29958,
19776,
29873,
11017,
29914,
4691,
29899,
629,
6739,
29899,
2754,
29899,
4645,
13,
5215,
4390,
13,
3166,
1053,
1982,
1053,
1053,
29918,
5453,
13,
3166,
5386,
29889,
17529,
9721,
29889,
3126,
29918,
4830,
1053... |
data_scout/transformations/math_custom.py | janthiemen/data_scout | 0 | 5718 | <filename>data_scout/transformations/math_custom.py
from __future__ import division
from .transformation import Transformation
from pyparsing import (Literal, CaselessLiteral, Word, Combine, Group, Optional,
ZeroOrMore, Forward, nums, alphas, oneOf)
import math
import re
import operator
__autho... | [
1,
529,
9507,
29958,
1272,
29918,
1557,
449,
29914,
9067,
800,
29914,
755,
29918,
6341,
29889,
2272,
13,
3166,
4770,
29888,
9130,
1649,
1053,
8542,
13,
13,
3166,
869,
3286,
5404,
1053,
4103,
5404,
13,
3166,
11451,
862,
2976,
1053,
313,
... |
web-server/webserver/urls.py | ApLight/groenlandicus | 0 | 25625 | <reponame>ApLight/groenlandicus<gh_stars>0
"""webserver URL Configuration
The `urlpatterns` list routes URLs to views. For more information please see:
https://docs.djangoproject.com/en/1.11/topics/http/urls/
Examples:
Function views
1. Add an import: from my_app import views
2. Add a URL to urlpatterns: ... | [
1,
529,
276,
1112,
420,
29958,
17396,
20769,
29914,
17170,
264,
1049,
12473,
29966,
12443,
29918,
303,
1503,
29958,
29900,
13,
15945,
29908,
2676,
2974,
3988,
20999,
13,
13,
1576,
421,
2271,
11037,
29879,
29952,
1051,
12049,
24295,
304,
8... |
day-11/package_demo/package1/pathprint.py | JohnLockwood/100-days-of-python | 0 | 151207 | <filename>day-11/package_demo/package1/pathprint.py
"""Demo module to show python search path"""
import sys
import pprint
def print_path():
"""Pretty print the system path"""
print("Printing the search path:")
pprint.pprint(sys.path) | [
1,
529,
9507,
29958,
3250,
29899,
29896,
29896,
29914,
5113,
29918,
17482,
29914,
5113,
29896,
29914,
2084,
2158,
29889,
2272,
13,
15945,
29908,
23444,
3883,
304,
1510,
3017,
2740,
2224,
15945,
29908,
13,
5215,
10876,
13,
5215,
282,
2158,
... |
invoicer/_units/forms.py | mtik00/invoicer | 0 | 44231 | <filename>invoicer/_units/forms.py
from flask_wtf import FlaskForm
from wtforms import StringField, FloatField
from wtforms.validators import DataRequired
class UnitForm(FlaskForm):
description = StringField(u'Description', validators=[DataRequired()])
unit_price = FloatField(u'Unit Price', validators=[DataRe... | [
1,
529,
9507,
29958,
262,
1365,
293,
261,
19891,
348,
1169,
29914,
9514,
29889,
2272,
13,
3166,
29784,
29918,
29893,
13264,
1053,
2379,
1278,
2500,
13,
3166,
281,
29873,
9514,
1053,
1714,
3073,
29892,
27842,
3073,
13,
3166,
281,
29873,
... |
tests/test_transform_compile_releases_from_records.py | matiasSanabria/kingfisher-process | 1 | 132254 | import datetime
import os
import sqlalchemy as sa
from ocdskingfisherprocess.store import Store
from ocdskingfisherprocess.transform import TRANSFORM_TYPE_COMPILE_RELEASES
from ocdskingfisherprocess.transform.compile_releases import CompileReleasesTransform
from tests.base import BaseDataBaseTest
class TestTransfor... | [
1,
1053,
12865,
13,
5215,
2897,
13,
13,
5215,
4576,
284,
305,
6764,
408,
872,
13,
13,
3166,
288,
2252,
808,
292,
15161,
261,
5014,
29889,
8899,
1053,
14491,
13,
3166,
288,
2252,
808,
292,
15161,
261,
5014,
29889,
9067,
1053,
10014,
... |
grAdapt/sampling/equidistributed/Mitchell.py | mkduong-ai/grAdapt | 25 | 24506 | # Python Standard Libraries
import warnings
# grAdapt
# from .base import Equidistributed
from .MaximalMinDistance import MaximalMinDistance
class Mitchell(MaximalMinDistance):
"""
[Mitchell et al., 1991],
Spectrally optimal sampling for distribution ray tracing
"""
def __init__(self, m=3):
... | [
1,
396,
5132,
10117,
365,
4626,
4314,
13,
5215,
18116,
13,
13,
29937,
867,
29909,
1388,
415,
13,
29937,
515,
869,
3188,
1053,
11243,
333,
391,
7541,
13,
3166,
869,
7976,
3039,
8140,
27469,
1053,
5918,
3039,
8140,
27469,
13,
13,
13,
... |
cubedash/_product.py | vconrado/datacube-explorer | 0 | 3561 | <reponame>vconrado/datacube-explorer
import logging
from datetime import timedelta
from flask import Blueprint, Response, abort, redirect, url_for
from cubedash import _model, _utils, _utils as utils
_LOG = logging.getLogger(__name__)
bp = Blueprint("product", __name__)
@bp.route("/about.csv")
def legacy_about_csv... | [
1,
529,
276,
1112,
420,
29958,
29894,
535,
26881,
29914,
1272,
29883,
4003,
29899,
735,
14716,
13,
5215,
12183,
13,
3166,
12865,
1053,
5335,
287,
2554,
13,
13,
3166,
29784,
1053,
10924,
2158,
29892,
13291,
29892,
27450,
29892,
6684,
29892... |
model.py | melorian94/minerl_imitation_learning | 18 | 166230 | import torch
from torch import nn
from torch.nn import functional as F
import math
class Network(nn.Module):
def __init__(self, num_actions, image_channels, vec_size, cnn_module, hidden_size=256,
dueling=True, double_channels=False):
super().__init__()
self.num_actions = num_ac... | [
1,
1053,
4842,
305,
13,
3166,
4842,
305,
1053,
302,
29876,
13,
3166,
4842,
305,
29889,
15755,
1053,
13303,
408,
383,
13,
13,
13,
5215,
5844,
13,
13,
13,
1990,
8527,
29898,
15755,
29889,
7355,
1125,
13,
1678,
822,
4770,
2344,
12035,
... |
pythonAlgorithm/linklist/reverse_linklist.py | Sky-zzt/lintcodePractice | 1 | 154446 | <reponame>Sky-zzt/lintcodePractice
class Node:
def __init__(self, val=0):
self.value = val
self.next = None
class LinkList:
c = 10
def __init__(self, *args):
self.val = (*args,)
self.head = self.__constructLinklist()
#self.printLinklist(self.head)
# self.pr... | [
1,
529,
276,
1112,
420,
29958,
29903,
3459,
29899,
29920,
2065,
29914,
27854,
401,
29925,
1461,
625,
13,
1990,
9071,
29901,
13,
1678,
822,
4770,
2344,
12035,
1311,
29892,
659,
29922,
29900,
1125,
13,
4706,
1583,
29889,
1767,
353,
659,
1... |
one_fm/grd/utils.py | ONE-F-M/One-FM | 16 | 90158 | # -*- coding: utf-8 -*-
# encoding: utf-8
from __future__ import unicode_literals
import frappe
from frappe import _
from frappe.utils import today, add_days, get_url, date_diff, getdate
from frappe.model.document import Document
from frappe.utils import cstr, cint, get_fullname
from frappe.utils import today, add_days... | [
1,
396,
448,
29930,
29899,
14137,
29901,
23616,
29899,
29947,
448,
29930,
29899,
13,
29937,
8025,
29901,
23616,
29899,
29947,
13,
3166,
4770,
29888,
9130,
1649,
1053,
29104,
29918,
20889,
1338,
13,
5215,
5227,
4798,
13,
3166,
5227,
4798,
... |
lastpass/blob.py | guilt/lastpass-python | 1 | 130575 | <gh_stars>1-10
# coding: utf-8
class Blob(object):
def __init__(self, bytes_, key_iteration_count):
self.bytes = bytes_
self.key_iteration_count = key_iteration_count
def encryption_key(self, username, password):
from . import fetcher
return fetcher.make_key(username, password, ... | [
1,
529,
12443,
29918,
303,
1503,
29958,
29896,
29899,
29896,
29900,
13,
29937,
14137,
29901,
23616,
29899,
29947,
13,
1990,
350,
2127,
29898,
3318,
1125,
13,
1678,
822,
4770,
2344,
12035,
1311,
29892,
6262,
3383,
1820,
29918,
1524,
362,
2... |
tf_trace_publisher/src/tf_trace_publisher/text_publisher.py | ipa-lth/rviz_utils | 2 | 1603343 | <filename>tf_trace_publisher/src/tf_trace_publisher/text_publisher.py
#!/usr/bin/env python
import rospy
from visualization_msgs.msg import Marker
# Give ourselves the ability to run a dynamic reconfigure server.
# from dynamic_reconfigure.server import Server as DynamicReconfigureServer
# from ipa325_itasc_commons.c... | [
1,
529,
9507,
29958,
13264,
29918,
15003,
29918,
23679,
261,
29914,
4351,
29914,
13264,
29918,
15003,
29918,
23679,
261,
29914,
726,
29918,
23679,
261,
29889,
2272,
13,
29937,
14708,
4855,
29914,
2109,
29914,
6272,
3017,
13,
5215,
696,
1028... |
progue/ai/actions/misc.py | BradyKieffer/progue | 0 | 177051 | """ Misc / Weird actions can go here """
import random
from action import Action
from progue.utils.actor_constants import ATTRIBUTE_IDLE, ATTR_VALUE, MAX_TURNS, CURRENT_TURN, RANGE
class ActionIdle(Action):
""" Used for lazy monsters """
def __init__(self, actor):
Action.__init__(self, actor=actor, u... | [
1,
9995,
341,
10669,
847,
1334,
1823,
8820,
508,
748,
1244,
9995,
13,
5215,
4036,
13,
3166,
3158,
1053,
9123,
13,
3166,
410,
13000,
29889,
13239,
29889,
7168,
29918,
3075,
1934,
1053,
15531,
29911,
3960,
29933,
26027,
29918,
1367,
1307,
... |
tsdf/utils.py | changgyhub/semantic-tsdf | 9 | 139659 | <reponame>changgyhub/semantic-tsdf
'''
TSDF utility functions.
'''
import numpy as np
# Get corners of 3D camera view frustum of depth image.
def get_view_frustum(depth_im, cam_intr, cam_pose):
im_h = depth_im.shape[0]
im_w = depth_im.shape[1]
max_depth = np.max(depth_im)
view_frust_pts = np.array([(... | [
1,
529,
276,
1112,
420,
29958,
305,
574,
1927,
29882,
431,
29914,
12846,
7716,
29899,
1372,
2176,
13,
12008,
13,
9375,
4037,
19725,
3168,
29889,
13,
12008,
13,
13,
5215,
12655,
408,
7442,
13,
13,
13,
29937,
3617,
26995,
310,
29871,
29... |
PresentMonAnalysis.py | CarHol/PresentMonAnalysis | 0 | 148635 | <filename>PresentMonAnalysis.py
import argparse
import numpy as np
import time
import ntpath
import style
import ArrayUtils
from bokeh.plotting import figure, output_file, show
from bokeh.models import Span, Label, Tabs, Panel
from bokeh.models.widgets import Div
from bokeh.layouts import column, row, widgetbox
from Pr... | [
1,
529,
9507,
29958,
13504,
296,
7185,
21067,
4848,
29889,
2272,
13,
5215,
1852,
5510,
13,
5215,
12655,
408,
7442,
13,
5215,
931,
13,
5215,
302,
29873,
2084,
13,
5215,
3114,
13,
5215,
4398,
12177,
13,
3166,
1045,
446,
29882,
29889,
53... |
components/studio/projects/migrations/0019_mlflow.py | aitmlouk/stackn | 25 | 1618034 | # Generated by Django 3.1.6 on 2021-03-18 21:32
from django.conf import settings
from django.db import migrations, models
import django.db.models.deletion
class Migration(migrations.Migration):
dependencies = [
('apps', '0049_auto_20210318_1401'),
migrations.swappable_dependency(settings.AUTH_US... | [
1,
396,
3251,
630,
491,
15337,
29871,
29941,
29889,
29896,
29889,
29953,
373,
29871,
29906,
29900,
29906,
29896,
29899,
29900,
29941,
29899,
29896,
29947,
29871,
29906,
29896,
29901,
29941,
29906,
13,
13,
3166,
9557,
29889,
5527,
1053,
6055,
... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.