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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
71770b577e3e639e1398e4cc2257cc776ec91709 | 5,616 | py | Python | hardware/chip/rtl872xd/release/aos_burn_tool/flash_program_ll.py | Gabrielle-OyO/AliOS-Things | a923550ef98bcba49070b64b90b09d010239c25a | [
"Apache-2.0"
] | null | null | null | hardware/chip/rtl872xd/release/aos_burn_tool/flash_program_ll.py | Gabrielle-OyO/AliOS-Things | a923550ef98bcba49070b64b90b09d010239c25a | [
"Apache-2.0"
] | 1 | 2021-09-11T05:53:30.000Z | 2021-09-11T05:53:30.000Z | hardware/chip/rtl872xd/release/aos_burn_tool/flash_program_ll.py | willianchanlovegithub/AliOS-Things | 637c0802cab667b872d3b97a121e18c66f256eab | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/env python
import os, sys, re, time
from ymodem import YModem
try:
import serial
from serial.tools import miniterm
except:
print("\nNot found pyserial, please install it by: \nsudo python%d -m pip install pyserial" % (sys.version_info.major))
sys.exit(-1)
def match_and_send(serialport, patt... | 30.521739 | 134 | 0.589566 |
7191e7fd49d640984d74793226edafc855839ed8 | 551 | py | Python | nz_crawl_demo/day2/requests/sessions.py | gaohj/nzflask_bbs | 36a94c380b78241ed5d1e07edab9618c3e8d477b | [
"Apache-2.0"
] | null | null | null | nz_crawl_demo/day2/requests/sessions.py | gaohj/nzflask_bbs | 36a94c380b78241ed5d1e07edab9618c3e8d477b | [
"Apache-2.0"
] | 27 | 2020-02-12T07:55:58.000Z | 2022-03-12T00:19:09.000Z | nz_crawl_demo/day2/requests/sessions.py | gaohj/nzflask_bbs | 36a94c380b78241ed5d1e07edab9618c3e8d477b | [
"Apache-2.0"
] | 2 | 2020-02-18T01:54:55.000Z | 2020-02-21T11:36:28.000Z | import requests
url = "http://www.renren.com/PLogin.do"
data = {
"email":"gaohj5@163.com",
"password":'12qwaszx',
}
headers = {
'User-Agent':"Mozilla/5.0 (Windows NT 6.1; WOW64; rv:64.0) Gecko/20100101 Firefox/64.0"
}
#登录
session = requests.Session() #实例化一个session对象
session.post(url,data=data,headers=he... | 23.956522 | 91 | 0.682396 |
e0993b715ecbd27b80f4bea04a1d1030b668a164 | 2,470 | py | Python | src/Sephrasto/CharakterAssistent/ChoiceXmlVerifier.py | Ilaris-Tools/Sephrasto | 8574a5b45da8ebfa5f69a775066fd3136da1c718 | [
"MIT"
] | 1 | 2022-02-02T16:15:59.000Z | 2022-02-02T16:15:59.000Z | src/Sephrasto/CharakterAssistent/ChoiceXmlVerifier.py | Ilaris-Tools/Sephrasto | 8574a5b45da8ebfa5f69a775066fd3136da1c718 | [
"MIT"
] | 1 | 2022-01-14T11:04:19.000Z | 2022-01-14T11:04:19.000Z | src/Sephrasto/CharakterAssistent/ChoiceXmlVerifier.py | lukruh/Sephrasto | 8574a5b45da8ebfa5f69a775066fd3136da1c718 | [
"MIT"
] | null | null | null | import lxml.etree as etree
import logging
class ChoiceXmlVerifier(object):
def __init__(self):
pass
allowedAttributesVarianten = ["pflichtwahl"]
allowedAttributesVariante = ["name", "beschreibung", "geschlecht"]
allowedAttributesAuswahl = ["name", "beschreibung", "geschlecht", "varianten", "ke... | 44.909091 | 101 | 0.603239 |
1cd016415a5318ded488324f6e75f0c01512eac5 | 308 | py | Python | 867-transpose-matrix/867-transpose-matrix.py | hyeseonko/LeetCode | 48dfc93f1638e13041d8ce1420517a886abbdc77 | [
"MIT"
] | 2 | 2021-12-05T14:29:06.000Z | 2022-01-01T05:46:13.000Z | 867-transpose-matrix/867-transpose-matrix.py | hyeseonko/LeetCode | 48dfc93f1638e13041d8ce1420517a886abbdc77 | [
"MIT"
] | null | null | null | 867-transpose-matrix/867-transpose-matrix.py | hyeseonko/LeetCode | 48dfc93f1638e13041d8ce1420517a886abbdc77 | [
"MIT"
] | null | null | null | class Solution:
def transpose(self, matrix: List[List[int]]) -> List[List[int]]:
m, n = len(matrix), len(matrix[0])
output = [[0 for _ in range(m)] for _ in range(n)]
for i in range(m):
for j in range(n):
output[j][i]=matrix[i][j]
return output | 38.5 | 68 | 0.522727 |
c7686c95a92a97da5f5fcb4091f61d953dc636b9 | 191 | py | Python | day01/variables.py | nurmatthias/100DaysOfCode | 22002e4b31d13e6b52e6b9222d2e91c2070c5744 | [
"Apache-2.0"
] | null | null | null | day01/variables.py | nurmatthias/100DaysOfCode | 22002e4b31d13e6b52e6b9222d2e91c2070c5744 | [
"Apache-2.0"
] | null | null | null | day01/variables.py | nurmatthias/100DaysOfCode | 22002e4b31d13e6b52e6b9222d2e91c2070c5744 | [
"Apache-2.0"
] | null | null | null | a = input("a ")
b = input("b ")
c = b
b = a
a = c
print("a = " + str(a))
print("b = " + str(b))
# Mach deinen Code leserlich!
# ich bleib trotzdem bei camelCase und nicht das andere Zeug
| 13.642857 | 60 | 0.586387 |
c7d8153b468fbfdca6dd8b5cd29bd54b9bfbe25c | 525 | py | Python | packages/watchmen-model/src/watchmen_model/dqc/__init__.py | Indexical-Metrics-Measure-Advisory/watchmen | c54ec54d9f91034a38e51fd339ba66453d2c7a6d | [
"MIT"
] | null | null | null | packages/watchmen-model/src/watchmen_model/dqc/__init__.py | Indexical-Metrics-Measure-Advisory/watchmen | c54ec54d9f91034a38e51fd339ba66453d2c7a6d | [
"MIT"
] | null | null | null | packages/watchmen-model/src/watchmen_model/dqc/__init__.py | Indexical-Metrics-Measure-Advisory/watchmen | c54ec54d9f91034a38e51fd339ba66453d2c7a6d | [
"MIT"
] | null | null | null | from .catalog import Catalog, CatalogCriteria, CatalogId
from .dqc_pipelines import ask_dqc_pipelines
from .dqc_topics import ask_dqc_topics, MonitorRuleDetected
from .monitor_data import MonitorRuleLog, MonitorRuleLogCriteria
from .monitor_job_lock import MonitorJobLock, MonitorJobLockId
from .monitor_rule import Moni... | 58.333333 | 118 | 0.881905 |
401ca824e3a59b06adf39775a4c612f1bc856468 | 413 | py | Python | RunFaster/concurrency/Code-02-Five_thread_threadlist.py | BALAVIGNESHDOSTRIX/pyexpert | 300498f66a3a4f6b3060d51b3d6643d8e63cf746 | [
"CC0-1.0"
] | null | null | null | RunFaster/concurrency/Code-02-Five_thread_threadlist.py | BALAVIGNESHDOSTRIX/pyexpert | 300498f66a3a4f6b3060d51b3d6643d8e63cf746 | [
"CC0-1.0"
] | null | null | null | RunFaster/concurrency/Code-02-Five_thread_threadlist.py | BALAVIGNESHDOSTRIX/pyexpert | 300498f66a3a4f6b3060d51b3d6643d8e63cf746 | [
"CC0-1.0"
] | null | null | null | '''
DEVELOPER NAME : BALAVIGNESH.M
IMPLEMENTED DATE: 16-11-2018
'''
import threading
class FiveThread:
@staticmethod
def Buggatti():
print("Buggatti is the world super fast car its maximum speed is 458 km/h above")
thread_list = []
five = FiveThread()
for i in range(5):
tim = threading.Thread(t... | 18.772727 | 89 | 0.680387 |
464d7db6da57631216a13bd9461d38af4ebccdb3 | 1,448 | py | Python | packages/watchmen-dqc/src/watchmen_dqc/monitor/rule/retrieve_data_rules_utils.py | Indexical-Metrics-Measure-Advisory/watchmen | c54ec54d9f91034a38e51fd339ba66453d2c7a6d | [
"MIT"
] | null | null | null | packages/watchmen-dqc/src/watchmen_dqc/monitor/rule/retrieve_data_rules_utils.py | Indexical-Metrics-Measure-Advisory/watchmen | c54ec54d9f91034a38e51fd339ba66453d2c7a6d | [
"MIT"
] | null | null | null | packages/watchmen-dqc/src/watchmen_dqc/monitor/rule/retrieve_data_rules_utils.py | Indexical-Metrics-Measure-Advisory/watchmen | c54ec54d9f91034a38e51fd339ba66453d2c7a6d | [
"MIT"
] | null | null | null | from logging import getLogger
from typing import Dict, List
from watchmen_data_kernel.storage import TopicDataService
from watchmen_model.admin import Factor
from watchmen_model.common import FactorId
from watchmen_model.dqc import MonitorRule
from watchmen_utilities import ArrayHelper, is_blank
from .data_service_uti... | 35.317073 | 89 | 0.778315 |
46ace16b402eb37ea057a6506cebba8adad0e5eb | 666 | py | Python | chapter_four/fib_calc_package/tests/flitton_fib_py/fib_calcs/test_fib_number.py | PacktPublishing/Speed-up-your-Python-with-Rust | 1fce5fb59ea966015768e7eca51c0e31d69531ec | [
"MIT"
] | 21 | 2021-09-10T12:46:26.000Z | 2022-03-23T02:50:39.000Z | chapter_four/fib_calc_package/tests/flitton_fib_py/fib_calcs/test_fib_number.py | PacktPublishing/Speed-up-your-Python-with-Rust | 1fce5fb59ea966015768e7eca51c0e31d69531ec | [
"MIT"
] | null | null | null | chapter_four/fib_calc_package/tests/flitton_fib_py/fib_calcs/test_fib_number.py | PacktPublishing/Speed-up-your-Python-with-Rust | 1fce5fb59ea966015768e7eca51c0e31d69531ec | [
"MIT"
] | 6 | 2021-09-02T08:32:37.000Z | 2022-03-17T21:15:25.000Z | from unittest import main, TestCase
from flitton_fib_py.fib_calcs.fib_number import recurring_fibonacci_number
class RecurringFibNumberTest(TestCase):
def test_zero(self):
self.assertEqual(0, recurring_fibonacci_number(number=0))
def test_negative(self):
self.assertEqual(None, recurring_fib... | 25.615385 | 74 | 0.738739 |
d3c60ab2a04825c79b566634875e8f1afb843adf | 289 | py | Python | Tutorials/10 Days of Statistics/Day 6/central_limit_theorem2.py | xuedong/hacker-rank | ce8a60f80c2c6935b427f9409d7e826ee0d26a89 | [
"MIT"
] | 1 | 2021-02-22T17:37:45.000Z | 2021-02-22T17:37:45.000Z | Tutorials/10 Days of Statistics/Day 6/central_limit_theorem2.py | xuedong/hacker-rank | ce8a60f80c2c6935b427f9409d7e826ee0d26a89 | [
"MIT"
] | null | null | null | Tutorials/10 Days of Statistics/Day 6/central_limit_theorem2.py | xuedong/hacker-rank | ce8a60f80c2c6935b427f9409d7e826ee0d26a89 | [
"MIT"
] | null | null | null | #!/bin/python3
import sys
from math import erf, sqrt
def phi(x, mu, std):
return (1.0 + erf((x-mu) / (std*sqrt(2.0)))) / 2.0
tickets = float(input())
students = float(input())
mu = float(input())
std = float(input())
print(round(phi(tickets, students*mu, sqrt(students)*std), 4))
| 18.0625 | 62 | 0.633218 |
31776d795ae82e7f69014d50735c89289a3b30f9 | 14,379 | py | Python | exercises/networking_selfpaced/networking-workshop/collections/ansible_collections/community/general/plugins/modules/cs_network_acl_rule.py | tr3ck3r/linklight | 5060f624c235ecf46cb62cefcc6bddc6bf8ca3e7 | [
"MIT"
] | null | null | null | exercises/networking_selfpaced/networking-workshop/collections/ansible_collections/community/general/plugins/modules/cs_network_acl_rule.py | tr3ck3r/linklight | 5060f624c235ecf46cb62cefcc6bddc6bf8ca3e7 | [
"MIT"
] | null | null | null | exercises/networking_selfpaced/networking-workshop/collections/ansible_collections/community/general/plugins/modules/cs_network_acl_rule.py | tr3ck3r/linklight | 5060f624c235ecf46cb62cefcc6bddc6bf8ca3e7 | [
"MIT"
] | null | null | null | #!/usr/bin/python
# -*- coding: utf-8 -*-
#
# Copyright (c) 2017, René Moser <mail@renemoser.net>
# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
from __future__ import absolute_import, division, print_function
__metaclass__ = type
ANSIBLE_METADATA = {'metadata_version': '... | 31.056156 | 118 | 0.640796 |
735868ba4bc338f83a8967773b8f412553d8a560 | 3,262 | py | Python | src/generate-data.py | Haus4/studienarbeit-stau | 10921f8850df67c797cf174b42fbc5dcec257251 | [
"MIT"
] | 2 | 2018-10-16T08:09:13.000Z | 2019-02-18T13:33:11.000Z | src/generate-data.py | Haus4/studienarbeit-stau | 10921f8850df67c797cf174b42fbc5dcec257251 | [
"MIT"
] | 7 | 2019-02-28T18:10:44.000Z | 2019-03-04T21:09:03.000Z | src/generate-data.py | Haus4/studienarbeit-stau | 10921f8850df67c797cf174b42fbc5dcec257251 | [
"MIT"
] | 1 | 2020-04-05T08:53:13.000Z | 2020-04-05T08:53:13.000Z | import os
import urllib2
import email.utils as eut
import json
import cv2
import process_bgs
from threading import Thread, Lock
from time import sleep
relevantCams = [
#"KA091",
#"KA061",
#"KA041",
#"KA151"
"K11"
]
showPreview = False
printMutex = Lock()
def printLocked(text):
printMutex.acqu... | 25.484375 | 127 | 0.583078 |
c3387a8c58ec5bfac809aa31d69c6b5809ccc9ca | 119 | py | Python | scripts/hello_world_connewm.py | breezage/Hacktoberfest-1 | 6f6d52248c79c0e72fd13b599500318fce3f9ab0 | [
"MIT"
] | null | null | null | scripts/hello_world_connewm.py | breezage/Hacktoberfest-1 | 6f6d52248c79c0e72fd13b599500318fce3f9ab0 | [
"MIT"
] | null | null | null | scripts/hello_world_connewm.py | breezage/Hacktoberfest-1 | 6f6d52248c79c0e72fd13b599500318fce3f9ab0 | [
"MIT"
] | 1 | 2019-10-24T06:45:21.000Z | 2019-10-24T06:45:21.000Z | # Language: Python
# Env: Python3.5
# Author: Connor Newman
#:GitHub: https://github.com/connewm
print("Hello World")
| 17 | 36 | 0.714286 |
c33fbb9aaa70e44bf1bc4b7b72011b73159fa697 | 58 | py | Python | Hackergame_2020/会复读的复读机/reverse.py | Wycers/Codelib | 86d83787aa577b8f2d66b5410e73102411c45e46 | [
"MIT"
] | 22 | 2018-08-07T06:55:10.000Z | 2021-06-12T02:12:19.000Z | Hackergame_2020/会复读的复读机/reverse.py | Wycers/Codelib | 86d83787aa577b8f2d66b5410e73102411c45e46 | [
"MIT"
] | 28 | 2020-03-04T23:47:22.000Z | 2022-02-26T18:50:00.000Z | Hackergame_2020/会复读的复读机/reverse.py | Wycers/Codelib | 86d83787aa577b8f2d66b5410e73102411c45e46 | [
"MIT"
] | 4 | 2019-11-09T15:41:26.000Z | 2021-10-10T08:56:57.000Z | _=')""=dne,]0~::[_%%_(tnirp;%r=_';print(_%_[::~0],end="")
| 29 | 57 | 0.431034 |
4899ffc4165ce84df658a53923de7ca9937b1e2d | 1,630 | py | Python | documents/GeoTopo/definitions/generateDefinitions.py | keithmannock/LaTeX-examples | 6829f6cf9710b314a4bf0b64abdae5bcf6997fd0 | [
"MIT"
] | 2 | 2017-11-02T10:09:12.000Z | 2017-11-24T22:16:18.000Z | documents/GeoTopo/definitions/generateDefinitions.py | everbot/LaTeX-examples | 9558d8b3c19776cb068b9753dcd3f88645dd7134 | [
"MIT"
] | null | null | null | documents/GeoTopo/definitions/generateDefinitions.py | everbot/LaTeX-examples | 9558d8b3c19776cb068b9753dcd3f88645dd7134 | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
import re, glob
def get_definitions(filename):
with open(filename) as f:
content = f.read()
pattern = re.compile(r"^\\begin{definition}(.*?)\\end{definition}", re.DOTALL | re.UNICODE | re.MULTILINE)
index_pattern = re.compile(r"\\xindex{(?:.*?@)?(.*?... | 44.054054 | 171 | 0.639877 |
48a71f5e8ca4c1f85eac9e6a0f77443a1e149825 | 983 | py | Python | Packs/CommonScripts/Scripts/FirstArrayElement/FirstArrayElement_test.py | diCagri/content | c532c50b213e6dddb8ae6a378d6d09198e08fc9f | [
"MIT"
] | 799 | 2016-08-02T06:43:14.000Z | 2022-03-31T11:10:11.000Z | Packs/CommonScripts/Scripts/FirstArrayElement/FirstArrayElement_test.py | diCagri/content | c532c50b213e6dddb8ae6a378d6d09198e08fc9f | [
"MIT"
] | 9,317 | 2016-08-07T19:00:51.000Z | 2022-03-31T21:56:04.000Z | Packs/CommonScripts/Scripts/FirstArrayElement/FirstArrayElement_test.py | diCagri/content | c532c50b213e6dddb8ae6a378d6d09198e08fc9f | [
"MIT"
] | 1,297 | 2016-08-04T13:59:00.000Z | 2022-03-31T23:43:06.000Z | import demistomock as demisto
def test_main(mocker):
from FirstArrayElement import main
mocker.patch.object(demisto, 'args', return_value={
'value': [1, 2, 3]
})
mocker.patch.object(demisto, 'results')
main()
assert demisto.results.call_count == 1
results = demisto.results.call_ar... | 27.305556 | 55 | 0.645982 |
5b1ffe0cae215dc269cfb7ab395758ac2c41a184 | 2,005 | bzl | Python | 3rdparty/openscad/repo.bzl | damienmg/ender3_control_box | e0699f30c838774aa431689b1ce50b049c9f8d47 | [
"Apache-2.0"
] | 3 | 2021-03-04T18:34:30.000Z | 2022-02-23T16:11:57.000Z | 3rdparty/openscad/repo.bzl | damienmg/ender3_control_box | e0699f30c838774aa431689b1ce50b049c9f8d47 | [
"Apache-2.0"
] | null | null | null | 3rdparty/openscad/repo.bzl | damienmg/ender3_control_box | e0699f30c838774aa431689b1ce50b049c9f8d47 | [
"Apache-2.0"
] | 1 | 2020-03-03T04:26:58.000Z | 2020-03-03T04:26:58.000Z | # Copyright 2019 Damien Martin-Guillerez <damien.martin.guillerez@gmail.com>
#
# 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
#
# Unles... | 37.12963 | 98 | 0.661845 |
7d766d9de4339aed5b3ff7a495990f2cfe36b6a2 | 1,322 | py | Python | leetcode-and-lintcode/DFS-BFS/BFS/cheapest_flights_with_k_stops_787_leetcode_1029_lintcode.py | cc13ny/all-in | bc0b01e44e121ea68724da16f25f7e24386c53de | [
"MIT"
] | 1 | 2015-12-16T04:01:03.000Z | 2015-12-16T04:01:03.000Z | leetcode-and-lintcode/DFS-BFS/BFS/cheapest_flights_with_k_stops_787_leetcode_1029_lintcode.py | cc13ny/all-in | bc0b01e44e121ea68724da16f25f7e24386c53de | [
"MIT"
] | 1 | 2016-02-09T06:00:07.000Z | 2016-02-09T07:20:13.000Z | leetcode-and-lintcode/DFS-BFS/BFS/cheapest_flights_with_k_stops_787_leetcode_1029_lintcode.py | cc13ny/all-in | bc0b01e44e121ea68724da16f25f7e24386c53de | [
"MIT"
] | 2 | 2019-06-27T09:07:26.000Z | 2019-07-01T04:40:13.000Z | '''
https://en.wikipedia.org/wiki/Dijkstra%27s_algorithm
https://en.wikipedia.org/wiki/Bellman%E2%80%93Ford_algorithm
https://www.lintcode.com/problem/1029/solution/19171
'''
'''
TLE, the last stop, i.e. desc has to be handled specifically.
'''
class Solution:
def findCheapestPrice(self, n: int, flights: List[Lis... | 25.423077 | 101 | 0.555976 |
81483976779f09625b05e9ce00acb548c6d8cbbc | 3,016 | py | Python | examples/stepper.py | Elecrow-RD/Raspberry-Pi-Starter-Kit | 9adad7bfb403a697119bf80bbc2290bc3832750d | [
"MIT"
] | 1 | 2020-08-11T23:39:23.000Z | 2020-08-11T23:39:23.000Z | examples/stepper.py | Elecrow-RD/Raspberry-Pi-Starter-Kit | 9adad7bfb403a697119bf80bbc2290bc3832750d | [
"MIT"
] | null | null | null | examples/stepper.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 -*-
# Author : Original author ludwigschuster
# Original Author Github: https://github.com/ludwigschuster/RasPi-GPIO-Stepmotor
# http://elecrow.com/
import time
import RPi.GPIO as GPIO
import math
class Stepmotor:
def __init__(self):
# set GPIO mode
GPIO.setmode(GPIO.BCM)
... | 21.855072 | 96 | 0.698276 |
d228a1d9d9ea11adc2e711b86f209c77fba04c8a | 1,515 | py | Python | vb_simulation_pkgs/example_pkgs/pkg_cv_example/scripts/node_eg2_colour_detection.py | ROBODITYA/Eyantra-2021-Vargi-Bots | f1c6a82c46e6e84486a4832b3fbcd02625849447 | [
"MIT"
] | 1 | 2021-07-13T07:05:29.000Z | 2021-07-13T07:05:29.000Z | vb_simulation_pkgs/example_pkgs/pkg_cv_example/scripts/node_eg2_colour_detection.py | TejasPhutane/Eyantra-2021-Vargi-Bots | ab84a1304101850be8c0f69cfe6de70d53c33189 | [
"MIT"
] | 1 | 2021-06-05T07:58:03.000Z | 2021-06-05T07:58:03.000Z | vb_simulation_pkgs/example_pkgs/pkg_cv_example/scripts/node_eg2_colour_detection.py | ROBODITYA/Eyantra-2021-Vargi-Bots | f1c6a82c46e6e84486a4832b3fbcd02625849447 | [
"MIT"
] | null | null | null | #!/usr/bin/env python
import rospy
import cv2
import sys
from std_msgs.msg import String
from sensor_msgs.msg import Image
from cv_bridge import CvBridge, CvBridgeError
import numpy as np
class Camera1:
def __init__(self):
self.bridge = CvBridge()
self.image_sub = rospy.Subscriber("/eyrc/vb/camera_1/image... | 21.338028 | 89 | 0.656766 |
d2305f80cec29ca216e51e240bd318cf10948232 | 2,241 | py | Python | bot/make_map.py | lbellomo/RiCuT | 28c2cb95756607d164d757c508db9f9190754a09 | [
"MIT"
] | null | null | null | bot/make_map.py | lbellomo/RiCuT | 28c2cb95756607d164d757c508db9f9190754a09 | [
"MIT"
] | null | null | null | bot/make_map.py | lbellomo/RiCuT | 28c2cb95756607d164d757c508db9f9190754a09 | [
"MIT"
] | null | null | null | import os
import matplotlib.pyplot as plt
import numpy as np
from matplotlib.patches import Ellipse
from mpl_toolkits.basemap import Basemap
def make_map(lon_e=-32.08, lat_e=-64.53, width_e=0.01, height_e=0.02,
angle_e=30, lon_p=-32.085, lat_p=-64.53, lon_s=-32.083, lat_s=-64.532):
'''
Crea una i... | 29.486842 | 88 | 0.638554 |
96b8ceea4b1a6d491977d901655b2f65e0b84840 | 658 | py | Python | source/pkgsrc/finance/py-eth-hash/patches/patch-setup.py | Scottx86-64/dotfiles-1 | 51004b1e2b032664cce6b553d2052757c286087d | [
"Unlicense"
] | 1 | 2021-11-20T22:46:39.000Z | 2021-11-20T22:46:39.000Z | source/pkgsrc/finance/py-eth-hash/patches/patch-setup.py | Scottx86-64/dotfiles-1 | 51004b1e2b032664cce6b553d2052757c286087d | [
"Unlicense"
] | null | null | null | source/pkgsrc/finance/py-eth-hash/patches/patch-setup.py | Scottx86-64/dotfiles-1 | 51004b1e2b032664cce6b553d2052757c286087d | [
"Unlicense"
] | null | null | null | $NetBSD: patch-setup.py,v 1.1 2021/02/15 14:59:25 mef Exp $
py36 gives following flag:
UnicodeDecodeError: 'ascii' codec can't decode byte 0xe2 in position 2861: ordinal not in range(128)
--- setup.py.orig 2021-01-22 04:52:10.000000000 +0900
+++ setup.py 2021-02-15 23:50:09.430652835 +0900
@@ -1,5 +1,6 @@
#!/usr/bin... | 27.416667 | 100 | 0.648936 |
73ae84c4059207bf3cba4b956e057b61ea6c4f4d | 5,646 | py | Python | sparsify/test.py | yashpatel5400/anonychain | 921804832839f3639477cfc441f138bc2f5ad685 | [
"MIT"
] | 1 | 2018-08-31T07:16:40.000Z | 2018-08-31T07:16:40.000Z | sparsify/test.py | yashpatel5400/anonychain | 921804832839f3639477cfc441f138bc2f5ad685 | [
"MIT"
] | null | null | null | sparsify/test.py | yashpatel5400/anonychain | 921804832839f3639477cfc441f138bc2f5ad685 | [
"MIT"
] | 1 | 2018-07-01T18:03:01.000Z | 2018-07-01T18:03:01.000Z | """
__author__ = Yash Patel
__name__ = spectral.py
__description__ = Spectral sparsification of graphs
"""
import matplotlib
matplotlib.use('Agg')
import matplotlib.pyplot as plt
import networkx as nx
import numpy as np
import time
from sparsify.spectral import SpectralSparsifier
from sparsify.sample ... | 35.509434 | 101 | 0.625221 |
83c2f0d77d4743f514c4ca46440fe97d3338d55c | 2,045 | py | Python | data.py | 15menou/srocket | 7650d25ef03499ce38ae957cd6ce356541f6cf61 | [
"Apache-2.0"
] | null | null | null | data.py | 15menou/srocket | 7650d25ef03499ce38ae957cd6ce356541f6cf61 | [
"Apache-2.0"
] | null | null | null | data.py | 15menou/srocket | 7650d25ef03499ce38ae957cd6ce356541f6cf61 | [
"Apache-2.0"
] | null | null | null | import tkinter as tk
class Aspect:
def_color = 'black'
def_relief = tk.FLAT
def_sticky = tk.N + tk.S + tk.E + tk.W
def_width = 1
window_scale = 0.6
color = dict()
color['bg'] = '#FFFF99'
color['background'] = color['bg']
color['button'] = '#FAFA94'
color['active_button'] = '... | 22.977528 | 82 | 0.593154 |
83d2ee512c03c7a5b242a482f1aeb1655c020bd7 | 583 | py | Python | tools/pythonpkg/tests/fast/pandas/test_partitioned_pandas_scan.py | AldoMyrtaj/duckdb | 3aa4978a2ceab8df25e4b20c388bcd7629de73ed | [
"MIT"
] | 2,816 | 2018-06-26T18:52:52.000Z | 2021-04-06T10:39:15.000Z | tools/pythonpkg/tests/fast/pandas/test_partitioned_pandas_scan.py | AldoMyrtaj/duckdb | 3aa4978a2ceab8df25e4b20c388bcd7629de73ed | [
"MIT"
] | 1,310 | 2021-04-06T16:04:52.000Z | 2022-03-31T13:52:53.000Z | tools/pythonpkg/tests/fast/pandas/test_partitioned_pandas_scan.py | AldoMyrtaj/duckdb | 3aa4978a2ceab8df25e4b20c388bcd7629de73ed | [
"MIT"
] | 270 | 2021-04-09T06:18:28.000Z | 2022-03-31T11:55:37.000Z | import duckdb
import pandas as pd
import numpy
import datetime
import time
class TestPartitionedPandasScan(object):
def test_parallel_pandas(self, duckdb_cursor):
con = duckdb.connect()
df = pd.DataFrame({'i': numpy.arange(10000000)})
con.register('df', df)
seq_results = con.execu... | 27.761905 | 74 | 0.674099 |
f7f98e0f9144d9c194c8264c39056b4374ebb641 | 2,470 | py | Python | Paddle_Industry_Practice_Sample_Library/Football_Action/PaddleVideo/tools/summary.py | linuxonly801/awesome-DeepLearning | b063757fa130c4d56aea5cce2e592610f1e169f9 | [
"Apache-2.0"
] | 883 | 2020-11-12T11:46:46.000Z | 2022-03-31T18:27:10.000Z | tools/summary.py | arkofgalaxy/PaddleVideo | 64251233c83b7eb681061b454da198a9082309a6 | [
"Apache-2.0"
] | 233 | 2020-12-09T06:04:59.000Z | 2022-03-28T08:16:51.000Z | tools/summary.py | arkofgalaxy/PaddleVideo | 64251233c83b7eb681061b454da198a9082309a6 | [
"Apache-2.0"
] | 225 | 2020-11-13T06:21:55.000Z | 2022-03-31T05:36:11.000Z | # Copyright (c) 2020 PaddlePaddle Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by appli... | 30.121951 | 110 | 0.675304 |
79162f67e0939416174977744f675483e4ed040a | 204 | py | Python | exercises/zh/solution_02_09.py | tuanducdesign/spacy-course | f8d092c5fa2997fccb3f367d174dce8667932b3d | [
"MIT"
] | 2 | 2020-07-07T01:46:37.000Z | 2021-04-20T03:19:43.000Z | exercises/zh/solution_02_09.py | tuanducdesign/spacy-course | f8d092c5fa2997fccb3f367d174dce8667932b3d | [
"MIT"
] | null | null | null | exercises/zh/solution_02_09.py | tuanducdesign/spacy-course | f8d092c5fa2997fccb3f367d174dce8667932b3d | [
"MIT"
] | null | null | null | import spacy
# 读取zh_core_web_md流程
nlp = spacy.load("zh_core_web_md")
# 处理文本
doc = nlp("两只老虎跑得快")
for token in doc:
print(token.text)
# 获取词符"老虎"的向量
laohu_vector = doc[2].vector
print(laohu_vector)
| 13.6 | 34 | 0.720588 |
f7095e1387882767355bd3fa0991e66b2f0792c1 | 433 | py | Python | INBa/2014/MorenkoAA/MorenkoAA_1_14.py | YukkaSarasti/pythonintask | eadf4245abb65f4400a3bae30a4256b4658e009c | [
"Apache-2.0"
] | null | null | null | INBa/2014/MorenkoAA/MorenkoAA_1_14.py | YukkaSarasti/pythonintask | eadf4245abb65f4400a3bae30a4256b4658e009c | [
"Apache-2.0"
] | null | null | null | INBa/2014/MorenkoAA/MorenkoAA_1_14.py | YukkaSarasti/pythonintask | eadf4245abb65f4400a3bae30a4256b4658e009c | [
"Apache-2.0"
] | null | null | null | # Задача 1, Вариант 14
# Напишите программу, которая будет сообщать род деятельности и псевдоним под которым скрывается Мари Фрасуа Аруэ. После вывода информации программа должна дожидаться пока пользователь нажмет Enter для выхода.
# Моренко А.А.
# 07.03.2016
print("Мари Франсуа Аруэ, – великий французский п... | 54.125 | 210 | 0.78291 |
e38c53ef464e9497776ec4b921183fe6741b1b76 | 1,049 | py | Python | spo/spo/doctype/telefon_triage/telefon_triage.py | libracore/spo | c6617a4624d683e27ee3fde745313c30504f3fd1 | [
"MIT"
] | null | null | null | spo/spo/doctype/telefon_triage/telefon_triage.py | libracore/spo | c6617a4624d683e27ee3fde745313c30504f3fd1 | [
"MIT"
] | 6 | 2019-08-23T18:36:26.000Z | 2019-11-12T13:12:12.000Z | spo/spo/doctype/telefon_triage/telefon_triage.py | libracore/spo | c6617a4624d683e27ee3fde745313c30504f3fd1 | [
"MIT"
] | 1 | 2021-08-14T22:22:43.000Z | 2021-08-14T22:22:43.000Z | # -*- coding: utf-8 -*-
# Copyright (c) 2019, libracore and contributors
# For license information, please see license.txt
from __future__ import unicode_literals
import frappe
from frappe.model.document import Document
from frappe.utils.data import today
class TelefonTriage(Document):
pass
@frappe.whitelist()
def ... | 20.568627 | 83 | 0.722593 |
5439c1146b2efc5526d965b3ce5acb1c9cab7e7d | 647 | py | Python | Problems/Dynamic Programming/Easy/IsSubsequence/is_subsequence.py | dolong2110/Algorithm-By-Problems-Python | 31ecc7367aaabdd2b0ac0af7f63ca5796d70c730 | [
"MIT"
] | 1 | 2021-08-16T14:52:05.000Z | 2021-08-16T14:52:05.000Z | Problems/Dynamic Programming/Easy/IsSubsequence/is_subsequence.py | dolong2110/Algorithm-By-Problems-Python | 31ecc7367aaabdd2b0ac0af7f63ca5796d70c730 | [
"MIT"
] | null | null | null | Problems/Dynamic Programming/Easy/IsSubsequence/is_subsequence.py | dolong2110/Algorithm-By-Problems-Python | 31ecc7367aaabdd2b0ac0af7f63ca5796d70c730 | [
"MIT"
] | null | null | null | from itertools import product
def is_subsequence_pointers(s: str, t: str) -> bool:
pointer_s, n = 0, len(s)
if n == 0:
return True
for i in t:
if pointer_s == n:
return True
if i == s[pointer_s]:
pointer_s += 1
return n == pointer_s
def is_subsequence... | 22.310345 | 52 | 0.459042 |
b732743033bb698451eb9367d5fe39d8b516a602 | 1,623 | py | Python | ppyt/indicators/closerecenthighlow_indicators.py | yusukemurayama/ppytrading | 9804d0de870d77bf8a1c847736a636b1342d4600 | [
"MIT"
] | 4 | 2016-08-16T07:47:15.000Z | 2017-12-11T10:08:47.000Z | ppyt/indicators/closerecenthighlow_indicators.py | yusukemurayama/ppytrading | 9804d0de870d77bf8a1c847736a636b1342d4600 | [
"MIT"
] | null | null | null | ppyt/indicators/closerecenthighlow_indicators.py | yusukemurayama/ppytrading | 9804d0de870d77bf8a1c847736a636b1342d4600 | [
"MIT"
] | 2 | 2018-06-15T04:43:15.000Z | 2020-05-02T07:47:15.000Z | # coding: utf-8
import logging
from ppyt import const
from ppyt.indicators import IndicatorBase
from ppyt.indicators.basic_indicators import (
PriceIndicator, RecentHighPriceIndicator, RecentLowPriceIndicator
)
logger = logging.getLogger(__name__)
class CloseGtRecentHighIndicator(IndicatorBase):
"""終値が直近高値より... | 30.055556 | 75 | 0.614295 |
4d79fc40c504576d800c2b0d76af871d48381ea7 | 1,558 | py | Python | Welp/util/flask/route_extension_methods.py | kkysen/Soft-Dev | b19881b1fcc9c7daefc817e6b975ff6bce545d81 | [
"Apache-2.0"
] | null | null | null | Welp/util/flask/route_extension_methods.py | kkysen/Soft-Dev | b19881b1fcc9c7daefc817e6b975ff6bce545d81 | [
"Apache-2.0"
] | null | null | null | Welp/util/flask/route_extension_methods.py | kkysen/Soft-Dev | b19881b1fcc9c7daefc817e6b975ff6bce545d81 | [
"Apache-2.0"
] | null | null | null | from typing import Any, Callable, Dict, List
from flask import Flask, Response, redirect, url_for
from util.oop import override
from template_context import context
from util.flask.flask_utils_types import Route
from util.types import Function
RouteExtension = Function[Route, Any]
_route_extensions = [] #... | 27.333333 | 81 | 0.684211 |
151bbc26421a1d80fe7f9bce45f6da8309084171 | 4,753 | py | Python | examples/text_to_sql/RAT-SQL/text2sql/models/relational_encoder.py | mukaiu/PaddleNLP | 0315365dbafa6e3b1c7147121ba85e05884125a5 | [
"Apache-2.0"
] | null | null | null | examples/text_to_sql/RAT-SQL/text2sql/models/relational_encoder.py | mukaiu/PaddleNLP | 0315365dbafa6e3b1c7147121ba85e05884125a5 | [
"Apache-2.0"
] | null | null | null | examples/text_to_sql/RAT-SQL/text2sql/models/relational_encoder.py | mukaiu/PaddleNLP | 0315365dbafa6e3b1c7147121ba85e05884125a5 | [
"Apache-2.0"
] | null | null | null | # Copyright (c) 2021 PaddlePaddle Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by app... | 35.207407 | 79 | 0.575216 |
129e64bd35e8b2c0c0a4d7d6bbebd3930cc141c2 | 38 | py | Python | src/tango_sdp_master/test/__init__.py | rtobar/sdp-prototype | 9f1527b884bf80daa509a7fe3722160c77260f4f | [
"BSD-3-Clause"
] | 2 | 2019-07-15T09:49:34.000Z | 2019-10-14T16:04:17.000Z | src/tango_sdp_master/test/__init__.py | rtobar/sdp-prototype | 9f1527b884bf80daa509a7fe3722160c77260f4f | [
"BSD-3-Clause"
] | 17 | 2019-07-15T14:51:50.000Z | 2021-06-02T00:29:43.000Z | src/tango_sdp_master/test/__init__.py | ska-telescope/sdp-configuration-prototype | 8c6cbda04a83b0e16987019406ed6ec7e1058a31 | [
"BSD-3-Clause"
] | 1 | 2019-10-10T08:16:48.000Z | 2019-10-10T08:16:48.000Z | """Tests of the SDP Master device."""
| 19 | 37 | 0.657895 |
4245bca2e979d39b3df446a0c403a3c56b4699d9 | 764 | py | Python | referenceaudioanalyzer/check_new.py | thanasisttgr/AutoEq | 863436c40c8d4abf6874cc301bc1c7d8e8c5303c | [
"MIT"
] | 1 | 2020-07-17T03:48:21.000Z | 2020-07-17T03:48:21.000Z | referenceaudioanalyzer/check_new.py | hyshuma/AutoEq | 4c3ad3478d6b74fc794bd7d973b330d38da338b9 | [
"MIT"
] | null | null | null | referenceaudioanalyzer/check_new.py | hyshuma/AutoEq | 4c3ad3478d6b74fc794bd7d973b330d38da338b9 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
import os
import sys
import json
sys.path.insert(1, os.path.realpath(os.path.join(sys.path[0], os.pardir)))
DIR_PATH = os.path.abspath(os.path.join(__file__, os.pardir))
def main():
with open(os.path.join(DIR_PATH, 'names.txt'), 'r') as f:
old = f.read().split('\n')
with open... | 25.466667 | 74 | 0.598168 |
c40cbf4993d678af44b3f1d1019dcbb62984b8aa | 1,994 | py | Python | deprecated/fleet_x/examples/resnet_single.py | hutuxian/FleetX | 843c7aa33f5a14680becf058a3aaf0327eefafd4 | [
"Apache-2.0"
] | 170 | 2020-08-12T12:07:01.000Z | 2022-03-07T02:38:26.000Z | deprecated/fleet_x/examples/resnet_single.py | hutuxian/FleetX | 843c7aa33f5a14680becf058a3aaf0327eefafd4 | [
"Apache-2.0"
] | 195 | 2020-08-13T03:22:15.000Z | 2022-03-30T07:40:25.000Z | deprecated/fleet_x/examples/resnet_single.py | hutuxian/FleetX | 843c7aa33f5a14680becf058a3aaf0327eefafd4 | [
"Apache-2.0"
] | 67 | 2020-08-14T02:07:46.000Z | 2022-03-28T10:05:33.000Z | # Copyright (c) 2020 PaddlePaddle Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by appli... | 34.982456 | 88 | 0.724674 |
674b0856f282adb3b27794ef80c74652d30cb68e | 1,934 | py | Python | listings/chapter10/logistic-regression-gradient-descent.py | rh0-me/ITHandbuch10 | 1582d6317e11cc958a14e157440dccf94d44583b | [
"Apache-2.0"
] | 6 | 2021-08-04T19:42:53.000Z | 2022-01-17T14:24:45.000Z | listings/chapter10/logistic-regression-gradient-descent.py | rh0-me/ITHandbuch10 | 1582d6317e11cc958a14e157440dccf94d44583b | [
"Apache-2.0"
] | 1 | 2021-08-30T06:32:08.000Z | 2021-08-30T06:42:46.000Z | listings/chapter10/logistic-regression-gradient-descent.py | rh0-me/ITHandbuch10 | 1582d6317e11cc958a14e157440dccf94d44583b | [
"Apache-2.0"
] | 1 | 2022-02-17T10:32:17.000Z | 2022-02-17T10:32:17.000Z | import math
import csv
import numpy as np
from random import shuffle
from sys import argv
filename = 'setosa-versicolor.csv'
species0 = 'Iris-setosa'
if len(argv) > 1 and argv[1] == '2':
filename = 'versicolor-virginica.csv'
species0 = 'Iris-versicolor'
# Daten einlesen
with open(filename, 'r') as data_file:
... | 27.628571 | 73 | 0.619959 |
c0414eaaca69e35a77bf5250668a8c8c4cc84203 | 1,935 | py | Python | Lexer_Token.py | Peetee06/compilerbau_ws2122_hsbochum | 9b71e33f7385ba946ce7f4d375b7ca68b21dd97f | [
"MIT"
] | null | null | null | Lexer_Token.py | Peetee06/compilerbau_ws2122_hsbochum | 9b71e33f7385ba946ce7f4d375b7ca68b21dd97f | [
"MIT"
] | null | null | null | Lexer_Token.py | Peetee06/compilerbau_ws2122_hsbochum | 9b71e33f7385ba946ce7f4d375b7ca68b21dd97f | [
"MIT"
] | 2 | 2022-03-13T18:48:24.000Z | 2022-03-20T16:45:19.000Z | import string
class Token:
DIGITS = '0123456789'
LETTERS = string.ascii_letters
LETTERS_DIGITS = LETTERS + DIGITS
TOKEN_TYPES = [
"INT",
"FLOAT",
"STRING",
"IDENTIFIER", # char from LETTERS
"KEYWORD",
"ADD", # +
"SUB", # -
"MUL", # *
... | 23.313253 | 87 | 0.433075 |
e15e26f1bfdfa97a4be2b4f583942b1fd47e17a3 | 7,097 | py | Python | scripts/archiv-full-check.py | evildrummer/1337-observer | 621eb16711d9f70a59fb5524fc990dcab1004b14 | [
"MIT"
] | 1 | 2022-01-28T22:29:44.000Z | 2022-01-28T22:29:44.000Z | scripts/archiv-full-check.py | evildrummer/1337-observer | 621eb16711d9f70a59fb5524fc990dcab1004b14 | [
"MIT"
] | null | null | null | scripts/archiv-full-check.py | evildrummer/1337-observer | 621eb16711d9f70a59fb5524fc990dcab1004b14 | [
"MIT"
] | 1 | 2022-01-28T21:10:41.000Z | 2022-01-28T21:10:41.000Z | import os
import argparse
def main(input_file, folder, batch):
if input_file != "no":
# use input file
with open(input_file, "r") as myfile:
content = myfile.readlines()
for line in content:
start_wizard(line.strip(), folder, batch)
else:
# ask f... | 34.619512 | 124 | 0.418628 |
36c145e8746d25ba0206018a86b90cc552b35aa5 | 303 | py | Python | vkapp/vk/apps.py | ParuninPavel/lenta4_hack | 6d3340201deadf5757e37ddd7cf5580b928d7bda | [
"MIT"
] | 1 | 2017-11-23T13:33:13.000Z | 2017-11-23T13:33:13.000Z | vkapp/vk/apps.py | ParuninPavel/lenta4_hack | 6d3340201deadf5757e37ddd7cf5580b928d7bda | [
"MIT"
] | null | null | null | vkapp/vk/apps.py | ParuninPavel/lenta4_hack | 6d3340201deadf5757e37ddd7cf5580b928d7bda | [
"MIT"
] | null | null | null | from __future__ import unicode_literals
from django.apps import AppConfig
class VkConfig(AppConfig):
name = 'vkapp.vk'
verbose_name = "Vk"
def ready(self):
"""Override this to put in:
Users system checks
Users signal registration
"""
pass
| 18.9375 | 39 | 0.617162 |
3d1b34b0e0226fce6e1055efdfd1bf94c591c1af | 3,992 | py | Python | Co-Simulation/Sumo/carla_veins_data_server.py | uruzahe/carla | 940c2ab23cce1eda1ef66de35f66b42d40865fb1 | [
"MIT"
] | null | null | null | Co-Simulation/Sumo/carla_veins_data_server.py | uruzahe/carla | 940c2ab23cce1eda1ef66de35f66b42d40865fb1 | [
"MIT"
] | null | null | null | Co-Simulation/Sumo/carla_veins_data_server.py | uruzahe/carla | 940c2ab23cce1eda1ef66de35f66b42d40865fb1 | [
"MIT"
] | null | null | null | import argparse
import logging
import threading
import socket
import socketserver
import sys
import json
from copy import deepcopy
PACKETS = {}
SENSOR_DATA = {}
class ThreadedTCPRequestHandler(socketserver.BaseRequestHandler):
def handle(self):
try:
received_data = json.loads(str(self.reque... | 29.352941 | 121 | 0.623998 |
18243b5e21ff2f4499d14243267dd6a3070e643e | 266 | py | Python | workaround/script.py | DockerComposeFiles/Arm_2 | b5888fe62edd6450da4139de02e145513a078697 | [
"MIT"
] | null | null | null | workaround/script.py | DockerComposeFiles/Arm_2 | b5888fe62edd6450da4139de02e145513a078697 | [
"MIT"
] | null | null | null | workaround/script.py | DockerComposeFiles/Arm_2 | b5888fe62edd6450da4139de02e145513a078697 | [
"MIT"
] | null | null | null | from time import sleep
from picamera import PiCamera
camera = PiCamera()
camera.resolution = (1024, 768)
camera.start_preview()
sleep(2)
i = 0
while i < 10000:
camera.capture("/pictures/output" + i + ".jpg")
print(i + "picture saved")
sleep(60)
exit()
| 17.733333 | 51 | 0.676692 |
62c7a2e58eafe8fd89230cc83b0e0db619e032ae | 27,158 | py | Python | Contrib-Inspur/openbmc/poky/meta/lib/oe/buildhistory_analysis.py | opencomputeproject/Rack-Manager | e1a61d3eeeba0ff655fe9c1301e8b510d9b2122a | [
"MIT"
] | 5 | 2019-11-11T07:57:26.000Z | 2022-03-28T08:26:53.000Z | Contrib-Inspur/openbmc/poky/meta/lib/oe/buildhistory_analysis.py | opencomputeproject/Rack-Manager | e1a61d3eeeba0ff655fe9c1301e8b510d9b2122a | [
"MIT"
] | 3 | 2019-09-05T21:47:07.000Z | 2019-09-17T18:10:45.000Z | Contrib-Inspur/openbmc/poky/meta/lib/oe/buildhistory_analysis.py | opencomputeproject/Rack-Manager | e1a61d3eeeba0ff655fe9c1301e8b510d9b2122a | [
"MIT"
] | 11 | 2019-07-20T00:16:32.000Z | 2022-01-11T14:17:48.000Z | # Report significant differences in the buildhistory repository since a specific revision
#
# Copyright (C) 2012-2013, 2016-2017 Intel Corporation
# Author: Paul Eggleton <paul.eggleton@linux.intel.com>
#
# SPDX-License-Identifier: GPL-2.0-only
#
# Note: requires GitPython 0.3.1+
#
# You can use this from the command l... | 41.781538 | 253 | 0.536122 |
3daa2d4dbda88a70773f43df9d4395c993ce3c6a | 2,221 | py | Python | test/test_npu/test_sum.py | Ascend/pytorch | 39849cf72dafe8d2fb68bd1679d8fd54ad60fcfc | [
"BSD-3-Clause"
] | 1 | 2021-12-02T03:07:35.000Z | 2021-12-02T03:07:35.000Z | test/test_npu/test_sum.py | Ascend/pytorch | 39849cf72dafe8d2fb68bd1679d8fd54ad60fcfc | [
"BSD-3-Clause"
] | 1 | 2021-11-12T07:23:03.000Z | 2021-11-12T08:28:13.000Z | test/test_npu/test_sum.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... | 35.822581 | 84 | 0.67267 |
4943e32c823c1cdec6469e2d91ceec880bea1a7d | 4,161 | py | Python | research/cv/DnCNN/eval.py | leelige/mindspore | 5199e05ba3888963473f2b07da3f7bca5b9ef6dc | [
"Apache-2.0"
] | 77 | 2021-10-15T08:32:37.000Z | 2022-03-30T13:09:11.000Z | research/cv/DnCNN/eval.py | leelige/mindspore | 5199e05ba3888963473f2b07da3f7bca5b9ef6dc | [
"Apache-2.0"
] | 3 | 2021-10-30T14:44:57.000Z | 2022-02-14T06:57:57.000Z | research/cv/DnCNN/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.459184 | 126 | 0.641192 |
49638cf9b20354d363364300d6087b19bd68628a | 713 | py | Python | day30/exception_exercise.py | nurmatthias/100DaysOfCode | 22002e4b31d13e6b52e6b9222d2e91c2070c5744 | [
"Apache-2.0"
] | null | null | null | day30/exception_exercise.py | nurmatthias/100DaysOfCode | 22002e4b31d13e6b52e6b9222d2e91c2070c5744 | [
"Apache-2.0"
] | null | null | null | day30/exception_exercise.py | nurmatthias/100DaysOfCode | 22002e4b31d13e6b52e6b9222d2e91c2070c5744 | [
"Apache-2.0"
] | null | null | null | # Exercise 1
fruits = ["Apple", "Pear", "Orange"]
#TODO: Catch the exception and make sure the code runs without crashing.
def make_pie(index):
try:
fruit = fruits[index]
except IndexError:
fruit = "Fruit"
print(fruit + " pie")
make_pie(4)
# Exercise 2
facebook_posts = [
{'Likes': 21... | 20.371429 | 72 | 0.586255 |
497da0602e3a6eabad3457267fad241333369964 | 549 | py | Python | frappe-bench/apps/erpnext/erpnext/patches/v8_5/update_existing_data_in_project_type.py | Semicheche/foa_frappe_docker | a186b65d5e807dd4caf049e8aeb3620a799c1225 | [
"MIT"
] | 1 | 2021-04-29T14:55:29.000Z | 2021-04-29T14:55:29.000Z | frappe-bench/apps/erpnext/erpnext/patches/v8_5/update_existing_data_in_project_type.py | Semicheche/foa_frappe_docker | a186b65d5e807dd4caf049e8aeb3620a799c1225 | [
"MIT"
] | null | null | null | frappe-bench/apps/erpnext/erpnext/patches/v8_5/update_existing_data_in_project_type.py | Semicheche/foa_frappe_docker | a186b65d5e807dd4caf049e8aeb3620a799c1225 | [
"MIT"
] | 1 | 2021-04-29T14:39:01.000Z | 2021-04-29T14:39:01.000Z | # Copyright (c) 2017, Frappe and Contributors
# License: GNU General Public License v3. See license.txt
from __future__ import unicode_literals
import frappe
def execute():
frappe.reload_doc("projects", "doctype", "project_type")
frappe.reload_doc("projects", "doctype", "project")
project_types = ["Internal", "Ex... | 28.894737 | 57 | 0.724954 |
621ee6e860b432dd56e41ac1ac72beca9bf5892c | 942 | py | Python | reports/sep/code/constraint_detection.py | klawr/deepmech | 61de238f1d4b1b867ec1d5f4e4af2a3b25a5abff | [
"MIT"
] | 1 | 2020-04-17T12:27:06.000Z | 2020-04-17T12:27:06.000Z | reports/sep/code/constraint_detection.py | klawr/deepmech | 61de238f1d4b1b867ec1d5f4e4af2a3b25a5abff | [
"MIT"
] | 1 | 2022-02-27T13:13:17.000Z | 2022-02-27T13:13:17.000Z | reports/sep/code/constraint_detection.py | klawr/deepmech | 61de238f1d4b1b867ec1d5f4e4af2a3b25a5abff | [
"MIT"
] | null | null | null |
"""
Idea 1
The input is an image and a tensor of the detected nodes with their respective
coordinates (resulting in a (b x n x 2) shaped tensor).
We do not care for the detected class or size of the object.
The number of possible connections is c = (n x (n - 1)) / 2:
Each node can be connected to each other one (n ... | 33.642857 | 79 | 0.667728 |
f325ea04158220ba6d41998a810a80b29c70eb92 | 9,876 | py | Python | Dockerfiles/gedlab-khmer-filter-abund/pymodules/python2.7/lib/python/misopy/cluster_utils.py | poojavade/Genomics_Docker | 829b5094bba18bbe03ae97daf925fee40a8476e8 | [
"Apache-2.0"
] | 1 | 2019-07-29T02:53:51.000Z | 2019-07-29T02:53:51.000Z | Dockerfiles/gedlab-khmer-filter-abund/pymodules/python2.7/lib/python/misopy/cluster_utils.py | poojavade/Genomics_Docker | 829b5094bba18bbe03ae97daf925fee40a8476e8 | [
"Apache-2.0"
] | 1 | 2021-09-11T14:30:32.000Z | 2021-09-11T14:30:32.000Z | Dockerfiles/gedlab-khmer-filter-abund/pymodules/python2.7/lib/python/misopy/cluster_utils.py | poojavade/Genomics_Docker | 829b5094bba18bbe03ae97daf925fee40a8476e8 | [
"Apache-2.0"
] | 2 | 2016-12-19T02:27:46.000Z | 2019-07-29T02:53:54.000Z | ##
## Utilities for running scripts on cluster
##
import os
import time
import string
import subprocess
import misopy
import misopy.settings as settings
import misopy.misc_utils as misc_utils
from settings import Settings, load_settings
def write_cluster_preface(file_handle):
module_preface = \
"""
module add num... | 32.380328 | 76 | 0.545565 |
b88e94d8d3bd5872665523764e93aaabc868b8c6 | 2,864 | py | Python | research/nlp/seq2seq/src/seq2seq_model/bleu_calculate.py | leelige/mindspore | 5199e05ba3888963473f2b07da3f7bca5b9ef6dc | [
"Apache-2.0"
] | 77 | 2021-10-15T08:32:37.000Z | 2022-03-30T13:09:11.000Z | research/nlp/seq2seq/src/seq2seq_model/bleu_calculate.py | leelige/mindspore | 5199e05ba3888963473f2b07da3f7bca5b9ef6dc | [
"Apache-2.0"
] | 3 | 2021-10-30T14:44:57.000Z | 2022-02-14T06:57:57.000Z | research/nlp/seq2seq/src/seq2seq_model/bleu_calculate.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... | 30.468085 | 78 | 0.668645 |
b8c3c2bdf199ac8280abb85a21adf0b3e5be3143 | 3,779 | py | Python | doc/for_dev/scikit-image/future/_greyreconstruct.py | fluiddyn/transonic | a460e9f6d1139f79b668cb3306d1e8a7e190b72d | [
"BSD-3-Clause"
] | 88 | 2019-01-08T16:39:08.000Z | 2022-02-06T14:19:23.000Z | doc/for_dev/scikit-image/future/_greyreconstruct.py | fluiddyn/transonic | a460e9f6d1139f79b668cb3306d1e8a7e190b72d | [
"BSD-3-Clause"
] | 13 | 2019-06-20T15:53:10.000Z | 2021-02-09T11:03:29.000Z | doc/for_dev/scikit-image/future/_greyreconstruct.py | fluiddyn/transonic | a460e9f6d1139f79b668cb3306d1e8a7e190b72d | [
"BSD-3-Clause"
] | 1 | 2019-11-05T03:03:14.000Z | 2019-11-05T03:03:14.000Z | """
`reconstruction_loop` originally part of CellProfiler,
code licensed under both GPL and BSD licenses.
Website: http://www.cellprofiler.org
Copyright (c) 2003-2009 Massachusetts Institute of Technology
Copyright (c) 2009-2011 Broad Institute
All rights reserved.
Original author: Lee Kamentsky
"""
import numpy as n... | 37.79 | 78 | 0.588251 |
b29222877721dedc05b17ec81a5c5bbe958c5557 | 786 | py | Python | leetcode/072-Edit-Distance/EditDistance.py | cc13ny/all-in | bc0b01e44e121ea68724da16f25f7e24386c53de | [
"MIT"
] | 1 | 2015-12-16T04:01:03.000Z | 2015-12-16T04:01:03.000Z | leetcode/072-Edit-Distance/EditDistance.py | cc13ny/all-in | bc0b01e44e121ea68724da16f25f7e24386c53de | [
"MIT"
] | 1 | 2016-02-09T06:00:07.000Z | 2016-02-09T07:20:13.000Z | leetcode/072-Edit-Distance/EditDistance.py | cc13ny/all-in | bc0b01e44e121ea68724da16f25f7e24386c53de | [
"MIT"
] | 2 | 2019-06-27T09:07:26.000Z | 2019-07-01T04:40:13.000Z | class Solution(object):
def minDistance(self, word1, word2):
"""
:type word1: str
:type word2: str
:rtype: int
"""
n1 = len(word1) + 1
n2 = len(word2) + 1
dp = [[0 for j in xrange(n2)] for i in xrange(n1)]
for j in xrange(1, n2):
... | 26.2 | 58 | 0.380407 |
a2513552054309f08fcf6eabcaaca689805ff698 | 10,093 | py | Python | research/nlp/hypertext/src/dataset.py | leelige/mindspore | 5199e05ba3888963473f2b07da3f7bca5b9ef6dc | [
"Apache-2.0"
] | 77 | 2021-10-15T08:32:37.000Z | 2022-03-30T13:09:11.000Z | research/nlp/hypertext/src/dataset.py | leelige/mindspore | 5199e05ba3888963473f2b07da3f7bca5b9ef6dc | [
"Apache-2.0"
] | 3 | 2021-10-30T14:44:57.000Z | 2022-02-14T06:57:57.000Z | research/nlp/hypertext/src/dataset.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... | 32.246006 | 124 | 0.606955 |
0c3649111ee2b3820ea3127d45cad98774311744 | 537 | py | Python | day26/exercise_dictionary.py | nurmatthias/100DaysOfCode | 22002e4b31d13e6b52e6b9222d2e91c2070c5744 | [
"Apache-2.0"
] | null | null | null | day26/exercise_dictionary.py | nurmatthias/100DaysOfCode | 22002e4b31d13e6b52e6b9222d2e91c2070c5744 | [
"Apache-2.0"
] | null | null | null | day26/exercise_dictionary.py | nurmatthias/100DaysOfCode | 22002e4b31d13e6b52e6b9222d2e91c2070c5744 | [
"Apache-2.0"
] | null | null | null | #Exercise 1
sentence = "What is the Airspeed Velocity of an Unladen Swallow?"
# Don't change code above 👆
# Write your code below:
result = {
word:len(word) for word in sentence.split()
}
print(result)
#Exercise 2
weather_c = {
"Monday": 12,
"Tuesday": 14,
"Wednesday": 15,
"Thursday": 14,
... | 15.342857 | 68 | 0.614525 |
a780bd92c7da1626253c890cfe2527bb8b945c67 | 422 | bzl | Python | visibility.bzl | wcalandro/kythe | 64969a853711c228b4e3cfc3ce91b84b5bb853d7 | [
"Apache-2.0"
] | 1,168 | 2015-01-27T10:19:25.000Z | 2018-10-30T15:07:11.000Z | visibility.bzl | wcalandro/kythe | 64969a853711c228b4e3cfc3ce91b84b5bb853d7 | [
"Apache-2.0"
] | 2,811 | 2015-01-29T16:19:04.000Z | 2018-11-01T19:48:06.000Z | visibility.bzl | wcalandro/kythe | 64969a853711c228b4e3cfc3ce91b84b5bb853d7 | [
"Apache-2.0"
] | 165 | 2015-01-27T19:06:27.000Z | 2018-10-30T17:31:10.000Z | # This file exists so that visibility rules can be relaxed for open source
# clients of kythe, but more restrictive for use within google. Targets that are
# allowed to be used by kythe clients should be marked as "//visibility:public",
# but separate aliases are used so they can map to different package groups
# withi... | 42.2 | 80 | 0.781991 |
a78cc54e7c37dea5566f88e54ad7f676258a21d8 | 1,238 | py | Python | tests/onegov/gis/test_integration.py | politbuero-kampagnen/onegov-cloud | 20148bf321b71f617b64376fe7249b2b9b9c4aa9 | [
"MIT"
] | null | null | null | tests/onegov/gis/test_integration.py | politbuero-kampagnen/onegov-cloud | 20148bf321b71f617b64376fe7249b2b9b9c4aa9 | [
"MIT"
] | null | null | null | tests/onegov/gis/test_integration.py | politbuero-kampagnen/onegov-cloud | 20148bf321b71f617b64376fe7249b2b9b9c4aa9 | [
"MIT"
] | null | null | null | import morepath
import pytest
from onegov.core import Framework
from onegov.core import filters # noqa -> registers webasset filters
from onegov.core.utils import scan_morepath_modules
from onegov.gis import MapboxApp
from webtest import TestApp as Client
def test_no_secret_keys(temporary_directory):
class App... | 23.358491 | 78 | 0.701939 |
3bc550736c3804b5330b2fd8fd45e1f26b89038a | 750 | py | Python | setup.py | oyahiroki/ginzaserver | 271b57164775a19df6a911610ed0d2ff3f3901f6 | [
"Apache-2.0"
] | null | null | null | setup.py | oyahiroki/ginzaserver | 271b57164775a19df6a911610ed0d2ff3f3901f6 | [
"Apache-2.0"
] | null | null | null | setup.py | oyahiroki/ginzaserver | 271b57164775a19df6a911610ed0d2ff3f3901f6 | [
"Apache-2.0"
] | null | null | null | import setuptools
with open("README.md", "r") as fh:
long_description = fh.read()
setuptools.setup(
name="ginzaserver",
version="1.0.0.0",
author="Hiroki Oya",
author_email="oyahiroki@gmail.com",
description="HTTP Server for GiNZA - Japanese NLP Library",
long_description=long_description,... | 28.846154 | 73 | 0.666667 |
02851c984e65739597be8465c0edee868fbbd435 | 1,230 | py | Python | Python/zzz_training_challenge/UdemyPythonPro/Chapter5_Functions/Functions/command_line_arguments3.py | Kreijeck/learning | eaffee08e61f2a34e01eb8f9f04519aac633f48c | [
"MIT"
] | null | null | null | Python/zzz_training_challenge/UdemyPythonPro/Chapter5_Functions/Functions/command_line_arguments3.py | Kreijeck/learning | eaffee08e61f2a34e01eb8f9f04519aac633f48c | [
"MIT"
] | null | null | null | Python/zzz_training_challenge/UdemyPythonPro/Chapter5_Functions/Functions/command_line_arguments3.py | Kreijeck/learning | eaffee08e61f2a34e01eb8f9f04519aac633f48c | [
"MIT"
] | null | null | null | import argparse
# Castet Argumente zu passendem Typ!
def check_for_boolean_value(val):
if isinstance(val, bool):
return val
if val == "True":
return True
else:
return False
def main():
# name: --age : für commandline
# dest: my_age: speichert er als my age ab
# parser.a... | 34.166667 | 95 | 0.64065 |
5a5f0f6f9f7a0848d4efcbff588ac1c6a72fcee9 | 788 | py | Python | examples/nowcoder/SQL7/models.py | zhengtong0898/django-decode | 69680853a4a5b07f6a9c4b65c7d86b2d401a92b1 | [
"MIT"
] | 5 | 2020-07-14T07:48:10.000Z | 2021-12-20T21:20:10.000Z | examples/nowcoder/SQL7/models.py | zhengtong0898/django-decode | 69680853a4a5b07f6a9c4b65c7d86b2d401a92b1 | [
"MIT"
] | 7 | 2021-03-26T03:13:38.000Z | 2022-03-12T00:42:03.000Z | examples/nowcoder/SQL7/models.py | zhengtong0898/django-decode | 69680853a4a5b07f6a9c4b65c7d86b2d401a92b1 | [
"MIT"
] | 1 | 2021-02-16T07:04:25.000Z | 2021-02-16T07:04:25.000Z | from django.db import models
# CREATE TABLE `salaries` (
# `emp_no` int(11) NOT NULL,
# `salary` int(11) NOT NULL,
# `from_date` date NOT NULL,
# `to_date` date NOT NULL,
# PRIMARY KEY (`emp_no`,`from_date`) # Django 无法简历复合主键, 由于查询需要用到 emp_no,
# ); # 而 emp... | 39.4 | 114 | 0.658629 |
f0493c5f71f19daee804cb59c6349512c02c824a | 17,599 | py | Python | src/test/tests/databases/silo.py | visit-dav/vis | c08bc6e538ecd7d30ddc6399ec3022b9e062127e | [
"BSD-3-Clause"
] | 226 | 2018-12-29T01:13:49.000Z | 2022-03-30T19:16:31.000Z | src/test/tests/databases/silo.py | visit-dav/vis | c08bc6e538ecd7d30ddc6399ec3022b9e062127e | [
"BSD-3-Clause"
] | 5,100 | 2019-01-14T18:19:25.000Z | 2022-03-31T23:08:36.000Z | src/test/tests/databases/silo.py | visit-dav/vis | c08bc6e538ecd7d30ddc6399ec3022b9e062127e | [
"BSD-3-Clause"
] | 84 | 2019-01-24T17:41:50.000Z | 2022-03-10T10:01:46.000Z | # ----------------------------------------------------------------------------
# CLASSES: nightly
#
# Test Case: silo.py
#
# Tests: multi-part silo files
# operators - slice
# operators - onion peel
# selection - by domains
#
# Programmer: Mark C. Miller
# Date: ... | 25.35879 | 103 | 0.710154 |
652074d21a3e7c806a08129f5a7861648b376804 | 5,042 | py | Python | weibo/spider/html_parser_bak.py | haiboz/weiboSpider | 517cae2ef3e7bccd9e1d328a40965406707f5362 | [
"Apache-2.0"
] | null | null | null | weibo/spider/html_parser_bak.py | haiboz/weiboSpider | 517cae2ef3e7bccd9e1d328a40965406707f5362 | [
"Apache-2.0"
] | null | null | null | weibo/spider/html_parser_bak.py | haiboz/weiboSpider | 517cae2ef3e7bccd9e1d328a40965406707f5362 | [
"Apache-2.0"
] | null | null | null | # coding:utf8
'''
Created on 2016年4月8日
@author: wb-zhaohaibo
'''
from bs4 import BeautifulSoup
import re
import urlparse
#html 解析器
class HtmlParser(object):
def _get_new_urls(self, page_url, soup):
new_urls = set()
# /view/123.htm
links = soup.find_all("a",... | 39.085271 | 155 | 0.571004 |
d7eeb3508dcba4627dfde92935728bb85fb77082 | 4,772 | py | Python | nz_crawl_demo/day3/bs4/demo2.py | gaohj/nzflask_bbs | 36a94c380b78241ed5d1e07edab9618c3e8d477b | [
"Apache-2.0"
] | null | null | null | nz_crawl_demo/day3/bs4/demo2.py | gaohj/nzflask_bbs | 36a94c380b78241ed5d1e07edab9618c3e8d477b | [
"Apache-2.0"
] | 27 | 2020-02-12T07:55:58.000Z | 2022-03-12T00:19:09.000Z | nz_crawl_demo/day3/bs4/demo2.py | gaohj/nzflask_bbs | 36a94c380b78241ed5d1e07edab9618c3e8d477b | [
"Apache-2.0"
] | 2 | 2020-02-18T01:54:55.000Z | 2020-02-21T11:36:28.000Z | from bs4 import BeautifulSoup
html = """
<table class="tablelist" cellpadding="0" cellspacing="0">
<tbody>
<tr class="h">
<td class="l" width="374">职位名称</td>
<td>职位类别</td>
<td>人数</td>
<td>地点</td>
<td>发布时间</td>
</tr>
<tr class="even... | 31.189542 | 185 | 0.527242 |
d7f350232ff153504808a6931e8ee97ed8e7521d | 5,123 | py | Python | official/recommend/tbnet/train.py | leelige/mindspore | 5199e05ba3888963473f2b07da3f7bca5b9ef6dc | [
"Apache-2.0"
] | 77 | 2021-10-15T08:32:37.000Z | 2022-03-30T13:09:11.000Z | official/recommend/tbnet/train.py | leelige/mindspore | 5199e05ba3888963473f2b07da3f7bca5b9ef6dc | [
"Apache-2.0"
] | 3 | 2021-10-30T14:44:57.000Z | 2022-02-14T06:57:57.000Z | official/recommend/tbnet/train.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... | 32.839744 | 119 | 0.65001 |
0bc60a09a67840f2606ba28a13c802753148073c | 838 | py | Python | backend/apps/ineedstudent/urls.py | match4healthcare/match4healthcare | acf69e3b781d715f0a947c2a9df6646e94f1ca6b | [
"MIT"
] | 2 | 2020-03-28T13:56:39.000Z | 2020-03-29T10:16:12.000Z | backend/apps/ineedstudent/urls.py | match4healthcare/match4healthcare | acf69e3b781d715f0a947c2a9df6646e94f1ca6b | [
"MIT"
] | 76 | 2020-03-27T21:53:04.000Z | 2020-03-30T20:27:43.000Z | backend/apps/ineedstudent/urls.py | match4healthcare/match4healthcare | acf69e3b781d715f0a947c2a9df6646e94f1ca6b | [
"MIT"
] | null | null | null | from django.urls import path, register_converter
from apps.iamstudent.views import student_list_view
from . import converters, views
register_converter(converters.DecimalPointFloatConverter, "float")
urlpatterns = [
path("students/<countrycode>/<plz>/<float:distance>", student_list_view, name="list_by_plz",),
... | 44.105263 | 117 | 0.76253 |
045bbba126eda1586224ea96b5934b11c442a777 | 2,992 | py | Python | CentOS/7/axelget.py | Heinoc/Docker | ce6ccc925aba1695274a03ea2382b22d4c1571d5 | [
"Apache-2.0"
] | null | null | null | CentOS/7/axelget.py | Heinoc/Docker | ce6ccc925aba1695274a03ea2382b22d4c1571d5 | [
"Apache-2.0"
] | null | null | null | CentOS/7/axelget.py | Heinoc/Docker | ce6ccc925aba1695274a03ea2382b22d4c1571d5 | [
"Apache-2.0"
] | null | null | null | from yum.plugins import PluginYumExit, TYPE_CORE, TYPE_INTERACTIVE
from urlparse import urljoin
import os,time
requires_api_version = '2.3'
plugin_type = (TYPE_CORE, TYPE_INTERACTIVE)
enablesize=300000
trymirrornum=-1
maxconn=10
httpdownloadonly=False
cleanOnException=0
def init_hook(conduit):
global enablesize,try... | 32.879121 | 112 | 0.701537 |
f0883262be5a3770e29b3f55b67480c97d4a78c6 | 2,473 | py | Python | src/Sephrasto/UpdateChecker.py | qeqar/Sephrasto | ce46d46299b2c793f015e25c98908773c39b1dee | [
"MIT"
] | null | null | null | src/Sephrasto/UpdateChecker.py | qeqar/Sephrasto | ce46d46299b2c793f015e25c98908773c39b1dee | [
"MIT"
] | null | null | null | src/Sephrasto/UpdateChecker.py | qeqar/Sephrasto | ce46d46299b2c793f015e25c98908773c39b1dee | [
"MIT"
] | null | null | null | import requests
from requests.exceptions import Timeout
import re
import Version
from PyQt5 import QtWidgets, QtCore
import webbrowser
from EinstellungenWrapper import EinstellungenWrapper
from Wolke import Wolke
class UpdateChecker:
_downloadLink = "https://dsaforum.de/app.php/dlext/?view=detail&df_id=213"
... | 32.973333 | 166 | 0.660736 |
f0bcfa74ff24ac5256cacf723b56d8f91e35b1df | 998 | py | Python | Python/Buch_Python3_Das_umfassende_Praxisbuch/Kapitel_06_Funktionen/06_recursive_functions_with_turtle_sierpinsky_triangle.py | Apop85/Scripts | e71e1c18539e67543e3509c424c7f2d6528da654 | [
"MIT"
] | null | null | null | Python/Buch_Python3_Das_umfassende_Praxisbuch/Kapitel_06_Funktionen/06_recursive_functions_with_turtle_sierpinsky_triangle.py | Apop85/Scripts | e71e1c18539e67543e3509c424c7f2d6528da654 | [
"MIT"
] | 6 | 2020-12-24T15:15:09.000Z | 2022-01-13T01:58:35.000Z | Python/Buch_Python3_Das_umfassende_Praxisbuch/Kapitel_06_Funktionen/06_recursive_functions_with_turtle_sierpinsky_triangle.py | Apop85/Scripts | 1d8dad316c55e1f1343526eac9e4b3d0909e4873 | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
# -*- coding:utf-8 -*-
###
# File: 06_recursive_functions_with_turtle_sierpinsky_triangle.py
# Project: Kapitel_06_Funktionen
# Created Date: Sunday 24.02.2019, 13:09
# Author: Apop85
# -----
# Last Modified: Sunday 24.02.2019, 13:31
# -----
# Copyright (c) 2019 Apop85
# This software is publishe... | 21.695652 | 91 | 0.664329 |
f0c49d87b59e7dbeb9f0403bb20e6b1918e4c03d | 3,199 | py | Python | kernel/accounts/forms.py | sageteam/behpack | 3b8afb81dc7da70807308af4c8a2d2ab92b1a133 | [
"MIT"
] | null | null | null | kernel/accounts/forms.py | sageteam/behpack | 3b8afb81dc7da70807308af4c8a2d2ab92b1a133 | [
"MIT"
] | null | null | null | kernel/accounts/forms.py | sageteam/behpack | 3b8afb81dc7da70807308af4c8a2d2ab92b1a133 | [
"MIT"
] | null | null | null | from django import forms
from .models import User
from django.contrib.auth.forms import UserCreationForm
from django.contrib.auth.forms import AuthenticationForm
from django.contrib.auth.hashers import check_password
from django.utils import timezone
from painless.error_messages import Messages
msg = Messages()
c... | 25.592 | 74 | 0.545796 |
acb85ed5c52031e914ab1b3e2ac0187b1bd3ec12 | 116 | py | Python | src/lcdoc/mkdocs/lp/plugs/show_file/__init__.py | axiros/docutools | f99874a64afba8f5bc740049d843151ccd9ceaf7 | [
"BSD-2-Clause"
] | 24 | 2021-10-04T22:11:59.000Z | 2022-02-02T21:51:43.000Z | src/lcdoc/mkdocs/lp/plugs/show_file/__init__.py | axiros/docutools | f99874a64afba8f5bc740049d843151ccd9ceaf7 | [
"BSD-2-Clause"
] | 2 | 2021-10-04T21:51:30.000Z | 2021-10-05T14:15:31.000Z | src/lcdoc/mkdocs/lp/plugs/show_file/__init__.py | axiros/docutools | f99874a64afba8f5bc740049d843151ccd9ceaf7 | [
"BSD-2-Clause"
] | null | null | null | """
### show_file
Cats a file.
#### Parameters:
- fn: filepath
"""
from ..make_file import *
run = show_file
| 7.733333 | 25 | 0.594828 |
4f4e072b39fe62e826201f91eabd7d4fcb485d6b | 16,327 | py | Python | scripts/generate_vk_helpers.py | leviathanch/monado | 36a540a764fd5529018dfceb28e10804db9596bf | [
"Unlicense",
"Apache-2.0",
"BSD-2-Clause",
"MIT",
"BSL-1.0",
"BSD-3-Clause"
] | null | null | null | scripts/generate_vk_helpers.py | leviathanch/monado | 36a540a764fd5529018dfceb28e10804db9596bf | [
"Unlicense",
"Apache-2.0",
"BSD-2-Clause",
"MIT",
"BSL-1.0",
"BSD-3-Clause"
] | null | null | null | scripts/generate_vk_helpers.py | leviathanch/monado | 36a540a764fd5529018dfceb28e10804db9596bf | [
"Unlicense",
"Apache-2.0",
"BSD-2-Clause",
"MIT",
"BSL-1.0",
"BSD-3-Clause"
] | null | null | null | #!/usr/bin/env python3
# Copyright 2019-2021, Collabora, Ltd.
# SPDX-License-Identifier: BSL-1.0
"""Simple script to update vk_helpers.{c,h}."""
from pathlib import Path
from typing import Callable, Iterable, List, Optional
def get_device_cmds():
return [
Cmd("vkDestroyDevice"),
Cmd("vkDeviceWait... | 32.076621 | 103 | 0.628529 |
4f6323baba3cda35007e1dcfed0492b107474de5 | 1,134 | py | Python | tests/onegov/election_day/collections/test_data_source_collection.py | politbuero-kampagnen/onegov-cloud | 20148bf321b71f617b64376fe7249b2b9b9c4aa9 | [
"MIT"
] | null | null | null | tests/onegov/election_day/collections/test_data_source_collection.py | politbuero-kampagnen/onegov-cloud | 20148bf321b71f617b64376fe7249b2b9b9c4aa9 | [
"MIT"
] | null | null | null | tests/onegov/election_day/collections/test_data_source_collection.py | politbuero-kampagnen/onegov-cloud | 20148bf321b71f617b64376fe7249b2b9b9c4aa9 | [
"MIT"
] | null | null | null | from onegov.election_day.collections import DataSourceCollection
from onegov.election_day.models import DataSource
def test_data_source_collection(session):
collection = DataSourceCollection(session)
collection.add(DataSource(type='vote', name='ds_vote'))
data_source = collection.query().one()
assert... | 36.580645 | 76 | 0.731922 |
8c4b9dd50f25ddb41c9abe22548132d703e8e7e4 | 1,806 | py | Python | src/onegov/election_day/views/exceptionviews.py | politbuero-kampagnen/onegov-cloud | 20148bf321b71f617b64376fe7249b2b9b9c4aa9 | [
"MIT"
] | null | null | null | src/onegov/election_day/views/exceptionviews.py | politbuero-kampagnen/onegov-cloud | 20148bf321b71f617b64376fe7249b2b9b9c4aa9 | [
"MIT"
] | null | null | null | src/onegov/election_day/views/exceptionviews.py | politbuero-kampagnen/onegov-cloud | 20148bf321b71f617b64376fe7249b2b9b9c4aa9 | [
"MIT"
] | null | null | null | from onegov.core.security import Public
from onegov.election_day import _
from onegov.election_day import ElectionDayApp
from onegov.election_day.layouts import DefaultLayout
from webob.exc import HTTPAccepted
from webob.exc import HTTPForbidden
from webob.exc import HTTPNotFound
@ElectionDayApp.html(
model=HTTPF... | 24.739726 | 77 | 0.655592 |
4fe731a7766363a5269033a615aa988f5ac404d5 | 6,961 | py | Python | cbm/show/chip_images.py | CsabaWirnhardt/cbm | 1822addd72881057af34ac6a7c2a1f02ea511225 | [
"BSD-3-Clause"
] | 17 | 2021-01-18T07:27:01.000Z | 2022-03-10T12:26:21.000Z | cbm/show/chip_images.py | CsabaWirnhardt/cbm | 1822addd72881057af34ac6a7c2a1f02ea511225 | [
"BSD-3-Clause"
] | 4 | 2021-04-29T11:20:44.000Z | 2021-12-06T10:19:17.000Z | cbm/show/chip_images.py | CsabaWirnhardt/cbm | 1822addd72881057af34ac6a7c2a1f02ea511225 | [
"BSD-3-Clause"
] | 47 | 2021-01-21T08:25:22.000Z | 2022-03-21T14:28:42.000Z | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
# This file is part of CbM (https://github.com/ec-jrc/cbm).
# Author : Konstantinos Anastasakis
# Credits : GTCAP Team
# Copyright : 2021 European Commission, Joint Research Centre
# License : 3-Clause BSD
import json
import glob
import rasterio
import matplotlib.... | 35.515306 | 77 | 0.563137 |
4fefcbe39fcd74fbbb522f342f87c6c7b3916fe9 | 495 | py | Python | frappe-bench/apps/erpnext/erpnext/stock/doctype/item_price/test_item_price.py | Semicheche/foa_frappe_docker | a186b65d5e807dd4caf049e8aeb3620a799c1225 | [
"MIT"
] | null | null | null | frappe-bench/apps/erpnext/erpnext/stock/doctype/item_price/test_item_price.py | Semicheche/foa_frappe_docker | a186b65d5e807dd4caf049e8aeb3620a799c1225 | [
"MIT"
] | null | null | null | frappe-bench/apps/erpnext/erpnext/stock/doctype/item_price/test_item_price.py | Semicheche/foa_frappe_docker | a186b65d5e807dd4caf049e8aeb3620a799c1225 | [
"MIT"
] | null | null | null | # Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors
# License: GNU General Public License v3. See license.txt
from __future__ import unicode_literals
import unittest
import frappe
class TestItem(unittest.TestCase):
def test_duplicate_item(self):
from erpnext.stock.doctype.item_price.item_price imp... | 35.357143 | 80 | 0.816162 |
5082072fa281f6df5fd8a468a0c6fc4c22535658 | 3,523 | py | Python | users/tests/test_user.py | rocky-roll-call/rrc-backend | 02e8e11c3dab7661e48650e2e861a4a97788a4ce | [
"MIT"
] | null | null | null | users/tests/test_user.py | rocky-roll-call/rrc-backend | 02e8e11c3dab7661e48650e2e861a4a97788a4ce | [
"MIT"
] | null | null | null | users/tests/test_user.py | rocky-roll-call/rrc-backend | 02e8e11c3dab7661e48650e2e861a4a97788a4ce | [
"MIT"
] | null | null | null | from django.contrib.auth.models import User
from django.test import TestCase
from django.urls import reverse
from rest_framework import status
from rest_framework.test import APIClient
from ..models import Profile
class UserModelTestCase(TestCase):
"""
Tests the auth.User model directly
"""
def setUp... | 40.034091 | 84 | 0.663071 |
0fe0c6ecd847ebc3e385caf740385e50d94f3cd2 | 4,425 | py | Python | exercises/networking_selfpaced/networking-workshop/collections/ansible_collections/community/general/plugins/modules/vultr_block_storage_info.py | tr3ck3r/linklight | 5060f624c235ecf46cb62cefcc6bddc6bf8ca3e7 | [
"MIT"
] | null | null | null | exercises/networking_selfpaced/networking-workshop/collections/ansible_collections/community/general/plugins/modules/vultr_block_storage_info.py | tr3ck3r/linklight | 5060f624c235ecf46cb62cefcc6bddc6bf8ca3e7 | [
"MIT"
] | null | null | null | exercises/networking_selfpaced/networking-workshop/collections/ansible_collections/community/general/plugins/modules/vultr_block_storage_info.py | tr3ck3r/linklight | 5060f624c235ecf46cb62cefcc6bddc6bf8ca3e7 | [
"MIT"
] | null | null | null | #!/usr/bin/python
# -*- coding: utf-8 -*-
#
# Copyright (c) 2018, Yanis Guenane <yanis+ansible@guenane.org>
# Copyright (c) 2019, René Moser <mail@renemoser.net>
# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
from __future__ import (absolute_import, division, print_functio... | 26.981707 | 99 | 0.664859 |
e84f22578535548aba37d587e00938daf043fb91 | 4,483 | py | Python | Packs/Alexa/Integrations/AlexaV2/AlexaV2_test.py | diCagri/content | c532c50b213e6dddb8ae6a378d6d09198e08fc9f | [
"MIT"
] | 799 | 2016-08-02T06:43:14.000Z | 2022-03-31T11:10:11.000Z | Packs/Alexa/Integrations/AlexaV2/AlexaV2_test.py | diCagri/content | c532c50b213e6dddb8ae6a378d6d09198e08fc9f | [
"MIT"
] | 9,317 | 2016-08-07T19:00:51.000Z | 2022-03-31T21:56:04.000Z | Packs/Alexa/Integrations/AlexaV2/AlexaV2_test.py | diCagri/content | c532c50b213e6dddb8ae6a378d6d09198e08fc9f | [
"MIT"
] | 1,297 | 2016-08-04T13:59:00.000Z | 2022-03-31T23:43:06.000Z | import pytest
from AlexaV2 import Client, rank_to_context, alexa_domain
from CommonServerPython import * # noqa
def create_client(proxy: bool = False, verify: bool = False, top_domain_threshold: int = 100,
suspicious_domain_threshold: Optional[int] = None,
reliability: str = DBotS... | 35.864 | 127 | 0.678117 |
ad3df594155531204cb05a803f354cfc702a05fe | 830 | py | Python | Algorithms/Warmup/Time_Conversion.py | vinayvinu500/Hackerrank | e185ae9d3c7dc5cd661761142e436f5df6a3f0f1 | [
"MIT"
] | null | null | null | Algorithms/Warmup/Time_Conversion.py | vinayvinu500/Hackerrank | e185ae9d3c7dc5cd661761142e436f5df6a3f0f1 | [
"MIT"
] | null | null | null | Algorithms/Warmup/Time_Conversion.py | vinayvinu500/Hackerrank | e185ae9d3c7dc5cd661761142e436f5df6a3f0f1 | [
"MIT"
] | null | null | null | # https://www.hackerrank.com/challenges/one-week-preparation-kit-time-conversion/problem?isFullScreen=true&h_l=interview&playlist_slugs%5B%5D=preparation-kits&playlist_slugs%5B%5D=one-week-preparation-kit&playlist_slugs%5B%5D=one-week-day-one&h_r=next-challenge&h_v=zen
def timeConversion(s):
m = s[-2:]
x = s[... | 21.842105 | 269 | 0.6 |
ad4ba8d76eae8e2e453120145ed90016cbb63f9f | 266 | py | Python | src/python/py-accepted/266B.py | cbarnson/UVa | 0dd73fae656613e28b5aaf5880c5dad529316270 | [
"Unlicense",
"MIT"
] | 2 | 2019-09-07T17:00:26.000Z | 2020-08-05T02:08:35.000Z | src/python/py-accepted/266B.py | cbarnson/UVa | 0dd73fae656613e28b5aaf5880c5dad529316270 | [
"Unlicense",
"MIT"
] | null | null | null | src/python/py-accepted/266B.py | cbarnson/UVa | 0dd73fae656613e28b5aaf5880c5dad529316270 | [
"Unlicense",
"MIT"
] | null | null | null | #! python
# Problem # : 266B
# Created on : 2019-01-15 20:46:42
def Main():
n, t = map(int, input().split(" "))
s = input()
for i in range(t):
s2 = s.replace("BG", "GB")
s = s2
print(s)
if __name__ == '__main__':
Main()
| 14.777778 | 39 | 0.481203 |
7d074da55d0f88da03093e99d762eaf624c703ac | 252 | py | Python | bolt/utils/__init__.py | ph7vc/CL4M-B0T | e992cf63b1215ea7c241cab94edc251653dbaed7 | [
"MIT"
] | 9 | 2019-02-17T06:33:14.000Z | 2021-10-05T02:19:00.000Z | bolt/utils/__init__.py | ns-phennessy/Bolt | e992cf63b1215ea7c241cab94edc251653dbaed7 | [
"MIT"
] | 28 | 2019-02-10T07:48:05.000Z | 2021-12-20T00:15:37.000Z | bolt/utils/__init__.py | ph7vc/CL4M-B0T | e992cf63b1215ea7c241cab94edc251653dbaed7 | [
"MIT"
] | 4 | 2015-03-13T03:58:55.000Z | 2015-05-27T08:29:46.000Z | from bolt.utils.timer import Timer
from bolt.utils.colors import Colors
from bolt.utils.decorators import cache
from bolt.utils.misc import readable_time
from bolt.utils.misc import snakecase_to_camelcase
from bolt.utils.logs import setup_logger
| 36 | 51 | 0.833333 |
7d45dea8767d76664e53eac030123b554f632870 | 270 | py | Python | Programming Languages/Python/Theory/100_Python_Exercises/Exercises/Exercise 36/36.py | jaswinder9051998/Resources | fd468af37bf24ca57555d153ee64693c018e822e | [
"MIT"
] | 101 | 2021-12-20T11:57:11.000Z | 2022-03-23T09:49:13.000Z | 50-Python-Exercises/Exercises/Exercise 36/36.py | kuwarkapur/Hacktoberfest-2022 | efaafeba5ce51d8d2e2d94c6326cc20bff946f17 | [
"MIT"
] | 4 | 2022-01-12T11:55:56.000Z | 2022-02-12T04:53:33.000Z | 50-Python-Exercises/Exercises/Exercise 36/36.py | kuwarkapur/Hacktoberfest-2022 | efaafeba5ce51d8d2e2d94c6326cc20bff946f17 | [
"MIT"
] | 38 | 2022-01-12T11:56:16.000Z | 2022-03-23T10:07:52.000Z | #Create a function that takes a text file and returns the number of words
def count_words(filepath):
with open(filepath, 'r') as file:
strng = file.read()
strng_list = strng.split(" ")
return len(strng_list)
print(count_words("words1.txt"))
| 30 | 73 | 0.67037 |
bc11654d4a21585ab929a04f954dff3c35474b68 | 658 | py | Python | testlogin/avator.py | weibk/webauto | f494f8043d05739935d1fc22b941bbc9a7ba75b7 | [
"MIT"
] | null | null | null | testlogin/avator.py | weibk/webauto | f494f8043d05739935d1fc22b941bbc9a7ba75b7 | [
"MIT"
] | null | null | null | testlogin/avator.py | weibk/webauto | f494f8043d05739935d1fc22b941bbc9a7ba75b7 | [
"MIT"
] | null | null | null | #!/usr/bin/python3
# encoding='utf-8'
# author:weibk
# time:2021/10/29 10:57
from selenium import webdriver
driver = webdriver.Chrome()
driver.get('http://localhost:8080/HKR')
driver.maximize_window()
driver.find_element_by_xpath("//*[@id='loginname']").send_keys("jason")
driver.find_element_by_xpath("//*[@id='passwo... | 36.555556 | 74 | 0.709726 |
70cea9e02b0caaf2cda0251b6755e99bf9d78a3a | 4,395 | py | Python | Paddle_Industry_Practice_Sample_Library/sentiment_analysis/pp_minilm/quant_post.py | linuxonly801/awesome-DeepLearning | b063757fa130c4d56aea5cce2e592610f1e169f9 | [
"Apache-2.0"
] | 1 | 2022-03-14T09:03:15.000Z | 2022-03-14T09:03:15.000Z | Paddle_Industry_Practice_Sample_Library/sentiment_analysis/pp_minilm/quant_post.py | linuxonly801/awesome-DeepLearning | b063757fa130c4d56aea5cce2e592610f1e169f9 | [
"Apache-2.0"
] | null | null | null | Paddle_Industry_Practice_Sample_Library/sentiment_analysis/pp_minilm/quant_post.py | linuxonly801/awesome-DeepLearning | b063757fa130c4d56aea5cce2e592610f1e169f9 | [
"Apache-2.0"
] | null | null | null | # Copyright (c) 2021 PaddlePaddle Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by app... | 44.846939 | 154 | 0.713766 |
cb81a21b91d540e090e61343d7b06103123967d4 | 1,491 | py | Python | IVTa/2014/AMETOVA_M_M/task_8_23.py | YukkaSarasti/pythonintask | eadf4245abb65f4400a3bae30a4256b4658e009c | [
"Apache-2.0"
] | null | null | null | IVTa/2014/AMETOVA_M_M/task_8_23.py | YukkaSarasti/pythonintask | eadf4245abb65f4400a3bae30a4256b4658e009c | [
"Apache-2.0"
] | null | null | null | IVTa/2014/AMETOVA_M_M/task_8_23.py | YukkaSarasti/pythonintask | eadf4245abb65f4400a3bae30a4256b4658e009c | [
"Apache-2.0"
] | null | null | null | # Задача 8. Вариант 49
# Доработайте игру "Анаграммы" (см. М.Доусон Программируем на Python. Гл.4)
# так, чтобы к каждому слову полагалась подсказка. Игрок должен получать право
# на подсказку в том случае, если у него нет никаких предположений.
# Разработайте систему начисления очков, по которой бы игроки, отгадав... | 31.0625 | 79 | 0.595573 |
cba7f5815d31937fba66b3a4761395aaf453496b | 3,118 | py | Python | PINp/2014/Valkovskey_M_A/task_13_49.py | YukkaSarasti/pythonintask | eadf4245abb65f4400a3bae30a4256b4658e009c | [
"Apache-2.0"
] | null | null | null | PINp/2014/Valkovskey_M_A/task_13_49.py | YukkaSarasti/pythonintask | eadf4245abb65f4400a3bae30a4256b4658e009c | [
"Apache-2.0"
] | null | null | null | PINp/2014/Valkovskey_M_A/task_13_49.py | YukkaSarasti/pythonintask | eadf4245abb65f4400a3bae30a4256b4658e009c | [
"Apache-2.0"
] | null | null | null | # Задача 13. Вариант 49.
#Разработайте собственную стратегию ходов компьютера для игры "Крестики-нолики" (Задача 12). Перепишите функцию computer_move() в соответствии с этой стратегией.
#Valkovskey M.A.
from random import randint
size = 3
board = [ 0 ] * size * size
pics = [' . ', ' x ', ' o ']
def print_board (... | 21.804196 | 162 | 0.505773 |
3803906039d0120327201f2dd71ceb28ed8c705c | 23,890 | py | Python | Packs/ServiceDeskPlus_On_Premise/Integrations/ServiceDeskPlus_On_Premise/test_data/response_constants.py | diCagri/content | c532c50b213e6dddb8ae6a378d6d09198e08fc9f | [
"MIT"
] | 799 | 2016-08-02T06:43:14.000Z | 2022-03-31T11:10:11.000Z | Packs/ServiceDeskPlus_On_Premise/Integrations/ServiceDeskPlus_On_Premise/test_data/response_constants.py | diCagri/content | c532c50b213e6dddb8ae6a378d6d09198e08fc9f | [
"MIT"
] | 9,317 | 2016-08-07T19:00:51.000Z | 2022-03-31T21:56:04.000Z | Packs/ServiceDeskPlus_On_Premise/Integrations/ServiceDeskPlus_On_Premise/test_data/response_constants.py | diCagri/content | c532c50b213e6dddb8ae6a378d6d09198e08fc9f | [
"MIT"
] | 1,297 | 2016-08-04T13:59:00.000Z | 2022-03-31T23:43:06.000Z | RESPONSE_CREATE_REQUEST = {
'request': {
'subject': 'Create request test',
'resolution': None,
'linked_to_request': None,
'mode': {
'name': 'E-Mail',
'id': '123640000000006665'
},
'lifecycle': None,
'is_read': False,
'cancellati... | 29.566832 | 104 | 0.462034 |
3823c1feaf94009536fcef4b77b95307de66e84b | 492 | py | Python | python/socket/ipv6_address_packing.py | zeroam/TIL | 43e3573be44c7f7aa4600ff8a34e99a65cbdc5d1 | [
"MIT"
] | null | null | null | python/socket/ipv6_address_packing.py | zeroam/TIL | 43e3573be44c7f7aa4600ff8a34e99a65cbdc5d1 | [
"MIT"
] | null | null | null | python/socket/ipv6_address_packing.py | zeroam/TIL | 43e3573be44c7f7aa4600ff8a34e99a65cbdc5d1 | [
"MIT"
] | null | null | null | """
The related functions inet_pton() and inet_ntop() work with both
IPv4 and IPv6 addressed, producing the approriate format based on
the address family parameter passed in
"""
import binascii
import socket
import struct
import sys
string_address = '2002:ac10:10a:1234:21e:52ff:fe74:40e'
packed = socket.inet_pton(sock... | 28.941176 | 65 | 0.784553 |
38792f9e140924b9c76153133081c8ba497f2f4a | 1,407 | py | Python | ABLIRC/install/external_lib/HTSeq/_HTSeq_internal.py | ablifedev/ABLIRC | 875278b748a8e22ada2c76c3c76dbf970be4a6a4 | [
"MIT"
] | 1 | 2020-02-25T13:08:20.000Z | 2020-02-25T13:08:20.000Z | Dockerfiles/gedlab-khmer-filter-abund/pymodules/python2.7/lib/python/HTSeq-0.6.1p1-py2.7-linux-x86_64.egg/HTSeq/_HTSeq_internal.py | poojavade/Genomics_Docker | 829b5094bba18bbe03ae97daf925fee40a8476e8 | [
"Apache-2.0"
] | 1 | 2021-09-11T14:30:32.000Z | 2021-09-11T14:30:32.000Z | ABLIRC/install/external_lib/HTSeq/_HTSeq_internal.py | ablifedev/ABLIRC | 875278b748a8e22ada2c76c3c76dbf970be4a6a4 | [
"MIT"
] | 2 | 2016-12-19T02:27:46.000Z | 2019-07-29T02:53:54.000Z | import HTSeq
import itertools
import numpy
def GenomicInterval_xrange( gi, step ):
for pos in xrange( gi.start, gi.end, step ):
yield HTSeq.GenomicPosition( gi.chrom, pos, gi.strand )
def GenomicInterval_xranged( gi, step ):
if gi.strand == "-":
step *= -1
for pos in xrange( gi.start_d, gi.... | 36.076923 | 95 | 0.61123 |
389c6004b629fd718b0b1bf28fc8766c2bce5f82 | 501 | py | Python | Book/os/test.py | mrprogrammer2938/YouTube-Book | c56b8c02e0c7e3814c979d24b7f3719e6cf67f87 | [
"Apache-2.0"
] | null | null | null | Book/os/test.py | mrprogrammer2938/YouTube-Book | c56b8c02e0c7e3814c979d24b7f3719e6cf67f87 | [
"Apache-2.0"
] | null | null | null | Book/os/test.py | mrprogrammer2938/YouTube-Book | c56b8c02e0c7e3814c979d24b7f3719e6cf67f87 | [
"Apache-2.0"
] | null | null | null | """
os Python Library
"""
import os # import os
# Module And Objects
# print(os.name) # Show Your OS Name
# nt = Windows
# posix = Linux
# print(os.getcwd()) # Show Your Path
# -----
# os.mkdir("folder") # Make Folder
# os.rmdir("folder") # Remove Dir
# ------
# File Name
# os.remove("text.txt") # remove fi... | 14.735294 | 38 | 0.562874 |
389deee98bbbf828a0d4778a1621a2007fe75aa9 | 966 | py | Python | 3_Funktionen/U_Ein funktionaler Online Shop/task.py | DavidStahl97/Python-Grundkurs | 6796d19116d2f838b193b106d00bc2e74a8cdcb4 | [
"MIT"
] | null | null | null | 3_Funktionen/U_Ein funktionaler Online Shop/task.py | DavidStahl97/Python-Grundkurs | 6796d19116d2f838b193b106d00bc2e74a8cdcb4 | [
"MIT"
] | null | null | null | 3_Funktionen/U_Ein funktionaler Online Shop/task.py | DavidStahl97/Python-Grundkurs | 6796d19116d2f838b193b106d00bc2e74a8cdcb4 | [
"MIT"
] | null | null | null | #a)
cart_prices = [20, 3.5, 6.49, 8.99, 9.99, 14.98]
def list_sum(l):
# TODO hier kommt dein Code hin
print()
list_sum(cart_prices)
########################################################################################################################
#b)
def prices_list(name, price):
# TODO hier komm... | 30.1875 | 120 | 0.514493 |
631c9aa4708cd8ab7f89c781902c2b7b413662c5 | 5,727 | py | Python | networks/deconv_net.py | kkahloots/Generative-Models-03 | 5399fb8a504543b0a4196a81b182ead79ee247df | [
"MIT"
] | null | null | null | networks/deconv_net.py | kkahloots/Generative-Models-03 | 5399fb8a504543b0a4196a81b182ead79ee247df | [
"MIT"
] | null | null | null | networks/deconv_net.py | kkahloots/Generative-Models-03 | 5399fb8a504543b0a4196a81b182ead79ee247df | [
"MIT"
] | null | null | null | """
Created on Thu Sep 13 00:32:57 2018
@author: pablosanchez
"""
import tensorflow as tf
from networks.dense_net import DenseNet
class DeconvNet(object):
def __init__(self, width, height, nchannels, reuse, transfer_fct=tf.nn.relu,
act_out=tf.nn.sigmoid, drop_rate=0.2, batch_norm=True,... | 45.094488 | 125 | 0.464816 |
2ddf14646ae9a5563e40bbc99e91961aff274a21 | 811 | py | Python | elements/python/5/5/soln.py | mmcloughlin/problems | 6095842ffe007a12ec8c2093850515aa4e046616 | [
"MIT"
] | 11 | 2019-02-08T06:54:34.000Z | 2021-08-07T18:57:39.000Z | elements/python/5/5/soln.py | mmcloughlin/problems | 6095842ffe007a12ec8c2093850515aa4e046616 | [
"MIT"
] | 1 | 2019-05-21T08:14:10.000Z | 2019-05-21T08:14:10.000Z | elements/python/5/5/soln.py | mmcloughlin/problems | 6095842ffe007a12ec8c2093850515aa4e046616 | [
"MIT"
] | null | null | null | import random
def add(x, y):
s = 0
c = 0
i = 0
while x != 0 or y != 0 or c != 0:
b = (x ^ y ^ c) & 1
c = ((x & y) | (x & c) | (y & c)) & 1
s |= (b << i)
x >>= 1
y >>= 1
i += 1
return s
def test_add():
n = 64
for trial in range(1000):
... | 15.596154 | 45 | 0.408138 |
3590e3ecbd712854f5f1fe79e215c032b9f29886 | 2,955 | py | Python | test/test_npu/test_network_ops/test_bmm_v2.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_bmm_v2.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_bmm_v2.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... | 40.479452 | 77 | 0.674788 |
ea167f993dd20902947c62b4e69c7dfa8137a0f0 | 3,228 | py | Python | basic/18-web3py/scripts/3_use_openzeppelin.py | yingjingyang/Dapp-Learning | 5bf10a02932926e429c1a61704d9a9dfee3a13ea | [
"MIT"
] | 987 | 2021-12-19T09:57:18.000Z | 2022-03-31T15:39:45.000Z | basic/18-web3py/scripts/3_use_openzeppelin.py | yingjingyang/Dapp-Learning | 5bf10a02932926e429c1a61704d9a9dfee3a13ea | [
"MIT"
] | 73 | 2021-07-04T03:53:57.000Z | 2021-12-18T06:17:13.000Z | basic/18-web3py/scripts/3_use_openzeppelin.py | yingjingyang/Dapp-Learning | 5bf10a02932926e429c1a61704d9a9dfee3a13ea | [
"MIT"
] | 263 | 2021-06-28T15:26:56.000Z | 2021-12-19T08:14:37.000Z | import json
from web3 import Web3
def main():
w3 = Web3(Web3.HTTPProvider('http://127.0.0.1:8545'))
with open('./ABI/MyTokenOpenZeppelin.json', 'r') as fr:
erc20_json_dict = json.load(fr)
my_contract = w3.eth.contract(abi=erc20_json_dict['abi'], bytecode=erc20_json_dict['bytecode'])
tx_hash =... | 38.428571 | 112 | 0.695477 |
57fca45336ddec1bbaff4213d2351c1034a2494e | 8,790 | py | Python | model/VGG8.py | TensorVision/MediSeg | 222fcab98d82f48f09304eda3cfbfe4d6ac825b7 | [
"MIT"
] | 6 | 2016-08-15T17:57:45.000Z | 2019-03-19T05:08:29.000Z | model/VGG8.py | TensorVision/MediSeg | 222fcab98d82f48f09304eda3cfbfe4d6ac825b7 | [
"MIT"
] | 10 | 2016-04-11T10:20:34.000Z | 2016-08-09T21:47:48.000Z | model/VGG8.py | TensorVision/MediSeg | 222fcab98d82f48f09304eda3cfbfe4d6ac825b7 | [
"MIT"
] | 7 | 2016-06-21T04:08:58.000Z | 2018-09-01T14:02:40.000Z | from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
import tensorflow as tf
import re
import sys
import logging
def _activation_summary(x):
"""Helper to create summaries for activations.
Creates a summary that provides a histogram of activations.
... | 35.443548 | 80 | 0.639363 |
1044dcf34f9a593d81312ab31cf0481e3d0ba6f0 | 229 | py | Python | python_playground/data/test.py | RapidsAtHKUST/SimRank | 3a601b08f9a3c281e2b36b914e06aba3a3a36118 | [
"MIT"
] | 8 | 2020-04-14T23:17:00.000Z | 2021-06-21T12:34:04.000Z | python_playground/data/test.py | RapidsAtHKUST/SimRank | 3a601b08f9a3c281e2b36b914e06aba3a3a36118 | [
"MIT"
] | null | null | null | python_playground/data/test.py | RapidsAtHKUST/SimRank | 3a601b08f9a3c281e2b36b914e06aba3a3a36118 | [
"MIT"
] | 1 | 2021-01-17T16:26:50.000Z | 2021-01-17T16:26:50.000Z | def f(x):
return x * x
if __name__ == '__main__':
a = 0
while True:
while a < 100:
a += 1
if a > 50:
break
print("main loop")
print(a)
input()
| 15.266667 | 26 | 0.379913 |
5eb0a19615407981f542856da7bb9b1b932d87b7 | 1,228 | py | Python | python/system/parser.py | rissom/RC3MUD | d5ffb8b79a6a95e9389ee0576f52dfee1f52c4ee | [
"MIT"
] | 1 | 2020-09-29T17:44:31.000Z | 2020-09-29T17:44:31.000Z | python/system/parser.py | rissom/RC3MUD | d5ffb8b79a6a95e9389ee0576f52dfee1f52c4ee | [
"MIT"
] | null | null | null | python/system/parser.py | rissom/RC3MUD | d5ffb8b79a6a95e9389ee0576f52dfee1f52c4ee | [
"MIT"
] | null | null | null | from system.log import log
from game.player import Player
from system.helper import i18n
class Parser(object):
def parse_user_command(wsclient, jsonmsg):
lang = wsclient.player.lang
if jsonmsg['cmd']=='user':
#wsclient.player.parse_user_command(jsonmsg['data'])... | 43.857143 | 298 | 0.586319 |
0daa98093fa8c4e26022c898e94603e2dd83a104 | 365 | py | Python | 1.Array/Problems/sum_without_loop.py | Vinaypatil-Ev/vinEvC_datastructure | 3e02e49c03a2b7d2e09af9a2dce080e6d9abbf74 | [
"MIT"
] | 3 | 2020-09-10T18:40:40.000Z | 2020-09-15T17:32:12.000Z | 1.Array/Problems/sum_without_loop.py | Vinaypatil-Ev/vinEvC_datastructure | 3e02e49c03a2b7d2e09af9a2dce080e6d9abbf74 | [
"MIT"
] | null | null | null | 1.Array/Problems/sum_without_loop.py | Vinaypatil-Ev/vinEvC_datastructure | 3e02e49c03a2b7d2e09af9a2dce080e6d9abbf74 | [
"MIT"
] | null | null | null | def sum_without_loop(arr, n):
if n == 0:
return arr[0]
return arr[n] + sum_without_loop(arr, n-1)
def sum_using_formula(arr, n):
""" It works only if array is sequential"""
return n * (n + 1) / 2
arr = [1, 2, 3, 4, 5, 6, 7]
print(len(arr))
print(sum(arr))
print(sum_using_formula(arr, len(arr))... | 22.8125 | 47 | 0.619178 |
df5e9e7415b3e3a7a0ceeb86bedc5894d53aedd2 | 3,583 | py | Python | hark/src/ex2/ex2.py | appfs/appfs | 8cbbfa0e40e4d4a75a498ce8dd894bb2fbc3a9e3 | [
"MIT"
] | 11 | 2017-04-21T11:39:55.000Z | 2022-02-11T20:25:18.000Z | hark/src/ex2/ex2.py | appfs/appfs | 8cbbfa0e40e4d4a75a498ce8dd894bb2fbc3a9e3 | [
"MIT"
] | 69 | 2017-04-26T09:30:38.000Z | 2017-08-01T11:31:21.000Z | hark/src/ex2/ex2.py | appfs/appfs | 8cbbfa0e40e4d4a75a498ce8dd894bb2fbc3a9e3 | [
"MIT"
] | 53 | 2017-04-20T16:16:11.000Z | 2017-07-19T12:53:01.000Z | import sys
import traceback
from lxml import etree
## @package ex2
# This script is a solution for exercise 2 from the advanced programming course in the sommer 2017 at TUB.
# For more information see @link http://www.zib.de/koch/lectures/ss2017_appfs.php
## This methods validates the specified xml-file against th... | 37.322917 | 113 | 0.645548 |
803e8da3cc79fac8f3711fae997b309aa3ed0663 | 14,265 | py | Python | app/user/views.py | IoTServ/FlaskSimpleCMS | db0fc4464c6d514db14972156ca3e002a60a4876 | [
"MIT"
] | null | null | null | app/user/views.py | IoTServ/FlaskSimpleCMS | db0fc4464c6d514db14972156ca3e002a60a4876 | [
"MIT"
] | 4 | 2020-08-29T16:11:12.000Z | 2022-03-12T00:47:03.000Z | app/user/views.py | IoTServ/FlaskSimpleCMS | db0fc4464c6d514db14972156ca3e002a60a4876 | [
"MIT"
] | null | null | null | # coding:utf-8
import sys, time, os
reload(sys)
sys.setdefaultencoding('utf-8')
import json,oss2,bleach
from flask import render_template, redirect, flash, \
url_for, request, current_app, jsonify
from flask_login import login_required, current_user
from . import user
from ..models import ArticleType, Article, Use... | 38.04 | 117 | 0.628251 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.