hexsha stringlengths 40 40 | size int64 6 782k | ext stringclasses 7
values | lang stringclasses 1
value | max_stars_repo_path stringlengths 4 237 | max_stars_repo_name stringlengths 6 72 | max_stars_repo_head_hexsha stringlengths 40 40 | max_stars_repo_licenses list | max_stars_count int64 1 53k ⌀ | 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 4 184 | max_issues_repo_name stringlengths 6 72 | max_issues_repo_head_hexsha stringlengths 40 40 | max_issues_repo_licenses list | max_issues_count int64 1 27.1k ⌀ | 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 4 184 | max_forks_repo_name stringlengths 6 72 | max_forks_repo_head_hexsha stringlengths 40 40 | max_forks_repo_licenses list | max_forks_count int64 1 12.2k ⌀ | max_forks_repo_forks_event_min_datetime stringlengths 24 24 ⌀ | max_forks_repo_forks_event_max_datetime stringlengths 24 24 ⌀ | content stringlengths 6 782k | avg_line_length float64 2.75 664k | max_line_length int64 5 782k | alphanum_fraction float64 0 1 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
abb50af6b7515480308ed4bb0d9a4639ac7b7b92 | 541 | py | Python | leetcode/047-Permutations-II/Perm2_003.py | cc13ny/all-in | bc0b01e44e121ea68724da16f25f7e24386c53de | [
"MIT"
] | 1 | 2015-12-16T04:01:03.000Z | 2015-12-16T04:01:03.000Z | leetcode/047-Permutations-II/Perm2_003.py | cc13ny/all-in | bc0b01e44e121ea68724da16f25f7e24386c53de | [
"MIT"
] | 1 | 2016-02-09T06:00:07.000Z | 2016-02-09T07:20:13.000Z | leetcode/047-Permutations-II/Perm2_003.py | cc13ny/all-in | bc0b01e44e121ea68724da16f25f7e24386c53de | [
"MIT"
] | 2 | 2019-06-27T09:07:26.000Z | 2019-07-01T04:40:13.000Z | class Solution:
# @param {integer[]} nums
# @return {integer[][]}
def permuteUnique(self, nums):
if len(nums) == 1:
return [nums]
nums.sort()
res = []
i = 0
while i < len(nums):
sym = nums[i]
tmp = nums[:i] + nums[i + 1:]
... | 27.05 | 52 | 0.406654 |
055253959bb9b57cbb2874fe7f19b95144529cdb | 4,480 | py | Python | yolov5-coreml-tflite-converter/tflite/tf_metadata/output_metadata_writer.py | SchweizerischeBundesbahnen/sbb-ml-models | 485356aeb0a277907c160d435f7f654154046a70 | [
"MIT"
] | null | null | null | yolov5-coreml-tflite-converter/tflite/tf_metadata/output_metadata_writer.py | SchweizerischeBundesbahnen/sbb-ml-models | 485356aeb0a277907c160d435f7f654154046a70 | [
"MIT"
] | null | null | null | yolov5-coreml-tflite-converter/tflite/tf_metadata/output_metadata_writer.py | SchweizerischeBundesbahnen/sbb-ml-models | 485356aeb0a277907c160d435f7f654154046a70 | [
"MIT"
] | null | null | null | import os
from tflite_support import metadata_schema_py_generated as _metadata_fb
from constants import BOUNDINGBOX_NAME, CLASSES_NAME, SCORES_NAME, NUMBER_NAME, DETECTIONS_NAME, PREDICTIONS_NAME
from tf_metadata.metadata_utils import MetadataHelper
class OutputMetadataWriter(MetadataHelper):
def __init__(self,... | 46.666667 | 224 | 0.691518 |
055b9b1ed902e749b70bf960bf976fec8934c8c6 | 243 | py | Python | power-of-three/power-of-three.py | hyeseonko/LeetCode | 48dfc93f1638e13041d8ce1420517a886abbdc77 | [
"MIT"
] | 2 | 2021-12-05T14:29:06.000Z | 2022-01-01T05:46:13.000Z | power-of-three/power-of-three.py | hyeseonko/LeetCode | 48dfc93f1638e13041d8ce1420517a886abbdc77 | [
"MIT"
] | null | null | null | power-of-three/power-of-three.py | hyeseonko/LeetCode | 48dfc93f1638e13041d8ce1420517a886abbdc77 | [
"MIT"
] | null | null | null | class Solution:
def isPowerOfThree(self, n: int) -> bool:
if n<=0:
return False
while(n>1):
if n%3==0:
n/=3
else:
return False
return True
| 22.090909 | 45 | 0.395062 |
fb25547f89b759492d407eeb6a815e4b58adb01f | 423 | py | Python | minimax.py | nirobio/puzzles | fda8c84d8eefd93b40594636fb9b7f0fde02b014 | [
"MIT"
] | null | null | null | minimax.py | nirobio/puzzles | fda8c84d8eefd93b40594636fb9b7f0fde02b014 | [
"MIT"
] | null | null | null | minimax.py | nirobio/puzzles | fda8c84d8eefd93b40594636fb9b7f0fde02b014 | [
"MIT"
] | null | null | null | #!/bin/python3
import math
import os
import random
import re
import sys
# https://www.hackerrank.com/challenges/mini-max-sum/problem
def miniMaxSum(arr):
sortedArr = sorted(arr)
smallest = sum(sortedArr) - sortedArr[-1]
largest = sum(sortedArr) - sortedArr[0]
print(str(smallest) + " " + str(largest)... | 18.391304 | 60 | 0.671395 |
34cc065b01200580f70ecf4add62902c5755d542 | 1,813 | py | Python | coco2yolov5-converter/tests/converter/test_filesystem_util.py | SchweizerischeBundesbahnen/sbb-ml-models | 485356aeb0a277907c160d435f7f654154046a70 | [
"MIT"
] | null | null | null | coco2yolov5-converter/tests/converter/test_filesystem_util.py | SchweizerischeBundesbahnen/sbb-ml-models | 485356aeb0a277907c160d435f7f654154046a70 | [
"MIT"
] | null | null | null | coco2yolov5-converter/tests/converter/test_filesystem_util.py | SchweizerischeBundesbahnen/sbb-ml-models | 485356aeb0a277907c160d435f7f654154046a70 | [
"MIT"
] | null | null | null | # disabling PyLint docstring, no-self-using
# pylint: disable=C0114,C0115,C0116,R0201
import tempfile
from pathlib import Path
from unittest.case import TestCase
from src.converter.filesystem_util import FileSystemUtil
class YoloHelperTest(TestCase):
def test_folder_structure(self):
with tempfile.Tempo... | 37.770833 | 74 | 0.614451 |
fd37ded0af851467dd99af7d68b33ab91df9e723 | 4,868 | py | Python | python/main.py | MegaAdragon/MagicBuzzer | f1cd2aab7827045a82b0d5e6643d48b06cbf27af | [
"MIT"
] | null | null | null | python/main.py | MegaAdragon/MagicBuzzer | f1cd2aab7827045a82b0d5e6643d48b06cbf27af | [
"MIT"
] | null | null | null | python/main.py | MegaAdragon/MagicBuzzer | f1cd2aab7827045a82b0d5e6643d48b06cbf27af | [
"MIT"
] | null | null | null | import math
import socket
import time
import math
import select
import threading
from flask import Flask, render_template, request, jsonify, make_response
clients = []
app = Flask(__name__)
def get_client(**kwargs):
if len(clients) < 1:
return None
for key, value in kwargs.items():
for c in... | 27.817143 | 115 | 0.572514 |
b5c5680c3e49184800e562878d10e979ec562de2 | 2,507 | py | Python | TreeOutputLib/OneTreeOneFile/OneTreeOneFile.py | mcwimm/pyMANGA | 6c7b53087e53b116bb02f91c33974f3dfd9a46de | [
"MIT"
] | 1 | 2021-03-16T08:35:50.000Z | 2021-03-16T08:35:50.000Z | TreeOutputLib/OneTreeOneFile/OneTreeOneFile.py | mcwimm/pyMANGA | 6c7b53087e53b116bb02f91c33974f3dfd9a46de | [
"MIT"
] | 67 | 2019-11-14T11:29:52.000Z | 2022-03-09T14:37:11.000Z | TreeOutputLib/OneTreeOneFile/OneTreeOneFile.py | mcwimm/pyMANGA | 6c7b53087e53b116bb02f91c33974f3dfd9a46de | [
"MIT"
] | 6 | 2019-11-12T11:11:41.000Z | 2021-08-12T13:57:22.000Z | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
@date: 2018-Today
@author: jasper.bathmann@ufz.de
"""
from TreeOutputLib.OneTimestepOneFile.OneTimestepOneFile import \
OneTimestepOneFile
import os
## Output class. This class creates one file per tree at a defined location.
# A line containing time, position, ... | 43.982456 | 79 | 0.568408 |
c83b4611a39b9c68094fd83f1e017bc9d92d38b3 | 4,590 | py | Python | Utils/py/ball_detector/combine_patches.py | tarsoly/NaoTH | dcd2b67ef6bf9953c81d3e1b26e543b5922b7d52 | [
"ECL-2.0",
"Apache-2.0"
] | null | null | null | Utils/py/ball_detector/combine_patches.py | tarsoly/NaoTH | dcd2b67ef6bf9953c81d3e1b26e543b5922b7d52 | [
"ECL-2.0",
"Apache-2.0"
] | null | null | null | Utils/py/ball_detector/combine_patches.py | tarsoly/NaoTH | dcd2b67ef6bf9953c81d3e1b26e543b5922b7d52 | [
"ECL-2.0",
"Apache-2.0"
] | null | null | null | #!/usr/bin/python
import os
import sys
from scipy import misc
import numpy as np
import json
from naoth import matlab_tools as mat
import patchReader as patchReader
patch_size = (12, 12) # width, height
def load_labels(patchdata, file):
if not os.path.isfile(file):
print('Label file does not exist. T... | 25.359116 | 110 | 0.602397 |
c0b86c65e559fe1b3c42c1561da2c3872b2ecf16 | 43 | py | Python | src/__init__.py | andrewnachtigal/wind-forecasting | ac3669f10d5709ae202b254eb8519b0730109467 | [
"MIT"
] | null | null | null | src/__init__.py | andrewnachtigal/wind-forecasting | ac3669f10d5709ae202b254eb8519b0730109467 | [
"MIT"
] | null | null | null | src/__init__.py | andrewnachtigal/wind-forecasting | ac3669f10d5709ae202b254eb8519b0730109467 | [
"MIT"
] | 1 | 2019-10-08T04:18:41.000Z | 2019-10-08T04:18:41.000Z | # treat directories as containing packages
| 21.5 | 42 | 0.837209 |
f19b0435f47b13ece319bca6391556e45a379267 | 239 | py | Python | packages/watchmen-rest-doll/src/watchmen_rest_doll/sso/sso_router.py | Indexical-Metrics-Measure-Advisory/watchmen | c54ec54d9f91034a38e51fd339ba66453d2c7a6d | [
"MIT"
] | null | null | null | packages/watchmen-rest-doll/src/watchmen_rest_doll/sso/sso_router.py | Indexical-Metrics-Measure-Advisory/watchmen | c54ec54d9f91034a38e51fd339ba66453d2c7a6d | [
"MIT"
] | null | null | null | packages/watchmen-rest-doll/src/watchmen_rest_doll/sso/sso_router.py | Indexical-Metrics-Measure-Advisory/watchmen | c54ec54d9f91034a38e51fd339ba66453d2c7a6d | [
"MIT"
] | null | null | null | from fastapi import FastAPI
from watchmen_rest_doll.doll import ask_saml2_enabled
def install_sso_router(app: FastAPI) -> None:
if ask_saml2_enabled():
from .saml import auth_saml_router
app.include_router(auth_saml_router.router)
| 23.9 | 53 | 0.820084 |
8d7321c5cee72da0e57fa059d40128166642c5e1 | 1,306 | py | Python | tmp/tmp_app.py | yao6891/FlaskOrdering | cbd24bd8d95afaba91ce4d6b1b3548c4e82e3807 | [
"Apache-2.0"
] | 6 | 2020-04-30T08:05:51.000Z | 2021-12-23T02:49:01.000Z | tmp/tmp_app.py | yao6891/FlaskOrdering | cbd24bd8d95afaba91ce4d6b1b3548c4e82e3807 | [
"Apache-2.0"
] | null | null | null | tmp/tmp_app.py | yao6891/FlaskOrdering | cbd24bd8d95afaba91ce4d6b1b3548c4e82e3807 | [
"Apache-2.0"
] | 2 | 2020-06-15T03:30:45.000Z | 2020-08-02T11:21:03.000Z | from flask import Flask, url_for, request
from common.libs.UrlUtils import UrlManager
from tmp.tmp_route_map import route_order
from flask_sqlalchemy import SQLAlchemy
"""
每次发版有个版本号 201811271629
"""
app = Flask(__name__)
app.register_blueprint(route_order, url_prefix='/order')
app.config['SQLALCHEMY_DATABASE_URI'] = ... | 22.912281 | 83 | 0.694487 |
93b5aea78b03946fe758e5177103dbda4c8b403a | 3,886 | py | Python | collocations_syntax.py | melandresen/DHd2020 | 62a53be823364dd3360e377d569e706ffeb738f9 | [
"Apache-2.0"
] | null | null | null | collocations_syntax.py | melandresen/DHd2020 | 62a53be823364dd3360e377d569e706ffeb738f9 | [
"Apache-2.0"
] | null | null | null | collocations_syntax.py | melandresen/DHd2020 | 62a53be823364dd3360e377d569e706ffeb738f9 | [
"Apache-2.0"
] | null | null | null | #! /usr/bin/env python
# -*- coding: utf-8 -*-
# Python 3.7
# Author: Melanie Andresen (melanie.andresen@uni-hamburg.de)
# written in the context of the research project hermA (www.herma.uni-hamburg.de)
# funded by Landesforschungsförderung Hamburg
#####################################################################... | 44.159091 | 175 | 0.635872 |
191fb99d0f5ea76f1a66019c2cda39b21fcb2511 | 969 | py | Python | top/clearlight/base/liaoxuefeng/object_oriented_advanced_program/use__slots__.py | ClearlightY/Python_learn | 93b9b7efae5a1cf05faf8ee7c5e36dcc99c7a232 | [
"Apache-2.0"
] | 1 | 2020-01-16T09:23:43.000Z | 2020-01-16T09:23:43.000Z | top/clearlight/base/liaoxuefeng/object_oriented_advanced_program/use__slots__.py | ClearlightY/Python_learn | 93b9b7efae5a1cf05faf8ee7c5e36dcc99c7a232 | [
"Apache-2.0"
] | null | null | null | top/clearlight/base/liaoxuefeng/object_oriented_advanced_program/use__slots__.py | ClearlightY/Python_learn | 93b9b7efae5a1cf05faf8ee7c5e36dcc99c7a232 | [
"Apache-2.0"
] | null | null | null | from types import MethodType
# 使用__slots__
'''
限制实例的属性: Python允许在定义class的时候, 定义一个特殊的__slots__变量来限制该class实例能添加的属性
注意:
__slots__定义的属性仅对当前类实例起作用, 对继承的子类是不起作用的
__slots__限制的是实例属性的添加,不限制类属性添加
'''
class Student(object):
# 用tuple定义允许绑定的属性名称
__slots__ = ('name', 'age')
pass
'''
s = Student()
# 动态给实例绑... | 13.458333 | 65 | 0.70485 |
1980e7cae20af40233dbc3e1774fd4148042bddb | 451 | py | Python | Cracking_the_Coding_Interview/linked_lists_detect_a_cycle.py | byung-u/HackerRank | 4c02fefff7002b3af774b99ebf8d40f149f9d163 | [
"MIT"
] | null | null | null | Cracking_the_Coding_Interview/linked_lists_detect_a_cycle.py | byung-u/HackerRank | 4c02fefff7002b3af774b99ebf8d40f149f9d163 | [
"MIT"
] | null | null | null | Cracking_the_Coding_Interview/linked_lists_detect_a_cycle.py | byung-u/HackerRank | 4c02fefff7002b3af774b99ebf8d40f149f9d163 | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
def has_cycle(head):
curr = head
seen = set()
while curr:
if curr in seen:
return True
seen.add(curr)
curr = curr.next
return False
# Much better to understand
def has_cycle(head):
fast = head;
while (fast != None and fast.next != None... | 18.791667 | 47 | 0.543237 |
d0e5c87d206ae13427676218f0cd8cf00afd7dc9 | 2,259 | py | Python | src/onegov/user/models/role_mapping.py | politbuero-kampagnen/onegov-cloud | 20148bf321b71f617b64376fe7249b2b9b9c4aa9 | [
"MIT"
] | null | null | null | src/onegov/user/models/role_mapping.py | politbuero-kampagnen/onegov-cloud | 20148bf321b71f617b64376fe7249b2b9b9c4aa9 | [
"MIT"
] | null | null | null | src/onegov/user/models/role_mapping.py | politbuero-kampagnen/onegov-cloud | 20148bf321b71f617b64376fe7249b2b9b9c4aa9 | [
"MIT"
] | null | null | null | from onegov.core.orm import Base
from onegov.core.orm.mixins import ContentMixin
from onegov.core.orm.mixins import TimestampMixin
from onegov.core.orm.types import UUID
from onegov.user.models.group import UserGroup
from onegov.user.models.user import User
from sqlalchemy import Column
from sqlalchemy import ForeignKe... | 32.271429 | 76 | 0.684816 |
de1af118f8154041eb169fa93ae07d197413fdc9 | 420 | py | Python | projects/g3h2-algorithm/practice2/4_max_sum.py | keybrl/xdu-coursework | 9d0e905bef28c18d87d3b97643de0d32f9f08ee0 | [
"MIT"
] | null | null | null | projects/g3h2-algorithm/practice2/4_max_sum.py | keybrl/xdu-coursework | 9d0e905bef28c18d87d3b97643de0d32f9f08ee0 | [
"MIT"
] | null | null | null | projects/g3h2-algorithm/practice2/4_max_sum.py | keybrl/xdu-coursework | 9d0e905bef28c18d87d3b97643de0d32f9f08ee0 | [
"MIT"
] | null | null | null | def max_sum(d):
res = d[0]
max_i = 0
max_j = 1
i = 0
j = 0
max_count = 0
for item in d:
max_count += item
j += 1
if max_count > res:
res = max_count
max_i, max_j = i, j
if max_count <= 0:
max_count = 0
i = j
... | 18.26087 | 44 | 0.442857 |
de58a3502bf8f5f03eefe7dc12701270d623da2b | 37 | py | Python | zencad/internal_models/__init__.py | Spiritdude/zencad | 4e63b1a6306dd235f4daa2791b10249f7546c95b | [
"MIT"
] | 5 | 2018-04-11T14:11:40.000Z | 2018-09-12T19:03:36.000Z | zencad/internal_models/__init__.py | Spiritdude/zencad | 4e63b1a6306dd235f4daa2791b10249f7546c95b | [
"MIT"
] | null | null | null | zencad/internal_models/__init__.py | Spiritdude/zencad | 4e63b1a6306dd235f4daa2791b10249f7546c95b | [
"MIT"
] | null | null | null | from .knight import knight as knight
| 18.5 | 36 | 0.810811 |
c20f4544dcae0f2ae1155940864d2e8c71ea5217 | 721 | py | Python | packages/watchmen-storage/src/watchmen_storage/storage_exception.py | Indexical-Metrics-Measure-Advisory/watchmen | c54ec54d9f91034a38e51fd339ba66453d2c7a6d | [
"MIT"
] | null | null | null | packages/watchmen-storage/src/watchmen_storage/storage_exception.py | Indexical-Metrics-Measure-Advisory/watchmen | c54ec54d9f91034a38e51fd339ba66453d2c7a6d | [
"MIT"
] | null | null | null | packages/watchmen-storage/src/watchmen_storage/storage_exception.py | Indexical-Metrics-Measure-Advisory/watchmen | c54ec54d9f91034a38e51fd339ba66453d2c7a6d | [
"MIT"
] | null | null | null | # noinspection DuplicatedCode
class InsertConflictException(Exception):
pass
class OptimisticLockException(Exception):
pass
class UnexpectedStorageException(Exception):
pass
class UnsupportedCriteriaException(UnexpectedStorageException):
pass
class UnsupportedComputationException(UnexpectedStorageException)... | 16.386364 | 69 | 0.859917 |
e413b3fc667b1726d6c8e96795d74b5e9453b03d | 1,788 | py | Python | Packs/PenfieldAI/Scripts/PenfieldAssign/PenfieldAssign_test.py | diCagri/content | c532c50b213e6dddb8ae6a378d6d09198e08fc9f | [
"MIT"
] | 799 | 2016-08-02T06:43:14.000Z | 2022-03-31T11:10:11.000Z | Packs/PenfieldAI/Scripts/PenfieldAssign/PenfieldAssign_test.py | diCagri/content | c532c50b213e6dddb8ae6a378d6d09198e08fc9f | [
"MIT"
] | 9,317 | 2016-08-07T19:00:51.000Z | 2022-03-31T21:56:04.000Z | Packs/PenfieldAI/Scripts/PenfieldAssign/PenfieldAssign_test.py | diCagri/content | c532c50b213e6dddb8ae6a378d6d09198e08fc9f | [
"MIT"
] | 1,297 | 2016-08-04T13:59:00.000Z | 2022-03-31T23:43:06.000Z | """Base Script for Cortex XSOAR - Unit Tests file
Pytest Unit Tests: all funcion names must start with "test_"
More details: https://xsoar.pan.dev/docs/integrations/unit-testing
MAKE SURE YOU REVIEW/REPLACE ALL THE COMMENTS MARKED AS "TODO"
"""
import demistomock as demisto
import json
import io
from PenfieldAssign... | 27.9375 | 78 | 0.730984 |
29a345463c7da327be480a650107205a6fc27321 | 813 | py | Python | 2_Iterables/Dicts/dict_comprehensions.py | felixdittrich92/Python3 | 16b767465e4bdf0adc652c195d15384bb9faa4cf | [
"MIT"
] | 1 | 2022-03-02T07:16:30.000Z | 2022-03-02T07:16:30.000Z | 2_Iterables/Dicts/dict_comprehensions.py | felixdittrich92/Python3 | 16b767465e4bdf0adc652c195d15384bb9faa4cf | [
"MIT"
] | null | null | null | 2_Iterables/Dicts/dict_comprehensions.py | felixdittrich92/Python3 | 16b767465e4bdf0adc652c195d15384bb9faa4cf | [
"MIT"
] | null | null | null | # key: value
dict1 = {x: x**2 for x in range(10)}
print(dict1)
# nur gerade
dict2 = {x: x**2 for x in range(10) if x % 2 == 0}
print(dict2)
# wenn > 5 quadrieren ansonsten hoch 1/2
dict3 = {x: x**2 if x > 5 else x**(1/2) for x in range(10) if x % 2 == 0}
print(dict3)
friends = ['hans', 'peter', 'max']
friend_keys = ... | 30.111111 | 94 | 0.599016 |
d9b0b5556ed264e01bd32d0132833c9d2bbf2371 | 2,652 | py | Python | Rapid-Payload-main/signs.py | Zusyaku/Termux-And-Lali-Linux-V2 | b1a1b0841d22d4bf2cc7932b72716d55f070871e | [
"Apache-2.0"
] | 2 | 2021-11-17T03:35:03.000Z | 2021-12-08T06:00:31.000Z | Rapid-Payload-main/signs.py | Zusyaku/Termux-And-Lali-Linux-V2 | b1a1b0841d22d4bf2cc7932b72716d55f070871e | [
"Apache-2.0"
] | null | null | null | Rapid-Payload-main/signs.py | Zusyaku/Termux-And-Lali-Linux-V2 | b1a1b0841d22d4bf2cc7932b72716d55f070871e | [
"Apache-2.0"
] | 2 | 2021-11-05T18:07:48.000Z | 2022-02-24T21:25:07.000Z | #!/usr/bin/python3
# auto - signs for CarbonCOpy[paranoidninja] in RapidPayload
from OpenSSL import crypto
from sys import argv, platform
from pathlib import Path
import shutil
import ssl
import os
import subprocess
TIMESTAMP_URL = "http://sha256timestamp.ws.symantec.com/sha256/timestamp"
print("\033[1m\033[36m")
de... | 32.740741 | 156 | 0.607089 |
8aaebae5da2aaee6af5f2259534930c89f52dd32 | 3,589 | py | Python | packages/watchmen-data-kernel/src/watchmen_data_kernel/storage/raw_data_service.py | Indexical-Metrics-Measure-Advisory/watchmen | c54ec54d9f91034a38e51fd339ba66453d2c7a6d | [
"MIT"
] | null | null | null | packages/watchmen-data-kernel/src/watchmen_data_kernel/storage/raw_data_service.py | Indexical-Metrics-Measure-Advisory/watchmen | c54ec54d9f91034a38e51fd339ba66453d2c7a6d | [
"MIT"
] | null | null | null | packages/watchmen-data-kernel/src/watchmen_data_kernel/storage/raw_data_service.py | Indexical-Metrics-Measure-Advisory/watchmen | c54ec54d9f91034a38e51fd339ba66453d2c7a6d | [
"MIT"
] | null | null | null | from typing import Any, Dict, List, Optional
from watchmen_data_kernel.topic_schema import TopicSchema
from watchmen_model.admin import Factor
from watchmen_model.pipeline_kernel import TopicDataColumnNames
from watchmen_storage import EntityCriteriaExpression, EntityRow, EntityShaper
from watchmen_utilities import Ar... | 35.89 | 105 | 0.775704 |
6a52eb6a44e77af60b2317f2c0310c050671c217 | 1,902 | py | Python | webapp/dash_tutorial_plotly/basic_callbacks/slider_example.py | zeroam/TIL | 43e3573be44c7f7aa4600ff8a34e99a65cbdc5d1 | [
"MIT"
] | null | null | null | webapp/dash_tutorial_plotly/basic_callbacks/slider_example.py | zeroam/TIL | 43e3573be44c7f7aa4600ff8a34e99a65cbdc5d1 | [
"MIT"
] | null | null | null | webapp/dash_tutorial_plotly/basic_callbacks/slider_example.py | zeroam/TIL | 43e3573be44c7f7aa4600ff8a34e99a65cbdc5d1 | [
"MIT"
] | null | null | null | import dash
import dash_core_components as dcc
import dash_html_components as html
from dash.dependencies import Input, Output
import pandas as pd
df = pd.read_csv('https://raw.githubusercontent.com/plotly/datasets/master/gapminderDataFiveYear.csv')
external_stylesheets = ['https://codepen.io/chriddyp/pen/b... | 29.261538 | 103 | 0.538906 |
6a9afce5f6738a7bfc708ecfa9395d60aab99c5f | 1,279 | py | Python | py/jpy/src/test/python/jpy_translation_test.py | devinrsmith/deephaven-core | 3a6930046faf1cd556f62a914ce1cfd7860147b9 | [
"MIT"
] | 55 | 2021-05-11T16:01:59.000Z | 2022-03-30T14:30:33.000Z | py/jpy/src/test/python/jpy_translation_test.py | devinrsmith/deephaven-core | 3a6930046faf1cd556f62a914ce1cfd7860147b9 | [
"MIT"
] | 943 | 2021-05-10T14:00:02.000Z | 2022-03-31T21:28:15.000Z | py/jpy/src/test/python/jpy_translation_test.py | devinrsmith/deephaven-core | 3a6930046faf1cd556f62a914ce1cfd7860147b9 | [
"MIT"
] | 29 | 2021-05-10T11:33:16.000Z | 2022-03-30T21:01:54.000Z | # This file was modified by Deephaven Data Labs.
import unittest
import jpyutil
jpyutil.init_jvm(jvm_maxmem='512M', jvm_classpath=['target/test-classes'])
import jpy
class DummyWrapper:
def __init__(self, theThing):
self.theThing = theThing
def getValue(self):
return 2 * self.theThing.getVal... | 29.744186 | 117 | 0.68491 |
7c1180c3dfd51ac5958b332866461de583ff034c | 608 | py | Python | ___Python/Jonas/Python/p02_datenstrukturen/m03_anwendung_woerterbuecher.py | uvenil/PythonKurs201806 | 85afa9c9515f5dd8bec0c546f077d8cc39568fe8 | [
"Apache-2.0"
] | null | null | null | ___Python/Jonas/Python/p02_datenstrukturen/m03_anwendung_woerterbuecher.py | uvenil/PythonKurs201806 | 85afa9c9515f5dd8bec0c546f077d8cc39568fe8 | [
"Apache-2.0"
] | null | null | null | ___Python/Jonas/Python/p02_datenstrukturen/m03_anwendung_woerterbuecher.py | uvenil/PythonKurs201806 | 85afa9c9515f5dd8bec0c546f077d8cc39568fe8 | [
"Apache-2.0"
] | null | null | null | satz = "Fischers Fritze fischt frische Fische"
# 1Häufigkeit des Buchstabens e
# Ansatz 1) for-Schleife und Zähler anzahl
zaehler = 0
for zeichen in satz:
if zeichen == "e":
zaehler += 1
print (zaehler)
# 2 Häufigkeitsverteilung der buchstaben im satz
d = {}
for zeichen in satz:
if zeiche... | 19.612903 | 67 | 0.625 |
7cacdd2f038510eb6468dfd964cdb80fd7950f54 | 1,509 | py | Python | Algorithms/notes/cookies_brian.py | tobias-fyi/02_algorithms | ab1a8a07c3560ad66712992e3af906e8fd316fe2 | [
"MIT"
] | null | null | null | Algorithms/notes/cookies_brian.py | tobias-fyi/02_algorithms | ab1a8a07c3560ad66712992e3af906e8fd316fe2 | [
"MIT"
] | 8 | 2020-03-24T17:47:23.000Z | 2022-03-12T00:33:21.000Z | cs/lambda_cs/02_algorithms/Algorithms/notes/cookies_brian.py | tobias-fyi/vela | b0b3d3c6dc3fa397c8c7a492098a02cf75e0ff82 | [
"MIT"
] | null | null | null | """
Algorithms :: Practice - eating cookies
Cookie Monster can eat either 0, 1, 2, or 3 cookies at a time.
If he were given a jar of cookies with `n` cookies inside of it,
how many ways could he eat all `n` cookies in the cookie jar?
Implement a function `eating_cookies` that counts the number of
possible ways Cookie ... | 18.402439 | 67 | 0.520212 |
86fa8522f6c5465e7f7eb038298a112b9efcf0fa | 2,609 | py | Python | quark_core_api/core/workspace.py | arcticle/Quark | 17aa5b5869a9e9c7a04c1a371fef5998f33dc319 | [
"MIT"
] | null | null | null | quark_core_api/core/workspace.py | arcticle/Quark | 17aa5b5869a9e9c7a04c1a371fef5998f33dc319 | [
"MIT"
] | null | null | null | quark_core_api/core/workspace.py | arcticle/Quark | 17aa5b5869a9e9c7a04c1a371fef5998f33dc319 | [
"MIT"
] | null | null | null | import os
from quark_core_api.context import WorkspaceContext, ExperimentContext
from quark_core_api.common import ContextInitializer
from quark_core_api.core import QuarkExperiment, Script
from quark_core_api.exceptions import InvalidContextException
class QuarkWorkspace(object):
def __init__(self, id, name, cont... | 29.988506 | 84 | 0.676504 |
d48c6aed5aec50042d6e584932d8e053cd809853 | 3,629 | py | Python | tests/ernie_text_matching/model.py | mukaiu/PaddleNLP | 0315365dbafa6e3b1c7147121ba85e05884125a5 | [
"Apache-2.0"
] | null | null | null | tests/ernie_text_matching/model.py | mukaiu/PaddleNLP | 0315365dbafa6e3b1c7147121ba85e05884125a5 | [
"Apache-2.0"
] | null | null | null | tests/ernie_text_matching/model.py | mukaiu/PaddleNLP | 0315365dbafa6e3b1c7147121ba85e05884125a5 | [
"Apache-2.0"
] | null | null | null | # Copyright (c) 2021 PaddlePaddle Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License"
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applica... | 33.915888 | 77 | 0.606503 |
07cabae4faaff6e4fe9099e5b710debcc1f4036d | 10,532 | py | Python | rfvision/models/pose_estimators/articulation/optimization/utils.py | mvig-robotflow/rfvision | cc662f213dfe5a3e8864a6b5685a668a4436e397 | [
"Apache-2.0"
] | 6 | 2021-09-25T03:53:06.000Z | 2022-02-19T03:25:11.000Z | rfvision/models/pose_estimators/articulation/optimization/utils.py | mvig-robotflow/rfvision | cc662f213dfe5a3e8864a6b5685a668a4436e397 | [
"Apache-2.0"
] | 1 | 2021-07-21T13:14:54.000Z | 2021-07-21T13:14:54.000Z | rfvision/models/pose_estimators/articulation/optimization/utils.py | mvig-robotflow/rfvision | cc662f213dfe5a3e8864a6b5685a668a4436e397 | [
"Apache-2.0"
] | 2 | 2021-07-16T03:25:04.000Z | 2021-11-22T06:04:01.000Z | import numpy as np
from scipy.optimize import linear_sum_assignment
DIVISION_EPS = 1e-10
from scipy.spatial.transform import Rotation as srot
from scipy.optimize import least_squares
def get_3d_bbox(scale, shift = 0):
"""
Input:
scale: [3] or scalar
shift: [3] or scalar
Return
bbo... | 45.008547 | 170 | 0.618686 |
07fd1b2c7aa0339bc5336360c12584bc516707ea | 596 | py | Python | HackerP/introduction/if-else.py | JKChang2015/hackerrank | 5e5bd6892d2e4754e73f73eecfa8f4b9f266c3bd | [
"MIT"
] | null | null | null | HackerP/introduction/if-else.py | JKChang2015/hackerrank | 5e5bd6892d2e4754e73f73eecfa8f4b9f266c3bd | [
"MIT"
] | null | null | null | HackerP/introduction/if-else.py | JKChang2015/hackerrank | 5e5bd6892d2e4754e73f73eecfa8f4b9f266c3bd | [
"MIT"
] | null | null | null | # if-else
# Created by JKChang
# 14/08/2018, 10:48
# Tag:
# Description: https://www.hackerrank.com/challenges/py-if-else/problem
# Task
# Given an integer, , perform the following conditional actions:
# If n is odd, print Weird
# If n is even and in the inclusive range of 2 to 5, print Not Weird
# If n is even and in ... | 25.913043 | 71 | 0.659396 |
6af4f8a95d4bffa2f0750024747d51d370bb62b1 | 830 | py | Python | Edzna/device/light.py | xe1gyq/veracruz | 6094d511998705245fc9f25158cc496de5871db3 | [
"MIT"
] | null | null | null | Edzna/device/light.py | xe1gyq/veracruz | 6094d511998705245fc9f25158cc496de5871db3 | [
"MIT"
] | null | null | null | Edzna/device/light.py | xe1gyq/veracruz | 6094d511998705245fc9f25158cc496de5871db3 | [
"MIT"
] | null | null | null | #!/usr/bin/python
import paho.mqtt.client as paho
import time
from upm import pyupm_grove as grove
from threading import Thread
relay = grove.GroveRelay(2)
def functionDataActuatorMqttOnMessage(mosq, obj, msg):
if msg.payload == "ON":
relay.on()
elif msg.payload == "OFF":
relay.off()
def fu... | 23.055556 | 74 | 0.704819 |
ed5ad2b45c938c466e78d684f183e21c386d63e1 | 292 | py | Python | pacman-arch/test/pacman/tests/upgrade-download-404.py | Maxython/pacman-for-termux | 3b208eb9274cbfc7a27fca673ea8a58f09ebad47 | [
"MIT"
] | 23 | 2021-05-21T19:11:06.000Z | 2022-03-31T18:14:20.000Z | source/pacman-6.0.1/test/pacman/tests/upgrade-download-404.py | Scottx86-64/dotfiles-1 | 51004b1e2b032664cce6b553d2052757c286087d | [
"Unlicense"
] | 11 | 2021-05-21T12:08:44.000Z | 2021-12-21T08:30:08.000Z | source/pacman-6.0.1/test/pacman/tests/upgrade-download-404.py | Scottx86-64/dotfiles-1 | 51004b1e2b032664cce6b553d2052757c286087d | [
"Unlicense"
] | 1 | 2021-09-26T08:44:40.000Z | 2021-09-26T08:44:40.000Z | self.description = 'download a remote package with -U'
self.require_capability("curl")
url = self.add_simple_http_server({})
self.args = '-Uw {url}/foo.pkg'.format(url=url)
self.addrule('!PACMAN_RETCODE=0')
self.addrule('!CACHE_FEXISTS=foo.pkg')
self.addrule('!CACHE_FEXISTS=foo.pkg.sig')
| 26.545455 | 54 | 0.743151 |
ed883109701131cf59521492da50992dbb717e73 | 2,097 | py | Python | Python/Basic_Data_Types/Nested_List.py | vinayvinu500/Hackerrank | e185ae9d3c7dc5cd661761142e436f5df6a3f0f1 | [
"MIT"
] | null | null | null | Python/Basic_Data_Types/Nested_List.py | vinayvinu500/Hackerrank | e185ae9d3c7dc5cd661761142e436f5df6a3f0f1 | [
"MIT"
] | null | null | null | Python/Basic_Data_Types/Nested_List.py | vinayvinu500/Hackerrank | e185ae9d3c7dc5cd661761142e436f5df6a3f0f1 | [
"MIT"
] | null | null | null | # user input
# https://www.hackerrank.com/challenges/nested-list/problem?h_r=internal-search
if __name__ == '__main__':
z = int(input())
phy = []
grd = []
for _ in range(z):
name = input().strip()
score = float(input().strip())
phy.append([name, score])
grd.append(score)
... | 17.330579 | 79 | 0.475918 |
1354adf16fee81dd47462e4e0595a247769f4e57 | 146 | py | Python | python_lessons/Textastic_Files/Python SQLite Tutorial - MtMk/app2.py | 1986MMartin/coding-sections-markus | e13be32e5d83e69250ecfb3c76a04ee48a320607 | [
"Apache-2.0"
] | null | null | null | python_lessons/Textastic_Files/Python SQLite Tutorial - MtMk/app2.py | 1986MMartin/coding-sections-markus | e13be32e5d83e69250ecfb3c76a04ee48a320607 | [
"Apache-2.0"
] | null | null | null | python_lessons/Textastic_Files/Python SQLite Tutorial - MtMk/app2.py | 1986MMartin/coding-sections-markus | e13be32e5d83e69250ecfb3c76a04ee48a320607 | [
"Apache-2.0"
] | null | null | null | import formular
def menu():
myroot = formular.root()
formular.form_body(root, name='Markus Martin - 2020', geometry="500x500")
menu()
| 14.6 | 77 | 0.678082 |
b96f0b3b1633e91d1101afa17159304c1f00a842 | 2,119 | py | Python | rbac/common/task/relationship_owner.py | akgunkel/sawtooth-next-directory | a88833033ab30e9091479a38947f04c5e396ca46 | [
"Apache-2.0"
] | null | null | null | rbac/common/task/relationship_owner.py | akgunkel/sawtooth-next-directory | a88833033ab30e9091479a38947f04c5e396ca46 | [
"Apache-2.0"
] | 1 | 2018-09-10T19:12:31.000Z | 2018-09-10T19:12:31.000Z | rbac/common/task/relationship_owner.py | akgunkel/sawtooth-next-directory | a88833033ab30e9091479a38947f04c5e396ca46 | [
"Apache-2.0"
] | null | null | null | # Copyright 2019 Contributors to Hyperledger Sawtooth
#
# 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 ... | 35.915254 | 79 | 0.716848 |
e072226f51f92cfe1559caecc99b5dd3a96598e4 | 2,636 | py | Python | src/onegov/feriennet/exports/occasion.py | politbuero-kampagnen/onegov-cloud | 20148bf321b71f617b64376fe7249b2b9b9c4aa9 | [
"MIT"
] | null | null | null | src/onegov/feriennet/exports/occasion.py | politbuero-kampagnen/onegov-cloud | 20148bf321b71f617b64376fe7249b2b9b9c4aa9 | [
"MIT"
] | null | null | null | src/onegov/feriennet/exports/occasion.py | politbuero-kampagnen/onegov-cloud | 20148bf321b71f617b64376fe7249b2b9b9c4aa9 | [
"MIT"
] | null | null | null | from onegov.activity import Activity, Occasion, OccasionNeed
from onegov.core.security import Secret
from onegov.feriennet import FeriennetApp, _
from onegov.feriennet.exports.base import FeriennetExport
from onegov.feriennet.forms import PeriodExportForm
from sqlalchemy.orm import joinedload, undefer
@FeriennetApp.e... | 32.146341 | 78 | 0.66085 |
161a4718a27f59f00dbdb084c8228aba2a082557 | 469 | py | Python | python/gdal_cookbook/cookbook_geometry/create_multi_point.py | zeroam/TIL | 43e3573be44c7f7aa4600ff8a34e99a65cbdc5d1 | [
"MIT"
] | null | null | null | python/gdal_cookbook/cookbook_geometry/create_multi_point.py | zeroam/TIL | 43e3573be44c7f7aa4600ff8a34e99a65cbdc5d1 | [
"MIT"
] | null | null | null | python/gdal_cookbook/cookbook_geometry/create_multi_point.py | zeroam/TIL | 43e3573be44c7f7aa4600ff8a34e99a65cbdc5d1 | [
"MIT"
] | null | null | null | from osgeo import ogr
multipoint = ogr.Geometry(ogr.wkbMultiPoint)
point1 = ogr.Geometry(ogr.wkbPoint)
point1.AddPoint(1251243.7361610543, 598078.7958668759)
multipoint.AddGeometry(point1)
point2 = ogr.Geometry(ogr.wkbPoint)
point2.AddPoint(1240605.8570339603, 601778.9277371694)
multipoint.AddGeometry(point2)
point... | 27.588235 | 54 | 0.82516 |
16b4938010cec31f08db802278c4e1f91ad43779 | 654 | py | Python | 06.BinarySearch/min/B2003-M.py | SP2021-2/Algorithm | 2e629eb5234212fad8bbc11491aad068e5783780 | [
"MIT"
] | 1 | 2021-11-21T06:03:06.000Z | 2021-11-21T06:03:06.000Z | 06.BinarySearch/min/B2003-M.py | SP2021-2/Algorithm | 2e629eb5234212fad8bbc11491aad068e5783780 | [
"MIT"
] | 2 | 2021-10-13T07:21:09.000Z | 2021-11-14T13:53:08.000Z | 06.BinarySearch/min/B2003-M.py | SP2021-2/Algorithm | 2e629eb5234212fad8bbc11491aad068e5783780 | [
"MIT"
] | null | null | null | num , need = map(int, input().split())
arr = list(map(int, input().split()))
#sys.stdin.readline().strip()
i = 0
j = 0
check = 0;
sum = 0
while i <= len(arr):
if(i != len(arr)):
if sum < need:
sum += arr[i]
i += 1
elif sum > need:
sum -= arr[j]
... | 17.210526 | 38 | 0.370031 |
4c03f05ac08e397a246b791f9839134aadf9e573 | 615 | py | Python | pytgt/process_call.py | lihuiba/SoftSAN | 1b8ab2cae92b7aac34211909b27d4ebe595275d7 | [
"Apache-2.0"
] | 1 | 2015-08-02T09:53:18.000Z | 2015-08-02T09:53:18.000Z | pytgt/process_call.py | lihuiba/SoftSAN | 1b8ab2cae92b7aac34211909b27d4ebe595275d7 | [
"Apache-2.0"
] | null | null | null | pytgt/process_call.py | lihuiba/SoftSAN | 1b8ab2cae92b7aac34211909b27d4ebe595275d7 | [
"Apache-2.0"
] | 2 | 2018-03-21T04:59:50.000Z | 2019-12-03T15:54:17.000Z | import subprocess
# change the type of output below
def process_call_argv(argv):
process = subprocess.Popen(argv, stdout=subprocess.PIPE, shell=False)
output = ""
while True:
out = process.stdout.readline()
if out == '' and process.poll() != None: break
output += out
return (process.returncod... | 29.285714 | 71 | 0.687805 |
4c2cd86a521f87f65028a699fd533401429b060a | 2,285 | py | Python | examples/language_model/rnnlm/train.py | mukaiu/PaddleNLP | 0315365dbafa6e3b1c7147121ba85e05884125a5 | [
"Apache-2.0"
] | null | null | null | examples/language_model/rnnlm/train.py | mukaiu/PaddleNLP | 0315365dbafa6e3b1c7147121ba85e05884125a5 | [
"Apache-2.0"
] | null | null | null | examples/language_model/rnnlm/train.py | mukaiu/PaddleNLP | 0315365dbafa6e3b1c7147121ba85e05884125a5 | [
"Apache-2.0"
] | null | null | null | import os
import sys
import paddle
import numpy as np
from model import RnnLm, CrossEntropyLossForLm, UpdateModel
from args import parse_args
from reader import create_data_loader
from paddlenlp.metrics import Perplexity
paddle.seed(102)
def train(args):
paddle.set_device(args.device)
data_path = args.data... | 33.602941 | 78 | 0.659519 |
d5c4c4bf4f222c33080b0b11b56c9f08c4800284 | 3,268 | py | Python | exercises/networking_selfpaced/networking-workshop/collections/ansible_collections/community/general/plugins/modules/digital_ocean_tag_info.py | tr3ck3r/linklight | 5060f624c235ecf46cb62cefcc6bddc6bf8ca3e7 | [
"MIT"
] | null | null | null | exercises/networking_selfpaced/networking-workshop/collections/ansible_collections/community/general/plugins/modules/digital_ocean_tag_info.py | tr3ck3r/linklight | 5060f624c235ecf46cb62cefcc6bddc6bf8ca3e7 | [
"MIT"
] | null | null | null | exercises/networking_selfpaced/networking-workshop/collections/ansible_collections/community/general/plugins/modules/digital_ocean_tag_info.py | tr3ck3r/linklight | 5060f624c235ecf46cb62cefcc6bddc6bf8ca3e7 | [
"MIT"
] | null | null | null | #!/usr/bin/python
# -*- coding: utf-8 -*-
# Copyright: (c) 2018, Ansible Project
# Copyright: (c) 2018, Abhijeet Kasurde <akasurde@redhat.com>
# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
from __future__ import absolute_import, division, print_function
__metaclass__ = ty... | 26.786885 | 125 | 0.680233 |
d5f7a410dce6f7dd61b69a822bf1cf69f9d887fe | 748 | py | Python | rotating_triangles/rotating_triangle_final.py | kantel/py5 | 1bed40dbf732fce28412a206e7c043bd9a01a521 | [
"MIT"
] | null | null | null | rotating_triangles/rotating_triangle_final.py | kantel/py5 | 1bed40dbf732fce28412a206e7c043bd9a01a521 | [
"MIT"
] | null | null | null | rotating_triangles/rotating_triangle_final.py | kantel/py5 | 1bed40dbf732fce28412a206e7c043bd9a01a521 | [
"MIT"
] | null | null | null | # rotating triangles final
# after Roger Antonsen (University of Oslo)
# and Peter Farrell (Math Adventures with Python, p. 93ff.)
def setup():
size(600, 600)
color_mode(HSB, 100)
t = 0
def draw():
global t
background(255, 0, 100) # white
translate(width/2, height/2)
for i in range(90):
... | 24.129032 | 59 | 0.586898 |
e6fb0d7160d5c560cbc70824225ce6917cdd2f82 | 4,965 | py | Python | pyScript/ui/ui_script.py | Shirazbello/Pyscriptining | 0f2c80a9bb10477d65966faeccc7783f20385c1b | [
"MIT"
] | null | null | null | pyScript/ui/ui_script.py | Shirazbello/Pyscriptining | 0f2c80a9bb10477d65966faeccc7783f20385c1b | [
"MIT"
] | null | null | null | pyScript/ui/ui_script.py | Shirazbello/Pyscriptining | 0f2c80a9bb10477d65966faeccc7783f20385c1b | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
################################################################################
## Form generated from reading UI file 'script.ui'
##
## Created by: Qt User Interface Compiler version 5.14.1
##
## WARNING! All changes made in this file will be lost when recompiling UI file!
###################... | 48.203883 | 121 | 0.72004 |
5d99312bc166828cc24c9a9ef7023f8e8723ce7b | 2,710 | py | Python | src/tango_sdp_master/test/SDPMaster_test.py | rtobar/sdp-prototype | 9f1527b884bf80daa509a7fe3722160c77260f4f | [
"BSD-3-Clause"
] | 2 | 2019-07-15T09:49:34.000Z | 2019-10-14T16:04:17.000Z | src/tango_sdp_master/test/SDPMaster_test.py | rtobar/sdp-prototype | 9f1527b884bf80daa509a7fe3722160c77260f4f | [
"BSD-3-Clause"
] | 17 | 2019-07-15T14:51:50.000Z | 2021-06-02T00:29:43.000Z | src/tango_sdp_master/test/SDPMaster_test.py | ska-telescope/sdp-configuration-prototype | 8c6cbda04a83b0e16987019406ed6ec7e1058a31 | [
"BSD-3-Clause"
] | 1 | 2019-10-10T08:16:48.000Z | 2019-10-10T08:16:48.000Z | # -*- coding: utf-8 -*-
"""Tests for the SDP Master Tango Class."""
# pylint: disable=redefined-outer-name, invalid-name
import pytest
from SDPMaster import SDPMaster
# Note:
#
# Since the device uses an inner thread, it is necessary to
# wait during the tests in order the let the device update itself.
# Hence, the... | 33.04878 | 76 | 0.663469 |
53988bbc9921c847928ac8a83642732eb22567cb | 3,711 | py | Python | components/py_engine/framework/network.py | wstong999/AliOS-Things | 6554769cb5b797e28a30a4aa89b3f4cb2ef2f5d9 | [
"Apache-2.0"
] | 4,538 | 2017-10-20T05:19:03.000Z | 2022-03-30T02:29:30.000Z | components/py_engine/framework/network.py | wstong999/AliOS-Things | 6554769cb5b797e28a30a4aa89b3f4cb2ef2f5d9 | [
"Apache-2.0"
] | 1,088 | 2017-10-21T07:57:22.000Z | 2022-03-31T08:15:49.000Z | components/py_engine/framework/network.py | willianchanlovegithub/AliOS-Things | 637c0802cab667b872d3b97a121e18c66f256eab | [
"Apache-2.0"
] | 1,860 | 2017-10-20T05:22:35.000Z | 2022-03-27T10:54:14.000Z | # -*- coding: UTF-8 -*-
import netmgr as nm
import time
_wifi_connected = False
def singleton(cls, *args, **kw):
instances = {}
def getinstance():
if cls not in instances:
instances[cls] = cls(*args, **kw)
nm.init()
return instances[cls]
return getinstance
def _o... | 20.059459 | 72 | 0.371598 |
072b710f034936f9467275f81306c723e9738455 | 1,968 | py | Python | src/Sephrasto/DatenbankSelectTypeWrapper.py | qeqar/Sephrasto | ce46d46299b2c793f015e25c98908773c39b1dee | [
"MIT"
] | 1 | 2022-02-02T16:15:59.000Z | 2022-02-02T16:15:59.000Z | src/Sephrasto/DatenbankSelectTypeWrapper.py | qeqar/Sephrasto | ce46d46299b2c793f015e25c98908773c39b1dee | [
"MIT"
] | 1 | 2022-01-14T11:04:19.000Z | 2022-01-14T11:04:19.000Z | src/Sephrasto/DatenbankSelectTypeWrapper.py | qeqar/Sephrasto | ce46d46299b2c793f015e25c98908773c39b1dee | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
"""
Created on Sat Mar 18 10:33:39 2017
@author: Aeolitus
"""
from PyQt5 import QtWidgets, QtCore
import UI.DatenbankSelectType
class DatenbankSelectTypeWrapper(object):
def __init__(self, dbTypes):
super().__init__()
Dialog = QtWidgets.QDialog()
ui = UI.DatenbankSe... | 32.262295 | 96 | 0.560976 |
ab0730df111959f7252ac7af32617831e590cef5 | 4,013 | py | Python | exercises/networking_selfpaced/networking-workshop/collections/ansible_collections/community/general/tests/unit/modules/network/cloudengine/test_ce_is_is_interface.py | tr3ck3r/linklight | 5060f624c235ecf46cb62cefcc6bddc6bf8ca3e7 | [
"MIT"
] | null | null | null | exercises/networking_selfpaced/networking-workshop/collections/ansible_collections/community/general/tests/unit/modules/network/cloudengine/test_ce_is_is_interface.py | tr3ck3r/linklight | 5060f624c235ecf46cb62cefcc6bddc6bf8ca3e7 | [
"MIT"
] | null | null | null | exercises/networking_selfpaced/networking-workshop/collections/ansible_collections/community/general/tests/unit/modules/network/cloudengine/test_ce_is_is_interface.py | tr3ck3r/linklight | 5060f624c235ecf46cb62cefcc6bddc6bf8ca3e7 | [
"MIT"
] | null | null | null | # (c) 2019 Red Hat Inc.
#
# This file is part of Ansible
#
# Ansible is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# Ansible is dis... | 39.732673 | 146 | 0.670072 |
ab438c98c3b4693f9c5289b5b22cd176e44fcdd3 | 2,639 | py | Python | 03 Python/Smart Home Dashboard/aufgabe/hwio/switch.py | DennisSchulmeister/dhbwka-wwi-iottech-quellcodes | 58f86907af31187f267a9ea476f061cc59098ebd | [
"CC-BY-4.0"
] | null | null | null | 03 Python/Smart Home Dashboard/aufgabe/hwio/switch.py | DennisSchulmeister/dhbwka-wwi-iottech-quellcodes | 58f86907af31187f267a9ea476f061cc59098ebd | [
"CC-BY-4.0"
] | null | null | null | 03 Python/Smart Home Dashboard/aufgabe/hwio/switch.py | DennisSchulmeister/dhbwka-wwi-iottech-quellcodes | 58f86907af31187f267a9ea476f061cc59098ebd | [
"CC-BY-4.0"
] | 1 | 2020-10-10T20:24:05.000Z | 2020-10-10T20:24:05.000Z | import time
import RPi.GPIO as GPIO
from .hwdevice import HardwareDevice
class SwitchOutputDevice(HardwareDevice):
"""
Klasse zur Ansteuerung eines einfachen, binären GPIO-Ausgangs. Der Ausgang
kann dazu genutzt werden, eine LED oder irgend eine andere Last (z.B. ein
Relais) ein oder auszuschalten. Zus... | 29.651685 | 79 | 0.605532 |
db3b848cb3dd5ee95ffcd7e58640e33e842abc8e | 9,547 | py | Python | tests/onegov/feriennet/test_browser.py | politbuero-kampagnen/onegov-cloud | 20148bf321b71f617b64376fe7249b2b9b9c4aa9 | [
"MIT"
] | null | null | null | tests/onegov/feriennet/test_browser.py | politbuero-kampagnen/onegov-cloud | 20148bf321b71f617b64376fe7249b2b9b9c4aa9 | [
"MIT"
] | null | null | null | tests/onegov/feriennet/test_browser.py | politbuero-kampagnen/onegov-cloud | 20148bf321b71f617b64376fe7249b2b9b9c4aa9 | [
"MIT"
] | null | null | null | import time
from psycopg2.extras import NumericRange
from pytest import mark
@mark.flaky(reruns=3)
def test_browse_matching(browser, scenario):
scenario.add_period(title="Ferienpass 2016")
for i in range(2):
scenario.add_activity(title=f"A {i}", state='accepted')
scenario.add_occasion(age=(0... | 33.264808 | 79 | 0.69006 |
91b3d0d38d6da9f410a5761f48be3c9bec26cdaa | 49 | py | Python | pyramid-creator/app/config.py | jinnn-dev/patholearn | b4e6a18cfbf963e71640ed6cac3fc3a618a7ae15 | [
"MIT"
] | 1 | 2022-02-20T12:45:04.000Z | 2022-02-20T12:45:04.000Z | pyramid-creator/app/config.py | JamesNeumann/learning-by-annotations | c2b5e4b653eeb1c973aa5a7dad35ac8be18cb1ad | [
"MIT"
] | 21 | 2021-11-01T10:13:56.000Z | 2021-12-02T10:02:13.000Z | pyramid-creator/app/config.py | jinnn-dev/patholearn | b4e6a18cfbf963e71640ed6cac3fc3a618a7ae15 | [
"MIT"
] | 1 | 2021-12-16T18:20:55.000Z | 2021-12-16T18:20:55.000Z | class Config:
TEMP_IMAGES_FOLDER = "/data"
| 16.333333 | 33 | 0.673469 |
91bcdfeee7af286bb3aada18c0cb79b683a3032d | 4,852 | py | Python | bots/botutilities/grid.py | jorgeparavicini/FourWins | 1c5e8a23b4464ef6b71d70c9ff040aa004b9ca83 | [
"MIT"
] | 1 | 2021-01-20T18:33:01.000Z | 2021-01-20T18:33:01.000Z | bots/botutilities/grid.py | jorgeparavicini/FourWins | 1c5e8a23b4464ef6b71d70c9ff040aa004b9ca83 | [
"MIT"
] | null | null | null | bots/botutilities/grid.py | jorgeparavicini/FourWins | 1c5e8a23b4464ef6b71d70c9ff040aa004b9ca83 | [
"MIT"
] | 2 | 2019-09-04T08:27:14.000Z | 2019-09-06T20:32:30.000Z | from __future__ import annotations
from typing import TypeVar, List, Generic, Callable
T = TypeVar('T')
"""
GRID LAYOUT
(0,2) (1,2) (2,2)
(0,1) (1,1) (2,1)
(0,0) (1,0) (2,0)
"""
class Grid(Generic[T]):
def __init__(self, grid: List[List[T]]):
self.__grid = grid
if len(grid) > 0 and len(grid[0... | 25.536842 | 83 | 0.476298 |
37ce90a519ae0c88b8597cbc9e32c992964ff468 | 5,810 | py | Python | doc/fb_memoir/python/combined.py | ghsecuritylab/project-powerline | 6c0ec13bbfc11c3790c506f644db4fe45021440a | [
"MIT"
] | null | null | null | doc/fb_memoir/python/combined.py | ghsecuritylab/project-powerline | 6c0ec13bbfc11c3790c506f644db4fe45021440a | [
"MIT"
] | null | null | null | doc/fb_memoir/python/combined.py | ghsecuritylab/project-powerline | 6c0ec13bbfc11c3790c506f644db4fe45021440a | [
"MIT"
] | 1 | 2020-03-08T01:50:58.000Z | 2020-03-08T01:50:58.000Z | #!/usr/bin/env python3
import sympy as sp
import numpy as np
import matplotlib.pyplot as plt
# Approx 10 kHz
w = 66e3
deltaW = 33e3
T = 2 * np.pi / w
T_lo = 2 * np.pi / (w - deltaW)
T_hi = 2 * np.pi / (w + deltaW)
A1 = 5
A2 = 30
A = 1.5
x = sp.Symbol('x')
#func1 = 1/2 * (2 + sp.cos(2*w1*x) + sp.cos(2*... | 37.727273 | 96 | 0.640448 |
72eda700c15050a4608c5a0b8f7c7eea8f3cf744 | 282 | py | Python | 9.10.py | RonaldZhao/NowCoder | 935af39835a98efc14157e20df1e3458e02b9803 | [
"MIT"
] | null | null | null | 9.10.py | RonaldZhao/NowCoder | 935af39835a98efc14157e20df1e3458e02b9803 | [
"MIT"
] | null | null | null | 9.10.py | RonaldZhao/NowCoder | 935af39835a98efc14157e20df1e3458e02b9803 | [
"MIT"
] | null | null | null | class TreeCount:
def countWays(self, n):
if n <= 1:
return n
def C(m, n):
# 求C(m, n)
f = lambda x, y: x * y
return reduce(f, range(m, m - n, -1)) / reduce(f, range(1, n + 1))
return C(n * 2, n) / (n + 1)
| 23.5 | 78 | 0.397163 |
f488c6621fa54ad1488c351c9a256506bd7bd1d2 | 7,336 | py | Python | lale/lib/autogen/gaussian_process_classifier.py | vishalbelsare/lale | 654ca29ec0234b478d26724a25df28b28f5c0bc0 | [
"Apache-2.0"
] | 265 | 2019-08-06T14:45:43.000Z | 2022-03-30T23:57:48.000Z | lale/lib/autogen/gaussian_process_classifier.py | vishalbelsare/lale | 654ca29ec0234b478d26724a25df28b28f5c0bc0 | [
"Apache-2.0"
] | 467 | 2019-08-08T02:01:21.000Z | 2022-03-25T16:12:00.000Z | lale/lib/autogen/gaussian_process_classifier.py | vishalbelsare/lale | 654ca29ec0234b478d26724a25df28b28f5c0bc0 | [
"Apache-2.0"
] | 81 | 2019-08-07T19:59:31.000Z | 2022-03-31T09:11:58.000Z | from numpy import inf, nan
from sklearn.gaussian_process import GaussianProcessClassifier as Op
from lale.docstrings import set_docstrings
from lale.operators import make_operator
class _GaussianProcessClassifierImpl:
def __init__(self, **hyperparams):
self._hyperparams = hyperparams
self._wrappe... | 39.654054 | 223 | 0.531625 |
beb90015089d5923b08550d2d8deae199aa7b26b | 1,955 | py | Python | TestBot/test_cogs/rpgFunctions/monster.py | austinmh12/DiscordBots | 55550b68a7ad6423de55e62dbbff93fd88f08ff2 | [
"MIT"
] | null | null | null | TestBot/test_cogs/rpgFunctions/monster.py | austinmh12/DiscordBots | 55550b68a7ad6423de55e62dbbff93fd88f08ff2 | [
"MIT"
] | null | null | null | TestBot/test_cogs/rpgFunctions/monster.py | austinmh12/DiscordBots | 55550b68a7ad6423de55e62dbbff93fd88f08ff2 | [
"MIT"
] | null | null | null | from .. import sql, log, BASE_PATH, chunk, Page
from random import randint, random, choice
from . import *
#############
# Constants #
#############
#############
# Functions #
#############
def get_monsters():
df = sql('rpg', 'select * from monsters')
if df.empty:
return []
return [Monster(**d) for d in df.to_... | 22.732558 | 66 | 0.640409 |
fe8624c73ab06467e18a8973fb28b74989f0036c | 3,547 | py | Python | research/cv/autoaugment/src/dataset/autoaugment/aug_test.py | leelige/mindspore | 5199e05ba3888963473f2b07da3f7bca5b9ef6dc | [
"Apache-2.0"
] | 1 | 2021-07-03T06:52:20.000Z | 2021-07-03T06:52:20.000Z | research/cv/autoaugment/src/dataset/autoaugment/aug_test.py | leelige/mindspore | 5199e05ba3888963473f2b07da3f7bca5b9ef6dc | [
"Apache-2.0"
] | null | null | null | research/cv/autoaugment/src/dataset/autoaugment/aug_test.py | leelige/mindspore | 5199e05ba3888963473f2b07da3f7bca5b9ef6dc | [
"Apache-2.0"
] | 2 | 2019-09-01T06:17:04.000Z | 2019-10-04T08:39:45.000Z | # Copyright 2021 Huawei Technologies Co., Ltd
#
# 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... | 33.149533 | 78 | 0.638286 |
43070d1cdd1c7060e4669542841e1169dc229696 | 17,520 | py | Python | Packs/Cyberpion/Integrations/Cyberpion/Cyberpion.py | diCagri/content | c532c50b213e6dddb8ae6a378d6d09198e08fc9f | [
"MIT"
] | 799 | 2016-08-02T06:43:14.000Z | 2022-03-31T11:10:11.000Z | Packs/Cyberpion/Integrations/Cyberpion/Cyberpion.py | diCagri/content | c532c50b213e6dddb8ae6a378d6d09198e08fc9f | [
"MIT"
] | 9,317 | 2016-08-07T19:00:51.000Z | 2022-03-31T21:56:04.000Z | Packs/Cyberpion/Integrations/Cyberpion/Cyberpion.py | diCagri/content | c532c50b213e6dddb8ae6a378d6d09198e08fc9f | [
"MIT"
] | 1,297 | 2016-08-04T13:59:00.000Z | 2022-03-31T23:43:06.000Z | import demistomock as demisto # noqa: F401
from typing import Dict, Tuple, List
from datetime import timezone
from CommonServerPython import *
"""Cyberpion Integration for Cortex XSOAR (aka Demisto)
"""
''' IMPORTS '''
# Disable insecure warnings
requests.packages.urllib3.disable_warnings()
''' CONSTANTS '''
DATE... | 39.282511 | 125 | 0.602055 |
43132270d11f024901d597608d82f6490984c29f | 25,494 | py | Python | fhirclient/r4models/implementationguide.py | Healthedata1/Flask-PL | 88a2f40ca430c4cbb9fbded7fc92fdc166ebb9f1 | [
"MIT"
] | null | null | null | fhirclient/r4models/implementationguide.py | Healthedata1/Flask-PL | 88a2f40ca430c4cbb9fbded7fc92fdc166ebb9f1 | [
"MIT"
] | null | null | null | fhirclient/r4models/implementationguide.py | Healthedata1/Flask-PL | 88a2f40ca430c4cbb9fbded7fc92fdc166ebb9f1 | [
"MIT"
] | null | null | null | #!/usr/bin/env python
# -*- coding: utf-8 -*-
#
# Generated from FHIR 4.0.0-a53ec6ee1b (http://hl7.org/fhir/StructureDefinition/ImplementationGuide) on 2019-05-07.
# 2019, SMART Health IT.
from . import domainresource
class ImplementationGuide(domainresource.DomainResource):
""" A set of rules about ... | 39.041348 | 117 | 0.601906 |
4a6bab9bd58e5283a4d01166b335fae8bbe5442a | 628 | py | Python | P8702N/pingTest.py | wittrup/crap | a77474588fd54a5a998e24df7b1e6e2ab473ded1 | [
"MIT"
] | 1 | 2017-12-12T13:58:08.000Z | 2017-12-12T13:58:08.000Z | P8702N/pingTest.py | wittrup/crap | a77474588fd54a5a998e24df7b1e6e2ab473ded1 | [
"MIT"
] | null | null | null | P8702N/pingTest.py | wittrup/crap | a77474588fd54a5a998e24df7b1e6e2ab473ded1 | [
"MIT"
] | 1 | 2019-11-03T10:16:35.000Z | 2019-11-03T10:16:35.000Z | import impat
impat.addfolder('python')
import requests
from FunCom import find_between
from session import login, host, cookies
if login.status_code == requests.codes.ok and cookies['SESSION'] is not '':
print('=~=~=~=~=~=~=~=~=~=~=~= =~=~=~=~=~=~=~=~=~=~=~=')
f = requests.get('ht... | 44.857143 | 109 | 0.624204 |
6029cebe3aab069699f06fc1541d6645afb853cc | 2,952 | py | Python | python_gui_tkinter/KALU/GARBAGE1/SAFE27JUL/AppOperations.py | SayanGhoshBDA/code-backup | 8b6135facc0e598e9686b2e8eb2d69dd68198b80 | [
"MIT"
] | 16 | 2018-11-26T08:39:42.000Z | 2019-05-08T10:09:52.000Z | python_gui_tkinter/KALU/GARBAGE1/SAFE27JUL/AppOperations.py | SayanGhoshBDA/code-backup | 8b6135facc0e598e9686b2e8eb2d69dd68198b80 | [
"MIT"
] | 8 | 2020-05-04T06:29:26.000Z | 2022-02-12T05:33:16.000Z | python_gui_tkinter/KALU/GARBAGE1/SAFE27JUL/AppOperations.py | SayanGhoshBDA/code-backup | 8b6135facc0e598e9686b2e8eb2d69dd68198b80 | [
"MIT"
] | 5 | 2020-02-11T16:02:21.000Z | 2021-02-05T07:48:30.000Z | import sqlite3
from tkinter import *
from tkinter import font
from tkinter.filedialog import askopenfilename
from datetime import datetime
# making the connection
conn = sqlite3.connect("appDb.sqlite")
cur = conn.cursor()
# email address is the primary key
cur.executescript('''
CREATE TABLE IF NOT EXISTS details(... | 30.75 | 129 | 0.673103 |
602e2080a574d1c061f3b8f0289691928fdce49a | 308 | py | Python | euler-20.py | TFabijo/euler | 58dc07b9adb236890556ccd5d75ca9dbd2b50df9 | [
"MIT"
] | null | null | null | euler-20.py | TFabijo/euler | 58dc07b9adb236890556ccd5d75ca9dbd2b50df9 | [
"MIT"
] | null | null | null | euler-20.py | TFabijo/euler | 58dc07b9adb236890556ccd5d75ca9dbd2b50df9 | [
"MIT"
] | null | null | null | def fakulteta(n):
zmnozek = 1
for x in range(1,n+1):
zmnozek *= x
return zmnozek
def vsota_stevk_fakultete(n):
fakul = fakulteta(n)
vsota = 0
while fakul > 0:
vsota += fakul % 10
fakul //= 10
return vsota
vsota_stevk_fakultete(100)
| 16.210526 | 30 | 0.542208 |
7164086abb152f9645f762b1d0eba577e01e81fd | 183 | py | Python | marsyas-vamp/marsyas/src/django/birdsong/application/birdsong/recordings/models.py | jaouahbi/VampPlugins | 27c2248d1c717417fe4d448cdfb4cb882a8a336a | [
"Apache-2.0"
] | null | null | null | marsyas-vamp/marsyas/src/django/birdsong/application/birdsong/recordings/models.py | jaouahbi/VampPlugins | 27c2248d1c717417fe4d448cdfb4cb882a8a336a | [
"Apache-2.0"
] | null | null | null | marsyas-vamp/marsyas/src/django/birdsong/application/birdsong/recordings/models.py | jaouahbi/VampPlugins | 27c2248d1c717417fe4d448cdfb4cb882a8a336a | [
"Apache-2.0"
] | null | null | null | from django.db import models
# Create your models here.
class Recording(models.Model):
name = models.CharField(max_length = 200)
length_ms = models.IntegerField(default = 0)
| 26.142857 | 48 | 0.743169 |
460aca28cb6d411fddd39c6c989a987cee662dcd | 3,921 | py | Python | src/scripts/alchi-wordsum.py | milahu/alchi | 6484d4a877d47204e28cf1a32a5d9da8705aff25 | [
"CC0-1.0"
] | 3 | 2020-08-12T16:57:23.000Z | 2021-03-15T18:39:48.000Z | src/scripts/alchi-wordsum.py | milahu/alchi | 6484d4a877d47204e28cf1a32a5d9da8705aff25 | [
"CC0-1.0"
] | 4 | 2020-09-22T19:25:43.000Z | 2022-02-14T20:51:16.000Z | src/scripts/alchi-wordsum.py | milahu/alchi | 6484d4a877d47204e28cf1a32a5d9da8705aff25 | [
"CC0-1.0"
] | 1 | 2021-04-06T11:18:17.000Z | 2021-04-06T11:18:17.000Z | #!/usr/bin/python3
# https://en.wikipedia.org/wiki/Digital_root
# digital sum
"""
wordlist samples:
https://github.com/hackerb9/gwordlist
All the words from Google Books, sorted by frequency
https://github.com/first20hours/google-10000-english
the 10,000 most common English words in order of frequency
https://gith... | 21.783333 | 87 | 0.534813 |
e80282abb33e183dd140910cd0a5955cd66b26fc | 10,762 | py | Python | exercises/networking_selfpaced/networking-workshop/collections/ansible_collections/community/general/tests/unit/modules/network/cloudengine/test_ce_is_is_view.py | tr3ck3r/linklight | 5060f624c235ecf46cb62cefcc6bddc6bf8ca3e7 | [
"MIT"
] | null | null | null | exercises/networking_selfpaced/networking-workshop/collections/ansible_collections/community/general/tests/unit/modules/network/cloudengine/test_ce_is_is_view.py | tr3ck3r/linklight | 5060f624c235ecf46cb62cefcc6bddc6bf8ca3e7 | [
"MIT"
] | null | null | null | exercises/networking_selfpaced/networking-workshop/collections/ansible_collections/community/general/tests/unit/modules/network/cloudengine/test_ce_is_is_view.py | tr3ck3r/linklight | 5060f624c235ecf46cb62cefcc6bddc6bf8ca3e7 | [
"MIT"
] | null | null | null | # (c) 2019 Red Hat Inc.
#
# This file is part of Ansible
#
# Ansible is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# Ansible is dis... | 43.220884 | 146 | 0.610481 |
e803a1701a74ac959fddab953c76411b42a0f00d | 8,626 | py | Python | garnet/lib/magma/include/virtio/virtio_magma.h.gen.py | opensource-assist/fuschia | 66646c55b3d0b36aae90a4b6706b87f1a6261935 | [
"BSD-3-Clause"
] | 3 | 2020-08-02T04:46:18.000Z | 2020-08-07T10:10:53.000Z | garnet/lib/magma/include/virtio/virtio_magma.h.gen.py | opensource-assist/fuschia | 66646c55b3d0b36aae90a4b6706b87f1a6261935 | [
"BSD-3-Clause"
] | null | null | null | garnet/lib/magma/include/virtio/virtio_magma.h.gen.py | opensource-assist/fuschia | 66646c55b3d0b36aae90a4b6706b87f1a6261935 | [
"BSD-3-Clause"
] | 1 | 2020-08-07T10:11:49.000Z | 2020-08-07T10:11:49.000Z | #!/usr/bin/env python2.7
# Copyright 2019 The Fuchsia Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
import json
import sys
def usage():
print 'Usage:'
print ' virtio_magma.h.gen.py FORMAT INPUT OUTPUT'
print ' FORMAT eit... | 31.713235 | 138 | 0.643751 |
1c977454d64119f3c5ea9748743df7399c05fc55 | 790 | py | Python | Packs/DynamicSectionReports/Scripts/DisplayTaggedWarroomEntries/DisplayTaggedWarroomEntries.py | diCagri/content | c532c50b213e6dddb8ae6a378d6d09198e08fc9f | [
"MIT"
] | 799 | 2016-08-02T06:43:14.000Z | 2022-03-31T11:10:11.000Z | Packs/DynamicSectionReports/Scripts/DisplayTaggedWarroomEntries/DisplayTaggedWarroomEntries.py | diCagri/content | c532c50b213e6dddb8ae6a378d6d09198e08fc9f | [
"MIT"
] | 9,317 | 2016-08-07T19:00:51.000Z | 2022-03-31T21:56:04.000Z | Packs/DynamicSectionReports/Scripts/DisplayTaggedWarroomEntries/DisplayTaggedWarroomEntries.py | diCagri/content | c532c50b213e6dddb8ae6a378d6d09198e08fc9f | [
"MIT"
] | 1,297 | 2016-08-04T13:59:00.000Z | 2022-03-31T23:43:06.000Z | import demistomock as demisto # noqa: F401
from CommonServerPython import * # noqa: F401
import json
filter_arg = json.loads(demisto.args().get("filter", json.dumps({"tags": ["report"]})))
raw_entries = None
if filter_arg:
raw_entries = demisto.executeCommand('getEntries', {"id": demisto.incident().get("id"), ... | 24.6875 | 114 | 0.674684 |
98eb4253442de3e6966845ff86d489085844b0fa | 1,613 | py | Python | common/models/member/MemberAddress.py | yao6891/FlaskOrdering | cbd24bd8d95afaba91ce4d6b1b3548c4e82e3807 | [
"Apache-2.0"
] | 2 | 2019-06-10T08:57:47.000Z | 2021-06-12T16:22:15.000Z | common/models/member/MemberAddress.py | yao6891/FlaskOrdering | cbd24bd8d95afaba91ce4d6b1b3548c4e82e3807 | [
"Apache-2.0"
] | null | null | null | common/models/member/MemberAddress.py | yao6891/FlaskOrdering | cbd24bd8d95afaba91ce4d6b1b3548c4e82e3807 | [
"Apache-2.0"
] | null | null | null | # coding: utf-8
from sqlalchemy import Column, DateTime, Index, Integer, String
from sqlalchemy.schema import FetchedValue
from application import db
class MemberAddress(db.Model):
__tablename__ = 'member_address'
__table_args__ = (
db.Index('idx_member_id_status', 'member_id', 'status'),
)
id... | 59.740741 | 93 | 0.749535 |
c734ebd6178f9f1c535610ca3b18a21d57d45c9a | 1,675 | py | Python | Packs/SlashNextPhishingIncidentResponse/Scripts/BrandImpersonationDetection/BrandImpersonationDetection.py | diCagri/content | c532c50b213e6dddb8ae6a378d6d09198e08fc9f | [
"MIT"
] | 799 | 2016-08-02T06:43:14.000Z | 2022-03-31T11:10:11.000Z | Packs/SlashNextPhishingIncidentResponse/Scripts/BrandImpersonationDetection/BrandImpersonationDetection.py | diCagri/content | c532c50b213e6dddb8ae6a378d6d09198e08fc9f | [
"MIT"
] | 9,317 | 2016-08-07T19:00:51.000Z | 2022-03-31T21:56:04.000Z | Packs/SlashNextPhishingIncidentResponse/Scripts/BrandImpersonationDetection/BrandImpersonationDetection.py | diCagri/content | c532c50b213e6dddb8ae6a378d6d09198e08fc9f | [
"MIT"
] | 1,297 | 2016-08-04T13:59:00.000Z | 2022-03-31T23:43:06.000Z | import re
import demistomock as demisto
from CommonServerPython import * # noqa: F401
# Scipt result
res = False
# Mandatory arguments
file_entry_ids = demisto.args()["ForensicFileEntry"]
forensic_files = file_entry_ids if isinstance(file_entry_ids, list) else file_entry_ids.split(",")
try:
for entry in forensi... | 31.018519 | 98 | 0.574328 |
c7b2d5a4fb3eac88a3d26a6c4c9aa5329f14e65d | 587 | py | Python | leetcode/112-Path-Sum/PathSum_001.py | cc13ny/all-in | bc0b01e44e121ea68724da16f25f7e24386c53de | [
"MIT"
] | 1 | 2015-12-16T04:01:03.000Z | 2015-12-16T04:01:03.000Z | leetcode/112-Path-Sum/PathSum_001.py | cc13ny/all-in | bc0b01e44e121ea68724da16f25f7e24386c53de | [
"MIT"
] | 1 | 2016-02-09T06:00:07.000Z | 2016-02-09T07:20:13.000Z | leetcode/112-Path-Sum/PathSum_001.py | cc13ny/all-in | bc0b01e44e121ea68724da16f25f7e24386c53de | [
"MIT"
] | 2 | 2019-06-27T09:07:26.000Z | 2019-07-01T04:40:13.000Z | # Definition for a binary tree node
# class TreeNode:
# def __init__(self, x):
# self.val = x
# self.left = None
# self.right = None
class Solution:
# @param root, a tree node
# @param sum, an integer
# @return a boolean
def hasPathSum(self, root, sum):
if root == N... | 24.458333 | 66 | 0.551959 |
401bcd08aa8968731ba6ff0041f2bfe2a3b6f581 | 477 | py | Python | source/pkgsrc/cad/py-gds/patches/patch-setup.py | Scottx86-64/dotfiles-1 | 51004b1e2b032664cce6b553d2052757c286087d | [
"Unlicense"
] | 1 | 2021-11-20T22:46:39.000Z | 2021-11-20T22:46:39.000Z | source/pkgsrc/cad/py-gds/patches/patch-setup.py | Scottx86-64/dotfiles-1 | 51004b1e2b032664cce6b553d2052757c286087d | [
"Unlicense"
] | null | null | null | source/pkgsrc/cad/py-gds/patches/patch-setup.py | Scottx86-64/dotfiles-1 | 51004b1e2b032664cce6b553d2052757c286087d | [
"Unlicense"
] | null | null | null | $NetBSD: patch-setup.py,v 1.2 2020/09/04 16:05:20 mef Exp $
Allow UTF-8 README.md
--- setup.py.orig 2020-05-31 17:53:41.141364832 +0000
+++ setup.py
@@ -12,7 +12,7 @@ import platform
from setuptools import setup, Extension
from distutils.version import LooseVersion
-with open("README.md") as fin:
+with open("READ... | 29.8125 | 95 | 0.685535 |
4041c83bb1c3ed61078627345783ddb3a731bfaf | 3,032 | py | Python | test3.py | Tiangewang0524/zzu_spider | eddd534f6a7bfb39eec5a7e240f830550b2285cb | [
"Apache-2.0"
] | null | null | null | test3.py | Tiangewang0524/zzu_spider | eddd534f6a7bfb39eec5a7e240f830550b2285cb | [
"Apache-2.0"
] | null | null | null | test3.py | Tiangewang0524/zzu_spider | eddd534f6a7bfb39eec5a7e240f830550b2285cb | [
"Apache-2.0"
] | null | null | null | import requests
from lxml import etree
import re
import pdfkit
from PyPDF2 import PdfFileMerger
import os
# 敏感词过滤类,AC自动机
import Ac_auto
# pdfkit配置
confg = pdfkit.configuration(wkhtmltopdf=r'C:\Program Files\wkhtmltopdf\bin\wkhtmltopdf.exe')
# 伪装http请求头部
headers = {
'User-Agent':
'Mozilla/5.0 (compatible; ... | 26.365217 | 108 | 0.592678 |
40e689f3bf0f871bc6b25864ef1919cb2cf0d5a0 | 4,665 | py | Python | models/criterions/CROPStructured.py | scott-mao/CroP | f1e0a25224e341683cf47e7ce451ce0fe996e950 | [
"MIT"
] | null | null | null | models/criterions/CROPStructured.py | scott-mao/CroP | f1e0a25224e341683cf47e7ce451ce0fe996e950 | [
"MIT"
] | null | null | null | models/criterions/CROPStructured.py | scott-mao/CroP | f1e0a25224e341683cf47e7ce451ce0fe996e950 | [
"MIT"
] | 1 | 2021-11-08T16:34:45.000Z | 2021-11-08T16:34:45.000Z | import copy
import torch
import torch.autograd as autograd
import torch.nn as nn
import torch.nn.functional as F
from models.criterions.SNAP import SNAP
from utils.constants import SNIP_BATCH_ITERATIONS
from collections import OrderedDict
from tqdm import tqdm
from models.networks.ResNext import ResNext
class CROPStr... | 38.553719 | 112 | 0.568489 |
734c2b5ae2abdc64ff9839fcb7fbe0ab5e183499 | 2,386 | py | Python | tests/onegov/translator_directory/conftest.py | politbuero-kampagnen/onegov-cloud | 20148bf321b71f617b64376fe7249b2b9b9c4aa9 | [
"MIT"
] | null | null | null | tests/onegov/translator_directory/conftest.py | politbuero-kampagnen/onegov-cloud | 20148bf321b71f617b64376fe7249b2b9b9c4aa9 | [
"MIT"
] | null | null | null | tests/onegov/translator_directory/conftest.py | politbuero-kampagnen/onegov-cloud | 20148bf321b71f617b64376fe7249b2b9b9c4aa9 | [
"MIT"
] | null | null | null | import pytest
import transaction
from onegov.fsi.initial_content import create_new_organisation
from onegov.translator_directory import TranslatorDirectoryApp
from onegov.user import User
from sqlalchemy.orm.session import close_all_sessions
from tests.onegov.fsi.common import global_password
from tests.onegov.fsi.com... | 25.934783 | 75 | 0.738894 |
488ad88797574037e51f67373c4e4268ce37fac8 | 1,749 | py | Python | python/crossref_prefix.py | sma-h/openapc-de | 0ec2d42d525219d801f71538f5b30ca6fecd9d3a | [
"Cube"
] | 89 | 2015-02-13T13:46:06.000Z | 2022-03-13T16:42:44.000Z | python/crossref_prefix.py | sma-h/openapc-de | 0ec2d42d525219d801f71538f5b30ca6fecd9d3a | [
"Cube"
] | 91 | 2015-03-12T13:31:36.000Z | 2022-01-14T07:37:37.000Z | python/crossref_prefix.py | sma-h/openapc-de | 0ec2d42d525219d801f71538f5b30ca6fecd9d3a | [
"Cube"
] | 138 | 2015-03-04T15:23:43.000Z | 2022-03-09T15:11:52.000Z | #!/usr/bin/env python3
# -*- coding: UTF-8 -*-
import argparse
import csv
import os
from urllib.request import urlopen, Request
from urllib.error import HTTPError, URLError
import xml.etree.ElementTree as ET
import openapc_toolkit as oat
def get_prefix(doi):
url = 'http://data.crossref.org/' + doi
req = Requ... | 31.8 | 122 | 0.635792 |
81912187703995cb49b326d91df0a6435766b901 | 470 | py | Python | stock_tushare/com/aaron/app.py | qsunny/python | ace8c3178a9a9619de2b60ca242c2079dd2f825e | [
"MIT"
] | null | null | null | stock_tushare/com/aaron/app.py | qsunny/python | ace8c3178a9a9619de2b60ca242c2079dd2f825e | [
"MIT"
] | 2 | 2021-03-25T22:00:07.000Z | 2022-01-20T15:51:48.000Z | stock_tushare/com/aaron/app.py | qsunny/python | ace8c3178a9a9619de2b60ca242c2079dd2f825e | [
"MIT"
] | null | null | null | import tushare as ts
token = '19c3a898e510a566d1bed1df579407af9bdf9bf0c3255f1eac99c05b';
if __name__ == "__main__":
print(ts.__version__)
ts.set_token(token)
pro = ts.pro_api()
# df = pro.trade_cal(exchange='', start_date='20200701', end_date='20200723',
# fields='exchange,cal... | 31.333333 | 92 | 0.678723 |
c48cda6a9ab75b8816320908941c4bac1a51d758 | 6,437 | py | Python | Praxisseminar/hmi.py | EnjoyFitness92/Praxisseminar-SS2020 | b5baba5d1512a5fad3391efc42f3ab232d79c4e2 | [
"MIT"
] | null | null | null | Praxisseminar/hmi.py | EnjoyFitness92/Praxisseminar-SS2020 | b5baba5d1512a5fad3391efc42f3ab232d79c4e2 | [
"MIT"
] | 2 | 2020-06-24T13:01:22.000Z | 2020-06-24T13:10:07.000Z | Praxisseminar/hmi.py | EnjoyFitness92/Praxisseminar-SS2020 | b5baba5d1512a5fad3391efc42f3ab232d79c4e2 | [
"MIT"
] | null | null | null | """
IN BEARBEITUNG
Zuletzt 06.07. : Hinzufuegen von HMI Protokolldaten
Praxisseminar hmi.py
"""
from minicps.devices import HMI
from utils import Praxisseminar_test_logger
from utils import STATE, PLC1_ADDR
from utils import HMI_PROTOCOL, HMI_DATA, HMI_ADDR
import time
MOTOR = ('MOTOR', 1)
SENSOR = ('SENSOR', 1... | 42.629139 | 157 | 0.57822 |
6ffef31ee2bd6fb24ea4b186bbdce561fbfde897 | 3,262 | py | Python | research/gnn/dgcn/src/dgcn.py | leelige/mindspore | 5199e05ba3888963473f2b07da3f7bca5b9ef6dc | [
"Apache-2.0"
] | 77 | 2021-10-15T08:32:37.000Z | 2022-03-30T13:09:11.000Z | research/gnn/dgcn/src/dgcn.py | leelige/mindspore | 5199e05ba3888963473f2b07da3f7bca5b9ef6dc | [
"Apache-2.0"
] | 3 | 2021-10-30T14:44:57.000Z | 2022-02-14T06:57:57.000Z | research/gnn/dgcn/src/dgcn.py | leelige/mindspore | 5199e05ba3888963473f2b07da3f7bca5b9ef6dc | [
"Apache-2.0"
] | 24 | 2021-10-15T08:32:45.000Z | 2022-03-24T18:45:20.000Z | # Copyright 2021 Huawei Technologies Co., Ltd
#
# 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... | 37.494253 | 103 | 0.634273 |
73ca152e00ed8e1d2f0d4030182a44e93bce502f | 588 | py | Python | examples/basic/session.py | j-helland/warp | 2a71346f0ec4d4e6fd45ed3b5e972b683724287c | [
"Unlicense"
] | null | null | null | examples/basic/session.py | j-helland/warp | 2a71346f0ec4d4e6fd45ed3b5e972b683724287c | [
"Unlicense"
] | null | null | null | examples/basic/session.py | j-helland/warp | 2a71346f0ec4d4e6fd45ed3b5e972b683724287c | [
"Unlicense"
] | null | null | null | from warp import Graph, Workspace
from warp.globals import register_graph
from warp.constants import WARP_LOGO
from warp import log
from example import A, B, C, D
@register_graph('build-graph-example')
def build_graph() -> Graph:
return Graph() @ A + B + C + D
### Header
print(WARP_LOGO)
### Info
ws = Wor... | 25.565217 | 107 | 0.717687 |
fb943851be8a90d70d11431fe85dba6b4110fcac | 392 | py | Python | backend/apps/ineedstudent/migrations/0002_hospital_max_mails_per_day.py | n-hackert/match4healthcare | 761248c27b49e568c545c643a72eac9a040649d7 | [
"MIT"
] | 2 | 2020-03-28T13:56:39.000Z | 2020-03-29T10:16:12.000Z | backend/apps/ineedstudent/migrations/0002_hospital_max_mails_per_day.py | n-hackert/match4healthcare | 761248c27b49e568c545c643a72eac9a040649d7 | [
"MIT"
] | 76 | 2020-03-27T21:53:04.000Z | 2020-03-30T20:27:43.000Z | backend/apps/ineedstudent/migrations/0002_hospital_max_mails_per_day.py | n-hackert/match4healthcare | 761248c27b49e568c545c643a72eac9a040649d7 | [
"MIT"
] | null | null | null | # Generated by Django 3.0.4 on 2020-03-29 20:23
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('ineedstudent', '0001_initial'),
]
operations = [
migrations.AddField(
model_name='hospital',
name='max_mails_per_day... | 20.631579 | 51 | 0.604592 |
5439d4d85434223c03b87f557e495f96b59f51db | 12,273 | py | Python | item_recommender.py | xrb92/R3S | bc39fd90bb3f3cec195d69bebce61e7cd91243df | [
"Apache-2.0"
] | 1 | 2022-02-17T12:28:38.000Z | 2022-02-17T12:28:38.000Z | item_recommender.py | xrb92/R3S | bc39fd90bb3f3cec195d69bebce61e7cd91243df | [
"Apache-2.0"
] | null | null | null | item_recommender.py | xrb92/R3S | bc39fd90bb3f3cec195d69bebce61e7cd91243df | [
"Apache-2.0"
] | null | null | null | '''
Item Recommender
April 2021
modric10zhang@gmail.com
'''
import os
import sys
import math
import datetime
import numpy as np
import tensorflow as tf
from layer_util import *
from data_reader import DataReader
from hyper_param import param_dict as pd
os.environ['TF_CPP_MIN_LOG_LEVEL'] = '3'
tf.compat.v1.disable_e... | 48.896414 | 142 | 0.547869 |
b7f00dce471a6f794f56174339f75e9015bea098 | 29,523 | py | Python | python/en/archive/dropbox/ec2-oregon/make_tfrecord.py | aimldl/coding | 70ddbfaa454ab92fd072ee8dc614ecc330b34a70 | [
"MIT"
] | null | null | null | python/en/archive/dropbox/ec2-oregon/make_tfrecord.py | aimldl/coding | 70ddbfaa454ab92fd072ee8dc614ecc330b34a70 | [
"MIT"
] | null | null | null | python/en/archive/dropbox/ec2-oregon/make_tfrecord.py | aimldl/coding | 70ddbfaa454ab92fd072ee8dc614ecc330b34a70 | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
make_tfrecord.py
"""
import os
import sys
import numpy as np
import tensorflow as tf
import resampy
import pickle
import librosa
import datetime
from scipy.io import wavfile
from python_speech_features import mfcc
LANGUAGE_LABELS = {'english':0, 'k... | 35.356886 | 198 | 0.644481 |
4d06499f67927b33b3dce5134bef5307a00b5961 | 2,725 | py | Python | main.py | ACBob/pronouns | 1b5d4c171448c0f5ea55bd6d507b06b897178fc5 | [
"WTFPL",
"MIT"
] | 2 | 2021-09-06T19:22:27.000Z | 2021-11-14T20:02:59.000Z | main.py | ACBob/pronouns | 1b5d4c171448c0f5ea55bd6d507b06b897178fc5 | [
"WTFPL",
"MIT"
] | null | null | null | main.py | ACBob/pronouns | 1b5d4c171448c0f5ea55bd6d507b06b897178fc5 | [
"WTFPL",
"MIT"
] | null | null | null | # mypronoun.is clone, that lets you define custom terms
# Because a closed-off request database isn't very helpful for self-expression
import web
from web.contrib.template import render_jinja
from scss import compiler
urls = (
'/(.*)\.css', 'stylesheet', # Preprocesses the stylesheet with sass
'/(.*)\.svg', 'svg', ... | 25.707547 | 181 | 0.640367 |
4d3391e6671e9315173e5de530b420b07417d6bc | 4,178 | py | Python | checks/html_head.py | thegreenwebfoundation/green-spider | 68f22886178bbe5b476a4591a6812ee25cb5651b | [
"Apache-2.0"
] | 19 | 2018-04-20T11:03:41.000Z | 2022-01-12T20:58:56.000Z | checks/html_head.py | thegreenwebfoundation/green-spider | 68f22886178bbe5b476a4591a6812ee25cb5651b | [
"Apache-2.0"
] | 160 | 2018-04-05T16:12:59.000Z | 2022-03-01T13:01:27.000Z | checks/html_head.py | thegreenwebfoundation/green-spider | 68f22886178bbe5b476a4591a6812ee25cb5651b | [
"Apache-2.0"
] | 8 | 2018-11-05T13:07:57.000Z | 2021-06-11T11:46:43.000Z | """
Extracts information from the html <head>, like existence and value
of certain meta tags, link tags, title, etc.
"""
import logging
import re
from urllib.parse import urljoin
from urllib.parse import urlparse
from bs4 import BeautifulSoup
from checks.abstract_checker import AbstractChecker
class Checker(Abstrac... | 27.30719 | 81 | 0.561034 |
150b1f4b3826c879ab58eb71c304de9f4aaca2b7 | 10,516 | py | Python | tensorforce/agents/dqfd_agent.py | gian1312/suchen | df863140fd8df1ac2e195cbdfa4756f09f962270 | [
"Apache-2.0"
] | null | null | null | tensorforce/agents/dqfd_agent.py | gian1312/suchen | df863140fd8df1ac2e195cbdfa4756f09f962270 | [
"Apache-2.0"
] | null | null | null | tensorforce/agents/dqfd_agent.py | gian1312/suchen | df863140fd8df1ac2e195cbdfa4756f09f962270 | [
"Apache-2.0"
] | 1 | 2019-11-29T12:28:33.000Z | 2019-11-29T12:28:33.000Z | # Copyright 2017 reinforce.io. 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... | 39.385768 | 113 | 0.600323 |
429406f4f27b81748c79467b7d59db0cc518a219 | 100 | py | Python | ggit_platform/apps.py | girlsgoit/GirlsGoIT | 447cd15c44ebee4af9e942a079d681be8683239f | [
"MIT"
] | 1 | 2019-02-27T21:20:54.000Z | 2019-02-27T21:20:54.000Z | ggit_platform/apps.py | girlsgoit/GirlsGoIT | 447cd15c44ebee4af9e942a079d681be8683239f | [
"MIT"
] | null | null | null | ggit_platform/apps.py | girlsgoit/GirlsGoIT | 447cd15c44ebee4af9e942a079d681be8683239f | [
"MIT"
] | null | null | null | from django.apps import AppConfig
class GgitPlatformConfig(AppConfig):
name = 'ggit_platform'
| 16.666667 | 36 | 0.78 |
c009520bc5df6124e77038a16f913e637f6ad1b7 | 2,707 | py | Python | scrape.py | digitalegarage/commerzbank-scraper | 818c759ed0f62cf35aaebc38ad769ffb415c2cd5 | [
"MIT"
] | null | null | null | scrape.py | digitalegarage/commerzbank-scraper | 818c759ed0f62cf35aaebc38ad769ffb415c2cd5 | [
"MIT"
] | null | null | null | scrape.py | digitalegarage/commerzbank-scraper | 818c759ed0f62cf35aaebc38ad769ffb415c2cd5 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
from mechanize import Browser
from bs4 import BeautifulSoup as BS
from datetime import datetime
import re
import os
import csv
import config
###############
### SCRAPER ###
###############
def get_documents (s = config.suchbegriff, b = config.bereich, l = config.language, sd = config.start_da... | 29.107527 | 223 | 0.72331 |
3f26cba2b70b69db1956b9a560ae419b2b208567 | 637 | py | Python | examples/message_received_poll_example.py | Hofei90/telegram_api | 8e910e15d7147db4b3828fa6fd1cfe2f5d33c077 | [
"MIT"
] | null | null | null | examples/message_received_poll_example.py | Hofei90/telegram_api | 8e910e15d7147db4b3828fa6fd1cfe2f5d33c077 | [
"MIT"
] | 4 | 2019-04-24T12:56:34.000Z | 2020-06-25T20:16:56.000Z | examples/message_received_poll_example.py | Hofei90/telegram_api | 8e910e15d7147db4b3828fa6fd1cfe2f5d33c077 | [
"MIT"
] | null | null | null | import os
import toml
import telegram_bot_api as api
def config_laden():
configfile = os.path.join(SKRIPTPFAD, "example_cfg.toml")
with open(configfile) as file:
return toml.loads(file.read())
SKRIPTPFAD = os.path.abspath(os.path.dirname(__file__))
CONFIG = config_laden()
def main():
bot = a... | 21.233333 | 66 | 0.643642 |
58ad08132952b852962f0a0d52edc84c273d70ab | 3,993 | py | Python | group_sentences.py | NickForero11/Subbler | ed528514e96ddc30d58230ff98ff0fd5216ea5de | [
"MIT"
] | null | null | null | group_sentences.py | NickForero11/Subbler | ed528514e96ddc30d58230ff98ff0fd5216ea5de | [
"MIT"
] | null | null | null | group_sentences.py | NickForero11/Subbler | ed528514e96ddc30d58230ff98ff0fd5216ea5de | [
"MIT"
] | null | null | null | """Module to handle the creation of subtitles based on AWS Transcribe
processed data.
"""
from sys import exit
def chunk_array(array, size):
"""Create a list of sublists of a specific size based on another list.
Please take in account that if the size is not an exact divisor of the
original list length, ... | 30.953488 | 79 | 0.454295 |
45219ec6399dff04b10b1dd7070b81ecf6216806 | 22,271 | py | Python | Packs/VMwareWorkspaceONEUEM/Integrations/VMwareWorkspaceONEUEM/VMwareWorkspaceONEUEM.py | diCagri/content | c532c50b213e6dddb8ae6a378d6d09198e08fc9f | [
"MIT"
] | 799 | 2016-08-02T06:43:14.000Z | 2022-03-31T11:10:11.000Z | Packs/VMwareWorkspaceONEUEM/Integrations/VMwareWorkspaceONEUEM/VMwareWorkspaceONEUEM.py | diCagri/content | c532c50b213e6dddb8ae6a378d6d09198e08fc9f | [
"MIT"
] | 9,317 | 2016-08-07T19:00:51.000Z | 2022-03-31T21:56:04.000Z | Packs/VMwareWorkspaceONEUEM/Integrations/VMwareWorkspaceONEUEM/VMwareWorkspaceONEUEM.py | diCagri/content | c532c50b213e6dddb8ae6a378d6d09198e08fc9f | [
"MIT"
] | 1,297 | 2016-08-04T13:59:00.000Z | 2022-03-31T23:43:06.000Z | import demistomock as demisto
from CommonServerPython import * # noqa # pylint: disable=unused-wildcard-import
from CommonServerUserPython import * # noqa
import requests
import traceback
from typing import Dict, Tuple, List, Any, Optional
# Disable insecure warnings
# requests.packages.urllib3.disable_warnings() ... | 37.180301 | 118 | 0.654932 |
4521a736d606c08fd30161ae6f150ff1deee4a2a | 270 | py | Python | 9.3.py | RonaldZhao/NowCoder | 935af39835a98efc14157e20df1e3458e02b9803 | [
"MIT"
] | null | null | null | 9.3.py | RonaldZhao/NowCoder | 935af39835a98efc14157e20df1e3458e02b9803 | [
"MIT"
] | null | null | null | 9.3.py | RonaldZhao/NowCoder | 935af39835a98efc14157e20df1e3458e02b9803 | [
"MIT"
] | null | null | null | class StandInLine:
def getWays(self, n, a, b):
if n <= 1:
return [0, 0]
a1, a2 = 1, 1
if n > 2:
for i in range(1, n + 1):
a1 *= i
a1 /= 2
a2 = a1 * 2 / n
return [a1, a2]
| 22.5 | 37 | 0.337037 |
18e559d014db29138b4a757f61fd1f6fd6722f0e | 5,818 | py | Python | research/cv/Auto-DeepLab/postprocess.py | leelige/mindspore | 5199e05ba3888963473f2b07da3f7bca5b9ef6dc | [
"Apache-2.0"
] | 77 | 2021-10-15T08:32:37.000Z | 2022-03-30T13:09:11.000Z | research/cv/Auto-DeepLab/postprocess.py | leelige/mindspore | 5199e05ba3888963473f2b07da3f7bca5b9ef6dc | [
"Apache-2.0"
] | 3 | 2021-10-30T14:44:57.000Z | 2022-02-14T06:57:57.000Z | research/cv/Auto-DeepLab/postprocess.py | leelige/mindspore | 5199e05ba3888963473f2b07da3f7bca5b9ef6dc | [
"Apache-2.0"
] | 24 | 2021-10-15T08:32:45.000Z | 2022-03-24T18:45:20.000Z | # Copyright 2021 Huawei Technologies Co., Ltd
#
# 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 a... | 42.15942 | 118 | 0.588175 |
7a073bef29cb1ccbf97f4c94c853d1f67572392e | 3,247 | py | Python | TeleGram-Scraper-master/smsbot.py | Zusyaku/Termux-And-Lali-Linux-V2 | b1a1b0841d22d4bf2cc7932b72716d55f070871e | [
"Apache-2.0"
] | 2 | 2021-11-17T03:35:03.000Z | 2021-12-08T06:00:31.000Z | TeleGram-Scraper-master/smsbot.py | Zusyaku/Termux-And-Lali-Linux-V2 | b1a1b0841d22d4bf2cc7932b72716d55f070871e | [
"Apache-2.0"
] | null | null | null | TeleGram-Scraper-master/smsbot.py | Zusyaku/Termux-And-Lali-Linux-V2 | b1a1b0841d22d4bf2cc7932b72716d55f070871e | [
"Apache-2.0"
] | 2 | 2021-11-05T18:07:48.000Z | 2022-02-24T21:25:07.000Z | #!/bin/env python3
from telethon.sync import TelegramClient
from telethon.tl.types import InputPeerUser
from telethon.errors.rpcerrorlist import PeerFloodError
import configparser
import os, sys
import csv
import random
import time
re="\033[1;31m"
gr="\033[1;32m"
cy="\033[1;36m"
SLEEP_TIME = 30
class main():
def... | 32.47 | 136 | 0.483523 |
833476dc810de79fadb03a8f9dfae5f6eae658e1 | 1,256 | py | Python | exercises/es/exc_03_12.py | Jette16/spacy-course | 32df0c8f6192de6c9daba89740a28c0537e4d6a0 | [
"MIT"
] | 2,085 | 2019-04-17T13:10:40.000Z | 2022-03-30T21:51:46.000Z | exercises/es/exc_03_12.py | Jette16/spacy-course | 32df0c8f6192de6c9daba89740a28c0537e4d6a0 | [
"MIT"
] | 79 | 2019-04-18T14:42:55.000Z | 2022-03-07T08:15:43.000Z | exercises/es/exc_03_12.py | Jette16/spacy-course | 32df0c8f6192de6c9daba89740a28c0537e4d6a0 | [
"MIT"
] | 361 | 2019-04-17T13:34:32.000Z | 2022-03-28T04:42:45.000Z | import json
from spacy.lang.es import Spanish
from spacy.tokens import Span
from spacy.matcher import PhraseMatcher
with open("exercises/es/countries.json", encoding="utf8") as f:
COUNTRIES = json.loads(f.read())
with open("exercises/es/capitals.json", encoding="utf8") as f:
CAPITALS = json.loads(f.read())
n... | 29.209302 | 87 | 0.730892 |
369361e8d9c9c019690280f0b36bcfd3b0fe8096 | 1,268 | py | Python | python/fork.py | immortal/sandbox | 761645c11399b15f624104accdf39688faf96a04 | [
"BSD-3-Clause"
] | null | null | null | python/fork.py | immortal/sandbox | 761645c11399b15f624104accdf39688faf96a04 | [
"BSD-3-Clause"
] | 1 | 2020-06-25T03:59:50.000Z | 2020-06-25T03:59:50.000Z | python/fork.py | immortal/sandbox | 761645c11399b15f624104accdf39688faf96a04 | [
"BSD-3-Clause"
] | null | null | null | #!/usr/bin/env python
import os
import sys
def main():
""" A demo daemon main routine, write a datestamp to
/tmp/daemon-log every 10 seconds.
"""
import time
f = open("/tmp/daemon-log", "w")
while 1:
f.write('%s\n' % time.ctime(time.time()))
f.flush()
time.sleep(10)... | 25.36 | 77 | 0.544953 |
7fea5d689efce097a541b6dfb58072f4b35ca691 | 327 | py | Python | 1_Datentypen/03_tuples/_01_unpack_and_move_in.py | DavidStahl97/Python-Grundkurs | 6796d19116d2f838b193b106d00bc2e74a8cdcb4 | [
"MIT"
] | null | null | null | 1_Datentypen/03_tuples/_01_unpack_and_move_in.py | DavidStahl97/Python-Grundkurs | 6796d19116d2f838b193b106d00bc2e74a8cdcb4 | [
"MIT"
] | null | null | null | 1_Datentypen/03_tuples/_01_unpack_and_move_in.py | DavidStahl97/Python-Grundkurs | 6796d19116d2f838b193b106d00bc2e74a8cdcb4 | [
"MIT"
] | null | null | null | # tuples are defined as:
# create a tuple, grab a value.
# show them
# can also assign on a single line:
# Konkretes Beispiel mit Datum
# You'll find this often in loops (remember numerical for-in loops):
# Immutabel heißt nicht zwingend unveränderlich
## Verweis auf eine Liste (diese lässt sich intern ä... | 13.625 | 68 | 0.724771 |
43fda1474c164b8c211acc5573e242ad8ee11c88 | 33,499 | py | Python | FuncionesSQL.py | Miguel-331/Proyecto-SUN | 104afd03e05616a297fbda976d377f49a1f905ec | [
"Unlicense"
] | null | null | null | FuncionesSQL.py | Miguel-331/Proyecto-SUN | 104afd03e05616a297fbda976d377f49a1f905ec | [
"Unlicense"
] | null | null | null | FuncionesSQL.py | Miguel-331/Proyecto-SUN | 104afd03e05616a297fbda976d377f49a1f905ec | [
"Unlicense"
] | null | null | null | import Graficador as graficar
import os
import FuncionesGraficas as graficos
# En esta funcion se añande los estdiantes a la base de datos
def AñadirEstudiante(lector,database):
graficar.Simple()
while True:
try:
a = input("Digite el nombre del nuevo estudiante: ")
b = input("Dig... | 39.318075 | 156 | 0.488253 |
b819e906573d2d2a62c515e19022b5d99c4d0576 | 6,698 | py | Python | jburt/stats.py | jbburt/jburt | 7745491214ef2b665ca8d1fc526bc802a36985ff | [
"MIT"
] | null | null | null | jburt/stats.py | jbburt/jburt | 7745491214ef2b665ca8d1fc526bc802a36985ff | [
"MIT"
] | null | null | null | jburt/stats.py | jbburt/jburt | 7745491214ef2b665ca8d1fc526bc802a36985ff | [
"MIT"
] | null | null | null | from typing import Collection
from typing import Tuple
import numpy as np
from scipy import special as special
from scipy.stats import pearsonr
from scipy.stats import rankdata
from jburt.mask import mask_nan
def nonparp(stat: float, null_dist: Collection) -> float:
"""
Compute two-sided non-parametric p-va... | 21.888889 | 80 | 0.556285 |
c57173826fa48d31e78f1fb9f148774bcb2fdfc2 | 269 | py | Python | web/web-lemonthinker/solve.py | NoXLaw/RaRCTF2021-Challenges-Public | 1a1b094359b88f8ebbc83a6b26d27ffb2602458f | [
"MIT"
] | 2 | 2021-08-09T17:08:12.000Z | 2021-08-09T17:08:17.000Z | web/web-lemonthinker/solve.py | NoXLaw/RaRCTF2021-Challenges-Public | 1a1b094359b88f8ebbc83a6b26d27ffb2602458f | [
"MIT"
] | null | null | null | web/web-lemonthinker/solve.py | NoXLaw/RaRCTF2021-Challenges-Public | 1a1b094359b88f8ebbc83a6b26d27ffb2602458f | [
"MIT"
] | 1 | 2021-10-09T16:51:56.000Z | 2021-10-09T16:51:56.000Z | import requests
import sys
import random
url = sys.argv[1]
filename = str(random.randrange(1000))
requests.post(url+"generate", {"text":f"$(echo \"$(cat /flag.txt)\" > /app/static/images/{filename})"})
r = requests.get(url + "static/images/" + filename)
print(r.text)
| 26.9 | 103 | 0.69145 |
3dc90459e1406bb5c14b2c1036225c9acf9f53f7 | 4,896 | py | Python | Apps/Model Evaluation/ner_pipeline.py | RGreinacher/bachelor-thesis | 60dbc03ce40e3ec42f2538d67a6aabfea6fbbfc8 | [
"MIT"
] | 1 | 2021-04-13T10:00:46.000Z | 2021-04-13T10:00:46.000Z | Apps/Model Evaluation/ner_pipeline.py | RGreinacher/bachelor-thesis | 60dbc03ce40e3ec42f2538d67a6aabfea6fbbfc8 | [
"MIT"
] | null | null | null | Apps/Model Evaluation/ner_pipeline.py | RGreinacher/bachelor-thesis | 60dbc03ce40e3ec42f2538d67a6aabfea6fbbfc8 | [
"MIT"
] | null | null | null | #!/usr/local/bin/python3.5
# -*- coding: utf-8 -*-
# import python libs
import nltk
import pickle
import json
from nltk import Tree
from pprint import pprint as pp
from nltk.chunk.api import ChunkParserI
from os import listdir
from os.path import isfile, join
# import project libs
# import nltk_tree_converter
impor... | 27.977143 | 108 | 0.644199 |
9a71cd07405dfc222cb51425aa64f01e5cd69105 | 7,430 | py | Python | official/cv/shufflenetv2/src/shufflenetv2.py | leelige/mindspore | 5199e05ba3888963473f2b07da3f7bca5b9ef6dc | [
"Apache-2.0"
] | 77 | 2021-10-15T08:32:37.000Z | 2022-03-30T13:09:11.000Z | official/cv/shufflenetv2/src/shufflenetv2.py | leelige/mindspore | 5199e05ba3888963473f2b07da3f7bca5b9ef6dc | [
"Apache-2.0"
] | 3 | 2021-10-30T14:44:57.000Z | 2022-02-14T06:57:57.000Z | official/cv/shufflenetv2/src/shufflenetv2.py | leelige/mindspore | 5199e05ba3888963473f2b07da3f7bca5b9ef6dc | [
"Apache-2.0"
] | 24 | 2021-10-15T08:32:45.000Z | 2022-03-24T18:45:20.000Z | # Copyright 2020-2021 Huawei Technologies Co., Ltd
#
# 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 agre... | 41.977401 | 115 | 0.564872 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.