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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
a38513356bc61c05a247cfb29b862c285d8b49ad | 5,371 | py | Python | Tools-DDOS-master/trojan32.py | Zusyaku/Termux-And-Lali-Linux-V2 | b1a1b0841d22d4bf2cc7932b72716d55f070871e | [
"Apache-2.0"
] | 2 | 2021-11-17T03:35:03.000Z | 2021-12-08T06:00:31.000Z | Tools-DDOS-master/trojan32.py | Zusyaku/Termux-And-Lali-Linux-V2 | b1a1b0841d22d4bf2cc7932b72716d55f070871e | [
"Apache-2.0"
] | null | null | null | Tools-DDOS-master/trojan32.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/python3
# -*- coding: utf-8 -*-
# python 3.3.2+ Hammer Dos Script v.1
# by Can Yalçın
# only for legal purpose
from queue import Queue
from optparse import OptionParser
import time,sys,socket,threading,logging,urllib.request,random
def user_agent():
global uagent
uagent=[]
uagent.append... | 29.510989 | 159 | 0.603426 |
42f718828909a0c14d0af43d7fac9dc9cfb91ee7 | 154 | py | Python | src/ztc/pgsql/__init__.py | magistersart/ZTC_fork | ce72734ea575d9846b5b81f3efbfd14fa1f7e532 | [
"PostgreSQL"
] | null | null | null | src/ztc/pgsql/__init__.py | magistersart/ZTC_fork | ce72734ea575d9846b5b81f3efbfd14fa1f7e532 | [
"PostgreSQL"
] | null | null | null | src/ztc/pgsql/__init__.py | magistersart/ZTC_fork | ce72734ea575d9846b5b81f3efbfd14fa1f7e532 | [
"PostgreSQL"
] | null | null | null | #!/usr/bin/env python
"""
ZTC pgsql package
Used in PostgreSQL-related templates
Copyright (c) 2010-2011 Vladimir Rusinov <vladimir@greenmice.info>
"""
| 17.111111 | 66 | 0.753247 |
95e7ffd8a8a6979eeff5920698b0ffb65f657db7 | 9,270 | py | Python | docker/api/api/update_data.py | healthIMIS/aha-kompass | 7b7cae24502c0c0e5635c587cfef797a93ae02b5 | [
"MIT"
] | 2 | 2021-03-23T20:32:38.000Z | 2021-04-21T11:20:12.000Z | docker/api/api/update_data.py | healthIMIS/aha-kompass | 7b7cae24502c0c0e5635c587cfef797a93ae02b5 | [
"MIT"
] | 4 | 2021-04-19T11:00:55.000Z | 2021-04-20T08:21:48.000Z | docker/api/api/update_data.py | healthIMIS/aha-kompass | 7b7cae24502c0c0e5635c587cfef797a93ae02b5 | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
# Corona-Info-App
# Database init script
# © 2020 Tobias Höpp
# Include utilities
import urllib
import json
from sqlalchemy import and_
import bs4
import visvalingamwyatt as vw
# Include db connection
from main import db, api
# Include models
from models.districts import districts, updateDistr... | 45 | 231 | 0.514995 |
95fb25b7119ba5651617aa8abf9f611fc2231876 | 1,565 | py | Python | src/Sephrasto/Objekte.py | qeqar/Sephrasto | ce46d46299b2c793f015e25c98908773c39b1dee | [
"MIT"
] | 15 | 2017-11-09T12:49:52.000Z | 2022-03-06T12:18:48.000Z | src/Sephrasto/Objekte.py | qeqar/Sephrasto | ce46d46299b2c793f015e25c98908773c39b1dee | [
"MIT"
] | 40 | 2018-02-01T21:32:01.000Z | 2022-03-22T11:35:28.000Z | src/Sephrasto/Objekte.py | qeqar/Sephrasto | ce46d46299b2c793f015e25c98908773c39b1dee | [
"MIT"
] | 13 | 2018-03-12T17:50:42.000Z | 2022-03-06T12:21:41.000Z | '''
In dieser Datei werden Waffen und Rüstungen definiert.
'''
class Objekt():
def __init__(self):
self.name = ''
self.text = ''
self.isUserAdded = True
def __eq__(self, other) :
if self.__class__ != other.__class__: return False
return self.__dict__ == other.__dict__
... | 24.453125 | 58 | 0.553994 |
2563b7c00d4014666b1d1a4b2d67186b089a83f2 | 4,068 | py | Python | research/recommend/Fat-DeepFFM/src/callback.py | leelige/mindspore | 5199e05ba3888963473f2b07da3f7bca5b9ef6dc | [
"Apache-2.0"
] | 77 | 2021-10-15T08:32:37.000Z | 2022-03-30T13:09:11.000Z | research/recommend/Fat-DeepFFM/src/callback.py | leelige/mindspore | 5199e05ba3888963473f2b07da3f7bca5b9ef6dc | [
"Apache-2.0"
] | 3 | 2021-10-30T14:44:57.000Z | 2022-02-14T06:57:57.000Z | research/recommend/Fat-DeepFFM/src/callback.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... | 39.882353 | 116 | 0.644051 |
b08650dd4a96f128bba7d36dbed11fbc57a05f6a | 1,196 | py | Python | src/onegov/core/orm/mixins/timestamp.py | politbuero-kampagnen/onegov-cloud | 20148bf321b71f617b64376fe7249b2b9b9c4aa9 | [
"MIT"
] | null | null | null | src/onegov/core/orm/mixins/timestamp.py | politbuero-kampagnen/onegov-cloud | 20148bf321b71f617b64376fe7249b2b9b9c4aa9 | [
"MIT"
] | null | null | null | src/onegov/core/orm/mixins/timestamp.py | politbuero-kampagnen/onegov-cloud | 20148bf321b71f617b64376fe7249b2b9b9c4aa9 | [
"MIT"
] | null | null | null | from onegov.core.orm.types import UTCDateTime
from sedate import utcnow
from sqlalchemy.ext.declarative import declared_attr
from sqlalchemy import func
from sqlalchemy.orm import deferred
from sqlalchemy.schema import Column
from sqlalchemy.ext.hybrid import hybrid_property
class TimestampMixin(object):
""" Mixi... | 28.47619 | 79 | 0.7199 |
9feb13c59e349f686527304014be87671c7f3170 | 543 | py | Python | PlaidCTF/2020/misc/BonziScheme/app/bonzi/errors.py | mystickev/ctf-archives | 89e99a5cd5fb6b2923cad3fe1948d3ff78649b4e | [
"MIT"
] | 1 | 2021-11-02T20:53:58.000Z | 2021-11-02T20:53:58.000Z | PlaidCTF/2020/misc/BonziScheme/app/bonzi/errors.py | ruhan-islam/ctf-archives | 8c2bf6a608c821314d1a1cfaa05a6cccef8e3103 | [
"MIT"
] | null | null | null | PlaidCTF/2020/misc/BonziScheme/app/bonzi/errors.py | ruhan-islam/ctf-archives | 8c2bf6a608c821314d1a1cfaa05a6cccef8e3103 | [
"MIT"
] | 1 | 2021-12-19T11:06:24.000Z | 2021-12-19T11:06:24.000Z | from flask import render_template, redirect, url_for
from bonzi import app
from bonzi.acsparse import ACSParseException
from bonzi.forms import ACSSubmitForm
from werkzeug.exceptions import RequestEntityTooLarge
@app.errorhandler(404)
def page_not_found(error):
return render_template("error.html", message=... | 36.2 | 98 | 0.780847 |
c6b9f0e2b3c9bdcef35a157f89012538b03728aa | 140 | py | Python | solutions/pic_search/webserver/src/encoder/utils.py | naetimus/bootcamp | 0182992df7c54012944b51fe9b70532ab6a0059b | [
"Apache-2.0"
] | 1 | 2021-01-11T18:40:22.000Z | 2021-01-11T18:40:22.000Z | solutions/pic_search/webserver/src/encoder/utils.py | naetimus/bootcamp | 0182992df7c54012944b51fe9b70532ab6a0059b | [
"Apache-2.0"
] | null | null | null | solutions/pic_search/webserver/src/encoder/utils.py | naetimus/bootcamp | 0182992df7c54012944b51fe9b70532ab6a0059b | [
"Apache-2.0"
] | null | null | null | import os
def get_imlist(path):
return [os.path.join(path, f) for f in os.listdir(path) if (f.endswith('.jpg') or f.endswith('.png'))]
| 28 | 106 | 0.664286 |
05a5d025b7094d53524250c33ffda6948d9f087d | 11,462 | py | Python | code/concept/pfse.py | lcordier/pfse | 27db9329d12bc804fa322446c14c59fe8f814264 | [
"MIT"
] | null | null | null | code/concept/pfse.py | lcordier/pfse | 27db9329d12bc804fa322446c14c59fe8f814264 | [
"MIT"
] | null | null | null | code/concept/pfse.py | lcordier/pfse | 27db9329d12bc804fa322446c14c59fe8f814264 | [
"MIT"
] | null | null | null | #!/usr/bin/env python
"""
Pretty Frecking Strong Encryption
Author: Louis Cordier <lcordier@gmail.com>
Copyright: (c) 2009, All rights reserved.
Last Modified: 2009-10-20
This program focuses on the key distribution problem of one-time pads.
Instead of distributing a key we distribute... | 32.01676 | 112 | 0.498081 |
05aedf82136ced267298c03fcfb55205352a344b | 5,823 | py | Python | prep/preprocess-archaeology.py | Empythy/geometry-learning | 5300d421ef848c2748a2ba41ced5c6e2fba93200 | [
"MIT"
] | 21 | 2018-10-09T08:15:29.000Z | 2022-03-16T08:23:08.000Z | prep/preprocess-archaeology.py | reinvantveer/Topology-Learning | 5300d421ef848c2748a2ba41ced5c6e2fba93200 | [
"MIT"
] | 31 | 2017-09-20T13:30:37.000Z | 2018-03-01T13:24:58.000Z | prep/preprocess-archaeology.py | reinvantveer/Topology-Learning | 5300d421ef848c2748a2ba41ced5c6e2fba93200 | [
"MIT"
] | 7 | 2018-11-29T11:39:02.000Z | 2022-01-12T07:10:26.000Z | """
Preprocessing script to convert well-known-text geometries to matrix representations thereof.
With a SANE_NUMBER_OF_POINTS set to 2048, it simplifies only 248
"""
import collections
import os
from datetime import timedelta
from time import time
from zipfile import ZipFile
import matplotlib.pyplot as plt
import nu... | 39.612245 | 117 | 0.707539 |
05dd0f12c2880991322a04feae21e8703a79ce2a | 1,307 | py | Python | datediff.py | raiever/abtest | ff14f20ad23d2a0710e95d23e3d1124a44298a62 | [
"Apache-2.0"
] | null | null | null | datediff.py | raiever/abtest | ff14f20ad23d2a0710e95d23e3d1124a44298a62 | [
"Apache-2.0"
] | null | null | null | datediff.py | raiever/abtest | ff14f20ad23d2a0710e95d23e3d1124a44298a62 | [
"Apache-2.0"
] | null | null | null | import sqlalchemy
from sqlalchemy import create_engine
import pandas as pd
import matplotlib.pyplot as plt
import seaborn as sns
def convert_datetype(df):
df['conversion_date'] = pd.to_datetime(df['conversion_date'], format='%Y-%m-%d')
df['activity_date'] = pd.to_datetime(df['activity_date'], format='%Y-%m-%d... | 38.441176 | 121 | 0.68707 |
59ea5aad5edccc50f033c790195fda228ff58d2a | 1,619 | py | Python | src/data_science/tests/test_data_transfer.py | viclule/api_models_deployment_framework | 7595cf0b4f3e277925b968014102d7561547bcd4 | [
"MIT"
] | null | null | null | src/data_science/tests/test_data_transfer.py | viclule/api_models_deployment_framework | 7595cf0b4f3e277925b968014102d7561547bcd4 | [
"MIT"
] | null | null | null | src/data_science/tests/test_data_transfer.py | viclule/api_models_deployment_framework | 7595cf0b4f3e277925b968014102d7561547bcd4 | [
"MIT"
] | null | null | null | import unittest
from data_science.data_transfer.data_api import Data_API, Dataset, Dataseries
from secret import PASSWORD_DATA_API, USERNAME_DATA_API
class DataTransferTest(unittest.TestCase):
def test_get_access_data_api(self):
data_API = Data_API(USERNAME_DATA_API,
PASSWORD_... | 31.745098 | 77 | 0.530574 |
058fb32ca6fe4865ab0b21e8f68a5ecc7d860118 | 3,381 | py | Python | genutil/sharepoint_helper.py | MZH-bust/genutil | f17190ec484d5844f8950908cc07556a5b1429e7 | [
"MIT"
] | null | null | null | genutil/sharepoint_helper.py | MZH-bust/genutil | f17190ec484d5844f8950908cc07556a5b1429e7 | [
"MIT"
] | null | null | null | genutil/sharepoint_helper.py | MZH-bust/genutil | f17190ec484d5844f8950908cc07556a5b1429e7 | [
"MIT"
] | null | null | null | """Dieses Modul stellt Hilfsfunktionen zur Arbeit mit Daten aus Sharepoint zur Verfügung"""
import re
class SpFieldText:
"""
Die Klasse stellt Möglichkeiten zur Verarbeitung von Informationen in Sharepoint Feldern bereit.
z.B. Entfernen der Identifier aus dem Text oder Extraktion einer Liste der Identifi... | 33.81 | 118 | 0.609583 |
dddae800112d0c66055c4bd25aec2f36b1f44f9e | 576 | py | Python | Hackerrank_problems/Summing_n_series/solution.py | gbrls/CompetitiveCode | b6f1b817a655635c3c843d40bd05793406fea9c6 | [
"MIT"
] | 165 | 2020-10-03T08:01:11.000Z | 2022-03-31T02:42:08.000Z | Hackerrank_problems/Summing_n_series/solution.py | gbrls/CompetitiveCode | b6f1b817a655635c3c843d40bd05793406fea9c6 | [
"MIT"
] | 383 | 2020-10-03T07:39:11.000Z | 2021-11-20T07:06:35.000Z | Hackerrank_problems/Summing_n_series/solution.py | gbrls/CompetitiveCode | b6f1b817a655635c3c843d40bd05793406fea9c6 | [
"MIT"
] | 380 | 2020-10-03T08:05:04.000Z | 2022-03-19T06:56:59.000Z | #!/bin/python3
import os
import sys
def summingSeries(n):
"""
the formula it's self if tn = n^2 - (n-1)^2
sn = t1+ t2 + ... + tn
but if we look it closely we can make a shortcut by
just returning the last n^2
next it's said that it's needed to be mod(10^9 + 7)
"""
return (n**2)%... | 19.2 | 56 | 0.548611 |
fd26293ff66c018674c8bc7c517f7cb59295829b | 9,485 | py | Python | tests/onegov/election_day/views/test_views_notifications.py | politbuero-kampagnen/onegov-cloud | 20148bf321b71f617b64376fe7249b2b9b9c4aa9 | [
"MIT"
] | null | null | null | tests/onegov/election_day/views/test_views_notifications.py | politbuero-kampagnen/onegov-cloud | 20148bf321b71f617b64376fe7249b2b9b9c4aa9 | [
"MIT"
] | null | null | null | tests/onegov/election_day/views/test_views_notifications.py | politbuero-kampagnen/onegov-cloud | 20148bf321b71f617b64376fe7249b2b9b9c4aa9 | [
"MIT"
] | null | null | null | import os
from datetime import date
from tests.onegov.election_day.common import login
from tests.onegov.election_day.common import upload_majorz_election
from tests.onegov.election_day.common import upload_vote
from webtest import TestApp as Client
def test_view_notifications_votes(election_day_app):
client = C... | 35.260223 | 79 | 0.692673 |
c0a9e5eb5bc1d0a90a1657612b237531fbb8e934 | 992 | py | Python | frappe-bench/apps/erpnext/erpnext/patches/v10_0/fix_reserved_qty_for_sub_contract.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/v10_0/fix_reserved_qty_for_sub_contract.py | Semicheche/foa_frappe_docker | a186b65d5e807dd4caf049e8aeb3620a799c1225 | [
"MIT"
] | null | null | null | frappe-bench/apps/erpnext/erpnext/patches/v10_0/fix_reserved_qty_for_sub_contract.py | Semicheche/foa_frappe_docker | a186b65d5e807dd4caf049e8aeb3620a799c1225 | [
"MIT"
] | 1 | 2021-04-29T14:39:01.000Z | 2021-04-29T14:39:01.000Z | # Copyright (c) 2017, Frappe and Contributors
# License: GNU General Public License v3. See license.txt
from __future__ import unicode_literals
import frappe
from erpnext.stock.utils import get_bin
def execute():
frappe.reload_doc("stock", "doctype", "bin")
frappe.reload_doc("buying", "doctype", "purchase_order_ite... | 31 | 86 | 0.746976 |
c0b00168c999875cf5cb905dbddf9e4545f6b363 | 4,339 | py | Python | src/onegov/server/tracker.py | politbuero-kampagnen/onegov-cloud | 20148bf321b71f617b64376fe7249b2b9b9c4aa9 | [
"MIT"
] | null | null | null | src/onegov/server/tracker.py | politbuero-kampagnen/onegov-cloud | 20148bf321b71f617b64376fe7249b2b9b9c4aa9 | [
"MIT"
] | null | null | null | src/onegov/server/tracker.py | politbuero-kampagnen/onegov-cloud | 20148bf321b71f617b64376fe7249b2b9b9c4aa9 | [
"MIT"
] | null | null | null | import gc
import os
import tracemalloc
def current_memory_usage():
import psutil # only installed in development
return psutil.Process(os.getpid()).memory_info().rss
class ResourceTracker(object):
""" An object to track memory and other resources during development. """
tracking_tools = (
... | 27.814103 | 77 | 0.555658 |
c0b1b0291a9d605e728ce3c00a5641d7cd9ab047 | 26,602 | py | Python | Dockerfiles/gedlab-khmer-filter-abund/pymodules/python2.7/lib/python/pybedtools-0.7.6-py2.7-linux-x86_64.egg/pybedtools/genome_registry.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/pybedtools-0.7.6-py2.7-linux-x86_64.egg/pybedtools/genome_registry.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/pybedtools-0.7.6-py2.7-linux-x86_64.egg/pybedtools/genome_registry.py | poojavade/Genomics_Docker | 829b5094bba18bbe03ae97daf925fee40a8476e8 | [
"Apache-2.0"
] | 2 | 2016-12-19T02:27:46.000Z | 2019-07-29T02:53:54.000Z | """
Chromsize dictionaries, as downloaded from UCSC. Need more? Use::
pybedtools.get_chromsizes_from_ucsc('assemblyname')
"""
# Figure out which version of OrderedDict we want....
import sys
if (sys.version_info[0] == 2) and (sys.version_info[1] < 7):
from ordereddict import OrderedDict
else:
from collec... | 36.441096 | 66 | 0.588903 |
8d07161295a0ff031a0e5f7e00bdbc5dc22fc43e | 3,607 | py | Python | cryptoauthlib/python/cryptoauthlib/status.py | PhillyNJ/SAMD21 | 0f123422ed0ad183d510add8f5d3472a16f1e8cb | [
"MIT"
] | 12 | 2017-11-15T08:29:03.000Z | 2021-05-22T04:57:20.000Z | cryptoauthlib/python/cryptoauthlib/status.py | PhillyNJ/SAMD21 | 0f123422ed0ad183d510add8f5d3472a16f1e8cb | [
"MIT"
] | 2 | 2019-09-22T12:02:07.000Z | 2021-09-09T22:38:25.000Z | cryptoauthlib/python/cryptoauthlib/status.py | PhillyNJ/SAMD21 | 0f123422ed0ad183d510add8f5d3472a16f1e8cb | [
"MIT"
] | 5 | 2019-04-05T13:46:44.000Z | 2020-11-25T08:58:32.000Z | """
Status codes and status to exception conversions.
"""
from enum import Enum
class Status(Enum):
"""
Status.ATCA_SUCCESS] Success
Status.ATCA_CONFIG_ZONE_LOCKED Config Zone Locked
Status.ATCA_DATA_ZONE_LOCKED Configuration Enabled
Status.ATCA_WAKE_FAILED response status byte indicates CheckMa... | 49.410959 | 169 | 0.770169 |
9e8b01fd30ba3a5671e8ba52ff7849e0f11c165c | 10,741 | py | Python | RDS/circle3_central_services/token_storage/tests/server/test_oauth_workflow.py | Sciebo-RDS/Sciebo-RDS | d71cf449ed045a2a7a049e2cb77c99fd5a9195bd | [
"MIT"
] | 10 | 2020-06-24T08:22:24.000Z | 2022-01-13T16:17:36.000Z | RDS/circle3_central_services/token_storage/tests/server/test_oauth_workflow.py | Sciebo-RDS/Sciebo-RDS | d71cf449ed045a2a7a049e2cb77c99fd5a9195bd | [
"MIT"
] | 78 | 2020-01-23T14:32:06.000Z | 2022-03-07T14:11:16.000Z | RDS/circle3_central_services/token_storage/tests/server/test_oauth_workflow.py | Sciebo-RDS/Sciebo-RDS | d71cf449ed045a2a7a049e2cb77c99fd5a9195bd | [
"MIT"
] | 1 | 2020-06-24T08:33:48.000Z | 2020-06-24T08:33:48.000Z | from time import sleep
import unittest
import os
import json
from unittest.case import TestCase
import requests
import logging
from datetime import datetime, timedelta
from RDS import User, OAuth2Service, Token, OAuth2Token
from RDS.Util import initialize_object_from_json
from lib.Storage import Storage
from selenium i... | 35.448845 | 208 | 0.571641 |
9eb6d4d5a648e70cbdcea848d7f03b043c3e30f6 | 10,754 | py | Python | kafka/cruise-control/cruise-control-client/cruisecontrolclient/client/cccli.py | smthkissinger/docker-images | 35e868295d04fa780325ada4168381f1e80e8fe4 | [
"BSD-3-Clause"
] | 2,177 | 2017-08-28T15:07:01.000Z | 2022-03-30T11:06:01.000Z | kafka/cruise-control/cruise-control-client/cruisecontrolclient/client/cccli.py | smthkissinger/docker-images | 35e868295d04fa780325ada4168381f1e80e8fe4 | [
"BSD-3-Clause"
] | 1,079 | 2017-08-30T07:25:06.000Z | 2022-03-31T17:49:07.000Z | kafka/cruise-control/cruise-control-client/cruisecontrolclient/client/cccli.py | smthkissinger/docker-images | 35e868295d04fa780325ada4168381f1e80e8fe4 | [
"BSD-3-Clause"
] | 489 | 2017-08-28T16:17:03.000Z | 2022-03-31T15:52:18.000Z | #!/usr/bin/env python3
# Copyright 2019 LinkedIn Corp. Licensed under the BSD 2-Clause License (the "License").
# See License in the project root for license information.
# To be able to easily parse command-line arguments
import argparse
# To be able to easily pass around the available endpoints and parameters
from... | 46.554113 | 118 | 0.673982 |
7b503ceda8aa4396f70a2988d02a59f910a46db9 | 770 | py | Python | main_page/urls.py | EE/flexdb | 08a80b9e56201e678ef055af27bdefa6d52bcbf5 | [
"MIT"
] | null | null | null | main_page/urls.py | EE/flexdb | 08a80b9e56201e678ef055af27bdefa6d52bcbf5 | [
"MIT"
] | null | null | null | main_page/urls.py | EE/flexdb | 08a80b9e56201e678ef055af27bdefa6d52bcbf5 | [
"MIT"
] | null | null | null | from django.conf.urls import patterns, include, url
from main_page.views import Index, logout_view, ModalError
from django.views.decorators.csrf import ensure_csrf_cookie
# Uncomment the next two lines to enable the admin:
from django.contrib import admin
admin.autodiscover()
urlpatterns = patterns('',
# Examples... | 33.478261 | 71 | 0.711688 |
cdc652e29045b1284ec6ad4703c42e4c71225b81 | 5,253 | py | Python | Kapitel_6/_E2_LifetimeMeta.py | Geralonx/Classes_Tutorial | 9499db8159efce1e3c38975b66a9c649631c6727 | [
"MIT"
] | 1 | 2020-12-24T15:42:54.000Z | 2020-12-24T15:42:54.000Z | Kapitel_6/_E2_LifetimeMeta.py | Geralonx/Classes_Tutorial | 9499db8159efce1e3c38975b66a9c649631c6727 | [
"MIT"
] | null | null | null | Kapitel_6/_E2_LifetimeMeta.py | Geralonx/Classes_Tutorial | 9499db8159efce1e3c38975b66a9c649631c6727 | [
"MIT"
] | null | null | null | """
Eine Klasse, welche die 'LifetimeMeta' Klasse als Metaklasse verwendet,
startet bei der Instanziierung eines Objekts einen Thread, welcher das Objekt
nach Ablauf der Lebenszeit wieder entfernt. Außerdem stell die Metaklasse
sicher, dass die benötigten Attribute, in diesem Fall das Klassenattribut
'_lifetime', vo... | 42.707317 | 150 | 0.63716 |
a998fc8ec9fde3217144939e9368591e72e38871 | 8,647 | py | Python | vector.py | lixianyu/DL | 4cf08b2cc8a5478af38c1b00d765548efe396392 | [
"MIT"
] | null | null | null | vector.py | lixianyu/DL | 4cf08b2cc8a5478af38c1b00d765548efe396392 | [
"MIT"
] | null | null | null | vector.py | lixianyu/DL | 4cf08b2cc8a5478af38c1b00d765548efe396392 | [
"MIT"
] | null | null | null | from decimal import Decimal, getcontext
from math import sqrt, acos, pi
getcontext().prec = 13
class Vector(object):
CANNOT_NORMALIZE_ZERO_VECTOR_MSG = 'Cannot normalize the zero vector'
NO_UNIQUE_PARALLEL_COMPONENT_MSG = 'There is no parallel component'
NO_UNIQUE_ORTHOGONAL_COMPONENT_MSG = 'There is no o... | 34.450199 | 105 | 0.590494 |
93d8ad271538452741e7b6fdbf58c707003e8d98 | 16,658 | py | Python | tools/pythonpkg/tests/fast/arrow/test_filter_pushdown.py | AldoMyrtaj/duckdb | 3aa4978a2ceab8df25e4b20c388bcd7629de73ed | [
"MIT"
] | 2,816 | 2018-06-26T18:52:52.000Z | 2021-04-06T10:39:15.000Z | tools/pythonpkg/tests/fast/arrow/test_filter_pushdown.py | AldoMyrtaj/duckdb | 3aa4978a2ceab8df25e4b20c388bcd7629de73ed | [
"MIT"
] | 1,310 | 2021-04-06T16:04:52.000Z | 2022-03-31T13:52:53.000Z | tools/pythonpkg/tests/fast/arrow/test_filter_pushdown.py | AldoMyrtaj/duckdb | 3aa4978a2ceab8df25e4b20c388bcd7629de73ed | [
"MIT"
] | 270 | 2021-04-09T06:18:28.000Z | 2022-03-31T11:55:37.000Z | import duckdb
import os
import pytest
import tempfile
try:
import pyarrow as pa
import pyarrow.parquet as pq
import pyarrow.dataset as ds
import numpy as np
import pandas as pd
import re
can_run = True
except:
can_run = False
## DuckDB connection used in this test
duckdb_conn = duckdb.c... | 50.024024 | 286 | 0.632429 |
f5834533ce7baad1fdbbbb5bc49fe7bbb664189e | 555 | py | Python | pacman-arch/test/pacman/tests/sync901.py | Maxython/pacman-for-termux | 3b208eb9274cbfc7a27fca673ea8a58f09ebad47 | [
"MIT"
] | 23 | 2021-05-21T19:11:06.000Z | 2022-03-31T18:14:20.000Z | source/pacman-6.0.1/test/pacman/tests/sync901.py | Scottx86-64/dotfiles-1 | 51004b1e2b032664cce6b553d2052757c286087d | [
"Unlicense"
] | 11 | 2021-05-21T12:08:44.000Z | 2021-12-21T08:30:08.000Z | source/pacman-6.0.1/test/pacman/tests/sync901.py | Scottx86-64/dotfiles-1 | 51004b1e2b032664cce6b553d2052757c286087d | [
"Unlicense"
] | 1 | 2021-09-26T08:44:40.000Z | 2021-09-26T08:44:40.000Z | self.description = "Replace a package providing package with actual package"
sp = pmpkg("foo")
self.addpkg2db("sync", sp)
lp = pmpkg("bar")
lp.provides = ["foo"]
lp.conflicts = ["foo"]
self.addpkg2db("local", lp)
lp1 = pmpkg("pkg1")
lp1.depends = ["foo"]
self.addpkg2db("local", lp1)
lp2 = pmpkg("pkg2")
lp2.depends ... | 21.346154 | 76 | 0.686486 |
19746dd0914c63552e691ab20be08e8a05e29788 | 862 | py | Python | Python/Exercícios_Python/043_analisando_triângulos_v2.py | vdonoladev/aprendendo-programacao | 83abbcd6701b2105903b28fd549738863418cfb8 | [
"MIT"
] | null | null | null | Python/Exercícios_Python/043_analisando_triângulos_v2.py | vdonoladev/aprendendo-programacao | 83abbcd6701b2105903b28fd549738863418cfb8 | [
"MIT"
] | null | null | null | Python/Exercícios_Python/043_analisando_triângulos_v2.py | vdonoladev/aprendendo-programacao | 83abbcd6701b2105903b28fd549738863418cfb8 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
"""043 - Analisando Triângulos v2
Automatically generated by Colaboratory.
Original file is located at
https://colab.research.google.com/drive/1ft2Yssbhnrj6XzDgMoT7scaFPBXYMOMw
"""
n1 = int(input("insira o primeiro valor: "))
n2 = int(input("insira o segundo valor: "))
n3 = int(input("ins... | 30.785714 | 78 | 0.653132 |
47fab7d9a10006eb8f3d24ef73e753101b6b90d6 | 794 | py | Python | main_script.py | Beanarny/Praca_inz | 38f843af8deeb1f1be6c77b553cfdcc4ad2a7c00 | [
"MIT"
] | null | null | null | main_script.py | Beanarny/Praca_inz | 38f843af8deeb1f1be6c77b553cfdcc4ad2a7c00 | [
"MIT"
] | null | null | null | main_script.py | Beanarny/Praca_inz | 38f843af8deeb1f1be6c77b553cfdcc4ad2a7c00 | [
"MIT"
] | null | null | null | import mysql.connector
import serial
# przeniesc haslo do bazy i
mydb = mysql.connector.connect(
host="localhost",
user="root",
passwd="123",
database="users"
)
ser = serial.Serial("COM6", 9600) # open serial port that Arduino is using
mycursor = mydb.cursor()
mycursor.execute("USE users") ... | 27.37931 | 78 | 0.654912 |
7bd5648566dca32cbcdcd72008025335b2137f0e | 1,273 | py | Python | main.py | KR-16/Flask | b996c16378690d46a2e17d5c382aa78ec504e4ff | [
"MIT"
] | null | null | null | main.py | KR-16/Flask | b996c16378690d46a2e17d5c382aa78ec504e4ff | [
"MIT"
] | null | null | null | main.py | KR-16/Flask | b996c16378690d46a2e17d5c382aa78ec504e4ff | [
"MIT"
] | null | null | null | from flask import Flask,redirect,url_for,render_template,request
import numpy as np
app = Flask(__name__)
@app.route("/")
def welcome():
return render_template("score_page.html")
@app.route("/fail/<int:score>")
def fail(score):
result = ""
if score >= 50:
result = "PASS"
else:
... | 27.673913 | 65 | 0.597015 |
5604689ade61ab466af691a257635c65bbbdb1b4 | 1,127 | py | Python | LoremPizzum/orders/migrations/0003_auto_20210404_2144.py | BruhMano/LoremPizzum | 8909a9f21ea2878cf9accf035989edbd15c3d285 | [
"BSD-3-Clause"
] | null | null | null | LoremPizzum/orders/migrations/0003_auto_20210404_2144.py | BruhMano/LoremPizzum | 8909a9f21ea2878cf9accf035989edbd15c3d285 | [
"BSD-3-Clause"
] | null | null | null | LoremPizzum/orders/migrations/0003_auto_20210404_2144.py | BruhMano/LoremPizzum | 8909a9f21ea2878cf9accf035989edbd15c3d285 | [
"BSD-3-Clause"
] | null | null | null | # Generated by Django 3.1.6 on 2021-04-04 17:44
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('orders', '0002_remove_order_postal_code'),
]
operations = [
migrations.AlterField(
model_name='order',
name='address... | 28.897436 | 77 | 0.574091 |
ef0a31165b7927f73b8f521029d3fe9988a9b037 | 1,206 | py | Python | BugTracker-main/models.py | Zusyaku/Termux-And-Lali-Linux-V2 | b1a1b0841d22d4bf2cc7932b72716d55f070871e | [
"Apache-2.0"
] | 2 | 2021-11-17T03:35:03.000Z | 2021-12-08T06:00:31.000Z | BugTracker-main/models.py | Zusyaku/Termux-And-Lali-Linux-V2 | b1a1b0841d22d4bf2cc7932b72716d55f070871e | [
"Apache-2.0"
] | null | null | null | BugTracker-main/models.py | Zusyaku/Termux-And-Lali-Linux-V2 | b1a1b0841d22d4bf2cc7932b72716d55f070871e | [
"Apache-2.0"
] | 2 | 2021-11-05T18:07:48.000Z | 2022-02-24T21:25:07.000Z | from flask_sqlalchemy import SQLAlchemy
from config import app
from datetime import datetime
db = SQLAlchemy(app)
# Models
class bug_report(db.Model):
# These are the database columns, where the data gets stored and read from
_id = db.Column("id", db.Integer, primary_key=True)
reporter_name = db.Column("... | 38.903226 | 104 | 0.697347 |
08b1ee702b50bee23f11b88c26d1cc95129e5509 | 377 | py | Python | lintcode/000-394-Coins-in-a-Line/CoinsinaLine_002.py | cc13ny/all-in | bc0b01e44e121ea68724da16f25f7e24386c53de | [
"MIT"
] | 1 | 2015-12-16T04:01:03.000Z | 2015-12-16T04:01:03.000Z | lintcode/000-394-Coins-in-a-Line/CoinsinaLine_002.py | cc13ny/all-in | bc0b01e44e121ea68724da16f25f7e24386c53de | [
"MIT"
] | 1 | 2016-02-09T06:00:07.000Z | 2016-02-09T07:20:13.000Z | lintcode/000-394-Coins-in-a-Line/CoinsinaLine_002.py | cc13ny/all-in | bc0b01e44e121ea68724da16f25f7e24386c53de | [
"MIT"
] | 2 | 2019-06-27T09:07:26.000Z | 2019-07-01T04:40:13.000Z | class Solution:
# @param n: an integer
# @return: a boolean which equals to True if the first player will win
def firstWillWin(self, n):
# write your code here
dp = [False] * 3
cur = 0
for i in xrange(n):
dp[-1] = not (dp[0] and dp[1])
dp[cur] = dp[-1... | 25.133333 | 74 | 0.488064 |
08d8576e404279e1d1e3d512d216b0662fa3c916 | 2,637 | py | Python | oldp/apps/cases/processing/case_processor.py | ImgBotApp/oldp | 575dc6f711dde3470d910e21c9440ee9b79a69ed | [
"MIT"
] | 3 | 2020-06-27T08:19:35.000Z | 2020-12-27T17:46:02.000Z | oldp/apps/cases/processing/case_processor.py | ImgBotApp/oldp | 575dc6f711dde3470d910e21c9440ee9b79a69ed | [
"MIT"
] | null | null | null | oldp/apps/cases/processing/case_processor.py | ImgBotApp/oldp | 575dc6f711dde3470d910e21c9440ee9b79a69ed | [
"MIT"
] | null | null | null | import os
from django.core.exceptions import ValidationError
from django.db import IntegrityError, DataError, OperationalError
from oldp.apps.backend.processing.content_processor import ContentProcessor, InputHandler, InputHandlerFS
from oldp.apps.cases.models import *
from oldp.apps.references.models import CaseRefe... | 29.3 | 105 | 0.661358 |
de2c5b890eb2848947c6d9ab5b83a044d89e1035 | 5,640 | py | Python | Python/MLP_with_numpy.py | 595666666/tripping | f448300c31de96089b855ee9774068d748b0cd31 | [
"BSD-3-Clause"
] | 3 | 2021-06-04T06:07:12.000Z | 2022-03-05T16:03:16.000Z | Python/MLP_with_numpy.py | 595666666/tripping | f448300c31de96089b855ee9774068d748b0cd31 | [
"BSD-3-Clause"
] | null | null | null | Python/MLP_with_numpy.py | 595666666/tripping | f448300c31de96089b855ee9774068d748b0cd31 | [
"BSD-3-Clause"
] | null | null | null | # Title : Multi Layer Perceptron
# Objective : Implementation of a multi-layer perceptron using numpy
# Created by: Wu Shangbin
# Created on: 2021/11/6
import numpy as np
class MLPnet:
def __init__(self, x, y, lr=0.003):
"""
:param x: data
:param y: labels
:param lr: learning ... | 32.413793 | 108 | 0.548936 |
de6ffc3476fbce0f665730331800bdbeb640acff | 2,230 | py | Python | Co-Simulation/Sumo/sumo-1.7.0/tools/detector/filterFlows.py | uruzahe/carla | 940c2ab23cce1eda1ef66de35f66b42d40865fb1 | [
"MIT"
] | 4 | 2020-11-13T02:35:56.000Z | 2021-03-29T20:15:54.000Z | Co-Simulation/Sumo/sumo-1.7.0/tools/detector/filterFlows.py | uruzahe/carla | 940c2ab23cce1eda1ef66de35f66b42d40865fb1 | [
"MIT"
] | 9 | 2020-12-09T02:12:39.000Z | 2021-02-18T00:15:28.000Z | Co-Simulation/Sumo/sumo-1.7.0/tools/detector/filterFlows.py | uruzahe/carla | 940c2ab23cce1eda1ef66de35f66b42d40865fb1 | [
"MIT"
] | 1 | 2020-11-20T19:31:26.000Z | 2020-11-20T19:31:26.000Z | #!/usr/bin/env python
# Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo
# Copyright (C) 2013-2020 German Aerospace Center (DLR) and others.
# This program and the accompanying materials are made available under the
# terms of the Eclipse Public License 2.0 which is available at
# https://www.ec... | 41.296296 | 106 | 0.690583 |
deb16edfb9788b19d470edb3e898ae36c8d5a735 | 345 | py | Python | comp/yelp/onsite2/MinCoinNum_rec_bruteforce.py | cc13ny/all-in | bc0b01e44e121ea68724da16f25f7e24386c53de | [
"MIT"
] | 1 | 2016-04-07T15:08:53.000Z | 2016-04-07T15:08:53.000Z | comp/yelp/onsite2/MinCoinNum_rec_bruteforce.py | cc13ny/all-in | bc0b01e44e121ea68724da16f25f7e24386c53de | [
"MIT"
] | 1 | 2016-02-09T06:00:07.000Z | 2016-02-09T07:20:13.000Z | comp/yelp/onsite2/MinCoinNum_rec_bruteforce.py | cc13ny/all-in | bc0b01e44e121ea68724da16f25f7e24386c53de | [
"MIT"
] | 2 | 2019-06-27T09:07:26.000Z | 2019-07-01T04:40:13.000Z | # Think about how to improved based on this basis
def mincoin(coins, target):
coins.sort()
cnt = target
for coin in coins:
if target - coin >= 0:
tmp = 1 + mincoin(coins, target - coin)
if cnt > tmp:
cnt = tmp
else:
break
return cnt
... | 19.166667 | 51 | 0.515942 |
7201e3865d0f11be2f29475beee263998b7cf714 | 106 | pyde | Python | sketches/videotest/videotest.pyde | kantel/processingpy | 74aae222e46f68d1c8f06307aaede3cdae65c8ec | [
"MIT"
] | 4 | 2018-06-03T02:11:46.000Z | 2021-08-18T19:55:15.000Z | sketches/videotest/videotest.pyde | kantel/processingpy | 74aae222e46f68d1c8f06307aaede3cdae65c8ec | [
"MIT"
] | null | null | null | sketches/videotest/videotest.pyde | kantel/processingpy | 74aae222e46f68d1c8f06307aaede3cdae65c8ec | [
"MIT"
] | 3 | 2019-12-23T19:12:51.000Z | 2021-04-30T14:00:31.000Z | def setup():
size(400, 400)
def draw():
fill(200, 200, 0)
circle(width/2, width/2, 200)
| 13.25 | 33 | 0.537736 |
9d127abca57bdde7803b1be933305b13738012a0 | 860 | py | Python | Beginner/03. Python/BubbleSort.py | ankita080208/Hacktoberfest | 2be849e89285260e7b6672f42979943ad6bbec78 | [
"MIT"
] | 1 | 2021-10-04T05:41:43.000Z | 2021-10-04T05:41:43.000Z | Beginner/03. Python/BubbleSort.py | ankita080208/Hacktoberfest | 2be849e89285260e7b6672f42979943ad6bbec78 | [
"MIT"
] | null | null | null | Beginner/03. Python/BubbleSort.py | ankita080208/Hacktoberfest | 2be849e89285260e7b6672f42979943ad6bbec78 | [
"MIT"
] | null | null | null | #Bubble Sort
def bubbleSort(array):
#the outer loop will traverse through all the element starting from the 0th index to n-1
for i in range(0, len(array)-1):
#the inner loop will traverse through all elements except the last element as it is sorted and is in a fixed position
for j in range(0, le... | 47.777778 | 125 | 0.644186 |
9d1984d0f4741fe2124cac561be998f24ffbca99 | 1,772 | py | Python | Co-Simulation/Sumo/sumo-1.7.0/tools/traci/_junction.py | uruzahe/carla | 940c2ab23cce1eda1ef66de35f66b42d40865fb1 | [
"MIT"
] | 4 | 2020-11-13T02:35:56.000Z | 2021-03-29T20:15:54.000Z | Co-Simulation/Sumo/sumo-1.7.0/tools/traci/_junction.py | uruzahe/carla | 940c2ab23cce1eda1ef66de35f66b42d40865fb1 | [
"MIT"
] | 9 | 2020-12-09T02:12:39.000Z | 2021-02-18T00:15:28.000Z | Co-Simulation/Sumo/sumo-1.7.0/tools/traci/_junction.py | uruzahe/carla | 940c2ab23cce1eda1ef66de35f66b42d40865fb1 | [
"MIT"
] | 1 | 2020-11-20T19:31:26.000Z | 2020-11-20T19:31:26.000Z | # -*- coding: utf-8 -*-
# Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo
# Copyright (C) 2011-2020 German Aerospace Center (DLR) and others.
# This program and the accompanying materials are made available under the
# terms of the Eclipse Public License 2.0 which is available at
# https://www.... | 39.377778 | 101 | 0.721783 |
a0533027bedfa6cba4459977361d08b1c0a9c0de | 645 | py | Python | Python/EstruturaSequencial/Exercicio16.py | ekballo/Back-End | b252e3b2a16ce36486344823f14afa6691fde9bc | [
"MIT"
] | null | null | null | Python/EstruturaSequencial/Exercicio16.py | ekballo/Back-End | b252e3b2a16ce36486344823f14afa6691fde9bc | [
"MIT"
] | null | null | null | Python/EstruturaSequencial/Exercicio16.py | ekballo/Back-End | b252e3b2a16ce36486344823f14afa6691fde9bc | [
"MIT"
] | null | null | null | #Faça um programa para uma loja de tintas.
# O programa deverá pedir o tamanho em metros quadrados da área a ser pintada.
# Considere que a cobertura da tinta é de 1 litro para cada 3 metros quadrados
# e que a tinta é vendida em latas de 18 litros, que custam R$ 80,00.
# Informe ao usuário a quantidades de latas de... | 32.25 | 87 | 0.725581 |
a069e3a2c75477beffd79138a9775370ca1de802 | 693 | py | Python | Packs/CofenseTriage/Scripts/CofenseTriageThreatEnrichment/CofenseTriageThreatEnrichment_test.py | diCagri/content | c532c50b213e6dddb8ae6a378d6d09198e08fc9f | [
"MIT"
] | 799 | 2016-08-02T06:43:14.000Z | 2022-03-31T11:10:11.000Z | Packs/CofenseTriage/Scripts/CofenseTriageThreatEnrichment/CofenseTriageThreatEnrichment_test.py | diCagri/content | c532c50b213e6dddb8ae6a378d6d09198e08fc9f | [
"MIT"
] | 9,317 | 2016-08-07T19:00:51.000Z | 2022-03-31T21:56:04.000Z | Packs/CofenseTriage/Scripts/CofenseTriageThreatEnrichment/CofenseTriageThreatEnrichment_test.py | diCagri/content | c532c50b213e6dddb8ae6a378d6d09198e08fc9f | [
"MIT"
] | 1,297 | 2016-08-04T13:59:00.000Z | 2022-03-31T23:43:06.000Z | from unittest.mock import patch
import json
@patch('demistomock.executeCommand')
def test_get_threat_indicator_list_when_valid_response_is_returned(mock_execute_command):
"""
Test get_threat_indicator_list when command execution is successfull.
"""
from CofenseTriageThreatEnrichment import get_threat_... | 31.5 | 90 | 0.784993 |
26247aa963270c74496241611733fcb98154e9f5 | 8,674 | py | Python | tools/legacy/veh-parser/projectileInfo.py | gifted-nguvu/darkstar-dts-converter | aa17a751a9f3361ca9bbb400ee4c9516908d1297 | [
"MIT"
] | 2 | 2020-03-18T18:23:27.000Z | 2020-08-02T15:59:16.000Z | tools/legacy/veh-parser/projectileInfo.py | gifted-nguvu/darkstar-dts-converter | aa17a751a9f3361ca9bbb400ee4c9516908d1297 | [
"MIT"
] | 5 | 2019-07-07T16:47:47.000Z | 2020-08-10T16:20:00.000Z | tools/legacy/veh-parser/projectileInfo.py | gifted-nguvu/darkstar-dts-converter | aa17a751a9f3361ca9bbb400ee4c9516908d1297 | [
"MIT"
] | 1 | 2020-03-18T18:23:30.000Z | 2020-03-18T18:23:30.000Z | import parseFiles
from functools import partial
def createExecContext():
result = {
"projectiles": [],
"F": False,
"T": True,
"H": "heat",
"R": "radar",
"none": None,
"ART": "art",
"VIP": "vip",
"SPR": "spr",
"ARAC": "arac",
"P... | 43.808081 | 200 | 0.668665 |
f82e58f384e94c5a7706197ed21c2aecb4c61de7 | 1,362 | py | Python | evo_algorithm/ea_shapes/create_plots_polygon_test.py | MateRyze/InformatiCup-2019 | eeca3ff7f8a102f4093697c6badee21ce25e2e87 | [
"MIT"
] | 3 | 2019-03-21T17:02:55.000Z | 2019-04-04T18:16:10.000Z | evo_algorithm/ea_shapes/create_plots_polygon_test.py | MateRyze/InformatiCup-2019 | eeca3ff7f8a102f4093697c6badee21ce25e2e87 | [
"MIT"
] | 11 | 2019-10-30T12:05:39.000Z | 2022-03-11T23:43:54.000Z | evo_algorithm/ea_shapes/create_plots_polygon_test.py | MateRyze/InformatiCup-2019 | eeca3ff7f8a102f4093697c6badee21ce25e2e87 | [
"MIT"
] | 1 | 2019-10-30T12:04:00.000Z | 2019-10-30T12:04:00.000Z | import os
import glob
import json
import pandas
import matplotlib.pyplot as plt
import seaborn as sns
fname = "./stats/mutated-1-meta.csv"
record = pandas.read_csv(fname)
def plotConfidenceAgainstMutation():
sns.set()
ax = sns.scatterplot(x="confidence", y="mutation",
hue="classname",... | 30.954545 | 77 | 0.625551 |
084e176128c9e3fd8605f6e18e7ab382db0f4c7d | 69 | py | Python | launcher.py | danielbostock/bronzium_opener | 512ff1aedea54665130124d8c6da1b423a764291 | [
"MIT"
] | null | null | null | launcher.py | danielbostock/bronzium_opener | 512ff1aedea54665130124d8c6da1b423a764291 | [
"MIT"
] | null | null | null | launcher.py | danielbostock/bronzium_opener | 512ff1aedea54665130124d8c6da1b423a764291 | [
"MIT"
] | null | null | null | from bronzium_opener import bronzium_opener
bronzium_opener.opener() | 23 | 43 | 0.884058 |
085ac241eac4d2143624eafb2bdb2011396d0743 | 723 | py | Python | 766-toeplitz-matrix/766-toeplitz-matrix.py | hyeseonko/LeetCode | 48dfc93f1638e13041d8ce1420517a886abbdc77 | [
"MIT"
] | 2 | 2021-12-05T14:29:06.000Z | 2022-01-01T05:46:13.000Z | 766-toeplitz-matrix/766-toeplitz-matrix.py | hyeseonko/LeetCode | 48dfc93f1638e13041d8ce1420517a886abbdc77 | [
"MIT"
] | null | null | null | 766-toeplitz-matrix/766-toeplitz-matrix.py | hyeseonko/LeetCode | 48dfc93f1638e13041d8ce1420517a886abbdc77 | [
"MIT"
] | null | null | null | class Solution:
def isToeplitzMatrix(self, matrix: List[List[int]]) -> bool:
m = len(matrix)
n = len(matrix[0])
# starting point: column-wise [0, n)
for col in range(n):
num = matrix[0][col]
(r, c) = (0, col)
while(r<m and c<n):
if ... | 31.434783 | 64 | 0.388658 |
f22aa7e380c12cb35446c431734bc8d74d5d331f | 7,320 | py | Python | kicker_pong/Kicker_Model.py | GeorgJohn/kicker_pong_git | 2263737cab1f74f324772855028f8a4c3b23c4de | [
"MIT"
] | null | null | null | kicker_pong/Kicker_Model.py | GeorgJohn/kicker_pong_git | 2263737cab1f74f324772855028f8a4c3b23c4de | [
"MIT"
] | null | null | null | kicker_pong/Kicker_Model.py | GeorgJohn/kicker_pong_git | 2263737cab1f74f324772855028f8a4c3b23c4de | [
"MIT"
] | null | null | null | import math
from kicker_pong.Constant import *
class Kicker:
def __init__(self, time_delta):
self.__borderline_x_min = BALL_RADIUS
self.__borderline_x_max = COURT_WIDTH - BALL_RADIUS
self.__borderline_y_min = BALL_RADIUS
self.__borderline_y_max = COURT_HEIGHT - BALL_RADIUS
... | 56.307692 | 115 | 0.534973 |
4bc28347f71f16136dfe70cacc0236d626183771 | 3,252 | py | Python | execution/runspeedtest.py | bipulkkuri/webtestkit | eec1669800548b8ec6dd002eeec80a840a95b917 | [
"Apache-2.0"
] | 1 | 2022-02-24T04:31:29.000Z | 2022-02-24T04:31:29.000Z | execution/runspeedtest.py | CAIDA/webtestkit | bc725e79b804f1f38b31dcdf11af9436d69af03b | [
"Apache-2.0"
] | null | null | null | execution/runspeedtest.py | CAIDA/webtestkit | bc725e79b804f1f38b31dcdf11af9436d69af03b | [
"Apache-2.0"
] | null | null | null | # Adapted from control_nossh.pl
# Used to obtain IP addresses of speed test websites
import re, sys, os, time, subprocess
from subprocess import check_output
# predefined parameters
repeat = 20
rate_control = 1
eth0 = "ens5"
comcast_server = "portland"
ookla_server = "san_diego"
ookla_net = "scalematrix"
sometabin ... | 32.52 | 149 | 0.643604 |
29c85f63a799fa13a27580b89356ded5fc558ebd | 6,823 | py | Python | action-app_smallTalk.py | TnT1130/snipsSmallTalk_GER | c2ebccc3f7053e59bc0363adc7219604e447483d | [
"MIT"
] | 1 | 2019-08-02T03:06:44.000Z | 2019-08-02T03:06:44.000Z | action-app_smallTalk.py | TnT1130/snipsSmallTalk_GER | c2ebccc3f7053e59bc0363adc7219604e447483d | [
"MIT"
] | 1 | 2019-08-06T07:30:15.000Z | 2019-08-19T08:33:41.000Z | action-app_smallTalk.py | TnT1130/snipsSmallTalk_GER | c2ebccc3f7053e59bc0363adc7219604e447483d | [
"MIT"
] | 1 | 2019-10-06T15:09:54.000Z | 2019-10-06T15:09:54.000Z | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
from snipsTools import SnipsConfigParser
from xiSnipsTools import Personality
from hermes_python.ontology import *
from hermes_python.hermes import Hermes
from hermes_python.ontology import MqttOptions
from hermes_python.ontology.tts import RegisterSoundMessage
import io... | 38.767045 | 188 | 0.671112 |
d9bea35728dcf817b37a7f086a47c99a2fbc417c | 1,037 | py | Python | kurstag7_API_Scraping2/projekte/01 EZBscraper.py | Priskawa/kurstag2 | 028d5b07011d7ddc2b2416aa40b7f94dee134614 | [
"MIT"
] | null | null | null | kurstag7_API_Scraping2/projekte/01 EZBscraper.py | Priskawa/kurstag2 | 028d5b07011d7ddc2b2416aa40b7f94dee134614 | [
"MIT"
] | null | null | null | kurstag7_API_Scraping2/projekte/01 EZBscraper.py | Priskawa/kurstag2 | 028d5b07011d7ddc2b2416aa40b7f94dee134614 | [
"MIT"
] | null | null | null | import requests
from bs4 import BeautifulSoup
import pandas as pd
r = requests.get("https://www.ecb.europa.eu/home/html/index.en.html")
soup = BeautifulSoup(r.text, 'html.parser')
percentage = soup.find_all('td', {'class':'stats-table-percentage'})
title = soup.find_all('td', {'class':'stats-table-figure'})
percentag... | 38.407407 | 72 | 0.732883 |
8a4b54a4d22aefd838a452dcabfce68534c2d28b | 3,164 | py | Python | frappe-bench/env/lib/python2.7/site-packages/stdnum/ec/ruc.py | Semicheche/foa_frappe_docker | a186b65d5e807dd4caf049e8aeb3620a799c1225 | [
"MIT"
] | null | null | null | frappe-bench/env/lib/python2.7/site-packages/stdnum/ec/ruc.py | Semicheche/foa_frappe_docker | a186b65d5e807dd4caf049e8aeb3620a799c1225 | [
"MIT"
] | null | null | null | frappe-bench/env/lib/python2.7/site-packages/stdnum/ec/ruc.py | Semicheche/foa_frappe_docker | a186b65d5e807dd4caf049e8aeb3620a799c1225 | [
"MIT"
] | null | null | null | # ruc.py - functions for handling Ecuadorian fiscal numbers
# coding: utf-8
#
# Copyright (C) 2014 Jonathan Finlay
# Copyright (C) 2014-2015 Arthur de Jong
#
# This library is free software; you can redistribute it and/or
# modify it under the terms of the GNU Lesser General Public
# License as published by the Free So... | 33.659574 | 75 | 0.666561 |
0a3561798b4935365beba0c87b26177783ac5f62 | 5,858 | py | Python | exercises/networking_selfpaced/networking-workshop/collections/ansible_collections/community/general/plugins/modules/vexata_eg.py | tr3ck3r/linklight | 5060f624c235ecf46cb62cefcc6bddc6bf8ca3e7 | [
"MIT"
] | null | null | null | exercises/networking_selfpaced/networking-workshop/collections/ansible_collections/community/general/plugins/modules/vexata_eg.py | tr3ck3r/linklight | 5060f624c235ecf46cb62cefcc6bddc6bf8ca3e7 | [
"MIT"
] | null | null | null | exercises/networking_selfpaced/networking-workshop/collections/ansible_collections/community/general/plugins/modules/vexata_eg.py | tr3ck3r/linklight | 5060f624c235ecf46cb62cefcc6bddc6bf8ca3e7 | [
"MIT"
] | null | null | null | #!/usr/bin/python
# -*- coding: utf-8 -*-
# Copyright: (c) 2019, Sandeep Kasargod (sandeep@vexata.com)
# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
from __future__ import absolute_import, division, print_function
__metaclass__ = type
ANSIBLE_METADATA = {'metadata_vers... | 27.246512 | 92 | 0.611471 |
6aae700b546aa96c74b4e928e5ebf902b5acda8c | 92 | py | Python | 2015/03/donorschoose-perresident-table-20151715/graphic_config.py | nprapps/graphics-archive | 97b0ef326b46a959df930f5522d325e537f7a655 | [
"FSFAP"
] | 14 | 2015-05-08T13:41:51.000Z | 2021-02-24T12:34:55.000Z | 2015/03/donorschoose-perresident-table-20151715/graphic_config.py | nprapps/graphics-archive | 97b0ef326b46a959df930f5522d325e537f7a655 | [
"FSFAP"
] | null | null | null | 2015/03/donorschoose-perresident-table-20151715/graphic_config.py | nprapps/graphics-archive | 97b0ef326b46a959df930f5522d325e537f7a655 | [
"FSFAP"
] | 7 | 2015-04-04T04:45:54.000Z | 2021-02-18T11:12:48.000Z | #!/usr/bin/env python
COPY_GOOGLE_DOC_KEY = '1_onHw1BkwrmORdVsbqvlAoRpk1YNBhaVVVBKfcWZe4U'
| 23 | 68 | 0.847826 |
0a8b6387af2a7446c9f813f8e5b891175f3e7885 | 782 | py | Python | challenges/sameElementsNaive/python3/sameElementsNaive.py | jimmynguyen/codefights | f4924fcffdb4ff14930618bb1a781e4e02e9aa09 | [
"MIT"
] | 5 | 2020-05-21T03:02:34.000Z | 2021-09-06T04:24:26.000Z | challenges/sameElementsNaive/python3/sameElementsNaive.py | jimmynguyen/codefights | f4924fcffdb4ff14930618bb1a781e4e02e9aa09 | [
"MIT"
] | 6 | 2019-04-24T03:39:26.000Z | 2019-05-03T02:10:59.000Z | challenges/sameElementsNaive/python3/sameElementsNaive.py | jimmynguyen/codefights | f4924fcffdb4ff14930618bb1a781e4e02e9aa09 | [
"MIT"
] | 1 | 2021-09-06T04:24:27.000Z | 2021-09-06T04:24:27.000Z | def sameElementsNaive(a, b):
return len([x for x in a for y in b if x == y])
if __name__ == '__main__':
input0 = [[1, 2, 3], [1], [1, 2, 3]]
input1 = [[3, 4, 5], [2, 3, 4, 1], [2, 3, 4]]
expectedOutput = [1, 1, 2]
assert len(input0) == len(expectedOutput), '# input0 = {}, # expectedOutput = {}'.format(len(input0)... | 60.153846 | 132 | 0.648338 |
0aac5ae70fb2a275a6d609b859f6d97bcae930e8 | 974 | py | Python | exercises/de/test_02_07.py | tuanducdesign/spacy-course | f8d092c5fa2997fccb3f367d174dce8667932b3d | [
"MIT"
] | 2 | 2020-07-07T01:46:37.000Z | 2021-04-20T03:19:43.000Z | exercises/de/test_02_07.py | tuanducdesign/spacy-course | f8d092c5fa2997fccb3f367d174dce8667932b3d | [
"MIT"
] | null | null | null | exercises/de/test_02_07.py | tuanducdesign/spacy-course | f8d092c5fa2997fccb3f367d174dce8667932b3d | [
"MIT"
] | null | null | null | def test():
assert (
"token_texts" not in __solution__
), "Hast du die Variable token_texts gelöscht?"
assert "pos_tags" not in __solution__, "Hast du die Variable pos_tags gelöscht?"
assert (
"token.pos_ ==" in __solution__
), "Überprüfst du, ob die Wortart des Tokens ein Eigenname ... | 48.7 | 88 | 0.664271 |
0ac0dc461aa2436647f761f33bbc7169a283167e | 7,873 | py | Python | utils.py | CityU-AIM-Group/GFBS | d71361243f1bcf699e1a20b312b05fe0be4dfd6d | [
"MIT"
] | null | null | null | utils.py | CityU-AIM-Group/GFBS | d71361243f1bcf699e1a20b312b05fe0be4dfd6d | [
"MIT"
] | null | null | null | utils.py | CityU-AIM-Group/GFBS | d71361243f1bcf699e1a20b312b05fe0be4dfd6d | [
"MIT"
] | 1 | 2021-12-19T12:31:05.000Z | 2021-12-19T12:31:05.000Z | '''Some helper functions for PyTorch, including:
- get_mean_and_std: calculate the mean and std value of dataset.
- msr_init: net parameter initialization.
- progress_bar: progress bar mimic xlua.progress.
'''
import os
import sys
import time
import math
import torch.nn as nn
import torch.nn.init as init
... | 32.66805 | 178 | 0.614632 |
7c4b16d5aa42e5a56d056f965b7be2b1ef63dee6 | 320 | py | Python | frappe-bench/env/lib/python2.7/site-packages/woocommerce/__init__.py | Semicheche/foa_frappe_docker | a186b65d5e807dd4caf049e8aeb3620a799c1225 | [
"MIT"
] | null | null | null | frappe-bench/env/lib/python2.7/site-packages/woocommerce/__init__.py | Semicheche/foa_frappe_docker | a186b65d5e807dd4caf049e8aeb3620a799c1225 | [
"MIT"
] | null | null | null | frappe-bench/env/lib/python2.7/site-packages/woocommerce/__init__.py | Semicheche/foa_frappe_docker | a186b65d5e807dd4caf049e8aeb3620a799c1225 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
"""
woocommerce
~~~~~~~~~~~~~~~
A Python wrapper for WooCommerce API.
:copyright: (c) 2015 by WooThemes.
:license: MIT, see LICENSE for details.
"""
__title__ = "woocommerce"
__version__ = "1.2.1"
__author__ = "Claudio Sanches @ WooThemes"
__license__ = "MIT"
from woocommerce.api import API
| 17.777778 | 42 | 0.671875 |
be0ed764ebd75005c77d0cc12e7c37020c54a55b | 10,624 | py | Python | IGC/VectorCompiler/lib/GenXCodeGen/Utils/cisa_gen_intrinsics.py | bader/intel-graphics-compiler | 04f51dc2f3d5047f334da5cb5eebe568480622f5 | [
"MIT"
] | null | null | null | IGC/VectorCompiler/lib/GenXCodeGen/Utils/cisa_gen_intrinsics.py | bader/intel-graphics-compiler | 04f51dc2f3d5047f334da5cb5eebe568480622f5 | [
"MIT"
] | null | null | null | IGC/VectorCompiler/lib/GenXCodeGen/Utils/cisa_gen_intrinsics.py | bader/intel-graphics-compiler | 04f51dc2f3d5047f334da5cb5eebe568480622f5 | [
"MIT"
] | null | null | null | #!/usr/bin/python3
#=========================== begin_copyright_notice ============================
#
# Copyright (c) 2020-2021 Intel Corporation
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"),
# to deal in the Sof... | 40.242424 | 107 | 0.601186 |
07d8230126f834a6b72cd502e2517804c8af3df1 | 1,485 | py | Python | gemtown/gems/admin.py | doramong0926/gemtown | 2c39284e3c68f0cc11994bed0ee2abaad0ea06b6 | [
"MIT"
] | null | null | null | gemtown/gems/admin.py | doramong0926/gemtown | 2c39284e3c68f0cc11994bed0ee2abaad0ea06b6 | [
"MIT"
] | 5 | 2020-09-04T20:13:39.000Z | 2022-02-17T22:03:33.000Z | gemtown/gems/admin.py | doramong0926/gemtown | 2c39284e3c68f0cc11994bed0ee2abaad0ea06b6 | [
"MIT"
] | null | null | null | from django.contrib import admin
from . import models
@admin.register(models.PurchaseGem)
class PurchaseGemAdmin(admin.ModelAdmin):
fields = [
'creator',
'amount',
'purchase_type',
]
list_display = [
'id',
'amount',
'purchase_type',
... | 17.068966 | 44 | 0.478114 |
ed08b7c6b266cacd21d4290616614300ee2130b8 | 1,768 | py | Python | src/test/tests/simulation/ucdcurve.py | visit-dav/vis | c08bc6e538ecd7d30ddc6399ec3022b9e062127e | [
"BSD-3-Clause"
] | 226 | 2018-12-29T01:13:49.000Z | 2022-03-30T19:16:31.000Z | src/test/tests/simulation/ucdcurve.py | visit-dav/vis | c08bc6e538ecd7d30ddc6399ec3022b9e062127e | [
"BSD-3-Clause"
] | 5,100 | 2019-01-14T18:19:25.000Z | 2022-03-31T23:08:36.000Z | src/test/tests/simulation/ucdcurve.py | visit-dav/vis | c08bc6e538ecd7d30ddc6399ec3022b9e062127e | [
"BSD-3-Clause"
] | 84 | 2019-01-24T17:41:50.000Z | 2022-03-10T10:01:46.000Z | # ----------------------------------------------------------------------------
# CLASSES: nightly
#
# Test Case: ucdcurve.py
#
# Tests: libsim - connecting to simulation and retrieving data from it.
# mesh - ucdcurve
#
# Programmer: Kathleen Biagas
# Date: Jun 24, 2014
#
# Modification... | 24.555556 | 78 | 0.576357 |
9c55e9653bd6f5c956dee5b1219c46fb1d76bcc6 | 404 | py | Python | bot/app.py | YoshlikMedia/STT-uzbek-bot | fec5d6a7bec4135aeb35a86970193654637194f5 | [
"MIT"
] | null | null | null | bot/app.py | YoshlikMedia/STT-uzbek-bot | fec5d6a7bec4135aeb35a86970193654637194f5 | [
"MIT"
] | null | null | null | bot/app.py | YoshlikMedia/STT-uzbek-bot | fec5d6a7bec4135aeb35a86970193654637194f5 | [
"MIT"
] | null | null | null | from aiogram import executor
from bot.loader import dp
import middlewares, filters, handlers
from utils.notify_admins import on_startup_notify
from utils.set_bot_commands import set_default_commands
async def on_startup(dispatcher):
await set_default_commands(dispatcher)
await on_startup_notify(dispatcher)
... | 22.444444 | 55 | 0.816832 |
9c6ee69a23270cc2f945c681729fe953bf884b54 | 1,512 | py | Python | cbm/utils/init.py | CsabaWirnhardt/cbm | 1822addd72881057af34ac6a7c2a1f02ea511225 | [
"BSD-3-Clause"
] | 17 | 2021-01-18T07:27:01.000Z | 2022-03-10T12:26:21.000Z | cbm/utils/init.py | CsabaWirnhardt/cbm | 1822addd72881057af34ac6a7c2a1f02ea511225 | [
"BSD-3-Clause"
] | 4 | 2021-04-29T11:20:44.000Z | 2021-12-06T10:19:17.000Z | cbm/utils/init.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 os
import sys
from os.path import join, normcase, ... | 31.5 | 75 | 0.648148 |
92c0468dd3d4023173eaed6b729236a55e0b4756 | 4,851 | py | Python | 7-assets/past-student-repos/Data-Structures-Notes-master/BST_and_Heaps/bst_heaps.py | eengineergz/Lambda | 1fe511f7ef550aed998b75c18a432abf6ab41c5f | [
"MIT"
] | null | null | null | 7-assets/past-student-repos/Data-Structures-Notes-master/BST_and_Heaps/bst_heaps.py | eengineergz/Lambda | 1fe511f7ef550aed998b75c18a432abf6ab41c5f | [
"MIT"
] | null | null | null | 7-assets/past-student-repos/Data-Structures-Notes-master/BST_and_Heaps/bst_heaps.py | eengineergz/Lambda | 1fe511f7ef550aed998b75c18a432abf6ab41c5f | [
"MIT"
] | null | null | null | from doubly_linked_list import DoublyLinkedList
class TextBuffer:
# init gives us the option to initialize some text in the
# buffer right off the bat
def __init__(self, init=None):
self.contents = DoublyLinkedList()
# check if an init string is provided
# if so, put the contents ... | 30.898089 | 139 | 0.61142 |
92ea7f358e9ae31441dbfad9c0db2e0c6dfb8415 | 312 | py | Python | packages/watchmen-rest-doll/src/watchmen_rest_doll/admin/__init__.py | Indexical-Metrics-Measure-Advisory/watchmen | c54ec54d9f91034a38e51fd339ba66453d2c7a6d | [
"MIT"
] | null | null | null | packages/watchmen-rest-doll/src/watchmen_rest_doll/admin/__init__.py | Indexical-Metrics-Measure-Advisory/watchmen | c54ec54d9f91034a38e51fd339ba66453d2c7a6d | [
"MIT"
] | null | null | null | packages/watchmen-rest-doll/src/watchmen_rest_doll/admin/__init__.py | Indexical-Metrics-Measure-Advisory/watchmen | c54ec54d9f91034a38e51fd339ba66453d2c7a6d | [
"MIT"
] | null | null | null | from .pipeline_router import ask_save_pipeline_action
from .space_router import ask_save_space_action
from .topic_router import ask_save_topic_action
from .user_group_router import ask_save_user_group_action, sync_user_group_change, SyncUserGroupChangeWithIndicator
from .user_router import ask_save_user_action
| 52 | 115 | 0.907051 |
13964d9f21dc146e54018d4a8a2034e241a967f6 | 11,419 | py | Python | tests/test_utils.py | PlaidWeb/Publ | 67efc5e32bf25dbac72a83d1167de038b79db5a7 | [
"MIT"
] | 27 | 2018-11-30T21:32:26.000Z | 2022-03-20T19:46:25.000Z | tests/test_utils.py | PlaidWeb/Publ | 67efc5e32bf25dbac72a83d1167de038b79db5a7 | [
"MIT"
] | 249 | 2018-09-30T07:04:37.000Z | 2022-03-29T04:31:00.000Z | tests/test_utils.py | PlaidWeb/Publ | 67efc5e32bf25dbac72a83d1167de038b79db5a7 | [
"MIT"
] | 4 | 2019-03-01T06:46:13.000Z | 2019-06-30T17:45:46.000Z | """ tests of publ.utils module """
# pylint:disable=missing-function-docstring
import flask
import pytest
from publ import utils
class MockEntryTag:
""" mock class for EntryTags """
# pylint:disable=too-few-public-methods
def __init__(self, key, name):
self.key = key
self.name = name
... | 32.907781 | 99 | 0.5673 |
b9a100666779c35d15d7fcecb7d9cc25601da1ca | 4,430 | py | Python | Use Social Media API/twitter_api.py | Akshu-on-github/MLH-INIT-2022 | cf3fbbc8abd3eae3b958d3d482ed1fa1467f559e | [
"MIT"
] | 1 | 2021-07-05T14:30:34.000Z | 2021-07-05T14:30:34.000Z | Use Social Media API/twitter_api.py | Akshu-on-github/MLH-INIT-2022 | cf3fbbc8abd3eae3b958d3d482ed1fa1467f559e | [
"MIT"
] | 1 | 2021-07-02T15:36:02.000Z | 2021-07-02T15:37:25.000Z | Use Social Media API/twitter_api.py | Akshu-on-github/MLH-INIT-2022 | cf3fbbc8abd3eae3b958d3d482ed1fa1467f559e | [
"MIT"
] | 1 | 2021-07-02T15:15:17.000Z | 2021-07-02T15:15:17.000Z | #import necessary libraries
from google.colab import drive # to mount Google Drive to Colab notebook
import tweepy # Python wrapper around Twitter API
import pandas as pd
import csv
from datetime import date
from datetime import datetime
import time
# Mounting Google Drive
drive.mount('/content/gd... | 32.101449 | 89 | 0.699549 |
b9db8d1916d2ed04d4248625801d517fdf296954 | 415 | py | Python | deprecated/examples/ctr/args.py | hutuxian/FleetX | 843c7aa33f5a14680becf058a3aaf0327eefafd4 | [
"Apache-2.0"
] | 170 | 2020-08-12T12:07:01.000Z | 2022-03-07T02:38:26.000Z | deprecated/examples/ctr/args.py | hutuxian/FleetX | 843c7aa33f5a14680becf058a3aaf0327eefafd4 | [
"Apache-2.0"
] | 195 | 2020-08-13T03:22:15.000Z | 2022-03-30T07:40:25.000Z | deprecated/examples/ctr/args.py | hutuxian/FleetX | 843c7aa33f5a14680becf058a3aaf0327eefafd4 | [
"Apache-2.0"
] | 67 | 2020-08-14T02:07:46.000Z | 2022-03-28T10:05:33.000Z | import subprocess
import os
import sys
from argparse import ArgumentParser, REMAINDER
import argparse as argparse
def parse_args():
parser = argparse.ArgumentParser(description="PaddlePaddle CTR example")
parser.add_argument(
'--is_local',
type=int,
default=0,
... | 27.666667 | 80 | 0.662651 |
6a1a7423b8850a351edc46238d3448a47b81a9ad | 2,316 | py | Python | resources/mechanics_lib/RectBeam.py | PRECISE/ROSLab | 2a6a295b71d4c73bc5c6ae2ec0330274afa31d0d | [
"Apache-2.0"
] | 7 | 2016-01-20T02:33:00.000Z | 2021-02-04T04:06:57.000Z | resources/mechanics_lib/RectBeam.py | PRECISE/ROSLab | 2a6a295b71d4c73bc5c6ae2ec0330274afa31d0d | [
"Apache-2.0"
] | null | null | null | resources/mechanics_lib/RectBeam.py | PRECISE/ROSLab | 2a6a295b71d4c73bc5c6ae2ec0330274afa31d0d | [
"Apache-2.0"
] | 3 | 2016-10-05T07:20:30.000Z | 2017-11-20T10:36:50.000Z | from api.component import Component
from connector import Tab
from utils.rectbeam import RectBeam as BeamDrawing
from math import sin, pi
class RectBeam(Component):
def defParameters(self):
self.newParameter("length")
self.newParameter("width")
self.newParameter("depth")
self.newParameter("phase", 0)... | 28.95 | 78 | 0.636442 |
e022de5d968073811ca92719fd6684e073eb3fe0 | 4,420 | py | Python | MachineTranslation/src_bak/seq2seq/v1(Session execution)/lib/evaluate_xrh.py | Xinrihui/DeepLearningApp | 8d86b88251ee8d37358c642b1ec4a341767bfd17 | [
"Apache-2.0"
] | 2 | 2021-08-25T01:13:29.000Z | 2021-10-10T14:49:59.000Z | MachineTranslation/src_bak/seq2seq/v2(Eager execution)/lib/evaluate_xrh.py | Xinrihui/DeepLearningApp | 8d86b88251ee8d37358c642b1ec4a341767bfd17 | [
"Apache-2.0"
] | null | null | null | MachineTranslation/src_bak/seq2seq/v2(Eager execution)/lib/evaluate_xrh.py | Xinrihui/DeepLearningApp | 8d86b88251ee8d37358c642b1ec4a341767bfd17 | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/python
# -*- coding: UTF-8 -*-
import re
import string
from lib.bleu_xrh import *
from nltk.translate.bleu_score import corpus_bleu
class Evaluate:
"""
评价翻译模型
Author: xrh
Date: 2021-9-26
"""
def __init__(self, with_unk=True,
_null_str='<NULL>',
... | 32.262774 | 284 | 0.53914 |
4c645eae663815403de458b6a246571e75a07fd8 | 1,785 | py | Python | 01-PageRank/snakes_and_ladders.py | explodingnuggets/Grafos-UFSCar | d149157a9f7ecfd2f519cc52e1bdfcb910c2ffad | [
"MIT"
] | 2 | 2017-11-13T02:51:28.000Z | 2017-11-15T02:42:23.000Z | 01-PageRank/snakes_and_ladders.py | explodingnuggets/Grafos-UFSCar | d149157a9f7ecfd2f519cc52e1bdfcb910c2ffad | [
"MIT"
] | null | null | null | 01-PageRank/snakes_and_ladders.py | explodingnuggets/Grafos-UFSCar | d149157a9f7ecfd2f519cc52e1bdfcb910c2ffad | [
"MIT"
] | 1 | 2017-11-13T02:51:32.000Z | 2017-11-13T02:51:32.000Z | import networkx as nx
import numpy as np
import matplotlib.pyplot as plt
def shift_positions():
# Builds the game table with the shift positions for the Snakes and Ladders squares
table = [0 for x in range(36)]
table[1] = 14
table[4] = 6
table[8] = 26
table[16] = 3
table[17] = 28
table[... | 27.045455 | 115 | 0.52493 |
d5bf5f37004fe447edfc04d83958d083281631bf | 2,898 | py | Python | PiLock.py | smalbadger/PiLock | bd1ae8a76cfe138fce53d96ae084f2b4e2b66495 | [
"MIT"
] | 1 | 2020-10-16T14:52:49.000Z | 2020-10-16T14:52:49.000Z | PiLock.py | smalbadger/PiLock | bd1ae8a76cfe138fce53d96ae084f2b4e2b66495 | [
"MIT"
] | null | null | null | PiLock.py | smalbadger/PiLock | bd1ae8a76cfe138fce53d96ae084f2b4e2b66495 | [
"MIT"
] | null | null | null | """
Author: Sam Badger
Date Created: March 27, 2019
Description: Simple digital passcode locking mechanism for Raspberry Pi Workshop
"""
from IndicatorLights import *
from LockMotor import *
from Display import *
from KeyPad import *
UNLOCKED = 0
LOCKED = 1
state = UNLOCKED
previousState = LOCKED
pass... | 23.560976 | 117 | 0.595238 |
d5cd1f2f5b9d6f4d1f325732612d8de4d3ad8894 | 18,766 | py | Python | feedcrawler/sites/shared/content_shows.py | rix1337/FeedCrawler | 6c104c39f1bd45e5d49c02c90bb8d9fd35f9709e | [
"MIT"
] | 16 | 2021-04-06T07:37:18.000Z | 2022-03-27T15:05:32.000Z | feedcrawler/sites/shared/content_shows.py | rix1337/FeedCrawler | 6c104c39f1bd45e5d49c02c90bb8d9fd35f9709e | [
"MIT"
] | 17 | 2021-06-09T10:37:49.000Z | 2022-03-31T07:29:36.000Z | feedcrawler/sites/shared/content_shows.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 hashlib
import re
from feedcrawler import internal
from feedcrawler.db import ListDb
from feedcrawler.myjd import add_decrypt
from feedcrawler.notifiers import notify
from feedcrawler.url import get_url
from feedcraw... | 47.750636 | 120 | 0.451828 |
e6969eee8924e21d9bfd308a559b02c9f8cea5a9 | 348 | gyp | Python | node_modules/sha3/binding.gyp | DonaldPeat/ether-campaign | ce3430d468a235d952080313c5bae14f3a895497 | [
"MIT"
] | 68 | 2019-03-06T02:20:35.000Z | 2019-03-06T02:21:51.000Z | node_modules/sha3/binding.gyp | DonaldPeat/ether-campaign | ce3430d468a235d952080313c5bae14f3a895497 | [
"MIT"
] | 13 | 2020-01-08T22:49:49.000Z | 2021-12-17T21:09:09.000Z | node_modules/sha3/binding.gyp | DonaldPeat/ether-campaign | ce3430d468a235d952080313c5bae14f3a895497 | [
"MIT"
] | 25 | 2020-11-21T13:21:20.000Z | 2022-01-05T02:27:35.000Z | {
"targets": [
{
"target_name": "sha3",
"sources": [
"src/addon.cpp",
"src/displayIntermediateValues.cpp",
"src/KeccakF-1600-reference.cpp",
"src/KeccakNISTInterface.cpp",
"src/KeccakSponge.cpp"
],
"include_dirs": [
"<!(node -e \"require('n... | 20.470588 | 44 | 0.479885 |
074008fe546afa0fe7c9e3b146d525ade115d59a | 207 | py | Python | gpu_temp.py | wichmann/RaspPI | 168609cb237e59a4c895eae798c0dab052aab38b | [
"MIT"
] | null | null | null | gpu_temp.py | wichmann/RaspPI | 168609cb237e59a4c895eae798c0dab052aab38b | [
"MIT"
] | null | null | null | gpu_temp.py | wichmann/RaspPI | 168609cb237e59a4c895eae798c0dab052aab38b | [
"MIT"
] | null | null | null | #! /usr/bin/env python3
import subprocess
with open('/sys/class/thermal/thermal_zone0/temp','rb') as f:
ret = f.read()
temp = int(ret) / 1000
print('Die Temperatur der GPU beträgt {} °C'.format(temp))
| 23 | 61 | 0.681159 |
91b73ef6e8fad987620f3ba1f6c6317ed95e188c | 20,416 | py | Python | src/onegov/core/upgrade.py | politbuero-kampagnen/onegov-cloud | 20148bf321b71f617b64376fe7249b2b9b9c4aa9 | [
"MIT"
] | null | null | null | src/onegov/core/upgrade.py | politbuero-kampagnen/onegov-cloud | 20148bf321b71f617b64376fe7249b2b9b9c4aa9 | [
"MIT"
] | null | null | null | src/onegov/core/upgrade.py | politbuero-kampagnen/onegov-cloud | 20148bf321b71f617b64376fe7249b2b9b9c4aa9 | [
"MIT"
] | null | null | null | import inspect
import importlib
import pkg_resources
import transaction
from contextlib import contextmanager
from inspect import getmembers, isfunction, ismethod
from itertools import chain
from onegov.core import LEVELS
from onegov.core.orm import Base, find_models
from onegov.core.orm.mixins import TimestampMixin
f... | 32.45787 | 79 | 0.62931 |
f44e2ac1d34a62f9b4fd0360bf62c311bc7b833b | 395 | py | Python | 0-notes/job-search/Cracking the Coding Interview/C04TreesGraphs/questions/4.11-questions.py | eengineergz/Lambda | 1fe511f7ef550aed998b75c18a432abf6ab41c5f | [
"MIT"
] | null | null | null | 0-notes/job-search/Cracking the Coding Interview/C04TreesGraphs/questions/4.11-questions.py | eengineergz/Lambda | 1fe511f7ef550aed998b75c18a432abf6ab41c5f | [
"MIT"
] | null | null | null | 0-notes/job-search/Cracking the Coding Interview/C04TreesGraphs/questions/4.11-questions.py | eengineergz/Lambda | 1fe511f7ef550aed998b75c18a432abf6ab41c5f | [
"MIT"
] | null | null | null | # 4.11 Random Node
# You are implementing a binary search tree class from scratch which, in addition to
# insert, find, and delete, has a method, getRandomNode(), which returns a random
# node from the tree.
# All nodes should be equally likely to be chosen.
# Design and implement an algorithm for getRandomNo... | 43.888889 | 90 | 0.734177 |
601bad8486f94b8ca8bfe0d4d736ab27ad96cbfe | 4,571 | py | Python | test/test_npu/test_network_ops/test_softshrink.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_softshrink.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_softshrink.py | Ascend/pytorch | 39849cf72dafe8d2fb68bd1679d8fd54ad60fcfc | [
"BSD-3-Clause"
] | null | null | null | # Copyright (c) 2020, Huawei Technologies.All rights reserved.
#
# Licensed under the BSD 3-Clause License (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# https://opensource.org/licenses/BSD-3-Clause
#
# Unless required by applicable law... | 44.378641 | 76 | 0.694815 |
60947c82ace2112e14a0663eddbcfe7ecab2e9ba | 2,856 | py | Python | src/onegov/core/filestorage.py | politbuero-kampagnen/onegov-cloud | 20148bf321b71f617b64376fe7249b2b9b9c4aa9 | [
"MIT"
] | null | null | null | src/onegov/core/filestorage.py | politbuero-kampagnen/onegov-cloud | 20148bf321b71f617b64376fe7249b2b9b9c4aa9 | [
"MIT"
] | null | null | null | src/onegov/core/filestorage.py | politbuero-kampagnen/onegov-cloud | 20148bf321b71f617b64376fe7249b2b9b9c4aa9 | [
"MIT"
] | null | null | null | """ Filestorage is a way to store files locally or on a remote server, with the
interface being the same, no matter where the files are stored.
Based on `<http://docs.pyfilesystem.org/en/latest/>`_
See :attr:`onegov.core.framework.Framework.filestorage` for more information.
"""
from fs.errors import IllegalBackRef... | 34.829268 | 79 | 0.740546 |
460ce3d9a1530ac30746f07352b4d61f2cff7889 | 1,513 | py | Python | src/test/tests/simulation/curve.py | visit-dav/vis | c08bc6e538ecd7d30ddc6399ec3022b9e062127e | [
"BSD-3-Clause"
] | 226 | 2018-12-29T01:13:49.000Z | 2022-03-30T19:16:31.000Z | src/test/tests/simulation/curve.py | visit-dav/vis | c08bc6e538ecd7d30ddc6399ec3022b9e062127e | [
"BSD-3-Clause"
] | 5,100 | 2019-01-14T18:19:25.000Z | 2022-03-31T23:08:36.000Z | src/test/tests/simulation/curve.py | visit-dav/vis | c08bc6e538ecd7d30ddc6399ec3022b9e062127e | [
"BSD-3-Clause"
] | 84 | 2019-01-24T17:41:50.000Z | 2022-03-10T10:01:46.000Z | # ----------------------------------------------------------------------------
# CLASSES: nightly
#
# Test Case: curve.py
#
# Tests: libsim - connecting to simulation and retrieving data from it.
# mesh - curve
#
# Programmer: Kathleen Biagas
# Date: Jun 17, 2014
#
# Modifications:
#
#... | 24.803279 | 78 | 0.566424 |
1ce63c6a17a98cdaab02e778d69d00a3c4384ba3 | 1,517 | py | Python | Data-Structures/Python/Graphs-BFS-DFS.py | M-Usman-Tahir/Data-Structures-and-Algorithms | 08331182f0bbfd85fcdba50477dcf408b09a37cd | [
"Apache-2.0"
] | 2 | 2021-12-13T10:09:47.000Z | 2022-01-05T11:04:31.000Z | Data-Structures/Python/Graphs-BFS-DFS.py | M-Usman-Tahir/Data-Structures-and-Algorithms | 08331182f0bbfd85fcdba50477dcf408b09a37cd | [
"Apache-2.0"
] | 1 | 2021-10-15T17:55:47.000Z | 2021-10-17T20:43:15.000Z | Data-Structures/Python/Graphs-BFS-DFS.py | M-Usman-Tahir/Data-Structures-and-Algorithms | 08331182f0bbfd85fcdba50477dcf408b09a37cd | [
"Apache-2.0"
] | 4 | 2021-10-12T13:05:10.000Z | 2021-10-16T19:31:46.000Z | class Graph:
def __init__(self, v):
self.V = v
self.l = [[] for _ in range(self.V)]
self.visited = [False for _ in range(self.V)]
def addEdge(self, x, y):
self.l[x].append(y)
self.l[y].append(x)
def printAdjlst(self):
for i in range(self.V):
... | 21.671429 | 53 | 0.435728 |
e803e7fe0b8d0a5a4bbda0086907c9cff63256cd | 453 | py | Python | volley/serializers/json_serializer.py | shipt/py-volley | 0114651478c8df7304d3fe3cb9f72998901bb3fe | [
"MIT"
] | 8 | 2022-02-24T14:59:24.000Z | 2022-03-31T04:37:55.000Z | volley/serializers/json_serializer.py | shipt/py-volley | 0114651478c8df7304d3fe3cb9f72998901bb3fe | [
"MIT"
] | 3 | 2022-02-27T17:08:52.000Z | 2022-03-18T13:11:01.000Z | volley/serializers/json_serializer.py | shipt/py-volley | 0114651478c8df7304d3fe3cb9f72998901bb3fe | [
"MIT"
] | 2 | 2022-02-24T15:03:07.000Z | 2022-03-15T03:12:00.000Z | import json
from typing import Any, Dict
from volley.serializers.base import BaseSerialization
class JsonSerialization(BaseSerialization):
def serialize(self, message: Dict[Any, Any]) -> bytes:
serialized: bytes = json.dumps(message, default=str).encode("utf-8")
return serialized
def deseria... | 30.2 | 76 | 0.708609 |
e82f7514ca422c333bd5266787de97b41f30272f | 64 | py | Python | site/public/courses/SPD-2.31/exercises/unit-testing/tests/test_extract_position.py | KitsuneNoctus/makeschool | 5eec1a18146abf70bb78b4ee3d301f6a43c9ede4 | [
"MIT"
] | 1 | 2021-08-24T20:22:19.000Z | 2021-08-24T20:22:19.000Z | site/public/courses/SPD-2.31/exercises/unit-testing/tests/test_extract_position.py | KitsuneNoctus/makeschool | 5eec1a18146abf70bb78b4ee3d301f6a43c9ede4 | [
"MIT"
] | null | null | null | site/public/courses/SPD-2.31/exercises/unit-testing/tests/test_extract_position.py | KitsuneNoctus/makeschool | 5eec1a18146abf70bb78b4ee3d301f6a43c9ede4 | [
"MIT"
] | null | null | null | import pytest
from ..extract_position import extract_position
| 21.333333 | 48 | 0.84375 |
1c73342679c39bf9286e07d960266ddf88e0798b | 5,954 | py | Python | lib/data_converter.py | djajetic/AutoML3Final | 36a89c6f00c713101feaffc0d6b9ccbb529ed317 | [
"MIT"
] | 2 | 2017-08-15T06:48:01.000Z | 2019-08-01T07:51:17.000Z | lib/data_converter.py | djajetic/AutoML2 | d0f04a6b8b413bd9ebafa2302b062b66ba181552 | [
"MIT"
] | null | null | null | lib/data_converter.py | djajetic/AutoML2 | d0f04a6b8b413bd9ebafa2302b062b66ba181552 | [
"MIT"
] | null | null | null | # Functions performing various data conversions for the ChaLearn AutoML challenge
# Main contributors: Arthur Pesah and Isabelle Guyon, August-October 2014
# ALL INFORMATION, SOFTWARE, DOCUMENTATION, AND DATA ARE PROVIDED "AS-IS".
# ISABELLE GUYON, CHALEARN, AND/OR OTHER ORGANIZERS OR CODE AUTHORS DISCLAIM
# ANY EXP... | 40.22973 | 138 | 0.674505 |
1c96f44d426467dce3ba85910d8e6b2836190eb1 | 4,864 | py | Python | dataset/gen_splits.py | ireina7/zero-shot-segmentation | 870d08ad7ea3965f006d0eb44667f6ecd87ef205 | [
"MIT"
] | null | null | null | dataset/gen_splits.py | ireina7/zero-shot-segmentation | 870d08ad7ea3965f006d0eb44667f6ecd87ef205 | [
"MIT"
] | null | null | null | dataset/gen_splits.py | ireina7/zero-shot-segmentation | 870d08ad7ea3965f006d0eb44667f6ecd87ef205 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
import sys
import os
import shutil
from PIL import Image
from dataset.transform_pixel import *
#from dataset.util import *
from torchvision import transforms
from torch.utils.data import Dataset
from torch.utils.data import DataLoader
from typing import List
import numpy as np
from PIL import I... | 26.434783 | 98 | 0.556743 |
c71c7e703074559e143c04a6f32034b26f596fa5 | 2,266 | py | Python | research/cv/STGAN/postprocess.py | leelige/mindspore | 5199e05ba3888963473f2b07da3f7bca5b9ef6dc | [
"Apache-2.0"
] | 77 | 2021-10-15T08:32:37.000Z | 2022-03-30T13:09:11.000Z | research/cv/STGAN/postprocess.py | leelige/mindspore | 5199e05ba3888963473f2b07da3f7bca5b9ef6dc | [
"Apache-2.0"
] | 3 | 2021-10-30T14:44:57.000Z | 2022-02-14T06:57:57.000Z | research/cv/STGAN/postprocess.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... | 33.323529 | 88 | 0.660194 |
c7816df33897d86c2fa1f85629c607bc19730052 | 2,290 | py | Python | ELIT-main/logo.py | Zusyaku/Termux-And-Lali-Linux-V2 | b1a1b0841d22d4bf2cc7932b72716d55f070871e | [
"Apache-2.0"
] | 2 | 2021-11-17T03:35:03.000Z | 2021-12-08T06:00:31.000Z | ELIT-main/logo.py | Zusyaku/Termux-And-Lali-Linux-V2 | b1a1b0841d22d4bf2cc7932b72716d55f070871e | [
"Apache-2.0"
] | null | null | null | ELIT-main/logo.py | Zusyaku/Termux-And-Lali-Linux-V2 | b1a1b0841d22d4bf2cc7932b72716d55f070871e | [
"Apache-2.0"
] | 2 | 2021-11-05T18:07:48.000Z | 2022-02-24T21:25:07.000Z | zmbflogo="""
____ __ ____ ______\n / __/ / / / _//_ __/\n / _/ / /__ _/ / / / \n /___/ /____//___/ /_/ \n
"""
loginlogo = """
_ _ \n | | (_) \n | | ___ __ _ _ _ __ \n | | / _ \ / _` | | '_ \ \n | |___| (_) |... | 61.891892 | 298 | 0.258952 |
c7d43294758c5f9595dcb9674c626ea333f333a2 | 2,084 | py | Python | .venv/Lib/site-packages/dexpy/power.py | AI-Assistant/FEMAG-Python | ff86e8f41485ae9df6034e6b8e810b59f8094c70 | [
"MIT"
] | 21 | 2016-10-19T18:13:03.000Z | 2021-11-02T13:58:31.000Z | .venv/Lib/site-packages/dexpy/power.py | AI-Assistant/FEMAG-Python | ff86e8f41485ae9df6034e6b8e810b59f8094c70 | [
"MIT"
] | 43 | 2016-10-11T20:56:28.000Z | 2020-08-20T16:39:38.000Z | .venv/Lib/site-packages/dexpy/power.py | AI-Assistant/FEMAG-Python | ff86e8f41485ae9df6034e6b8e810b59f8094c70 | [
"MIT"
] | 6 | 2017-12-22T03:47:37.000Z | 2021-03-13T03:45:26.000Z | """Functions to calculate statistical power for a design."""
import numpy as np
from scipy.stats import f
from scipy.stats import ncf
from patsy import dmatrix
def f_power(model, design, effect_size, alpha):
"""Calculates the power of an F test.
This calculates the probability that the F-statistic is above ... | 35.322034 | 117 | 0.667946 |
c7dd2047e8f2216599012d0b93a7da84e2bb4cde | 100 | py | Python | src/Main.py | LukasTinnes/VenturePainter | cb1f24fda2a43d402a9c5a401d713af0c950270b | [
"Unlicense"
] | 1 | 2020-05-29T21:09:33.000Z | 2020-05-29T21:09:33.000Z | src/Main.py | LukasTinnes/VenturePainter | cb1f24fda2a43d402a9c5a401d713af0c950270b | [
"Unlicense"
] | 3 | 2020-06-14T11:33:54.000Z | 2022-01-13T03:31:06.000Z | src/Main.py | LukasTinnes/VenturePainter | cb1f24fda2a43d402a9c5a401d713af0c950270b | [
"Unlicense"
] | null | null | null | from src.Interface import Interface
if __name__ == "__main__":
gui = Interface()
gui.run()
| 16.666667 | 35 | 0.67 |
90b5f395f3d3db6ef82f008eae377484a222af5e | 1,316 | py | Python | Packs/CyberX-CentralManager/Integrations/CyberXCentralManager/CyberXCentralManager.py | diCagri/content | c532c50b213e6dddb8ae6a378d6d09198e08fc9f | [
"MIT"
] | 799 | 2016-08-02T06:43:14.000Z | 2022-03-31T11:10:11.000Z | Packs/CyberX-CentralManager/Integrations/CyberXCentralManager/CyberXCentralManager.py | diCagri/content | c532c50b213e6dddb8ae6a378d6d09198e08fc9f | [
"MIT"
] | 9,317 | 2016-08-07T19:00:51.000Z | 2022-03-31T21:56:04.000Z | Packs/CyberX-CentralManager/Integrations/CyberXCentralManager/CyberXCentralManager.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
import requests
from CommonServerPython import * # noqa: F401
server = demisto.params()["Server"]
token = demisto.params()["Api-Token"]
ssl_check = not demisto.params().get('unsecure', False)
headers = {'Authorization': token}
if not demisto.params().get('proxy', False):
... | 38.705882 | 93 | 0.695289 |
90c885a300b18752e0d5fa7803b4d19dd1b3dc32 | 960 | py | Python | python/magic_method/list_indexing.py | zeroam/TIL | 43e3573be44c7f7aa4600ff8a34e99a65cbdc5d1 | [
"MIT"
] | null | null | null | python/magic_method/list_indexing.py | zeroam/TIL | 43e3573be44c7f7aa4600ff8a34e99a65cbdc5d1 | [
"MIT"
] | null | null | null | python/magic_method/list_indexing.py | zeroam/TIL | 43e3573be44c7f7aa4600ff8a34e99a65cbdc5d1 | [
"MIT"
] | null | null | null | class MyCustomList(list):
def __getitem__(self, index):
if index == 0:
raise ValueError
index = index - 1
return list.__getitem__(self, index)
def __setitem__(self, index, value):
if index == 0:
raise ValueError
index = index - 1
retu... | 25.263158 | 55 | 0.586458 |
4669a5ad4c8104e5b58e83f1a328a45263c7aabf | 665 | py | Python | nz_crawl_demo/day9/zhipin/zhipin/spiders/boss.py | gaohj/nzflask_bbs | 36a94c380b78241ed5d1e07edab9618c3e8d477b | [
"Apache-2.0"
] | null | null | null | nz_crawl_demo/day9/zhipin/zhipin/spiders/boss.py | gaohj/nzflask_bbs | 36a94c380b78241ed5d1e07edab9618c3e8d477b | [
"Apache-2.0"
] | 27 | 2020-02-12T07:55:58.000Z | 2022-03-12T00:19:09.000Z | nz_crawl_demo/day9/zhipin/zhipin/spiders/boss.py | gaohj/nzflask_bbs | 36a94c380b78241ed5d1e07edab9618c3e8d477b | [
"Apache-2.0"
] | 2 | 2020-02-18T01:54:55.000Z | 2020-02-21T11:36:28.000Z | # -*- coding: utf-8 -*-
import scrapy
from scrapy.linkextractors import LinkExtractor
from scrapy.spiders import CrawlSpider, Rule
class BossSpider(CrawlSpider):
name = 'boss'
allowed_domains = ['zhipin.com']
start_urls = ['https://www.zhipin.com/c100010000/?query=python&page=1']
rules = (
Ru... | 28.913043 | 108 | 0.63609 |
3144b67408c9f9166acce59973c88a9dfe9e3c92 | 251 | py | Python | Licence 2/I33/TP 6/ex_1.py | axelcoezard/licence | 1ed409c4572dea080169171beb7e8571159ba071 | [
"MIT"
] | 8 | 2020-11-26T20:45:12.000Z | 2021-11-29T15:46:22.000Z | Licence 2/I33/TP 6/ex_1.py | axelcoezard/licence | 1ed409c4572dea080169171beb7e8571159ba071 | [
"MIT"
] | null | null | null | Licence 2/I33/TP 6/ex_1.py | axelcoezard/licence | 1ed409c4572dea080169171beb7e8571159ba071 | [
"MIT"
] | 6 | 2020-10-23T15:29:24.000Z | 2021-05-05T19:10:45.000Z | def decompose(n):
D, i = dict(), 2
while n != 1:
if n % i == 0:
n //= i
D[i] = [i, D[i][1] + 1] if i in D else [i, 1]
else:
i += 1
return list(D.values())
print(decompose(99999876400))
| 19.307692 | 57 | 0.40239 |
31dfcf9e771068b649eca73371d8f62431e1d51d | 381 | py | Python | predefined-services/backend/flask/backend-flask/main.py | Splines/compose-generator | f2929ed373f19ad66506a29e191463d1500f709b | [
"Apache-2.0"
] | 50 | 2021-02-25T21:01:31.000Z | 2022-03-28T16:30:23.000Z | predefined-services/backend/flask/backend-flask/main.py | Splines/compose-generator | f2929ed373f19ad66506a29e191463d1500f709b | [
"Apache-2.0"
] | 63 | 2021-03-26T18:06:14.000Z | 2022-01-14T08:08:59.000Z | predefined-services/backend/flask/backend-flask/main.py | Splines/compose-generator | f2929ed373f19ad66506a29e191463d1500f709b | [
"Apache-2.0"
] | 3 | 2021-05-06T19:38:55.000Z | 2021-11-01T23:16:12.000Z | from flask import Flask
def create_app():
app = Flask(__name__)
app.config.from_pyfile("config.py")
@app.route('/')
def hello():
return '<h1>Hello World</h1>'
return app
def init_db():
pass
# from .models import db
# Initialize db:
# db.init_app(app)
if __name__ == "__... | 15.875 | 39 | 0.585302 |
b458121926b0449c12c2ef15d9803e6d9ff2e7db | 675 | pyde | Python | sketches/butterfly/butterfly.pyde | kantel/processingpy | 74aae222e46f68d1c8f06307aaede3cdae65c8ec | [
"MIT"
] | 4 | 2018-06-03T02:11:46.000Z | 2021-08-18T19:55:15.000Z | sketches/butterfly/butterfly.pyde | kantel/processingpy | 74aae222e46f68d1c8f06307aaede3cdae65c8ec | [
"MIT"
] | null | null | null | sketches/butterfly/butterfly.pyde | kantel/processingpy | 74aae222e46f68d1c8f06307aaede3cdae65c8ec | [
"MIT"
] | 3 | 2019-12-23T19:12:51.000Z | 2021-04-30T14:00:31.000Z | def setup():
global theta, xOld, yOld
theta = xOld = yOld = 0.0
size(600, 600)
background(100, 100, 100)
colorMode(HSB, 100)
def draw():
global theta, xOld, yOld
strokeWeight(2)
stroke(theta, 100 - theta, 100)
r = exp(cos(theta)) - 2*cos(4*theta) + (sin(theta/12))**5
# aus P... | 24.107143 | 61 | 0.534815 |
5b1bba81cd62573a35f95bd64af35bf493d2229e | 1,453 | py | Python | PINp/2014/Chernov_M_S/task_7_27.py | YukkaSarasti/pythonintask | eadf4245abb65f4400a3bae30a4256b4658e009c | [
"Apache-2.0"
] | null | null | null | PINp/2014/Chernov_M_S/task_7_27.py | YukkaSarasti/pythonintask | eadf4245abb65f4400a3bae30a4256b4658e009c | [
"Apache-2.0"
] | null | null | null | PINp/2014/Chernov_M_S/task_7_27.py | YukkaSarasti/pythonintask | eadf4245abb65f4400a3bae30a4256b4658e009c | [
"Apache-2.0"
] | null | null | null | # Задание 7. Вариант 27.
# Разработайте систему начисления очков для задачи 6, в соответствии с
# которой игрок получал бы большее количество баллов за меньшее количество
# попыток.
# Чернов Михаил Сергеевич
# 28.05.2016
import random
guessesTaken = 0
print("Привет, отгадай одного из основателей азбуки.")
x = random... | 27.415094 | 74 | 0.600138 |
81ca5acc52a1566be4aff330e11b0d7bfb25cb93 | 577 | py | Python | Scarky2/builder/migrations/0002_auto_20150505_2035.py | kopringo/Scarky2 | 93c59cd31113749045caff68274f779a61360167 | [
"MIT"
] | null | null | null | Scarky2/builder/migrations/0002_auto_20150505_2035.py | kopringo/Scarky2 | 93c59cd31113749045caff68274f779a61360167 | [
"MIT"
] | null | null | null | Scarky2/builder/migrations/0002_auto_20150505_2035.py | kopringo/Scarky2 | 93c59cd31113749045caff68274f779a61360167 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import models, migrations
class Migration(migrations.Migration):
dependencies = [
('builder', '0001_initial'),
]
operations = [
migrations.AlterField(
model_name='problem',
name='date_... | 23.08 | 62 | 0.584055 |
c49875c314a8f66dcb307d1068caacfe8b2c0e71 | 338 | py | Python | api/wsgi/src/devices/views.py | easyCZ/SLIP-A-2015 | ad386df9c438d93ec89f68c63d3deda12d27d1ed | [
"MIT"
] | 2 | 2020-06-08T19:17:10.000Z | 2020-06-08T20:45:07.000Z | api/wsgi/src/devices/views.py | easyCZ/SLIP-A-2015 | ad386df9c438d93ec89f68c63d3deda12d27d1ed | [
"MIT"
] | 14 | 2015-10-07T09:31:50.000Z | 2022-02-23T07:34:10.000Z | api/wsgi/src/devices/views.py | easyCZ/SLIP-A-2015 | ad386df9c438d93ec89f68c63d3deda12d27d1ed | [
"MIT"
] | null | null | null | from devices.models import Device
from devices.serializers import DeviceSerializer
from rest_framework import viewsets
from rest_framework.generics import ListCreateAPIView
from rest_framework.viewsets import ModelViewSet
class DevicesListView(ModelViewSet):
queryset = Device.objects.all()
serializer_class = ... | 28.166667 | 53 | 0.846154 |
f20c46d84d84c76ae1dec1cccad15e77301ad42a | 2,065 | py | Python | official/cv/Deepsort/src/sort/detection.py | leelige/mindspore | 5199e05ba3888963473f2b07da3f7bca5b9ef6dc | [
"Apache-2.0"
] | 1 | 2021-11-18T08:17:44.000Z | 2021-11-18T08:17:44.000Z | official/cv/Deepsort/src/sort/detection.py | leelige/mindspore | 5199e05ba3888963473f2b07da3f7bca5b9ef6dc | [
"Apache-2.0"
] | null | null | null | official/cv/Deepsort/src/sort/detection.py | leelige/mindspore | 5199e05ba3888963473f2b07da3f7bca5b9ef6dc | [
"Apache-2.0"
] | 2 | 2019-09-01T06:17:04.000Z | 2019-10-04T08:39:45.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... | 32.777778 | 79 | 0.614528 |
f21ce3df6e13ec3b1cc10d1e1b75b9a89ea526ec | 518 | py | Python | Python/crypto/linearer_kongruenzgenerator.py | SchickDominik/progprojects | 1eb9c5e3b9445f617b56bd9ceb02f2f182d730e2 | [
"MIT"
] | null | null | null | Python/crypto/linearer_kongruenzgenerator.py | SchickDominik/progprojects | 1eb9c5e3b9445f617b56bd9ceb02f2f182d730e2 | [
"MIT"
] | 9 | 2020-08-19T19:31:51.000Z | 2020-09-01T15:30:43.000Z | Python/crypto/linearer_kongruenzgenerator.py | SchickDominik/progprojects | 1eb9c5e3b9445f617b56bd9ceb02f2f182d730e2 | [
"MIT"
] | 2 | 2020-08-19T16:00:58.000Z | 2020-08-21T08:16:23.000Z | a = 7141
b = 54773
m = 259200
def kongr(n):
if n > 0:
return (a * kongr(n - 1) + b) % m
else:
return (a * 0 + b) % m
def neumann(bin):
b1 = "0" * (32 - len(bin[2:])) + bin[2:]
b2 = []
for i in range(0, 32, 2):
if b1[i:i + 2] == "01":
b2.append("0")
el... | 17.862069 | 66 | 0.428571 |
485df777f09d65efc8aa5f2b7e3c3be3da8db971 | 509 | py | Python | python/odml/examples/example_version_converter.py | mpsonntag/snippets | fc3cc42ea49b885c1f29c0aef1379055a931a978 | [
"BSD-3-Clause"
] | null | null | null | python/odml/examples/example_version_converter.py | mpsonntag/snippets | fc3cc42ea49b885c1f29c0aef1379055a931a978 | [
"BSD-3-Clause"
] | null | null | null | python/odml/examples/example_version_converter.py | mpsonntag/snippets | fc3cc42ea49b885c1f29c0aef1379055a931a978 | [
"BSD-3-Clause"
] | null | null | null | import os
import odml.tools as oto
from odml.tools.version_converter import VersionConverter
wdir = "/home/msonntag/Chaos/work/x_odml/file_dump"
fn = "1.3.3_convert%s.xml"
fin = fn % ""
fout = fn % "_converted"
# Conversion of odML v1 to v1.1
vc = VersionConverter(os.path.join(wdir, fin))
# either write to file
pri... | 25.45 | 66 | 0.72888 |
6f9a108382561a414ef3baf779e198451b55c25e | 328 | py | Python | rasa/core/evaluate.py | chaneyjd/rasa | 104a9591fc10b96eaa7fe402b6d64ca652b7ebe2 | [
"Apache-2.0"
] | 5 | 2020-08-28T06:44:31.000Z | 2021-03-14T18:46:01.000Z | rasa/core/evaluate.py | alfredfrancis/rasa | d8d226408f20cc2563c3aefbccef3e364a447666 | [
"Apache-2.0"
] | 75 | 2020-08-06T08:55:42.000Z | 2022-03-01T13:22:11.000Z | rasa/core/evaluate.py | alfredfrancis/rasa | d8d226408f20cc2563c3aefbccef3e364a447666 | [
"Apache-2.0"
] | 4 | 2019-05-19T21:19:32.000Z | 2021-01-06T14:26:37.000Z | import logging
logger = logging.getLogger(__name__)
if __name__ == "__main__": # pragma: no cover
raise RuntimeError(
"Calling `rasa.core.evaluate` directly is no longer supported. Please use "
"`rasa test` to test a combined Core and NLU model or `rasa test core` "
"to test a Core model.... | 29.818182 | 83 | 0.664634 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.