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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
347af07b215f8c81c407b864357364a3e8cb7511 | 1,838 | py | Python | zmq_push_pull/__main__.py | gregjhansell97/sandbox | d565da5db2c10af404ce62aa747d5e682bc02a86 | [
"MIT"
] | null | null | null | zmq_push_pull/__main__.py | gregjhansell97/sandbox | d565da5db2c10af404ce62aa747d5e682bc02a86 | [
"MIT"
] | null | null | null | zmq_push_pull/__main__.py | gregjhansell97/sandbox | d565da5db2c10af404ce62aa747d5e682bc02a86 | [
"MIT"
] | null | null | null | from multiprocessing import Process
import os
import zmq
import time
def subscriber(pub_sub_addr):
context = zmq.Context()
sub_socket = context.socket(zmq.SUB)
sub_socket.connect(pub_sub_addr)
# forgot to subscribe
sub_socket.setsockopt(zmq.SUBSCRIBE, b"")
try:
while True:
... | 25.178082 | 79 | 0.584875 |
1b1d45e1dc5123f0138181fe1394a7894ced6937 | 6,692 | py | Python | bigbench/benchmark_tasks/high_low_game/task.py | lintangsutawika/BIG-bench | 230057960f8682b0051b2a1c4c3c6e0830f72769 | [
"Apache-2.0"
] | 460 | 2021-01-26T21:23:37.000Z | 2022-03-31T15:55:10.000Z | bigbench/benchmark_tasks/high_low_game/task.py | lintangsutawika/BIG-bench | 230057960f8682b0051b2a1c4c3c6e0830f72769 | [
"Apache-2.0"
] | 475 | 2021-01-27T01:29:01.000Z | 2022-03-30T20:23:56.000Z | bigbench/benchmark_tasks/high_low_game/task.py | lintangsutawika/BIG-bench | 230057960f8682b0051b2a1c4c3c6e0830f72769 | [
"Apache-2.0"
] | 305 | 2021-01-26T23:28:11.000Z | 2022-03-31T14:51:26.000Z | # Copyright 2021 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# https://www.apache.org/licenses/LICENSE-2.0
# Unless required by applicable law or agreed to in writing, so... | 42.897436 | 243 | 0.606695 |
1b46f5830a29d013524a952d19dfb0ab0b983bff | 2,739 | py | Python | test-python/test_zwischen.py | jupfi81/NotenManager | ee96a41088bb898c025aed7b3c904741cb71d004 | [
"MIT"
] | null | null | null | test-python/test_zwischen.py | jupfi81/NotenManager | ee96a41088bb898c025aed7b3c904741cb71d004 | [
"MIT"
] | null | null | null | test-python/test_zwischen.py | jupfi81/NotenManager | ee96a41088bb898c025aed7b3c904741cb71d004 | [
"MIT"
] | null | null | null | """Teste die Klasse Zwischen"""
import unittest
import tempfile
import shutil
import csv
import os
import bewerte.zwischen as zwischen
class TestZwischen(unittest.TestCase):
""" Teste die Klasse Zwischen """
def setUp(self):
"""Create a temporary directory"""
self.tmpdir = tempfile.mkdtemp()
... | 35.571429 | 76 | 0.557868 |
ca9c1a7fff7338a7f3ce8d4825686bb738eeed30 | 12,009 | py | Python | Packs/AnsibleCiscoNXOS/Integrations/AnsibleCiscoNXOS/AnsibleCiscoNXOS.py | diCagri/content | c532c50b213e6dddb8ae6a378d6d09198e08fc9f | [
"MIT"
] | 799 | 2016-08-02T06:43:14.000Z | 2022-03-31T11:10:11.000Z | Packs/AnsibleCiscoNXOS/Integrations/AnsibleCiscoNXOS/AnsibleCiscoNXOS.py | diCagri/content | c532c50b213e6dddb8ae6a378d6d09198e08fc9f | [
"MIT"
] | 9,317 | 2016-08-07T19:00:51.000Z | 2022-03-31T21:56:04.000Z | Packs/AnsibleCiscoNXOS/Integrations/AnsibleCiscoNXOS/AnsibleCiscoNXOS.py | diCagri/content | c532c50b213e6dddb8ae6a378d6d09198e08fc9f | [
"MIT"
] | 1,297 | 2016-08-04T13:59:00.000Z | 2022-03-31T23:43:06.000Z | import traceback
import ssh_agent_setup
import demistomock as demisto # noqa: F401
from CommonServerPython import * # noqa: F401
# Import Generated code
from AnsibleApiModule import * # noqa: E402
host_type = 'nxos'
# MAIN FUNCTION
def main() -> None:
"""main function, parses params and runs command functio... | 60.346734 | 116 | 0.67108 |
b6ea67163edcdaf53e6049fff9ce7e5a2a0e1ae6 | 11,310 | py | Python | xmlToStructure2.py | Aldemerian/RLP-XML | 89a04f1a5deac488e7006731b390fd890af7dd29 | [
"MIT"
] | 1 | 2021-08-18T02:59:14.000Z | 2021-08-18T02:59:14.000Z | xmlToStructure2.py | Aldemerian/RLP-XML | 89a04f1a5deac488e7006731b390fd890af7dd29 | [
"MIT"
] | null | null | null | xmlToStructure2.py | Aldemerian/RLP-XML | 89a04f1a5deac488e7006731b390fd890af7dd29 | [
"MIT"
] | null | null | null | #import json
import os
from xml.etree import ElementTree
import sqlite3
import html
categoryInput = dict([
("bio.xml","Logik"),
("jp.xml","Kommunikation"),
("teilb.xml","Soziales"),
("GEWI.xml","Soziales"),
("rlp110.xml","Soziales"),
("nw56.xml","Logik"),
("he.xml","Kommunikation"),
("e... | 37.203947 | 118 | 0.535632 |
b684444dbfdea78b0044b7e408f57951f775e11e | 507 | py | Python | doc/precursers/2019_09-Sneakernet/Sneakernet/todoooooooo.py | Kyrus1999/BACnet | 5be8e1377252166041bcd0b066cce5b92b077d06 | [
"MIT"
] | 8 | 2020-03-17T21:12:18.000Z | 2021-12-12T15:55:54.000Z | doc/precursers/2019_09-Sneakernet/Sneakernet/todoooooooo.py | Kyrus1999/BACnet | 5be8e1377252166041bcd0b066cce5b92b077d06 | [
"MIT"
] | 2 | 2021-07-19T06:18:43.000Z | 2022-02-10T12:17:58.000Z | doc/precursers/2019_09-Sneakernet/Sneakernet/todoooooooo.py | Kyrus1999/BACnet | 5be8e1377252166041bcd0b066cce5b92b077d06 | [
"MIT"
] | 25 | 2020-03-20T09:32:45.000Z | 2021-07-18T18:12:59.000Z | """
message input | x
create event | x
create content json | x
add feed (public key) | x
add message | x
add cool stuff |
append to log | x
def output_chat... | 21.125 | 42 | 0.364892 |
bfaf754d43b324da3d56bfacef242654f70517dd | 38 | py | Python | 2DNet/src/settings.py | BhaveshJP25/RSNA | 48d85faf82651b1ae4fdcd829ce2d4978a858d3f | [
"MIT"
] | null | null | null | 2DNet/src/settings.py | BhaveshJP25/RSNA | 48d85faf82651b1ae4fdcd829ce2d4978a858d3f | [
"MIT"
] | null | null | null | 2DNet/src/settings.py | BhaveshJP25/RSNA | 48d85faf82651b1ae4fdcd829ce2d4978a858d3f | [
"MIT"
] | null | null | null | train_png_dir = r''
test_png_dir = r'' | 19 | 19 | 0.710526 |
44f2bf1b4e01527a641505a914d1c74f362cded5 | 373 | py | Python | pattern/GC2002.py | kevin-ingles/HACKTOBERFEST2020_pattern | 85e34ff9efb13595912c1f18e3bc79a5a72d9bb5 | [
"MIT"
] | null | null | null | pattern/GC2002.py | kevin-ingles/HACKTOBERFEST2020_pattern | 85e34ff9efb13595912c1f18e3bc79a5a72d9bb5 | [
"MIT"
] | null | null | null | pattern/GC2002.py | kevin-ingles/HACKTOBERFEST2020_pattern | 85e34ff9efb13595912c1f18e3bc79a5a72d9bb5 | [
"MIT"
] | null | null | null | n = int(input("Enter the no. of rows:"))
n1 = (n + 1) // 2
n2 = n - n1
for i in range(1, n1 + 1):
for j in range(1, i):
print(" ", end="")
for k in range(1, i + 1):
print("* ", end="")
print()
for i in range(n2, 0, -1):
for j in range(1, i):
print(" ", end="")
for k in rang... | 20.722222 | 40 | 0.431635 |
153a99da5165ab5841e4c3bf83c4bb66f35b0235 | 3,556 | py | Python | src/main/python/ble_temperature_sensor/blescannerbluepy.py | BikeAtor/WoMoAtor | 700cc8b970dcfdd5af2f471df1a223d2a38cb1bf | [
"Apache-2.0"
] | null | null | null | src/main/python/ble_temperature_sensor/blescannerbluepy.py | BikeAtor/WoMoAtor | 700cc8b970dcfdd5af2f471df1a223d2a38cb1bf | [
"Apache-2.0"
] | null | null | null | src/main/python/ble_temperature_sensor/blescannerbluepy.py | BikeAtor/WoMoAtor | 700cc8b970dcfdd5af2f471df1a223d2a38cb1bf | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/env python3
import sys
from time import sleep
sys.path.append('..')
import ble_temperature_sensor
import logging
import threading
import time
# bluetooth
from bleson import get_provider, Observer
import struct
observer = None
class BluetoothScannerBluepy():
updatetime = 60
sensors = []
sens... | 32.623853 | 156 | 0.54387 |
bdce23d049f1c646955ee9201bfada68a1aefbd7 | 213 | py | Python | Licence 2/I33/TP 4/ex_6.py | axelcoezard/licence | 1ed409c4572dea080169171beb7e8571159ba071 | [
"MIT"
] | 8 | 2020-11-26T20:45:12.000Z | 2021-11-29T15:46:22.000Z | Licence 2/I33/TP 4/ex_6.py | axelcoezard/licence | 1ed409c4572dea080169171beb7e8571159ba071 | [
"MIT"
] | null | null | null | Licence 2/I33/TP 4/ex_6.py | axelcoezard/licence | 1ed409c4572dea080169171beb7e8571159ba071 | [
"MIT"
] | 6 | 2020-10-23T15:29:24.000Z | 2021-05-05T19:10:45.000Z | def transpose(M):
N = []
for i in range(len(M[0])):
L = []
for j in range(len(M)):
L.append(M[j][i])
N.append(L)
return N
print(transpose([[1, 2, 3], [4, 5, 6]]))
| 17.75 | 40 | 0.42723 |
e5530c5c7f503e4c5d3f1c8f1bbf96503ea1b403 | 1,366 | py | Python | tests/onegov/server/test_cli.py | politbuero-kampagnen/onegov-cloud | 20148bf321b71f617b64376fe7249b2b9b9c4aa9 | [
"MIT"
] | null | null | null | tests/onegov/server/test_cli.py | politbuero-kampagnen/onegov-cloud | 20148bf321b71f617b64376fe7249b2b9b9c4aa9 | [
"MIT"
] | null | null | null | tests/onegov/server/test_cli.py | politbuero-kampagnen/onegov-cloud | 20148bf321b71f617b64376fe7249b2b9b9c4aa9 | [
"MIT"
] | null | null | null | import port_for
import requests
import time
from onegov.server.cli import WsgiProcess, WsgiServer
from wsgiref.simple_server import demo_app
def test_wsgi_process():
port = port_for.select_random()
process = WsgiProcess(lambda: demo_app, port=port)
process.start()
while not process.ready:
t... | 23.551724 | 61 | 0.67716 |
009c05499601d1bcfe6956e01f5fe1add9845a62 | 1,995 | py | Python | mysite/app/views.py | RadchenkoVlada/Social_Networt | 5eb04ababd9f0cb3ff966f269e575fdda67588be | [
"MIT"
] | null | null | null | mysite/app/views.py | RadchenkoVlada/Social_Networt | 5eb04ababd9f0cb3ff966f269e575fdda67588be | [
"MIT"
] | null | null | null | mysite/app/views.py | RadchenkoVlada/Social_Networt | 5eb04ababd9f0cb3ff966f269e575fdda67588be | [
"MIT"
] | null | null | null | from rest_framework.response import Response
from rest_framework import status
from rest_framework.views import APIView
from rest_framework.generics import get_object_or_404
from .models import Post
from .models import User
from .serializers import PostSerializer
class PostView(APIView):
def get(self, request):... | 38.365385 | 103 | 0.655639 |
00a2a3eafe0901eebda1e848752ecb6d7e2526b5 | 464 | py | Python | saku/saku/serializers.py | Mehdi-MosTafavi/Saku-Backend | 348a1a676ffc8ddd9077f8c94733c5f6dce98fbd | [
"MIT"
] | null | null | null | saku/saku/serializers.py | Mehdi-MosTafavi/Saku-Backend | 348a1a676ffc8ddd9077f8c94733c5f6dce98fbd | [
"MIT"
] | null | null | null | saku/saku/serializers.py | Mehdi-MosTafavi/Saku-Backend | 348a1a676ffc8ddd9077f8c94733c5f6dce98fbd | [
"MIT"
] | null | null | null | from rest_framework import serializers
class GeneralCreateResponseSerializer(serializers.Serializer):
message = serializers.CharField(default="Created!", min_length=5)
class Meta:
fields = '__all__'
class GeneralErrorResponseSerializer(serializers.Serializer):
status_code = serializers.IntegerF... | 30.933333 | 69 | 0.780172 |
dab8be6bf1e33896d337eae2fa413c32398965ee | 92 | py | Python | 2014/12/mortality-2013-soviet/graphic_config.py | nprapps/graphics-archive | 97b0ef326b46a959df930f5522d325e537f7a655 | [
"FSFAP"
] | 14 | 2015-05-08T13:41:51.000Z | 2021-02-24T12:34:55.000Z | 2014/12/mortality-2013-soviet/graphic_config.py | nprapps/graphics-archive | 97b0ef326b46a959df930f5522d325e537f7a655 | [
"FSFAP"
] | null | null | null | 2014/12/mortality-2013-soviet/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 = '18rerz7kVz3wyivH3xKRpBjBLsLdC3WVPA355HmC-WEg'
| 23 | 68 | 0.836957 |
dafea9c5a5ed0594c6819f0a333c8a2a0d581e8c | 5,156 | py | Python | evaluation-webapp/reposynergy/controller.py | DLR-SC/repository-synergy | 115e48c37e659b144b2c3b89695483fd1d6dc788 | [
"MIT"
] | 5 | 2021-05-09T12:51:32.000Z | 2021-11-04T11:02:54.000Z | evaluation-webapp/reposynergy/controller.py | DLR-SC/repository-synergy | 115e48c37e659b144b2c3b89695483fd1d6dc788 | [
"MIT"
] | null | null | null | evaluation-webapp/reposynergy/controller.py | DLR-SC/repository-synergy | 115e48c37e659b144b2c3b89695483fd1d6dc788 | [
"MIT"
] | 3 | 2021-05-12T12:14:05.000Z | 2021-10-06T05:19:54.000Z | import pandas as pd
import csv
from django.http import HttpResponse
from .models import RepositoryPair, Annotation, User
################# Helpers #################
def qs_to_df(qs):
if qs is not None:
return pd.DataFrame(list(qs.values()))
return None
def get_repo_readme(url):
folder = "data/re... | 38.477612 | 150 | 0.673196 |
97b4b6060bdebc3de799870c8ce9ba6ea27976ed | 428 | py | Python | Python/zzz_training_challenge/Python_Challenge/solutions/tests/ch02_math/ex09_armstrong_test.py | Kreijeck/learning | eaffee08e61f2a34e01eb8f9f04519aac633f48c | [
"MIT"
] | null | null | null | Python/zzz_training_challenge/Python_Challenge/solutions/tests/ch02_math/ex09_armstrong_test.py | Kreijeck/learning | eaffee08e61f2a34e01eb8f9f04519aac633f48c | [
"MIT"
] | null | null | null | Python/zzz_training_challenge/Python_Challenge/solutions/tests/ch02_math/ex09_armstrong_test.py | Kreijeck/learning | eaffee08e61f2a34e01eb8f9f04519aac633f48c | [
"MIT"
] | null | null | null | # Beispielprogramm für das Buch "Python Challenge"
#
# Copyright 2020 by Michael Inden
from ch02_math.solutions.ex09_armstrong import calc_armstrong_numbers, calc_numbers
def test_calc_armstrong_numbers():
assert calc_armstrong_numbers() == [153, 371]
def test_calc_numbers():
armstrong_as_lambda = lambda x... | 25.176471 | 83 | 0.740654 |
e776ae819cb0720a3e15c0c0a9b14881a6550d63 | 6,041 | py | Python | tests/onegov/election_day/utils/test_local_results.py | politbuero-kampagnen/onegov-cloud | 20148bf321b71f617b64376fe7249b2b9b9c4aa9 | [
"MIT"
] | null | null | null | tests/onegov/election_day/utils/test_local_results.py | politbuero-kampagnen/onegov-cloud | 20148bf321b71f617b64376fe7249b2b9b9c4aa9 | [
"MIT"
] | null | null | null | tests/onegov/election_day/utils/test_local_results.py | politbuero-kampagnen/onegov-cloud | 20148bf321b71f617b64376fe7249b2b9b9c4aa9 | [
"MIT"
] | null | null | null | from datetime import date
from onegov.ballot import Ballot
from onegov.ballot import BallotResult
from onegov.ballot import ComplexVote
from onegov.ballot import Vote
from onegov.election_day.models import ArchivedResult
from onegov.election_day.models import Canton
from onegov.election_day.models import Municipality
f... | 30.356784 | 79 | 0.686807 |
4189dbf7566d71446f9d477afa4ff7d2c271a0c8 | 503 | py | Python | tag_2/p_5_vertauschen.py | techrabbit58/uebung_informatik_vorkurs | e99312ae66ccccd6bfe45bfd3c3f43c01690659c | [
"Unlicense"
] | null | null | null | tag_2/p_5_vertauschen.py | techrabbit58/uebung_informatik_vorkurs | e99312ae66ccccd6bfe45bfd3c3f43c01690659c | [
"Unlicense"
] | null | null | null | tag_2/p_5_vertauschen.py | techrabbit58/uebung_informatik_vorkurs | e99312ae66ccccd6bfe45bfd3c3f43c01690659c | [
"Unlicense"
] | null | null | null | """
5 Vertauschen (Tag 2)
Schreibe eine Funktion, die die Werte zweier Variablen tauscht.
Z u m V o r g e h e n
======================
- Wie viele Parameter nimmt die Funktion entgegen?
Zwei Parameter: a und b; dürfen beliebige Werte referenzieren
- Wie realisiert man den Tausch?
Weil es in Python geht: du... | 22.863636 | 65 | 0.677932 |
419aebc5d76f204221ccd6570ac4f61875ee3027 | 534 | py | Python | spangle/__init__.py | tkamenoko/spangle | 068479660a03239aa69c935d7ca0418c491d92da | [
"MIT"
] | 2 | 2019-11-17T06:38:56.000Z | 2019-12-01T15:32:03.000Z | spangle/__init__.py | tkamenoko/spangle | 068479660a03239aa69c935d7ca0418c491d92da | [
"MIT"
] | null | null | null | spangle/__init__.py | tkamenoko/spangle | 068479660a03239aa69c935d7ca0418c491d92da | [
"MIT"
] | null | null | null | """
spangle - A small and flexible ASGI application framework for modern web.
"""
from .api import Api
from .blueprint import Blueprint
from .component import api_ctx, component_ctx, use_api, use_component
from .error_handler import ErrorHandler
from .models import Connection, Request, Response
from .parser import Upl... | 21.36 | 73 | 0.702247 |
41afdaffdd86366c24a5a1937411eeaed7ef0b35 | 3,060 | py | Python | research/cv/IRN/src/options/options.py | leelige/mindspore | 5199e05ba3888963473f2b07da3f7bca5b9ef6dc | [
"Apache-2.0"
] | 77 | 2021-10-15T08:32:37.000Z | 2022-03-30T13:09:11.000Z | research/cv/IRN/src/options/options.py | leelige/mindspore | 5199e05ba3888963473f2b07da3f7bca5b9ef6dc | [
"Apache-2.0"
] | 3 | 2021-10-30T14:44:57.000Z | 2022-02-14T06:57:57.000Z | research/cv/IRN/src/options/options.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.382022 | 78 | 0.597059 |
ec1f6530b66426ce1a09c8cf6fad5b1b6790c130 | 1,400 | py | Python | LINE/2021/web/diveinternal/private/app/rollback.py | mystickev/ctf-archives | 89e99a5cd5fb6b2923cad3fe1948d3ff78649b4e | [
"MIT"
] | 1 | 2021-11-02T20:53:58.000Z | 2021-11-02T20:53:58.000Z | LINE/2021/web/diveinternal/private/app/rollback.py | ruhan-islam/ctf-archives | 8c2bf6a608c821314d1a1cfaa05a6cccef8e3103 | [
"MIT"
] | null | null | null | LINE/2021/web/diveinternal/private/app/rollback.py | ruhan-islam/ctf-archives | 8c2bf6a608c821314d1a1cfaa05a6cccef8e3103 | [
"MIT"
] | 1 | 2021-12-19T11:06:24.000Z | 2021-12-19T11:06:24.000Z | import subprocess,time,os, sys
import logging
from dotenv import load_dotenv
load_dotenv()
logger = logging.getLogger('KillCoinapi')
subprocess.SW_HIDE = 1
def RunRollbackDB(dbhash):
try:
if os.environ['ENV'] == 'LOCAL':
return
if dbhash is None:
return "dbhash is None"
... | 31.818182 | 187 | 0.558571 |
6b52b2317ca7930221698d1c3798e4826f54fd1c | 1,734 | py | Python | Co-Simulation/Sumo/sumo-1.7.0/tools/sumolib/net/generator/straight.py | uruzahe/carla | 940c2ab23cce1eda1ef66de35f66b42d40865fb1 | [
"MIT"
] | 4 | 2020-11-13T02:35:56.000Z | 2021-03-29T20:15:54.000Z | sumolib/net/generator/straight.py | KhalidHALBA-GR-NIST/UCEFSUMOV2V | 4eb7ac761303a171718a10e4131184746bded9fd | [
"MIT"
] | 9 | 2020-12-09T02:12:39.000Z | 2021-02-18T00:15:28.000Z | sumolib/net/generator/straight.py | KhalidHALBA-GR-NIST/UCEFSUMOV2V | 4eb7ac761303a171718a10e4131184746bded9fd | [
"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) 2013-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.533333 | 77 | 0.698962 |
6b649edafb6ec369ecf970c063c58630acaf97a8 | 2,564 | py | Python | rbac/common/util/__init__.py | akgunkel/sawtooth-next-directory | a88833033ab30e9091479a38947f04c5e396ca46 | [
"Apache-2.0"
] | 75 | 2018-04-06T09:13:34.000Z | 2020-05-18T18:59:47.000Z | rbac/common/util/__init__.py | akgunkel/sawtooth-next-directory | a88833033ab30e9091479a38947f04c5e396ca46 | [
"Apache-2.0"
] | 989 | 2018-04-18T21:01:56.000Z | 2019-10-23T15:37:09.000Z | rbac/common/util/__init__.py | akgunkel/sawtooth-next-directory | a88833033ab30e9091479a38947f04c5e396ca46 | [
"Apache-2.0"
] | 72 | 2018-04-13T18:29:12.000Z | 2020-05-29T06:00:33.000Z | # Copyright 2019 Contributors to Hyperledger Sawtooth
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law ... | 35.123288 | 87 | 0.666537 |
6b9409c8d41b4c1ac2f9c3bad1a0e39fd18433b4 | 1,382 | py | Python | middleware/utils/news.py | fsr/infoscreen | 60930853934b6e278eeca70202f24ea8c41cb356 | [
"MIT"
] | 6 | 2016-05-03T12:14:00.000Z | 2021-07-06T16:34:21.000Z | middleware/utils/news.py | fsr/infoscreen | 60930853934b6e278eeca70202f24ea8c41cb356 | [
"MIT"
] | 23 | 2015-01-09T15:50:51.000Z | 2019-02-01T10:00:49.000Z | middleware/utils/news.py | fsr/infoscreen | 60930853934b6e278eeca70202f24ea8c41cb356 | [
"MIT"
] | 5 | 2015-06-08T17:27:37.000Z | 2017-06-09T15:07:33.000Z | import urllib.request
import json
import os
BASE_URL = ''
with open(os.path.join(os.path.dirname(os.path.abspath(__file__)),'../backend.json'), 'r') as data:
temp_data = json.load(data)
BASE_URL = temp_data['BASE_URL']
md_news = []
def get_news():
"""
Gets the infoscreen news from the (atm temporar... | 33.707317 | 110 | 0.510854 |
2e14b5fc4812f84f6c2f16e8334f12aba6b1ccf7 | 6,545 | py | Python | forge/models/__init__.py | Pandinosaurus/3d-forge | d631e14a9351911c3e5612c73c1608d97ed547d2 | [
"BSD-3-Clause"
] | 31 | 2015-07-13T15:36:50.000Z | 2022-02-07T21:37:51.000Z | forge/models/__init__.py | Pandinosaurus/3d-forge | d631e14a9351911c3e5612c73c1608d97ed547d2 | [
"BSD-3-Clause"
] | 109 | 2015-04-24T10:03:24.000Z | 2019-04-12T13:34:01.000Z | forge/models/__init__.py | Pandinosaurus/3d-forge | d631e14a9351911c3e5612c73c1608d97ed547d2 | [
"BSD-3-Clause"
] | 16 | 2015-10-03T06:03:22.000Z | 2022-03-31T08:24:37.000Z | # -*- coding: utf-8 -*-
from sqlalchemy.sql import func, and_
from sqlalchemy.ext.compiler import compiles
from sqlalchemy.sql.expression import FunctionElement, text
from geoalchemy2.elements import WKBElement
from shapely.geometry import box, Point
class _interpolate_height_on_plane(FunctionElement):
name = "_... | 38.052326 | 90 | 0.703896 |
2e78933faa4606359733ad6f0d769e4672209384 | 6,247 | py | Python | layers.py | kelayamatoz/BiDAF-TBA | 82a425c10f08d65814696955cf072da21c329f90 | [
"BSD-2-Clause"
] | null | null | null | layers.py | kelayamatoz/BiDAF-TBA | 82a425c10f08d65814696955cf072da21c329f90 | [
"BSD-2-Clause"
] | null | null | null | layers.py | kelayamatoz/BiDAF-TBA | 82a425c10f08d65814696955cf072da21c329f90 | [
"BSD-2-Clause"
] | null | null | null | import torch
import torch.nn as nn
import torch.nn.functional as F
from torch.autograd import Variable
VERY_BIG_NUMBER = 1e30
VERY_SMALL_NUMBER = 1e-30
VERY_POSITIVE_NUMBER = VERY_BIG_NUMBER
VERY_NEGATIVE_NUMBER = -VERY_BIG_NUMBER
def softsel(target, logits):
out = F.softmax(logits)
out = out.unsqueeze(len(o... | 32.878947 | 103 | 0.637746 |
2e7e70aba9d5e43002f8c725c40d796c206e25b2 | 487 | py | Python | leetcode/110-Balanced-Binary-Tree/BalancedBinTree_001.py | cc13ny/all-in | bc0b01e44e121ea68724da16f25f7e24386c53de | [
"MIT"
] | 1 | 2017-05-18T06:11:02.000Z | 2017-05-18T06:11:02.000Z | leetcode/110-Balanced-Binary-Tree/BalancedBinTree_001.py | cc13ny/all-in | bc0b01e44e121ea68724da16f25f7e24386c53de | [
"MIT"
] | 1 | 2016-02-09T06:00:07.000Z | 2016-02-09T07:20:13.000Z | leetcode/110-Balanced-Binary-Tree/BalancedBinTree_001.py | cc13ny/all-in | bc0b01e44e121ea68724da16f25f7e24386c53de | [
"MIT"
] | 2 | 2019-06-27T09:07:26.000Z | 2019-07-01T04:40:13.000Z | class Solution:
# @param root, a tree node
# @return a boolean
def Height(self, root):
if root == None:
return 0
return max(self.Height(root.left), self.Height(root.right)) + 1
def isBalanced(self, root):
if root == None:
return True
if abs(self.H... | 30.4375 | 77 | 0.572895 |
41de2deb0ab9e7fb87d9adeb2843858da873da20 | 167 | py | Python | ProjectEuler_plus/euler_020.py | byung-u/HackerRank | 4c02fefff7002b3af774b99ebf8d40f149f9d163 | [
"MIT"
] | null | null | null | ProjectEuler_plus/euler_020.py | byung-u/HackerRank | 4c02fefff7002b3af774b99ebf8d40f149f9d163 | [
"MIT"
] | null | null | null | ProjectEuler_plus/euler_020.py | byung-u/HackerRank | 4c02fefff7002b3af774b99ebf8d40f149f9d163 | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
from math import factorial
t = int(input())
digit = []
for a0 in range(t):
n = int(input())
print(sum(map(int, (str(factorial(n))))))
| 16.7 | 45 | 0.610778 |
515fabcb86bcced73a7ecd2bbcc30da18eaa6796 | 783 | py | Python | python/en/_matplotlib/gallery/text_labels_and_annotations/pyplot_text.py | aimldl/coding | 70ddbfaa454ab92fd072ee8dc614ecc330b34a70 | [
"MIT"
] | null | null | null | python/en/_matplotlib/gallery/text_labels_and_annotations/pyplot_text.py | aimldl/coding | 70ddbfaa454ab92fd072ee8dc614ecc330b34a70 | [
"MIT"
] | null | null | null | python/en/_matplotlib/gallery/text_labels_and_annotations/pyplot_text.py | aimldl/coding | 70ddbfaa454ab92fd072ee8dc614ecc330b34a70 | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
text_labels_and_annotations/pyplot_text.py
Matplotlib > Gallery > Text, labels and annotations> Pyplot Text
https://matplotlib.org/3.1.1/gallery/pyplots/pyplot_text.html#sphx-glr-gallery-pyplots-pyplot-text-py
"""
import numpy as np
import matplotlib.pyplot as plt
np... | 27.964286 | 101 | 0.717752 |
5a9945fb4ced074361f78e7366d553dbdb94aa6c | 9,730 | py | Python | packages/watchmen-rest-doll/src/watchmen_rest_doll/admin/pipeline_router.py | Indexical-Metrics-Measure-Advisory/watchmen | c54ec54d9f91034a38e51fd339ba66453d2c7a6d | [
"MIT"
] | null | null | null | packages/watchmen-rest-doll/src/watchmen_rest_doll/admin/pipeline_router.py | Indexical-Metrics-Measure-Advisory/watchmen | c54ec54d9f91034a38e51fd339ba66453d2c7a6d | [
"MIT"
] | null | null | null | packages/watchmen-rest-doll/src/watchmen_rest_doll/admin/pipeline_router.py | Indexical-Metrics-Measure-Advisory/watchmen | c54ec54d9f91034a38e51fd339ba66453d2c7a6d | [
"MIT"
] | null | null | null | from datetime import datetime
from typing import Callable, List, Optional
from fastapi import APIRouter, Depends
from pydantic import BaseModel
from starlette.responses import Response
from watchmen_auth import PrincipalService
from watchmen_data_kernel.cache import CacheService
from watchmen_data_kernel.common impor... | 37.423077 | 115 | 0.815725 |
517809fd8d53e27609be4c7b0269118741b8d30d | 4,880 | py | Python | src/server/db/SemesterMapper.py | muenstermannmarius/ElectionSystem | a6e60d9147423787e869587b808def4771f89cb7 | [
"RSA-MD"
] | null | null | null | src/server/db/SemesterMapper.py | muenstermannmarius/ElectionSystem | a6e60d9147423787e869587b808def4771f89cb7 | [
"RSA-MD"
] | null | null | null | src/server/db/SemesterMapper.py | muenstermannmarius/ElectionSystem | a6e60d9147423787e869587b808def4771f89cb7 | [
"RSA-MD"
] | null | null | null | from server.bo.Semester import Semester
from server.db.Mapper import Mapper
class SemesterMapper(Mapper):
"""Mapper class, that maps the semester objects on relational
Database. To do this, a number of methods are available
with the help of which Objects can be searched, created, modified and
... | 39.354839 | 162 | 0.601639 |
5192fc196511728dc765403c57f533e139127d35 | 702 | py | Python | database/user.py | BigBoss1964/discord-rules | 02257a84450388ceffbad5b6bb9e28175734403f | [
"MIT"
] | 76 | 2018-02-12T15:26:16.000Z | 2020-01-14T07:22:17.000Z | database/user.py | BigBoss1964/discord-rules | 02257a84450388ceffbad5b6bb9e28175734403f | [
"MIT"
] | 2 | 2018-02-19T16:17:39.000Z | 2018-02-19T16:19:36.000Z | database/user.py | BigBoss1964/discord-rules | 02257a84450388ceffbad5b6bb9e28175734403f | [
"MIT"
] | 34 | 2018-02-12T15:26:20.000Z | 2021-05-04T04:30:05.000Z | from discord import Member
from peewee import *
from .db import db
class UserData(Model):
usrname = CharField()
usrid = IntegerField(primary_key=True)
server = IntegerField()
jointime = CharField()
status = CharField(null=True)
lasttime = CharField(null=True)
class Meta:
... | 24.206897 | 69 | 0.579772 |
cf98bd4150d4c46173990ab6110bf3808883df42 | 6,989 | py | Python | test/test_npu/test_network_ops/test_copy.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_copy.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_copy.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... | 49.567376 | 92 | 0.655315 |
3200a8b9480ef28f9e0a8aa6d677fb4f2a28d740 | 451 | py | Python | src/gamestate.py | blitzher/Starbot | 90da81f3beac74cd4394c2d8e18d9c67d6819b16 | [
"MIT"
] | null | null | null | src/gamestate.py | blitzher/Starbot | 90da81f3beac74cd4394c2d8e18d9c67d6819b16 | [
"MIT"
] | null | null | null | src/gamestate.py | blitzher/Starbot | 90da81f3beac74cd4394c2d8e18d9c67d6819b16 | [
"MIT"
] | null | null | null | """
Varying packet of ALL information about the
current state of the game
"""
class GameState:
def __init__(self, packet, agent, controller):
self.packet = packet
self.packet.agent = agent
self.packet.car = packet.game_cars[agent.team]
self.packet.controller = controller
def _... | 25.055556 | 54 | 0.651885 |
890672bac825856b665904768b62973eb336e134 | 586 | py | Python | 973/tuwulisu_973_heap.py | Leetcode-Secret-Society/warehouse | 40d7969683b1296f361e799cda37f15ceec52af8 | [
"MIT"
] | null | null | null | 973/tuwulisu_973_heap.py | Leetcode-Secret-Society/warehouse | 40d7969683b1296f361e799cda37f15ceec52af8 | [
"MIT"
] | null | null | null | 973/tuwulisu_973_heap.py | Leetcode-Secret-Society/warehouse | 40d7969683b1296f361e799cda37f15ceec52af8 | [
"MIT"
] | null | null | null | import heapq
class Solution:
def cal_length(self,x,y):
return math.sqrt(x*x+y*y)
def kClosest(self, points: List[List[int]], k: int) -> List[List[int]]:
length_points = []
for point in points:
x = point[0]
y = point[1]
length_points.append((self.cal_le... | 29.3 | 75 | 0.518771 |
56abb608432a5b1a1f2181f7afcb22a806bb213d | 136 | py | Python | top/clearlight/reptile/bilibili/fish_c/reptile/demo01.py | ClearlightY/Python_learn | 93b9b7efae5a1cf05faf8ee7c5e36dcc99c7a232 | [
"Apache-2.0"
] | 1 | 2020-01-16T09:23:43.000Z | 2020-01-16T09:23:43.000Z | top/clearlight/reptile/bilibili/fish_c/reptile/demo01.py | ClearlightY/Python_learn | 93b9b7efae5a1cf05faf8ee7c5e36dcc99c7a232 | [
"Apache-2.0"
] | null | null | null | top/clearlight/reptile/bilibili/fish_c/reptile/demo01.py | ClearlightY/Python_learn | 93b9b7efae5a1cf05faf8ee7c5e36dcc99c7a232 | [
"Apache-2.0"
] | null | null | null | import urllib.request
response = urllib.request.urlopen("http://www.clearlight.top")
html = response.read().decode('utf-8')
print(html) | 27.2 | 62 | 0.75 |
71357a0bac626467c4de0046bd117d6f4a9aaaea | 152,557 | py | Python | PyCompile-master/compile.py | Zusyaku/Termux-And-Lali-Linux-V2 | b1a1b0841d22d4bf2cc7932b72716d55f070871e | [
"Apache-2.0"
] | 2 | 2021-11-17T03:35:03.000Z | 2021-12-08T06:00:31.000Z | PyCompile-master/compile.py | Zusyaku/Termux-And-Lali-Linux-V2 | b1a1b0841d22d4bf2cc7932b72716d55f070871e | [
"Apache-2.0"
] | null | null | null | PyCompile-master/compile.py | Zusyaku/Termux-And-Lali-Linux-V2 | b1a1b0841d22d4bf2cc7932b72716d55f070871e | [
"Apache-2.0"
] | 2 | 2021-11-05T18:07:48.000Z | 2022-02-24T21:25:07.000Z | # -------------------------------------------------------
# Compiled By HTR-TECH | Tahmid Rayat
# Github : https://github.com/htr-tech
# Instagram : https://www.instagram.com/tahmid.rayat
# -------------------------------------------------------
# Platform : Linux
# Time : Mon May 25 16:59:02 2020
# ---------------... | 11,735.153846 | 152,132 | 0.755449 |
747dcf3bfce41055694ef29fe3e5fb30441a1211 | 807 | py | Python | lintcode/000-077-Longest-Common-Subsequence/LngstCmnSubseq_001.py | cc13ny/all-in | bc0b01e44e121ea68724da16f25f7e24386c53de | [
"MIT"
] | 1 | 2015-12-16T04:01:03.000Z | 2015-12-16T04:01:03.000Z | lintcode/000-077-Longest-Common-Subsequence/LngstCmnSubseq_001.py | cc13ny/all-in | bc0b01e44e121ea68724da16f25f7e24386c53de | [
"MIT"
] | 1 | 2016-02-09T06:00:07.000Z | 2016-02-09T07:20:13.000Z | lintcode/000-077-Longest-Common-Subsequence/LngstCmnSubseq_001.py | cc13ny/all-in | bc0b01e44e121ea68724da16f25f7e24386c53de | [
"MIT"
] | 2 | 2019-06-27T09:07:26.000Z | 2019-07-01T04:40:13.000Z | class Solution:
"""
@param A, B: Two strings.
@return: The length of longest common subsequence of A and B.
"""
def longestCommonSubsequence(self, A, B):
# write your code here
m, n = len(A), len(B)
if m == 0 or n == 0:
return 0
maxlen = [[0 for j in ran... | 26.9 | 76 | 0.433705 |
77a4fb5fb3caf716ce970051e9d1799615057fb6 | 2,576 | py | Python | Imaginary/2021/web/Awkward_Bypass/app.py | ruhan-islam/ctf-archives | 8c2bf6a608c821314d1a1cfaa05a6cccef8e3103 | [
"MIT"
] | 1 | 2021-11-02T20:53:58.000Z | 2021-11-02T20:53:58.000Z | Imaginary/2021/web/Awkward_Bypass/app.py | ruhan-islam/ctf-archives | 8c2bf6a608c821314d1a1cfaa05a6cccef8e3103 | [
"MIT"
] | null | null | null | Imaginary/2021/web/Awkward_Bypass/app.py | ruhan-islam/ctf-archives | 8c2bf6a608c821314d1a1cfaa05a6cccef8e3103 | [
"MIT"
] | null | null | null | import re
import sqlite3
from flask import Flask, render_template, url_for, request, redirect, make_response
app = Flask(__name__)
blacklist = ["ABORT", "ACTION", "ADD", "AFTER", "ALL", "ALTER", "ALWAYS", "ANALYZE", "AND", "AS", "ASC", "ATTACH", "AUTOINCREMENT", "BEFORE", "BEGIN", "BETWEEN", "CASCADE", "CASE", "CAST"... | 54.808511 | 1,455 | 0.639752 |
bb41448572ef974645efa1f31dc5f5849529ed68 | 1,064 | py | Python | tests/test_betrag.py | bo4e/BO4E-python | 28b12f853c8a496d14b133759b7aa2d6661f79a0 | [
"MIT"
] | 1 | 2022-03-02T12:49:44.000Z | 2022-03-02T12:49:44.000Z | tests/test_betrag.py | bo4e/BO4E-python | 28b12f853c8a496d14b133759b7aa2d6661f79a0 | [
"MIT"
] | 21 | 2022-02-04T07:38:46.000Z | 2022-03-28T14:01:53.000Z | tests/test_betrag.py | bo4e/BO4E-python | 28b12f853c8a496d14b133759b7aa2d6661f79a0 | [
"MIT"
] | null | null | null | from decimal import Decimal
import pytest # type:ignore[import]
from bo4e.com.betrag import Betrag, BetragSchema
from bo4e.enum.waehrungscode import Waehrungscode
from tests.serialization_helper import assert_serialization_roundtrip # type:ignore[import]
example_betrag = Betrag(
waehrung=Waehrungscode.EUR,
... | 31.294118 | 102 | 0.716165 |
3b68f3ac4f620ad1b3516d443338d07030ad587c | 569 | py | Python | pythonProj/FZPython/pyquant/config.py | iHamburg/FZQuant | 86b750ec33d01badfd3f324d6f1599118b9bf8ff | [
"MIT"
] | null | null | null | pythonProj/FZPython/pyquant/config.py | iHamburg/FZQuant | 86b750ec33d01badfd3f324d6f1599118b9bf8ff | [
"MIT"
] | null | null | null | pythonProj/FZPython/pyquant/config.py | iHamburg/FZQuant | 86b750ec33d01badfd3f324d6f1599118b9bf8ff | [
"MIT"
] | 2 | 2019-04-10T10:05:00.000Z | 2021-11-24T17:17:23.000Z |
socketio = {
'host' : '121.42.26.144',
'port' : 3020
}
mongodb = dict(
# host='121.42.26.144',
host='localhost',
port=27017
)
mysql = dict(
host='121.42.26.144',
user='root',
password='root',
db='fzquant'
)
cerebro = dict(
cash = 1000000,
commission = 0.0015
)
stock_index = [
... | 14.225 | 45 | 0.499121 |
5c3dc54aca357584eaa3bdfbbf69240ba61c3002 | 436 | py | Python | top/clearlight/thread/threading/threading_endTime.py | ClearlightY/Python_learn | 93b9b7efae5a1cf05faf8ee7c5e36dcc99c7a232 | [
"Apache-2.0"
] | 1 | 2020-01-16T09:23:43.000Z | 2020-01-16T09:23:43.000Z | top/clearlight/thread/threading/threading_endTime.py | ClearlightY/Python_learn | 93b9b7efae5a1cf05faf8ee7c5e36dcc99c7a232 | [
"Apache-2.0"
] | null | null | null | top/clearlight/thread/threading/threading_endTime.py | ClearlightY/Python_learn | 93b9b7efae5a1cf05faf8ee7c5e36dcc99c7a232 | [
"Apache-2.0"
] | null | null | null | import threading
import time
def thread():
time.sleep(2)
print('---子线程结束---')
def main():
t1 = threading.Thread(target=thread)
t1.setDaemon(True)
t1.start()
t1.join(timeout=1) # 1、线程同步,主线程堵塞1s然后主线程结束,子线程继续执行
# 2、如果不设置timeout参数就等子线程结束主线程再结束
# 3、如... | 24.222222 | 81 | 0.603211 |
15e5e3d0575d4a1280572bc0c2df6829b863dacf | 564 | py | Python | mod/units/weekday.py | HeraldStudio/wechat | b023b7460a6b4284ea782333e13f24d169ddaff4 | [
"MIT"
] | 1 | 2015-06-28T15:26:52.000Z | 2015-06-28T15:26:52.000Z | mod/units/weekday.py | HeraldStudio/wechat | b023b7460a6b4284ea782333e13f24d169ddaff4 | [
"MIT"
] | null | null | null | mod/units/weekday.py | HeraldStudio/wechat | b023b7460a6b4284ea782333e13f24d169ddaff4 | [
"MIT"
] | 6 | 2015-03-20T16:36:22.000Z | 2021-08-28T07:58:18.000Z | # -*- coding: utf-8 -*-
# @Date : 2014-06-29 17:16:08
# @Author : xindervella@gamil.com yml_bright@163.com
from time import time, localtime, strftime
def today():
return strftime('%a', localtime(time()))
def tomorrow():
return strftime('%a', localtime(time() + 24 * 3600))
def changedate():... | 22.56 | 57 | 0.570922 |
c61558bd60a2589751fe0c46f50a51fc652fafc9 | 1,269 | py | Python | Packs/DeduplicateValuesbyKey/Scripts/DeduplicateValuesbyKey/DeduplicateValuesbyKey.py | diCagri/content | c532c50b213e6dddb8ae6a378d6d09198e08fc9f | [
"MIT"
] | 799 | 2016-08-02T06:43:14.000Z | 2022-03-31T11:10:11.000Z | Packs/DeduplicateValuesbyKey/Scripts/DeduplicateValuesbyKey/DeduplicateValuesbyKey.py | diCagri/content | c532c50b213e6dddb8ae6a378d6d09198e08fc9f | [
"MIT"
] | 9,317 | 2016-08-07T19:00:51.000Z | 2022-03-31T21:56:04.000Z | Packs/DeduplicateValuesbyKey/Scripts/DeduplicateValuesbyKey/DeduplicateValuesbyKey.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
"""Given a list of objects (dictionaries) and a key, generate a list
of unique values of that key in the list of objects."""
def main():
object_list = demisto.args().get("object_list")
key = demisto.args().get("key_of... | 30.214286 | 81 | 0.657998 |
bac1e0428518edcb8e1504433eda3fa07f52c497 | 619 | py | Python | old/analyze-log.py | Haus4/studienarbeit-stau | 10921f8850df67c797cf174b42fbc5dcec257251 | [
"MIT"
] | 2 | 2018-10-16T08:09:13.000Z | 2019-02-18T13:33:11.000Z | old/analyze-log.py | Haus4/studienarbeit-stau | 10921f8850df67c797cf174b42fbc5dcec257251 | [
"MIT"
] | 7 | 2019-02-28T18:10:44.000Z | 2019-03-04T21:09:03.000Z | old/analyze-log.py | Haus4/studienarbeit-stau | 10921f8850df67c797cf174b42fbc5dcec257251 | [
"MIT"
] | 1 | 2020-04-05T08:53:13.000Z | 2020-04-05T08:53:13.000Z | import os
import cv2
import numpy
def main():
frame = cv2.imread("eval/jam/20171108-1054-A.png")
frame = cv2.GaussianBlur(frame, (3, 3), 0)
gray = cv2.cvtColor(frame, cv2.COLOR_BGR2GRAY)
ddepth = cv2.CV_64F
kernel_size = 3
dst = cv2.Laplacian(gray, ddepth, 3)
#sobelx = cv2.Sobel(gray,c... | 22.925926 | 57 | 0.597738 |
244a4f7383dd10707be8aeddc6fe3ee3c2db4c37 | 943 | py | Python | Interview Preparation Kits/Interview Preparation Kit/Greedy Algorithms/Reverse Shuffle Merge/reverse_shuffle_merge.py | xuedong/hacker-rank | ce8a60f80c2c6935b427f9409d7e826ee0d26a89 | [
"MIT"
] | 1 | 2021-02-22T17:37:45.000Z | 2021-02-22T17:37:45.000Z | Interview Preparation Kits/Interview Preparation Kit/Greedy Algorithms/Reverse Shuffle Merge/reverse_shuffle_merge.py | xuedong/hacker-rank | ce8a60f80c2c6935b427f9409d7e826ee0d26a89 | [
"MIT"
] | null | null | null | Interview Preparation Kits/Interview Preparation Kit/Greedy Algorithms/Reverse Shuffle Merge/reverse_shuffle_merge.py | xuedong/hacker-rank | ce8a60f80c2c6935b427f9409d7e826ee0d26a89 | [
"MIT"
] | null | null | null | #!/bin/python3
import math
import os
import random
import re
import sys
from collections import defaultdict
# Complete the reverseShuffleMerge function below.
def reverseShuffleMerge(s):
counts = defaultdict(int)
occurences = defaultdict(int)
for ch in s:
counts[ch] += 1
occurences[ch] +=... | 20.06383 | 109 | 0.555673 |
2310d4980f233e77ec0a5c32b19387c0e8a3bc06 | 2,728 | py | Python | CxFreezeBuild.py | JoergRue/Sephrasto | a4fa3c2c1b095b674a9e71416ca448e3be3de225 | [
"MIT"
] | null | null | null | CxFreezeBuild.py | JoergRue/Sephrasto | a4fa3c2c1b095b674a9e71416ca448e3be3de225 | [
"MIT"
] | null | null | null | CxFreezeBuild.py | JoergRue/Sephrasto | a4fa3c2c1b095b674a9e71416ca448e3be3de225 | [
"MIT"
] | null | null | null | import sys
from cx_Freeze import setup, Executable
import Version
import os
import shutil
print("Cleaning build folder")
dir_path = os.path.dirname(os.path.realpath(__file__))
build_path = os.path.join(dir_path, "Build")
def cleanBuildFolder():
for filename in os.listdir(build_path):
filepath = os.path.jo... | 34.974359 | 148 | 0.694282 |
2312d5b9f646145c3cbe1a788c148f8cad8d01e3 | 716 | py | Python | 2-resources/__CHEAT-SHEETS/cheatsheets-master/cheatsheets-master/dynamodb/python/create_table.py | eengineergz/Lambda | 1fe511f7ef550aed998b75c18a432abf6ab41c5f | [
"MIT"
] | 103 | 2019-08-30T10:04:40.000Z | 2022-03-30T22:14:44.000Z | 2-resources/__CHEAT-SHEETS/cheatsheets-master/cheatsheets-master/dynamodb/python/create_table.py | eengineergz/Lambda | 1fe511f7ef550aed998b75c18a432abf6ab41c5f | [
"MIT"
] | 6 | 2021-04-08T08:36:27.000Z | 2021-10-01T07:47:17.000Z | 2-resources/__CHEAT-SHEETS/cheatsheets-master/cheatsheets-master/dynamodb/python/create_table.py | eengineergz/Lambda | 1fe511f7ef550aed998b75c18a432abf6ab41c5f | [
"MIT"
] | 51 | 2019-06-10T06:11:46.000Z | 2022-03-30T16:33:05.000Z | import boto3
import time
client = boto3.Session(region_name='eu-west-1').resource('dynamodb', aws_access_key_id='', aws_secret_access_key='', endpoint_url='http://localhost:4567')
response = client.create_table(
AttributeDefinitions=[{
'AttributeName': 'event',
'AttributeType': 'S'
},
{
... | 22.375 | 154 | 0.596369 |
88e4a1a2ab5b728b0184138be38f7909e1511d7f | 609 | py | Python | src/ztc/system/vfs/nfs.py | magistersart/ZTC_fork | ce72734ea575d9846b5b81f3efbfd14fa1f7e532 | [
"PostgreSQL"
] | null | null | null | src/ztc/system/vfs/nfs.py | magistersart/ZTC_fork | ce72734ea575d9846b5b81f3efbfd14fa1f7e532 | [
"PostgreSQL"
] | null | null | null | src/ztc/system/vfs/nfs.py | magistersart/ZTC_fork | ce72734ea575d9846b5b81f3efbfd14fa1f7e532 | [
"PostgreSQL"
] | null | null | null | #!/usr/bin/env python
'''
NFS Mounted check class for ZTC
Copyright (c) 2011 Wrike, Inc. [http://www.wrike.com/]
'''
from ztc.check import ZTCCheck, CheckFail
from ztc.system.vfs import MountStatus
class NFSMounted(ZTCCheck):
name = 'nfs'
def _get(self, metric=None, *args, **kwargs):
if metric == ... | 22.555556 | 63 | 0.6289 |
cca3059c1137e812fb2b44e729a97bcb66308e46 | 379 | py | Python | exercises/zh/test_02_14.py | Jette16/spacy-course | 32df0c8f6192de6c9daba89740a28c0537e4d6a0 | [
"MIT"
] | 2,085 | 2019-04-17T13:10:40.000Z | 2022-03-30T21:51:46.000Z | exercises/zh/test_02_14.py | Jette16/spacy-course | 32df0c8f6192de6c9daba89740a28c0537e4d6a0 | [
"MIT"
] | 79 | 2019-04-18T14:42:55.000Z | 2022-03-07T08:15:43.000Z | exercises/zh/test_02_14.py | Jette16/spacy-course | 32df0c8f6192de6c9daba89740a28c0537e4d6a0 | [
"MIT"
] | 361 | 2019-04-17T13:34:32.000Z | 2022-03-28T04:42:45.000Z | def test():
assert (
"from spacy.matcher import PhraseMatcher" in __solution__
), "你有正确导入PhraseMatcher吗?"
assert (
"PhraseMatcher(nlp.vocab)" in __solution__
), "你有正确初始化PhraseMatcher吗?"
assert "matcher(doc)" in __solution__, "你有在doc上调用matcher吗?"
assert len(matches) == 2, "匹配结果数目不... | 34.454545 | 65 | 0.680739 |
ccc13618fba90de9fd0f3ff2f360b5061c65baef | 2,643 | py | Python | hello/hello-flask/app.py | East196/hello-py | a77c7a0c8e5e2b5e8cefaf0fda335ab0c3b1da21 | [
"Apache-2.0"
] | 1 | 2017-10-23T14:58:47.000Z | 2017-10-23T14:58:47.000Z | hello/hello-flask/app.py | East196/hello-py | a77c7a0c8e5e2b5e8cefaf0fda335ab0c3b1da21 | [
"Apache-2.0"
] | null | null | null | hello/hello-flask/app.py | East196/hello-py | a77c7a0c8e5e2b5e8cefaf0fda335ab0c3b1da21 | [
"Apache-2.0"
] | 1 | 2018-04-06T07:49:18.000Z | 2018-04-06T07:49:18.000Z | #!/usr/bin/env python
# -*- coding: utf-8 -*-
import logging
from flask import Flask, jsonify
from flask import json
from flask import render_template
from flask_debugtoolbar import DebugToolbarExtension
from flask_sqlalchemy import SQLAlchemy
app = Flask(__name__)
app.config['SQLALCHEMY_DATABASE_URI'] = 'sqlite://'
a... | 25.413462 | 83 | 0.632993 |
9d9a9f0297c08cdff648bc8aede46f1d85f9c1d7 | 294 | py | Python | pyntcloud/samplers/base.py | bernssolg/pyntcloud-master | 84cf000b7a7f69a2c1b36f9624f05f65160bf992 | [
"MIT"
] | 1,142 | 2016-10-10T08:55:30.000Z | 2022-03-30T04:46:16.000Z | pyntcloud/samplers/base.py | bernssolg/pyntcloud-master | 84cf000b7a7f69a2c1b36f9624f05f65160bf992 | [
"MIT"
] | 195 | 2016-10-10T08:30:37.000Z | 2022-02-17T12:51:17.000Z | pyntcloud/samplers/base.py | bernssolg/pyntcloud-master | 84cf000b7a7f69a2c1b36f9624f05f65160bf992 | [
"MIT"
] | 215 | 2017-02-28T00:50:29.000Z | 2022-03-22T17:01:31.000Z | from abc import ABC, abstractmethod
class Sampler(ABC):
"""Base class for sampling methods."""
def __init__(self, *, pyntcloud):
self.pyntcloud = pyntcloud
@abstractmethod
def extract_info(self):
pass
@abstractmethod
def compute(self):
pass
| 17.294118 | 42 | 0.636054 |
14e29374d9193580998c76511b25a4ec757c6f89 | 157 | py | Python | pyLS/notes/minimal.py | swharden/ROI-Analysis-Pipeline | e83d96c43fdd50cb44be365289e964576492617e | [
"MIT"
] | 4 | 2017-06-20T19:56:22.000Z | 2021-05-29T10:07:47.000Z | pyLS/notes/minimal.py | swharden/ROI-Analysis-Pipeline | e83d96c43fdd50cb44be365289e964576492617e | [
"MIT"
] | 11 | 2017-05-31T19:14:32.000Z | 2018-09-12T23:44:11.000Z | pyLS/notes/minimal.py | swharden/ROI-Analysis-Pipeline | e83d96c43fdd50cb44be365289e964576492617e | [
"MIT"
] | 2 | 2017-06-20T17:14:38.000Z | 2017-06-20T19:51:34.000Z | import numpy as np
import matplotlib.pyplot as plt
plt.plot(np.average(plt.imread("../../data/linescan/example/green.tif"),axis=1))
plt.savefig("output.png") | 39.25 | 80 | 0.751592 |
11d920f5b24471e4f5d5fd559aab513514ed3749 | 4,155 | py | Python | documents/mathe-handlungsreisender/Handlungsreisender-in-Deutschland-Alle-Routen.py | RalfGuder/LaTeX-examples | a1bf9fe422969be1ca4674394ebd2170c07f7693 | [
"MIT"
] | 1,231 | 2015-01-07T04:04:25.000Z | 2022-03-31T17:43:29.000Z | documents/mathe-handlungsreisender/Handlungsreisender-in-Deutschland-Alle-Routen.py | DoubleL61/LaTeX-examples | cd0d97f85fadb59b7c6e9062b37a8bf7d725ba0c | [
"MIT"
] | 5 | 2015-05-10T13:10:47.000Z | 2021-05-02T21:28:49.000Z | documents/mathe-handlungsreisender/Handlungsreisender-in-Deutschland-Alle-Routen.py | DoubleL61/LaTeX-examples | cd0d97f85fadb59b7c6e9062b37a8bf7d725ba0c | [
"MIT"
] | 400 | 2015-01-05T06:22:18.000Z | 2022-03-19T04:07:59.000Z | #!/usr/bin/python
# -*- coding: utf-8 -*-
""" Dieses Script berechnet die Länge aller möglichen Routen und speichert sie
in "Entfernungen.txt".
Am Ende wird noch die optimale Route ausgegeben.
Benötigte Rechenzeit: ca. 50s """
from copy import deepcopy
# http://blog.bjrn.se/2008/04/lexicographic-permu... | 38.472222 | 78 | 0.602888 |
018e27be58710349f0417f1a7a6c3ecbb5014c25 | 3,193 | py | Python | tarefas-poo/lista-04/jogo_da_velha/model/jogo_da_velha.py | victoriaduarte/POO_UFSC | 0c65b4f26383d1e3038d8469bd91fd2c0cb98c1a | [
"MIT"
] | null | null | null | tarefas-poo/lista-04/jogo_da_velha/model/jogo_da_velha.py | victoriaduarte/POO_UFSC | 0c65b4f26383d1e3038d8469bd91fd2c0cb98c1a | [
"MIT"
] | null | null | null | tarefas-poo/lista-04/jogo_da_velha/model/jogo_da_velha.py | victoriaduarte/POO_UFSC | 0c65b4f26383d1e3038d8469bd91fd2c0cb98c1a | [
"MIT"
] | null | null | null |
from model.tabuleiro import Tabuleiro
class JogoDaVelha:
def __init__(self, humano, maquina, inicia):
'''Um jogo é caracterizado por um jogador humano,
um jogador máquina e a indicação de quem iniciará a partida.
'''
self._tabuleiro = Tabuleiro()
self._humano = humano
... | 33.260417 | 108 | 0.581272 |
09e990bdf0df8d3d08a45583255e8a70570dcf69 | 266 | py | Python | BITs/2014/Gasanov_A_F/task_2_9.py | YukkaSarasti/pythonintask | eadf4245abb65f4400a3bae30a4256b4658e009c | [
"Apache-2.0"
] | null | null | null | BITs/2014/Gasanov_A_F/task_2_9.py | YukkaSarasti/pythonintask | eadf4245abb65f4400a3bae30a4256b4658e009c | [
"Apache-2.0"
] | null | null | null | BITs/2014/Gasanov_A_F/task_2_9.py | YukkaSarasti/pythonintask | eadf4245abb65f4400a3bae30a4256b4658e009c | [
"Apache-2.0"
] | null | null | null | #Задача №1 Вариант 9
#Программа пишет высказывание Древнегреческого философа Эпиктета
#Гасанов АФ
#29.02.2016
print ("Если хочешь, чтобы говорили хорошо про тебя, не говори худо о других.\n" + "\t\t\t\t\t\t Эпиктет")
input("Нажмите Enter для выхода.")
| 24.181818 | 107 | 0.714286 |
09ef88f2dd5f5cc42eab5cd106a06b043704fc79 | 614 | py | Python | Python/zzz_training_challenge/Python_Challenge/solutions/ch03_recursion/solutions/ex13_ruler.py | Kreijeck/learning | eaffee08e61f2a34e01eb8f9f04519aac633f48c | [
"MIT"
] | null | null | null | Python/zzz_training_challenge/Python_Challenge/solutions/ch03_recursion/solutions/ex13_ruler.py | Kreijeck/learning | eaffee08e61f2a34e01eb8f9f04519aac633f48c | [
"MIT"
] | null | null | null | Python/zzz_training_challenge/Python_Challenge/solutions/ch03_recursion/solutions/ex13_ruler.py | Kreijeck/learning | eaffee08e61f2a34e01eb8f9f04519aac633f48c | [
"MIT"
] | null | null | null | # Beispielprogramm für das Buch "Python Challenge"
#
# Copyright 2020 by Michael Inden
def draw_interval(center_length):
if center_length > 0:
draw_interval(center_length - 1)
draw_line(center_length, "")
draw_interval(center_length - 1)
def draw_line(count, label):
print(("-" * coun... | 19.806452 | 50 | 0.654723 |
c91fe2975d93107b73ba635ba98067cab1dbb7f7 | 1,806 | py | Python | Python/Courses/LearnToCodeInPython3ProgrammingBeginnerToAdvancedYourProgress/python_course/Section5FileHandling/35ReadingExcelSheets.py | JamieBort/LearningDirectory | afca79c5f1333c079d0e96202ff44ca21b2ceb81 | [
"Info-ZIP"
] | 1 | 2022-02-02T21:56:08.000Z | 2022-02-02T21:56:08.000Z | Python/Courses/LearnToCodeInPython3ProgrammingBeginnerToAdvancedYourProgress/python_course/Section5FileHandling/35ReadingExcelSheets.py | JamieBort/LearningDirectory | afca79c5f1333c079d0e96202ff44ca21b2ceb81 | [
"Info-ZIP"
] | 27 | 2020-06-27T23:25:59.000Z | 2022-02-27T20:40:56.000Z | Python/Courses/LearnToCodeInPython3ProgrammingBeginnerToAdvancedYourProgress/python_course/Section5FileHandling/35ReadingExcelSheets.py | JamieBort/LearningDirectory | afca79c5f1333c079d0e96202ff44ca21b2ceb81 | [
"Info-ZIP"
] | null | null | null | # NOTE: before writing in this file I created a text.txt file in the same directory.
# Reading
f = open("./Python/LearnToCodeInPython3ProgrammingBeginnerToAdvancedYourProgress/python_course/Section5FileHandling/test.txt", "r") # "r" for read mode.
# f = open("./test.txt") # NOTE: Since the read mode is the default mo... | 53.117647 | 282 | 0.739203 |
c95f7ae5c5f3dbf92f005625f33d4993c0a79cef | 901 | py | Python | NewsIT/newsit/catalog/urls.py | GitInitDev/ZohoUniv | 966704837e65f58b52492b56d08e7958df3d220a | [
"Unlicense"
] | null | null | null | NewsIT/newsit/catalog/urls.py | GitInitDev/ZohoUniv | 966704837e65f58b52492b56d08e7958df3d220a | [
"Unlicense"
] | null | null | null | NewsIT/newsit/catalog/urls.py | GitInitDev/ZohoUniv | 966704837e65f58b52492b56d08e7958df3d220a | [
"Unlicense"
] | null | null | null | # Use include() to add paths from the catalog application
from django.urls import include
from django.urls import path
from django.views.generic import RedirectView
from django.conf import settings
from django.conf.urls.static import static
from django.urls import path
from . import views
urlpatterns += [
path('cat... | 36.04 | 81 | 0.748058 |
a31348cf43ce1ed3d40fff0f04e4cd3e0be6d3d7 | 472 | py | Python | zencad/interactive/point.py | Spiritdude/zencad | 4e63b1a6306dd235f4daa2791b10249f7546c95b | [
"MIT"
] | 5 | 2018-04-11T14:11:40.000Z | 2018-09-12T19:03:36.000Z | zencad/interactive/point.py | Spiritdude/zencad | 4e63b1a6306dd235f4daa2791b10249f7546c95b | [
"MIT"
] | null | null | null | zencad/interactive/point.py | Spiritdude/zencad | 4e63b1a6306dd235f4daa2791b10249f7546c95b | [
"MIT"
] | null | null | null | from zencad.interactive.interactive_object import InteractiveObject
from OCC.Core.Geom import Geom_CartesianPoint
from OCC.Core.AIS import AIS_Point
from zencad.geombase import point3
class PointInteractiveObject(InteractiveObject):
def __init__(self, point, color):
if isinstance(point, point3):
... | 27.764706 | 67 | 0.724576 |
6e950430048cabd68324d4effcc5f6bbec568620 | 92 | py | Python | TecWeb/aula/aula/views.py | Muhiton/TecWeb | 42e6e4e128eeca2807273a404b77839def353816 | [
"Apache-2.0"
] | null | null | null | TecWeb/aula/aula/views.py | Muhiton/TecWeb | 42e6e4e128eeca2807273a404b77839def353816 | [
"Apache-2.0"
] | null | null | null | TecWeb/aula/aula/views.py | Muhiton/TecWeb | 42e6e4e128eeca2807273a404b77839def353816 | [
"Apache-2.0"
] | null | null | null | from django.http import HttpResponse
def ola(request):
return HttpResponse("Olá Mundo") | 23 | 37 | 0.771739 |
283c3caa3f7287eca46055f265fee5aad7e48e9e | 31 | py | Python | test.py | abirbhattacharya82/Hello-world-1 | c0f6c2937e90ffcb279fdd227bf6d53f72a5a73e | [
"MIT"
] | 1 | 2020-11-12T04:12:04.000Z | 2020-11-12T04:12:04.000Z | test.py | abirbhattacharya82/Hello-world-1 | c0f6c2937e90ffcb279fdd227bf6d53f72a5a73e | [
"MIT"
] | null | null | null | test.py | abirbhattacharya82/Hello-world-1 | c0f6c2937e90ffcb279fdd227bf6d53f72a5a73e | [
"MIT"
] | null | null | null | print("Soumyadeep Mukherjee")
| 15.5 | 30 | 0.774194 |
dd65bd3aff526f58ac2ed3f9ba6d809841ca7342 | 5,689 | py | Python | src/onegov/notice/models.py | politbuero-kampagnen/onegov-cloud | 20148bf321b71f617b64376fe7249b2b9b9c4aa9 | [
"MIT"
] | null | null | null | src/onegov/notice/models.py | politbuero-kampagnen/onegov-cloud | 20148bf321b71f617b64376fe7249b2b9b9c4aa9 | [
"MIT"
] | null | null | null | src/onegov/notice/models.py | politbuero-kampagnen/onegov-cloud | 20148bf321b71f617b64376fe7249b2b9b9c4aa9 | [
"MIT"
] | null | null | null | from onegov.core.orm import Base
from onegov.core.orm.mixins import ContentMixin
from onegov.core.orm.mixins import TimestampMixin
from onegov.core.orm.types import UTCDateTime
from onegov.core.orm.types import UUID
from onegov.user import User
from onegov.user import UserGroup
from sedate import utcnow
from sqlalchemy... | 28.732323 | 79 | 0.653542 |
06e9a9bca43906449d9fec82ef5002a9d02521dd | 1,548 | py | Python | python_project/python/ThreadDemo/ThreadSafePrint.py | sinomiko/project | 00fadb0033645f103692f5b06c861939a9d4aa0e | [
"BSD-3-Clause"
] | 1 | 2018-12-30T14:07:42.000Z | 2018-12-30T14:07:42.000Z | python_project/python/ThreadDemo/ThreadSafePrint.py | sinomiko/project | 00fadb0033645f103692f5b06c861939a9d4aa0e | [
"BSD-3-Clause"
] | null | null | null | python_project/python/ThreadDemo/ThreadSafePrint.py | sinomiko/project | 00fadb0033645f103692f5b06c861939a9d4aa0e | [
"BSD-3-Clause"
] | null | null | null | # -*- coding:utf-8 -*-
from __future__ import print_function
import pprint
import argparse
import re
import sys
import os
import time
import threading
import re
#无缓冲输出,适合Jenkins
buf_arg = 0
if sys.version_info[0] == 3:
os.environ['PYTHONUNBUFFERED'] = '1'
buf_arg = 1
sys.stdout = os.fdopen(sys.stdout.fileno(),... | 28.666667 | 104 | 0.567829 |
06ee82720b2cb2a3b4d742aeacda650b4b98f340 | 2,147 | py | Python | src/onegov/winterthur/views/streets.py | politbuero-kampagnen/onegov-cloud | 20148bf321b71f617b64376fe7249b2b9b9c4aa9 | [
"MIT"
] | null | null | null | src/onegov/winterthur/views/streets.py | politbuero-kampagnen/onegov-cloud | 20148bf321b71f617b64376fe7249b2b9b9c4aa9 | [
"MIT"
] | null | null | null | src/onegov/winterthur/views/streets.py | politbuero-kampagnen/onegov-cloud | 20148bf321b71f617b64376fe7249b2b9b9c4aa9 | [
"MIT"
] | null | null | null | from itertools import groupby
from onegov.core.cache import lru_cache
from onegov.core.security import Public, Private
from onegov.winterthur import WinterthurApp, _
from onegov.winterthur.collections import AddressCollection
from onegov.winterthur.collections import AddressSubsetCollection
from onegov.winterthur.layou... | 29.013514 | 79 | 0.712622 |
b08a93e898f1cda41f8b40421895e9404ab132a7 | 1,127 | py | Python | python/advanced_sw/GIT-SCRAPER/git_w/wgit.py | SayanGhoshBDA/code-backup | 8b6135facc0e598e9686b2e8eb2d69dd68198b80 | [
"MIT"
] | 16 | 2018-11-26T08:39:42.000Z | 2019-05-08T10:09:52.000Z | python/advanced_sw/GIT-SCRAPER/git_w/wgit.py | SayanGhoshBDA/code-backup | 8b6135facc0e598e9686b2e8eb2d69dd68198b80 | [
"MIT"
] | 8 | 2020-05-04T06:29:26.000Z | 2022-02-12T05:33:16.000Z | python/advanced_sw/GIT-SCRAPER/git_w/wgit.py | SayanGhoshBDA/code-backup | 8b6135facc0e598e9686b2e8eb2d69dd68198b80 | [
"MIT"
] | 5 | 2020-02-11T16:02:21.000Z | 2021-02-05T07:48:30.000Z | import json
from pprint import pprint
from selenium import webdriver
from bs4 import BeautifulSoup
from pathlib import Path
from tqdm import tqdm
import json
import time
import urllib.request, urllib.parse, urllib.error
from bs4 import BeautifulSoup
import ssl
"""
https://github.com/ines/spacy-course/tree/master/binde... | 25.613636 | 126 | 0.774623 |
b01b5017c9eb6667a877555bcb2ca854dbfd8440 | 6,029 | py | Python | nnc/views.py | JanakiRaman-2002/Arre-yaar | c0b44ca1f8884a09116241dcd0bf7cfcee3b785d | [
"Apache-2.0"
] | null | null | null | nnc/views.py | JanakiRaman-2002/Arre-yaar | c0b44ca1f8884a09116241dcd0bf7cfcee3b785d | [
"Apache-2.0"
] | null | null | null | nnc/views.py | JanakiRaman-2002/Arre-yaar | c0b44ca1f8884a09116241dcd0bf7cfcee3b785d | [
"Apache-2.0"
] | null | null | null | from django.shortcuts import get_object_or_404, render, redirect
from django.template.defaultfilters import register
from django.views.generic import TemplateView
from django.utils import timezone
from .models import *
from accounts.models import customer
def home(request):
context = {}
context['categories']... | 27.912037 | 119 | 0.669597 |
c676f723b7831f7a0c3498a2b65f8a13885a57c1 | 233 | py | Python | Online-Judges/CodingBat/Python/Warmup-01/11-front_back.py | shihab4t/Competitive-Programming | e8eec7d4f7d86bfa1c00b7fbbedfd6a1518f19be | [
"Unlicense"
] | 3 | 2021-06-15T01:19:23.000Z | 2022-03-16T18:23:53.000Z | Online-Judges/CodingBat/Python/Warmup-01/11-front_back.py | shihab4t/Competitive-Programming | e8eec7d4f7d86bfa1c00b7fbbedfd6a1518f19be | [
"Unlicense"
] | null | null | null | Online-Judges/CodingBat/Python/Warmup-01/11-front_back.py | shihab4t/Competitive-Programming | e8eec7d4f7d86bfa1c00b7fbbedfd6a1518f19be | [
"Unlicense"
] | null | null | null | def front_back(str):
length = len(str)
if length <= 1:
return str
new_str = ""
new_str += str[length - 1]
for i in range(1, length-1, 1):
new_str += str[i]
new_str += str[0]
return new_str
| 21.181818 | 35 | 0.536481 |
c69f74dde6458d368618142ad41dea7f243054f8 | 7,824 | py | Python | fuzzsvc/controller/Job.py | ifoundthetao/FuzzFlow | 86559ac7f85fc89510c0d9647e02880edb95aa2a | [
"MIT"
] | 53 | 2016-08-26T02:51:45.000Z | 2021-05-24T21:05:44.000Z | controller/Job.py | FingerLeakers/FuzzFlow | 3f2de617c3658904f9640f53a05d5e4e90634e32 | [
"MIT"
] | null | null | null | controller/Job.py | FingerLeakers/FuzzFlow | 3f2de617c3658904f9640f53a05d5e4e90634e32 | [
"MIT"
] | 31 | 2016-08-26T04:08:31.000Z | 2021-05-24T21:05:54.000Z | from flask_restful import Resource, reqparse
from model import FuzzingJobOption
from model.FuzzingJobOption import FuzzingJobOption
from model.FuzzingJob import FuzzingJob
from model.FuzzingOption import FuzzingOption
from model.FuzzingJobState import FuzzingJobState
from model.FuzzingEngine import FuzzingEngine
from ... | 37.435407 | 93 | 0.568763 |
af92043fb608cb5214ee67fe54a93b81320db79d | 1,015 | py | Python | src/python3_learn_video/pickle_json_forecast.py | HuangHuaBingZiGe/GitHub-Demo | f3710f73b0828ef500343932d46c61d3b1e04ba9 | [
"Apache-2.0"
] | null | null | null | src/python3_learn_video/pickle_json_forecast.py | HuangHuaBingZiGe/GitHub-Demo | f3710f73b0828ef500343932d46c61d3b1e04ba9 | [
"Apache-2.0"
] | null | null | null | src/python3_learn_video/pickle_json_forecast.py | HuangHuaBingZiGe/GitHub-Demo | f3710f73b0828ef500343932d46c61d3b1e04ba9 | [
"Apache-2.0"
] | null | null | null | import json
import pickle
import urllib.request
pickle_file = open('city_data.pkl', 'rb')
city = pickle.load(pickle_file)
password = input('请输入城市:')
name1 = city[password]
File1 = urllib.request.urlopen('http://m.weather.com.cn/data/' + name1 + '.html')
weatherHTML = File1.read().decode('utf-8')
weatherJSON = json.JSO... | 30.757576 | 81 | 0.698522 |
bbbb2ad97ca5871f9ecc4398e761ee73a4f0114c | 132 | py | Python | python/coursera_python/WESLEYAN/week4/t_2.py | SayanGhoshBDA/code-backup | 8b6135facc0e598e9686b2e8eb2d69dd68198b80 | [
"MIT"
] | 16 | 2018-11-26T08:39:42.000Z | 2019-05-08T10:09:52.000Z | python/coursera_python/WESLEYAN/week4/t_2.py | SayanGhoshBDA/code-backup | 8b6135facc0e598e9686b2e8eb2d69dd68198b80 | [
"MIT"
] | 8 | 2020-05-04T06:29:26.000Z | 2022-02-12T05:33:16.000Z | python/coursera_python/WESLEYAN/week4/t_2.py | SayanGhoshBDA/code-backup | 8b6135facc0e598e9686b2e8eb2d69dd68198b80 | [
"MIT"
] | 5 | 2020-02-11T16:02:21.000Z | 2021-02-05T07:48:30.000Z | import statistics
def problem4_2(ran_list):
# mean and sd
print(statistics.mean(ran_list))
print(statistics.stdev(ran_list))
| 13.2 | 34 | 0.765152 |
bbf4bd769711eb3e78d7a23a0a68d20fc479bb9e | 98 | py | Python | hello.py | wukids/sandbox | 8df917785ea866cd362f95fe444378cf82979328 | [
"Unlicense"
] | 1 | 2017-03-20T08:06:22.000Z | 2017-03-20T08:06:22.000Z | hello.py | wukids/sandbox | 8df917785ea866cd362f95fe444378cf82979328 | [
"Unlicense"
] | null | null | null | hello.py | wukids/sandbox | 8df917785ea866cd362f95fe444378cf82979328 | [
"Unlicense"
] | null | null | null | print('hello world')
print('what is your name?')
name = input()
print('nice to meet you, ' + name) | 24.5 | 34 | 0.663265 |
e9d76aff36d3376607f2d56ef1e1cad2484df16a | 1,598 | py | Python | 02_Turtle/pi_naeherung.py | kilian-funk/Python-Kurs | f5ef5a2fb2a875d2e80d77c1a6c3596a0e577d7f | [
"MIT"
] | null | null | null | 02_Turtle/pi_naeherung.py | kilian-funk/Python-Kurs | f5ef5a2fb2a875d2e80d77c1a6c3596a0e577d7f | [
"MIT"
] | null | null | null | 02_Turtle/pi_naeherung.py | kilian-funk/Python-Kurs | f5ef5a2fb2a875d2e80d77c1a6c3596a0e577d7f | [
"MIT"
] | null | null | null | from turtle import *
import math
import time
def neuer_stift(farbe):
stift = Turtle()
stift.speed(0)
stift.pencolor(farbe)
stift.pensize(3)
stift.shape("circle")
stift.shapesize(.3,.3,1)
stift.penup()
stift.goto(0,-radius)
stift.pendown()
return stift
def zeichne_innen_poly... | 31.333333 | 109 | 0.621402 |
758b7d591542a43f0c569f6e5c5d26bd4e03eb7c | 178 | py | Python | tests/shared/plugin.py | politbuero-kampagnen/onegov-cloud | 20148bf321b71f617b64376fe7249b2b9b9c4aa9 | [
"MIT"
] | null | null | null | tests/shared/plugin.py | politbuero-kampagnen/onegov-cloud | 20148bf321b71f617b64376fe7249b2b9b9c4aa9 | [
"MIT"
] | null | null | null | tests/shared/plugin.py | politbuero-kampagnen/onegov-cloud | 20148bf321b71f617b64376fe7249b2b9b9c4aa9 | [
"MIT"
] | null | null | null | from .capturelog import CaptureLogPlugin
def pytest_configure(config):
# activate log capturing
config.pluginmanager.register(CaptureLogPlugin(config), '_capturelog')
| 22.25 | 74 | 0.792135 |
34a52c5851609e3b9417e6749ba4a9e0af3a08c8 | 1,866 | py | Python | ___Python/Thomas/pycurs_180625/p03_lamda/m06_anwendung.py | uvenil/PythonKurs201806 | 85afa9c9515f5dd8bec0c546f077d8cc39568fe8 | [
"Apache-2.0"
] | null | null | null | ___Python/Thomas/pycurs_180625/p03_lamda/m06_anwendung.py | uvenil/PythonKurs201806 | 85afa9c9515f5dd8bec0c546f077d8cc39568fe8 | [
"Apache-2.0"
] | null | null | null | ___Python/Thomas/pycurs_180625/p03_lamda/m06_anwendung.py | uvenil/PythonKurs201806 | 85afa9c9515f5dd8bec0c546f077d8cc39568fe8 | [
"Apache-2.0"
] | null | null | null | from datetime import date
from p01_kennenlernen import my_pycurse_utilities
torsten = ["Torsten", "Aachen", date(1967, 1,1), ["C"]]
michael = ["Michael", "Moormerland", date(1981, 1, 10), ["Javascript"]]
karpoo = ["Karpoo", "Düsseldorf", date(1969, 1,1), ["ABAP"]]
carsten = ["Carsten", "Aachen", date(1971, 2, ... | 44.428571 | 159 | 0.709539 |
1fb41a612a4c7a7ce1ad5c70948999ea3d6fbc5d | 1,313 | py | Python | Hackergame_2020/超精巧的数字论证器/indexx.py | Wycers/Codelib | 86d83787aa577b8f2d66b5410e73102411c45e46 | [
"MIT"
] | 22 | 2018-08-07T06:55:10.000Z | 2021-06-12T02:12:19.000Z | Hackergame_2020/超精巧的数字论证器/indexx.py | Wycers/Codelib | 86d83787aa577b8f2d66b5410e73102411c45e46 | [
"MIT"
] | 28 | 2020-03-04T23:47:22.000Z | 2022-02-26T18:50:00.000Z | Hackergame_2020/超精巧的数字论证器/indexx.py | Wycers/Codelib | 86d83787aa577b8f2d66b5410e73102411c45e46 | [
"MIT"
] | 4 | 2019-11-09T15:41:26.000Z | 2021-10-10T08:56:57.000Z | segs = {}
res = {}
def set_ans(seg, exp):
res[seg].append(exp)
res[seg].append("-(" + exp + ")")
res[seg].append("~(" + exp + ")")
def work(seg):
global segs
set_ans(seg, seg)
for i in range(1, len(seg)):
left = seg[:i]
right = seg[i:]
for l in res[left]:
... | 23.872727 | 57 | 0.348819 |
1f37d0c78004becc0c07421abbb46dec688b4ae8 | 33 | py | Python | lib/python3.5/token.py | hwroitzsch/BikersLifeSaver | 469c738fdd6352c44a3f20689b17fa8ac04ad8a2 | [
"MIT"
] | 1 | 2020-08-16T04:04:23.000Z | 2020-08-16T04:04:23.000Z | lib/python3.5/token.py | hwroitzsch/BikersLifeSaver | 469c738fdd6352c44a3f20689b17fa8ac04ad8a2 | [
"MIT"
] | 5 | 2020-06-05T18:53:24.000Z | 2021-12-13T19:49:15.000Z | lib/python3.5/token.py | hwroitzsch/BikersLifeSaver | 469c738fdd6352c44a3f20689b17fa8ac04ad8a2 | [
"MIT"
] | null | null | null | /usr/local/lib/python3.5/token.py | 33 | 33 | 0.787879 |
1f4e04898a08feed59245c9036924420ce650fcb | 2,896 | py | Python | CodeChef_problems/CHFNSWPS/solution.py | gbrls/CompetitiveCode | b6f1b817a655635c3c843d40bd05793406fea9c6 | [
"MIT"
] | 165 | 2020-10-03T08:01:11.000Z | 2022-03-31T02:42:08.000Z | CodeChef_problems/CHFNSWPS/solution.py | gbrls/CompetitiveCode | b6f1b817a655635c3c843d40bd05793406fea9c6 | [
"MIT"
] | 383 | 2020-10-03T07:39:11.000Z | 2021-11-20T07:06:35.000Z | CodeChef_problems/CHFNSWPS/solution.py | gbrls/CompetitiveCode | b6f1b817a655635c3c843d40bd05793406fea9c6 | [
"MIT"
] | 380 | 2020-10-03T08:05:04.000Z | 2022-03-19T06:56:59.000Z | '''
-----------LOGIC---------------
We can be sure that if any number occurs odd times in array A and even times in array B
or vice versa then the answer is -1 as their cumulative frequency is odd, otherwise, the answer always exists.
Now, we have to minimize the total cost to make the sequences identical. Let’s say t... | 28.96 | 147 | 0.518646 |
1f884e684e3e34b042436a897b027dd62c043c4a | 889 | py | Python | exercises/ja/test_03_15.py | Jette16/spacy-course | 32df0c8f6192de6c9daba89740a28c0537e4d6a0 | [
"MIT"
] | 2,085 | 2019-04-17T13:10:40.000Z | 2022-03-30T21:51:46.000Z | exercises/ja/test_03_15.py | Jette16/spacy-course | 32df0c8f6192de6c9daba89740a28c0537e4d6a0 | [
"MIT"
] | 79 | 2019-04-18T14:42:55.000Z | 2022-03-07T08:15:43.000Z | exercises/ja/test_03_15.py | Jette16/spacy-course | 32df0c8f6192de6c9daba89740a28c0537e4d6a0 | [
"MIT"
] | 361 | 2019-04-17T13:34:32.000Z | 2022-03-28T04:42:45.000Z | def test():
assert Doc.has_extension("author"), "Docにauthor属性を登録しましたか?"
ext = Doc.get_extension("author")
assert all(v is None for v in ext), "author属性にデフォルト値を設定しましたか?"
assert Doc.has_extension("book"), "Docにbook属性を登録しましたか?"
ext = Doc.get_extension("book")
assert all(v is None for v in ext), "bo... | 38.652174 | 70 | 0.674916 |
23b41d75eb77e73e9521970ee28067b5d669738d | 1,085 | py | Python | Co-Simulation/Sumo/sumo-1.7.0/tools/sumolib/net/roundabout.py | uruzahe/carla | 940c2ab23cce1eda1ef66de35f66b42d40865fb1 | [
"MIT"
] | 4 | 2020-11-13T02:35:56.000Z | 2021-03-29T20:15:54.000Z | sumolib/net/roundabout.py | KhalidHALBA-GR-NIST/UCEFSUMOV2V | 4eb7ac761303a171718a10e4131184746bded9fd | [
"MIT"
] | 9 | 2020-12-09T02:12:39.000Z | 2021-02-18T00:15:28.000Z | sumolib/net/roundabout.py | KhalidHALBA-GR-NIST/UCEFSUMOV2V | 4eb7ac761303a171718a10e4131184746bded9fd | [
"MIT"
] | 1 | 2020-11-20T19:31:26.000Z | 2020-11-20T19:31:26.000Z | # 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.eclipse.org/legal/epl-2.... | 33.90625 | 77 | 0.729954 |
f1f768aa0b39335acb79dff0cbddd8301c699c71 | 3,836 | py | Python | evolutionary-algo/Variants.py | bjarnege/Portfolioleistung-KI-Entwicklungen | 27be45e3735421a5dd8441cc76ab69da52678304 | [
"MIT"
] | null | null | null | evolutionary-algo/Variants.py | bjarnege/Portfolioleistung-KI-Entwicklungen | 27be45e3735421a5dd8441cc76ab69da52678304 | [
"MIT"
] | null | null | null | evolutionary-algo/Variants.py | bjarnege/Portfolioleistung-KI-Entwicklungen | 27be45e3735421a5dd8441cc76ab69da52678304 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
"""
Created on Thu May 27 21:09:32 2021
@author: Bjarne Gerdes
"""
import plotly.io as pio
pio.renderers.default = 'browser'
from Population import f
from Evolution import Evolution
import pandas as pd
import numpy as np
import random
class ProcessAllVariants:
def __init__(self, sel... | 35.850467 | 122 | 0.588634 |
cdabcb712d2d63d8d224e3b82999a59f55284751 | 2,623 | py | Python | Week 4/visibility_graph.py | mayankpadhi/AI_Codes | 8631f18cd9d1bba9ffc142b1ede0197b512157e2 | [
"MIT"
] | null | null | null | Week 4/visibility_graph.py | mayankpadhi/AI_Codes | 8631f18cd9d1bba9ffc142b1ede0197b512157e2 | [
"MIT"
] | null | null | null | Week 4/visibility_graph.py | mayankpadhi/AI_Codes | 8631f18cd9d1bba9ffc142b1ede0197b512157e2 | [
"MIT"
] | null | null | null | import pyvisgraph as vg
import matplotlib.pyplot as plt
from matplotlib.path import Path
import matplotlib.patches as patches
from shapely.geometry import Polygon as Polygon
from math import pi, sqrt, atan, acos
from pyvisgraph.graph import Point
from pyvisgraph import graph
P1 = [vg.Point(0.5,2.5), vg.Point(0.5,4.5),... | 20.653543 | 134 | 0.581777 |
b567c240f9feb94f3110fb306a87d7917e74f559 | 1,698 | py | Python | python/data_sutram/pypath/PyPath/json_sqlite/6_get_approaching_vehicles.py | SayanGhoshBDA/code-backup | 8b6135facc0e598e9686b2e8eb2d69dd68198b80 | [
"MIT"
] | 16 | 2018-11-26T08:39:42.000Z | 2019-05-08T10:09:52.000Z | python/data_sutram/pypath/PyPath/json_sqlite/6_get_approaching_vehicles.py | SayanGhoshBDA/code-backup | 8b6135facc0e598e9686b2e8eb2d69dd68198b80 | [
"MIT"
] | 8 | 2020-05-04T06:29:26.000Z | 2022-02-12T05:33:16.000Z | python/data_sutram/pypath/PyPath/json_sqlite/6_get_approaching_vehicles.py | SayanGhoshBDA/code-backup | 8b6135facc0e598e9686b2e8eb2d69dd68198b80 | [
"MIT"
] | 5 | 2020-02-11T16:02:21.000Z | 2021-02-05T07:48:30.000Z | """
This piece of code will send :
INPUT = stop_id [can be got from "get_all_stoppages" table in db.sqlite]
and get
OUTPUT =
{
{
"angle": 62,
"crowd": "null",
"dataSource": "Chalo-VTU",
"directMatch": true,
"direction": "SW",
"distanceToDe... | 28.3 | 108 | 0.484099 |
b5af29be161084fc11f4b7295f310ae02ca6b871 | 3,933 | py | Python | instructions_rrfa.02.extents_and_more.py | Super10veBug/rrfa-pfch-2019 | e675790d2a53718afa53fd0a27a529877b598ffa | [
"MIT"
] | null | null | null | instructions_rrfa.02.extents_and_more.py | Super10veBug/rrfa-pfch-2019 | e675790d2a53718afa53fd0a27a529877b598ffa | [
"MIT"
] | null | null | null | instructions_rrfa.02.extents_and_more.py | Super10veBug/rrfa-pfch-2019 | e675790d2a53718afa53fd0a27a529877b598ffa | [
"MIT"
] | null | null | null | # import ElementTree to use "for loops" to search the XML document for desired headings
import xml.etree.ElementTree as etree
# import regular expressions to use "findall" to loop through headings and pull out the desired elements
import re
# import csv module in order to write a csv
import csv
# parse through the xml... | 42.75 | 136 | 0.719044 |
f5369062b0b5721481207535935888cbeb0c2da7 | 1,860 | py | Python | Packs/MicrosoftTeams/Scripts/MicrosoftTeamsAsk/MicrosoftTeamsAsk.py | diCagri/content | c532c50b213e6dddb8ae6a378d6d09198e08fc9f | [
"MIT"
] | 799 | 2016-08-02T06:43:14.000Z | 2022-03-31T11:10:11.000Z | Packs/MicrosoftTeams/Scripts/MicrosoftTeamsAsk/MicrosoftTeamsAsk.py | diCagri/content | c532c50b213e6dddb8ae6a378d6d09198e08fc9f | [
"MIT"
] | 9,317 | 2016-08-07T19:00:51.000Z | 2022-03-31T21:56:04.000Z | Packs/MicrosoftTeams/Scripts/MicrosoftTeamsAsk/MicrosoftTeamsAsk.py | diCagri/content | c532c50b213e6dddb8ae6a378d6d09198e08fc9f | [
"MIT"
] | 1,297 | 2016-08-04T13:59:00.000Z | 2022-03-31T23:43:06.000Z | import demistomock as demisto
from CommonServerPython import *
from CommonServerUserPython import *
def main():
script_arguments: dict = demisto.args()
team_member: str = script_arguments.get('team_member', '')
channel: str = script_arguments.get('channel', '')
if not (team_member or channel):
... | 32.068966 | 89 | 0.680108 |
f59651614efbd07af670dd4d0e7450493f4b9fe0 | 41,818 | py | Python | axesMPL.py | eeMKeey/IBtoGCode | 11b307615a38d371f6e78b70373c4cfaa1b23bdb | [
"MIT"
] | null | null | null | axesMPL.py | eeMKeey/IBtoGCode | 11b307615a38d371f6e78b70373c4cfaa1b23bdb | [
"MIT"
] | null | null | null | axesMPL.py | eeMKeey/IBtoGCode | 11b307615a38d371f6e78b70373c4cfaa1b23bdb | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
# Form implementation generated from reading ui file '.\axesMPL.ui'
#
# Created by: PyQt5 UI code generator 5.12.3
#
# WARNING! All changes made in this file will be lost!
from PyQt5 import QtCore, QtGui, QtWidgets
class Ui_MainWindow(object):
def setupUi(self, MainWindow):
Main... | 61.137427 | 316 | 0.715027 |
27657856532a018ebdf6e24acd7a741073956a1a | 167 | py | Python | Veranstaltungen/admin.py | wmles/scholarium.at | d2356b3e475df772382e035ddcb839fc7dae4305 | [
"MIT"
] | 1 | 2017-07-24T10:19:36.000Z | 2017-07-24T10:19:36.000Z | Veranstaltungen/admin.py | wmles/scholarium.at | d2356b3e475df772382e035ddcb839fc7dae4305 | [
"MIT"
] | 9 | 2017-07-26T14:16:08.000Z | 2022-03-11T23:14:40.000Z | Veranstaltungen/admin.py | wmles/scholarium.at | d2356b3e475df772382e035ddcb839fc7dae4305 | [
"MIT"
] | 1 | 2017-03-07T12:38:23.000Z | 2017-03-07T12:38:23.000Z | from django.contrib import admin
from .models import *
admin.site.register(Veranstaltung)
admin.site.register(ArtDerVeranstaltung)
admin.site.register(Studiumdings)
| 20.875 | 40 | 0.832335 |
e378b789343643210160060a57e16d2b01668344 | 491 | py | Python | Algorithms/Array/findpos.py | PriyanshuMay/DS_ALGO | 6c754fd7d817ea3f0470b42f5224c620c77fffb7 | [
"MIT"
] | 182 | 2020-10-01T17:16:42.000Z | 2021-10-04T17:52:49.000Z | Algorithms/Array/findpos.py | PriyanshuMay/DS_ALGO | 6c754fd7d817ea3f0470b42f5224c620c77fffb7 | [
"MIT"
] | 759 | 2020-10-01T00:12:21.000Z | 2021-10-04T19:35:11.000Z | Algorithms/Array/findpos.py | PriyanshuMay/DS_ALGO | 6c754fd7d817ea3f0470b42f5224c620c77fffb7 | [
"MIT"
] | 1,176 | 2020-10-01T16:02:13.000Z | 2021-10-04T19:20:19.000Z | def findposition(arr, x) :
flag = True
for i in range(0, len(arr)) :
if (x != arr[i]) :
continue
if (flag==True) :
first = i
last = i
flag = False
if (flag==False) :
print( "First Occurrence in array = ", first , "\n" + " Last Occurrence ... | 27.277778 | 99 | 0.480652 |
5604e8242368dc56b503c923c354e3d1e4750017 | 3,364 | py | Python | transactions/txdemo.py | DariusParvin/segwit_tutorial | a5ed6776bbed5eaf1e24b6a1d9228c39d30c0376 | [
"MIT"
] | 10 | 2019-03-12T22:32:26.000Z | 2022-01-05T06:36:52.000Z | transactions/txdemo.py | DariusParvin/segwit_tutorial | a5ed6776bbed5eaf1e24b6a1d9228c39d30c0376 | [
"MIT"
] | 2 | 2019-10-30T14:31:00.000Z | 2019-11-02T01:27:08.000Z | transactions/txdemo.py | DariusParvin/segwit_tutorial | a5ed6776bbed5eaf1e24b6a1d9228c39d30c0376 | [
"MIT"
] | 3 | 2019-10-31T13:56:04.000Z | 2022-01-19T21:40:09.000Z | import hashlib
def dSHA256(raw):
hash_1 = hashlib.sha256(raw).digest()
hash_2 = hashlib.sha256(hash_1).digest()
return hash_2
# version
version = (1).to_bytes(4, byteorder="little", signed=False)
# hashPrevOut + outpoint
txid = (bytes.fromhex("73c9fec091af7d5fa74650e758b40b4f9895404d1cb95193b6ec059a541dd... | 25.104478 | 114 | 0.712842 |
de987983cbf02e84de9325fbc307231952f2dab8 | 1,747 | py | Python | examples/matrix_heart.py | Elecrow-RD/Raspberry-Pi-Starter-Kit | 9adad7bfb403a697119bf80bbc2290bc3832750d | [
"MIT"
] | 1 | 2020-08-11T23:39:23.000Z | 2020-08-11T23:39:23.000Z | examples/matrix_heart.py | Elecrow-RD/Raspberry-Pi-Starter-Kit | 9adad7bfb403a697119bf80bbc2290bc3832750d | [
"MIT"
] | null | null | null | examples/matrix_heart.py | Elecrow-RD/Raspberry-Pi-Starter-Kit | 9adad7bfb403a697119bf80bbc2290bc3832750d | [
"MIT"
] | 1 | 2020-08-05T18:30:45.000Z | 2020-08-05T18:30:45.000Z | #!/usr/bin/python
# -*- coding: utf-8 -*-
# http://elecrow.com/
# original author: https://github.com/glennklockwood/raspberrypi
import random
import time
import spi
import numpy as np
### Initialize an SPI connection using BCM-mode pins 21, 20, and 16
max7219 = spi.SPI(clk=21, cs=20, mosi=16, miso=None)
### Zero ou... | 28.177419 | 76 | 0.602748 |
724d68c0888879f79fc2e462a0eb5a50b084e0c4 | 6,123 | py | Python | .venv/Lib/site-packages/dexpy/ccd.py | AI-Assistant/FEMAG-Python | ff86e8f41485ae9df6034e6b8e810b59f8094c70 | [
"MIT"
] | 21 | 2016-10-19T18:13:03.000Z | 2021-11-02T13:58:31.000Z | .venv/Lib/site-packages/dexpy/ccd.py | AI-Assistant/FEMAG-Python | ff86e8f41485ae9df6034e6b8e810b59f8094c70 | [
"MIT"
] | 43 | 2016-10-11T20:56:28.000Z | 2020-08-20T16:39:38.000Z | .venv/Lib/site-packages/dexpy/ccd.py | AI-Assistant/FEMAG-Python | ff86e8f41485ae9df6034e6b8e810b59f8094c70 | [
"MIT"
] | 6 | 2017-12-22T03:47:37.000Z | 2021-03-13T03:45:26.000Z | """Functions for building Central Composite designs."""
import dexpy.design as design
from dexpy.factorial import build_full_factorial
import pandas as pd
import numpy as np
import math
import numbers
def build_ccd(factor_count, alpha="rotatable", center_points=1):
"""Builds a central composite design.
The ... | 41.09396 | 80 | 0.6683 |
c2368b405eff83f5c5ff54c91b3a7e05d70b94f0 | 7,488 | py | Python | casts/models.py | rocky-roll-call/rrc-backend | 02e8e11c3dab7661e48650e2e861a4a97788a4ce | [
"MIT"
] | null | null | null | casts/models.py | rocky-roll-call/rrc-backend | 02e8e11c3dab7661e48650e2e861a4a97788a4ce | [
"MIT"
] | null | null | null | casts/models.py | rocky-roll-call/rrc-backend | 02e8e11c3dab7661e48650e2e861a4a97788a4ce | [
"MIT"
] | null | null | null | """
Models to build and manage User profiles and settings
"""
# django
from django.db import models
from django.utils import text, timezone
from sorl.thumbnail import ImageField
def cast_logo(instance, filename: str) -> str:
"""
Generate cast logo filename from cast slug
"""
return f"casts/{instance.... | 33.72973 | 84 | 0.637153 |
dfca2df7698b5621c296d2e03589758ee92aa5bc | 3,967 | py | Python | display/_audio_file_menu_view.py | ihrigb/stagebuzzer | dbce1c5fa59a6f22e74d84ccc96d4d1a28a5b680 | [
"Apache-2.0"
] | null | null | null | display/_audio_file_menu_view.py | ihrigb/stagebuzzer | dbce1c5fa59a6f22e74d84ccc96d4d1a28a5b680 | [
"Apache-2.0"
] | null | null | null | display/_audio_file_menu_view.py | ihrigb/stagebuzzer | dbce1c5fa59a6f22e74d84ccc96d4d1a28a5b680 | [
"Apache-2.0"
] | null | null | null | from ._button_lights import ButtonLights
from ._view import View
from ._display import Display
from config import AudioConfig
from usbdrive import File, root
audio_file_menu_view_name = "audio_file_menu_view"
parent_cursor_value = 1
min_cursor_value = 1
def sorted_children(file: File) -> list:
children = sorted(... | 29.385185 | 100 | 0.570204 |
5f0749e135c4345c1ad661505c6540e529137ff9 | 1,099 | py | Python | cs/lambda_cs/03_data_structures/queue_and_stack/dll_stack.py | tobias-fyi/vela | b0b3d3c6dc3fa397c8c7a492098a02cf75e0ff82 | [
"MIT"
] | null | null | null | cs/lambda_cs/03_data_structures/queue_and_stack/dll_stack.py | tobias-fyi/vela | b0b3d3c6dc3fa397c8c7a492098a02cf75e0ff82 | [
"MIT"
] | 8 | 2020-03-24T17:47:23.000Z | 2022-03-12T00:33:21.000Z | cs/lambda_cs/03_data_structures/queue_and_stack/dll_stack.py | tobias-fyi/vela | b0b3d3c6dc3fa397c8c7a492098a02cf75e0ff82 | [
"MIT"
] | null | null | null | """
Data Structures :: Stack
"""
import sys
sys.path.append("../doubly_linked_list")
from doubly_linked_list import DoublyLinkedList
class Stack:
def __init__(self):
"""Implementation of a Stack (LIFO). A doubly-linked list is
used as the underlying data structure because the methods for
... | 26.804878 | 69 | 0.603276 |
3e06e7926fc673bb20e0a61547d6cd2b8f3e30fa | 195 | py | Python | cd_return_codes.py | EmanuelDms/automation | 25a0f370f40aa955225d7c3a1e28c2d8cc988689 | [
"MIT"
] | null | null | null | cd_return_codes.py | EmanuelDms/automation | 25a0f370f40aa955225d7c3a1e28c2d8cc988689 | [
"MIT"
] | null | null | null | cd_return_codes.py | EmanuelDms/automation | 25a0f370f40aa955225d7c3a1e28c2d8cc988689 | [
"MIT"
] | null | null | null | import os
home_dir = os.system("cd ~")
print("`cd ~` ran with exit code %d" % home_dir)
unknown_dir = os.system("cd doesnotexist")
print("`cd doesnotexist` ran with exit code %d" % unknown_dir)
| 27.857143 | 62 | 0.697436 |
5fd48ce6bf751c0590cf6eab942dc53698d41b5f | 49 | py | Python | Openharmony v1.0/third_party/ltp/testcases/commands/file/datafiles/in.py | clkbit123/TheOpenHarmony | 0e6bcd9dee9f1a2481d762966b8bbd24baad6159 | [
"MIT"
] | 1 | 2022-02-15T08:51:55.000Z | 2022-02-15T08:51:55.000Z | hihope_neptune-oh_hid/00_src/v0.3/third_party/ltp/testcases/commands/file/datafiles/in.py | dawmlight/vendor_oh_fun | bc9fb50920f06cd4c27399f60076f5793043c77d | [
"Apache-2.0"
] | null | null | null | hihope_neptune-oh_hid/00_src/v0.3/third_party/ltp/testcases/commands/file/datafiles/in.py | dawmlight/vendor_oh_fun | bc9fb50920f06cd4c27399f60076f5793043c77d | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/env python3
print("This is a test.")
| 12.25 | 24 | 0.653061 |
39987678925e4ade6138df831f06ccbcbedc6eee | 2,440 | py | Python | backend/api/btb/api/graphql.py | prototypefund/project-c | a87a49d7c1317b1e3ec03ddd0ce146ad0391b5d2 | [
"MIT"
] | 4 | 2020-04-30T16:11:24.000Z | 2020-06-02T10:08:07.000Z | backend/api/btb/api/graphql.py | prototypefund/project-c | a87a49d7c1317b1e3ec03ddd0ce146ad0391b5d2 | [
"MIT"
] | 291 | 2020-04-20T13:11:13.000Z | 2022-02-10T21:54:46.000Z | backend/api/btb/api/graphql.py | prototypefund/project-c | a87a49d7c1317b1e3ec03ddd0ce146ad0391b5d2 | [
"MIT"
] | 2 | 2020-04-19T14:56:01.000Z | 2020-04-19T18:09:34.000Z | from flask_graphql import GraphQLView
from btb.api.schema import executableSchema
from btb.api.auth import auth_required
from graphql.error import GraphQLLocatedError
from graphql import GraphQLError
from graphql.error import format_error
from flask import g, current_app
from sqlalchemy.exc import SQLAlchemyError
from ... | 30.5 | 108 | 0.630328 |
39a48e4a90cdda01319e93b1e4af7c152251e876 | 9,070 | py | Python | zencad/geom/face.py | Spiritdude/zencad | 4e63b1a6306dd235f4daa2791b10249f7546c95b | [
"MIT"
] | 5 | 2018-04-11T14:11:40.000Z | 2018-09-12T19:03:36.000Z | zencad/geom/face.py | Spiritdude/zencad | 4e63b1a6306dd235f4daa2791b10249f7546c95b | [
"MIT"
] | null | null | null | zencad/geom/face.py | Spiritdude/zencad | 4e63b1a6306dd235f4daa2791b10249f7546c95b | [
"MIT"
] | null | null | null | import math
import OCC.Core.BRepPrimAPI
from OCC.Core.BRepBuilderAPI import BRepBuilderAPI_MakeFace, BRepBuilderAPI_MakeEdge, BRepBuilderAPI_MakeWire
from OCC.Core.TopAbs import TopAbs_WIRE, TopAbs_EDGE
from OCC.Core.gp import gp_Circ, gp, gp_Pnt, gp_Pln, gp_Vec, gp_Dir
from OCC.Core.GC import GC_MakeCircle
from OCC.C... | 26.443149 | 109 | 0.655127 |
083d0c7815b33cc14beab50d36a72d8964af634a | 1,624 | py | Python | src/compgen2/const_synthetic.py | CorrelAid/compgen-ii-cgv | 810a044d6bbe1ce058a359115e3e5fc71a358549 | [
"MIT"
] | 1 | 2022-02-02T12:41:06.000Z | 2022-02-02T12:41:06.000Z | src/compgen2/const_synthetic.py | CorrelAid/compgen-ii-cgv | 810a044d6bbe1ce058a359115e3e5fc71a358549 | [
"MIT"
] | null | null | null | src/compgen2/const_synthetic.py | CorrelAid/compgen-ii-cgv | 810a044d6bbe1ce058a359115e3e5fc71a358549 | [
"MIT"
] | null | null | null | import numpy as np
P_SHUFFLE = 5 * 1e-02
P_FRACTAL = 0.2 * 1e-02
P_LINO = 0.2 * 1e-02
P_DROP = 1.5 * 1e-02
P_SHORTEN = 10 * 1e-02
key_matrix_linotype = np.array([
['e', 'r', 'u', 'b', '@', 'fl', '.', ',', '-', '1', '6', 'E', 'R', 'U', 'B',],
['n', 'd', 'm', 'f', '@', 'en', 'ä', '?', ':', '2', '7', 'N', ... | 31.843137 | 85 | 0.225369 |
f241e24e508f1a4309c5a287966fd3712f7fac0e | 820 | py | Python | ANN/e05/e05.py | joao-frohlich/BCC | 9ed74eb6d921d1280f48680677a2140c5383368d | [
"Apache-2.0"
] | 10 | 2020-12-08T20:18:15.000Z | 2021-06-07T20:00:07.000Z | ANN/e05/e05.py | joao-frohlich/BCC | 9ed74eb6d921d1280f48680677a2140c5383368d | [
"Apache-2.0"
] | 2 | 2021-06-28T03:42:13.000Z | 2021-06-28T16:53:13.000Z | ANN/e05/e05.py | joao-frohlich/BCC | 9ed74eb6d921d1280f48680677a2140c5383368d | [
"Apache-2.0"
] | 2 | 2021-01-14T19:59:20.000Z | 2021-06-15T11:53:21.000Z | from pprint import pprint
from numpy import array, diag, diagflat
from numpy import dot, linalg, triu, tril
def gauss_seidel(A, b, N, x):
D = diagflat(diag(A))
L = tril(A, -1)
U = triu(-A, 1)
D_L = D + L
D_L_ = linalg.inv(D_L)
for i in range(N):
x = dot(D_L_, (dot(U, x) + b))
... | 19.069767 | 43 | 0.454878 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.