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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
88e9d328644e325f4eaa6dec6e5e98b86439cbcf | 1,806 | py | Python | Mscan/md5sum.py | Unam3dd/Train-2018-2020 | afb6ae70fe338cbe55a21b74648d91996b818fa2 | [
"MIT"
] | 4 | 2021-04-23T15:39:17.000Z | 2021-12-27T22:53:24.000Z | Mscan/md5sum.py | Unam3dd/Train-2018-2020 | afb6ae70fe338cbe55a21b74648d91996b818fa2 | [
"MIT"
] | null | null | null | Mscan/md5sum.py | Unam3dd/Train-2018-2020 | afb6ae70fe338cbe55a21b74648d91996b818fa2 | [
"MIT"
] | 2 | 2021-04-19T08:28:54.000Z | 2022-01-19T13:23:29.000Z | #!/usr/bin/python3
#-*- coding:utf-8 -*-
import hashlib
import sys
import os
def python_version():
if sys.version[0] =="2":
sys.exit("[!] Please Use Python 3.x")
def md5sum(filename):
f=open(filename,"r",encoding="cp437")
content = f.read()
f.close()
h = hashlib.md5()
h.update(conten... | 27.363636 | 66 | 0.487818 |
88fd7f792160e6eca9b50d6e9b01e551ad5db6af | 579 | py | Python | MidnightSun/2021/Quals/pwn/Shapes/communicate.py | mystickev/ctf-archives | 89e99a5cd5fb6b2923cad3fe1948d3ff78649b4e | [
"MIT"
] | 1 | 2021-11-02T20:53:58.000Z | 2021-11-02T20:53:58.000Z | MidnightSun/2021/Quals/pwn/Shapes/communicate.py | ruhan-islam/ctf-archives | 8c2bf6a608c821314d1a1cfaa05a6cccef8e3103 | [
"MIT"
] | null | null | null | MidnightSun/2021/Quals/pwn/Shapes/communicate.py | ruhan-islam/ctf-archives | 8c2bf6a608c821314d1a1cfaa05a6cccef8e3103 | [
"MIT"
] | 1 | 2021-12-19T11:06:24.000Z | 2021-12-19T11:06:24.000Z |
import socket
import sys
import time
import struct
def SendCommand(cmd):
global sock
asBytes = cmd.encode()
sock.send(len(asBytes).to_bytes(1,"big")+asBytes)
got = sock.recv(1000).decode()
return got
sock = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
server_address = ('127.0.0.1', 1111)
sock.connec... | 16.542857 | 56 | 0.699482 |
cc8bbc03f406318588675b1105a027b788572f87 | 261 | py | Python | chemist/chemist/spiders/priceline_spider.py | ChineseGardenCat/chemist_crawler | 28fdf1e93c38cddc5f8b16e7098a60e2a51b1a7a | [
"MIT"
] | null | null | null | chemist/chemist/spiders/priceline_spider.py | ChineseGardenCat/chemist_crawler | 28fdf1e93c38cddc5f8b16e7098a60e2a51b1a7a | [
"MIT"
] | null | null | null | chemist/chemist/spiders/priceline_spider.py | ChineseGardenCat/chemist_crawler | 28fdf1e93c38cddc5f8b16e7098a60e2a51b1a7a | [
"MIT"
] | null | null | null | import scrapy
from bs4 import BeautifulSoup
from ..items import ChemistItem
import re
class priceline_spider(scrapy.Spider):
name = 'priceline_spider'
start_urls = [
'https://www.priceline.com.au/brand/'
]
def parse(self, response):
| 17.4 | 45 | 0.697318 |
aee81c40d9419dff13bbcbdedca9c73b216acdb6 | 562 | py | Python | src/python/BI/SklearnDL.py | coulsonzero/webProject | 46ba2456620496f376ed954a6469381b8142e0f6 | [
"MIT"
] | null | null | null | src/python/BI/SklearnDL.py | coulsonzero/webProject | 46ba2456620496f376ed954a6469381b8142e0f6 | [
"MIT"
] | null | null | null | src/python/BI/SklearnDL.py | coulsonzero/webProject | 46ba2456620496f376ed954a6469381b8142e0f6 | [
"MIT"
] | null | null | null | import pandas as pd
from sklearn.linear_model import LogisticRegression
from sklearn.datasets import load_breast_cancer
cancer_data = load_breast_cancer()
df = pd.DataFrame(cancer_data['data'], columns=cancer_data['feature_names'])
df['target'] = cancer_data['target']
X = df[cancer_data.feature_names].values
Y = df['... | 29.578947 | 86 | 0.697509 |
4e0b8a9362443256cf3fb360ad00baca29d6a35c | 180 | py | Python | Contests/CCC/CCC '11 J1 - Which Alien.py | MastaCoder/Projects | ebb0a3134522b12f052fec8d753005f384adf1b1 | [
"MIT"
] | 5 | 2018-10-11T01:55:40.000Z | 2021-12-25T23:38:22.000Z | Contests/CCC/CCC '11 J1 - Which Alien.py | MastaCoder/mini_projects | ebb0a3134522b12f052fec8d753005f384adf1b1 | [
"MIT"
] | null | null | null | Contests/CCC/CCC '11 J1 - Which Alien.py | MastaCoder/mini_projects | ebb0a3134522b12f052fec8d753005f384adf1b1 | [
"MIT"
] | 1 | 2019-02-22T14:42:50.000Z | 2019-02-22T14:42:50.000Z | a = int(input())
e = int(input())
if a >= 3 and e <= 4:
print("TroyMartian")
if a <= 6 and e >= 2:
print("VladSaturnian")
if a <= 2 and e <= 3:
print("GraemeMercurian") | 22.5 | 28 | 0.55 |
9d6a4d4f7b71dabc1d2d55e326e79f6b3b26f4e5 | 2,363 | py | Python | 20-hs-redez-sem/groups/02-unionDir/filesystem-redez-client/utils/color.py | Kyrus1999/BACnet | 5be8e1377252166041bcd0b066cce5b92b077d06 | [
"MIT"
] | 8 | 2020-03-17T21:12:18.000Z | 2021-12-12T15:55:54.000Z | 20-hs-redez-sem/groups/02-unionDir/filesystem-redez-client/utils/color.py | Kyrus1999/BACnet | 5be8e1377252166041bcd0b066cce5b92b077d06 | [
"MIT"
] | 2 | 2021-07-19T06:18:43.000Z | 2022-02-10T12:17:58.000Z | 20-hs-redez-sem/groups/02-unionDir/filesystem-redez-client/utils/color.py | Kyrus1999/BACnet | 5be8e1377252166041bcd0b066cce5b92b077d06 | [
"MIT"
] | 25 | 2020-03-20T09:32:45.000Z | 2021-07-18T18:12:59.000Z | #--- ANSI Escape sequences - VT100 / VT52 ---
'''
USE:
color.[some_color](some_string)
Description:
these functions suround a given string in ANSI Escape sequences for them to be printed out in the given color (=method name)
'''
def green(string):
return ('\033[92m' + string + '\033[0m')
def greenDark(string):
retur... | 29.17284 | 139 | 0.59543 |
889048268c24b2c39ea98c84fa0a691919cdc5e4 | 10,078 | py | Python | tests/api/test_user.py | DanielGrams/cityservice | c487c34b5ba6541dcb441fe903ab2012c2256893 | [
"MIT"
] | null | null | null | tests/api/test_user.py | DanielGrams/cityservice | c487c34b5ba6541dcb441fe903ab2012c2256893 | [
"MIT"
] | 35 | 2022-01-24T22:15:59.000Z | 2022-03-31T15:01:35.000Z | tests/api/test_user.py | DanielGrams/cityservice | c487c34b5ba6541dcb441fe903ab2012c2256893 | [
"MIT"
] | null | null | null | from tests.seeder import Seeder
from tests.utils import UtilActions
def test_read(client, seeder: Seeder, utils: UtilActions):
seeder.setup_api_access()
url = utils.get_url("api_user")
response = utils.get_json(url)
user = response.json
assert user["email"] == "test@test.de"
def test_recycling... | 32.614887 | 87 | 0.709863 |
ee8c33d12dc123afc02cbe26d71ee29b5c37ddbe | 2,367 | py | Python | packages/watchmen-model/test/watchmen_model_test/data_model.py | Indexical-Metrics-Measure-Advisory/watchmen | c54ec54d9f91034a38e51fd339ba66453d2c7a6d | [
"MIT"
] | null | null | null | packages/watchmen-model/test/watchmen_model_test/data_model.py | Indexical-Metrics-Measure-Advisory/watchmen | c54ec54d9f91034a38e51fd339ba66453d2c7a6d | [
"MIT"
] | null | null | null | packages/watchmen-model/test/watchmen_model_test/data_model.py | Indexical-Metrics-Measure-Advisory/watchmen | c54ec54d9f91034a38e51fd339ba66453d2c7a6d | [
"MIT"
] | null | null | null | from datetime import datetime
from unittest import TestCase
from watchmen_model.admin import WriteTopicActionType
from watchmen_model.admin.pipeline_action_write import InsertOrMergeRowAction, MappingFactor
from watchmen_model.common import ComputedParameter, ConstantParameter, DataModel, ParameterComputeType, \
Para... | 31.144737 | 106 | 0.695817 |
c98db94e5d14639008d1bbacefe083f6a91f3792 | 726 | py | Python | project/api/dump/resources.py | DanielGrams/gsevp | e94034f7b64de76f38754b56455e83092378261f | [
"MIT"
] | 1 | 2021-06-01T14:49:18.000Z | 2021-06-01T14:49:18.000Z | project/api/dump/resources.py | DanielGrams/gsevp | e94034f7b64de76f38754b56455e83092378261f | [
"MIT"
] | 286 | 2020-12-04T14:13:00.000Z | 2022-03-09T19:05:16.000Z | project/api/dump/resources.py | DanielGrams/gsevpt | a92f71694388e227e65ed1b24446246ee688d00e | [
"MIT"
] | null | null | null | from flask_apispec import doc, marshal_with
from project.api import add_api_resource
from project.api.dump.schemas import DumpResponseSchema
from project.api.resources import BaseResource
from project.api.schemas import NoneSchema
class DumpResource(BaseResource):
@doc(
summary="Dump model definition",
... | 33 | 188 | 0.746556 |
09333a5316e99e2017e2801b9e3730d693044cf1 | 1,147 | py | Python | elements/python/11/2/soln.py | mmcloughlin/problems | 6095842ffe007a12ec8c2093850515aa4e046616 | [
"MIT"
] | 11 | 2019-02-08T06:54:34.000Z | 2021-08-07T18:57:39.000Z | elements/python/11/2/soln.py | mmcloughlin/problems | 6095842ffe007a12ec8c2093850515aa4e046616 | [
"MIT"
] | 1 | 2019-05-21T08:14:10.000Z | 2019-05-21T08:14:10.000Z | elements/python/11/2/soln.py | mmcloughlin/problems | 6095842ffe007a12ec8c2093850515aa4e046616 | [
"MIT"
] | null | null | null | import heapq
import random
def decompose(A):
"""
decompose A into a list of sorted lists that contain the same elements.
"""
if len(A) == 0:
return [[]]
acc = [A[0]]
lists = [acc]
order = -1
for a in A[1:]:
if cmp(acc[-1], a) != order:
if order == 1:
... | 18.5 | 75 | 0.510898 |
018ccbe6b3f3fb98a50091b6ced8dbf7053d487f | 245 | py | Python | keras_fcn/backend/tensorflow_backend.py | li657835991/FCN | 26bafeaf631a095d9d2befcc3b798a87c8d0fa7c | [
"MIT"
] | 235 | 2017-03-01T14:34:29.000Z | 2021-06-03T16:16:16.000Z | keras_fcn/backend/tensorflow_backend.py | li657835991/FCN | 26bafeaf631a095d9d2befcc3b798a87c8d0fa7c | [
"MIT"
] | 39 | 2017-03-25T01:20:25.000Z | 2020-10-30T11:51:47.000Z | keras_fcn/backend/tensorflow_backend.py | li657835991/FCN | 26bafeaf631a095d9d2befcc3b798a87c8d0fa7c | [
"MIT"
] | 105 | 2017-04-13T21:31:46.000Z | 2021-11-01T17:25:48.000Z | import numpy as np
import tensorflow as tf
import keras.backend as K
def resize_images(x, size, method='bilinear'):
new_size = tf.convert_to_tensor(size, dtype=tf.int32)
resized = tf.image.resize_images(x, new_size)
return resized
| 24.5 | 57 | 0.746939 |
097106ae9ac49bd4154bd4b338ff1742a72a7ff9 | 44 | py | Python | lib/python3.5/_collections_abc.py | hwroitzsch/BikersLifeSaver | 469c738fdd6352c44a3f20689b17fa8ac04ad8a2 | [
"MIT"
] | 1 | 2020-08-16T04:04:23.000Z | 2020-08-16T04:04:23.000Z | lib/python3.5/_collections_abc.py | hwroitzsch/BikersLifeSaver | 469c738fdd6352c44a3f20689b17fa8ac04ad8a2 | [
"MIT"
] | 5 | 2020-06-05T18:53:24.000Z | 2021-12-13T19:49:15.000Z | lib/python3.5/_collections_abc.py | hwroitzsch/BikersLifeSaver | 469c738fdd6352c44a3f20689b17fa8ac04ad8a2 | [
"MIT"
] | null | null | null | /usr/local/lib/python3.5/_collections_abc.py | 44 | 44 | 0.840909 |
28b2581b8e8386918bf47ef4fe7e82c031074f0f | 1,561 | py | Python | Packs/SSLVerifier/Scripts/SSLVerifier/SSLVerifier.py | diCagri/content | c532c50b213e6dddb8ae6a378d6d09198e08fc9f | [
"MIT"
] | 799 | 2016-08-02T06:43:14.000Z | 2022-03-31T11:10:11.000Z | Packs/SSLVerifier/Scripts/SSLVerifier/SSLVerifier.py | diCagri/content | c532c50b213e6dddb8ae6a378d6d09198e08fc9f | [
"MIT"
] | 9,317 | 2016-08-07T19:00:51.000Z | 2022-03-31T21:56:04.000Z | Packs/SSLVerifier/Scripts/SSLVerifier/SSLVerifier.py | diCagri/content | c532c50b213e6dddb8ae6a378d6d09198e08fc9f | [
"MIT"
] | 1,297 | 2016-08-04T13:59:00.000Z | 2022-03-31T23:43:06.000Z | import json
import socket
import ssl
from datetime import datetime
import demistomock as demisto # noqa: F401
from CommonServerPython import * # noqa: F401
def results_return(command: str, item: dict):
results = CommandResults(
outputs_prefix=f'SSLVerifier.{command}',
outputs_key_field='',
... | 30.607843 | 113 | 0.640615 |
c90faae859a8bf306c5829ecd9dfefc770b91a23 | 857 | py | Python | migrations/versions/ed6bb2084bbd_.py | DanielGrams/gsevp | e94034f7b64de76f38754b56455e83092378261f | [
"MIT"
] | 1 | 2021-06-01T14:49:18.000Z | 2021-06-01T14:49:18.000Z | migrations/versions/ed6bb2084bbd_.py | DanielGrams/gsevp | e94034f7b64de76f38754b56455e83092378261f | [
"MIT"
] | 286 | 2020-12-04T14:13:00.000Z | 2022-03-09T19:05:16.000Z | migrations/versions/ed6bb2084bbd_.py | DanielGrams/gsevpt | a92f71694388e227e65ed1b24446246ee688d00e | [
"MIT"
] | null | null | null | """empty message
Revision ID: ed6bb2084bbd
Revises: f1bc3fa623c7
Create Date: 2020-07-08 08:53:44.373606
"""
import sqlalchemy as sa
from alembic import op
# revision identifiers, used by Alembic.
revision = "ed6bb2084bbd"
down_revision = "f1bc3fa623c7"
branch_labels = None
depends_on = None
def upgrade():
# #... | 24.485714 | 84 | 0.674446 |
a3434ab38662ff66affa6aeda18ad51f446b9d40 | 151 | py | Python | src/onegov/file/sign/__init__.py | politbuero-kampagnen/onegov-cloud | 20148bf321b71f617b64376fe7249b2b9b9c4aa9 | [
"MIT"
] | null | null | null | src/onegov/file/sign/__init__.py | politbuero-kampagnen/onegov-cloud | 20148bf321b71f617b64376fe7249b2b9b9c4aa9 | [
"MIT"
] | null | null | null | src/onegov/file/sign/__init__.py | politbuero-kampagnen/onegov-cloud | 20148bf321b71f617b64376fe7249b2b9b9c4aa9 | [
"MIT"
] | null | null | null | from onegov.file.sign.generic import SigningService
from onegov.file.sign.swisscom_ais import SwisscomAIS
__all__ = ('SigningService', 'SwisscomAIS')
| 30.2 | 53 | 0.821192 |
6e860e384f9a15e1614c4608baaef9b490b1f88b | 588 | py | Python | leetcode/116-Populating-Next-Right-Pointers-in-Each-Node/PopulNxtRhtPnterinEachNode_001_rec.py | cc13ny/all-in | bc0b01e44e121ea68724da16f25f7e24386c53de | [
"MIT"
] | 1 | 2015-12-16T04:01:03.000Z | 2015-12-16T04:01:03.000Z | leetcode/116-Populating-Next-Right-Pointers-in-Each-Node/PopulNxtRhtPnterinEachNode_001_rec.py | cc13ny/all-in | bc0b01e44e121ea68724da16f25f7e24386c53de | [
"MIT"
] | 1 | 2016-02-09T06:00:07.000Z | 2016-02-09T07:20:13.000Z | leetcode/116-Populating-Next-Right-Pointers-in-Each-Node/PopulNxtRhtPnterinEachNode_001_rec.py | cc13ny/all-in | bc0b01e44e121ea68724da16f25f7e24386c53de | [
"MIT"
] | 2 | 2019-06-27T09:07:26.000Z | 2019-07-01T04:40:13.000Z | # Definition for binary tree with next pointer.
# class TreeLinkNode(object):
# def __init__(self, x):
# self.val = x
# self.left = None
# self.right = None
# self.next = None
class Solution(object):
def connect(self, root):
"""
:type root: TreeLinkNode
:... | 25.565217 | 47 | 0.481293 |
6e9b72b96802b44e25f7dcaaa6dafc7d0fff9bd6 | 4,503 | py | Python | test/test_npu/test_network_ops/test_conv_transpose2d.py | Ascend/pytorch | 39849cf72dafe8d2fb68bd1679d8fd54ad60fcfc | [
"BSD-3-Clause"
] | 1 | 2021-12-02T03:07:35.000Z | 2021-12-02T03:07:35.000Z | test/test_npu/test_network_ops/test_conv_transpose2d.py | Ascend/pytorch | 39849cf72dafe8d2fb68bd1679d8fd54ad60fcfc | [
"BSD-3-Clause"
] | 1 | 2021-11-12T07:23:03.000Z | 2021-11-12T08:28:13.000Z | test/test_npu/test_network_ops/test_conv_transpose2d.py | Ascend/pytorch | 39849cf72dafe8d2fb68bd1679d8fd54ad60fcfc | [
"BSD-3-Clause"
] | null | null | null | # Copyright (c) 2020, Huawei Technologies.All rights reserved.
#
# Licensed under the BSD 3-Clause License (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# https://opensource.org/licenses/BSD-3-Clause
#
# Unless required by applicable law... | 50.595506 | 96 | 0.584277 |
281ea426fa17b7eb87ed435db0532b0f616cace5 | 3,729 | py | Python | rdlcompiler/__init__.py | MegabytePhreak/rdl | b97912751738da9fddb42a9155f5823716809fc0 | [
"MIT"
] | 4 | 2016-05-10T20:40:34.000Z | 2020-04-09T13:23:33.000Z | rdlcompiler/__init__.py | MegabytePhreak/rdl | b97912751738da9fddb42a9155f5823716809fc0 | [
"MIT"
] | null | null | null | rdlcompiler/__init__.py | MegabytePhreak/rdl | b97912751738da9fddb42a9155f5823716809fc0 | [
"MIT"
] | null | null | null | __author__ = 'MegabytePhreak'
import argparse
from .systemrdl.preprocessor import preprocess_mode, preprocess
from .systemrdl.rdl_parser import RdlParser
import re
from .config import Config
import colorize
from logger import logger
preprocessor_mode_map = {
'auto': preprocess_mode.AUTO,
'none': preprocess_... | 37.666667 | 116 | 0.634486 |
250ff5545f9f183c5b335765411cae316b7ffa1f | 906 | py | Python | server.py | xJasonxy/einsatzdoku | 8af84446f99475519adaf803619f2c57174c517b | [
"MIT"
] | 1 | 2020-07-09T16:53:45.000Z | 2020-07-09T16:53:45.000Z | server.py | xJasonxy/Einsatzdoku | 8af84446f99475519adaf803619f2c57174c517b | [
"MIT"
] | null | null | null | server.py | xJasonxy/Einsatzdoku | 8af84446f99475519adaf803619f2c57174c517b | [
"MIT"
] | null | null | null | import sys
from shutil import copyfile
import getpass
import manage as django
from socket import *
from multiprocessing import Process
import atexit
def announceserver():
print('Starte Autodiscover Service')
sock = socket(AF_INET, SOCK_DGRAM)
server_address = ('', 8001)
sock.bind(server_address)
... | 21.571429 | 58 | 0.652318 |
6c00061db66e1521d65d220baea1923dfa425610 | 2,230 | py | Python | PlaidCTF/2020/crypto/dyrpto/message_pb2.py | mystickev/ctf-archives | 89e99a5cd5fb6b2923cad3fe1948d3ff78649b4e | [
"MIT"
] | 1 | 2022-03-27T06:00:41.000Z | 2022-03-27T06:00:41.000Z | PlaidCTF/2020/crypto/dyrpto/message_pb2.py | ruhan-islam/ctf-archives | 8c2bf6a608c821314d1a1cfaa05a6cccef8e3103 | [
"MIT"
] | null | null | null | PlaidCTF/2020/crypto/dyrpto/message_pb2.py | ruhan-islam/ctf-archives | 8c2bf6a608c821314d1a1cfaa05a6cccef8e3103 | [
"MIT"
] | 1 | 2021-12-19T11:06:24.000Z | 2021-12-19T11:06:24.000Z | # -*- coding: utf-8 -*-
# Generated by the protocol buffer compiler. DO NOT EDIT!
# source: message.proto
import sys
_b=sys.version_info[0]<3 and (lambda x:x) or (lambda x:x.encode('latin1'))
from google.protobuf import descriptor as _descriptor
from google.protobuf import message as _message
from google.protobuf imp... | 28.589744 | 138 | 0.736771 |
66964c1b0240918403f1804c0855fdd78e25829c | 5,715 | py | Python | packages/watchmen-pipeline-kernel/src/watchmen_pipeline_kernel/pipeline/pipeline_trigger.py | Indexical-Metrics-Measure-Advisory/watchmen | c54ec54d9f91034a38e51fd339ba66453d2c7a6d | [
"MIT"
] | null | null | null | packages/watchmen-pipeline-kernel/src/watchmen_pipeline_kernel/pipeline/pipeline_trigger.py | Indexical-Metrics-Measure-Advisory/watchmen | c54ec54d9f91034a38e51fd339ba66453d2c7a6d | [
"MIT"
] | null | null | null | packages/watchmen-pipeline-kernel/src/watchmen_pipeline_kernel/pipeline/pipeline_trigger.py | Indexical-Metrics-Measure-Advisory/watchmen | c54ec54d9f91034a38e51fd339ba66453d2c7a6d | [
"MIT"
] | null | null | null | from asyncio import ensure_future
from logging import getLogger
from typing import Any, Callable, Dict, Optional
from watchmen_auth import PrincipalService
from watchmen_data_kernel.meta import PipelineService
from watchmen_data_kernel.service import ask_topic_data_service
from watchmen_data_kernel.storage import Topi... | 40.531915 | 109 | 0.800525 |
663c4071bc2eb37495b7fe8a13590e0fb89c8f6f | 3,530 | py | Python | workspace/cogrob/service_manager/model/service_id.py | CogRob/Rorg | dbf9d849e150404c117f6f0062476d995cec7316 | [
"BSD-3-Clause"
] | 8 | 2019-05-07T02:30:58.000Z | 2021-12-10T18:44:45.000Z | workspace/cogrob/service_manager/model/service_id.py | CogRob/Rorg | dbf9d849e150404c117f6f0062476d995cec7316 | [
"BSD-3-Clause"
] | 1 | 2021-03-17T07:18:23.000Z | 2021-03-17T07:18:23.000Z | workspace/cogrob/service_manager/model/service_id.py | CogRob/Rorg | dbf9d849e150404c117f6f0062476d995cec7316 | [
"BSD-3-Clause"
] | 2 | 2019-05-21T14:15:24.000Z | 2022-02-09T12:50:24.000Z | # Copyright (c) 2019, The Regents of the University of California
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are met:
# * Redistributions of source code must retain the above copyright
# notice, thi... | 35.656566 | 79 | 0.732295 |
b0142a7bccb9a90e3f9a7c6d8d867ba0796fc043 | 917 | py | Python | wagtail_localize/locales/components.py | th3hamm0r/wagtail-localize | e9e0ba9245060c65e3247b62739abbed71bc2516 | [
"BSD-3-Clause"
] | 6 | 2019-09-10T19:53:55.000Z | 2019-11-14T16:57:07.000Z | wagtail_localize/locales/components.py | th3hamm0r/wagtail-localize | e9e0ba9245060c65e3247b62739abbed71bc2516 | [
"BSD-3-Clause"
] | 17 | 2019-07-11T11:17:37.000Z | 2019-11-19T16:40:31.000Z | wagtail_localize/locales/components.py | th3hamm0r/wagtail-localize | e9e0ba9245060c65e3247b62739abbed71bc2516 | [
"BSD-3-Clause"
] | 2 | 2019-09-30T20:23:39.000Z | 2019-10-31T14:09:31.000Z | from wagtail.admin.forms.models import WagtailAdminModelForm
LOCALE_COMPONENTS = []
def get_locale_components():
return LOCALE_COMPONENTS
def register_locale_component(*, heading, help_text=None, required=False):
def _wrapper(model):
if model not in LOCALE_COMPONENTS:
LOCALE_COMPONENTS... | 25.472222 | 79 | 0.589967 |
b01fe7b50a7b939b383ea4d99721e3fef84cf7d6 | 4,186 | py | Python | Packs/SentinelOne/Integrations/SentinelOne-V2/SentinelOne-V2_test.py | diCagri/content | c532c50b213e6dddb8ae6a378d6d09198e08fc9f | [
"MIT"
] | 799 | 2016-08-02T06:43:14.000Z | 2022-03-31T11:10:11.000Z | Packs/SentinelOne/Integrations/SentinelOne-V2/SentinelOne-V2_test.py | diCagri/content | c532c50b213e6dddb8ae6a378d6d09198e08fc9f | [
"MIT"
] | 9,317 | 2016-08-07T19:00:51.000Z | 2022-03-31T21:56:04.000Z | Packs/SentinelOne/Integrations/SentinelOne-V2/SentinelOne-V2_test.py | diCagri/content | c532c50b213e6dddb8ae6a378d6d09198e08fc9f | [
"MIT"
] | 1,297 | 2016-08-04T13:59:00.000Z | 2022-03-31T23:43:06.000Z | import io
import json
import pytest
import demistomock as demisto
from importlib import import_module
sentinelone_v2 = import_module('SentinelOne-V2')
main = sentinelone_v2.main
def util_load_json(path):
with io.open(path, mode='r', encoding='utf-8') as f:
return json.loads(f.read())
@pytest.fixture()... | 38.40367 | 101 | 0.662207 |
c6789fd8a654e1283c34a2b4bdaefcdda7b912af | 361 | py | Python | Verzweigungen/spiel.py | DietrichPaul/Einstieg-in-Python | 0d28402f962773274d85e6bb169ae631c91f66ce | [
"CC0-1.0"
] | null | null | null | Verzweigungen/spiel.py | DietrichPaul/Einstieg-in-Python | 0d28402f962773274d85e6bb169ae631c91f66ce | [
"CC0-1.0"
] | null | null | null | Verzweigungen/spiel.py | DietrichPaul/Einstieg-in-Python | 0d28402f962773274d85e6bb169ae631c91f66ce | [
"CC0-1.0"
] | null | null | null | # Zufallsgenerator
import random
random.seed()
# Werte und Berechnung
a = random.randint(1, 10)
b = random.randint(1, 10)
c = a + b
print("Die Aufgabe:", a, "+", b)
# Eingabe
print("Bitte eine Zahl eingeben:")
z = input()
zahl = int(z)
# Verzweigung
if zahl == c:
print(zahl, "ist richtig")
else:
print(zahl,... | 15.695652 | 34 | 0.637119 |
a59fb39d2c3c23a6e588d53cb00a1b9a69033c25 | 3,924 | py | Python | research/cv/SPPNet/src/sppnet.py | leelige/mindspore | 5199e05ba3888963473f2b07da3f7bca5b9ef6dc | [
"Apache-2.0"
] | 77 | 2021-10-15T08:32:37.000Z | 2022-03-30T13:09:11.000Z | research/cv/SPPNet/src/sppnet.py | leelige/mindspore | 5199e05ba3888963473f2b07da3f7bca5b9ef6dc | [
"Apache-2.0"
] | 3 | 2021-10-30T14:44:57.000Z | 2022-02-14T06:57:57.000Z | research/cv/SPPNet/src/sppnet.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... | 34.121739 | 112 | 0.578491 |
3c26b7bc02564439c39b1b6137cbd342e035757e | 4,018 | py | Python | Python/Buch_ATBS/Teil_2/Kapitel_14_Arbeiten_mit_CSV_und_JSON_Daten/01_csv_grundlagen/01_csv_grundlagen.py | Apop85/Scripts | e71e1c18539e67543e3509c424c7f2d6528da654 | [
"MIT"
] | null | null | null | Python/Buch_ATBS/Teil_2/Kapitel_14_Arbeiten_mit_CSV_und_JSON_Daten/01_csv_grundlagen/01_csv_grundlagen.py | Apop85/Scripts | e71e1c18539e67543e3509c424c7f2d6528da654 | [
"MIT"
] | 6 | 2020-12-24T15:15:09.000Z | 2022-01-13T01:58:35.000Z | Python/Buch_ATBS/Teil_2/Kapitel_14_Arbeiten_mit_CSV_und_JSON_Daten/01_csv_grundlagen/01_csv_grundlagen.py | Apop85/Scripts | 1d8dad316c55e1f1343526eac9e4b3d0909e4873 | [
"MIT"
] | null | null | null | # 01_csv_grundlagen.py
import csv, os, re
os.chdir(os.path.dirname(__file__))
max_text_length=70
max_text_delta=20
def output(title, string):
print('╔'+''.center(max_text_length+8, '═')+'╗')
print('║ '+title.center(max_text_length+7).upper()+'║')
print('╠'+''.center(max_text_length+8, '═')+'╣')
strin... | 68.101695 | 334 | 0.754604 |
59de263320940eb61f58d482c2e27d2b1153820d | 1,341 | py | Python | demos/System_Dynamics/Compartment_Models/sir/model/parts/sir_model.py | w-ghub/demos | 6382676fae89bd5a190626612712fcedf17bca6d | [
"MIT"
] | 56 | 2020-07-08T23:23:15.000Z | 2022-03-11T20:43:09.000Z | demos/System_Dynamics/Compartment_Models/sir/model/parts/sir_model.py | w-ghub/demos | 6382676fae89bd5a190626612712fcedf17bca6d | [
"MIT"
] | 41 | 2020-07-11T23:24:06.000Z | 2022-01-28T13:28:07.000Z | demos/System_Dynamics/Compartment_Models/sir/model/parts/sir_model.py | w-ghub/demos | 6382676fae89bd5a190626612712fcedf17bca6d | [
"MIT"
] | 39 | 2020-07-15T11:35:04.000Z | 2022-02-01T16:02:51.000Z | import numpy as np
## Policies
def p_infected_growth(params, substep, state_history, prev_state):
infected_population = params['infection_rate']*prev_state['infected']*prev_state['susceptible']/(prev_state['susceptible'] + prev_state['infected'] + prev_state['recovered'])
return {'infected_growth': np.ceil(i... | 44.7 | 178 | 0.780761 |
abb4e35056ea718d24e1c31f064d7ab49ab7ba65 | 3,415 | py | Python | nz_crawl_demo/day3/bs4/demo1.py | gaohj/nzflask_bbs | 36a94c380b78241ed5d1e07edab9618c3e8d477b | [
"Apache-2.0"
] | null | null | null | nz_crawl_demo/day3/bs4/demo1.py | gaohj/nzflask_bbs | 36a94c380b78241ed5d1e07edab9618c3e8d477b | [
"Apache-2.0"
] | 27 | 2020-02-12T07:55:58.000Z | 2022-03-12T00:19:09.000Z | nz_crawl_demo/day3/bs4/demo1.py | gaohj/nzflask_bbs | 36a94c380b78241ed5d1e07edab9618c3e8d477b | [
"Apache-2.0"
] | 2 | 2020-02-18T01:54:55.000Z | 2020-02-21T11:36:28.000Z | from bs4 import BeautifulSoup
html = """
<table class="tablelist" cellpadding="0" cellspacing="0">
<tbody>
<tr class="h">
<td class="l" width="374">职位名称</td>
<td>职位类别</td>
<td>人数</td>
<td>地点</td>
<td>发布时间</td>
</tr>
<tr class="even... | 38.806818 | 164 | 0.501025 |
75b3ce53ec2f34fdfc9f3ef7db4e3daad4b812e8 | 428 | py | Python | project/services/image.py | DanielGrams/gsevp | e94034f7b64de76f38754b56455e83092378261f | [
"MIT"
] | 1 | 2021-06-01T14:49:18.000Z | 2021-06-01T14:49:18.000Z | project/services/image.py | DanielGrams/gsevp | e94034f7b64de76f38754b56455e83092378261f | [
"MIT"
] | 286 | 2020-12-04T14:13:00.000Z | 2022-03-09T19:05:16.000Z | project/services/image.py | DanielGrams/gsevpt | a92f71694388e227e65ed1b24446246ee688d00e | [
"MIT"
] | null | null | null | import base64
from project.models import Image
def upsert_image_with_data(image, data, encoding_format="image/jpeg"):
if image is None:
image = Image()
image.data = data
image.encoding_format = encoding_format
return image
def upsert_image_with_base64_str(image, base64_str, encoding_forma... | 22.526316 | 70 | 0.752336 |
75c37ad33ab1921fa939b3665653e7bba440a15e | 493 | py | Python | T1/05_rhino_basics/04_python/rhinoscriptsyntax_example.py | tetov/MAS-1920 | e5cfe4afbc7c0e80c6adfd139624d028c0ca4bfb | [
"MIT"
] | 3 | 2019-09-15T17:40:35.000Z | 2020-11-07T01:47:29.000Z | T1/05_rhino_basics/04_python/rhinoscriptsyntax_example.py | tetov/MAS-1920 | e5cfe4afbc7c0e80c6adfd139624d028c0ca4bfb | [
"MIT"
] | 1 | 2019-09-17T22:59:19.000Z | 2019-09-17T22:59:19.000Z | T1/05_rhino_basics/04_python/rhinoscriptsyntax_example.py | MAS-dfab/MAS-1920 | 93abb09b072b9a061496bc8a30bdce481a8735c5 | [
"MIT"
] | 8 | 2019-09-16T18:47:20.000Z | 2019-10-15T17:08:08.000Z | import rhinoscriptsyntax as rs
import Rhino.Geometry as rg
import random as r
# enable/disable redraw
rs.EnableRedraw(False)
# add pt with rs
rs.AddPoint((0,0,0))
# add multiple pts
pts = []
for i in range(10):
for j in range(10):
for k in range(10):
pts.append(rs.AddPoint((i,j,k)))
for i,p... | 17 | 44 | 0.659229 |
f96c72c19e63e8a9acc6d452cfe3eacd774f59cb | 187 | py | Python | PYTHON/Regex_and_Parsing/validating_phone_numbers.py | byung-u/HackerRank | 4c02fefff7002b3af774b99ebf8d40f149f9d163 | [
"MIT"
] | null | null | null | PYTHON/Regex_and_Parsing/validating_phone_numbers.py | byung-u/HackerRank | 4c02fefff7002b3af774b99ebf8d40f149f9d163 | [
"MIT"
] | null | null | null | PYTHON/Regex_and_Parsing/validating_phone_numbers.py | byung-u/HackerRank | 4c02fefff7002b3af774b99ebf8d40f149f9d163 | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
import sys
import re
for _ in range(int(input())):
m = re.search('^[7-9]\d{9}$', input())
if m is None:
print('NO')
else:
print('YES')
| 17 | 42 | 0.524064 |
fd20c8b5c5ae144ec75f8abba81c076943576b32 | 542 | py | Python | pacman-arch/test/pacman/tests/upgrade061.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/upgrade061.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/upgrade061.py | Scottx86-64/dotfiles-1 | 51004b1e2b032664cce6b553d2052757c286087d | [
"Unlicense"
] | 1 | 2021-09-26T08:44:40.000Z | 2021-09-26T08:44:40.000Z | self.description = "Try to upgrade two packages which would break deps"
lp1 = pmpkg("pkg1", "1.0-1")
lp1.depends = ["imaginary"]
self.addpkg2db("local", lp1)
lp2 = pmpkg("pkg2", "1.0-1")
lp2.provides = ["imaginary"]
self.addpkg2db("local", lp2)
p1 = pmpkg("pkg1", "1.0-2")
p1.depends = ["imaginary"]
self.addpkg(p1)
... | 23.565217 | 71 | 0.654982 |
bd34e5bf843dad82c1b392d9d89dbcd3aceabc19 | 1,739 | py | Python | src/nfz_module/examples/python_getAccidentspotsRequest.py | hwroitzsch/BikersLifeSaver | 469c738fdd6352c44a3f20689b17fa8ac04ad8a2 | [
"MIT"
] | null | null | null | src/nfz_module/examples/python_getAccidentspotsRequest.py | hwroitzsch/BikersLifeSaver | 469c738fdd6352c44a3f20689b17fa8ac04ad8a2 | [
"MIT"
] | null | null | null | src/nfz_module/examples/python_getAccidentspotsRequest.py | hwroitzsch/BikersLifeSaver | 469c738fdd6352c44a3f20689b17fa8ac04ad8a2 | [
"MIT"
] | null | null | null | # Name: python_getAccidentspotsRequest.py
# Haupt-Funktion: erhaelt die aktuelle Unfallschwerpunkte vom Server
__author__ = "BKonstantin"
__date__ = "$14.12.2015 13:29:04$"
#if __name__ == "__main__":
# print ("start postRequest...")
# Imports:
# Die Bibliothek "requests" muss vorher installiert werden.
import re... | 28.048387 | 108 | 0.752156 |
c07d8ed1b4759fee6a717976cff987b1984b6e43 | 9,614 | py | Python | src/austria/management/commands/import_basedata.py | frocentus/offenewahlen_api | 71860583890f8a4c23df67f271e8f13558fa9582 | [
"MIT"
] | 14 | 2017-07-12T14:42:57.000Z | 2017-09-08T20:32:53.000Z | src/austria/management/commands/import_basedata.py | frocentus/offenewahlen_api | 71860583890f8a4c23df67f271e8f13558fa9582 | [
"MIT"
] | 209 | 2017-07-11T21:36:01.000Z | 2017-11-05T01:10:50.000Z | src/austria/management/commands/import_basedata.py | OKFNat/offenewahlen-api | 71860583890f8a4c23df67f271e8f13558fa9582 | [
"MIT"
] | 8 | 2017-07-15T09:40:42.000Z | 2018-01-12T03:02:06.000Z | from django.core.management.base import BaseCommand, CommandError
from django.utils import timezone
from austria.models import PollingStation, Election, Party, RegionalElectoralDistrict, State, District, Municipality, List
import json
import datetime
import os
class Command(BaseCommand):
help = 'Import basic data in... | 31.214286 | 167 | 0.678074 |
9b05f53260e670ba5c2df1ea101271c9c4d3b919 | 4,126 | py | Python | Packs/AsanaConnect/Integrations/AsanaConnect/AsanaConnect.py | diCagri/content | c532c50b213e6dddb8ae6a378d6d09198e08fc9f | [
"MIT"
] | 799 | 2016-08-02T06:43:14.000Z | 2022-03-31T11:10:11.000Z | Packs/AsanaConnect/Integrations/AsanaConnect/AsanaConnect.py | diCagri/content | c532c50b213e6dddb8ae6a378d6d09198e08fc9f | [
"MIT"
] | 9,317 | 2016-08-07T19:00:51.000Z | 2022-03-31T21:56:04.000Z | Packs/AsanaConnect/Integrations/AsanaConnect/AsanaConnect.py | diCagri/content | c532c50b213e6dddb8ae6a378d6d09198e08fc9f | [
"MIT"
] | 1,297 | 2016-08-04T13:59:00.000Z | 2022-03-31T23:43:06.000Z | import asana
import demistomock as demisto # noqa: F401
from CommonServerPython import * # noqa: F401
def get_asana_client(token):
try:
client = asana.Client.access_token(token)
except Exception as err:
return_error(str(err))
return client
def get_projects_in_workspace(wid, client):
... | 27.691275 | 89 | 0.630393 |
9eb2d3ca295291029feb4d618f8c212d98d4bcaa | 92 | py | Python | 2015/03/teachercomplete-20150303/graphic_config.py | nprapps/graphics-archive | 97b0ef326b46a959df930f5522d325e537f7a655 | [
"FSFAP"
] | 14 | 2015-05-08T13:41:51.000Z | 2021-02-24T12:34:55.000Z | 2015/03/teachercomplete-20150303/graphic_config.py | nprapps/graphics-archive | 97b0ef326b46a959df930f5522d325e537f7a655 | [
"FSFAP"
] | null | null | null | 2015/03/teachercomplete-20150303/graphic_config.py | nprapps/graphics-archive | 97b0ef326b46a959df930f5522d325e537f7a655 | [
"FSFAP"
] | 7 | 2015-04-04T04:45:54.000Z | 2021-02-18T11:12:48.000Z | #!/usr/bin/env python
COPY_GOOGLE_DOC_KEY = '1zj8oZZVC9ZiQ7O1s1tlzcv0LTf5N2yR9yFTEWVTNeag'
| 23 | 68 | 0.847826 |
f599a84477db32b7f6298efa3611c4639b5e0243 | 1,365 | py | Python | python/coursera_python/MICHIGAN/web/2/2.py | SayanGhoshBDA/code-backup | 8b6135facc0e598e9686b2e8eb2d69dd68198b80 | [
"MIT"
] | 16 | 2018-11-26T08:39:42.000Z | 2019-05-08T10:09:52.000Z | python/coursera_python/MICHIGAN/web/2/2.py | SayanGhoshBDA/code-backup | 8b6135facc0e598e9686b2e8eb2d69dd68198b80 | [
"MIT"
] | 8 | 2020-05-04T06:29:26.000Z | 2022-02-12T05:33:16.000Z | python/coursera_python/MICHIGAN/web/2/2.py | SayanGhoshBDA/code-backup | 8b6135facc0e598e9686b2e8eb2d69dd68198b80 | [
"MIT"
] | 5 | 2020-02-11T16:02:21.000Z | 2021-02-05T07:48:30.000Z | import urllib.request, urllib.parse, urllib.error
# http://www.py4e.com/code3/bs4.zip
# and unzip it in the same directory as this file
from urllib.request import urlopen
import re
from bs4 import BeautifulSoup
import ssl
#conn = sqlite3.connect('wiki3.sqlite')
#cur = conn.cursor()
# Ignore SSL certificate erro... | 29.042553 | 196 | 0.643956 |
5fe33589180ea0f891547ec7a1a4b9e529647ad5 | 621 | py | Python | garden/flancian/tools/report.py | nikvdp/agora | 9e7607901d9b1b551e03b21a37e3266a5e2fab6a | [
"Apache-2.0"
] | null | null | null | garden/flancian/tools/report.py | nikvdp/agora | 9e7607901d9b1b551e03b21a37e3266a5e2fab6a | [
"Apache-2.0"
] | null | null | null | garden/flancian/tools/report.py | nikvdp/agora | 9e7607901d9b1b551e03b21a37e3266a5e2fab6a | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/python3
import pathlib
import titlecase
for filename in pathlib.Path('.').glob('**/*.md'):
f = open(filename)
print('file: %s' % filename)
lines = f.readlines()
if lines:
if lines[0].startswith('#'):
print(filename, 'has a header')
else:
sanitized_file... | 34.5 | 75 | 0.590982 |
270399bf3e07b32e42cda80f553e1053610e3493 | 8,378 | py | Python | gui/appGui.py | lhalb/gfmanager | 449f071b3239faa672b7f06122dfc9bc23e68d79 | [
"MIT"
] | 1 | 2022-01-18T12:53:17.000Z | 2022-01-18T12:53:17.000Z | gui/appGui.py | lhalb/gfmanager | 449f071b3239faa672b7f06122dfc9bc23e68d79 | [
"MIT"
] | null | null | null | gui/appGui.py | lhalb/gfmanager | 449f071b3239faa672b7f06122dfc9bc23e68d79 | [
"MIT"
] | null | null | null | from PyQt5.QtWidgets import QMessageBox as QMB
from PyQt5 import QtCore, QtGui, QtWidgets
from gui import GUI
from lib import gfDatabase as DB
from lib import gfHelper as gfh
from gui.trimGui import TrimDialog as TD
class App(QtWidgets.QMainWindow, GUI.Ui_MainWindow):
def __init__(self):
super(App, self... | 32.472868 | 123 | 0.595966 |
274eb7f17c9929f36a840aa840bda1b41eaeb9fc | 1,492 | py | Python | source-code/ESP8266/m_Hardware.py | ZakkyMas/Audio_Mixer_Wireless | 7f7a002fdf8eebe6891c06b803f1a3bd0c2da7ca | [
"MIT"
] | 3 | 2020-12-30T18:37:13.000Z | 2021-10-02T07:43:10.000Z | source-code/ESP8266/m_Hardware.py | ZakkyMas/Audio_Mixer_Wireless | 7f7a002fdf8eebe6891c06b803f1a3bd0c2da7ca | [
"MIT"
] | null | null | null | source-code/ESP8266/m_Hardware.py | ZakkyMas/Audio_Mixer_Wireless | 7f7a002fdf8eebe6891c06b803f1a3bd0c2da7ca | [
"MIT"
] | 1 | 2021-10-02T07:47:53.000Z | 2021-10-02T07:47:53.000Z | import gc
gc.collect()
import machine
import utime as time
from machine import Pin, PWM, ADC, Timer
class Hardware:
def __init__(self, system):
self._call = system
self._call.REBOOT = self.REBOOT
self._call.LED = self.LED
self._led = PWM(Pin(13), duty=0, freq=1)
... | 25.724138 | 83 | 0.506032 |
e304deca85b00a9657eb5d5e069868620e197b2a | 4,909 | py | Python | Co-Simulation/Sumo/sumo-1.7.0/tools/route2trips.py | uruzahe/carla | 940c2ab23cce1eda1ef66de35f66b42d40865fb1 | [
"MIT"
] | 4 | 2020-11-13T02:35:56.000Z | 2021-03-29T20:15:54.000Z | Co-Simulation/Sumo/sumo-1.7.0/tools/route2trips.py | uruzahe/carla | 940c2ab23cce1eda1ef66de35f66b42d40865fb1 | [
"MIT"
] | 9 | 2020-12-09T02:12:39.000Z | 2021-02-18T00:15:28.000Z | Co-Simulation/Sumo/sumo-1.7.0/tools/route2trips.py | uruzahe/carla | 940c2ab23cce1eda1ef66de35f66b42d40865fb1 | [
"MIT"
] | 1 | 2020-11-20T19:31:26.000Z | 2020-11-20T19:31:26.000Z | #!/usr/bin/env python
# Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo
# Copyright (C) 2008-2020 German Aerospace Center (DLR) and others.
# This program and the accompanying materials are made available under the
# terms of the Eclipse Public License 2.0 which is available at
# https://www.ec... | 38.351563 | 120 | 0.558973 |
088bc2e98dfe3a0355d3a9b67785605c50d8bc8c | 767 | py | Python | tests/web.adblockplus.org/pages/aboutPage.py | adblockplus/web.adblockplus.org | c2c570ce4f4296afc3577afe233c6b23b128f206 | [
"MIT"
] | 9 | 2016-01-29T18:05:29.000Z | 2021-10-06T04:21:55.000Z | tests/web.adblockplus.org/pages/aboutPage.py | adblockplus/web.adblockplus.org | c2c570ce4f4296afc3577afe233c6b23b128f206 | [
"MIT"
] | 9 | 2015-04-06T19:03:32.000Z | 2019-05-28T13:34:55.000Z | tests/web.adblockplus.org/pages/aboutPage.py | adblockplus/web.adblockplus.org | c2c570ce4f4296afc3577afe233c6b23b128f206 | [
"MIT"
] | 18 | 2015-04-06T17:42:31.000Z | 2021-10-06T04:26:29.000Z | import time
from pages.basePage import BasePage
from pages.privacyPolicyPage import PrivacyPolicyPage
DOWNLOAD_BUTTON_ID = 'install-button'
PRIVACY_POLICY_LINK_XPATH = '//*[@title="Privacy Policy of Adblock Plus"]'
class AboutPage(BasePage):
def __init__(self, driver):
self.driver = driver
def cli... | 30.68 | 96 | 0.723598 |
de1f3a7b9948f0556cc5133a518d072781fa9d1f | 60 | py | Python | scripts/helloworld_yalcins.py | breezage/Hacktoberfest-1 | 6f6d52248c79c0e72fd13b599500318fce3f9ab0 | [
"MIT"
] | null | null | null | scripts/helloworld_yalcins.py | breezage/Hacktoberfest-1 | 6f6d52248c79c0e72fd13b599500318fce3f9ab0 | [
"MIT"
] | null | null | null | scripts/helloworld_yalcins.py | breezage/Hacktoberfest-1 | 6f6d52248c79c0e72fd13b599500318fce3f9ab0 | [
"MIT"
] | 1 | 2019-10-24T06:45:21.000Z | 2019-10-24T06:45:21.000Z | #LANGUAGE: python 3
#AUTHOR: yalcins
print("Hello world!")
| 12 | 21 | 0.716667 |
a0ecfb2853b1cdb3f738738458b6be4a637cd1e2 | 587 | py | Python | hausse/__main__.py | andrenasturas/hausse | 58e7cb71d5105cf1d6ec7d294e85668855bf8336 | [
"MIT"
] | null | null | null | hausse/__main__.py | andrenasturas/hausse | 58e7cb71d5105cf1d6ec7d294e85668855bf8336 | [
"MIT"
] | 1 | 2021-08-30T21:41:46.000Z | 2021-08-30T21:41:46.000Z | hausse/__main__.py | andrenasturas/hausse | 58e7cb71d5105cf1d6ec7d294e85668855bf8336 | [
"MIT"
] | 1 | 2021-08-31T19:27:32.000Z | 2021-08-31T19:27:32.000Z | import argparse
from pathlib import Path
from .utils import Defaults, Keys
from .hausse import Hausse
parser = argparse.ArgumentParser(prog="hausse", description="Modulable static project builder")
parser.add_argument("Path", type=str, nargs="?", help="Project folder or hausse.json file path")
parser.add_argument("-... | 22.576923 | 96 | 0.727428 |
19d3ddba383bda20e80b0efce83998f0248f98d5 | 1,262 | py | Python | Source/02_EmailMiMe/app.py | rbiotblbk/WBS_T9_2022 | 533156db88ff2fe676564b0e5d6e84e888ab0916 | [
"MIT"
] | 1 | 2022-02-28T09:49:35.000Z | 2022-02-28T09:49:35.000Z | Source/02_EmailMiMe/app.py | rbiotblbk/WBS_T9_2022 | 533156db88ff2fe676564b0e5d6e84e888ab0916 | [
"MIT"
] | null | null | null | Source/02_EmailMiMe/app.py | rbiotblbk/WBS_T9_2022 | 533156db88ff2fe676564b0e5d6e84e888ab0916 | [
"MIT"
] | null | null | null | """
SMTP : Simple Mail Transfer Protocol
Only for ASCII Encoding
"""
"""
MiMe Encoding provides:
- Special Chars, etc.
- Attachments
- HTML Template
"""
from email.mime.multipart import MIMEMultipart
from email.mime.text import MIMEText
from email.mime.image import MIMEImage
import os
from pathlib import Path
... | 18.835821 | 67 | 0.702853 |
5f24d8dbe34a34b1b233b59bcdbfe5f1cb104d14 | 5,694 | py | Python | graph_network/data/pipeline.py | stevezheng23/graph_network_tf | b48a43453c2731f253bfe5a61e0b6339f4fc9f99 | [
"Apache-2.0"
] | null | null | null | graph_network/data/pipeline.py | stevezheng23/graph_network_tf | b48a43453c2731f253bfe5a61e0b6339f4fc9f99 | [
"Apache-2.0"
] | null | null | null | graph_network/data/pipeline.py | stevezheng23/graph_network_tf | b48a43453c2731f253bfe5a61e0b6339f4fc9f99 | [
"Apache-2.0"
] | null | null | null | import numpy as np
import tensorflow as tf
__all__ = ["GraphPipeline"]
class GraphPipeline(object):
"""graph pipeline"""
def __init__(self,
dataset,
max_node_size,
max_edge_size,
batch_size,
buffer_size=10000,
... | 56.376238 | 120 | 0.674218 |
26ec52f0329ff64bfd4702b2c07c4f8ad011962b | 2,463 | py | Python | WifiEnigma/main.py | Puzzlebox-IMT/Puzzlebox | 6b80e22a4aee3228140692bd6352de18b2f6a96d | [
"MIT"
] | null | null | null | WifiEnigma/main.py | Puzzlebox-IMT/Puzzlebox | 6b80e22a4aee3228140692bd6352de18b2f6a96d | [
"MIT"
] | null | null | null | WifiEnigma/main.py | Puzzlebox-IMT/Puzzlebox | 6b80e22a4aee3228140692bd6352de18b2f6a96d | [
"MIT"
] | null | null | null | #imports librairies
import time
import paho.mqtt.client as mqtt
import sys
import RPi.GPIO as GPIO
from threading import Thread
sys.path.append('BattleAI')
sys.path.append('ZeldaAutomation')
#IMPORTS OF THE WIFI BATTLE AI
#from question import *
#IMPORTS OF THE WIFI DOMOTIC ENIGMA
from zelda_home_public import *
... | 21.79646 | 136 | 0.666667 |
f8c2a2f0ce7cfa977e1669ec62fa7a30f8e918a1 | 486 | py | Python | Contests/DMOPC '14 Contest 2 P4 - Deforestation.py | MastaCoder/Projects | ebb0a3134522b12f052fec8d753005f384adf1b1 | [
"MIT"
] | 5 | 2018-10-11T01:55:40.000Z | 2021-12-25T23:38:22.000Z | Contests/DMOPC '14 Contest 2 P4 - Deforestation.py | MastaCoder/mini_projects | ebb0a3134522b12f052fec8d753005f384adf1b1 | [
"MIT"
] | null | null | null | Contests/DMOPC '14 Contest 2 P4 - Deforestation.py | MastaCoder/mini_projects | ebb0a3134522b12f052fec8d753005f384adf1b1 | [
"MIT"
] | 1 | 2019-02-22T14:42:50.000Z | 2019-02-22T14:42:50.000Z | import sys
input = sys.stdin.readline
length = int(input())
nums = [0 for a in range(length)];
sums = [0 for a in range(length)];
for a in range(length):
nums[a] = int(input())
if a > 0:
sums[a] = sums[a - 1] + nums[a]
else:
sums[a] = nums[a]
for a in range(int(input())):
val = input(... | 22.090909 | 46 | 0.518519 |
3e53a664ecb9e79f300397c9fd16d28038e7270f | 4,038 | py | Python | logginghandlers/timedrotatingfilesmtphandler.py | stg93/blaulichtsms_einsatzmonitor | db595f535ece0f944ec70a9eac70af7b667f63ef | [
"MIT"
] | 18 | 2017-07-24T18:08:04.000Z | 2021-05-06T06:50:22.000Z | logginghandlers/timedrotatingfilesmtphandler.py | stg93/blaulichtsms_einsatzmonitor | db595f535ece0f944ec70a9eac70af7b667f63ef | [
"MIT"
] | 19 | 2018-09-25T20:42:17.000Z | 2021-11-23T21:26:18.000Z | logginghandlers/timedrotatingfilesmtphandler.py | stg93/blaulichtsms_einsatzmonitor | db595f535ece0f944ec70a9eac70af7b667f63ef | [
"MIT"
] | 11 | 2018-05-05T04:49:41.000Z | 2022-02-18T17:33:13.000Z | import configparser
import json
import mmap
import os
import tarfile
import threading
from logging.handlers import TimedRotatingFileHandler
from sendmail import MailSender
class TimedRotatingFileSMTPHandler(TimedRotatingFileHandler):
"""An extension of Python's TimedRotatingFileHandler that archives
and comp... | 34.220339 | 79 | 0.600792 |
5f9b42d47384a4b0ce6ca62da2f4d1ccdec74a6b | 141 | py | Python | Programming Languages/Python/Theory/100_Python_Exercises/Exercises/Exercise 38/38.py | jaswinder9051998/Resources | fd468af37bf24ca57555d153ee64693c018e822e | [
"MIT"
] | 101 | 2021-12-20T11:57:11.000Z | 2022-03-23T09:49:13.000Z | 50-Python-Exercises/Exercises/Exercise 38/38.py | kuwarkapur/Hacktoberfest-2022 | efaafeba5ce51d8d2e2d94c6326cc20bff946f17 | [
"MIT"
] | 4 | 2022-01-12T11:55:56.000Z | 2022-02-12T04:53:33.000Z | 50-Python-Exercises/Exercises/Exercise 38/38.py | kuwarkapur/Hacktoberfest-2022 | efaafeba5ce51d8d2e2d94c6326cc20bff946f17 | [
"MIT"
] | 38 | 2022-01-12T11:56:16.000Z | 2022-03-23T10:07:52.000Z | #This script is supposed to print out the square root of 9, but there's an error.
#A: THe math module had not been imported yet
math.sqrt(9)
| 35.25 | 81 | 0.751773 |
397d876681b9e8c720562bcf64a495e0b7da0e27 | 488 | py | Python | Resources/scripts/HelloPython.py | xiaoxianrouzhiyou/BBearEditor | 0f1b779d87c297661f9a1e66d0613df43f5fe46b | [
"MIT"
] | 26 | 2021-06-30T02:19:30.000Z | 2021-07-23T08:38:46.000Z | Resources/scripts/HelloPython.py | lishangdian/BBearEditor-2.0 | 1f4b463ef756ed36cc15d10abae822efc400c4d7 | [
"MIT"
] | null | null | null | Resources/scripts/HelloPython.py | lishangdian/BBearEditor-2.0 | 1f4b463ef756ed36cc15d10abae822efc400c4d7 | [
"MIT"
] | 3 | 2021-09-01T08:19:30.000Z | 2021-12-28T19:06:40.000Z | print("Test python")
class BBPythonBase:
id = 128
def __init__(self) -> None:
print("Hello Python")
def func0(self, arg0, arg1) -> None:
print("arg0 = ", arg0)
print("arg1 = ", arg1)
print("func0")
return 1234
def main():
print("main func")
def func1(list):
... | 17.428571 | 40 | 0.530738 |
f285ebcff86fc9f9842af55b05b407d727e31787 | 6,533 | py | Python | python/sxlVisitor.py | nussbrot/code-exchange | 3427798c4391e5f9c17cd19399ac56997c091ee2 | [
"MIT"
] | null | null | null | python/sxlVisitor.py | nussbrot/code-exchange | 3427798c4391e5f9c17cd19399ac56997c091ee2 | [
"MIT"
] | null | null | null | python/sxlVisitor.py | nussbrot/code-exchange | 3427798c4391e5f9c17cd19399ac56997c091ee2 | [
"MIT"
] | null | null | null | # Generated from sxl.g4 by ANTLR 4.7
from antlr4 import *
if __name__ is not None and "." in __name__:
from .sxlParser import sxlParser
else:
from sxlParser import sxlParser
# This class defines a complete generic visitor for a parse tree produced by sxlParser.
class sxlVisitor(ParseTreeVisitor):
# Visit... | 31.408654 | 87 | 0.731976 |
4b53bacb951ca958d9769ceb1f41b1ef8fe4b016 | 50 | py | Python | common/__init__.py | JACKYLUO1991/FaceLandmarks | 0e7eb636d25ba93e64cc3433a79239be51c883cc | [
"Apache-2.0"
] | 24 | 2019-09-01T09:02:59.000Z | 2022-03-22T08:38:16.000Z | common/__init__.py | HeroOneHY/FaceLandmarks | 0e7eb636d25ba93e64cc3433a79239be51c883cc | [
"Apache-2.0"
] | 2 | 2019-10-25T02:39:03.000Z | 2022-03-20T15:45:22.000Z | common/__init__.py | HeroOneHY/FaceLandmarks | 0e7eb636d25ba93e64cc3433a79239be51c883cc | [
"Apache-2.0"
] | 11 | 2019-10-25T01:36:18.000Z | 2021-04-09T06:51:58.000Z | __all__ = ["LandmarkHelper", "LandmarkImageCrop"]
| 25 | 49 | 0.76 |
29b6b81d1155bd9161f3ecd5360b254776df9765 | 27,239 | py | Python | Packs/VMware/Integrations/VMware/VMware_test.py | diCagri/content | c532c50b213e6dddb8ae6a378d6d09198e08fc9f | [
"MIT"
] | 2 | 2021-12-06T21:38:24.000Z | 2022-01-13T08:23:36.000Z | Packs/VMware/Integrations/VMware/VMware_test.py | diCagri/content | c532c50b213e6dddb8ae6a378d6d09198e08fc9f | [
"MIT"
] | 87 | 2022-02-23T12:10:53.000Z | 2022-03-31T11:29:05.000Z | Packs/VMware/Integrations/VMware/VMware_test.py | diCagri/content | c532c50b213e6dddb8ae6a378d6d09198e08fc9f | [
"MIT"
] | 2 | 2022-01-05T15:27:01.000Z | 2022-02-01T19:27:43.000Z | import pyVim.task
import pytest
import VMware
from datetime import datetime
from collections import namedtuple
from pyVmomi import vim
# testing classes
device_info = namedtuple('device_info', ['label', 'key', 'macAddress', 'backing', 'wakeOnLanEnabled'])
class Runtime:
powerState = None
def __init__(self,... | 28.824339 | 120 | 0.620324 |
8aa2ca0720a75067e63031799ff2db81e5b7b72d | 333 | py | Python | divvydash/dashboard/api.py | Sawyer-Middeleer/divvy-dash | 5ef1738d47516949f7288b56b5c92a5c7d1d9d42 | [
"MIT"
] | null | null | null | divvydash/dashboard/api.py | Sawyer-Middeleer/divvy-dash | 5ef1738d47516949f7288b56b5c92a5c7d1d9d42 | [
"MIT"
] | 5 | 2020-06-06T01:45:31.000Z | 2021-06-10T19:59:14.000Z | divvydash/dashboard/api.py | Sawyer-Middeleer/divvy-dash | 5ef1738d47516949f7288b56b5c92a5c7d1d9d42 | [
"MIT"
] | null | null | null | from dashboard.models import Station
from rest_framework import viewsets, permissions
from .serializers import StationSerializer
# station viewset
class StationViewSet(viewsets.ModelViewSet):
queryset = Station.objects.all()
permission_classes = [
permissions.AllowAny
]
serializer_class = Stati... | 27.75 | 48 | 0.783784 |
0a23db3b52fd07fe0eabae9ea46c7ecb83ed297e | 41,651 | py | Python | _Dist/NeuralNetworks/_Tests/Pruner/Base.py | leoatchina/MachineLearning | 071f2c0fc6f5af3d9550cfbeafe8d537c35a76d3 | [
"MIT"
] | 1,107 | 2016-09-21T02:18:36.000Z | 2022-03-29T02:52:12.000Z | _Dist/NeuralNetworks/_Tests/Pruner/Base.py | leoatchina/MachineLearning | 071f2c0fc6f5af3d9550cfbeafe8d537c35a76d3 | [
"MIT"
] | 18 | 2016-12-22T10:24:47.000Z | 2022-03-11T23:18:43.000Z | _Dist/NeuralNetworks/_Tests/Pruner/Base.py | leoatchina/MachineLearning | 071f2c0fc6f5af3d9550cfbeafe8d537c35a76d3 | [
"MIT"
] | 776 | 2016-12-21T12:08:08.000Z | 2022-03-21T06:12:08.000Z | import os
import sys
root_path = os.path.abspath("../../../../")
if root_path not in sys.path:
sys.path.append(root_path)
import os
import time
import math
import random
import pickle
import shutil
import logging
import numpy as np
import tensorflow as tf
import matplotlib.pyplot as plt
from mpl_toolkits.mplot3d... | 39.554606 | 119 | 0.578714 |
7c19d96ed687aca459dae357c933db75820ccb1b | 21,283 | py | Python | app/api.py | MePyDo/pygqa | 61cde42ee815968fdd029cc5056ede3badea3d91 | [
"MIT"
] | 3 | 2021-02-25T13:19:52.000Z | 2021-03-03T03:46:46.000Z | app/api.py | MedPhyDO/pygqa | 580b2c6028d2299790a38262b795b8409cbfcc37 | [
"MIT"
] | null | null | null | app/api.py | MedPhyDO/pygqa | 580b2c6028d2299790a38262b795b8409cbfcc37 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
"""
Daten holen
-----------
<server>/api/info/<year>
Test durchführen
----------------
<server>/api/run
PDF Ausgabe
-----------
<server>/api/pdf
"""
__author__ = "R. Bauer"
__copyright__ = "MedPhyDO - Machbarkeitsstudien des Instituts für Medizinische Strahlenphysik und Strahlenschutz a... | 30.103253 | 209 | 0.503547 |
6b281d6dcd7020db37a0d1c6de9e3b8503469676 | 8,740 | py | Python | tests/cli/test_rasa_data.py | chaneyjd/rasa | 104a9591fc10b96eaa7fe402b6d64ca652b7ebe2 | [
"Apache-2.0"
] | null | null | null | tests/cli/test_rasa_data.py | chaneyjd/rasa | 104a9591fc10b96eaa7fe402b6d64ca652b7ebe2 | [
"Apache-2.0"
] | 46 | 2020-09-26T11:36:38.000Z | 2022-03-01T13:38:02.000Z | tests/cli/test_rasa_data.py | chaneyjd/rasa | 104a9591fc10b96eaa7fe402b6d64ca652b7ebe2 | [
"Apache-2.0"
] | null | null | null | import argparse
import filecmp
import os
from pathlib import Path
from unittest.mock import Mock
import pytest
from collections import namedtuple
from typing import Callable, Text
from _pytest.monkeypatch import MonkeyPatch
from _pytest.pytester import RunResult
from rasa.cli import data
from rasa.shared.importers.imp... | 26.089552 | 91 | 0.607323 |
86615cffbffe477cf95fdfc96db868232985512a | 11,056 | py | Python | exercises/networking_selfpaced/networking-workshop/collections/ansible_collections/community/general/plugins/lookup/passwordstore.py | tr3ck3r/linklight | 5060f624c235ecf46cb62cefcc6bddc6bf8ca3e7 | [
"MIT"
] | null | null | null | exercises/networking_selfpaced/networking-workshop/collections/ansible_collections/community/general/plugins/lookup/passwordstore.py | tr3ck3r/linklight | 5060f624c235ecf46cb62cefcc6bddc6bf8ca3e7 | [
"MIT"
] | null | null | null | exercises/networking_selfpaced/networking-workshop/collections/ansible_collections/community/general/plugins/lookup/passwordstore.py | tr3ck3r/linklight | 5060f624c235ecf46cb62cefcc6bddc6bf8ca3e7 | [
"MIT"
] | null | null | null | # (c) 2017, Patrick Deelman <patrick@patrickdeelman.nl>
# (c) 2017 Ansible Project
# 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__ = type
DOCUMENTATION = '''
lookup: passwordstore
auth... | 39.345196 | 135 | 0.606006 |
86b6910baf2c7704afea47d7b0f731a77fdabb3d | 4,117 | py | Python | tests/test_bt/test_mongofeed/test_mongofeed_01.py | fs714/ialgotest | eae968cff963549af40ed34745b44c1b5e20efa7 | [
"Apache-2.0"
] | null | null | null | tests/test_bt/test_mongofeed/test_mongofeed_01.py | fs714/ialgotest | eae968cff963549af40ed34745b44c1b5e20efa7 | [
"Apache-2.0"
] | null | null | null | tests/test_bt/test_mongofeed/test_mongofeed_01.py | fs714/ialgotest | eae968cff963549af40ed34745b44c1b5e20efa7 | [
"Apache-2.0"
] | 1 | 2021-11-24T18:59:12.000Z | 2021-11-24T18:59:12.000Z | from __future__ import (absolute_import, division, print_function, unicode_literals)
import backtrader as bt
from ialgotest.data_feeds.backtrader_mongo_feed import MongoFeed
# Create a Stratey
class TestStrategy(bt.Strategy):
params = (
('exitbars', 5),
)
def log(self, txt, dt=None):
''... | 32.936 | 91 | 0.596308 |
86b8a58b06665ebbc8f3131a037b37a240c103c6 | 9,537 | py | Python | lite/tools/cmake_tools/ast.py | jameswu2014/Paddle-Lite | 827e349ac8eb769a873fe9b3aa961af8b8b20a96 | [
"Apache-2.0"
] | 1 | 2020-03-09T03:51:31.000Z | 2020-03-09T03:51:31.000Z | lite/tools/cmake_tools/ast.py | tao8687/Paddle-Lite | ebc0e39c7e8c09ad2d1b6a2923a420b2c1727635 | [
"Apache-2.0"
] | null | null | null | lite/tools/cmake_tools/ast.py | tao8687/Paddle-Lite | ebc0e39c7e8c09ad2d1b6a2923a420b2c1727635 | [
"Apache-2.0"
] | 1 | 2020-02-13T10:45:37.000Z | 2020-02-13T10:45:37.000Z | # Copyright (c) 2019 PaddlePaddle Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by appli... | 26.128767 | 96 | 0.501835 |
ed77ce869ae5651adfa4ddcee81bad0edf267944 | 1,748 | py | Python | phypidaq/MLX90393Config.py | RMGrau/PhyPiDAQ | e7ea08a0d5de9772a1a5e32ccd0ab1bfddf9ff54 | [
"BSD-2-Clause"
] | 7 | 2018-11-30T13:38:27.000Z | 2021-03-10T15:37:56.000Z | phypidaq/MLX90393Config.py | RMGrau/PhyPiDAQ | e7ea08a0d5de9772a1a5e32ccd0ab1bfddf9ff54 | [
"BSD-2-Clause"
] | 5 | 2020-11-11T09:19:00.000Z | 2022-02-06T09:04:55.000Z | phypidaq/MLX90393Config.py | RMGrau/PhyPiDAQ | e7ea08a0d5de9772a1a5e32ccd0ab1bfddf9ff54 | [
"BSD-2-Clause"
] | 16 | 2019-04-16T10:15:45.000Z | 2021-12-15T14:59:31.000Z | # -*- coding: utf-8 -*-
from __future__ import print_function, division, unicode_literals
from __future__ import absolute_import
import numpy as np, time, sys
## uses Adafruit circuit-python
import busio, board
# adafruit driver class
import adafruit_mlx90393
class MLX90393Config(object):
'''digital magnetometer M... | 23.621622 | 65 | 0.581808 |
ed780723113f30236b68c12d4bc69cf26fe6be28 | 45 | py | Python | 20-fs-ias-lec/groups/09-loraSense/SenseLink/LoRaSense - Sensor/test.py | Kyrus1999/BACnet | 5be8e1377252166041bcd0b066cce5b92b077d06 | [
"MIT"
] | 8 | 2020-03-17T21:12:18.000Z | 2021-12-12T15:55:54.000Z | 20-fs-ias-lec/groups/09-loraSense/SenseLink/LoRaSense - Sensor/test.py | Kyrus1999/BACnet | 5be8e1377252166041bcd0b066cce5b92b077d06 | [
"MIT"
] | 2 | 2021-07-19T06:18:43.000Z | 2022-02-10T12:17:58.000Z | 20-fs-ias-lec/groups/09-loraSense/SenseLink/LoRaSense - Sensor/test.py | Kyrus1999/BACnet | 5be8e1377252166041bcd0b066cce5b92b077d06 | [
"MIT"
] | 25 | 2020-03-20T09:32:45.000Z | 2021-07-18T18:12:59.000Z | if __name__ == "__main__":
cmd = "freq|4" | 22.5 | 26 | 0.577778 |
13192004d409d5a9d09227e09ed1dd4fa67a269f | 4,728 | py | Python | bot/ellipse.py | lbellomo/RiCuT | 28c2cb95756607d164d757c508db9f9190754a09 | [
"MIT"
] | null | null | null | bot/ellipse.py | lbellomo/RiCuT | 28c2cb95756607d164d757c508db9f9190754a09 | [
"MIT"
] | null | null | null | bot/ellipse.py | lbellomo/RiCuT | 28c2cb95756607d164d757c508db9f9190754a09 | [
"MIT"
] | null | null | null | import numpy as np
from matplotlib import pyplot
import pyproj
def ellipse(fi_lat, fi_long,pp_lat, pp_long, vel_modulo, vel_angulo, coef_A=3.7428, coef_B=-3.9333):
'''
Return:
-------
ce_lat: latitud centro de la elipse
ce_long: longitud centro de la elipse
ps_lat: latitud del punto de salida... | 32.163265 | 120 | 0.648266 |
b93fbb0983e03323d090b63871ad135249abd2f2 | 5,458 | py | Python | python/oneflow/compatible/single_client/test/ops/test_util.py | wangyuyue/oneflow | 0a71c22fe8355392acc8dc0e301589faee4c4832 | [
"Apache-2.0"
] | 3,285 | 2020-07-31T05:51:22.000Z | 2022-03-31T15:20:16.000Z | python/oneflow/compatible/single_client/test/ops/test_util.py | wangyuyue/oneflow | 0a71c22fe8355392acc8dc0e301589faee4c4832 | [
"Apache-2.0"
] | 2,417 | 2020-07-31T06:28:58.000Z | 2022-03-31T23:04:14.000Z | python/oneflow/compatible/single_client/test/ops/test_util.py | wangyuyue/oneflow | 0a71c22fe8355392acc8dc0e301589faee4c4832 | [
"Apache-2.0"
] | 520 | 2020-07-31T05:52:42.000Z | 2022-03-29T02:38:11.000Z | """
Copyright 2020 The OneFlow 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 applicable law or agr... | 29.031915 | 88 | 0.659033 |
b9c37b11082002e1a0fc0b7a106b10ebd94c34a6 | 1,221 | py | Python | src/onegov/translator_directory/forms/language.py | politbuero-kampagnen/onegov-cloud | 20148bf321b71f617b64376fe7249b2b9b9c4aa9 | [
"MIT"
] | null | null | null | src/onegov/translator_directory/forms/language.py | politbuero-kampagnen/onegov-cloud | 20148bf321b71f617b64376fe7249b2b9b9c4aa9 | [
"MIT"
] | null | null | null | src/onegov/translator_directory/forms/language.py | politbuero-kampagnen/onegov-cloud | 20148bf321b71f617b64376fe7249b2b9b9c4aa9 | [
"MIT"
] | null | null | null | from wtforms import StringField, ValidationError
from wtforms.validators import InputRequired
from onegov.form import Form
from onegov.translator_directory import _
from onegov.translator_directory.collections.language import LanguageCollection
from onegov.translator_directory.models.language import Language
class L... | 32.131579 | 79 | 0.63145 |
b9e4fda1e3827067f041b431b49e547d9b3d328b | 2,486 | py | Python | python/tutlibs/sampling.py | Obarads/Point_Cloud_Tutorial | faf7ae8abf962ecea414cc7557dc35f4fca0e406 | [
"MIT"
] | 1 | 2021-11-22T10:32:49.000Z | 2021-11-22T10:32:49.000Z | python/tutlibs/sampling.py | Obarads/Point_Cloud_Tutorial | faf7ae8abf962ecea414cc7557dc35f4fca0e406 | [
"MIT"
] | 1 | 2021-12-09T14:39:51.000Z | 2021-12-09T14:39:51.000Z | python/tutlibs/sampling.py | Obarads/Point_Cloud_Tutorial | faf7ae8abf962ecea414cc7557dc35f4fca0e406 | [
"MIT"
] | null | null | null | """Sampling"""
import numpy as np
import pandas as pd
def furthest_point_sampling(coords: np.ndarray, num_sample: int) -> np.ndarray:
"""Furthest point sampling
Args:
coords: coords (N, C)
num_sample: number of sammple
Returns:
indices: sample indices (num_sample)
"""
N, ... | 27.932584 | 79 | 0.646822 |
910def5739a7b7d3062c9be78a8e3f7db31e4675 | 5,393 | py | Python | Packs/AzureRiskyUsers/Integrations/AzureRiskyUsers/AzureRiskyUsers_test.py | diCagri/content | c532c50b213e6dddb8ae6a378d6d09198e08fc9f | [
"MIT"
] | 799 | 2016-08-02T06:43:14.000Z | 2022-03-31T11:10:11.000Z | Packs/AzureRiskyUsers/Integrations/AzureRiskyUsers/AzureRiskyUsers_test.py | diCagri/content | c532c50b213e6dddb8ae6a378d6d09198e08fc9f | [
"MIT"
] | 9,317 | 2016-08-07T19:00:51.000Z | 2022-03-31T21:56:04.000Z | Packs/AzureRiskyUsers/Integrations/AzureRiskyUsers/AzureRiskyUsers_test.py | diCagri/content | c532c50b213e6dddb8ae6a378d6d09198e08fc9f | [
"MIT"
] | 1,297 | 2016-08-04T13:59:00.000Z | 2022-03-31T23:43:06.000Z | from AzureRiskyUsers import Client
import json
BASE_URL = 'https://graph.microsoft.com/v1.0/'
ACCESS_TOKEN_REQUEST_URL = 'https://login.microsoftonline.com/organizations/oauth2/v2.0/token'
def load_mock_response(file_name: str) -> dict:
"""
Load one of the mock responses to be used for assertion.
Args:
... | 35.248366 | 94 | 0.69516 |
fc1aabdc364bce106fb83064cdb9f7b69693c108 | 130 | py | Python | python/pathlib/origin/join_path.py | zeroam/TIL | 43e3573be44c7f7aa4600ff8a34e99a65cbdc5d1 | [
"MIT"
] | null | null | null | python/pathlib/origin/join_path.py | zeroam/TIL | 43e3573be44c7f7aa4600ff8a34e99a65cbdc5d1 | [
"MIT"
] | null | null | null | python/pathlib/origin/join_path.py | zeroam/TIL | 43e3573be44c7f7aa4600ff8a34e99a65cbdc5d1 | [
"MIT"
] | null | null | null | from pathlib import Path
path = Path.home()
docs = path / 'Documents'
pictures = path / 'Pictures'
print(docs)
print(pictures)
| 13 | 28 | 0.707692 |
fc4376be472b550a92661ba0fca41164ba2063b5 | 713 | py | Python | libapp/migrations/0003_auto_20210527_1250.py | StephenWayen/LibMS | df6078a8171f77b75f2ad3ac91e9747ef753d2a6 | [
"MIT"
] | 2 | 2021-05-31T13:11:50.000Z | 2021-06-05T04:37:51.000Z | libapp/migrations/0003_auto_20210527_1250.py | StephenWayen/LibMS | df6078a8171f77b75f2ad3ac91e9747ef753d2a6 | [
"MIT"
] | null | null | null | libapp/migrations/0003_auto_20210527_1250.py | StephenWayen/LibMS | df6078a8171f77b75f2ad3ac91e9747ef753d2a6 | [
"MIT"
] | null | null | null | # Generated by Django 3.2 on 2021-05-27 12:50
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('libapp', '0002_auto_20210525_1508'),
]
operations = [
migrations.AddField(
model_name='cip',
name='clazz',
... | 29.708333 | 191 | 0.553997 |
5d842b81242410d837c2e4fa65fb771c224960fc | 13,424 | py | Python | Windows-Python-RAT-mater/Windows-Python-RAT.py | Zusyaku/Termux-And-Lali-Linux-V2 | b1a1b0841d22d4bf2cc7932b72716d55f070871e | [
"Apache-2.0"
] | 2 | 2021-11-17T03:35:03.000Z | 2021-12-08T06:00:31.000Z | Windows-Python-RAT-mater/Windows-Python-RAT.py | Zusyaku/Termux-And-Lali-Linux-V2 | b1a1b0841d22d4bf2cc7932b72716d55f070871e | [
"Apache-2.0"
] | null | null | null | Windows-Python-RAT-mater/Windows-Python-RAT.py | Zusyaku/Termux-And-Lali-Linux-V2 | b1a1b0841d22d4bf2cc7932b72716d55f070871e | [
"Apache-2.0"
] | 2 | 2021-11-05T18:07:48.000Z | 2022-02-24T21:25:07.000Z | #########################################################
# Windows-Python-RAT #
# [R]emote [A]dministrator [T]ool #
# GitHub: https://github.com/Windows-Python-RAT #
# ##################################################### #
# Coded By Sir.4m1R (Amir Hossein... | 38.910145 | 238 | 0.663215 |
5d8a7fea2b12d89916488d8536a7d4dd517ad0be | 3,807 | py | Python | exercises/networking_selfpaced/networking-workshop/collections/ansible_collections/community/general/plugins/module_utils/gitlab.py | tr3ck3r/linklight | 5060f624c235ecf46cb62cefcc6bddc6bf8ca3e7 | [
"MIT"
] | null | null | null | exercises/networking_selfpaced/networking-workshop/collections/ansible_collections/community/general/plugins/module_utils/gitlab.py | tr3ck3r/linklight | 5060f624c235ecf46cb62cefcc6bddc6bf8ca3e7 | [
"MIT"
] | null | null | null | exercises/networking_selfpaced/networking-workshop/collections/ansible_collections/community/general/plugins/module_utils/gitlab.py | tr3ck3r/linklight | 5060f624c235ecf46cb62cefcc6bddc6bf8ca3e7 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
# Copyright: (c) 2019, Guillaume Martinez (lunik@tiwabbit.fr)
# Copyright: (c) 2018, Marcus Watkins <marwatk@marcuswatkins.net>
# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
from __future__ import absolute_import
import json
from distutils.version... | 36.257143 | 134 | 0.701865 |
4ad50a4aa93e876c95e929e58fd12a55d84b383e | 5,263 | py | Python | Packs/Traps/Integrations/PaloAltoNetworks_Traps/PaloAltoNetworks_Traps_test.py | diCagri/content | c532c50b213e6dddb8ae6a378d6d09198e08fc9f | [
"MIT"
] | 799 | 2016-08-02T06:43:14.000Z | 2022-03-31T11:10:11.000Z | Packs/Traps/Integrations/PaloAltoNetworks_Traps/PaloAltoNetworks_Traps_test.py | diCagri/content | c532c50b213e6dddb8ae6a378d6d09198e08fc9f | [
"MIT"
] | 9,317 | 2016-08-07T19:00:51.000Z | 2022-03-31T21:56:04.000Z | Packs/Traps/Integrations/PaloAltoNetworks_Traps/PaloAltoNetworks_Traps_test.py | diCagri/content | c532c50b213e6dddb8ae6a378d6d09198e08fc9f | [
"MIT"
] | 1,297 | 2016-08-04T13:59:00.000Z | 2022-03-31T23:43:06.000Z | import demistomock as demisto
SERVER_MOCK_URL = 'https://demisto.mock.mybrz.net/xapi/v1/'
integration_params = {
"application_id": "bcab5b57-6ca4-43ee-a4c0-618a2246d4ac",
"insecure": True,
# fake data
"private_key": "-----BEGIN PRIVATE KEY-----\nMIIBVAIBADANBgkqhkiG9w0BAQEFAASCAT4wggE6AgEAAkEAyf1wyfST... | 42.104 | 116 | 0.66901 |
9191ebb59d076a6d3a47786182df73d773b802ca | 544 | py | Python | bibliothek/hilfprogramme.py | techrabbit58/uebung_informatik_vorkurs | e99312ae66ccccd6bfe45bfd3c3f43c01690659c | [
"Unlicense"
] | null | null | null | bibliothek/hilfprogramme.py | techrabbit58/uebung_informatik_vorkurs | e99312ae66ccccd6bfe45bfd3c3f43c01690659c | [
"Unlicense"
] | null | null | null | bibliothek/hilfprogramme.py | techrabbit58/uebung_informatik_vorkurs | e99312ae66ccccd6bfe45bfd3c3f43c01690659c | [
"Unlicense"
] | null | null | null | """
Hilfsprogramme.
"""
def float_number_input(prompt, german=False):
while True:
result = input(prompt)
if german:
result = result.replace(',', '.')
try:
result = float(result)
except ValueError:
print('Fehler. Das war keine Zahl. Bitte nochmal.... | 22.666667 | 63 | 0.551471 |
91b718ccbdd426802efffb63ef45c4d5a53f8216 | 352 | py | Python | unique-paths/unique-paths.py | hyeseonko/LeetCode | 48dfc93f1638e13041d8ce1420517a886abbdc77 | [
"MIT"
] | 2 | 2021-12-05T14:29:06.000Z | 2022-01-01T05:46:13.000Z | unique-paths/unique-paths.py | hyeseonko/LeetCode | 48dfc93f1638e13041d8ce1420517a886abbdc77 | [
"MIT"
] | null | null | null | unique-paths/unique-paths.py | hyeseonko/LeetCode | 48dfc93f1638e13041d8ce1420517a886abbdc77 | [
"MIT"
] | null | null | null | class Solution:
def uniquePaths(self, m: int, n: int) -> int:
# solution 1. dp
# solution 2. math : (m+n-2)C(min(m-1,n-1))
output=1
bunmo=1
for i, bunja in enumerate(range(m+n-2, max(m-1,n-1),-1)):
output*=bunja
bunmo*=(i+1)
return int(output/b... | 27.076923 | 65 | 0.465909 |
533dc0d3b8bd8e5aee57edebcb7072fb1431131c | 2,635 | py | Python | Dockerfiles/gedlab-khmer-filter-abund/pymodules/python2.7/lib/python/ipython_cluster_helper-0.3.2-py2.7.egg/cluster_helper/slurm.py | poojavade/Genomics_Docker | 829b5094bba18bbe03ae97daf925fee40a8476e8 | [
"Apache-2.0"
] | 1 | 2019-07-29T02:53:51.000Z | 2019-07-29T02:53:51.000Z | Dockerfiles/gedlab-khmer-filter-abund/pymodules/python2.7/lib/python/ipython_cluster_helper-0.3.2-py2.7.egg/cluster_helper/slurm.py | poojavade/Genomics_Docker | 829b5094bba18bbe03ae97daf925fee40a8476e8 | [
"Apache-2.0"
] | 1 | 2021-09-11T14:30:32.000Z | 2021-09-11T14:30:32.000Z | Dockerfiles/gedlab-khmer-filter-abund/pymodules/python2.7/lib/python/ipython_cluster_helper-0.3.2-py2.7.egg/cluster_helper/slurm.py | poojavade/Genomics_Docker | 829b5094bba18bbe03ae97daf925fee40a8476e8 | [
"Apache-2.0"
] | 2 | 2016-12-19T02:27:46.000Z | 2019-07-29T02:53:54.000Z | import subprocess
def get_accounts(user):
"""
get all accounts a user can use to submit a job
"""
cmd = "sshare -p --noheader"
out, err = subprocess.Popen(cmd, shell=True, stdout=subprocess.PIPE).communicate()
accounts = []
for line in out.splitlines():
line = line.split('|')
... | 36.597222 | 128 | 0.634156 |
fea833130f3026083f26c13f5b45fd818ff15908 | 278 | py | Python | Chapter3_BasicFeatures/MemoryManagement/local_and_global_scope.py | tomex74/UdemyPythonPro | b4b83483fa2d3337a2860d53ff38e68eb38b3ac4 | [
"MIT"
] | null | null | null | Chapter3_BasicFeatures/MemoryManagement/local_and_global_scope.py | tomex74/UdemyPythonPro | b4b83483fa2d3337a2860d53ff38e68eb38b3ac4 | [
"MIT"
] | null | null | null | Chapter3_BasicFeatures/MemoryManagement/local_and_global_scope.py | tomex74/UdemyPythonPro | b4b83483fa2d3337a2860d53ff38e68eb38b3ac4 | [
"MIT"
] | null | null | null | # from my_lib import POWER_OF
from my_lib import my_function , POWER_OF
def main():
my_int_value = 3
# my_bool = True
# my_float = 2.5
my_function(my_int_value)
print(dir())
print(globals())
print(locals())
if __name__ == "__main__":
main()
| 15.444444 | 41 | 0.633094 |
a3c1a5c720ad602dbe2943fe58160d9b2b0f0020 | 1,515 | py | Python | decrypt.py | Gelbana/bbtag-stuff | 25384ef633e58b4d69684478863ec9ca9802f2f6 | [
"MIT"
] | null | null | null | decrypt.py | Gelbana/bbtag-stuff | 25384ef633e58b4d69684478863ec9ca9802f2f6 | [
"MIT"
] | null | null | null | decrypt.py | Gelbana/bbtag-stuff | 25384ef633e58b4d69684478863ec9ca9802f2f6 | [
"MIT"
] | null | null | null | import os,struct
#Array of magic numbers extracted from in-game function
chars = [0xF5, 0x5C, 0x84, 0x2A, 0xAD, 0x61, 0x54, 0xE7, 0x0A, 0xFC,
0x99, 0x6B, 0xD5, 0xA4, 0xD3, 0xD8, 0x48, 0x26, 0x69, 0xCB,
0x07, 0x42, 0x13, 0x5E, 0x10, 0x23, 0xD2, 0x6D, 0x36, 0xC7,
0xC1, 0x66, 0xDF, 0xA1, 0xAD, 0xF1, 0x44, 0x44, ... | 26.12069 | 74 | 0.631683 |
43b80b6316c7bc81f96942895578fa30e37f5742 | 4,735 | py | Python | Packs/DeveloperTools/Scripts/WaitAndCompleteTask/WaitAndCompleteTask_test.py | PAM360/content | 928aac9c586c6e593b2a452c402a37cb5df28dac | [
"MIT"
] | 2 | 2021-12-06T21:38:24.000Z | 2022-01-13T08:23:36.000Z | Packs/DeveloperTools/Scripts/WaitAndCompleteTask/WaitAndCompleteTask_test.py | PAM360/content | 928aac9c586c6e593b2a452c402a37cb5df28dac | [
"MIT"
] | 87 | 2022-02-23T12:10:53.000Z | 2022-03-31T11:29:05.000Z | Packs/DeveloperTools/Scripts/WaitAndCompleteTask/WaitAndCompleteTask_test.py | PAM360/content | 928aac9c586c6e593b2a452c402a37cb5df28dac | [
"MIT"
] | 2 | 2022-01-05T15:27:01.000Z | 2022-02-01T19:27:43.000Z | import pytest
from WaitAndCompleteTask import wait_and_complete_task_command
TASK_BY_STATES = [
{
'name': 'conditional task 1',
'id': 1,
'parentPlaybookID': 123,
'state': 'Waiting'
},
{
'name': 'conditional task 2',
'id': 2,
'parentPlaybookID': 123,
... | 31.151316 | 115 | 0.608025 |
60607e7db06620043940cb100cbb1c750621c465 | 880 | py | Python | leetcode/166-Fraction-to-Recurring-Decimal/FracToRecDec_001.py | cc13ny/all-in | bc0b01e44e121ea68724da16f25f7e24386c53de | [
"MIT"
] | 1 | 2015-12-16T04:01:03.000Z | 2015-12-16T04:01:03.000Z | leetcode/166-Fraction-to-Recurring-Decimal/FracToRecDec_001.py | cc13ny/all-in | bc0b01e44e121ea68724da16f25f7e24386c53de | [
"MIT"
] | 1 | 2016-02-09T06:00:07.000Z | 2016-02-09T07:20:13.000Z | leetcode/166-Fraction-to-Recurring-Decimal/FracToRecDec_001.py | cc13ny/all-in | bc0b01e44e121ea68724da16f25f7e24386c53de | [
"MIT"
] | 2 | 2019-06-27T09:07:26.000Z | 2019-07-01T04:40:13.000Z | class Solution(object):
def fractionToDecimal(self, numerator, denominator):
"""
:type numerator: int
:type denominator: int
:rtype: str
"""
if numerator == 0: return '0'
s1 = 1 if numerator > 0 else -1
s2 = 1 if denominator > 0 else -1
sign ... | 25.142857 | 56 | 0.415909 |
60aa2ef7f111673250a71737d386974bb29bc2ff | 337 | py | Python | Online-Judges/CodingBat/Python/Warmup-02/09-string_match.py | shihab4t/Competitive-Programming | e8eec7d4f7d86bfa1c00b7fbbedfd6a1518f19be | [
"Unlicense"
] | 3 | 2021-06-15T01:19:23.000Z | 2022-03-16T18:23:53.000Z | Online-Judges/CodingBat/Python/Warmup-02/09-string_match.py | shihab4t/Competitive-Programming | e8eec7d4f7d86bfa1c00b7fbbedfd6a1518f19be | [
"Unlicense"
] | null | null | null | Online-Judges/CodingBat/Python/Warmup-02/09-string_match.py | shihab4t/Competitive-Programming | e8eec7d4f7d86bfa1c00b7fbbedfd6a1518f19be | [
"Unlicense"
] | null | null | null | def string_match(a, b):
count = 0
if len(a) <= len(b):
for i in range(len(a)-1):
if a[i] == b[i] and a[i+1] == b[i+1]:
count += 1
return count
else:
for i in range(len(b)-1):
if a[i] == b[i] and a[i+1] == b[i+1]:
count += 1
... | 25.923077 | 49 | 0.394659 |
71b2505cff4bc7c6327ff19970751df670b7616e | 777 | py | Python | resources/mechanics_lib/FixedLegsTest.py | PRECISE/ROSLab | 2a6a295b71d4c73bc5c6ae2ec0330274afa31d0d | [
"Apache-2.0"
] | 7 | 2016-01-20T02:33:00.000Z | 2021-02-04T04:06:57.000Z | resources/mechanics_lib/FixedLegsTest.py | PRECISE/ROSLab | 2a6a295b71d4c73bc5c6ae2ec0330274afa31d0d | [
"Apache-2.0"
] | null | null | null | resources/mechanics_lib/FixedLegsTest.py | PRECISE/ROSLab | 2a6a295b71d4c73bc5c6ae2ec0330274afa31d0d | [
"Apache-2.0"
] | 3 | 2016-10-05T07:20:30.000Z | 2017-11-20T10:36:50.000Z | from google.protobuf import text_format
from api import proto_conversion
from api.symbolic import *
from api.component import Component
# Load new component object from yaml definition
f = Component("FixedLegs.yaml")
# Define free parameters
f.setParameter("depth", 9)
f.setParameter("height", 50)
f.setParameter("leng... | 25.064516 | 85 | 0.770914 |
e0f9ebef10a270374578902b40633bcd6363657d | 2,876 | py | Python | skimind/kernel/learningModels/prediction.py | NathBangwa/SkimindFoot | 8ae3a00074c56dd981fbfdab30e29898ddcaf6be | [
"MIT"
] | 1 | 2020-11-13T18:30:47.000Z | 2020-11-13T18:30:47.000Z | skimind/kernel/learningModels/prediction.py | nathanbangwa243/SkimindFoot | 8ae3a00074c56dd981fbfdab30e29898ddcaf6be | [
"MIT"
] | 5 | 2020-11-13T18:16:48.000Z | 2021-09-08T01:04:59.000Z | skimind/kernel/learningModels/prediction.py | nathanbangwa243/SkimindFoot | 8ae3a00074c56dd981fbfdab30e29898ddcaf6be | [
"MIT"
] | null | null | null | #-*-coding: utf-8 -*-
# tools
import pandas as pd
import numpy as np
import tensorflow as tf
# training and evaluation
from . import trainEval
from . import trainModel
# preprocessing
from . import preprocessing
# interfacedb
from . import interfacedb
# config
from . import config
# global config
from . import... | 28.475248 | 122 | 0.558414 |
461c237f8cc3f98ea6c8883ee48dd6c06251c1f7 | 1,331 | py | Python | src/ingestion/sources/redshift.py | monosidev/monosi | a88b689fc74010b10dbabb32f4b2bdeae865f4d5 | [
"Apache-2.0"
] | 156 | 2021-11-19T18:50:14.000Z | 2022-03-31T19:48:59.000Z | src/ingestion/sources/redshift.py | monosidev/monosi | a88b689fc74010b10dbabb32f4b2bdeae865f4d5 | [
"Apache-2.0"
] | 30 | 2021-12-27T19:30:56.000Z | 2022-03-30T17:49:00.000Z | src/ingestion/sources/redshift.py | monosidev/monosi | a88b689fc74010b10dbabb32f4b2bdeae865f4d5 | [
"Apache-2.0"
] | 14 | 2022-01-17T23:24:34.000Z | 2022-03-29T09:27:47.000Z | import json
from ingestion.sources.base import SQLAlchemyExtractor
from .postgresql import PostgreSQLSource, PostgreSQLSourceConfiguration, PostgreSQLSourceDialect
class RedshiftSourceConfiguration(PostgreSQLSourceConfiguration):
def _connection_string_prefix(self) -> str:
return "redshift+psycopg2"
... | 32.463415 | 109 | 0.733283 |
40f1a0646f3b80868c0b5e22600ae9768468ebf5 | 8,340 | py | Python | Image Processing/Versuch B/AStar.py | vincentscode/Praktikum-Hochschule-Trier | c2802364644c889e021726a7e6babaacd8978f47 | [
"MIT"
] | null | null | null | Image Processing/Versuch B/AStar.py | vincentscode/Praktikum-Hochschule-Trier | c2802364644c889e021726a7e6babaacd8978f47 | [
"MIT"
] | null | null | null | Image Processing/Versuch B/AStar.py | vincentscode/Praktikum-Hochschule-Trier | c2802364644c889e021726a7e6babaacd8978f47 | [
"MIT"
] | null | null | null | import matplotlib.pyplot as plt
import math
from operator import itemgetter
show_animation = False
class Node:
def __init__(self, x, y, cost, pind):
self.x = x
self.y = y
self.cost = cost
self.pind = pind
def __str__(self):
return str(self.x) + "," + str(self.y) + ",... | 24.674556 | 92 | 0.493645 |
4646cf03152e8cca8bdb73f8b8e6e5fabc0bbb01 | 5,095 | py | Python | backend/songwriter/urls.py | giliam/turbo-songwriter | 3d100b08dc19c60d7a1324120e06bd9f971eea5a | [
"MIT"
] | null | null | null | backend/songwriter/urls.py | giliam/turbo-songwriter | 3d100b08dc19c60d7a1324120e06bd9f971eea5a | [
"MIT"
] | 12 | 2017-09-25T20:13:29.000Z | 2020-02-12T00:12:41.000Z | backend/songwriter/urls.py | giliam/turbo-songwriter | 3d100b08dc19c60d7a1324120e06bd9f971eea5a | [
"MIT"
] | null | null | null | # coding: utf-8
from django.conf.urls import url
from rest_framework.urlpatterns import format_suffix_patterns
from songwriter import views
urlpatterns = [
url(r'^$', views.api_root,
name="root"),
url(r'^songs/list/$', views.SongList.as_view(),
name="songs_list"),
url(r'^songs/list/pagin... | 43.177966 | 97 | 0.648871 |
d3b39772f9287e26761190057b7d389a8e61178b | 432 | py | Python | 0-notes/job-search/Cracking the Coding Interview/C06MathLogicPuzzles/questions/6.4-question.py | eengineergz/Lambda | 1fe511f7ef550aed998b75c18a432abf6ab41c5f | [
"MIT"
] | null | null | null | 0-notes/job-search/Cracking the Coding Interview/C06MathLogicPuzzles/questions/6.4-question.py | eengineergz/Lambda | 1fe511f7ef550aed998b75c18a432abf6ab41c5f | [
"MIT"
] | null | null | null | 0-notes/job-search/Cracking the Coding Interview/C06MathLogicPuzzles/questions/6.4-question.py | eengineergz/Lambda | 1fe511f7ef550aed998b75c18a432abf6ab41c5f | [
"MIT"
] | null | null | null | # 6.4 Ants on a Triangle
# There are 3 ants on different vertices of a triangle.
# What is the probability of collision, between any 2 or all of them, if they start walking on the sides of the triangle?
# Assume that each ant:
# randomly picks a direction with either direction likely to be chosen AND
# that t... | 43.2 | 121 | 0.747685 |
3181e5635ee3aa86a075f43de89e905f08f2a20d | 730 | py | Python | dist/packages/.config/tint2/components/system/system-state.py | rongworks/open-gecko-de | 37ec52bbea1fa13fbb44bbd7162c96afffcf9f16 | [
"MIT"
] | 2 | 2018-03-27T21:11:20.000Z | 2018-11-11T19:49:55.000Z | dist/packages/.config/tint2/components/system/system-state.py | rongworks/open-gecko-de | 37ec52bbea1fa13fbb44bbd7162c96afffcf9f16 | [
"MIT"
] | 9 | 2018-03-18T19:14:04.000Z | 2018-06-29T07:35:00.000Z | dist/packages/.config/tint2/components/system/system-state.py | rongworks/open-gecko-de | 37ec52bbea1fa13fbb44bbd7162c96afffcf9f16 | [
"MIT"
] | null | null | null | import psutil
import sys
def main():
if len(sys.argv) < 1:
print("No arguments!")
else:
result = ''
for command in sys.argv:
if command in 'cpu':
result += cpu_percent()
elif command in 'mem':
result += mem_percent()
elif command in 'disk':
result += disk_percent()
print (result)
... | 20.857143 | 58 | 0.616438 |
3198c0a4398b11e6ccc8ccd18f4980f2451ed97a | 16,565 | py | Python | wagtail_localize/test/migrations/0001_initial.py | th3hamm0r/wagtail-localize | e9e0ba9245060c65e3247b62739abbed71bc2516 | [
"BSD-3-Clause"
] | 6 | 2019-09-10T19:53:55.000Z | 2019-11-14T16:57:07.000Z | wagtail_localize/test/migrations/0001_initial.py | th3hamm0r/wagtail-localize | e9e0ba9245060c65e3247b62739abbed71bc2516 | [
"BSD-3-Clause"
] | 17 | 2019-07-11T11:17:37.000Z | 2019-11-19T16:40:31.000Z | wagtail_localize/test/migrations/0001_initial.py | th3hamm0r/wagtail-localize | e9e0ba9245060c65e3247b62739abbed71bc2516 | [
"BSD-3-Clause"
] | 2 | 2019-09-30T20:23:39.000Z | 2019-10-31T14:09:31.000Z | # Generated by Django 3.0.6 on 2020-07-17 15:07
from django.db import migrations, models
import django.db.models.deletion
import modelcluster.fields
import uuid
import wagtail.core.blocks
import wagtail.core.fields
import wagtail_localize.test.models
class Migration(migrations.Migration):
initial = True
de... | 39.068396 | 88 | 0.367582 |
81fff4f6e7dc196be3cc2ae577d4f8f0a99b1c64 | 210,384 | py | Python | tdfTools.py | dfdean/mlLib | 3ea535c6b032f61e91f2d16ff75bf2796ef1a27f | [
"MIT"
] | null | null | null | tdfTools.py | dfdean/mlLib | 3ea535c6b032f61e91f2d16ff75bf2796ef1a27f | [
"MIT"
] | null | null | null | tdfTools.py | dfdean/mlLib | 3ea535c6b032f61e91f2d16ff75bf2796ef1a27f | [
"MIT"
] | null | null | null | #####################################################################################
#
# Copyright (c) 2020 Dawson Dean
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
# in the Software without restrictio... | 45.050107 | 219 | 0.576146 |
c37266d8c140b2bce1dc936328419ae13bbe435a | 175 | py | Python | python/python_new/Python 3/untitled1x.py | SayanGhoshBDA/code-backup | 8b6135facc0e598e9686b2e8eb2d69dd68198b80 | [
"MIT"
] | 16 | 2018-11-26T08:39:42.000Z | 2019-05-08T10:09:52.000Z | python/python_new/Python 3/untitled1x.py | SayanGhoshBDA/code-backup | 8b6135facc0e598e9686b2e8eb2d69dd68198b80 | [
"MIT"
] | 8 | 2020-05-04T06:29:26.000Z | 2022-02-12T05:33:16.000Z | python/python_new/Python 3/untitled1x.py | SayanGhoshBDA/code-backup | 8b6135facc0e598e9686b2e8eb2d69dd68198b80 | [
"MIT"
] | 5 | 2020-02-11T16:02:21.000Z | 2021-02-05T07:48:30.000Z | import numpy as np
a=np.array([[2,4,5],[2,4,8],[4,7,11]],dtype=np.float64)
c=a.dtype
print(c)
b=a.shape
print(b)
x=np.array([[1+2j,3+1j],[3,4],[5,8]],dtype=complex)
print(x) | 19.444444 | 55 | 0.622857 |
d2a3ff7c02e3405115a9d1c429ca842a264704c4 | 172 | py | Python | 2_Iterables/Sets/set_comprehension.py | felixdittrich92/Python3 | 16b767465e4bdf0adc652c195d15384bb9faa4cf | [
"MIT"
] | 1 | 2022-03-02T07:16:30.000Z | 2022-03-02T07:16:30.000Z | 2_Iterables/Sets/set_comprehension.py | felixdittrich92/Python3 | 16b767465e4bdf0adc652c195d15384bb9faa4cf | [
"MIT"
] | null | null | null | 2_Iterables/Sets/set_comprehension.py | felixdittrich92/Python3 | 16b767465e4bdf0adc652c195d15384bb9faa4cf | [
"MIT"
] | null | null | null | # Set Comprehension
my_set_comp = {i for i in range(10)}
print(my_set_comp)
my_set_comp2 = {i if i % 2 == 0 else -1 for i in range(10) if i % 3 == 1}
print(my_set_comp2)
| 21.5 | 73 | 0.668605 |
8273aaf4902d2ae46bc9358b7aa10cfa1d1da0f7 | 2,619 | py | Python | _search/server/tsutil.py | NicoKiaru/imagej.github.io | e334937e361f1aa0ad45cf46ba5c8fadfc32be28 | [
"CC-BY-3.0"
] | 16 | 2020-08-03T20:08:00.000Z | 2022-03-02T15:50:47.000Z | _search/server/tsutil.py | NicoKiaru/imagej.github.io | e334937e361f1aa0ad45cf46ba5c8fadfc32be28 | [
"CC-BY-3.0"
] | 196 | 2015-09-14T19:15:07.000Z | 2022-03-31T02:22:39.000Z | _search/server/tsutil.py | NicoKiaru/imagej.github.io | e334937e361f1aa0ad45cf46ba5c8fadfc32be28 | [
"CC-BY-3.0"
] | 60 | 2020-06-04T14:18:37.000Z | 2022-03-30T23:10:55.000Z | #!/bin/env python
import logging, os
import typesense
logger = logging.getLogger(__name__)
def connect():
"""
Open a connection to the typesense server.
"""
api_key = os.getenv('TYPESENSE_API_KEY')
if not api_key:
try:
with open('/etc/typesense/typesense-server.ini') as f:
... | 27.861702 | 100 | 0.610157 |
828b2398c1de08fe9c613c2dd1ee88e90eda2d87 | 4,679 | py | Python | nettests/server/payengine.py | Laighno/evt | 90b94e831aebb62c6ad19ce59c9089e9f51cfd77 | [
"MIT"
] | 1,411 | 2018-04-23T03:57:30.000Z | 2022-02-13T10:34:22.000Z | nettests/server/payengine.py | Zhang-Zexi/evt | e90fe4dbab4b9512d120c79f33ecc62791e088bd | [
"Apache-2.0"
] | 27 | 2018-06-11T10:34:42.000Z | 2019-07-27T08:50:02.000Z | nettests/server/payengine.py | Zhang-Zexi/evt | e90fe4dbab4b9512d120c79f33ecc62791e088bd | [
"Apache-2.0"
] | 364 | 2018-06-09T12:11:53.000Z | 2020-12-15T03:26:48.000Z | import json
import logging
import random
from datetime import datetime
import click
from twisted.internet import reactor
from pyevt import evt_link
from pyevtsdk import api, base
from pyevtsdk.action import ActionGenerator
from pyevtsdk.transaction import TrxGenerator
from watchpool import WatchPool
logger = logging... | 31.614865 | 99 | 0.618081 |
7deab9e4b0a4665636170c4afcc62492a8b94a2b | 3,526 | py | Python | library/core/ptnetworkaccessmanager.py | ptphp/PtServer | d590360f853a64e989ba52591548b8a67390f27c | [
"BSD-3-Clause"
] | 1 | 2017-08-09T23:15:15.000Z | 2017-08-09T23:15:15.000Z | library/core/ptnetworkaccessmanager.py | ptphp/PtServer | d590360f853a64e989ba52591548b8a67390f27c | [
"BSD-3-Clause"
] | null | null | null | library/core/ptnetworkaccessmanager.py | ptphp/PtServer | d590360f853a64e989ba52591548b8a67390f27c | [
"BSD-3-Clause"
] | null | null | null | from PySide.QtNetwork import QNetworkAccessManager
from PySide.QtNetwork import QNetworkProxy
from PySide.QtCore import SIGNAL, QUrl
import urlparse
class PtNetworkAccessManager(QNetworkAccessManager):
_url_filter = []
def __init__(self, parent):
QNetworkAccessManager.__init__(self, parent)
sel... | 39.617978 | 91 | 0.568633 |
c4dc2251c97bc851bbf96be095e7a8a409aba6bc | 1,065 | py | Python | src/compile.py | strellic/PulseLang | 72730ec4c2967f004e9bf19dcd7bbef097824973 | [
"MIT"
] | 1 | 2020-09-24T05:57:25.000Z | 2020-09-24T05:57:25.000Z | src/compile.py | strellic/PulseLang | 72730ec4c2967f004e9bf19dcd7bbef097824973 | [
"MIT"
] | null | null | null | src/compile.py | strellic/PulseLang | 72730ec4c2967f004e9bf19dcd7bbef097824973 | [
"MIT"
] | null | null | null | # Pulse compiler (uses clang)
import subprocess
import sys
import os.path
import tempfile
from llvm import compile_llvm
from error import errors_reported
_rtlib = os.path.join(os.path.dirname(__file__), 'pulsert.c')
# clang installation
CLANG = 'clang'
def main():
if len(sys.argv) != 2:
sys.stderr.writ... | 26.625 | 107 | 0.632864 |
6fcb32ff0f536c1018fe858c7665e691016fbec3 | 6,696 | py | Python | preprocessing/conversion.py | mWollenhaupt/Mask_R-CNN_3D-Buildings | 220f20b41a7290a01c0bb47672453e646254f8fc | [
"MIT"
] | 2 | 2021-05-20T22:49:28.000Z | 2021-06-16T06:35:07.000Z | preprocessing/conversion.py | mWollenhaupt/Mask_R-CNN_3D-Buildings | 220f20b41a7290a01c0bb47672453e646254f8fc | [
"MIT"
] | null | null | null | preprocessing/conversion.py | mWollenhaupt/Mask_R-CNN_3D-Buildings | 220f20b41a7290a01c0bb47672453e646254f8fc | [
"MIT"
] | null | null | null | import os
import arcpy
import subprocess
from utils.multiprocessing import ThreadPool
from utils.logger import ProgressLogger
import shutil
from utils import resources
arcpy.env.overwriteOutput = True
def convert_LAZ_to_LAS(file, dst_dir, target_type):
file_name, extension = os.path.splitext(os.path.basename(fil... | 47.15493 | 172 | 0.61813 |
6fcc1a705a1e891f059c1abcc7744c72f945be74 | 3,155 | py | Python | Packs/CommonScripts/Scripts/URLSSLVerification/URLSSLVerification.py | diCagri/content | c532c50b213e6dddb8ae6a378d6d09198e08fc9f | [
"MIT"
] | 799 | 2016-08-02T06:43:14.000Z | 2022-03-31T11:10:11.000Z | Packs/CommonScripts/Scripts/URLSSLVerification/URLSSLVerification.py | diCagri/content | c532c50b213e6dddb8ae6a378d6d09198e08fc9f | [
"MIT"
] | 9,317 | 2016-08-07T19:00:51.000Z | 2022-03-31T21:56:04.000Z | Packs/CommonScripts/Scripts/URLSSLVerification/URLSSLVerification.py | diCagri/content | c532c50b213e6dddb8ae6a378d6d09198e08fc9f | [
"MIT"
] | 1,297 | 2016-08-04T13:59:00.000Z | 2022-03-31T23:43:06.000Z | import requests
import demistomock as demisto # noqa: F401
from CommonServerPython import * # noqa: F401
NON_SSL_PREFIX = "http"
SSL_PREFIX = "https"
VENDOR = "URL SSL Verification"
SUSPICIOUS_SCORE = 2
URL_REGEX_PATTERN = r',(?=https?://)'
def arg_to_list_with_regex(arg):
"""
Converts a string rep... | 28.169643 | 98 | 0.554992 |
d21cc57fada44ffe4cbe5c72dff98fea066c8d90 | 4,264 | py | Python | Resource/toQuery.py | qiaw99/DBS_Project | c22e1395dfa528b01bd65ac8266b10ac93b0f36b | [
"Apache-2.0"
] | null | null | null | Resource/toQuery.py | qiaw99/DBS_Project | c22e1395dfa528b01bd65ac8266b10ac93b0f36b | [
"Apache-2.0"
] | null | null | null | Resource/toQuery.py | qiaw99/DBS_Project | c22e1395dfa528b01bd65ac8266b10ac93b0f36b | [
"Apache-2.0"
] | null | null | null | #Das Skript habe ich genutzt um die Queries für das Hinzufügen der EU Daten für meine Datenbank zu nutzen
#Es baut aus den JSON Dateien einen UpdateString für die bei mir schon bestehenden Einträge - das fällt bei
#dir wahrscheinlich weg
import json
import urllib.request
data = json.load(open('EU_Dataset.json'))['rec... | 63.641791 | 1,346 | 0.668621 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.