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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
d8a307b0c3df2dcf36b18219d43d794731ccf61f | 2,061 | py | Python | scripts/qt1/pyqt_sw07_LCD_Slider.py | ProfJust/Ruhr-TurtleBot-Competition-RTC- | 5c2425bee331b4d5033757a9425676932d111775 | [
"Unlicense",
"MIT"
] | null | null | null | scripts/qt1/pyqt_sw07_LCD_Slider.py | ProfJust/Ruhr-TurtleBot-Competition-RTC- | 5c2425bee331b4d5033757a9425676932d111775 | [
"Unlicense",
"MIT"
] | null | null | null | scripts/qt1/pyqt_sw07_LCD_Slider.py | ProfJust/Ruhr-TurtleBot-Competition-RTC- | 5c2425bee331b4d5033757a9425676932d111775 | [
"Unlicense",
"MIT"
] | null | null | null | #!/usr/bin/env python3
# ---------------------------------------------------------------------
# pyqt_sw07_LCD_Slider.py
# Beispiel fuer Signal Slot Konzept
# ---------------------------------------------------------------------
# -*- coding: utf-8 -*-
from PyQt5.QtWidgets import (QWidget, QSlider,
... | 31.227273 | 71 | 0.571082 |
996f5a1cdeb9f5d3113ddd3cbf7a191fe2dbc6dd | 3,314 | py | Python | scripts/component_graph/test/server/fpm/test_package_manager.py | opensource-assist/fuschia | 66646c55b3d0b36aae90a4b6706b87f1a6261935 | [
"BSD-3-Clause"
] | 3 | 2020-08-02T04:46:18.000Z | 2020-08-07T10:10:53.000Z | scripts/component_graph/test/server/fpm/test_package_manager.py | opensource-assist/fuschia | 66646c55b3d0b36aae90a4b6706b87f1a6261935 | [
"BSD-3-Clause"
] | null | null | null | scripts/component_graph/test/server/fpm/test_package_manager.py | opensource-assist/fuschia | 66646c55b3d0b36aae90a4b6706b87f1a6261935 | [
"BSD-3-Clause"
] | 1 | 2020-08-07T10:11:49.000Z | 2020-08-07T10:11:49.000Z | #!/usr/bin/env python3
# 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 unittest
from unittest import mock
import urllib.request
from urllib.error import HTTPError, URLError
from server.fpm.package_ma... | 38.988235 | 76 | 0.684068 |
7a3ab32ba3be321a68951368416f1749cd7a50f5 | 1,124 | py | Python | test/test_tag10.py | kopp/pyventskalender | 6f6455f3c1db07f65a772b2716e4be95fbcd1804 | [
"MIT"
] | null | null | null | test/test_tag10.py | kopp/pyventskalender | 6f6455f3c1db07f65a772b2716e4be95fbcd1804 | [
"MIT"
] | null | null | null | test/test_tag10.py | kopp/pyventskalender | 6f6455f3c1db07f65a772b2716e4be95fbcd1804 | [
"MIT"
] | null | null | null | from unittest import TestCase
from unittest.mock import patch, mock_open
try:
from pyventskalender import tag10_loesung as heute
except ImportError:
from pyventskalender import tag10 as heute
class Tag10Tests(TestCase):
def test_10_extrahiere_gewichte(self):
pseudo_file = mock_open(read_data="""... | 32.114286 | 70 | 0.669929 |
7106f147a1914f4bc15b693e72965501e6e83d7d | 1,285 | py | Python | src/onegov/activity/collections/period.py | politbuero-kampagnen/onegov-cloud | 20148bf321b71f617b64376fe7249b2b9b9c4aa9 | [
"MIT"
] | null | null | null | src/onegov/activity/collections/period.py | politbuero-kampagnen/onegov-cloud | 20148bf321b71f617b64376fe7249b2b9b9c4aa9 | [
"MIT"
] | null | null | null | src/onegov/activity/collections/period.py | politbuero-kampagnen/onegov-cloud | 20148bf321b71f617b64376fe7249b2b9b9c4aa9 | [
"MIT"
] | null | null | null | from onegov.activity.models import Period
from onegov.core.collection import GenericCollection
class PeriodCollection(GenericCollection):
@property
def model_class(self):
return Period
def add(self, title, prebooking, booking, execution, active=False,
minutes_between=0, deadline_days... | 29.883721 | 77 | 0.625681 |
74cf52f6abc05226d51db5f3f268c50093b4bbd0 | 752 | py | Python | data/util.py | amosproj/amos-ss2021-is-project-linter | 5f90098bbf1e3b526aeac78496d696cb7169c0e6 | [
"MIT"
] | 4 | 2021-04-14T10:13:58.000Z | 2021-07-12T20:19:43.000Z | data/util.py | amosproj/amos-ss2021-is-project-linter | 5f90098bbf1e3b526aeac78496d696cb7169c0e6 | [
"MIT"
] | 121 | 2021-04-20T16:38:30.000Z | 2021-07-14T07:51:53.000Z | data/util.py | amosproj/amos-ss2021-is-project-linter | 5f90098bbf1e3b526aeac78496d696cb7169c0e6 | [
"MIT"
] | 2 | 2021-06-07T15:22:23.000Z | 2021-07-13T08:36:22.000Z | import json
from datetime import datetime, timedelta
import random
import requests
start_time = datetime(2021, 6, 1, 15, 0, 0)
dates = [start_time + timedelta(n) for n in range(7)]
def next_result(dt: datetime):
x = random.randint(start_time.day, dt.day + 3)
return x > 3
def get_projects():
with open('... | 23.5 | 68 | 0.628989 |
7455ec1ff1694f69558d747e6a67c39e5cb50422 | 663 | py | Python | pacman-arch/test/pacman/tests/upgrade073.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/upgrade073.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/upgrade073.py | Scottx86-64/dotfiles-1 | 51004b1e2b032664cce6b553d2052757c286087d | [
"Unlicense"
] | 1 | 2021-09-26T08:44:40.000Z | 2021-09-26T08:44:40.000Z | self.description = "Install a package with cascaded dependencies"
p1 = pmpkg("dummy", "1.0-2")
p1.files = ["bin/dummy",
"usr/man/man1/dummy.1"]
p1.depends = ["dep1"]
p2 = pmpkg("dep1")
p2.files = ["bin/dep1"]
p2.depends = ["dep2"]
p3 = pmpkg("dep2")
p3.files = ["bin/dep2"]
for p in p1, p2, p3:
self.add... | 23.678571 | 68 | 0.639517 |
bb11384ea6b8b8835da8e1e40abeab5ccae7a6cf | 2,402 | py | Python | src/bo4e/com/zaehlwerk.py | bo4e/BO4E-python | 28b12f853c8a496d14b133759b7aa2d6661f79a0 | [
"MIT"
] | 1 | 2022-03-02T12:49:44.000Z | 2022-03-02T12:49:44.000Z | src/bo4e/com/zaehlwerk.py | bo4e/BO4E-python | 28b12f853c8a496d14b133759b7aa2d6661f79a0 | [
"MIT"
] | 21 | 2022-02-04T07:38:46.000Z | 2022-03-28T14:01:53.000Z | src/bo4e/com/zaehlwerk.py | bo4e/BO4E-python | 28b12f853c8a496d14b133759b7aa2d6661f79a0 | [
"MIT"
] | null | null | null | """
Contains Zaehlwerk class
and corresponding marshmallow schema for de-/serialization
"""
from decimal import Decimal
import attr
from attr.validators import matches_re
from marshmallow import fields
from marshmallow_enum import EnumField # type:ignore[import]
from bo4e.com.com import COM, COMSchema
from bo4e.enum... | 38.741935 | 173 | 0.70358 |
24918198bf4d9fb770ee9ee30d6b3a38a4d85789 | 22 | py | Python | my-cs/intern/visuality/__init__.py | zaqwes8811/cs-courses | aa9cf5ad109c9cfcacaadc11bf2defb2188ddce2 | [
"Apache-2.0"
] | null | null | null | my-cs/intern/visuality/__init__.py | zaqwes8811/cs-courses | aa9cf5ad109c9cfcacaadc11bf2defb2188ddce2 | [
"Apache-2.0"
] | 15 | 2015-03-07T12:46:41.000Z | 2015-04-11T09:08:36.000Z | intern/visuality/__init__.py | zaqwes8811/micro-apps | 7f63fdf613eff5d441a3c2c7b52d2a3d02d9736a | [
"MIT"
] | null | null | null | __author__ = 'zaqwes'
| 11 | 21 | 0.727273 |
705feb729208210944771670ecf5d2347d13a889 | 1,640 | py | Python | Packs/HealthCheck/Scripts/HealthCheckUnpack/HealthCheckUnpack.py | diCagri/content | c532c50b213e6dddb8ae6a378d6d09198e08fc9f | [
"MIT"
] | 799 | 2016-08-02T06:43:14.000Z | 2022-03-31T11:10:11.000Z | Packs/HealthCheck/Scripts/HealthCheckUnpack/HealthCheckUnpack.py | diCagri/content | c532c50b213e6dddb8ae6a378d6d09198e08fc9f | [
"MIT"
] | 9,317 | 2016-08-07T19:00:51.000Z | 2022-03-31T21:56:04.000Z | Packs/HealthCheck/Scripts/HealthCheckUnpack/HealthCheckUnpack.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 tarfile
import re
def extract_files(path, action):
extracted_files = []
try:
with tarfile.open(path, action) as tar:
for tar_file in tar.getnames():
extracted_file = tar.extra... | 27.333333 | 92 | 0.596951 |
3b5be9c893e58b53521dca99991277b9c2d90f6c | 1,895 | py | Python | src/util/onehot2bin.py | CorvusPrudens/Corisc | e30abde099dc3c1979c2f7d7ff6d37f7d990f852 | [
"MIT"
] | null | null | null | src/util/onehot2bin.py | CorvusPrudens/Corisc | e30abde099dc3c1979c2f7d7ff6d37f7d990f852 | [
"MIT"
] | null | null | null | src/util/onehot2bin.py | CorvusPrudens/Corisc | e30abde099dc3c1979c2f7d7ff6d37f7d990f852 | [
"MIT"
] | null | null | null | import os
from math import log2, ceil
template = """ reg [{logsize}:0] {vector};
always @(*) begin
case ({src})
{statements}
endcase
end
"""
statement = " {size}'h{hex}: {vector} = {logsize}'h{value};"
def gendecoder(vector, size, src, target, line):
logsize = ceil(log2(size))
lhs_temp = f'{{:0... | 27.463768 | 105 | 0.590501 |
d91192cb41b1f5955c88752a04bb161570c7d346 | 237 | py | Python | db/__init__.py | JarSaa/BootDemo2 | 3ad61e25026a26fbd5ed2f0e9cc9cdc56696e805 | [
"MIT"
] | null | null | null | db/__init__.py | JarSaa/BootDemo2 | 3ad61e25026a26fbd5ed2f0e9cc9cdc56696e805 | [
"MIT"
] | null | null | null | db/__init__.py | JarSaa/BootDemo2 | 3ad61e25026a26fbd5ed2f0e9cc9cdc56696e805 | [
"MIT"
] | null | null | null | import sqlalchemy
from sqlalchemy.orm import sessionmaker
from dotenv import load_dotenv, find_dotenv
load_dotenv(find_dotenv())
import os
engine = sqlalchemy.create_engine(os.environ.get('DATABASE'))
Session = sessionmaker(bind=engine) | 29.625 | 61 | 0.831224 |
240cca35415ae2bf5e744a65bda2a30ba7eaa051 | 91 | py | Python | helper/sqlString.py | BackInBash/cov19-ki | 793239f5ed2de985f367c590316fe0b710724d82 | [
"MIT"
] | null | null | null | helper/sqlString.py | BackInBash/cov19-ki | 793239f5ed2de985f367c590316fe0b710724d82 | [
"MIT"
] | null | null | null | helper/sqlString.py | BackInBash/cov19-ki | 793239f5ed2de985f367c590316fe0b710724d82 | [
"MIT"
] | null | null | null | i = 0
sql = ""
while i < 91:
sql = sql + "'+row["+str(i)+"]+',"
i = i+1
print(sql) | 13 | 38 | 0.406593 |
232387c50a8af51feee1b0714e47f96451f6d8e5 | 1,342 | py | Python | Python X/Euler Problem 1.py | nirobio/puzzles | fda8c84d8eefd93b40594636fb9b7f0fde02b014 | [
"MIT"
] | null | null | null | Python X/Euler Problem 1.py | nirobio/puzzles | fda8c84d8eefd93b40594636fb9b7f0fde02b014 | [
"MIT"
] | null | null | null | Python X/Euler Problem 1.py | nirobio/puzzles | fda8c84d8eefd93b40594636fb9b7f0fde02b014 | [
"MIT"
] | null | null | null | {
"cells": [
{
"cell_type": "code",
"execution_count": 4,
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"233168\n"
]
}
],
"source": [
"# https://projecteuler.net/problem=1\n",
"\n",
"#If we list all the natural numb... | 20.646154 | 106 | 0.487332 |
233d1d39ce24f6bbd183e29ad0ef8fb97654d364 | 2,935 | py | Python | src/onegov/org/views/people.py | politbuero-kampagnen/onegov-cloud | 20148bf321b71f617b64376fe7249b2b9b9c4aa9 | [
"MIT"
] | null | null | null | src/onegov/org/views/people.py | politbuero-kampagnen/onegov-cloud | 20148bf321b71f617b64376fe7249b2b9b9c4aa9 | [
"MIT"
] | null | null | null | src/onegov/org/views/people.py | politbuero-kampagnen/onegov-cloud | 20148bf321b71f617b64376fe7249b2b9b9c4aa9 | [
"MIT"
] | null | null | null | import morepath
from morepath.request import Response
from onegov.core.security import Public, Private
from onegov.org import _, OrgApp
from onegov.org.elements import Link
from onegov.org.forms import PersonForm
from onegov.org.layout import PersonLayout, PersonCollectionLayout
from onegov.org.models import AtoZ
from... | 28.221154 | 77 | 0.679727 |
236c934e4f642fd04d87e35c16ac98c5c635b29a | 5,836 | py | Python | data-pipeline/src/data_pipeline/data_types/variant/transcript_consequence/annotate_transcript_consequences.py | broadinstitute/gnomadjs | 00da72cdc2cb0753f822c51456ec15147c024a1d | [
"MIT"
] | 38 | 2018-02-24T02:33:52.000Z | 2020-03-03T23:17:04.000Z | data-pipeline/src/data_pipeline/data_types/variant/transcript_consequence/annotate_transcript_consequences.py | broadinstitute/gnomadjs | 00da72cdc2cb0753f822c51456ec15147c024a1d | [
"MIT"
] | 385 | 2018-02-21T16:53:13.000Z | 2020-03-04T00:52:40.000Z | data-pipeline/src/data_pipeline/data_types/variant/transcript_consequence/annotate_transcript_consequences.py | broadinstitute/gnomadjs | 00da72cdc2cb0753f822c51456ec15147c024a1d | [
"MIT"
] | 13 | 2020-05-01T13:03:54.000Z | 2022-02-28T13:12:57.000Z | import hail as hl
from .hgvs import hgvsp_from_consequence_amino_acids
from .vep import consequence_term_rank
OMIT_CONSEQUENCE_TERMS = hl.set(["upstream_gene_variant", "downstream_gene_variant"])
def annotate_transcript_consequences(variants_path, transcripts_path, mane_transcripts_path=None):
ds = hl.read_tab... | 39.432432 | 132 | 0.563228 |
ae05fe83a81a7fd0bcad3574879135f50b0026f9 | 4,956 | py | Python | packages/watchmen-meta/src/watchmen_meta/common/tuple_service.py | Indexical-Metrics-Measure-Advisory/watchmen | c54ec54d9f91034a38e51fd339ba66453d2c7a6d | [
"MIT"
] | null | null | null | packages/watchmen-meta/src/watchmen_meta/common/tuple_service.py | Indexical-Metrics-Measure-Advisory/watchmen | c54ec54d9f91034a38e51fd339ba66453d2c7a6d | [
"MIT"
] | null | null | null | packages/watchmen-meta/src/watchmen_meta/common/tuple_service.py | Indexical-Metrics-Measure-Advisory/watchmen | c54ec54d9f91034a38e51fd339ba66453d2c7a6d | [
"MIT"
] | null | null | null | from typing import Optional
from watchmen_auth import PrincipalService
from watchmen_model.common import Auditable, OptimisticLock, TenantBasedTuple, Tuple
from watchmen_storage import ColumnNameLiteral, EntityCriteriaExpression, EntityRow, OptimisticLockException, \
SnowflakeGenerator, TransactionalStorageSPI
from .... | 36.711111 | 111 | 0.784907 |
88b1dc9809c41160d12b3720dcf6947fe5b57847 | 597 | py | Python | source/pkgsrc/lang/python27/patches/patch-Lib_sysconfig.py | Scottx86-64/dotfiles-1 | 51004b1e2b032664cce6b553d2052757c286087d | [
"Unlicense"
] | 1 | 2021-11-20T22:46:39.000Z | 2021-11-20T22:46:39.000Z | source/pkgsrc/lang/python27/patches/patch-Lib_sysconfig.py | Scottx86-64/dotfiles-1 | 51004b1e2b032664cce6b553d2052757c286087d | [
"Unlicense"
] | null | null | null | source/pkgsrc/lang/python27/patches/patch-Lib_sysconfig.py | Scottx86-64/dotfiles-1 | 51004b1e2b032664cce6b553d2052757c286087d | [
"Unlicense"
] | null | null | null | $NetBSD: patch-Lib_sysconfig.py,v 1.1 2018/06/17 19:21:21 adam Exp $
chop "-RELEASE" or "-DEVELOPMENT" from release for DragonFly.
--- Lib/sysconfig.py.orig 2014-12-10 15:59:40.000000000 +0000
+++ Lib/sysconfig.py
@@ -607,6 +607,8 @@ def get_platform():
osname, release, machine = _osx_support.get_platform_os... | 37.3125 | 70 | 0.559464 |
14eb6ef2e29e03e6b024e82761bbf9fc1d85438a | 1,032 | py | Python | Kapitel_2/_3_optionale_parameter.py | Geralonx/Classes_Tutorial | 9499db8159efce1e3c38975b66a9c649631c6727 | [
"MIT"
] | 1 | 2020-12-24T15:42:54.000Z | 2020-12-24T15:42:54.000Z | Kapitel_2/_3_optionale_parameter.py | Geralonx/Classes_Tutorial | 9499db8159efce1e3c38975b66a9c649631c6727 | [
"MIT"
] | null | null | null | Kapitel_2/_3_optionale_parameter.py | Geralonx/Classes_Tutorial | 9499db8159efce1e3c38975b66a9c649631c6727 | [
"MIT"
] | null | null | null | # --- Definition einer Funktion, die mit optionalen Parametern überlden ist. --- #
def adder(x, y, debug=False):
# debug-Argument ist optional, da es einen default Wert hat, welcher immer
# dann verwendet wird, wenn beim Aufurf dafür kein Wert übergeben wird.
if debug:
print(f"Evaluating {x} + {y}:... | 32.25 | 83 | 0.660853 |
11fb3b930550af62de88384bfdf82b79a375934a | 1,851 | py | Python | deutschland/nina/models/__init__.py | kiranmusze/deutschland | 86d8ead3f38ad88ad66bb338b9f5a8db06992344 | [
"Apache-2.0"
] | 445 | 2021-07-26T22:00:26.000Z | 2022-03-31T08:31:08.000Z | deutschland/nina/models/__init__.py | kiranmusze/deutschland | 86d8ead3f38ad88ad66bb338b9f5a8db06992344 | [
"Apache-2.0"
] | 30 | 2021-07-27T15:42:23.000Z | 2022-03-26T16:14:11.000Z | deutschland/nina/models/__init__.py | kiranmusze/deutschland | 86d8ead3f38ad88ad66bb338b9f5a8db06992344 | [
"Apache-2.0"
] | 28 | 2021-07-27T10:48:43.000Z | 2022-03-26T14:31:30.000Z | # flake8: noqa
# import all models into this package
# if you have many models here with many references from one model to another this may
# raise a RecursionError
# to avoid this, import only the models that you directly need like:
# from from deutschland.nina.model.pet import Pet
# or import this package, but befor... | 45.146341 | 87 | 0.861696 |
eedb99c74520cfb4eafda016363302dbd7a7e646 | 626 | py | Python | andinopy/gpio_zero_devices/gpio_relay.py | andino-systems/andinopy | 28fc09fbdd67dd690b9b3f80f03a05c342c777e1 | [
"Apache-2.0"
] | null | null | null | andinopy/gpio_zero_devices/gpio_relay.py | andino-systems/andinopy | 28fc09fbdd67dd690b9b3f80f03a05c342c777e1 | [
"Apache-2.0"
] | null | null | null | andinopy/gpio_zero_devices/gpio_relay.py | andino-systems/andinopy | 28fc09fbdd67dd690b9b3f80f03a05c342c777e1 | [
"Apache-2.0"
] | null | null | null | # _ _ _
# / \ _ __ __| (_)_ __ ___ _ __ _ _
# / _ \ | '_ \ / _` | | '_ \ / _ \| '_ \| | | |
# / ___ \| | | | (_| | | | | | (_) | |_) | |_| |
# /_/ \_\_| |_|\__,_|_|_| |_|\___/| .__/ \__, |
# |_| |___/
# by Jakob Groß
import gpiozero
c... | 34.777778 | 86 | 0.477636 |
1139a3a18f942c8d3a0900cfb4fcd0a987cce546 | 6,185 | py | Python | MA/Tank.py | mirrorcoloured/slcypi | c47975b3523f770d12a521c82e2dfca181e3f35b | [
"MIT"
] | null | null | null | MA/Tank.py | mirrorcoloured/slcypi | c47975b3523f770d12a521c82e2dfca181e3f35b | [
"MIT"
] | null | null | null | MA/Tank.py | mirrorcoloured/slcypi | c47975b3523f770d12a521c82e2dfca181e3f35b | [
"MIT"
] | null | null | null |
# Import statements
import sys
import time
import atexit
sys.path.append("/home/pi/Documents/Robots/slcypi/HAT_Python3") ### ADD PATH
from Adafruit_MotorHAT import Adafruit_MotorHAT, Adafruit_DCMotor
class Tank():
"""Initialize car and control functions"""
def __init__(self):
"""Initialize method"""
... | 37.713415 | 76 | 0.593533 |
115ab067e42517031595bb2fb2d8102aaf157108 | 10,597 | py | Python | TimeSeries/neural_prophet/arima.py | stanton119/data-analysis | b6fda815c6cc1798ba13a5d2680369b7e5dfcdf9 | [
"Apache-2.0"
] | null | null | null | TimeSeries/neural_prophet/arima.py | stanton119/data-analysis | b6fda815c6cc1798ba13a5d2680369b7e5dfcdf9 | [
"Apache-2.0"
] | 1 | 2021-02-11T23:44:52.000Z | 2021-02-11T23:44:52.000Z | TimeSeries/neural_prophet/arima.py | stanton119/data-analysis | b6fda815c6cc1798ba13a5d2680369b7e5dfcdf9 | [
"Apache-2.0"
] | 1 | 2021-12-16T01:02:23.000Z | 2021-12-16T01:02:23.000Z | # %% [markdown]
# # Neural prophet vs ARIMA
# How fast is fitting long AR models using Neural prophet
# In this quick test we will fit AR based models with different lags and see how long they take to fit.
#
# To start, import some relevant libraries:
# %%
from operator import le
from time import process_time, time
i... | 35.089404 | 143 | 0.720864 |
3a7ad1b3dff5bb9063f14ce0d147d8884f4a4f65 | 355 | py | Python | Online-Judges/DimikOJ/Python/14-the-cound-of-latter.py | shihab4t/Competitive-Programming | e8eec7d4f7d86bfa1c00b7fbbedfd6a1518f19be | [
"Unlicense"
] | 3 | 2021-06-15T01:19:23.000Z | 2022-03-16T18:23:53.000Z | Online-Judges/DimikOJ/Python/14-the-cound-of-latter.py | shihab4t/Competitive-Programming | e8eec7d4f7d86bfa1c00b7fbbedfd6a1518f19be | [
"Unlicense"
] | null | null | null | Online-Judges/DimikOJ/Python/14-the-cound-of-latter.py | shihab4t/Competitive-Programming | e8eec7d4f7d86bfa1c00b7fbbedfd6a1518f19be | [
"Unlicense"
] | null | null | null | for i in range(int(input())):
input_str = input()
char = input()
count = 0
for j in range(len(input_str)):
if input_str[j] == char:
count += 1
# print(count)
if count == 0:
print("'"+char+"'", "is not present")
else:
print("Occurrence of", "'"+char+"'", "i... | 25.357143 | 80 | 0.487324 |
a33e7e472af4e585eac8272e355909b7c80ef374 | 4,232 | py | Python | src/script/ServerPyChat.py | sera619/PythonSocksChat | 21fbaf3e768a0fa33b110c9b6281a7bb3ff45af7 | [
"MIT"
] | null | null | null | src/script/ServerPyChat.py | sera619/PythonSocksChat | 21fbaf3e768a0fa33b110c9b6281a7bb3ff45af7 | [
"MIT"
] | null | null | null | src/script/ServerPyChat.py | sera619/PythonSocksChat | 21fbaf3e768a0fa33b110c9b6281a7bb3ff45af7 | [
"MIT"
] | null | null | null | import socket
import select
HEADER_LENGTH = 10
# hier die richtige IP und PORT angeben die IP MUSS! in "" eingefasst eingetragen werden
# PORT ohne "" die änderungen hier müssen dann indentisch mit dem ClientPyChat.py schript sein
# DEFAULT Einstellungen sind für den Offline gebrauch im eigenen Netzwerk:
IP = "127.0... | 34.688525 | 107 | 0.476134 |
c2953b264a34f0963e831154ab7ea2d290c17308 | 10,698 | py | Python | Packs/ShiftLeft/Integrations/shiftleft/shiftleft.py | diCagri/content | c532c50b213e6dddb8ae6a378d6d09198e08fc9f | [
"MIT"
] | 799 | 2016-08-02T06:43:14.000Z | 2022-03-31T11:10:11.000Z | Packs/ShiftLeft/Integrations/shiftleft/shiftleft.py | diCagri/content | c532c50b213e6dddb8ae6a378d6d09198e08fc9f | [
"MIT"
] | 9,317 | 2016-08-07T19:00:51.000Z | 2022-03-31T21:56:04.000Z | Packs/ShiftLeft/Integrations/shiftleft/shiftleft.py | diCagri/content | c532c50b213e6dddb8ae6a378d6d09198e08fc9f | [
"MIT"
] | 1,297 | 2016-08-04T13:59:00.000Z | 2022-03-31T23:43:06.000Z | """ShiftLeft CORE Integration for Cortex XSOAR (aka Demisto)
"""
import demistomock as demisto
from CommonServerPython import * # noqa # pylint: disable=unused-wildcard-import
from CommonServerUserPython import * # noqa
import traceback
from typing import Dict, Any
""" CONSTANTS """
DATE_FORMAT = "%Y-%m-%dT%H:%M:... | 32.615854 | 112 | 0.551692 |
6674a68e0a39015b5252b956838b85bb4ddbb0bb | 304 | py | Python | source/pkgsrc/graphics/py-OpenGL/patches/patch-OpenGL_EGL_debug.py | Scottx86-64/dotfiles-1 | 51004b1e2b032664cce6b553d2052757c286087d | [
"Unlicense"
] | 1 | 2021-11-20T22:46:39.000Z | 2021-11-20T22:46:39.000Z | source/pkgsrc/graphics/py-OpenGL/patches/patch-OpenGL_EGL_debug.py | Scottx86-64/dotfiles-1 | 51004b1e2b032664cce6b553d2052757c286087d | [
"Unlicense"
] | null | null | null | source/pkgsrc/graphics/py-OpenGL/patches/patch-OpenGL_EGL_debug.py | Scottx86-64/dotfiles-1 | 51004b1e2b032664cce6b553d2052757c286087d | [
"Unlicense"
] | null | null | null | $NetBSD: patch-OpenGL_EGL_debug.py,v 1.1 2020/02/23 23:59:45 joerg Exp $
--- OpenGL/EGL/debug.py.orig 2020-02-22 21:14:12.920237693 +0000
+++ OpenGL/EGL/debug.py
@@ -1,3 +1,4 @@
+from __future__ import print_function
"""Debug utilities for EGL operations"""
from OpenGL.EGL import *
import itertools
| 30.4 | 72 | 0.720395 |
66abaa8170f37fef7cb83a66af72cf7790df3c83 | 1,025 | py | Python | Python/list_methods.py | paurav11/HackerRank | 80c91c5cc55dd56671a5906be7a106ad4f1db95e | [
"MIT"
] | 1 | 2021-05-19T06:44:03.000Z | 2021-05-19T06:44:03.000Z | Python/list_methods.py | paurav11/HackerRank | 80c91c5cc55dd56671a5906be7a106ad4f1db95e | [
"MIT"
] | null | null | null | Python/list_methods.py | paurav11/HackerRank | 80c91c5cc55dd56671a5906be7a106ad4f1db95e | [
"MIT"
] | null | null | null | if __name__ == '__main__':
result_list = []
final_lists = []
N = int(input())
for _ in range(N):
try:
command = input().strip().split()
if command[0].lower() == 'insert':
result_list.insert(int(command[1]),int(command[2]))
elif command[0].lower... | 35.344828 | 67 | 0.483902 |
66431bfd8e03ea1a334c196ab691928e7e086d95 | 5,245 | py | Python | packages/watchmen-data-kernel/src/watchmen_data_kernel/topic_schema/encrypt_factor.py | Indexical-Metrics-Measure-Advisory/watchmen | c54ec54d9f91034a38e51fd339ba66453d2c7a6d | [
"MIT"
] | null | null | null | packages/watchmen-data-kernel/src/watchmen_data_kernel/topic_schema/encrypt_factor.py | Indexical-Metrics-Measure-Advisory/watchmen | c54ec54d9f91034a38e51fd339ba66453d2c7a6d | [
"MIT"
] | null | null | null | packages/watchmen-data-kernel/src/watchmen_data_kernel/topic_schema/encrypt_factor.py | Indexical-Metrics-Measure-Advisory/watchmen | c54ec54d9f91034a38e51fd339ba66453d2c7a6d | [
"MIT"
] | null | null | null | from __future__ import annotations
from typing import Any, Dict, List, Optional, Union
from watchmen_auth import PrincipalService
from watchmen_data_kernel.encryption import Encryptor, find_encryptor, register_encryptor
from watchmen_model.admin import Factor, FactorEncryptMethod, Topic
from watchmen_utilities import... | 35.201342 | 114 | 0.742612 |
b04a2e93ea051d17c033265e6e1efbf4b1829f28 | 4,234 | py | Python | research/cv/midas/preprocess/associate.py | leelige/mindspore | 5199e05ba3888963473f2b07da3f7bca5b9ef6dc | [
"Apache-2.0"
] | 77 | 2021-10-15T08:32:37.000Z | 2022-03-30T13:09:11.000Z | research/cv/midas/preprocess/associate.py | leelige/mindspore | 5199e05ba3888963473f2b07da3f7bca5b9ef6dc | [
"Apache-2.0"
] | 3 | 2021-10-30T14:44:57.000Z | 2022-02-14T06:57:57.000Z | research/cv/midas/preprocess/associate.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.803571 | 117 | 0.631318 |
05eaf249b875bfb68a88051337a8ff9c1a63b93e | 3,610 | py | Python | site_generation/cloudprovider_aws.py | globalwatchpost/CloudRegionsList | f428b39fc797403cf6ed5d38196a5df29f59d8af | [
"MIT"
] | null | null | null | site_generation/cloudprovider_aws.py | globalwatchpost/CloudRegionsList | f428b39fc797403cf6ed5d38196a5df29f59d8af | [
"MIT"
] | null | null | null | site_generation/cloudprovider_aws.py | globalwatchpost/CloudRegionsList | f428b39fc797403cf6ed5d38196a5df29f59d8af | [
"MIT"
] | null | null | null | #!/usr/bin/python3
import boto3
import botocore
import logging
import json
import pprint
import requests
import sys
import cloudprovider
class CloudProviderAws( cloudprovider.CloudProvider ):
def __init__( self, regionGeoInfo, dateFormatFunction ):
super().__init__( regionGeoInfo, dateFormatFunction )
... | 35.392157 | 204 | 0.59723 |
af3d6d32123692173df20a2c63272b10c0f5bab9 | 1,233 | py | Python | libs/azuretextanalytics/AzureTextAnalyticsDemoArticles.py | surfmachine/language-detection | b44fbb4c7b59fc70388197653060cee67b5a2ee7 | [
"MIT"
] | null | null | null | libs/azuretextanalytics/AzureTextAnalyticsDemoArticles.py | surfmachine/language-detection | b44fbb4c7b59fc70388197653060cee67b5a2ee7 | [
"MIT"
] | null | null | null | libs/azuretextanalytics/AzureTextAnalyticsDemoArticles.py | surfmachine/language-detection | b44fbb4c7b59fc70388197653060cee67b5a2ee7 | [
"MIT"
] | null | null | null | import os, requests, uuid, json
import pandas as pd
# get environment settings (azure cognitive services key and endpoint)
from Environment import Environment
env = Environment()
# headers
subscription_key = env.getAzureCognitiveServiceKey()
xclient_trace_id = str(uuid.uuid4())
headers = {
'Content-type': 'appl... | 25.6875 | 70 | 0.703974 |
3cb208a5afc075aa5d211fc81de47896f1907483 | 25,582 | py | Python | python/course/main.py | TimVan1596/ACM-ICPC | 07f7d728db1ecd09c5a3d0f05521930b14eb9883 | [
"Apache-2.0"
] | 1 | 2019-05-22T07:12:34.000Z | 2019-05-22T07:12:34.000Z | python/course/main.py | TimVan1596/ACM-ICPC | 07f7d728db1ecd09c5a3d0f05521930b14eb9883 | [
"Apache-2.0"
] | 3 | 2021-12-10T01:13:54.000Z | 2021-12-14T21:18:42.000Z | python/course/main.py | TimVan1596/ACM-ICPC | 07f7d728db1ecd09c5a3d0f05521930b14eb9883 | [
"Apache-2.0"
] | null | null | null | # -*- coding:utf-8 -*-
# @Time:2020/5/30 11:41
# @Author:TimVan
# @File:leetcode.py
# @Software:PyCharm
# 单行注释
# print("hello world")
"""
这个是多行注释
注意UTF-8的coding
"""
# print("你们好")
# import keyword
# print(keyword.kwlist)
# 格式化输出
"""
age = 20
name = 'Tim Van'
name = 'my name is ' + name
print("... | 19.543163 | 182 | 0.583066 |
59a45732f8ac85ca1d243f14b6924c01adedb327 | 746 | py | Python | listings/chapter06/export-iris.py | SaschaKersken/Daten-Prozessanalyse | 370f07a75b9465329deb3671adbfbef8483f76f6 | [
"Apache-2.0"
] | 2 | 2021-09-20T06:16:41.000Z | 2022-01-17T14:24:43.000Z | listings/chapter06/export-iris.py | SaschaKersken/Daten-Prozessanalyse | 370f07a75b9465329deb3671adbfbef8483f76f6 | [
"Apache-2.0"
] | null | null | null | listings/chapter06/export-iris.py | SaschaKersken/Daten-Prozessanalyse | 370f07a75b9465329deb3671adbfbef8483f76f6 | [
"Apache-2.0"
] | null | null | null | import csv
import json
csv_file = open('iris.csv', 'r')
csv_reader = csv.reader(csv_file)
iris_xml = '<?xml version="1.0" encoding="utf-8" ?>\n'
iris_xml += '<irises>\n'
for line in csv_reader:
#iris_xml += ' <iris>\n'
#iris_xml += f' <type>{line[4]}</type>\n'
#iris_xml += f' <sepal-length>{line[0]}... | 39.263158 | 144 | 0.587131 |
e655221b796bfa831f8201210fe7a696da69bc61 | 342 | py | Python | Crawler/links/teste.py | KelvinMarques/CrawlerPagerank | fa855cf9ee878108c03828db49bbb9403c674a43 | [
"MIT"
] | null | null | null | Crawler/links/teste.py | KelvinMarques/CrawlerPagerank | fa855cf9ee878108c03828db49bbb9403c674a43 | [
"MIT"
] | null | null | null | Crawler/links/teste.py | KelvinMarques/CrawlerPagerank | fa855cf9ee878108c03828db49bbb9403c674a43 | [
"MIT"
] | null | null | null | from django.test import RequestFactory
from links.views import crawlerView
request_factory = RequestFactory()
my_url = 'http://mtwitt.herokuapp.com/' # Replace with your URL -- or use reverse
my_request = request_factory.get(my_url)
response = crawlerView.as_view()(my_request) # Replace with your view
response.re... | 28.5 | 82 | 0.783626 |
5592c520f075270a7ce14ff17ccf5bda030c7cef | 1,311 | py | Python | books/PythonAutomate/scheduling/stopwatch_prettier.py | zeroam/TIL | 43e3573be44c7f7aa4600ff8a34e99a65cbdc5d1 | [
"MIT"
] | null | null | null | books/PythonAutomate/scheduling/stopwatch_prettier.py | zeroam/TIL | 43e3573be44c7f7aa4600ff8a34e99a65cbdc5d1 | [
"MIT"
] | null | null | null | books/PythonAutomate/scheduling/stopwatch_prettier.py | zeroam/TIL | 43e3573be44c7f7aa4600ff8a34e99a65cbdc5d1 | [
"MIT"
] | null | null | null | """stopwatch_prettier.py
A simple stopwatch program
with colors and space
"""
import time
import pyperclip
class colors:
red = "\033[31m"
yello = "\033[33m"
blue = "\033[34m"
reset = "\033[0m"
print((
"Press ENTER to begin. Afterward, press ENTER "
"to \"click\" the stopwatch. Press Ctrl-C t... | 27.3125 | 78 | 0.636156 |
e9aa793beb8963f62f017bd1f11a084cf6253825 | 4,004 | py | Python | startstopbutton/src/app.py | Fexejo/iot-smart-drive-device | f9070df8c0efb8ae795568bf0e862218225eaea8 | [
"CC-BY-4.0"
] | null | null | null | startstopbutton/src/app.py | Fexejo/iot-smart-drive-device | f9070df8c0efb8ae795568bf0e862218225eaea8 | [
"CC-BY-4.0"
] | null | null | null | startstopbutton/src/app.py | Fexejo/iot-smart-drive-device | f9070df8c0efb8ae795568bf0e862218225eaea8 | [
"CC-BY-4.0"
] | null | null | null | #! /bin/env python
import redis, RPi.GPIO as GPIO
import configparser, logging, os, time, sys
REDIS_KEY_MEASUREMENT_ENABLED = "measurement:enabled"
class App:
"""
Hilfsprogramm, das einen am Raspberry Pi angeschlossenen Button überwacht, mit
dem die periodischen Messungen ausgesetzt werden können. Hierfü... | 36.4 | 115 | 0.625624 |
757dfcb082e8bcc964985d15cf7ae89cef61fec9 | 145 | py | Python | python/coursera_python/FUND_OF_COMP_RICE/FUND_OF_COMPUTING_RICE/inst_cal.py | SayanGhoshBDA/code-backup | 8b6135facc0e598e9686b2e8eb2d69dd68198b80 | [
"MIT"
] | 16 | 2018-11-26T08:39:42.000Z | 2019-05-08T10:09:52.000Z | python/coursera_python/FUND_OF_COMP_RICE/FUND_OF_COMPUTING_RICE/inst_cal.py | SayanGhoshBDA/code-backup | 8b6135facc0e598e9686b2e8eb2d69dd68198b80 | [
"MIT"
] | 8 | 2020-05-04T06:29:26.000Z | 2022-02-12T05:33:16.000Z | python/coursera_python/FUND_OF_COMP_RICE/FUND_OF_COMPUTING_RICE/inst_cal.py | SayanGhoshBDA/code-backup | 8b6135facc0e598e9686b2e8eb2d69dd68198b80 | [
"MIT"
] | 5 | 2020-02-11T16:02:21.000Z | 2021-02-05T07:48:30.000Z |
string = "1lll1l1l1l1ll1l111ll1l1ll1l1ll1ll111ll1ll1ll1l1ll1ll1ll1ll1lll1l1l1l1l1l1l1l1l1l1l1l1ll1lll1l111ll1l1l1l1l1"
print(string.count('l'))
| 36.25 | 118 | 0.896552 |
f97877a3210c541be4041b15630a1f089db86bf7 | 4,873 | py | Python | teams/team_snapback/smile_detector.py | AbinMM/PYNQ_Hackathon_2017 | 711c75e8590b02f313295cef712188691690c948 | [
"BSD-3-Clause"
] | 19 | 2017-10-08T03:18:38.000Z | 2020-07-07T02:34:18.000Z | teams/team_snapback/smile_detector.py | AbinMM/PYNQ_Hackathon_2017 | 711c75e8590b02f313295cef712188691690c948 | [
"BSD-3-Clause"
] | 2 | 2017-10-08T03:15:10.000Z | 2017-10-10T16:10:32.000Z | teams/team_snapback/smile_detector.py | AbinMM/PYNQ_Hackathon_2017 | 711c75e8590b02f313295cef712188691690c948 | [
"BSD-3-Clause"
] | 28 | 2017-10-07T23:24:36.000Z | 2022-03-29T08:03:40.000Z | #!/usr/bin/python3.6
from pynq.overlays.base import BaseOverlay
from pynq.lib.video import *
import numpy as np
from pynq import Xlnk
import time
import cv2
xlnk = Xlnk()
xlnk.xlnk_reset()
base = BaseOverlay("base.bit")
face_cascade = cv2.CascadeClassifier(
'/home/xilinx/jupyter_notebooks/base/video/data/'
... | 35.311594 | 142 | 0.48348 |
bd19f3ed1173c78667b0f1434b74188cb3bde8c5 | 2,515 | py | Python | skills/jokes/jokes.py | gidocarper/rhasspy-skills-test | eaf57287a67a0e43a299053cf0b107d61afd9b13 | [
"Unlicense"
] | 4 | 2021-01-08T21:08:50.000Z | 2021-12-08T15:30:50.000Z | skills/jokes/jokes.py | gidocarper/rhasspy-skills-test | eaf57287a67a0e43a299053cf0b107d61afd9b13 | [
"Unlicense"
] | null | null | null | skills/jokes/jokes.py | gidocarper/rhasspy-skills-test | eaf57287a67a0e43a299053cf0b107d61afd9b13 | [
"Unlicense"
] | null | null | null | #!/usr/bin/python3
# -*- coding: utf-8 -*-
# original code from https://github.com/hablijack coverted and adapted to a rhasspy friendly environment by Gido Carper
# Gido also added 100 Cities with lantitude and longtitudes to be able to request gasoline prices in other cities
import requests, os, json, random
clas... | 34.452055 | 120 | 0.575746 |
bd2252ff5519caab55b6ec2887de41e191c33757 | 776 | py | Python | ___Python/Angela/PyKurs/p11_excel/m03_excel_lesen_mit_pandas.py | uvenil/PythonKurs201806 | 85afa9c9515f5dd8bec0c546f077d8cc39568fe8 | [
"Apache-2.0"
] | null | null | null | ___Python/Angela/PyKurs/p11_excel/m03_excel_lesen_mit_pandas.py | uvenil/PythonKurs201806 | 85afa9c9515f5dd8bec0c546f077d8cc39568fe8 | [
"Apache-2.0"
] | null | null | null | ___Python/Angela/PyKurs/p11_excel/m03_excel_lesen_mit_pandas.py | uvenil/PythonKurs201806 | 85afa9c9515f5dd8bec0c546f077d8cc39568fe8 | [
"Apache-2.0"
] | null | null | null | from datetime import date
import pandas as pd
def alter(datumsangbe):
heute = date.today()
jahre = heute.year - datumsangbe.year
if (datumsangbe.month, datumsangbe.day) > (heute.month, heute.day):
jahre -= 1
return jahre
df = pd.read_excel("O:\___Python\Angela\Personen.xlsx") # d... | 27.714286 | 73 | 0.646907 |
1fe0d85e2ee8c849eda5536e2a0dc8b26ea7400a | 2,691 | py | Python | analyzer.py | silver-whale-enterprises-llc/amzproduzer | 25e63f64b0ef09241475c72af9a710dcb7d9e926 | [
"Apache-2.0"
] | 1 | 2019-07-22T14:03:11.000Z | 2019-07-22T14:03:11.000Z | analyzer.py | silver-whale-enterprises-llc/amzproduzer | 25e63f64b0ef09241475c72af9a710dcb7d9e926 | [
"Apache-2.0"
] | null | null | null | analyzer.py | silver-whale-enterprises-llc/amzproduzer | 25e63f64b0ef09241475c72af9a710dcb7d9e926 | [
"Apache-2.0"
] | null | null | null | import argparse
import csv
import os
class Col(object):
asin = 0
upc = 1
ean = 2
title = 3
purchase_cost = 4
sales_rank = 5
buy_box_or_lowest_price = 6
total_cost = 7
profit = 8
roi = 9
link_amazon = 10
sold_by_amazon = 11
product_group = 12
weight = 13
numb... | 20.541985 | 67 | 0.624303 |
20fe0af1bb95d40a3141b841fa382b46fd5a0488 | 163 | py | Python | SmartMirror/flask_interface/__init__.py | beckstev/PiShop | ab990c3a787f1811ff0da650f79dbd8bb28c00f7 | [
"MIT"
] | null | null | null | SmartMirror/flask_interface/__init__.py | beckstev/PiShop | ab990c3a787f1811ff0da650f79dbd8bb28c00f7 | [
"MIT"
] | 3 | 2018-11-22T09:49:52.000Z | 2019-05-29T14:43:52.000Z | SmartMirror/flask_interface/__init__.py | beckstev/PiShop | ab990c3a787f1811ff0da650f79dbd8bb28c00f7 | [
"MIT"
] | null | null | null | # coding: utf-8
from flask import Flask
# Start Flask app
app = Flask(__name__)
app.config['SECRET_KEY'] = "PeP_et_al_PiShop"
from flask_interface import routes
| 18.111111 | 45 | 0.766871 |
1f28faf4215f95458d02cf0f571081275a455ec9 | 279 | py | Python | Programming Languages/Python/Theory/100_Python_Challenges/Section_3_List/51. highest possible product.py | jaswinder9051998/Resources | fd468af37bf24ca57555d153ee64693c018e822e | [
"MIT"
] | 101 | 2021-12-20T11:57:11.000Z | 2022-03-23T09:49:13.000Z | Programming Languages/Python/Theory/100_Python_Challenges/Section_3_List/51. highest possible product.py | Sid-1164/Resources | 3987dcaeddc8825f9bc79609ff26094282b8ece1 | [
"MIT"
] | 4 | 2022-01-12T11:55:56.000Z | 2022-02-12T04:53:33.000Z | Programming Languages/Python/Theory/100_Python_Challenges/Section_3_List/51. highest possible product.py | Sid-1164/Resources | 3987dcaeddc8825f9bc79609ff26094282b8ece1 | [
"MIT"
] | 38 | 2022-01-12T11:56:16.000Z | 2022-03-23T10:07:52.000Z | """
Write a function that returns the highest possible product by multiplying 3 numbers from the given list.
input_list = [20,7,3,6,-1,0,9]
"""
def highest_prod(input_list):
input_list.sort()
lst = input_list
prod = lst[-1] * lst[-2] * lst[-3]
return prod
| 21.461538 | 104 | 0.655914 |
2f4b7ffd5570011cbe7bbd733e41fc6ae5a686cc | 11,716 | py | Python | Openharmony v1.0/third_party/Linux_Kernel/scripts/checkkconfigsymbols.py | clkbit123/TheOpenHarmony | 0e6bcd9dee9f1a2481d762966b8bbd24baad6159 | [
"MIT"
] | 16 | 2021-04-20T04:25:45.000Z | 2022-02-07T15:58:16.000Z | hihope_neptune-oh_hid/00_src/v0.3/third_party/Linux_Kernel/scripts/checkkconfigsymbols.py | dawmlight/vendor_oh_fun | bc9fb50920f06cd4c27399f60076f5793043c77d | [
"Apache-2.0"
] | null | null | null | hihope_neptune-oh_hid/00_src/v0.3/third_party/Linux_Kernel/scripts/checkkconfigsymbols.py | dawmlight/vendor_oh_fun | bc9fb50920f06cd4c27399f60076f5793043c77d | [
"Apache-2.0"
] | 2 | 2021-08-02T21:41:09.000Z | 2021-09-29T13:33:24.000Z | #!/usr/bin/env python2
"""Find Kconfig symbols that are referenced but not defined."""
# (c) 2014-2015 Valentin Rothberg <valentinrothberg@gmail.com>
# (c) 2014 Stefan Hengelein <stefan.hengelein@fau.de>
#
# Licensed under the terms of the GNU GPL License version 2
import os
import re
import sys
from subprocess imp... | 35.610942 | 80 | 0.568453 |
f1e2c22518ac762a7d5b17f30b8b8deace295e00 | 1,729 | py | Python | kts/util/hashing.py | konodyuk/kts | 3af5ccbf1d2089cb41d171626fcde4b0ba5aa8a7 | [
"MIT"
] | 18 | 2019-02-14T13:10:07.000Z | 2021-11-26T07:10:13.000Z | kts/util/hashing.py | konodyuk/kts | 3af5ccbf1d2089cb41d171626fcde4b0ba5aa8a7 | [
"MIT"
] | 2 | 2019-02-17T14:06:42.000Z | 2019-09-15T18:05:54.000Z | kts/util/hashing.py | konodyuk/kts | 3af5ccbf1d2089cb41d171626fcde4b0ba5aa8a7 | [
"MIT"
] | 2 | 2019-09-15T13:12:42.000Z | 2020-04-15T14:05:54.000Z | import hashlib
import json
from string import ascii_uppercase as alpha
from typing import List, Union
import numpy as np
import pandas as pd
import xxhash
def encode(x, b=26):
if x < b:
return alpha[x]
else:
return encode(x // b, b) + alpha[x % b]
def hash_str(s, l=None, base26=True):
i... | 25.80597 | 91 | 0.632157 |
9e7723f9a01ebd6f2148d25dd5ded25e5d08184b | 427 | py | Python | exercises/pt/solution_01_07.py | tuanducdesign/spacy-course | f8d092c5fa2997fccb3f367d174dce8667932b3d | [
"MIT"
] | null | null | null | exercises/pt/solution_01_07.py | tuanducdesign/spacy-course | f8d092c5fa2997fccb3f367d174dce8667932b3d | [
"MIT"
] | null | null | null | exercises/pt/solution_01_07.py | tuanducdesign/spacy-course | f8d092c5fa2997fccb3f367d174dce8667932b3d | [
"MIT"
] | null | null | null | import spacy
# Carregue o fluxo de processamento pequeno do idioma portugues "pt_core_web_sm"
# Faça antes o download do fluxo com o comando: python -m spacy download pt_core_news_sm
nlp = spacy.load("pt_core_news_sm")
text = "É oficial: a Apple é a primeira empresa dos Estados Unidos a ter o valor de mercado acima d... | 30.5 | 112 | 0.770492 |
7b552dff19b23d2fde6cd0b1ee49e8429487493a | 8,335 | py | Python | main.py | MiaranaDIY/Salamigal | 44ac98fa6463d46694e1f9343a0ebc788e7a88f8 | [
"MIT"
] | 3 | 2017-08-02T12:26:34.000Z | 2021-01-13T01:06:26.000Z | main.py | MiaranaDIY/Salamigal | 44ac98fa6463d46694e1f9343a0ebc788e7a88f8 | [
"MIT"
] | null | null | null | main.py | MiaranaDIY/Salamigal | 44ac98fa6463d46694e1f9343a0ebc788e7a88f8 | [
"MIT"
] | 3 | 2017-02-14T22:10:00.000Z | 2021-01-02T14:26:43.000Z | #!/usr/bin/python3
# -*- coding: utf-8 -*-
#īśvaraḥ paramaḥ kṛṣṇaḥ
#sac-cid-ānanda-vigrahaḥ
#anādir ādir govindaḥ
#sarva-kāraṇa-kāraṇam
#----------------------------
#Om Namo Bhagavate Vasudevaya
import os
os.chdir('/home/pi/bin/salamigal')
#Setup logging
import logging
import logging.config
logging.config.fileConfig(... | 34.300412 | 100 | 0.525855 |
c89123d88bfba0c52cc1e875a73501cae5774cf2 | 3,186 | py | Python | python-bildungslogin/ucs-test/97_bildungslogin_python/32_cli_license_retrieval.py | univention/bildungslogin | 29bebe858a5445dd5566aad594b33b9dd716eca4 | [
"MIT"
] | null | null | null | python-bildungslogin/ucs-test/97_bildungslogin_python/32_cli_license_retrieval.py | univention/bildungslogin | 29bebe858a5445dd5566aad594b33b9dd716eca4 | [
"MIT"
] | null | null | null | python-bildungslogin/ucs-test/97_bildungslogin_python/32_cli_license_retrieval.py | univention/bildungslogin | 29bebe858a5445dd5566aad594b33b9dd716eca4 | [
"MIT"
] | null | null | null | import subprocess
import univention.testing.ucsschool.ucs_test_school as utu
from univention.bildungslogin.license_retrieval import (
cmd_license_retrieval,
retrieve_licenses_package
)
TEST_PICKUP = "WES-flW-v2S-jqr"
def test_cli_retrieve_license(license_handler, lo, hostname):
"""Test that a license ca... | 33.893617 | 101 | 0.587257 |
c8e3f25b4202145a6da683bc6e89c58df92e8bb6 | 1,396 | py | Python | dataset/make_vocab.py | baowj-678/TC | 4c9bf6bf2202c9930616259d3f3e1a2b0529a6e6 | [
"MIT"
] | null | null | null | dataset/make_vocab.py | baowj-678/TC | 4c9bf6bf2202c9930616259d3f3e1a2b0529a6e6 | [
"MIT"
] | null | null | null | dataset/make_vocab.py | baowj-678/TC | 4c9bf6bf2202c9930616259d3f3e1a2b0529a6e6 | [
"MIT"
] | null | null | null | """ 根据原文件生成字典文件
@Author: Bao Wenjie
@Email: bwj_678@qq.com
@Date: 2020/10/30
"""
import nltk
from utils.data_deal import *
class MakeVocab():
def __init__(self):
pass
@staticmethod
def make_vocab_csv(path, tgt_path, seq_index, delimiter='\t'):
""" 生成字典文件
:path: 原文件(列表,多个)
:t... | 34.9 | 214 | 0.553009 |
a996178f4d2afca99c992b02bc1b5a666f23f3b5 | 1,267 | py | Python | scoremapping/ARM.py | NazaninBayati/SCA | 74e670462dd0da5e24147aab86df393b38405176 | [
"MIT"
] | null | null | null | scoremapping/ARM.py | NazaninBayati/SCA | 74e670462dd0da5e24147aab86df393b38405176 | [
"MIT"
] | null | null | null | scoremapping/ARM.py | NazaninBayati/SCA | 74e670462dd0da5e24147aab86df393b38405176 | [
"MIT"
] | null | null | null | from apyori import apriori
import sys
class arm:
def __init__(self):
args = "/home/nazanin/modified_DB_Ceph_summary.csv"
db = open(str(args))
db = db.read()
arm.associationRM(self, db)
def write(self, association_rules):
with open('result.txt', 'w')as handler:
... | 28.795455 | 81 | 0.509077 |
a5cdaa8417cf12bfd095ba427bc8f57ece6581f2 | 1,034 | py | Python | packages/watchmen-dqc/src/watchmen_dqc/monitor/rule/factor_empty_over_coverage.py | Indexical-Metrics-Measure-Advisory/watchmen | c54ec54d9f91034a38e51fd339ba66453d2c7a6d | [
"MIT"
] | null | null | null | packages/watchmen-dqc/src/watchmen_dqc/monitor/rule/factor_empty_over_coverage.py | Indexical-Metrics-Measure-Advisory/watchmen | c54ec54d9f91034a38e51fd339ba66453d2c7a6d | [
"MIT"
] | null | null | null | packages/watchmen-dqc/src/watchmen_dqc/monitor/rule/factor_empty_over_coverage.py | Indexical-Metrics-Measure-Advisory/watchmen | c54ec54d9f91034a38e51fd339ba66453d2c7a6d | [
"MIT"
] | null | null | null | from datetime import datetime
from typing import Tuple
from watchmen_data_kernel.storage import TopicDataService
from watchmen_model.dqc import MonitorRule
from watchmen_storage import EntityCriteriaExpression, EntityCriteriaOperator
from .data_service_utils import build_column_name_literal, find_factor
from .types im... | 33.354839 | 84 | 0.824952 |
f533868e4462e77a5600a2a8ffa1ee933bce54ba | 491 | py | Python | Beginner/03. Python/MoreFrequentItem.py | ankita080208/Hacktoberfest | 2be849e89285260e7b6672f42979943ad6bbec78 | [
"MIT"
] | 1 | 2021-10-06T13:55:02.000Z | 2021-10-06T13:55:02.000Z | Beginner/03. Python/MoreFrequentItem.py | ankita080208/Hacktoberfest | 2be849e89285260e7b6672f42979943ad6bbec78 | [
"MIT"
] | null | null | null | Beginner/03. Python/MoreFrequentItem.py | ankita080208/Hacktoberfest | 2be849e89285260e7b6672f42979943ad6bbec78 | [
"MIT"
] | null | null | null | """
Create a function named more_frequent_item that has three parameters named lst, item1, and item2.
Return either item1 or item2 depending on which item appears more often in lst.
If the two items appear the same number of times, return item1.
"""
def more_frequent_item(lst,item1,item2):
item1_count=lst.count(item... | 30.6875 | 97 | 0.737271 |
275872628067f064b448d5838e909b3b28cf0d0a | 407 | py | Python | restraunt/django_project/dashboard/documents.py | rakesh-gopal/restraunt_dashboard | 8eba72dabd9de27500b184b18e02b43dfdc7da89 | [
"MIT"
] | null | null | null | restraunt/django_project/dashboard/documents.py | rakesh-gopal/restraunt_dashboard | 8eba72dabd9de27500b184b18e02b43dfdc7da89 | [
"MIT"
] | null | null | null | restraunt/django_project/dashboard/documents.py | rakesh-gopal/restraunt_dashboard | 8eba72dabd9de27500b184b18e02b43dfdc7da89 | [
"MIT"
] | null | null | null | '''
MongoEngine Documents
'''
from mongoengine import connect, Document, fields
from django.conf import settings
connect(host=settings.MONGODB_CONNECT_STRING)
class Actions(Document):
'''
Restraunt Actions
'''
dish = fields.StringField()
station = fields.StringField()
action = fields.S... | 22.611111 | 49 | 0.70516 |
27ce3592639a32896cdc06b4cb779fa0ef589177 | 2,136 | py | Python | zencad/geom/surface.py | Spiritdude/zencad | 4e63b1a6306dd235f4daa2791b10249f7546c95b | [
"MIT"
] | 5 | 2018-04-11T14:11:40.000Z | 2018-09-12T19:03:36.000Z | zencad/geom/surface.py | Spiritdude/zencad | 4e63b1a6306dd235f4daa2791b10249f7546c95b | [
"MIT"
] | null | null | null | zencad/geom/surface.py | Spiritdude/zencad | 4e63b1a6306dd235f4daa2791b10249f7546c95b | [
"MIT"
] | null | null | null | from OCC.Core.BRepBuilderAPI import BRepBuilderAPI_MakeFace
from OCC.Core.Geom import Geom_CylindricalSurface
from OCC.Core.gp import gp_Pnt, gp_Vec, gp_Ax3, gp_Dir
from zencad.util import point3, vector3
from zencad.lazifier import *
from zencad.geom.curve import Curve
from OCC.Core.BRepLib import breplib
from OCC.C... | 27.037975 | 88 | 0.684925 |
7e066a616aa06ade8d50b342fc2d28aae77da97c | 5,901 | py | Python | official/nlp/gru/eval.py | leelige/mindspore | 5199e05ba3888963473f2b07da3f7bca5b9ef6dc | [
"Apache-2.0"
] | 77 | 2021-10-15T08:32:37.000Z | 2022-03-30T13:09:11.000Z | official/nlp/gru/eval.py | leelige/mindspore | 5199e05ba3888963473f2b07da3f7bca5b9ef6dc | [
"Apache-2.0"
] | 3 | 2021-10-30T14:44:57.000Z | 2022-02-14T06:57:57.000Z | official/nlp/gru/eval.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... | 42.453237 | 119 | 0.640739 |
478aa9d46d60924f960cb033642158d4feef0e65 | 3,258 | py | Python | backend/app/crud/crud_task.py | jinnn-dev/patholearn | b4e6a18cfbf963e71640ed6cac3fc3a618a7ae15 | [
"MIT"
] | 1 | 2021-11-04T17:06:07.000Z | 2021-11-04T17:06:07.000Z | backend/app/crud/crud_task.py | JamesNeumann/learning-by-annotations | c2b5e4b653eeb1c973aa5a7dad35ac8be18cb1ad | [
"MIT"
] | 21 | 2021-11-01T10:13:56.000Z | 2021-12-02T10:02:13.000Z | backend/app/crud/crud_task.py | jinnn-dev/patholearn | b4e6a18cfbf963e71640ed6cac3fc3a618a7ae15 | [
"MIT"
] | 1 | 2021-12-16T18:20:55.000Z | 2021-12-16T18:20:55.000Z | from typing import List
from sqlalchemy.orm import Session
from app.crud.base import CRUDBase
from app.models.new_task import NewTask
from app.models.task import Task
from app.schemas.task import TaskCreate, TaskUpdate
class CRUDTask(CRUDBase[Task, TaskCreate, TaskUpdate]):
def has_new_task(self, db:... | 32.58 | 88 | 0.582873 |
d0e5a43841cb20fa150b5ed1343754d1e6efdeff | 7,412 | py | Python | 2018-02-13/exam.py | animucki/2mmn40 | c54c0e4e9c801d63f048fbb5d9abd8fe9432cfdc | [
"Unlicense"
] | null | null | null | 2018-02-13/exam.py | animucki/2mmn40 | c54c0e4e9c801d63f048fbb5d9abd8fe9432cfdc | [
"Unlicense"
] | null | null | null | 2018-02-13/exam.py | animucki/2mmn40 | c54c0e4e9c801d63f048fbb5d9abd8fe9432cfdc | [
"Unlicense"
] | null | null | null | # -*- coding: utf-8 -*-
"""
Created on Wed Jan 10 20:25:16 2018
@author: roman
"""
#%reset -f
###################################################################################
################################# IMPORTS #########################################
############################################... | 39.216931 | 202 | 0.58945 |
ef959d2181216fbec09b1b09cae47e07863c1ad7 | 1,500 | py | Python | example.py | sebastian-philipp/schmidt-doku-generator | 2e3c3c0f756439b3d5490ba9642a529972861dda | [
"MIT"
] | null | null | null | example.py | sebastian-philipp/schmidt-doku-generator | 2e3c3c0f756439b3d5490ba9642a529972861dda | [
"MIT"
] | null | null | null | example.py | sebastian-philipp/schmidt-doku-generator | 2e3c3c0f756439b3d5490ba9642a529972861dda | [
"MIT"
] | null | null | null | #!/usr/bin/env python
# -*- coding: utf-8 -*-
import dokuGenerator
def main():
meta = {
"seminarSubject": "Programmiersprachen und Sprachsysteme",
"seminarLink": "http://www.fh-wedel.de/~si/seminare/ss13/Termine/Themen.html",
"seminar": "Beispiel Seminar",
"desc": "Untertitel",
"author":"Sebastian Philipp... | 14.705882 | 80 | 0.568667 |
efde4ef0d55ee08768162aeb625f7fffd6c117c0 | 434 | py | Python | ausgesondert/Zeichenkette1.py | Coding-for-the-Arts/drawbot-samples-solutions | 7191610d6efd7d788056070e7826d255b7ef496b | [
"CC0-1.0"
] | null | null | null | ausgesondert/Zeichenkette1.py | Coding-for-the-Arts/drawbot-samples-solutions | 7191610d6efd7d788056070e7826d255b7ef496b | [
"CC0-1.0"
] | null | null | null | ausgesondert/Zeichenkette1.py | Coding-for-the-Arts/drawbot-samples-solutions | 7191610d6efd7d788056070e7826d255b7ef496b | [
"CC0-1.0"
] | null | null | null | char_a = "\\"
char_b = "|"
char_c = "/"
char_d = "_"
myString = ""
for x in range(100):
for foo in range(randint(1, 7)):
for bar in range(randint(1, 5)):
myString += char_a
for baz in range(randint(1, 5)):
myString += char_b
for baz in range(randint(1, 5)):
... | 24.111111 | 40 | 0.520737 |
ef0a019d2cdceeafd185851425347214dc85efd1 | 724 | py | Python | jump-game-iii/jump-game-iii.py | hyeseonko/LeetCode | 48dfc93f1638e13041d8ce1420517a886abbdc77 | [
"MIT"
] | 2 | 2021-12-05T14:29:06.000Z | 2022-01-01T05:46:13.000Z | jump-game-iii/jump-game-iii.py | hyeseonko/LeetCode | 48dfc93f1638e13041d8ce1420517a886abbdc77 | [
"MIT"
] | null | null | null | jump-game-iii/jump-game-iii.py | hyeseonko/LeetCode | 48dfc93f1638e13041d8ce1420517a886abbdc77 | [
"MIT"
] | null | null | null | class Solution:
def canReach(self, arr: List[int], start: int) -> bool:
# BFS
visited = [False]*len(arr)
stack=[start]
visited[start]=True
# while stack is not empty
while(stack):
cur_idx = stack.pop(0)
if arr[cur_idx]==0:
... | 32.909091 | 61 | 0.520718 |
412aa86ebcd878b73667af5cf5acd653a42e0ace | 9,432 | py | Python | Target3D.py | kirtis26/Missile3D | 23a868b34f7362dac5ce0dff254d990f4d0c4e92 | [
"MIT"
] | null | null | null | Target3D.py | kirtis26/Missile3D | 23a868b34f7362dac5ce0dff254d990f4d0c4e92 | [
"MIT"
] | null | null | null | Target3D.py | kirtis26/Missile3D | 23a868b34f7362dac5ce0dff254d990f4d0c4e92 | [
"MIT"
] | null | null | null | import numpy as np
from easyvec import Vec3
class Target3D(object):
@classmethod
def get_simple_target(cls, opts, time_min, postProcessing, g=9.80665, dt=0.01):
pos, pos_aim, vel, vel_aim = opts['pos'], opts['pos_aim'], opts['vel'], opts['vel_aim'],
pos = cls._validate_dimension_argument(pos)... | 33.928058 | 140 | 0.527036 |
f5ce0195f915a149228fd9739984961b65175960 | 4,626 | py | Python | beispielanwendungen/hellogl/hellogl2.py | pbouda/pyqt-und-pyside-buch | a4ec10663ccc8aeda075c9a06b9707ded52382c8 | [
"CC-BY-4.0"
] | 5 | 2017-03-11T13:27:27.000Z | 2022-01-09T10:52:05.000Z | beispielanwendungen/hellogl/hellogl2.py | pbouda/pyqt-und-pyside-buch | a4ec10663ccc8aeda075c9a06b9707ded52382c8 | [
"CC-BY-4.0"
] | 2 | 2021-02-14T10:59:59.000Z | 2021-10-30T21:46:32.000Z | beispielanwendungen/hellogl/hellogl2.py | pbouda/pyqt-und-pyside-buch | a4ec10663ccc8aeda075c9a06b9707ded52382c8 | [
"CC-BY-4.0"
] | 1 | 2019-08-07T03:08:18.000Z | 2019-08-07T03:08:18.000Z | # -*- coding: utf-8 -*-
import sys, numpy
from PyQt4 import QtCore, QtGui, QtOpenGL
import OpenGL.GL
import OpenGL.GLU
from OpenGL.GL import GL_VERTEX_SHADER, GL_FRAGMENT_SHADER, \
glCreateProgram, glGetUniformLocation, glUniform1i, \
glUniform1f, glLinkProgram, glCreateShader, glUseProgram, \
... | 31.684932 | 88 | 0.61457 |
f5ea0de84b0ac22f9ce4077fc8d31fb6c204c5b8 | 802 | py | Python | pyventskalender/tag10_loesung.py | kopp/pyventskalender | 6f6455f3c1db07f65a772b2716e4be95fbcd1804 | [
"MIT"
] | null | null | null | pyventskalender/tag10_loesung.py | kopp/pyventskalender | 6f6455f3c1db07f65a772b2716e4be95fbcd1804 | [
"MIT"
] | null | null | null | pyventskalender/tag10_loesung.py | kopp/pyventskalender | 6f6455f3c1db07f65a772b2716e4be95fbcd1804 | [
"MIT"
] | null | null | null | from typing import List, Union
import re
GEWICHT_RE = re.compile(r"(\d+)\.(\d+). (.+) wiegt (\d+)kg")
def extrahiere_gewichte(dateiname: str) -> List[List[str]]:
gewichte = []
with open(dateiname, "r") as datei:
for zeile in datei:
gefunden = GEWICHT_RE.match(zeile)
if gefunde... | 29.703704 | 84 | 0.599751 |
de34200722e370f28c4b8823e8fc807ddc22f170 | 386 | py | Python | INBa/2015/SOSNOVY_M_S/task_3_26.py | YukkaSarasti/pythonintask | eadf4245abb65f4400a3bae30a4256b4658e009c | [
"Apache-2.0"
] | null | null | null | INBa/2015/SOSNOVY_M_S/task_3_26.py | YukkaSarasti/pythonintask | eadf4245abb65f4400a3bae30a4256b4658e009c | [
"Apache-2.0"
] | null | null | null | INBa/2015/SOSNOVY_M_S/task_3_26.py | YukkaSarasti/pythonintask | eadf4245abb65f4400a3bae30a4256b4658e009c | [
"Apache-2.0"
] | null | null | null | #Задача 3. Вариант 17.
#Напишите программу, которая выводит имя "Ричард Дженкинс", и запрашивает егопсевдоним. Программа должна сцеплять две эти строки и выводить полученнуюстроку, разделяя имя и псевдоним с помощью тире.
#Cосновый М.С.
#1.03.2016
name = "Ричрд Дженкинс"
print("Ведите псевдоним Ричарда Дженкинса: ")
ps... | 38.6 | 198 | 0.764249 |
de7968323bb866072c34cd972574f3fb73279a85 | 726 | py | Python | tests/web.adblockplus.org/pages/basePage.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/basePage.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/basePage.py | adblockplus/web.adblockplus.org | c2c570ce4f4296afc3577afe233c6b23b128f206 | [
"MIT"
] | 18 | 2015-04-06T17:42:31.000Z | 2021-10-06T04:26:29.000Z | import os
from selenium.webdriver.support import expected_conditions as ec
from selenium.webdriver.support.ui import WebDriverWait
class BasePage:
def __init__(self, driver):
self.driver = driver
self.driver.implicitly_wait(5)
self.timeout = 30
def get_current_url(self):
re... | 22.6875 | 64 | 0.681818 |
deda5e112d0840f7150154c5a444205dd01beb6e | 2,190 | py | Python | test/test_npu/test_arange.py | Ascend/pytorch | 39849cf72dafe8d2fb68bd1679d8fd54ad60fcfc | [
"BSD-3-Clause"
] | 1 | 2021-12-02T03:07:35.000Z | 2021-12-02T03:07:35.000Z | test/test_npu/test_arange.py | Ascend/pytorch | 39849cf72dafe8d2fb68bd1679d8fd54ad60fcfc | [
"BSD-3-Clause"
] | 1 | 2021-11-12T07:23:03.000Z | 2021-11-12T08:28:13.000Z | test/test_npu/test_arange.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... | 45.625 | 164 | 0.657534 |
19e47a22e9d6a6bc304cd106c8c64afae34d4d79 | 97 | py | Python | rdlcompiler.py | MegabytePhreak/rdl | b97912751738da9fddb42a9155f5823716809fc0 | [
"MIT"
] | 4 | 2016-05-10T20:40:34.000Z | 2020-04-09T13:23:33.000Z | rdlcompiler.py | MegabytePhreak/rdl | b97912751738da9fddb42a9155f5823716809fc0 | [
"MIT"
] | null | null | null | rdlcompiler.py | MegabytePhreak/rdl | b97912751738da9fddb42a9155f5823716809fc0 | [
"MIT"
] | null | null | null | #! /usr/bin/env python2
if __name__ == '__main__':
import rdlcompiler
rdlcompiler.main() | 19.4 | 26 | 0.680412 |
19fad6c5847459ee6b6789fd9dd84f2dd19c5b23 | 1,432 | py | Python | src/server/app/endpoints/keybindings/controllers.py | MatthiasRiener/DigiPen | 9b4aff4a1c431e06d73733dc3dd3f3f3d4631704 | [
"MIT"
] | 6 | 2020-12-15T18:57:53.000Z | 2022-02-06T18:54:35.000Z | src/server/app/endpoints/keybindings/controllers.py | MatthiasRiener/DigiPen | 9b4aff4a1c431e06d73733dc3dd3f3f3d4631704 | [
"MIT"
] | 186 | 2020-11-17T10:18:17.000Z | 2022-03-02T07:19:22.000Z | src/server/app/endpoints/keybindings/controllers.py | MatthiasRiener/DigiPen | 9b4aff4a1c431e06d73733dc3dd3f3f3d4631704 | [
"MIT"
] | 1 | 2020-12-14T19:37:30.000Z | 2020-12-14T19:37:30.000Z | from ...db.settings import db, oidc
from flask import Flask, Blueprint, render_template, abort, g, request
from flask_jwt_extended import (create_access_token, create_refresh_token, jwt_required, jwt_refresh_token_required, get_jwt_identity, get_raw_jwt, set_access_cookies, get_jti,
s... | 27.018868 | 176 | 0.729749 |
19fd7255b1ddb882666e811b2f1db7940c7aa394 | 381 | py | Python | app/api/v1/user.py | zucc-acm-devteam/zuccacm-sso | 9c7d2f0b9cc069962f32b555152732a98bf2e94a | [
"Apache-2.0"
] | null | null | null | app/api/v1/user.py | zucc-acm-devteam/zuccacm-sso | 9c7d2f0b9cc069962f32b555152732a98bf2e94a | [
"Apache-2.0"
] | null | null | null | app/api/v1/user.py | zucc-acm-devteam/zuccacm-sso | 9c7d2f0b9cc069962f32b555152732a98bf2e94a | [
"Apache-2.0"
] | null | null | null | from app.libs.error_code import AuthFailed, DeleteSuccess, CreateSuccess
from app.libs.red_print import RedPrint
from app.validators.user import RegisterForm
from app.models.user import User
api = RedPrint('user')
@api.route('', methods=['POST'])
def create_user_api():
form = RegisterForm().validate_for_api().da... | 27.214286 | 72 | 0.75853 |
c2244c1258865b1750a5b10e33583a9d457b5db0 | 3,250 | py | Python | src/bo4e/bo/preisblatthardware.py | bo4e/BO4E-python | 28b12f853c8a496d14b133759b7aa2d6661f79a0 | [
"MIT"
] | 1 | 2022-03-02T12:49:44.000Z | 2022-03-02T12:49:44.000Z | src/bo4e/bo/preisblatthardware.py | bo4e/BO4E-python | 28b12f853c8a496d14b133759b7aa2d6661f79a0 | [
"MIT"
] | 21 | 2022-02-04T07:38:46.000Z | 2022-03-28T14:01:53.000Z | src/bo4e/bo/preisblatthardware.py | bo4e/BO4E-python | 28b12f853c8a496d14b133759b7aa2d6661f79a0 | [
"MIT"
] | null | null | null | """
Contains PreisblattHardware class and corresponding marshmallow schema for de-/serialization
"""
from typing import List, Optional
import attr
from marshmallow import fields
from marshmallow_enum import EnumField # type:ignore[import]
from bo4e.bo.preisblatt import Preisblatt, PreisblattSchema
from bo4e.com.gera... | 42.763158 | 190 | 0.76 |
f2fac31e5138df9faf8f10ccc16a77bd9dacf5e6 | 11,955 | py | Python | respiratory/Processed Datasets/Processed Datasets/week9.py | easyCZ/SLIP-A-2015 | ad386df9c438d93ec89f68c63d3deda12d27d1ed | [
"MIT"
] | 2 | 2020-06-08T19:17:10.000Z | 2020-06-08T20:45:07.000Z | respiratory/Processed Datasets/Processed Datasets/week9.py | easyCZ/SLIP-A-2015 | ad386df9c438d93ec89f68c63d3deda12d27d1ed | [
"MIT"
] | 14 | 2015-10-07T09:31:50.000Z | 2022-02-23T07:34:10.000Z | respiratory/Processed Datasets/Processed Datasets/week9.py | easyCZ/SLIP-A-2015 | ad386df9c438d93ec89f68c63d3deda12d27d1ed | [
"MIT"
] | null | null | null | # PART 1 - INITIALIZATION
actual_ranking = [1,6,7,5,9,10,4,8,2,3] # actual_ranking[i] = patient.number of rank
actual_ranking1 = [1,9,10,7,4,2,3,8,5,6] # actual_ranking1[i] = rank of patient[i]
exercises = [1,2,3,4,5,6,7,8,9,10,12]
patients = [1,2,3,4,5,6,7,8,9,10]
class patients(object):
def __init__(self,number,sc... | 27.867133 | 218 | 0.677792 |
f2718401f390a622ac18ea9fda2807ccd4db3526 | 1,700 | py | Python | code/snake/DeepLearning/SnakeEnvConvolutionalMachineLearning.py | BogyMitutoyoCTL/AI-Preparation | ef535741816b02e5e63d426a3232a688c9abd726 | [
"MIT"
] | 1 | 2020-03-30T09:25:53.000Z | 2020-03-30T09:25:53.000Z | code/snake/DeepLearning/SnakeEnvConvolutionalMachineLearning.py | BogyMitutoyoCTL/AI-Preparation | ef535741816b02e5e63d426a3232a688c9abd726 | [
"MIT"
] | 2 | 2020-02-05T14:00:23.000Z | 2020-03-30T19:57:19.000Z | code/snake/DeepLearning/SnakeEnvConvolutionalMachineLearning.py | BogyMitutoyoCTL/AI-Preparation | ef535741816b02e5e63d426a3232a688c9abd726 | [
"MIT"
] | null | null | null | import math
import gym
import pygame
import SnakeGym
class SnakeEnvConvolutionalMachineLearning(gym.Env):
metadata = {'render.modes': ['human']}
def __init__(self):
self.basegym: SnakeGym = SnakeGym.SnakeEnv()
self.observation_space = self.basegym.observation_space
self.action_space... | 31.481481 | 105 | 0.602353 |
8ab1c15d97255097e78e96977364771ebcdc0c59 | 12,886 | py | Python | main.py | VNCompany/PyDafm | 9634f5428b9f3739dbf7c159daad34856b372165 | [
"Unlicense"
] | null | null | null | main.py | VNCompany/PyDafm | 9634f5428b9f3739dbf7c159daad34856b372165 | [
"Unlicense"
] | null | null | null | main.py | VNCompany/PyDafm | 9634f5428b9f3739dbf7c159daad34856b372165 | [
"Unlicense"
] | null | null | null | from PyQt5.QtWidgets import QMainWindow, QApplication, QTableWidget, QTableWidgetItem, QAction
from PyQt5.QtWidgets import QHeaderView, QFileDialog, QMessageBox
from PyQt5.QtGui import QColor, QIcon, QKeyEvent
from PyQt5.QtCore import Qt
from PyQt5 import uic
import os
from datetime import date
from dbm import *
from ... | 39.649231 | 99 | 0.540199 |
0a247633bdbaaded94c0b68db929cd3b855d3c93 | 683 | py | Python | python_gui_tkinter/KALU/GARBAGE/mail/mail.py | SayanGhoshBDA/code-backup | 8b6135facc0e598e9686b2e8eb2d69dd68198b80 | [
"MIT"
] | 16 | 2018-11-26T08:39:42.000Z | 2019-05-08T10:09:52.000Z | python_gui_tkinter/KALU/GARBAGE/mail/mail.py | SayanGhoshBDA/code-backup | 8b6135facc0e598e9686b2e8eb2d69dd68198b80 | [
"MIT"
] | 8 | 2020-05-04T06:29:26.000Z | 2022-02-12T05:33:16.000Z | python_gui_tkinter/KALU/GARBAGE/mail/mail.py | SayanGhoshBDA/code-backup | 8b6135facc0e598e9686b2e8eb2d69dd68198b80 | [
"MIT"
] | 5 | 2020-02-11T16:02:21.000Z | 2021-02-05T07:48:30.000Z | # Import smtplib for the actual sending function
import smtplib
# Import the email modules we'll need
from email.message import EmailMessage
textfile = "textfile"
# Open the plain text file whose name is in textfile for reading.
with open(textfile) as fp:
# Create a text/plain message
msg = EmailMessage()
... | 27.32 | 65 | 0.732064 |
0aa38f8f6329616e9b1288a06e8c00e734045e03 | 5,042 | py | Python | tests/test_validator.py | chaneyjd/rasa | 104a9591fc10b96eaa7fe402b6d64ca652b7ebe2 | [
"Apache-2.0"
] | 1 | 2020-09-12T17:27:21.000Z | 2020-09-12T17:27:21.000Z | tests/test_validator.py | chaneyjd/rasa | 104a9591fc10b96eaa7fe402b6d64ca652b7ebe2 | [
"Apache-2.0"
] | 52 | 2020-10-03T11:58:14.000Z | 2022-02-01T13:17:52.000Z | tests/test_validator.py | chaneyjd/rasa | 104a9591fc10b96eaa7fe402b6d64ca652b7ebe2 | [
"Apache-2.0"
] | null | null | null | import pytest
import rasa.shared.utils.io
from rasa.validator import Validator
from rasa.shared.importers.rasa import RasaFileImporter
from tests.conftest import DEFAULT_NLU_DATA
from tests.core.conftest import DEFAULT_STORIES_FILE
async def test_verify_intents_does_not_fail_on_valid_data():
importer = RasaFileI... | 37.348148 | 79 | 0.739191 |
7c512b05f063c9b0ae4fda240ec4fc236315ca27 | 1,674 | py | Python | Build a Discord Bot using Replit/main.py | Akshu-on-github/MLH-INIT-2022 | cf3fbbc8abd3eae3b958d3d482ed1fa1467f559e | [
"MIT"
] | 1 | 2021-07-05T14:30:34.000Z | 2021-07-05T14:30:34.000Z | Build a Discord Bot using Replit/main.py | Akshu-on-github/MLH-INIT-2022 | cf3fbbc8abd3eae3b958d3d482ed1fa1467f559e | [
"MIT"
] | 1 | 2021-07-02T15:36:02.000Z | 2021-07-02T15:37:25.000Z | Build a Discord Bot using Replit/main.py | Akshu-on-github/MLH-INIT-2022 | cf3fbbc8abd3eae3b958d3d482ed1fa1467f559e | [
"MIT"
] | 1 | 2021-07-02T15:15:17.000Z | 2021-07-02T15:15:17.000Z | import discord
import os
from keep_alive import keep_alive
from discord.ext import commands
client = discord.Client()
@client.event
async def on_ready():
print('We have logged in as {0.user}'.format(client))
@client.event
async def on_message(message):
if message.author == client.user:
return
if... | 31.584906 | 142 | 0.681601 |
7c8fdc1c5543d6414c22075d9f6112bb7a0edd94 | 1,217 | py | Python | exercises/en/exc_03_12.py | tuanducdesign/spacy-course | f8d092c5fa2997fccb3f367d174dce8667932b3d | [
"MIT"
] | 2 | 2020-07-07T01:46:37.000Z | 2021-04-20T03:19:43.000Z | exercises/en/exc_03_12.py | tuanducdesign/spacy-course | f8d092c5fa2997fccb3f367d174dce8667932b3d | [
"MIT"
] | null | null | null | exercises/en/exc_03_12.py | tuanducdesign/spacy-course | f8d092c5fa2997fccb3f367d174dce8667932b3d | [
"MIT"
] | null | null | null | import json
import spacy
from spacy.language import Language
from spacy.tokens import Span
from spacy.matcher import PhraseMatcher
with open("exercises/en/countries.json", encoding="utf8") as f:
COUNTRIES = json.loads(f.read())
with open("exercises/en/capitals.json", encoding="utf8") as f:
CAPITALS = json.loa... | 31.205128 | 87 | 0.751027 |
6b3fe0a04cd5e11337f4633832f009e27721581d | 3,694 | py | Python | test/test_npu/test_network_ops/test_conv1d.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_conv1d.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_conv1d.py | Ascend/pytorch | 39849cf72dafe8d2fb68bd1679d8fd54ad60fcfc | [
"BSD-3-Clause"
] | null | null | null | # Copyright (c) 2020 Huawei Technologies Co., Ltd
# Copyright (c) 2019, Facebook CORPORATION.
# 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/lice... | 42.45977 | 130 | 0.676773 |
862d97d4083f0f7c6d6e9af9e3ea5c300b1ec8c8 | 3,173 | py | Python | pyntcloud/scalar_fields/k_neighbors.py | bernssolg/pyntcloud-master | 84cf000b7a7f69a2c1b36f9624f05f65160bf992 | [
"MIT"
] | 1,142 | 2016-10-10T08:55:30.000Z | 2022-03-30T04:46:16.000Z | pyntcloud/scalar_fields/k_neighbors.py | bernssolg/pyntcloud-master | 84cf000b7a7f69a2c1b36f9624f05f65160bf992 | [
"MIT"
] | 195 | 2016-10-10T08:30:37.000Z | 2022-02-17T12:51:17.000Z | pyntcloud/scalar_fields/k_neighbors.py | bernssolg/pyntcloud-master | 84cf000b7a7f69a2c1b36f9624f05f65160bf992 | [
"MIT"
] | 215 | 2017-02-28T00:50:29.000Z | 2022-03-22T17:01:31.000Z | import numpy as np
from .base import ScalarField
from ..utils.array import cov3D
class KNeighborsScalarField(ScalarField):
"""
Parameters
----------
k_neighbors: ndarray
(N, k, 3) The k neighbours associated to each of the N points.
"""
def __init__(self, *, pyntcloud, k_neighbors):
... | 33.4 | 74 | 0.59313 |
866712661aa3742fdfb4daf7796dea654d36f753 | 3,989 | py | Python | transonic/test_init_transonified.py | fluiddyn/transonic | a460e9f6d1139f79b668cb3306d1e8a7e190b72d | [
"BSD-3-Clause"
] | 88 | 2019-01-08T16:39:08.000Z | 2022-02-06T14:19:23.000Z | transonic/test_init_transonified.py | fluiddyn/transonic | a460e9f6d1139f79b668cb3306d1e8a7e190b72d | [
"BSD-3-Clause"
] | 13 | 2019-06-20T15:53:10.000Z | 2021-02-09T11:03:29.000Z | transonic/test_init_transonified.py | fluiddyn/transonic | a460e9f6d1139f79b668cb3306d1e8a7e190b72d | [
"BSD-3-Clause"
] | 1 | 2019-11-05T03:03:14.000Z | 2019-11-05T03:03:14.000Z | import importlib
import unittest
import os
import time
from transonic.backends import backends
from transonic.config import backend_default
from transonic.util import (
has_to_compile_at_import,
ext_suffix,
can_import_accelerator,
)
from transonic.aheadoftime import modules
from transonic import mpi
backe... | 25.570513 | 80 | 0.626473 |
8126c739d2f9f284ef4dfd7f0bdae942925308f0 | 5,401 | py | Python | src/lecture2/logistic_regression/logistic_regression.py | Fassial/zju-intern | f421f9c97d3c567e9b97121c5bf5c675c9e2c721 | [
"MIT"
] | 1 | 2020-08-17T07:09:09.000Z | 2020-08-17T07:09:09.000Z | src/lecture2/logistic_regression/logistic_regression.py | Fassial/zju-intern | f421f9c97d3c567e9b97121c5bf5c675c9e2c721 | [
"MIT"
] | null | null | null | src/lecture2/logistic_regression/logistic_regression.py | Fassial/zju-intern | f421f9c97d3c567e9b97121c5bf5c675c9e2c721 | [
"MIT"
] | 2 | 2020-07-26T07:27:57.000Z | 2020-08-17T07:09:15.000Z | """
Created on August 01 02:02, 2020
@author: ddbourgin
"""
import numpy as np
# local dep
import .utils
class LogisticRegression:
def __init__(self, penalty="l2", gamma=0, fit_intercept=True):
r"""
A simple logistic regression model fit via gradient descent on the
penalized negative log ... | 36.993151 | 88 | 0.533975 |
d4a2be0024b04fb7f7a847e23c42755e90e1147b | 309 | py | Python | skimind/kernel/pdfManag/__init__.py | NathBangwa/SkimindFoot | 8ae3a00074c56dd981fbfdab30e29898ddcaf6be | [
"MIT"
] | 1 | 2020-11-13T18:30:47.000Z | 2020-11-13T18:30:47.000Z | skimind/kernel/pdfManag/__init__.py | nathanbangwa243/SkimindFoot | 8ae3a00074c56dd981fbfdab30e29898ddcaf6be | [
"MIT"
] | 5 | 2020-11-13T18:16:48.000Z | 2021-09-08T01:04:59.000Z | skimind/kernel/pdfManag/__init__.py | nathanbangwa243/SkimindFoot | 8ae3a00074c56dd981fbfdab30e29898ddcaf6be | [
"MIT"
] | null | null | null | #---------------------------------------------------------------------------
# BUILDTICKET INIT
#---------------------------------------------------------------------------
# interfacedb
from .. import interfacedb
#gFunctions
from .. import gFunctions
# global config
from .. import config as skiconfig | 23.769231 | 76 | 0.375405 |
d4b815aced7c3c8f9bf0cf88e417e14d80c2f1c4 | 1,582 | py | Python | Computerorietierte_Mathematik/U2/plotErrors.py | qiaw99/Data-Structure | 3b1cdce96d4f35329ccfec29c03de57378ef0552 | [
"MIT"
] | 1 | 2019-10-29T08:21:41.000Z | 2019-10-29T08:21:41.000Z | Computerorietierte_Mathematik/U2/plotErrors.py | qiaw99/Data-Structure | 3b1cdce96d4f35329ccfec29c03de57378ef0552 | [
"MIT"
] | null | null | null | Computerorietierte_Mathematik/U2/plotErrors.py | qiaw99/Data-Structure | 3b1cdce96d4f35329ccfec29c03de57378ef0552 | [
"MIT"
] | null | null | null | # Zero-Clause BSD
# Permission to use, copy, modify, and/or distribute this software for any purpose with or without fee is hereby granted.
# THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVE... | 40.564103 | 487 | 0.732617 |
d4ede7c40016d463da5feacc193e0919c45eee2b | 4,451 | py | Python | scripts/pcm_ratios.py | puv13/nspt-scripts | bba4c794858f34894adc2f82fd530ed5ff52f691 | [
"MIT"
] | null | null | null | scripts/pcm_ratios.py | puv13/nspt-scripts | bba4c794858f34894adc2f82fd530ed5ff52f691 | [
"MIT"
] | null | null | null | scripts/pcm_ratios.py | puv13/nspt-scripts | bba4c794858f34894adc2f82fd530ed5ff52f691 | [
"MIT"
] | null | null | null | #!/usr/bin/env python
# -*- coding: utf-8 -*-
"""
This is a script to parse NSPT data files for the PCM model and to generate
new output files suitable for plotting the ratios of the expansion
coefficients with gnuplot.
"""
import glob
import re
from optparse import OptionParser
import numpy as np
#--------... | 27.475309 | 80 | 0.403954 |
be180ac36d3f53777c117bed4d283ed1d5d04e3e | 481 | py | Python | Python/diamond_star.py | saurabhpal007/hacktoberfest2021-1 | 5abad37ab426a7b34fc7bcd98ded885fd6ce02ef | [
"CC0-1.0"
] | 81 | 2021-10-01T13:19:13.000Z | 2021-10-06T08:43:35.000Z | Python/diamond_star.py | saurabhpal007/hacktoberfest2021-1 | 5abad37ab426a7b34fc7bcd98ded885fd6ce02ef | [
"CC0-1.0"
] | 67 | 2021-10-01T13:43:46.000Z | 2021-10-06T13:55:49.000Z | Python/diamond_star.py | saurabhpal007/hacktoberfest2021-1 | 5abad37ab426a7b34fc7bcd98ded885fd6ce02ef | [
"CC0-1.0"
] | 394 | 2021-10-01T11:55:24.000Z | 2021-10-06T13:45:57.000Z | rows = int(input("Enter you number:"))
n = 0
for i in range(1, rows + 1):
n = 0
# loop to print spaces
n = (rows - i)
print(" " * n, end = "")
# loop to print star
n = (2 * i - 1)
print(str(i) * n, end = "")
print()
####
for i in range(rows-1, 0, -1):
# loop to... | 20.041667 | 39 | 0.422037 |
be25a6b829c0382295c8947cfd2e5d1fbf3f3b3f | 1,095 | py | Python | haas_lib_bundles/python/docs/examples/rc522_write_read/haas506/code/write.py | wstong999/AliOS-Things | 6554769cb5b797e28a30a4aa89b3f4cb2ef2f5d9 | [
"Apache-2.0"
] | null | null | null | haas_lib_bundles/python/docs/examples/rc522_write_read/haas506/code/write.py | wstong999/AliOS-Things | 6554769cb5b797e28a30a4aa89b3f4cb2ef2f5d9 | [
"Apache-2.0"
] | null | null | null | haas_lib_bundles/python/docs/examples/rc522_write_read/haas506/code/write.py | wstong999/AliOS-Things | 6554769cb5b797e28a30a4aa89b3f4cb2ef2f5d9 | [
"Apache-2.0"
] | null | null | null | import mfrc522
import utime as time
def do_write():
rdr = mfrc522.MFRC522()
try:
while True:
(stat, tag_type) = rdr.request(rdr.REQIDL)
if stat == rdr.OK:
(stat, raw_uid) = rdr.anticoll()
if stat == rdr.OK:
print("New card detected")
print(" - tag type: 0x%02x" % tag_type)
print(" - ... | 28.815789 | 95 | 0.590868 |
07bd020953460cd4047a9557118a4a707001e8b4 | 2,083 | py | Python | tools/legacy/veh-parser/sensorInfo.py | gifted-nguvu/darkstar-dts-converter | aa17a751a9f3361ca9bbb400ee4c9516908d1297 | [
"MIT"
] | 2 | 2020-03-18T18:23:27.000Z | 2020-08-02T15:59:16.000Z | tools/legacy/veh-parser/sensorInfo.py | gifted-nguvu/darkstar-dts-converter | aa17a751a9f3361ca9bbb400ee4c9516908d1297 | [
"MIT"
] | 5 | 2019-07-07T16:47:47.000Z | 2020-08-10T16:20:00.000Z | tools/legacy/veh-parser/sensorInfo.py | gifted-nguvu/darkstar-dts-converter | aa17a751a9f3361ca9bbb400ee4c9516908d1297 | [
"MIT"
] | 1 | 2020-03-18T18:23:30.000Z | 2020-03-18T18:23:30.000Z | import sharedInfo
from functools import partial
def createExecContext():
result = {
"sensors": [],
"currentSensor": {},
"a": "active",
"p": "passive",
"H": "human",
"C": "cybrid",
"s": "small",
"X": "xl",
"x": "xl",
"S": "small",
... | 31.089552 | 113 | 0.540086 |
07e4e4ecab3fdae0056a2acf2a1af4c0056872ad | 4,402 | py | Python | python/oneflow/compatible/single_client/test/ops/test_size.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_size.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_size.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... | 34.936508 | 72 | 0.631758 |
ed5a97e33d96bd3a3d882a7399ce27a6dade1689 | 494 | py | Python | Lab2/task[10-12].py | ValeriyMartsyshyn/HelloPython | badcf85bc54e889eed0286b420e5cabe68da8572 | [
"MIT"
] | null | null | null | Lab2/task[10-12].py | ValeriyMartsyshyn/HelloPython | badcf85bc54e889eed0286b420e5cabe68da8572 | [
"MIT"
] | null | null | null | Lab2/task[10-12].py | ValeriyMartsyshyn/HelloPython | badcf85bc54e889eed0286b420e5cabe68da8572 | [
"MIT"
] | null | null | null | #import datetime
#a = input('Перша дата (рік-місяць-день): ')
#b = input('друга дата (рік-місяць-день): ')
#a = a.split('-')
#b = b.split('-')
#a1 = datetime.date(int(a[0]),int(a[1]),int(a[2]))
#b1 = datetime.date(int(b[0]),int(b[1]),int(b[2]))
#c = a1-b1
#print(c)
#TASK11
#lst=[]
#a=("1","2","4")
#for i in a:
# ... | 17.642857 | 51 | 0.520243 |
1344c580ce9d04e5978f01eb7d33adc137d13693 | 1,041 | py | Python | publicFB.py | Zusyaku/Termux-And-Lali-Linux-V2 | b1a1b0841d22d4bf2cc7932b72716d55f070871e | [
"Apache-2.0"
] | 2 | 2021-11-17T03:35:03.000Z | 2021-12-08T06:00:31.000Z | publicFB.py | Zusyaku/Termux-And-Lali-Linux-V2 | b1a1b0841d22d4bf2cc7932b72716d55f070871e | [
"Apache-2.0"
] | null | null | null | publicFB.py | Zusyaku/Termux-And-Lali-Linux-V2 | b1a1b0841d22d4bf2cc7932b72716d55f070871e | [
"Apache-2.0"
] | 2 | 2021-11-05T18:07:48.000Z | 2022-02-24T21:25:07.000Z | import os,time,requests,re
from time import sleep
id=[]
def search(url):
global id
sleep(2)
req=requests.get(url).text
usr=re.findall(r'<td class="bz ca"><a href="(.*?)"><div class="cb"><div class="cc">(.*?)</div></div>',req)
for user in usr:
username=user[0].replace("/","")
if 'prof... | 34.7 | 110 | 0.586936 |
137b71947a153b5c3f87bf71967c6af810ae2b2a | 8,555 | py | Python | Packs/ReversingLabs_TitaniumScale/Integrations/ReversingLabsTitaniumScale/ReversingLabsTitaniumScale.py | diCagri/content | c532c50b213e6dddb8ae6a378d6d09198e08fc9f | [
"MIT"
] | 799 | 2016-08-02T06:43:14.000Z | 2022-03-31T11:10:11.000Z | Packs/ReversingLabs_TitaniumScale/Integrations/ReversingLabsTitaniumScale/ReversingLabsTitaniumScale.py | diCagri/content | c532c50b213e6dddb8ae6a378d6d09198e08fc9f | [
"MIT"
] | 9,317 | 2016-08-07T19:00:51.000Z | 2022-03-31T21:56:04.000Z | Packs/ReversingLabs_TitaniumScale/Integrations/ReversingLabsTitaniumScale/ReversingLabsTitaniumScale.py | diCagri/content | c532c50b213e6dddb8ae6a378d6d09198e08fc9f | [
"MIT"
] | 1,297 | 2016-08-04T13:59:00.000Z | 2022-03-31T23:43:06.000Z | from CommonServerPython import *
from ReversingLabs.SDK.tiscale import TitaniumScale
import demistomock as demisto
import requests
import json
VERSION = "v1.0.0"
USER_AGENT = f"ReversingLabs XSOAR TitaniumScale {VERSION}"
HOST = demisto.params().get('host')
TOKEN = demisto.params().get('token')
VERIFY_CERT = demisto.... | 34.22 | 120 | 0.606897 |
1398b6c6d6a2f584ca6aa10cc2c53a2730b65e16 | 18,675 | py | Python | official/nlp/textcnn/src/dataset.py | leelige/mindspore | 5199e05ba3888963473f2b07da3f7bca5b9ef6dc | [
"Apache-2.0"
] | 1 | 2021-11-18T08:17:44.000Z | 2021-11-18T08:17:44.000Z | official/nlp/textcnn/src/dataset.py | leelige/mindspore | 5199e05ba3888963473f2b07da3f7bca5b9ef6dc | [
"Apache-2.0"
] | null | null | null | official/nlp/textcnn/src/dataset.py | leelige/mindspore | 5199e05ba3888963473f2b07da3f7bca5b9ef6dc | [
"Apache-2.0"
] | 2 | 2019-09-01T06:17:04.000Z | 2019-10-04T08:39:45.000Z | # Copyright 2020 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... | 38.268443 | 117 | 0.441821 |
139d2b1b5c210979610fe1c23363339a3fa32076 | 548 | py | Python | Grundgeruest/migrations/0008_auto_20170510_1658.py | wmles/scholarium.at | d2356b3e475df772382e035ddcb839fc7dae4305 | [
"MIT"
] | 1 | 2017-07-24T10:19:36.000Z | 2017-07-24T10:19:36.000Z | Grundgeruest/migrations/0008_auto_20170510_1658.py | wmles/scholarium.at | d2356b3e475df772382e035ddcb839fc7dae4305 | [
"MIT"
] | 9 | 2017-07-26T14:16:08.000Z | 2022-03-11T23:14:40.000Z | Grundgeruest/migrations/0008_auto_20170510_1658.py | wmles/scholarium.at | d2356b3e475df772382e035ddcb839fc7dae4305 | [
"MIT"
] | 1 | 2017-03-07T12:38:23.000Z | 2017-03-07T12:38:23.000Z | # -*- coding: utf-8 -*-
# Generated by Django 1.9.11 on 2017-05-10 14:58
from __future__ import unicode_literals
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('Grundgeruest', '0007_auto_20170510_1657'),
]
operations = [
migrations.Alte... | 26.095238 | 138 | 0.620438 |
b94a587a064d1017dd3ee7d360d3669c1f8de8c6 | 1,911 | py | Python | Utils/github_workflow_scripts/trigger_contribution_build.py | cstone112/content | 7f039931b8cfc20e89df52d895440b7321149a0d | [
"MIT"
] | 2 | 2021-12-06T21:38:24.000Z | 2022-01-13T08:23:36.000Z | Utils/github_workflow_scripts/trigger_contribution_build.py | cstone112/content | 7f039931b8cfc20e89df52d895440b7321149a0d | [
"MIT"
] | 87 | 2022-02-23T12:10:53.000Z | 2022-03-31T11:29:05.000Z | Utils/github_workflow_scripts/trigger_contribution_build.py | cstone112/content | 7f039931b8cfc20e89df52d895440b7321149a0d | [
"MIT"
] | 2 | 2022-01-05T15:27:01.000Z | 2022-02-01T19:27:43.000Z | #!/usr/bin/env python3
import argparse
import sys
import requests
import urllib3
urllib3.disable_warnings(urllib3.exceptions.InsecureRequestWarning)
CONTRIBUTION_BUILD_INSTANCE_URL = "https://content-gold.paloaltonetworks.com/instance/" \
"execute/GenericWebhook_trigger_contributio... | 31.85 | 112 | 0.689691 |
b9cb9b607cbc02a006ecac1013e645a36a06e035 | 767 | py | Python | Packs/IntegrationsAndIncidentsHealthCheck/Scripts/IncidentsCheck_Widget_CommandsNames/IncidentsCheck_Widget_CommandsNames_test.py | diCagri/content | c532c50b213e6dddb8ae6a378d6d09198e08fc9f | [
"MIT"
] | 799 | 2016-08-02T06:43:14.000Z | 2022-03-31T11:10:11.000Z | Packs/IntegrationsAndIncidentsHealthCheck/Scripts/IncidentsCheck_Widget_CommandsNames/IncidentsCheck_Widget_CommandsNames_test.py | diCagri/content | c532c50b213e6dddb8ae6a378d6d09198e08fc9f | [
"MIT"
] | 9,317 | 2016-08-07T19:00:51.000Z | 2022-03-31T21:56:04.000Z | Packs/IntegrationsAndIncidentsHealthCheck/Scripts/IncidentsCheck_Widget_CommandsNames/IncidentsCheck_Widget_CommandsNames_test.py | diCagri/content | c532c50b213e6dddb8ae6a378d6d09198e08fc9f | [
"MIT"
] | 1,297 | 2016-08-04T13:59:00.000Z | 2022-03-31T23:43:06.000Z | import pytest
import demistomock as demisto
from IncidentsCheck_Widget_CommandsNames import main, random
@pytest.mark.parametrize('list_, expected', [
([{'Contents': 'name 1,name 2'}],
'[{"data": [1], "name": "name 1", "color": "#0003e8"}, {"data": [1], "name": "name 2", "color": "#0003e8"}]'),
([{'Conte... | 36.52381 | 115 | 0.614081 |
b9fe91ff3c946511a6e8af8918702acc6e5aeee6 | 12,955 | py | Python | exercises/networking_selfpaced/networking-workshop/collections/ansible_collections/community/general/plugins/module_utils/network/cloudengine/ce.py | tr3ck3r/linklight | 5060f624c235ecf46cb62cefcc6bddc6bf8ca3e7 | [
"MIT"
] | null | null | null | exercises/networking_selfpaced/networking-workshop/collections/ansible_collections/community/general/plugins/module_utils/network/cloudengine/ce.py | tr3ck3r/linklight | 5060f624c235ecf46cb62cefcc6bddc6bf8ca3e7 | [
"MIT"
] | null | null | null | exercises/networking_selfpaced/networking-workshop/collections/ansible_collections/community/general/plugins/module_utils/network/cloudengine/ce.py | tr3ck3r/linklight | 5060f624c235ecf46cb62cefcc6bddc6bf8ca3e7 | [
"MIT"
] | null | null | null | #
# This code is part of Ansible, but is an independent component.
#
# This particular file snippet, and this file snippet only, is BSD licensed.
# Modules you write using this snippet, which is embedded dynamically by Ansible
# still belong to the author of the module, and may assign their own license
# to the complet... | 30.699052 | 124 | 0.62254 |
dbf8e6c8766227314478dd0a942bee169ed68beb | 4,371 | py | Python | Contrib-Microsoft/Olympus_rack_manager/python-ocs/commonapi/controls/ipmicmd_library.py | opencomputeproject/Rack-Manager | e1a61d3eeeba0ff655fe9c1301e8b510d9b2122a | [
"MIT"
] | 5 | 2019-11-11T07:57:26.000Z | 2022-03-28T08:26:53.000Z | Contrib-Microsoft/Olympus_rack_manager/python-ocs/commonapi/controls/ipmicmd_library.py | opencomputeproject/Rack-Manager | e1a61d3eeeba0ff655fe9c1301e8b510d9b2122a | [
"MIT"
] | 3 | 2019-09-05T21:47:07.000Z | 2019-09-17T18:10:45.000Z | Contrib-Microsoft/Olympus_rack_manager/python-ocs/commonapi/controls/ipmicmd_library.py | opencomputeproject/Rack-Manager | e1a61d3eeeba0ff655fe9c1301e8b510d9b2122a | [
"MIT"
] | 11 | 2019-07-20T00:16:32.000Z | 2022-01-11T14:17:48.000Z | # Copyright (C) Microsoft Corporation. All rights reserved.
# This program 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 2
# of the License, or (at your option) any later version.
#!/usr/bin... | 32.864662 | 121 | 0.636468 |
1603ecc0f6eeca917057877d744783c936f1a9f9 | 384 | py | Python | RDS/circle3_central_services/research_manager/src/api/User/Research/project.py | Sciebo-RDS/Sciebo-RDS | d71cf449ed045a2a7a049e2cb77c99fd5a9195bd | [
"MIT"
] | 10 | 2020-06-24T08:22:24.000Z | 2022-01-13T16:17:36.000Z | RDS/circle3_central_services/research_manager/src/api/User/Research/project.py | Sciebo-RDS/Sciebo-RDS | d71cf449ed045a2a7a049e2cb77c99fd5a9195bd | [
"MIT"
] | 78 | 2020-01-23T14:32:06.000Z | 2022-03-07T14:11:16.000Z | RDS/circle3_central_services/research_manager/src/api/User/Research/project.py | Sciebo-RDS/Sciebo-RDS | d71cf449ed045a2a7a049e2cb77c99fd5a9195bd | [
"MIT"
] | 1 | 2020-06-24T08:33:48.000Z | 2020-06-24T08:33:48.000Z | import Singleton
from flask import jsonify
def get(user_id, research_id):
return jsonify(Singleton.ProjectService.getProject(user_id, int(research_id)))
def delete(user_id, research_id):
resp = Singleton.ProjectService.removeProject(user_id, int(research_id))
if resp:
return None, 204
rais... | 24 | 82 | 0.752604 |
163c3fe304d4e2710bfa19cc614912c2ed84e126 | 2,408 | py | Python | test/test_npu/test_network_ops/test_abs.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_abs.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_abs.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... | 37.046154 | 74 | 0.660714 |
16d48d72303317b392cec26f485e95ed7c7c1c06 | 1,815 | py | Python | migrations/versions/75c07cb9cfe3_.py | DanielGrams/gsevp | e94034f7b64de76f38754b56455e83092378261f | [
"MIT"
] | 1 | 2021-06-01T14:49:18.000Z | 2021-06-01T14:49:18.000Z | migrations/versions/75c07cb9cfe3_.py | DanielGrams/gsevp | e94034f7b64de76f38754b56455e83092378261f | [
"MIT"
] | 286 | 2020-12-04T14:13:00.000Z | 2022-03-09T19:05:16.000Z | migrations/versions/75c07cb9cfe3_.py | DanielGrams/gsevpt | a92f71694388e227e65ed1b24446246ee688d00e | [
"MIT"
] | null | null | null | """empty message
Revision ID: 75c07cb9cfe3
Revises: abf0f671ba27
Create Date: 2020-07-07 10:11:08.217831
"""
import sqlalchemy as sa
import sqlalchemy_utils
from alembic import op
# revision identifiers, used by Alembic.
revision = "75c07cb9cfe3"
down_revision = "abf0f671ba27"
branch_labels = None
depends_on = None
... | 34.245283 | 86 | 0.676033 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.