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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
bead1060b84f16cfcde5868424bcb809e094f602 | 265 | py | Python | DeepRTS/python/_py_cppbridge.py | Yigit-Arisoy/deep-rts | a5ed2c29b76789830df9f7075480c7229ccf0f4d | [
"MIT"
] | 1 | 2020-01-08T22:20:37.000Z | 2020-01-08T22:20:37.000Z | DeepRTS/python/_py_cppbridge.py | Yigit-Arisoy/deep-rts | a5ed2c29b76789830df9f7075480c7229ccf0f4d | [
"MIT"
] | 1 | 2021-11-11T18:39:56.000Z | 2021-11-11T22:15:59.000Z | DeepRTS/python/_py_cppbridge.py | Yigit-Arisoy/deep-rts | a5ed2c29b76789830df9f7075480c7229ccf0f4d | [
"MIT"
] | null | null | null |
class GameBridge:
def __init__(self, game):
self.g = game
@property
def players(self):
return self.g.players
@property
def map(self):
return self.g.map
@property
def units(self):
return self.g.units
| 13.947368 | 29 | 0.569811 |
a3c4322fa305a5651c6bb2df994a30b8294ebe8a | 4,964 | py | Python | model_zoo/ernie-3.0/compress_token_cls.py | mukaiu/PaddleNLP | 0315365dbafa6e3b1c7147121ba85e05884125a5 | [
"Apache-2.0"
] | null | null | null | model_zoo/ernie-3.0/compress_token_cls.py | mukaiu/PaddleNLP | 0315365dbafa6e3b1c7147121ba85e05884125a5 | [
"Apache-2.0"
] | null | null | null | model_zoo/ernie-3.0/compress_token_cls.py | mukaiu/PaddleNLP | 0315365dbafa6e3b1c7147121ba85e05884125a5 | [
"Apache-2.0"
] | null | null | null | # Copyright (c) 2022 PaddlePaddle Authors. All Rights Reserved.
#
# 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 appli... | 32.444444 | 88 | 0.690572 |
a3c609c2b82b065557e5a74dca4b3bc58a385644 | 1,810 | py | Python | testcode/twitter.py | Cl3V0r/MLSeminar | d05f171a9b7d773ea123e1919e07312a7f0c9fe8 | [
"MIT"
] | null | null | null | testcode/twitter.py | Cl3V0r/MLSeminar | d05f171a9b7d773ea123e1919e07312a7f0c9fe8 | [
"MIT"
] | null | null | null | testcode/twitter.py | Cl3V0r/MLSeminar | d05f171a9b7d773ea123e1919e07312a7f0c9fe8 | [
"MIT"
] | null | null | null | #needs confirmed twitter account
import twitter #conda install -c conda-forge python-twitter
import re
import datetime
import pandas as pd
class twitterminer():
request_limit = 20
api = False
data = []
twitter_keys = {
'consumer_key':12, # add your consumer key
'consumer_secret':... | 31.206897 | 95 | 0.613812 |
43220039ddffdd521071c4b10bd3a3cabc1aad00 | 3,100 | py | Python | Quiz.py | Kingpin007/SC-Lab | ba8fa9dfca4b950ebcb8c8d409f7e215c7971925 | [
"MIT"
] | null | null | null | Quiz.py | Kingpin007/SC-Lab | ba8fa9dfca4b950ebcb8c8d409f7e215c7971925 | [
"MIT"
] | null | null | null | Quiz.py | Kingpin007/SC-Lab | ba8fa9dfca4b950ebcb8c8d409f7e215c7971925 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
"""
Created on Thu Aug 16 09:18:50 2018
@author: Anirudh
"""
import numpy as np
# Max-Product Composition given by Rosenfeld
def maxProduct(x, y):
z = []
for x1 in x:
for y1 in y.T:
z.append(max(np.multiply(x1, y1)))
return np.array(z).reshape((x.shape[0], y.sha... | 26.271186 | 94 | 0.500645 |
43d1117ed55562ef4bd1364298b8ba150d954a49 | 2,119 | py | Python | utils/bot_factory.py | ajay-cz/chatbot-engine | df58f3e7e899151feedb847e56d9fc699e66f60c | [
"MIT"
] | null | null | null | utils/bot_factory.py | ajay-cz/chatbot-engine | df58f3e7e899151feedb847e56d9fc699e66f60c | [
"MIT"
] | 1 | 2021-12-20T07:05:33.000Z | 2021-12-29T01:35:37.000Z | utils/bot_factory.py | ajay-cz/chatbot-engine | df58f3e7e899151feedb847e56d9fc699e66f60c | [
"MIT"
] | null | null | null | import os
import logging
import sys, getopt
from pathlib import Path
from rasa.utils.endpoints import EndpointConfig
from rasa.core.agent import Agent
from collections.abc import Mapping
logger = logging.getLogger(__name__)
DEFAULT_LANG = 'en'
SUPPORTED_LANGS = {
DEFAULT_LANG: 'english',
'de': 'german',
'sv': ... | 23.808989 | 86 | 0.669184 |
60ee9ca25e1b02d054c42bc0e76ac525e422d2c7 | 2,755 | py | Python | src/test/tests/databases/mfem.py | visit-dav/vis | c08bc6e538ecd7d30ddc6399ec3022b9e062127e | [
"BSD-3-Clause"
] | 226 | 2018-12-29T01:13:49.000Z | 2022-03-30T19:16:31.000Z | src/test/tests/databases/mfem.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/databases/mfem.py | visit-dav/vis | c08bc6e538ecd7d30ddc6399ec3022b9e062127e | [
"BSD-3-Clause"
] | 84 | 2019-01-24T17:41:50.000Z | 2022-03-10T10:01:46.000Z | # ----------------------------------------------------------------------------
# CLASSES: nightly
# LIMIT: 900
# Test Case: mfem.py
#
# Tests: mfem files
#
# Programmer: Cyrus Harrison
# Date: Thu Jun 12 14:58:03 PDT 2014
#
# Modifications:
# Brad Whitlock, Wed Sep 2 20:56:13 PDT 2020
# The ... | 29.308511 | 78 | 0.643557 |
60f755360aea468895c2f5545a41a914da23d356 | 757 | pyde | Python | sketches/dragonkurve/dragonkurve.pyde | kantel/processingpy | 74aae222e46f68d1c8f06307aaede3cdae65c8ec | [
"MIT"
] | 4 | 2018-06-03T02:11:46.000Z | 2021-08-18T19:55:15.000Z | sketches/dragonkurve/dragonkurve.pyde | kantel/processingpy | 74aae222e46f68d1c8f06307aaede3cdae65c8ec | [
"MIT"
] | null | null | null | sketches/dragonkurve/dragonkurve.pyde | kantel/processingpy | 74aae222e46f68d1c8f06307aaede3cdae65c8ec | [
"MIT"
] | 3 | 2019-12-23T19:12:51.000Z | 2021-04-30T14:00:31.000Z | add_library('Turtle')
import math
num_gen = 12
def setup():
global puff
size(640, 400)
this.surface.setTitle("Puff, the Magic Dragon")
background(50)
strokeWeight(2)
stroke(150, 255, 100)
puff = Turtle(this)
puff.right(90)
noLoop()
def draw():
puff.penUp()
puff.goToPoint(2... | 20.459459 | 51 | 0.542933 |
e0fe1bcbf27fab2dab6e2a5941584a8daeba035e | 13,384 | py | Python | book/_build/jupyter_execute/docs/001_internet.py | tom-tubeless/wwg-digitales-miteinander | d9391046a7ed12b91b538b937993161c67d77d68 | [
"CC0-1.0"
] | null | null | null | book/_build/jupyter_execute/docs/001_internet.py | tom-tubeless/wwg-digitales-miteinander | d9391046a7ed12b91b538b937993161c67d77d68 | [
"CC0-1.0"
] | null | null | null | book/_build/jupyter_execute/docs/001_internet.py | tom-tubeless/wwg-digitales-miteinander | d9391046a7ed12b91b538b937993161c67d77d68 | [
"CC0-1.0"
] | null | null | null | #!/usr/bin/env python
# coding: utf-8
# # Das Internet
#
# Nach {cite:ps}`internet2021`
#
# ## Was ist das Internet?
#
# Das Internet ist das beliebteste Computernetz der Welt.
# Es begann als akademisches Forschungsprojekt im Jahr 1969 und wurde in den 1990er Jahren zu einem globalen kommerziellen Netz.
# Heute wi... | 82.617284 | 626 | 0.807382 |
1ce4eed25619e82963c07fb930df515548b4a0c0 | 193 | py | Python | django_project/image_parroter/thumbnailer/urls.py | zeroam/TIL | 43e3573be44c7f7aa4600ff8a34e99a65cbdc5d1 | [
"MIT"
] | null | null | null | django_project/image_parroter/thumbnailer/urls.py | zeroam/TIL | 43e3573be44c7f7aa4600ff8a34e99a65cbdc5d1 | [
"MIT"
] | null | null | null | django_project/image_parroter/thumbnailer/urls.py | zeroam/TIL | 43e3573be44c7f7aa4600ff8a34e99a65cbdc5d1 | [
"MIT"
] | 1 | 2020-05-15T13:49:33.000Z | 2020-05-15T13:49:33.000Z | from django.urls import path
from . import views
urlpatterns = [
path('', views.HomeView.as_view(), name='home'),
path('task/<str:task_id>/', views.TaskView.as_view(), name='task'),
] | 24.125 | 71 | 0.663212 |
e817e46e77aba8440108b33a747bab7d48e2c3bb | 1,562 | py | Python | ParsingAndScraping/Netflix/parcer.py | KazuruK/FilmGetter | fd84bcaddf17d4b89ad6e5d27095535346c5f4a9 | [
"BSD-3-Clause"
] | 1 | 2021-06-23T13:06:11.000Z | 2021-06-23T13:06:11.000Z | ParsingAndScraping/Netflix/parcer.py | KazuruK/FilmGetter | fd84bcaddf17d4b89ad6e5d27095535346c5f4a9 | [
"BSD-3-Clause"
] | 1 | 2021-06-23T21:21:52.000Z | 2021-06-23T21:21:52.000Z | ParsingAndScraping/Netflix/parcer.py | KazuruK/FilmGetter | fd84bcaddf17d4b89ad6e5d27095535346c5f4a9 | [
"BSD-3-Clause"
] | 1 | 2021-06-28T19:14:19.000Z | 2021-06-28T19:14:19.000Z | import re
import requests
from bs4 import BeautifulSoup
from ParsingAndScraping.kinopoisk.kinopoiskAPI import KinopoiskAPI
from ParsingAndScraping.assistants import digits
def netflix_parcer(film_name):
# prices = [599, 799, 999] '''Unused constant for price output'''
string_getter = KinopoiskAPI()
prepar... | 39.05 | 89 | 0.670935 |
1c0f57435013cad94e75ba0222897a737d8d77ad | 315 | py | Python | zencad/examples/1.GeomPrim/3.prim1d/bezier.py | Spiritdude/zencad | 4e63b1a6306dd235f4daa2791b10249f7546c95b | [
"MIT"
] | 5 | 2018-04-11T14:11:40.000Z | 2018-09-12T19:03:36.000Z | zencad/examples/1.GeomPrim/3.prim1d/bezier.py | Spiritdude/zencad | 4e63b1a6306dd235f4daa2791b10249f7546c95b | [
"MIT"
] | null | null | null | zencad/examples/1.GeomPrim/3.prim1d/bezier.py | Spiritdude/zencad | 4e63b1a6306dd235f4daa2791b10249f7546c95b | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
"""
ZenCad API example: bezier.py
"""
from zencad import *
pnts = points([(0, 0, 0), (0, 10, 0), (10, 10)])
m0 = bezier(pnts)
m1 = bezier(pnts, weights=[1,2,1])
m2 = bezier(pnts, weights=[1,3,1])
disp(m0, color=(1,0,0))
disp(m1, color=(0,1,0))
disp(m2, color=(0,0,1))
disp(pnts)
show()
| 15 | 48 | 0.593651 |
98bdd4eb398ec331a03f16ee2c5ba3f1326227de | 3,871 | py | Python | src/Sephrasto/UI/DatenbankEditFreieFertigkeit.py | qeqar/Sephrasto | ce46d46299b2c793f015e25c98908773c39b1dee | [
"MIT"
] | null | null | null | src/Sephrasto/UI/DatenbankEditFreieFertigkeit.py | qeqar/Sephrasto | ce46d46299b2c793f015e25c98908773c39b1dee | [
"MIT"
] | null | null | null | src/Sephrasto/UI/DatenbankEditFreieFertigkeit.py | qeqar/Sephrasto | ce46d46299b2c793f015e25c98908773c39b1dee | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
# Form implementation generated from reading ui file 'DatenbankEditFreieFertigkeit.ui'
#
# Created by: PyQt5 UI code generator 5.15.6
#
# WARNING: Any manual changes made to this file will be lost when pyuic5 is
# run again. Do not edit this file unless you know what you are doing.
from PyQt... | 49 | 370 | 0.706794 |
c7b9165ae4f22c6da50725249a85342ee90bf072 | 4,870 | py | Python | sentinel/node/controllers.py | allagog0x01/sentwg | 52285ecf2b03c30a78901a29a7af96c8ab5764c8 | [
"Apache-2.0"
] | null | null | null | sentinel/node/controllers.py | allagog0x01/sentwg | 52285ecf2b03c30a78901a29a7af96c8ab5764c8 | [
"Apache-2.0"
] | null | null | null | sentinel/node/controllers.py | allagog0x01/sentwg | 52285ecf2b03c30a78901a29a7af96c8ab5764c8 | [
"Apache-2.0"
] | null | null | null | # coding=utf-8
from .node import node
from ..config import MASTER_NODE_URL
from ..config import VERSION
from ..utils import fetch
def list_node():
body = {
'txHash': node.config['register']['hash']
}
url = MASTER_NODE_URL + '/nodes'
try:
response = fetch().post(url, json=body)
... | 31.019108 | 94 | 0.49384 |
dc164d06b5e202f0e014dc63733461b0084808ca | 3,754 | py | Python | Packs/NCSCCyberAsssessmentFramework/Scripts/NCSCReportDetailsB/NCSCReportDetailsB.py | diCagri/content | c532c50b213e6dddb8ae6a378d6d09198e08fc9f | [
"MIT"
] | 799 | 2016-08-02T06:43:14.000Z | 2022-03-31T11:10:11.000Z | Packs/NCSCCyberAsssessmentFramework/Scripts/NCSCReportDetailsB/NCSCReportDetailsB.py | diCagri/content | c532c50b213e6dddb8ae6a378d6d09198e08fc9f | [
"MIT"
] | 9,317 | 2016-08-07T19:00:51.000Z | 2022-03-31T21:56:04.000Z | Packs/NCSCCyberAsssessmentFramework/Scripts/NCSCReportDetailsB/NCSCReportDetailsB.py | diCagri/content | c532c50b213e6dddb8ae6a378d6d09198e08fc9f | [
"MIT"
] | 1,297 | 2016-08-04T13:59:00.000Z | 2022-03-31T23:43:06.000Z | import json
import demistomock as demisto # noqa: F401
from CommonServerPython import * # noqa: F401
def calculate_overall(data: dict = None) -> str:
if not data:
return ""
results = [x['Result'] for x in data]
if "Not Achieved" in results:
return "Not Achieved"
elif "Partially Achi... | 42.659091 | 118 | 0.586308 |
81ec0c0cbfd8c95291f92499753fdc36215fde88 | 7,951 | py | Python | commons/embeddings/graph_utils.py | inyukwo1/qgm_decoder | 70e60afec140ec3e2ee04f980a384e1cf28d761c | [
"MIT"
] | null | null | null | commons/embeddings/graph_utils.py | inyukwo1/qgm_decoder | 70e60afec140ec3e2ee04f980a384e1cf28d761c | [
"MIT"
] | null | null | null | commons/embeddings/graph_utils.py | inyukwo1/qgm_decoder | 70e60afec140ec3e2ee04f980a384e1cf28d761c | [
"MIT"
] | null | null | null | import random
from copy import deepcopy
from collections import OrderedDict
from datasets.schema import Schema
def graph_checker(graph1, graph2, schema: Schema):
for t in graph2:
if int(t) not in graph1:
return False
ok_cols = []
for t in graph1:
if t not in graph2:
... | 40.984536 | 163 | 0.647214 |
48a7825a5c104b5f2614fcbd25b723b1af724e37 | 2,447 | py | Python | tools/legacy/colony-wars-rsc-extractor/extract-rsc.py | gifted-nguvu/darkstar-dts-converter | aa17a751a9f3361ca9bbb400ee4c9516908d1297 | [
"MIT"
] | 2 | 2020-03-18T18:23:27.000Z | 2020-08-02T15:59:16.000Z | tools/legacy/colony-wars-rsc-extractor/extract-rsc.py | gifted-nguvu/darkstar-dts-converter | aa17a751a9f3361ca9bbb400ee4c9516908d1297 | [
"MIT"
] | 5 | 2019-07-07T16:47:47.000Z | 2020-08-10T16:20:00.000Z | tools/legacy/colony-wars-rsc-extractor/extract-rsc.py | gifted-nguvu/darkstar-dts-converter | aa17a751a9f3361ca9bbb400ee4c9516908d1297 | [
"MIT"
] | 1 | 2020-03-18T18:23:30.000Z | 2020-03-18T18:23:30.000Z |
import sys
import struct
import os
from collections import namedtuple
def readFiles(numFiles, infoFmt, offset, adjustExtension):
files = []
for i in range(numFiles):
rawValues = struct.unpack_from(infoFmt, rawData, offset)
fileName = rawValues[0]
fileOffset = rawValues[1]
fileName = fileName.split("\0".enc... | 30.209877 | 74 | 0.687781 |
48aa74c519db0947292c085215f1fab9320fc953 | 8,762 | py | Python | hausse/plugins/elements/collection.py | andrenasturas/hausse | 58e7cb71d5105cf1d6ec7d294e85668855bf8336 | [
"MIT"
] | null | null | null | hausse/plugins/elements/collection.py | andrenasturas/hausse | 58e7cb71d5105cf1d6ec7d294e85668855bf8336 | [
"MIT"
] | 1 | 2021-08-30T21:41:46.000Z | 2021-08-30T21:41:46.000Z | hausse/plugins/elements/collection.py | andrenasturas/hausse | 58e7cb71d5105cf1d6ec7d294e85668855bf8336 | [
"MIT"
] | 1 | 2021-08-31T19:27:32.000Z | 2021-08-31T19:27:32.000Z | import logging
from typing import Callable, Iterable, List, Optional, Union
from hausse.lib import Element, Plugin, Project, SelectorPlugin, project, selector
from hausse.lib.selector import Pattern, Selector
class BaseCollection(Plugin):
"""
BaseCollection
==============
The BaseCollection is the m... | 34.093385 | 188 | 0.628395 |
d2978838763c2938aa6e87a040f6fb8312a9b7eb | 1,566 | py | Python | frappe-bench/apps/erpnext/erpnext/selling/doctype/selling_settings/selling_settings.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/selling/doctype/selling_settings/selling_settings.py | Semicheche/foa_frappe_docker | a186b65d5e807dd4caf049e8aeb3620a799c1225 | [
"MIT"
] | null | null | null | frappe-bench/apps/erpnext/erpnext/selling/doctype/selling_settings/selling_settings.py | Semicheche/foa_frappe_docker | a186b65d5e807dd4caf049e8aeb3620a799c1225 | [
"MIT"
] | 1 | 2021-04-29T14:39:01.000Z | 2021-04-29T14:39:01.000Z | # Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors
# License: GNU General Public License v3. See license.txt
# For license information, please see license.txt
from __future__ import unicode_literals
import frappe
import frappe.defaults
from frappe.utils import cint
from frappe.custom.doctype.propert... | 38.195122 | 86 | 0.785441 |
d2cd5340032b28dd5178e4730dab05ac9a74e7d9 | 1,068 | py | Python | etl/shared/utils.py | Betadinho/einander-helfen | 272f11397d80ab5267f39a7b36734495f1c00b0c | [
"MIT"
] | 7 | 2020-04-23T20:16:11.000Z | 2022-01-04T14:57:16.000Z | etl/shared/utils.py | Betadinho/einander-helfen | 272f11397d80ab5267f39a7b36734495f1c00b0c | [
"MIT"
] | 361 | 2020-04-23T17:20:14.000Z | 2022-03-02T11:29:45.000Z | etl/shared/utils.py | Betadinho/einander-helfen | 272f11397d80ab5267f39a7b36734495f1c00b0c | [
"MIT"
] | 1 | 2021-11-29T06:02:52.000Z | 2021-11-29T06:02:52.000Z | from datetime import datetime
from shared.logger_factory import LoggerFactory
import json
import os
logger = LoggerFactory.get_general_logger()
def write_data_to_json(path, data):
"""Writes the given data to the given json file."""
logger.debug(f'write_data_to_json({path})')
dir_name = os.path.dirname(p... | 26.7 | 61 | 0.683521 |
82a1cb7369d2f1b7bee1de1b28ff718907445b27 | 942 | py | Python | Python/Courses/Python-Tutorials.Zulkarnine-Mahmud/01.Object-oriented-programming/14-Using-Class.py | shihab4t/Books-Code | b637b6b2ad42e11faf87d29047311160fe3b2490 | [
"Unlicense"
] | null | null | null | Python/Courses/Python-Tutorials.Zulkarnine-Mahmud/01.Object-oriented-programming/14-Using-Class.py | shihab4t/Books-Code | b637b6b2ad42e11faf87d29047311160fe3b2490 | [
"Unlicense"
] | null | null | null | Python/Courses/Python-Tutorials.Zulkarnine-Mahmud/01.Object-oriented-programming/14-Using-Class.py | shihab4t/Books-Code | b637b6b2ad42e11faf87d29047311160fe3b2490 | [
"Unlicense"
] | null | null | null | class Person:
def __init__(self, name: str, year_of_birth: int, ht_inches: int = None):
self.__name = name
self.__year_of_birth = year_of_birth
self.__ht_inches = ht_inches
def get_year_of_birth(self):
return self.__year_of_birth
def type_of_dob(self):
return type(s... | 25.459459 | 91 | 0.611465 |
7d9d2052e5d7ad572dc4f6506e7e928b4300d8f6 | 6,206 | py | Python | applications/experimental/pipelines/pipelines/__init__.py | mukaiu/PaddleNLP | 0315365dbafa6e3b1c7147121ba85e05884125a5 | [
"Apache-2.0"
] | null | null | null | applications/experimental/pipelines/pipelines/__init__.py | mukaiu/PaddleNLP | 0315365dbafa6e3b1c7147121ba85e05884125a5 | [
"Apache-2.0"
] | null | null | null | applications/experimental/pipelines/pipelines/__init__.py | mukaiu/PaddleNLP | 0315365dbafa6e3b1c7147121ba85e05884125a5 | [
"Apache-2.0"
] | null | null | null | # Copyright (c) 2022 PaddlePaddle Authors. All Rights Reserved.
# Copyright 2021 deepset GmbH. All Rights Reserved.
#
# 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.o... | 36.940476 | 128 | 0.726072 |
7dd00f2678d82ca92478ccbd6243e1d8b81c43d8 | 100 | py | Python | Python/Books/Learning-Programming-with-Python.Tamim-Shahriar-Subeen/chapter-009.01-list/ph-9.18-even-number-with-comprehensions.py | shihab4t/Books-Code | b637b6b2ad42e11faf87d29047311160fe3b2490 | [
"Unlicense"
] | null | null | null | Python/Books/Learning-Programming-with-Python.Tamim-Shahriar-Subeen/chapter-009.01-list/ph-9.18-even-number-with-comprehensions.py | shihab4t/Books-Code | b637b6b2ad42e11faf87d29047311160fe3b2490 | [
"Unlicense"
] | null | null | null | Python/Books/Learning-Programming-with-Python.Tamim-Shahriar-Subeen/chapter-009.01-list/ph-9.18-even-number-with-comprehensions.py | shihab4t/Books-Code | b637b6b2ad42e11faf87d29047311160fe3b2490 | [
"Unlicense"
] | null | null | null | li = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10]
even_number = [x for x in li if x % 2 == 0]
print(even_number)
| 25 | 43 | 0.54 |
7deac5d8de0b57100018105f443f6122c5a3e993 | 1,029 | py | Python | MQTTcliente/Python/MQTTpublisher.py | mateusjunges/sistemas-embarcados-2018 | ee70b8900f7cef4422a1d1a83ee254e91cb73462 | [
"MIT"
] | 1 | 2018-12-09T03:43:08.000Z | 2018-12-09T03:43:08.000Z | Aulas/ESP8266/Arduino IDE/MQTTcliente/Python/MQTTpublisher.py | mateusjunges/sistemas-embarcados-2018 | ee70b8900f7cef4422a1d1a83ee254e91cb73462 | [
"MIT"
] | null | null | null | Aulas/ESP8266/Arduino IDE/MQTTcliente/Python/MQTTpublisher.py | mateusjunges/sistemas-embarcados-2018 | ee70b8900f7cef4422a1d1a83ee254e91cb73462 | [
"MIT"
] | 2 | 2018-12-09T03:46:42.000Z | 2018-12-10T00:34:45.000Z | #
# Exemplo MQTT publisher usando paho-mqtt
#
import sys
import time
import paho.mqtt.client as mqtt
#definicoes:
broker = "broker.mqtt-dashboard.com"
portaBroker = 1883
topico = 'Sistemas.Embarcados.Topico.Entrada' #dica: o nome do topico deve ser "unico",
#Callback - conexao ao broker realizada
def on_connect(cl... | 27.810811 | 88 | 0.62585 |
81aa41f3e79678c406e3c601457232694a0f2116 | 19,125 | py | Python | src/onegov/core/cli/core.py | politbuero-kampagnen/onegov-cloud | 20148bf321b71f617b64376fe7249b2b9b9c4aa9 | [
"MIT"
] | null | null | null | src/onegov/core/cli/core.py | politbuero-kampagnen/onegov-cloud | 20148bf321b71f617b64376fe7249b2b9b9c4aa9 | [
"MIT"
] | null | null | null | src/onegov/core/cli/core.py | politbuero-kampagnen/onegov-cloud | 20148bf321b71f617b64376fe7249b2b9b9c4aa9 | [
"MIT"
] | null | null | null | """
.. _core-commands:
Core Commands
-------------
Provides a framework for cli commands run against one ore more onegov
cloud applications.
OneGov cli commands are usually ran against a onegov.yml config file, which
may contain definitions for multiple applications. It may define multiple
application with different... | 31.148208 | 79 | 0.651085 |
81cc597f0b9aa3933b9f48c2fcf27f12bdad5b43 | 5,540 | py | Python | python/oneflow/compatible/single_client/ops/util/custom_op_module.py | wangyuyue/oneflow | 0a71c22fe8355392acc8dc0e301589faee4c4832 | [
"Apache-2.0"
] | 3,285 | 2020-07-31T05:51:22.000Z | 2022-03-31T15:20:16.000Z | python/oneflow/compatible/single_client/ops/util/custom_op_module.py | wangyuyue/oneflow | 0a71c22fe8355392acc8dc0e301589faee4c4832 | [
"Apache-2.0"
] | 2,417 | 2020-07-31T06:28:58.000Z | 2022-03-31T23:04:14.000Z | python/oneflow/compatible/single_client/ops/util/custom_op_module.py | wangyuyue/oneflow | 0a71c22fe8355392acc8dc0e301589faee4c4832 | [
"Apache-2.0"
] | 520 | 2020-07-31T05:52:42.000Z | 2022-03-29T02:38:11.000Z | """
Copyright 2020 The OneFlow Authors. All rights reserved.
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 agr... | 32.397661 | 88 | 0.631408 |
6fe28911f3f2e7beff7db349c0cd41486636a2ac | 7,081 | py | Python | 20-fs-ias-lec/groups/12-logSync/src/logSync/pcap_sync.py | Kyrus1999/BACnet | 5be8e1377252166041bcd0b066cce5b92b077d06 | [
"MIT"
] | 8 | 2020-03-17T21:12:18.000Z | 2021-12-12T15:55:54.000Z | 20-fs-ias-lec/groups/12-logSync/src/logSync/pcap_sync.py | Kyrus1999/BACnet | 5be8e1377252166041bcd0b066cce5b92b077d06 | [
"MIT"
] | 2 | 2021-07-19T06:18:43.000Z | 2022-02-10T12:17:58.000Z | 20-fs-ias-lec/groups/12-logSync/src/logSync/pcap_sync.py | Kyrus1999/BACnet | 5be8e1377252166041bcd0b066cce5b92b077d06 | [
"MIT"
] | 25 | 2020-03-20T09:32:45.000Z | 2021-07-18T18:12:59.000Z | import os
import event as event
import pcap as pcap
from feed import FEED
from crypto import ED25519
import cbor2
class FileInfo:
def __init__(self, file):
self.file = file
try:
self.fid, self.seq = pcap.get_fid_and_seq(file)
except:
self.fid = None
se... | 31.896396 | 120 | 0.583392 |
d2288cc55fa3914fb4753aeba1366a99e937e20d | 5,012 | py | Python | src/visitpy/visit_utils/src/windows.py | visit-dav/vis | c08bc6e538ecd7d30ddc6399ec3022b9e062127e | [
"BSD-3-Clause"
] | 226 | 2018-12-29T01:13:49.000Z | 2022-03-30T19:16:31.000Z | src/visitpy/visit_utils/src/windows.py | visit-dav/vis | c08bc6e538ecd7d30ddc6399ec3022b9e062127e | [
"BSD-3-Clause"
] | 5,100 | 2019-01-14T18:19:25.000Z | 2022-03-31T23:08:36.000Z | src/visitpy/visit_utils/src/windows.py | visit-dav/vis | c08bc6e538ecd7d30ddc6399ec3022b9e062127e | [
"BSD-3-Clause"
] | 84 | 2019-01-24T17:41:50.000Z | 2022-03-10T10:01:46.000Z | # Copyright (c) Lawrence Livermore National Security, LLC and other VisIt
# Project developers. See the top-level LICENSE file for dates and other
# details. No copyright assignment is required to contribute to VisIt.
"""
file: windows.py
author: Cyrus Harrison <cyrush@llnl.gov>
created: 7/2/2010
description:
... | 32.335484 | 82 | 0.607741 |
736c3b4e6b526e01a5962ad4ab4a2ad6bda52858 | 1,034 | py | Python | exercises/de/test_03_11.py | Jette16/spacy-course | 32df0c8f6192de6c9daba89740a28c0537e4d6a0 | [
"MIT"
] | 2,085 | 2019-04-17T13:10:40.000Z | 2022-03-30T21:51:46.000Z | exercises/de/test_03_11.py | Jette16/spacy-course | 32df0c8f6192de6c9daba89740a28c0537e4d6a0 | [
"MIT"
] | 79 | 2019-04-18T14:42:55.000Z | 2022-03-07T08:15:43.000Z | exercises/de/test_03_11.py | Jette16/spacy-course | 32df0c8f6192de6c9daba89740a28c0537e4d6a0 | [
"MIT"
] | 361 | 2019-04-17T13:34:32.000Z | 2022-03-28T04:42:45.000Z | def test():
assert Span.has_extension(
"wikipedia_url"
), "Hast du die Span-Erweiterung korrekt registriert?"
ext = Span.get_extension("wikipedia_url")
assert ext[2] is not None, "Hast du die Getter-Funktion korrekt angegeben?"
assert (
"getter=get_wikipedia_url" in __solution__
... | 43.083333 | 83 | 0.680851 |
e3d22bc0a7b5933c225c4e8681f55fa28be4b9de | 1,839 | py | Python | src/tests/validate_block.py | TimmMoetz/blockchain-lab | 02bb55cc201586dbdc8fdc252a32381f525e83ff | [
"RSA-MD"
] | 2 | 2021-11-08T12:00:02.000Z | 2021-11-12T18:37:52.000Z | src/tests/validate_block.py | TimmMoetz/blockchain-lab | 02bb55cc201586dbdc8fdc252a32381f525e83ff | [
"RSA-MD"
] | null | null | null | src/tests/validate_block.py | TimmMoetz/blockchain-lab | 02bb55cc201586dbdc8fdc252a32381f525e83ff | [
"RSA-MD"
] | 1 | 2022-03-28T13:49:37.000Z | 2022-03-28T13:49:37.000Z | from src.blockchain.block import Transaction, Block
from src.blockchain.blockchain import Blockchain
import time
blockchain = Blockchain()
transactions = [Transaction("Leon", "Timme", 10.0),
Transaction("Leon", "Jan", 50.0)]
blockchain.add_block(transactions)
time.sleep(1)
transactions2 = [T... | 28.292308 | 55 | 0.674823 |
e3d5ad0c26c948ab9b8157503ed01f55bebe1289 | 14,605 | py | Python | dash/models.py | bdioui/DashboardFeder | 455737c828f1c04651af495f60d6637131b911f5 | [
"MIT"
] | null | null | null | dash/models.py | bdioui/DashboardFeder | 455737c828f1c04651af495f60d6637131b911f5 | [
"MIT"
] | null | null | null | dash/models.py | bdioui/DashboardFeder | 455737c828f1c04651af495f60d6637131b911f5 | [
"MIT"
] | null | null | null | from django.db import models
from django.contrib.auth.models import User
from datetime import date
class Profile(models.Model):
user = models.OneToOneField(User, on_delete=models.CASCADE)
user_data = models.FileField(upload_to='user_data',blank = True, null=True)
indicateurs_data = models.FileField(upload_to='indi... | 51.975089 | 95 | 0.720986 |
5868128611a36e4087f9f95e2989ffebc97dbaf2 | 1,720 | py | Python | tools/drupal/python/drupal-sync/xml-parse.py | bl4ckic3/format-corpus | 97a8bf726d56106f3d7e5c8c481e26da7f5cc86e | [
"Apache-2.0"
] | 1 | 2020-11-26T22:43:22.000Z | 2020-11-26T22:43:22.000Z | tools/drupal/python/drupal-sync/xml-parse.py | bl4ckic3/format-corpus | 97a8bf726d56106f3d7e5c8c481e26da7f5cc86e | [
"Apache-2.0"
] | null | null | null | tools/drupal/python/drupal-sync/xml-parse.py | bl4ckic3/format-corpus | 97a8bf726d56106f3d7e5c8c481e26da7f5cc86e | [
"Apache-2.0"
] | null | null | null | import json, lxml, pprint, fido.prepare
from lxml import objectify
class objectJSONEncoder(json.JSONEncoder):
"""A specialized JSON encoder that can handle simple lxml objectify types
>>> from lxml import objectify
>>> obj = objectify.fromstring("<Book><price>1.50</price><author>W. Shakespeare</autho... | 33.72549 | 104 | 0.686628 |
5880de92504124bcb89ecc7a5e9930c6ffbad38a | 11,579 | py | Python | enf_analysis.py | thomas-osgood/ENF_Analysis | 836989bd9c683af324704c754140e131af8e70c6 | [
"MIT"
] | 1 | 2022-03-27T00:37:28.000Z | 2022-03-27T00:37:28.000Z | enf_analysis.py | thomas-osgood/ENF_Analysis | 836989bd9c683af324704c754140e131af8e70c6 | [
"MIT"
] | null | null | null | enf_analysis.py | thomas-osgood/ENF_Analysis | 836989bd9c683af324704c754140e131af8e70c6 | [
"MIT"
] | null | null | null | #!/usr/bin/python3
"""
Program Name: enf_analysis.py
Created By: Thomas Osgood
Description:
Program designed to extract ENF traces from audio files.
"""
# Import Required Libraries
import librosa
import librosa.display
import matplotlib.pyplot as plt
import numpy as np
import scipy
from scipy.io import wavfile
imp... | 29.997409 | 132 | 0.614043 |
58a7f30093435738b5c69a764edfa18889b6f251 | 5,531 | py | Python | frappe-bench/apps/erpnext/erpnext/hr/doctype/leave_allocation/leave_allocation.py | Semicheche/foa_frappe_docker | a186b65d5e807dd4caf049e8aeb3620a799c1225 | [
"MIT"
] | null | null | null | frappe-bench/apps/erpnext/erpnext/hr/doctype/leave_allocation/leave_allocation.py | Semicheche/foa_frappe_docker | a186b65d5e807dd4caf049e8aeb3620a799c1225 | [
"MIT"
] | null | null | null | frappe-bench/apps/erpnext/erpnext/hr/doctype/leave_allocation/leave_allocation.py | Semicheche/foa_frappe_docker | a186b65d5e807dd4caf049e8aeb3620a799c1225 | [
"MIT"
] | null | null | null | # Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors
# License: GNU General Public License v3. See license.txt
from __future__ import unicode_literals
import frappe
from frappe.utils import flt, date_diff, formatdate
from frappe import _
from frappe.model.document import Document
from erpnext.hr.utils ... | 44.248 | 183 | 0.777617 |
b7411bea6f570f640979663117116447df7b8b78 | 891 | py | Python | 30 Days of Code/30DOC-day-29/30DoC_day_29.py | nirobio/puzzles | fda8c84d8eefd93b40594636fb9b7f0fde02b014 | [
"MIT"
] | null | null | null | 30 Days of Code/30DOC-day-29/30DoC_day_29.py | nirobio/puzzles | fda8c84d8eefd93b40594636fb9b7f0fde02b014 | [
"MIT"
] | null | null | null | 30 Days of Code/30DOC-day-29/30DoC_day_29.py | nirobio/puzzles | fda8c84d8eefd93b40594636fb9b7f0fde02b014 | [
"MIT"
] | null | null | null | # given set S = {1,2,3, ...,N}, find two integers, A & B (where A < B).
# from set S, such that the value of A&B is the max. possible and also
# less than a given integer, K. In this case, & represents the bitwise
# AND operator.
# input = N and K, respectively.
# Operator Example Meaning
# & a & b Bitwise ... | 20.25 | 71 | 0.540965 |
3fc5b62607346d24d946816bb147ec170c3f8000 | 1,107 | py | Python | 904/Fcat_904.py | Leetcode-Secret-Society/warehouse | 40d7969683b1296f361e799cda37f15ceec52af8 | [
"MIT"
] | null | null | null | 904/Fcat_904.py | Leetcode-Secret-Society/warehouse | 40d7969683b1296f361e799cda37f15ceec52af8 | [
"MIT"
] | null | null | null | 904/Fcat_904.py | Leetcode-Secret-Society/warehouse | 40d7969683b1296f361e799cda37f15ceec52af8 | [
"MIT"
] | null | null | null | from typing import List
class Solution:
def totalFruit(self, fruits: List[int]) -> int:
first_fruit = fruits[0]
second_fruit = None
i = 1
fruit_count = 1
max_fruit = 1
last_diff_index = 0
while i < len(fruits):
if fruits[i] != first_fruit:
... | 33.545455 | 59 | 0.519422 |
b780cc8f7d578353979301ecc638b23f17e2c823 | 1,164 | py | Python | src/test/tests/operators/sph_resample.py | visit-dav/vis | c08bc6e538ecd7d30ddc6399ec3022b9e062127e | [
"BSD-3-Clause"
] | 226 | 2018-12-29T01:13:49.000Z | 2022-03-30T19:16:31.000Z | src/test/tests/operators/sph_resample.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/operators/sph_resample.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: sph_resample.py
#
# Tests: mesh - 2D rectilinear, single domain,
# plots - pseudocolor
#
# Defect ID: 2338
#
# Programmer: Kevin Griffin
# Date: Wed Jul 22 17:36:55 PDT ... | 22.823529 | 78 | 0.641753 |
4d5ecefdc956d1c984df863eda876dd36a99bbfb | 3,454 | py | Python | dndLite.py | Bertik23/spg | f6449f1ca8f3a869f0f493f3988b3d84901c1be0 | [
"MIT"
] | null | null | null | dndLite.py | Bertik23/spg | f6449f1ca8f3a869f0f493f3988b3d84901c1be0 | [
"MIT"
] | null | null | null | dndLite.py | Bertik23/spg | f6449f1ca8f3a869f0f493f3988b3d84901c1be0 | [
"MIT"
] | null | null | null | import random
import time
creatureTypes = [["Krysa",3,2,10],
["potkan",4,3,15],
["veverka",2,4,15],
["Vlk",6,4,20],
["Bobo",7,7,25],
["Tygr",12,13,30],
["Lev",13,12,35],
["Medvěd",15,11,50],
["Drak",20,20,10... | 34.19802 | 114 | 0.519687 |
4d919ee6d5fa2d494af65f822c4a852a72145176 | 489 | py | Python | algorithms/ar-bsrt/python2/bubble_sort.py | NuclearCactus/FOSSALGO | eb66f3bdcd6c42c66e8fc7110a32ac021596ca66 | [
"MIT"
] | 59 | 2018-09-11T17:40:25.000Z | 2022-03-03T14:40:39.000Z | algorithms/ar-bsrt/python2/bubble_sort.py | RitvikDayal/FOSSALGO | ae225a5fffbd78d0dff83fd7b178ba47bfd7a769 | [
"MIT"
] | 468 | 2018-08-28T17:04:29.000Z | 2021-12-03T15:16:34.000Z | algorithms/ar-bsrt/python2/bubble_sort.py | RitvikDayal/FOSSALGO | ae225a5fffbd78d0dff83fd7b178ba47bfd7a769 | [
"MIT"
] | 253 | 2018-08-28T17:08:51.000Z | 2021-11-01T12:30:39.000Z | # Bubble sort function
def bubbleSort(arr):
n = len(arr)
for i in range(n-1):
for j in range(0, n-i-1):
# Swap if current element is greater than next element
if (arr[j]>arr[j+1]):
arr[j], arr[j+1] = arr[j+1], arr[j]
# Function to print an array
def printArray(arr):
for i in arr:
print "%d" % i,
# Te... | 22.227273 | 57 | 0.621677 |
4dea59e269205bb5bc7aaaa7727cb16505a7569d | 5,791 | py | Python | research/cv/SRGAN/src/dataset/traindataset.py | leelige/mindspore | 5199e05ba3888963473f2b07da3f7bca5b9ef6dc | [
"Apache-2.0"
] | null | null | null | research/cv/SRGAN/src/dataset/traindataset.py | leelige/mindspore | 5199e05ba3888963473f2b07da3f7bca5b9ef6dc | [
"Apache-2.0"
] | null | null | null | research/cv/SRGAN/src/dataset/traindataset.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... | 42.270073 | 120 | 0.60076 |
12af25e0e299b7d54137dc3bc8d9e364a59e08eb | 3,655 | py | Python | MathTools.py | siej88/FuzzyACO | 989a58049c8417cd023cfc312fb99d2649333ca7 | [
"MIT"
] | null | null | null | MathTools.py | siej88/FuzzyACO | 989a58049c8417cd023cfc312fb99d2649333ca7 | [
"MIT"
] | null | null | null | MathTools.py | siej88/FuzzyACO | 989a58049c8417cd023cfc312fb99d2649333ca7 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
"""
UNIVERSIDAD DE CONCEPCION
Departamento de Ingenieria Informatica y
Ciencias de la Computacion
Memoria de Titulo Ingenieria Civil Informatica
DETECCION DE BORDES EN IMAGENES DGGE USANDO UN
SISTEMA HIBRIDO ACO CON LOGICA DIFUSA
Autor: Sebastian Ignacio Espinoza Jimenez
Patrocinant... | 41.534091 | 96 | 0.64186 |
67b9948865e1db064eeacb75b690ceb50d23feab | 4,041 | py | Python | main.py | Sirallens/GMgPY | 7a715e53fd1e31fce3a5c369b14ac4ae7ec8fb17 | [
"MIT"
] | null | null | null | main.py | Sirallens/GMgPY | 7a715e53fd1e31fce3a5c369b14ac4ae7ec8fb17 | [
"MIT"
] | null | null | null | main.py | Sirallens/GMgPY | 7a715e53fd1e31fce3a5c369b14ac4ae7ec8fb17 | [
"MIT"
] | null | null | null | """Sample for finding magnetic field for a specific lat and long and altitude."""
from math import *
import networkx as nx
from networkx.utils import pairwise
from datetime import date
from geomag import WorldMagneticModel
# GLOBALS #
WMM = WorldMagneticModel('WMM.COF') # Read the data file
RADIUS_OF_EARTH = 6378.1 #... | 42.989362 | 202 | 0.650829 |
67c97e15066957ef0bec32089a9a2af70733a2c7 | 451 | py | Python | programm/error_handler.py | team172011/ps_cagebot | ab6f7bdbc74ad3baee3feebc4b7b0fa4f726b179 | [
"MIT"
] | null | null | null | programm/error_handler.py | team172011/ps_cagebot | ab6f7bdbc74ad3baee3feebc4b7b0fa4f726b179 | [
"MIT"
] | null | null | null | programm/error_handler.py | team172011/ps_cagebot | ab6f7bdbc74ad3baee3feebc4b7b0fa4f726b179 | [
"MIT"
] | null | null | null | from ctypes import *
from contextlib import contextmanager
ERROR_HANDLER_FUNC = CFUNCTYPE(None, c_char_p, c_int, c_char_p, c_int, c_char_p)
def py_error_handler(filename, line, function, err, fmt):
pass
c_error_handler = ERROR_HANDLER_FUNC(py_error_handler)
@contextmanager
def noalsaerr():
asound = cdll.Loa... | 28.1875 | 80 | 0.791574 |
db3319cb8667c608cf918785c66ccecfe1309a62 | 230 | py | Python | examples/exoplanet.py | wrobstory/feint | 9420e48d47052e14227cd6c878ebf67a4cbf5fd9 | [
"MIT"
] | 1 | 2017-06-12T17:37:54.000Z | 2017-06-12T17:37:54.000Z | examples/exoplanet.py | wrobstory/feint | 9420e48d47052e14227cd6c878ebf67a4cbf5fd9 | [
"MIT"
] | null | null | null | examples/exoplanet.py | wrobstory/feint | 9420e48d47052e14227cd6c878ebf67a4cbf5fd9 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
"""
Exoplanet Data Example
"""
import pandas as pd
import feint
path = 'data/exoplanet.eu_catalog.csv'
df = pd.read_csv(path)
exochart = feint.Chart(df, x=' mass', y=' radius')
exochart.to_template()
| 13.529412 | 50 | 0.669565 |
3f6b57622ccefb99cae3443a0c6e9eecfad38404 | 25,822 | py | Python | Packs/PicusAutomation/Integrations/Picus/Picus.py | diCagri/content | c532c50b213e6dddb8ae6a378d6d09198e08fc9f | [
"MIT"
] | 799 | 2016-08-02T06:43:14.000Z | 2022-03-31T11:10:11.000Z | Packs/PicusAutomation/Integrations/Picus/Picus.py | diCagri/content | c532c50b213e6dddb8ae6a378d6d09198e08fc9f | [
"MIT"
] | 9,317 | 2016-08-07T19:00:51.000Z | 2022-03-31T21:56:04.000Z | Packs/PicusAutomation/Integrations/Picus/Picus.py | diCagri/content | c532c50b213e6dddb8ae6a378d6d09198e08fc9f | [
"MIT"
] | 1,297 | 2016-08-04T13:59:00.000Z | 2022-03-31T23:43:06.000Z | import demistomock as demisto
from CommonServerPython import *
from CommonServerUserPython import *
import requests
import json
import traceback
from datetime import datetime, timedelta
import time
# Disable insecure warnings
requests.packages.urllib3.disable_warnings() # pylint: disable=no-member
# flake8: noqa
'... | 47.818519 | 231 | 0.70804 |
18c1eb6999521b673cd5a8ea91c5b568ffdfdab8 | 762 | py | Python | ISTp/2014/NEZAMOV_S_I/task_4_31.py | YukkaSarasti/pythonintask | eadf4245abb65f4400a3bae30a4256b4658e009c | [
"Apache-2.0"
] | null | null | null | ISTp/2014/NEZAMOV_S_I/task_4_31.py | YukkaSarasti/pythonintask | eadf4245abb65f4400a3bae30a4256b4658e009c | [
"Apache-2.0"
] | null | null | null | ISTp/2014/NEZAMOV_S_I/task_4_31.py | YukkaSarasti/pythonintask | eadf4245abb65f4400a3bae30a4256b4658e009c | [
"Apache-2.0"
] | null | null | null | # Задача 3. Вариант 31.
# Напишите программу, которая выводит имя, под которым скрывается Анна Андреевна Горенко. Дополнительно необходимо вывести область интересов указанной личности, место рождения, годы рождения и смерти (если человек умер), вычислить возраст на данный момент (или момент смерти). Для хранения всех н... | 108.857143 | 443 | 0.801837 |
8359eec11f1cedbe81305fb4072fffc5e2ea9a27 | 3,131 | py | Python | exercises/networking_selfpaced/networking-workshop/collections/ansible_collections/community/general/plugins/module_utils/source_control/bitbucket.py | tr3ck3r/linklight | 5060f624c235ecf46cb62cefcc6bddc6bf8ca3e7 | [
"MIT"
] | 17 | 2017-06-07T23:15:01.000Z | 2021-08-30T14:32:36.000Z | ansible/ansible/module_utils/source_control/bitbucket.py | SergeyCherepanov/ansible | 875711cd2fd6b783c812241c2ed7a954bf6f670f | [
"MIT"
] | 9 | 2017-06-25T03:31:52.000Z | 2021-05-17T23:43:12.000Z | ansible/ansible/module_utils/source_control/bitbucket.py | SergeyCherepanov/ansible | 875711cd2fd6b783c812241c2ed7a954bf6f670f | [
"MIT"
] | 3 | 2018-05-26T21:31:22.000Z | 2019-09-28T17:00:45.000Z | # -*- coding: utf-8 -*-
# Simplified BSD License (see licenses/simplified_bsd.txt or https://opensource.org/licenses/BSD-2-Clause)
# Make coding more python3-ish
from __future__ import (absolute_import, division, print_function)
import json
from ansible.module_utils._text import to_text
from ansible.module_utils.ba... | 32.614583 | 116 | 0.621207 |
55da29e62bf7be1674164138acf4a10133562b04 | 6,503 | py | Python | official/cv/crnn_seq2seq_ocr/src/cnn.py | leelige/mindspore | 5199e05ba3888963473f2b07da3f7bca5b9ef6dc | [
"Apache-2.0"
] | 77 | 2021-10-15T08:32:37.000Z | 2022-03-30T13:09:11.000Z | official/cv/crnn_seq2seq_ocr/src/cnn.py | leelige/mindspore | 5199e05ba3888963473f2b07da3f7bca5b9ef6dc | [
"Apache-2.0"
] | 3 | 2021-10-30T14:44:57.000Z | 2022-02-14T06:57:57.000Z | official/cv/crnn_seq2seq_ocr/src/cnn.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.178571 | 117 | 0.602799 |
182189f3211955967c828b45c58592678db1d186 | 2,438 | py | Python | kts/stl/numeric.py | konodyuk/kts | 3af5ccbf1d2089cb41d171626fcde4b0ba5aa8a7 | [
"MIT"
] | 18 | 2019-02-14T13:10:07.000Z | 2021-11-26T07:10:13.000Z | kts/stl/numeric.py | konodyuk/kts | 3af5ccbf1d2089cb41d171626fcde4b0ba5aa8a7 | [
"MIT"
] | 2 | 2019-02-17T14:06:42.000Z | 2019-09-15T18:05:54.000Z | kts/stl/numeric.py | konodyuk/kts | 3af5ccbf1d2089cb41d171626fcde4b0ba5aa8a7 | [
"MIT"
] | 2 | 2019-09-15T13:12:42.000Z | 2020-04-15T14:05:54.000Z | import copy
import pandas as pd
from sklearn.preprocessing import StandardScaler
from kts.core.base_constructors import empty_like, wrap_stl_function
from kts.stl.misc import get_numeric
def discretize(cols, bins, prefix="disc_"):
"""
Args:
cols:
bins:
prefix: (Default value = 'disc_')
... | 27.704545 | 79 | 0.525021 |
a122ce260de6575f8378eb553114d55f74890c7b | 1,271 | py | Python | mod/models/srtp.py | HeraldStudio/wechat | b023b7460a6b4284ea782333e13f24d169ddaff4 | [
"MIT"
] | 1 | 2015-06-28T15:26:52.000Z | 2015-06-28T15:26:52.000Z | mod/models/srtp.py | HeraldStudio/wechat | b023b7460a6b4284ea782333e13f24d169ddaff4 | [
"MIT"
] | null | null | null | mod/models/srtp.py | HeraldStudio/wechat | b023b7460a6b4284ea782333e13f24d169ddaff4 | [
"MIT"
] | 6 | 2015-03-20T16:36:22.000Z | 2021-08-28T07:58:18.000Z | # -*- coding: utf-8 -*-
# @Date : 2014-07-02 01:20:10
# @Author : xindervella@gamil.com
from sqlalchemy import Column, String, Integer
from sqlalchemy.ext.declarative import declarative_base
from db import engine
Base = declarative_base()
class Overview(Base):
__tablename__ = 'srtp_overview'
... | 29.55814 | 63 | 0.65775 |
a1512ed9b776ae8293a5a1d47e4ef95447b0fb8b | 208 | py | Python | frappe-bench/apps/erpnext/erpnext/patches/v8_7/add_more_gst_fields.py | Semicheche/foa_frappe_docker | a186b65d5e807dd4caf049e8aeb3620a799c1225 | [
"MIT"
] | null | null | null | frappe-bench/apps/erpnext/erpnext/patches/v8_7/add_more_gst_fields.py | Semicheche/foa_frappe_docker | a186b65d5e807dd4caf049e8aeb3620a799c1225 | [
"MIT"
] | null | null | null | frappe-bench/apps/erpnext/erpnext/patches/v8_7/add_more_gst_fields.py | Semicheche/foa_frappe_docker | a186b65d5e807dd4caf049e8aeb3620a799c1225 | [
"MIT"
] | null | null | null | import frappe
from erpnext.regional.india.setup import make_custom_fields
def execute():
company = frappe.get_all('Company', filters = {'country': 'India'})
if not company:
return
make_custom_fields() | 23.111111 | 68 | 0.754808 |
62f9b796202f92ba496202b008d9d2e8e4491b0a | 3,879 | py | Python | docker-desktop/vnc/docker-ubuntu-vnc-desktop/image/usr/local/lib/web/backend/run.py | smthkissinger/docker-images | 35e868295d04fa780325ada4168381f1e80e8fe4 | [
"BSD-3-Clause"
] | 63 | 2018-02-04T03:31:22.000Z | 2022-03-07T08:27:39.000Z | docker-desktop/vnc/docker-ubuntu-vnc-desktop/image/usr/local/lib/web/backend/run.py | smthkissinger/docker-images | 35e868295d04fa780325ada4168381f1e80e8fe4 | [
"BSD-3-Clause"
] | 7 | 2021-03-09T03:42:46.000Z | 2022-02-26T10:47:51.000Z | docker-desktop/vnc/docker-ubuntu-vnc-desktop/image/usr/local/lib/web/backend/run.py | smthkissinger/docker-images | 35e868295d04fa780325ada4168381f1e80e8fe4 | [
"BSD-3-Clause"
] | 40 | 2018-01-22T16:31:16.000Z | 2022-03-08T04:40:42.000Z | #!/usr/bin/env python
from __future__ import (
absolute_import, division, print_function, with_statement
)
import os
import time
import sys
import subprocess
from vnc.util import ignored
def main():
def run_with_reloader(main_func, extra_files=None, interval=3):
"""Run the given function in an indepen... | 31.795082 | 74 | 0.492137 |
02e010196089132ab467a7a817395b6e82a22135 | 15,164 | py | Python | examples/modular_household.py | sdickler/HiSim | 09a11d99f220f7cadb3cb7b09a6fce8f147243c8 | [
"MIT"
] | null | null | null | examples/modular_household.py | sdickler/HiSim | 09a11d99f220f7cadb3cb7b09a6fce8f147243c8 | [
"MIT"
] | null | null | null | examples/modular_household.py | sdickler/HiSim | 09a11d99f220f7cadb3cb7b09a6fce8f147243c8 | [
"MIT"
] | null | null | null | from typing import Optional, List, Union
from hisim.simulator import SimulationParameters
from hisim.components import occupancy
from hisim.components import price_signal
from hisim.components import weather
from hisim.components import pvs
from hisim.components import smart_device
from hisim.components import building... | 54.157143 | 214 | 0.615669 |
a7aea5387a32e7a9768a287d3cf96a11b4a940d1 | 2,538 | py | Python | taren/downloadlist.py | ThirtySomething/TaRen | ef09e8616c45bcb97afcea3ad4844ae6fade7525 | [
"MIT"
] | null | null | null | taren/downloadlist.py | ThirtySomething/TaRen | ef09e8616c45bcb97afcea3ad4844ae6fade7525 | [
"MIT"
] | null | null | null | taren/downloadlist.py | ThirtySomething/TaRen | ef09e8616c45bcb97afcea3ad4844ae6fade7525 | [
"MIT"
] | null | null | null | '''
******************************************************************************
Copyright 2020 ThirtySomething
******************************************************************************
This file is part of TaRen.
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and ... | 40.285714 | 85 | 0.62766 |
a7b0e0ebc205a356b823cf1271bc4f320a3d1bc5 | 30 | py | Python | Helloworld.py | Sniper013/Hacktoberfeststart | 55096ea54ff6706fa57d2d71deb0f5d6902eeac4 | [
"MIT"
] | null | null | null | Helloworld.py | Sniper013/Hacktoberfeststart | 55096ea54ff6706fa57d2d71deb0f5d6902eeac4 | [
"MIT"
] | 1 | 2020-10-16T11:54:49.000Z | 2020-10-16T11:54:49.000Z | Helloworld.py | Sniper013/Hacktoberfeststart | 55096ea54ff6706fa57d2d71deb0f5d6902eeac4 | [
"MIT"
] | null | null | null | print("Hello hacktober fest")
| 15 | 29 | 0.766667 |
025d5c5a7dd7682ea8988539ccfbf3f131b35e60 | 2,038 | py | Python | mqtt/mqttMapper/mqttApp/Handlers.py | icebear8/roboRinth | c0789a9faf978f31b0ed020d26fee2b04fb298ee | [
"MIT"
] | null | null | null | mqtt/mqttMapper/mqttApp/Handlers.py | icebear8/roboRinth | c0789a9faf978f31b0ed020d26fee2b04fb298ee | [
"MIT"
] | null | null | null | mqtt/mqttMapper/mqttApp/Handlers.py | icebear8/roboRinth | c0789a9faf978f31b0ed020d26fee2b04fb298ee | [
"MIT"
] | 1 | 2019-10-22T07:47:51.000Z | 2019-10-22T07:47:51.000Z | import json
import logging
logger = logging.getLogger(__name__)
orientation = dict()
orientations = ['N', 'E', 'S', 'W']
directions = ['F', 'R', 'B', 'L']
def symbolicOrientationFrom(robo, value):
return orientations[(value + orientation[robo]) % 4]
def symbolicDirectionFrom(robo, value):
... | 32.870968 | 146 | 0.617763 |
025e740173b035766283dda6839ff86a685e29de | 3,631 | py | Python | frappe-bench/apps/erpnext/erpnext/selling/report/sales_person_wise_transaction_summary/sales_person_wise_transaction_summary.py | Semicheche/foa_frappe_docker | a186b65d5e807dd4caf049e8aeb3620a799c1225 | [
"MIT"
] | null | null | null | frappe-bench/apps/erpnext/erpnext/selling/report/sales_person_wise_transaction_summary/sales_person_wise_transaction_summary.py | Semicheche/foa_frappe_docker | a186b65d5e807dd4caf049e8aeb3620a799c1225 | [
"MIT"
] | null | null | null | frappe-bench/apps/erpnext/erpnext/selling/report/sales_person_wise_transaction_summary/sales_person_wise_transaction_summary.py | Semicheche/foa_frappe_docker | a186b65d5e807dd4caf049e8aeb3620a799c1225 | [
"MIT"
] | null | null | null | # Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors
# License: GNU General Public License v3. See license.txt
from __future__ import unicode_literals
import frappe
from frappe import msgprint, _
from frappe.utils import flt
def execute(filters=None):
if not filters: filters = {}
columns = get_colu... | 34.580952 | 139 | 0.690719 |
5a1785a5768d02b738935538d0b39863cd1287fa | 743 | py | Python | tests/test_config.py | shipt/py-volley | 0114651478c8df7304d3fe3cb9f72998901bb3fe | [
"MIT"
] | 8 | 2022-02-24T14:59:24.000Z | 2022-03-31T04:37:55.000Z | tests/test_config.py | shipt/py-volley | 0114651478c8df7304d3fe3cb9f72998901bb3fe | [
"MIT"
] | 3 | 2022-02-27T17:08:52.000Z | 2022-03-18T13:11:01.000Z | tests/test_config.py | shipt/py-volley | 0114651478c8df7304d3fe3cb9f72998901bb3fe | [
"MIT"
] | 2 | 2022-02-24T15:03:07.000Z | 2022-03-15T03:12:00.000Z | import pytest
from pydantic.main import BaseModel
from volley.config import load_yaml
from volley.data_models import QueueMessage
from volley.queues import import_module_from_string
def test_load_yaml_success() -> None:
d = load_yaml("./example/volley_config.yml")
assert "queues" in d
assert isinstance(d... | 27.518519 | 79 | 0.764468 |
cecdfca848fad16a7bc57f2ab6dd8a330f906f3f | 285 | py | Python | vorl1-ueb1.py | haenno/FOM-BSc-WI-Semster3-Skriptsprachen-Python | bb34b6b1ba7e8fe7b22ce598a80d5011122c2d4a | [
"MIT"
] | null | null | null | vorl1-ueb1.py | haenno/FOM-BSc-WI-Semster3-Skriptsprachen-Python | bb34b6b1ba7e8fe7b22ce598a80d5011122c2d4a | [
"MIT"
] | null | null | null | vorl1-ueb1.py | haenno/FOM-BSc-WI-Semster3-Skriptsprachen-Python | bb34b6b1ba7e8fe7b22ce598a80d5011122c2d4a | [
"MIT"
] | null | null | null | # Übung/Aufgabe 1: Funktion Celsius zu Fahrenheit umrechnen (C = (F-32)/1.8 )
def tempCtoF(tempC):
return tempC * 1.8 + 32
while True:
tempC = float(input ("Bitte geben Sie die Temperatur in °C ein: "))
print ("Die Temperatur in Fahrenheit ist: %.2f" % (tempCtoF(tempC))) | 35.625 | 77 | 0.666667 |
0cf61ae239c97b06013b3dfe41d5ddf289d10bc6 | 1,324 | pyde | Python | sketches/frogger/frogger.pyde | kantel/processingpy | 74aae222e46f68d1c8f06307aaede3cdae65c8ec | [
"MIT"
] | 4 | 2018-06-03T02:11:46.000Z | 2021-08-18T19:55:15.000Z | sketches/frogger/frogger.pyde | kantel/processingpy | 74aae222e46f68d1c8f06307aaede3cdae65c8ec | [
"MIT"
] | null | null | null | sketches/frogger/frogger.pyde | kantel/processingpy | 74aae222e46f68d1c8f06307aaede3cdae65c8ec | [
"MIT"
] | 3 | 2019-12-23T19:12:51.000Z | 2021-04-30T14:00:31.000Z | from random import randint, choice
from frog import Frog
from lane import Lane
# bg = None
SAFETY = 0
CAR = 1
FLOAT = 2
GRID = 40
dx = dy = 0
WATER = color(124, 161, 192)
STREET = color(154, 154, 151)
GRASS = color(110, 170, 120)
SPEED = [-0.5, -0.75, 0.5, 0.75]
lanes = []
def reset_game():
global frog
frog ... | 24.981132 | 138 | 0.577039 |
33600e5ab29a563c44ad848e2c4590738c9d2c3c | 454 | py | Python | gestionTomaDatos/migrations/0007_auto_20210120_1853.py | AnuTor/UniNeuroLab | 5825f440d4663650f038083f3da05229cc5ada4f | [
"Apache-2.0"
] | 1 | 2021-01-09T01:20:45.000Z | 2021-01-09T01:20:45.000Z | gestionTomaDatos/migrations/0007_auto_20210120_1853.py | AnuTor/UniNeuroLab | 5825f440d4663650f038083f3da05229cc5ada4f | [
"Apache-2.0"
] | 1 | 2021-01-09T00:53:55.000Z | 2021-01-09T00:53:55.000Z | gestionTomaDatos/migrations/0007_auto_20210120_1853.py | AnuTor/UniNeuroLab | 5825f440d4663650f038083f3da05229cc5ada4f | [
"Apache-2.0"
] | 1 | 2021-01-07T23:57:28.000Z | 2021-01-07T23:57:28.000Z | # Generated by Django 2.2.17 on 2021-01-20 18:53
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('gestionTomaDatos', '0006_auto_20210120_1850'),
]
operations = [
migrations.AlterField(
model_name='protocoloclinico',
... | 23.894737 | 88 | 0.643172 |
4a1951e9e58a63103c1b73625a0b80322c35681f | 1,533 | py | Python | Course_3/Week_03/edit_distance.py | KnightZhang625/Stanford_Algorithm | 7dacbbfa50e7b0e8380cf500df24af60cb9f42df | [
"Apache-2.0"
] | null | null | null | Course_3/Week_03/edit_distance.py | KnightZhang625/Stanford_Algorithm | 7dacbbfa50e7b0e8380cf500df24af60cb9f42df | [
"Apache-2.0"
] | 1 | 2020-07-16T08:03:22.000Z | 2020-07-16T08:09:34.000Z | Course_3/Week_03/edit_distance.py | KnightZhang625/Stanford_Algorithm | 7dacbbfa50e7b0e8380cf500df24af60cb9f42df | [
"Apache-2.0"
] | null | null | null | # coding:utf-8
def calculateDistance(str_a, str_b):
length_a = len(str_a)
length_b = len(str_b)
distance = [[0 for _ in range(length_b+1)] for _ in range(length_a+1)]
batchtrace = [[None for _ in range(length_b+1)] for _ in range(length_a+1)]
for i in range(length_a+1):
for j in range(length_b+1):
... | 32.617021 | 90 | 0.553164 |
76c1e942d670b961d7c90306593660dad2e08756 | 2,865 | py | Python | Intro-Python-I/src/15_classes.py | tobias-fyi/01_intro_python | c56645291b8bce94d8511c3277fefba1fe8add89 | [
"MIT"
] | null | null | null | Intro-Python-I/src/15_classes.py | tobias-fyi/01_intro_python | c56645291b8bce94d8511c3277fefba1fe8add89 | [
"MIT"
] | 8 | 2020-03-24T17:47:23.000Z | 2022-03-12T00:33:21.000Z | cs/lambda_cs/01_intro_python/Intro-Python-I/src/15_classes.py | tobias-fyi/vela | b0b3d3c6dc3fa397c8c7a492098a02cf75e0ff82 | [
"MIT"
] | null | null | null | # Make a class LatLon that can be passed parameters `lat` and `lon` to the
# constructor
class LatLon:
def __init__(self, lat: float = None, lon: float = None):
"""Base class for representing location coordinates
:param lat [float] : Latitude, defaults to None
:param lon [float] :... | 33.705882 | 93 | 0.626876 |
4f3630ce0929e911aeb58b5984cb649814e18188 | 346 | py | Python | pacman-termux/test/pacman/tests/remove-assumeinstalled.py | Maxython/pacman-for-termux | 3b208eb9274cbfc7a27fca673ea8a58f09ebad47 | [
"MIT"
] | 23 | 2021-05-21T19:11:06.000Z | 2022-03-31T18:14:20.000Z | source/pacman-6.0.1/test/pacman/tests/remove-assumeinstalled.py | Scottx86-64/dotfiles-1 | 51004b1e2b032664cce6b553d2052757c286087d | [
"Unlicense"
] | 11 | 2021-05-21T12:08:44.000Z | 2021-12-21T08:30:08.000Z | source/pacman-6.0.1/test/pacman/tests/remove-assumeinstalled.py | Scottx86-64/dotfiles-1 | 51004b1e2b032664cce6b553d2052757c286087d | [
"Unlicense"
] | 1 | 2021-09-26T08:44:40.000Z | 2021-09-26T08:44:40.000Z | self.description = "Remove a package using --assume-installed"
lp1 = pmpkg("pkg1", "1.0-1")
lp2 = pmpkg("pkg2", "1.0-1")
lp2.depends = ["pkg1=1.0"]
for p in lp1, lp2:
self.addpkg2db("local", p);
self.args = "-R pkg1 --assume-installed pkg1=1.0"
self.addrule("PACMAN_RETCODE=0")
self.addrule("PKG_EXIST=pkg2")
self.a... | 23.066667 | 62 | 0.676301 |
8c1e6ecd2363ba79ca8ae2f5fe046e3c6dc38341 | 2,013 | py | Python | test/test_npu/test_network_ops/test_isfinite.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_isfinite.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_isfinite.py | Ascend/pytorch | 39849cf72dafe8d2fb68bd1679d8fd54ad60fcfc | [
"BSD-3-Clause"
] | null | null | null | # Copyright (c) 2020 Huawei Technologies Co., Ltd
# Copyright (c) 2019, Facebook CORPORATION.
# All rights reserved.
#
# Licensed under the BSD 3-Clause License (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# https://opensource.org/lice... | 34.706897 | 91 | 0.663686 |
8b32031d763add966d71bf1373cc7c036a2bd4e2 | 397 | py | Python | python_gui_tkinter/mail/mail_sendmail.py | SayanGhoshBDA/code-backup | 8b6135facc0e598e9686b2e8eb2d69dd68198b80 | [
"MIT"
] | 16 | 2018-11-26T08:39:42.000Z | 2019-05-08T10:09:52.000Z | python_gui_tkinter/mail/mail_sendmail.py | SayanGhoshBDA/code-backup | 8b6135facc0e598e9686b2e8eb2d69dd68198b80 | [
"MIT"
] | 8 | 2020-05-04T06:29:26.000Z | 2022-02-12T05:33:16.000Z | python_gui_tkinter/mail/mail_sendmail.py | SayanGhoshBDA/code-backup | 8b6135facc0e598e9686b2e8eb2d69dd68198b80 | [
"MIT"
] | 5 | 2020-02-11T16:02:21.000Z | 2021-02-05T07:48:30.000Z | from mail_EmailSender import EmailSender
from mail_Secrets import Secret # Build a class for this project
from mail_MailTemplate import MailTemplate
ob1 = EmailSender
ob1.sendmail("jimutbahanpal@gmail.com",
"jimutbahanpal@yahoo.com",
"Test mail in my software!",
MailTemplate.template,
MailTem... | 26.466667 | 73 | 0.735516 |
8c6bcb8eae7b8aabd49570a00f8a610f460a7015 | 19,019 | py | Python | fhirclient/r4models/measure_tests.py | Healthedata1/Flask-PL | 88a2f40ca430c4cbb9fbded7fc92fdc166ebb9f1 | [
"MIT"
] | null | null | null | fhirclient/r4models/measure_tests.py | Healthedata1/Flask-PL | 88a2f40ca430c4cbb9fbded7fc92fdc166ebb9f1 | [
"MIT"
] | null | null | null | fhirclient/r4models/measure_tests.py | Healthedata1/Flask-PL | 88a2f40ca430c4cbb9fbded7fc92fdc166ebb9f1 | [
"MIT"
] | null | null | null | #!/usr/bin/env python
# -*- coding: utf-8 -*-
#
# Generated from FHIR 4.0.0-a53ec6ee1b on 2019-05-07.
# 2019, SMART Health IT.
import os
import io
import unittest
import json
from . import measure
from .fhirdate import FHIRDate
class MeasureTests(unittest.TestCase):
def instantiate_from(self, ... | 69.666667 | 257 | 0.69357 |
8c7b7df98e515ad948a878052582663938f2b635 | 3,771 | py | Python | data/raspi/src/praxis/QualityAssurance2020/QASystem.py | softwareengel/softwareengel-blog | e24192c096be4361c7f7bbe00d2c3e8263c9fd0b | [
"MIT"
] | null | null | null | data/raspi/src/praxis/QualityAssurance2020/QASystem.py | softwareengel/softwareengel-blog | e24192c096be4361c7f7bbe00d2c3e8263c9fd0b | [
"MIT"
] | null | null | null | data/raspi/src/praxis/QualityAssurance2020/QASystem.py | softwareengel/softwareengel-blog | e24192c096be4361c7f7bbe00d2c3e8263c9fd0b | [
"MIT"
] | null | null | null | from MTTF import MTTFCalculator
from WestenDigitalRuleChecker import WesternDigitalRuleChecker
from Lights import Lights
class QASystem:
def __init__(self):
self.datapoints = []
self.measured_value = 0
# TODO Rufe den Konstruktor von MTTFCalculator (s. Datei MTTF)
# auf und speich... | 39.28125 | 109 | 0.675152 |
509953da32e724e5067b75646f5797965d501080 | 11,721 | py | Python | src/tools/data/ultrawrapper/UltraGrammar.py | visit-dav/vis | c08bc6e538ecd7d30ddc6399ec3022b9e062127e | [
"BSD-3-Clause"
] | 226 | 2018-12-29T01:13:49.000Z | 2022-03-30T19:16:31.000Z | src/tools/data/ultrawrapper/UltraGrammar.py | visit-dav/vis | c08bc6e538ecd7d30ddc6399ec3022b9e062127e | [
"BSD-3-Clause"
] | 5,100 | 2019-01-14T18:19:25.000Z | 2022-03-31T23:08:36.000Z | src/tools/data/ultrawrapper/UltraGrammar.py | visit-dav/vis | c08bc6e538ecd7d30ddc6399ec3022b9e062127e | [
"BSD-3-Clause"
] | 84 | 2019-01-24T17:41:50.000Z | 2022-03-10T10:01:46.000Z | import string
from pyparsing import *
#-----------------------------------------------------------------------------
# Operations/commands
#-----------------------------------------------------------------------------
mathOpsNoArg = ["sin", "cos", "tan", "atan", "asin", "acos", "abs", "ln", \
... | 36.858491 | 227 | 0.528794 |
e89be6145d2855f0667540555065facf3c26a069 | 171 | py | Python | DataStructures/LinkedList/HeadInsert.py | baby5/HackerRank | 1e68a85f40499adb9b52a4da16936f85ac231233 | [
"MIT"
] | null | null | null | DataStructures/LinkedList/HeadInsert.py | baby5/HackerRank | 1e68a85f40499adb9b52a4da16936f85ac231233 | [
"MIT"
] | null | null | null | DataStructures/LinkedList/HeadInsert.py | baby5/HackerRank | 1e68a85f40499adb9b52a4da16936f85ac231233 | [
"MIT"
] | null | null | null | def Insert_stupid(head, data):
if head:
return Node(data, head)
else:
return Node(data)
def Insert_smart(head, data):
return Node(data, head)
| 19 | 31 | 0.625731 |
fa04f5c2c931ec8f7de48fb4df293f11782a52f0 | 721 | py | Python | src/main/python/atorlib/__init__.py | BikeAtor/WoMoAtor | 700cc8b970dcfdd5af2f471df1a223d2a38cb1bf | [
"Apache-2.0"
] | null | null | null | src/main/python/atorlib/__init__.py | BikeAtor/WoMoAtor | 700cc8b970dcfdd5af2f471df1a223d2a38cb1bf | [
"Apache-2.0"
] | null | null | null | src/main/python/atorlib/__init__.py | BikeAtor/WoMoAtor | 700cc8b970dcfdd5af2f471df1a223d2a38cb1bf | [
"Apache-2.0"
] | null | null | null | import sys
import logging
from .blebase import BleBase
try:
import bluepy
from .blebluepybase import BleBluepyBase
except:
logging.warning("no BleBluepyBase")
logging.warning(sys.exc_info(), exc_info=True)
pass
try:
import bleak
from .blebleakbase import BleBleakBase
except:
logging.warn... | 20.6 | 56 | 0.736477 |
3afd95a5b4809d2d1d2c8f98de0ebd49bfd2b2b3 | 1,100 | py | Python | rev/lonk/dist/lib.py | b01lers/circle-city-ctf-2021 | 5d6c341f8d9647487dc69df84a4bea5e61d7ca43 | [
"MIT"
] | 9 | 2021-06-13T19:33:53.000Z | 2021-10-04T13:17:26.000Z | CircleCityCon/2021/rev/Lonk/lib-7f31611a11cc4383f173fae857587a59.py | ruhan-islam/ctf-archives | 8c2bf6a608c821314d1a1cfaa05a6cccef8e3103 | [
"MIT"
] | 1 | 2021-06-13T23:20:05.000Z | 2021-06-13T23:20:05.000Z | CircleCityCon/2021/rev/Lonk/lib-7f31611a11cc4383f173fae857587a59.py | ruhan-islam/ctf-archives | 8c2bf6a608c821314d1a1cfaa05a6cccef8e3103 | [
"MIT"
] | 1 | 2021-06-14T02:09:46.000Z | 2021-06-14T02:09:46.000Z | class 我:
def __init__(self, n=None):
self.n = n
def 非(a):
h = 我()
c = h
while a > 0:
c.n = 我()
c = c.n
a -= 1
return h.n
def 常(a):
i = 0
while a:
i += 1
a = a.n
return i
def 需(a):
h = 我()
b = h
while a:
b.n = 我()
... | 11.22449 | 40 | 0.33 |
a8f9c2081228898f9ebdfbb2678c6e18f6315dfe | 5,942 | py | Python | lib/utils.py | orithena/moerderspiel | 7a11598cd80f26824376207805d3a937b9c1d831 | [
"MIT"
] | 16 | 2015-09-30T13:45:07.000Z | 2022-01-31T16:45:50.000Z | lib/utils.py | orithena/moerderspiel | 7a11598cd80f26824376207805d3a937b9c1d831 | [
"MIT"
] | 5 | 2015-09-16T13:44:08.000Z | 2018-02-06T11:24:59.000Z | lib/utils.py | orithena/moerderspiel | 7a11598cd80f26824376207805d3a937b9c1d831 | [
"MIT"
] | 4 | 2015-05-28T17:39:55.000Z | 2022-01-29T01:27:42.000Z | # -*- coding: utf-8 -*-
from __future__ import print_function
import sys
import datetime
import smtplib
import mimetypes
import os
import os.path
import math
import colorsys
import random
from genshi.template import NewTextTemplate
from genshi.template import TemplateLoader
from genshi import Stream
from genshi.inpu... | 22.422642 | 106 | 0.656176 |
66ff2eb78a4932ead09b722137b20091056dcf31 | 2,031 | py | Python | src/test/tests/plots/surface.py | visit-dav/vis | c08bc6e538ecd7d30ddc6399ec3022b9e062127e | [
"BSD-3-Clause"
] | 226 | 2018-12-29T01:13:49.000Z | 2022-03-30T19:16:31.000Z | src/test/tests/plots/surface.py | visit-dav/vis | c08bc6e538ecd7d30ddc6399ec3022b9e062127e | [
"BSD-3-Clause"
] | 5,100 | 2019-01-14T18:19:25.000Z | 2022-03-31T23:08:36.000Z | src/test/tests/plots/surface.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: surface.py
#
# Tests: mesh - 2D structured, single domain
# - 2D rectilinear, single domain
# plots - surface
#
# Defect ID: none
#
# Programmer: Kath... | 20.108911 | 78 | 0.634663 |
0e66862b2af1997679c15a7dee5b88afd38ef46c | 139,152 | py | Python | src/main.py | krzem5/Boot_Program | 823de3f6e4ab9fc97402cb37b158db3d4c504936 | [
"BSD-3-Clause"
] | null | null | null | src/main.py | krzem5/Boot_Program | 823de3f6e4ab9fc97402cb37b158db3d4c504936 | [
"BSD-3-Clause"
] | null | null | null | src/main.py | krzem5/Boot_Program | 823de3f6e4ab9fc97402cb37b158db3d4c504936 | [
"BSD-3-Clause"
] | null | null | null | import ctypes
import ctypes.wintypes
import math
import msvcrt
import os
import re
import regex
import requests
import sys
import tarfile
import time
import yaml
import zipfile
__file__=os.path.abspath(__file__).replace("\\","/")
__file_base_dir__=__file__[:-len(__file__.split("/")[-1])-4].rstrip("/")+"/"
__executab... | 44.542894 | 1,049 | 0.659078 |
cb83272940972e679f57044a57b090335adbc907 | 10,841 | py | Python | src/main/python/ble_temperature_sensor/sensorgui.py | BikeAtor/WoMoAtor | 700cc8b970dcfdd5af2f471df1a223d2a38cb1bf | [
"Apache-2.0"
] | null | null | null | src/main/python/ble_temperature_sensor/sensorgui.py | BikeAtor/WoMoAtor | 700cc8b970dcfdd5af2f471df1a223d2a38cb1bf | [
"Apache-2.0"
] | null | null | null | src/main/python/ble_temperature_sensor/sensorgui.py | BikeAtor/WoMoAtor | 700cc8b970dcfdd5af2f471df1a223d2a38cb1bf | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/env python3
import sys
sys.path.append('..')
import os
import logging
import threading
import time
import ble_temperature_sensor
import atorlib
# GUI
import tkinter as tk
import tkinter.font as tkFont
import tkinter.tix as tix
import cairosvg
import io
from PIL import Image, ImageTk
class SensorGUI(ator... | 43.364 | 142 | 0.516373 |
cb9f3794f5c681e4b11074a552650b50068c1567 | 1,663 | py | Python | src/onegov/gazette/models/principal.py | politbuero-kampagnen/onegov-cloud | 20148bf321b71f617b64376fe7249b2b9b9c4aa9 | [
"MIT"
] | null | null | null | src/onegov/gazette/models/principal.py | politbuero-kampagnen/onegov-cloud | 20148bf321b71f617b64376fe7249b2b9b9c4aa9 | [
"MIT"
] | null | null | null | src/onegov/gazette/models/principal.py | politbuero-kampagnen/onegov-cloud | 20148bf321b71f617b64376fe7249b2b9b9c4aa9 | [
"MIT"
] | null | null | null | from yaml import safe_load
class Principal(object):
""" The principal is the political entity running the gazette app. """
CANTONS = {
'ag', 'ai', 'ar', 'be', 'bl', 'bs', 'fr', 'ge', 'gl', 'gr', 'ju', 'lu',
'ne', 'nw', 'ow', 'sg', 'sh', 'so', 'sz', 'tg', 'ti', 'ur', 'vd', 'vs',
'zg', ... | 28.672414 | 79 | 0.547204 |
69b96cd5b63df374710315e9dacaf7f6e0159d2a | 4,624 | py | Python | asteroid/masknn/base.py | groadabike/asteroid | 276d98346ab791d904fbfe79b9b8e374392dd128 | [
"MIT"
] | 1 | 2020-12-18T02:42:23.000Z | 2020-12-18T02:42:23.000Z | asteroid/masknn/base.py | groadabike/asteroid | 276d98346ab791d904fbfe79b9b8e374392dd128 | [
"MIT"
] | null | null | null | asteroid/masknn/base.py | groadabike/asteroid | 276d98346ab791d904fbfe79b9b8e374392dd128 | [
"MIT"
] | null | null | null | import numpy as np
import torch
from .. import complex_nn
class BaseUNet(torch.nn.Module):
"""Base class for u-nets with skip connections between encoders and decoders.
(For u-nets without skip connections, simply use a `nn.Sequential`.)
Args:
encoders (List[torch.nn.Module]): List of encoders
... | 38.533333 | 101 | 0.63776 |
69ce4f05bc54565406bcafa14cf9f2ff9550a1e7 | 2,473 | py | Python | PINp/2014/Chernov_M_S/task_10_27.py | YukkaSarasti/pythonintask | eadf4245abb65f4400a3bae30a4256b4658e009c | [
"Apache-2.0"
] | null | null | null | PINp/2014/Chernov_M_S/task_10_27.py | YukkaSarasti/pythonintask | eadf4245abb65f4400a3bae30a4256b4658e009c | [
"Apache-2.0"
] | null | null | null | PINp/2014/Chernov_M_S/task_10_27.py | YukkaSarasti/pythonintask | eadf4245abb65f4400a3bae30a4256b4658e009c | [
"Apache-2.0"
] | null | null | null | #Задача 10. Вариант 27.
#Напишите программу "Генератор персонажей" для игры. Пользователю должно быть предоставлено 30 пунктов, которые можно распределить между четырьмя характеристиками: Сила, Здоровье, Мудрость и Ловкость. Надо сделать так, чтобы пользователь мог не только брать эти пункты из общего "пула", но и воз... | 43.385965 | 372 | 0.538213 |
2a83d1548526a8dff6442241593d2e689d206067 | 3,606 | py | Python | src/universal_build/helpers/build_mkdocs.py | prototypefund/universal-build | 809e641d5cf9dc1378cd0e0e3ea6e79f773ae4e7 | [
"MIT"
] | 17 | 2020-11-20T15:58:02.000Z | 2022-02-06T19:18:20.000Z | src/universal_build/helpers/build_mkdocs.py | prototypefund/universal-build | 809e641d5cf9dc1378cd0e0e3ea6e79f773ae4e7 | [
"MIT"
] | 3 | 2021-02-17T13:47:44.000Z | 2021-10-14T13:53:15.000Z | src/universal_build/helpers/build_mkdocs.py | prototypefund/universal-build | 809e641d5cf9dc1378cd0e0e3ea6e79f773ae4e7 | [
"MIT"
] | 6 | 2020-11-23T09:51:26.000Z | 2022-02-11T13:46:57.000Z | """Utilities to help building MkDocs documentations."""
import os
import sys
from universal_build import build_utils
from universal_build.helpers.build_python import is_pipenv_environment
_PIPENV_RUN = "pipenv run"
def install_build_env(exit_on_error: bool = True) -> None:
"""Installs a new virtual environment... | 31.631579 | 104 | 0.679146 |
aabc2ea3901365969417aa171742fcb52f6d36f9 | 1,802 | py | Python | abstract_pre_deal3.py | pku601/LDA | a4bcd3e40ed2920dc29bf0270eab05b245ea003e | [
"Apache-2.0"
] | null | null | null | abstract_pre_deal3.py | pku601/LDA | a4bcd3e40ed2920dc29bf0270eab05b245ea003e | [
"Apache-2.0"
] | null | null | null | abstract_pre_deal3.py | pku601/LDA | a4bcd3e40ed2920dc29bf0270eab05b245ea003e | [
"Apache-2.0"
] | null | null | null | # -*- coding: utf-8 -*-
import codecs
import sys
import re
from stemming.porter2 import stem
import nltk
nltk.download('punkt')
nltk.download('averaged_perceptron_tagger')
nltk.download('wordnet')
from nltk.corpus import wordnet
from nltk import word_tokenize, pos_tag
from nltk.stem import WordNetLemmatizer
reload(sys... | 24.351351 | 67 | 0.634295 |
4f0cee688a114f10850170b913311051f12b2bba | 5,394 | py | Python | transonic/analyses/capturex.py | fluiddyn/transonic | a460e9f6d1139f79b668cb3306d1e8a7e190b72d | [
"BSD-3-Clause"
] | 88 | 2019-01-08T16:39:08.000Z | 2022-02-06T14:19:23.000Z | transonic/analyses/capturex.py | fluiddyn/transonic | a460e9f6d1139f79b668cb3306d1e8a7e190b72d | [
"BSD-3-Clause"
] | 13 | 2019-06-20T15:53:10.000Z | 2021-02-09T11:03:29.000Z | transonic/analyses/capturex.py | fluiddyn/transonic | a460e9f6d1139f79b668cb3306d1e8a7e190b72d | [
"BSD-3-Clause"
] | 1 | 2019-11-05T03:03:14.000Z | 2019-11-05T03:03:14.000Z | """Capture the external nodes used in functions
===============================================
"""
import gast as ast
from transonic.analyses import beniget
from transonic.analyses import extast
class CaptureX(ast.NodeVisitor):
"""Capture the external nodes used in functions, classes and blocks"""
def __i... | 29.47541 | 81 | 0.525028 |
356f3bf1edc06bf677c1ebf507e8b9512eae1c74 | 119 | py | Python | Modulos/Matematica/__init__.py | Jonatan966/SODA | 046d8c1e7b9bac3a555526c9fe2f365c2b338aca | [
"MIT"
] | null | null | null | Modulos/Matematica/__init__.py | Jonatan966/SODA | 046d8c1e7b9bac3a555526c9fe2f365c2b338aca | [
"MIT"
] | null | null | null | Modulos/Matematica/__init__.py | Jonatan966/SODA | 046d8c1e7b9bac3a555526c9fe2f365c2b338aca | [
"MIT"
] | null | null | null | from .Smat_Areas import *
from .Smat_Volumes import *
from .Smat_Logaritmos import *
from .Smat_Trigonometria import *
| 23.8 | 33 | 0.798319 |
ea74f1b4098f667b624290cabce68ab4eb472b95 | 2,398 | py | Python | 05 beautifulsoup/arr_scraper.py | Cairo4/Python-KursX | 082726137791a59a88f8e13d9742fd9bed889075 | [
"MIT"
] | 7 | 2017-09-04T16:36:57.000Z | 2021-10-08T01:30:39.000Z | 05 beautifulsoup/arr_scraper.py | Cairo4/Python-KursX | 082726137791a59a88f8e13d9742fd9bed889075 | [
"MIT"
] | null | null | null | 05 beautifulsoup/arr_scraper.py | Cairo4/Python-KursX | 082726137791a59a88f8e13d9742fd9bed889075 | [
"MIT"
] | 12 | 2017-09-04T18:33:06.000Z | 2018-07-05T19:51:28.000Z |
# coding: utf-8
import requests
from bs4 import BeautifulSoup
import pandas as pd
url = "https://www.euroairport.com/en/flights/daily-arrivals.html"
response = requests.get(url)
arrivals_soup = BeautifulSoup(response.text, 'html.parser')
table = arrivals_soup.find('div', {'class': 'cblock modules-flights-flightlist... | 43.6 | 184 | 0.620517 |
ea77db2a0a494aa297d7ddc2a95089f8aa481ce7 | 1,024 | py | Python | IVTa/2014/MOSHKOV_Y_O/task_9_23.py | YukkaSarasti/pythonintask | eadf4245abb65f4400a3bae30a4256b4658e009c | [
"Apache-2.0"
] | null | null | null | IVTa/2014/MOSHKOV_Y_O/task_9_23.py | YukkaSarasti/pythonintask | eadf4245abb65f4400a3bae30a4256b4658e009c | [
"Apache-2.0"
] | null | null | null | IVTa/2014/MOSHKOV_Y_O/task_9_23.py | YukkaSarasti/pythonintask | eadf4245abb65f4400a3bae30a4256b4658e009c | [
"Apache-2.0"
] | null | null | null | # Задача 9. Вариант 23
# Создайте игру, в которой компьютер выбирает какое-либо слово,
# а игрок должен его отгадать. Компьютер сообщает игроку, сколько
# букв в слове, и дает пять попыток узнать, есть ли какая-либо буква
# в слове, причем программа может отвечать только "Да" и "Нет".
# Вслед за тем игрок должен попроб... | 32 | 68 | 0.673828 |
a4ba521c6b3cdb4ffd0705c473cc13b2afdec1c1 | 1,737 | py | Python | research/cv/fairmot/src/utils/tools.py | leelige/mindspore | 5199e05ba3888963473f2b07da3f7bca5b9ef6dc | [
"Apache-2.0"
] | 77 | 2021-10-15T08:32:37.000Z | 2022-03-30T13:09:11.000Z | research/cv/fairmot/src/utils/tools.py | leelige/mindspore | 5199e05ba3888963473f2b07da3f7bca5b9ef6dc | [
"Apache-2.0"
] | 3 | 2021-10-30T14:44:57.000Z | 2022-02-14T06:57:57.000Z | research/cv/fairmot/src/utils/tools.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.403846 | 78 | 0.554404 |
52a0f2a0ba2e408058641824353a9e26166ef3b9 | 242 | py | Python | pyScript/ui/w_ui_script.py | Shirazbello/Pyscriptining | 0f2c80a9bb10477d65966faeccc7783f20385c1b | [
"MIT"
] | 18 | 2021-01-18T09:52:41.000Z | 2022-03-22T10:48:44.000Z | Ryven/ui/w_ui_script.py | xamofb-xsk/Ryven | 8c3dcc613098863ae9fb747e62c0bb9d9eb4cef1 | [
"MIT"
] | null | null | null | Ryven/ui/w_ui_script.py | xamofb-xsk/Ryven | 8c3dcc613098863ae9fb747e62c0bb9d9eb4cef1 | [
"MIT"
] | 3 | 2021-01-18T09:49:42.000Z | 2022-03-22T10:48:47.000Z | from PySide2.QtWidgets import QWidget
from ui.ui_script import Ui_script_widget
class WUIScript(QWidget):
def __init__(self):
super(WUIScript, self).__init__()
self.ui = Ui_script_widget()
self.ui.setupUi(self) | 22 | 41 | 0.706612 |
52a59cf9ac78313a00546b8097875f857b044a64 | 3,840 | py | Python | 20-hs-redez-sem/groups/01-decentFS/misc/dfs_mockup.py | Kyrus1999/BACnet | 5be8e1377252166041bcd0b066cce5b92b077d06 | [
"MIT"
] | 8 | 2020-03-17T21:12:18.000Z | 2021-12-12T15:55:54.000Z | 20-hs-redez-sem/groups/01-decentFS/misc/dfs_mockup.py | Kyrus1999/BACnet | 5be8e1377252166041bcd0b066cce5b92b077d06 | [
"MIT"
] | 2 | 2021-07-19T06:18:43.000Z | 2022-02-10T12:17:58.000Z | 20-hs-redez-sem/groups/01-decentFS/misc/dfs_mockup.py | Kyrus1999/BACnet | 5be8e1377252166041bcd0b066cce5b92b077d06 | [
"MIT"
] | 25 | 2020-03-20T09:32:45.000Z | 2021-07-18T18:12:59.000Z | #!/usr/bin/env python3
# dfs_mockup.py
# distributed file system mockup (=mapped to a UNIX directory)
# Dec 2020 <christian.tschudin@unibas.ch>
import os
class DFS_MOCKUP: # decentralized file system, UNIX-based
# the commands are aligned with FTP's commands (rfc 959)
# also compare with API of Hyperdrive:... | 28.029197 | 80 | 0.526042 |
eafc23a124ade30ffdf0f25528d3a7c852578c9e | 36,310 | py | Python | RDS/circle2_use_cases/port/tests/lib/test_tokenservice.py | Sciebo-RDS/Sciebo-RDS | d71cf449ed045a2a7a049e2cb77c99fd5a9195bd | [
"MIT"
] | 10 | 2020-06-24T08:22:24.000Z | 2022-01-13T16:17:36.000Z | RDS/circle2_use_cases/port/tests/lib/test_tokenservice.py | Sciebo-RDS/Sciebo-RDS | d71cf449ed045a2a7a049e2cb77c99fd5a9195bd | [
"MIT"
] | 78 | 2020-01-23T14:32:06.000Z | 2022-03-07T14:11:16.000Z | RDS/circle2_use_cases/port/tests/lib/test_tokenservice.py | Sciebo-RDS/Sciebo-RDS | d71cf449ed045a2a7a049e2cb77c99fd5a9195bd | [
"MIT"
] | 1 | 2020-06-24T08:33:48.000Z | 2020-06-24T08:33:48.000Z | import jwt
from datetime import datetime, timedelta
import unittest
from unittest import mock
import pytest
import os
import json
from lib.TokenService import TokenService
from pactman import Consumer, Provider
from src import bootstrap
from RDS import Token, OAuth2Token, BaseService, OAuth2Service, User
from lib.Excep... | 38.62766 | 138 | 0.60493 |
d8081d4bf2c3f67c3222177eb08820225ffede92 | 530 | py | Python | python/api/index.py | SHI3DO/Caesium | ad525dc8c1ac431ff1272dbc3e91178242f84494 | [
"MIT"
] | 2 | 2021-12-17T14:14:22.000Z | 2021-12-20T09:54:55.000Z | python/api/index.py | SHI3DO/Caesium | ad525dc8c1ac431ff1272dbc3e91178242f84494 | [
"MIT"
] | null | null | null | python/api/index.py | SHI3DO/Caesium | ad525dc8c1ac431ff1272dbc3e91178242f84494 | [
"MIT"
] | null | null | null | from flask import Flask, request
import wolframalpha as wf
app = Flask(__name__)
@app.route('/')
@app.route('/home')
def home():
return 'Caesium'
@app.route('/wolframalpha/<key>')
def wolframalpha(key):
query = request.args.get('query')
print(query)
app_id = key
client = wf.Client(app_id)
... | 17.666667 | 39 | 0.620755 |
dc1fe5b75363cb300fa8f924722599f35404374d | 1,719 | py | Python | python/en/archive/topics/temp/nlp/python4data_science-cleaning_and_prepping_data-np_where.py | aimldl/coding | 70ddbfaa454ab92fd072ee8dc614ecc330b34a70 | [
"MIT"
] | null | null | null | python/en/archive/topics/temp/nlp/python4data_science-cleaning_and_prepping_data-np_where.py | aimldl/coding | 70ddbfaa454ab92fd072ee8dc614ecc330b34a70 | [
"MIT"
] | null | null | null | python/en/archive/topics/temp/nlp/python4data_science-cleaning_and_prepping_data-np_where.py | aimldl/coding | 70ddbfaa454ab92fd072ee8dc614ecc330b34a70 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
"""
python4data_science-cleaning_and_prepping_data-np_where.py
Cleaning and Prepping Data with Python for Data Science
— Best Practices and Helpful Packages
Robert R.F. DeFilippi
Oct 15, 2018 · 24 min read
https://medium.com/@rrfd/cleaning-and-prepping-data-with-python-for-data-science-... | 33.705882 | 129 | 0.62071 |
dc85de306aa4e1ab336cf0d051b3c47ce2073de2 | 760 | py | Python | Packs/JsonUnescape/Scripts/JsonUnescape/JsonUnescape.py | diCagri/content | c532c50b213e6dddb8ae6a378d6d09198e08fc9f | [
"MIT"
] | 799 | 2016-08-02T06:43:14.000Z | 2022-03-31T11:10:11.000Z | Packs/JsonUnescape/Scripts/JsonUnescape/JsonUnescape.py | diCagri/content | c532c50b213e6dddb8ae6a378d6d09198e08fc9f | [
"MIT"
] | 9,317 | 2016-08-07T19:00:51.000Z | 2022-03-31T21:56:04.000Z | Packs/JsonUnescape/Scripts/JsonUnescape/JsonUnescape.py | diCagri/content | c532c50b213e6dddb8ae6a378d6d09198e08fc9f | [
"MIT"
] | 1,297 | 2016-08-04T13:59:00.000Z | 2022-03-31T23:43:06.000Z | import json
import traceback
from typing import Dict, List, Union
import demistomock as demisto # noqa: F401
from CommonServerPython import * # noqa: F401
def hook(obj: Dict) -> Dict:
new_obj = {}
for k, v in obj.items():
try:
new_obj[k] = json.loads(v)
except Exception:
... | 22.352941 | 55 | 0.631579 |
52290a0393c5a81b078b1f12afdc6843a5a0bdae | 404 | py | Python | PMIa/2015/Velyan_A_S/task_1_6.py | YukkaSarasti/pythonintask | eadf4245abb65f4400a3bae30a4256b4658e009c | [
"Apache-2.0"
] | null | null | null | PMIa/2015/Velyan_A_S/task_1_6.py | YukkaSarasti/pythonintask | eadf4245abb65f4400a3bae30a4256b4658e009c | [
"Apache-2.0"
] | null | null | null | PMIa/2015/Velyan_A_S/task_1_6.py | YukkaSarasti/pythonintask | eadf4245abb65f4400a3bae30a4256b4658e009c | [
"Apache-2.0"
] | null | null | null | # Задача 1. Вариант 6.
# Напишите программу, которая будет сообщать род деятельности и псевдоним под которым скрывается Йоханнес Бруфельдт. После вывода информации программа должна дожидаться пока пользователь нажмет Enter для выхода.
# Velyan A. S.
# 27.05.2016
print("Йоханнес Бруфельдт более известен, как финский п... | 44.888889 | 211 | 0.792079 |
529009678c1481516de4a0891f380702de2acd4c | 2,645 | py | Python | biowardrobe_airflow_advanced/scripts/load_heatmap.py | Barski-lab/biowardrobe-airflow-advanced | e43aa268fd05635e8356788b8e814279b698263f | [
"Apache-2.0"
] | null | null | null | biowardrobe_airflow_advanced/scripts/load_heatmap.py | Barski-lab/biowardrobe-airflow-advanced | e43aa268fd05635e8356788b8e814279b698263f | [
"Apache-2.0"
] | 1 | 2018-09-30T16:57:06.000Z | 2018-09-30T16:57:06.000Z | biowardrobe_airflow_advanced/scripts/load_heatmap.py | Barski-lab/biowardrobe-airflow-advanced | e43aa268fd05635e8356788b8e814279b698263f | [
"Apache-2.0"
] | null | null | null | #! /usr/bin/env python3
import os
import sys
import argparse
import random
from json import dumps, load
def get_parser():
parser = argparse.ArgumentParser(description='BioWardrobe Airflow Advanced Load Heatmap', add_help=True)
parser.add_argument("-f", "--folder", help="Path to the folder with heatmap files... | 44.083333 | 218 | 0.589036 |
8703343d1c616f2f5cae0b0754e08846e0e965ae | 218 | py | Python | script_3_download.py | melioristic/FANPY | 2d68d222de4f1e6d6d802268253ce446cd924914 | [
"MIT"
] | 1 | 2021-04-23T19:47:51.000Z | 2021-04-23T19:47:51.000Z | script_3_download.py | melioristic/FANPY | 2d68d222de4f1e6d6d802268253ce446cd924914 | [
"MIT"
] | null | null | null | script_3_download.py | melioristic/FANPY | 2d68d222de4f1e6d6d802268253ce446cd924914 | [
"MIT"
] | null | null | null | from fanpy import download_era5_single
download_dir = '/data/compoundx/era_5_single/'
var = 'total_cloud_cover'
for year in range(1979,2019):
download_era5_single(var=var, download_dir = download_dir, year=year) | 27.25 | 73 | 0.788991 |
1d880643e7379443e29f4dfd03b1e33ab3b9813f | 2,811 | py | Python | Fastir_Collector/settings.py | Unam3dd/Train-2018-2020 | afb6ae70fe338cbe55a21b74648d91996b818fa2 | [
"MIT"
] | 4 | 2021-04-23T15:39:17.000Z | 2021-12-27T22:53:24.000Z | Fastir_Collector/settings.py | Unam3dd/Train-2018-2020 | afb6ae70fe338cbe55a21b74648d91996b818fa2 | [
"MIT"
] | null | null | null | Fastir_Collector/settings.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
import os
import ctypes
OS = "Windows"
FASTIR_ROOT = os.path.normpath(os.path.join(os.path.abspath(os.path.dirname(__file__)), "."))
EXTRACT_DUMP = {
"mft": ["csv_mft", "json_mft"],
"dd": ["csv_export_dd", "json_export_dd"],
"ram": ["csv_expo... | 38.506849 | 106 | 0.587335 |
d56eeb58ec9aaab62ece1483d95253840d92663b | 2,500 | py | Python | database.py | Scauting-Burgum/ScautDB | d848671aff29a14b458966820dbb8275cd2c3154 | [
"MIT"
] | null | null | null | database.py | Scauting-Burgum/ScautDB | d848671aff29a14b458966820dbb8275cd2c3154 | [
"MIT"
] | null | null | null | database.py | Scauting-Burgum/ScautDB | d848671aff29a14b458966820dbb8275cd2c3154 | [
"MIT"
] | null | null | null | class Database:
def __init__(self, filename):
if isinstance(filename, str):
self.filename = filename
else:
raise TypeError('Filename should be a string!')
def get_connection(self):
import sqlite3
# Return a connection to the database
return sqlite3.connect(self.filename)
@property
def... | 29.069767 | 126 | 0.6872 |
89449ebd6d1cb479eac6e7dc6a1b437a9711e9dd | 216 | py | Python | Algorithms/Implementation/SockMerchant.py | baby5/HackerRank | 1e68a85f40499adb9b52a4da16936f85ac231233 | [
"MIT"
] | null | null | null | Algorithms/Implementation/SockMerchant.py | baby5/HackerRank | 1e68a85f40499adb9b52a4da16936f85ac231233 | [
"MIT"
] | null | null | null | Algorithms/Implementation/SockMerchant.py | baby5/HackerRank | 1e68a85f40499adb9b52a4da16936f85ac231233 | [
"MIT"
] | null | null | null | #coding:utf-8
from collections import Counter
n = int(raw_input())
c_list = map(int, raw_input().split())
c_dict = Counter(c_list)
pair_num = 0
for key in c_dict:
pair_num += c_dict[key] / 2
print pair_num
| 13.5 | 38 | 0.694444 |
984f572a518ff0524ef70646530053d97c3ea00b | 2,491 | py | Python | tensorflow/basic-rl/tutorial2/cliff_Q.py | gopala-kr/ds-notebooks | bc35430ecdd851f2ceab8f2437eec4d77cb59423 | [
"MIT"
] | 1 | 2019-05-10T09:16:23.000Z | 2019-05-10T09:16:23.000Z | tensorflow/basic-rl/tutorial2/cliff_Q.py | gopala-kr/ds-notebooks | bc35430ecdd851f2ceab8f2437eec4d77cb59423 | [
"MIT"
] | null | null | null | tensorflow/basic-rl/tutorial2/cliff_Q.py | gopala-kr/ds-notebooks | bc35430ecdd851f2ceab8f2437eec4d77cb59423 | [
"MIT"
] | 1 | 2019-10-14T07:30:18.000Z | 2019-10-14T07:30:18.000Z | import cellular
import qlearn
import time
import sys
startCell = None
class Cell(cellular.Cell):
def __init__(self):
self.cliff = False
self.goal = False
self.wall = False
def colour(self):
if self.cliff:
return 'red'
if self.goal:
... | 23.951923 | 86 | 0.543958 |
9897523460f4203accf6f6f1b04965bf39d87e90 | 827 | py | Python | INBa/2015/Shirlin_V_V/task_4_32.py | YukkaSarasti/pythonintask | eadf4245abb65f4400a3bae30a4256b4658e009c | [
"Apache-2.0"
] | null | null | null | INBa/2015/Shirlin_V_V/task_4_32.py | YukkaSarasti/pythonintask | eadf4245abb65f4400a3bae30a4256b4658e009c | [
"Apache-2.0"
] | null | null | null | INBa/2015/Shirlin_V_V/task_4_32.py | YukkaSarasti/pythonintask | eadf4245abb65f4400a3bae30a4256b4658e009c | [
"Apache-2.0"
] | null | null | null | # Задача 4. Вариант 32
# Напишите программу, которая выводит имя, под которым скрывается Конрад Джозеф.
#Дополнительно необходимо вывести область интересов указанной личности, место рождения, годы рождения и смерти (если человек умер), вычислить возраст на данный момент (или момент смерти).
#Для хранения всех необход... | 43.526316 | 188 | 0.772672 |
f68ab54923d723d273fd1cc37d494fc900e7a42a | 4,719 | py | Python | tests/view/test_graphical_view.py | jonashellmann/informaticup21-team-chillow | f2e519af0a5d9a9368d62556703cfb1066ebb58f | [
"MIT"
] | 3 | 2021-01-17T23:32:07.000Z | 2022-01-30T14:49:16.000Z | tests/view/test_graphical_view.py | jonashellmann/informaticup21-team-chillow | f2e519af0a5d9a9368d62556703cfb1066ebb58f | [
"MIT"
] | 2 | 2021-01-17T13:37:56.000Z | 2021-04-14T12:28:49.000Z | tests/view/test_graphical_view.py | jonashellmann/informaticup21-team-chillow | f2e519af0a5d9a9368d62556703cfb1066ebb58f | [
"MIT"
] | 2 | 2021-04-02T14:53:38.000Z | 2021-04-20T11:10:17.000Z | import io
import unittest
from datetime import datetime
from unittest.mock import Mock, ANY, call, patch
from chillow.model.action import Action
from chillow.model.cell import Cell
from chillow.model.direction import Direction
from chillow.model.game import Game
from chillow.model.player import Player
from chillow.vie... | 39.325 | 105 | 0.668574 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.