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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
356060c056749f626c2582dc413bfcfaa4db47a1 | 14,125 | py | Python | python/tests/test_sbtab_doc.py | derHahn/SBtab | da998eacc49f7f29d8168be366eb0c211c3adb5f | [
"MIT"
] | 4 | 2015-02-20T09:20:10.000Z | 2018-02-05T10:54:10.000Z | python/tests/test_sbtab_doc.py | tlubitz/SBtab | da998eacc49f7f29d8168be366eb0c211c3adb5f | [
"MIT"
] | 80 | 2018-04-13T13:46:24.000Z | 2022-02-16T16:01:46.000Z | python/tests/test_sbtab_doc.py | tlubitz/SBtab | da998eacc49f7f29d8168be366eb0c211c3adb5f | [
"MIT"
] | 6 | 2018-06-06T19:55:32.000Z | 2021-09-30T15:16:40.000Z | #!/usr/bin/env python
import unittest
import os
import sys
import random
sys.path.insert(0,os.path.join(os.path.dirname(__file__), '..'))
import SBtab
import misc
class TestSBtabDocument(unittest.TestCase):
def setUp(self):
'''
setup SBtabDocument class with files from test directory
'''
... | 38.911846 | 127 | 0.593487 |
ea4e7b01c6038031cc2805e70fb73c77fb5b6d0e | 185 | py | Python | marsyas-vamp/marsyas/src/django/birdsong/application/birdsong/onsets/models.py | jaouahbi/VampPlugins | 27c2248d1c717417fe4d448cdfb4cb882a8a336a | [
"Apache-2.0"
] | null | null | null | marsyas-vamp/marsyas/src/django/birdsong/application/birdsong/onsets/models.py | jaouahbi/VampPlugins | 27c2248d1c717417fe4d448cdfb4cb882a8a336a | [
"Apache-2.0"
] | null | null | null | marsyas-vamp/marsyas/src/django/birdsong/application/birdsong/onsets/models.py | jaouahbi/VampPlugins | 27c2248d1c717417fe4d448cdfb4cb882a8a336a | [
"Apache-2.0"
] | null | null | null | from django.db import models
class Recording(models.Model):
audio = models.CharField(max_length=200)
image = models.CharField(max_length=200)
length = models.FloatField()
| 23.125 | 44 | 0.740541 |
3548e578ab9efe61b1836ca7780a8df721149518 | 5,886 | py | Python | xmlToJson2.py | Aldemerian/RLP-XML | 89a04f1a5deac488e7006731b390fd890af7dd29 | [
"MIT"
] | 1 | 2021-08-18T02:59:14.000Z | 2021-08-18T02:59:14.000Z | xmlToJson2.py | Aldemerian/RLP-XML | 89a04f1a5deac488e7006731b390fd890af7dd29 | [
"MIT"
] | null | null | null | xmlToJson2.py | Aldemerian/RLP-XML | 89a04f1a5deac488e7006731b390fd890af7dd29 | [
"MIT"
] | null | null | null | import xml.etree.ElementTree as ET
import json
import html
import uuid
from functools import reduce
demo=input("Give me your Poor, your huddled XML-File_Path: ")
fileInput = demo[20:29]
fileInput = fileInput.rstrip(".xml")
print(fileInput)
f = open(demo, "r")
#for file name configure rest
#ask which of the 4 this is
... | 34.22093 | 229 | 0.490486 |
ead526b9d924ab45588b0fa8d14922a04d03a79f | 977 | py | Python | Unzip.py | geocot/UnzipPython | 0688cb3585560c31c9cc982c8e05c80b3c211360 | [
"Apache-2.0"
] | null | null | null | Unzip.py | geocot/UnzipPython | 0688cb3585560c31c9cc982c8e05c80b3c211360 | [
"Apache-2.0"
] | null | null | null | Unzip.py | geocot/UnzipPython | 0688cb3585560c31c9cc982c8e05c80b3c211360 | [
"Apache-2.0"
] | null | null | null | #Martin Couture
#Décembre 2020
#Il suffit d'indiquer le répertoire et les fichiers ZIP sont extraient dans un répertoire ayant le même nom.
#Fait avec Python 3.X
import os, zipfile
#Liste des fichiers ZIP
repertoire = input("Entrer le chemin du répertoire: ")
chemin = repertoire.replace("\\", "/") + "/"
dic... | 23.829268 | 109 | 0.634596 |
dc8a42ebdd7e8402946c5123d9a9f7b1dab77d93 | 411 | py | Python | exercises/ja/test_02_14.py | Jette16/spacy-course | 32df0c8f6192de6c9daba89740a28c0537e4d6a0 | [
"MIT"
] | 2,085 | 2019-04-17T13:10:40.000Z | 2022-03-30T21:51:46.000Z | exercises/ja/test_02_14.py | Jette16/spacy-course | 32df0c8f6192de6c9daba89740a28c0537e4d6a0 | [
"MIT"
] | 79 | 2019-04-18T14:42:55.000Z | 2022-03-07T08:15:43.000Z | exercises/ja/test_02_14.py | Jette16/spacy-course | 32df0c8f6192de6c9daba89740a28c0537e4d6a0 | [
"MIT"
] | 361 | 2019-04-17T13:34:32.000Z | 2022-03-28T04:42:45.000Z | def test():
assert (
"from spacy.matcher import PhraseMatcher" in __solution__
), "PhraseMatcherをちゃんとインポートしましたか?"
assert "PhraseMatcher(nlp.vocab)" in __solution__, "PhraseMatcherをきちんと初期化しましたか?"
assert "matcher(doc)" in __solution__, "docに対してMatcherを呼び出しましたか?"
assert len(matches) == 2, "matc... | 45.666667 | 84 | 0.739659 |
5e9af95344212a3095c2ecea694a232fed9b4206 | 5,293 | py | Python | Properties/analysis/complexity metrics/dependency/dependency.py | NazaninBayati/SCA | 74e670462dd0da5e24147aab86df393b38405176 | [
"MIT"
] | null | null | null | Properties/analysis/complexity metrics/dependency/dependency.py | NazaninBayati/SCA | 74e670462dd0da5e24147aab86df393b38405176 | [
"MIT"
] | null | null | null | Properties/analysis/complexity metrics/dependency/dependency.py | NazaninBayati/SCA | 74e670462dd0da5e24147aab86df393b38405176 | [
"MIT"
] | null | null | null | import pandas as pd
import re
db_cr = open("Program Unit Cross Reference.txt","r")
db_cr = db_cr.read()
db_cr_st=[]
db_cr_st = db_cr.split("\n\n")
db_cr_temp = db_cr_st[1:db_cr_st.__len__()]
db_cr_st=db_cr_temp
c=0
temp=[]
func=[]
def crossref(func):
len_counter=0
compare_func=[]
compare_func.append(fu... | 27.42487 | 72 | 0.578122 |
5ec782756cf43447cee30e7b7b273a976c5e9e72 | 5,582 | py | Python | disenn/datasets/celeba_dataset.py | AmanDaVinci/DiSENN | ca84a8d646ad8e5e3675ffd19165c20933b81ef7 | [
"MIT"
] | 1 | 2020-08-28T05:06:36.000Z | 2020-08-28T05:06:36.000Z | disenn/datasets/celeba_dataset.py | AmanDaVinci/DiSENN | ca84a8d646ad8e5e3675ffd19165c20933b81ef7 | [
"MIT"
] | null | null | null | disenn/datasets/celeba_dataset.py | AmanDaVinci/DiSENN | ca84a8d646ad8e5e3675ffd19165c20933b81ef7 | [
"MIT"
] | null | null | null | import os
import PIL
import hashlib
import zipfile
import subprocess
import pandas as pd
from pathlib import Path
from torch.utils.data import Dataset, DataLoader
from torchvision import transforms
from disenn.utils.download import download_file_from_google_drive
class CelebA(Dataset):
"""Large-scale CelebFaces A... | 44.656 | 112 | 0.675743 |
1d07cbce6e4d7c33612cac114ca0a1f401069b33 | 4,673 | py | Python | src/visitpy/visit_utils/tests/test_qannote_multi_prog.py | visit-dav/vis | c08bc6e538ecd7d30ddc6399ec3022b9e062127e | [
"BSD-3-Clause"
] | 226 | 2018-12-29T01:13:49.000Z | 2022-03-30T19:16:31.000Z | src/visitpy/visit_utils/tests/test_qannote_multi_prog.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_utils/tests/test_qannote_multi_prog.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.
"""
author: Cyrus Harrison (cyrush@llnl.gov)
description:
Tests for qannote module.
"""
... | 37.384 | 78 | 0.359726 |
df4ea8ba2715ae649da164627adc4117d1a73b6d | 205 | py | Python | src/nfz_module/model/GPIOPin.py | hwroitzsch/BikersLifeSaver | 469c738fdd6352c44a3f20689b17fa8ac04ad8a2 | [
"MIT"
] | null | null | null | src/nfz_module/model/GPIOPin.py | hwroitzsch/BikersLifeSaver | 469c738fdd6352c44a3f20689b17fa8ac04ad8a2 | [
"MIT"
] | null | null | null | src/nfz_module/model/GPIOPin.py | hwroitzsch/BikersLifeSaver | 469c738fdd6352c44a3f20689b17fa8ac04ad8a2 | [
"MIT"
] | null | null | null | from enum import Enum
__author__ = 'Hans-Werner Roitzsch'
class GPIOPin(Enum):
PIN_SOUND = 0
PIN_STATUS_LED = 2
PIN_RGB_RED = 3
PIN_RGB_GREEN = 4
PIN_RGB_BLUE = 5
STATUS_HIGH = 1
STATUS_LOW = 0
| 13.666667 | 35 | 0.726829 |
33951047cb580c92cc135417795fb19669084249 | 3,279 | py | Python | python/test/test_metadata_apis.py | sma-h/openapc-de | 0ec2d42d525219d801f71538f5b30ca6fecd9d3a | [
"Cube"
] | 89 | 2015-02-13T13:46:06.000Z | 2022-03-13T16:42:44.000Z | python/test/test_metadata_apis.py | sma-h/openapc-de | 0ec2d42d525219d801f71538f5b30ca6fecd9d3a | [
"Cube"
] | 91 | 2015-03-12T13:31:36.000Z | 2022-01-14T07:37:37.000Z | python/test/test_metadata_apis.py | sma-h/openapc-de | 0ec2d42d525219d801f71538f5b30ca6fecd9d3a | [
"Cube"
] | 138 | 2015-03-04T15:23:43.000Z | 2022-03-09T15:11:52.000Z | # -*- coding: UTF-8 -*-
import os
from sys import path
from time import sleep
from urllib.request import urlretrieve
import pytest
import warnings
path.append(os.path.join(path[0], "python"))
import openapc_toolkit as oat
CROSSREF_METADATA_TEST_CASES = {
"10.3390/robotics6020009": { # journal_article
's... | 34.515789 | 132 | 0.594084 |
1d7e74a36b8ce6e0bcde22d3219b2e0fbb84a230 | 2,127 | py | Python | display/_dmx_menu_view.py | ihrigb/stagebuzzer | dbce1c5fa59a6f22e74d84ccc96d4d1a28a5b680 | [
"Apache-2.0"
] | null | null | null | display/_dmx_menu_view.py | ihrigb/stagebuzzer | dbce1c5fa59a6f22e74d84ccc96d4d1a28a5b680 | [
"Apache-2.0"
] | null | null | null | display/_dmx_menu_view.py | ihrigb/stagebuzzer | dbce1c5fa59a6f22e74d84ccc96d4d1a28a5b680 | [
"Apache-2.0"
] | null | null | null | from ._button_lights import ButtonLights
from ._view import View
from ._display import Display
from config import DmxConfig
dmx_menu_view_name = "dmx_menu_view"
active_cursor_value = 1
buzzer_1_cursor_value = 2
buzzer_2_cursor_value = 3
min_cursor_value = active_cursor_value
max_cursor_value = buzzer_2_cursor_value
... | 26.5875 | 75 | 0.601316 |
7f716976425e5eabfb2654d48f18452072c458aa | 1,838 | py | Python | process_video/draw_region.py | Vuong02011996/opencv_tools | 82e4ff6dc42d3dc404dbdb7b4bec0d267af56daa | [
"MIT"
] | null | null | null | process_video/draw_region.py | Vuong02011996/opencv_tools | 82e4ff6dc42d3dc404dbdb7b4bec0d267af56daa | [
"MIT"
] | null | null | null | process_video/draw_region.py | Vuong02011996/opencv_tools | 82e4ff6dc42d3dc404dbdb7b4bec0d267af56daa | [
"MIT"
] | null | null | null | import cv2
all_point = []
def shape_selection(event, x, y, flags, param):
# grab references to the global variables
global ref_point, crop
# if the left mouse button was clicked, record the starting
# (x, y) coordinates and indicate that cropping is being performed
if event == cv2.EVENT_LBUTTOND... | 29.645161 | 74 | 0.621872 |
f6e58800bdf5ff4279af74ce5534ea733d0aae45 | 540 | py | Python | 705A-hulk.py | spreusler/codeforces-loesungen | cc8ddcc8a3c5a25906dc92ad001f7e9570a62de3 | [
"MIT"
] | null | null | null | 705A-hulk.py | spreusler/codeforces-loesungen | cc8ddcc8a3c5a25906dc92ad001f7e9570a62de3 | [
"MIT"
] | null | null | null | 705A-hulk.py | spreusler/codeforces-loesungen | cc8ddcc8a3c5a25906dc92ad001f7e9570a62de3 | [
"MIT"
] | null | null | null | # Name: 705 A. Hulk
# URL: https://codeforces.com/problemset/problem/705/A
# Language: Python 3.x
def main():
# Einlesen des Inputs als Integer Wert
n = int(input())
# Erzeugt eine Liste a mit n Wiederholungen
a = ["hate", "love"] * n
# a[:n] entspricht der Liste a bis einschließlich n-ter Stelle... | 28.421053 | 71 | 0.640741 |
1206a96b6cdfdb3d3a2ab8b77966d74f40e64bdc | 421 | py | Python | Algorithms/BitManipulation/CounterGame.py | baby5/HackerRank | 1e68a85f40499adb9b52a4da16936f85ac231233 | [
"MIT"
] | null | null | null | Algorithms/BitManipulation/CounterGame.py | baby5/HackerRank | 1e68a85f40499adb9b52a4da16936f85ac231233 | [
"MIT"
] | null | null | null | Algorithms/BitManipulation/CounterGame.py | baby5/HackerRank | 1e68a85f40499adb9b52a4da16936f85ac231233 | [
"MIT"
] | null | null | null | #coding:utf-8
for _ in xrange(input()):
N = input()
count = 0
while N > 1:
n = 1
tmp = N
num = 0
while tmp > 1:
tmp >>= 1
n <<= 1
num += 1
if N == n:
count += num
break
else:
N -= n
... | 15.592593 | 25 | 0.332542 |
c3cc4226ae48d2e5aeaecbdb5e3ad7ddfd28804c | 7,716 | py | Python | test/test_npu/test_network_ops/test_log10.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_log10.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_log10.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... | 41.934783 | 83 | 0.611975 |
7f1d4523898a3047ddd1bf4a73e231bbf37849c7 | 10,142 | py | Python | src/onegov/winterthur/roadwork.py | politbuero-kampagnen/onegov-cloud | 20148bf321b71f617b64376fe7249b2b9b9c4aa9 | [
"MIT"
] | null | null | null | src/onegov/winterthur/roadwork.py | politbuero-kampagnen/onegov-cloud | 20148bf321b71f617b64376fe7249b2b9b9c4aa9 | [
"MIT"
] | null | null | null | src/onegov/winterthur/roadwork.py | politbuero-kampagnen/onegov-cloud | 20148bf321b71f617b64376fe7249b2b9b9c4aa9 | [
"MIT"
] | null | null | null | import isodate
import pycurl
import sedate
from cached_property import cached_property
from datetime import datetime, timedelta
from io import BytesIO
from onegov.core.custom import json
from pathlib import Path
from purl import URL
class RoadworkError(Exception):
pass
class RoadworkConnectionError(RoadworkErr... | 28.569014 | 79 | 0.576514 |
614f04e5a4afbbc79886ca1efa2f195738fad175 | 86 | py | Python | python/python_backup/PRAC_PYTHON/13_File.py | SayanGhoshBDA/code-backup | 8b6135facc0e598e9686b2e8eb2d69dd68198b80 | [
"MIT"
] | 16 | 2018-11-26T08:39:42.000Z | 2019-05-08T10:09:52.000Z | python/python_backup/PRAC_PYTHON/13_File.py | SayanGhoshBDA/code-backup | 8b6135facc0e598e9686b2e8eb2d69dd68198b80 | [
"MIT"
] | 8 | 2020-05-04T06:29:26.000Z | 2022-02-12T05:33:16.000Z | python/python_backup/PRAC_PYTHON/13_File.py | SayanGhoshBDA/code-backup | 8b6135facc0e598e9686b2e8eb2d69dd68198b80 | [
"MIT"
] | 5 | 2020-02-11T16:02:21.000Z | 2021-02-05T07:48:30.000Z | def write_multiple_items(text 3.txt,',', *args):
file.write(separator.join(args)) | 43 | 49 | 0.709302 |
618347278c229efdd001083a3fa45e6e57445cc1 | 3,722 | py | Python | deprecated/benchmark/reader/transformation.py | hutuxian/FleetX | 843c7aa33f5a14680becf058a3aaf0327eefafd4 | [
"Apache-2.0"
] | 170 | 2020-08-12T12:07:01.000Z | 2022-03-07T02:38:26.000Z | deprecated/benchmark/reader/transformation.py | hutuxian/FleetX | 843c7aa33f5a14680becf058a3aaf0327eefafd4 | [
"Apache-2.0"
] | 195 | 2020-08-13T03:22:15.000Z | 2022-03-30T07:40:25.000Z | deprecated/benchmark/reader/transformation.py | hutuxian/FleetX | 843c7aa33f5a14680becf058a3aaf0327eefafd4 | [
"Apache-2.0"
] | 67 | 2020-08-14T02:07:46.000Z | 2022-03-28T10:05:33.000Z | #!/usr/bin/env python
#coding:utf-8
from __future__ import division
from __future__ import print_function
import numpy as np
import math
from PIL import Image
import cv2
def resize_short(img, target_size):
percent = float(target_size) / min(img.shape[0], img.shape[1])
resize_width = int(round(img.shape[1] * p... | 32.365217 | 109 | 0.591349 |
f61c0565127a3c1f3dc96692a0b9f73d7e595e2e | 28,737 | py | Python | feedcrawler/crawler.py | rix1337/RSScrawler | 5a1c067148310c03321329d3fa409a4e4144fce7 | [
"MIT"
] | 63 | 2016-03-21T21:35:07.000Z | 2021-03-20T22:50:34.000Z | feedcrawler/crawler.py | rix1337/RSScrawler | 5a1c067148310c03321329d3fa409a4e4144fce7 | [
"MIT"
] | 200 | 2016-03-15T21:45:26.000Z | 2021-04-03T10:47:45.000Z | feedcrawler/crawler.py | rix1337/RSScrawler | 5a1c067148310c03321329d3fa409a4e4144fce7 | [
"MIT"
] | 25 | 2016-03-15T20:44:33.000Z | 2020-10-25T09:43:48.000Z | # -*- coding: utf-8 -*-
# FeedCrawler
# Projekt von https://github.com/rix1337
"""FeedCrawler.
Usage:
crawler.py [--config="<CFGPFAD>"]
[--test_run]
[--docker]
[--port=<PORT>]
[--jd-user=<NUTZERNAME>]
[--jd-pass=<PASSWORT>]
... | 49.123077 | 141 | 0.453074 |
259fba12bb223f821ae06d39f649b0c52ea1d481 | 1,221 | py | Python | save_info.py | PabloFreitasUfsc/bist-du-da | 551dc29ec07bc182e12d86d4ee5e103a98089de4 | [
"MIT"
] | null | null | null | save_info.py | PabloFreitasUfsc/bist-du-da | 551dc29ec07bc182e12d86d4ee5e103a98089de4 | [
"MIT"
] | null | null | null | save_info.py | PabloFreitasUfsc/bist-du-da | 551dc29ec07bc182e12d86d4ee5e103a98089de4 | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
# =============================================================================
# Created By : Pablo Freitas Santos
# Created Date: 19.07.2021
# =============================================================================
"""The Module Has Been Build for..."""
# Referenc... | 35.911765 | 85 | 0.47502 |
6c92908bcf92e794d0656c2596ec2ea6b6118d59 | 241 | py | Python | django/web/models.py | cyberjacob/Eventlr | a1474ab73d50b08d4bd21ec83830105b2632ecfa | [
"MIT"
] | null | null | null | django/web/models.py | cyberjacob/Eventlr | a1474ab73d50b08d4bd21ec83830105b2632ecfa | [
"MIT"
] | null | null | null | django/web/models.py | cyberjacob/Eventlr | a1474ab73d50b08d4bd21ec83830105b2632ecfa | [
"MIT"
] | null | null | null | from django.db import models
# Create your models here.
class User(models.Model):
username = models.CharField(max_length=100)
activated = models.BooleanField()
class Event(models.Model):
name = models.CharField(max_length=100)
| 24.1 | 47 | 0.746888 |
9f7d2ec647d29f3815e66c9e3e70a3fd663e2d7c | 13,857 | py | Python | Packs/DevSecOps/Integrations/LGTM/LGTM.py | diCagri/content | c532c50b213e6dddb8ae6a378d6d09198e08fc9f | [
"MIT"
] | 799 | 2016-08-02T06:43:14.000Z | 2022-03-31T11:10:11.000Z | Packs/DevSecOps/Integrations/LGTM/LGTM.py | diCagri/content | c532c50b213e6dddb8ae6a378d6d09198e08fc9f | [
"MIT"
] | 9,317 | 2016-08-07T19:00:51.000Z | 2022-03-31T21:56:04.000Z | Packs/DevSecOps/Integrations/LGTM/LGTM.py | diCagri/content | c532c50b213e6dddb8ae6a378d6d09198e08fc9f | [
"MIT"
] | 1,297 | 2016-08-04T13:59:00.000Z | 2022-03-31T23:43:06.000Z | import demistomock as demisto
import urllib3
from CommonServerPython import *
class Client(BaseClient):
def __init__(self, server_url, verify, proxy, headers, auth):
super().__init__(base_url=server_url, verify=verify, proxy=proxy, headers=headers, auth=auth)
def abort_upload_request(self, session_id... | 32.300699 | 118 | 0.677997 |
e234dc749dd04c206ddf3d5695dce730a0db50d5 | 298 | py | Python | src/php-fpm.py | magistersart/ZTC_fork | ce72734ea575d9846b5b81f3efbfd14fa1f7e532 | [
"PostgreSQL"
] | null | null | null | src/php-fpm.py | magistersart/ZTC_fork | ce72734ea575d9846b5b81f3efbfd14fa1f7e532 | [
"PostgreSQL"
] | null | null | null | src/php-fpm.py | magistersart/ZTC_fork | ce72734ea575d9846b5b81f3efbfd14fa1f7e532 | [
"PostgreSQL"
] | null | null | null | #!/usr/bin/python
"""
PHP FPM check script
This file is part of ZTC and distributed under the same license.
http://bitbucket.org/rvs/ztc/
Copyright (c) 2011 Vladimir Rusinov <vladimir@greenmice.info>
"""
from ztc.php.fpm import PHPFPMCheck
p = PHPFPMCheck()
m = p.args[0]
p.get(m, *p.args[1:])
| 18.625 | 64 | 0.714765 |
e23bce8e5f84fbb8c31762908c8b87f11f08ba89 | 17,735 | py | Python | experimental/XMLSnippet/XMLSnippetParser.py | jecki/DHParser | c6c1bd7db2de85b5997a3640242f4f444532304e | [
"Apache-2.0"
] | 2 | 2020-12-25T19:37:42.000Z | 2021-03-26T04:59:12.000Z | experimental/XMLSnippet/XMLSnippetParser.py | jecki/DHParser | c6c1bd7db2de85b5997a3640242f4f444532304e | [
"Apache-2.0"
] | 6 | 2018-08-07T22:48:52.000Z | 2021-10-07T18:38:20.000Z | experimental/XMLSnippet/XMLSnippetParser.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... | 38.470716 | 456 | 0.588948 |
2cc4d683f892fdf2988d1cfddb6755ab6838873e | 1,229 | py | Python | seq2csv.py | McSvenster/sammelsurium | 9e85ac623cfcc5d2c1ce6b31f025420514967b7a | [
"MIT"
] | null | null | null | seq2csv.py | McSvenster/sammelsurium | 9e85ac623cfcc5d2c1ce6b31f025420514967b7a | [
"MIT"
] | null | null | null | seq2csv.py | McSvenster/sammelsurium | 9e85ac623cfcc5d2c1ce6b31f025420514967b7a | [
"MIT"
] | null | null | null | #!/bin/env python
###
# Skript um Daten aus Aleph sequential in csv zu schreiben
# ETH Library: Sven Koesling
# Oktober 2018
import sys
import re
inputfile = sys.argv[1]
fields = {"245": "$$a", "100": "$$a", "260": "$$c", "PST": "$$j"}
outputfile = open("ausgabe.csv", "w")
rec = { "100": "Autor", "245": "Titel", "2... | 36.147059 | 111 | 0.534581 |
1a7d3616f8b97a59e5521076ad19051daa2c63f6 | 614 | py | Python | tag_1/p_4_6_wort_in_satz_finden.py | techrabbit58/uebung_informatik_vorkurs | e99312ae66ccccd6bfe45bfd3c3f43c01690659c | [
"Unlicense"
] | null | null | null | tag_1/p_4_6_wort_in_satz_finden.py | techrabbit58/uebung_informatik_vorkurs | e99312ae66ccccd6bfe45bfd3c3f43c01690659c | [
"Unlicense"
] | null | null | null | tag_1/p_4_6_wort_in_satz_finden.py | techrabbit58/uebung_informatik_vorkurs | e99312ae66ccccd6bfe45bfd3c3f43c01690659c | [
"Unlicense"
] | null | null | null | """
4 Listen (Tag 1)
4.6 Lass die Benutzerin einen Satz und ein Wort eingeben. Finde heraus, ob das Wort im Satz
vorkommt und gib das Ergebnis zurück.
Beispiel:
- Eingabe: 'Anneliese sitzt im Home Office am PC und arbeitet.' und 'Office'
- Antwort: Das Wort kommt im gegebenen Satz vor.
"""
if __name__ == '__m... | 29.238095 | 91 | 0.625407 |
37be7579efa1c30780e6316f064fa78e15a4614b | 452 | py | Python | pacman-termux/test/pacman/tests/remove-directory-replaced-with-symlink.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/remove-directory-replaced-with-symlink.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/remove-directory-replaced-with-symlink.py | Scottx86-64/dotfiles-1 | 51004b1e2b032664cce6b553d2052757c286087d | [
"Unlicense"
] | 1 | 2021-09-26T08:44:40.000Z | 2021-09-26T08:44:40.000Z | self.description = "remove a package with a directory that has been replaced with a symlink"
self.filesystem = [ "var/", "srv -> var/" ]
lpkg = pmpkg("pkg1")
lpkg.files = ["srv/"]
self.addpkg2db("local", lpkg)
self.args = "-R %s" % (lpkg.name)
self.addrule("PACMAN_RETCODE=0")
self.addrule("DIR_EXIST=var/")
self.add... | 26.588235 | 92 | 0.70354 |
b321659c641227cb823ba88308f3d523dea358cf | 979 | py | Python | python_experiments/time_out_util.py | RapidsAtHKUST/SimRank | 3a601b08f9a3c281e2b36b914e06aba3a3a36118 | [
"MIT"
] | 8 | 2020-04-14T23:17:00.000Z | 2021-06-21T12:34:04.000Z | python_experiments/time_out_util.py | RapidsAtHKUST/SimRank | 3a601b08f9a3c281e2b36b914e06aba3a3a36118 | [
"MIT"
] | null | null | null | python_experiments/time_out_util.py | RapidsAtHKUST/SimRank | 3a601b08f9a3c281e2b36b914e06aba3a3a36118 | [
"MIT"
] | 1 | 2021-01-17T16:26:50.000Z | 2021-01-17T16:26:50.000Z | import shlex
import subprocess
from threading import Timer
def run_with_timeout(cmd, timeout_sec, env=None):
global is_time_out
is_time_out = False
if env is None:
proc = subprocess.Popen(shlex.split(cmd), stdout=subprocess.PIPE, stderr=subprocess.PIPE)
else:
proc = subprocess.Popen(sh... | 28.794118 | 106 | 0.663943 |
b3615a151c10cb43c9af8d2db5469627c3d29d2e | 2,764 | py | Python | Packs/DeveloperTools/Scripts/CompareIndicators/CompareIndicators.py | diCagri/content | c532c50b213e6dddb8ae6a378d6d09198e08fc9f | [
"MIT"
] | 799 | 2016-08-02T06:43:14.000Z | 2022-03-31T11:10:11.000Z | Packs/DeveloperTools/Scripts/CompareIndicators/CompareIndicators.py | diCagri/content | c532c50b213e6dddb8ae6a378d6d09198e08fc9f | [
"MIT"
] | 9,317 | 2016-08-07T19:00:51.000Z | 2022-03-31T21:56:04.000Z | Packs/DeveloperTools/Scripts/CompareIndicators/CompareIndicators.py | diCagri/content | c532c50b213e6dddb8ae6a378d6d09198e08fc9f | [
"MIT"
] | 1,297 | 2016-08-04T13:59:00.000Z | 2022-03-31T23:43:06.000Z | from typing import Tuple, Iterable
import demistomock as demisto # noqa: F401
from CommonServerPython import * # noqa: F401
from netaddr import IPSet, IPRange
import re
CIDR_RE = re.compile(ipv4cidrRegex)
IP_RE = re.compile(ipv4Regex)
def extract_list_from_args(args: dict, list_key: str) -> List[str]:
ioc_lis... | 31.05618 | 108 | 0.650868 |
2ff2679d195dbda68e0a4cfc5d490dc467320dad | 355 | py | Python | 1_DeepLearning-Basics/06_Boston_Dataset_Regression/visualization.py | felixdittrich92/DeepLearning-tensorflow-keras | 2880d8ed28ba87f28851affa92b6fa99d2e47be9 | [
"Apache-2.0"
] | null | null | null | 1_DeepLearning-Basics/06_Boston_Dataset_Regression/visualization.py | felixdittrich92/DeepLearning-tensorflow-keras | 2880d8ed28ba87f28851affa92b6fa99d2e47be9 | [
"Apache-2.0"
] | null | null | null | 1_DeepLearning-Basics/06_Boston_Dataset_Regression/visualization.py | felixdittrich92/DeepLearning-tensorflow-keras | 2880d8ed28ba87f28851affa92b6fa99d2e47be9 | [
"Apache-2.0"
] | null | null | null | import os
import numpy as np
import pandas as pd
import matplotlib.pyplot as plt
from sklearn.datasets import load_boston
dataset = load_boston()
x = dataset.data
y = dataset.target
df = pd.DataFrame(x, columns=dataset.feature_names)
df["y"] = y
print(df.head(n=10))
print(df.info())
print(df.describe())
df.hist(b... | 16.904762 | 51 | 0.735211 |
445cd5f87002412e0b20646a57211417726a779a | 6,401 | py | Python | research/cv/FaceQualityAssessment/postprocess.py | leelige/mindspore | 5199e05ba3888963473f2b07da3f7bca5b9ef6dc | [
"Apache-2.0"
] | 77 | 2021-10-15T08:32:37.000Z | 2022-03-30T13:09:11.000Z | research/cv/FaceQualityAssessment/postprocess.py | leelige/mindspore | 5199e05ba3888963473f2b07da3f7bca5b9ef6dc | [
"Apache-2.0"
] | 3 | 2021-10-30T14:44:57.000Z | 2022-02-14T06:57:57.000Z | research/cv/FaceQualityAssessment/postprocess.py | leelige/mindspore | 5199e05ba3888963473f2b07da3f7bca5b9ef6dc | [
"Apache-2.0"
] | 24 | 2021-10-15T08:32:45.000Z | 2022-03-24T18:45:20.000Z | # Copyright 2020-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 agre... | 36.577143 | 106 | 0.627871 |
92a6e1ad639193e1f71c395f3957cb9bb207c27a | 3,663 | py | Python | classic-rock/compiling_radio.py | h4ckfu/data | bdc02fd5051dfb31e42f8e078832ceead92f9958 | [
"CC-BY-4.0"
] | 16,124 | 2015-01-01T06:18:12.000Z | 2022-03-31T00:46:52.000Z | classic-rock/compiling_radio.py | h4ckfu/data | bdc02fd5051dfb31e42f8e078832ceead92f9958 | [
"CC-BY-4.0"
] | 179 | 2015-01-07T10:19:57.000Z | 2022-02-21T21:19:14.000Z | classic-rock/compiling_radio.py | h4ckfu/data | bdc02fd5051dfb31e42f8e078832ceead92f9958 | [
"CC-BY-4.0"
] | 12,163 | 2015-01-03T14:23:36.000Z | 2022-03-31T10:10:23.000Z | def hr_pull(x,y):
iteration = 0
callsign = x[2]
new_filename = callsign + ".txt"
songlist = ""
while (iteration < y):
iteration = iteration + 1
filename = callsign + str(iteration).rjust(3,'0') + ".txt"
readfile = open(filename,"r")
newchunk = readfile.read()
songlist = newchunk + "\n" + songlist
readf... | 33.3 | 97 | 0.670762 |
2bfdf0cc933551e1b5b858d7cd4c69dcb8420ce0 | 462 | py | Python | opencv_tutorial/opencv3_youtube/prog08.py | zeroam/TIL | 43e3573be44c7f7aa4600ff8a34e99a65cbdc5d1 | [
"MIT"
] | null | null | null | opencv_tutorial/opencv3_youtube/prog08.py | zeroam/TIL | 43e3573be44c7f7aa4600ff8a34e99a65cbdc5d1 | [
"MIT"
] | null | null | null | opencv_tutorial/opencv3_youtube/prog08.py | zeroam/TIL | 43e3573be44c7f7aa4600ff8a34e99a65cbdc5d1 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
"""
Created on Mon Mar 25 15:34:40 2019
@author: jone
"""
import cv2
import os.path
def main():
img_path = os.path.join('Dataset', 'lena_color_512.tif')
img1 = cv2.imread(img_path, 1)
print(type(img1))
print(img1.dtype)
print(img1.shape)
print(img1.ndim)
... | 17.111111 | 60 | 0.597403 |
5bbe8c76229b21272ede1003e89bfba033ea7aa8 | 1,547 | py | Python | etc code/video2openpose.py | gusghrlrl101/Dance-Helper | e9f5f6168f1dc6944c25cc8ff7eb829791fe484c | [
"MIT"
] | 11 | 2019-06-17T02:59:01.000Z | 2021-05-24T14:10:04.000Z | etc code/video2openpose.py | RabbitG29/Dance-Helper | e9f5f6168f1dc6944c25cc8ff7eb829791fe484c | [
"MIT"
] | null | null | null | etc code/video2openpose.py | RabbitG29/Dance-Helper | e9f5f6168f1dc6944c25cc8ff7eb829791fe484c | [
"MIT"
] | 3 | 2019-06-17T02:59:32.000Z | 2019-07-03T04:31:30.000Z | import cv2
import pyopenpose as op
import numpy as np
import pickle
def adjust_gamma(image, gamma=1.0):
image = image / 255.0
image = cv2.pow(image, 1.0 / gamma)
return np.uint8(image * 255)
cap = cv2.VideoCapture('user4.mp4')
video_h = int(cap.get(cv2.CAP_PROP_FRAME_HEIGHT))
video_w = int(cap.get(... | 19.098765 | 53 | 0.635423 |
751e31f808ce58884fd4b43c353683ce1ee074d3 | 337 | py | Python | Curso_Python/Secao4-Python-introducao-a-programacao-orientada-a-objetos-POO/099_associacao/main.py | pedrohd21/Cursos-Feitos | b223aad83867bfa45ad161d133e33c2c200d42bd | [
"MIT"
] | null | null | null | Curso_Python/Secao4-Python-introducao-a-programacao-orientada-a-objetos-POO/099_associacao/main.py | pedrohd21/Cursos-Feitos | b223aad83867bfa45ad161d133e33c2c200d42bd | [
"MIT"
] | null | null | null | Curso_Python/Secao4-Python-introducao-a-programacao-orientada-a-objetos-POO/099_associacao/main.py | pedrohd21/Cursos-Feitos | b223aad83867bfa45ad161d133e33c2c200d42bd | [
"MIT"
] | null | null | null | from classes import Escritor, Caneta, MaquinaDeEscrever
escritor = Escritor('Joanzinho')
caneta = Caneta('Bic')
maquina = MaquinaDeEscrever()
# print(escritor.nome)
# print(caneta.marca)
# maquina.escrever()
escritor.ferramenta = caneta
escritor.ferramenta.escrever()
escritor.ferramenta = maquina
escritor.ferrame... | 16.85 | 55 | 0.774481 |
45f2019557af8777c40558db7a8c850ab2b1000a | 4,996 | py | Python | launcher.py | austinweis/mp-tetris | b8d0f8ca907414c93962facd79c1e19fdf214394 | [
"MIT"
] | 1 | 2022-02-23T18:19:13.000Z | 2022-02-23T18:19:13.000Z | launcher.py | austinweis/mp-tetris | b8d0f8ca907414c93962facd79c1e19fdf214394 | [
"MIT"
] | null | null | null | launcher.py | austinweis/mp-tetris | b8d0f8ca907414c93962facd79c1e19fdf214394 | [
"MIT"
] | null | null | null | #!/usr/bin/python3
from src import gui
def switch_scene(new_scene):
global previous_scene, current_scene
gui.hide_all(screen)
for element in new_scene.gui:
element.toggle()
previous_scene = current_scene
current_scene = new_scene
def main():
import pygame, sys, threading
... | 37.283582 | 133 | 0.566853 |
945bcaaec174a3bd7d58f49e7eda7958797e3ac7 | 48,255 | py | Python | src/onegov/org/cli.py | politbuero-kampagnen/onegov-cloud | 20148bf321b71f617b64376fe7249b2b9b9c4aa9 | [
"MIT"
] | null | null | null | src/onegov/org/cli.py | politbuero-kampagnen/onegov-cloud | 20148bf321b71f617b64376fe7249b2b9b9c4aa9 | [
"MIT"
] | null | null | null | src/onegov/org/cli.py | politbuero-kampagnen/onegov-cloud | 20148bf321b71f617b64376fe7249b2b9b9c4aa9 | [
"MIT"
] | null | null | null | """ Provides commands used to initialize org websites. """
import sys
from io import BytesIO
from pathlib import Path
import click
import html
import isodate
import re
import requests
import shutil
import textwrap
from cached_property import cached_property
from collections import defaultdict
from datetime import dat... | 35.299927 | 79 | 0.54384 |
84de3424d5090d25bcb4439950a6de8c0c25bd58 | 1,719 | py | Python | propeller/motor.py | HackYourOffice/monitoring-with-intelligence | 9ae3226e2b4e87d21d764c33c4bb6e621892be1b | [
"Unlicense"
] | 2 | 2017-11-17T15:14:11.000Z | 2017-11-17T23:04:39.000Z | propeller/motor.py | HackYourOffice/monitoring-with-intelligence | 9ae3226e2b4e87d21d764c33c4bb6e621892be1b | [
"Unlicense"
] | null | null | null | propeller/motor.py | HackYourOffice/monitoring-with-intelligence | 9ae3226e2b4e87d21d764c33c4bb6e621892be1b | [
"Unlicense"
] | null | null | null | #!/usr/bin/env python
import RPi.GPIO as GPIO
import time
from flask import Flask
from flask import jsonify
MotorPin_A = 13
MotorPin_B = 12
app = Flask(__name__)
@app.route('/')
def hello_world():
return jsonify(result='Hello World')
@app.route('/api/motor/on')
def motor_on():
motor(1,1)
return jsonify(motor=G... | 20.464286 | 75 | 0.702152 |
ca877bfcb7b195b07fe8c39c8dac0df898727509 | 641 | py | Python | Algorithms/Implementation/Flatland.py | baby5/HackerRank | 1e68a85f40499adb9b52a4da16936f85ac231233 | [
"MIT"
] | null | null | null | Algorithms/Implementation/Flatland.py | baby5/HackerRank | 1e68a85f40499adb9b52a4da16936f85ac231233 | [
"MIT"
] | null | null | null | Algorithms/Implementation/Flatland.py | baby5/HackerRank | 1e68a85f40499adb9b52a4da16936f85ac231233 | [
"MIT"
] | null | null | null | #coding:utf-8
n, m = map(int, raw_input().split())
c_list = sorted(map(int, raw_input().split()))
cur = 0
pre_value = None
dis_list = []
for i in xrange(n):
if cur == m:
dis_list.append(i - pre_value)
elif i < c_list[cur] and pre_value == None:
cur_value = c_list[cur]
dis_list.ap... | 23.740741 | 54 | 0.597504 |
b6ee44eac7c368fb86510ac3c437e9aacf360f87 | 7,106 | py | Python | Properties/API/FileLevel.py | NazaninBayati/SCA | 74e670462dd0da5e24147aab86df393b38405176 | [
"MIT"
] | null | null | null | Properties/API/FileLevel.py | NazaninBayati/SCA | 74e670462dd0da5e24147aab86df393b38405176 | [
"MIT"
] | null | null | null | Properties/API/FileLevel.py | NazaninBayati/SCA | 74e670462dd0da5e24147aab86df393b38405176 | [
"MIT"
] | null | null | null | import understand
import sys
file_list=[]
final_list=[]
file_dependency=[]
file_dependentby=[]
cls_CallPairs=[]
CallPairs=[]
def included_files(db):
for file in sorted(db.ents("File")):
file_dependency.append(list(file.depends()))
def used_by_file(db):
for file in sorted(db.ents("File")):
file... | 28.086957 | 136 | 0.586124 |
6d26a8f2418c1dcc37f0ee443371767cf2217577 | 1,683 | py | Python | migrations/versions/7afc40e11791_.py | DanielGrams/gsevp | e94034f7b64de76f38754b56455e83092378261f | [
"MIT"
] | 1 | 2021-06-01T14:49:18.000Z | 2021-06-01T14:49:18.000Z | migrations/versions/7afc40e11791_.py | DanielGrams/gsevp | e94034f7b64de76f38754b56455e83092378261f | [
"MIT"
] | 286 | 2020-12-04T14:13:00.000Z | 2022-03-09T19:05:16.000Z | migrations/versions/7afc40e11791_.py | DanielGrams/gsevpt | a92f71694388e227e65ed1b24446246ee688d00e | [
"MIT"
] | null | null | null | """empty message
Revision ID: 7afc40e11791
Revises: a8c662c46047
Create Date: 2020-09-28 10:38:46.424791
"""
import sqlalchemy as sa
from alembic import op
from project import dbtypes
from project.models import FeaturedEventRejectionReason, FeaturedEventReviewStatus
# revision identifiers, used by Alembic.
revision... | 28.525424 | 82 | 0.622103 |
edd660d908d577e961c7f6059ebaac3b701eff65 | 1,320 | py | Python | solutions/pedestrian_search/webserver/src/service/search.py | naetimus/bootcamp | 0182992df7c54012944b51fe9b70532ab6a0059b | [
"Apache-2.0"
] | 1 | 2021-01-11T18:40:22.000Z | 2021-01-11T18:40:22.000Z | solutions/pedestrian_search/webserver/src/service/search.py | naetimus/bootcamp | 0182992df7c54012944b51fe9b70532ab6a0059b | [
"Apache-2.0"
] | null | null | null | solutions/pedestrian_search/webserver/src/service/search.py | naetimus/bootcamp | 0182992df7c54012944b51fe9b70532ab6a0059b | [
"Apache-2.0"
] | null | null | null | import logging
from common.const import default_cache_dir
from indexer.index import milvus_client, create_table, insert_vectors, delete_table, search_vectors, create_index
from diskcache import Cache
from preprocessor.preprocess import extract_caption_feat
from common.const import default_cache_dir
def query_name_fro... | 33.846154 | 113 | 0.661364 |
edf2c314a84904716bebc3737e5b46f8c671d705 | 2,555 | py | Python | mongodb/mongodb_consistent_backup/official/mongodb_consistent_backup/Archive/Tar/TarThread.py | smthkissinger/docker-images | 35e868295d04fa780325ada4168381f1e80e8fe4 | [
"BSD-3-Clause"
] | 282 | 2016-06-16T14:41:44.000Z | 2022-03-02T03:43:02.000Z | mongodb/mongodb_consistent_backup/official/mongodb_consistent_backup/Archive/Tar/TarThread.py | smthkissinger/docker-images | 35e868295d04fa780325ada4168381f1e80e8fe4 | [
"BSD-3-Clause"
] | 146 | 2016-06-16T08:55:45.000Z | 2020-09-08T10:37:32.000Z | mongodb/mongodb_consistent_backup/official/mongodb_consistent_backup/Archive/Tar/TarThread.py | smthkissinger/docker-images | 35e868295d04fa780325ada4168381f1e80e8fe4 | [
"BSD-3-Clause"
] | 94 | 2016-06-16T10:49:07.000Z | 2022-03-28T09:14:03.000Z | import os
import logging
from mongodb_consistent_backup.Common import LocalCommand
from mongodb_consistent_backup.Pipeline import PoolThread
class TarThread(PoolThread):
def __init__(self, backup_dir, output_file, compression='none', verbose=False, binary="tar"):
super(TarThread, self).__init__(self.__cl... | 39.921875 | 103 | 0.558904 |
1ea44d19d41e6b605dc02eefd404628a5c7e7b26 | 1,296 | py | Python | Code/guidetable.py | knirschl/Proseminar-Anthropomatik | 0408e54cf220c40a6f3deae6ae8d38c5f1f4f387 | [
"MIT"
] | null | null | null | Code/guidetable.py | knirschl/Proseminar-Anthropomatik | 0408e54cf220c40a6f3deae6ae8d38c5f1f4f387 | [
"MIT"
] | null | null | null | Code/guidetable.py | knirschl/Proseminar-Anthropomatik | 0408e54cf220c40a6f3deae6ae8d38c5f1f4f387 | [
"MIT"
] | null | null | null | import numpy as np
class GuideTable:
def __init__(self, N, f_inv) -> None:
self.T = []
self.PS = np.array([])
self.N = N
self.f_inv = f_inv
for i in range(0, self.N):
self.T.append(self.f_inv(i / self.N))
self.T = np.array(self.T)
def setup_parti... | 25.92 | 57 | 0.469136 |
94d0ac68d3ef0ea4db8f0ab0c9e5bb006a7cb9f6 | 1,707 | py | Python | frds/measures/func_hhi_index.py | mgao6767/wrds | 7dca2651a181bf38c61ebde675c9f64d6c96f608 | [
"MIT"
] | 31 | 2020-06-17T13:19:12.000Z | 2022-03-27T08:56:38.000Z | frds/measures/func_hhi_index.py | mgao6767/wrds | 7dca2651a181bf38c61ebde675c9f64d6c96f608 | [
"MIT"
] | null | null | null | frds/measures/func_hhi_index.py | mgao6767/wrds | 7dca2651a181bf38c61ebde675c9f64d6c96f608 | [
"MIT"
] | 8 | 2020-06-14T15:21:51.000Z | 2021-09-29T06:28:53.000Z | import numpy as np
def hhi_index(firm_sizes: np.ndarray, weights: np.ndarray = None) -> float:
r"""Herfindahl–Hirschman Index
A common measure of market concentration, defined as
$$
H = \sum_{i=1}^{N} s_i^2
$$
where $s_i$ is firm $i$'s market share in the industry of $N$ firms.
Args:
... | 29.947368 | 123 | 0.615114 |
44d8957b567122b2e3f6411a089a1d75a7c19a51 | 248 | py | Python | Algorithms/Implementation/jumping_on_the_clouds_revisited.py | byung-u/HackerRank | 4c02fefff7002b3af774b99ebf8d40f149f9d163 | [
"MIT"
] | null | null | null | Algorithms/Implementation/jumping_on_the_clouds_revisited.py | byung-u/HackerRank | 4c02fefff7002b3af774b99ebf8d40f149f9d163 | [
"MIT"
] | null | null | null | Algorithms/Implementation/jumping_on_the_clouds_revisited.py | byung-u/HackerRank | 4c02fefff7002b3af774b99ebf8d40f149f9d163 | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
n, k = list(map(int, input().strip().split()))
c = list(map(int, input().strip().split()))
cost = 0
for i in range(0, len(c), k):
if c[i] == 0:
cost += 1
else: # - 1 - 2
cost += 3
print(100 - cost)
| 19.076923 | 46 | 0.5 |
15b264e0527c238c989cc8204caf6e6ef651edea | 505 | py | Python | Backend/models/crawl.py | dbvis-ukon/coronavis | f00374ac655c9d68541183d28ede6fe5536581dc | [
"Apache-2.0"
] | 15 | 2020-04-24T20:18:11.000Z | 2022-01-31T21:05:05.000Z | Backend/models/crawl.py | dbvis-ukon/coronavis | f00374ac655c9d68541183d28ede6fe5536581dc | [
"Apache-2.0"
] | 2 | 2021-05-19T07:15:09.000Z | 2022-03-07T08:29:34.000Z | Backend/models/crawl.py | dbvis-ukon/coronavis | f00374ac655c9d68541183d28ede6fe5536581dc | [
"Apache-2.0"
] | 4 | 2020-04-27T16:20:13.000Z | 2021-02-23T10:39:42.000Z | from sqlalchemy.dialects.postgresql import JSONB
from sqlalchemy.orm import deferred
from db import db
class Crawl(db.Model):
"""
Hospital data class
"""
__tablename__ = 'crawl'
id = db.Column(db.Integer, primary_key=True, autoincrement=True)
url = db.Column(db.String, nullable=False)
te... | 21.956522 | 68 | 0.675248 |
bd755113f60f33c89f273565bfd3ddf9c9ca404e | 331 | py | Python | textmining/com/aaron/loguru_test.py | qsunny/python | ace8c3178a9a9619de2b60ca242c2079dd2f825e | [
"MIT"
] | null | null | null | textmining/com/aaron/loguru_test.py | qsunny/python | ace8c3178a9a9619de2b60ca242c2079dd2f825e | [
"MIT"
] | 2 | 2021-03-25T22:00:07.000Z | 2022-01-20T15:51:48.000Z | textmining/com/aaron/loguru_test.py | qsunny/python | ace8c3178a9a9619de2b60ca242c2079dd2f825e | [
"MIT"
] | null | null | null | from loguru import logger
logger.add('D:/logs/z_project.log',
level='DEBUG',
format='{time:YYYY-MM-DD HH:mm:ss} - {level} - {file} - {line} - {message}',
rotation="10 MB")
logger.info('可以写日志了')
@logger.catch
def test():
'a' + 1
if __name__ == '__main__':
test()
logger.in... | 19.470588 | 87 | 0.561934 |
da4b93a3cd01202fada43872db90a5063da5fd13 | 827 | py | Python | jupyter_with_yarn/pyspark-notebook/test/test_spark.py | erikschmitt/DataScienceW20 | 599eea52a166d7f180a499f98a7bcca143657e68 | [
"Apache-2.0"
] | null | null | null | jupyter_with_yarn/pyspark-notebook/test/test_spark.py | erikschmitt/DataScienceW20 | 599eea52a166d7f180a499f98a7bcca143657e68 | [
"Apache-2.0"
] | null | null | null | jupyter_with_yarn/pyspark-notebook/test/test_spark.py | erikschmitt/DataScienceW20 | 599eea52a166d7f180a499f98a7bcca143657e68 | [
"Apache-2.0"
] | null | null | null | # Copyright (c) Jupyter Development Team.
# Distributed under the terms of the Modified BSD License.
import logging
LOGGER = logging.getLogger(__name__)
def test_spark_shell(container):
"""Checking if Spark (spark-shell) is running properly"""
c = container.run(
tty=True,
command=['start.sh'... | 26.677419 | 67 | 0.620314 |
e59e5b33d63fd6b3155fc315951e9ff65c45d4c5 | 283 | py | Python | LeetCode_problems/Jewels and Stones/solution.py | gbrls/CompetitiveCode | b6f1b817a655635c3c843d40bd05793406fea9c6 | [
"MIT"
] | 165 | 2020-10-03T08:01:11.000Z | 2022-03-31T02:42:08.000Z | LeetCode_problems/Jewels and Stones/solution.py | gbrls/CompetitiveCode | b6f1b817a655635c3c843d40bd05793406fea9c6 | [
"MIT"
] | 383 | 2020-10-03T07:39:11.000Z | 2021-11-20T07:06:35.000Z | LeetCode_problems/Jewels and Stones/solution.py | gbrls/CompetitiveCode | b6f1b817a655635c3c843d40bd05793406fea9c6 | [
"MIT"
] | 380 | 2020-10-03T08:05:04.000Z | 2022-03-19T06:56:59.000Z | class Solution:
def numJewelsInStones(self, J: str, S: str) -> int:
# maintain count of jewels
jewels = 0
# check how many jewels are in the string of stones
for j in J:
jewels += S.count(j)
return jewels
| 25.727273 | 59 | 0.522968 |
97b3b146fa7e5230b524e98a502951c2dc67d48d | 457 | py | Python | Imaginary/2021/crypto/neat-rsa/main.py | ruhan-islam/ctf-archives | 8c2bf6a608c821314d1a1cfaa05a6cccef8e3103 | [
"MIT"
] | 1 | 2021-11-02T20:53:58.000Z | 2021-11-02T20:53:58.000Z | Imaginary/2021/crypto/neat-rsa/main.py | ruhan-islam/ctf-archives | 8c2bf6a608c821314d1a1cfaa05a6cccef8e3103 | [
"MIT"
] | null | null | null | Imaginary/2021/crypto/neat-rsa/main.py | ruhan-islam/ctf-archives | 8c2bf6a608c821314d1a1cfaa05a6cccef8e3103 | [
"MIT"
] | null | null | null | #!/usr/bin/python3
from Crypto.Util.number import getPrime, bytes_to_long
from os import urandom
with open('flag.txt', 'r') as f:
flag = f.read()
p, q, r = [getPrime(512) for _ in range(3)]
n1, n2 = p * q, q * r
e = 65537
elusive = bytes_to_long(urandom(4))
pt = bytes_to_long(flag.encode())
ct = pow(pt, e, n1)
... | 19.869565 | 54 | 0.617068 |
a9dfb736d745c48742d4c48156600063056ef819 | 267 | py | Python | src/notif/serializers.py | oguzhanakan0/covidlab-server | 68ea4e6cd3b1244117ae43275335896b911a9b2a | [
"MIT"
] | null | null | null | src/notif/serializers.py | oguzhanakan0/covidlab-server | 68ea4e6cd3b1244117ae43275335896b911a9b2a | [
"MIT"
] | 1 | 2022-03-25T05:33:19.000Z | 2022-03-25T05:33:19.000Z | src/notif/serializers.py | oguzhanakan0/covidlab-server | 68ea4e6cd3b1244117ae43275335896b911a9b2a | [
"MIT"
] | null | null | null | from rest_framework import serializers
from .models import Notif
class NotifSerializer(serializers.HyperlinkedModelSerializer):
class Meta:
model = Notif
fields = ['date_created', 'title',
'content', 'notif_type', 'date_read']
| 26.7 | 62 | 0.677903 |
e779e5bc33889b9dbbc9091d78f1faadf4cad3ff | 1,476 | py | Python | pyntcloud/geometry/models/plane.py | bernssolg/pyntcloud-master | 84cf000b7a7f69a2c1b36f9624f05f65160bf992 | [
"MIT"
] | 1,142 | 2016-10-10T08:55:30.000Z | 2022-03-30T04:46:16.000Z | pyntcloud/geometry/models/plane.py | bernssolg/pyntcloud-master | 84cf000b7a7f69a2c1b36f9624f05f65160bf992 | [
"MIT"
] | 195 | 2016-10-10T08:30:37.000Z | 2022-02-17T12:51:17.000Z | pyntcloud/geometry/models/plane.py | bernssolg/pyntcloud-master | 84cf000b7a7f69a2c1b36f9624f05f65160bf992 | [
"MIT"
] | 215 | 2017-02-28T00:50:29.000Z | 2022-03-22T17:01:31.000Z | import numpy as np
from .base import GeometryModel
from ...utils.array import PCA
class Plane(GeometryModel):
def __init__(self, point=None, normal=None):
self.point = point
self.normal = normal
if normal is not None:
self.normal /= np.linalg.norm(normal)
def from_k_point... | 29.52 | 71 | 0.573171 |
68beb4211e37917caf2c613ece89fd1790e86701 | 1,560 | py | Python | app/fields.py | galyeshua/Index | 96e1630efc51d2c03f2d80889dfa1d117155e2ee | [
"MIT"
] | null | null | null | app/fields.py | galyeshua/Index | 96e1630efc51d2c03f2d80889dfa1d117155e2ee | [
"MIT"
] | null | null | null | app/fields.py | galyeshua/Index | 96e1630efc51d2c03f2d80889dfa1d117155e2ee | [
"MIT"
] | null | null | null | from wtforms import FieldList
from wtforms.utils import unset_value
# override process func of FieldList to make it unordered
class UnorderedFieldList(FieldList):
def process(self, formdata, data=unset_value, extra_filters=None):
if extra_filters:
raise TypeError(
"FieldList do... | 30.588235 | 89 | 0.557051 |
6b68e187ef9d1540cd994b755e6d7c20bf1bba4a | 686 | py | Python | analysis/Sol/scripts/.ipynb_checkpoints/project_functions-checkpoint.py | data301-2020-winter2/course-project-group_1049 | 7808342d9bb60822f0daf65a2a37a0b61b597045 | [
"MIT"
] | null | null | null | analysis/Sol/scripts/.ipynb_checkpoints/project_functions-checkpoint.py | data301-2020-winter2/course-project-group_1049 | 7808342d9bb60822f0daf65a2a37a0b61b597045 | [
"MIT"
] | 2 | 2021-03-12T05:07:28.000Z | 2021-03-29T21:33:11.000Z | analysis/Riley/scripts/.ipynb_checkpoints/project_functions-checkpoint.py | data301-2020-winter2/course-project-group_1049 | 7808342d9bb60822f0daf65a2a37a0b61b597045 | [
"MIT"
] | 1 | 2021-03-11T21:21:21.000Z | 2021-03-11T21:21:21.000Z | import pandas as pd
def load_and_process(url):
df=(
pd.read_csv(
url
#usecols=["victory_status","winner","white_id","white_rating","black_id","black_rating","opening_name"]
)
)
for ind, row in df.iterrows():
list1=row['moves'].split(' ')
if(len(l... | 32.666667 | 116 | 0.568513 |
6bf1f7339520c3b96039ce7cb33acc3d66c65123 | 264 | py | Python | comp/zenefits/skype/UniquePaths_Square.py | cc13ny/all-in | bc0b01e44e121ea68724da16f25f7e24386c53de | [
"MIT"
] | 1 | 2017-05-18T06:11:02.000Z | 2017-05-18T06:11:02.000Z | comp/zenefits/skype/UniquePaths_Square.py | cc13ny/all-in | bc0b01e44e121ea68724da16f25f7e24386c53de | [
"MIT"
] | 1 | 2016-02-09T06:00:07.000Z | 2016-02-09T07:20:13.000Z | comp/zenefits/skype/UniquePaths_Square.py | cc13ny/all-in | bc0b01e44e121ea68724da16f25f7e24386c53de | [
"MIT"
] | 2 | 2019-06-27T09:07:26.000Z | 2019-07-01T04:40:13.000Z | def uniquePaths(n):
grid = [[1 for j in range(n)] for i in range(n)]
for i in range(1, n):
for j in range(1, n):
grid[i][j] = grid[i][j - 1] + grid[i - 1][j]
return grid
grid = uniquePaths(10)
for row in grid:
print
row
| 17.6 | 56 | 0.518939 |
cf4e43d48d7c1674af89a0c968de80caba93c09c | 5,938 | py | Python | NN-modelSave.py | bailejor/Behav_Interventions | 8ef238ed913ee9b2744787a0bb2a67318df3fd3d | [
"MIT"
] | null | null | null | NN-modelSave.py | bailejor/Behav_Interventions | 8ef238ed913ee9b2744787a0bb2a67318df3fd3d | [
"MIT"
] | null | null | null | NN-modelSave.py | bailejor/Behav_Interventions | 8ef238ed913ee9b2744787a0bb2a67318df3fd3d | [
"MIT"
] | null | null | null | import numpy as np
import pandas
from keras.models import Sequential
from keras.layers import Dense, Dropout, Activation
from keras.optimizers import SGD
from math import sqrt
from numpy.random import seed
from keras.regularizers import l1
import random
from keras.models import model_from_json
import os
import tensorfl... | 42.113475 | 167 | 0.651061 |
d8d5cc6ac9f4cb8e8b1de7cd75fd52b3e11406fe | 703 | py | Python | pyventskalender/tag12_loesung.py | kopp/pyventskalender | 6f6455f3c1db07f65a772b2716e4be95fbcd1804 | [
"MIT"
] | null | null | null | pyventskalender/tag12_loesung.py | kopp/pyventskalender | 6f6455f3c1db07f65a772b2716e4be95fbcd1804 | [
"MIT"
] | null | null | null | pyventskalender/tag12_loesung.py | kopp/pyventskalender | 6f6455f3c1db07f65a772b2716e4be95fbcd1804 | [
"MIT"
] | null | null | null | from typing import Tuple, List
def volumen_wuerfel_mit_kantenlaenge(kantenlaenge: float) -> float:
if kantenlaenge < 0:
raise ValueError("Negative Kantenlängen ergeben keinen Sinn.")
else:
return kantenlaenge * kantenlaenge * kantenlaenge
def viele_volumina_berechnen(kantenlaengen: List[float... | 35.15 | 92 | 0.715505 |
d8f0aa066de0f97031cc1349ad59eb5c51501b4c | 444 | py | Python | vkapp/bot/models/users.py | ParuninPavel/lenta4_hack | 6d3340201deadf5757e37ddd7cf5580b928d7bda | [
"MIT"
] | 1 | 2017-11-23T13:33:13.000Z | 2017-11-23T13:33:13.000Z | vkapp/bot/models/users.py | ParuninPavel/lenta4_hack | 6d3340201deadf5757e37ddd7cf5580b928d7bda | [
"MIT"
] | null | null | null | vkapp/bot/models/users.py | ParuninPavel/lenta4_hack | 6d3340201deadf5757e37ddd7cf5580b928d7bda | [
"MIT"
] | null | null | null | from django.db import models
class VKUser(models.Model):
vk_id = models.IntegerField(primary_key=True)
class Blogger(models.Model):
id = models.AutoField(primary_key=True)
vk_user = models.ForeignKey(VKUser, on_delete=models.CASCADE)
balance = models.FloatField(null=False, default=0)
class Admin(m... | 26.117647 | 65 | 0.752252 |
2b4099532f35657bb4ee458f6c9166d4efd9b8bd | 4,545 | py | Python | WeChatTools/Utils/GateTrendUpMonitor.py | TitusWongCN/WeChatRelativeTools | 9307bae8c15e47b5bbf169a95a50be0d107a5bb1 | [
"MIT"
] | null | null | null | WeChatTools/Utils/GateTrendUpMonitor.py | TitusWongCN/WeChatRelativeTools | 9307bae8c15e47b5bbf169a95a50be0d107a5bb1 | [
"MIT"
] | null | null | null | WeChatTools/Utils/GateTrendUpMonitor.py | TitusWongCN/WeChatRelativeTools | 9307bae8c15e47b5bbf169a95a50be0d107a5bb1 | [
"MIT"
] | null | null | null | # -*- coding=utf-8 -*-
# python35
from Utils.time_utils import get_long_timestamp
import traceback
import threading
import itchat
import time
class TrendUpMonitor(object):
def __init__(self, private_groups, private_users, admin_users, mail_helper, config_parser, gate_helper, logger):
self.private_groups =... | 52.848837 | 126 | 0.561056 |
5a8bfbf2dd91ace06d9094f949147edacbbf91ff | 423 | py | Python | etc/rtc_temp.py | huberthoegl/tsgrain | 405d0ba8b98c2afa950d27294e55cd1e07506db4 | [
"Apache-2.0"
] | 1 | 2021-06-15T08:59:02.000Z | 2021-06-15T08:59:02.000Z | etc/rtc_temp.py | huberthoegl/tsgrain | 405d0ba8b98c2afa950d27294e55cd1e07506db4 | [
"Apache-2.0"
] | null | null | null | etc/rtc_temp.py | huberthoegl/tsgrain | 405d0ba8b98c2afa950d27294e55cd1e07506db4 | [
"Apache-2.0"
] | null | null | null | # Read temperature from DS3231 RTC
# https://www.raspberrypi.org/forums/viewtopic.php?t=59808
# evtl. vorher "sudo rmmod rtc_ds1307"
import smbus
bus = smbus.SMBus(1)
address = 0x68
def getTemp(address):
byte_tmsb = bus.read_byte_data(address, 0x11)
byte_tlsb = bin(bus.read_byte_data(address, 0x12))[2:].zfil... | 26.4375 | 72 | 0.718676 |
5ca203343123ff0cdc646a723b065620efc9af99 | 971 | py | Python | chapter101/mongodb_elasticsearch.py | thiagola92/learning-databases-with-python | cf23c34d7fd1ecd36dd3e7b30dc5916eb23eaf1e | [
"MIT"
] | null | null | null | chapter101/mongodb_elasticsearch.py | thiagola92/learning-databases-with-python | cf23c34d7fd1ecd36dd3e7b30dc5916eb23eaf1e | [
"MIT"
] | null | null | null | chapter101/mongodb_elasticsearch.py | thiagola92/learning-databases-with-python | cf23c34d7fd1ecd36dd3e7b30dc5916eb23eaf1e | [
"MIT"
] | null | null | null | from pymongo import MongoClient
from datetime import datetime
from elasticsearch import helpers, Elasticsearch
start = datetime.now()
mongo_client = MongoClient("mongodb://username:password@127.0.0.1")
elasticsearch_client = Elasticsearch("http://username:password@127.0.0.1:9200")
database = mongo_client['database_n... | 24.897436 | 79 | 0.725026 |
5ce74afb36b69e32504837107c534aede004ac3a | 258 | py | Python | Python/Exercícios_Python/048_contagem_de_pares.py | vdonoladev/aprendendo-programacao | 83abbcd6701b2105903b28fd549738863418cfb8 | [
"MIT"
] | null | null | null | Python/Exercícios_Python/048_contagem_de_pares.py | vdonoladev/aprendendo-programacao | 83abbcd6701b2105903b28fd549738863418cfb8 | [
"MIT"
] | null | null | null | Python/Exercícios_Python/048_contagem_de_pares.py | vdonoladev/aprendendo-programacao | 83abbcd6701b2105903b28fd549738863418cfb8 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
"""048 - Contagem de Pares
Automatically generated by Colaboratory.
Original file is located at
https://colab.research.google.com/drive/1yWNQpM09QN6Uwej0Vh4BSo1HFQu5IwIp
"""
for c in range(0,52, 2):
print(c)
print('Acabou') | 21.5 | 77 | 0.713178 |
7a30b2cffe700e8faa7880ef5344ca4f77a063c0 | 12,228 | py | Python | GZP_GTO_QGIS/INSTALLATION/GeoTaskOrganizer/mActionGTOrdbms.py | msgis/swwat-gzp-template | 080afbe9d49fb34ed60ba45654383d9cfca01e24 | [
"MIT"
] | 3 | 2019-06-18T15:28:09.000Z | 2019-07-11T07:31:45.000Z | GZP_GTO_QGIS/INSTALLATION/GeoTaskOrganizer/mActionGTOrdbms.py | msgis/swwat-gzp-template | 080afbe9d49fb34ed60ba45654383d9cfca01e24 | [
"MIT"
] | 2 | 2019-07-11T14:03:25.000Z | 2021-02-08T16:14:04.000Z | GZP_GTO_QGIS/INSTALLATION/GeoTaskOrganizer/mActionGTOrdbms.py | msgis/swwat-gzp-template | 080afbe9d49fb34ed60ba45654383d9cfca01e24 | [
"MIT"
] | 1 | 2019-06-12T11:07:37.000Z | 2019-06-12T11:07:37.000Z | #!/usr/bin/python
# -*- coding: utf-8 -*-
from builtins import str
from PyQt5.QtCore import *
# from PyQt5.QtSql import *
from PyQt5.QtWidgets import *
from qgis.core import QgsDataSourceUri, QgsFeatureRequest, QgsProject
from qgis.PyQt.QtSql import QSqlDatabase, QSqlQuery
class run(QObject):
def __init__(self, ... | 46.143396 | 143 | 0.520608 |
7a3fbf2e52f2a81f80bdb73a54d9aec62bed614d | 298 | py | Python | src/doc/data_into_visit/data_examples/node_example.py | visit-dav/vis | c08bc6e538ecd7d30ddc6399ec3022b9e062127e | [
"BSD-3-Clause"
] | 226 | 2018-12-29T01:13:49.000Z | 2022-03-30T19:16:31.000Z | src/doc/data_into_visit/data_examples/node_example.py | visit-dav/vis | c08bc6e538ecd7d30ddc6399ec3022b9e062127e | [
"BSD-3-Clause"
] | 5,100 | 2019-01-14T18:19:25.000Z | 2022-03-31T23:08:36.000Z | src/doc/data_into_visit/data_examples/node_example.py | visit-dav/vis | c08bc6e538ecd7d30ddc6399ec3022b9e062127e | [
"BSD-3-Clause"
] | 84 | 2019-01-24T17:41:50.000Z | 2022-03-10T10:01:46.000Z | import sys
sys.path.append("/usr/gapps/conduit/software/ascent/0.7.1/toss_3_x86_64_ib/openmp/gnu/conduit-install/lib/python3.7/site-packages")
import conduit
n = conduit.Node()
n["my"] = "data"
n["a/b/c"] = "d"
n["a"]["b"]["e"] = 64.0
print(n)
print("total bytes: %d" % n.total_strided_bytes())
| 22.923077 | 131 | 0.677852 |
8ffd430d733c0307843ffe8063e1c7d0cdb2dd9c | 1,381 | py | Python | src/onegov/wtfs/layouts/user_manual.py | politbuero-kampagnen/onegov-cloud | 20148bf321b71f617b64376fe7249b2b9b9c4aa9 | [
"MIT"
] | null | null | null | src/onegov/wtfs/layouts/user_manual.py | politbuero-kampagnen/onegov-cloud | 20148bf321b71f617b64376fe7249b2b9b9c4aa9 | [
"MIT"
] | null | null | null | src/onegov/wtfs/layouts/user_manual.py | politbuero-kampagnen/onegov-cloud | 20148bf321b71f617b64376fe7249b2b9b9c4aa9 | [
"MIT"
] | null | null | null | from cached_property import cached_property
from onegov.core.elements import Link
from onegov.wtfs import _
from onegov.wtfs.layouts.default import DefaultLayout
from onegov.wtfs.security import EditModel
class UserManualLayout(DefaultLayout):
@cached_property
def title(self):
return _("User manual")... | 24.660714 | 62 | 0.593773 |
8f775aeb5b9455585462ea4b2f864a33153adb55 | 97 | py | Python | year_3/comppi_0/tgadmincore/apps.py | honchardev/KPI | f8425681857c02a67127ffb05c0af0563a8473e1 | [
"MIT"
] | null | null | null | year_3/comppi_0/tgadmincore/apps.py | honchardev/KPI | f8425681857c02a67127ffb05c0af0563a8473e1 | [
"MIT"
] | 21 | 2020-03-24T16:26:04.000Z | 2022-02-18T15:56:16.000Z | year_3/comppi_0/tgadmincore/apps.py | honchardev/KPI | f8425681857c02a67127ffb05c0af0563a8473e1 | [
"MIT"
] | null | null | null | from django.apps import AppConfig
class TgadmincoreConfig(AppConfig):
name = 'tgadmincore'
| 16.166667 | 35 | 0.773196 |
2d39bdffabe0eb41f33011d7f68edc065b27a649 | 2,229 | py | Python | api/sequence.py | Latent-Lxx/dazhou-dw | 902b4b625cda4c9e4eb205017b8955b81f37a0b5 | [
"MIT"
] | null | null | null | api/sequence.py | Latent-Lxx/dazhou-dw | 902b4b625cda4c9e4eb205017b8955b81f37a0b5 | [
"MIT"
] | null | null | null | api/sequence.py | Latent-Lxx/dazhou-dw | 902b4b625cda4c9e4eb205017b8955b81f37a0b5 | [
"MIT"
] | 1 | 2022-02-11T04:44:37.000Z | 2022-02-11T04:44:37.000Z | # !/usr/bin/python3
# -*- coding: utf-8 -*-
# @Time : 2021/6/8 下午4:12
# @Author : Latent
# @Email : latentsky@gmail.com
# @File : filter.py
# @Software: PyCharm
# @class : 序列器 -> 对所有的json进行验证
from db.redis_mq import RedisMQ
import json
class Sequence(object):
# Determine whether it is empty
@classmethod
de... | 29.72 | 77 | 0.489457 |
777e8e6efe9cc8894b4a44f7172fd90120ac1357 | 8,574 | py | Python | src/onegov/election_day/layouts/election.py | politbuero-kampagnen/onegov-cloud | 20148bf321b71f617b64376fe7249b2b9b9c4aa9 | [
"MIT"
] | null | null | null | src/onegov/election_day/layouts/election.py | politbuero-kampagnen/onegov-cloud | 20148bf321b71f617b64376fe7249b2b9b9c4aa9 | [
"MIT"
] | null | null | null | src/onegov/election_day/layouts/election.py | politbuero-kampagnen/onegov-cloud | 20148bf321b71f617b64376fe7249b2b9b9c4aa9 | [
"MIT"
] | null | null | null | from cached_property import cached_property
from onegov.core.utils import normalize_for_url
from onegov.election_day import _
from onegov.election_day.layouts.detail import DetailLayout
from onegov.election_day.utils import pdf_filename
from onegov.election_day.utils import svg_filename
class ElectionLayout(DetailLay... | 29.163265 | 77 | 0.503732 |
bb028cfb2b79e4a25655075bdb3d354b6a5d71d4 | 2,771 | py | Python | Uebung9/Aufgabe27.py | B0mM3L6000/EiP | f68718f95a2d3cde8ead62b6134ac1b5068881a5 | [
"MIT"
] | 1 | 2018-04-18T19:10:06.000Z | 2018-04-18T19:10:06.000Z | Uebung9/Aufgabe27.py | B0mM3L6000/EiP | f68718f95a2d3cde8ead62b6134ac1b5068881a5 | [
"MIT"
] | null | null | null | Uebung9/Aufgabe27.py | B0mM3L6000/EiP | f68718f95a2d3cde8ead62b6134ac1b5068881a5 | [
"MIT"
] | 1 | 2018-04-29T08:48:00.000Z | 2018-04-29T08:48:00.000Z | import random
class Konto:
def __init__(self, geld, inhaber, nummer):
self.Kontostand = geld
self.Kontoinhaber = inhaber
self.Kontonummer = nummer
def einzahlen(self, betrag):
if betrag <= 0:
return Konto(self.Kontostand, self.Kontoinhaber, self.Kontonummer)
... | 28.27551 | 158 | 0.631902 |
bb0a00cb2be3809ed38ff74e801d19136bef60db | 165 | py | Python | Python/Courses/Python-Tutorials.Telusko/00.Fundamentals/07.01-if-elif-else.py | shihab4t/Books-Code | b637b6b2ad42e11faf87d29047311160fe3b2490 | [
"Unlicense"
] | null | null | null | Python/Courses/Python-Tutorials.Telusko/00.Fundamentals/07.01-if-elif-else.py | shihab4t/Books-Code | b637b6b2ad42e11faf87d29047311160fe3b2490 | [
"Unlicense"
] | null | null | null | Python/Courses/Python-Tutorials.Telusko/00.Fundamentals/07.01-if-elif-else.py | shihab4t/Books-Code | b637b6b2ad42e11faf87d29047311160fe3b2490 | [
"Unlicense"
] | null | null | null | x = 10
if x == 1:
print("One")
elif x == 2:
print("Two")
elif x == 3:
print("Three")
elif x == 4:
print("Four")
else:
print("Grater than Four")
| 12.692308 | 29 | 0.50303 |
70a60cb63844b813db0a0f78938895637c9fa4b7 | 7,262 | py | Python | Packs/CyberArkIdentity/Integrations/CyberArkIdentityEventCollector/CyberArkIdentityEventCollector.py | jrauen/content | 81a92be1cbb053a5f26a6f325eff3afc0ca840e0 | [
"MIT"
] | null | null | null | Packs/CyberArkIdentity/Integrations/CyberArkIdentityEventCollector/CyberArkIdentityEventCollector.py | jrauen/content | 81a92be1cbb053a5f26a6f325eff3afc0ca840e0 | [
"MIT"
] | 40 | 2022-03-03T07:34:00.000Z | 2022-03-31T07:38:35.000Z | Packs/CyberArkIdentity/Integrations/CyberArkIdentityEventCollector/CyberArkIdentityEventCollector.py | jrauen/content | 81a92be1cbb053a5f26a6f325eff3afc0ca840e0 | [
"MIT"
] | null | null | null | # pylint: disable=no-name-in-module
# pylint: disable=no-self-argument
import urllib3
from SiemApiModule import * # noqa: E402
urllib3.disable_warnings()
# ----------------------------------------- GLOBAL VARIABLES -----------------------------------------
DATETIME_FORMAT = '%Y-%m-%dT%H:%M:%S.%f'
EVENT_FIELDS = [
... | 30.902128 | 130 | 0.617185 |
8e79bab83f70afac84fef28c2ca8a79952e33f75 | 75 | py | Python | globals/donation_server_base_url.py | adblockplus/web.adblockplus.org | c2c570ce4f4296afc3577afe233c6b23b128f206 | [
"MIT"
] | 9 | 2016-01-29T18:05:29.000Z | 2021-10-06T04:21:55.000Z | globals/donation_server_base_url.py | adblockplus/web.adblockplus.org | c2c570ce4f4296afc3577afe233c6b23b128f206 | [
"MIT"
] | 9 | 2015-04-06T19:03:32.000Z | 2019-05-28T13:34:55.000Z | globals/donation_server_base_url.py | adblockplus/web.adblockplus.org | c2c570ce4f4296afc3577afe233c6b23b128f206 | [
"MIT"
] | 18 | 2015-04-06T17:42:31.000Z | 2021-10-06T04:26:29.000Z | import os
donation_server_base_url = os.getenv('DONATION_SERVER_BASE_URL')
| 25 | 64 | 0.853333 |
8dafacddf4999faf8b765776de671bcb42bbeb46 | 844 | py | Python | 601-percolation/quick_union_weighted.py | hello-arun/Python-Tutorial | aec3978f414e48d762a5fbc5cce581163c1f5f1e | [
"MIT"
] | null | null | null | 601-percolation/quick_union_weighted.py | hello-arun/Python-Tutorial | aec3978f414e48d762a5fbc5cce581163c1f5f1e | [
"MIT"
] | null | null | null | 601-percolation/quick_union_weighted.py | hello-arun/Python-Tutorial | aec3978f414e48d762a5fbc5cce581163c1f5f1e | [
"MIT"
] | null | null | null | class quick_union_wighted:
"""
id contains root information of each number initially id of each number is
number itself!
"""
def __init__(self, N):
self.id = [0]*N
self.sz = [1]*N
for i in range(N):
self.id[i] = i
def root(self, i: int):
whil... | 24.114286 | 82 | 0.446682 |
ba496fd793ebe81e0057358c0439e4eee1f0da87 | 1,135 | py | Python | pyventskalender/tag19_loesung.py | kopp/pyventskalender | 6f6455f3c1db07f65a772b2716e4be95fbcd1804 | [
"MIT"
] | null | null | null | pyventskalender/tag19_loesung.py | kopp/pyventskalender | 6f6455f3c1db07f65a772b2716e4be95fbcd1804 | [
"MIT"
] | null | null | null | pyventskalender/tag19_loesung.py | kopp/pyventskalender | 6f6455f3c1db07f65a772b2716e4be95fbcd1804 | [
"MIT"
] | null | null | null | try:
from pyventskalender.tag18 import MOEGLICHE_OBJEKTE, MOEGLICHE_SUBJEKTE, MOEGLICHE_VERBEN, MOEGLICHE_ADVERBIALE
except ImportError:
from tag18 import MOEGLICHE_OBJEKTE, MOEGLICHE_SUBJEKTE, MOEGLICHE_VERBEN, MOEGLICHE_ADVERBIALE
from random import choice
class Satzglied:
def __init__(self, moeglichke... | 31.527778 | 115 | 0.688106 |
baa4c5c4aa0eaff53c121984ec206bbd7cbc62e7 | 3,414 | py | Python | Packs/ThreatGrid/Integrations/FeedCiscoSecureMalwareAnalytics/FeedCiscoSecureMalwareAnalytics_test.py | diCagri/content | c532c50b213e6dddb8ae6a378d6d09198e08fc9f | [
"MIT"
] | 799 | 2016-08-02T06:43:14.000Z | 2022-03-31T11:10:11.000Z | Packs/ThreatGrid/Integrations/FeedCiscoSecureMalwareAnalytics/FeedCiscoSecureMalwareAnalytics_test.py | diCagri/content | c532c50b213e6dddb8ae6a378d6d09198e08fc9f | [
"MIT"
] | 9,317 | 2016-08-07T19:00:51.000Z | 2022-03-31T21:56:04.000Z | Packs/ThreatGrid/Integrations/FeedCiscoSecureMalwareAnalytics/FeedCiscoSecureMalwareAnalytics_test.py | diCagri/content | c532c50b213e6dddb8ae6a378d6d09198e08fc9f | [
"MIT"
] | 1,297 | 2016-08-04T13:59:00.000Z | 2022-03-31T23:43:06.000Z | from FeedCiscoSecureMalwareAnalytics import Client, fetch_indicators, fetch_indicators_command, \
create_entity_relationships
from CommonServerPython import *
from test_data.feed_data import banking_dns_response, sinkholed_ip_dns_response
def test_fetch_indicators(requests_mock):
"""Unit test
Given
- ... | 35.195876 | 109 | 0.673697 |
0320117c9268d5af5a10c56dd21bc3433e05100e | 777 | py | Python | Build an Environmental Hack/environment_hack.py | Akshu-on-github/MLH-INIT-2022 | cf3fbbc8abd3eae3b958d3d482ed1fa1467f559e | [
"MIT"
] | 1 | 2021-07-05T14:30:34.000Z | 2021-07-05T14:30:34.000Z | Build an Environmental Hack/environment_hack.py | Akshu-on-github/MLH-INIT-2022 | cf3fbbc8abd3eae3b958d3d482ed1fa1467f559e | [
"MIT"
] | 1 | 2021-07-02T15:36:02.000Z | 2021-07-02T15:37:25.000Z | Build an Environmental Hack/environment_hack.py | Akshu-on-github/MLH-INIT-2022 | cf3fbbc8abd3eae3b958d3d482ed1fa1467f559e | [
"MIT"
] | 1 | 2021-07-02T15:15:17.000Z | 2021-07-02T15:15:17.000Z | from tkinter import *
import requests
import json
#creating the screen
root=Tk()
root.title("Air quality detector")
#making the grid for output
root.geometry("800x40")
root.configure(background='green')
#calling api in try block
try:
api_request= requests.get("http://www.airnowapi.org/aq/observation/zipCode/current/... | 27.75 | 181 | 0.746461 |
0696239b0b514dc420d7a5c1195ad23c8626d2c1 | 16,649 | py | Python | cbm/ipycbm/utils/settings_ds.py | CsabaWirnhardt/cbm | 1822addd72881057af34ac6a7c2a1f02ea511225 | [
"BSD-3-Clause"
] | 17 | 2021-01-18T07:27:01.000Z | 2022-03-10T12:26:21.000Z | cbm/ipycbm/utils/settings_ds.py | CsabaWirnhardt/cbm | 1822addd72881057af34ac6a7c2a1f02ea511225 | [
"BSD-3-Clause"
] | 4 | 2021-04-29T11:20:44.000Z | 2021-12-06T10:19:17.000Z | cbm/ipycbm/utils/settings_ds.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
from os.path import join, normpath
from ipywidgets import... | 33.03373 | 85 | 0.530062 |
88ef354ba32968222b6ebfd6a105601eabf55a6f | 744 | py | Python | Python/zz_offtopic_sandbox/csv/read_csv.py | Kreijeck/learning | eaffee08e61f2a34e01eb8f9f04519aac633f48c | [
"MIT"
] | null | null | null | Python/zz_offtopic_sandbox/csv/read_csv.py | Kreijeck/learning | eaffee08e61f2a34e01eb8f9f04519aac633f48c | [
"MIT"
] | null | null | null | Python/zz_offtopic_sandbox/csv/read_csv.py | Kreijeck/learning | eaffee08e61f2a34e01eb8f9f04519aac633f48c | [
"MIT"
] | null | null | null | import pandas as pd
import time
def read_csv(filename):
return pd.read_csv(filename, sep=";", encoding="windows-1252")
# def testme():
# df = pd.read_csv("Ranking HeiligsBlechle.CSV", sep=";", encoding='windows-1252')
# for d in
def getPolePosition(dataframe, name):
count = 0
for data in datafr... | 23.25 | 86 | 0.637097 |
9da0e986c095807ba7558eee97f51de8cb5f3111 | 926 | py | Python | venv/Lib/site-packages/pynance/tst/unit/test_pf.py | LeonardoHMS/imobi | 6b2b97a05df67ea7d493f7b601382f65c6629cc2 | [
"MIT"
] | 35 | 2015-03-12T04:16:14.000Z | 2020-12-17T18:10:15.000Z | venv/Lib/site-packages/pynance/tst/unit/test_pf.py | LeonardoHMS/imobi | 6b2b97a05df67ea7d493f7b601382f65c6629cc2 | [
"MIT"
] | 31 | 2015-03-16T21:31:04.000Z | 2021-01-26T00:12:34.000Z | venv/Lib/site-packages/pynance/tst/unit/test_pf.py | LeonardoHMS/imobi | 6b2b97a05df67ea7d493f7b601382f65c6629cc2 | [
"MIT"
] | 18 | 2015-09-30T10:40:26.000Z | 2021-01-25T21:20:44.000Z | """
Tests for portfolio optimization functions.
Copyright (c) 2015 Marshall Farrier
license http://opensource.org/licenses/MIT
"""
import unittest
import numpy as np
import pynance as pn
class TestPf(unittest.TestCase):
def test_optimize(self):
# Capinski, Zastawniak, pp. 76f.
exp_rets = np.ar... | 27.235294 | 66 | 0.595032 |
9dfde97ac913fca242ce54a9923a31fd6ebf215c | 14,188 | py | Python | tests/onegov/feriennet/test_forms.py | politbuero-kampagnen/onegov-cloud | 20148bf321b71f617b64376fe7249b2b9b9c4aa9 | [
"MIT"
] | null | null | null | tests/onegov/feriennet/test_forms.py | politbuero-kampagnen/onegov-cloud | 20148bf321b71f617b64376fe7249b2b9b9c4aa9 | [
"MIT"
] | null | null | null | tests/onegov/feriennet/test_forms.py | politbuero-kampagnen/onegov-cloud | 20148bf321b71f617b64376fe7249b2b9b9c4aa9 | [
"MIT"
] | null | null | null | import pytest
import transaction
from datetime import datetime, timedelta, date
from webob.multidict import MultiDict
from onegov.activity import ActivityCollection
from onegov.activity import AttendeeCollection
from onegov.activity import BookingCollection
from onegov.activity import InvoiceCollection
from onegov.a... | 31.182418 | 80 | 0.658796 |
88203ade410b7b38d86726cc18e7e8f74ddc3dca | 2,134 | py | Python | Utils/py/ConfigViewer/main.py | tarsoly/NaoTH | dcd2b67ef6bf9953c81d3e1b26e543b5922b7d52 | [
"ECL-2.0",
"Apache-2.0"
] | 15 | 2015-01-12T10:46:29.000Z | 2022-03-28T05:13:14.000Z | Utils/py/ConfigViewer/main.py | tarsoly/NaoTH | dcd2b67ef6bf9953c81d3e1b26e543b5922b7d52 | [
"ECL-2.0",
"Apache-2.0"
] | 2 | 2019-01-20T21:07:50.000Z | 2020-01-22T14:00:28.000Z | Utils/py/ConfigViewer/main.py | tarsoly/NaoTH | dcd2b67ef6bf9953c81d3e1b26e543b5922b7d52 | [
"ECL-2.0",
"Apache-2.0"
] | 5 | 2018-02-07T18:18:10.000Z | 2019-10-15T17:01:41.000Z | #!/usr/bin/env python3
import os, sys, argparse
from PyQt5.QtWidgets import QApplication
import Utils
from ConfigViewerWidget import Widget
class ArgumentFileParser(argparse.Action):
def __call__(self, parser, namespace, values, option_string=None):
if os.path.exists(values):
if os.path.isdir... | 42.68 | 156 | 0.659325 |
c9d437805218c88669bfaf0e3fad827930054cc2 | 286 | py | Python | Co-Simulation/Obj2Fbx/obj2fbx.py | uruzahe/carla | 940c2ab23cce1eda1ef66de35f66b42d40865fb1 | [
"MIT"
] | null | null | null | Co-Simulation/Obj2Fbx/obj2fbx.py | uruzahe/carla | 940c2ab23cce1eda1ef66de35f66b42d40865fb1 | [
"MIT"
] | null | null | null | Co-Simulation/Obj2Fbx/obj2fbx.py | uruzahe/carla | 940c2ab23cce1eda1ef66de35f66b42d40865fb1 | [
"MIT"
] | null | null | null | import bpy
import sys
argv = sys.argv
argv = argv[argv.index("--") + 1:] # get all args after "--"
obj_in = argv[0]
fbx_out = argv[1]
bpy.ops.import_scene.obj(filepath=obj_in, axis_forward='-Z', axis_up='Y')
bpy.ops.export_scene.fbx(filepath=fbx_out, axis_forward='-Z', axis_up='Y')
| 23.833333 | 74 | 0.692308 |
4e5025c86cb263c9dc5309097613b13cf02976c5 | 1,353 | py | Python | 02 Hardwaredesign/Grundschaltungen/src/led_pwm_fade.py | DennisSchulmeister/dhbwka-wwi-iottech-quellcodes | 58f86907af31187f267a9ea476f061cc59098ebd | [
"CC-BY-4.0"
] | null | null | null | 02 Hardwaredesign/Grundschaltungen/src/led_pwm_fade.py | DennisSchulmeister/dhbwka-wwi-iottech-quellcodes | 58f86907af31187f267a9ea476f061cc59098ebd | [
"CC-BY-4.0"
] | null | null | null | 02 Hardwaredesign/Grundschaltungen/src/led_pwm_fade.py | DennisSchulmeister/dhbwka-wwi-iottech-quellcodes | 58f86907af31187f267a9ea476f061cc59098ebd | [
"CC-BY-4.0"
] | 1 | 2020-10-10T20:24:05.000Z | 2020-10-10T20:24:05.000Z | #! ./env/bin/python3
#encoding=utf-8
# Copyright (C) 2019 Dennis Schulmeister-Zimolong
#
# E-Mail: dhbw@windows3.de
# Webseite: https://www.wpvs.de
#
# Dieser Quellcode ist lizenziert unter einer
# Creative Commons Namensnennung 4.0 International Lizenz
"""
Minimalbeispiel einer helligkeitsgesteuerten LED. Die LED wi... | 22.932203 | 73 | 0.609017 |
4e769b0ed083ae00cd8a05cd9da676406b6d4cbc | 743 | py | Python | 1_BasicFeatures/Logic/booleans.py | felixdittrich92/Python3 | 16b767465e4bdf0adc652c195d15384bb9faa4cf | [
"MIT"
] | 1 | 2022-03-02T07:16:30.000Z | 2022-03-02T07:16:30.000Z | 1_BasicFeatures/Logic/booleans.py | felixdittrich92/Python3 | 16b767465e4bdf0adc652c195d15384bb9faa4cf | [
"MIT"
] | null | null | null | 1_BasicFeatures/Logic/booleans.py | felixdittrich92/Python3 | 16b767465e4bdf0adc652c195d15384bb9faa4cf | [
"MIT"
] | null | null | null | # auf Vererbung überprüfen also erbt para1 von para2 (Elternklasse)
print(issubclass(bool, int))
# Typüberprüfung
print(type(True))
print(isinstance(True, bool))
print(isinstance(False, bool))
# jedes Objekt hat einen Wahrheitswert
# Wenn die Instanz True ist und nicht: None, False, 0 oder empty
my_list = []
if my_l... | 19.051282 | 73 | 0.676985 |
28df5be716f73ef3c22b57dfd9d92c4e63eb50b8 | 574 | py | Python | spiders/example_juejin/juejin/spiders/juejin_spider.py | anhilo/crawlab | 363f4bf7a4ccc192a99850998c1bd0fc363832a1 | [
"BSD-3-Clause"
] | 1 | 2019-08-20T14:26:39.000Z | 2019-08-20T14:26:39.000Z | spiders/example_juejin/juejin/spiders/juejin_spider.py | anhilo/crawlab | 363f4bf7a4ccc192a99850998c1bd0fc363832a1 | [
"BSD-3-Clause"
] | 9 | 2019-05-24T03:53:09.000Z | 2022-02-26T10:53:48.000Z | spiders/example_juejin/juejin/spiders/juejin_spider.py | anhilo/crawlab | 363f4bf7a4ccc192a99850998c1bd0fc363832a1 | [
"BSD-3-Clause"
] | 1 | 2019-11-08T08:12:40.000Z | 2019-11-08T08:12:40.000Z | # -*- coding: utf-8 -*-
import scrapy
from juejin.items import JuejinItem
class JuejinSpiderSpider(scrapy.Spider):
name = 'juejin_spider'
allowed_domains = ['juejin.com']
start_urls = ['https://juejin.im/search?query=celery']
def parse(self, response):
for item in response.css('ul.main-list >... | 31.888889 | 68 | 0.599303 |
e928dc8026dc253349a55c3dbf989e36294dc441 | 1,339 | py | Python | aq_dashboard.py | ranaharoonkhan/SC3 | 458e70e91f649618a8c96df028986d36ed4797c1 | [
"MIT"
] | null | null | null | aq_dashboard.py | ranaharoonkhan/SC3 | 458e70e91f649618a8c96df028986d36ed4797c1 | [
"MIT"
] | null | null | null | aq_dashboard.py | ranaharoonkhan/SC3 | 458e70e91f649618a8c96df028986d36ed4797c1 | [
"MIT"
] | null | null | null | from flask import Flask
from flask_sqlalchemy import SQLAlchemy
import openaq
import requests
APP = Flask(__name__)
APP.config['SQLALCHEMY_DATABASE_URI'] = 'sqlite:///C:\\Users\\HP.LAPTOP-P2BK7MFS\\Desktop\\sc3\db.sqlite3'
DB = SQLAlchemy(APP)
#DB.init_app(APP)
api = openaq.OpenAQ()
status, body = api... | 24.345455 | 107 | 0.610157 |
3a9e6190b851a1eb32790f62f6ed35ed394559f6 | 27,825 | py | Python | deutschland/jobsuche/model/job_search_response_aggregierungen_plzebene2.py | kiranmusze/deutschland | 86d8ead3f38ad88ad66bb338b9f5a8db06992344 | [
"Apache-2.0"
] | null | null | null | deutschland/jobsuche/model/job_search_response_aggregierungen_plzebene2.py | kiranmusze/deutschland | 86d8ead3f38ad88ad66bb338b9f5a8db06992344 | [
"Apache-2.0"
] | null | null | null | deutschland/jobsuche/model/job_search_response_aggregierungen_plzebene2.py | kiranmusze/deutschland | 86d8ead3f38ad88ad66bb338b9f5a8db06992344 | [
"Apache-2.0"
] | null | null | null | """
Bundesagentur für Arbeit: Jobsuche API
Die größte Stellendatenbank Deutschlands durchsuchen, Details zu Stellenanzeigen und Informationen über Arbeitgeber abrufen. <br><br> Die Authentifizierung funktioniert per OAuth 2 Client Credentials mit JWTs. Folgende Client-Credentials können dafür verwendet werden:... | 43.006182 | 405 | 0.478634 |
3ad193d95ac67e80cee38bff299176940f0ca559 | 236 | py | Python | label-dcm.py | hyh520/label-dcm | 07f8257dcc52b827fcb6d1dec311b532c3ae8925 | [
"MIT"
] | 1 | 2021-12-20T11:06:42.000Z | 2021-12-20T11:06:42.000Z | label-dcm.py | hyh520/label-dcm | 07f8257dcc52b827fcb6d1dec311b532c3ae8925 | [
"MIT"
] | null | null | null | label-dcm.py | hyh520/label-dcm | 07f8257dcc52b827fcb6d1dec311b532c3ae8925 | [
"MIT"
] | null | null | null | if __name__ == "__main__":
from labeldcm.module.app import LabelApp
from PyQt5.QtWidgets import QApplication
import sys
app = QApplication(sys.argv)
labelApp = LabelApp()
labelApp.show()
sys.exit(app.exec())
| 26.222222 | 44 | 0.686441 |
a3846d2d649214f683cb9fc4a789b2f56b09e617 | 1,749 | py | Python | mikulski_patryk/ex1.py | appfs/appfs | 8cbbfa0e40e4d4a75a498ce8dd894bb2fbc3a9e3 | [
"MIT"
] | 11 | 2017-04-21T11:39:55.000Z | 2022-02-11T20:25:18.000Z | mikulski_patryk/ex1.py | appfs/appfs | 8cbbfa0e40e4d4a75a498ce8dd894bb2fbc3a9e3 | [
"MIT"
] | 69 | 2017-04-26T09:30:38.000Z | 2017-08-01T11:31:21.000Z | mikulski_patryk/ex1.py | appfs/appfs | 8cbbfa0e40e4d4a75a498ce8dd894bb2fbc3a9e3 | [
"MIT"
] | 53 | 2017-04-20T16:16:11.000Z | 2017-07-19T12:53:01.000Z | import csv
from scipy.stats.mstats import gmean
in_filename = 'ex1-100.dat'
seq1 = []
seq2 = []
invalids = []
with open(in_filename, 'r') as in_file:
reader = csv.reader(in_file, delimiter=';')
i = 0
for row in reader:
i = i + 1
if len(row)==3:
seqN = row[0]
locN ... | 30.155172 | 83 | 0.482561 |
6eb086bafb4e94b33e143b3346af199b0bae3d59 | 1,208 | py | Python | Gmail-Bruteforce/Core/gmailBrute.py | Zusyaku/Termux-And-Lali-Linux-V2 | b1a1b0841d22d4bf2cc7932b72716d55f070871e | [
"Apache-2.0"
] | 2 | 2021-11-17T03:35:03.000Z | 2021-12-08T06:00:31.000Z | Gmail-Bruteforce/Core/gmailBrute.py | Zusyaku/Termux-And-Lali-Linux-V2 | b1a1b0841d22d4bf2cc7932b72716d55f070871e | [
"Apache-2.0"
] | null | null | null | Gmail-Bruteforce/Core/gmailBrute.py | Zusyaku/Termux-And-Lali-Linux-V2 | b1a1b0841d22d4bf2cc7932b72716d55f070871e | [
"Apache-2.0"
] | 2 | 2021-11-05T18:07:48.000Z | 2022-02-24T21:25:07.000Z | def login(data="Data\\MiniData.txt"):
import smtplib
import time
import random
from.iControl import CheckTheInternet
data = open(data,"r")
pwd_list = data.readlines()
uname = input("Target Mail: ")
connect = smtplib.SMTP_SSL('smtp.gmail.com',465)
connect.ehlo()
counter ... | 33.555556 | 98 | 0.491722 |
6e48a91b9dbf6cae9e23ad70cef8a6e92a537634 | 615 | py | Python | Python/Buch_Python3_Das_umfassende_Praxisbuch/Kapitel_05_Kontrollstrukturen/01_fibonacci.py | Apop85/Scripts | e71e1c18539e67543e3509c424c7f2d6528da654 | [
"MIT"
] | null | null | null | Python/Buch_Python3_Das_umfassende_Praxisbuch/Kapitel_05_Kontrollstrukturen/01_fibonacci.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_05_Kontrollstrukturen/01_fibonacci.py | Apop85/Scripts | 1d8dad316c55e1f1343526eac9e4b3d0909e4873 | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
# -*- coding:utf-8 -*-
###
# File: 01_fibonacci.py
# Project: Kapitel_05_Kontrollstrukturen
# Created Date: Saturday 23.02.2019, 14:00
# Author: Apop85
# -----
# Last Modified: Saturday 23.02.2019, 14:51
# -----
# Copyright (c) 2019 Apop85
# This software is published under the MIT license.
# Che... | 22.777778 | 71 | 0.673171 |
9550c5ee6a70cbf649ddbf83795d1d49ad7fe940 | 1,754 | py | Python | bewerte/my_stat.py | jupfi81/NotenManager | ee96a41088bb898c025aed7b3c904741cb71d004 | [
"MIT"
] | null | null | null | bewerte/my_stat.py | jupfi81/NotenManager | ee96a41088bb898c025aed7b3c904741cb71d004 | [
"MIT"
] | null | null | null | bewerte/my_stat.py | jupfi81/NotenManager | ee96a41088bb898c025aed7b3c904741cb71d004 | [
"MIT"
] | null | null | null | """ Stelle statistikfunktionen bereit """
import statistics
import math
def mittelwert(noten):
""" Berechnet den Mittelwert der Liste noten auf 2 Stellen genau """
mean = round(sum(noten)/len(noten), 2)
return mean
def median(noten):
""" Berechnet den Median der Liste noten auf 2 Stellen genau """
... | 31.890909 | 84 | 0.647662 |
c2fc275d681bc12606ef8cd246ac2b286edb212a | 23,488 | py | Python | src/pfun/http.py | suned/pfun | 46c460646487abfef897bd9627891f6cf7870774 | [
"MIT"
] | 126 | 2019-09-16T15:28:20.000Z | 2022-03-20T10:57:53.000Z | src/pfun/http.py | suned/pfun | 46c460646487abfef897bd9627891f6cf7870774 | [
"MIT"
] | 54 | 2019-09-30T08:44:01.000Z | 2022-03-20T11:10:00.000Z | src/pfun/http.py | suned/pfun | 46c460646487abfef897bd9627891f6cf7870774 | [
"MIT"
] | 11 | 2020-01-02T08:32:46.000Z | 2022-03-20T11:10:24.000Z | from __future__ import annotations
import http.cookies
import json
import ssl
from typing import Any, Callable
from typing import Dict as Dict_
from typing import Iterable, Mapping, NoReturn, Union
from typing_extensions import Protocol
from .dict import Dict
from .effect import (Depends, Effect, Resource, Try, add_... | 30.623207 | 77 | 0.568418 |
669c1c609a6ec3fc350e73ba5a19730fd60376fa | 417 | py | Python | euler-53.py | TFabijo/euler2 | 7da205ce02ae3bd12754f99c1fe69fbf20b1e3d0 | [
"MIT"
] | null | null | null | euler-53.py | TFabijo/euler2 | 7da205ce02ae3bd12754f99c1fe69fbf20b1e3d0 | [
"MIT"
] | null | null | null | euler-53.py | TFabijo/euler2 | 7da205ce02ae3bd12754f99c1fe69fbf20b1e3d0 | [
"MIT"
] | null | null | null | def fakulteta(n):
z = 1
if n == 0:
return 1
for x in range(1,n+1):
z *= x
return z
def binomski(n,r):
s = n - r
return (fakulteta(n)) / (fakulteta(r) * fakulteta(s))
def euler_53():
st = 0
for n in range(2,101):
for t in range(1,n+1 // 2 ):
... | 18.130435 | 58 | 0.438849 |
b0a4f8f9c8f4e895f60af9a9fb93a82f00682767 | 31,146 | py | Python | Packs/Tufin/Integrations/Tufin/Tufin.py | diCagri/content | c532c50b213e6dddb8ae6a378d6d09198e08fc9f | [
"MIT"
] | 799 | 2016-08-02T06:43:14.000Z | 2022-03-31T11:10:11.000Z | Packs/Tufin/Integrations/Tufin/Tufin.py | diCagri/content | c532c50b213e6dddb8ae6a378d6d09198e08fc9f | [
"MIT"
] | 9,317 | 2016-08-07T19:00:51.000Z | 2022-03-31T21:56:04.000Z | Packs/Tufin/Integrations/Tufin/Tufin.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 *
import json
import requests
import socket
from typing import Dict, Any, List
from netaddr import IPNetwork, IPAddress
# Disable insecure warnings
requests.packages.urllib3.disable_warnings()
'''
Templates for change requests
Change these templates if you... | 45.601757 | 128 | 0.541964 |
9fe0ca246e661dba9e465880f216b426a0f5cf1b | 3,397 | py | Python | modelindex/load_model_index.py | datumbox/model-index | a39af5f8aaa2a90b8fc7180744a855282360067a | [
"MIT"
] | 12 | 2021-02-26T08:19:00.000Z | 2022-01-26T14:00:16.000Z | modelindex/load_model_index.py | datumbox/model-index | a39af5f8aaa2a90b8fc7180744a855282360067a | [
"MIT"
] | null | null | null | modelindex/load_model_index.py | datumbox/model-index | a39af5f8aaa2a90b8fc7180744a855282360067a | [
"MIT"
] | 3 | 2021-03-19T13:51:56.000Z | 2021-08-25T05:25:52.000Z | import os
from typing import Dict
from modelindex.consts import MODEL_INDEX_ROOT_FILE
from modelindex.models.Model import Model
from modelindex.models.ModelIndex import ModelIndex
from modelindex.models.ModelList import ModelList
from modelindex.models.Result import Result
from modelindex.models.Metadata import Metada... | 35.020619 | 100 | 0.652929 |
9ff3688fa6edc7a3550ebd26f3e3c0f9de28805e | 265 | py | Python | Python/zzz_training_challenge/Python_Challenge/solutions/ch05_datastructures/intro/iteration_basics.py | Kreijeck/learning | eaffee08e61f2a34e01eb8f9f04519aac633f48c | [
"MIT"
] | null | null | null | Python/zzz_training_challenge/Python_Challenge/solutions/ch05_datastructures/intro/iteration_basics.py | Kreijeck/learning | eaffee08e61f2a34e01eb8f9f04519aac633f48c | [
"MIT"
] | null | null | null | Python/zzz_training_challenge/Python_Challenge/solutions/ch05_datastructures/intro/iteration_basics.py | Kreijeck/learning | eaffee08e61f2a34e01eb8f9f04519aac633f48c | [
"MIT"
] | null | null | null | # Beispielprogramm für das Buch "Python Challenge"
#
# Copyright 2020 by Michael Inden
values = [1, 2, 3, 4, 5, 6, 7]
for n in range(len(values) -1, -1, -1):
print(values[n])
for val in reversed(values):
print(val)
for n in values[::-1]:
print(n)
| 15.588235 | 50 | 0.622642 |
af33bc68ce148614d43e2077ad676f01faafb349 | 2,480 | py | Python | src/test/tests/plots/filledboundary.py | visit-dav/vis | c08bc6e538ecd7d30ddc6399ec3022b9e062127e | [
"BSD-3-Clause"
] | 226 | 2018-12-29T01:13:49.000Z | 2022-03-30T19:16:31.000Z | src/test/tests/plots/filledboundary.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/plots/filledboundary.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: filledboundary.py
#
# Tests: mesh - 3D rectilinear, single domain
# plots - FilledBoundary
#
# Defect ID: none
#
# Programmer: Kathleen Biagas
# Date: June 11, 2020 ... | 22.545455 | 79 | 0.697177 |
af725a7e840f1ee4ff787f0214f824764b5eed29 | 483 | py | Python | Implementierung/ResearchEnvironment/AuthorizationManagement/migrations/0009_auto_20180128_2344.py | Sashks/PSE | ae2d8133a85563c33583f15b9ba76a3a2bf0c762 | [
"MIT"
] | null | null | null | Implementierung/ResearchEnvironment/AuthorizationManagement/migrations/0009_auto_20180128_2344.py | Sashks/PSE | ae2d8133a85563c33583f15b9ba76a3a2bf0c762 | [
"MIT"
] | null | null | null | Implementierung/ResearchEnvironment/AuthorizationManagement/migrations/0009_auto_20180128_2344.py | Sashks/PSE | ae2d8133a85563c33583f15b9ba76a3a2bf0c762 | [
"MIT"
] | null | null | null | # Generated by Django 2.0.1 on 2018-01-28 22:44
from django.db import migrations
class Migration(migrations.Migration):
dependencies = [
('AuthorizationManagement', '0008_auto_20180128_2335'),
]
operations = [
migrations.AlterUniqueTogether(
name='accessrequest',
... | 21.954545 | 63 | 0.606625 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.