hexsha
stringlengths 40
40
| size
int64 5
2.06M
| ext
stringclasses 11
values | lang
stringclasses 1
value | max_stars_repo_path
stringlengths 3
251
| max_stars_repo_name
stringlengths 4
130
| max_stars_repo_head_hexsha
stringlengths 40
78
| max_stars_repo_licenses
listlengths 1
10
| max_stars_count
int64 1
191k
⌀ | max_stars_repo_stars_event_min_datetime
stringlengths 24
24
⌀ | max_stars_repo_stars_event_max_datetime
stringlengths 24
24
⌀ | max_issues_repo_path
stringlengths 3
251
| max_issues_repo_name
stringlengths 4
130
| max_issues_repo_head_hexsha
stringlengths 40
78
| max_issues_repo_licenses
listlengths 1
10
| max_issues_count
int64 1
116k
⌀ | max_issues_repo_issues_event_min_datetime
stringlengths 24
24
⌀ | max_issues_repo_issues_event_max_datetime
stringlengths 24
24
⌀ | max_forks_repo_path
stringlengths 3
251
| max_forks_repo_name
stringlengths 4
130
| max_forks_repo_head_hexsha
stringlengths 40
78
| max_forks_repo_licenses
listlengths 1
10
| max_forks_count
int64 1
105k
⌀ | max_forks_repo_forks_event_min_datetime
stringlengths 24
24
⌀ | max_forks_repo_forks_event_max_datetime
stringlengths 24
24
⌀ | content
stringlengths 1
1.05M
| avg_line_length
float64 1
1.02M
| max_line_length
int64 3
1.04M
| alphanum_fraction
float64 0
1
|
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
3e9679307c3b46578c6f09f3d9606e2140ef17b5
| 1,253
|
py
|
Python
|
sandbox/images/reseau_serveur_utile.py
|
chiesax/sandbox
|
3b628e0068c6f7116c3a98d481299158a8bf5de3
|
[
"MIT"
] | null | null | null |
sandbox/images/reseau_serveur_utile.py
|
chiesax/sandbox
|
3b628e0068c6f7116c3a98d481299158a8bf5de3
|
[
"MIT"
] | 1
|
2015-12-29T09:38:21.000Z
|
2015-12-30T16:16:19.000Z
|
sandbox/images/reseau_serveur_utile.py
|
chiesax/sandbox
|
3b628e0068c6f7116c3a98d481299158a8bf5de3
|
[
"MIT"
] | null | null | null |
#!/usr/bin/python3.4
# -*-coding:utf-8 -*
"""
https://openclassrooms.com/courses/apprenez-a-programmer-en-python/le-reseau
LA FIN LE TERMINAL QUITTE PYTHON :
DONC CE PROGRAMME NE MARCHE PAS !!
"""
# Les deux lignes prcdentes serviraient si je rendais ce fichier
# directement excutable
import socket
# Construire notre socket : LE SERVEUR
# socket.AF_INET : la famille d'adresses, ici ce sont des adresses Internet ;
#
# socket.SOCK_STREAM : le type du socket, SOCK_STREAM pour le protocole TCP.
connexion_principale = socket.socket(socket.AF_INET,socket.SOCK_STREAM)
print("connexion_principale :\n",connexion_principale)
# Connecter le socket
# le nom de l'hte sera vide et le port sera celui que vous voulez, entre 1024 et 65535.
connexion_principale.bind(("",12800)) # l'argument unique de bind est un tuple !!
print("bind :\n",connexion_principale.bind)
# Faire couter notre socket
connexion_principale.listen(5)
print("listen :\n",connexion_principale.listen)
print("salute")
# +++ Il y a donc deux ports dans notre histoire +++
#
# mais celui qu'utilise le client
# pour ouvrir sa connexion ne va pas nous intresser.
connexion_avec_client,infos_connexion = connexion_principale.accept()
| 27.844444
| 89
| 0.739824
|
3e9b7d58a68d506fe7a43a816c3f565b193865ec
| 10,030
|
py
|
Python
|
crawler_shopee.py
|
HariWu1995/ecommerce_crawlers
|
578957dbbce2914f8af16c5f21c6529591a9f1d4
|
[
"CC0-1.0"
] | null | null | null |
crawler_shopee.py
|
HariWu1995/ecommerce_crawlers
|
578957dbbce2914f8af16c5f21c6529591a9f1d4
|
[
"CC0-1.0"
] | null | null | null |
crawler_shopee.py
|
HariWu1995/ecommerce_crawlers
|
578957dbbce2914f8af16c5f21c6529591a9f1d4
|
[
"CC0-1.0"
] | null | null | null |
import os
import sys
import time
from tqdm import tqdm as print_progress
import csv
import json
import logging
import numpy as np
import pandas as pd
import random
import cv2
from PIL import Image
from matplotlib import pyplot as plt
import re
import requests
from io import BytesIO
from bs4 import BeautifulSoup as BS
from urllib import request, response
from selenium import webdriver
from selenium.webdriver.support import expected_conditions
from selenium.webdriver.support.ui import WebDriverWait
from selenium.webdriver.common.by import By
from selenium.webdriver.common.proxy import *
from selenium.common.exceptions import *
import sqlite3 as sqllib
from sql_commands import *
from driver_utils import *
from utils import *
working_dir = os.path.dirname(__file__)
# Define global variables
page_url = 'https://www.shopee.vn'
data_source = 'shopee'
if __name__ == "__main__":
initialize_db()
first_time = True
while True:
# Step 0: Initialize
browser = random.choice(['chrome', 'firefox', 'edge'])
driver = initialize_driver(browser)
try:
main(driver, first_time)
except Exception as e:
print("\n\n\nCrash ... Please wait a few seconds!!!")
for t in print_progress(range(69)):
time.sleep(1)
first_time = False
driver.quit()
db_connector.close()
| 34.826389
| 131
| 0.598006
|
3e9c99bd9c44f5d31431b1d6a56ba33cddb063ae
| 6,584
|
py
|
Python
|
tests/inferbeddings/regularizers/test_regularizers.py
|
issca/inferbeddings
|
80492a7aebcdcac21e758514c8af403d77e8594a
|
[
"MIT"
] | 33
|
2017-07-25T14:31:00.000Z
|
2019-03-06T09:18:00.000Z
|
tests/inferbeddings/regularizers/test_regularizers.py
|
issca/inferbeddings
|
80492a7aebcdcac21e758514c8af403d77e8594a
|
[
"MIT"
] | 1
|
2017-08-22T13:49:30.000Z
|
2017-08-22T13:49:30.000Z
|
tests/inferbeddings/regularizers/test_regularizers.py
|
issca/inferbeddings
|
80492a7aebcdcac21e758514c8af403d77e8594a
|
[
"MIT"
] | 9
|
2017-10-05T08:50:45.000Z
|
2019-04-18T12:40:56.000Z
|
# -*- coding: utf-8 -*-
import numpy as np
import tensorflow as tf
from inferbeddings.regularizers import TransEEquivalentPredicateRegularizer
from inferbeddings.regularizers import DistMultEquivalentPredicateRegularizer
from inferbeddings.regularizers import ComplExEquivalentPredicateRegularizer
from inferbeddings.regularizers import BilinearEquivalentPredicateRegularizer
import pytest
if __name__ == '__main__':
pytest.main([__file__])
| 39.662651
| 124
| 0.659326
|
3e9de159f87129c1ecdbf87d9939fc63a59cd88b
| 1,360
|
py
|
Python
|
Chapter 08/8.11_chaos_game.py
|
ACsBlack/Tkinter-GUI-Application-Development-Blueprints-Second-Edition
|
c6a045fbf5ba3ece5e8a02bbe33ac13bb57b2b8e
|
[
"MIT"
] | 120
|
2018-03-04T07:17:00.000Z
|
2022-01-25T08:09:57.000Z
|
Chapter 08/8.11_chaos_game.py
|
ACsBlack/Tkinter-GUI-Application-Development-Blueprints-Second-Edition
|
c6a045fbf5ba3ece5e8a02bbe33ac13bb57b2b8e
|
[
"MIT"
] | 3
|
2019-03-24T09:32:43.000Z
|
2020-07-28T07:35:49.000Z
|
Chapter 08/8.11_chaos_game.py
|
ACsBlack/Tkinter-GUI-Application-Development-Blueprints-Second-Edition
|
c6a045fbf5ba3ece5e8a02bbe33ac13bb57b2b8e
|
[
"MIT"
] | 81
|
2018-04-18T06:51:46.000Z
|
2022-03-30T01:31:35.000Z
|
"""
Code illustration: 8.11
Chaos Game
Tkinter GUI Application Development Blueprints
"""
import random
from tkinter import Tk, Canvas
import math
WIDTH = 800
HEIGHT = 500
v1 = (float(WIDTH/2), 0.0)
v2 = (0.00, float(HEIGHT))
v3 = (float(WIDTH), float(HEIGHT))
last_point = None
root = Tk()
canvas = Canvas(root, background="#660099", width = WIDTH, height = HEIGHT)
canvas.pack()
last_point = random_point_inside_triangle(v1, v2, v3)
update()
root.mainloop()
| 21.25
| 75
| 0.605147
|
3e9e105d1fe756d9759cec38597f51f376c2fdd7
| 1,129
|
py
|
Python
|
home/migrations/0010_auto_20150916_1146.py
|
taedori81/gentlecoffee
|
62de8ff17c934afdfde188ecc6b9dbfb400d0682
|
[
"BSD-3-Clause"
] | null | null | null |
home/migrations/0010_auto_20150916_1146.py
|
taedori81/gentlecoffee
|
62de8ff17c934afdfde188ecc6b9dbfb400d0682
|
[
"BSD-3-Clause"
] | null | null | null |
home/migrations/0010_auto_20150916_1146.py
|
taedori81/gentlecoffee
|
62de8ff17c934afdfde188ecc6b9dbfb400d0682
|
[
"BSD-3-Clause"
] | null | null | null |
# -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import models, migrations
import wagtail.wagtailcore.fields
import wagtail.wagtailcore.blocks
import datetime
import wagtail.wagtailimages.blocks
| 33.205882
| 266
| 0.648361
|
3e9f295d7038dec0577aca1bae6bbad75edf434c
| 2,083
|
py
|
Python
|
src/hard/multi_search.py
|
JadielTeofilo/General-Algorithms
|
dfcf86c6ecd727573079f8971187c47bdb7a37bb
|
[
"MIT"
] | null | null | null |
src/hard/multi_search.py
|
JadielTeofilo/General-Algorithms
|
dfcf86c6ecd727573079f8971187c47bdb7a37bb
|
[
"MIT"
] | null | null | null |
src/hard/multi_search.py
|
JadielTeofilo/General-Algorithms
|
dfcf86c6ecd727573079f8971187c47bdb7a37bb
|
[
"MIT"
] | null | null | null |
"""
17.17 Multi Search: Given a string b and an array of smaller strings T, design a method to search b for
each small string in T.
In - text: str, words: List[str]
Out - List[str]
lgget`s go to the party tonight?
['go', 'test', 'jump']
return ['go']
O(k^2 + n*t) time complexity, where k is the size of text, n is the size of words, and t is the size of the biggest word
O(k^2) space complexity
"""
from typing import Dict, Any, List
TrieNode = Dict[str, Any]
def build_trie(text: str) -> Trie:
"""
Inserts all possible substrings on the trie
"""
trie: Trie = Trie()
for i in range(len(text)):
trie.insert(text[i:])
return trie
print(multi_search('lgget`s go to the party tonight?', ['go', 'test', 'jump']))
| 24.797619
| 120
| 0.586174
|
3e9f73be09a575abe5d0c2f48b7beb177bd85283
| 793
|
py
|
Python
|
setup.py
|
yoarch/replace
|
5255810c019141f7de03b96c26a9b732d2218597
|
[
"MIT"
] | null | null | null |
setup.py
|
yoarch/replace
|
5255810c019141f7de03b96c26a9b732d2218597
|
[
"MIT"
] | null | null | null |
setup.py
|
yoarch/replace
|
5255810c019141f7de03b96c26a9b732d2218597
|
[
"MIT"
] | null | null | null |
import setuptools
with open("README.md", "r") as fh:
long_description = fh.read()
setuptools.setup(
name="replacefs",
version="1.2.0",
python_requires='>=3',
author="yoarch",
author_email="yo.managements@gmail.com",
description="Search and replace CLI tool for strings on the all system",
long_description=long_description,
long_description_content_type="text/markdown",
url="https://github.com/yoarch/replace",
packages=setuptools.find_packages(),
classifiers=[
"Programming Language :: Python :: 3",
"License :: OSI Approved :: MIT License",
"Operating System :: OS Independent",
],
entry_points={
"console_scripts": [
"replacefs = replacefs.__main__:main",
"rp = replacefs.__main__:main"
]
})
| 28.321429
| 76
| 0.659521
|
3e9f9ed5bec5e5e254a0bf74367dcc5d5151767d
| 26
|
py
|
Python
|
tests/unit/test_modulegraph/__init__.py
|
hawkhai/pyinstaller
|
016a24479b34de161792c72dde455a81ad4c78ae
|
[
"Apache-2.0"
] | 9,267
|
2015-01-01T04:08:45.000Z
|
2022-03-31T11:42:38.000Z
|
tests/unit/test_modulegraph/__init__.py
|
jeremysanders/pyinstaller
|
321b24f9a9a5978337735816b36ca6b4a90a2fb4
|
[
"Apache-2.0"
] | 5,150
|
2015-01-01T12:09:56.000Z
|
2022-03-31T18:06:12.000Z
|
tests/unit/test_modulegraph/__init__.py
|
jeremysanders/pyinstaller
|
321b24f9a9a5978337735816b36ca6b4a90a2fb4
|
[
"Apache-2.0"
] | 2,101
|
2015-01-03T10:25:27.000Z
|
2022-03-30T11:04:42.000Z
|
""" modulegraph tests """
| 13
| 25
| 0.615385
|
3ea0a1cb7ee908d792303d9bcee0623c9c0029ae
| 774
|
py
|
Python
|
ZD2.py
|
Novomlinov/Lab5
|
bd86f277be60173472202329a86790ca08549c26
|
[
"MIT"
] | null | null | null |
ZD2.py
|
Novomlinov/Lab5
|
bd86f277be60173472202329a86790ca08549c26
|
[
"MIT"
] | null | null | null |
ZD2.py
|
Novomlinov/Lab5
|
bd86f277be60173472202329a86790ca08549c26
|
[
"MIT"
] | null | null | null |
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
import sys
if __name__ == '__main__':
A = list(map(int, input().split()))
if len(A) != 10:
print(" ", file=sys.stderr)
exit(1)
s = 0
for item in A:
if not ((item % 2) == 0):
s += item
x0 = 0 #
x1 = 0 #
for i, a in enumerate(A):
if a < 0:
x0 = i
break
for i, a in enumerate(A[::-1]):
if a < 0:
x1 = len(A) - 1 - i
break
print(s)
print(sum(A[x0 + 1:x1]))
snew=list(filter(lambda x: abs(x)>1, A))
for _ in range(len(A)-len(snew)): snew.append(0)
print(snew)
| 25.8
| 57
| 0.5
|
3ea4ef2ff77ddb776dc4b7390350caad1477ed17
| 687
|
py
|
Python
|
elements/requesting.py
|
pughlab/GENIE-FMI-converter
|
62009d419ac9ada8bfea2432412e0304724ae842
|
[
"MIT"
] | null | null | null |
elements/requesting.py
|
pughlab/GENIE-FMI-converter
|
62009d419ac9ada8bfea2432412e0304724ae842
|
[
"MIT"
] | 1
|
2019-11-19T16:49:21.000Z
|
2019-11-19T16:49:21.000Z
|
elements/requesting.py
|
pughlab/GENIE-FMI-converter
|
62009d419ac9ada8bfea2432412e0304724ae842
|
[
"MIT"
] | 1
|
2019-12-12T04:27:29.000Z
|
2019-12-12T04:27:29.000Z
|
import requests
import re
import sys
xml = re.compile(r'<.+>|\n')
# queries using closed intervals [x,y], 1-based
# queries using half-open intervals [x,y), 0-based
| 28.625
| 105
| 0.611354
|
3ea642dd21695e59f25c2f55930176a71d62c99c
| 82
|
py
|
Python
|
python-analysers/src/test/resources/org/jetbrains/research/lupa/pythonAnalysis/imports/analysis/psi/importStatementsData/in_3_several_imports.py
|
JetBrains-Research/Lupa
|
c105487621564c60cae17395bf32eb40868ceb89
|
[
"Apache-2.0"
] | 16
|
2022-01-11T00:32:20.000Z
|
2022-03-25T21:40:52.000Z
|
python-analysers/src/test/resources/org/jetbrains/research/lupa/pythonAnalysis/imports/analysis/psi/importStatementsData/in_3_several_imports.py
|
nbirillo/Kotlin-Analysis
|
73c3b8a59bf40ed932bb512f30b0ff31f251af40
|
[
"Apache-2.0"
] | 12
|
2021-07-05T11:42:01.000Z
|
2021-12-23T07:57:54.000Z
|
python-analysers/src/test/resources/org/jetbrains/research/lupa/pythonAnalysis/imports/analysis/psi/importStatementsData/in_3_several_imports.py
|
nbirillo/Kotlin-Analysis
|
73c3b8a59bf40ed932bb512f30b0ff31f251af40
|
[
"Apache-2.0"
] | 3
|
2021-09-10T13:21:54.000Z
|
2021-11-23T11:37:55.000Z
|
import cmath
import math
import logging
import random
import plotly
import pandas
| 11.714286
| 14
| 0.853659
|
3ea72258a32209376e761138207efecbaefac54c
| 6,916
|
py
|
Python
|
tf_agents/policies/categorical_q_policy.py
|
gregorgebhardt/agents
|
b6aeae5e0ed68dd4e4ec2ca73ef971254d3208f3
|
[
"Apache-2.0"
] | null | null | null |
tf_agents/policies/categorical_q_policy.py
|
gregorgebhardt/agents
|
b6aeae5e0ed68dd4e4ec2ca73ef971254d3208f3
|
[
"Apache-2.0"
] | null | null | null |
tf_agents/policies/categorical_q_policy.py
|
gregorgebhardt/agents
|
b6aeae5e0ed68dd4e4ec2ca73ef971254d3208f3
|
[
"Apache-2.0"
] | 3
|
2019-09-08T22:05:56.000Z
|
2020-05-27T08:27:15.000Z
|
# coding=utf-8
# Copyright 2018 The TF-Agents 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
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
"""Simple Categorical Q-Policy for Q-Learning with Categorical DQN."""
from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
import gin
import tensorflow as tf
import tensorflow_probability as tfp
from tf_agents.policies import tf_policy
from tf_agents.specs import tensor_spec
from tf_agents.trajectories import policy_step
from tf_agents.trajectories import time_step as ts
from tf_agents.utils import common
from tf_agents.utils import nest_utils
| 41.915152
| 78
| 0.686669
|
3ea75b500ba52b9dd243fdb83d052c734dde9d13
| 477
|
py
|
Python
|
invenio_oarepo_oai_pmh_harvester/rules/uk/creator.py
|
Semtexcz/invenio-oarepo-oai-pmh-harvester
|
2866c7d7355f6885b4f443ee1e82baa24502b36e
|
[
"MIT"
] | null | null | null |
invenio_oarepo_oai_pmh_harvester/rules/uk/creator.py
|
Semtexcz/invenio-oarepo-oai-pmh-harvester
|
2866c7d7355f6885b4f443ee1e82baa24502b36e
|
[
"MIT"
] | null | null | null |
invenio_oarepo_oai_pmh_harvester/rules/uk/creator.py
|
Semtexcz/invenio-oarepo-oai-pmh-harvester
|
2866c7d7355f6885b4f443ee1e82baa24502b36e
|
[
"MIT"
] | null | null | null |
from invenio_oarepo_oai_pmh_harvester.register import Decorators
from invenio_oarepo_oai_pmh_harvester.rules.utils import iter_array
from invenio_oarepo_oai_pmh_harvester.transformer import OAITransformer
| 29.8125
| 71
| 0.735849
|
3ea87068d5cb5b9e7405c8d14e13c79ddfb0503e
| 639
|
py
|
Python
|
tests/test_queries.py
|
guillaumevincent/rangevoting
|
a8a1d5c7aabf2ea30fd89453e7bdec53d981ca36
|
[
"MIT"
] | 4
|
2015-03-23T09:48:32.000Z
|
2020-08-25T13:19:08.000Z
|
tests/test_queries.py
|
guillaumevincent/rangevoting
|
a8a1d5c7aabf2ea30fd89453e7bdec53d981ca36
|
[
"MIT"
] | 4
|
2015-04-27T23:50:28.000Z
|
2015-09-23T07:05:25.000Z
|
tests/test_queries.py
|
guillaumevincent/rangevoting
|
a8a1d5c7aabf2ea30fd89453e7bdec53d981ca36
|
[
"MIT"
] | 2
|
2015-09-21T08:58:25.000Z
|
2020-08-25T13:19:14.000Z
|
import unittest
import queries
| 24.576923
| 76
| 0.746479
|
3ea985da6ab078979759098314b0008ca7d1ea59
| 1,490
|
py
|
Python
|
cgatpipelines/tools/pipeline_docs/pipeline_windows/trackers/GenomicContext.py
|
kevinrue/cgat-flow
|
02b5a1867253c2f6fd6b4f3763e0299115378913
|
[
"MIT"
] | 49
|
2015-04-13T16:49:25.000Z
|
2022-03-29T10:29:14.000Z
|
cgatpipelines/tools/pipeline_docs/pipeline_windows/trackers/GenomicContext.py
|
kevinrue/cgat-flow
|
02b5a1867253c2f6fd6b4f3763e0299115378913
|
[
"MIT"
] | 252
|
2015-04-08T13:23:34.000Z
|
2019-03-18T21:51:29.000Z
|
cgatpipelines/tools/pipeline_docs/pipeline_windows/trackers/GenomicContext.py
|
kevinrue/cgat-flow
|
02b5a1867253c2f6fd6b4f3763e0299115378913
|
[
"MIT"
] | 22
|
2015-05-21T00:37:52.000Z
|
2019-09-25T05:04:27.000Z
|
from MedipReport import ProjectTracker
from CGATReport.Tracker import SingleTableTrackerRows, \
SingleTableTrackerEdgeList
_gat_analysis = {"Results": GatResults,
"SignificantResults": GatSignificantResults,
"Fold": GatLogFold,
"LogFold": GatLogFold}
_gat_sets = {"Context": GatTableContext}
for a, aa in list(_gat_analysis.items()):
for b, bb in list(_gat_sets.items()):
n = "Gat%s%s" % (a, b)
globals()[n] = type(n, (bb, aa), {})
| 24.032258
| 76
| 0.642953
|
3ead938794e4c6cd2d0971d9e594b96ceaee54b7
| 6,852
|
py
|
Python
|
interfaces/withdrawal_gui.py
|
firminoneto11/terceiro-projeto-curso-python
|
685a0e6fafdc07a28a4e7589ac40db0de61737c0
|
[
"MIT"
] | 1
|
2021-04-07T00:28:41.000Z
|
2021-04-07T00:28:41.000Z
|
interfaces/withdrawal_gui.py
|
firminoneto11/terceiro-projeto-curso-python
|
685a0e6fafdc07a28a4e7589ac40db0de61737c0
|
[
"MIT"
] | null | null | null |
interfaces/withdrawal_gui.py
|
firminoneto11/terceiro-projeto-curso-python
|
685a0e6fafdc07a28a4e7589ac40db0de61737c0
|
[
"MIT"
] | null | null | null |
from tkinter import *
from interfaces.functions import centralize
from tkinter import messagebox
from interfaces.functions import update_session_data_csv, update_clients_csv, get_current_balance
| 48.253521
| 120
| 0.597052
|
3eaea2f364b0232cd2155f284fa3e784667552cf
| 321
|
py
|
Python
|
card_collector_db/urls.py
|
tyhunt99/card-collector-db
|
932bd829eb46f9492e6a25326140823629161bab
|
[
"MIT"
] | null | null | null |
card_collector_db/urls.py
|
tyhunt99/card-collector-db
|
932bd829eb46f9492e6a25326140823629161bab
|
[
"MIT"
] | 4
|
2020-06-05T20:53:52.000Z
|
2022-02-10T08:32:51.000Z
|
card_collector_db/urls.py
|
tyhunt99/card-collector-db
|
932bd829eb46f9492e6a25326140823629161bab
|
[
"MIT"
] | null | null | null |
'''
cardcollectordb URL Configuration
'''
from django.contrib import admin
from django.urls import include, path
from account.views import SignUp
urlpatterns = [
path('admin/', admin.site.urls),
path('account/', include('account.urls'), name='account'),
path('signup/', SignUp.as_view(), name='signup'),
]
| 21.4
| 62
| 0.697819
|
3eaf7ae8895d39770420351b1a65c6dd69d2f75e
| 1,829
|
py
|
Python
|
sdk/python/kfp/v2/components/utils.py
|
ryansteakley/pipelines
|
98677b2190fb327be68e4bb0d00c520593707f21
|
[
"Apache-2.0"
] | 1
|
2021-10-23T00:39:47.000Z
|
2021-10-23T00:39:47.000Z
|
sdk/python/kfp/v2/components/utils.py
|
ryansteakley/pipelines
|
98677b2190fb327be68e4bb0d00c520593707f21
|
[
"Apache-2.0"
] | null | null | null |
sdk/python/kfp/v2/components/utils.py
|
ryansteakley/pipelines
|
98677b2190fb327be68e4bb0d00c520593707f21
|
[
"Apache-2.0"
] | null | null | null |
# Copyright 2021 The Kubeflow 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
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
"""Definitions of utils methods."""
import importlib
import os
import re
import sys
import types
def load_module(module_name: str, module_directory: str) -> types.ModuleType:
"""Dynamically imports the Python module with the given name and package
path.
E.g., Assuming there is a file called `my_module.py` under
`/some/directory/my_module`, we can use::
load_module('my_module', '/some/directory')
to effectively `import mymodule`.
Args:
module_name: The name of the module.
package_path: The package under which the specified module resides.
"""
module_spec = importlib.util.spec_from_file_location(
name=module_name,
location=os.path.join(module_directory, f'{module_name}.py'))
module = importlib.util.module_from_spec(module_spec)
sys.modules[module_spec.name] = module
module_spec.loader.exec_module(module)
return module
def maybe_rename_for_k8s(name: str) -> str:
"""Cleans and converts a name to be k8s compatible.
Args:
name: The original name.
Returns:
A sanitized name.
"""
return re.sub('-+', '-', re.sub('[^-0-9a-z]+', '-',
name.lower())).lstrip('-').rstrip('-')
| 31.534483
| 77
| 0.689995
|
3eafedfb7f7bd2c80bdda6855f91326da49ebb9e
| 3,068
|
py
|
Python
|
backend/test/notification_tests/notification_rest_tests.py
|
raphaelrpl/portal
|
9e84e52a73500390187d3fc7c4871cf8a3620231
|
[
"MIT"
] | null | null | null |
backend/test/notification_tests/notification_rest_tests.py
|
raphaelrpl/portal
|
9e84e52a73500390187d3fc7c4871cf8a3620231
|
[
"MIT"
] | null | null | null |
backend/test/notification_tests/notification_rest_tests.py
|
raphaelrpl/portal
|
9e84e52a73500390187d3fc7c4871cf8a3620231
|
[
"MIT"
] | null | null | null |
# -*- coding: utf-8 -*-
from __future__ import absolute_import, unicode_literals
from datetime import datetime, date
from decimal import Decimal
from base import GAETestCase
from notification_app.notification_model import Notification
from routes.notifications import rest
from gaegraph.model import Node
from mock import Mock
from mommygae import mommy
| 38.835443
| 97
| 0.712842
|
3eb1886d18a07c578c32647296635bbe0ed29b6d
| 285
|
py
|
Python
|
yamlcfg/__init__.py
|
RiskIQ/pyyamlcfg
|
93affb9dfdbae7deebd60b50b23b7036682866e4
|
[
"BSD-2-Clause"
] | 2
|
2016-05-25T13:50:14.000Z
|
2017-08-08T18:24:04.000Z
|
yamlcfg/__init__.py
|
RiskIQ/pyyamlcfg
|
93affb9dfdbae7deebd60b50b23b7036682866e4
|
[
"BSD-2-Clause"
] | 2
|
2015-09-13T12:48:50.000Z
|
2019-04-25T10:26:00.000Z
|
yamlcfg/__init__.py
|
RiskIQ/pyyamlcfg
|
93affb9dfdbae7deebd60b50b23b7036682866e4
|
[
"BSD-2-Clause"
] | 3
|
2016-04-29T07:12:44.000Z
|
2019-04-08T07:52:14.000Z
|
#!/usr/bin/env python
''' yamlcfg
Bring in Configs into namespace
'''
from yamlcfg.conf import Config as BaseConfig
from yamlcfg.yml import YAMLConfig
YMLConfig = YAMLConfig
YamlConfig = YAMLConfig
from yamlcfg.util import normalize, validate_ext
from yamlcfg.env import check_env
| 19
| 48
| 0.8
|
3eb1b1746b5ee00b2b35cef5dad3b395d8706a08
| 294
|
py
|
Python
|
www/bigghosthead/bigghosthead/items.py
|
baijiege9/BigGhostHead
|
1ffa0bf390bad707e4fc902f9af98a4c73eea554
|
[
"BSD-3-Clause"
] | null | null | null |
www/bigghosthead/bigghosthead/items.py
|
baijiege9/BigGhostHead
|
1ffa0bf390bad707e4fc902f9af98a4c73eea554
|
[
"BSD-3-Clause"
] | null | null | null |
www/bigghosthead/bigghosthead/items.py
|
baijiege9/BigGhostHead
|
1ffa0bf390bad707e4fc902f9af98a4c73eea554
|
[
"BSD-3-Clause"
] | null | null | null |
# -*- coding: utf-8 -*-
from scrapy.item import Item, Field
| 22.615385
| 35
| 0.602041
|
3eb626e1df9d6b1845d27917297cdbee245c41fb
| 5,008
|
py
|
Python
|
protos/gen/python/protos/public/modeldb/Lineage_pb2_grpc.py
|
CaptEmulation/modeldb
|
78b10aca553e386554f9740db63466b1cf013a1a
|
[
"Apache-2.0"
] | 835
|
2017-02-08T20:14:24.000Z
|
2020-03-12T17:37:49.000Z
|
protos/gen/python/protos/public/modeldb/Lineage_pb2_grpc.py
|
CaptEmulation/modeldb
|
78b10aca553e386554f9740db63466b1cf013a1a
|
[
"Apache-2.0"
] | 651
|
2019-04-18T12:55:07.000Z
|
2022-03-31T23:45:09.000Z
|
protos/gen/python/protos/public/modeldb/Lineage_pb2_grpc.py
|
CaptEmulation/modeldb
|
78b10aca553e386554f9740db63466b1cf013a1a
|
[
"Apache-2.0"
] | 170
|
2017-02-13T14:49:22.000Z
|
2020-02-19T17:59:12.000Z
|
# Generated by the gRPC Python protocol compiler plugin. DO NOT EDIT!
import grpc
from ..modeldb import Lineage_pb2 as modeldb_dot_Lineage__pb2
def add_LineageServiceServicer_to_server(servicer, server):
rpc_method_handlers = {
'addLineage': grpc.unary_unary_rpc_method_handler(
servicer.addLineage,
request_deserializer=modeldb_dot_Lineage__pb2.AddLineage.FromString,
response_serializer=modeldb_dot_Lineage__pb2.AddLineage.Response.SerializeToString,
),
'deleteLineage': grpc.unary_unary_rpc_method_handler(
servicer.deleteLineage,
request_deserializer=modeldb_dot_Lineage__pb2.DeleteLineage.FromString,
response_serializer=modeldb_dot_Lineage__pb2.DeleteLineage.Response.SerializeToString,
),
'findAllInputs': grpc.unary_unary_rpc_method_handler(
servicer.findAllInputs,
request_deserializer=modeldb_dot_Lineage__pb2.FindAllInputs.FromString,
response_serializer=modeldb_dot_Lineage__pb2.FindAllInputs.Response.SerializeToString,
),
'findAllOutputs': grpc.unary_unary_rpc_method_handler(
servicer.findAllOutputs,
request_deserializer=modeldb_dot_Lineage__pb2.FindAllOutputs.FromString,
response_serializer=modeldb_dot_Lineage__pb2.FindAllOutputs.Response.SerializeToString,
),
'findAllInputsOutputs': grpc.unary_unary_rpc_method_handler(
servicer.findAllInputsOutputs,
request_deserializer=modeldb_dot_Lineage__pb2.FindAllInputsOutputs.FromString,
response_serializer=modeldb_dot_Lineage__pb2.FindAllInputsOutputs.Response.SerializeToString,
),
}
generic_handler = grpc.method_handlers_generic_handler(
'ai.verta.modeldb.LineageService', rpc_method_handlers)
server.add_generic_rpc_handlers((generic_handler,))
| 43.547826
| 103
| 0.76877
|
3ebb613990f10c469e7937a90350ba7e43ef9d8e
| 10,709
|
py
|
Python
|
src/sparnn/layers/basic/conv_lstm_layer.py
|
JoeinChina/DeepWeather
|
2677edc16d9865ec98401aaf121aaabd24974aaf
|
[
"MIT"
] | 1
|
2020-07-23T04:13:02.000Z
|
2020-07-23T04:13:02.000Z
|
src/sparnn/layers/basic/conv_lstm_layer.py
|
JoeBuzh/DeepWeather
|
2677edc16d9865ec98401aaf121aaabd24974aaf
|
[
"MIT"
] | null | null | null |
src/sparnn/layers/basic/conv_lstm_layer.py
|
JoeBuzh/DeepWeather
|
2677edc16d9865ec98401aaf121aaabd24974aaf
|
[
"MIT"
] | null | null | null |
import numpy
import logging
import theano
import theano.tensor as TT
from theano.gradient import grad_clip
from sparnn.utils import *
from sparnn.layers import Layer
logger = logging.getLogger(__name__)
| 59.494444
| 127
| 0.530488
|
3ebbdc540dc8fa6d2e3f28778c968adced8e307f
| 779
|
py
|
Python
|
build_script.py
|
lammda/mercari-solution
|
e6e216d33d19b62fdd4fb2a906bd904ede9c5aaa
|
[
"MIT"
] | 249
|
2018-03-31T13:08:55.000Z
|
2022-02-23T16:13:16.000Z
|
build_script.py
|
arita37/mercari-solution
|
374301ad1c32cbc93dcc40313d5d7bb9c5503746
|
[
"MIT"
] | 1
|
2018-10-24T00:49:12.000Z
|
2019-08-28T17:37:00.000Z
|
build_script.py
|
arita37/mercari-solution
|
374301ad1c32cbc93dcc40313d5d7bb9c5503746
|
[
"MIT"
] | 84
|
2018-03-31T20:32:10.000Z
|
2022-03-06T10:56:58.000Z
|
import base64
import glob
import gzip
if __name__ == '__main__':
for submission_name in ['tf', 'mx']:
build_script(submission_name)
| 31.16
| 114
| 0.661104
|
3ebc05f1d094795c30a0aca20105e5ff7a3813fa
| 596
|
py
|
Python
|
data_visualization_gui/src/interactive.py
|
bbueno5000/DataGUI
|
940fcd0fb8dbde22350eacd538a8a1c244eb28ea
|
[
"MIT"
] | null | null | null |
data_visualization_gui/src/interactive.py
|
bbueno5000/DataGUI
|
940fcd0fb8dbde22350eacd538a8a1c244eb28ea
|
[
"MIT"
] | 2
|
2021-03-31T19:46:50.000Z
|
2021-12-13T20:37:15.000Z
|
data_visualization_gui/src/interactive.py
|
bbueno5000/DataGUI
|
940fcd0fb8dbde22350eacd538a8a1c244eb28ea
|
[
"MIT"
] | null | null | null |
"""
DOCSTRING
"""
import dash
import dash.dependencies as dependencies
import dash_core_components.Graph as Graph
import dash_core_components.Input as Input
import dash_html_components.Div as Div
import dash_html_components.H1 as H1
app = dash.Dash()
app.layout = Div(children=[Input(id='input', value='blank', type='text'), Div(id='output')])
app.run_server(debug=True)
| 35.058824
| 92
| 0.753356
|
3ebc6bb0c418253d021814396ba94a1161d06814
| 18,106
|
py
|
Python
|
pidlearningscript.py
|
mtw30/ml_accumualtor_controller
|
d80d62ac66ccea9e6f089d9deebf796678fa818b
|
[
"Apache-2.0"
] | null | null | null |
pidlearningscript.py
|
mtw30/ml_accumualtor_controller
|
d80d62ac66ccea9e6f089d9deebf796678fa818b
|
[
"Apache-2.0"
] | null | null | null |
pidlearningscript.py
|
mtw30/ml_accumualtor_controller
|
d80d62ac66ccea9e6f089d9deebf796678fa818b
|
[
"Apache-2.0"
] | null | null | null |
# My script to process the generated data
# The temperature we want to aim for
aimTemperature = float(30 + 273)
# To halt the script
import sys
# Numpy matrices
import numpy as np
#Used to get the epoch time to calculate the time difference dt
import datetime
import time
#Regular expressions
import re
# Generate random numbers for the epsilon greedy
import random
# Math functions
import math
# Allows deep copies to be made
import copy
### variables
# Q = mcDeltaT for li-ion batteries
specHeatCap = 795.0 # Specific heat capacity (in seconds)
Tamb = float(25 + 273) # Ambient (initial) temperature (kelin)
battMass = 80.0 # Mass of the battery in kg
# Conversion factors
mphTomps = 0.44704
# Fan infomation
maxFanDraw = 36.0 # 36W, based on 2.8W power consumption and 12 fans on the TBRe car
fanVoltage = 12.0 # 12V DC
# Fan current is the power divided by the voltage
fanCurrent = maxFanDraw / fanVoltage
coolingFloor = 285 # Min temperature the fans can physically get the batteries, 12oC
# Battery infomation
currDraw = 240.0 # 240A, continous current draw of 30A with 8 cells in parallel
battCapacity = 18.7 # 180Ah total capcity of the battery, note unit of hours!
battVoltageNom = 388.0 # 388V nominal voltage
battResistance = 0.2304 # 0.2304ohm, 108 in series, 6 in parallel, 12.8E-3 per cell
regenEfficiency = 0.55 # 55% Efficiecny of the velocity converted to regen power, and this power used for recharging
maxAllowTemp = 307 # Kelvin, 35oC
minAllowTemp = 288 # Kevlin, 15oC
# GA variables
generationCount = 5
populationCount = 50
mutationRate = 0.01
# Some variables to do with the traniing of the controller
reqSigFig = 4 # Number of signiicant figures we need to variables to
maxkp = 2.0
maxki = 2.0
maxkd = 2.0
# Chromosomes length
chromKPlen = math.ceil(math.log(((maxkp - 0) * 10 ** reqSigFig), 2))
chromKIlen = math.ceil(math.log(((maxki - 0) * 10 ** reqSigFig), 2))
chromKDlen = math.ceil(math.log(((maxkd - 0) * 10 ** reqSigFig), 2))
# Generate a random binary string of input length
# Decode chromosome
# Decodes the chromoesome string to the float digit
#Calculated the time difference in milliseconds
#Regex on each filepath to get the time variables
#Create an object to get the epoch time
#Differene in epoch time is the dt (in seconds)
# Take an action to change the fan speed
# Fan speed can only be changed up to 20% per dt, as per the main script
#Calculate the cooling which occurs, depending on the vehicle speed
#In m/s, and the accumulator
#Uses fluid dynamics of dry air, with flow across a tube bank
# Calcualte the drain on the batteriries
# Drain from running the fan
# Drain is very large approximation with a linear drain on the batteries!!
#Process the input file to work out the power at each point
#Print it to a file
def processFile(filePath):
#open this new file and get all the lines
with open(filePath) as f:
processLine = f.readlines()
# you may also want to remove whitespace characters like `\n` at the end of each line
processLine = [x.strip() for x in processLine]
# Bin off the first line as it just contains all the titles
processLine.pop(0)
# Set up learning variables
epochs = generationCount # Run the learn 1000 times per simulation
print(datetime.datetime.now().strftime("%a, %d %B %Y %I:%M:%S"))
# Initialise the generation
generationGroup = []
for count in range(populationCount):
chromKP = generateBinaryString(chromKPlen)
chromKI = generateBinaryString(chromKPlen)
chromKD = generateBinaryString(chromKPlen)
cont = geneticLearner(chromKP, chromKI, chromKD, Tamb)
generationGroup.append(cont)
for i in range(epochs):
# Set up the training run
readLines = copy.deepcopy(processLine)
# First thing to do is initialise the state
# Keep the state as dynamic arrays so can be popped and appended
# Trim the lines that were sent to the state creation
battTemp = copy.deepcopy(Tamb)
battCharge = 100.0
fanSpeed = 0.0
isRunning = True
thisBattCapacity = copy.deepcopy(battCapacity)
lineCounter = 0
prevLine = readLines.pop(0).split(',')
while isRunning:
# Run the simulation
currLine = readLines.pop(0).split(',')
# Work out the dt
dt = calculateDt(prevLine[0], currLine[0])
if len(readLines) > 1:
prevLine = currLine
else:
isRunning = False
# Every 10 % of the way print the current time, and the percentage
if ((i + 1) % (epochs / 10.0)) == 0:
print("---------------------------------------------")
print(str(((i + 1) / epochs) * 100) + "% completed...")
print(datetime.datetime.now().strftime("%a, %d %B %Y %I:%M:%S"))
# Print some things at the end of each game to see how close we are to targets :)
print("---------------------------------------------")
print("Completed game " + str(i + 1) + "/" + str(epochs))
#print("End temperature : " + str(battTemp))
#batteryPercentage = (thisBattCapacity / battCapacity) * 100.0
##Get this as a string with two decimal places (cut, not rounded)
#wholePercentage = str(batteryPercentage).split('.')[0]
#decimPercentage = str(batteryPercentage).split('.')[1]
#batteryRemaining = str(wholePercentage + "." + decimPercentage[0:2])
#print("End capacity : " + str(batteryRemaining))
# Simulation finished, print model to JSON file
print("---------------------------------------------")
print("Model saved to disk...")
# File with the list of files to process
masterFile = "/Users/Matt/google_drive/documents/uni/year_3/EE30147_40148_GDBP_MEng/individual/scripts/traindatatoprocess"
#Open the list of files to go through,
try:
with open(masterFile) as f:
processFilePaths = f.readlines()
# you may also want to remove whitespace characters like `\n` at the end of each line
processFilePaths = [x.strip() for x in processFilePaths]
except IOError:
print("Error, unable to find list file : " + filePath)
#Remove first item from processFilePaths as this is just the file header
processFilePaths.pop(0)
#For every required file
for row in processFilePaths:
#Try to process this file
try:
print("Processing file : " + row)
processFile(row)
except IOError:
print("Error, unable to find list file : " + row)
| 37.486542
| 122
| 0.643378
|
3ebd20504757b6e90b9dac2cead03c7e3e9835fc
| 2,188
|
py
|
Python
|
graphjson.py
|
suprfanz/flask-fb-neo4j-alchemy
|
8ee5692bdbddc94342b38144d299e9d1a1b0b68d
|
[
"MIT"
] | 2
|
2018-03-09T03:10:49.000Z
|
2020-10-22T10:28:03.000Z
|
graphjson.py
|
suprfanz/flask-fb-neo4j-alchemy
|
8ee5692bdbddc94342b38144d299e9d1a1b0b68d
|
[
"MIT"
] | null | null | null |
graphjson.py
|
suprfanz/flask-fb-neo4j-alchemy
|
8ee5692bdbddc94342b38144d299e9d1a1b0b68d
|
[
"MIT"
] | null | null | null |
"""
graphjson module pull an event from neo4j and creates
graphjson formated file to be used with AlchemyJS
Written by Ray Bernard ray@suprfanz.com
"""
import json
from neo4j.v1 import GraphDatabase, basic_auth
from config import neo4j_dbip, neo4j_admin, neo4j_password
session = GraphDatabase.driver("bolt://{}:7687".format(neo4j_dbip),
auth=basic_auth("{}".format(neo4j_admin), "{}".format(neo4j_password))).session()
if __name__ == '__main__':
main()
| 29.173333
| 112
| 0.664534
|
3ebd492c672da94f9dbeb381a25939527becda92
| 2,507
|
py
|
Python
|
dataset.py
|
kisom/aipnd-classifier
|
a361fc5f25402bbdfb23ddc08ad1b071fff50210
|
[
"MIT"
] | null | null | null |
dataset.py
|
kisom/aipnd-classifier
|
a361fc5f25402bbdfb23ddc08ad1b071fff50210
|
[
"MIT"
] | null | null | null |
dataset.py
|
kisom/aipnd-classifier
|
a361fc5f25402bbdfb23ddc08ad1b071fff50210
|
[
"MIT"
] | null | null | null |
"""
dataset.py defines a container for a training dataset.
"""
import os
import torch
from torchvision import datasets, transforms
| 32.986842
| 88
| 0.618668
|
3ebef9e4fbaf39a788a4ad55fc4f3d9f0f5242a4
| 3,659
|
py
|
Python
|
site-packages/cinderclient/tests/unit/v2/test_cgsnapshots.py
|
hariza17/freezer_libraries
|
e0bd890eba5e7438976fb3b4d66c41c128bab790
|
[
"PSF-2.0"
] | null | null | null |
site-packages/cinderclient/tests/unit/v2/test_cgsnapshots.py
|
hariza17/freezer_libraries
|
e0bd890eba5e7438976fb3b4d66c41c128bab790
|
[
"PSF-2.0"
] | 1
|
2018-09-10T23:44:02.000Z
|
2018-09-12T16:28:07.000Z
|
site-packages/cinderclient/tests/unit/v2/test_cgsnapshots.py
|
hariza17/freezer_libraries
|
e0bd890eba5e7438976fb3b4d66c41c128bab790
|
[
"PSF-2.0"
] | 2
|
2018-09-07T23:17:23.000Z
|
2019-01-11T16:10:08.000Z
|
# Copyright (C) 2012 - 2014 EMC Corporation.
#
# 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 applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
# License for the specific language governing permissions and limitations
# under the License.
from cinderclient.tests.unit import utils
from cinderclient.tests.unit.v2 import fakes
cs = fakes.FakeClient()
| 38.515789
| 78
| 0.639519
|
3ebf6af93d750f46cb0ac8a35e125abd85daa7b2
| 710
|
py
|
Python
|
mlps/core/data/cnvrtr/functions/IPTransferDivide.py
|
seculayer/automl-mlps
|
80569909ec1c25db1ceafbb85b27d069d1a66aa3
|
[
"Apache-2.0"
] | null | null | null |
mlps/core/data/cnvrtr/functions/IPTransferDivide.py
|
seculayer/automl-mlps
|
80569909ec1c25db1ceafbb85b27d069d1a66aa3
|
[
"Apache-2.0"
] | 2
|
2022-03-31T07:39:59.000Z
|
2022-03-31T07:40:18.000Z
|
mlps/core/data/cnvrtr/functions/IPTransferDivide.py
|
seculayer/AutoAPE-mlps
|
80569909ec1c25db1ceafbb85b27d069d1a66aa3
|
[
"Apache-2.0"
] | 1
|
2021-11-03T09:09:07.000Z
|
2021-11-03T09:09:07.000Z
|
# -*- coding: utf-8 -*-
# Author : Manki Baek
# e-mail : bmg8551@seculayer.co.kr
# Powered by Seculayer 2021 Service Model Team
from mlps.core.data.cnvrtr.ConvertAbstract import ConvertAbstract
if __name__ == "__main__":
payload = "192.168.1.110"
tokenizer = IPTransferDivide(stat_dict=None, arg_list=None)
print(tokenizer.apply(payload))
| 24.482759
| 65
| 0.612676
|
3ec23576c70ac623990dae2bb8e27678909b68f6
| 2,327
|
py
|
Python
|
dataAnalytics/roomAnalytics.py
|
PeterJWei/EnergyFootprinting
|
0396efba7d4e6863452e322f9f7561c6cd756478
|
[
"MIT"
] | null | null | null |
dataAnalytics/roomAnalytics.py
|
PeterJWei/EnergyFootprinting
|
0396efba7d4e6863452e322f9f7561c6cd756478
|
[
"MIT"
] | null | null | null |
dataAnalytics/roomAnalytics.py
|
PeterJWei/EnergyFootprinting
|
0396efba7d4e6863452e322f9f7561c6cd756478
|
[
"MIT"
] | null | null | null |
import DBScrape
import calendar
import datetime
import time
import csv
import sys
import os
days = 30
R = roomAnalytics()
R.roomData()
R.saveData()
| 25.021505
| 96
| 0.638161
|
3ec715aa850089a5f7b7b582922c73d2960606c8
| 778
|
py
|
Python
|
tests/test_kubernetes_master.py
|
damoxc/charm-kubernetes-master
|
624095b278e9f235a03d061132e9fdf029d45b71
|
[
"Apache-2.0"
] | null | null | null |
tests/test_kubernetes_master.py
|
damoxc/charm-kubernetes-master
|
624095b278e9f235a03d061132e9fdf029d45b71
|
[
"Apache-2.0"
] | null | null | null |
tests/test_kubernetes_master.py
|
damoxc/charm-kubernetes-master
|
624095b278e9f235a03d061132e9fdf029d45b71
|
[
"Apache-2.0"
] | null | null | null |
import pytest
from unittest import mock
from reactive import kubernetes_master
from charms.reactive import endpoint_from_flag, remove_state
from charmhelpers.core import hookenv
| 27.785714
| 76
| 0.767352
|
3ec94f77c122b98fdf7c96a211b8a9024dac0bae
| 57,058
|
py
|
Python
|
pysnmp-with-texts/HH3C-DOT3-EFM-EPON-MIB.py
|
agustinhenze/mibs.snmplabs.com
|
1fc5c07860542b89212f4c8ab807057d9a9206c7
|
[
"Apache-2.0"
] | 8
|
2019-05-09T17:04:00.000Z
|
2021-06-09T06:50:51.000Z
|
pysnmp-with-texts/HH3C-DOT3-EFM-EPON-MIB.py
|
agustinhenze/mibs.snmplabs.com
|
1fc5c07860542b89212f4c8ab807057d9a9206c7
|
[
"Apache-2.0"
] | 4
|
2019-05-31T16:42:59.000Z
|
2020-01-31T21:57:17.000Z
|
pysnmp-with-texts/HH3C-DOT3-EFM-EPON-MIB.py
|
agustinhenze/mibs.snmplabs.com
|
1fc5c07860542b89212f4c8ab807057d9a9206c7
|
[
"Apache-2.0"
] | 10
|
2019-04-30T05:51:36.000Z
|
2022-02-16T03:33:41.000Z
|
#
# PySNMP MIB module HH3C-DOT3-EFM-EPON-MIB (http://snmplabs.com/pysmi)
# ASN.1 source file:///Users/davwang4/Dev/mibs.snmplabs.com/asn1/HH3C-DOT3-EFM-EPON-MIB
# Produced by pysmi-0.3.4 at Wed May 1 13:26:25 2019
# On host DAVWANG4-M-1475 platform Darwin version 18.5.0 by user davwang4
# Using Python version 3.7.3 (default, Mar 27 2019, 09:23:15)
#
Integer, ObjectIdentifier, OctetString = mibBuilder.importSymbols("ASN1", "Integer", "ObjectIdentifier", "OctetString")
NamedValues, = mibBuilder.importSymbols("ASN1-ENUMERATION", "NamedValues")
ConstraintsIntersection, ConstraintsUnion, SingleValueConstraint, ValueSizeConstraint, ValueRangeConstraint = mibBuilder.importSymbols("ASN1-REFINEMENT", "ConstraintsIntersection", "ConstraintsUnion", "SingleValueConstraint", "ValueSizeConstraint", "ValueRangeConstraint")
hh3cEpon, = mibBuilder.importSymbols("HH3C-OID-MIB", "hh3cEpon")
ifIndex, = mibBuilder.importSymbols("IF-MIB", "ifIndex")
ModuleCompliance, ObjectGroup, NotificationGroup = mibBuilder.importSymbols("SNMPv2-CONF", "ModuleCompliance", "ObjectGroup", "NotificationGroup")
Unsigned32, ObjectIdentity, IpAddress, TimeTicks, Integer32, mib_2, Gauge32, iso, Counter64, Counter32, ModuleIdentity, NotificationType, MibIdentifier, Bits, MibScalar, MibTable, MibTableRow, MibTableColumn = mibBuilder.importSymbols("SNMPv2-SMI", "Unsigned32", "ObjectIdentity", "IpAddress", "TimeTicks", "Integer32", "mib-2", "Gauge32", "iso", "Counter64", "Counter32", "ModuleIdentity", "NotificationType", "MibIdentifier", "Bits", "MibScalar", "MibTable", "MibTableRow", "MibTableColumn")
TextualConvention, MacAddress, DisplayString, TruthValue = mibBuilder.importSymbols("SNMPv2-TC", "TextualConvention", "MacAddress", "DisplayString", "TruthValue")
hh3cDot3EfmeponMIB = ModuleIdentity((1, 3, 6, 1, 4, 1, 25506, 2, 42, 2))
hh3cDot3EfmeponMIB.setRevisions(('2004-09-21 00:00',))
if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0):
if mibBuilder.loadTexts: hh3cDot3EfmeponMIB.setRevisionsDescriptions(('Initial version, published as RFC XXXX.',))
if mibBuilder.loadTexts: hh3cDot3EfmeponMIB.setLastUpdated('200409210000Z')
if mibBuilder.loadTexts: hh3cDot3EfmeponMIB.setOrganization('Hangzhou H3C Tech. Co., Ltd.')
if mibBuilder.loadTexts: hh3cDot3EfmeponMIB.setContactInfo('Platform Team Hangzhou H3C Tech. Co., Ltd. Hai-Dian District Beijing P.R. China http://www.h3c.com Zip:100085 ')
if mibBuilder.loadTexts: hh3cDot3EfmeponMIB.setDescription("The objects in this MIB module are used to manage the Ethernet in the First Mile (EFM) Multi Point Control Protocol (MPCP) Interfaces as defined in IEEE Draft P802.3ah/D3.0 clause 64,65. The following reference is used throughout this MIB module: [802.3ah] refers to: IEEE Draft P802.3ah/D3.3: 'Draft amendment to - Information technology - Telecommunications and information exchange between systems - Local and metropolitan area networks - Specific requirements - Part 3: Carrier sense multiple access with collision detection (CSMA/CD) access method and physical layer specifications - Media Access Control Parameters, Physical Layers and Management Parameters for subscriber access networks', 22 April 2004. Of particular interest are Clause 64(MPCP) 65(P2MP RS) and 60 (PON PMDs). Clause 30, 'Management', and Clause 45, 'Management Data Input/Output (MDIO) Interface'. Copyright (C) The Internet Society (2004). This version of this MIB module is part of XXXX see the RFC itself for full legal notices.")
hh3cDot3MpcpMIB = MibIdentifier((1, 3, 6, 1, 4, 1, 25506, 2, 42, 2, 1))
hh3cDot3MpcpObjects = MibIdentifier((1, 3, 6, 1, 4, 1, 25506, 2, 42, 2, 1, 1))
hh3cDot3MpcpConformance = MibIdentifier((1, 3, 6, 1, 4, 1, 25506, 2, 42, 2, 1, 2))
hh3cDot3MpcpTable = MibTable((1, 3, 6, 1, 4, 1, 25506, 2, 42, 2, 1, 1, 1), )
if mibBuilder.loadTexts: hh3cDot3MpcpTable.setStatus('current')
if mibBuilder.loadTexts: hh3cDot3MpcpTable.setDescription('Table for dot3 Multi-Point Control Protocol (MPCP) MIB modules.')
hh3cDot3MpcpEntry = MibTableRow((1, 3, 6, 1, 4, 1, 25506, 2, 42, 2, 1, 1, 1, 1), ).setIndexNames((0, "IF-MIB", "ifIndex"))
if mibBuilder.loadTexts: hh3cDot3MpcpEntry.setStatus('current')
if mibBuilder.loadTexts: hh3cDot3MpcpEntry.setDescription('An entry in the dot3 MPCP MIB modules table.')
hh3cDot3MpcpID = MibTableColumn((1, 3, 6, 1, 4, 1, 25506, 2, 42, 2, 1, 1, 1, 1, 1), Integer32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: hh3cDot3MpcpID.setReference('[802.3ah], 30.3.5.1.1.')
if mibBuilder.loadTexts: hh3cDot3MpcpID.setStatus('current')
if mibBuilder.loadTexts: hh3cDot3MpcpID.setDescription('This variable is assigned so as to uniquely identify the Multi-Point MAC Control (MPCP) entity, as defined in [802.3ah] clause 64, among the subordinate managed objects of the containing object. This attribute is relevant for an OLT and an ONU.')
hh3cDot3MpcpOperStatus = MibTableColumn((1, 3, 6, 1, 4, 1, 25506, 2, 42, 2, 1, 1, 1, 1, 2), TruthValue()).setMaxAccess("readonly")
if mibBuilder.loadTexts: hh3cDot3MpcpOperStatus.setReference('[802.3ah], 30.3.5.1.2.')
if mibBuilder.loadTexts: hh3cDot3MpcpOperStatus.setStatus('current')
if mibBuilder.loadTexts: hh3cDot3MpcpOperStatus.setDescription('This variable can be used to define the operational state of the Multi-Point MAC Control sublayer as defined in [802.3ah] clause 64. Selecting admin for an interface with Multi-Point MAC Control sublayer. When the attribute is True the the interface will act as if Multi-point control protocol is enabled. When the attribute is False the interface will act as if it does not have the Multi-point control protocol. The operational state can be changed using the hh3cDot3MpcpAdminState attribute. This attribute is relevant for an OLT and an ONU.')
hh3cDot3MpcpMode = MibTableColumn((1, 3, 6, 1, 4, 1, 25506, 2, 42, 2, 1, 1, 1, 1, 3), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2))).clone(namedValues=NamedValues(("olt", 1), ("onu", 2))).clone(1)).setMaxAccess("readwrite")
if mibBuilder.loadTexts: hh3cDot3MpcpMode.setReference('[802.3ah], 30.3.5.1.3.')
if mibBuilder.loadTexts: hh3cDot3MpcpMode.setStatus('current')
if mibBuilder.loadTexts: hh3cDot3MpcpMode.setDescription('This variable can be used to identify the operational state of the Multi-Point MAC Control sublayer as defined in [802.3ah] clause 64. Selecting olt(1) for an OLT (server) mode and onu(2) for an ONU (client) mode. Writing can be done during only during initialization, when hh3cDot3MpcpOperStatus indicates Flase. This attribute is relevant for an OLT and an ONU.')
hh3cDot3MpcpLinkID = MibTableColumn((1, 3, 6, 1, 4, 1, 25506, 2, 42, 2, 1, 1, 1, 1, 4), Integer32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: hh3cDot3MpcpLinkID.setReference('[802.3ah], 30.3.5.1.4.')
if mibBuilder.loadTexts: hh3cDot3MpcpLinkID.setStatus('current')
if mibBuilder.loadTexts: hh3cDot3MpcpLinkID.setDescription('A read-only value that identifies the Logical Link identity (LLID) associated with the MAC port as specified in [802.3ah] clause 65.1.3.2.2. This attribute is relevant for an OLT and an ONU.')
hh3cDot3MpcpRemoteMACAddress = MibTableColumn((1, 3, 6, 1, 4, 1, 25506, 2, 42, 2, 1, 1, 1, 1, 5), MacAddress()).setMaxAccess("readonly")
if mibBuilder.loadTexts: hh3cDot3MpcpRemoteMACAddress.setReference('[802.3ah], 30.3.5.1.5.')
if mibBuilder.loadTexts: hh3cDot3MpcpRemoteMACAddress.setStatus('current')
if mibBuilder.loadTexts: hh3cDot3MpcpRemoteMACAddress.setDescription('A read-only value that identifies the source_address parameter of the last MPCPDUs passed to the MAC Control. This value is updated on reception of a valid frame with (1) a destination Field equal to the reserved multicast address for MAC Control specified in [802.3ah] Annex 31A, (2) lengthOrType field value equal to the reserved Type for MAC Control as specified in [802.3ah] Annex 31A. (3) an MPCP subtype value equal to the subtype reserved for MPCP as specified in [802.3ah] Annex 31A. This attribute is relevant for an OLT and an ONU.')
hh3cDot3MpcpRegistrationState = MibTableColumn((1, 3, 6, 1, 4, 1, 25506, 2, 42, 2, 1, 1, 1, 1, 6), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2, 3))).clone(namedValues=NamedValues(("unregistered", 1), ("registering", 2), ("registered", 3)))).setMaxAccess("readonly")
if mibBuilder.loadTexts: hh3cDot3MpcpRegistrationState.setReference('[802.3ah], 30.3.5.1.6.')
if mibBuilder.loadTexts: hh3cDot3MpcpRegistrationState.setStatus('current')
if mibBuilder.loadTexts: hh3cDot3MpcpRegistrationState.setDescription('A read-only value that identifies the operational state of the Multi-Point MAC Control sublayer as defined in [802.3ah] clause 64. When this attribute has the enumeration unregistered(1) the interface may be used for registering a link partner. When this attribute has the enumeration registering(2) the interface is in the process of registering a link-partner. When this attribute has the enumeration registered(3) the interface has an established link-partner. This attribute is relevant for an OLT and an ONU. For the OLT it provides an indication per LLID.')
hh3cDot3MpcpTransmitElapsed = MibTableColumn((1, 3, 6, 1, 4, 1, 25506, 2, 42, 2, 1, 1, 1, 1, 7), Integer32()).setUnits('TQ (16nsec)').setMaxAccess("readonly")
if mibBuilder.loadTexts: hh3cDot3MpcpTransmitElapsed.setReference('[802.3ah], 30.3.5.1.19.')
if mibBuilder.loadTexts: hh3cDot3MpcpTransmitElapsed.setStatus('current')
if mibBuilder.loadTexts: hh3cDot3MpcpTransmitElapsed.setDescription('A read-only value that reports the interval from last MPCP frame transmission in increments of Time Quanta (TQ) 16ns. The value returned shall be (interval from last MPCP frame transmission in ns)/16. If this value exceeds (2^32-1) the value (2^32-1) shall be returned. This attribute is relevant for an OLT and an ONU.')
hh3cDot3MpcpReceiveElapsed = MibTableColumn((1, 3, 6, 1, 4, 1, 25506, 2, 42, 2, 1, 1, 1, 1, 8), Integer32()).setUnits('TQ (16nsec)').setMaxAccess("readonly")
if mibBuilder.loadTexts: hh3cDot3MpcpReceiveElapsed.setReference('[802.3ah], 30.3.5.1.20.')
if mibBuilder.loadTexts: hh3cDot3MpcpReceiveElapsed.setStatus('current')
if mibBuilder.loadTexts: hh3cDot3MpcpReceiveElapsed.setDescription('A read-only value that reports the interval from last MPCP frame reception in increments of Time Quanta (TQ) 16ns. The value returned shall be (interval from last MPCP last MPCP frame reception in ns)/16. If this value exceeds (2^32-1) the value (2^32-1) shall be returned. This attribute is relevant for an OLT and an ONU.')
hh3cDot3MpcpRoundTripTime = MibTableColumn((1, 3, 6, 1, 4, 1, 25506, 2, 42, 2, 1, 1, 1, 1, 9), Integer32()).setUnits('TQ (16nsec)').setMaxAccess("readonly")
if mibBuilder.loadTexts: hh3cDot3MpcpRoundTripTime.setReference('[802.3ah], 30.3.5.1.21.')
if mibBuilder.loadTexts: hh3cDot3MpcpRoundTripTime.setStatus('current')
if mibBuilder.loadTexts: hh3cDot3MpcpRoundTripTime.setDescription('A read-only value that reports the MPCP round trip time in increments of Time Quanta (TQ) 16ns. The value returned shall be (round trip time in ns)/16. If this value exceeds (2^16-1) the value (2^16-1) shall be returned. This attribute is relevant for an OLT and an ONU. For the OLT there is a value per LLID')
hh3cDot3MpcpMaximumPendingGrants = MibTableColumn((1, 3, 6, 1, 4, 1, 25506, 2, 42, 2, 1, 1, 1, 1, 10), Integer32().subtype(subtypeSpec=ValueRangeConstraint(0, 255))).setMaxAccess("readonly")
if mibBuilder.loadTexts: hh3cDot3MpcpMaximumPendingGrants.setReference('[802.3ah], 30.3.5.1.24.')
if mibBuilder.loadTexts: hh3cDot3MpcpMaximumPendingGrants.setStatus('current')
if mibBuilder.loadTexts: hh3cDot3MpcpMaximumPendingGrants.setDescription('A read-only value that indicates the maximum number of grants an ONU can store. The maximum number of grants an ONU can store has a range of 0 to 255. This attribute is relevant for an OLT and an ONU. For the OLT there is a value per LLID')
hh3cDot3MpcpAdminState = MibTableColumn((1, 3, 6, 1, 4, 1, 25506, 2, 42, 2, 1, 1, 1, 1, 11), TruthValue().clone('false')).setMaxAccess("readwrite")
if mibBuilder.loadTexts: hh3cDot3MpcpAdminState.setReference('[802.3ah], 30.3.5.2.1.')
if mibBuilder.loadTexts: hh3cDot3MpcpAdminState.setStatus('current')
if mibBuilder.loadTexts: hh3cDot3MpcpAdminState.setDescription('This variable can be used to define the operational state of the Multi-Point MAC Control sublayer as defined in [802.3ah] clause 64. Selecting admin for an interface with Multi-Point MAC Control sublayer. When selecting the value as True the interface Multi-Point control protocol is enabled. When selecting the value as False the interface acts as if the Multi-point Control protocol does not exist. Reading reflects the state of the attribute and the operation of the Multi-point control protocol mode of the interface. Writing can be done all the time. This attribute is relevant for an OLT and an ONU.')
hh3cDot3MpcpOnTime = MibTableColumn((1, 3, 6, 1, 4, 1, 25506, 2, 42, 2, 1, 1, 1, 1, 12), Integer32()).setUnits('TQ (16nsec)').setMaxAccess("readonly")
if mibBuilder.loadTexts: hh3cDot3MpcpOnTime.setReference('[802.3ah], 64.3.5.1.')
if mibBuilder.loadTexts: hh3cDot3MpcpOnTime.setStatus('current')
if mibBuilder.loadTexts: hh3cDot3MpcpOnTime.setDescription('A read-only value that reports the -on time- for a grant burst in increments of Time Quanta (TQ) 16ns as defined in [802.3ah] 60,64. The value returned shall be (on time ns)/16. If this value exceeds (2^32-1) the value (2^32-1) shall be returned. This attribute is relevant for an OLT and an ONU.')
hh3cDot3MpcpOffTime = MibTableColumn((1, 3, 6, 1, 4, 1, 25506, 2, 42, 2, 1, 1, 1, 1, 13), Integer32()).setUnits('TQ (16nsec)').setMaxAccess("readonly")
if mibBuilder.loadTexts: hh3cDot3MpcpOffTime.setReference('[802.3ah], 64.3.5.1.')
if mibBuilder.loadTexts: hh3cDot3MpcpOffTime.setStatus('current')
if mibBuilder.loadTexts: hh3cDot3MpcpOffTime.setDescription('A read-only value that reports the -off time- for a grant burst in increments of Time Quanta (TQ) 16ns as defined in [802.3ah] 60,64. The value returned shall be (off time ns)/16. If this value exceeds (2^32-1) the value (2^32-1) shall be returned. This attribute is relevant for an OLT and an ONU.')
hh3cDot3MpcpSyncTime = MibTableColumn((1, 3, 6, 1, 4, 1, 25506, 2, 42, 2, 1, 1, 1, 1, 14), Integer32()).setUnits('TQ (16nsec)').setMaxAccess("readonly")
if mibBuilder.loadTexts: hh3cDot3MpcpSyncTime.setReference('[802.3ah], 64.3.3.2.')
if mibBuilder.loadTexts: hh3cDot3MpcpSyncTime.setStatus('current')
if mibBuilder.loadTexts: hh3cDot3MpcpSyncTime.setDescription('A read-only value that reports the -sync lock time- for an OLT receiver in increments of Time Quanta (TQ) 16ns as defined in [802.3ah] 60,64,65. The value returned shall be (sync lock time ns)/16. If this value exceeds (2^32-1) the value (2^32-1) shall be returned. This attribute is relevant for an OLT and an ONU.')
hh3cDot3MpcpStatTable = MibTable((1, 3, 6, 1, 4, 1, 25506, 2, 42, 2, 1, 1, 2), )
if mibBuilder.loadTexts: hh3cDot3MpcpStatTable.setStatus('current')
if mibBuilder.loadTexts: hh3cDot3MpcpStatTable.setDescription('This table defines the list of statistics counters of [802.3ah] clause 64 MPCP interface.')
hh3cDot3MpcpStatEntry = MibTableRow((1, 3, 6, 1, 4, 1, 25506, 2, 42, 2, 1, 1, 2, 1), ).setIndexNames((0, "IF-MIB", "ifIndex"))
if mibBuilder.loadTexts: hh3cDot3MpcpStatEntry.setStatus('current')
if mibBuilder.loadTexts: hh3cDot3MpcpStatEntry.setDescription('Table entries for table of statistics counters of [802.3ah] clause 64 MPCP interface.')
hh3cDot3MpcpMACCtrlFramesTransmitted = MibTableColumn((1, 3, 6, 1, 4, 1, 25506, 2, 42, 2, 1, 1, 2, 1, 1), Counter32()).setUnits('frames').setMaxAccess("readonly")
if mibBuilder.loadTexts: hh3cDot3MpcpMACCtrlFramesTransmitted.setReference('[802.3ah], 30.3.5.1.7.')
if mibBuilder.loadTexts: hh3cDot3MpcpMACCtrlFramesTransmitted.setStatus('current')
if mibBuilder.loadTexts: hh3cDot3MpcpMACCtrlFramesTransmitted.setDescription('A count of MPCP frames passed to the MAC sublayer for transmission. This counter is incremented when a MA_CONTROL.request service primitive is generated within the MAC control sublayer with an opcode indicating a MPCP frame. This attribute is relevant for an OLT and an ONU.')
hh3cDot3MpcpMACCtrlFramesReceived = MibTableColumn((1, 3, 6, 1, 4, 1, 25506, 2, 42, 2, 1, 1, 2, 1, 2), Counter32()).setUnits('frames').setMaxAccess("readonly")
if mibBuilder.loadTexts: hh3cDot3MpcpMACCtrlFramesReceived.setReference('[802.3ah], 30.3.5.1.8.')
if mibBuilder.loadTexts: hh3cDot3MpcpMACCtrlFramesReceived.setStatus('current')
if mibBuilder.loadTexts: hh3cDot3MpcpMACCtrlFramesReceived.setDescription('A count of MPCP frames passed by the MAC sublayer to the MAC Control sublayer. This counter is incremented when a ReceiveFrame function call returns a valid frame with: (1) a lengthOrType field value equal to the reserved Type for 802.3_MAC_Control as specified in 31.4.1.3, and (2) an opcode indicating a MPCP frame. This attribute is relevant for an OLT and an ONU.')
hh3cDot3MpcpDiscoveryWindowsSent = MibTableColumn((1, 3, 6, 1, 4, 1, 25506, 2, 42, 2, 1, 1, 2, 1, 3), Counter32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: hh3cDot3MpcpDiscoveryWindowsSent.setReference('[802.3ah], 30.3.5.1.22.')
if mibBuilder.loadTexts: hh3cDot3MpcpDiscoveryWindowsSent.setStatus('current')
if mibBuilder.loadTexts: hh3cDot3MpcpDiscoveryWindowsSent.setDescription('A count of discovery windows generated. The counter is incremented by one for each generated discovery window. This attribute is relevant for an OLT and an ONU. At the ONU value should be zero.')
hh3cDot3MpcpDiscoveryTimeout = MibTableColumn((1, 3, 6, 1, 4, 1, 25506, 2, 42, 2, 1, 1, 2, 1, 4), Counter32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: hh3cDot3MpcpDiscoveryTimeout.setReference('[802.3ah], 30.3.5.1.23.')
if mibBuilder.loadTexts: hh3cDot3MpcpDiscoveryTimeout.setStatus('current')
if mibBuilder.loadTexts: hh3cDot3MpcpDiscoveryTimeout.setDescription('A count of the number of times a discovery timeout occurs. Increment the counter by one for each discovery processing state-machine reset resulting from timeout waiting for message arrival. This attribute is relevant for an OLT and an ONU.')
hh3cDot3MpcpTxRegRequest = MibTableColumn((1, 3, 6, 1, 4, 1, 25506, 2, 42, 2, 1, 1, 2, 1, 5), Counter32()).setUnits('frames').setMaxAccess("readonly")
if mibBuilder.loadTexts: hh3cDot3MpcpTxRegRequest.setReference('[802.3ah], 30.3.5.1.12.')
if mibBuilder.loadTexts: hh3cDot3MpcpTxRegRequest.setStatus('current')
if mibBuilder.loadTexts: hh3cDot3MpcpTxRegRequest.setDescription('A count of the number of times a REGISTER_REQ MPCP frames transmission occurs. Increment the counter by one for each REGISTER_REQ MPCP frame transmitted as defined in [802.3ah] clause 64. This counter is mandatory for an ONU. This attribute is relevant for an OLT and an ONU. At the OLT value should be zero.')
hh3cDot3MpcpRxRegRequest = MibTableColumn((1, 3, 6, 1, 4, 1, 25506, 2, 42, 2, 1, 1, 2, 1, 6), Counter32()).setUnits('frames').setMaxAccess("readonly")
if mibBuilder.loadTexts: hh3cDot3MpcpRxRegRequest.setReference('[802.3ah], 30.3.5.1.17.')
if mibBuilder.loadTexts: hh3cDot3MpcpRxRegRequest.setStatus('current')
if mibBuilder.loadTexts: hh3cDot3MpcpRxRegRequest.setDescription('A count of the number of times a REGISTER_REQ MPCP frames reception occurs. A single counter at the ONU and a set of counters, one for each LLID, at the OLT. Increment the counter by one for each REGISTER_REQ MPCP frame received for each LLID as defined in [802.3ah] clause 64. This counter is mandatory for an ONU and for an OLT. At the ONU value should be zero.')
hh3cDot3MpcpTxRegAck = MibTableColumn((1, 3, 6, 1, 4, 1, 25506, 2, 42, 2, 1, 1, 2, 1, 7), Counter32()).setUnits('frames').setMaxAccess("readonly")
if mibBuilder.loadTexts: hh3cDot3MpcpTxRegAck.setReference('[802.3ah], 30.3.5.1.10.')
if mibBuilder.loadTexts: hh3cDot3MpcpTxRegAck.setStatus('current')
if mibBuilder.loadTexts: hh3cDot3MpcpTxRegAck.setDescription('A count of the number of times a REGISTER_ACK MPCP frames transmission occurs. Increment the counter by one for each REGISTER_ACK MPCP frame transmitted as defined in [802.3ah] clause 64. This counter is mandatory for an ONU. This attribute is relevant for an OLT and an ONU. At the OLT the value should be zero.')
hh3cDot3MpcpRxRegAck = MibTableColumn((1, 3, 6, 1, 4, 1, 25506, 2, 42, 2, 1, 1, 2, 1, 8), Counter32()).setUnits('frames').setMaxAccess("readonly")
if mibBuilder.loadTexts: hh3cDot3MpcpRxRegAck.setReference('[802.3ah], 30.3.5.1.15.')
if mibBuilder.loadTexts: hh3cDot3MpcpRxRegAck.setStatus('current')
if mibBuilder.loadTexts: hh3cDot3MpcpRxRegAck.setDescription('A count of the number of times a REGISTER_ACK MPCP frames reception occurs. A single counter at the ONU and a set of counters, one for each LLID, at the OLT. Increment the counter by one for each REGISTER_ACK MPCP frame received for each LLID, as defined in [802.3ah] clause 64. This counter is mandatory for an ONU and for an OLT. At the ONU the value should be zero.')
hh3cDot3MpcpTxReport = MibTableColumn((1, 3, 6, 1, 4, 1, 25506, 2, 42, 2, 1, 1, 2, 1, 9), Counter32()).setUnits('frames').setMaxAccess("readonly")
if mibBuilder.loadTexts: hh3cDot3MpcpTxReport.setReference('[802.3ah], 30.3.5.1.13.')
if mibBuilder.loadTexts: hh3cDot3MpcpTxReport.setStatus('current')
if mibBuilder.loadTexts: hh3cDot3MpcpTxReport.setDescription('A count of the number of times a REPORT MPCP frames transmission occurs. Increment the counter by one for each REPORT MPCP frame transmitted as defined in [802.3ah] clause 64. This counter is mandatory for an ONU. This attribute is relevant for an OLT and an ONU. At the OLT value should be zero.')
hh3cDot3MpcpRxReport = MibTableColumn((1, 3, 6, 1, 4, 1, 25506, 2, 42, 2, 1, 1, 2, 1, 10), Counter32()).setUnits('frames').setMaxAccess("readonly")
if mibBuilder.loadTexts: hh3cDot3MpcpRxReport.setReference('[802.3ah], 30.3.5.1.18.')
if mibBuilder.loadTexts: hh3cDot3MpcpRxReport.setStatus('current')
if mibBuilder.loadTexts: hh3cDot3MpcpRxReport.setDescription('A count of the number of times a REPORT MPCP frames reception occurs. A single counter at the ONU and a set of counters, one for each LLID, at the OLT. Increment the counter by one for each REPORT MPCP frame received for each LLID, as defined in [802.3ah] clause 64. This counter is mandatory for an ONU and for an OLT. At the ONU value should be zero.')
hh3cDot3MpcpTxGate = MibTableColumn((1, 3, 6, 1, 4, 1, 25506, 2, 42, 2, 1, 1, 2, 1, 11), Counter32()).setUnits('frames').setMaxAccess("readonly")
if mibBuilder.loadTexts: hh3cDot3MpcpTxGate.setReference('[802.3ah], 30.3.5.1.9.')
if mibBuilder.loadTexts: hh3cDot3MpcpTxGate.setStatus('current')
if mibBuilder.loadTexts: hh3cDot3MpcpTxGate.setDescription('A count of the number of times a GATE MPCP frames transmission occurs. A set of counters, one for each LLID, at the OLT. Increment the counter by one for each GATE MPCP frame transmitted, for each LLID, as defined in [802.3ah] clause 64. This counter is mandatory for an OLT. This attribute is relevant for an OLT and an ONU. At the ONU the value should be zero.')
hh3cDot3MpcpRxGate = MibTableColumn((1, 3, 6, 1, 4, 1, 25506, 2, 42, 2, 1, 1, 2, 1, 12), Counter32()).setUnits('frames').setMaxAccess("readonly")
if mibBuilder.loadTexts: hh3cDot3MpcpRxGate.setReference('[802.3ah], 30.3.5.1.14.')
if mibBuilder.loadTexts: hh3cDot3MpcpRxGate.setStatus('current')
if mibBuilder.loadTexts: hh3cDot3MpcpRxGate.setDescription('A count of the number of times a GATE MPCP frames reception occurs. A single counter at the ONU and a set of counters, one for each LLID ,at the OLT. Increment the counter by one for each GATE MPCP frame received, for each LLID, as defined in [802.3ah] clause 64. This counter is mandatory for an ONU and for an OLT. At the OLT the value should be zero.')
hh3cDot3MpcpTxRegister = MibTableColumn((1, 3, 6, 1, 4, 1, 25506, 2, 42, 2, 1, 1, 2, 1, 13), Counter32()).setUnits('frames').setMaxAccess("readonly")
if mibBuilder.loadTexts: hh3cDot3MpcpTxRegister.setReference('[802.3ah], 30.3.5.1.11.')
if mibBuilder.loadTexts: hh3cDot3MpcpTxRegister.setStatus('current')
if mibBuilder.loadTexts: hh3cDot3MpcpTxRegister.setDescription('A count of the number of times a REGISTER MPCP frames transmission occurs. A set of counters, one for each LLID, at the OLT. Increment the counter by one for each REGISTER MPCP frame transmitted, for each LLID, as defined in [802.3ah] clause 64. This counter is mandatory for an OLT. This attribute is relevant for an OLT and an ONU. At the ONU the value should be zero.')
hh3cDot3MpcpRxRegister = MibTableColumn((1, 3, 6, 1, 4, 1, 25506, 2, 42, 2, 1, 1, 2, 1, 14), Counter32()).setUnits('frames').setMaxAccess("readonly")
if mibBuilder.loadTexts: hh3cDot3MpcpRxRegister.setReference('[802.3ah], 30.3.5.1.16.')
if mibBuilder.loadTexts: hh3cDot3MpcpRxRegister.setStatus('current')
if mibBuilder.loadTexts: hh3cDot3MpcpRxRegister.setDescription('A count of the number of times a REGISTER MPCP frames reception occurs. A single counter at the ONU and a set of counters, one for each LLID, at the OLT. Increment the counter by one for each REGISTER MPCP frame received, for each LLID, as defined in [802.3ah] clause 64. This counter is mandatory for an ONU and for an OLT. at the OLT the value should be zero.')
hh3cDot3MpcpRxNotSupportedMPCP = MibTableColumn((1, 3, 6, 1, 4, 1, 25506, 2, 42, 2, 1, 1, 2, 1, 15), Counter32()).setUnits('frames').setMaxAccess("readonly")
if mibBuilder.loadTexts: hh3cDot3MpcpRxNotSupportedMPCP.setStatus('current')
if mibBuilder.loadTexts: hh3cDot3MpcpRxNotSupportedMPCP.setDescription('A count of the number of times a non-supported MPCP frames reception occurs. A single counter at the ONU and a set of counters, one for each LLID, at the OLT. Increment the counter by one for each non-supported MPCP frame received, for each LLID, as defined in [802.3ah] clause 64. This counter is mandatory for an ONU and for an OLT.')
hh3cDot3MpcpGroups = MibIdentifier((1, 3, 6, 1, 4, 1, 25506, 2, 42, 2, 1, 2, 1))
hh3cDot3MpcpGroupBase = ObjectGroup((1, 3, 6, 1, 4, 1, 25506, 2, 42, 2, 1, 2, 1, 1)).setObjects(("HH3C-DOT3-EFM-EPON-MIB", "hh3cDot3MpcpID"), ("HH3C-DOT3-EFM-EPON-MIB", "hh3cDot3MpcpOperStatus"), ("HH3C-DOT3-EFM-EPON-MIB", "hh3cDot3MpcpMode"), ("HH3C-DOT3-EFM-EPON-MIB", "hh3cDot3MpcpLinkID"), ("HH3C-DOT3-EFM-EPON-MIB", "hh3cDot3MpcpRemoteMACAddress"), ("HH3C-DOT3-EFM-EPON-MIB", "hh3cDot3MpcpRegistrationState"), ("HH3C-DOT3-EFM-EPON-MIB", "hh3cDot3MpcpMaximumPendingGrants"), ("HH3C-DOT3-EFM-EPON-MIB", "hh3cDot3MpcpAdminState"))
if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0):
hh3cDot3MpcpGroupBase = hh3cDot3MpcpGroupBase.setStatus('current')
if mibBuilder.loadTexts: hh3cDot3MpcpGroupBase.setDescription('A collection of objects of dot3 Mpcp Basic entity state definition.')
hh3cDot3MpcpGroupParam = ObjectGroup((1, 3, 6, 1, 4, 1, 25506, 2, 42, 2, 1, 2, 1, 2)).setObjects(("HH3C-DOT3-EFM-EPON-MIB", "hh3cDot3MpcpTransmitElapsed"), ("HH3C-DOT3-EFM-EPON-MIB", "hh3cDot3MpcpReceiveElapsed"), ("HH3C-DOT3-EFM-EPON-MIB", "hh3cDot3MpcpRoundTripTime"), ("HH3C-DOT3-EFM-EPON-MIB", "hh3cDot3MpcpOnTime"), ("HH3C-DOT3-EFM-EPON-MIB", "hh3cDot3MpcpOffTime"), ("HH3C-DOT3-EFM-EPON-MIB", "hh3cDot3MpcpSyncTime"))
if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0):
hh3cDot3MpcpGroupParam = hh3cDot3MpcpGroupParam.setStatus('current')
if mibBuilder.loadTexts: hh3cDot3MpcpGroupParam.setDescription('A collection of objects of dot3 Mpcp for P2MP parameters.')
hh3cDot3MpcpGroupStat = ObjectGroup((1, 3, 6, 1, 4, 1, 25506, 2, 42, 2, 1, 2, 1, 3)).setObjects(("HH3C-DOT3-EFM-EPON-MIB", "hh3cDot3MpcpMACCtrlFramesTransmitted"), ("HH3C-DOT3-EFM-EPON-MIB", "hh3cDot3MpcpMACCtrlFramesReceived"), ("HH3C-DOT3-EFM-EPON-MIB", "hh3cDot3MpcpDiscoveryWindowsSent"), ("HH3C-DOT3-EFM-EPON-MIB", "hh3cDot3MpcpDiscoveryTimeout"), ("HH3C-DOT3-EFM-EPON-MIB", "hh3cDot3MpcpTxRegRequest"), ("HH3C-DOT3-EFM-EPON-MIB", "hh3cDot3MpcpRxRegRequest"), ("HH3C-DOT3-EFM-EPON-MIB", "hh3cDot3MpcpTxRegAck"), ("HH3C-DOT3-EFM-EPON-MIB", "hh3cDot3MpcpRxRegAck"), ("HH3C-DOT3-EFM-EPON-MIB", "hh3cDot3MpcpTxReport"), ("HH3C-DOT3-EFM-EPON-MIB", "hh3cDot3MpcpRxReport"), ("HH3C-DOT3-EFM-EPON-MIB", "hh3cDot3MpcpTxGate"), ("HH3C-DOT3-EFM-EPON-MIB", "hh3cDot3MpcpRxGate"), ("HH3C-DOT3-EFM-EPON-MIB", "hh3cDot3MpcpTxRegister"), ("HH3C-DOT3-EFM-EPON-MIB", "hh3cDot3MpcpRxRegister"), ("HH3C-DOT3-EFM-EPON-MIB", "hh3cDot3MpcpRxNotSupportedMPCP"))
if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0):
hh3cDot3MpcpGroupStat = hh3cDot3MpcpGroupStat.setStatus('current')
if mibBuilder.loadTexts: hh3cDot3MpcpGroupStat.setDescription('A collection of objects of dot3 Mpcp Statistics')
hh3cDot3MpcpCompliances = MibIdentifier((1, 3, 6, 1, 4, 1, 25506, 2, 42, 2, 1, 2, 2))
hh3cDot3MpcpCompliance = ModuleCompliance((1, 3, 6, 1, 4, 1, 25506, 2, 42, 2, 1, 2, 2, 1)).setObjects(("HH3C-DOT3-EFM-EPON-MIB", "hh3cDot3MpcpGroupBase"), ("HH3C-DOT3-EFM-EPON-MIB", "hh3cDot3MpcpGroupParam"), ("HH3C-DOT3-EFM-EPON-MIB", "hh3cDot3MpcpGroupStat"))
if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0):
hh3cDot3MpcpCompliance = hh3cDot3MpcpCompliance.setStatus('current')
if mibBuilder.loadTexts: hh3cDot3MpcpCompliance.setDescription('The compliance statement for Multi-point control protocol interfaces.')
hh3cDot3OmpEmulationMIB = MibIdentifier((1, 3, 6, 1, 4, 1, 25506, 2, 42, 2, 2))
hh3cDot3OmpEmulationObjects = MibIdentifier((1, 3, 6, 1, 4, 1, 25506, 2, 42, 2, 2, 1))
hh3cDot3OmpeConformance = MibIdentifier((1, 3, 6, 1, 4, 1, 25506, 2, 42, 2, 2, 2))
hh3cDot3OmpEmulationTable = MibTable((1, 3, 6, 1, 4, 1, 25506, 2, 42, 2, 2, 1, 1), )
if mibBuilder.loadTexts: hh3cDot3OmpEmulationTable.setStatus('current')
if mibBuilder.loadTexts: hh3cDot3OmpEmulationTable.setDescription('Table for dot3 OmpEmulation MIB modules.')
hh3cDot3OmpEmulationEntry = MibTableRow((1, 3, 6, 1, 4, 1, 25506, 2, 42, 2, 2, 1, 1, 1), ).setIndexNames((0, "IF-MIB", "ifIndex"))
if mibBuilder.loadTexts: hh3cDot3OmpEmulationEntry.setStatus('current')
if mibBuilder.loadTexts: hh3cDot3OmpEmulationEntry.setDescription('An entry in the dot3 OmpEmulation MIB modules table.')
hh3cDot3OmpEmulationID = MibTableColumn((1, 3, 6, 1, 4, 1, 25506, 2, 42, 2, 2, 1, 1, 1, 1), Integer32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: hh3cDot3OmpEmulationID.setReference('[802.3ah], 30.3.7.1.1.')
if mibBuilder.loadTexts: hh3cDot3OmpEmulationID.setStatus('current')
if mibBuilder.loadTexts: hh3cDot3OmpEmulationID.setDescription('The value of hh3cDot3OmpEmulationID is assigned so as to uniquely identify a OMPEmulation entity among the subordinate managed objects of the containing object. The value is mandated for an ONU.')
hh3cDot3OmpEmulationType = MibTableColumn((1, 3, 6, 1, 4, 1, 25506, 2, 42, 2, 2, 1, 1, 1, 2), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2, 3))).clone(namedValues=NamedValues(("unknown", 1), ("olt", 2), ("onu", 3)))).setMaxAccess("readonly")
if mibBuilder.loadTexts: hh3cDot3OmpEmulationType.setReference('[802.3ah], 30.3.7.1.2.')
if mibBuilder.loadTexts: hh3cDot3OmpEmulationType.setStatus('current')
if mibBuilder.loadTexts: hh3cDot3OmpEmulationType.setDescription('A read-only value that indicates that mode of operation of the Reconciliation Sublayer for Point to Point Emulation (see [802.3ah] clause 65.1). unknown(1) value is assigned in initializing, true state or type not yet known. olt(2) value is assigned when Sublayer operating in OLT mode. onu(3) value is assigned when Sublayer operating in ONU mode.')
hh3cDot3OmpEmulationStatTable = MibTable((1, 3, 6, 1, 4, 1, 25506, 2, 42, 2, 2, 1, 2), )
if mibBuilder.loadTexts: hh3cDot3OmpEmulationStatTable.setStatus('current')
if mibBuilder.loadTexts: hh3cDot3OmpEmulationStatTable.setDescription('This table defines the list of statistics counters of [802.3ah] clause 65 OMP interface.')
hh3cDot3OmpEmulationStatEntry = MibTableRow((1, 3, 6, 1, 4, 1, 25506, 2, 42, 2, 2, 1, 2, 1), ).setIndexNames((0, "IF-MIB", "ifIndex"))
if mibBuilder.loadTexts: hh3cDot3OmpEmulationStatEntry.setStatus('current')
if mibBuilder.loadTexts: hh3cDot3OmpEmulationStatEntry.setDescription('Table entries for Table of statistics counters of [802.3ah] clause 65 OMP interface.')
hh3cDot3OmpEmulationSLDErrors = MibTableColumn((1, 3, 6, 1, 4, 1, 25506, 2, 42, 2, 2, 1, 2, 1, 1), Counter32()).setUnits('frames').setMaxAccess("readonly")
if mibBuilder.loadTexts: hh3cDot3OmpEmulationSLDErrors.setReference('[802.3ah], 30.3.7.1.3.')
if mibBuilder.loadTexts: hh3cDot3OmpEmulationSLDErrors.setStatus('current')
if mibBuilder.loadTexts: hh3cDot3OmpEmulationSLDErrors.setDescription('A count of frames received that do not contain a valid SLD field as defined in [802.3ah] clause 65.1.3.3.1. This attribute is mandatory for an OLT and optional for an ONU.')
hh3cDot3OmpEmulationCRC8Errors = MibTableColumn((1, 3, 6, 1, 4, 1, 25506, 2, 42, 2, 2, 1, 2, 1, 2), Counter32()).setUnits('frames').setMaxAccess("readonly")
if mibBuilder.loadTexts: hh3cDot3OmpEmulationCRC8Errors.setReference('[802.3ah], 30.3.7.1.4.')
if mibBuilder.loadTexts: hh3cDot3OmpEmulationCRC8Errors.setStatus('current')
if mibBuilder.loadTexts: hh3cDot3OmpEmulationCRC8Errors.setDescription('A count of frames received that contain a valid SLD field, as defined in [802.3ah] clause 65.1.3.3.1, but do not pass the CRC-8 check as defined in [802.3ah] clause 65.1.3.3.3. This attribute is mandatory for an OLT and for an ONU.')
hh3cDot3OmpEmulationBadLLID = MibTableColumn((1, 3, 6, 1, 4, 1, 25506, 2, 42, 2, 2, 1, 2, 1, 3), Counter32()).setUnits('frames').setMaxAccess("readonly")
if mibBuilder.loadTexts: hh3cDot3OmpEmulationBadLLID.setReference('[802.3ah], 30.3.7.1.8.')
if mibBuilder.loadTexts: hh3cDot3OmpEmulationBadLLID.setStatus('current')
if mibBuilder.loadTexts: hh3cDot3OmpEmulationBadLLID.setDescription('A count of frames received that contain a valid SLD field, as defined in [802.3ah] clause 65.1.3.3.1, and pass the CRC-8 check, as defined in [802.3ah] clause 65.1.3.3.3, but are discarded due to the LLID check as defined in [802.3ah] clause 65.1.3.3.2. This attribute is relevant for an OLT and an ONU.')
hh3cDot3OmpEmulationGoodLLID = MibTableColumn((1, 3, 6, 1, 4, 1, 25506, 2, 42, 2, 2, 1, 2, 1, 4), Counter32()).setUnits('frames').setMaxAccess("readonly")
if mibBuilder.loadTexts: hh3cDot3OmpEmulationGoodLLID.setReference('[802.3ah], 30.3.7.1.5.')
if mibBuilder.loadTexts: hh3cDot3OmpEmulationGoodLLID.setStatus('current')
if mibBuilder.loadTexts: hh3cDot3OmpEmulationGoodLLID.setDescription('A count of frames received that contain a valid SLD field, as defined in [802.3ah] clause 65.1.3.3.1, and pass the CRC-8 check, as defined in [802.3ah] clause 65.1.3.3.3. This attribute is relevant for an OLT and an ONU.')
hh3cDot3OmpEmulationOnuPonCastLLID = MibTableColumn((1, 3, 6, 1, 4, 1, 25506, 2, 42, 2, 2, 1, 2, 1, 5), Counter32()).setUnits('frames').setMaxAccess("readonly")
if mibBuilder.loadTexts: hh3cDot3OmpEmulationOnuPonCastLLID.setReference('[802.3ah], 30.3.7.1.6.')
if mibBuilder.loadTexts: hh3cDot3OmpEmulationOnuPonCastLLID.setStatus('current')
if mibBuilder.loadTexts: hh3cDot3OmpEmulationOnuPonCastLLID.setDescription('A count of frames received that contain a valid SLD field in an ONU, as defined in [802.3ah] 65.1.3.3.1, passes the CRC-8 check, as defined in [802.3ah] 65.1.3.3.3, and the frame meets the rule for acceptance defined in [802.3ah] 65.1.3.3.2.')
hh3cDot3OmpEmulationOltPonCastLLID = MibTableColumn((1, 3, 6, 1, 4, 1, 25506, 2, 42, 2, 2, 1, 2, 1, 6), Counter32()).setUnits('frames').setMaxAccess("readonly")
if mibBuilder.loadTexts: hh3cDot3OmpEmulationOltPonCastLLID.setReference('[802.3ah], 30.3.7.1.7.')
if mibBuilder.loadTexts: hh3cDot3OmpEmulationOltPonCastLLID.setStatus('current')
if mibBuilder.loadTexts: hh3cDot3OmpEmulationOltPonCastLLID.setDescription('A count of frames received that contain a valid SLD field in an OLT, as defined in [802.3ah] 65.1.3.3.1, passes the CRC-8 check, as defined in [802.3ah] 65.1.3.3.3, and the frame meets the rule for acceptance defined in [802.3ah] 65.1.3.3.2.')
hh3cDot3OmpEmulationBroadcastLLIDNotOnuID = MibTableColumn((1, 3, 6, 1, 4, 1, 25506, 2, 42, 2, 2, 1, 2, 1, 7), Counter32()).setUnits('frames').setMaxAccess("readonly")
if mibBuilder.loadTexts: hh3cDot3OmpEmulationBroadcastLLIDNotOnuID.setStatus('current')
if mibBuilder.loadTexts: hh3cDot3OmpEmulationBroadcastLLIDNotOnuID.setDescription('A count of frames received that contain a valid SLD field in a OLT, as defined in [802.3ah] clause 65.1.3.3.1, and pass the CRC-8 check, as defined in [802.3ah] clause 65.1.3.3.3, and contain broadcast LLID as defined in [802.3ah] clause 65. This attribute is mandatory for an OLT and for an ONU.')
hh3cDot3OmpEmulationOnuLLIDNotBroadcast = MibTableColumn((1, 3, 6, 1, 4, 1, 25506, 2, 42, 2, 2, 1, 2, 1, 8), Counter32()).setUnits('frames').setMaxAccess("readonly")
if mibBuilder.loadTexts: hh3cDot3OmpEmulationOnuLLIDNotBroadcast.setStatus('current')
if mibBuilder.loadTexts: hh3cDot3OmpEmulationOnuLLIDNotBroadcast.setDescription("A count of frames received that contain a valid SLD field in a OLT, as defined in [802.3ah] clause 65.1.3.3.1, and pass the CRC-8 check, as defined in [802.3ah] clause 65.1.3.3.3, and contain the ONU's LLID as defined in [802.3ah] clause 65. This attribute is mandatory for an ONU and mandatory for an OLT (a counter per LLID).")
hh3cDot3OmpEmulationBroadcastLLIDPlusOnuId = MibTableColumn((1, 3, 6, 1, 4, 1, 25506, 2, 42, 2, 2, 1, 2, 1, 9), Counter32()).setUnits('frames').setMaxAccess("readonly")
if mibBuilder.loadTexts: hh3cDot3OmpEmulationBroadcastLLIDPlusOnuId.setStatus('current')
if mibBuilder.loadTexts: hh3cDot3OmpEmulationBroadcastLLIDPlusOnuId.setDescription("A count of frames received that contain a valid SLD field in a OLT, as defined in [802.3ah] clause 65.1.3.3.1, and pass the CRC-8 check, as defined in [802.3ah] clause 65.1.3.3.3, and contain the broadcast LLID plus ONU's LLID (frame reflected) as defined in [802.3ah] clause 65. This attribute is mandatory for an ONU and mandatory for an OLT (a counter per LLID).")
hh3cDot3OmpEmulationNotBroadcastLLIDNotOnuId = MibTableColumn((1, 3, 6, 1, 4, 1, 25506, 2, 42, 2, 2, 1, 2, 1, 10), Counter32()).setUnits('frames').setMaxAccess("readonly")
if mibBuilder.loadTexts: hh3cDot3OmpEmulationNotBroadcastLLIDNotOnuId.setStatus('current')
if mibBuilder.loadTexts: hh3cDot3OmpEmulationNotBroadcastLLIDNotOnuId.setDescription("A count of frames received that contain a valid SLD field in a OLT, as defined in [802.3ah] clause 65.1.3.3.1, and pass the CRC-8 check, as defined in [802.3ah] clause 65.1.3.3.3, and does not contain the ONU's LLID as defined in [802.3ah] clause 65. This attribute is mandatory for an ONU")
hh3cDot3OmpeGroups = MibIdentifier((1, 3, 6, 1, 4, 1, 25506, 2, 42, 2, 2, 2, 1))
hh3cDot3OmpeGroupID = ObjectGroup((1, 3, 6, 1, 4, 1, 25506, 2, 42, 2, 2, 2, 1, 1)).setObjects(("HH3C-DOT3-EFM-EPON-MIB", "hh3cDot3OmpEmulationID"), ("HH3C-DOT3-EFM-EPON-MIB", "hh3cDot3OmpEmulationType"))
if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0):
hh3cDot3OmpeGroupID = hh3cDot3OmpeGroupID.setStatus('current')
if mibBuilder.loadTexts: hh3cDot3OmpeGroupID.setDescription('A collection of objects of dot3 OMP emulation ID entity state definition.')
hh3cDot3OmpeGroupStat = ObjectGroup((1, 3, 6, 1, 4, 1, 25506, 2, 42, 2, 2, 2, 1, 2)).setObjects(("HH3C-DOT3-EFM-EPON-MIB", "hh3cDot3OmpEmulationSLDErrors"), ("HH3C-DOT3-EFM-EPON-MIB", "hh3cDot3OmpEmulationCRC8Errors"), ("HH3C-DOT3-EFM-EPON-MIB", "hh3cDot3OmpEmulationBadLLID"), ("HH3C-DOT3-EFM-EPON-MIB", "hh3cDot3OmpEmulationGoodLLID"), ("HH3C-DOT3-EFM-EPON-MIB", "hh3cDot3OmpEmulationOnuPonCastLLID"), ("HH3C-DOT3-EFM-EPON-MIB", "hh3cDot3OmpEmulationOltPonCastLLID"), ("HH3C-DOT3-EFM-EPON-MIB", "hh3cDot3OmpEmulationBroadcastLLIDNotOnuID"), ("HH3C-DOT3-EFM-EPON-MIB", "hh3cDot3OmpEmulationOnuLLIDNotBroadcast"), ("HH3C-DOT3-EFM-EPON-MIB", "hh3cDot3OmpEmulationBroadcastLLIDPlusOnuId"), ("HH3C-DOT3-EFM-EPON-MIB", "hh3cDot3OmpEmulationNotBroadcastLLIDNotOnuId"))
if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0):
hh3cDot3OmpeGroupStat = hh3cDot3OmpeGroupStat.setStatus('current')
if mibBuilder.loadTexts: hh3cDot3OmpeGroupStat.setDescription('A collection of objects of dot3 OMP emulation Statistics')
hh3cDot3OmpeCompliances = MibIdentifier((1, 3, 6, 1, 4, 1, 25506, 2, 42, 2, 2, 2, 2))
hh3cDot3OmpeCompliance = ModuleCompliance((1, 3, 6, 1, 4, 1, 25506, 2, 42, 2, 2, 2, 2, 1)).setObjects(("HH3C-DOT3-EFM-EPON-MIB", "hh3cDot3OmpeGroupID"), ("HH3C-DOT3-EFM-EPON-MIB", "hh3cDot3OmpeGroupStat"))
if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0):
hh3cDot3OmpeCompliance = hh3cDot3OmpeCompliance.setStatus('current')
if mibBuilder.loadTexts: hh3cDot3OmpeCompliance.setDescription('The compliance statement for OMPEmulation interfaces.')
hh3cDot3EponMauMIB = MibIdentifier((1, 3, 6, 1, 4, 1, 25506, 2, 42, 2, 3))
hh3cDot3EponMauObjects = MibIdentifier((1, 3, 6, 1, 4, 1, 25506, 2, 42, 2, 3, 1))
hh3cDot3EponMauConformance = MibIdentifier((1, 3, 6, 1, 4, 1, 25506, 2, 42, 2, 3, 2))
hh3cDot3EponMauTable = MibTable((1, 3, 6, 1, 4, 1, 25506, 2, 42, 2, 3, 1, 1), )
if mibBuilder.loadTexts: hh3cDot3EponMauTable.setStatus('current')
if mibBuilder.loadTexts: hh3cDot3EponMauTable.setDescription('Table for dot3 MAU EPON MIB modules.')
hh3cDot3EponMauEntry = MibTableRow((1, 3, 6, 1, 4, 1, 25506, 2, 42, 2, 3, 1, 1, 1), ).setIndexNames((0, "IF-MIB", "ifIndex"))
if mibBuilder.loadTexts: hh3cDot3EponMauEntry.setStatus('current')
if mibBuilder.loadTexts: hh3cDot3EponMauEntry.setDescription('An entry in the dot3 MAU EPON MIB modules table.')
hh3cDot3EponMauPCSCodingViolation = MibTableColumn((1, 3, 6, 1, 4, 1, 25506, 2, 42, 2, 3, 1, 1, 1, 1), Counter32()).setUnits('octets').setMaxAccess("readonly")
if mibBuilder.loadTexts: hh3cDot3EponMauPCSCodingViolation.setReference('[802.3ah], 30.5.1.1.12.')
if mibBuilder.loadTexts: hh3cDot3EponMauPCSCodingViolation.setStatus('current')
if mibBuilder.loadTexts: hh3cDot3EponMauPCSCodingViolation.setDescription('For 100 Mb/ s operation it is a count of the number of times an invalid code-group is received, other than the /H/ code-group. For 1000 Mb/ s operation it is a count of the number of times an invalid codegroup is received, other than the /V/ code-group.')
hh3cDot3EponMauFecAbility = MibTableColumn((1, 3, 6, 1, 4, 1, 25506, 2, 42, 2, 3, 1, 1, 1, 2), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2, 3))).clone(namedValues=NamedValues(("unknown", 1), ("nonsupported", 2), ("supported", 3)))).setMaxAccess("readonly")
if mibBuilder.loadTexts: hh3cDot3EponMauFecAbility.setReference('[802.3ah], 30.5.1.1.13.')
if mibBuilder.loadTexts: hh3cDot3EponMauFecAbility.setStatus('current')
if mibBuilder.loadTexts: hh3cDot3EponMauFecAbility.setDescription('A read-only value that indicates the support of operation of the 1000BASE-PX PHY optional FEC Sublayer for Forward error correction see [802.3ah] clause 65.2). unknown(1) value is assigned in initializing, for non FEC support state or type not yet known. nonsupported(2) value is assigned when Sublayer is not support. supported(3) value is assigned when Sublayer is supported.')
hh3cDot3EponMauFecMode = MibTableColumn((1, 3, 6, 1, 4, 1, 25506, 2, 42, 2, 3, 1, 1, 1, 3), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2, 3))).clone(namedValues=NamedValues(("unknown", 1), ("disabled", 2), ("enabled", 3))).clone(1)).setMaxAccess("readwrite")
if mibBuilder.loadTexts: hh3cDot3EponMauFecMode.setReference('[802.3ah], 30.5.1.1.14.')
if mibBuilder.loadTexts: hh3cDot3EponMauFecMode.setStatus('current')
if mibBuilder.loadTexts: hh3cDot3EponMauFecMode.setDescription('A read-write value that indicates the mode of operation of the 1000BASE-PX PHY optional FEC Sublayer for Forward error correction see [802.3ah] clause 65.2). A GET operation returns the current mode of operation the PHY. A SET operation changes the mode of operation of the PHY to the indicated value. unknown(1) value is assigned in initializing, for non FEC support state or type not yet known. disabled(2) value is assigned when Sublayer operating in disabled mode. enabled(3) value is assigned when Sublayer operating in FEC mode. writing can be done all the time.')
hh3cDot3EponMauFECCorrectedBlocks = MibTableColumn((1, 3, 6, 1, 4, 1, 25506, 2, 42, 2, 3, 1, 1, 1, 4), Counter32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: hh3cDot3EponMauFECCorrectedBlocks.setReference('[802.3ah], 30.5.1.1.15.')
if mibBuilder.loadTexts: hh3cDot3EponMauFECCorrectedBlocks.setStatus('current')
if mibBuilder.loadTexts: hh3cDot3EponMauFECCorrectedBlocks.setDescription('For 10PASS-TS, 2BASE-TL and 1000BASE-PX PHYs, a count of corrected FEC blocks. This counter will not increment for other PHY Types. Increment the counter by one for each received block that is corrected by the FEC function in the PHY.')
hh3cDot3EponMauFECUncorrectableBlocks = MibTableColumn((1, 3, 6, 1, 4, 1, 25506, 2, 42, 2, 3, 1, 1, 1, 5), Counter32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: hh3cDot3EponMauFECUncorrectableBlocks.setReference('[802.3ah], 30.5.1.1.16.')
if mibBuilder.loadTexts: hh3cDot3EponMauFECUncorrectableBlocks.setStatus('current')
if mibBuilder.loadTexts: hh3cDot3EponMauFECUncorrectableBlocks.setDescription('For 10PASS-TS, 2BASE-TL and 1000BASE-PX PHYs, a count of uncorrectable FEC blocks. This counter will not increment for other PHY Types. Increment the counter by one for each FEC block that is determined to be uncorrectable by the FEC function in the PHY.')
hh3cDot3EponMauBufferHeadCodingViolation = MibTableColumn((1, 3, 6, 1, 4, 1, 25506, 2, 42, 2, 3, 1, 1, 1, 6), Counter32()).setUnits('octets').setMaxAccess("readonly")
if mibBuilder.loadTexts: hh3cDot3EponMauBufferHeadCodingViolation.setStatus('current')
if mibBuilder.loadTexts: hh3cDot3EponMauBufferHeadCodingViolation.setDescription('For 1000 Mbps operation it is a counts of the number of invalid code-group received directly from the link.')
hh3cDot3EponMauType = MibIdentifier((1, 3, 6, 1, 4, 1, 25506, 2, 42, 2, 3, 3))
hh3cEponMauType1000BasePXOLT = ObjectIdentity((1, 3, 6, 1, 4, 1, 25506, 2, 42, 2, 3, 3, 1))
if mibBuilder.loadTexts: hh3cEponMauType1000BasePXOLT.setStatus('current')
if mibBuilder.loadTexts: hh3cEponMauType1000BasePXOLT.setDescription('Multipoint MAC Control (per 802.3 section 64,65) OLT (master), unknown PMD')
if mibBuilder.loadTexts: hh3cEponMauType1000BasePXOLT.setReference('[802.3ah], 30.5.1.1.2.')
hh3cEponMauType1000BasePXONU = ObjectIdentity((1, 3, 6, 1, 4, 1, 25506, 2, 42, 2, 3, 3, 2))
if mibBuilder.loadTexts: hh3cEponMauType1000BasePXONU.setStatus('current')
if mibBuilder.loadTexts: hh3cEponMauType1000BasePXONU.setDescription('Multipoint MAC Control (per 802.3 section 64,65),ONU (slave), unknown PMD')
if mibBuilder.loadTexts: hh3cEponMauType1000BasePXONU.setReference('[802.3ah], 30.5.1.1.2.')
hh3cEponMauType1000BasePX10DOLT = ObjectIdentity((1, 3, 6, 1, 4, 1, 25506, 2, 42, 2, 3, 3, 3))
if mibBuilder.loadTexts: hh3cEponMauType1000BasePX10DOLT.setStatus('current')
if mibBuilder.loadTexts: hh3cEponMauType1000BasePX10DOLT.setDescription('EPON over 10K link, downlink (per 802.3 section 60), OLT side')
if mibBuilder.loadTexts: hh3cEponMauType1000BasePX10DOLT.setReference('[802.3ah], 30.5.1.1.2.')
hh3cEponMauType1000BasePX10DONU = ObjectIdentity((1, 3, 6, 1, 4, 1, 25506, 2, 42, 2, 3, 3, 4))
if mibBuilder.loadTexts: hh3cEponMauType1000BasePX10DONU.setStatus('current')
if mibBuilder.loadTexts: hh3cEponMauType1000BasePX10DONU.setDescription('EPON over 10K link, downlink (per 802.3 section 60), ONU side')
if mibBuilder.loadTexts: hh3cEponMauType1000BasePX10DONU.setReference('[802.3ah], 30.5.1.1.2.')
hh3cEponMauType1000BasePX10UOLT = ObjectIdentity((1, 3, 6, 1, 4, 1, 25506, 2, 42, 2, 3, 3, 5))
if mibBuilder.loadTexts: hh3cEponMauType1000BasePX10UOLT.setStatus('current')
if mibBuilder.loadTexts: hh3cEponMauType1000BasePX10UOLT.setDescription('EPON over 10K link, uplink (per 802.3 section 60), OLT side')
if mibBuilder.loadTexts: hh3cEponMauType1000BasePX10UOLT.setReference('[802.3ah], 30.5.1.1.2.')
hh3cEponMauType1000BasePX10UONU = ObjectIdentity((1, 3, 6, 1, 4, 1, 25506, 2, 42, 2, 3, 3, 6))
if mibBuilder.loadTexts: hh3cEponMauType1000BasePX10UONU.setStatus('current')
if mibBuilder.loadTexts: hh3cEponMauType1000BasePX10UONU.setDescription('EPON over 10K link, uplink (per 802.3 section 60), ONU side')
if mibBuilder.loadTexts: hh3cEponMauType1000BasePX10UONU.setReference('[802.3ah], 30.5.1.1.2.')
hh3cEponMauType1000BasePX20DOLT = ObjectIdentity((1, 3, 6, 1, 4, 1, 25506, 2, 42, 2, 3, 3, 7))
if mibBuilder.loadTexts: hh3cEponMauType1000BasePX20DOLT.setStatus('current')
if mibBuilder.loadTexts: hh3cEponMauType1000BasePX20DOLT.setDescription('EPON over 20K link, downlink (per 802.3 section 60), OLT side')
if mibBuilder.loadTexts: hh3cEponMauType1000BasePX20DOLT.setReference('[802.3ah], 30.5.1.1.2.')
hh3cEponMauType1000BasePX20DONU = ObjectIdentity((1, 3, 6, 1, 4, 1, 25506, 2, 42, 2, 3, 3, 8))
if mibBuilder.loadTexts: hh3cEponMauType1000BasePX20DONU.setStatus('current')
if mibBuilder.loadTexts: hh3cEponMauType1000BasePX20DONU.setDescription('EPON over 20K link, downlink (per 802.3 section 60), ONU side')
if mibBuilder.loadTexts: hh3cEponMauType1000BasePX20DONU.setReference('[802.3ah], 30.5.1.1.2.')
hh3cEponMauType1000BasePX20UOLT = ObjectIdentity((1, 3, 6, 1, 4, 1, 25506, 2, 42, 2, 3, 3, 9))
if mibBuilder.loadTexts: hh3cEponMauType1000BasePX20UOLT.setStatus('current')
if mibBuilder.loadTexts: hh3cEponMauType1000BasePX20UOLT.setDescription('EPON over 20K link, uplink (per 802.3 section 60), OLT side')
if mibBuilder.loadTexts: hh3cEponMauType1000BasePX20UOLT.setReference('[802.3ah], 30.5.1.1.2.')
hh3cEponMauType1000BasePX20UONU = ObjectIdentity((1, 3, 6, 1, 4, 1, 25506, 2, 42, 2, 3, 3, 10))
if mibBuilder.loadTexts: hh3cEponMauType1000BasePX20UONU.setStatus('current')
if mibBuilder.loadTexts: hh3cEponMauType1000BasePX20UONU.setDescription('EPON over 20K link, uplink (per 802.3 section 60), ONU side')
if mibBuilder.loadTexts: hh3cEponMauType1000BasePX20UONU.setReference('[802.3ah], 30.5.1.1.2.')
hh3cDot3EponMauGroups = MibIdentifier((1, 3, 6, 1, 4, 1, 25506, 2, 42, 2, 3, 2, 1))
hh3cDot3EponMauGroupAll = ObjectGroup((1, 3, 6, 1, 4, 1, 25506, 2, 42, 2, 3, 2, 1, 1)).setObjects(("HH3C-DOT3-EFM-EPON-MIB", "hh3cDot3EponMauPCSCodingViolation"))
if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0):
hh3cDot3EponMauGroupAll = hh3cDot3EponMauGroupAll.setStatus('current')
if mibBuilder.loadTexts: hh3cDot3EponMauGroupAll.setDescription('A collection of objects of dot3 MAU definition.')
hh3cDot3EponMauGroupFEC = ObjectGroup((1, 3, 6, 1, 4, 1, 25506, 2, 42, 2, 3, 2, 1, 2)).setObjects(("HH3C-DOT3-EFM-EPON-MIB", "hh3cDot3EponMauFecAbility"), ("HH3C-DOT3-EFM-EPON-MIB", "hh3cDot3EponMauFecMode"), ("HH3C-DOT3-EFM-EPON-MIB", "hh3cDot3EponMauFECCorrectedBlocks"), ("HH3C-DOT3-EFM-EPON-MIB", "hh3cDot3EponMauFECUncorrectableBlocks"), ("HH3C-DOT3-EFM-EPON-MIB", "hh3cDot3EponMauBufferHeadCodingViolation"))
if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0):
hh3cDot3EponMauGroupFEC = hh3cDot3EponMauGroupFEC.setStatus('current')
if mibBuilder.loadTexts: hh3cDot3EponMauGroupFEC.setDescription('A collection of objects of FEC group definition.')
hh3cDot3EponMauCompliances = MibIdentifier((1, 3, 6, 1, 4, 1, 25506, 2, 42, 2, 3, 2, 2))
hh3cDot3EponMauCompliance = ModuleCompliance((1, 3, 6, 1, 4, 1, 25506, 2, 42, 2, 3, 2, 2, 1)).setObjects(("HH3C-DOT3-EFM-EPON-MIB", "hh3cDot3EponMauGroupAll"), ("HH3C-DOT3-EFM-EPON-MIB", "hh3cDot3EponMauGroupFEC"))
if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0):
hh3cDot3EponMauCompliance = hh3cDot3EponMauCompliance.setStatus('current')
if mibBuilder.loadTexts: hh3cDot3EponMauCompliance.setDescription('The compliance statement for MAU EPON interfaces.')
mibBuilder.exportSymbols("HH3C-DOT3-EFM-EPON-MIB", hh3cDot3MpcpRxNotSupportedMPCP=hh3cDot3MpcpRxNotSupportedMPCP, hh3cEponMauType1000BasePXONU=hh3cEponMauType1000BasePXONU, hh3cDot3OmpEmulationGoodLLID=hh3cDot3OmpEmulationGoodLLID, hh3cDot3MpcpCompliances=hh3cDot3MpcpCompliances, hh3cEponMauType1000BasePX10UOLT=hh3cEponMauType1000BasePX10UOLT, hh3cDot3OmpeGroupStat=hh3cDot3OmpeGroupStat, hh3cDot3OmpeConformance=hh3cDot3OmpeConformance, hh3cEponMauType1000BasePX10UONU=hh3cEponMauType1000BasePX10UONU, hh3cEponMauType1000BasePX20DONU=hh3cEponMauType1000BasePX20DONU, hh3cDot3OmpEmulationStatEntry=hh3cDot3OmpEmulationStatEntry, hh3cDot3OmpEmulationType=hh3cDot3OmpEmulationType, hh3cDot3MpcpRxGate=hh3cDot3MpcpRxGate, hh3cEponMauType1000BasePX10DONU=hh3cEponMauType1000BasePX10DONU, hh3cDot3EponMauPCSCodingViolation=hh3cDot3EponMauPCSCodingViolation, hh3cEponMauType1000BasePX20UONU=hh3cEponMauType1000BasePX20UONU, hh3cDot3MpcpTxRegister=hh3cDot3MpcpTxRegister, hh3cDot3MpcpDiscoveryWindowsSent=hh3cDot3MpcpDiscoveryWindowsSent, hh3cDot3OmpEmulationMIB=hh3cDot3OmpEmulationMIB, hh3cDot3MpcpMACCtrlFramesReceived=hh3cDot3MpcpMACCtrlFramesReceived, hh3cDot3MpcpConformance=hh3cDot3MpcpConformance, hh3cDot3MpcpMACCtrlFramesTransmitted=hh3cDot3MpcpMACCtrlFramesTransmitted, hh3cDot3OmpEmulationCRC8Errors=hh3cDot3OmpEmulationCRC8Errors, PYSNMP_MODULE_ID=hh3cDot3EfmeponMIB, hh3cDot3OmpEmulationBadLLID=hh3cDot3OmpEmulationBadLLID, hh3cDot3MpcpObjects=hh3cDot3MpcpObjects, hh3cDot3EponMauGroupFEC=hh3cDot3EponMauGroupFEC, hh3cDot3MpcpAdminState=hh3cDot3MpcpAdminState, hh3cDot3EponMauGroups=hh3cDot3EponMauGroups, hh3cDot3MpcpGroups=hh3cDot3MpcpGroups, hh3cDot3EponMauType=hh3cDot3EponMauType, hh3cDot3MpcpStatTable=hh3cDot3MpcpStatTable, hh3cDot3MpcpOnTime=hh3cDot3MpcpOnTime, hh3cDot3OmpEmulationStatTable=hh3cDot3OmpEmulationStatTable, hh3cDot3EponMauBufferHeadCodingViolation=hh3cDot3EponMauBufferHeadCodingViolation, hh3cDot3MpcpGroupParam=hh3cDot3MpcpGroupParam, hh3cDot3OmpEmulationBroadcastLLIDNotOnuID=hh3cDot3OmpEmulationBroadcastLLIDNotOnuID, hh3cDot3MpcpCompliance=hh3cDot3MpcpCompliance, hh3cDot3EponMauFECUncorrectableBlocks=hh3cDot3EponMauFECUncorrectableBlocks, hh3cDot3MpcpRxReport=hh3cDot3MpcpRxReport, hh3cEponMauType1000BasePX10DOLT=hh3cEponMauType1000BasePX10DOLT, hh3cDot3OmpEmulationSLDErrors=hh3cDot3OmpEmulationSLDErrors, hh3cDot3EponMauCompliances=hh3cDot3EponMauCompliances, hh3cDot3MpcpRemoteMACAddress=hh3cDot3MpcpRemoteMACAddress, hh3cDot3MpcpMaximumPendingGrants=hh3cDot3MpcpMaximumPendingGrants, hh3cDot3MpcpTable=hh3cDot3MpcpTable, hh3cDot3EponMauEntry=hh3cDot3EponMauEntry, hh3cDot3OmpEmulationOnuPonCastLLID=hh3cDot3OmpEmulationOnuPonCastLLID, hh3cDot3EponMauTable=hh3cDot3EponMauTable, hh3cDot3OmpEmulationEntry=hh3cDot3OmpEmulationEntry, hh3cDot3MpcpRxRegRequest=hh3cDot3MpcpRxRegRequest, hh3cDot3EponMauFecAbility=hh3cDot3EponMauFecAbility, hh3cDot3EponMauMIB=hh3cDot3EponMauMIB, hh3cDot3MpcpTxRegRequest=hh3cDot3MpcpTxRegRequest, hh3cDot3MpcpEntry=hh3cDot3MpcpEntry, hh3cDot3MpcpStatEntry=hh3cDot3MpcpStatEntry, hh3cDot3OmpEmulationObjects=hh3cDot3OmpEmulationObjects, hh3cDot3MpcpMode=hh3cDot3MpcpMode, hh3cDot3OmpEmulationNotBroadcastLLIDNotOnuId=hh3cDot3OmpEmulationNotBroadcastLLIDNotOnuId, hh3cDot3EponMauCompliance=hh3cDot3EponMauCompliance, hh3cDot3MpcpReceiveElapsed=hh3cDot3MpcpReceiveElapsed, hh3cDot3MpcpOperStatus=hh3cDot3MpcpOperStatus, hh3cDot3MpcpOffTime=hh3cDot3MpcpOffTime, hh3cDot3OmpEmulationBroadcastLLIDPlusOnuId=hh3cDot3OmpEmulationBroadcastLLIDPlusOnuId, hh3cDot3MpcpMIB=hh3cDot3MpcpMIB, hh3cDot3MpcpGroupBase=hh3cDot3MpcpGroupBase, hh3cDot3MpcpGroupStat=hh3cDot3MpcpGroupStat, hh3cDot3OmpeGroups=hh3cDot3OmpeGroups, hh3cDot3OmpEmulationTable=hh3cDot3OmpEmulationTable, hh3cDot3OmpEmulationID=hh3cDot3OmpEmulationID, hh3cDot3MpcpTransmitElapsed=hh3cDot3MpcpTransmitElapsed, hh3cDot3EponMauObjects=hh3cDot3EponMauObjects, hh3cDot3EponMauFecMode=hh3cDot3EponMauFecMode, hh3cDot3MpcpTxReport=hh3cDot3MpcpTxReport, hh3cDot3EponMauFECCorrectedBlocks=hh3cDot3EponMauFECCorrectedBlocks, hh3cDot3OmpeCompliance=hh3cDot3OmpeCompliance, hh3cDot3EponMauGroupAll=hh3cDot3EponMauGroupAll, hh3cEponMauType1000BasePX20UOLT=hh3cEponMauType1000BasePX20UOLT, hh3cDot3OmpEmulationOnuLLIDNotBroadcast=hh3cDot3OmpEmulationOnuLLIDNotBroadcast, hh3cDot3MpcpTxRegAck=hh3cDot3MpcpTxRegAck, hh3cDot3MpcpRegistrationState=hh3cDot3MpcpRegistrationState, hh3cDot3MpcpRoundTripTime=hh3cDot3MpcpRoundTripTime, hh3cDot3EfmeponMIB=hh3cDot3EfmeponMIB, hh3cDot3MpcpRxRegAck=hh3cDot3MpcpRxRegAck, hh3cDot3MpcpDiscoveryTimeout=hh3cDot3MpcpDiscoveryTimeout, hh3cEponMauType1000BasePX20DOLT=hh3cEponMauType1000BasePX20DOLT, hh3cDot3MpcpLinkID=hh3cDot3MpcpLinkID, hh3cDot3MpcpRxRegister=hh3cDot3MpcpRxRegister, hh3cDot3MpcpID=hh3cDot3MpcpID, hh3cEponMauType1000BasePXOLT=hh3cEponMauType1000BasePXOLT, hh3cDot3EponMauConformance=hh3cDot3EponMauConformance, hh3cDot3OmpeCompliances=hh3cDot3OmpeCompliances, hh3cDot3OmpEmulationOltPonCastLLID=hh3cDot3OmpEmulationOltPonCastLLID, hh3cDot3OmpeGroupID=hh3cDot3OmpeGroupID, hh3cDot3MpcpTxGate=hh3cDot3MpcpTxGate, hh3cDot3MpcpSyncTime=hh3cDot3MpcpSyncTime)
| 169.311573
| 5,121
| 0.783483
|
3ecbd115bcfdc5ce591f196d4fe1390310b89ddc
| 576
|
py
|
Python
|
example/runscripts/nhilton/run_batch_job.py
|
weegreenblobbie/pith-tool
|
25708bd2354cc5d97eb0c0a0046ca4704e4ced0a
|
[
"MIT"
] | 2
|
2016-03-04T19:25:29.000Z
|
2016-03-10T02:22:36.000Z
|
example/runscripts/nhilton/run_batch_job.py
|
weegreenblobbie/pith-tool
|
25708bd2354cc5d97eb0c0a0046ca4704e4ced0a
|
[
"MIT"
] | 10
|
2016-03-01T03:23:17.000Z
|
2017-04-27T00:37:09.000Z
|
example/runscripts/nhilton/run_batch_job.py
|
weegreenblobbie/pith-tool
|
25708bd2354cc5d97eb0c0a0046ca4704e4ced0a
|
[
"MIT"
] | null | null | null |
import argparse
from module_a.fun_1 import fun_1
from module_c.fun_4 import fun_4
from external_a.extra_fun import extra_fun
if __name__ == "__main__":
main()
| 16
| 46
| 0.626736
|
3eccf323bfafeef7616f6d78bb34226073a6758e
| 3,039
|
py
|
Python
|
i18n/listeners/proxyContainer/ListShouldContainSubListProxy.py
|
Rexmen/i18n
|
b615f2d1e06b58f4647f1b269fc37d7921bc5c4b
|
[
"MIT"
] | null | null | null |
i18n/listeners/proxyContainer/ListShouldContainSubListProxy.py
|
Rexmen/i18n
|
b615f2d1e06b58f4647f1b269fc37d7921bc5c4b
|
[
"MIT"
] | null | null | null |
i18n/listeners/proxyContainer/ListShouldContainSubListProxy.py
|
Rexmen/i18n
|
b615f2d1e06b58f4647f1b269fc37d7921bc5c4b
|
[
"MIT"
] | null | null | null |
from .Proxy import Proxy
from robot.libraries.BuiltIn import BuiltIn
import sys
from robot.libraries.Screenshot import Screenshot
from robot.api import logger
import I18nListener as i18n
import ManyTranslations as ui
from robot.utils import unic
| 50.65
| 137
| 0.58901
|
3ecdb050826a3f9850819307adc5e13bc204f458
| 3,218
|
py
|
Python
|
dl_bounds/src/experiments/exp_bad_minima_branchout.py
|
google/dl_bounds
|
b38fbd73f30d2fd8d1b57ad8706c07a223689365
|
[
"Apache-2.0"
] | 12
|
2018-02-23T11:57:26.000Z
|
2021-04-20T20:38:16.000Z
|
dl_bounds/src/experiments/exp_bad_minima_branchout.py
|
google/dl_bounds
|
b38fbd73f30d2fd8d1b57ad8706c07a223689365
|
[
"Apache-2.0"
] | null | null | null |
dl_bounds/src/experiments/exp_bad_minima_branchout.py
|
google/dl_bounds
|
b38fbd73f30d2fd8d1b57ad8706c07a223689365
|
[
"Apache-2.0"
] | 7
|
2018-06-28T04:10:45.000Z
|
2021-10-14T01:18:59.000Z
|
# coding=utf-8
# Copyright 2018 Google LLC
#
# 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 writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
"""Implements experimental logic."""
from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
from copy import copy
from dl_bounds.src.data import LocalDatasetProvider
from dl_bounds.src.exp_helpers import aggregate_dicts
from dl_bounds.src.experiments.exp_base import Experiment
import numpy as np
from scipy.stats import truncnorm
import tensorflow as tf
| 32.836735
| 75
| 0.724984
|
3ecdb707d9b5224c78e8710bc0080bbb309fdaf0
| 279
|
py
|
Python
|
config.py
|
DiagnoSkin/diagnoskin-server
|
e1cae10423323cc681d6acf6cc5d1511e6e2cae5
|
[
"Apache-2.0"
] | null | null | null |
config.py
|
DiagnoSkin/diagnoskin-server
|
e1cae10423323cc681d6acf6cc5d1511e6e2cae5
|
[
"Apache-2.0"
] | 4
|
2021-06-08T20:42:49.000Z
|
2022-03-12T00:08:54.000Z
|
config.py
|
DiagnoSkin/diagnoskin-server
|
e1cae10423323cc681d6acf6cc5d1511e6e2cae5
|
[
"Apache-2.0"
] | null | null | null |
import json
| 34.875
| 59
| 0.698925
|
3ece59f5395837726a33f7c182a3a996e31afa97
| 699
|
py
|
Python
|
World 1/If...Else/ex029 - Eletronic Radar.py
|
MiguelChichorro/PythonExercises
|
3b2726e7d9ef92c1eb6b977088692c42a2a7b86e
|
[
"MIT"
] | 2
|
2021-04-23T19:18:06.000Z
|
2021-05-15T17:45:21.000Z
|
World 1/If...Else/ex029 - Eletronic Radar.py
|
MiguelChichorro/PythonExercises
|
3b2726e7d9ef92c1eb6b977088692c42a2a7b86e
|
[
"MIT"
] | 1
|
2021-05-14T00:29:23.000Z
|
2021-05-14T00:29:23.000Z
|
World 1/If...Else/ex029 - Eletronic Radar.py
|
MiguelChichorro/PythonExercises
|
3b2726e7d9ef92c1eb6b977088692c42a2a7b86e
|
[
"MIT"
] | 1
|
2021-05-14T00:19:33.000Z
|
2021-05-14T00:19:33.000Z
|
from time import sleep
colors = {"clean": "\033[m",
"red": "\033[31m",
"green": "\033[32m",
"yellow": "\033[33m",
"blue": "\033[34m",
"purple": "\033[35m",
"cian": "\033[36m"}
v = float(input("Enter the car speed was: "))
tic = (v - 80) * 7
print("{}Loading...{}".format(colors["green"], colors["clean"]))
sleep(2)
if v > 80:
print("{}You were very fast, your speed was {} km{}".format(colors["red"], v, colors["clean"]))
print("{}Now you need to pay {} $US because of that{}".format(colors["red"], tic, colors["clean"]))
else:
print("{}You were in the right speed, you can move on{}".format(colors["green"], colors["clean"]))
| 38.833333
| 103
| 0.546495
|
3ece62c6129ee74730b7e33194559a50dbbdff89
| 1,913
|
py
|
Python
|
687.longest-univalue-path.py
|
Lonitch/hackerRank
|
84991b8340e725422bc47eec664532cc84a3447e
|
[
"MIT"
] | null | null | null |
687.longest-univalue-path.py
|
Lonitch/hackerRank
|
84991b8340e725422bc47eec664532cc84a3447e
|
[
"MIT"
] | null | null | null |
687.longest-univalue-path.py
|
Lonitch/hackerRank
|
84991b8340e725422bc47eec664532cc84a3447e
|
[
"MIT"
] | null | null | null |
#
# @lc app=leetcode id=687 lang=python3
#
# [687] Longest Univalue Path
#
# https://leetcode.com/problems/longest-univalue-path/description/
#
# algorithms
# Easy (34.69%)
# Likes: 1312
# Dislikes: 351
# Total Accepted: 76.5K
# Total Submissions: 218.3K
# Testcase Example: '[5,4,5,1,1,5]'
#
# Given a binary tree, find the length of the longest path where each node in
# the path has the same value. This path may or may not pass through the root.
#
# The length of path between two nodes is represented by the number of edges
# between them.
#
#
#
# Example 1:
#
# Input:
#
#
# 5
# / \
# 4 5
# / \ \
# 1 1 5
#
#
# Output:2
#
#
#
# Example 2:
#
# Input:
#
#
# 1
# / \
# 4 5
# / \ \
# 4 4 5
#
#
# Output:2
#
#
#
# Note: The given binary tree has not more than 10000 nodes. The height of the
# tree is not more than 1000.
#
#
# @lc code=start
# Definition for a binary tree node.
# class TreeNode:
# def __init__(self, x):
# self.val = x
# self.left = None
# self.right = None
# @lc code=end
| 21.021978
| 78
| 0.504966
|
3ecfb19dcb608f2b63fc8fd0aece69c83033985f
| 6,085
|
py
|
Python
|
scripts/wordnet.py
|
WladimirSidorenko/SentimentLexicon
|
0d7203b7b7e3ca5d11759fdad656f775fa5d6e95
|
[
"MIT"
] | 13
|
2016-08-03T18:46:02.000Z
|
2022-02-22T22:30:19.000Z
|
scripts/wordnet.py
|
WladimirSidorenko/SentimentLexicon
|
0d7203b7b7e3ca5d11759fdad656f775fa5d6e95
|
[
"MIT"
] | 2
|
2019-10-22T13:03:48.000Z
|
2019-12-05T21:41:36.000Z
|
scripts/wordnet.py
|
WladimirSidorenko/SentimentLexicon
|
0d7203b7b7e3ca5d11759fdad656f775fa5d6e95
|
[
"MIT"
] | 5
|
2019-12-25T13:53:18.000Z
|
2020-06-05T20:47:31.000Z
|
#!/usr/bin/env python2.7
# -*- coding: utf-8; mode: python; -*-
"""
Module for reading and processing GemaNet files.
Constants:
POS - list of parts-of-speech present in GermaNet
RELTYPES - types of GermaNet relations
Classes:
Germanet - main class for processing GermaNet files
"""
##################################################################
# Imports
from __future__ import unicode_literals, print_function
from itertools import chain
from collections import defaultdict
import argparse
import codecs
import glob
import os
import re
import sys
import xml.etree.ElementTree as ET
##################################################################
# Variables and Constants
SKIP_RE = re.compile(r"\s+[1-9]")
ENCODING = "utf-8"
POS = [".adj", ".adv", ".noun", ".verb"]
RELSYM2NAME = {
"~": "Hyponym",
"~i": "Instance Hyponym",
"!": "Antonym",
"#m": "Member holonym",
"#p": "Part holonym",
"#s": "Substance holonym",
"$": "Verb Group",
"%m": "Member meronym",
"%p": "Part meronym",
"%s": "Substance meronym",
"&": "Similar to",
"*": "Entailment",
"+": "Derivationally related form",
"-c": "Member of this domain - TOPIC",
"-r": "Member of this domain - REGION",
"-u": "Member of this domain - USAGE",
";c": "Domain of synset - TOPIC",
";r": "Domain of synset - REGION",
";u": "Domain of synset - USAGE",
"<": "Participle of verb",
"=": "Attribute",
">": "Cause",
"@": "Hypernym",
"@i": "Instance Hypernym",
"\\": "Derived from adjective",
"^": "Also see"
}
##################################################################
# Class
| 35.794118
| 79
| 0.517173
|
3ed5304c84ec79c59f7ad03780e20d83636a1751
| 493
|
py
|
Python
|
exec_ops/python/run.py
|
orm011/skyhookml
|
0cec9011ffbece3348cf56275f027c4b5b31b4d4
|
[
"MIT"
] | null | null | null |
exec_ops/python/run.py
|
orm011/skyhookml
|
0cec9011ffbece3348cf56275f027c4b5b31b4d4
|
[
"MIT"
] | null | null | null |
exec_ops/python/run.py
|
orm011/skyhookml
|
0cec9011ffbece3348cf56275f027c4b5b31b4d4
|
[
"MIT"
] | null | null | null |
import sys
sys.path.append('./python')
import skyhook.common as lib
import io
import json
import math
import numpy
import os
import os.path
import skimage.io
import struct
user_func = None
# user_func will be defined by the exec call in meta_func
lib.run(callback, meta_func)
| 17.607143
| 57
| 0.720081
|
3ed7524764506c9bf8a8c074a4bfe30279004c01
| 36
|
py
|
Python
|
example_package/model_eval.py
|
aaronengland/example_package
|
1e45fccc27af57b9d2bb58e16e58ef57d81b656e
|
[
"MIT"
] | null | null | null |
example_package/model_eval.py
|
aaronengland/example_package
|
1e45fccc27af57b9d2bb58e16e58ef57d81b656e
|
[
"MIT"
] | null | null | null |
example_package/model_eval.py
|
aaronengland/example_package
|
1e45fccc27af57b9d2bb58e16e58ef57d81b656e
|
[
"MIT"
] | null | null | null |
# model eval
| 9
| 16
| 0.694444
|
3ed921fc020d2c520c2bb21c3fba179cbc45d373
| 2,836
|
py
|
Python
|
ducky/asm/lexer.py
|
happz/ducky
|
1c6a875ca5a7a9cc71836bad5b7e45cc398d42ad
|
[
"MIT"
] | 3
|
2015-04-25T18:25:37.000Z
|
2017-08-31T20:52:29.000Z
|
ducky/asm/lexer.py
|
happz/ducky-legacy
|
1c6a875ca5a7a9cc71836bad5b7e45cc398d42ad
|
[
"MIT"
] | 27
|
2015-01-06T21:59:22.000Z
|
2016-11-12T07:31:39.000Z
|
ducky/asm/lexer.py
|
happz/ducky-legacy
|
1c6a875ca5a7a9cc71836bad5b7e45cc398d42ad
|
[
"MIT"
] | 1
|
2017-05-14T18:52:34.000Z
|
2017-05-14T18:52:34.000Z
|
import ply.lex
#
# Lexer setup
#
instructions = (
'NOP', 'INT', 'IPI', 'RETINT', 'CALL', 'RET', 'CLI', 'STI', 'HLT', 'RST', 'IDLE',
'PUSH', 'POP', 'INC', 'DEC', 'ADD', 'SUB', 'CMP', 'J', 'AND', 'OR', 'XOR', 'NOT',
'SHL', 'SHR', 'SHRS', 'LW', 'LS', 'LB', 'LI', 'LIU', 'LA', 'STW', 'STS', 'STB',
'MOV', 'SWP', 'MUL', 'UDIV', 'MOD', 'CMPU', 'CAS', 'SIS', 'DIV',
'BE', 'BNE', 'BS', 'BNS', 'BZ', 'BNZ', 'BO', 'BNO', "BL", "BLE", "BGE", "BG",
'SETE', 'SETNE', 'SETZ', 'SETNZ', 'SETO', 'SETNO', 'SETS', 'SETNS', "SETL", "SETLE", "SETGE", "SETG",
'SELE', 'SELNE', 'SELZ', 'SELNZ', 'SELS', 'SELNS', 'SELO', 'SELNO', "SELL", "SELLE", "SELGE", "SELG",
'LPM', 'CTR', 'CTW', 'FPTC'
)
math_instructions = (
'PUSHW', 'SAVEW', 'POPW', 'LOADW', 'POPUW', 'LOADUW', 'SAVE', 'LOAD',
'INCL', 'DECL', 'ADDL', 'MULL', 'DIVL', 'MODL', 'UDIVL', 'UMODL',
'DUP', 'DUP2', 'SWPL', 'DROP', 'SYMDIVL', 'SYMMODL',
'PUSHL', 'POPL'
)
directives = (
'data', 'text',
'type', 'global',
'ascii', 'byte', 'short', 'space', 'string', 'word',
'section',
'align', 'file',
'set'
)
# Construct list of tokens, and map of reserved words
tokens = instructions + math_instructions + (
'COMMA', 'COLON', 'HASH', 'LBRAC', 'RBRAC', 'DOT', 'PLUS',
'SCONST', 'ICONST',
'ID', 'REGISTER'
)
reserved_map = {
# Special registers
'sp': 'REGISTER',
'fp': 'REGISTER',
# Special instructions
'shiftl': 'SHL',
'shiftr': 'SHR',
'shiftrs': 'SHRS'
}
reserved_map.update({i.lower(): i for i in instructions})
reserved_map.update({i.lower(): i for i in math_instructions})
tokens = tokens + tuple([i.upper() for i in directives])
reserved_map.update({'.' + i: i.upper() for i in directives})
reserved_map.update({i: i.upper() for i in directives})
reserved_map.update({'r%d' % i: 'REGISTER' for i in range(0, 32)})
# Newlines
def t_NEWLINE(t):
r'\n+'
t.lexer.lineno += t.value.count('\n')
# Tokens
t_COMMA = r','
t_COLON = r':'
t_HASH = r'\#'
t_LBRAC = r'\['
t_RBRAC = r'\]'
t_DOT = r'\.'
t_PLUS = r'\+'
t_SCONST = r'\"([^\\\n]|(\\.))*?\"'
t_ICONST = r'-?(?:(?:0x[0-9a-fA-F][0-9a-fA-F]*)|(?:[0-9][0-9]*))'
def t_ID(t):
r'[a-zA-Z_\.][a-zA-Z0-9_\.]*'
t.type = reserved_map.get(t.value, 'ID')
return t
t_ignore = " \t"
| 27.269231
| 112
| 0.563822
|
3ed9543d76f8e0c91108d623c8ce3f5c3c426593
| 3,965
|
py
|
Python
|
MyUser/api/tests/allauth_login.py
|
mrvafa/blog-api
|
cef0773b3199bfb785126ce82567fd7fc78e6c89
|
[
"MIT"
] | null | null | null |
MyUser/api/tests/allauth_login.py
|
mrvafa/blog-api
|
cef0773b3199bfb785126ce82567fd7fc78e6c89
|
[
"MIT"
] | null | null | null |
MyUser/api/tests/allauth_login.py
|
mrvafa/blog-api
|
cef0773b3199bfb785126ce82567fd7fc78e6c89
|
[
"MIT"
] | null | null | null |
from django.test import TestCase, override_settings
from django.urls import reverse
from rest_framework.test import APIClient
from MyUser.models import User
| 50.189873
| 118
| 0.64691
|
3ed9a5ed8b96c7fface62084d850daafe13c098c
| 1,478
|
py
|
Python
|
flashcards/commands/sets.py
|
zergov/flashcards
|
4d1b1c277585b95517ed6c00ceff7555c8c131eb
|
[
"MIT"
] | 21
|
2016-06-13T00:51:49.000Z
|
2021-03-20T05:04:23.000Z
|
flashcards/commands/sets.py
|
zergov/flashcards
|
4d1b1c277585b95517ed6c00ceff7555c8c131eb
|
[
"MIT"
] | 11
|
2016-06-10T10:17:57.000Z
|
2020-01-30T15:14:35.000Z
|
flashcards/commands/sets.py
|
zergov/flashcards
|
4d1b1c277585b95517ed6c00ceff7555c8c131eb
|
[
"MIT"
] | 4
|
2017-01-02T13:26:21.000Z
|
2021-07-07T04:20:00.000Z
|
"""
flashcards.commands.sets
~~~~~~~~~~~~~~~~~~~
Contains the commands and subcommands related to the sets resource.
"""
import os
import click
from flashcards import sets
from flashcards import storage
sets_group.add_command(new)
sets_group.add_command(select)
| 25.482759
| 78
| 0.703654
|
3ed9dea01e0c68f96f2ada5e7ccd8ced87c473be
| 329
|
py
|
Python
|
legiti_challenge/feature_store_pipelines/user/__init__.py
|
rafaelleinio/legiti-challenge
|
5f15cb759d13e23292dffd103bc63583c934bf8b
|
[
"MIT"
] | 1
|
2021-04-01T19:55:51.000Z
|
2021-04-01T19:55:51.000Z
|
legiti_challenge/feature_store_pipelines/user/__init__.py
|
rafaelleinio/legiti-challenge
|
5f15cb759d13e23292dffd103bc63583c934bf8b
|
[
"MIT"
] | null | null | null |
legiti_challenge/feature_store_pipelines/user/__init__.py
|
rafaelleinio/legiti-challenge
|
5f15cb759d13e23292dffd103bc63583c934bf8b
|
[
"MIT"
] | null | null | null |
"""Module containing imports for user entity feature set pipelines."""
from legiti_challenge.feature_store_pipelines.user.user_chargebacks import (
UserChargebacksPipeline,
)
from legiti_challenge.feature_store_pipelines.user.user_orders import UserOrdersPipeline
__all__ = ["UserChargebacksPipeline", "UserOrdersPipeline"]
| 41.125
| 88
| 0.841945
|
3eda7f92aad073987eebca83a079837bb3553721
| 5,908
|
py
|
Python
|
sdf/step.py
|
pschou/py-sdf
|
0a269ed155d026e29429d76666fb63c95d2b4b2c
|
[
"MIT"
] | null | null | null |
sdf/step.py
|
pschou/py-sdf
|
0a269ed155d026e29429d76666fb63c95d2b4b2c
|
[
"MIT"
] | null | null | null |
sdf/step.py
|
pschou/py-sdf
|
0a269ed155d026e29429d76666fb63c95d2b4b2c
|
[
"MIT"
] | null | null | null |
import numpy as np
import struct
import getpass
import struct
from datetime import datetime
edge_curve = {}
| 52.283186
| 164
| 0.488659
|
3edaa008a2ee781cad3cfd27460bbf4776c643ad
| 209
|
py
|
Python
|
djmail/apps.py
|
CuriousLearner/djmail
|
da4cd3d4749f116b714f5f509cadc0a5d2cfb9c4
|
[
"BSD-3-Clause"
] | 53
|
2015-06-22T11:24:00.000Z
|
2021-08-30T21:00:08.000Z
|
djmail/apps.py
|
CuriousLearner/djmail
|
da4cd3d4749f116b714f5f509cadc0a5d2cfb9c4
|
[
"BSD-3-Clause"
] | 28
|
2015-11-04T16:11:00.000Z
|
2021-02-24T17:48:14.000Z
|
djmail/apps.py
|
CuriousLearner/djmail
|
da4cd3d4749f116b714f5f509cadc0a5d2cfb9c4
|
[
"BSD-3-Clause"
] | 22
|
2015-07-29T15:53:53.000Z
|
2020-12-21T04:32:26.000Z
|
from django.apps import AppConfig
| 19
| 41
| 0.660287
|
3edffdae907a0e7657c6b259ab845792ce337f54
| 349
|
py
|
Python
|
flask-api/schema/change_password.py
|
PapamichMarios/Intranet
|
65cd98d08a1a550d70e1afa4859a0b105c049817
|
[
"MIT"
] | 1
|
2021-12-21T19:13:37.000Z
|
2021-12-21T19:13:37.000Z
|
flask-api/schema/change_password.py
|
PapamichMarios/Intranet
|
65cd98d08a1a550d70e1afa4859a0b105c049817
|
[
"MIT"
] | null | null | null |
flask-api/schema/change_password.py
|
PapamichMarios/Intranet
|
65cd98d08a1a550d70e1afa4859a0b105c049817
|
[
"MIT"
] | null | null | null |
from marshmallow import Schema, fields, validate
| 43.625
| 114
| 0.762178
|
3ee1169f26e39df8113aa1b6b00e7646bd86f543
| 6,100
|
py
|
Python
|
ros/src/tl_detector/light_classification/tl_classifier.py
|
jkoloda/CarND-Capstone
|
79ccd31930f5aab307a16db7b6c799a2ea54dc41
|
[
"MIT"
] | null | null | null |
ros/src/tl_detector/light_classification/tl_classifier.py
|
jkoloda/CarND-Capstone
|
79ccd31930f5aab307a16db7b6c799a2ea54dc41
|
[
"MIT"
] | null | null | null |
ros/src/tl_detector/light_classification/tl_classifier.py
|
jkoloda/CarND-Capstone
|
79ccd31930f5aab307a16db7b6c799a2ea54dc41
|
[
"MIT"
] | null | null | null |
from styx_msgs.msg import TrafficLight
import tensorflow as tf
import numpy as np
import rospy
import cv2
import os
MAX_IMAGE_WIDTH = 300
MAX_IMAGE_HEIGHT = 300
| 32.972973
| 79
| 0.587869
|
3ee194cecfeab3512df97384ab2ebd0feb3a1a32
| 3,554
|
py
|
Python
|
esp.py
|
dries007/MicroPythonUtils
|
fba10989713f85ce4afa598c550737720df24648
|
[
"MIT"
] | null | null | null |
esp.py
|
dries007/MicroPythonUtils
|
fba10989713f85ce4afa598c550737720df24648
|
[
"MIT"
] | null | null | null |
esp.py
|
dries007/MicroPythonUtils
|
fba10989713f85ce4afa598c550737720df24648
|
[
"MIT"
] | null | null | null |
import os
import serial
import time
import binascii
import textwrap
import re
from wifi import WIFI_SSID, WIFI_PASS
if __name__ == '__main__':
main()
| 32.018018
| 153
| 0.565841
|
3ee1be975102fb088be8688d19317a0aa2d3e773
| 3,909
|
py
|
Python
|
dev/tools/leveleditor/pandac/libpandaodeModules.py
|
CrankySupertoon01/Toontown-2
|
60893d104528a8e7eb4aced5d0015f22e203466d
|
[
"MIT"
] | 1
|
2021-02-13T22:40:50.000Z
|
2021-02-13T22:40:50.000Z
|
dev/tools/leveleditor/pandac/libpandaodeModules.py
|
CrankySupertoonArchive/Toontown-2
|
60893d104528a8e7eb4aced5d0015f22e203466d
|
[
"MIT"
] | 1
|
2018-07-28T20:07:04.000Z
|
2018-07-30T18:28:34.000Z
|
dev/tools/leveleditor/pandac/libpandaodeModules.py
|
CrankySupertoonArchive/Toontown-2
|
60893d104528a8e7eb4aced5d0015f22e203466d
|
[
"MIT"
] | 2
|
2019-12-02T01:39:10.000Z
|
2021-02-13T22:41:00.000Z
|
from extension_native_helpers import *
Dtool_PreloadDLL('libpandaode')
from libpandaode import *
from extension_native_helpers import *
Dtool_PreloadDLL('libpanda')
from libpanda import *
Dtool_funcToMethod(convert, OdeGeom)
del convert
Dtool_funcToMethod(getConvertedSpace, OdeGeom)
del getConvertedSpace
Dtool_funcToMethod(getAABounds, OdeGeom)
del getAABounds
from extension_native_helpers import *
Dtool_PreloadDLL('libpanda')
from libpanda import *
Dtool_funcToMethod(convert, OdeSpace)
del convert
Dtool_funcToMethod(getConvertedGeom, OdeSpace)
del getConvertedGeom
Dtool_funcToMethod(getConvertedSpace, OdeSpace)
del getConvertedSpace
Dtool_funcToMethod(getAABounds, OdeSpace)
del getAABounds
from extension_native_helpers import *
Dtool_PreloadDLL('libpanda')
from libpanda import *
Dtool_funcToMethod(attach, OdeJoint)
del attach
Dtool_funcToMethod(convert, OdeJoint)
del convert
from extension_native_helpers import *
Dtool_PreloadDLL('libpanda')
from libpanda import *
Dtool_funcToMethod(getConvertedJoint, OdeBody)
del getConvertedJoint
| 27.921429
| 53
| 0.724738
|
3ee350f95efe4a8c2344a53f97be58f2e3f0dcc2
| 1,087
|
py
|
Python
|
view_note.py
|
pushkar-anand/make-a-note
|
ca129dd1df1b62faad0c451e0818742bb1b1bc08
|
[
"Apache-2.0"
] | 1
|
2018-10-02T07:09:29.000Z
|
2018-10-02T07:09:29.000Z
|
view_note.py
|
pushkar-anand/make-a-note
|
ca129dd1df1b62faad0c451e0818742bb1b1bc08
|
[
"Apache-2.0"
] | 3
|
2018-10-01T13:40:13.000Z
|
2019-05-02T23:17:52.000Z
|
view_note.py
|
pushkar-anand/make-a-note
|
ca129dd1df1b62faad0c451e0818742bb1b1bc08
|
[
"Apache-2.0"
] | 6
|
2018-10-02T07:09:30.000Z
|
2019-06-09T17:09:49.000Z
|
import gi
import json
gi.require_version('Gtk', '3.0')
from gi.repository import Gtk
| 30.194444
| 74
| 0.589696
|
3ee37804938d5d76c8a9bfe4608d76c629788f81
| 4,588
|
py
|
Python
|
homeserver/voice_control/voice_controller.py
|
miikama/home-server
|
07a9dbb9438e3c316c37cb52ca3c709d0b059af1
|
[
"MIT"
] | null | null | null |
homeserver/voice_control/voice_controller.py
|
miikama/home-server
|
07a9dbb9438e3c316c37cb52ca3c709d0b059af1
|
[
"MIT"
] | 1
|
2019-11-30T10:59:28.000Z
|
2019-11-30T10:59:28.000Z
|
homeserver/voice_control/voice_controller.py
|
miikama/home-server
|
07a9dbb9438e3c316c37cb52ca3c709d0b059af1
|
[
"MIT"
] | null | null | null |
from homeserver.voice_control.google_speech import GoogleVoiceRecognition
from homeserver.voice_control.snowboy.snowboydecoder import HotwordDetector, play_audio_file
#make the voicecontrol follow the device interface structure for control
from homeserver.interface import DeviceInterface, DeviceTarget
# import the DeviceCommand
from homeserver.command_handler import DeviceCommand
from homeserver import app, logger, device_handler
import datetime
import threading
| 24.275132
| 92
| 0.735833
|
3ee3d2c54d6989f6ad2059cbf79a527aa7c5bc22
| 451
|
py
|
Python
|
main.py
|
CSULB-RMC/testing-repo
|
f0f82f43dadd91c2e6b968cb6ed13b50df4505c2
|
[
"Unlicense"
] | null | null | null |
main.py
|
CSULB-RMC/testing-repo
|
f0f82f43dadd91c2e6b968cb6ed13b50df4505c2
|
[
"Unlicense"
] | null | null | null |
main.py
|
CSULB-RMC/testing-repo
|
f0f82f43dadd91c2e6b968cb6ed13b50df4505c2
|
[
"Unlicense"
] | null | null | null |
# Name: HELLO WORLD
# Author: Fenteale
#
# Notes:
# This is just a tiny program meant to showcase what
# a repository will look like when downloaded through
# github.
print("Hello World!")
print("This is just meant to be a tiny program to show off what a repo looks like.")
inp = input("Type something here: ")
print("You typed:", inp)
print("Ok this is another test.")
print("This is a change from the testing branch. Here is even more info.")
| 23.736842
| 84
| 0.716186
|
3ee5a364faab5171c5ce76299e1bdd425fb0f34b
| 188
|
py
|
Python
|
arduinowithpyFirmata.py
|
xfzlun/WinUIAutomation
|
0f94388671cf0aacbc8499293b7dd31ddfa205fa
|
[
"MIT"
] | null | null | null |
arduinowithpyFirmata.py
|
xfzlun/WinUIAutomation
|
0f94388671cf0aacbc8499293b7dd31ddfa205fa
|
[
"MIT"
] | null | null | null |
arduinowithpyFirmata.py
|
xfzlun/WinUIAutomation
|
0f94388671cf0aacbc8499293b7dd31ddfa205fa
|
[
"MIT"
] | null | null | null |
from pyfirmata import Arduino, util
import time
board = Arduino('/dev/ttyACM0')
while 1:
board.digital[13].write(0)
time.sleep(1)
board.digital[13].write(1)
time.sleep(1)
| 18.8
| 35
| 0.680851
|
3ee683dea81950011c4a8893e44e207f0c0558cc
| 275
|
py
|
Python
|
2016/Day5/tests.py
|
dh256/adventofcode
|
428eec13f4cbf153333a0e359bcff23070ef6d27
|
[
"MIT"
] | null | null | null |
2016/Day5/tests.py
|
dh256/adventofcode
|
428eec13f4cbf153333a0e359bcff23070ef6d27
|
[
"MIT"
] | null | null | null |
2016/Day5/tests.py
|
dh256/adventofcode
|
428eec13f4cbf153333a0e359bcff23070ef6d27
|
[
"MIT"
] | null | null | null |
import pytest
from Door import Door
| 22.916667
| 47
| 0.676364
|
3ee8fa63da0e0bfe5eb55277fd9f507afe7bfefe
| 1,528
|
py
|
Python
|
CondTools/SiPixel/test/SiPixelCPEGenericErrorParmReader_cfg.py
|
ckamtsikis/cmssw
|
ea19fe642bb7537cbf58451dcf73aa5fd1b66250
|
[
"Apache-2.0"
] | 13
|
2015-11-30T15:49:45.000Z
|
2022-02-08T16:11:30.000Z
|
CondTools/SiPixel/test/SiPixelCPEGenericErrorParmReader_cfg.py
|
ckamtsikis/cmssw
|
ea19fe642bb7537cbf58451dcf73aa5fd1b66250
|
[
"Apache-2.0"
] | 640
|
2015-02-11T18:55:47.000Z
|
2022-03-31T14:12:23.000Z
|
CondTools/SiPixel/test/SiPixelCPEGenericErrorParmReader_cfg.py
|
ckamtsikis/cmssw
|
ea19fe642bb7537cbf58451dcf73aa5fd1b66250
|
[
"Apache-2.0"
] | 51
|
2015-08-11T21:01:40.000Z
|
2022-03-30T07:31:34.000Z
|
import FWCore.ParameterSet.Config as cms
process = cms.Process("SiPixelCPEGenericErrorParmReaderTest")
process.load("CondCore.DBCommon.CondDBSetup_cfi")
process.load("FWCore.MessageService.MessageLogger_cfi")
process.source = cms.Source("EmptySource")
process.maxEvents = cms.untracked.PSet(
input = cms.untracked.int32(1)
)
#Uncomment these two lines to get from the global tag
#process.load('Configuration/StandardSequences/FrontierConditions_GlobalTag_cff')
#process.GlobalTag.globaltag = 'IDEAL_30X::All'
process.PoolDBESSource = cms.ESSource("PoolDBESSource",
process.CondDBSetup,
loadAll = cms.bool(True),
toGet = cms.VPSet(cms.PSet(
record = cms.string('SiPixelCPEGenericErrorParmRcd'),
tag = cms.string('SiPixelCPEGenericErrorParm')
)),
DBParameters = cms.PSet(
messageLevel = cms.untracked.int32(0),
authenticationPath = cms.untracked.string('.')
),
catalog = cms.untracked.string('file:PoolFileCatalog.xml'),
timetype = cms.string('runnumber'),
connect = cms.string('sqlite_file:siPixelCPEGenericErrorParm.db')
)
process.reader = cms.EDAnalyzer("SiPixelCPEGenericErrorParmReader")
process.myprint = cms.OutputModule("AsciiOutputModule")
process.p = cms.Path(process.reader)
| 40.210526
| 103
| 0.620419
|
3eea8ad1e4ebfd2294a6137803d28554a3bc0130
| 5,621
|
py
|
Python
|
tools/perf/benchmarks/smoothness.py
|
justremotephone/android_external_chromium_org
|
246856e61da7acf5494076c74198f2aea894a721
|
[
"BSD-3-Clause-No-Nuclear-License-2014",
"BSD-3-Clause"
] | 2
|
2020-01-25T10:18:18.000Z
|
2021-01-23T15:29:56.000Z
|
tools/perf/benchmarks/smoothness.py
|
justremotephone/android_external_chromium_org
|
246856e61da7acf5494076c74198f2aea894a721
|
[
"BSD-3-Clause-No-Nuclear-License-2014",
"BSD-3-Clause"
] | null | null | null |
tools/perf/benchmarks/smoothness.py
|
justremotephone/android_external_chromium_org
|
246856e61da7acf5494076c74198f2aea894a721
|
[
"BSD-3-Clause-No-Nuclear-License-2014",
"BSD-3-Clause"
] | 1
|
2020-11-04T07:24:13.000Z
|
2020-11-04T07:24:13.000Z
|
# Copyright 2013 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
from telemetry import test
from benchmarks import silk_flags
from measurements import smoothness
import page_sets
class SmoothnessMaps(test.Test):
test = smoothness.Smoothness
page_set = page_sets.MapsPageSet
class SmoothnessKeyMobileSites(test.Test):
"""Measures rendering statistics while scrolling down the key mobile sites.
http://www.chromium.org/developers/design-documents/rendering-benchmarks"""
test = smoothness.Smoothness
page_set = page_sets.KeyMobileSitesPageSet
class SmoothnessGpuRasterizationKeySilkCases(test.Test):
"""Measures rendering statistics for the key silk cases with GPU rasterization
"""
tag = 'gpu_rasterization'
test = smoothness.Smoothness
page_set = page_sets.KeySilkCasesPageSet
class SmoothnessFastPathGpuRasterizationKeySilkCases(
SmoothnessGpuRasterizationKeySilkCases):
"""Measures rendering statistics for the key silk cases with GPU rasterization
using bleeding edge rendering fast paths.
"""
tag = 'fast_path_gpu_rasterization'
test = smoothness.Smoothness
page_set = page_sets.KeySilkCasesPageSet
| 32.871345
| 80
| 0.794698
|
3eeacd092135bae68f848fe55ada198c37b80c48
| 315
|
py
|
Python
|
setup.py
|
igorccouto/robot
|
67019ee1f52d5474ce36734c1e56725046471cd9
|
[
"MIT"
] | null | null | null |
setup.py
|
igorccouto/robot
|
67019ee1f52d5474ce36734c1e56725046471cd9
|
[
"MIT"
] | null | null | null |
setup.py
|
igorccouto/robot
|
67019ee1f52d5474ce36734c1e56725046471cd9
|
[
"MIT"
] | null | null | null |
from setuptools import setup, find_packages
setup(name='robot',
version='1.0',
author='Igor Couto',
author_email='igorcouto@gmail.com',
description='A project to execute a robot that performs several actions on the browser.',
packages=find_packages(),
license='MIT'
)
| 28.636364
| 96
| 0.660317
|
3eec09187c14d47ed9948ca3461f050626849937
| 31,103
|
py
|
Python
|
carcassonne.py
|
pierre-dejoue/carcassonne
|
046c39fd61f17072e6d75a48ef65afa7be82a973
|
[
"MIT"
] | null | null | null |
carcassonne.py
|
pierre-dejoue/carcassonne
|
046c39fd61f17072e6d75a48ef65afa7be82a973
|
[
"MIT"
] | null | null | null |
carcassonne.py
|
pierre-dejoue/carcassonne
|
046c39fd61f17072e6d75a48ef65afa7be82a973
|
[
"MIT"
] | null | null | null |
#!/usr/bin/env python
import argparse
import boundary
import functools
import graphics
import itertools
import json
import operator
import os.path
import random
import re
import secrets
import sys
import traceback
from boundary import Boundary
from boundary import Domain
from boundary import Orientation
from boundary import Vect
from collections import deque
from enum import Enum, auto
DEBUG_PRINTOUT = False
DEFAULT_TILE_SIZE = 100
SCREENSHOT_PATH = './screenshot.jpg'
DUMP_PATH = './dump.bmp'
RIVER_PLACEMENT_DEFAULT_T_POLICY = RiverPlacement.USE_T
RIVER_PLACEMENT_DEFAULT_LENGTH_POLICY = RiverPlacement.SHORT_RIVER
def parse_tileset_description_file(json_file):
fp = None
cumul = 0
try:
fp = open(json_file, 'r')
tileset_json = json.load(fp)
assert 'tiles' in tileset_json.keys()
for tile_json in tileset_json['tiles']:
tile = Tile.from_json_description(tile_json, os.path.dirname(json_file))
assert tile.max_nb >= 0
if tile.max_nb > 0:
if 'start' in tile.tags:
assert tile.max_nb == 1
cumul += tile.max_nb
yield tile
except FileNotFoundError:
warn('Could not load file {}'.format(json_file))
except AssertionError:
handle_assertion_error()
except Exception:
warn('Error parsing file {}'.format(json_file))
raise
finally:
if fp is not None:
fp.close()
if cumul > 0:
print('Loaded {} tiles from file {}'.format(cumul, json_file))
def iterate_tile_predicates(tile_predicates, tileset_iter):
remaining = tileset_iter
for predicate in tile_predicates:
tile_subset, remaining = predicate.partition_iter(remaining)
yield tile_subset
TileSubset.exclude_remaining().partition_iter(remaining)
def iterate_tilesets(river_tileset, regular_tileset, river_tileset_period = 0, infinite = False):
river_flag = len(river_tileset) > 0
first = True
while True:
if river_flag:
if river_tileset_period == 0:
# Single use of the river tileset
if first:
yield river_tileset
else:
# Reuse the river tileset periodically
yield river_tileset
for _ in range(max(1, river_tileset_period)):
yield regular_tileset
else:
yield regular_tileset
if not infinite:
break
first = False
def update_border_and_candidate_tiles(placed_tile, border, candidate_tiles):
"""
This function updates the map boundary and the candidate tile placements
Arguments:
placed_tile The tile being added to the map boundary
border The current map boundary
candidate_tiles The list of candidate tiles along the map boundary
Notes:
A candidate tile placement is an unoccupied tile adjacent to the map boundary.
In order to prioritize a tile placement among other candidates, the following parameters are used:
- The length of the segment in contact with the map boundary
- The L1 distance of the tile to the center of the map
"""
assert isinstance(placed_tile, PlacedTile)
assert isinstance(border, Boundary)
assert isinstance(candidate_tiles, CandidateTiles)
# Merge the newly placed tile to the map boundary
border.merge(placed_tile.get_boundary())
# Account for the change in the map boundary in candidate_tiles
candidate_tiles.delete(placed_tile.pos)
neighbor_edges = [(point, edge) for (point, edge, _) in placed_tile.iter_complement_segment()]
neighbor_edges.extend([(point + edge, edge) for (point, edge) in neighbor_edges[:-1]])
tiles_to_update = [PositionedTile.from_boundary_edge(border, point, edge) for (point, edge) in neighbor_edges]
for pos_tile in tiles_to_update:
candidate_tiles.update(pos_tile)
# Sort the updated list of candidates
candidate_tiles.sort(key=PlacedTile.get_l1_distance)
candidate_tiles.sort(key=PlacedTile.get_segment_length, reverse=True)
if DEBUG_PRINTOUT:
candidate_tiles.debug_printout()
return placed_tile
if __name__ == "__main__":
main()
| 36.764775
| 230
| 0.635051
|
3eec12f5620398b980058505bc6d6b26e01d13f2
| 11,029
|
py
|
Python
|
business_card/mainpage.py
|
AshxStudio/PyLearning
|
4ae42f9ef0c1b0e6bf3ff415f98687ba1058636e
|
[
"MIT"
] | null | null | null |
business_card/mainpage.py
|
AshxStudio/PyLearning
|
4ae42f9ef0c1b0e6bf3ff415f98687ba1058636e
|
[
"MIT"
] | null | null | null |
business_card/mainpage.py
|
AshxStudio/PyLearning
|
4ae42f9ef0c1b0e6bf3ff415f98687ba1058636e
|
[
"MIT"
] | null | null | null |
# -*- coding: utf-8 -*-
# Form implementation generated from reading ui file 'mainpage.ui'
#
# Created by: PyQt5 UI code generator 5.8.2
#
# WARNING! All changes made in this file will be lost!
from PyQt5 import QtCore, QtGui, QtWidgets
from PyQt5.QtGui import *
| 54.59901
| 80
| 0.710581
|
3eecad1535b44d09acd50ef4de76145c633066a1
| 2,890
|
py
|
Python
|
project/classification/posture_classification/ops/data_processor.py
|
jh-lau/solid_ai_waddle
|
b966f2c6e8b6b48c62064d58461692231aa2116b
|
[
"MIT"
] | null | null | null |
project/classification/posture_classification/ops/data_processor.py
|
jh-lau/solid_ai_waddle
|
b966f2c6e8b6b48c62064d58461692231aa2116b
|
[
"MIT"
] | null | null | null |
project/classification/posture_classification/ops/data_processor.py
|
jh-lau/solid_ai_waddle
|
b966f2c6e8b6b48c62064d58461692231aa2116b
|
[
"MIT"
] | null | null | null |
"""
@Author : liujianhan
@Date : 2018/6/2 11:59
@Project : posture_classification
@FileName : data_processor.py
@Description : Placeholder
"""
import os
from typing import Tuple
import pandas as pd
from keras.applications.resnet50 import preprocess_input
from keras.preprocessing.image import ImageDataGenerator
from sklearn.utils import shuffle
import numpy as np
def data_generator_flow(_train_dir: str,
_valid_dir: str,
_test_dir: str,
batch_size: int = 32,
target_size: Tuple = (256, 256),
multi_output_mode: bool = False) -> Tuple:
"""
@param _train_dir:
@param _valid_dir:
@param _test_dir:
@param batch_size:
@param target_size:
@param multi_output_mode:
@return:
"""
train_df = pd.read_csv(os.path.join(_train_dir, 'train.csv'))
valid_df = pd.read_csv(os.path.join(_valid_dir, 'valid.csv'))
test_df = pd.read_csv(os.path.join(_test_dir, 'test.csv'))
if not multi_output_mode:
train_df.label = train_df.label.astype('str')
valid_df.label = valid_df.label.astype('str')
test_df.label = test_df.label.astype('str')
train_data_gen = ImageDataGenerator(
preprocessing_function=preprocess_input,
width_shift_range=.2,
height_shift_range=.2,
shear_range=.2,
zoom_range=.2,
channel_shift_range=np.random.choice(100),
horizontal_flip=True,
)
train_data_flow = train_data_gen.flow_from_dataframe(
dataframe=train_df,
target_size=target_size,
directory=_train_dir,
batch_size=batch_size,
class_mode='multi_output' if multi_output_mode else 'binary',
x_col='filename',
y_col=['label', 'score'] if multi_output_mode else 'label',
)
#
valid_data_gen = ImageDataGenerator(preprocessing_function=preprocess_input)
valid_data_flow = valid_data_gen.flow_from_dataframe(
dataframe=valid_df,
target_size=target_size,
directory=_valid_dir,
batch_size=batch_size,
class_mode='multi_output' if multi_output_mode else 'binary',
x_col='filename',
y_col=['label', 'score'] if multi_output_mode else 'label',
)
test_data_gen = ImageDataGenerator(preprocessing_function=preprocess_input)
test_data_flow = test_data_gen.flow_from_dataframe(
dataframe=test_df,
target_size=target_size,
directory=_test_dir,
batch_size=batch_size,
class_mode='multi_output' if multi_output_mode else 'binary',
x_col='filename',
y_col=['label', 'score'] if multi_output_mode else 'label',
)
return train_data_flow, valid_data_flow, test_data_flow
| 34.404762
| 80
| 0.664014
|
3eecb6e97ffd929b50cc81c0b14af95a02561e17
| 150
|
py
|
Python
|
1015.py
|
gabzin/beecrowd
|
177bdf3f87bacfd924bd031a973b8db877379fe5
|
[
"MIT"
] | 3
|
2021-12-15T20:27:14.000Z
|
2022-03-01T12:30:08.000Z
|
1015.py
|
gabzin/uri
|
177bdf3f87bacfd924bd031a973b8db877379fe5
|
[
"MIT"
] | null | null | null |
1015.py
|
gabzin/uri
|
177bdf3f87bacfd924bd031a973b8db877379fe5
|
[
"MIT"
] | null | null | null |
from math import sqrt
x1,y1=map(float,input().split())
x2,y2=map(float,input().split())
p1=x2-x1
p2=y2-y1
res=sqrt((p1*p1)+(p2*p2))
print("%.4f"%res)
| 18.75
| 32
| 0.66
|
3eed4a648db7f6b58a8270deb65a534840398278
| 43
|
py
|
Python
|
modules/pointer_network/__init__.py
|
matthew-z/pytorch_rnet
|
670f3796cd01595903ef781ec7eb0e55c020e77b
|
[
"MIT"
] | 227
|
2017-09-20T08:17:07.000Z
|
2022-02-16T23:48:04.000Z
|
modules/pointer_network/__init__.py
|
matthew-z/R-Net
|
670f3796cd01595903ef781ec7eb0e55c020e77b
|
[
"MIT"
] | 18
|
2017-10-25T14:42:56.000Z
|
2020-04-14T18:50:48.000Z
|
modules/pointer_network/__init__.py
|
matthew-z/R-Net
|
670f3796cd01595903ef781ec7eb0e55c020e77b
|
[
"MIT"
] | 59
|
2017-10-02T15:25:27.000Z
|
2021-05-28T07:57:39.000Z
|
from .pointer_network import PointerNetwork
| 43
| 43
| 0.906977
|
3eedf65adf2ccf1a08d61e0dec0f3caf4fa9559f
| 985
|
py
|
Python
|
twitch_the_universim_chat/views.py
|
gaelfargeas/twitch_universim_streamer_chat
|
4773bf30e6aab3d9f950ba027e7aa3e51278428c
|
[
"BSD-3-Clause"
] | null | null | null |
twitch_the_universim_chat/views.py
|
gaelfargeas/twitch_universim_streamer_chat
|
4773bf30e6aab3d9f950ba027e7aa3e51278428c
|
[
"BSD-3-Clause"
] | null | null | null |
twitch_the_universim_chat/views.py
|
gaelfargeas/twitch_universim_streamer_chat
|
4773bf30e6aab3d9f950ba027e7aa3e51278428c
|
[
"BSD-3-Clause"
] | null | null | null |
from django.shortcuts import render, redirect
from django.utils.datastructures import MultiValueDictKeyError
| 27.361111
| 62
| 0.631472
|
3eef9508412716c264b3b444bb752f75ff044dba
| 1,480
|
py
|
Python
|
numba/exttypes/tests/test_extension_attributes.py
|
liuzhenhai/numba
|
855a2b262ae3d82bd6ac1c3e1c0acb36ee2e2acf
|
[
"BSD-2-Clause"
] | 1
|
2015-01-29T06:52:36.000Z
|
2015-01-29T06:52:36.000Z
|
numba/exttypes/tests/test_extension_attributes.py
|
shiquanwang/numba
|
a41c85fdd7d6abf8ea1ebe9116939ddc2217193b
|
[
"BSD-2-Clause"
] | null | null | null |
numba/exttypes/tests/test_extension_attributes.py
|
shiquanwang/numba
|
a41c85fdd7d6abf8ea1ebe9116939ddc2217193b
|
[
"BSD-2-Clause"
] | null | null | null |
"""
Test class attributes.
"""
import numba
from numba import *
from numba.testing.test_support import parametrize, main
#------------------------------------------------------------------------
# Tests
#------------------------------------------------------------------------
if __name__ == '__main__':
# test_derivedclass_attrs(autojit)
main()
| 20.555556
| 73
| 0.551351
|
3ef2102b67623964df7f8e5b43fb31855632c83c
| 1,386
|
py
|
Python
|
tests/plugins/pull/test_poll.py
|
HazardDede/pnp
|
469ca17254dcca1a4eefe0dc5ac574692a9ab38e
|
[
"MIT"
] | 4
|
2018-10-07T11:32:00.000Z
|
2019-04-23T09:34:23.000Z
|
tests/plugins/pull/test_poll.py
|
HazardDede/pnp
|
469ca17254dcca1a4eefe0dc5ac574692a9ab38e
|
[
"MIT"
] | null | null | null |
tests/plugins/pull/test_poll.py
|
HazardDede/pnp
|
469ca17254dcca1a4eefe0dc5ac574692a9ab38e
|
[
"MIT"
] | 1
|
2019-08-12T19:56:10.000Z
|
2019-08-12T19:56:10.000Z
|
import time
from datetime import datetime
import pytest
from pnp.plugins.pull import StopPollingError
from pnp.plugins.pull.simple import CustomPolling
from . import make_runner, start_runner
def test_poll_with_cron_expression():
from cronex import CronExpression
dut = CustomPolling(name='pytest', interval="*/1 * * * *", scheduled_callable=poll)
assert dut.is_cron
assert isinstance(dut._cron_interval, CronExpression)
assert dut._cron_interval.string_tab == ['*/1', '*', '*', '*', '*']
| 24.75
| 110
| 0.683983
|
3ef267c5d2fee953bb87ccf05e6b6f25d5d276e4
| 3,632
|
py
|
Python
|
motorisedcameratracking/Cameras.py
|
wDove1/motorisedcameratracking
|
97ae1722978fc99faf37c0ab7e3c8f39e3e2355d
|
[
"Apache-2.0"
] | null | null | null |
motorisedcameratracking/Cameras.py
|
wDove1/motorisedcameratracking
|
97ae1722978fc99faf37c0ab7e3c8f39e3e2355d
|
[
"Apache-2.0"
] | null | null | null |
motorisedcameratracking/Cameras.py
|
wDove1/motorisedcameratracking
|
97ae1722978fc99faf37c0ab7e3c8f39e3e2355d
|
[
"Apache-2.0"
] | null | null | null |
from picamera import PiCamera
from time import *
from cv2 import *
import numpy as np
import os
from PIL import Image
from .errors import *
| 35.262136
| 99
| 0.566079
|
3ef554160c1a186dae9bd51e974deb08ac86e468
| 1,226
|
py
|
Python
|
setup.py
|
Superbuy-Team/sbcnab240
|
fe32ffa1efc3f07f8e1be607d4bf110f5134720a
|
[
"MIT"
] | 5
|
2017-12-19T17:50:56.000Z
|
2019-02-12T03:19:50.000Z
|
setup.py
|
Superbuy-Team/sbcnab240
|
fe32ffa1efc3f07f8e1be607d4bf110f5134720a
|
[
"MIT"
] | null | null | null |
setup.py
|
Superbuy-Team/sbcnab240
|
fe32ffa1efc3f07f8e1be607d4bf110f5134720a
|
[
"MIT"
] | null | null | null |
from setuptools import setup, find_packages
"""
Uma biblioteca para leitura de arquivos CNAB 240.
"""
setup(
name='sbcnab240',
version='0.1.0',
url='https://github.com/Superbuy-Team/sbcnab240/',
license='MIT',
author='SuperBuy Team',
author_email='ti@superbuy.com.br',
description='Uma biblioteca para leitura de arquivos CNAB 240',
long_description=__doc__,
keywords='cnab cnab240 boleto',
#packages=['sbcnab240'],
packages=find_packages(exclude=['contrib', 'docs', 'tests*']),
package_data={
'bancos': ['sbcnab240/bancos/santander.json'],
},
include_package_data=True,
zip_safe=False,
python_requires='~=2.6',
platforms='any',
classifiers=[
'Development Status :: 4 - Beta',
'Intended Audience :: Developers',
'License :: OSI Approved :: MIT License',
'Operating System :: OS Independent',
'Natural Language :: Portuguese (Brazilian)',
'Programming Language :: Python',
'Programming Language :: Python :: 2',
'Programming Language :: Python :: 2.6',
'Programming Language :: Python :: 2.7',
'Topic :: Software Development :: Libraries :: Python Modules'
]
)
| 31.435897
| 70
| 0.630506
|
3ef60e720154164bc72b950006e65765140586cd
| 860
|
py
|
Python
|
mlib/web/shadow_lib.py
|
mgroth0/mlib
|
0442ed51eab417b6972f885605afd351892a3a9a
|
[
"MIT"
] | 1
|
2020-06-16T17:26:45.000Z
|
2020-06-16T17:26:45.000Z
|
mlib/web/shadow_lib.py
|
mgroth0/mlib
|
0442ed51eab417b6972f885605afd351892a3a9a
|
[
"MIT"
] | null | null | null |
mlib/web/shadow_lib.py
|
mgroth0/mlib
|
0442ed51eab417b6972f885605afd351892a3a9a
|
[
"MIT"
] | null | null | null |
from mlib.proj.struct import Project
from mlib.web.html import HTMLPage, Hyperlink, HTMLImage
SKIPPED_SOURCE = [
'@log_invokation',
'global DOC',
'@staticmethod'
]
FUN_LINKS = {
'bilinear': 'https://docs.scipy.org/doc/scipy/reference/generated/scipy.signal.bilinear.html'
}
FUN_LINKS.update(
{fun.split('.')[-1]: scipy_doc_url(fun) for fun in [
'scipy.signal.filtfilt',
'scipy.signal.lfilter',
'scipy.signal.butter'
]}
)
| 27.741935
| 105
| 0.676744
|
3efa82e7a5854f87ab9bf7282fade9ac7afa8bff
| 3,607
|
py
|
Python
|
markdown-journal.py
|
fire-wally/markdown-notebook
|
8fe22f645d6aca65f5f02cf4a67993e809795396
|
[
"Apache-2.0"
] | null | null | null |
markdown-journal.py
|
fire-wally/markdown-notebook
|
8fe22f645d6aca65f5f02cf4a67993e809795396
|
[
"Apache-2.0"
] | null | null | null |
markdown-journal.py
|
fire-wally/markdown-notebook
|
8fe22f645d6aca65f5f02cf4a67993e809795396
|
[
"Apache-2.0"
] | null | null | null |
#!/usr/local/bin/python3
import sys
import os
import shutil
import markdown
def generate_markdown(source_file, dest_dir):
'''generates a new html file in the dest directory, returns the name of the
newly-created file'''
md = ""
with open(source_file, 'r') as opened_file:
md = opened_file.read()
html = content_to_html(md)
new_name = os.path.split(source_file)[1].replace("md", "html")
new_path = os.path.join(dest_dir, new_name)
with open(new_path, "w+") as opened_file:
opened_file.write(html)
return new_name
if __name__ == "__main__":
main(sys.argv)
| 33.71028
| 108
| 0.640144
|
3efbe3ec6f7235b59b283ab4d9dd8c0d9a53ffcd
| 1,090
|
py
|
Python
|
plugins/modules/set_java_trusted_sites_facts.py
|
c2platform/ansible-collection-core
|
40c4e86349cda170c406c9af2b74d7760dcf5c86
|
[
"MIT"
] | null | null | null |
plugins/modules/set_java_trusted_sites_facts.py
|
c2platform/ansible-collection-core
|
40c4e86349cda170c406c9af2b74d7760dcf5c86
|
[
"MIT"
] | null | null | null |
plugins/modules/set_java_trusted_sites_facts.py
|
c2platform/ansible-collection-core
|
40c4e86349cda170c406c9af2b74d7760dcf5c86
|
[
"MIT"
] | null | null | null |
#!/usr/bin/python
from ansible.module_utils.basic import *
if __name__ == '__main__':
main()
| 30.277778
| 75
| 0.647706
|
3efc5fe15cf4eeb421dcf698ef2f0aa33c8d45db
| 53
|
py
|
Python
|
src/signal_backtester/schemas/__init__.py
|
xibalbas/signal_backtester
|
8eaa52ecad22419b29b0e0e34eaadfea83f4e4b9
|
[
"MIT"
] | 14
|
2022-03-04T20:23:45.000Z
|
2022-03-30T11:04:40.000Z
|
src/signal_backtester/schemas/__init__.py
|
xibalbas/signal_backtester
|
8eaa52ecad22419b29b0e0e34eaadfea83f4e4b9
|
[
"MIT"
] | null | null | null |
src/signal_backtester/schemas/__init__.py
|
xibalbas/signal_backtester
|
8eaa52ecad22419b29b0e0e34eaadfea83f4e4b9
|
[
"MIT"
] | 2
|
2022-03-05T10:18:19.000Z
|
2022-03-06T12:51:49.000Z
|
"""Schemas
Schemas Package
more description
"""
| 10.6
| 20
| 0.679245
|
3efdff5f0d2a7d90af9b5f718370bdc45e63e120
| 5,829
|
py
|
Python
|
py/src/api_custo.py
|
Ennoriel/veille-pedagogique
|
63f368ad1faee2f6fca86fff68ccccc7ac89f81b
|
[
"FSFAP"
] | null | null | null |
py/src/api_custo.py
|
Ennoriel/veille-pedagogique
|
63f368ad1faee2f6fca86fff68ccccc7ac89f81b
|
[
"FSFAP"
] | null | null | null |
py/src/api_custo.py
|
Ennoriel/veille-pedagogique
|
63f368ad1faee2f6fca86fff68ccccc7ac89f81b
|
[
"FSFAP"
] | null | null | null |
from itertools import chain, combinations
from re import search
from urllib.parse import urlparse
from pymongo.errors import BulkWriteError
from tweepy import OAuthHandler, API
from yaml import load as yaml_load, BaseLoader
from objects.article import Article
from objects.hashtag import Hashtag
from objects.tweet import Tweet
from mongo.article_mongo import ArticleMongo
from mongo.hashtag_mongo import HashtagMongo
from mongo.theme_mongo import ThemeMongo
from mongo.tweet_mongo import TweetMongo
from utils.log_utils import dir_log
from utils.url_utils import unshorten
| 31.33871
| 111
| 0.731515
|
3eff530062f79f81142b5bbce7a5802437435e1c
| 3,985
|
py
|
Python
|
ensemble_compilation/physical_db.py
|
LumingSun/deepdb-public
|
39cf21b3145c3255f15eb40df606b02a53323e86
|
[
"MIT"
] | 48
|
2020-02-21T10:19:18.000Z
|
2022-03-29T20:59:20.000Z
|
ensemble_compilation/physical_db.py
|
LumingSun/deepdb-public
|
39cf21b3145c3255f15eb40df606b02a53323e86
|
[
"MIT"
] | 7
|
2020-04-29T15:13:05.000Z
|
2021-06-08T13:33:53.000Z
|
ensemble_compilation/physical_db.py
|
jschj/deepdb-public
|
655ada13a043a4226a239b0c0a65bcdefef87a02
|
[
"MIT"
] | 18
|
2020-02-21T13:11:49.000Z
|
2022-03-07T23:27:05.000Z
|
import psycopg2
import pandas as pd
from ensemble_compilation.utils import gen_full_join_query, print_conditions
| 36.227273
| 118
| 0.524969
|
4103275c6f48564c6ff1fad5fb0a8944ab60a436
| 137,967
|
py
|
Python
|
release/stubs/Autodesk/AutoCAD/EditorInput.py
|
paoloemilioserra/ironpython-stubs
|
49d92db7f28f25ccd3654c5f6ae83daa0c401fa1
|
[
"MIT"
] | null | null | null |
release/stubs/Autodesk/AutoCAD/EditorInput.py
|
paoloemilioserra/ironpython-stubs
|
49d92db7f28f25ccd3654c5f6ae83daa0c401fa1
|
[
"MIT"
] | null | null | null |
release/stubs/Autodesk/AutoCAD/EditorInput.py
|
paoloemilioserra/ironpython-stubs
|
49d92db7f28f25ccd3654c5f6ae83daa0c401fa1
|
[
"MIT"
] | null | null | null |
# encoding: utf-8
# module Autodesk.AutoCAD.EditorInput calls itself EditorInput
# from Acmgd, Version=24.0.0.0, Culture=neutral, PublicKeyToken=null, accoremgd, Version=24.0.0.0, Culture=neutral, PublicKeyToken=null
# by generator 1.145
# no doc
# no imports
# no functions
# classes
def StartRecording(self):
""" StartRecording(self: LivePreview) """
pass
PreviewEnded = None
Previewing = None
PreviewStarted = None
PreviewWillEnd = None
PreviewWillStart = None
RecordingEnded = None
RecordingStarted = None
RecordingWillEnd = None
RecordingWillStart = None
class LivePreviewActionBase(object):
# no doc
def Execute(self):
""" Execute(self: LivePreviewActionBase) """
pass
def OnAborted(self):
""" OnAborted(self: LivePreviewActionBase) """
pass
class LivePreviewAction(LivePreviewActionBase):
""" LivePreviewAction(method: Delegate, *args: Array[object]) """
def Execute(self):
""" Execute(self: LivePreviewAction) """
pass
| 34.972624
| 486
| 0.648677
|
4104d25dc6796ebc87ccaf0dca4400cb888e648b
| 169
|
py
|
Python
|
AutotestWebD/all_models_for_mock/models/__init__.py
|
yangjourney/sosotest
|
2e88099a829749910ca325253c9b1a2e368d21a0
|
[
"MIT"
] | 422
|
2019-08-18T05:04:20.000Z
|
2022-03-31T06:49:19.000Z
|
AutotestWebD/all_models_for_mock/models/__init__.py
|
LinSongJian1985/sosotest
|
091863dee531b5726650bb63efd6f169267cbeb4
|
[
"MIT"
] | 10
|
2019-10-24T09:55:38.000Z
|
2021-09-29T17:28:43.000Z
|
AutotestWebD/all_models_for_mock/models/__init__.py
|
LinSongJian1985/sosotest
|
091863dee531b5726650bb63efd6f169267cbeb4
|
[
"MIT"
] | 202
|
2019-08-18T05:04:27.000Z
|
2022-03-30T05:57:18.000Z
|
from all_models_for_mock.models.M0001_mock import *
from all_models_for_mock.models.M0002_keywords import *
from all_models_for_mock.models.M0003_statisic_task import *
| 42.25
| 60
| 0.87574
|
41067ed6db1ed6b79ce07e5f1ba003d3a292c73c
| 151
|
py
|
Python
|
chpt8/Reverse.py
|
GDG-Buea/learn-python
|
9dfe8caa4b57489cf4249bf7e64856062a0b93c2
|
[
"Apache-2.0"
] | null | null | null |
chpt8/Reverse.py
|
GDG-Buea/learn-python
|
9dfe8caa4b57489cf4249bf7e64856062a0b93c2
|
[
"Apache-2.0"
] | 2
|
2018-05-21T09:39:00.000Z
|
2018-05-27T15:59:15.000Z
|
chpt8/Reverse.py
|
GDG-Buea/learn-python
|
9dfe8caa4b57489cf4249bf7e64856062a0b93c2
|
[
"Apache-2.0"
] | 2
|
2018-05-19T14:59:56.000Z
|
2018-05-19T15:25:48.000Z
|
# This program reverses a given string
reverse()
| 13.727273
| 43
| 0.629139
|
4108814557aaf45fa9bd2469a548f631f9648812
| 29,383
|
py
|
Python
|
pauxy/walkers/thermal.py
|
pauxy-qmc/pauxy
|
1da80284284769b59361c73cfa3c2d914c74a73f
|
[
"Apache-2.0"
] | 16
|
2020-08-05T17:17:17.000Z
|
2022-03-18T04:06:18.000Z
|
pauxy/walkers/thermal.py
|
pauxy-qmc/pauxy
|
1da80284284769b59361c73cfa3c2d914c74a73f
|
[
"Apache-2.0"
] | 4
|
2020-05-17T21:28:20.000Z
|
2021-04-22T18:05:50.000Z
|
pauxy/walkers/thermal.py
|
pauxy-qmc/pauxy
|
1da80284284769b59361c73cfa3c2d914c74a73f
|
[
"Apache-2.0"
] | 5
|
2020-05-18T01:03:18.000Z
|
2021-04-13T15:36:29.000Z
|
import copy
import cmath
import numpy
import scipy.linalg
from pauxy.estimators.thermal import greens_function, one_rdm_from_G, particle_number
from pauxy.estimators.mixed import local_energy
from pauxy.walkers.stack import PropagatorStack
from pauxy.walkers.walker import Walker
from pauxy.utils.linalg import regularise_matrix_inverse
from pauxy.utils.misc import update_stack, get_numeric_names
if __name__=="__main__":
unit_test()
| 41.678014
| 130
| 0.510499
|
4108de14460ec5d4d27312f76596c4d68c7d284a
| 1,607
|
py
|
Python
|
schedules_tools/batches/utils.py
|
RedHat-Eng-PGM/python-schedules-tools
|
6166cdd0e5f7c08fba1c50f113ae6a6103460f9b
|
[
"MIT"
] | 1
|
2019-05-06T21:10:35.000Z
|
2019-05-06T21:10:35.000Z
|
schedules_tools/batches/utils.py
|
RedHat-Eng-PGM/schedules-tools
|
fd96a9e1df4e53b8da3048c013af0cd2c290f9b5
|
[
"MIT"
] | 5
|
2019-05-06T21:25:38.000Z
|
2021-02-05T20:54:30.000Z
|
schedules_tools/batches/utils.py
|
RedHat-Eng-PGM/schedules-tools
|
fd96a9e1df4e53b8da3048c013af0cd2c290f9b5
|
[
"MIT"
] | 1
|
2019-10-31T01:51:41.000Z
|
2019-10-31T01:51:41.000Z
|
from collections import OrderedDict
import os
import re
from schedules_tools.schedule_handlers.smart_sheet import ScheduleHandler_smartsheet
import yaml
DEFAULT_TEMPLATE_DIR = os.path.join(os.path.dirname(__file__), 'templates')
DEPENDENCY_REGEX = re.compile(r'^{(?P<to>predecessor|\d+)}(?P<type>[F|S]+)?'
r'( ?(?P<lag_sign>[+|-])?(?P<lag_amount>\d+)'
r'(?P<lag_type>[d|w]))?$')
| 31.509804
| 88
| 0.645924
|
410af5985b4b1c70714faefbc090b58a89a67ddd
| 270
|
py
|
Python
|
main/run_camera_calibrate.py
|
mcekwonu/pycamera
|
0d2c9cb70e8cbc9012e252c06ff1827ae8544cf2
|
[
"MIT"
] | null | null | null |
main/run_camera_calibrate.py
|
mcekwonu/pycamera
|
0d2c9cb70e8cbc9012e252c06ff1827ae8544cf2
|
[
"MIT"
] | null | null | null |
main/run_camera_calibrate.py
|
mcekwonu/pycamera
|
0d2c9cb70e8cbc9012e252c06ff1827ae8544cf2
|
[
"MIT"
] | null | null | null |
"""Script to run camera calibration"""
from camera import Camera
camera = Camera(source_dir='/home/mce/Documents/bubble3D/calibration/Cam01', outfilename='Cam01',
target_dir='results/camera', verbose=True)
camera.calibrate()
camera.compute_undistort()
| 30
| 97
| 0.740741
|
410b5247c45f5769ae5e7ac2ac703fb1bb25e83e
| 1,994
|
py
|
Python
|
Hub/Program/Other/Class/ZThreadSingle.py
|
MPZinke/SmartCurtain
|
ef9976d7a6b982bb044e6fd914fdea4756d5b5c4
|
[
"MIT"
] | null | null | null |
Hub/Program/Other/Class/ZThreadSingle.py
|
MPZinke/SmartCurtain
|
ef9976d7a6b982bb044e6fd914fdea4756d5b5c4
|
[
"MIT"
] | 18
|
2020-06-21T02:36:52.000Z
|
2022-03-14T04:17:56.000Z
|
Hub/Program/Other/Class/ZThreadSingle.py
|
MPZinke/SmartCurtain
|
ef9976d7a6b982bb044e6fd914fdea4756d5b5c4
|
[
"MIT"
] | 1
|
2020-01-19T02:24:38.000Z
|
2020-01-19T02:24:38.000Z
|
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
__author__ = "MPZinke"
########################################################################################################################
# #
# created by: MPZinke #
# on 2021.09.14 #
# #
# DESCRIPTION: Created to sepparate the crazy logic between repeating and single occurance threads. The flow of this #
# class is Sleep -> Action, where as the repeating class is (Action -> Sleep) <- REPEAT. #
# BUGS: #
# FUTURE: #
# #
########################################################################################################################
from collections.abc import Callable;
from Other.Class.ZThread import ZThread;
from Other.Logger import log_error;
| 51.128205
| 120
| 0.336008
|
410eb00a7e9f189e5d58a886e9ad9987223272ea
| 783
|
py
|
Python
|
flasks/conver.py
|
edgells/python-commons
|
38c0aa0ec10304a4147ea231c92c9e34da462052
|
[
"MIT"
] | null | null | null |
flasks/conver.py
|
edgells/python-commons
|
38c0aa0ec10304a4147ea231c92c9e34da462052
|
[
"MIT"
] | null | null | null |
flasks/conver.py
|
edgells/python-commons
|
38c0aa0ec10304a4147ea231c92c9e34da462052
|
[
"MIT"
] | null | null | null |
from flask import Flask
from werkzeug.routing import BaseConverter
app = Flask(__name__)
app.config['DEBUG'] = True
app.url_map.converters['re'] = RegexConverter
if __name__ == '__main__':
app.run(host='0.0.0.0', port=8888)
| 19.575
| 53
| 0.583653
|
4111e0047e651eec2b041b914921035fe36454e5
| 773
|
py
|
Python
|
trend_analyze/src/model/entity_url.py
|
popper2710/Trend_Analyze
|
0c98bcd7986bdb2d2b9bdc8022bfa08ddf0e7b0f
|
[
"MIT"
] | null | null | null |
trend_analyze/src/model/entity_url.py
|
popper2710/Trend_Analyze
|
0c98bcd7986bdb2d2b9bdc8022bfa08ddf0e7b0f
|
[
"MIT"
] | 2
|
2020-09-26T14:58:33.000Z
|
2021-03-31T20:01:40.000Z
|
trend_analyze/src/model/entity_url.py
|
popper2710/Trend_Analyze
|
0c98bcd7986bdb2d2b9bdc8022bfa08ddf0e7b0f
|
[
"MIT"
] | null | null | null |
from pyfields import field
from trend_analyze.src.validate import Validate
from trend_analyze.config import *
| 32.208333
| 107
| 0.659767
|
41122da858230ceb4c96eb4a8c7375d59b77bc28
| 8,148
|
py
|
Python
|
kotti/testing.py
|
mete0r/Kotti
|
e89103cc57d5d2af8d60eb8208ae9d04c068f6e7
|
[
"Naumen",
"Condor-1.1",
"MS-PL"
] | null | null | null |
kotti/testing.py
|
mete0r/Kotti
|
e89103cc57d5d2af8d60eb8208ae9d04c068f6e7
|
[
"Naumen",
"Condor-1.1",
"MS-PL"
] | null | null | null |
kotti/testing.py
|
mete0r/Kotti
|
e89103cc57d5d2af8d60eb8208ae9d04c068f6e7
|
[
"Naumen",
"Condor-1.1",
"MS-PL"
] | null | null | null |
# -*- coding: utf-8 -*-
"""
Inheritance Diagram
-------------------
.. inheritance-diagram:: kotti.testing
"""
import os
from os.path import join, dirname
from unittest import TestCase
from pytest import mark
from pyramid import testing
from pyramid.events import NewResponse
from pyramid.security import ALL_PERMISSIONS
from zope.deprecation.deprecation import deprecate
import transaction
# re-enable deprecation warnings during test runs
# however, let the `ImportWarning` produced by Babel's
# `localedata.py` vs `localedata/` show up once...
from warnings import catch_warnings
with catch_warnings():
from babel import localedata
import compiler
localedata, compiler # make pyflakes happy... :p
# py.test markers (see http://pytest.org/latest/example/markers.html)
user = mark.user
BASE_URL = 'http://localhost:6543'
def asset(name):
import kotti
return open(join(dirname(kotti.__file__), 'tests', name), 'rb')
def includeme_login(config):
config.add_view(
login_view,
name='login',
renderer='kotti:templates/login.pt')
def includeme_layout(config):
# override edit master layout with view master layout
config.override_asset(
to_override='kotti:templates/edit/master.pt',
override_with='kotti:templates/view/master.pt')
def login_view(request):
return {}
def dummy_search(search_term, request):
return u"Not found. Sorry!"
def testing_db_url():
return os.environ.get('KOTTI_TEST_DB_STRING', 'sqlite://')
def _initTestingDB():
from sqlalchemy import create_engine
from kotti import get_settings
from kotti.resources import initialize_sql
database_url = testing_db_url()
get_settings()['sqlalchemy.url'] = database_url
session = initialize_sql(create_engine(database_url), drop_all=True)
return session
def _populator():
from kotti import DBSession
from kotti.resources import Document
from kotti.populate import populate
populate()
for doc in DBSession.query(Document)[1:]:
DBSession.delete(doc)
transaction.commit()
def _turn_warnings_into_errors(): # pragma: no cover
# turn all warnings into errors, but let the `ImportWarning`
# produced by Babel's `localedata.py` vs `localedata/` show up once...
from babel import localedata
localedata # make pyflakes happy... :p
from warnings import filterwarnings
filterwarnings("error")
def setUp(init_db=True, **kwargs):
# _turn_warnings_into_errors()
from kotti import _resolve_dotted
from kotti import conf_defaults
tearDown()
settings = conf_defaults.copy()
settings['kotti.secret'] = 'secret'
settings['kotti.secret2'] = 'secret2'
settings['kotti.populators'] = 'kotti.testing._populator'
settings.update(kwargs.get('settings', {}))
settings = _resolve_dotted(settings)
kwargs['settings'] = settings
config = testing.setUp(**kwargs)
config.add_default_renderers()
if init_db:
_initTestingDB()
transaction.begin()
return config
def tearDown():
from kotti import events
from kotti import security
from kotti.message import _inject_mailer
# These should arguable use the configurator, so they don't need
# to be torn down separately:
events.clear()
security.reset()
_inject_mailer[:] = []
transaction.abort()
testing.tearDown()
# Functional ----
def _functional_includeme(config):
from kotti import DBSession
config.add_subscriber(expire, NewResponse)
def _zope_testbrowser_pyquery(self):
from pyquery import PyQuery
return PyQuery(
self.contents.replace('xmlns="http://www.w3.org/1999/xhtml', ''))
def setUpFunctional(global_config=None, **settings):
from kotti import main
import wsgi_intercept.zope_testbrowser
from webtest import TestApp
tearDown()
_settings = {
'sqlalchemy.url': testing_db_url(),
'kotti.secret': 'secret',
'kotti.site_title': 'Website des Kottbusser Tors', # for mailing
'kotti.populators': 'kotti.testing._populator',
'mail.default_sender': 'kotti@localhost',
'pyramid.includes': 'kotti.testing._functional_includeme',
}
_settings.update(settings)
host, port = BASE_URL.split(':')[-2:]
app = main({}, **_settings)
wsgi_intercept.add_wsgi_intercept(host[2:], int(port), lambda: app)
Browser = wsgi_intercept.zope_testbrowser.WSGI_Browser
Browser.pyquery = property(_zope_testbrowser_pyquery)
return dict(
Browser=Browser,
browser=Browser(),
test_app=TestApp(app),
)
def dummy_view(context, request):
return {}
def include_testing_view(config):
config.add_view(
dummy_view,
context=TestingRootFactory,
renderer='kotti:tests/testing_view.pt',
)
config.add_view(
dummy_view,
name='secured',
permission='view',
context=TestingRootFactory,
renderer='kotti:tests/testing_view.pt',
)
def setUpFunctionalStrippedDownApp(global_config=None, **settings):
# An app that doesn't use Nodes at all
_settings = {
'kotti.base_includes': (
'kotti kotti.views kotti.views.login kotti.views.users'),
'kotti.use_tables': 'principals',
'kotti.populators': 'kotti.populate.populate_users',
'pyramid.includes': 'kotti.testing.include_testing_view',
'kotti.root_factory': 'kotti.testing.TestingRootFactory',
'kotti.site_title': 'My Stripped Down Kotti',
}
_settings.update(settings)
return setUpFunctional(global_config, **_settings)
def registerDummyMailer():
from pyramid_mailer.mailer import DummyMailer
from kotti.message import _inject_mailer
mailer = DummyMailer()
_inject_mailer.append(mailer)
return mailer
# set up deprecation warnings
from zope.deprecation.deprecation import deprecated
for item in UnitTestBase, EventTestBase, FunctionalTestBase, _initTestingDB:
name = getattr(item, '__name__', item)
deprecated(name, 'Unittest-style tests are deprecated as of Kotti 0.7. '
'Please use pytest function arguments instead.')
| 26.627451
| 78
| 0.676976
|
4113d55c3875b03d32cbc830fabbfbb2cdd11046
| 694
|
py
|
Python
|
leetcode/trees/level-order.py
|
vtemian/interviews-prep
|
ddef96b5ecc699a590376a892a804c143fe18034
|
[
"Apache-2.0"
] | 8
|
2019-05-14T12:50:29.000Z
|
2022-03-01T09:08:27.000Z
|
leetcode/trees/level-order.py
|
vtemian/interviews-prep
|
ddef96b5ecc699a590376a892a804c143fe18034
|
[
"Apache-2.0"
] | 46
|
2019-03-24T20:59:29.000Z
|
2019-04-09T16:28:43.000Z
|
leetcode/trees/level-order.py
|
vtemian/interviews-prep
|
ddef96b5ecc699a590376a892a804c143fe18034
|
[
"Apache-2.0"
] | 1
|
2022-01-28T12:46:29.000Z
|
2022-01-28T12:46:29.000Z
|
# Definition for a binary tree node.
# class TreeNode:
# def __init__(self, x):
# self.val = x
# self.left = None
# self.right = None
| 22.387097
| 60
| 0.487032
|
41141320d4d129bb735e6489daf0039fbb723f89
| 300
|
py
|
Python
|
Python Files/count_down.py
|
gerryjenkinslb/cs22-slides-and-py-files
|
9474f7a2e50d57afa13edc3b13c008f7295da747
|
[
"MIT"
] | 28
|
2019-07-05T04:00:45.000Z
|
2022-02-16T09:43:50.000Z
|
Python Files/count_down.py
|
gerryjenkinslb/cs22-slides-and-py-files
|
9474f7a2e50d57afa13edc3b13c008f7295da747
|
[
"MIT"
] | null | null | null |
Python Files/count_down.py
|
gerryjenkinslb/cs22-slides-and-py-files
|
9474f7a2e50d57afa13edc3b13c008f7295da747
|
[
"MIT"
] | 22
|
2018-10-24T04:42:05.000Z
|
2022-02-04T08:17:27.000Z
|
# simple recursions
print("-"*5, "count down from 10")
count_down(10)
print()
print("-"*5, "count down from 5")
count_down(5)
print()
| 20
| 54
| 0.576667
|
4116fb09afbe45f7f25e769dc8cd6a9b1dcfa4fc
| 1,513
|
py
|
Python
|
src/activations.py
|
saman-codes/dldojo
|
9fd828f1902ba3d46e9bb5f554ef37d07335b29e
|
[
"MIT"
] | null | null | null |
src/activations.py
|
saman-codes/dldojo
|
9fd828f1902ba3d46e9bb5f554ef37d07335b29e
|
[
"MIT"
] | null | null | null |
src/activations.py
|
saman-codes/dldojo
|
9fd828f1902ba3d46e9bb5f554ef37d07335b29e
|
[
"MIT"
] | null | null | null |
# Standard Python
import copy
# Thirdparty
import numpy as np
| 19.649351
| 118
| 0.604759
|
411e7327dfc8f59a57e3065bd00dbadcb1b1f18c
| 302
|
py
|
Python
|
mkdir.py
|
FunsomMars/Timg
|
216c994fd0b100996e72f4cda4eace369c8452ef
|
[
"MIT"
] | null | null | null |
mkdir.py
|
FunsomMars/Timg
|
216c994fd0b100996e72f4cda4eace369c8452ef
|
[
"MIT"
] | null | null | null |
mkdir.py
|
FunsomMars/Timg
|
216c994fd0b100996e72f4cda4eace369c8452ef
|
[
"MIT"
] | null | null | null |
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
# @Time : 2019-07-23 22:47
# @Author : Simon Meng
# @Site :
# @File : mkdir.py
# @Software: PyCharm
import os
# Make a folder under the current path
| 17.764706
| 38
| 0.609272
|
411fa137c5df36c387a70295ace27f0afc3352fe
| 2,183
|
py
|
Python
|
scripts/create-opencl-headers.py
|
molkoback/icemet-server
|
9d7a29b38c711534923952d598fc37efff5db154
|
[
"MIT"
] | null | null | null |
scripts/create-opencl-headers.py
|
molkoback/icemet-server
|
9d7a29b38c711534923952d598fc37efff5db154
|
[
"MIT"
] | null | null | null |
scripts/create-opencl-headers.py
|
molkoback/icemet-server
|
9d7a29b38c711534923952d598fc37efff5db154
|
[
"MIT"
] | 1
|
2020-09-16T15:33:23.000Z
|
2020-09-16T15:33:23.000Z
|
import os
import sys
header_file_fmt = "{name}_ocl.hpp"
header_string = (
"#ifndef {definition}_OCL_HPP\n"
"#define {definition}_OCL_HPP\n"
"#include <opencv2/core/ocl.hpp>\n"
"const cv::ocl::ProgramSource& {module}_{name}_ocl() {{\n"
"static cv::ocl::ProgramSource source(\"{module}\", \"{name}\", \"{kernel}\", \"\");\n"
"return source;\n"
"}}\n"
"#endif\n"
)
if __name__ == "__main__":
if len(sys.argv) != 3:
print("Usage: {} <kernel_dir> <header_dir>".format(sys.argv[0]))
sys.exit(1)
os.makedirs(sys.argv[2], exist_ok=True)
create_headers(sys.argv[1], sys.argv[2])
| 27.987179
| 87
| 0.685295
|
4120f12f58edfe39a3cbad96c6f37cc20266c8ae
| 251
|
py
|
Python
|
main.py
|
aleattene/lotto-game
|
6871699c44c988f926db986668524c002d3560f2
|
[
"MIT"
] | null | null | null |
main.py
|
aleattene/lotto-game
|
6871699c44c988f926db986668524c002d3560f2
|
[
"MIT"
] | null | null | null |
main.py
|
aleattene/lotto-game
|
6871699c44c988f926db986668524c002d3560f2
|
[
"MIT"
] | null | null | null |
from lotto_game.lotto_game import LottoGame
if __name__ == "__main__":
main()
| 14.764706
| 43
| 0.681275
|
412189bdca83add7a6eee8aca45c35007f4cbdb4
| 256
|
py
|
Python
|
models/mail_message.py
|
billhepeng/wx_tools
|
64369531bd76a935eff547c50ff68150a240849d
|
[
"Apache-2.0"
] | 1
|
2021-01-19T02:49:14.000Z
|
2021-01-19T02:49:14.000Z
|
models/mail_message.py
|
billhepeng/wx_tools
|
64369531bd76a935eff547c50ff68150a240849d
|
[
"Apache-2.0"
] | null | null | null |
models/mail_message.py
|
billhepeng/wx_tools
|
64369531bd76a935eff547c50ff68150a240849d
|
[
"Apache-2.0"
] | null | null | null |
# -*- coding: utf-8 -*-
# Part of Odoo. See LICENSE file for full copyright and licensing details.
from odoo import api, fields, models
| 21.333333
| 74
| 0.703125
|
41229bdd678deb184613795447a9a74eef973ea7
| 2,361
|
py
|
Python
|
src/TheLanguage/Parser/Statements/BinaryStatementParserInfo.py
|
davidbrownell/DavidBrownell_TheLanguage
|
07170b448a0ebd7fa2325c9ccd4cefdb3cf7eb98
|
[
"BSL-1.0"
] | null | null | null |
src/TheLanguage/Parser/Statements/BinaryStatementParserInfo.py
|
davidbrownell/DavidBrownell_TheLanguage
|
07170b448a0ebd7fa2325c9ccd4cefdb3cf7eb98
|
[
"BSL-1.0"
] | null | null | null |
src/TheLanguage/Parser/Statements/BinaryStatementParserInfo.py
|
davidbrownell/DavidBrownell_TheLanguage
|
07170b448a0ebd7fa2325c9ccd4cefdb3cf7eb98
|
[
"BSL-1.0"
] | 1
|
2021-06-18T18:58:57.000Z
|
2021-06-18T18:58:57.000Z
|
# ----------------------------------------------------------------------
# |
# | BinaryStatementParserInfo.py
# |
# | David Brownell <db@DavidBrownell.com>
# | 2021-10-12 13:55:27
# |
# ----------------------------------------------------------------------
# |
# | Copyright David Brownell 2021
# | Distributed under the Boost Software License, Version 1.0. See
# | accompanying file LICENSE_1_0.txt or copy at
# | http://www.boost.org/LICENSE_1_0.txt.
# |
# ----------------------------------------------------------------------
"""Contains the BinaryStatementParserInfo"""
import os
from enum import auto, Enum
from dataclasses import dataclass
import CommonEnvironment
from CommonEnvironmentEx.Package import InitRelativeImports
# ----------------------------------------------------------------------
_script_fullpath = CommonEnvironment.ThisFullpath()
_script_dir, _script_name = os.path.split(_script_fullpath)
# ----------------------------------------------------------------------
with InitRelativeImports():
from .StatementParserInfo import StatementParserInfo
from ..Expressions.ExpressionParserInfo import ExpressionParserInfo
from ..Names.NameParserInfo import NameParserInfo
# ----------------------------------------------------------------------
# ----------------------------------------------------------------------
| 36.890625
| 79
| 0.454892
|
4122eec27606ee355d75c58e79851c7226e97614
| 10,947
|
py
|
Python
|
deprecated/finder_0.1.py
|
acic2015/findr
|
ac3061cb056cfe6a151c4096d04bce0d03545032
|
[
"MIT"
] | 7
|
2015-11-24T04:44:55.000Z
|
2018-02-08T02:13:14.000Z
|
deprecated/finder_0.1.py
|
acic2015/findr
|
ac3061cb056cfe6a151c4096d04bce0d03545032
|
[
"MIT"
] | 9
|
2015-11-24T17:43:13.000Z
|
2017-09-15T19:37:10.000Z
|
deprecated/finder_0.1.py
|
acic2015/findr
|
ac3061cb056cfe6a151c4096d04bce0d03545032
|
[
"MIT"
] | 4
|
2015-12-15T03:39:40.000Z
|
2021-07-20T11:28:09.000Z
|
__author__ = 'Daniel Kapellusch'
import astropy.io.fits as fits
import os
import csv
import json
import sys
import multiprocessing as mp #necessary imports. Note: this is written in python 2.
from os import path
import ConfigParser
from os import system
#necessary imports. Note: this is written in python 2.
global path, max_processes,file_shifts,darkmaster,darksub,fitscent
def writeListCfg(lst, cfgname):
"""
Write out a config file from a list.
- Entries: 'listItem\n'
:param lst: List to be written as a config file.
:param cfgname: Filename or path/to/filename for config file.
:return: Config filename or path/to/filename
"""
cfg_out = open(cfgname, 'w')
for e in lst:
cfg_out.write(str(e) + '\n')
cfg_out.close()
return cfgname
def writeDictCfg(dct, cfgname):
"""
Write out a config file from a dictionary.
- Entries: 'key=value\n'
:param dct: Dictionary to be written as a config file.
:param cfgname: Filename or path/to/filename for config file.
:return: Config filename or path/to/filename
"""
cfg_out = open(cfgname, 'w')
for k, v in dct.iteritems():
cfg_out.write('%s=%s\n' % (str(k), str(v)))
cfg_out.close()
return cfgname
def prependToFilename(filename, prepending):
"""
Prepend Text to Filename.
:param filename: Filename or path/to/filename to be modified.
:param prepending: String to prepend to filename.
:return: Modified filename or path/to/filename.
"""
b = os.path.basename(filename)
n = prepending + b
return filename.replace(b, n)
def spawnDsubCmd(science_img, dark_img, norm_bot=None, norm_top=None):
"""
Spawn a darksub command.
:param science_img: Science image filename or path/to/filename.
:param dark_img: Master dark filename or path/to/filename.
:param norm_bot: Multiplicative scaling to apply to the bottom amplifier (optional).
:param norm_top: Multiplicative scaling to apply to the top amplifier (optional).
:return: darksub_command, subtracted_fiilename
"""
dsub_out = prependToFilename(science_img, 'dsub_')
dsub_opts = '--inputFile=%s --darkFile=%s --outputFile=%s' % (science_img, dark_img, dsub_out)
if norm_bot:
dsub_opts += ' --norm_bot=%s' % str(norm_bot)
if norm_top:
dsub_opts += ' --norm_top=%s' % str(norm_top)
dsub_cmd = darksub + ' ' + dsub_opts
return dsub_cmd, dsub_out
def spawnCentCmd(subtracted_img, xshift, yshift):
"""
Spawn a fitscent command.
:param subtracted_img: Dark subtracted science image.
:param xshift: X shift to apply to image.
:param yshift: Y shift to apply to image.
:return: fitscent_command, centered_filename
"""
cent_out = prependToFilename(subtracted_img, 'cent_')
cent_opts = '--input=%s --x=%s --y=%s --output=%s' % (subtracted_img, str(xshift), str(yshift), cent_out)
cent_cmd = fitscent + ' ' + cent_opts
return cent_cmd, cent_out
def getNorms(img): # TODO
"""
:param img: Image to obtain normalization s for.
:return:
"""
top = ''
bot = ''
return top, bot
def getShifts(img, fileshifts): # TODOr
"""
:param img: image to get shift values
:return: xshift, yshift
"""
try:
xs = fileshifts[img]['x']
ys = fileshifts[img]['y']
return xs, ys
except KeyError:
print "Warning (getShifts): %s not found in fileshifts" % str(img)
return 0, 0
if __name__ == "__main__":
print(main(sys.argv[1:]))
| 37.108475
| 145
| 0.652325
|
4122f41a65d52a80ce0e4e61b3b52bf36d00d875
| 3,143
|
py
|
Python
|
concerned-coyotes/earlyinternet/news/tests.py
|
Vthechamp22/summer-code-jam-2021
|
0a8bf1f22f6c73300891fd779da36efd8e1304c1
|
[
"MIT"
] | 40
|
2020-08-02T07:38:22.000Z
|
2021-07-26T01:46:50.000Z
|
concerned-coyotes/earlyinternet/news/tests.py
|
Vthechamp22/summer-code-jam-2021
|
0a8bf1f22f6c73300891fd779da36efd8e1304c1
|
[
"MIT"
] | 134
|
2020-07-31T12:15:45.000Z
|
2020-12-13T04:42:19.000Z
|
concerned-coyotes/earlyinternet/news/tests.py
|
Vthechamp22/summer-code-jam-2021
|
0a8bf1f22f6c73300891fd779da36efd8e1304c1
|
[
"MIT"
] | 101
|
2020-07-31T12:00:47.000Z
|
2021-11-01T09:06:58.000Z
|
import datetime
import random
from django.test import TestCase
from django.utils.dateparse import parse_datetime
from .models import Article
| 39.2875
| 118
| 0.598473
|
4122fe432a52c30c10d6907870148cde9432de71
| 2,648
|
py
|
Python
|
src/shake/sentence_nlp.py
|
makergabriel/gearmood
|
cd0e205e6e22f9f4b33d18d93e5bef5a39b8763e
|
[
"MIT"
] | null | null | null |
src/shake/sentence_nlp.py
|
makergabriel/gearmood
|
cd0e205e6e22f9f4b33d18d93e5bef5a39b8763e
|
[
"MIT"
] | null | null | null |
src/shake/sentence_nlp.py
|
makergabriel/gearmood
|
cd0e205e6e22f9f4b33d18d93e5bef5a39b8763e
|
[
"MIT"
] | null | null | null |
import nltk
from nltk.tokenize import sent_tokenize
from nltk.tokenize import word_tokenize
from nltk.corpus import wordnet
# TODO move cut words to config
CUT_WORDS = (
"drop",
"cut",
"leave",
"lose",
"trim",
"shed",
"cast",
"unload",
"strike",
"skip",
"throw",
"shake",
"shave",
"ditch",
)
# phrases to include
# shave some weight
# phrases to ignore
# leave no trace
# A verb could be categorized to any of the following codes
VERB_CODES = {
"VB", # Verb, base form
"VBD", # Verb, past tense
"VBG", # Verb, gerund or present participle
"VBN", # Verb, past participle
"VBP", # Verb, non-3rd person singular present
"VBZ", # Verb, 3rd person singular present
}
| 31.52381
| 95
| 0.60423
|
412303d786bf1234fa947a471b024bc73e098561
| 173
|
py
|
Python
|
Python/Programming Fundamentals/Exams/72. Ad Astra Second.py
|
teodoramilcheva/softuni-software-engineering
|
98dc9faa66f42570f6538fd7ef186d2bd1d39bff
|
[
"MIT"
] | null | null | null |
Python/Programming Fundamentals/Exams/72. Ad Astra Second.py
|
teodoramilcheva/softuni-software-engineering
|
98dc9faa66f42570f6538fd7ef186d2bd1d39bff
|
[
"MIT"
] | null | null | null |
Python/Programming Fundamentals/Exams/72. Ad Astra Second.py
|
teodoramilcheva/softuni-software-engineering
|
98dc9faa66f42570f6538fd7ef186d2bd1d39bff
|
[
"MIT"
] | null | null | null |
Python 3.9.2 (v3.9.2:1a79785e3e, Feb 19 2021, 09:06:10)
[Clang 6.0 (clang-600.0.57)] on darwin
Type "help", "copyright", "credits" or "license()" for more information.
>>>
| 43.25
| 72
| 0.66474
|
412484a70f53006f985b8a1791e3e361afab8182
| 2,144
|
py
|
Python
|
tests/test_iam/test_iam_groups.py
|
mrucci/moto
|
076a6a7055ad18908b5661e599648c40b251cdc1
|
[
"Apache-2.0"
] | 1
|
2021-03-06T22:01:41.000Z
|
2021-03-06T22:01:41.000Z
|
tests/test_iam/test_iam_groups.py
|
mrucci/moto
|
076a6a7055ad18908b5661e599648c40b251cdc1
|
[
"Apache-2.0"
] | 2
|
2016-07-01T03:43:37.000Z
|
2016-07-18T19:38:06.000Z
|
tests/test_iam/test_iam_groups.py
|
zenefits/moto
|
8341c722a8e06decf23fd4b5e67de612accebb80
|
[
"Apache-2.0"
] | 1
|
2017-10-19T00:53:28.000Z
|
2017-10-19T00:53:28.000Z
|
from __future__ import unicode_literals
import boto
import sure # noqa
from nose.tools import assert_raises
from boto.exception import BotoServerError
from moto import mock_iam
| 29.369863
| 122
| 0.712687
|
41252221870a25e5a2cfca108df770ea4c662895
| 2,955
|
py
|
Python
|
test/test_storage_v1beta1_api.py
|
Arvinhub/client-python
|
d67df30f635231d68dc4c20b9b7e234c616c1e6a
|
[
"Apache-2.0"
] | 1
|
2021-06-16T02:57:18.000Z
|
2021-06-16T02:57:18.000Z
|
test/test_storage_v1beta1_api.py
|
Arvinhub/client-python
|
d67df30f635231d68dc4c20b9b7e234c616c1e6a
|
[
"Apache-2.0"
] | null | null | null |
test/test_storage_v1beta1_api.py
|
Arvinhub/client-python
|
d67df30f635231d68dc4c20b9b7e234c616c1e6a
|
[
"Apache-2.0"
] | null | null | null |
# coding: utf-8
"""
Kubernetes
No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)
OpenAPI spec version: unversioned
Generated by: https://github.com/swagger-api/swagger-codegen.git
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 writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
"""
from __future__ import absolute_import
import os
import sys
import unittest
import k8sclient
from k8sclient.rest import ApiException
from k8sclient.apis.storage_v1beta1_api import StorageV1beta1Api
if __name__ == '__main__':
unittest.main()
| 23.085938
| 105
| 0.666328
|