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
d61aa5765b26435fc40482349503a6ec73792b3f
3,345
py
Python
src/onegov/core/static.py
politbuero-kampagnen/onegov-cloud
20148bf321b71f617b64376fe7249b2b9b9c4aa9
[ "MIT" ]
null
null
null
src/onegov/core/static.py
politbuero-kampagnen/onegov-cloud
20148bf321b71f617b64376fe7249b2b9b9c4aa9
[ "MIT" ]
null
null
null
src/onegov/core/static.py
politbuero-kampagnen/onegov-cloud
20148bf321b71f617b64376fe7249b2b9b9c4aa9
[ "MIT" ]
null
null
null
""" Static files in OneGov applications are served under ``/static``. By default the ``/static`` folder of the application is used, relative to the path of the application class. Files in that folder are available to everyone if enabled:: from onegov.core.framework import Framework class App(Framework): ...
28.589744
79
0.676831
61888c90c6c1e171d821b17ece09b4d0f16be36a
8,290
py
Python
api/models/measures.py
healthIMIS/aha-kompass
7b7cae24502c0c0e5635c587cfef797a93ae02b5
[ "MIT" ]
2
2021-03-23T20:32:38.000Z
2021-04-21T11:20:12.000Z
api/models/measures.py
healthIMIS/aha-kompass
7b7cae24502c0c0e5635c587cfef797a93ae02b5
[ "MIT" ]
4
2021-04-19T11:00:55.000Z
2021-04-20T08:21:48.000Z
api/models/measures.py
healthIMIS/aha-kompass
7b7cae24502c0c0e5635c587cfef797a93ae02b5
[ "MIT" ]
null
null
null
#!/usr/bin/env python3 # Corona-Info-App # Measures # © 2020 Tobias Höpp und Johannes Kreutz. # Include dependencies import enum from main import db import json from models.association_tables import * class sources(db.Model): #Datenquellen für Maßnahmen __tablename__ = "sources" id = db.Column(db.Integer, p...
50.242424
269
0.732207
9cf8899c7cf72bdd7a824e92c186458afa27722d
6,386
py
Python
app-backend/app/stakeholder.py
MarlonSchultz/SHM
f9082afb34d41ba20de564939c2e7de0caed907e
[ "MIT" ]
null
null
null
app-backend/app/stakeholder.py
MarlonSchultz/SHM
f9082afb34d41ba20de564939c2e7de0caed907e
[ "MIT" ]
1
2019-03-12T13:35:46.000Z
2019-03-12T13:35:46.000Z
app-backend/app/stakeholder.py
MarlonSchultz/SHM
f9082afb34d41ba20de564939c2e7de0caed907e
[ "MIT" ]
1
2019-03-15T13:29:57.000Z
2019-03-15T13:29:57.000Z
from flask import Blueprint, request, jsonify from sqlalchemy.exc import OperationalError, ProgrammingError from werkzeug.wrappers import Response from app import db class Stakeholder(db.Model): """ Stakeholder class. """ id = db.Column(db.Integer, primary_key=True) name = db.Column(db.String(300...
40.935897
133
0.684153
14995c6d74f4a25158e7d5a0f44192755bf49f39
893
py
Python
SleekSecurity/layers/plugins/audit/xst.py
GitInitDev/ZohoUniv
966704837e65f58b52492b56d08e7958df3d220a
[ "Unlicense" ]
null
null
null
SleekSecurity/layers/plugins/audit/xst.py
GitInitDev/ZohoUniv
966704837e65f58b52492b56d08e7958df3d220a
[ "Unlicense" ]
null
null
null
SleekSecurity/layers/plugins/audit/xst.py
GitInitDev/ZohoUniv
966704837e65f58b52492b56d08e7958df3d220a
[ "Unlicense" ]
null
null
null
#!/usr/bin/env python # -*- coding:utf-8 -*- # # @name: Wascan - Web Application Scanner # @repo: https://github.com/m4ll0k/Wascan # @author: Momo Outaadi (M4ll0k) # @license: See the file 'LICENSE.txt' from re import search,I from lib.utils.printer import * from lib.request.request import * class xst(Request...
24.805556
81
0.652856
1ae68e80de440caf13693da1319291aab6cf7fa9
48
py
Python
dtdocker/constants.py
oxsoftdev/dt-docker
8ba30bf5ca2a7b89f3c7658a7768b16dbf8514a5
[ "MIT" ]
null
null
null
dtdocker/constants.py
oxsoftdev/dt-docker
8ba30bf5ca2a7b89f3c7658a7768b16dbf8514a5
[ "MIT" ]
null
null
null
dtdocker/constants.py
oxsoftdev/dt-docker
8ba30bf5ca2a7b89f3c7658a7768b16dbf8514a5
[ "MIT" ]
null
null
null
import os BASEPATH = os.path.dirname(__file__)
12
36
0.770833
25cad67025247d4c8f181a05badaca24abe53e67
416
py
Python
Fastir_Collector/evt/windows2003ServerEvt.py
Unam3dd/Train-2018-2020
afb6ae70fe338cbe55a21b74648d91996b818fa2
[ "MIT" ]
4
2021-04-23T15:39:17.000Z
2021-12-27T22:53:24.000Z
Fastir_Collector/evt/windows2003ServerEvt.py
Unam3dd/Train-2018-2020
afb6ae70fe338cbe55a21b74648d91996b818fa2
[ "MIT" ]
null
null
null
Fastir_Collector/evt/windows2003ServerEvt.py
Unam3dd/Train-2018-2020
afb6ae70fe338cbe55a21b74648d91996b818fa2
[ "MIT" ]
2
2021-04-19T08:28:54.000Z
2022-01-19T13:23:29.000Z
# -*- coding: utf-8 -*- from __future__ import unicode_literals from logs import _EventLogs class Windows2003ServerEvt(_EventLogs): def __init__(self, params): super(Windows2003ServerEvt, self).__init__(params) def csv_event_logs(self): super(Windows2003ServerEvt, self)._csv_event_logs(True) ...
29.714286
64
0.742788
9fb1b304bb6d6064ccfd3fe171d532955eaf8d26
2,083
py
Python
test/test_npu/test_zeroslike.py
Ascend/pytorch
39849cf72dafe8d2fb68bd1679d8fd54ad60fcfc
[ "BSD-3-Clause" ]
1
2021-12-02T03:07:35.000Z
2021-12-02T03:07:35.000Z
test/test_npu/test_zeroslike.py
Ascend/pytorch
39849cf72dafe8d2fb68bd1679d8fd54ad60fcfc
[ "BSD-3-Clause" ]
1
2021-11-12T07:23:03.000Z
2021-11-12T08:28:13.000Z
test/test_npu/test_zeroslike.py
Ascend/pytorch
39849cf72dafe8d2fb68bd1679d8fd54ad60fcfc
[ "BSD-3-Clause" ]
null
null
null
# Copyright (c) 2020 Huawei Technologies Co., Ltd # Copyright (c) 2019, Facebook CORPORATION. # All rights reserved. # # Licensed under the BSD 3-Clause License (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # https://opensource.org/lice...
37.196429
74
0.675948
e2729e475b9f1c57f373c4b91cf146a805dc7357
15,203
py
Python
Packs/CarbonBlackEnterpriseEDR/Integrations/CarbonBlackEnterpriseEDR/test_data/raw_data.py
diCagri/content
c532c50b213e6dddb8ae6a378d6d09198e08fc9f
[ "MIT" ]
799
2016-08-02T06:43:14.000Z
2022-03-31T11:10:11.000Z
Packs/CarbonBlackEnterpriseEDR/Integrations/CarbonBlackEnterpriseEDR/test_data/raw_data.py
diCagri/content
c532c50b213e6dddb8ae6a378d6d09198e08fc9f
[ "MIT" ]
9,317
2016-08-07T19:00:51.000Z
2022-03-31T21:56:04.000Z
Packs/CarbonBlackEnterpriseEDR/Integrations/CarbonBlackEnterpriseEDR/test_data/raw_data.py
diCagri/content
c532c50b213e6dddb8ae6a378d6d09198e08fc9f
[ "MIT" ]
1,297
2016-08-04T13:59:00.000Z
2022-03-31T23:43:06.000Z
# guid: "7DESJ9GN-0034d5f2-00001f78-00000000-1d68709f411ee43" EVENT_BY_PROCESS = { "results": [{"backend_timestamp": "2020-10-07T01:15:43.141Z", "created_timestamp": "2020-10-14T06:53:22.029Z", "event_guid": "h9XCWYcZSviJ1Kj0bdYnsg", "event_hash": "OFrgVLsGT-WuhsTxibiRyQ", "event_...
93.845679
117
0.630468
b3b631930c4b9f8629bfcaf96185494b92ea0b6e
365
py
Python
75-sort-colors/75-sort-colors.py
hyeseonko/LeetCode
48dfc93f1638e13041d8ce1420517a886abbdc77
[ "MIT" ]
2
2021-12-05T14:29:06.000Z
2022-01-01T05:46:13.000Z
75-sort-colors/75-sort-colors.py
hyeseonko/LeetCode
48dfc93f1638e13041d8ce1420517a886abbdc77
[ "MIT" ]
null
null
null
75-sort-colors/75-sort-colors.py
hyeseonko/LeetCode
48dfc93f1638e13041d8ce1420517a886abbdc77
[ "MIT" ]
null
null
null
class Solution: def sortColors(self, nums: List[int]) -> None: """ Do not return anything, modify nums in-place instead. """ numdict={i: nums.count(i) for i in range(3)} cur=0 for i in range(len(nums)): while(numdict[cur]==0): cur+=1 ...
30.416667
61
0.490411
377dd206d4670868db4dfc807f0f21801e79ddc6
680
py
Python
back-end/src/analysis/cdf.py
akshah/iodb
80fbad1cb639e2cad304d6565cf4918ee5b4e4c0
[ "Apache-2.0" ]
null
null
null
back-end/src/analysis/cdf.py
akshah/iodb
80fbad1cb639e2cad304d6565cf4918ee5b4e4c0
[ "Apache-2.0" ]
null
null
null
back-end/src/analysis/cdf.py
akshah/iodb
80fbad1cb639e2cad304d6565cf4918ee5b4e4c0
[ "Apache-2.0" ]
null
null
null
import numpy as np import statsmodels.api as sm # recommended import according to the docs import matplotlib.pyplot as plt import matplotlib.ticker as mtick with open("/raid/akshah/BGP-Ping-Data/raw_data/demo_data/iodb2_durations", "r") as ins: sample = [] for line in ins: line=line.rstrip() if not line.isdi...
25.185185
87
0.695588
807357244e746079480b7a371f27ec04e0e9d3b4
1,554
py
Python
marsyas-vamp/marsyas/src/marsyas_python/resynthesis.py
jaouahbi/VampPlugins
27c2248d1c717417fe4d448cdfb4cb882a8a336a
[ "Apache-2.0" ]
null
null
null
marsyas-vamp/marsyas/src/marsyas_python/resynthesis.py
jaouahbi/VampPlugins
27c2248d1c717417fe4d448cdfb4cb882a8a336a
[ "Apache-2.0" ]
null
null
null
marsyas-vamp/marsyas/src/marsyas_python/resynthesis.py
jaouahbi/VampPlugins
27c2248d1c717417fe4d448cdfb4cb882a8a336a
[ "Apache-2.0" ]
null
null
null
import marsyas import marsyas_util source = ["Series/source", ["SoundFileSource/src", "ShiftInput/sft", "Windowing/win", "Spectrum/spk", "Whitening/wtn", "Transposer/tp1"]] filter = ["Series/filter", ["SoundFileSource/src2", "ShiftInput/sft2", "Windowing/win2", "Spectrum/sinspk", "PowerSpectrum/pwrsin", "Transposer/s...
47.090909
170
0.721364
80a1da0a11f18748d7eb3d3c9d07157d36584ff2
692
py
Python
setup.py
Killerhaschen/marvin-telegram-bot
c65e890a00450ed6ed4312d93e259db0c080ef6d
[ "MIT" ]
null
null
null
setup.py
Killerhaschen/marvin-telegram-bot
c65e890a00450ed6ed4312d93e259db0c080ef6d
[ "MIT" ]
null
null
null
setup.py
Killerhaschen/marvin-telegram-bot
c65e890a00450ed6ed4312d93e259db0c080ef6d
[ "MIT" ]
null
null
null
from setuptools import setup with open("README.md", "r") as fh: long_description = fh.read() setup( name="samt", version=0.4, author="neunzehnhundert97", packages=["samt"], classifiers=[ "Development Status :: 2 - Pre-Alpha", "Programming Language :: Python :: 3 :: Only", ...
26.615385
60
0.622832
80c009038480c1d448ea0f96d100e7b4adfc68af
2,609
py
Python
Packs/CommonWidgets/Scripts/FeedIntegrationErrorWidget/FeedIntegrationErrorWidget_test.py
diCagri/content
c532c50b213e6dddb8ae6a378d6d09198e08fc9f
[ "MIT" ]
799
2016-08-02T06:43:14.000Z
2022-03-31T11:10:11.000Z
Packs/CommonWidgets/Scripts/FeedIntegrationErrorWidget/FeedIntegrationErrorWidget_test.py
diCagri/content
c532c50b213e6dddb8ae6a378d6d09198e08fc9f
[ "MIT" ]
9,317
2016-08-07T19:00:51.000Z
2022-03-31T21:56:04.000Z
Packs/CommonWidgets/Scripts/FeedIntegrationErrorWidget/FeedIntegrationErrorWidget_test.py
diCagri/content
c532c50b213e6dddb8ae6a378d6d09198e08fc9f
[ "MIT" ]
1,297
2016-08-04T13:59:00.000Z
2022-03-31T23:43:06.000Z
import json import demistomock as demisto from FeedIntegrationErrorWidget import get_feed_integration_errors def test_get_feed_integration_errors(mocker): ''' Given: - Integration search result which contains the following: - Enabled feed integration instance with error - Feed...
31.059524
66
0.522039
03e5faaa5bbf6ab19dec221fd50248b663bd652d
2,433
py
Python
feedcrawler/sites/content_shows_dj.py
rix1337/RSScrawler
5a1c067148310c03321329d3fa409a4e4144fce7
[ "MIT" ]
63
2016-03-21T21:35:07.000Z
2021-03-20T22:50:34.000Z
feedcrawler/sites/content_shows_dj.py
rix1337/RSScrawler
5a1c067148310c03321329d3fa409a4e4144fce7
[ "MIT" ]
200
2016-03-15T21:45:26.000Z
2021-04-03T10:47:45.000Z
feedcrawler/sites/content_shows_dj.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 import feedcrawler.sites.shared.content_shows as shared_shows from feedcrawler.config import CrawlerConfig from feedcrawler.db import FeedDb from feedcrawler.sites.shared.internal_feed import j_parse_download from feedcrawler.sites.shared.i...
38.619048
118
0.670366
20d744165096d4c7780d5933c83ed17b2fdeadea
1,963
py
Python
simple-tensorflow-demo/4.demos/4.nnTest.py
crackedcd/Intern.MT
36398837af377a7e1c4edd7cbb15eabecd2c3103
[ "MIT" ]
1
2019-07-05T03:42:17.000Z
2019-07-05T03:42:17.000Z
simple-tensorflow-demo/4.demos/4.nnTest.py
crackedcd/Intern.MT
36398837af377a7e1c4edd7cbb15eabecd2c3103
[ "MIT" ]
null
null
null
simple-tensorflow-demo/4.demos/4.nnTest.py
crackedcd/Intern.MT
36398837af377a7e1c4edd7cbb15eabecd2c3103
[ "MIT" ]
1
2019-06-24T05:56:55.000Z
2019-06-24T05:56:55.000Z
""" x1 --w1--> | x2 --w2--> | x3 --w3--> | --> x_new ... | b ------> | x_new = f(sigma(x * w) + b) f activation function 激活函数, 引入激活函数, 是为了引入非线性, 提高模型表达力. w weight 权重 b bias 偏置 relu: f(x) = max(x, 0) sigmoid: f(x) = 1 / (1+e^(-x)) tanh: f(x) = (1-e^(-2x)) / (1+e^(-2x)) NN的层数: 因为输入层没有计算, 所以层数 = 隐藏层 + 输出层 NN的复杂...
22.825581
71
0.481915
ff8d6e725ab316f686ffa4ca27b663d196095b49
3,053
py
Python
create_markdown.py
jonek/klimawatch
1dbacdbb9926995b2364bd3f1a6f7427b6e37b33
[ "Apache-2.0" ]
22
2019-11-09T16:54:50.000Z
2022-01-04T10:23:04.000Z
create_markdown.py
jonek/klimawatch
1dbacdbb9926995b2364bd3f1a6f7427b6e37b33
[ "Apache-2.0" ]
106
2019-11-06T17:38:34.000Z
2022-03-19T09:58:54.000Z
create_markdown.py
jonek/klimawatch
1dbacdbb9926995b2364bd3f1a6f7427b6e37b33
[ "Apache-2.0" ]
17
2019-11-26T11:34:29.000Z
2022-03-18T12:18:20.000Z
# coding=utf-8 import sys # reading command line arguments import csv from datetime import date import locale from distutils.util import strtobool import os from pathlib import Path if len(sys.argv) <= 1: print("No city given, Stopping script.") quit() else: city = sys.argv[1] # FIXME: not nice but it works...
41.256757
189
0.716017
84b58b7a984a27869694adbee5211ff889066716
237
py
Python
python/python_backup/Python_Progs/PYTHON_LEGACY_PROJECTS/Additon_of_Two_Matrices.py
SayanGhoshBDA/code-backup
8b6135facc0e598e9686b2e8eb2d69dd68198b80
[ "MIT" ]
16
2018-11-26T08:39:42.000Z
2019-05-08T10:09:52.000Z
python/python_backup/Python_Progs/PYTHON_LEGACY_PROJECTS/Additon_of_Two_Matrices.py
SayanGhoshBDA/code-backup
8b6135facc0e598e9686b2e8eb2d69dd68198b80
[ "MIT" ]
8
2020-05-04T06:29:26.000Z
2022-02-12T05:33:16.000Z
python/python_backup/Python_Progs/PYTHON_LEGACY_PROJECTS/Additon_of_Two_Matrices.py
SayanGhoshBDA/code-backup
8b6135facc0e598e9686b2e8eb2d69dd68198b80
[ "MIT" ]
5
2020-02-11T16:02:21.000Z
2021-02-05T07:48:30.000Z
X=[[12,7,3], [4,5,6], [7,8,9]] Y=[[5,8,1], [6,7,3], [4,5,9]] result=[[0,0,0], [0,0,0], [0,0,0]] for i in range(len(X)): for j in range(len(X[0])): result[i][j]=X[i][j]+Y[i][j] for r in result: print(r)
13.166667
30
0.417722
84c86ebbd7d52f1a0251de7f3c881b9ef36dc6f0
2,706
py
Python
Tutorials/30_days_of_code/2DArrays.py
vinayvinu500/Hackerrank
e185ae9d3c7dc5cd661761142e436f5df6a3f0f1
[ "MIT" ]
null
null
null
Tutorials/30_days_of_code/2DArrays.py
vinayvinu500/Hackerrank
e185ae9d3c7dc5cd661761142e436f5df6a3f0f1
[ "MIT" ]
null
null
null
Tutorials/30_days_of_code/2DArrays.py
vinayvinu500/Hackerrank
e185ae9d3c7dc5cd661761142e436f5df6a3f0f1
[ "MIT" ]
null
null
null
import numpy as np # https://www.hackerrank.com/challenges/2d-array/problem?h_r=internal-search arr = [] for _ in range(6): arr.append(list(map(int, input().strip().split()))) pass arr = np.array(arr) print(arr) """ hour glass are 16 in 6x6 matrix [ 1 1 1 1 1 1 1 ] """ # print(arr.size) # no...
17.346154
95
0.486696
84ff0f5c06b6d01d821406db4011cd894029c44b
854
py
Python
python/click/complex_applications.py
zeroam/TIL
43e3573be44c7f7aa4600ff8a34e99a65cbdc5d1
[ "MIT" ]
null
null
null
python/click/complex_applications.py
zeroam/TIL
43e3573be44c7f7aa4600ff8a34e99a65cbdc5d1
[ "MIT" ]
null
null
null
python/click/complex_applications.py
zeroam/TIL
43e3573be44c7f7aa4600ff8a34e99a65cbdc5d1
[ "MIT" ]
null
null
null
import os import click class Repo(object): def __init__(self, home=None, debug=False): self.home = os.path.abspath(home or ".") self.debug = debug def __repr__(self): return f"Repo: {self.home}, debug: {self.debug}" pass_repo = click.make_pass_decorator(Repo, ensure=True) @click.gr...
22.473684
71
0.648712
04ddb47b65024377666a0192e2631bbf50416b08
18,687
py
Python
Packs/NutanixHypervisor/Integrations/NutanixHypervisor/NutanixHypervisor_test.py
diCagri/content
c532c50b213e6dddb8ae6a378d6d09198e08fc9f
[ "MIT" ]
799
2016-08-02T06:43:14.000Z
2022-03-31T11:10:11.000Z
Packs/NutanixHypervisor/Integrations/NutanixHypervisor/NutanixHypervisor_test.py
diCagri/content
c532c50b213e6dddb8ae6a378d6d09198e08fc9f
[ "MIT" ]
9,317
2016-08-07T19:00:51.000Z
2022-03-31T21:56:04.000Z
Packs/NutanixHypervisor/Integrations/NutanixHypervisor/NutanixHypervisor_test.py
diCagri/content
c532c50b213e6dddb8ae6a378d6d09198e08fc9f
[ "MIT" ]
1,297
2016-08-04T13:59:00.000Z
2022-03-31T23:43:06.000Z
"""Nutanix Integration for Cortex XSOAR - Unit Tests file""" import io import json from datetime import datetime from typing import * import pytest from CommonServerPython import DemistoException, CommandResults from NutanixHypervisor import Client from NutanixHypervisor import USECS_ENTRIES_MAPPING from NutanixHype...
43.057604
117
0.647509
edb843e4c45c01823838d540e462ab5bf84cd8f6
508
py
Python
Algorithms/Sort_Algorithms/Bubble_Sort/bubble-sort.py
hussamEL-Hwary/DS-Algo-Handbook
86a97d586a4ca8b17168c0a9f5a9f43f856eba58
[ "MIT" ]
18
2016-11-01T04:00:36.000Z
2021-09-13T14:26:35.000Z
Algorithms/Sort_Algorithms/Bubble_Sort/bubble-sort.py
JEERU/DS-Algo-Handbook
86a97d586a4ca8b17168c0a9f5a9f43f856eba58
[ "MIT" ]
60
2016-10-11T14:50:47.000Z
2016-10-31T11:05:01.000Z
Algorithms/Sort_Algorithms/Bubble_Sort/bubble-sort.py
JEERU/DS-Algo-Handbook
86a97d586a4ca8b17168c0a9f5a9f43f856eba58
[ "MIT" ]
87
2016-09-08T05:04:50.000Z
2016-10-30T19:19:53.000Z
#!/usr/bin/env python3 # Written by @daydreamer at Oct 12, 2016. Trying to do same behaviour as the C code # Except for the input part sz = int(input('enter the number of elements to input:\n')) ar = list(map(int, input('enter the elements:\n').split(' '))) print("array before sorting:") for item in ar: print(item...
26.736842
83
0.625984
edd87d55d1dd07868d88f97ac2438db53a208b30
471
gyp
Python
source/pkgsrc/devel/gyp/patches/patch-test_module_src_module.gyp
Scottx86-64/dotfiles-1
51004b1e2b032664cce6b553d2052757c286087d
[ "Unlicense" ]
1
2021-11-20T22:46:39.000Z
2021-11-20T22:46:39.000Z
source/pkgsrc/devel/gyp/patches/patch-test_module_src_module.gyp
Scottx86-64/dotfiles-1
51004b1e2b032664cce6b553d2052757c286087d
[ "Unlicense" ]
null
null
null
source/pkgsrc/devel/gyp/patches/patch-test_module_src_module.gyp
Scottx86-64/dotfiles-1
51004b1e2b032664cce6b553d2052757c286087d
[ "Unlicense" ]
null
null
null
$NetBSD: patch-test_module_src_module.gyp,v 1.1 2014/08/21 14:49:43 he Exp $ Treat NetBSD mostly like Linux. --- test/module/src/module.gyp.orig 2014-08-12 13:43:00.000000000 +0000 +++ test/module/src/module.gyp @@ -17,6 +17,10 @@ 'cflags': ['-fPIC'], 'libraries': ['-ldl'], }], + ['OS=="...
26.166667
76
0.543524
1e5cacdbe97aeb7d8ad1013e89c0b9bc952077df
253
py
Python
Algorithms/Warmup/simple_array_sum.py
byung-u/HackerRank
4c02fefff7002b3af774b99ebf8d40f149f9d163
[ "MIT" ]
null
null
null
Algorithms/Warmup/simple_array_sum.py
byung-u/HackerRank
4c02fefff7002b3af774b99ebf8d40f149f9d163
[ "MIT" ]
null
null
null
Algorithms/Warmup/simple_array_sum.py
byung-u/HackerRank
4c02fefff7002b3af774b99ebf8d40f149f9d163
[ "MIT" ]
null
null
null
#!/usr/bin/env python3 import sys from functools import reduce def simpleArraySum(n, ar): return reduce(lambda x, y: x + y, ar) n = int(input().strip()) ar = list(map(int, input().strip().split(' '))) result = simpleArraySum(n, ar) print(result)
19.461538
47
0.667984
785bcd6b2d2f9b2b45e029226471454e16e78f64
953
py
Python
graphs/models.py
m-atisa/Standard-Answer-App
28ad940925f794b1ca0cfd66f850f780aa43b4f8
[ "Apache-2.0" ]
null
null
null
graphs/models.py
m-atisa/Standard-Answer-App
28ad940925f794b1ca0cfd66f850f780aa43b4f8
[ "Apache-2.0" ]
null
null
null
graphs/models.py
m-atisa/Standard-Answer-App
28ad940925f794b1ca0cfd66f850f780aa43b4f8
[ "Apache-2.0" ]
null
null
null
# %% import pandas as pd from plotly.offline import plot import plotly.graph_objects as go # %% from django.db import models from django.views.generic.base import TemplateView # %% def AmericanStates(csv_file_path, name): states = pd.read_csv(csv_file_path) fig = go.Figure( data=go.Choropleth( ...
26.472222
98
0.588667
bf381cbd387b2dd5cbfe35f675426ae8586b6709
2,275
py
Python
opencv_tutorial/opencv_python_tutorials/Image_Processing/image_smoothing.py
zeroam/TIL
43e3573be44c7f7aa4600ff8a34e99a65cbdc5d1
[ "MIT" ]
null
null
null
opencv_tutorial/opencv_python_tutorials/Image_Processing/image_smoothing.py
zeroam/TIL
43e3573be44c7f7aa4600ff8a34e99a65cbdc5d1
[ "MIT" ]
null
null
null
opencv_tutorial/opencv_python_tutorials/Image_Processing/image_smoothing.py
zeroam/TIL
43e3573be44c7f7aa4600ff8a34e99a65cbdc5d1
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- """ Created on Sun Mar 31 21:52:17 2019 @author: imdff """ #%% Image Filtering import cv2 import numpy as np def nothing(x): pass img = cv2.imread('img/squirrel.jpg') # 사이즈 조정 h, w = img.shape[:2] r = 900/w dim = (int(r*w), int(r*h)) img = cv2.resize(img, dim) cv2.namedWindow('image') ...
19.444444
84
0.594725
1787a5eb06827b5230b303c21dfdc3c37846b6a0
858
py
Python
python/en/archive/dropbox/udacity-ds_and_algos/02-data-string.py
aimldl/coding
70ddbfaa454ab92fd072ee8dc614ecc330b34a70
[ "MIT" ]
null
null
null
python/en/archive/dropbox/udacity-ds_and_algos/02-data-string.py
aimldl/coding
70ddbfaa454ab92fd072ee8dc614ecc330b34a70
[ "MIT" ]
null
null
null
python/en/archive/dropbox/udacity-ds_and_algos/02-data-string.py
aimldl/coding
70ddbfaa454ab92fd072ee8dc614ecc330b34a70
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- """ Created on Mon Jul 1 23:46:47 2019 @author: aimldl """ # Code def anagram_checker(str1, str2): """ Check if the input strings are anagrams of each other Args: str1(string),str2(string): Strings to be checked Returns: bool: Indicates whethe...
26.8125
107
0.636364
bd9f0a0a12e39fa29255293ee518a30525cd6795
3,608
py
Python
repo/service.vpn.manager/libs/logbox.py
dbiesecke/dbiesecke.github.io
5894473591f078fd22d1cb33794c5e656ae9b8dd
[ "MIT" ]
1
2017-11-26T18:18:46.000Z
2017-11-26T18:18:46.000Z
repo/service.vpn.manager/libs/logbox.py
dbiesecke/dbiesecke.github.io
5894473591f078fd22d1cb33794c5e656ae9b8dd
[ "MIT" ]
null
null
null
repo/service.vpn.manager/libs/logbox.py
dbiesecke/dbiesecke.github.io
5894473591f078fd22d1cb33794c5e656ae9b8dd
[ "MIT" ]
3
2019-09-30T19:52:05.000Z
2020-04-12T21:20:56.000Z
#!/usr/bin/python # -*- coding: utf-8 -*- # # Copyright (C) 2016 Zomboided # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your...
38.795699
153
0.659922
e536a367f7045bbe91615d5789cdb65bd0fb02f1
9,190
py
Python
research/cv/RefineDet/src/refinedet.py
leelige/mindspore
5199e05ba3888963473f2b07da3f7bca5b9ef6dc
[ "Apache-2.0" ]
77
2021-10-15T08:32:37.000Z
2022-03-30T13:09:11.000Z
research/cv/RefineDet/src/refinedet.py
leelige/mindspore
5199e05ba3888963473f2b07da3f7bca5b9ef6dc
[ "Apache-2.0" ]
3
2021-10-30T14:44:57.000Z
2022-02-14T06:57:57.000Z
research/cv/RefineDet/src/refinedet.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...
40.844444
116
0.638955
005972d1e0364b4a78be0da31c91dc43bb4adc7b
92,815
py
Python
Packs/SophosCentral/Integrations/SophosCentral/SophosCentral_test.py
diCagri/content
c532c50b213e6dddb8ae6a378d6d09198e08fc9f
[ "MIT" ]
799
2016-08-02T06:43:14.000Z
2022-03-31T11:10:11.000Z
Packs/SophosCentral/Integrations/SophosCentral/SophosCentral_test.py
diCagri/content
c532c50b213e6dddb8ae6a378d6d09198e08fc9f
[ "MIT" ]
9,317
2016-08-07T19:00:51.000Z
2022-03-31T21:56:04.000Z
Packs/SophosCentral/Integrations/SophosCentral/SophosCentral_test.py
diCagri/content
c532c50b213e6dddb8ae6a378d6d09198e08fc9f
[ "MIT" ]
1,297
2016-08-04T13:59:00.000Z
2022-03-31T23:43:06.000Z
import json from datetime import datetime import pytest import requests from pytest import raises import demistomock as demisto from CommonServerPython import ( DemistoException, EntryType, set_integration_context, get_integration_context, ) from SophosCentral import Client from unittest im...
35.933024
116
0.672262
006ebba40c32588c629a5d451d1cb37772a91871
7,258
py
Python
src/onegov/core/templates.py
politbuero-kampagnen/onegov-cloud
20148bf321b71f617b64376fe7249b2b9b9c4aa9
[ "MIT" ]
null
null
null
src/onegov/core/templates.py
politbuero-kampagnen/onegov-cloud
20148bf321b71f617b64376fe7249b2b9b9c4aa9
[ "MIT" ]
null
null
null
src/onegov/core/templates.py
politbuero-kampagnen/onegov-cloud
20148bf321b71f617b64376fe7249b2b9b9c4aa9
[ "MIT" ]
null
null
null
""" Integrates the Chameleon template language. This is basically a copy of more.chameleon, with the additional inclusion of a gettext translation function defined by :mod:`onegov.core.i18n`. To use a chameleon template, applications have to specify the templates directory, in addition to inheriting from :class:`oneg...
30.754237
79
0.682557
c19fe03368264697077a2df6bd0eaa1018ecae07
676
py
Python
MA/TestImageAnalysis.py
mirrorcoloured/slcypi
c47975b3523f770d12a521c82e2dfca181e3f35b
[ "MIT" ]
null
null
null
MA/TestImageAnalysis.py
mirrorcoloured/slcypi
c47975b3523f770d12a521c82e2dfca181e3f35b
[ "MIT" ]
null
null
null
MA/TestImageAnalysis.py
mirrorcoloured/slcypi
c47975b3523f770d12a521c82e2dfca181e3f35b
[ "MIT" ]
null
null
null
import cv2 import numpy as np import matplotlib.pyplot as plt import time from ImageAnalysis import ImageAnalysis cap = cv2.VideoCapture(0) IA = ImageAnalysis() # Previous _, frame = cap.read() previous = frame hsv = np.zeros_like(previous) hsv[...,1] = 255 while True: # Current _, frame = cap.read() ...
16.487805
47
0.652367
e7211c45c7a845e0095366a9b32a4819fabf72c7
700
py
Python
___Python/Angela/PyKurs/p11_excel/m01_excel_lesen.py
uvenil/PythonKurs201806
85afa9c9515f5dd8bec0c546f077d8cc39568fe8
[ "Apache-2.0" ]
null
null
null
___Python/Angela/PyKurs/p11_excel/m01_excel_lesen.py
uvenil/PythonKurs201806
85afa9c9515f5dd8bec0c546f077d8cc39568fe8
[ "Apache-2.0" ]
null
null
null
___Python/Angela/PyKurs/p11_excel/m01_excel_lesen.py
uvenil/PythonKurs201806
85afa9c9515f5dd8bec0c546f077d8cc39568fe8
[ "Apache-2.0" ]
null
null
null
from datetime import datetime, date import xlrd from xlrd import xldate_as_tuple def open_file(path): book = xlrd.open_workbook(path) print(book.nsheets) print(book.sheet_names()) sheet = book.sheet_by_index(0) for i in range(sheet.nrows): values = [] for k in range(she...
25
90
0.641429
99d02fedda73c75583ab30c8b495600d1511fa82
38,098
py
Python
Packs/ThreatExchange/Integrations/ThreatExchangeV2/ThreatExchangeV2.py
diCagri/content
c532c50b213e6dddb8ae6a378d6d09198e08fc9f
[ "MIT" ]
799
2016-08-02T06:43:14.000Z
2022-03-31T11:10:11.000Z
Packs/ThreatExchange/Integrations/ThreatExchangeV2/ThreatExchangeV2.py
diCagri/content
c532c50b213e6dddb8ae6a378d6d09198e08fc9f
[ "MIT" ]
9,317
2016-08-07T19:00:51.000Z
2022-03-31T21:56:04.000Z
Packs/ThreatExchange/Integrations/ThreatExchangeV2/ThreatExchangeV2.py
diCagri/content
c532c50b213e6dddb8ae6a378d6d09198e08fc9f
[ "MIT" ]
1,297
2016-08-04T13:59:00.000Z
2022-03-31T23:43:06.000Z
""" An integration module for the ThreatExchange V2 API. API Documentation: https://developers.facebook.com/docs/threat-exchange/reference/apis """ import collections from typing import Tuple import urllib3 from CommonServerUserPython import * # noqa from CommonServerPython import * # noqa # pylint: disable=unus...
39.034836
120
0.624311
99e22311116678a30a7db30379feaa03359e0f73
378
py
Python
pacman-arch/test/pacman/tests/upgrade081.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/upgrade081.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/upgrade081.py
Scottx86-64/dotfiles-1
51004b1e2b032664cce6b553d2052757c286087d
[ "Unlicense" ]
1
2021-09-26T08:44:40.000Z
2021-09-26T08:44:40.000Z
self.description = "Install a package (wrong architecture)" p = pmpkg("dummy") p.files = ["bin/dummy", "usr/man/man1/dummy.1"] p.arch = 'testarch' self.addpkg(p) self.option["Architecture"] = ['nottestarch'] self.args = "-U %s" % p.filename() self.addrule("PACMAN_RETCODE=1") self.addrule("!PKG_EXIST=dumm...
22.235294
59
0.661376
4130663fb3b719866294c382b52441331ee5227d
2,732
py
Python
spider/master_online_nd.py
iecasszyjy/tweet_search-master
e4978521a39964c22ae46bf35d6ff17710e8e6c6
[ "MIT" ]
null
null
null
spider/master_online_nd.py
iecasszyjy/tweet_search-master
e4978521a39964c22ae46bf35d6ff17710e8e6c6
[ "MIT" ]
2
2021-03-31T18:54:16.000Z
2021-12-13T19:49:08.000Z
spider/master_online_nd.py
iecasszyjy/tweet_search-master
e4978521a39964c22ae46bf35d6ff17710e8e6c6
[ "MIT" ]
null
null
null
import re import json import fire import time from tqdm import tqdm from datetime import datetime, timedelta from collections import Counter from Config import get_noau_config _, db, r = get_noau_config() # users = [i['tweet']['user']['screen_name'] for i in db.dataset_korea_m_1.find({}, {"tweet.user.screen_name": 1}...
44.064516
151
0.554905
41705c132537328d1fd4d14302ee03bfb31612ff
4,789
py
Python
scripts/express_diff/__main__.py
jdehotin/IFC4.3.x-development
5652a25dac27242af8c60f1a33206d1697948ffa
[ "FSFAP" ]
1
2021-08-31T16:12:09.000Z
2021-08-31T16:12:09.000Z
scripts/express_diff/__main__.py
Moult/IFC4.3.x-development
5dfacdc91f04b446f9d7386b950099fc14e6587e
[ "FSFAP" ]
null
null
null
scripts/express_diff/__main__.py
Moult/IFC4.3.x-development
5dfacdc91f04b446f9d7386b950099fc14e6587e
[ "FSFAP" ]
null
null
null
import os import sys import operator import itertools import tabulate sys.path.append(os.path.abspath(os.path.dirname(__file__))) import express_parser import nodes fn1, fn2, output = sys.argv[1:] print("Running difference", *sys.argv[1:]) def eq(a, b): if (type(a) != type(b)): return False elif i...
42.758929
156
0.55001
6bf710eb8e2dd077de2f3b3c58ca8f5a1a1d14e5
29
py
Python
Python/zzz_training_challenge/UdemyPythonPro/Chapter10_Cython/1_VectorND/fastvector/__init__.py
Kreijeck/learning
eaffee08e61f2a34e01eb8f9f04519aac633f48c
[ "MIT" ]
4
2020-12-28T23:43:35.000Z
2022-01-01T18:34:18.000Z
Python/zzz_training_challenge/UdemyPythonPro/Chapter10_Cython/1_VectorND/fastvector/__init__.py
Kreijeck/learning
eaffee08e61f2a34e01eb8f9f04519aac633f48c
[ "MIT" ]
null
null
null
Python/zzz_training_challenge/UdemyPythonPro/Chapter10_Cython/1_VectorND/fastvector/__init__.py
Kreijeck/learning
eaffee08e61f2a34e01eb8f9f04519aac633f48c
[ "MIT" ]
9
2020-09-26T19:29:28.000Z
2022-02-07T06:41:00.000Z
from .vector import VectorND
14.5
28
0.827586
2e7899dca03361da805eb1493d2c8251b26db84a
1,303
py
Python
year_2/prog_base_sem1/lab3/jsonreader.py
honchardev/KPI
f8425681857c02a67127ffb05c0af0563a8473e1
[ "MIT" ]
null
null
null
year_2/prog_base_sem1/lab3/jsonreader.py
honchardev/KPI
f8425681857c02a67127ffb05c0af0563a8473e1
[ "MIT" ]
21
2020-03-24T16:26:04.000Z
2022-02-18T15:56:16.000Z
year_2/prog_base_sem1/lab3/jsonreader.py
honchardev/KPI
f8425681857c02a67127ffb05c0af0563a8473e1
[ "MIT" ]
null
null
null
from os import getcwd import json class JsonReader: """Class for reading and writing posts from/to .json file.""" # TODO: setPost, delPost, addPost def __init__(self): self.json_path = getcwd() + '/data/data.json' # Get posts from JSON and save them as a dictionary. self._posts_d...
31.780488
90
0.608596
cf2886baf4918413897ad8e831ce5c8eab607214
27,793
py
Python
myems-aggregation/space_energy_output_category.py
guangyuzhang/myems
c88f0620d3e36154a500c755c805333b771d09c0
[ "MIT" ]
82
2021-02-19T10:24:31.000Z
2022-03-28T06:30:18.000Z
myems-aggregation/space_energy_output_category.py
guangyuzhang/myems
c88f0620d3e36154a500c755c805333b771d09c0
[ "MIT" ]
188
2021-02-22T07:08:30.000Z
2022-03-02T04:11:03.000Z
myems-aggregation/space_energy_output_category.py
guangyuzhang/myems
c88f0620d3e36154a500c755c805333b771d09c0
[ "MIT" ]
54
2021-02-19T08:48:46.000Z
2022-03-30T06:21:34.000Z
import time from datetime import datetime, timedelta from decimal import Decimal import mysql.connector from multiprocessing import Pool import random import config ######################################################################################################################## # PROCEDURES # Step 1: get all s...
51.949533
120
0.529774
51ab1e4e1a238c16a43d67e2e14c0b8f9c90021c
6,126
py
Python
official_examples/Reinforcement_Learning_GameSolution_Examples/vizdoom/async_multi/game_interface.py
RuichunWang/ModelArts-Lab
cfa9a853e3a76a21eac2818f055b36978ac2bb69
[ "Apache-2.0" ]
1,045
2019-05-09T02:50:43.000Z
2022-03-31T06:22:11.000Z
official_examples/Reinforcement_Learning_GameSolution_Examples/vizdoom/async_multi/game_interface.py
RuichunWang/ModelArts-Lab
cfa9a853e3a76a21eac2818f055b36978ac2bb69
[ "Apache-2.0" ]
1,468
2019-05-16T00:48:18.000Z
2022-03-08T04:12:44.000Z
official_examples/Reinforcement_Learning_GameSolution_Examples/vizdoom/async_multi/game_interface.py
RuichunWang/ModelArts-Lab
cfa9a853e3a76a21eac2818f055b36978ac2bb69
[ "Apache-2.0" ]
1,077
2019-05-09T02:50:53.000Z
2022-03-27T11:05:32.000Z
import os import time from multiprocessing import Process, Queue from random import random from time import sleep import numpy as np import skimage.color import skimage.transform from vizdoom import * class GameInterface(): def __init__(self, *args): # Create Doom instance print("Initializing doo...
35.616279
115
0.572641
5c5e8d4a00a1a455e12ff2b9e4760a46e9e50642
18,922
py
Python
tests/onegov/search/test_indexer.py
politbuero-kampagnen/onegov-cloud
20148bf321b71f617b64376fe7249b2b9b9c4aa9
[ "MIT" ]
null
null
null
tests/onegov/search/test_indexer.py
politbuero-kampagnen/onegov-cloud
20148bf321b71f617b64376fe7249b2b9b9c4aa9
[ "MIT" ]
null
null
null
tests/onegov/search/test_indexer.py
politbuero-kampagnen/onegov-cloud
20148bf321b71f617b64376fe7249b2b9b9c4aa9
[ "MIT" ]
null
null
null
import logging import pytest from datetime import datetime from onegov.search import Searchable, SearchOfflineError, utils from onegov.search.indexer import parse_index_name from onegov.search.indexer import ( Indexer, IndexManager, ORMEventTranslator, TypeMapping, TypeMappingRegistry ) from queue ...
26.280556
77
0.538685
8f97afbee3a15100838e284bd0047ee5b056180b
560
py
Python
Chapter9_AdvancedDL/Chapter9_5_RegressionProblems/taxiRoutingLinReg.py
thisisjako/UdemyTF
ee4102391ed6bd50f764955f732f5740425a9209
[ "MIT" ]
null
null
null
Chapter9_AdvancedDL/Chapter9_5_RegressionProblems/taxiRoutingLinReg.py
thisisjako/UdemyTF
ee4102391ed6bd50f764955f732f5740425a9209
[ "MIT" ]
null
null
null
Chapter9_AdvancedDL/Chapter9_5_RegressionProblems/taxiRoutingLinReg.py
thisisjako/UdemyTF
ee4102391ed6bd50f764955f732f5740425a9209
[ "MIT" ]
null
null
null
import os from sklearn.linear_model import LinearRegression from tf_utils.taxiRoutingData import TAXIROUTING EXCEL_FILE_PATH = os.path.abspath("C:/Users/Jan/Dropbox/_Programmieren/UdemyTF/data/taxiDataset.xlsx") if __name__ == "__main__": data = TAXIROUTING(excel_file_path=EXCEL_FILE_PATH) x_train, y_tra...
24.347826
102
0.757143
85a5673910258f144222fe87fa7be3f19cdfa705
2,329
py
Python
bp-revok/python/lib/python2.7/site-packages/netlib/test.py
fkolacek/FIT-VUT
bb6f7f6eb1fea1f13952e0ab463e5aa69a84084c
[ "Apache-2.0" ]
null
null
null
bp-revok/python/lib/python2.7/site-packages/netlib/test.py
fkolacek/FIT-VUT
bb6f7f6eb1fea1f13952e0ab463e5aa69a84084c
[ "Apache-2.0" ]
null
null
null
bp-revok/python/lib/python2.7/site-packages/netlib/test.py
fkolacek/FIT-VUT
bb6f7f6eb1fea1f13952e0ab463e5aa69a84084c
[ "Apache-2.0" ]
3
2017-04-07T12:02:22.000Z
2020-03-23T12:11:55.000Z
import threading, Queue, cStringIO import tcp, certutils class ServerThread(threading.Thread): def __init__(self, server): self.server = server threading.Thread.__init__(self) def run(self): self.server.serve_forever() def shutdown(self): self.server.shutdown() class Ser...
28.402439
75
0.574066
74fe4bf214f87aa40334741cb9924e9eba9870d2
375
py
Python
Programming Languages/Python/Theory/100_Python_Challenges/Section_2_String/29. return the letter added to string.py
jaswinder9051998/Resources
fd468af37bf24ca57555d153ee64693c018e822e
[ "MIT" ]
101
2021-12-20T11:57:11.000Z
2022-03-23T09:49:13.000Z
Programming Languages/Python/Theory/100_Python_Challenges/Section_2_String/29. return the letter added to string.py
Sid-1164/Resources
3987dcaeddc8825f9bc79609ff26094282b8ece1
[ "MIT" ]
4
2022-01-12T11:55:56.000Z
2022-02-12T04:53:33.000Z
Programming Languages/Python/Theory/100_Python_Challenges/Section_2_String/29. return the letter added to string.py
Sid-1164/Resources
3987dcaeddc8825f9bc79609ff26094282b8ece1
[ "MIT" ]
38
2022-01-12T11:56:16.000Z
2022-03-23T10:07:52.000Z
""" Given two strings s and t. String t is generated by shuffling string s and then adding one more letter at a random position. Return the letter that was added to t. Example: s = 'Python' t = 'thnobPy' Expected output = 'b' """ def new_letter(s,t): new = "" for i in t: if i in s: pas...
17.045455
125
0.589333
24eb06d4a6e1139d0e572a794154d48f364c5e50
10,413
py
Python
Woche 5/utils.py
manfred-l-stark/AMALEA
c4ea976d7e4a42520ef92e8a394ce60a48b681f9
[ "CC0-1.0", "CC-BY-4.0" ]
1
2021-09-30T19:53:52.000Z
2021-09-30T19:53:52.000Z
Woche 5/utils.py
manfred-l-stark/AMALEA
c4ea976d7e4a42520ef92e8a394ce60a48b681f9
[ "CC0-1.0", "CC-BY-4.0" ]
null
null
null
Woche 5/utils.py
manfred-l-stark/AMALEA
c4ea976d7e4a42520ef92e8a394ce60a48b681f9
[ "CC0-1.0", "CC-BY-4.0" ]
3
2021-09-29T13:03:07.000Z
2022-03-02T12:21:05.000Z
import glob import os from PIL import Image import matplotlib.pyplot as plt import numpy as np import keras from keras import backend as K from keras.layers import UpSampling2D from keras.layers import Conv2DTranspose from keras.layers import Input, BatchNormalization from keras.models import Model rgb_array = np.l...
30.008646
87
0.592817
560d016248fc460fc8c23fb0638162a9ba09be3a
2,013
py
Python
Python/zzz_training_challenge/Python_Challenge/solutions/ch04_strings/solutions/ex01_number_conversions.py
Kreijeck/learning
eaffee08e61f2a34e01eb8f9f04519aac633f48c
[ "MIT" ]
null
null
null
Python/zzz_training_challenge/Python_Challenge/solutions/ch04_strings/solutions/ex01_number_conversions.py
Kreijeck/learning
eaffee08e61f2a34e01eb8f9f04519aac633f48c
[ "MIT" ]
null
null
null
Python/zzz_training_challenge/Python_Challenge/solutions/ch04_strings/solutions/ex01_number_conversions.py
Kreijeck/learning
eaffee08e61f2a34e01eb8f9f04519aac633f48c
[ "MIT" ]
null
null
null
# Beispielprogramm für das Buch "Python Challenge" # # Copyright 2020 by Michael Inden def is_binary_number(number): is_binary = True i = 0 while i < len(number) and is_binary: current_char = number[i] is_binary = (current_char == "0" or current_char == "1") i += 1 return is...
20.333333
64
0.631396
562bf19e595983f32c6ce2e6b23819920f835b35
4,855
py
Python
3rdparty/webkit/Source/ThirdParty/ANGLE/src/libANGLE/gen_packed_gl_enums.py
mchiasson/PhaserNative
f867454602c395484bf730a7c43b9c586c102ac2
[ "MIT" ]
null
null
null
3rdparty/webkit/Source/ThirdParty/ANGLE/src/libANGLE/gen_packed_gl_enums.py
mchiasson/PhaserNative
f867454602c395484bf730a7c43b9c586c102ac2
[ "MIT" ]
null
null
null
3rdparty/webkit/Source/ThirdParty/ANGLE/src/libANGLE/gen_packed_gl_enums.py
mchiasson/PhaserNative
f867454602c395484bf730a7c43b9c586c102ac2
[ "MIT" ]
1
2019-01-25T13:55:25.000Z
2019-01-25T13:55:25.000Z
# Copyright 2016 The ANGLE Project Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. # # gen_packed_gl_enums.py: # Code generation for the packed GL enums. import datetime, json, os, sys from collections import namedtuple Enum = namedt...
27.429379
106
0.66035
5644f072a7fe658ef5909e6b344106b0f878d8a5
913
py
Python
v302/python/fehler.py
chrbeckm/anfaenger-praktikum
51764ff23901de1bc3d16dc935acfdc66bb2b2b7
[ "MIT" ]
2
2019-12-10T10:25:11.000Z
2021-01-26T13:59:40.000Z
v308_1/python/fehler.py
chrbeckm/anfaenger-praktikum
51764ff23901de1bc3d16dc935acfdc66bb2b2b7
[ "MIT" ]
null
null
null
v308_1/python/fehler.py
chrbeckm/anfaenger-praktikum
51764ff23901de1bc3d16dc935acfdc66bb2b2b7
[ "MIT" ]
1
2020-12-06T21:24:58.000Z
2020-12-06T21:24:58.000Z
import sympy import numpy as np def error(f, err_vars=None): from sympy import Symbol, latex s = 0 latex_names = dict() if err_vars is None: err_vars = f.free_symbols for v in err_vars: err = Symbol('latex_std_' + v.name) s += f.diff(v)**2 * err**2 latex_names[err...
17.557692
57
0.600219
3b63a418f916f818ca8d22a4415307831114faff
1,835
py
Python
Versuch3/task1.3.py
Tobias-Schoch/SSS
f8b078ca7f6482fc7c89d5f9e784a549459eefb7
[ "MIT" ]
null
null
null
Versuch3/task1.3.py
Tobias-Schoch/SSS
f8b078ca7f6482fc7c89d5f9e784a549459eefb7
[ "MIT" ]
null
null
null
Versuch3/task1.3.py
Tobias-Schoch/SSS
f8b078ca7f6482fc7c89d5f9e784a549459eefb7
[ "MIT" ]
1
2022-01-06T12:47:53.000Z
2022-01-06T12:47:53.000Z
import matplotlib.pyplot as plt import numpy as np # Einlesen der .csv Datei data = np.genfromtxt('data/eins.csv', delimiter=',', skip_header=0, skip_footer=0) # 2 Zeilen aus der linken Spalte in time schreiben time = data[:2, 0] # Der zweite Wert wird absolut minus den ersten absoluten wert gerechnet um später den We...
37.44898
103
0.73951
3b68e22269aad6365e23c3a268d7b1f4c6f46642
601
py
Python
frappe-bench/apps/erpnext/erpnext/patches/v7_1/set_prefered_contact_email.py
Semicheche/foa_frappe_docker
a186b65d5e807dd4caf049e8aeb3620a799c1225
[ "MIT" ]
1
2021-04-29T14:55:29.000Z
2021-04-29T14:55:29.000Z
frappe-bench/apps/erpnext/erpnext/patches/v7_1/set_prefered_contact_email.py
Semicheche/foa_frappe_docker
a186b65d5e807dd4caf049e8aeb3620a799c1225
[ "MIT" ]
null
null
null
frappe-bench/apps/erpnext/erpnext/patches/v7_1/set_prefered_contact_email.py
Semicheche/foa_frappe_docker
a186b65d5e807dd4caf049e8aeb3620a799c1225
[ "MIT" ]
1
2021-04-29T14:39:01.000Z
2021-04-29T14:39:01.000Z
from __future__ import unicode_literals import frappe def execute(): frappe.reload_doctype('User') for d in frappe.get_all("Employee"): employee = frappe.get_doc("Employee", d.name) if employee.company_email: employee.prefered_contact_email = "Company Email" employee.prefered_email = employee.company_email...
33.388889
53
0.787022
8edc6cb8713f68d4079f0e7a892f4c967b1e2732
7,416
py
Python
backend/apps/iamstudent/filters.py
match4healthcare/match4healthcare
acf69e3b781d715f0a947c2a9df6646e94f1ca6b
[ "MIT" ]
2
2020-03-28T13:56:39.000Z
2020-03-29T10:16:12.000Z
backend/apps/iamstudent/filters.py
match4healthcare/match4healthcare
acf69e3b781d715f0a947c2a9df6646e94f1ca6b
[ "MIT" ]
76
2020-03-27T21:53:04.000Z
2020-03-30T20:27:43.000Z
backend/apps/iamstudent/filters.py
match4healthcare/match4healthcare
acf69e3b781d715f0a947c2a9df6646e94f1ca6b
[ "MIT" ]
null
null
null
import django.forms as forms from django.utils.translation import gettext_lazy as _ import django_filters as filters from .forms import get_form_helper_filter from .models import AUSBILDUNGS_TYPEN_COLUMNS, BEZAHLUNG_CHOICES_Filter, Student class StudentJobRequirementsFilter(filters.FilterSet): ausbildung_typ_me...
39.870968
99
0.671656
c65736ef97768f54a6b65b1b01f4af638c8fb4d9
409
py
Python
etl/data_extraction/scrapers/gutetat_hamburg.py
Betadinho/einander-helfen
272f11397d80ab5267f39a7b36734495f1c00b0c
[ "MIT" ]
7
2020-04-23T20:16:11.000Z
2022-01-04T14:57:16.000Z
etl/data_extraction/scrapers/gutetat_hamburg.py
Betadinho/einander-helfen
272f11397d80ab5267f39a7b36734495f1c00b0c
[ "MIT" ]
361
2020-04-23T17:20:14.000Z
2022-03-02T11:29:45.000Z
etl/data_extraction/scrapers/gutetat_hamburg.py
Betadinho/einander-helfen
272f11397d80ab5267f39a7b36734495f1c00b0c
[ "MIT" ]
1
2021-11-29T06:02:52.000Z
2021-11-29T06:02:52.000Z
from data_extraction.scraper import Scraper from scrapers.gutetat_berlin import GuteTatBerlinScraper class GuteTatHamburgScraper(GuteTatBerlinScraper, Scraper): """Scrapes the website gute-tat.de for the region hamburg.""" def __init__(self, name): """Constructor of GuteTatHamburgScraper.""" ...
27.266667
65
0.718826
034d67efdfd697eccd3d09a6485476763a252375
573
py
Python
leetcode/064-Minimum-Path-Sum/MinPathSum_001.py
cc13ny/all-in
bc0b01e44e121ea68724da16f25f7e24386c53de
[ "MIT" ]
1
2015-12-16T04:01:03.000Z
2015-12-16T04:01:03.000Z
leetcode/064-Minimum-Path-Sum/MinPathSum_001.py
cc13ny/all-in
bc0b01e44e121ea68724da16f25f7e24386c53de
[ "MIT" ]
1
2016-02-09T06:00:07.000Z
2016-02-09T07:20:13.000Z
leetcode/064-Minimum-Path-Sum/MinPathSum_001.py
cc13ny/all-in
bc0b01e44e121ea68724da16f25f7e24386c53de
[ "MIT" ]
2
2019-06-27T09:07:26.000Z
2019-07-01T04:40:13.000Z
class Solution: # @param grid, a list of lists of integers # @return an integer def minPathSum(self, grid): m = len(grid) n = len(grid[0]) M = [[0 for x in range(n)] for x in range(m)] M[0][0] = grid[0][0] for i in range(1, m): M[i][0] = grid[i][0] + M[i...
26.045455
68
0.420593
065553622e20ecb30d788c2e9b1740aa18fd53d8
1,154
py
Python
loesungen/IT-Handbuch-Prog-Loesungen/kapitel_09/measures.py
rh0-me/ITHandbuch10
1582d6317e11cc958a14e157440dccf94d44583b
[ "Apache-2.0" ]
null
null
null
loesungen/IT-Handbuch-Prog-Loesungen/kapitel_09/measures.py
rh0-me/ITHandbuch10
1582d6317e11cc958a14e157440dccf94d44583b
[ "Apache-2.0" ]
null
null
null
loesungen/IT-Handbuch-Prog-Loesungen/kapitel_09/measures.py
rh0-me/ITHandbuch10
1582d6317e11cc958a14e157440dccf94d44583b
[ "Apache-2.0" ]
null
null
null
import re """ measure_map ist ein Dictionary, das den Umrechnungsfaktor der jeweiligen Maßeinheit in mm enthält. Indem der Wert zunächst mit dem Umrechnungsfaktor der Quelleinheit multipliziert und dann durch den Faktor der Zieleinheit dividiert wird, wird jeder Wert zunächst in mm und anschließend in die gewünschte E...
31.189189
76
0.640381
cc42ab66f72851202480f4024b5789dfbad77234
2,004
py
Python
etl/transforms/primitives/df/derive.py
cloud-cds/cds-stack
d68a1654d4f604369a071f784cdb5c42fc855d6e
[ "Apache-2.0" ]
6
2018-06-27T00:09:55.000Z
2019-03-07T14:06:53.000Z
etl/transforms/primitives/df/derive.py
cloud-cds/cds-stack
d68a1654d4f604369a071f784cdb5c42fc855d6e
[ "Apache-2.0" ]
3
2021-03-31T18:37:46.000Z
2021-06-01T21:49:41.000Z
etl/transforms/primitives/df/derive.py
cloud-cds/cds-stack
d68a1654d4f604369a071f784cdb5c42fc855d6e
[ "Apache-2.0" ]
3
2020-01-24T16:40:49.000Z
2021-09-30T02:28:55.000Z
import logging import etl.transforms.primitives.row.transform as transform def combine(df, new_fid, list_of_fids, keep_originals=True): to_change = df['fid'].isin(list_of_fids) if keep_originals: new_features = df[to_change].assign(fid = new_fid) df = df.append(new_features) else: d...
33.4
96
0.592814
9d6eb89fb6d117beb0809c55810b62c916fafeba
681
py
Python
hello/hello_cv.py
East196/hello-py
a77c7a0c8e5e2b5e8cefaf0fda335ab0c3b1da21
[ "Apache-2.0" ]
1
2017-10-23T14:58:47.000Z
2017-10-23T14:58:47.000Z
hello/hello_cv.py
East196/hello-py
a77c7a0c8e5e2b5e8cefaf0fda335ab0c3b1da21
[ "Apache-2.0" ]
null
null
null
hello/hello_cv.py
East196/hello-py
a77c7a0c8e5e2b5e8cefaf0fda335ab0c3b1da21
[ "Apache-2.0" ]
1
2018-04-06T07:49:18.000Z
2018-04-06T07:49:18.000Z
import cv2 print((cv2.__file__)) from SimpleCV import Image, Color, time img = cv2.imread('watch.jpg', cv2.COLOR_GRAY2RGB) cv2.imshow('image', img) cv2.waitKey(0) cv2.destroyAllWindows() car_in_lot = Image("parking-car.png") car_not_in_lot = Image("parking-no-car.png") car = car_in_lot.crop(470, 200, 200, 200) ca...
18.916667
49
0.745962
31f6ca70bf305a8376211aa564fb4b674133bfa5
5,548
py
Python
evaluation/face_recognition/model.py
habecker/transfer-gan
b935e69d0fa0d37ba80aab091ce59e1657eacb1e
[ "BSD-3-Clause" ]
null
null
null
evaluation/face_recognition/model.py
habecker/transfer-gan
b935e69d0fa0d37ba80aab091ce59e1657eacb1e
[ "BSD-3-Clause" ]
5
2021-03-19T14:21:08.000Z
2022-03-12T00:42:00.000Z
evaluation/face_recognition/model.py
habecker/transfer-gan
b935e69d0fa0d37ba80aab091ce59e1657eacb1e
[ "BSD-3-Clause" ]
null
null
null
from __future__ import print_function, division import torch import torch.nn as nn import torch.optim as optim from torch.optim import lr_scheduler import numpy as np import torchvision from torchvision import datasets, models, transforms import matplotlib.pyplot as plt import time import os import copy from PIL impo...
38.262069
132
0.613915
ee91affa6f5021413722006645f5b5f7e28205bd
5,689
py
Python
pyntcloud/geometry/coord_systems.py
bernssolg/pyntcloud-master
84cf000b7a7f69a2c1b36f9624f05f65160bf992
[ "MIT" ]
1,142
2016-10-10T08:55:30.000Z
2022-03-30T04:46:16.000Z
pyntcloud/geometry/coord_systems.py
bernssolg/pyntcloud-master
84cf000b7a7f69a2c1b36f9624f05f65160bf992
[ "MIT" ]
195
2016-10-10T08:30:37.000Z
2022-02-17T12:51:17.000Z
pyntcloud/geometry/coord_systems.py
bernssolg/pyntcloud-master
84cf000b7a7f69a2c1b36f9624f05f65160bf992
[ "MIT" ]
215
2017-02-28T00:50:29.000Z
2022-03-22T17:01:31.000Z
import numpy as np def spherical_to_cartesian(r, theta, phi, degrees=True): """ Convert spherical coordinates (r, theta, phi) to cartesian (x, y, z). Parameters ---------- r: (N,) ndarray Radial distance. theta: (N,) ndarray Azimuthal angle. phi: (N,) ndarray Polar...
23.126016
94
0.590789
ee91ccc2f1c0c990468fc5e47f9a37da15f88d50
392
py
Python
SiteGadget-main/modules/PortScan.py
Zusyaku/Termux-And-Lali-Linux-V2
b1a1b0841d22d4bf2cc7932b72716d55f070871e
[ "Apache-2.0" ]
2
2021-11-17T03:35:03.000Z
2021-12-08T06:00:31.000Z
SiteGadget-main/modules/PortScan.py
Zusyaku/Termux-And-Lali-Linux-V2
b1a1b0841d22d4bf2cc7932b72716d55f070871e
[ "Apache-2.0" ]
null
null
null
SiteGadget-main/modules/PortScan.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 requests from bs4 import BeautifulSoup from insides.Colors import Colors def PortScan(getip, _verbose=None): if _verbose != None: try: u = ("https://api.hackertarget.com/nmap/?q="+getip) response = requests.get(u) report = response.content soup = BeautifulSoup(report, 'html.parser') print(str(...
28
55
0.711735
4e5af4ba55f101878efc6f73857334e7cf7b7bd4
50
py
Python
code/motor/stop.py
dieterpl/iDogstra
62ee246763e107335b9caf0a4f96239fa0953234
[ "MIT" ]
null
null
null
code/motor/stop.py
dieterpl/iDogstra
62ee246763e107335b9caf0a4f96239fa0953234
[ "MIT" ]
null
null
null
code/motor/stop.py
dieterpl/iDogstra
62ee246763e107335b9caf0a4f96239fa0953234
[ "MIT" ]
null
null
null
import brickpi3 from movement import stop stop()
10
25
0.8
0951e94a96107a296d1168b45e8a8af9aa30099c
727
py
Python
nz_crawl_demo/day1/python2/demo3.py
gaohj/nzflask_bbs
36a94c380b78241ed5d1e07edab9618c3e8d477b
[ "Apache-2.0" ]
null
null
null
nz_crawl_demo/day1/python2/demo3.py
gaohj/nzflask_bbs
36a94c380b78241ed5d1e07edab9618c3e8d477b
[ "Apache-2.0" ]
27
2020-02-12T07:55:58.000Z
2022-03-12T00:19:09.000Z
nz_crawl_demo/day1/python2/demo3.py
gaohj/nzflask_bbs
36a94c380b78241ed5d1e07edab9618c3e8d477b
[ "Apache-2.0" ]
2
2020-02-18T01:54:55.000Z
2020-02-21T11:36:28.000Z
#encoding:utf-8 # import sys # print sys.version 打印python的版本 import urllib2 import urllib def baidu(params): url = "https://www.baidu.com/s?" + params headers = { "User-Agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/80.0.3987.132 Safari/537.36", }...
22.71875
140
0.651994
11764d5ce27e8f7d016533ff2f93e3840c41f783
11,208
py
Python
Buchstabenraetsel_Summen.py
UlrichBerntien/Uebungen-Python
67e6d885dd2319e999979410448364ec4d59dc51
[ "Apache-2.0" ]
null
null
null
Buchstabenraetsel_Summen.py
UlrichBerntien/Uebungen-Python
67e6d885dd2319e999979410448364ec4d59dc51
[ "Apache-2.0" ]
null
null
null
Buchstabenraetsel_Summen.py
UlrichBerntien/Uebungen-Python
67e6d885dd2319e999979410448364ec4d59dc51
[ "Apache-2.0" ]
null
null
null
#!/usr/bin/env python3 # -*- coding: utf-8 -*- """ Buchstabenrätsel Summen https://www.programmieraufgaben.ch/aufgabe/buchstabenraetsel-summen/mtt2cuwo """ # Programmieraufgabe: # Schreiben Sie ein Programm, das Symbolrätsel der folgenden Art (Summen) # löst: # aab + bbc = dde. # Dabei bedeuten gl...
36.990099
115
0.657566
6de09ae5cc02fafe468c202b636eed35317690eb
2,391
py
Python
uniprot_xml_pull_parser.py
YueYvetteHao/Sandbox
db2b8b0e751bfb7d86e7f2506fb81a75f8c3a3e5
[ "MIT" ]
null
null
null
uniprot_xml_pull_parser.py
YueYvetteHao/Sandbox
db2b8b0e751bfb7d86e7f2506fb81a75f8c3a3e5
[ "MIT" ]
null
null
null
uniprot_xml_pull_parser.py
YueYvetteHao/Sandbox
db2b8b0e751bfb7d86e7f2506fb81a75f8c3a3e5
[ "MIT" ]
null
null
null
#!/usr/bin/python #Parse uniprot xml, find all entries with tax id. import sys from xml.etree.ElementTree import iterparse, XMLParser def main(): # file = 'uniprot_test.xml' file = sys.argv[1] taxid = sys.argv[2] # NCBI taxonomy id Stentor coeruleus 5963 parser = XMLParser() context = iterparse(file, ev...
29.518519
69
0.584693
110d394e686996ad620d43bec1255874cdc8fc10
6,509
py
Python
lib/tika-import.py
docfetcher/DocFetcher
42f2accd840edc5059060447ed3536aa4d54b5d3
[ "Apache-2.0" ]
24
2018-07-22T13:02:53.000Z
2022-02-02T16:45:29.000Z
lib/tika-import.py
docfetcher/DocFetcher
42f2accd840edc5059060447ed3536aa4d54b5d3
[ "Apache-2.0" ]
null
null
null
lib/tika-import.py
docfetcher/DocFetcher
42f2accd840edc5059060447ed3536aa4d54b5d3
[ "Apache-2.0" ]
5
2018-12-29T10:38:03.000Z
2021-02-06T15:29:03.000Z
#!/usr/bin/python import sys, os.path as osp, shutil, os """ This script copies some of Tika's source files into the DocFetcher source directory, with some minor processing along the way. Tested with Tika 1.13; newer Tika versions may require updating this script. How to use: Run this script with source and destinat...
32.708543
90
0.69811
112f1ea490a2b23e19fd81dfd36e766fd93813e6
336
py
Python
blog/meta.py
Lanseuo/lucas-blog
fd6932952aac3a3055026551700bc86adef279f4
[ "MIT" ]
1
2019-01-29T15:57:20.000Z
2019-01-29T15:57:20.000Z
blog/meta.py
Lanseuo/lucas-blog
fd6932952aac3a3055026551700bc86adef279f4
[ "MIT" ]
1
2018-05-05T19:43:28.000Z
2018-05-05T19:43:28.000Z
blog/meta.py
Lanseuo/lucas-blog
fd6932952aac3a3055026551700bc86adef279f4
[ "MIT" ]
1
2018-04-24T09:36:57.000Z
2018-04-24T09:36:57.000Z
site_author = "Lucas Hild" site_title = "Lucas Blog" site_subtitle = "Softwareentwicklung" site_full_title = site_title + " - " + site_subtitle site_url = "https://blog.lucas-hild.de" site_description = ( "Auf dem Blog von Lucas Hild findest Du Artikel über Softwareentwicklung mit Python, " "JavaScript und dem ...
33.6
90
0.744048
aaebd6d05f813d14acd538707824f95d797a84db
2,905
py
Python
_scripts/zotero_to_yml.py
GCCR/GCCR.github.io
9400e64ee1eb618bfaeaf7a1c927a04165db191b
[ "MIT" ]
5
2020-03-27T20:01:18.000Z
2021-06-06T12:41:20.000Z
_scripts/zotero_to_yml.py
GCCR/GCCR.github.io
9400e64ee1eb618bfaeaf7a1c927a04165db191b
[ "MIT" ]
39
2020-04-01T23:55:10.000Z
2022-02-26T07:09:57.000Z
_scripts/zotero_to_yml.py
GCCR/GCCR.github.io
9400e64ee1eb618bfaeaf7a1c927a04165db191b
[ "MIT" ]
3
2020-03-29T16:06:02.000Z
2020-04-07T19:23:37.000Z
#!/usr/bin/env python from pyzotero import zotero import yaml import re import os from datetime import datetime COVID = re.compile(r'\bcovid|\bcoronavirus\b|\bsars\b') SMELL = re.compile(r'\bolfact|\bsmell\b|osmia\b') TASTE = re.compile(r'\bgustat|\btaste\b|geusia\b') CASE_REPORT = re.compile(r'\bcase\-?report\b') V...
31.923077
107
0.6
c9338520749d7188d93ebb1cb9f007a07a6ee247
425
py
Python
Chapter2_Python/Classes.py
derfabs/UdemyGAN_Template
1c7d263d22ccf1ba580c71befe71e3bf6e2facb6
[ "MIT" ]
null
null
null
Chapter2_Python/Classes.py
derfabs/UdemyGAN_Template
1c7d263d22ccf1ba580c71befe71e3bf6e2facb6
[ "MIT" ]
null
null
null
Chapter2_Python/Classes.py
derfabs/UdemyGAN_Template
1c7d263d22ccf1ba580c71befe71e3bf6e2facb6
[ "MIT" ]
null
null
null
class Game: def __init__(self): self.bin_ich_pleite = False self.kontostand = 10 def play_game(self): while self.bin_ich_pleite is False: print("Ich bin nicht pleite!", self.kontostand) self.kontostand -= 1 if self.kontostand <= 0: sel...
22.368421
59
0.604706
a3315241e9f69c1efd1ee14c1bb0b7526d99cdae
370
py
Python
presentations/django/code/quotemanager/quotes/serializers.py
ErikMayrhofer/presentations
a2a8786061167778d8c46ddf06799877a2552e28
[ "MIT" ]
null
null
null
presentations/django/code/quotemanager/quotes/serializers.py
ErikMayrhofer/presentations
a2a8786061167778d8c46ddf06799877a2552e28
[ "MIT" ]
null
null
null
presentations/django/code/quotemanager/quotes/serializers.py
ErikMayrhofer/presentations
a2a8786061167778d8c46ddf06799877a2552e28
[ "MIT" ]
null
null
null
from rest_framework import serializers from .models import Quote, Person class QuoteSerializer(serializers.HyperlinkedModelSerializer): class Meta: model = Quote fields = ('id', 'url', 'text', 'person') class PersonSerializer(serializers.HyperlinkedModelSerializer): class Meta: mode...
23.125
63
0.681081
42d6b02a5f297c71200a4088aabdd0cc577f0669
27,098
py
Python
tests/test_effect.py
suned/pfun
46c460646487abfef897bd9627891f6cf7870774
[ "MIT" ]
126
2019-09-16T15:28:20.000Z
2022-03-20T10:57:53.000Z
tests/test_effect.py
suned/pfun
46c460646487abfef897bd9627891f6cf7870774
[ "MIT" ]
54
2019-09-30T08:44:01.000Z
2022-03-20T11:10:00.000Z
tests/test_effect.py
suned/pfun
46c460646487abfef897bd9627891f6cf7870774
[ "MIT" ]
11
2020-01-02T08:32:46.000Z
2022-03-20T11:10:24.000Z
import asyncio import datetime from contextlib import ExitStack from datetime import timedelta from subprocess import CalledProcessError from unittest import mock import aiohttp import asynctest import pytest from hypothesis import assume, given, settings from pfun import (DefaultModules, Dict, Immutable, List, clock...
33.086691
79
0.578235
6e0087d528a572ff40b44a6aaf4fc9bfe7125476
15,437
py
Python
skil/models.py
pcrete/skil-python
672a1aa9e8af020c960ab9ee280cbb6b194afc3f
[ "Apache-2.0" ]
23
2018-09-19T13:34:27.000Z
2022-02-14T09:49:35.000Z
skil/models.py
pcrete/skil-python
672a1aa9e8af020c960ab9ee280cbb6b194afc3f
[ "Apache-2.0" ]
33
2018-10-18T07:58:05.000Z
2019-05-16T08:24:12.000Z
skil/models.py
pcrete/skil-python
672a1aa9e8af020c960ab9ee280cbb6b194afc3f
[ "Apache-2.0" ]
11
2018-10-21T18:58:57.000Z
2022-02-14T09:49:36.000Z
import skil from skil.services import * from skil import Skil from skil.workspaces import get_workspace_by_id from skil.experiments import get_experiment_by_id from skil.utils.io import serialize_config, deserialize_config import skil_client from skil_client.rest import ApiException as api_exception import time import...
40.305483
104
0.593639
66976ecb441c5f2e261e967923931a5c18bad63c
405
py
Python
etl/data_extraction/scrapers/gutetat_munich.py
Betadinho/einander-helfen
272f11397d80ab5267f39a7b36734495f1c00b0c
[ "MIT" ]
7
2020-04-23T20:16:11.000Z
2022-01-04T14:57:16.000Z
etl/data_extraction/scrapers/gutetat_munich.py
Betadinho/einander-helfen
272f11397d80ab5267f39a7b36734495f1c00b0c
[ "MIT" ]
361
2020-04-23T17:20:14.000Z
2022-03-02T11:29:45.000Z
etl/data_extraction/scrapers/gutetat_munich.py
Betadinho/einander-helfen
272f11397d80ab5267f39a7b36734495f1c00b0c
[ "MIT" ]
1
2021-11-29T06:02:52.000Z
2021-11-29T06:02:52.000Z
from data_extraction.scraper import Scraper from scrapers.gutetat_berlin import GuteTatBerlinScraper class GuteTatMunichScraper(GuteTatBerlinScraper, Scraper): """Scrapes the website gute-tat.de for the region munich.""" def __init__(self, name): """Constructor of GuteTatMunichScraper.""" su...
27
64
0.716049
66d190caf58947e63d0e5772ccd018bbab615c20
1,112
py
Python
LIT/2021/crypto/Filter_Collector/filter_collector.py
ruhan-islam/ctf-archives
8c2bf6a608c821314d1a1cfaa05a6cccef8e3103
[ "MIT" ]
1
2021-11-02T20:53:58.000Z
2021-11-02T20:53:58.000Z
LIT/2021/crypto/Filter_Collector/filter_collector.py
ruhan-islam/ctf-archives
8c2bf6a608c821314d1a1cfaa05a6cccef8e3103
[ "MIT" ]
null
null
null
LIT/2021/crypto/Filter_Collector/filter_collector.py
ruhan-islam/ctf-archives
8c2bf6a608c821314d1a1cfaa05a6cccef8e3103
[ "MIT" ]
null
null
null
#!/usr/bin/python3 from Crypto.Util.number import getPrime import random import math import cmath Welcome = "Instagram filters are fun, aren't they?" print(Welcome); flag = int(open('flag.txt','rb').read().hex(),16); k = 7 p = int(input("Input your favorite mod: ")); assert(p * p < flag); # Divides tot randomly into...
23.166667
68
0.647482
dd8d6abc6fb88dbd32bdefc1b38a1fcdbfc173d0
4,340
py
Python
python_experiments/paper_figures/tkde/tkde_draw_varying_delta_e.py
RapidsAtHKUST/SimRank
3a601b08f9a3c281e2b36b914e06aba3a3a36118
[ "MIT" ]
8
2020-04-14T23:17:00.000Z
2021-06-21T12:34:04.000Z
python_experiments/paper_figures/tkde/tkde_draw_varying_delta_e.py
RapidsAtHKUST/SimRank
3a601b08f9a3c281e2b36b914e06aba3a3a36118
[ "MIT" ]
null
null
null
python_experiments/paper_figures/tkde/tkde_draw_varying_delta_e.py
RapidsAtHKUST/SimRank
3a601b08f9a3c281e2b36b914e06aba3a3a36118
[ "MIT" ]
1
2021-01-17T16:26:50.000Z
2021-01-17T16:26:50.000Z
import os import matplotlib import numpy as np matplotlib.use("pdf") import matplotlib.pyplot as plt from paper_figures.legacy.experimental_config import * from paper_figures.tkde.data_legacy.static_data_loader import * from paper_figures.tkde.tkde_get_static_reads_time import * insert_tag = 'ins' delete_tag = 'del...
40.943396
108
0.652995
b0c8d610cca537818212416ff9b4e2e416a36321
1,798
py
Python
indl/data/helper.py
SachsLab/indl
531d2e0c2ee765004aedc553af40e258262f86cb
[ "Apache-2.0" ]
1
2021-02-22T01:39:50.000Z
2021-02-22T01:39:50.000Z
indl/data/helper.py
SachsLab/indl
531d2e0c2ee765004aedc553af40e258262f86cb
[ "Apache-2.0" ]
null
null
null
indl/data/helper.py
SachsLab/indl
531d2e0c2ee765004aedc553af40e258262f86cb
[ "Apache-2.0" ]
null
null
null
__all__ = ['get_tf_dataset'] import tensorflow as tf from functools import partial from .augmentations import * def get_tf_dataset(X, Y, training=True, batch_size=8, max_offset=0, slice_ax=1): """ Convert a pair of tf tensors into a tf.data.Dataset with some augmentations. The added augmentations are: ...
34.576923
115
0.684093
c69d8b8e2a8174d55b2b6cf49913e1a449da292e
7,381
py
Python
notebooks_and_scripts/graph_miner/repositories/models/parse_string.py
LucaCappelletti94/EnsmallenGraph
572532b6d3f4352bf58f9ccca955376acd95fd89
[ "MIT" ]
null
null
null
notebooks_and_scripts/graph_miner/repositories/models/parse_string.py
LucaCappelletti94/EnsmallenGraph
572532b6d3f4352bf58f9ccca955376acd95fd89
[ "MIT" ]
null
null
null
notebooks_and_scripts/graph_miner/repositories/models/parse_string.py
LucaCappelletti94/EnsmallenGraph
572532b6d3f4352bf58f9ccca955376acd95fd89
[ "MIT" ]
null
null
null
"""Submodule with methods to parse and standardize STRING graphs.""" import pandas as pd import os def parse_string_fasta(path: str) -> pd.DataFrame: """Return dataframe with aminoacid fasta sequences from given path. Parameters ----------------------- path: str Path to the fasta file to load...
30.626556
112
0.633383
c6c9c38da7bb9268b8a6168849bd86f4d05f1957
6,115
py
Python
src/onegov/election_day/utils/election/connections.py
politbuero-kampagnen/onegov-cloud
20148bf321b71f617b64376fe7249b2b9b9c4aa9
[ "MIT" ]
null
null
null
src/onegov/election_day/utils/election/connections.py
politbuero-kampagnen/onegov-cloud
20148bf321b71f617b64376fe7249b2b9b9c4aa9
[ "MIT" ]
null
null
null
src/onegov/election_day/utils/election/connections.py
politbuero-kampagnen/onegov-cloud
20148bf321b71f617b64376fe7249b2b9b9c4aa9
[ "MIT" ]
null
null
null
from collections import OrderedDict from itertools import groupby from sqlalchemy import select from onegov.ballot import List from onegov.ballot import ListConnection from onegov.core.orm import as_selectable_from_path from onegov.core.utils import groupbylist, module_path from onegov.election_day.utils.common impor...
32.700535
78
0.592968
c6f6b31ef03b7757ea6d14a20dc36a3c06fd2cbd
3,323
py
Python
Striker-master/core/photon.py
Zusyaku/Termux-And-Lali-Linux-V2
b1a1b0841d22d4bf2cc7932b72716d55f070871e
[ "Apache-2.0" ]
2
2021-11-17T03:35:03.000Z
2021-12-08T06:00:31.000Z
Striker-master/core/photon.py
Zusyaku/Termux-And-Lali-Linux-V2
b1a1b0841d22d4bf2cc7932b72716d55f070871e
[ "Apache-2.0" ]
null
null
null
Striker-master/core/photon.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 re import concurrent.futures from urllib.parse import urlparse from core.colors import run from core.utils import getUrl, getParams, js_extractor, script_extractor, handle_anchor from core.requester import requester from core.zetanize import zetanize from modules.retirejs import retirejs from modules.wappalyze...
40.036145
94
0.620825
af520a11b24ca55315a43c6fa421965f2ad61b1a
2,988
py
Python
src/data_science/data_science/plot/color.py
viclule/api_models_deployment_framework
7595cf0b4f3e277925b968014102d7561547bcd4
[ "MIT" ]
null
null
null
src/data_science/data_science/plot/color.py
viclule/api_models_deployment_framework
7595cf0b4f3e277925b968014102d7561547bcd4
[ "MIT" ]
null
null
null
src/data_science/data_science/plot/color.py
viclule/api_models_deployment_framework
7595cf0b4f3e277925b968014102d7561547bcd4
[ "MIT" ]
null
null
null
""" Generates colors in a sequenced manner. """ import matplotlib.pyplot as plt from cycler import cycler import warnings color_cycle = ['blue', 'green', 'red', 'cyan', 'magenta', 'yellow', 'black', 'brown', 'aqua', 'olive'] def set_color_cycle(sequence, ax): if sequence == 0: ax.set_pro...
27.163636
77
0.549197
3cab477720574a8e1f25f6caa22344253d0e2792
5,292
py
Python
hisim/postprocessing/chart_singleday.py
sdickler/HiSim
09a11d99f220f7cadb3cb7b09a6fce8f147243c8
[ "MIT" ]
12
2021-10-05T11:38:24.000Z
2022-03-25T09:56:08.000Z
hisim/postprocessing/chart_singleday.py
sdickler/HiSim
09a11d99f220f7cadb3cb7b09a6fce8f147243c8
[ "MIT" ]
6
2021-10-06T13:27:55.000Z
2022-03-10T12:55:15.000Z
hisim/postprocessing/chart_singleday.py
sdickler/HiSim
09a11d99f220f7cadb3cb7b09a6fce8f147243c8
[ "MIT" ]
4
2022-02-21T19:00:50.000Z
2022-03-22T11:01:38.000Z
import os import matplotlib.pyplot as plt from matplotlib.dates import DateFormatter from hisim.postprocessing.chartbase import Chart class ChartSingleDay(Chart): def __init__(self, output, data, units, directorypath, time_correction_factor, day=None, month=None, output2=None): if output2 is not None: ...
47.675676
119
0.533447
597335074052799b54f3b8ea5b595ab57d095147
1,562
py
Python
Interview Preparation Kits/Interview Preparation Kit/Miscellaneous/Maximum XOR/max_xor2.py
xuedong/hacker-rank
ce8a60f80c2c6935b427f9409d7e826ee0d26a89
[ "MIT" ]
1
2021-02-22T17:37:45.000Z
2021-02-22T17:37:45.000Z
Interview Preparation Kits/Interview Preparation Kit/Miscellaneous/Maximum XOR/max_xor2.py
xuedong/hacker-rank
ce8a60f80c2c6935b427f9409d7e826ee0d26a89
[ "MIT" ]
null
null
null
Interview Preparation Kits/Interview Preparation Kit/Miscellaneous/Maximum XOR/max_xor2.py
xuedong/hacker-rank
ce8a60f80c2c6935b427f9409d7e826ee0d26a89
[ "MIT" ]
null
null
null
#!/bin/python3 import math import os import random import re import sys # Complete the maxXor function below. class Node(): def __init__(self): self.left = None self.right = None def insert(x, head): current = head for i in reversed(range(31)): value = (x >> i) & 1 if val...
20.826667
50
0.464789
aba8cdd32c0148eae4ebc8390f6bc3460fe63241
301
py
Python
bolt/utils/colors.py
ph7vc/CL4M-B0T
e992cf63b1215ea7c241cab94edc251653dbaed7
[ "MIT" ]
9
2019-02-17T06:33:14.000Z
2021-10-05T02:19:00.000Z
bolt/utils/colors.py
ns-phennessy/Bolt
e992cf63b1215ea7c241cab94edc251653dbaed7
[ "MIT" ]
28
2019-02-10T07:48:05.000Z
2021-12-20T00:15:37.000Z
bolt/utils/colors.py
ph7vc/CL4M-B0T
e992cf63b1215ea7c241cab94edc251653dbaed7
[ "MIT" ]
4
2015-03-13T03:58:55.000Z
2015-05-27T08:29:46.000Z
class Colors(): INFO = int("7289da", 16) WARNING = int("fdff5d", 16) ERROR = int("faa61a", 16) CRITICAL = int("f04747", 16) GREEN = int("43b581", 16) BLUE = int("7289da", 16) YELLOW = int("fdff5d", 16) ORANGE = int("faa61a", 16) RED = int("f04747", 16)
25.083333
33
0.524917
e6008815f1c90e0ce71e2cc93c53ee5a9c4c3c6b
6,892
py
Python
Webpage/arbeitsstunden/management/commands/utils/csv.py
ASV-Aachen/Website
bbfc02d71dde67fdf89a4b819b795a73435da7cf
[ "Apache-2.0" ]
null
null
null
Webpage/arbeitsstunden/management/commands/utils/csv.py
ASV-Aachen/Website
bbfc02d71dde67fdf89a4b819b795a73435da7cf
[ "Apache-2.0" ]
46
2022-01-08T12:03:24.000Z
2022-03-30T08:51:05.000Z
Webpage/arbeitsstunden/management/commands/utils/csv.py
ASV-Aachen/Website
bbfc02d71dde67fdf89a4b819b795a73435da7cf
[ "Apache-2.0" ]
null
null
null
from pathlib import Path from typing import Match from arbeitsstunden.management.commands.utils.data import reduction from arbeitsstunden.management.commands.utils.data import member, project, project_item, project_item_hour, season, user, Nutzer from arbeitsstunden.management.commands.utils.import_functions import Ar...
33.134615
151
0.564858
05086b81671809bb02a671138b4ce952e206c730
4,817
py
Python
src/config_db/tests/test_deploy.py
rtobar/sdp-prototype
9f1527b884bf80daa509a7fe3722160c77260f4f
[ "BSD-3-Clause" ]
2
2019-07-15T09:49:34.000Z
2019-10-14T16:04:17.000Z
src/config_db/tests/test_deploy.py
rtobar/sdp-prototype
9f1527b884bf80daa509a7fe3722160c77260f4f
[ "BSD-3-Clause" ]
17
2019-07-15T14:51:50.000Z
2021-06-02T00:29:43.000Z
src/config_db/tests/test_deploy.py
ska-telescope/sdp-configuration-prototype
8c6cbda04a83b0e16987019406ed6ec7e1058a31
[ "BSD-3-Clause" ]
1
2019-10-10T08:16:48.000Z
2019-10-10T08:16:48.000Z
"""High-level API tests for deployments.""" import os import time import yaml import pytest import kubernetes from ska_sdp_config import config, entity # pylint: disable=missing-docstring,redefined-outer-name PREFIX = "/__test_deploy" # pylint: disable=W0212 @pytest.fixture(scope="session") def cfg(): host = o...
28.672619
78
0.631929
e973bdf444cc4cd622998f2063918b10a0d073bc
1,191
py
Python
myems-modbus-tcp/config.py
guangyuzhang/myems
c88f0620d3e36154a500c755c805333b771d09c0
[ "MIT" ]
82
2021-02-19T10:24:31.000Z
2022-03-28T06:30:18.000Z
myems-modbus-tcp/config.py
guangyuzhang/myems
c88f0620d3e36154a500c755c805333b771d09c0
[ "MIT" ]
188
2021-02-22T07:08:30.000Z
2022-03-02T04:11:03.000Z
myems-modbus-tcp/config.py
guangyuzhang/myems
c88f0620d3e36154a500c755c805333b771d09c0
[ "MIT" ]
54
2021-02-19T08:48:46.000Z
2022-03-30T06:21:34.000Z
from decouple import config myems_system_db = { 'host': config('MYEMS_SYSTEM_DB_HOST', default='127.0.0.1'), 'port': config('MYEMS_SYSTEM_DB_PORT', default=3306, cast=int), 'database': config('MYEMS_SYSTEM_DB_DATABASE', default='myems_system_db'), 'user': config('MYEMS_SYSTEM_DB_USER', default='root')...
39.7
86
0.730479
e9a99b08f935009a7748630c36a8cb674c0a3c2a
1,795
py
Python
stutensee-corona.py
weisserd/CoronaStutensee
c39f8e3bab69d3a96cce51a83b5f80ed8a317805
[ "MIT" ]
2
2021-06-17T13:23:58.000Z
2021-06-17T14:48:21.000Z
stutensee-corona.py
weisserd/CoronaStutensee
c39f8e3bab69d3a96cce51a83b5f80ed8a317805
[ "MIT" ]
5
2021-06-14T22:08:36.000Z
2021-07-07T15:41:48.000Z
stutensee-corona.py
weisserd/corona-stutensee
c44a06c63fe19390f606f90e5b7067bc1e0cf1e8
[ "MIT" ]
null
null
null
import pandas as pd import requests import tabula from bs4 import BeautifulSoup from datetime import datetime from pathlib import Path # Load CSV df = pd.read_csv('daten.csv') df['Datum'] = df['Datum'].apply(pd.to_datetime) # Get new data soup = BeautifulSoup(requests.get('https://corona.karlsruhe.de/aktuelle-fallzah...
35.9
108
0.664067
75cb49b7123c7151e25550d28fd7de8c6ed0d226
278
py
Python
1877-minimize-maximum-pair-sum-in-array/1877-minimize-maximum-pair-sum-in-array.py
hyeseonko/LeetCode
48dfc93f1638e13041d8ce1420517a886abbdc77
[ "MIT" ]
2
2021-12-05T14:29:06.000Z
2022-01-01T05:46:13.000Z
1877-minimize-maximum-pair-sum-in-array/1877-minimize-maximum-pair-sum-in-array.py
hyeseonko/LeetCode
48dfc93f1638e13041d8ce1420517a886abbdc77
[ "MIT" ]
null
null
null
1877-minimize-maximum-pair-sum-in-array/1877-minimize-maximum-pair-sum-in-array.py
hyeseonko/LeetCode
48dfc93f1638e13041d8ce1420517a886abbdc77
[ "MIT" ]
null
null
null
class Solution: def minPairSum(self, nums: List[int]) -> int: snum = sorted(nums) _max = snum.pop(0)+snum.pop(-1) while(snum): cur = snum.pop(0)+snum.pop(-1) if cur>_max: _max = cur return _max
27.8
49
0.47482
9b88a065b39b271d95841f987dd77b8f861297f9
4,215
py
Python
src/onegov/core/browser_session.py
politbuero-kampagnen/onegov-cloud
20148bf321b71f617b64376fe7249b2b9b9c4aa9
[ "MIT" ]
null
null
null
src/onegov/core/browser_session.py
politbuero-kampagnen/onegov-cloud
20148bf321b71f617b64376fe7249b2b9b9c4aa9
[ "MIT" ]
null
null
null
src/onegov/core/browser_session.py
politbuero-kampagnen/onegov-cloud
20148bf321b71f617b64376fe7249b2b9b9c4aa9
[ "MIT" ]
null
null
null
from contextlib import suppress from dogpile.cache.api import NO_VALUE from hashlib import blake2b class Prefixed(object): def __init__(self, prefix, cache): assert len(prefix) >= 24 self.prefix = prefix self.cache = cache def mangle(self, key): assert key return f'{...
28.1
78
0.616607
1fdc97292e34c3f5ea88e1e506d2ce920ee10bd8
17,165
py
Python
webinterface/forms.py
monoclecat/Cleaning-Schedule-generator
b12fa8a6f834a89b805bf062a0df45279a7a8796
[ "MIT" ]
2
2021-11-28T23:04:00.000Z
2022-01-13T19:47:45.000Z
webinterface/forms.py
monoclecat/Cleaning-Schedule-generator
b12fa8a6f834a89b805bf062a0df45279a7a8796
[ "MIT" ]
25
2020-03-29T14:40:46.000Z
2021-09-22T17:37:15.000Z
webinterface/forms.py
monoclecat/cleaning-schedule-management-system
b12fa8a6f834a89b805bf062a0df45279a7a8796
[ "MIT" ]
1
2020-07-04T11:42:17.000Z
2020-07-04T11:42:17.000Z
from django import forms from .models import * from crispy_forms.helper import FormHelper from crispy_forms.layout import * from django.contrib.auth.forms import AuthenticationForm def html_alert_banner(content: str, alert_level='info'): return HTML("<div class=\"alert alert-{}\" role=\"alert\">{}</div>".format(...
45.052493
120
0.620682
2f30b4ff3df5989c06a92dd9810526df16039bc5
1,557
py
Python
geol/feature_extraction/embeddings.py
PyGeoL/GeoL
67a5bd2f63091e19041094c14d419055fa5ce6f0
[ "MIT" ]
8
2018-03-09T16:44:38.000Z
2021-04-07T11:33:30.000Z
geol/feature_extraction/embeddings.py
PyGeoL/GeoL
67a5bd2f63091e19041094c14d419055fa5ce6f0
[ "MIT" ]
4
2020-03-24T15:34:54.000Z
2021-06-01T21:54:33.000Z
geol/feature_extraction/embeddings.py
PyGeoL/GeoL
67a5bd2f63091e19041094c14d419055fa5ce6f0
[ "MIT" ]
1
2020-05-13T14:30:55.000Z
2020-05-13T14:30:55.000Z
""" File description """ # Authors: Gianni Barlacchi <gianni.barlacchi@gmail.com> from geol.feature_extraction.base import FeatureGenerator from geol.utils import utils import pandas as pd import gensim class Embeddings(FeatureGenerator): def __init__(self, pois): FeatureGenerator.__init__(pois) ...
27.803571
67
0.524085
7b41dad960f8ff92ded46bb4eb6a31cce28631b0
2,179
py
Python
top/clearlight/base/bilibili/mooc/re_test_01.py
ClearlightY/Python_learn
93b9b7efae5a1cf05faf8ee7c5e36dcc99c7a232
[ "Apache-2.0" ]
1
2020-01-16T09:23:43.000Z
2020-01-16T09:23:43.000Z
top/clearlight/base/bilibili/mooc/re_test_01.py
ClearlightY/Python_learn
93b9b7efae5a1cf05faf8ee7c5e36dcc99c7a232
[ "Apache-2.0" ]
null
null
null
top/clearlight/base/bilibili/mooc/re_test_01.py
ClearlightY/Python_learn
93b9b7efae5a1cf05faf8ee7c5e36dcc99c7a232
[ "Apache-2.0" ]
null
null
null
import re # re.search: 在一个字符串中搜索匹配正则表达式的第一个位置 match = re.search(r'[1-9]\d{5}', 'BIT 100032 132103 12043') if match: print(match.group(0)) print(match) # re.match: 从一个字符串的开始位置起匹配正则表达式 match = re.match(r'[1-9]\d{5}', '123042BIT 100032 132103 12043') if match: print(match.group(0)) # re.findall: 搜索字符串, 以列表类型返回...
27.2375
169
0.655346
c8c0a490fb4c47f88f42427f98ea39381777265a
3,317
py
Python
tests/unit/providers/common/inbound_filter_tests.py
akgunkel/sawtooth-next-directory
a88833033ab30e9091479a38947f04c5e396ca46
[ "Apache-2.0" ]
75
2018-04-06T09:13:34.000Z
2020-05-18T18:59:47.000Z
tests/unit/providers/common/inbound_filter_tests.py
akgunkel/sawtooth-next-directory
a88833033ab30e9091479a38947f04c5e396ca46
[ "Apache-2.0" ]
989
2018-04-18T21:01:56.000Z
2019-10-23T15:37:09.000Z
tests/unit/providers/common/inbound_filter_tests.py
akgunkel/sawtooth-next-directory
a88833033ab30e9091479a38947f04c5e396ca46
[ "Apache-2.0" ]
72
2018-04-13T18:29:12.000Z
2020-05-29T06:00:33.000Z
# Copyright 2019 Contributors to Hyperledger Sawtooth # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law ...
36.855556
86
0.674103
a82b5b625bbaeaa72632456013c2a221bf894a94
4,606
py
Python
scripts/building_repository.py
pratikkumar-jain/Twitter-Mining
228a852f38b8ff8b8c9b86f270d4b530840696f7
[ "MIT" ]
1
2020-10-04T13:46:21.000Z
2020-10-04T13:46:21.000Z
scripts/building_repository.py
pratikkumar-jain/Twitter-Mining
228a852f38b8ff8b8c9b86f270d4b530840696f7
[ "MIT" ]
null
null
null
scripts/building_repository.py
pratikkumar-jain/Twitter-Mining
228a852f38b8ff8b8c9b86f270d4b530840696f7
[ "MIT" ]
null
null
null
#!/usr/local/bin/python3 """Script to build the repository from the extracted tweets.""" import json import os import shutil import sys from cassandra.cluster import Cluster from cassandra.query import BatchStatement from zipfile import ZipFile def unzipTweets(): """Unzip the compressed tweets.""" if not os...
37.754098
78
0.477638
8d62613bad21a626874d679a8f7839a28204da00
159
py
Python
sam_app/setup.py
csjy309450/SAM-Backend
a23569ea372f718ca4a167e21e8046336db00561
[ "MIT" ]
null
null
null
sam_app/setup.py
csjy309450/SAM-Backend
a23569ea372f718ca4a167e21e8046336db00561
[ "MIT" ]
null
null
null
sam_app/setup.py
csjy309450/SAM-Backend
a23569ea372f718ca4a167e21e8046336db00561
[ "MIT" ]
null
null
null
from setuptools import setup, find_packages setup(name='sam_app', version='1.0.0', py_modules=['sam_app'], packages=find_packages() )
19.875
43
0.641509
f58d93970c16a72031ace6344cd2ad149d65b836
1,251
py
Python
autojail/utils/save_config.py
ekut-es/autojail
bc16e40e6df55c0a28a3059715851ffa59b14ba8
[ "MIT" ]
6
2020-08-12T08:16:15.000Z
2022-03-05T02:25:53.000Z
autojail/utils/save_config.py
ekut-es/autojail
bc16e40e6df55c0a28a3059715851ffa59b14ba8
[ "MIT" ]
1
2021-03-30T10:34:51.000Z
2021-06-09T11:24:00.000Z
autojail/utils/save_config.py
ekut-es/autojail
bc16e40e6df55c0a28a3059715851ffa59b14ba8
[ "MIT" ]
1
2021-11-21T09:30:58.000Z
2021-11-21T09:30:58.000Z
from ipaddress import IPv4Interface, IPv4Network, IPv6Interface, IPv6Network from pathlib import Path from typing import Optional import ruamel.yaml from ..model.datatypes import ( ByteSize, ExpressionInt, HexInt, IntegerList, JailhouseFlagList, ) from ..model.jailhouse import JailhouseConfig de...
31.275
79
0.704237
8b8f56edf23f9a9ad8c99718e38da0b42b91a3c2
7,141
py
Python
official/cv/openpose/train.py
leelige/mindspore
5199e05ba3888963473f2b07da3f7bca5b9ef6dc
[ "Apache-2.0" ]
77
2021-10-15T08:32:37.000Z
2022-03-30T13:09:11.000Z
official/cv/openpose/train.py
leelige/mindspore
5199e05ba3888963473f2b07da3f7bca5b9ef6dc
[ "Apache-2.0" ]
3
2021-10-30T14:44:57.000Z
2022-02-14T06:57:57.000Z
official/cv/openpose/train.py
leelige/mindspore
5199e05ba3888963473f2b07da3f7bca5b9ef6dc
[ "Apache-2.0" ]
24
2021-10-15T08:32:45.000Z
2022-03-24T18:45:20.000Z
# Copyright 2020 Huawei Technologies Co., Ltd # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # http://www.apache.org/licenses/LICENSE-2.0 # Unless required by applicable law or agreed to in...
43.278788
113
0.65327
473bf4dd60a16cc4717e71b2701614735f295ced
1,170
py
Python
python/p012.py
tlming16/Projec_Euler
797824c5159fae67493de9eba24c22cc7512d95d
[ "MIT" ]
4
2018-11-14T12:03:05.000Z
2019-09-03T14:33:28.000Z
python/p012.py
tlming16/Projec_Euler
797824c5159fae67493de9eba24c22cc7512d95d
[ "MIT" ]
null
null
null
python/p012.py
tlming16/Projec_Euler
797824c5159fae67493de9eba24c22cc7512d95d
[ "MIT" ]
1
2018-11-17T14:39:22.000Z
2018-11-17T14:39:22.000Z
#!/usr/bin/python3 #-*- coding:utf-8 -*- # author: mathm # email: tlming16@fudan.edu.cn from factor_pair import factor_pair from is_prime import is_prime class solution: __slots__=('num') def __init__(self,n:int): self.num=n def factor_num(self,num:int): n=num pair_n = fac...
22.5
42
0.486325
47aa1471258820b18976da34a6ede0e41e2017ee
6,513
py
Python
frds/measures/func_dip.py
mgao6767/wrds
7dca2651a181bf38c61ebde675c9f64d6c96f608
[ "MIT" ]
31
2020-06-17T13:19:12.000Z
2022-03-27T08:56:38.000Z
frds/measures/func_dip.py
mgao6767/wrds
7dca2651a181bf38c61ebde675c9f64d6c96f608
[ "MIT" ]
null
null
null
frds/measures/func_dip.py
mgao6767/wrds
7dca2651a181bf38c61ebde675c9f64d6c96f608
[ "MIT" ]
8
2020-06-14T15:21:51.000Z
2021-09-29T06:28:53.000Z
import math from statistics import NormalDist import numpy as np from numpy.random import RandomState def distress_insurance_premium( default_prob: np.ndarray, correlations: np.ndarray, default_threshold: float = 0.15, random_seed: int = 0, n_simulated_returns: int = 500_000, n_simulations: in...
47.889706
144
0.684938
47b57f8d35d6ac25504a37f18c7009d4c8fd5a1b
293
py
Python
fizzbuzz/fizzbuzz.py
tijeff/py-fizzbuzz
1a42704fcdc190fd423291d8c76f7dcce9c5f884
[ "Apache-2.0" ]
null
null
null
fizzbuzz/fizzbuzz.py
tijeff/py-fizzbuzz
1a42704fcdc190fd423291d8c76f7dcce9c5f884
[ "Apache-2.0" ]
null
null
null
fizzbuzz/fizzbuzz.py
tijeff/py-fizzbuzz
1a42704fcdc190fd423291d8c76f7dcce9c5f884
[ "Apache-2.0" ]
null
null
null
#!/usr/bin/env python __author__ = "JF Marronnier" __project__ = "FizzBuzz" class FizzBuzz: def __init__(self): pass @classmethod def say(cls, param): return "FizzBuzz" if not param % 15 else "Fizz" if not param % 3 else "Buzz" if not param % 10 else str(param)
22.538462
118
0.648464
9a557e0d6e5900d9c775ba3b94c020ef7a26353a
357
py
Python
Online-Judges/DimikOJ/Python/27-armstrong-numbers.py
shihab4t/Competitive-Programming
e8eec7d4f7d86bfa1c00b7fbbedfd6a1518f19be
[ "Unlicense" ]
3
2021-06-15T01:19:23.000Z
2022-03-16T18:23:53.000Z
Online-Judges/DimikOJ/Python/27-armstrong-numbers.py
shihab4t/Competitive-Programming
e8eec7d4f7d86bfa1c00b7fbbedfd6a1518f19be
[ "Unlicense" ]
null
null
null
Online-Judges/DimikOJ/Python/27-armstrong-numbers.py
shihab4t/Competitive-Programming
e8eec7d4f7d86bfa1c00b7fbbedfd6a1518f19be
[ "Unlicense" ]
null
null
null
for _ in range(int(input())): n = input() main_n = int(n) calculated_n = 0 n_of_len = len(n) for i in range(n_of_len): ok = int(n[i]) calculated_n = calculated_n + (ok ** 3) if calculated_n == main_n: print(main_n, "is an armstrong number!") else: print(m...
27.461538
52
0.560224
d02d1c79b5e15fb59e6f4fa6c241167ecd8bcecf
291
py
Python
wetterstation/__main__.py
SvenPfiffner/Kinderuni2021
97e6f1148177c51951a95d88515b3b3008164759
[ "MIT" ]
null
null
null
wetterstation/__main__.py
SvenPfiffner/Kinderuni2021
97e6f1148177c51951a95d88515b3b3008164759
[ "MIT" ]
null
null
null
wetterstation/__main__.py
SvenPfiffner/Kinderuni2021
97e6f1148177c51951a95d88515b3b3008164759
[ "MIT" ]
null
null
null
""" Author: Sven Pfiffner Date: 06.07.2021 Einstiegspunkt des Programms. Wird "wetterstation" über die Konsole ausgeführt, wird dieses script automatisch auf den Code in lib/programm.py verweisen. Dadurch wird das explizite ausführen abstrahiert. """ from lib.programm import start start()
24.25
75
0.797251