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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
6a70938e7a8291c9fac9225122720533efcfd9d8 | 4,968 | py | Python | models/sqlnet/modules/cond_predict.py | inyukwo1/qgm_decoder | 70e60afec140ec3e2ee04f980a384e1cf28d761c | [
"MIT"
] | null | null | null | models/sqlnet/modules/cond_predict.py | inyukwo1/qgm_decoder | 70e60afec140ec3e2ee04f980a384e1cf28d761c | [
"MIT"
] | null | null | null | models/sqlnet/modules/cond_predict.py | inyukwo1/qgm_decoder | 70e60afec140ec3e2ee04f980a384e1cf28d761c | [
"MIT"
] | null | null | null | import torch
import numpy as np
import torch.nn as nn
from commons.utils import run_lstm, col_name_encode
class CondPredictor(nn.Module):
def __init__(self, N_word, N_h, N_depth, gpu):
super(CondPredictor, self).__init__()
self.N_h = N_h
self.gpu = gpu
self.q_lstm = nn.LSTM(input_... | 41.747899 | 104 | 0.603462 |
0ab42b0888f4483cf20558e6bb901e4d73b0ce1b | 111 | py | Python | plotFit.py | nvoss12838/gpsFIT | 5f06274e57f7c2f4101775eadf7142e5f492b177 | [
"MIT"
] | 1 | 2019-10-01T04:13:08.000Z | 2019-10-01T04:13:08.000Z | plotFit.py | nvoss12838/gpsFIT | 5f06274e57f7c2f4101775eadf7142e5f492b177 | [
"MIT"
] | null | null | null | plotFit.py | nvoss12838/gpsFIT | 5f06274e57f7c2f4101775eadf7142e5f492b177 | [
"MIT"
] | null | null | null | import numpy as np
#python ../../../../Modeling/modelData.py ../../../Costa_Rica.p bon2 ../bon2.fun
print 'a' | 22.2 | 80 | 0.612613 |
0ac9dec462d589a59e09541c6f7bea3a065d6b4b | 919 | py | Python | test2.py | KR-16/Flask | b996c16378690d46a2e17d5c382aa78ec504e4ff | [
"MIT"
] | null | null | null | test2.py | KR-16/Flask | b996c16378690d46a2e17d5c382aa78ec504e4ff | [
"MIT"
] | null | null | null | test2.py | KR-16/Flask | b996c16378690d46a2e17d5c382aa78ec504e4ff | [
"MIT"
] | null | null | null | # URL building Dynamically
# Variable Rules ad URL Building
from flask import Flask,redirect,url_for
app = Flask(__name__)
@app.route("/")
def welcome():
return "Welcome to Flask :) "
# it is app decorator with /successs as the URL and append some values with integer
# building URL dynamically and... | 25.527778 | 89 | 0.64309 |
7ccc92e2f215007e8b64650480b03c99bc39160c | 7,022 | py | Python | mailbot.py | jorgesumle/ticketfrei | 9e221ed29047ece677d00a668becc8b970d634a2 | [
"0BSD"
] | null | null | null | mailbot.py | jorgesumle/ticketfrei | 9e221ed29047ece677d00a668becc8b970d634a2 | [
"0BSD"
] | null | null | null | mailbot.py | jorgesumle/ticketfrei | 9e221ed29047ece677d00a668becc8b970d634a2 | [
"0BSD"
] | null | null | null | #!/usr/bin/env python3
import sendmail
import ssl
import time
import trigger
import datetime
import email
import logging
import pytoml as toml
import imaplib
import report
logger = logging.getLogger(__name__)
class Mailbot(object):
"""
Bot which sends Mails if mentioned via twitter/mastodon, and tells
o... | 33.122642 | 99 | 0.567929 |
860cb5d5c8cbb619d76eb61ecadd9bc87100902a | 24,534 | py | Python | savageml/models/layerless_sparse_net_model.py | savagewil/SavageML | d5aa9a5305b5de088e3bf32778252c877faec41d | [
"MIT"
] | null | null | null | savageml/models/layerless_sparse_net_model.py | savagewil/SavageML | d5aa9a5305b5de088e3bf32778252c877faec41d | [
"MIT"
] | null | null | null | savageml/models/layerless_sparse_net_model.py | savagewil/SavageML | d5aa9a5305b5de088e3bf32778252c877faec41d | [
"MIT"
] | null | null | null | from typing import Tuple, List, Callable, Iterable, Union, Dict
import numpy as np
from savageml.utility import ActivationFunctions, ActivationFunctionsDerivatives
from savageml.utility import LossFunctions, LossFunctionDerivatives
from savageml.models import BaseModel
from savageml.utility import get_sample_from_iter... | 49.764706 | 122 | 0.626029 |
86e59d3ff65bd2d1fc982566483a8fcd315d8a49 | 909 | py | Python | exercises/fr/exc_01_12_01.py | Jette16/spacy-course | 32df0c8f6192de6c9daba89740a28c0537e4d6a0 | [
"MIT"
] | 2,085 | 2019-04-17T13:10:40.000Z | 2022-03-30T21:51:46.000Z | exercises/fr/exc_01_12_01.py | Jette16/spacy-course | 32df0c8f6192de6c9daba89740a28c0537e4d6a0 | [
"MIT"
] | 79 | 2019-04-18T14:42:55.000Z | 2022-03-07T08:15:43.000Z | exercises/fr/exc_01_12_01.py | Jette16/spacy-course | 32df0c8f6192de6c9daba89740a28c0537e4d6a0 | [
"MIT"
] | 361 | 2019-04-17T13:34:32.000Z | 2022-03-28T04:42:45.000Z | import spacy
from spacy.matcher import Matcher
nlp = spacy.load("fr_core_news_sm")
matcher = Matcher(nlp.vocab)
doc = nlp(
"Après avoir effectué la mise à jour d'iOS vous ne constaterez pas de "
"renouveau radical : rien de commun avec le bouleversement que nous "
"avions connu avec iOS 7. Globalement iOS... | 36.36 | 78 | 0.733773 |
d4de8e5c821888aef60bfacff615866d75f42900 | 2,197 | py | Python | insomniac/action_get_my_profile_info.py | shifenis/Insomniac | 7c9d572b83c29049bc3075073be5549fe821a739 | [
"MIT"
] | 533 | 2020-06-01T10:40:11.000Z | 2022-03-29T17:05:50.000Z | insomniac/action_get_my_profile_info.py | shifenis/Insomniac | 7c9d572b83c29049bc3075073be5549fe821a739 | [
"MIT"
] | 399 | 2020-06-01T22:01:55.000Z | 2022-03-29T20:39:29.000Z | insomniac/action_get_my_profile_info.py | shifenis/Insomniac | 7c9d572b83c29049bc3075073be5549fe821a739 | [
"MIT"
] | 166 | 2020-06-01T21:51:52.000Z | 2022-03-12T14:14:44.000Z | from insomniac.navigation import switch_to_english
from insomniac.sleeper import sleeper
from insomniac.utils import *
from insomniac.views import TabBarView, ActionBarView, UserSwitchFailedException
def get_my_profile_info(device, username):
try:
profile_view = TabBarView(device).navigate_to_profile()
... | 36.016393 | 95 | 0.659991 |
07ed81f81d1969e76a4f565a3b9285d2d2b27c3b | 7,578 | py | Python | solutions/MFA/webserver/src/deep_speaker/conv_models.py | naetimus/bootcamp | 0182992df7c54012944b51fe9b70532ab6a0059b | [
"Apache-2.0"
] | 1 | 2021-04-06T06:13:20.000Z | 2021-04-06T06:13:20.000Z | solutions/MFA/webserver/src/deep_speaker/conv_models.py | naetimus/bootcamp | 0182992df7c54012944b51fe9b70532ab6a0059b | [
"Apache-2.0"
] | null | null | null | solutions/MFA/webserver/src/deep_speaker/conv_models.py | naetimus/bootcamp | 0182992df7c54012944b51fe9b70532ab6a0059b | [
"Apache-2.0"
] | null | null | null | import logging
import os
import numpy as np
import tensorflow.keras.backend as K
from tensorflow.keras import layers
from tensorflow.keras import regularizers
from tensorflow.keras.layers import BatchNormalization
from tensorflow.keras.layers import Conv2D
from tensorflow.keras.layers import Dropout
from tensorflow.ke... | 37.89 | 119 | 0.628266 |
ed14da430a39d892c0e0ba56412f980274041c0c | 1,582 | py | Python | gemtown/songs/migrations/0003_auto_20190420_1532.py | doramong0926/gemtown | 2c39284e3c68f0cc11994bed0ee2abaad0ea06b6 | [
"MIT"
] | null | null | null | gemtown/songs/migrations/0003_auto_20190420_1532.py | doramong0926/gemtown | 2c39284e3c68f0cc11994bed0ee2abaad0ea06b6 | [
"MIT"
] | 5 | 2020-09-04T20:13:39.000Z | 2022-02-17T22:03:33.000Z | gemtown/songs/migrations/0003_auto_20190420_1532.py | doramong0926/gemtown | 2c39284e3c68f0cc11994bed0ee2abaad0ea06b6 | [
"MIT"
] | null | null | null | # Generated by Django 2.0.13 on 2019-04-20 06:32
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('songs', '0002_auto_20190420_1510'),
]
operations = [
migrations.AlterField(
model_name='song',
name='career',
... | 46.529412 | 255 | 0.551201 |
13356f8532f06025f48dd9aba2bfc993c9d5409b | 22 | py | Python | plugins/bundler/__init__.py | Alucarxd/alucarxd.github.io | 69a509957cec73a7cafe70e5e0afdfb0ed136614 | [
"MIT"
] | 1 | 2021-02-05T01:56:35.000Z | 2021-02-05T01:56:35.000Z | plugins/bundler/__init__.py | ELCG/elcg.github.io | eccfda750928c4f4da1caaeaeeee400a790a7d2a | [
"MIT"
] | null | null | null | plugins/bundler/__init__.py | ELCG/elcg.github.io | eccfda750928c4f4da1caaeaeeee400a790a7d2a | [
"MIT"
] | null | null | null | from .bundler import * | 22 | 22 | 0.772727 |
b9291e116ba2174dcd99794d7259b57e54722ca6 | 29,076 | py | Python | WebHostLib/tracker.py | Berserker66/ALttPEntranceRandomizer | 9c681cc65d7281ccded03484b050e8f80ea65dc6 | [
"MIT"
] | null | null | null | WebHostLib/tracker.py | Berserker66/ALttPEntranceRandomizer | 9c681cc65d7281ccded03484b050e8f80ea65dc6 | [
"MIT"
] | 5 | 2020-01-18T21:10:46.000Z | 2020-01-25T20:58:19.000Z | WebHostLib/tracker.py | Berserker66/ALttPEntranceRandomizer | 9c681cc65d7281ccded03484b050e8f80ea65dc6 | [
"MIT"
] | 2 | 2020-01-18T17:36:50.000Z | 2020-01-22T16:52:08.000Z | import collections
from flask import render_template
from werkzeug.exceptions import abort
import datetime
import logging
from uuid import UUID
import Items
import Regions
from WebHostLib import app, cache, Room
from Utils import Hint
def get_id(item_name):
return Items.item_table[item_name][2]
app.jinja_env.... | 52.483755 | 167 | 0.680802 |
b96be1c271f55ad6e4a8ec98b80302b8bfd9c9b2 | 1,116 | py | Python | torch/fx/experimental/fx2trt/converters/adaptive_avgpool.py | vuanvin/pytorch | 9267fd8d7395074001ad7cf2a8f28082dbff6b0b | [
"Intel"
] | 183 | 2018-04-06T21:10:36.000Z | 2022-03-30T15:05:24.000Z | torch/fx/experimental/fx2trt/converters/adaptive_avgpool.py | vuanvin/pytorch | 9267fd8d7395074001ad7cf2a8f28082dbff6b0b | [
"Intel"
] | 631 | 2018-06-05T16:59:11.000Z | 2022-03-31T16:26:57.000Z | torch/fx/experimental/fx2trt/converters/adaptive_avgpool.py | vuanvin/pytorch | 9267fd8d7395074001ad7cf2a8f28082dbff6b0b | [
"Intel"
] | 58 | 2018-06-05T16:40:18.000Z | 2022-03-16T15:37:29.000Z | import torch
import tensorrt as trt
from torch.fx.experimental.fx2trt.converter_registry import tensorrt_converter
from .converter_utils import mark_as_int8_layer, extend_mod_attr_to_tuple
@tensorrt_converter(torch.nn.modules.pooling.AdaptiveAvgPool2d)
def adaptive_avgpool2d(network, submod, args, kwargs, name):
... | 38.482759 | 93 | 0.735663 |
b9b14d4c72ab68e3df87fd3dcc096b6c0158f9ce | 1,680 | py | Python | bolt/utils/shell.py | ph7vc/CL4M-B0T | e992cf63b1215ea7c241cab94edc251653dbaed7 | [
"MIT"
] | 9 | 2019-02-17T06:33:14.000Z | 2021-10-05T02:19:00.000Z | bolt/utils/shell.py | ns-phennessy/Bolt | e992cf63b1215ea7c241cab94edc251653dbaed7 | [
"MIT"
] | 28 | 2019-02-10T07:48:05.000Z | 2021-12-20T00:15:37.000Z | bolt/utils/shell.py | ph7vc/CL4M-B0T | e992cf63b1215ea7c241cab94edc251653dbaed7 | [
"MIT"
] | 4 | 2015-03-13T03:58:55.000Z | 2015-05-27T08:29:46.000Z | import socket
from prompt_toolkit import PromptSession
from prompt_toolkit.history import FileHistory
from prompt_toolkit.auto_suggest import AutoSuggestFromHistory
from prompt_toolkit.lexers import PygmentsLexer
from prompt_toolkit.styles import Style
from pygments.lexers.python import Python3Lexer
class Shell():
... | 28.965517 | 101 | 0.632143 |
e00830441c0bfcefd6e8590191d504e1b4783465 | 4,814 | py | Python | exercises/networking_selfpaced/networking-workshop/collections/ansible_collections/community/general/tests/unit/modules/remote_management/oneview/test_oneview_enclosure_info.py | tr3ck3r/linklight | 5060f624c235ecf46cb62cefcc6bddc6bf8ca3e7 | [
"MIT"
] | null | null | null | exercises/networking_selfpaced/networking-workshop/collections/ansible_collections/community/general/tests/unit/modules/remote_management/oneview/test_oneview_enclosure_info.py | tr3ck3r/linklight | 5060f624c235ecf46cb62cefcc6bddc6bf8ca3e7 | [
"MIT"
] | null | null | null | exercises/networking_selfpaced/networking-workshop/collections/ansible_collections/community/general/tests/unit/modules/remote_management/oneview/test_oneview_enclosure_info.py | tr3ck3r/linklight | 5060f624c235ecf46cb62cefcc6bddc6bf8ca3e7 | [
"MIT"
] | null | null | null | # Copyright (c) 2016-2017 Hewlett Packard Enterprise Development LP
# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
from ansible_collections.community.general.tests.unit.compat import unittest
from ansible_collections.community.general.plugins.modules.remote_management.onev... | 36.195489 | 134 | 0.708558 |
e01482a1fcd5e0c5d0ef170911f2be46bef9f384 | 1,783 | py | Python | src/Sephrasto/CharakterAssistent/VariantPopupWrapper.py | Ilaris-Tools/Sephrasto | 8574a5b45da8ebfa5f69a775066fd3136da1c718 | [
"MIT"
] | 1 | 2022-02-02T16:15:59.000Z | 2022-02-02T16:15:59.000Z | src/Sephrasto/CharakterAssistent/VariantPopupWrapper.py | Ilaris-Tools/Sephrasto | 8574a5b45da8ebfa5f69a775066fd3136da1c718 | [
"MIT"
] | 1 | 2022-01-14T11:04:19.000Z | 2022-01-14T11:04:19.000Z | src/Sephrasto/CharakterAssistent/VariantPopupWrapper.py | lukruh/Sephrasto | 8574a5b45da8ebfa5f69a775066fd3136da1c718 | [
"MIT"
] | null | null | null | from PyQt5 import QtCore, QtWidgets, QtGui
from UI import ChoicePopup
from Wolke import Wolke
class VariantPopupWrapper(object):
def __init__(self, variantListCollection, windowTitle, currentEP):
super().__init__()
self.form = QtWidgets.QDialog()
self.form.setWindowFlags(
QtCore... | 38.76087 | 84 | 0.613012 |
16ce22be1519da7c7b6480f9ea261037a85b9ad9 | 1,357 | py | Python | Sketche/boids/boids01.py | kantel/p5 | 2ef14191c35fdb056b44624c6ff0ff764c88cc30 | [
"MIT"
] | null | null | null | Sketche/boids/boids01.py | kantel/p5 | 2ef14191c35fdb056b44624c6ff0ff764c88cc30 | [
"MIT"
] | null | null | null | Sketche/boids/boids01.py | kantel/p5 | 2ef14191c35fdb056b44624c6ff0ff764c88cc30 | [
"MIT"
] | null | null | null | import p5
import os
# import math
import random as r
# import numpy as np
# Hier wird der Pfad zum Verzeichnis des ».py«-Files gesetzt
# Erspart einem das Herumgehample in TextMate mit dem os.getcwd()
# und os.path.join()
file_path = os.path.dirname(os.path.abspath(__file__))
os.chdir(file_path)
# Fenstergröße, wenn ... | 23.396552 | 89 | 0.6028 |
4c1b68532813fb72c97f665e1f93ebfeec5deb3d | 555 | py | Python | src/onegov/core/orm/types/uuid_type.py | politbuero-kampagnen/onegov-cloud | 20148bf321b71f617b64376fe7249b2b9b9c4aa9 | [
"MIT"
] | null | null | null | src/onegov/core/orm/types/uuid_type.py | politbuero-kampagnen/onegov-cloud | 20148bf321b71f617b64376fe7249b2b9b9c4aa9 | [
"MIT"
] | null | null | null | src/onegov/core/orm/types/uuid_type.py | politbuero-kampagnen/onegov-cloud | 20148bf321b71f617b64376fe7249b2b9b9c4aa9 | [
"MIT"
] | null | null | null | from sqlalchemy.dialects.postgresql import UUID as BaseUUID
class UUID(BaseUUID):
""" The UUID type used throughout OneGov. The base is always the UUID type
defined by SQLAlchemy for Postgres, but we change the default to actually
handle the values as uuid.UUID values.
Another approach could be the f... | 27.75 | 78 | 0.715315 |
d5ea9d5398187e8e10d6b7b6070aab437ce22eeb | 455 | py | Python | frappe-bench/apps/erpnext/erpnext/restaurant/doctype/restaurant_table/restaurant_table.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/restaurant/doctype/restaurant_table/restaurant_table.py | Semicheche/foa_frappe_docker | a186b65d5e807dd4caf049e8aeb3620a799c1225 | [
"MIT"
] | null | null | null | frappe-bench/apps/erpnext/erpnext/restaurant/doctype/restaurant_table/restaurant_table.py | Semicheche/foa_frappe_docker | a186b65d5e807dd4caf049e8aeb3620a799c1225 | [
"MIT"
] | 1 | 2021-04-29T14:39:01.000Z | 2021-04-29T14:39:01.000Z | # -*- coding: utf-8 -*-
# Copyright (c) 2017, Frappe Technologies Pvt. Ltd. and contributors
# For license information, please see license.txt
from __future__ import unicode_literals
import frappe, re
from frappe.model.document import Document
from frappe.model.naming import make_autoname
class RestaurantTable(Docume... | 32.5 | 68 | 0.72967 |
91397935f5f39bde8f37dc012f90825a7085e883 | 4,767 | py | Python | skimind/kernel/interfacedb/config.py | NathBangwa/SkimindFoot | 8ae3a00074c56dd981fbfdab30e29898ddcaf6be | [
"MIT"
] | 1 | 2020-11-13T18:30:47.000Z | 2020-11-13T18:30:47.000Z | skimind/kernel/interfacedb/config.py | nathanbangwa243/SkimindFoot | 8ae3a00074c56dd981fbfdab30e29898ddcaf6be | [
"MIT"
] | 5 | 2020-11-13T18:16:48.000Z | 2021-09-08T01:04:59.000Z | skimind/kernel/interfacedb/config.py | nathanbangwa243/SkimindFoot | 8ae3a00074c56dd981fbfdab30e29898ddcaf6be | [
"MIT"
] | null | null | null | #-*-coding: utf-8 -*-
"""
Configuration des requetes
"""
# gFunction tools
from . import gFunctions
TEST_DATE = "25-10-2018" # WARNING
#---------------------------------------------------------------------------
# JOUEUR PAR DEFAUT
#-------------------------------------------------------------------------... | 45.836538 | 101 | 0.361863 |
fc26b0c95016990a25aeab2f54a9bff4e04ba026 | 2,221 | py | Python | flipui/qutils/flipdotdisplay.py | julianschick/flipdot-brose-code | b2caf2c52c55a0d5b80dbf3d5adbbf5aec1d79c2 | [
"MIT"
] | null | null | null | flipui/qutils/flipdotdisplay.py | julianschick/flipdot-brose-code | b2caf2c52c55a0d5b80dbf3d5adbbf5aec1d79c2 | [
"MIT"
] | null | null | null | flipui/qutils/flipdotdisplay.py | julianschick/flipdot-brose-code | b2caf2c52c55a0d5b80dbf3d5adbbf5aec1d79c2 | [
"MIT"
] | null | null | null | from PySide2.QtCore import QObject
import commands as cx
from qutils.txworker import FlipdotTxWorker
from qutils.qcommand import QCommand
class FlipdotDisplay(QObject):
def __init__(self, width: int, height: int, leds: int, parent = None):
QObject.__init__(self, parent)
self._width = width
... | 26.440476 | 77 | 0.619541 |
5d87e4287ba15296f8221d3f325abd0f07196619 | 340 | py | Python | exercises/en/test_01_03_01.py | Jette16/spacy-course | 32df0c8f6192de6c9daba89740a28c0537e4d6a0 | [
"MIT"
] | 2,085 | 2019-04-17T13:10:40.000Z | 2022-03-30T21:51:46.000Z | exercises/en/test_01_03_01.py | Jette16/spacy-course | 32df0c8f6192de6c9daba89740a28c0537e4d6a0 | [
"MIT"
] | 79 | 2019-04-18T14:42:55.000Z | 2022-03-07T08:15:43.000Z | exercises/en/test_01_03_01.py | Jette16/spacy-course | 32df0c8f6192de6c9daba89740a28c0537e4d6a0 | [
"MIT"
] | 361 | 2019-04-17T13:34:32.000Z | 2022-03-28T04:42:45.000Z | def test():
assert (
doc.text == "I like tree kangaroos and narwhals."
), "Are you sure you processed the text correctly?"
assert first_token == doc[0], "Are you sure you selected the first token?"
assert "print(first_token.text)" in __solution__, "Are you printing the token text?"
__msg__.g... | 42.5 | 88 | 0.673529 |
5dd2340e3cb3c35103002d0b2017b1d6dae880f1 | 1,474 | py | Python | Algorithms/Strings/PalindromeIndex.py | baby5/HackerRank | 1e68a85f40499adb9b52a4da16936f85ac231233 | [
"MIT"
] | null | null | null | Algorithms/Strings/PalindromeIndex.py | baby5/HackerRank | 1e68a85f40499adb9b52a4da16936f85ac231233 | [
"MIT"
] | null | null | null | Algorithms/Strings/PalindromeIndex.py | baby5/HackerRank | 1e68a85f40499adb9b52a4da16936f85ac231233 | [
"MIT"
] | null | null | null | #coding:utf-8
for _ in range(input()):
string = raw_input().strip()
length = len(string)
if length < 3:
print "0"
continue
ind = 0
flag = 1
while ind < length/2:
if string[ind] == string[-1-ind]:
ind+=1
else:
flag = 0
break
... | 19.142857 | 41 | 0.348033 |
5d60ba715c198b951efc7f367c6c5bc9c59575f5 | 9,434 | py | Python | 20-fs-ias-lec/groups/07-14-logCtrl/src/tests/test_database_connector.py | Kyrus1999/BACnet | 5be8e1377252166041bcd0b066cce5b92b077d06 | [
"MIT"
] | 8 | 2020-03-17T21:12:18.000Z | 2021-12-12T15:55:54.000Z | 20-fs-ias-lec/groups/07-14-logCtrl/src/tests/test_database_connector.py | Kyrus1999/BACnet | 5be8e1377252166041bcd0b066cce5b92b077d06 | [
"MIT"
] | 2 | 2021-07-19T06:18:43.000Z | 2022-02-10T12:17:58.000Z | 20-fs-ias-lec/groups/07-14-logCtrl/src/tests/test_database_connector.py | Kyrus1999/BACnet | 5be8e1377252166041bcd0b066cce5b92b077d06 | [
"MIT"
] | 25 | 2020-03-20T09:32:45.000Z | 2021-07-18T18:12:59.000Z | import hashlib # Comes with python
import secrets # Comes with python
from nacl.signing import SigningKey
from testfixtures import LogCapture
from contextlib import contextmanager
import os
from logStore.funcs.event import Content, Event, Meta
from logStore.transconn.database_connector import DatabaseConnector
from l... | 49.135417 | 187 | 0.666525 |
54f8768c03fe41a5e278a25bba230eb11415b49e | 272 | py | Python | zencad/examples/3.Animation/camera.py | Spiritdude/zencad | 4e63b1a6306dd235f4daa2791b10249f7546c95b | [
"MIT"
] | 5 | 2018-04-11T14:11:40.000Z | 2018-09-12T19:03:36.000Z | zencad/examples/3.Animation/camera.py | Spiritdude/zencad | 4e63b1a6306dd235f4daa2791b10249f7546c95b | [
"MIT"
] | null | null | null | zencad/examples/3.Animation/camera.py | Spiritdude/zencad | 4e63b1a6306dd235f4daa2791b10249f7546c95b | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
# coding: utf-8
from zencad import *
import time
s = box(10, center=True)
controller = disp(s)
def animate(wdg):
if not wdg.mousedown:
wdg.set_eye(zencad.rotateZ(zencad.deg(-0.8))(wdg.eye()), orthogonal=True)
show(animate=animate)
| 16 | 81 | 0.680147 |
db82af6009d7dd54655c7a228bdef69c7ffd38cf | 24,279 | py | Python | myems-api/core/wechatmessage.py | 18600575648/myems | 38ab7d509b5ab275a4df0333e6256c586abdfbf9 | [
"MIT"
] | null | null | null | myems-api/core/wechatmessage.py | 18600575648/myems | 38ab7d509b5ab275a4df0333e6256c586abdfbf9 | [
"MIT"
] | null | null | null | myems-api/core/wechatmessage.py | 18600575648/myems | 38ab7d509b5ab275a4df0333e6256c586abdfbf9 | [
"MIT"
] | null | null | null | import re
import falcon
import simplejson as json
import mysql.connector
import config
from datetime import datetime, timedelta, timezone
from core.useractivity import user_logger, access_control
class WechatMessageCollection(object):
@staticmethod
def __init__():
""""Initializes WechatMessageCollecti... | 47.982213 | 112 | 0.544421 |
91c33bf4dc6096516b708c32edd3442ffe965ad8 | 306 | py | Python | ISTp/2014/ZINOVIEVA_Z_M/task1_40.py | YukkaSarasti/pythonintask | eadf4245abb65f4400a3bae30a4256b4658e009c | [
"Apache-2.0"
] | null | null | null | ISTp/2014/ZINOVIEVA_Z_M/task1_40.py | YukkaSarasti/pythonintask | eadf4245abb65f4400a3bae30a4256b4658e009c | [
"Apache-2.0"
] | null | null | null | ISTp/2014/ZINOVIEVA_Z_M/task1_40.py | YukkaSarasti/pythonintask | eadf4245abb65f4400a3bae30a4256b4658e009c | [
"Apache-2.0"
] | null | null | null | #Задача1.Вариант40.
#Напишите программу, которая будет сообщать род деятельности и псевдоним под которым скрывается Анри Мари Бейль.
#Zinovieva Z.M.
#31.03.2016
print("Мари-Анри Бейль-французски писатель,один из основоположников психологического романа.Его псевдоним- Стендаль")
input("\nВведите Enter")
| 34 | 117 | 0.810458 |
5360ab1ed3385972800d33ce20a63540730cd35e | 565 | py | Python | scripts/test_publisher.py | FabianBell/24h-dezember-2021 | 139c5996479db0cdcb96189a2c89ee34c45a9d37 | [
"Apache-2.0"
] | null | null | null | scripts/test_publisher.py | FabianBell/24h-dezember-2021 | 139c5996479db0cdcb96189a2c89ee34c45a9d37 | [
"Apache-2.0"
] | 5 | 2021-12-17T09:52:50.000Z | 2021-12-17T10:50:05.000Z | scripts/test_publisher.py | FabianBell/24h-dezember-2021 | 139c5996479db0cdcb96189a2c89ee34c45a9d37 | [
"Apache-2.0"
] | null | null | null | import pika
import json
import base64
with open('test.jpg', 'rb') as fin:
data = fin.read()
body = {
'image' : base64.b64encode(data).decode('ascii'),
'extension' : '.jpg',
'sessionkey' : 1
}
#OUPUT_NAME = "FACE_RESTORE_TASK"
OUPUT_NAME = "ARCANE_TASK"
connection = pika.BlockingConnection(pika... | 21.730769 | 78 | 0.709735 |
be5fe28131e94c0d19dbec7083784773990e6f30 | 686 | py | Python | app/models/file_tags.py | zhiyong-lv/flask-login | d8bf0719bae19ba8f7f44ea6d6a8ca65ba22aa63 | [
"MIT"
] | null | null | null | app/models/file_tags.py | zhiyong-lv/flask-login | d8bf0719bae19ba8f7f44ea6d6a8ca65ba22aa63 | [
"MIT"
] | null | null | null | app/models/file_tags.py | zhiyong-lv/flask-login | d8bf0719bae19ba8f7f44ea6d6a8ca65ba22aa63 | [
"MIT"
] | null | null | null | from sqlalchemy.dialects.mysql import INTEGER
from app import db
class FileTag(db.Model):
'''file_tags should be a multiple to multiple relationship table'''
id = db.Column(INTEGER(unsigned=True), autoincrement=True, primary_key=True, nullable=False)
file_uuid = db.Column(db.String(50), nullable=False, i... | 34.3 | 101 | 0.701166 |
fe93868b2bf3a25993275e8ce286886e0f9b8e44 | 2,577 | py | Python | Fastir_Collector/fs/windowsXPFiles.py | Unam3dd/Train-2018-2020 | afb6ae70fe338cbe55a21b74648d91996b818fa2 | [
"MIT"
] | 4 | 2021-04-23T15:39:17.000Z | 2021-12-27T22:53:24.000Z | Fastir_Collector/fs/windowsXPFiles.py | Unam3dd/Train-2018-2020 | afb6ae70fe338cbe55a21b74648d91996b818fa2 | [
"MIT"
] | null | null | null | Fastir_Collector/fs/windowsXPFiles.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 fs import _FS
class WindowsXPFiles(_FS):
def __init__(self, params):
super(WindowsXPFiles, self).__init__(params)
self.userprofile = params['USERPROFILE']
def __list_named_pipes(self):
return super(WindowsXPFiles, se... | 40.265625 | 119 | 0.724486 |
feacffc9548b669f2294ddecc88b0245911f84bd | 10,254 | py | Python | nlangp-001/w1/eval_gene_tagger.py | zaqwes8811/cs-courses | aa9cf5ad109c9cfcacaadc11bf2defb2188ddce2 | [
"Apache-2.0"
] | null | null | null | nlangp-001/w1/eval_gene_tagger.py | zaqwes8811/cs-courses | aa9cf5ad109c9cfcacaadc11bf2defb2188ddce2 | [
"Apache-2.0"
] | 1 | 2016-02-05T15:37:55.000Z | 2016-02-15T01:32:55.000Z | nlangp-001/w1/eval_gene_tagger.py | zaqwes8811/cs-courses | aa9cf5ad109c9cfcacaadc11bf2defb2188ddce2 | [
"Apache-2.0"
] | 1 | 2020-02-05T03:16:37.000Z | 2020-02-05T03:16:37.000Z | #! /usr/bin/python
__author__="Daniel Bauer <bauer@cs.columbia.edu>"
__date__ ="$Sep 29, 2011"
import sys
"""
Evaluate gene tagger output by comparing it to a gold standard file.
Running the script on your tagger output like this
python eval_gene_tagger.py gene_dev.key your_tagger_output.dat
will generate a ... | 37.837638 | 142 | 0.56339 |
22bf0115bc6ff36e03dd4af6e121fc26be5b5828 | 1,019 | py | Python | Contrib-Intel/RSD-PSME-RMM/common/logger/examples/logger_example_tcp_receiving.py | opencomputeproject/Rack-Manager | e1a61d3eeeba0ff655fe9c1301e8b510d9b2122a | [
"MIT"
] | 5 | 2019-11-11T07:57:26.000Z | 2022-03-28T08:26:53.000Z | Contrib-Intel/RSD-PSME-RMM/common/logger/examples/logger_example_tcp_receiving.py | opencomputeproject/Rack-Manager | e1a61d3eeeba0ff655fe9c1301e8b510d9b2122a | [
"MIT"
] | 3 | 2019-09-05T21:47:07.000Z | 2019-09-17T18:10:45.000Z | Contrib-Intel/RSD-PSME-RMM/common/logger/examples/logger_example_tcp_receiving.py | opencomputeproject/Rack-Manager | e1a61d3eeeba0ff655fe9c1301e8b510d9b2122a | [
"MIT"
] | 11 | 2019-07-20T00:16:32.000Z | 2022-01-11T14:17:48.000Z | #!/usr/bin/env python
''' logger_udp_receiving
'''
__license__ = '''\
Copyright (c) 2015-2019 Intel Corporation
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/LI... | 24.261905 | 72 | 0.709519 |
a3d5227d678783fd83faaad668621b712cacbc20 | 6,425 | py | Python | wagtail_localize/tests/test_translations_report.py | th3hamm0r/wagtail-localize | e9e0ba9245060c65e3247b62739abbed71bc2516 | [
"BSD-3-Clause"
] | 6 | 2019-09-10T19:53:55.000Z | 2019-11-14T16:57:07.000Z | wagtail_localize/tests/test_translations_report.py | th3hamm0r/wagtail-localize | e9e0ba9245060c65e3247b62739abbed71bc2516 | [
"BSD-3-Clause"
] | 17 | 2019-07-11T11:17:37.000Z | 2019-11-19T16:40:31.000Z | wagtail_localize/tests/test_translations_report.py | th3hamm0r/wagtail-localize | e9e0ba9245060c65e3247b62739abbed71bc2516 | [
"BSD-3-Clause"
] | 2 | 2019-09-30T20:23:39.000Z | 2019-10-31T14:09:31.000Z | from django.contrib.contenttypes.models import ContentType
from django.test import TestCase, override_settings
from django.urls import reverse
from wagtail.core.models import Locale, Page
from wagtail.tests.utils import WagtailTestUtils
from wagtail_localize.models import Translation, TranslationSource
from wagtail_lo... | 43.412162 | 88 | 0.707549 |
7188cd8b8de0c058739638249832d27817950605 | 344 | py | Python | 01.DataStructure/Tree/SY/p42576_SY.py | SP2021-2/Algorithm | 2e629eb5234212fad8bbc11491aad068e5783780 | [
"MIT"
] | 1 | 2021-11-21T06:03:06.000Z | 2021-11-21T06:03:06.000Z | 01.DataStructure/Tree/SY/p42576_SY.py | SP2021-2/Algorithm | 2e629eb5234212fad8bbc11491aad068e5783780 | [
"MIT"
] | 2 | 2021-10-13T07:21:09.000Z | 2021-11-14T13:53:08.000Z | 01.DataStructure/Tree/SY/p42576_SY.py | SP2021-2/Algorithm | 2e629eb5234212fad8bbc11491aad068e5783780 | [
"MIT"
] | null | null | null | # p42576_SY
def solution(participant, completion):
answer = ''
participant.sort()
completion.sort()
length = len(participant)
for i in range(length-1):
if participant[i] != completion[i]:
answer = participant[i]
break
if answer == "":
answer = participan... | 21.5 | 43 | 0.581395 |
718b87b2d19bafe4bdb9023d14a8662026629afd | 9,236 | py | Python | retro/cores/gba/src/platform/python/mgba/core.py | MatPoliquin/retro | c70c174a9818d1e97bc36e61abb4694d28fc68e1 | [
"MIT-0",
"MIT"
] | 2,706 | 2018-04-05T18:28:50.000Z | 2022-03-29T16:56:59.000Z | retro/cores/gba/src/platform/python/mgba/core.py | MatPoliquin/retro | c70c174a9818d1e97bc36e61abb4694d28fc68e1 | [
"MIT-0",
"MIT"
] | 242 | 2018-04-05T22:30:42.000Z | 2022-03-19T01:55:11.000Z | retro/cores/gba/src/platform/python/mgba/core.py | MatPoliquin/retro | c70c174a9818d1e97bc36e61abb4694d28fc68e1 | [
"MIT-0",
"MIT"
] | 464 | 2018-04-05T19:10:34.000Z | 2022-03-28T13:33:32.000Z | # Copyright (c) 2013-2016 Jeffrey Pfau
#
# This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
from ._pylib import ffi, lib
from . import tile, createCallback
from cached_prop... | 28.506173 | 143 | 0.631442 |
401c4ff1b15c8369fb6b0ddd24054c2a71a91519 | 966 | py | Python | git_downloader.py | Unam3dd/Train-2018-2020 | afb6ae70fe338cbe55a21b74648d91996b818fa2 | [
"MIT"
] | 4 | 2021-04-23T15:39:17.000Z | 2021-12-27T22:53:24.000Z | git_downloader.py | Unam3dd/Train-2018-2020 | afb6ae70fe338cbe55a21b74648d91996b818fa2 | [
"MIT"
] | null | null | null | git_downloader.py | Unam3dd/Train-2018-2020 | afb6ae70fe338cbe55a21b74648d91996b818fa2 | [
"MIT"
] | 2 | 2021-04-19T08:28:54.000Z | 2022-01-19T13:23:29.000Z | #!/usr/bin/python3
#-*- coding:utf-8 -*-
try:
import os
import requests
import json
except Exception as error_import:
print("[+] Import not found : %s " % (error_import))
def get_repos(username, page):
return requests.get("https://api.github.com/users/%s/repos?per_page=100&page=%d" % (username, p... | 27.6 | 104 | 0.494824 |
40b091679287bd1fdad363d7089540f349d07159 | 2,724 | py | Python | official/cv/FCN8s/src/data/build_seg_data.py | leelige/mindspore | 5199e05ba3888963473f2b07da3f7bca5b9ef6dc | [
"Apache-2.0"
] | 77 | 2021-10-15T08:32:37.000Z | 2022-03-30T13:09:11.000Z | official/cv/FCN8s/src/data/build_seg_data.py | leelige/mindspore | 5199e05ba3888963473f2b07da3f7bca5b9ef6dc | [
"Apache-2.0"
] | 3 | 2021-10-30T14:44:57.000Z | 2022-02-14T06:57:57.000Z | official/cv/FCN8s/src/data/build_seg_data.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... | 35.376623 | 115 | 0.640969 |
905a012d8ff1265fd3daa9d2f926d0627215faa3 | 549 | py | Python | 7-assets/past-student-repos/data_struct_and_algo-master/rotated_sorted_find.py | eengineergz/Lambda | 1fe511f7ef550aed998b75c18a432abf6ab41c5f | [
"MIT"
] | null | null | null | 7-assets/past-student-repos/data_struct_and_algo-master/rotated_sorted_find.py | eengineergz/Lambda | 1fe511f7ef550aed998b75c18a432abf6ab41c5f | [
"MIT"
] | null | null | null | 7-assets/past-student-repos/data_struct_and_algo-master/rotated_sorted_find.py | eengineergz/Lambda | 1fe511f7ef550aed998b75c18a432abf6ab41c5f | [
"MIT"
] | null | null | null | def sorted_find(arr,low,high,x):
while(low<high):
mid=low+(high-low)//2
if(arr[mid]==x):
return mid
elif(arr[mid]>=arr[low]):
if(arr[low]>x and arr[mid]<x):
high=mid-1
else:
low=mid+1
elif(arr[high]<=arr[mid]):
... | 24.954545 | 50 | 0.473588 |
90b1a04bd35f186d125fe2ee63956c71a8a540e4 | 3,189 | py | Python | reports/sep/code/create_yolo_data2.py | klawr/deepmech | 61de238f1d4b1b867ec1d5f4e4af2a3b25a5abff | [
"MIT"
] | 1 | 2020-04-17T12:27:06.000Z | 2020-04-17T12:27:06.000Z | reports/sep/code/create_yolo_data2.py | klawr/deepmech | 61de238f1d4b1b867ec1d5f4e4af2a3b25a5abff | [
"MIT"
] | 1 | 2022-02-27T13:13:17.000Z | 2022-02-27T13:13:17.000Z | reports/sep/code/create_yolo_data2.py | klawr/deepmech | 61de238f1d4b1b867ec1d5f4e4af2a3b25a5abff | [
"MIT"
] | null | null | null |
import cv2
import json
import numpy as np
from os import path, listdir
from tqdm import tqdm
raw = path.join('data', 'sep_raw_02')
interim = path.join('data', 'sep_interim_02')
processed = path.join('data', 'sep_processed_02')
image_width = 360
image_height = 360
data_list = []
with open(path.join(raw, 'config.jso... | 33.925532 | 86 | 0.480088 |
2933eae57b2894f52ddc316d85e2226f885bc42b | 13,746 | py | Python | exercises/networking_selfpaced/networking-workshop/collections/ansible_collections/community/general/tests/unit/module_utils/network/aci/test_aci.py | tr3ck3r/linklight | 5060f624c235ecf46cb62cefcc6bddc6bf8ca3e7 | [
"MIT"
] | null | null | null | exercises/networking_selfpaced/networking-workshop/collections/ansible_collections/community/general/tests/unit/module_utils/network/aci/test_aci.py | tr3ck3r/linklight | 5060f624c235ecf46cb62cefcc6bddc6bf8ca3e7 | [
"MIT"
] | null | null | null | exercises/networking_selfpaced/networking-workshop/collections/ansible_collections/community/general/tests/unit/module_utils/network/aci/test_aci.py | tr3ck3r/linklight | 5060f624c235ecf46cb62cefcc6bddc6bf8ca3e7 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
# Copyright: (c) 2017, Dag Wieers (@dagwieers) <dag@wieers.com>
# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
from __future__ import (absolute_import, division, print_function)
__metaclass__ = type
import sys
from ansible_collections.community.g... | 41.781155 | 1,294 | 0.550851 |
463f276588b877178cbbf69c710e64c8f23f2743 | 40,939 | py | Python | Bowman/.ipynb_checkpoints/module_test-checkpoint.py | JonathanOnorato/ChemLP | a7b0d2f9a3899531aacda9bc85d89d721f6450c4 | [
"MIT"
] | 4 | 2020-04-13T20:49:01.000Z | 2021-02-09T01:05:01.000Z | Bowman/.ipynb_checkpoints/module_test-checkpoint.py | JonathanOnorato/ChemLP | a7b0d2f9a3899531aacda9bc85d89d721f6450c4 | [
"MIT"
] | 3 | 2020-04-28T23:16:27.000Z | 2020-04-28T23:26:53.000Z | Bowman/.ipynb_checkpoints/module_test-checkpoint.py | JonathanOnorato/ChemLP | a7b0d2f9a3899531aacda9bc85d89d721f6450c4 | [
"MIT"
] | null | null | null | {
"cells": [
{
"cell_type": "code",
"execution_count": 6,
"metadata": {},
"outputs": [
{
"data": {
"text/plain": [
"'This program so far imports a variant of the functions we all made as BowFunks. It then takes a given start url, in this case a Chapter from\\nthe Schaller textbook, ... | 341.158333 | 36,785 | 0.784142 |
466a4e5e1e0e99562ca1bec6d23a69e6b4aa39b0 | 3,224 | py | Python | src/onegov/election_day/views/election/candidates.py | politbuero-kampagnen/onegov-cloud | 20148bf321b71f617b64376fe7249b2b9b9c4aa9 | [
"MIT"
] | null | null | null | src/onegov/election_day/views/election/candidates.py | politbuero-kampagnen/onegov-cloud | 20148bf321b71f617b64376fe7249b2b9b9c4aa9 | [
"MIT"
] | null | null | null | src/onegov/election_day/views/election/candidates.py | politbuero-kampagnen/onegov-cloud | 20148bf321b71f617b64376fe7249b2b9b9c4aa9 | [
"MIT"
] | null | null | null | from onegov.ballot import Election
from onegov.core.security import Public
from onegov.election_day import ElectionDayApp
from onegov.election_day.hidden_by_principal import \
hide_candidates_chart
from onegov.election_day.layouts import DefaultLayout
from onegov.election_day.layouts import ElectionLayout
from oneg... | 27.793103 | 79 | 0.712159 |
3174bd4f5c617e6a5c81b0b97902274a15da9ffa | 1,739 | py | Python | ProjectEuler_plus/euler_027.py | byung-u/HackerRank | 4c02fefff7002b3af774b99ebf8d40f149f9d163 | [
"MIT"
] | null | null | null | ProjectEuler_plus/euler_027.py | byung-u/HackerRank | 4c02fefff7002b3af774b99ebf8d40f149f9d163 | [
"MIT"
] | null | null | null | ProjectEuler_plus/euler_027.py | byung-u/HackerRank | 4c02fefff7002b3af774b99ebf8d40f149f9d163 | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
import sys
from itertools import count
def is_prime(n):
'''check if integer n is a prime'''
# make sure n is a positive integer
n = abs(int(n))
# 0 and 1 are not primes
if n < 2:
return False
# 2 is the only even prime number
if n == 2:
return True... | 21.7375 | 49 | 0.427832 |
b44bd190ca11d3596d7d65328f6f63733481d690 | 87 | py | Python | exercise7.py | nikhadif/Advanced-Programming | e5bf4f5014c17c252bc0cb93c9d44c7c615b79c0 | [
"MIT"
] | 1 | 2020-11-21T16:57:40.000Z | 2020-11-21T16:57:40.000Z | exercise7.py | nikhadif/Advanced-Programming | e5bf4f5014c17c252bc0cb93c9d44c7c615b79c0 | [
"MIT"
] | null | null | null | exercise7.py | nikhadif/Advanced-Programming | e5bf4f5014c17c252bc0cb93c9d44c7c615b79c0 | [
"MIT"
] | null | null | null |
data_file = open("example.txt", 'r')
for line_str in data_file:
print(line_str)
| 12.428571 | 36 | 0.678161 |
5b054721ecf41d1f3aa2c2217421d9a0bd5725c5 | 4,579 | py | Python | research/cv/ivpf/ivpf/networks.py | leelige/mindspore | 5199e05ba3888963473f2b07da3f7bca5b9ef6dc | [
"Apache-2.0"
] | 77 | 2021-10-15T08:32:37.000Z | 2022-03-30T13:09:11.000Z | research/cv/ivpf/ivpf/networks.py | leelige/mindspore | 5199e05ba3888963473f2b07da3f7bca5b9ef6dc | [
"Apache-2.0"
] | 3 | 2021-10-30T14:44:57.000Z | 2022-02-14T06:57:57.000Z | research/cv/ivpf/ivpf/networks.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... | 26.935294 | 78 | 0.549028 |
c4a79a18d0a5798767e4b00b569a578c7b097258 | 1,250 | py | Python | BBBUS.py | Cyril-Meyer/BBBUS | 04213f8dee8cf2bd8c9f0a21ad1fb81ea38a3d87 | [
"MIT"
] | null | null | null | BBBUS.py | Cyril-Meyer/BBBUS | 04213f8dee8cf2bd8c9f0a21ad1fb81ea38a3d87 | [
"MIT"
] | null | null | null | BBBUS.py | Cyril-Meyer/BBBUS | 04213f8dee8cf2bd8c9f0a21ad1fb81ea38a3d87 | [
"MIT"
] | null | null | null | import os
import datetime
import numpy as np
def bbbus(folder_name):
file_names = [f for f in os.listdir(folder) if (os.path.isfile(os.path.join(folder, f)) and ".txt" in f)]
dates = []
for f in file_names:
dates.append(datetime.datetime.fromtimestamp(int(f.split(".")[0].split("-")[-1][:-3])))
... | 25 | 109 | 0.5272 |
6feec40d4a988f79db5020e1b84b3c52dadd0f22 | 376 | py | Python | etl/io_config/core.py | cloud-cds/cds-stack | d68a1654d4f604369a071f784cdb5c42fc855d6e | [
"Apache-2.0"
] | 6 | 2018-06-27T00:09:55.000Z | 2019-03-07T14:06:53.000Z | etl/io_config/core.py | cloud-cds/cds-stack | d68a1654d4f604369a071f784cdb5c42fc855d6e | [
"Apache-2.0"
] | 3 | 2021-03-31T18:37:46.000Z | 2021-06-01T21:49:41.000Z | etl/io_config/core.py | cloud-cds/cds-stack | d68a1654d4f604369a071f784cdb5c42fc855d6e | [
"Apache-2.0"
] | 3 | 2020-01-24T16:40:49.000Z | 2021-09-30T02:28:55.000Z | import os
def get_environment_var(variable_name, default_value=None):
if variable_name in os.environ:
return os.environ[variable_name]
elif default_value is None:
raise KeyError("""Either an environment variable for "{}" needs to be set
or the value needs to be passed into the constructor.
""".... | 31.333333 | 77 | 0.736702 |
d23f26950a9024114c989a09fbb10c11f7086bd9 | 2,242 | py | Python | whitespace/definitions.py | wittrup/crap | a77474588fd54a5a998e24df7b1e6e2ab473ded1 | [
"MIT"
] | 1 | 2017-12-12T13:58:08.000Z | 2017-12-12T13:58:08.000Z | whitespace/definitions.py | wittrup/crap | a77474588fd54a5a998e24df7b1e6e2ab473ded1 | [
"MIT"
] | null | null | null | whitespace/definitions.py | wittrup/crap | a77474588fd54a5a998e24df7b1e6e2ab473ded1 | [
"MIT"
] | 1 | 2019-11-03T10:16:35.000Z | 2019-11-03T10:16:35.000Z | whspchars = "\t\n "
nonwhite = bytearray(set(range(0x00, 0x100)) - {9, 10, 32})
"""http://compsoc.dur.ac.uk/whitespace/tutorial.html
Whitespace tutorial
The only lexical tokens in the whitespace language are Space (ASCII 32), Tab (ASCII 9) and Line Feed (ASCII 10).
By only allowing line feed as a token, CR/LF problems... | 59 | 216 | 0.666369 |
d27544af10e70475b1a9bea3e3566e13e67575d5 | 2,173 | py | Python | Packs/CommonScripts/Scripts/RemoveKeyFromList/RemoveKeyFromList.py | diCagri/content | c532c50b213e6dddb8ae6a378d6d09198e08fc9f | [
"MIT"
] | 799 | 2016-08-02T06:43:14.000Z | 2022-03-31T11:10:11.000Z | Packs/CommonScripts/Scripts/RemoveKeyFromList/RemoveKeyFromList.py | diCagri/content | c532c50b213e6dddb8ae6a378d6d09198e08fc9f | [
"MIT"
] | 9,317 | 2016-08-07T19:00:51.000Z | 2022-03-31T21:56:04.000Z | Packs/CommonScripts/Scripts/RemoveKeyFromList/RemoveKeyFromList.py | diCagri/content | c532c50b213e6dddb8ae6a378d6d09198e08fc9f | [
"MIT"
] | 1,297 | 2016-08-04T13:59:00.000Z | 2022-03-31T23:43:06.000Z | """RemoveKeyFromList
Removes a Key from a JSON-backed List
"""
import demistomock as demisto
from CommonServerPython import * # noqa # pylint: disable=unused-wildcard-import
from CommonServerUserPython import * # noqa
from typing import Dict, Any
import traceback
''' STANDALONE FUNCTION '''
def remove_key_from_... | 27.506329 | 97 | 0.66682 |
83b6b59897d1f982e336462605bcff93543bb927 | 1,308 | py | Python | frappe-bench/apps/erpnext/erpnext/patches/v6_0/set_default_title.py | Semicheche/foa_frappe_docker | a186b65d5e807dd4caf049e8aeb3620a799c1225 | [
"MIT"
] | null | null | null | frappe-bench/apps/erpnext/erpnext/patches/v6_0/set_default_title.py | Semicheche/foa_frappe_docker | a186b65d5e807dd4caf049e8aeb3620a799c1225 | [
"MIT"
] | null | null | null | frappe-bench/apps/erpnext/erpnext/patches/v6_0/set_default_title.py | Semicheche/foa_frappe_docker | a186b65d5e807dd4caf049e8aeb3620a799c1225 | [
"MIT"
] | null | null | null | import frappe
def execute():
frappe.reload_doctype("Quotation")
frappe.db.sql("""update tabQuotation set title = customer_name""")
frappe.reload_doctype("Sales Order")
frappe.db.sql("""update `tabSales Order` set title = customer_name""")
frappe.reload_doctype("Delivery Note")
frappe.db.sql("""update `tabDeliv... | 36.333333 | 84 | 0.745413 |
83cfed0daf692be1a25777764b7ae20782a3a460 | 2,514 | py | Python | sqliteexample/com/aaron/example1.py | qsunny/python | ace8c3178a9a9619de2b60ca242c2079dd2f825e | [
"MIT"
] | null | null | null | sqliteexample/com/aaron/example1.py | qsunny/python | ace8c3178a9a9619de2b60ca242c2079dd2f825e | [
"MIT"
] | 2 | 2021-03-25T22:00:07.000Z | 2022-01-20T15:51:48.000Z | sqliteexample/com/aaron/example1.py | qsunny/python | ace8c3178a9a9619de2b60ca242c2079dd2f825e | [
"MIT"
] | null | null | null | # -*- coding:utf-8 -*-
"""sqlite showcase"""
__author__ = "aaron.qiu"
import sqlite3 as lite
import sys
import pprint
def test_conn():
"""test connection"""
con = None
try:
con = lite.connect('test.db')
cur = con.cursor()
cur.execute('SELECT SQLITE_VERSION()')
... | 24.407767 | 104 | 0.495227 |
f7b864c9afdd4040d304266964fe2be0157ba6da | 31,144 | py | Python | feedcrawler/sites/shared/internal_feed.py | rix1337/FeedCrawler | 6c104c39f1bd45e5d49c02c90bb8d9fd35f9709e | [
"MIT"
] | 16 | 2021-04-06T07:37:18.000Z | 2022-03-27T15:05:32.000Z | feedcrawler/sites/shared/internal_feed.py | rix1337/FeedCrawler | 6c104c39f1bd45e5d49c02c90bb8d9fd35f9709e | [
"MIT"
] | 17 | 2021-06-09T10:37:49.000Z | 2022-03-31T07:29:36.000Z | feedcrawler/sites/shared/internal_feed.py | rix1337/FeedCrawler | 6c104c39f1bd45e5d49c02c90bb8d9fd35f9709e | [
"MIT"
] | 3 | 2021-05-22T13:49:57.000Z | 2022-01-05T11:15:47.000Z | # -*- coding: utf-8 -*-
# FeedCrawler
# Projekt von https://github.com/rix1337
import datetime
import json
import re
from bs4 import BeautifulSoup
from feedcrawler import internal
from feedcrawler.common import check_hoster
from feedcrawler.common import check_is_site
from feedcrawler.common import check_valid_relea... | 37.842041 | 122 | 0.537503 |
f72ed91db2e8e38da901631f369f411c385dca7e | 1,057 | py | Python | ryu/app/simulation/test.py | yuesir137/SDN-CLB | 58b12a9412cffdf2945440528b1885c8899edd08 | [
"Apache-2.0"
] | null | null | null | ryu/app/simulation/test.py | yuesir137/SDN-CLB | 58b12a9412cffdf2945440528b1885c8899edd08 | [
"Apache-2.0"
] | null | null | null | ryu/app/simulation/test.py | yuesir137/SDN-CLB | 58b12a9412cffdf2945440528b1885c8899edd08 | [
"Apache-2.0"
] | null | null | null | import math
import os
import queue
import random
import threading
import time
from pprint import pprint
from networkx import DiGraph
from Node import Switch
class my_thread(threading.Thread):
def __init__(self):
threading.Thread.__init__(self)
self.flow_queue = []
def run(self) -> None:
... | 19.218182 | 45 | 0.689688 |
f757d90a26d19778d2ee71d70f0155d684219f7d | 11,217 | py | Python | demo.py | SeanTater/rsvp | 2f136ee8aac2d9401427d4d4f0d78f74eb757f15 | [
"Apache-2.0"
] | null | null | null | demo.py | SeanTater/rsvp | 2f136ee8aac2d9401427d4d4f0d78f74eb757f15 | [
"Apache-2.0"
] | 1 | 2021-03-24T01:04:02.000Z | 2021-03-24T01:04:02.000Z | demo.py | SeanTater/rsvp | 2f136ee8aac2d9401427d4d4f0d78f74eb757f15 | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/python3
import cv2
import numpy as np
import sqlite3
import time
class QualityCheck:
def __init__(self):
""" Record model runs """
self.db = sqlite3.connect("logs.db", isolation_level=None)
self.db.execute("""
CREATE TABLE IF NOT EXISTS ModelRun(
run_i... | 34.943925 | 108 | 0.561023 |
588e4d2211a7445509a650882fe2119967cca724 | 588 | py | Python | Packs/CaseManagement-Generic/Scripts/TimersOnOwnerChange/TimersOnOwnerChange.py | diCagri/content | c532c50b213e6dddb8ae6a378d6d09198e08fc9f | [
"MIT"
] | 799 | 2016-08-02T06:43:14.000Z | 2022-03-31T11:10:11.000Z | Packs/CaseManagement-Generic/Scripts/TimersOnOwnerChange/TimersOnOwnerChange.py | diCagri/content | c532c50b213e6dddb8ae6a378d6d09198e08fc9f | [
"MIT"
] | 9,317 | 2016-08-07T19:00:51.000Z | 2022-03-31T21:56:04.000Z | Packs/CaseManagement-Generic/Scripts/TimersOnOwnerChange/TimersOnOwnerChange.py | diCagri/content | c532c50b213e6dddb8ae6a378d6d09198e08fc9f | [
"MIT"
] | 1,297 | 2016-08-04T13:59:00.000Z | 2022-03-31T23:43:06.000Z | import demistomock as demisto
# This script stops the Time to Assignment timer when an Owner is assigned to an Incident, and starts the Remediation
# SLA Timer.
if not demisto.args().get('old') and demisto.args().get('new'): # If owner was no-one and is now someone:
demisto.executeCommand("stopTimer", {"timerFie... | 49 | 119 | 0.727891 |
544ac1f0a1b670a106b1ecfd42d3b9654cb24cb5 | 16,496 | py | Python | Co-Simulation/Sumo/sumo-1.7.0/tools/contributed/sumopy/agilepy/lib_base/geometry.py | uruzahe/carla | 940c2ab23cce1eda1ef66de35f66b42d40865fb1 | [
"MIT"
] | 4 | 2020-11-13T02:35:56.000Z | 2021-03-29T20:15:54.000Z | Co-Simulation/Sumo/sumo-1.7.0/tools/contributed/sumopy/agilepy/lib_base/geometry.py | uruzahe/carla | 940c2ab23cce1eda1ef66de35f66b42d40865fb1 | [
"MIT"
] | 9 | 2020-12-09T02:12:39.000Z | 2021-02-18T00:15:28.000Z | Co-Simulation/Sumo/sumo-1.7.0/tools/contributed/sumopy/agilepy/lib_base/geometry.py | uruzahe/carla | 940c2ab23cce1eda1ef66de35f66b42d40865fb1 | [
"MIT"
] | 1 | 2020-11-20T19:31:26.000Z | 2020-11-20T19:31:26.000Z | # Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo
# Copyright (C) 2016-2020 German Aerospace Center (DLR) and others.
# SUMOPy module
# Copyright (C) 2012-2017 University of Bologna - DICAM
# This program and the accompanying materials are made available under the
# terms of the Eclipse Public ... | 29.300178 | 118 | 0.564319 |
49dde07a572e23c1ee56e882e36f25e84b06bfaa | 3,022 | py | Python | tests/addons/dump/test_json.py | ihatov08/jumeaux | 7d983474df4b6dcfa57ea1a66901fbc99ebababa | [
"MIT"
] | 11 | 2017-10-02T01:29:12.000Z | 2022-03-31T08:37:22.000Z | tests/addons/dump/test_json.py | ihatov08/jumeaux | 7d983474df4b6dcfa57ea1a66901fbc99ebababa | [
"MIT"
] | 79 | 2017-07-16T14:47:17.000Z | 2022-03-31T08:49:14.000Z | tests/addons/dump/test_json.py | ihatov08/jumeaux | 7d983474df4b6dcfa57ea1a66901fbc99ebababa | [
"MIT"
] | 2 | 2019-01-28T06:11:58.000Z | 2021-01-25T07:21:21.000Z | #!/usr/bin/env python
# -*- coding:utf-8 -*-
import datetime
import json
import pytest
from owlmixin.util import load_yaml
from jumeaux.addons.dump.json import Executor
from jumeaux.models import Response, DumpAddOnPayload
NORMAL_BODY = json.dumps({
"total": 10,
"items": [
{"id": 1, "name": "Ichiro",... | 27.724771 | 106 | 0.448048 |
49deb92e811620c69f30305f778c3372defe0fbe | 2,513 | py | Python | riqc/libs/utils.py | ratschlab/software-m53 | affc6b8bffc72c5dbaa9d4eca513c42962de01fe | [
"MIT"
] | null | null | null | riqc/libs/utils.py | ratschlab/software-m53 | affc6b8bffc72c5dbaa9d4eca513c42962de01fe | [
"MIT"
] | null | null | null | riqc/libs/utils.py | ratschlab/software-m53 | affc6b8bffc72c5dbaa9d4eca513c42962de01fe | [
"MIT"
] | null | null | null | import numpy as np
import warnings
def filterBid(allids, sbids):
'''
gets two id list
returns matching index
'''
if np.unique(sbids).shape[0] != sbids.shape[0]:
warnings.warn("superset ids are not unique: Making it unique")
sbids = np.unique(sbids)
if np.unique(allids).shape[0]... | 28.556818 | 110 | 0.559093 |
b704a12fef89aaebf35d94ecdb079337d0f9ff96 | 821 | py | Python | ___Python/Michael/p02_listen/m01_temperaturen.py | uvenil/PythonKurs201806 | 85afa9c9515f5dd8bec0c546f077d8cc39568fe8 | [
"Apache-2.0"
] | null | null | null | ___Python/Michael/p02_listen/m01_temperaturen.py | uvenil/PythonKurs201806 | 85afa9c9515f5dd8bec0c546f077d8cc39568fe8 | [
"Apache-2.0"
] | null | null | null | ___Python/Michael/p02_listen/m01_temperaturen.py | uvenil/PythonKurs201806 | 85afa9c9515f5dd8bec0c546f077d8cc39568fe8 | [
"Apache-2.0"
] | null | null | null | from p01_kennenlernern import meinebibliothek
from p01_kennenlernern.meinebibliothek import celsius_to_fahrenheit
celsius_temperaturen = [0.7, 2.1, 4.2, 8.2, 12.5, 15.6, 16.9, 16.3, 13.6, 9.5, 4.6, 2.3] # Durchschnittstemperaturen in Bielefeld nach Monat in °C
# Aufgabe: Neue Liste fahrenheit erzeugen, die die Tem... | 30.407407 | 147 | 0.738124 |
b70fabbec746d4fb137f5e50d8a66ed3e765cb4c | 2,210 | py | Python | TwitVidDown-master/vidtwet.py | Zusyaku/Termux-And-Lali-Linux-V2 | b1a1b0841d22d4bf2cc7932b72716d55f070871e | [
"Apache-2.0"
] | 4 | 2019-09-18T07:22:52.000Z | 2020-04-05T09:01:33.000Z | TwitVidDown-master/vidtwet.py | Zusyaku/Termux-And-Lali-Linux-V2 | b1a1b0841d22d4bf2cc7932b72716d55f070871e | [
"Apache-2.0"
] | null | null | null | TwitVidDown-master/vidtwet.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,sys,os
from bs4 import BeautifulSoup as Bs
class MedDown:
def __init__(self):
try:
os.mkdir('result')
except:
pass
self.req=requests.Session()
self.req.headers.update({'referer':'http://twittervideodownloader.com','user-agent':'Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTM... | 29.078947 | 199 | 0.620814 |
42451f6cf76408242f4357b9bcf939ea057b23b1 | 474 | py | Python | SleekSecurity/layers/plugins/fingerprint/framework/symfony.py | GitInitDev/ZohoUniv | 966704837e65f58b52492b56d08e7958df3d220a | [
"Unlicense"
] | null | null | null | SleekSecurity/layers/plugins/fingerprint/framework/symfony.py | GitInitDev/ZohoUniv | 966704837e65f58b52492b56d08e7958df3d220a | [
"Unlicense"
] | null | null | null | SleekSecurity/layers/plugins/fingerprint/framework/symfony.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
def symfony(headers,content):
_ = False
_ |= search(r"\"powered by symfony\"",cont... | 31.6 | 96 | 0.664557 |
22500dbc9148bd230a9088da369657f9d3d8fcf4 | 2,271 | py | Python | qmk_firmware/lib/python/qmk/cli/generate/keyboard_h.py | DanTupi/personal_setup | 911b4951e4d8b78d6ea8ca335229e2e970fda871 | [
"MIT"
] | null | null | null | qmk_firmware/lib/python/qmk/cli/generate/keyboard_h.py | DanTupi/personal_setup | 911b4951e4d8b78d6ea8ca335229e2e970fda871 | [
"MIT"
] | null | null | null | qmk_firmware/lib/python/qmk/cli/generate/keyboard_h.py | DanTupi/personal_setup | 911b4951e4d8b78d6ea8ca335229e2e970fda871 | [
"MIT"
] | null | null | null | """Used by the make system to generate keyboard.h from info.json.
"""
from milc import cli
from qmk.decorators import automagic_keyboard, automagic_keymap
from qmk.info import info_json
from qmk.keyboard import keyboard_completer, keyboard_folder
from qmk.path import normpath
def would_populate_layout_h(keyboard):
... | 37.229508 | 154 | 0.689564 |
97e0445fff8b7b27643bcdd343c841006d6be7e8 | 1,033 | py | Python | api/endpoints/statistics.py | healthIMIS/aha-kompass | 7b7cae24502c0c0e5635c587cfef797a93ae02b5 | [
"MIT"
] | 2 | 2021-03-23T20:32:38.000Z | 2021-04-21T11:20:12.000Z | api/endpoints/statistics.py | healthIMIS/aha-kompass | 7b7cae24502c0c0e5635c587cfef797a93ae02b5 | [
"MIT"
] | 4 | 2021-04-19T11:00:55.000Z | 2021-04-20T08:21:48.000Z | api/endpoints/statistics.py | healthIMIS/aha-kompass | 7b7cae24502c0c0e5635c587cfef797a93ae02b5 | [
"MIT"
] | null | null | null | # Simply output the statistics
#!/usr/bin/env python3
# Corona-Info-App
# measures endpoint
# © 2020 Tobias Höpp.
# Include dependencies
from flask import request, jsonify
# Include modules
from main import api, db
from models.districts import districts
import json
# Endpoint definition
@api.route("/data/statistic... | 27.918919 | 127 | 0.619555 |
58ab89dabe76fb5b2858ead2a8cc1a3f0a1377d9 | 7,556 | py | Python | echtzeit.py | jkerpe/TroubleBubble | 813ad797398b9f338f136bcb96c6c92186d92ebf | [
"MIT"
] | null | null | null | echtzeit.py | jkerpe/TroubleBubble | 813ad797398b9f338f136bcb96c6c92186d92ebf | [
"MIT"
] | null | null | null | echtzeit.py | jkerpe/TroubleBubble | 813ad797398b9f338f136bcb96c6c92186d92ebf | [
"MIT"
] | 1 | 2021-08-09T14:57:57.000Z | 2021-08-09T14:57:57.000Z | #!/usr/bin/env python3
from pypylon import pylon
import smbus2
import argparse
import cv2
from tracker import Tracker
import numpy as np
import time
ap = argparse.ArgumentParser(description="""Skript zum Aufnehmen von Bildern der Teststrecke und der
Volumenbestimmung von Lu... | 35.308411 | 127 | 0.65352 |
58e9b3828c8d9dda1502ab74cc1b416c4cacdb04 | 334 | py | Python | web-brutator-master/lib/core/Exceptions.py | Zusyaku/Termux-And-Lali-Linux-V2 | b1a1b0841d22d4bf2cc7932b72716d55f070871e | [
"Apache-2.0"
] | 2 | 2021-11-17T03:35:03.000Z | 2021-12-08T06:00:31.000Z | web-brutator-master/lib/core/Exceptions.py | Zusyaku/Termux-And-Lali-Linux-V2 | b1a1b0841d22d4bf2cc7932b72716d55f070871e | [
"Apache-2.0"
] | null | null | null | web-brutator-master/lib/core/Exceptions.py | Zusyaku/Termux-And-Lali-Linux-V2 | b1a1b0841d22d4bf2cc7932b72716d55f070871e | [
"Apache-2.0"
] | 2 | 2021-11-05T18:07:48.000Z | 2022-02-24T21:25:07.000Z | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
# An AuthException will stop the bruteforcing (unexpected error)
class AuthException(Exception):
pass
# A RequestException might be due to network congestion and will
# stop bruteforcing only after several consecutive similar exceptions
class RequestException(Except... | 30.363636 | 69 | 0.769461 |
7fda2d1ff08bfe4ea6da0907b559c7a83d3d483e | 917 | py | Python | gamedeals-bot-master/models.py | jaakaappi/archived-projects | be1f754eca7c1434f3a363b0ea8ebcd190a42436 | [
"MIT"
] | null | null | null | gamedeals-bot-master/models.py | jaakaappi/archived-projects | be1f754eca7c1434f3a363b0ea8ebcd190a42436 | [
"MIT"
] | 3 | 2021-03-10T13:18:31.000Z | 2021-05-11T09:20:11.000Z | gamedeals-bot-master/models.py | jaakaappi/archived-projects | be1f754eca7c1434f3a363b0ea8ebcd190a42436 | [
"MIT"
] | null | null | null | from sqlalchemy import Column, ForeignKey, Integer, DateTime, String
from sqlalchemy.ext.declarative import declarative_base
from sqlalchemy.orm import relationship, sessionmaker
from sqlalchemy import create_engine
Base = declarative_base()
class Channel(Base):
__tablename__ = 'channel'
id = Column(Integer,... | 28.65625 | 68 | 0.755725 |
7ffc703c43baf12dddd6cbee69d8996ee563b73d | 338 | py | Python | frappe-bench/apps/erpnext/erpnext/patches/v5_0/update_sms_sender.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/v5_0/update_sms_sender.py | Semicheche/foa_frappe_docker | a186b65d5e807dd4caf049e8aeb3620a799c1225 | [
"MIT"
] | null | null | null | frappe-bench/apps/erpnext/erpnext/patches/v5_0/update_sms_sender.py | Semicheche/foa_frappe_docker | a186b65d5e807dd4caf049e8aeb3620a799c1225 | [
"MIT"
] | 1 | 2021-04-29T14:39:01.000Z | 2021-04-29T14:39:01.000Z | # Copyright (c) 2013, Frappe Technologies Pvt. Ltd. and Contributors
# License: GNU General Public License v3. See license.txt
from __future__ import unicode_literals
import frappe
def execute():
frappe.db.set_value("SMS Settings", "SMS Settings", "sms_sender_name",
frappe.db.get_single_value("Global Defaults", "s... | 33.8 | 71 | 0.778107 |
3d2893cb98491813af67a05c9e6463628db43d95 | 11,164 | py | Python | backend/songwriter/serializers.py | giliam/turbo-songwriter | 3d100b08dc19c60d7a1324120e06bd9f971eea5a | [
"MIT"
] | null | null | null | backend/songwriter/serializers.py | giliam/turbo-songwriter | 3d100b08dc19c60d7a1324120e06bd9f971eea5a | [
"MIT"
] | 12 | 2017-09-25T20:13:29.000Z | 2020-02-12T00:12:41.000Z | backend/songwriter/serializers.py | giliam/turbo-songwriter | 3d100b08dc19c60d7a1324120e06bd9f971eea5a | [
"MIT"
] | null | null | null | #coding:utf-8
from django.contrib.auth.models import User
from rest_framework import serializers
from rest_framework import pagination
from songwriter import models
class ResultsSetPagination(pagination.PageNumberPagination):
page_size = 20
page_size_query_param = 'page_size'
max_page_size = 1000
clas... | 24.269565 | 102 | 0.539681 |
a17174c7425704026f724394a92d275aee2f96ba | 517 | py | Python | BIZa/2014/Tskipu_a_k/task_4_28.py | YukkaSarasti/pythonintask | eadf4245abb65f4400a3bae30a4256b4658e009c | [
"Apache-2.0"
] | null | null | null | BIZa/2014/Tskipu_a_k/task_4_28.py | YukkaSarasti/pythonintask | eadf4245abb65f4400a3bae30a4256b4658e009c | [
"Apache-2.0"
] | null | null | null | BIZa/2014/Tskipu_a_k/task_4_28.py | YukkaSarasti/pythonintask | eadf4245abb65f4400a3bae30a4256b4658e009c | [
"Apache-2.0"
] | null | null | null | # Задача № 4. Вариант 28
# Напишите программу, которая выводит имя, под которым скрывается Эдуард Георгиевич Зюбин.
# Цкипуришвили Алекандр
#25. 05. 2016
print("Эдуард Георгиевич Зюбин-Псевдоним Эдуард Георгиевич Багрицкий")
print("Русский поэт, переводчик и драматург")
print("Эдуард Багрицкий родился в Одессе в евре... | 32.3125 | 91 | 0.744681 |
a1743f907fd69ca596c5a9a2ef1941b4bbd6fd14 | 19,418 | py | Python | exercises/networking_selfpaced/networking-workshop/collections/ansible_collections/community/general/plugins/modules/mysql_replication.py | tr3ck3r/linklight | 5060f624c235ecf46cb62cefcc6bddc6bf8ca3e7 | [
"MIT"
] | null | null | null | exercises/networking_selfpaced/networking-workshop/collections/ansible_collections/community/general/plugins/modules/mysql_replication.py | tr3ck3r/linklight | 5060f624c235ecf46cb62cefcc6bddc6bf8ca3e7 | [
"MIT"
] | null | null | null | exercises/networking_selfpaced/networking-workshop/collections/ansible_collections/community/general/plugins/modules/mysql_replication.py | tr3ck3r/linklight | 5060f624c235ecf46cb62cefcc6bddc6bf8ca3e7 | [
"MIT"
] | null | null | null | #!/usr/bin/python
# -*- coding: utf-8 -*-
# Copyright: (c) 2013, Balazs Pocze <banyek@gawker.com>
# Copyright: (c) 2019, Andrew Klychkov (@Andersson007) <aaklychkov@mail.ru>
# Certain parts are taken from Mark Theunissen's mysqldb module
# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/g... | 33.829268 | 141 | 0.657689 |
a19c5c8c6173589e10214536e274bb559620a831 | 3,253 | py | Python | tests/onegov/wtfs/test_views_auth.py | politbuero-kampagnen/onegov-cloud | 20148bf321b71f617b64376fe7249b2b9b9c4aa9 | [
"MIT"
] | null | null | null | tests/onegov/wtfs/test_views_auth.py | politbuero-kampagnen/onegov-cloud | 20148bf321b71f617b64376fe7249b2b9b9c4aa9 | [
"MIT"
] | null | null | null | tests/onegov/wtfs/test_views_auth.py | politbuero-kampagnen/onegov-cloud | 20148bf321b71f617b64376fe7249b2b9b9c4aa9 | [
"MIT"
] | null | null | null | from lxml.html import document_fromstring
from tests.shared import utils
from webtest import TestApp as Client
import onegov
def test_view_permissions():
utils.assert_explicit_permissions(
onegov.wtfs,
onegov.wtfs.WtfsApp
)
def test_view_login_logout(client):
error = "Unbekannter Benutze... | 34.978495 | 74 | 0.683369 |
c520a1070bd55aabc8f2c3ca92ab54112261da9a | 391 | py | Python | backend/app/schemas/membersolution_summary.py | jinnn-dev/patholearn | b4e6a18cfbf963e71640ed6cac3fc3a618a7ae15 | [
"MIT"
] | 1 | 2021-11-04T17:06:07.000Z | 2021-11-04T17:06:07.000Z | backend/app/schemas/membersolution_summary.py | JamesNeumann/learning-by-annotations | c2b5e4b653eeb1c973aa5a7dad35ac8be18cb1ad | [
"MIT"
] | 21 | 2021-11-01T10:13:56.000Z | 2021-12-02T10:02:13.000Z | backend/app/schemas/membersolution_summary.py | jinnn-dev/patholearn | b4e6a18cfbf963e71640ed6cac3fc3a618a7ae15 | [
"MIT"
] | 1 | 2021-12-16T18:20:55.000Z | 2021-12-16T18:20:55.000Z | from typing import List, Optional
from pydantic import BaseModel
class SummaryUser(BaseModel):
firstname: Optional[str]
middlename: Optional[str]
lastname: Optional[str]
class SummaryRow(BaseModel):
user: Optional[SummaryUser]
summary: Optional[List[int]]
class MembersolutionSummary(BaseModel... | 19.55 | 39 | 0.741688 |
774291aa584b53fa3163be04f9e88688c24040ca | 1,822 | py | Python | spo/spo/doctype/mitgliedschaft/mitgliedschaft.py | libracore/spo | c6617a4624d683e27ee3fde745313c30504f3fd1 | [
"MIT"
] | null | null | null | spo/spo/doctype/mitgliedschaft/mitgliedschaft.py | libracore/spo | c6617a4624d683e27ee3fde745313c30504f3fd1 | [
"MIT"
] | 6 | 2019-08-23T18:36:26.000Z | 2019-11-12T13:12:12.000Z | spo/spo/doctype/mitgliedschaft/mitgliedschaft.py | libracore/spo | c6617a4624d683e27ee3fde745313c30504f3fd1 | [
"MIT"
] | 1 | 2021-08-14T22:22:43.000Z | 2021-08-14T22:22:43.000Z | # -*- coding: utf-8 -*-
# Copyright (c) 2019, libracore and contributors
# For license information, please see license.txt
from __future__ import unicode_literals
import frappe
from frappe.model.document import Document
from frappe.utils.data import add_days, today
from spo.utils import esr
class Mitgliedschaft(Docum... | 36.44 | 221 | 0.736553 |
658a4cccbe6d17be120aa49ae1598df7255ed29c | 3,873 | py | Python | python/en/archive/books/jump2python/j2p-02_5-dictionary.py | aimldl/coding | 70ddbfaa454ab92fd072ee8dc614ecc330b34a70 | [
"MIT"
] | null | null | null | python/en/archive/books/jump2python/j2p-02_5-dictionary.py | aimldl/coding | 70ddbfaa454ab92fd072ee8dc614ecc330b34a70 | [
"MIT"
] | null | null | null | python/en/archive/books/jump2python/j2p-02_5-dictionary.py | aimldl/coding | 70ddbfaa454ab92fd072ee8dc614ecc330b34a70 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
"""
j2p-02_5-dictionary.py
P.82, 딕셔너리 자료형
딕셔너리는 Key-value을 한 쌍으로 갖는 자료형이다.
"""
#%%########################
# 딕셔너리는 어떻게 만들까? #
###########################
dic = {'name':'pey', 'phone':'0119993323','birth':'1118'}
# key=1, value=hi, string type value
a = {1:'hi'}
# key=a, val... | 20.384211 | 76 | 0.429641 |
a294b0b4bc46242d4b5e4d80fd0b4551f5e14bcd | 14,429 | py | Python | 3rdParty/V8/v5.7.492.77/tools/v8heapconst.py | sita1999/arangodb | 6a4f462fa209010cd064f99e63d85ce1d432c500 | [
"Apache-2.0"
] | 27 | 2017-12-14T13:48:25.000Z | 2020-12-31T15:46:55.000Z | 3rdParty/V8/v5.7.492.77/tools/v8heapconst.py | lipper/arangodb | 66ea1fd4946668192e3f0d1060f0844f324ad7b8 | [
"Apache-2.0"
] | null | null | null | 3rdParty/V8/v5.7.492.77/tools/v8heapconst.py | lipper/arangodb | 66ea1fd4946668192e3f0d1060f0844f324ad7b8 | [
"Apache-2.0"
] | 3 | 2019-01-14T12:12:27.000Z | 2019-06-07T09:47:00.000Z | # Copyright 2013 the V8 project authors. All rights reserved.
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are
# met:
#
# * Redistributions of source code must retain the above copyright
# notice, this list of conditi... | 40.64507 | 72 | 0.737335 |
0c1601c1fa5c1d19538d71c1e44042962a3affb4 | 4,366 | py | Python | marsyas-vamp/marsyas/scripts/translate-filenames.py | jaouahbi/VampPlugins | 27c2248d1c717417fe4d448cdfb4cb882a8a336a | [
"Apache-2.0"
] | null | null | null | marsyas-vamp/marsyas/scripts/translate-filenames.py | jaouahbi/VampPlugins | 27c2248d1c717417fe4d448cdfb4cb882a8a336a | [
"Apache-2.0"
] | null | null | null | marsyas-vamp/marsyas/scripts/translate-filenames.py | jaouahbi/VampPlugins | 27c2248d1c717417fe4d448cdfb4cb882a8a336a | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/env python
from optparse import OptionParser
import os
import csv
import shutil
AUDIO_FILES_PATTERN=('wav','au','mp3','ogg')
DEBUG = False
#DEBUG = True
MOVE_FILES = True
#MOVE_FILES = False
def write_numbers(dirname, csv_filename, number_dirname):
number_dirname_actual = os.path.join(dirname,
... | 37.637931 | 74 | 0.594137 |
3bf51b59522dc195828d6498226a2c156f5952a6 | 1,491 | py | Python | Prototype/main prototype/LayerDivider.py | fowado/BauphysikSE1 | eb8805196c8fbf99a879c40c5e0725d740c5a0de | [
"CC-BY-4.0"
] | 4 | 2019-12-03T16:13:09.000Z | 2019-12-11T23:22:58.000Z | Prototype/main prototype/LayerDivider.py | fowado/BauphysikSE1 | eb8805196c8fbf99a879c40c5e0725d740c5a0de | [
"CC-BY-4.0"
] | 65 | 2019-12-08T17:43:59.000Z | 2020-08-14T15:26:21.000Z | Prototype/main prototype/LayerDivider.py | fowado/BauphysikSE1 | eb8805196c8fbf99a879c40c5e0725d740c5a0de | [
"CC-BY-4.0"
] | null | null | null | # This Python file uses the following encoding: utf-8
from PyQt5 import QtCore
from PyQt5 import QtWidgets
from CustomMiniWidgets import QHLine
class LayerDivider(QtWidgets.QWidget):
def __init__(self,mode):
QtWidgets.QWidget.__init__(self)
self.mode=mode
#layout
self.divLayout = ... | 31.0625 | 90 | 0.655936 |
ce2555107d63f4a5b4d89a812e9d2906cdef23c3 | 748 | py | Python | languages/python/exercises/concept/list_methods/.meta/example.py | AlexLeSang/v3 | 3d35961a961b5a2129b1d42f1d118972d9665357 | [
"MIT"
] | null | null | null | languages/python/exercises/concept/list_methods/.meta/example.py | AlexLeSang/v3 | 3d35961a961b5a2129b1d42f1d118972d9665357 | [
"MIT"
] | 45 | 2020-01-24T17:04:52.000Z | 2020-11-24T17:50:18.000Z | languages/python/exercises/concept/list_methods/.meta/example.py | AlexLeSang/v3 | 3d35961a961b5a2129b1d42f1d118972d9665357 | [
"MIT"
] | null | null | null | def add_me_to_the_queue(express_queue, normal_queue, ticket_type, person_name):
if ticket_type == 1:
express_queue.append(person_name)
return express_queue
else:
normal_queue.append(person_name)
return normal_queue
def find_his_friend(queue, friend_name):
return queue.index(... | 25.793103 | 79 | 0.747326 |
65f44113646d2bcc7b7da3fc419f0d0eb68905e8 | 207 | py | Python | Shivani/gfg1.py | 63Shivani/Python-BootCamp | 2ed0ef95af35d35c0602031670fecfc92d8cea0a | [
"MIT"
] | null | null | null | Shivani/gfg1.py | 63Shivani/Python-BootCamp | 2ed0ef95af35d35c0602031670fecfc92d8cea0a | [
"MIT"
] | null | null | null | Shivani/gfg1.py | 63Shivani/Python-BootCamp | 2ed0ef95af35d35c0602031670fecfc92d8cea0a | [
"MIT"
] | null | null | null | def friends_in_trouble(j_angry, s_angry):
if(j_angry == True and s_angry == True):
return True
elif(j_angry == False and s_angry == False):
return True
else:
return False
| 25.875 | 48 | 0.618357 |
ce45577c3f1236b084d4b136de987839ce70a2c2 | 447 | py | Python | 1641-count-sorted-vowel-strings/1641-count-sorted-vowel-strings.py | hyeseonko/LeetCode | 48dfc93f1638e13041d8ce1420517a886abbdc77 | [
"MIT"
] | 2 | 2021-12-05T14:29:06.000Z | 2022-01-01T05:46:13.000Z | 1641-count-sorted-vowel-strings/1641-count-sorted-vowel-strings.py | hyeseonko/LeetCode | 48dfc93f1638e13041d8ce1420517a886abbdc77 | [
"MIT"
] | null | null | null | 1641-count-sorted-vowel-strings/1641-count-sorted-vowel-strings.py | hyeseonko/LeetCode | 48dfc93f1638e13041d8ce1420517a886abbdc77 | [
"MIT"
] | null | null | null | class Solution:
def countVowelStrings(self, n: int) -> int:
# dp[0] = ending with 'a'
# dp[1] = ending wiht 'e'
# dp[2] = ending with 'i'
# dp[3] = ending with 'o'
# dp[4] = ending with 'u'
dp=[1,1,1,1,1]
for i in range(2, n+1):
dp[4]+=dp[3]+dp[2]+... | 31.928571 | 47 | 0.420582 |
0b39dd832b852e80368cc29ffa3c1d0854d4609c | 2,832 | py | Python | Sender-SMS-master/Sms - Sender.py | Zusyaku/Termux-And-Lali-Linux-V2 | b1a1b0841d22d4bf2cc7932b72716d55f070871e | [
"Apache-2.0"
] | 2 | 2021-11-17T03:35:03.000Z | 2021-12-08T06:00:31.000Z | Sender-SMS-master/Sms - Sender.py | Zusyaku/Termux-And-Lali-Linux-V2 | b1a1b0841d22d4bf2cc7932b72716d55f070871e | [
"Apache-2.0"
] | null | null | null | Sender-SMS-master/Sms - Sender.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,time,sys,random
from colorama import *
from colorama import Fore, Back, init
from random import choice
init()
Red = '\033[91m'
Green = '\033[92m'
Grey = '\033[90m'
star = '\033[4m'
White = '\033[00m'
def logo():
clear = "\x1b[0m"
colors = [36, 32, 34, 35, 31, 37]
x = """
.------..-... | 31.120879 | 167 | 0.407486 |
e7e689a49721485406441a9a1d90f3282ded64af | 5,638 | py | Python | Packs/PrismaCloud/Integrations/RedLock/RedLock_test.py | diCagri/content | c532c50b213e6dddb8ae6a378d6d09198e08fc9f | [
"MIT"
] | 799 | 2016-08-02T06:43:14.000Z | 2022-03-31T11:10:11.000Z | Packs/PrismaCloud/Integrations/RedLock/RedLock_test.py | diCagri/content | c532c50b213e6dddb8ae6a378d6d09198e08fc9f | [
"MIT"
] | 9,317 | 2016-08-07T19:00:51.000Z | 2022-03-31T21:56:04.000Z | Packs/PrismaCloud/Integrations/RedLock/RedLock_test.py | diCagri/content | c532c50b213e6dddb8ae6a378d6d09198e08fc9f | [
"MIT"
] | 1,297 | 2016-08-04T13:59:00.000Z | 2022-03-31T23:43:06.000Z | import pytest
from freezegun import freeze_time
import demistomock as demisto
integration_params = {
'url': 'http://test.com',
'credentials': {'identifier': 'test', 'password': 'pass'},
'fetch_time': '3 days',
'proxy': 'false',
'unsecure': 'false',
}
@pytest.fixture(autouse=True)
def set_mocks(m... | 40.561151 | 120 | 0.51951 |
f03e5046e239325db513623981c2b1c2de1ebf12 | 5,708 | py | Python | pytgt/tgt_ctrl.py | lihuiba/SoftSAN | 1b8ab2cae92b7aac34211909b27d4ebe595275d7 | [
"Apache-2.0"
] | 1 | 2015-08-02T09:53:18.000Z | 2015-08-02T09:53:18.000Z | pytgt/tgt_ctrl.py | lihuiba/SoftSAN | 1b8ab2cae92b7aac34211909b27d4ebe595275d7 | [
"Apache-2.0"
] | null | null | null | pytgt/tgt_ctrl.py | lihuiba/SoftSAN | 1b8ab2cae92b7aac34211909b27d4ebe595275d7 | [
"Apache-2.0"
] | 2 | 2018-03-21T04:59:50.000Z | 2019-12-03T15:54:17.000Z | #/usr/sbin/
from objects_tgt import *
from process_call import *
import re, logging
def buildArguments(mode, op, **kwargs):
ret=["tgtadm", "--lld", "iscsi", "--mode", mode, "--op", op]
for key in kwargs:
if len(key)>1:
skey='--'+key
else:
skey='-'+key
ret.append(skey)
ret.append(str(kwargs[key]))
retu... | 30.688172 | 118 | 0.673791 |
e8f9502ea6260c830dcca983b6ea7716dda728da | 355 | py | Python | frappe-bench/apps/erpnext/erpnext/patches/v4_2/default_website_style.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/v4_2/default_website_style.py | Semicheche/foa_frappe_docker | a186b65d5e807dd4caf049e8aeb3620a799c1225 | [
"MIT"
] | null | null | null | frappe-bench/apps/erpnext/erpnext/patches/v4_2/default_website_style.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():
return
# frappe.reload_doc('website', 'doctype', 'style_settings')
# style_settings = frappe.get_doc("Style Settings", "Style Settings")
# if not style_settings.apply_style:
# style_settings.update(default_properties)
# style_settings.apply_s... | 29.583333 | 70 | 0.769014 |
33206904d6dbbca6b17a2b81b039c93aa2bda541 | 1,431 | py | Python | frappe-bench/apps/erpnext/erpnext/non_profit/doctype/chapter/chapter.py | Semicheche/foa_frappe_docker | a186b65d5e807dd4caf049e8aeb3620a799c1225 | [
"MIT"
] | null | null | null | frappe-bench/apps/erpnext/erpnext/non_profit/doctype/chapter/chapter.py | Semicheche/foa_frappe_docker | a186b65d5e807dd4caf049e8aeb3620a799c1225 | [
"MIT"
] | null | null | null | frappe-bench/apps/erpnext/erpnext/non_profit/doctype/chapter/chapter.py | Semicheche/foa_frappe_docker | a186b65d5e807dd4caf049e8aeb3620a799c1225 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
# Copyright (c) 2017, Frappe Technologies Pvt. Ltd. and contributors
# For license information, please see license.txt
from __future__ import unicode_literals
import frappe
from frappe.website.website_generator import WebsiteGenerator
class Chapter(WebsiteGenerator):
_website = frappe._dict(
... | 28.62 | 68 | 0.74703 |
f0f00e4541fd688c6765bde90b3833c595dd1285 | 1,317 | py | Python | ACM Training/2018-03-18/test.py | Wycers/Codelib | 86d83787aa577b8f2d66b5410e73102411c45e46 | [
"MIT"
] | 22 | 2018-08-07T06:55:10.000Z | 2021-06-12T02:12:19.000Z | ACM Training/2018-03-18/test.py | Wycers/Codelib | 86d83787aa577b8f2d66b5410e73102411c45e46 | [
"MIT"
] | 28 | 2020-03-04T23:47:22.000Z | 2022-02-26T18:50:00.000Z | ACM Training/2018-03-18/test.py | Wycers/Codelib | 86d83787aa577b8f2d66b5410e73102411c45e46 | [
"MIT"
] | 4 | 2019-11-09T15:41:26.000Z | 2021-10-10T08:56:57.000Z | def dfs(a):
sum = 0
for i in a:
sum += i
if sum == 0:
return 0
child = []
b = a[:]
for j in range(0, a[0]):
b[0] = j
#print(b, dfs(b))
x = dfs(b)
if x not in child:
child.append(x)
for i in range(1, len(a)):
b = a[... | 21.590164 | 74 | 0.370539 |
9bf60a3c7405739d73a52748abb94ca6c674996e | 647 | py | Python | Dockerfiles/gedlab-khmer-filter-abund/pymodules/python2.7/lib/python/bx_python-0.7.1-py2.7-linux-x86_64.egg/EGG-INFO/scripts/tfloc_summary.py | poojavade/Genomics_Docker | 829b5094bba18bbe03ae97daf925fee40a8476e8 | [
"Apache-2.0"
] | 1 | 2019-07-29T02:53:51.000Z | 2019-07-29T02:53:51.000Z | Dockerfiles/gedlab-khmer-filter-abund/pymodules/python2.7/lib/python/bx_python-0.7.1-py2.7-linux-x86_64.egg/EGG-INFO/scripts/tfloc_summary.py | poojavade/Genomics_Docker | 829b5094bba18bbe03ae97daf925fee40a8476e8 | [
"Apache-2.0"
] | 1 | 2021-09-11T14:30:32.000Z | 2021-09-11T14:30:32.000Z | Dockerfiles/gedlab-khmer-filter-abund/pymodules/python2.7/lib/python/bx_python-0.7.1-py2.7-linux-x86_64.egg/EGG-INFO/scripts/tfloc_summary.py | poojavade/Genomics_Docker | 829b5094bba18bbe03ae97daf925fee40a8476e8 | [
"Apache-2.0"
] | 2 | 2016-12-19T02:27:46.000Z | 2019-07-29T02:53:54.000Z | #!/usr/bin/python2.7
"""
Read TFLOC output from stdin and write out a summary in which the nth line
contains the number of sites found in the nth alignment of the input.
TODO: This is very special case, should it be here?
"""
import sys
counts = dict()
max_index = -1
for line in sys.stdin:
if line[0].isdigit... | 23.107143 | 75 | 0.629057 |
acc293187126a6d1b11ac16b873c2872b432ef92 | 573 | py | Python | domain/Bird.py | MusicMemory/Ornithology_1.0 | 08ded140908ecc393218705fd588ceaf91e6b2c0 | [
"Apache-2.0"
] | null | null | null | domain/Bird.py | MusicMemory/Ornithology_1.0 | 08ded140908ecc393218705fd588ceaf91e6b2c0 | [
"Apache-2.0"
] | null | null | null | domain/Bird.py | MusicMemory/Ornithology_1.0 | 08ded140908ecc393218705fd588ceaf91e6b2c0 | [
"Apache-2.0"
] | null | null | null | class Bird:
def __init__(self, filename, name, order, difficulty):
self.__filename = filename
self.__name = name
self.__order = order
self.__difficulty = int(difficulty)
def get_filename(self):
return self.__filename
def get_name(self):
return self.__name
... | 26.045455 | 105 | 0.612565 |
a8b7c48747eafd5765b350bd66c656adc95d401f | 429 | py | Python | hypercut/urlcut/migrations/0003_auto_20200606_1307.py | UnoYakshi/HyperCut | dc1dc2ad4383b69d2833e94f205959e5fe079971 | [
"MIT"
] | null | null | null | hypercut/urlcut/migrations/0003_auto_20200606_1307.py | UnoYakshi/HyperCut | dc1dc2ad4383b69d2833e94f205959e5fe079971 | [
"MIT"
] | 5 | 2021-03-30T13:49:59.000Z | 2021-09-22T19:19:10.000Z | hypercut/urlcut/migrations/0003_auto_20200606_1307.py | UnoYakshi/HyperCut | dc1dc2ad4383b69d2833e94f205959e5fe079971 | [
"MIT"
] | null | null | null | # Generated by Django 3.0.7 on 2020-06-06 13:07
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('urlcut', '0002_auto_20200606_0530'),
]
operations = [
migrations.AlterField(
model_name='urlpair',
name='short_url',... | 22.578947 | 90 | 0.613054 |
8b2336594de4ed058b856314fbea2dbb8454d48a | 20,860 | py | Python | ARMTool.py | MaliziaGrimm/Lohnvorerfassung-50a-fuer-DATEV | 41b99deacc5bfee6562907de109a8ad5af917d01 | [
"MIT"
] | null | null | null | ARMTool.py | MaliziaGrimm/Lohnvorerfassung-50a-fuer-DATEV | 41b99deacc5bfee6562907de109a8ad5af917d01 | [
"MIT"
] | null | null | null | ARMTool.py | MaliziaGrimm/Lohnvorerfassung-50a-fuer-DATEV | 41b99deacc5bfee6562907de109a8ad5af917d01 | [
"MIT"
] | null | null | null | from flask import Flask
from flask import request
import os, webbrowser, time, csv, requests
from flask import render_template
import setting, set_basisdaten, exportmodul, importmodul
import personen, funktionen, datenbank_obj
import numpy as np
from flask_sqlalchemy import SQLAlchemy
from sqlalchemy import... | 48.852459 | 444 | 0.703931 |
8ca60e2c137bf31b70f63cd02365a2d23c02954f | 6,786 | py | Python | src/onegov/server/application.py | politbuero-kampagnen/onegov-cloud | 20148bf321b71f617b64376fe7249b2b9b9c4aa9 | [
"MIT"
] | null | null | null | src/onegov/server/application.py | politbuero-kampagnen/onegov-cloud | 20148bf321b71f617b64376fe7249b2b9b9c4aa9 | [
"MIT"
] | null | null | null | src/onegov/server/application.py | politbuero-kampagnen/onegov-cloud | 20148bf321b71f617b64376fe7249b2b9b9c4aa9 | [
"MIT"
] | null | null | null | import re
from onegov.server import errors
class Application(object):
""" WSGI applications inheriting from this class can be served by
onegov.server.
"""
#: If the host passed by the request is not localhost, then it is
#: checked against the allowed_hosts expression. If it doesn't match,
... | 35.528796 | 79 | 0.637784 |
508afba734099f776e4139634750557bc689144c | 35,138 | py | Python | large_vocab_adt_dafx2018/model.py | mcartwright/dafx2018_adt | 057ac6b1e39cd0c80554d52535cc9d88b6316c74 | [
"BSD-2-Clause"
] | 6 | 2019-02-28T05:43:58.000Z | 2021-03-02T17:05:13.000Z | large_vocab_adt_dafx2018/model.py | mcartwright/dafx2018_adt | 057ac6b1e39cd0c80554d52535cc9d88b6316c74 | [
"BSD-2-Clause"
] | null | null | null | large_vocab_adt_dafx2018/model.py | mcartwright/dafx2018_adt | 057ac6b1e39cd0c80554d52535cc9d88b6316c74 | [
"BSD-2-Clause"
] | 1 | 2020-02-07T17:10:40.000Z | 2020-02-07T17:10:40.000Z | #!/usr/bin/env python
# -*- coding: utf-8 -*-
import os
import sys
from keras.layers import Input, BatchNormalization, Concatenate, Conv2D, Activation, Dropout, Reshape, Lambda, \
Bidirectional, LSTM, TimeDistributed, Dense, GRU, SimpleRNN, MaxPooling2D
from keras.models import Model, load_model
from keras.optimi... | 42.799026 | 159 | 0.558825 |
0fa313625fd8ab7cd4a681e2c4220ee40a9141d0 | 4,388 | py | Python | library/core/utils.py | ptphp/PtServer | d590360f853a64e989ba52591548b8a67390f27c | [
"BSD-3-Clause"
] | 1 | 2017-08-09T23:15:15.000Z | 2017-08-09T23:15:15.000Z | library/core/utils.py | ptphp/PtServer | d590360f853a64e989ba52591548b8a67390f27c | [
"BSD-3-Clause"
] | null | null | null | library/core/utils.py | ptphp/PtServer | d590360f853a64e989ba52591548b8a67390f27c | [
"BSD-3-Clause"
] | null | null | null | from PySide.QtUiTools import QUiLoader
from PySide.QtCore import *
from PySide.QtGui import *
import datetime
import simplejson as json
import zipfile,os,shutil
def rmtree(dir):
if os.path.exists(dir):
shutil.rmtree(dir)
class UiLoader(QUiLoader):
def __init__(self, baseinstance):
QUiLoader.__... | 28.679739 | 91 | 0.574521 |
ba0600cdb5567370bd44ad1913f6a8dbb1d7da2a | 4,867 | py | Python | haas_lib_bundles/python/docs/examples/home_intrusion_alarm/esp32/code/main.py | wstong999/AliOS-Things | 6554769cb5b797e28a30a4aa89b3f4cb2ef2f5d9 | [
"Apache-2.0"
] | null | null | null | haas_lib_bundles/python/docs/examples/home_intrusion_alarm/esp32/code/main.py | wstong999/AliOS-Things | 6554769cb5b797e28a30a4aa89b3f4cb2ef2f5d9 | [
"Apache-2.0"
] | null | null | null | haas_lib_bundles/python/docs/examples/home_intrusion_alarm/esp32/code/main.py | wstong999/AliOS-Things | 6554769cb5b797e28a30a4aa89b3f4cb2ef2f5d9 | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/env python3
# -*- encoding: utf-8 -*-
'''
@File : main.py
@Author : guoliang.wgl
@version : 1.0
@Description: home_intrusion_alarm案例 - 家庭红外入侵检测和报警系统
board.json - 硬件资源配置文件
'''
from buzzer import BUZZER
from ir import IR
from driver import PWM,GPIO
import time
from a... | 27.971264 | 111 | 0.650092 |
e8b9266dc145e4ec02ec20185f0484a1dfbd3d76 | 383 | py | Python | Algorithms/Implementation/Stones.py | baby5/HackerRank | 1e68a85f40499adb9b52a4da16936f85ac231233 | [
"MIT"
] | null | null | null | Algorithms/Implementation/Stones.py | baby5/HackerRank | 1e68a85f40499adb9b52a4da16936f85ac231233 | [
"MIT"
] | null | null | null | Algorithms/Implementation/Stones.py | baby5/HackerRank | 1e68a85f40499adb9b52a4da16936f85ac231233 | [
"MIT"
] | null | null | null | #coding:utf-8
T = int(raw_input())
for _ in xrange(T):
n, a, b = (int(raw_input()) for _ in xrange(3))
if a == b:
print a*(n-1)
continue
i = n-1
array = []
a, b = min(a, b), max(a, b)
while i >= 0:
store = 0
store += i*a
store += (n-1-i)*b
arra... | 16.652174 | 51 | 0.438642 |
e8cbebc841841a8eb7c95f534370f1722bb0ec1c | 2,359 | py | Python | profil/admin.py | AndiBr/ffksk | ff4bc4ad26d4571eaa1a6ff815b2e6a876f8ba99 | [
"MIT"
] | null | null | null | profil/admin.py | AndiBr/ffksk | ff4bc4ad26d4571eaa1a6ff815b2e6a876f8ba99 | [
"MIT"
] | 14 | 2018-09-12T06:59:55.000Z | 2020-02-26T07:17:48.000Z | profil/admin.py | AndiBr/ffksk | ff4bc4ad26d4571eaa1a6ff815b2e6a876f8ba99 | [
"MIT"
] | null | null | null | from django.contrib import admin
from django.contrib.auth.admin import UserAdmin
from django.contrib.auth.forms import UserChangeForm
from django.utils.translation import ugettext_lazy as _
from .models import KioskUser
# Base Form for the flexUserAdmin
class MyUserChangeForm(UserChangeForm):
class Meta(UserChangeF... | 36.292308 | 142 | 0.718101 |
d726d90a7d88d5c784d722fb4403cbb8e12183c4 | 3,128 | py | Python | easyp2p/platforms/iuvo.py | Ceystyle/easyp2p | 99c32e3ec0ff5a34733f157dd1b53d1aa9bc9edc | [
"MIT"
] | 4 | 2019-07-18T10:58:28.000Z | 2021-11-18T16:57:45.000Z | easyp2p/platforms/iuvo.py | Ceystyle/easyp2p | 99c32e3ec0ff5a34733f157dd1b53d1aa9bc9edc | [
"MIT"
] | 1 | 2019-07-05T09:21:47.000Z | 2019-07-05T09:21:47.000Z | easyp2p/platforms/iuvo.py | Ceystyle/easyp2p | 99c32e3ec0ff5a34733f157dd1b53d1aa9bc9edc | [
"MIT"
] | 2 | 2019-07-05T08:56:34.000Z | 2020-06-09T10:03:42.000Z | # Copyright (c) 2018-2020 Niko Sandschneider
"""
Download and parse Iuvo statement.
"""
from bs4 import BeautifulSoup
from selenium.webdriver.common.by import By
from easyp2p.p2p_parser import P2PParser
from easyp2p.p2p_webdriver import P2PWebDriver
from easyp2p.platforms.base_platform import BasePlatform
class ... | 35.146067 | 78 | 0.665601 |
ad247f179d99bbd94370a40d9237e1f321633549 | 3,512 | py | Python | utest/prim3d_test.py | Spiritdude/zencad | 4e63b1a6306dd235f4daa2791b10249f7546c95b | [
"MIT"
] | null | null | null | utest/prim3d_test.py | Spiritdude/zencad | 4e63b1a6306dd235f4daa2791b10249f7546c95b | [
"MIT"
] | null | null | null | utest/prim3d_test.py | Spiritdude/zencad | 4e63b1a6306dd235f4daa2791b10249f7546c95b | [
"MIT"
] | null | null | null | import unittest
import zencad
import evalcache
from functools import cmp_to_key
def lexsort(a):
a = evalcache.unlazy_if_need(a)
def comparator(a, b):
return 1 if a > b else -1
return sorted(a, key=cmp_to_key(comparator))
class Prim3dprobe(unittest.TestCase):
def setUp(self):
zenca... | 34.097087 | 79 | 0.619305 |
ad396410a86d250e8755716cba1168129f19a522 | 413 | py | Python | src/Sephrasto/Talentbox.py | qeqar/Sephrasto | ce46d46299b2c793f015e25c98908773c39b1dee | [
"MIT"
] | 1 | 2022-02-02T16:15:59.000Z | 2022-02-02T16:15:59.000Z | src/Sephrasto/Talentbox.py | qeqar/Sephrasto | ce46d46299b2c793f015e25c98908773c39b1dee | [
"MIT"
] | 1 | 2022-01-14T11:04:19.000Z | 2022-01-14T11:04:19.000Z | src/Sephrasto/Talentbox.py | qeqar/Sephrasto | ce46d46299b2c793f015e25c98908773c39b1dee | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
"""
Created on Sun Nov 19 18:14:28 2017
@author: Lennart
"""
class Talentbox(object):
def __init__(self):
self.na = ''
self.se = ''
self.pw = 0
self.vo = ''
self.re = ''
self.wd = ''
self.ko = ''
self.groupFert = None
... | 19.666667 | 39 | 0.472155 |
a8f9b29f8368287e51bc1d8b6d791311b2fe09e3 | 3,137 | py | Python | text_processing_python/german_tagging.py | timgrohmann/exWM | 6553485eaec02af2f53aa0b4681c6c5e62666fb9 | [
"MIT"
] | 7 | 2018-12-07T10:45:05.000Z | 2020-02-14T08:47:42.000Z | text_processing_python/german_tagging.py | timgrohmann/exWM | 6553485eaec02af2f53aa0b4681c6c5e62666fb9 | [
"MIT"
] | 57 | 2019-03-19T09:59:10.000Z | 2022-02-26T10:03:29.000Z | text_processing_python/german_tagging.py | timgrohmann/exWM | 6553485eaec02af2f53aa0b4681c6c5e62666fb9 | [
"MIT"
] | 2 | 2018-12-07T10:17:26.000Z | 2018-12-07T11:02:23.000Z | import nltk
import tarfile
import random
import pickle
import math
import operator
train = False
test = False
if train:
from ClassifierBasedGermanTagger.ClassifierBasedGermanTagger import ClassifierBasedGermanTagger
corp = nltk.corpus.ConllCorpusReader('.', 'tiger_release_aug07.corrected.16012013.conll09',
... | 33.37234 | 110 | 0.585273 |
d17241c45dcb307112b6bda656255b851ce7dad3 | 538 | py | Python | common/models/food/WxShareHistory.py | yao6891/FlaskOrdering | cbd24bd8d95afaba91ce4d6b1b3548c4e82e3807 | [
"Apache-2.0"
] | 2 | 2019-06-10T08:57:47.000Z | 2021-06-12T16:22:15.000Z | common/models/food/WxShareHistory.py | yao6891/FlaskOrdering | cbd24bd8d95afaba91ce4d6b1b3548c4e82e3807 | [
"Apache-2.0"
] | null | null | null | common/models/food/WxShareHistory.py | yao6891/FlaskOrdering | cbd24bd8d95afaba91ce4d6b1b3548c4e82e3807 | [
"Apache-2.0"
] | null | null | null | # coding: utf-8
from sqlalchemy import Column, DateTime, Integer, String
from sqlalchemy.schema import FetchedValue
from application import db
class WxShareHistory(db.Model):
__tablename__ = 'wx_share_history'
id = db.Column(db.Integer, primary_key=True)
member_id = db.Column(db.Integer, nullable=False, ... | 38.428571 | 91 | 0.769517 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.