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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
ca2cbfb1911cf3b74ba910ae87df5627e923c1db | 199 | py | Python | src/common/datasets/factory.py | AakashMallik/cnn-firefly | 6c8ed58a035e62682263753436b124cb979ed240 | [
"MIT"
] | null | null | null | src/common/datasets/factory.py | AakashMallik/cnn-firefly | 6c8ed58a035e62682263753436b124cb979ed240 | [
"MIT"
] | 7 | 2020-11-27T12:24:31.000Z | 2020-11-29T09:41:09.000Z | src/common/datasets/factory.py | AakashMallik/cnn-firefly | 6c8ed58a035e62682263753436b124cb979ed240 | [
"MIT"
] | null | null | null | from ..interfaces import FactoryInterface
from cifar10 import Cifar10
class DatasetFactory(FactoryInterface):
@classmethod
def generate(cls, name=None, options={}):
return Cifar10()
| 24.875 | 45 | 0.743719 |
ca76189ac5a9dba71f212cb384ff78a9742aa691 | 591 | py | Python | tarefas-poo/lista-01/calculos/view/paineis/painel_mdc.py | victoriaduarte/POO_UFSC | 0c65b4f26383d1e3038d8469bd91fd2c0cb98c1a | [
"MIT"
] | null | null | null | tarefas-poo/lista-01/calculos/view/paineis/painel_mdc.py | victoriaduarte/POO_UFSC | 0c65b4f26383d1e3038d8469bd91fd2c0cb98c1a | [
"MIT"
] | null | null | null | tarefas-poo/lista-01/calculos/view/paineis/painel_mdc.py | victoriaduarte/POO_UFSC | 0c65b4f26383d1e3038d8469bd91fd2c0cb98c1a | [
"MIT"
] | null | null | null | # --------------------------
# UFSC - CTC - INE - INE5603
# Exercício calculos
# --------------------------
# Classe responsável por determinar o Máximo Divisor Comum entre dois números inteiros.
from view.paineis.painel_abstrato import PainelAbstrato
from model.calculos import mdc
class PainelMDC(PainelAbstrato):
... | 31.105263 | 87 | 0.612521 |
b6baa568686fe37efd64285cd1235025d6abe213 | 748 | py | Python | jenkins/dcos-jenkins-service/scripts/plugin-list.py | smthkissinger/docker-images | 35e868295d04fa780325ada4168381f1e80e8fe4 | [
"BSD-3-Clause"
] | 63 | 2018-02-04T03:31:22.000Z | 2022-03-07T08:27:39.000Z | jenkins/dcos-jenkins-service/scripts/plugin-list.py | smthkissinger/docker-images | 35e868295d04fa780325ada4168381f1e80e8fe4 | [
"BSD-3-Clause"
] | 69 | 2016-12-27T11:31:36.000Z | 2020-06-23T07:29:31.000Z | jenkins/dcos-jenkins-service/scripts/plugin-list.py | smthkissinger/docker-images | 35e868295d04fa780325ada4168381f1e80e8fe4 | [
"BSD-3-Clause"
] | 57 | 2016-12-14T02:49:07.000Z | 2020-10-09T23:59:31.000Z | #!/usr/bin/env python3
"""Parses pom.xml and outputs a Markdown-friendly list of plugins and their
versions.
"""
import os
import xml.etree.ElementTree as ET
def main():
pom = os.path.join(os.path.dirname(os.path.abspath(__file__)), '../pom.xml')
tree = ET.parse(pom)
props = tree.find("{http://maven.apach... | 27.703704 | 80 | 0.617647 |
b6cf35467ab41e6b1225b2018dab3b6dc72a031a | 104 | py | Python | FuncoesCusto.py | petroniocandido/RNA | bdb727cc47baf0d8e04bce5af7e16ea3c07a6a3f | [
"MIT"
] | null | null | null | FuncoesCusto.py | petroniocandido/RNA | bdb727cc47baf0d8e04bce5af7e16ea3c07a6a3f | [
"MIT"
] | null | null | null | FuncoesCusto.py | petroniocandido/RNA | bdb727cc47baf0d8e04bce5af7e16ea3c07a6a3f | [
"MIT"
] | null | null | null |
def mse(y, yl, derivada = False):
if not derivada:
return ((y-yl)**2)/2
else:
return y-yl
| 13 | 33 | 0.567308 |
b663c62355a5cd4595dfe741f2619214233b9cdb | 25 | py | Python | python/python_backup/PRAC_PYTHON/15_importing_odule_fibo.py | SayanGhoshBDA/code-backup | 8b6135facc0e598e9686b2e8eb2d69dd68198b80 | [
"MIT"
] | 16 | 2018-11-26T08:39:42.000Z | 2019-05-08T10:09:52.000Z | python/python_backup/PRAC_PYTHON/15_importing_odule_fibo.py | SayanGhoshBDA/code-backup | 8b6135facc0e598e9686b2e8eb2d69dd68198b80 | [
"MIT"
] | 8 | 2020-05-04T06:29:26.000Z | 2022-02-12T05:33:16.000Z | python/python_backup/PRAC_PYTHON/15_importing_odule_fibo.py | SayanGhoshBDA/code-backup | 8b6135facc0e598e9686b2e8eb2d69dd68198b80 | [
"MIT"
] | 5 | 2020-02-11T16:02:21.000Z | 2021-02-05T07:48:30.000Z | fibo.14_fibo_module(100); | 25 | 25 | 0.84 |
bf431d2472d52749125bd65ebcaaa0f48e067b60 | 621 | py | Python | 1372/Fcat_1372_dfs.py | Leetcode-Secret-Society/warehouse | 40d7969683b1296f361e799cda37f15ceec52af8 | [
"MIT"
] | null | null | null | 1372/Fcat_1372_dfs.py | Leetcode-Secret-Society/warehouse | 40d7969683b1296f361e799cda37f15ceec52af8 | [
"MIT"
] | null | null | null | 1372/Fcat_1372_dfs.py | Leetcode-Secret-Society/warehouse | 40d7969683b1296f361e799cda37f15ceec52af8 | [
"MIT"
] | null | null | null | # Definition for a binary tree node.
class TreeNode:
def __init__(self, val=0, left=None, right=None):
self.val = val
self.left = left
self.right = right
class Solution:
def longestZigZag(self, root: TreeNode) -> int:
def dfs(node, length, last):
if not node:
... | 29.571429 | 84 | 0.521739 |
44b0c2b756a07ea7bdd13bcf5de1d2faf9c87565 | 431 | py | Python | server/apps/recommendation/migrations/0005_auto_20190428_2214.py | Mayandev/django_morec | 8d115f76ad69d7aa78b07dc06aa7047979ad134b | [
"MIT"
] | 129 | 2019-04-20T08:23:25.000Z | 2022-03-14T10:02:23.000Z | server/apps/recommendation/migrations/0005_auto_20190428_2214.py | heartplus/django_morec | 8d115f76ad69d7aa78b07dc06aa7047979ad134b | [
"MIT"
] | 9 | 2019-05-19T15:06:17.000Z | 2021-12-14T06:47:14.000Z | server/apps/recommendation/migrations/0005_auto_20190428_2214.py | heartplus/django_morec | 8d115f76ad69d7aa78b07dc06aa7047979ad134b | [
"MIT"
] | 34 | 2019-05-06T06:37:17.000Z | 2021-12-09T02:27:58.000Z | # Generated by Django 2.1.4 on 2019-04-28 22:14
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('recommendation', '0004_auto_20190428_2213'),
]
operations = [
migrations.AlterField(
model_name='recommendation',
na... | 22.684211 | 75 | 0.62877 |
15336480e281f890d5e8449994892a81c28b1bd4 | 2,805 | py | Python | project/views/event_date.py | DanielGrams/gsevp | e94034f7b64de76f38754b56455e83092378261f | [
"MIT"
] | 1 | 2021-06-01T14:49:18.000Z | 2021-06-01T14:49:18.000Z | project/views/event_date.py | DanielGrams/gsevp | e94034f7b64de76f38754b56455e83092378261f | [
"MIT"
] | 286 | 2020-12-04T14:13:00.000Z | 2022-03-09T19:05:16.000Z | project/views/event_date.py | DanielGrams/gsevpt | a92f71694388e227e65ed1b24446246ee688d00e | [
"MIT"
] | null | null | null | import json
from flask import redirect, render_template, request, url_for
from flask.wrappers import Response
from project import app
from project.access import can_read_event_or_401
from project.dateutils import create_icalendar
from project.forms.event_date import FindEventDateForm
from project.jsonld import DateTi... | 30.48913 | 84 | 0.743672 |
170e1d83b9ef84d6207543ed675ea36e212e0c25 | 212 | py | Python | ACM Training/2018-05-26/test.py | Wycers/Codelib | 86d83787aa577b8f2d66b5410e73102411c45e46 | [
"MIT"
] | 22 | 2018-08-07T06:55:10.000Z | 2021-06-12T02:12:19.000Z | ACM Training/2018-05-26/test.py | Wycers/Codelib | 86d83787aa577b8f2d66b5410e73102411c45e46 | [
"MIT"
] | 28 | 2020-03-04T23:47:22.000Z | 2022-02-26T18:50:00.000Z | ACM Training/2018-05-26/test.py | Wycers/Codelib | 86d83787aa577b8f2d66b5410e73102411c45e46 | [
"MIT"
] | 4 | 2019-11-09T15:41:26.000Z | 2021-10-10T08:56:57.000Z |
d = [5, -7, 4]
ans = 0
c = 3
for i in range(c):
s = 0
for j in range(i):
s += d[j]
ans -= (i + 1 + 1) * s
for i in range(c):
ans += (i + 1 + c + 2) * (c - i - 1 + 1) / 2 * d[i]
print(ans) | 17.666667 | 55 | 0.377358 |
e517df5fdb9f327b3f519ec2edbdf3abbb419731 | 456 | py | Python | frappe-bench/apps/erpnext/erpnext/patches/v8_0/rename_is_sample_item_to_allow_zero_valuation_rate.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/v8_0/rename_is_sample_item_to_allow_zero_valuation_rate.py | Semicheche/foa_frappe_docker | a186b65d5e807dd4caf049e8aeb3620a799c1225 | [
"MIT"
] | null | null | null | frappe-bench/apps/erpnext/erpnext/patches/v8_0/rename_is_sample_item_to_allow_zero_valuation_rate.py | Semicheche/foa_frappe_docker | a186b65d5e807dd4caf049e8aeb3620a799c1225 | [
"MIT"
] | 1 | 2021-04-29T14:39:01.000Z | 2021-04-29T14:39:01.000Z | from __future__ import unicode_literals
import frappe
from frappe.model.utils.rename_field import rename_field
def execute():
doc_list = ["Purchase Invoice Item", "Stock Entry Detail", "Delivery Note Item",
"Purchase Receipt Item", "Sales Invoice Item"]
for doctype in doc_list:
frappe.reload_doctype(doctype... | 35.076923 | 82 | 0.782895 |
e52d11a0a2e7168339d2ba706bc137796e9bc3e5 | 929 | py | Python | python/generator/iterator_solution.py | zeroam/TIL | 43e3573be44c7f7aa4600ff8a34e99a65cbdc5d1 | [
"MIT"
] | null | null | null | python/generator/iterator_solution.py | zeroam/TIL | 43e3573be44c7f7aa4600ff8a34e99a65cbdc5d1 | [
"MIT"
] | null | null | null | python/generator/iterator_solution.py | zeroam/TIL | 43e3573be44c7f7aa4600ff8a34e99a65cbdc5d1 | [
"MIT"
] | null | null | null | def check_prime(number):
for divisor in range(2, int(number ** 0.5) + 1):
if number % divisor == 0:
return False
return True
class Primes:
def __init__(self, max_):
# the maximum number of primes we want generated
self.max = max_
# start with this number to chec... | 25.805556 | 67 | 0.587729 |
e5aa279d6fdd8ab44994deaa24210db4cceb9b1c | 7,435 | py | Python | busigyo/welcomepage/views.py | chieteia/akemines | 243e84a782ef7d26295100eeb33aa7e2e2879a08 | [
"MIT"
] | null | null | null | busigyo/welcomepage/views.py | chieteia/akemines | 243e84a782ef7d26295100eeb33aa7e2e2879a08 | [
"MIT"
] | null | null | null | busigyo/welcomepage/views.py | chieteia/akemines | 243e84a782ef7d26295100eeb33aa7e2e2879a08 | [
"MIT"
] | null | null | null | from django.shortcuts import render
import requests
import geocoder
from .forms import TestForm,Form
# Create your views here.
#from django.http import HttpResponse
image_text = """
100 晴れ
101 晴れ時々くもり
102 晴れ一時雨
103 晴れ時々雨
104 晴れ一時雪
105 晴れ時々雪
106 晴れ一時雨か雪
107 晴れ時々雨か雪
108 晴れ一時雨か雷雨
110 晴れのち時々くもり
111 晴れのちくもり
112 晴れのち一時雨
1... | 20.943662 | 98 | 0.633759 |
00bd19a13d258c56be2a8d3ec85d60619373320a | 173 | py | Python | AdvancePython-master/chapter05/sequence_test.py | xuyifeiCoco/python | 83af27b3baf1caf157b330c580f356a94095e44d | [
"MIT"
] | 26 | 2019-09-17T12:48:36.000Z | 2022-02-24T12:27:01.000Z | AdvancePython-master/chapter05/sequence_test.py | xuyifeiCoco/python | 83af27b3baf1caf157b330c580f356a94095e44d | [
"MIT"
] | 2 | 2021-03-25T22:00:07.000Z | 2022-01-20T15:51:48.000Z | coding-200/chapter05/sequence_test.py | qsunny/python | ace8c3178a9a9619de2b60ca242c2079dd2f825e | [
"MIT"
] | 20 | 2019-05-31T14:21:00.000Z | 2021-07-27T15:58:25.000Z | my_list = []
my_list.append(1)
my_list.append("a")
from collections import abc
a = [1,2]
c = a + [3,4]
#就地加
# a += (3,4)
#
# a.extend(range(3))
a.append((1,2))
print(a) | 10.8125 | 27 | 0.578035 |
dadd8a604ab241aa7a05a554a6692afe80c3e388 | 2,469 | py | Python | 7-assets/past-student-repos/LambdaSchool-master/m6/61c1/src/comp/comp.py | eengineergz/Lambda | 1fe511f7ef550aed998b75c18a432abf6ab41c5f | [
"MIT"
] | null | null | null | 7-assets/past-student-repos/LambdaSchool-master/m6/61c1/src/comp/comp.py | eengineergz/Lambda | 1fe511f7ef550aed998b75c18a432abf6ab41c5f | [
"MIT"
] | null | null | null | 7-assets/past-student-repos/LambdaSchool-master/m6/61c1/src/comp/comp.py | eengineergz/Lambda | 1fe511f7ef550aed998b75c18a432abf6ab41c5f | [
"MIT"
] | null | null | null | # The following list comprehension exercises will make use of the
# defined Human class.
class Human:
def __init__(self, name, age):
self.name = name
self.age = age
def __repr__(self):
return "<Human: " + self.name + ", " + str(self.age) + ">"
humans = [
Human("Alice", 29),
Hu... | 33.821918 | 156 | 0.675577 |
97c8428d9600bae8c59d759a06b1f380b66da30c | 134 | py | Python | database/__init__.py | BigBoss1964/discord-rules | 02257a84450388ceffbad5b6bb9e28175734403f | [
"MIT"
] | 76 | 2018-02-12T15:26:16.000Z | 2020-01-14T07:22:17.000Z | database/__init__.py | BigBoss1964/discord-rules | 02257a84450388ceffbad5b6bb9e28175734403f | [
"MIT"
] | 2 | 2018-02-19T16:17:39.000Z | 2018-02-19T16:19:36.000Z | database/__init__.py | BigBoss1964/discord-rules | 02257a84450388ceffbad5b6bb9e28175734403f | [
"MIT"
] | 34 | 2018-02-12T15:26:20.000Z | 2021-05-04T04:30:05.000Z | from .server import ServerSettings, ServerData
from .user import UserData
from .db import db
from .messages import ReactionAction
| 26.8 | 47 | 0.80597 |
4168cdaff7e856ed244307c0b327de406a1a52bf | 821 | py | Python | packages/watchmen-rest-doll/src/watchmen_rest_doll/settings.py | Indexical-Metrics-Measure-Advisory/watchmen | c54ec54d9f91034a38e51fd339ba66453d2c7a6d | [
"MIT"
] | null | null | null | packages/watchmen-rest-doll/src/watchmen_rest_doll/settings.py | Indexical-Metrics-Measure-Advisory/watchmen | c54ec54d9f91034a38e51fd339ba66453d2c7a6d | [
"MIT"
] | null | null | null | packages/watchmen-rest-doll/src/watchmen_rest_doll/settings.py | Indexical-Metrics-Measure-Advisory/watchmen | c54ec54d9f91034a38e51fd339ba66453d2c7a6d | [
"MIT"
] | null | null | null | from enum import Enum
from watchmen_rest import RestSettings
class SSOTypes(str, Enum):
SAML2 = 'saml2'
DOLL = "doll"
class DollSettings(RestSettings):
APP_NAME: str = 'Watchmen Doll'
TUPLE_DELETABLE: bool = False
CREATE_PIPELINE_MONITOR_TOPICS_ON_TENANT_CREATE: bool = True
CREATE_DQC_TOPICS_ON_TENANT_CREAT... | 27.366667 | 83 | 0.756395 |
6b83b23c7948d05362a5915b74a2e3c406e1dbaf | 689 | py | Python | python/sql_alchemy/orm-tutorial/actor.py | zeroam/TIL | 43e3573be44c7f7aa4600ff8a34e99a65cbdc5d1 | [
"MIT"
] | null | null | null | python/sql_alchemy/orm-tutorial/actor.py | zeroam/TIL | 43e3573be44c7f7aa4600ff8a34e99a65cbdc5d1 | [
"MIT"
] | null | null | null | python/sql_alchemy/orm-tutorial/actor.py | zeroam/TIL | 43e3573be44c7f7aa4600ff8a34e99a65cbdc5d1 | [
"MIT"
] | null | null | null | from sqlalchemy import Column, String, Integer, Date
from sqlalchemy.orm import relationship
from base import Base
from movie import movie_actors_association
class Actor(Base):
__tablename__ = 'actors'
id = Column(Integer, primary_key=True)
name = Column(String)
birthday = Column(Date)
movies =... | 26.5 | 78 | 0.70537 |
6bcd58279cf11aae0f69ac09655277bb7f4afe32 | 1,774 | py | Python | tradingbot/core/grapher.py | stefaniuk/trading-bot | 403abd2b53caf686a6d2456e7eab124c670e7340 | [
"MIT"
] | 3 | 2018-05-10T13:51:42.000Z | 2020-07-05T16:43:45.000Z | tradingbot/core/grapher.py | stefaniuk/trading-bot | 403abd2b53caf686a6d2456e7eab124c670e7340 | [
"MIT"
] | null | null | null | tradingbot/core/grapher.py | stefaniuk/trading-bot | 403abd2b53caf686a6d2456e7eab124c670e7340 | [
"MIT"
] | 1 | 2020-04-22T09:06:17.000Z | 2020-04-22T09:06:17.000Z | from tradingAPI import API
import asyncio
class Grapher(object):
def __init__(self, conf):
self.api = API()
self.config = conf
self.monitor = conf.config['MONITOR']
self.prefs = eval(self.monitor['stocks'])
self.stocks = []
def start(self):
self.api.launch()
... | 32.851852 | 76 | 0.558625 |
d89fa0bb887fbaff032de83d83a88385251cd8bc | 302 | py | Python | apps/forms/posts.py | gaohj/nzflask_bbs | 36a94c380b78241ed5d1e07edab9618c3e8d477b | [
"Apache-2.0"
] | null | null | null | apps/forms/posts.py | gaohj/nzflask_bbs | 36a94c380b78241ed5d1e07edab9618c3e8d477b | [
"Apache-2.0"
] | 27 | 2020-02-12T07:55:58.000Z | 2022-03-12T00:19:09.000Z | apps/forms/posts.py | gaohj/nzflask_bbs | 36a94c380b78241ed5d1e07edab9618c3e8d477b | [
"Apache-2.0"
] | 2 | 2020-02-18T01:54:55.000Z | 2020-02-21T11:36:28.000Z | from flask_wtf import FlaskForm
from wtforms import TextAreaField,SubmitField
from wtforms.validators import Length
class PostsForm(FlaskForm):
content = TextAreaField('',render_kw={'placeholder':'这一刻你想说点什么...'},validators=[Length(10,140,message='说话注意分寸(10~140)')])
submit = SubmitField('发表')
| 37.75 | 125 | 0.768212 |
5149900e6a1ec250f6c4b8ad77f27ebbae209f3c | 2,166 | py | Python | Python/zzz_training_challenge/Python_Challenge/solutions/ch03_recursion/solutions/ex07_convert.py | Kreijeck/learning | eaffee08e61f2a34e01eb8f9f04519aac633f48c | [
"MIT"
] | null | null | null | Python/zzz_training_challenge/Python_Challenge/solutions/ch03_recursion/solutions/ex07_convert.py | Kreijeck/learning | eaffee08e61f2a34e01eb8f9f04519aac633f48c | [
"MIT"
] | null | null | null | Python/zzz_training_challenge/Python_Challenge/solutions/ch03_recursion/solutions/ex07_convert.py | Kreijeck/learning | eaffee08e61f2a34e01eb8f9f04519aac633f48c | [
"MIT"
] | null | null | null | # Beispielprogramm für das Buch "Python Challenge"
#
# Copyright 2020 by Michael Inden
def to_binary(n):
if n < 0:
raise ValueError("n must be >= 0")
# rekursiver Abbruch: prüfe auf Ziffer im Binärsystem
if n <= 1:
return str(n)
last_digit = n % 2
remainder = n // 2
# reku... | 19.513514 | 77 | 0.599261 |
32253a60816cc2598bb68105a6a36d192bed16f2 | 346 | py | Python | Algorithms/Strings/two_strings.py | byung-u/HackerRank | 4c02fefff7002b3af774b99ebf8d40f149f9d163 | [
"MIT"
] | null | null | null | Algorithms/Strings/two_strings.py | byung-u/HackerRank | 4c02fefff7002b3af774b99ebf8d40f149f9d163 | [
"MIT"
] | null | null | null | Algorithms/Strings/two_strings.py | byung-u/HackerRank | 4c02fefff7002b3af774b99ebf8d40f149f9d163 | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
import sys
from collections import Counter
from copy import copy
for _ in range(int(input().strip())):
P = Counter(input())
Q = copy(P)
Q.subtract(input())
cnt = 0
for k, v in P.items():
if v - Q[k] >= 1:
cnt += 1
if cnt > 1:
print('YES')
... | 18.210526 | 37 | 0.520231 |
5ca0fe7fc9f526de122db3de50286ad863e057c9 | 2,203 | py | Python | Packs/NCSCCyberAsssessmentFramework/Scripts/NCSCReportDetails/NCSCReportDetails.py | diCagri/content | c532c50b213e6dddb8ae6a378d6d09198e08fc9f | [
"MIT"
] | 799 | 2016-08-02T06:43:14.000Z | 2022-03-31T11:10:11.000Z | Packs/NCSCCyberAsssessmentFramework/Scripts/NCSCReportDetails/NCSCReportDetails.py | diCagri/content | c532c50b213e6dddb8ae6a378d6d09198e08fc9f | [
"MIT"
] | 9,317 | 2016-08-07T19:00:51.000Z | 2022-03-31T21:56:04.000Z | Packs/NCSCCyberAsssessmentFramework/Scripts/NCSCReportDetails/NCSCReportDetails.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... | 30.178082 | 100 | 0.568316 |
7a31d3aa5f8932e0bb99309dd6034185f53cc9f0 | 3,851 | py | Python | exploit_vsftpd_2.3.4_backdoor/vsftpd_234_backdoor.py | Unam3dd/Train-2018-2020 | afb6ae70fe338cbe55a21b74648d91996b818fa2 | [
"MIT"
] | 4 | 2021-04-23T15:39:17.000Z | 2021-12-27T22:53:24.000Z | exploit_vsftpd_2.3.4_backdoor/vsftpd_234_backdoor.py | Unam3dd/Train-2018-2020 | afb6ae70fe338cbe55a21b74648d91996b818fa2 | [
"MIT"
] | null | null | null | exploit_vsftpd_2.3.4_backdoor/vsftpd_234_backdoor.py | Unam3dd/Train-2018-2020 | afb6ae70fe338cbe55a21b74648d91996b818fa2 | [
"MIT"
] | 2 | 2021-04-19T08:28:54.000Z | 2022-01-19T13:23:29.000Z | #!/usr/bin/python2
#-*- coding:utf-8 -*-
import socket
import platform
import os
import time
from datetime import datetime
import sys
import nclib
import threading
VERSION_EXPLOIT = "vsFTPd 2.3.4"
BACKDOOR_PORT = 6200
banner = '''
\033[32m
@@@ @@@ @@@@@@... | 35.330275 | 193 | 0.480135 |
64e837176156bc8037a163f45545f1a8f6058b81 | 3,003 | py | Python | docs/conf.py | planetmija/nemo-docs | 7f484ee641f1ef6650a37094fd5b1160f02e9aee | [
"MIT"
] | null | null | null | docs/conf.py | planetmija/nemo-docs | 7f484ee641f1ef6650a37094fd5b1160f02e9aee | [
"MIT"
] | null | null | null | docs/conf.py | planetmija/nemo-docs | 7f484ee641f1ef6650a37094fd5b1160f02e9aee | [
"MIT"
] | 2 | 2021-05-21T08:03:10.000Z | 2021-05-21T09:36:33.000Z | # Configuration file for the Sphinx documentation builder.
#
# This file only contains a selection of the most common options. For a full
# list see the documentation:
# https://www.sphinx-doc.org/en/master/usage/configuration.html
# -- Path setup --------------------------------------------------------------
# If ex... | 30.958763 | 100 | 0.664669 |
74fe6392b02149d33446f9216d15ca389ecc46d8 | 5,135 | py | Python | Packs/MicrosoftGraphGroups/Integrations/MicrosoftGraphGroups/test_data/result_constants.py | diCagri/content | c532c50b213e6dddb8ae6a378d6d09198e08fc9f | [
"MIT"
] | 799 | 2016-08-02T06:43:14.000Z | 2022-03-31T11:10:11.000Z | Packs/MicrosoftGraphGroups/Integrations/MicrosoftGraphGroups/test_data/result_constants.py | diCagri/content | c532c50b213e6dddb8ae6a378d6d09198e08fc9f | [
"MIT"
] | 9,317 | 2016-08-07T19:00:51.000Z | 2022-03-31T21:56:04.000Z | Packs/MicrosoftGraphGroups/Integrations/MicrosoftGraphGroups/test_data/result_constants.py | diCagri/content | c532c50b213e6dddb8ae6a378d6d09198e08fc9f | [
"MIT"
] | 1,297 | 2016-08-04T13:59:00.000Z | 2022-03-31T23:43:06.000Z | EXPECTED_LIST_GROUPS = {
"MSGraphGroups(val.ID === obj.ID)": [
{
"Classification": None,
"CreatedDateTime": "2018-12-26T09:51:32Z",
"DeletedDateTime": None,
"Description": None,
"DisplayName": "TestDist",
"GroupTypes": [],
"... | 34.931973 | 104 | 0.499318 |
77d92235e7321ca10334a80513e2997393812936 | 8,826 | py | Python | src/onegov/core/orm/abstract/associable.py | politbuero-kampagnen/onegov-cloud | 20148bf321b71f617b64376fe7249b2b9b9c4aa9 | [
"MIT"
] | null | null | null | src/onegov/core/orm/abstract/associable.py | politbuero-kampagnen/onegov-cloud | 20148bf321b71f617b64376fe7249b2b9b9c4aa9 | [
"MIT"
] | null | null | null | src/onegov/core/orm/abstract/associable.py | politbuero-kampagnen/onegov-cloud | 20148bf321b71f617b64376fe7249b2b9b9c4aa9 | [
"MIT"
] | null | null | null | """ Generic associations are an interesting SQLAlchemy design pattern
that allow for collections of records to be attached to other models by
mere inheritance.
Generic associations are useful in situations where a model should be
attachable to a number of third-party models. For example, we might say that
a comment mo... | 33.558935 | 79 | 0.639021 |
24ee92731d285cbf86ce6c24c8b2923d6fb8e10a | 1,002 | py | Python | src/onegov/swissvotes/models/__init__.py | politbuero-kampagnen/onegov-cloud | 20148bf321b71f617b64376fe7249b2b9b9c4aa9 | [
"MIT"
] | null | null | null | src/onegov/swissvotes/models/__init__.py | politbuero-kampagnen/onegov-cloud | 20148bf321b71f617b64376fe7249b2b9b9c4aa9 | [
"MIT"
] | null | null | null | src/onegov/swissvotes/models/__init__.py | politbuero-kampagnen/onegov-cloud | 20148bf321b71f617b64376fe7249b2b9b9c4aa9 | [
"MIT"
] | null | null | null | from onegov.swissvotes.models.actor import Actor
from onegov.swissvotes.models.column_mapper import ColumnMapperDataset
from onegov.swissvotes.models.column_mapper import ColumnMapperMetadata
from onegov.swissvotes.models.file import SwissVoteFile
from onegov.swissvotes.models.file import TranslatablePageFile
from oneg... | 34.551724 | 71 | 0.811377 |
5c440c7f685d88904cb5370706666de67eff5d3f | 150 | py | Python | subprojects/glad/glad.py | henry4k/apoapsis | bbe0cc4a5aea273f570dab786fd079400e86d70e | [
"MIT"
] | null | null | null | subprojects/glad/glad.py | henry4k/apoapsis | bbe0cc4a5aea273f570dab786fd079400e86d70e | [
"MIT"
] | 12 | 2015-01-04T21:02:35.000Z | 2015-12-14T16:35:30.000Z | subprojects/glad/glad.py | henry4k/konstrukt | bbe0cc4a5aea273f570dab786fd079400e86d70e | [
"MIT"
] | null | null | null | import os.path
import sys
here = sys.path[0]
there = os.path.join(here, 'source')
sys.path = [there] + sys.path
from glad.__main__ import main
main()
| 18.75 | 36 | 0.713333 |
69626512ee318c779231cc86d255702fe18e0377 | 2,073 | py | Python | sample/calc_detect_score.py | katsugeneration/schuss | 30e2303aa0646f0a4424cbc4b5422acc58a06218 | [
"Apache-2.0"
] | 6 | 2018-12-20T06:50:52.000Z | 2021-12-16T13:08:38.000Z | sample/calc_detect_score.py | katsugeneration/schuss | 30e2303aa0646f0a4424cbc4b5422acc58a06218 | [
"Apache-2.0"
] | 1 | 2020-06-29T07:00:51.000Z | 2020-06-29T07:00:51.000Z | sample/calc_detect_score.py | katsugeneration/schuss | 30e2303aa0646f0a4424cbc4b5422acc58a06218 | [
"Apache-2.0"
] | 1 | 2022-03-04T07:29:55.000Z | 2022-03-04T07:29:55.000Z | import argparse
import pickle
import os
import sys
dir_path = os.path.dirname(os.path.abspath(__file__))
module_path = os.path.join(dir_path, "../src")
if module_path not in sys.path:
sys.path.append(module_path)
def main():
parser = argparse.ArgumentParser(
description='create n-gram count object')
... | 31.409091 | 99 | 0.652677 |
03043efcbe6ca06ec20db5f44ea05cf57e31f455 | 840 | py | Python | leetcode/1008-Construct-Binary-Search-Tree-from-Preorder-Traversal/stack.py | cc13ny/all-in | bc0b01e44e121ea68724da16f25f7e24386c53de | [
"MIT"
] | 1 | 2015-12-16T04:01:03.000Z | 2015-12-16T04:01:03.000Z | leetcode/1008-Construct-Binary-Search-Tree-from-Preorder-Traversal/stack.py | cc13ny/all-in | bc0b01e44e121ea68724da16f25f7e24386c53de | [
"MIT"
] | 1 | 2016-02-09T06:00:07.000Z | 2016-02-09T07:20:13.000Z | leetcode/1008-Construct-Binary-Search-Tree-from-Preorder-Traversal/stack.py | cc13ny/all-in | bc0b01e44e121ea68724da16f25f7e24386c53de | [
"MIT"
] | 2 | 2019-06-27T09:07:26.000Z | 2019-07-01T04:40:13.000Z | # Definition for a binary tree node.
# class TreeNode:
# def __init__(self, x):
# self.val = x
# self.left = None
# self.right = None
class Solution:
def bstFromPreorder(self, preorder: List[int]) -> TreeNode:
if not preorder:
return None
root = TreeNode(pre... | 30 | 63 | 0.507143 |
069f2a72c8e2d19dbe634344e42296f71179d6c3 | 792 | py | Python | star_sum.py | aertoria/MiscCode | a2e94d0fe0890e6620972f84adcb7976ca9f1408 | [
"Apache-2.0"
] | null | null | null | star_sum.py | aertoria/MiscCode | a2e94d0fe0890e6620972f84adcb7976ca9f1408 | [
"Apache-2.0"
] | null | null | null | star_sum.py | aertoria/MiscCode | a2e94d0fe0890e6620972f84adcb7976ca9f1408 | [
"Apache-2.0"
] | null | null | null | #######Ethan'sFavoriate PYTHON FILE READER >>>r.py'
import sys,os,csv
iFile=open('./file_copd.out','rU')
earth = [0,0]
##getDistance return distance given two stars
def getDistance(star1,star2):
return sqrt((star1[0]-star2[0])**2 +(star1[1]-star2[1])**2 )
##sour=csv.reader(iFile,delimiter=',')
list_galaxy=[]
... | 20.842105 | 82 | 0.65404 |
4e1f9372eb9d2b12167db4e2cabcfadf88d022d3 | 1,749 | py | Python | supp/npc/frontend.py | DobzhanskyCenterSPBU/RegionsMT.Update | b416ed24df0178244061a9f2aa75c513b3d8df9c | [
"Unlicense"
] | null | null | null | supp/npc/frontend.py | DobzhanskyCenterSPBU/RegionsMT.Update | b416ed24df0178244061a9f2aa75c513b3d8df9c | [
"Unlicense"
] | null | null | null | supp/npc/frontend.py | DobzhanskyCenterSPBU/RegionsMT.Update | b416ed24df0178244061a9f2aa75c513b3d8df9c | [
"Unlicense"
] | null | null | null | from io import BytesIO
from collections import namedtuple
import xml.etree.ElementTree as ET
from xml.dom import minidom
import MySQLdb
import sys
import time
mysqlinf = namedtuple("mysqlinf", "host port login password")
fileinf = namedtuple("fileinf", "chr test row val")
rdir = "f:/data/npc/tbl/"
wdir = "f:/data/npc/... | 47.27027 | 176 | 0.631218 |
ee3cc416b391f45e495a04c7355675924d78547b | 822 | py | Python | skattmestring/common.py | wittrup/crap | a77474588fd54a5a998e24df7b1e6e2ab473ded1 | [
"MIT"
] | 1 | 2017-12-12T13:58:08.000Z | 2017-12-12T13:58:08.000Z | skattmestring/common.py | wittrup/crap | a77474588fd54a5a998e24df7b1e6e2ab473ded1 | [
"MIT"
] | null | null | null | skattmestring/common.py | wittrup/crap | a77474588fd54a5a998e24df7b1e6e2ab473ded1 | [
"MIT"
] | 1 | 2019-11-03T10:16:35.000Z | 2019-11-03T10:16:35.000Z | #!/usr/bin/env python
# -*- coding: utf-8 -*-
from json import load, dump
from os import path
from difflib import SequenceMatcher
def jsloifex(filename): # JSON load if exists
return load(open(filename, encoding='utf-8')) if path.exists(filename) else {}
def savedata():
dump(data, open(config["PathToData"]... | 27.4 | 82 | 0.670316 |
4e863963b5c031e496c0be92cc32241a8a348ef8 | 493 | py | Python | IJCTF/2021/crypto/Quartic/problem.py | ruhan-islam/ctf-archives | 8c2bf6a608c821314d1a1cfaa05a6cccef8e3103 | [
"MIT"
] | 1 | 2021-11-02T20:53:58.000Z | 2021-11-02T20:53:58.000Z | IJCTF/2021/crypto/Quartic/problem.py | ruhan-islam/ctf-archives | 8c2bf6a608c821314d1a1cfaa05a6cccef8e3103 | [
"MIT"
] | null | null | null | IJCTF/2021/crypto/Quartic/problem.py | ruhan-islam/ctf-archives | 8c2bf6a608c821314d1a1cfaa05a6cccef8e3103 | [
"MIT"
] | null | null | null | from Crypto.Util.number import getPrime, bytes_to_long, getRandomNBitInteger
from flag import FLAG
p = getPrime(1024)
q = getPrime(1024)
n = p * q
e = 0x10001
c = pow(bytes_to_long(FLAG), e, n)
delta = getRandomNBitInteger(80)
x = p + delta
seq = []
val = 0
for i in range(5):
seq.append(getRandomNBitInteger(10... | 18.259259 | 76 | 0.624746 |
4ed7960dbf55c90fbdbd23a6aab060685cb366d8 | 632 | py | Python | python/en/archive/topics/command_line_arguments/tutorialspoint.com/test-simple_example.py | aimldl/coding | 70ddbfaa454ab92fd072ee8dc614ecc330b34a70 | [
"MIT"
] | null | null | null | python/en/archive/topics/command_line_arguments/tutorialspoint.com/test-simple_example.py | aimldl/coding | 70ddbfaa454ab92fd072ee8dc614ecc330b34a70 | [
"MIT"
] | null | null | null | python/en/archive/topics/command_line_arguments/tutorialspoint.com/test-simple_example.py | aimldl/coding | 70ddbfaa454ab92fd072ee8dc614ecc330b34a70 | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
'''
aimldl > python3 > topics > command_line_arguments > tutorialspoint.com > test-simple_example.py
Rev.2: 2019-11-07 (Thu)
Rev.1: 2019-03-01 (Fri)
Draft: 2018-11-08 (Thu)
Source:
Python - Command Line Arguments
https://www.tutorialspoint.com/python/python_comm... | 25.28 | 96 | 0.696203 |
09269e6506757b26d538f5e4ea0f8fad69dc6bad | 529 | py | Python | INBa/2015/ZORIN_D_I/task_5_7.py | YukkaSarasti/pythonintask | eadf4245abb65f4400a3bae30a4256b4658e009c | [
"Apache-2.0"
] | null | null | null | INBa/2015/ZORIN_D_I/task_5_7.py | YukkaSarasti/pythonintask | eadf4245abb65f4400a3bae30a4256b4658e009c | [
"Apache-2.0"
] | null | null | null | INBa/2015/ZORIN_D_I/task_5_7.py | YukkaSarasti/pythonintask | eadf4245abb65f4400a3bae30a4256b4658e009c | [
"Apache-2.0"
] | null | null | null | # Задача 5. Вариант 7.
# Напишите программу, которая бы при запуске случайным образом отображала имя одного из семи гномов, друзей Белоснежки.
#
# Zorin D.I.
#11.04.2016
import random
s = "Имя одного из семи гномов: "
a = random.randint(1,7)
if a == 1:
print(s+"Умник")
elif a == 2:
print(s+"Ворчун")
elif a == 3:... | 22.041667 | 119 | 0.638941 |
ee93c89180875db74c97e61caac81dcecbd3f68d | 12,419 | py | Python | examples/basic_household_boiler.py | sdickler/HiSim | 09a11d99f220f7cadb3cb7b09a6fce8f147243c8 | [
"MIT"
] | null | null | null | examples/basic_household_boiler.py | sdickler/HiSim | 09a11d99f220f7cadb3cb7b09a6fce8f147243c8 | [
"MIT"
] | null | null | null | examples/basic_household_boiler.py | sdickler/HiSim | 09a11d99f220f7cadb3cb7b09a6fce8f147243c8 | [
"MIT"
] | 1 | 2022-03-13T16:15:36.000Z | 2022-03-13T16:15:36.000Z | import inspect
import os
import sys
from hisim.simulator import Simulator
from hisim import components as cps
from hisim.components import occupancy
from hisim.components import weather
from hisim.components import pvs
from hisim.components import building
from hisim.components import heat_pump
from hisim.components im... | 52.846809 | 201 | 0.623239 |
eeb7f1f7398a74ce7892948b01a72503fe92402e | 2,293 | py | Python | covidash/data/download.py | CRitter93/covidash | 9daaa8e17c2487068bfd7a7b581880ee6698cedd | [
"Apache-2.0"
] | 1 | 2020-05-11T17:54:58.000Z | 2020-05-11T17:54:58.000Z | covidash/data/download.py | CRitter93/covidash | 9daaa8e17c2487068bfd7a7b581880ee6698cedd | [
"Apache-2.0"
] | null | null | null | covidash/data/download.py | CRitter93/covidash | 9daaa8e17c2487068bfd7a7b581880ee6698cedd | [
"Apache-2.0"
] | null | null | null | import os.path
import urllib.request
from pathlib import Path
DATA_DIR = '../../data/raw'
OVERWRITE = True
def get_rki_data(url="", file_name=""):
file_name = os.path.join(DATA_DIR, file_name)
if OVERWRITE or not Path(file_name).is_file():
urllib.request.urlretrieve(url, file_name)
def download_rki... | 36.983871 | 129 | 0.770606 |
01236802a65c462e015c8bb42315b058bd9442f7 | 363 | py | Python | hmtoinflux/__init__.py | debauer/HomematicToInflux | 233a837f0da031f331d771f0e6f7b55f488cd747 | [
"MIT"
] | null | null | null | hmtoinflux/__init__.py | debauer/HomematicToInflux | 233a837f0da031f331d771f0e6f7b55f488cd747 | [
"MIT"
] | null | null | null | hmtoinflux/__init__.py | debauer/HomematicToInflux | 233a837f0da031f331d771f0e6f7b55f488cd747 | [
"MIT"
] | null | null | null | import sys
import os
from python_json_config import ConfigBuilder
from influxdb import InfluxDBClient
sys.path.append(os.path.dirname(os.path.dirname(os.path.realpath(__file__))))
InfluxClient = InfluxDBClient('localhost', 8086, 'root', 'root', 'homematicToInflux')
builder = ConfigBuilder()
config = builder.parse_con... | 27.923077 | 85 | 0.793388 |
6d8b9bcd7946fe72df0b25a94c88ebc1c658366b | 1,570 | py | Python | python/fleetx/utils/env.py | hutuxian/FleetX | 843c7aa33f5a14680becf058a3aaf0327eefafd4 | [
"Apache-2.0"
] | 170 | 2020-08-12T12:07:01.000Z | 2022-03-07T02:38:26.000Z | python/fleetx/utils/env.py | hutuxian/FleetX | 843c7aa33f5a14680becf058a3aaf0327eefafd4 | [
"Apache-2.0"
] | 195 | 2020-08-13T03:22:15.000Z | 2022-03-30T07:40:25.000Z | python/fleetx/utils/env.py | hutuxian/FleetX | 843c7aa33f5a14680becf058a3aaf0327eefafd4 | [
"Apache-2.0"
] | 67 | 2020-08-14T02:07:46.000Z | 2022-03-28T10:05:33.000Z | # Copyright (c) 2020 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... | 39.25 | 74 | 0.728662 |
1109edfc370940466b6bbca4708f62898eee5461 | 7,224 | py | Python | weibo/spider/html_outputer.py | haiboz/weiboSpider | 517cae2ef3e7bccd9e1d328a40965406707f5362 | [
"Apache-2.0"
] | null | null | null | weibo/spider/html_outputer.py | haiboz/weiboSpider | 517cae2ef3e7bccd9e1d328a40965406707f5362 | [
"Apache-2.0"
] | null | null | null | weibo/spider/html_outputer.py | haiboz/weiboSpider | 517cae2ef3e7bccd9e1d328a40965406707f5362 | [
"Apache-2.0"
] | null | null | null | # coding:utf8
'''
Created on 2016年4月8日
@author: wb-zhaohaibo
'''
#输出器
class Output(object):
def __init__(self):
self.fans_count = 0
self.weibo_count = 0
self.datas = []
self.user_old_datas = []
self.weibo_datas = []
#收集数据
def collect_data(self,data):... | 39.048649 | 110 | 0.519518 |
fefe12f8c94a5e0951e0891569daa7a2bfb5b298 | 192 | py | Python | python/util/example.py | tlming16/Projec_Euler | 797824c5159fae67493de9eba24c22cc7512d95d | [
"MIT"
] | 4 | 2018-11-14T12:03:05.000Z | 2019-09-03T14:33:28.000Z | python/util/example.py | tlming16/Projec_Euler | 797824c5159fae67493de9eba24c22cc7512d95d | [
"MIT"
] | null | null | null | python/util/example.py | tlming16/Projec_Euler | 797824c5159fae67493de9eba24c22cc7512d95d | [
"MIT"
] | 1 | 2018-11-17T14:39:22.000Z | 2018-11-17T14:39:22.000Z | #!/usr/bin/env python3
# coding:utf-8
from ctypes import *
if __name__ =='__main__':
lib_name ="./libexample.dll"
lib= cdll.LoadLibrary(lib_name)
print(lib.add(c_int(10),c_int(10))); | 27.428571 | 38 | 0.6875 |
3a0226d6b67a85c514cfb33b1711004f15663c4b | 130 | py | Python | packages/watchmen-rest/src/watchmen_rest/util/__init__.py | Indexical-Metrics-Measure-Advisory/watchmen | c54ec54d9f91034a38e51fd339ba66453d2c7a6d | [
"MIT"
] | null | null | null | packages/watchmen-rest/src/watchmen_rest/util/__init__.py | Indexical-Metrics-Measure-Advisory/watchmen | c54ec54d9f91034a38e51fd339ba66453d2c7a6d | [
"MIT"
] | null | null | null | packages/watchmen-rest/src/watchmen_rest/util/__init__.py | Indexical-Metrics-Measure-Advisory/watchmen | c54ec54d9f91034a38e51fd339ba66453d2c7a6d | [
"MIT"
] | null | null | null | from .raise_http_exception import raise_400, raise_401, raise_403, raise_404, raise_500
from .validator import validate_tenant_id
| 43.333333 | 87 | 0.861538 |
3a4ebb1070f5c8beacb1439aa4ead96f1d5a873b | 2,007 | py | Python | code/4/Schaffer.py | pwang13/AutomatedSE_Coursework | b416672d9756fcc60367143b989d29b0c905cfc3 | [
"Unlicense"
] | null | null | null | code/4/Schaffer.py | pwang13/AutomatedSE_Coursework | b416672d9756fcc60367143b989d29b0c905cfc3 | [
"Unlicense"
] | null | null | null | code/4/Schaffer.py | pwang13/AutomatedSE_Coursework | b416672d9756fcc60367143b989d29b0c905cfc3 | [
"Unlicense"
] | null | null | null | #!/usr/bin/python
import random
import sys
import math
class Solution:
def __init__(self, x, f1, f2):
self.x = x
self.f1 = f1
self.f2 = f2
def f1(x):
return x**2
def f2(x):
return (x - 2) ** 2
def schaffer_score(x):
return f1(x) + f2(x)
def p(old, new, t):
return m... | 18.757009 | 58 | 0.489786 |
c93e54c81f5f301f45ee98f8ccd714fec13bf519 | 1,427 | py | Python | CAL/extra/render_mst.py | joao-frohlich/BCC | 9ed74eb6d921d1280f48680677a2140c5383368d | [
"Apache-2.0"
] | 10 | 2020-12-08T20:18:15.000Z | 2021-06-07T20:00:07.000Z | CAL/extra/render_mst.py | joao-frohlich/BCC | 9ed74eb6d921d1280f48680677a2140c5383368d | [
"Apache-2.0"
] | 2 | 2021-06-28T03:42:13.000Z | 2021-06-28T16:53:13.000Z | CAL/extra/render_mst.py | joao-frohlich/BCC | 9ed74eb6d921d1280f48680677a2140c5383368d | [
"Apache-2.0"
] | 2 | 2021-01-14T19:59:20.000Z | 2021-06-15T11:53:21.000Z | from graphviz import Graph
################################################
# Autor: Vinicius Gasparini
# Nome: Renderizador de MST
################################################
def save_graph(dot, name):
dot.format = "pdf"
dot.render(name)
def render_graph(g_list, size, mst_edges, mst_nodes):
d... | 29.729167 | 79 | 0.55431 |
254d582ebc6d2eb8af6cedbc95f694a568c81278 | 5,294 | py | Python | Contrib-Microsoft/Olympus_rack_manager/python-ocs/rackmanager/legacy/commands.py | opencomputeproject/Rack-Manager | e1a61d3eeeba0ff655fe9c1301e8b510d9b2122a | [
"MIT"
] | 5 | 2019-11-11T07:57:26.000Z | 2022-03-28T08:26:53.000Z | Contrib-Microsoft/Olympus_rack_manager/python-ocs/rackmanager/legacy/commands.py | opencomputeproject/Rack-Manager | e1a61d3eeeba0ff655fe9c1301e8b510d9b2122a | [
"MIT"
] | 3 | 2019-09-05T21:47:07.000Z | 2019-09-17T18:10:45.000Z | Contrib-Microsoft/Olympus_rack_manager/python-ocs/rackmanager/legacy/commands.py | opencomputeproject/Rack-Manager | e1a61d3eeeba0ff655fe9c1301e8b510d9b2122a | [
"MIT"
] | 11 | 2019-07-20T00:16:32.000Z | 2022-01-11T14:17:48.000Z | # Copyright (C) Microsoft Corporation. All rights reserved.
# This program is free software; you can redistribute it
# and/or modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 2
# of the License, or (at your option) any later version.
import com... | 49.018519 | 100 | 0.772762 |
b005fbd84f4589a991b299d0f95229f007e85bfb | 746 | py | Python | Programming Languages/Python/Theory/100_Python_Challenges/Section_8_Classes/93. calculator class.py | jaswinder9051998/Resources | fd468af37bf24ca57555d153ee64693c018e822e | [
"MIT"
] | 101 | 2021-12-20T11:57:11.000Z | 2022-03-23T09:49:13.000Z | Programming Languages/Python/Theory/100_Python_Challenges/Section_8_Classes/93. calculator class.py | Sid-1164/Resources | 3987dcaeddc8825f9bc79609ff26094282b8ece1 | [
"MIT"
] | 4 | 2022-01-12T11:55:56.000Z | 2022-02-12T04:53:33.000Z | Programming Languages/Python/Theory/100_Python_Challenges/Section_8_Classes/93. calculator class.py | Sid-1164/Resources | 3987dcaeddc8825f9bc79609ff26094282b8ece1 | [
"MIT"
] | 38 | 2022-01-12T11:56:16.000Z | 2022-03-23T10:07:52.000Z | '''
Create methods for the Calculator class that can do the following:
Add two numbers
Subtract two numbers
Multiply two numbers
Divide two numbers
The methods accept the parameters x and y. The output can be rounded to 2 decimal places.
'''
class Calculator:
def __init__(self,x,y):
self.x = x
... | 21.314286 | 89 | 0.604558 |
05f55d94fb67b041698f9eefd7c41d704347b47f | 1,864 | py | Python | etl/load/pipelines/criteria.py | cloud-cds/cds-stack | d68a1654d4f604369a071f784cdb5c42fc855d6e | [
"Apache-2.0"
] | 6 | 2018-06-27T00:09:55.000Z | 2019-03-07T14:06:53.000Z | etl/load/pipelines/criteria.py | cloud-cds/cds-stack | d68a1654d4f604369a071f784cdb5c42fc855d6e | [
"Apache-2.0"
] | 3 | 2021-03-31T18:37:46.000Z | 2021-06-01T21:49:41.000Z | etl/load/pipelines/criteria.py | cloud-cds/cds-stack | d68a1654d4f604369a071f784cdb5c42fc855d6e | [
"Apache-2.0"
] | 3 | 2020-01-24T16:40:49.000Z | 2021-09-30T02:28:55.000Z | import os
import asyncio
import asyncpg
from etl.core.task import Task
import etl.io_config.core as core
def get_criteria_tasks(job_id, dependency=None, lookback_hours=24*7,
hospital='HCGH', suppression=0):
criteria_tasks = [
Task(
name = 'garbage_collection',
deps = [dependenc... | 33.285714 | 99 | 0.671674 |
af0b42304d14f06f98b5073d3fe690d7cbb4df73 | 127 | py | Python | master_script.py | tobiasclaas/Netzwerkprogrammierung | a1736c77fbca66c1afea01942e8f0a7ae2fe8b62 | [
"MIT"
] | null | null | null | master_script.py | tobiasclaas/Netzwerkprogrammierung | a1736c77fbca66c1afea01942e8f0a7ae2fe8b62 | [
"MIT"
] | null | null | null | master_script.py | tobiasclaas/Netzwerkprogrammierung | a1736c77fbca66c1afea01942e8f0a7ae2fe8b62 | [
"MIT"
] | null | null | null | """
This is a test script that is called whenever a controller becomes master.
"""
print("This is a script, I am the Master")
| 21.166667 | 74 | 0.716535 |
af722dea57dfdda8695385dfbb54feb9ea4f14a6 | 1,417 | py | Python | kernel/website/urls.py | sageteam/behpack | 3b8afb81dc7da70807308af4c8a2d2ab92b1a133 | [
"MIT"
] | null | null | null | kernel/website/urls.py | sageteam/behpack | 3b8afb81dc7da70807308af4c8a2d2ab92b1a133 | [
"MIT"
] | null | null | null | kernel/website/urls.py | sageteam/behpack | 3b8afb81dc7da70807308af4c8a2d2ab92b1a133 | [
"MIT"
] | null | null | null | from django.urls import path, re_path
from .views import HomeView
from .views import AboutView
from .views import ContactView
from .views import ProductView
from .views import ProductDetailView
from .views import SlovakiProductDetailView
from .views import BlogView
from .views import BlogDetailView
from .views import ... | 44.28125 | 126 | 0.671136 |
bb710ba9b6da1edd081fb9ab32e11cf207ecf9c0 | 2,754 | py | Python | website/apps/projects/models.py | stahlnow/stahlnow | 265dd46c54f68173071d1c86218201d6e618ceeb | [
"MIT"
] | 1 | 2017-03-14T08:08:31.000Z | 2017-03-14T08:08:31.000Z | website/apps/projects/models.py | stahlnow/stahlnow | 265dd46c54f68173071d1c86218201d6e618ceeb | [
"MIT"
] | null | null | null | website/apps/projects/models.py | stahlnow/stahlnow | 265dd46c54f68173071d1c86218201d6e618ceeb | [
"MIT"
] | null | null | null | from django.db import models
from django.utils.translation import ugettext_lazy as _
from django.contrib.auth.models import User
from django.utils.timezone import now
from django.conf import settings
from projects.managers import PublicManager
from taggit.managers import TaggableManager
from fileupload.models impor... | 33.180723 | 94 | 0.674292 |
bba7a862134b5220c2174001fbbc796e3f680de8 | 220 | py | Python | Chapter7_CodingGuidelines/TypeAnnotations/main.py | tomex74/UdemyPythonPro | b4b83483fa2d3337a2860d53ff38e68eb38b3ac4 | [
"MIT"
] | null | null | null | Chapter7_CodingGuidelines/TypeAnnotations/main.py | tomex74/UdemyPythonPro | b4b83483fa2d3337a2860d53ff38e68eb38b3ac4 | [
"MIT"
] | null | null | null | Chapter7_CodingGuidelines/TypeAnnotations/main.py | tomex74/UdemyPythonPro | b4b83483fa2d3337a2860d53ff38e68eb38b3ac4 | [
"MIT"
] | null | null | null | """Test code.
"""
from vector_type_annotations import Vector2D
def print_value(val: str):
print(val)
def main():
v1 = Vector2D(2, 5)
test= v1 * 7
print(test)
if __name__ == "__main__":
main()
| 11 | 44 | 0.609091 |
bbc3c8f94356b5cff530aa11535b852aebeff7bc | 151 | py | Python | json2csv.py | sanxy/hacktoberfest-1 | 913582b310688d496602e8b1bc9166cb64866e38 | [
"MIT"
] | null | null | null | json2csv.py | sanxy/hacktoberfest-1 | 913582b310688d496602e8b1bc9166cb64866e38 | [
"MIT"
] | null | null | null | json2csv.py | sanxy/hacktoberfest-1 | 913582b310688d496602e8b1bc9166cb64866e38 | [
"MIT"
] | 1 | 2020-09-30T18:53:05.000Z | 2020-09-30T18:53:05.000Z | import pandas as pd
df = pd.read_json (r'C:\\Users\\Rohit\\Desktop\\JSON\\0.json')
df.to_csv (r'C:\\Users\\Rohit\\Desktop\\JSON\\0.csv', index = None)
| 37.75 | 67 | 0.668874 |
3c508eaa09745ee19f0bd9986720a250a7e2d030 | 312 | py | Python | frappe-bench/apps/erpnext/erpnext/patches/v8_9/set_print_zero_amount_taxes.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/v8_9/set_print_zero_amount_taxes.py | Semicheche/foa_frappe_docker | a186b65d5e807dd4caf049e8aeb3620a799c1225 | [
"MIT"
] | null | null | null | frappe-bench/apps/erpnext/erpnext/patches/v8_9/set_print_zero_amount_taxes.py | Semicheche/foa_frappe_docker | a186b65d5e807dd4caf049e8aeb3620a799c1225 | [
"MIT"
] | 1 | 2021-04-29T14:39:01.000Z | 2021-04-29T14:39:01.000Z | from __future__ import unicode_literals
import frappe
from erpnext.setup.install import create_print_zero_amount_taxes_custom_field
def execute():
frappe.reload_doc('printing', 'doctype', 'print_style')
frappe.reload_doc('printing', 'doctype', 'print_settings')
create_print_zero_amount_taxes_custom_field() | 34.666667 | 77 | 0.833333 |
3c85cb410cfd7091e4d6337188f8402900c9ec95 | 880 | py | Python | task_3/Tests/Test_RNG_Simulation.py | christopher-besch/bwinf39 | e5394b37894a56608312057d179029d8a5df98fd | [
"MIT"
] | 1 | 2021-01-04T15:16:44.000Z | 2021-01-04T15:16:44.000Z | task_3/Tests/Test_RNG_Simulation.py | christopher-besch/bwinf39 | e5394b37894a56608312057d179029d8a5df98fd | [
"MIT"
] | null | null | null | task_3/Tests/Test_RNG_Simulation.py | christopher-besch/bwinf39 | e5394b37894a56608312057d179029d8a5df98fd | [
"MIT"
] | null | null | null | import unittest
from rng_simulation import play_rng, play_rng_5
class Test_play_RNG(unittest.TestCase):
# testet Zufälligkeit der Operation random
def test_1(self):
players = [0, 1]
skill_levels = [2, 6]
n = 1000
average_player1 = skill_levels[0] / (skill_levels[0] + ... | 38.26087 | 80 | 0.620455 |
a716263ce2dad21bd85408f5cbce0a475c0d3ed6 | 1,400 | py | Python | beispielanwendungen/ressourcen/helloworld2.py | pbouda/pyqt-und-pyside-buch | a4ec10663ccc8aeda075c9a06b9707ded52382c8 | [
"CC-BY-4.0"
] | 5 | 2017-03-11T13:27:27.000Z | 2022-01-09T10:52:05.000Z | beispielanwendungen/ressourcen/helloworld.py | pbouda/pyqt-und-pyside-buch | a4ec10663ccc8aeda075c9a06b9707ded52382c8 | [
"CC-BY-4.0"
] | 2 | 2021-02-14T10:59:59.000Z | 2021-10-30T21:46:32.000Z | beispielanwendungen/ressourcen/helloworld.py | pbouda/pyqt-und-pyside-buch | a4ec10663ccc8aeda075c9a06b9707ded52382c8 | [
"CC-BY-4.0"
] | 1 | 2019-08-07T03:08:18.000Z | 2019-08-07T03:08:18.000Z | # -*- coding: utf-8 -*-
import sys
from PyQt4 import QtCore, QtGui
from ui_helloworld import Ui_MainWindow
def main(argv):
app = QtGui.QApplication(argv)
language = unicode(QtCore.QLocale.system().name())
qtTranslator = QtCore.QTranslator()
qtTranslator.load("qt_{0}".format(language), QtCore.QLibrar... | 29.166667 | 116 | 0.697143 |
59e9c2430778f66bbf65abd24f7244ad683c5d2a | 19,413 | py | Python | Fastir_Collector/utils/utils.py | Unam3dd/Train-2018-2020 | afb6ae70fe338cbe55a21b74648d91996b818fa2 | [
"MIT"
] | 4 | 2021-04-23T15:39:17.000Z | 2021-12-27T22:53:24.000Z | Fastir_Collector/utils/utils.py | Unam3dd/Train-2018-2020 | afb6ae70fe338cbe55a21b74648d91996b818fa2 | [
"MIT"
] | null | null | null | Fastir_Collector/utils/utils.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 win32wnet
import win32netcon
import win32api
import win32file
import win32security
import win32con
import win32service
import os
import sys
import datetime
import glob
import hashlib
from string import ascii_uppercase
import zipfile
import wmi
impor... | 31.51461 | 117 | 0.632875 |
28014d06035a6133ed37a2cf9b254e5a35372066 | 1,039 | py | Python | python/oneflow/support/scope_stack.py | wangyuyue/oneflow | 0a71c22fe8355392acc8dc0e301589faee4c4832 | [
"Apache-2.0"
] | 3,285 | 2020-07-31T05:51:22.000Z | 2022-03-31T15:20:16.000Z | python/oneflow/support/scope_stack.py | wangyuyue/oneflow | 0a71c22fe8355392acc8dc0e301589faee4c4832 | [
"Apache-2.0"
] | 2,417 | 2020-07-31T06:28:58.000Z | 2022-03-31T23:04:14.000Z | python/oneflow/support/scope_stack.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... | 29.685714 | 72 | 0.704524 |
e62c5b6698621609744021eacfba115c4738fbe7 | 5,954 | py | Python | Dockerfiles/gedlab-khmer-filter-abund/pymodules/python2.7/lib/python/pygsl/sum.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/pygsl/sum.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/pygsl/sum.py | poojavade/Genomics_Docker | 829b5094bba18bbe03ae97daf925fee40a8476e8 | [
"Apache-2.0"
] | 2 | 2016-12-19T02:27:46.000Z | 2019-07-29T02:53:54.000Z | # This file was automatically generated by SWIG (http://www.swig.org).
# Version 2.0.11
#
# Do not make changes to this file unless you know what you are doing--modify
# the SWIG interface file instead.
"""
This module provides a function for accelerating the convergence of
series based on the Levin u-transform. T... | 35.023529 | 94 | 0.66829 |
e63ce30875aff5838a6f5c8af41e4dcc7be9056f | 9,678 | py | Python | BSidesCanberra/2021/crypto/Rot_Away_Rust/client_initiator.py | mystickev/ctf-archives | 89e99a5cd5fb6b2923cad3fe1948d3ff78649b4e | [
"MIT"
] | 1 | 2021-11-02T20:53:58.000Z | 2021-11-02T20:53:58.000Z | BSidesCanberra/2021/crypto/Rot_Away_Rust/client_initiator.py | ruhan-islam/ctf-archives | 8c2bf6a608c821314d1a1cfaa05a6cccef8e3103 | [
"MIT"
] | null | null | null | BSidesCanberra/2021/crypto/Rot_Away_Rust/client_initiator.py | ruhan-islam/ctf-archives | 8c2bf6a608c821314d1a1cfaa05a6cccef8e3103 | [
"MIT"
] | 1 | 2021-12-19T11:06:24.000Z | 2021-12-19T11:06:24.000Z | import json
import Crypto.Cipher.AES as aes
import Crypto.Random as rand
from binascii import *
import struct
from pwn import *
import argparse
class ClientInitiator:
def __init__(self, responder_address, responder_port, server_address, server_port, client_id, client_server_key):
self.client_id = client_id... | 38.712 | 175 | 0.601881 |
05622685253daac33d5a806e530db257ee817781 | 2,690 | py | Python | src/train_unet.py | tuanminh3395/gr-bone-age | 248c929d75e9d88dc9fa102ea11f4eae1e0f3157 | [
"MIT"
] | null | null | null | src/train_unet.py | tuanminh3395/gr-bone-age | 248c929d75e9d88dc9fa102ea11f4eae1e0f3157 | [
"MIT"
] | null | null | null | src/train_unet.py | tuanminh3395/gr-bone-age | 248c929d75e9d88dc9fa102ea11f4eae1e0f3157 | [
"MIT"
] | null | null | null | from __future__ import print_function
from skimage.transform import resize
from skimage.io import imsave, imshow
import numpy as np
from keras.models import Model
from keras.layers import Dense, Dropout, Flatten, Conv2D, MaxPooling2D, BatchNormalization, Input, merge, UpSampling2D, Cropping2D, ZeroPadding2D, Reshape, ... | 30.568182 | 187 | 0.693309 |
55bf10c54c37d2fb38558ea0c29ecb3308c34047 | 176 | py | Python | CodeStatistics/run.py | zhangyafeii/Flask | 9c9a5ea282f77aabcda838796dad2411af9b519f | [
"MIT"
] | null | null | null | CodeStatistics/run.py | zhangyafeii/Flask | 9c9a5ea282f77aabcda838796dad2411af9b519f | [
"MIT"
] | null | null | null | CodeStatistics/run.py | zhangyafeii/Flask | 9c9a5ea282f77aabcda838796dad2411af9b519f | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
"""
@Datetime: 2018/12/25
@Author: Zhang Yafei
"""
from CodeStatistics import create_app
app = create_app()
if __name__ == '__main__':
app.run() | 13.538462 | 37 | 0.642045 |
e9df708bfbdfe9a0d318d825951ed7c1b9fa8e33 | 1,613 | py | Python | Packs/CommonScripts/Scripts/ParseWordDoc/ParseWordDoc_test.py | diCagri/content | c532c50b213e6dddb8ae6a378d6d09198e08fc9f | [
"MIT"
] | 799 | 2016-08-02T06:43:14.000Z | 2022-03-31T11:10:11.000Z | Packs/CommonScripts/Scripts/ParseWordDoc/ParseWordDoc_test.py | diCagri/content | c532c50b213e6dddb8ae6a378d6d09198e08fc9f | [
"MIT"
] | 9,317 | 2016-08-07T19:00:51.000Z | 2022-03-31T21:56:04.000Z | Packs/CommonScripts/Scripts/ParseWordDoc/ParseWordDoc_test.py | diCagri/content | c532c50b213e6dddb8ae6a378d6d09198e08fc9f | [
"MIT"
] | 1,297 | 2016-08-04T13:59:00.000Z | 2022-03-31T23:43:06.000Z | import demistomock as demisto
class TestParseWordDoc:
@staticmethod
def mock_results(mocker):
mocker.patch.object(demisto, "results")
@staticmethod
def mock_context(mocker, args_value=None):
if not args_value:
args_value = {
"entryID": "entry_id",
... | 27.338983 | 98 | 0.603224 |
7595c1203456972d3c1f583411e11e0768f0bdd1 | 3,447 | py | Python | 3kCTF/2021/crypto/Digital/digital.py | ruhan-islam/ctf-archives | 8c2bf6a608c821314d1a1cfaa05a6cccef8e3103 | [
"MIT"
] | 1 | 2021-11-02T20:53:58.000Z | 2021-11-02T20:53:58.000Z | 3kCTF/2021/crypto/Digital/digital.py | ruhan-islam/ctf-archives | 8c2bf6a608c821314d1a1cfaa05a6cccef8e3103 | [
"MIT"
] | null | null | null | 3kCTF/2021/crypto/Digital/digital.py | ruhan-islam/ctf-archives | 8c2bf6a608c821314d1a1cfaa05a6cccef8e3103 | [
"MIT"
] | null | null | null | from Crypto.Util.number import inverse
import hashlib
import os
rol = lambda val, r_bits, max_bits: (val << r_bits%max_bits) & (2**max_bits-1) | ((val & (2**max_bits-1)) >> (max_bits-(r_bits%max_bits)))
class Random():
def __init__(self, seed):
self.state = seed
self.bits = self.state.bit_length()
d... | 55.596774 | 622 | 0.821004 |
f972822faf0db64d602b2152abe2af25c8c2822c | 448 | py | Python | Programming Languages/Python/Theory/100_Python_Challenges/Section_3_List/53. sort the words in the list based on their second letter from a to z.py | jaswinder9051998/Resources | fd468af37bf24ca57555d153ee64693c018e822e | [
"MIT"
] | 101 | 2021-12-20T11:57:11.000Z | 2022-03-23T09:49:13.000Z | Programming Languages/Python/Theory/100_Python_Challenges/Section_3_List/53. sort the words in the list based on their second letter from a to z.py | Sid-1164/Resources | 3987dcaeddc8825f9bc79609ff26094282b8ece1 | [
"MIT"
] | 4 | 2022-01-12T11:55:56.000Z | 2022-02-12T04:53:33.000Z | Programming Languages/Python/Theory/100_Python_Challenges/Section_3_List/53. sort the words in the list based on their second letter from a to z.py | Sid-1164/Resources | 3987dcaeddc8825f9bc79609ff26094282b8ece1 | [
"MIT"
] | 38 | 2022-01-12T11:56:16.000Z | 2022-03-23T10:07:52.000Z | """
Using sorted() function and lambda function sort the words in the list based on their second letter from a to z.
Example:
input_list = ['coral', 'teal', 'mustard', 'blue violet', 'maroon', 'indigo', 'white', 'lime', 'navy']
Expected output = ['maroon', 'navy', 'teal', 'white', 'lime', 'blue violet', 'indig... | 26.352941 | 113 | 0.625 |
b5d8320df18f71e7d9be5f93694336013cfe78fb | 322 | py | Python | sketches/caframework/Cell.py | kantel/processingpy | 74aae222e46f68d1c8f06307aaede3cdae65c8ec | [
"MIT"
] | 4 | 2018-06-03T02:11:46.000Z | 2021-08-18T19:55:15.000Z | sketches/caframework/Cell.py | kantel/processingpy | 74aae222e46f68d1c8f06307aaede3cdae65c8ec | [
"MIT"
] | null | null | null | sketches/caframework/Cell.py | kantel/processingpy | 74aae222e46f68d1c8f06307aaede3cdae65c8ec | [
"MIT"
] | 3 | 2019-12-23T19:12:51.000Z | 2021-04-30T14:00:31.000Z | class Cell():
def __init__(self, ex, why):
self.x = ex*cellSize
self.y = why*cellSize
if random(2) > 1:
self.nexState = True
else:
self.nextState = False
self.state = self.nextState
def addNeighbour(self, cell):
self.neighbour... | 24.769231 | 35 | 0.518634 |
b5f31cfeadb6e3ae733f13ddba2708bd4c5ff83e | 7,059 | py | Python | experiment/exp_voc/train.py | Wangyf46/deeplabv3plus-pytorch | dbbbe88d7774d6e02f7ea13e770ee4278dc528fd | [
"MIT"
] | 2 | 2019-08-03T12:02:12.000Z | 2019-08-03T12:35:46.000Z | experiment/exp_voc/train.py | Wangyf46/deeplabv3plus-pytorch | dbbbe88d7774d6e02f7ea13e770ee4278dc528fd | [
"MIT"
] | null | null | null | experiment/exp_voc/train.py | Wangyf46/deeplabv3plus-pytorch | dbbbe88d7774d6e02f7ea13e770ee4278dc528fd | [
"MIT"
] | null | null | null | # ----------------------------------------
# Written by Yude Wang
# ----------------------------------------
import torch
import torch.nn as nn
import torchvision
import torchvision.transforms as transforms
import os
import time
import sys
import numpy as np
from termcolor import cprint
import shutil
from config impo... | 39.435754 | 146 | 0.604335 |
bd3714d2daf1ece18e232a203ba292858caabb9d | 533 | py | Python | BITs/2014/KOSTAREV_A_I/task_3_13.py | YukkaSarasti/pythonintask | eadf4245abb65f4400a3bae30a4256b4658e009c | [
"Apache-2.0"
] | null | null | null | BITs/2014/KOSTAREV_A_I/task_3_13.py | YukkaSarasti/pythonintask | eadf4245abb65f4400a3bae30a4256b4658e009c | [
"Apache-2.0"
] | null | null | null | BITs/2014/KOSTAREV_A_I/task_3_13.py | YukkaSarasti/pythonintask | eadf4245abb65f4400a3bae30a4256b4658e009c | [
"Apache-2.0"
] | null | null | null | # Задача 3. Вариант 15.
# Напишите программу, которая выводит имя "Норма Бейкер", и запрашивает его псевдонимПосле вывода информации программа должна дожидаться пока пользователь нажмет Enter для выхода.
# Костарев А. И.
# 29.02.2015
print ('Герой нашей сегоднешней программы - Норма Бейкер')
psev=input("Под каки... | 41 | 180 | 0.726079 |
1f6ab6eae694bcfc9f384ea81ec784d11771d5ad | 268 | py | Python | src/bo4e/enum/gasqualitaet.py | bo4e/BO4E-python | 28b12f853c8a496d14b133759b7aa2d6661f79a0 | [
"MIT"
] | 1 | 2022-03-02T12:49:44.000Z | 2022-03-02T12:49:44.000Z | src/bo4e/enum/gasqualitaet.py | bo4e/BO4E-python | 28b12f853c8a496d14b133759b7aa2d6661f79a0 | [
"MIT"
] | 21 | 2022-02-04T07:38:46.000Z | 2022-03-28T14:01:53.000Z | src/bo4e/enum/gasqualitaet.py | bo4e/BO4E-python | 28b12f853c8a496d14b133759b7aa2d6661f79a0 | [
"MIT"
] | null | null | null | # pylint:disable=missing-module-docstring
from bo4e.enum.strenum import StrEnum
class Gasqualitaet(StrEnum):
"""
Unterscheidung für hoch- und niedrig-kalorisches Gas.
"""
H_GAS = "H_GAS" #: High Caloric Gas
L_GAS = "L_GAS" #: Low Caloric Gas
| 20.615385 | 57 | 0.682836 |
c09ceddcdeb065b17e923fd338c4ec8d26608ad8 | 50,765 | py | Python | Co-Simulation/Sumo/sumo-1.7.0/tools/contributed/sumopy/coremodules/simulation/sumo.py | uruzahe/carla | 940c2ab23cce1eda1ef66de35f66b42d40865fb1 | [
"MIT"
] | 4 | 2020-11-13T02:35:56.000Z | 2021-03-29T20:15:54.000Z | Co-Simulation/Sumo/sumo-1.7.0/tools/contributed/sumopy/coremodules/simulation/sumo.py | uruzahe/carla | 940c2ab23cce1eda1ef66de35f66b42d40865fb1 | [
"MIT"
] | 9 | 2020-12-09T02:12:39.000Z | 2021-02-18T00:15:28.000Z | Co-Simulation/Sumo/sumo-1.7.0/tools/contributed/sumopy/coremodules/simulation/sumo.py | uruzahe/carla | 940c2ab23cce1eda1ef66de35f66b42d40865fb1 | [
"MIT"
] | 1 | 2020-11-20T19:31:26.000Z | 2020-11-20T19:31:26.000Z | # Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo
# Copyright (C) 2016-2020 German Aerospace Center (DLR) and others.
# SUMOPy module
# Copyright (C) 2012-2017 University of Bologna - DICAM
# This program and the accompanying materials are made available under the
# terms of the Eclipse Public ... | 52.990605 | 222 | 0.453541 |
c0d83e2d4fec7a009b29ddee7ab5d47399669ce3 | 2,805 | py | Python | demos/Multiscale/amm_mechanism/model/state_variables.py | w-ghub/demos | 6382676fae89bd5a190626612712fcedf17bca6d | [
"MIT"
] | 56 | 2020-07-08T23:23:15.000Z | 2022-03-11T20:43:09.000Z | demos/Multiscale/amm_mechanism/model/state_variables.py | w-ghub/demos | 6382676fae89bd5a190626612712fcedf17bca6d | [
"MIT"
] | 41 | 2020-07-11T23:24:06.000Z | 2022-01-28T13:28:07.000Z | demos/Multiscale/amm_mechanism/model/state_variables.py | w-ghub/demos | 6382676fae89bd5a190626612712fcedf17bca6d | [
"MIT"
] | 39 | 2020-07-15T11:35:04.000Z | 2022-02-01T16:02:51.000Z | """
State variables are defined here.
We set:
- dependencies
- agent parameters (agent dataframe)
- asset parameters (asset daraframe)
- potential new asset parameters (new_asset dataframe)
In addition to that, we initialize:
- all Uniswap pools
- the initial state object
"""
# Dependences
from .parts.utils import ... | 35.961538 | 93 | 0.669875 |
f51213fb9fdad097e9659a4779e7f548c6678949 | 434 | py | Python | INBa/2015/Ionova_A_K/task_1_8.py | YukkaSarasti/pythonintask | eadf4245abb65f4400a3bae30a4256b4658e009c | [
"Apache-2.0"
] | null | null | null | INBa/2015/Ionova_A_K/task_1_8.py | YukkaSarasti/pythonintask | eadf4245abb65f4400a3bae30a4256b4658e009c | [
"Apache-2.0"
] | null | null | null | INBa/2015/Ionova_A_K/task_1_8.py | YukkaSarasti/pythonintask | eadf4245abb65f4400a3bae30a4256b4658e009c | [
"Apache-2.0"
] | null | null | null | # Задача 1. Вариант 8.
# Напишите программу, которая будет сообщать род деятельности и псевдоним под которым скрывается Ефим Алексеевич Придворов. После вывода информации программа должна дожидаться пока пользователь нажмет Enter для выхода.
# Ionova A.K.
# 11.04.2016
print ("Ефим Алексеевич Придворов наиболее извес... | 43.4 | 218 | 0.801843 |
192433a2f9163954a63e54d8ef557d22687e8399 | 205 | py | Python | Python/Courses/Python-Tutorials.Telusko/01.Object-Oriented-Programming/10.01-Class-Object-2.py | shihab4t/Books-Code | b637b6b2ad42e11faf87d29047311160fe3b2490 | [
"Unlicense"
] | null | null | null | Python/Courses/Python-Tutorials.Telusko/01.Object-Oriented-Programming/10.01-Class-Object-2.py | shihab4t/Books-Code | b637b6b2ad42e11faf87d29047311160fe3b2490 | [
"Unlicense"
] | null | null | null | Python/Courses/Python-Tutorials.Telusko/01.Object-Oriented-Programming/10.01-Class-Object-2.py | shihab4t/Books-Code | b637b6b2ad42e11faf87d29047311160fe3b2490 | [
"Unlicense"
] | null | null | null | class Computer:
def config(self):
print("i5, 8gb, 512gb")
com1 = Computer()
com2 = Computer()
Computer.config(com1)
Computer.config(com2)
com1.config()
com2.config()
a = 5
a.bit_length()
| 11.388889 | 31 | 0.653659 |
7e049e509b7715960f3690850098828ee0f47865 | 565 | py | Python | python/generator_tricks_for_systemprogrammer/redict.py | zeroam/TIL | 43e3573be44c7f7aa4600ff8a34e99a65cbdc5d1 | [
"MIT"
] | null | null | null | python/generator_tricks_for_systemprogrammer/redict.py | zeroam/TIL | 43e3573be44c7f7aa4600ff8a34e99a65cbdc5d1 | [
"MIT"
] | null | null | null | python/generator_tricks_for_systemprogrammer/redict.py | zeroam/TIL | 43e3573be44c7f7aa4600ff8a34e99a65cbdc5d1 | [
"MIT"
] | null | null | null | # retuple.py
#
# Read a sequence of log lines and parse them into a sequence of tuples
loglines = open("access-log")
import re
logpats = r"(\S+) (\S+) (\S+) \[(.*?)\] \"(\S+) (\S+) (\S+)\" (\S+) (\S+)"
logpat = re.compile(logpats)
groups = (logpat.match(line) for line in loglines)
tuples = (g.groups()... | 23.541667 | 75 | 0.566372 |
7bfb3fcdd9a6938a304a69fafb1350003272d692 | 3,518 | py | Python | Project3/lib.py | veronikadim99/Wissenschaftliches-Rechnen | 3b7c86e9488bf434f3ad1d590f5b9bb9b4cdf218 | [
"Apache-2.0"
] | null | null | null | Project3/lib.py | veronikadim99/Wissenschaftliches-Rechnen | 3b7c86e9488bf434f3ad1d590f5b9bb9b4cdf218 | [
"Apache-2.0"
] | null | null | null | Project3/lib.py | veronikadim99/Wissenschaftliches-Rechnen | 3b7c86e9488bf434f3ad1d590f5b9bb9b4cdf218 | [
"Apache-2.0"
] | null | null | null |
import numpy as np
import matplotlib.pyplot as plt
import pylab
import os
'''
This package is to be used as a library. Please do not edit.
'''
def list_directory(path: str) -> list:
"""
List subdirectories and files in path directory.
Arguments:
path: the path of the directory to list
Retur... | 28.836066 | 153 | 0.660318 |
d083dac1362d3e6a989f287b4e51cb6b10711589 | 2,495 | py | Python | Packs/CommonScripts/Scripts/ExtractDomainAndFQDNFromUrlAndEmail/ExtractDomainAndFQDNFromUrlAndEmail_test.py | diCagri/content | c532c50b213e6dddb8ae6a378d6d09198e08fc9f | [
"MIT"
] | 2 | 2021-12-06T21:38:24.000Z | 2022-01-13T08:23:36.000Z | Packs/CommonScripts/Scripts/ExtractDomainAndFQDNFromUrlAndEmail/ExtractDomainAndFQDNFromUrlAndEmail_test.py | diCagri/content | c532c50b213e6dddb8ae6a378d6d09198e08fc9f | [
"MIT"
] | 87 | 2022-02-23T12:10:53.000Z | 2022-03-31T11:29:05.000Z | Packs/CommonScripts/Scripts/ExtractDomainAndFQDNFromUrlAndEmail/ExtractDomainAndFQDNFromUrlAndEmail_test.py | diCagri/content | c532c50b213e6dddb8ae6a378d6d09198e08fc9f | [
"MIT"
] | 2 | 2022-01-05T15:27:01.000Z | 2022-02-01T19:27:43.000Z | # -*- coding: utf-8 -*-
import demistomock as demisto
from ExtractDomainAndFQDNFromUrlAndEmail import extract_fqdn, main
import pytest
@pytest.mark.parametrize('input,fqdn', [ # noqa: E501 disable-secrets-detection
('www.static.attackiqtes.com', 'www.static.attackiqtes.com'),
('http:www.static.attackiqtes.co... | 48.921569 | 111 | 0.7002 |
ef37a28953cebb1e7bc5b4313831c000644cca00 | 2,564 | py | Python | research/hpc/pinns/export.py | leelige/mindspore | 5199e05ba3888963473f2b07da3f7bca5b9ef6dc | [
"Apache-2.0"
] | 77 | 2021-10-15T08:32:37.000Z | 2022-03-30T13:09:11.000Z | research/hpc/pinns/export.py | leelige/mindspore | 5199e05ba3888963473f2b07da3f7bca5b9ef6dc | [
"Apache-2.0"
] | 3 | 2021-10-30T14:44:57.000Z | 2022-02-14T06:57:57.000Z | research/hpc/pinns/export.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... | 41.354839 | 93 | 0.671217 |
ef3abd8434ea10a9881e3158292d222e86d3137b | 1,018 | py | Python | year_3/comppi_0/tgbot/views.py | honchardev/KPI | f8425681857c02a67127ffb05c0af0563a8473e1 | [
"MIT"
] | null | null | null | year_3/comppi_0/tgbot/views.py | honchardev/KPI | f8425681857c02a67127ffb05c0af0563a8473e1 | [
"MIT"
] | 21 | 2020-03-24T16:26:04.000Z | 2022-02-18T15:56:16.000Z | year_3/comppi_0/tgbot/views.py | honchardev/KPI | f8425681857c02a67127ffb05c0af0563a8473e1 | [
"MIT"
] | null | null | null | import tgbot.botsetup
from django.shortcuts import render, redirect, HttpResponseRedirect
from tgbot.botsetup import setup_bot
def tgbotapi(request):
print(tgbot.botsetup._token, tgbot.botsetup.TGBotInstance)
return render(request, 'tgbotindex.html', {
'token': tgbot.botsetup._token,
'bot': tg... | 33.933333 | 80 | 0.724951 |
32b51b6b9fca2c290a90d374d60f2053ca9ffa2d | 39,660 | py | Python | elite_dec.py | Zusyaku/Termux-And-Lali-Linux-V2 | b1a1b0841d22d4bf2cc7932b72716d55f070871e | [
"Apache-2.0"
] | 39 | 2020-02-26T09:44:36.000Z | 2022-03-23T00:18:25.000Z | elite/elite_ok.py | B4BY-DG/reverse-enginnering | b5b46a9f0eee218f2a642b615c77135c33c6f4ad | [
"MIT"
] | 15 | 2020-05-14T10:07:26.000Z | 2022-01-06T02:55:32.000Z | elite/elite_ok.py | B4BY-DG/reverse-enginnering | b5b46a9f0eee218f2a642b615c77135c33c6f4ad | [
"MIT"
] | 41 | 2020-03-16T22:36:38.000Z | 2022-03-17T14:47:19.000Z | #-*-coding:utf-8-*-
#Create & Recode By Dapunta & Rizal
#Lu Mau Recode, Mau Lu Apain Terserah Bro, Tapi Hargai Lah Karya Kami.
#Gw Bikin Ni SC Sama Rizal Susah Payah, Ngerakit Sana Sini Banyak Error, Jgn Seenaknya Ganti Nama Author, Apalagi Ngalihin Botnya. Terima Kasih.
# User Agent
#User Agent Xiaomi : Mozil... | 40.718686 | 453 | 0.540318 |
72074c9678584d78c9006b4da2b0bc88007ce217 | 17,848 | py | Python | Scan_BLE.py | Maxim01/Programmes | dbe5b83b3c65776ccc00049793fa85313fb76065 | [
"Apache-2.0"
] | null | null | null | Scan_BLE.py | Maxim01/Programmes | dbe5b83b3c65776ccc00049793fa85313fb76065 | [
"Apache-2.0"
] | null | null | null | Scan_BLE.py | Maxim01/Programmes | dbe5b83b3c65776ccc00049793fa85313fb76065 | [
"Apache-2.0"
] | null | null | null | import subprocess
import re
import time
import json
import sys
import os
import datetime
import binascii
from time import gmtime, strftime
#while(1):
#time.sleep(2)
Numero_device = 0
compteur_device = 0
Data_Scan = "VIDE"
Nb_elmts_device = "VIDE"
liste1 = "VIDE"
DEVI = False
COMPL = False
M... | 26.638806 | 163 | 0.632452 |
9d05cc3ea4c5c3d64703a1ec9a588bced205da8d | 2,299 | py | Python | 03 Python/Smart Home Dashboard/loesung/widgets/grid.py | DennisSchulmeister/dhbwka-wwi-iottech-quellcodes | 58f86907af31187f267a9ea476f061cc59098ebd | [
"CC-BY-4.0"
] | null | null | null | 03 Python/Smart Home Dashboard/loesung/widgets/grid.py | DennisSchulmeister/dhbwka-wwi-iottech-quellcodes | 58f86907af31187f267a9ea476f061cc59098ebd | [
"CC-BY-4.0"
] | null | null | null | 03 Python/Smart Home Dashboard/loesung/widgets/grid.py | DennisSchulmeister/dhbwka-wwi-iottech-quellcodes | 58f86907af31187f267a9ea476f061cc59098ebd | [
"CC-BY-4.0"
] | 1 | 2020-10-10T20:24:05.000Z | 2020-10-10T20:24:05.000Z | import pygame
from pygame.locals import *
from .widget import Widget
class GridWidget(Widget):
"""
Hilfsklasse zum Zeichnen eines Gitters, anhand dessen die Pixelpositionen
Elemente dann leichter abgelesen werden können.
"""
def __init__(self, x, y, w, h, delta_x, delta_y, main_x, main_y, colo... | 32.842857 | 85 | 0.574598 |
5f8e6c68024ceb669217412496f23a4c7d07930f | 401 | py | Python | python/generator_tricks_for_systemprogrammer/retuple.py | zeroam/TIL | 43e3573be44c7f7aa4600ff8a34e99a65cbdc5d1 | [
"MIT"
] | null | null | null | python/generator_tricks_for_systemprogrammer/retuple.py | zeroam/TIL | 43e3573be44c7f7aa4600ff8a34e99a65cbdc5d1 | [
"MIT"
] | null | null | null | python/generator_tricks_for_systemprogrammer/retuple.py | zeroam/TIL | 43e3573be44c7f7aa4600ff8a34e99a65cbdc5d1 | [
"MIT"
] | null | null | null | # retuple.py
#
# Read a sequence of log lines and parse them into a sequence of tuples
loglines = open("access-log")
import re
logpats = r"(\S+) (\S+) (\S+) \[(.*?)\] \"(\S+) (\S+) (\S+)\" (\S+) (\S+)"
logpat = re.compile(logpats)
groups = (logpat.match(line) for line in loglines)
tuples = (g.groups()... | 21.105263 | 75 | 0.57606 |
84557fefa605e0e09b46f15a725d3c35c2fdd9bf | 617 | py | Python | packages/watchmen-pipeline-kernel/src/watchmen_pipeline_kernel/external_writer/elastic_search_writer.py | Indexical-Metrics-Measure-Advisory/watchmen | c54ec54d9f91034a38e51fd339ba66453d2c7a6d | [
"MIT"
] | null | null | null | packages/watchmen-pipeline-kernel/src/watchmen_pipeline_kernel/external_writer/elastic_search_writer.py | Indexical-Metrics-Measure-Advisory/watchmen | c54ec54d9f91034a38e51fd339ba66453d2c7a6d | [
"MIT"
] | null | null | null | packages/watchmen-pipeline-kernel/src/watchmen_pipeline_kernel/external_writer/elastic_search_writer.py | Indexical-Metrics-Measure-Advisory/watchmen | c54ec54d9f91034a38e51fd339ba66453d2c7a6d | [
"MIT"
] | null | null | null | from watchmen_data_kernel.external_writer import BuildExternalWriter, ExternalWriter, ExternalWriterParams
class ElasticSearchExternalWriter(ExternalWriter):
# noinspection PyMethodMayBeStatic
async def do_run(self, params: ExternalWriterParams) -> None:
# TODO elastic search external writer
pass
def run(self... | 29.380952 | 106 | 0.829822 |
ffeed1585a784ed9cbd8467b2c143cd90c64d1d6 | 1,771 | py | Python | src/test/tests/operators/inverse_ghost_zone.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/inverse_ghost_zone.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/inverse_ghost_zone.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: inverse_ghost_zone.py
#
# Defect ID: '6724
#
# Programmer: Hank Childs
# Date: March 3, 2006
#
# Modifications:
#
# Mark C. Miller, Wed Jan 20 07:37:11 PST 2010
# Added ability to switch ... | 23.302632 | 78 | 0.692264 |
f23122fc6e95119d0f7e4ab6f1c6912b93f1364a | 74 | py | Python | rawio/version.py | hdkai/Raw-IO | f0fa928d7ef59a363c6f4c876d642af6dede6ae4 | [
"Apache-2.0"
] | null | null | null | rawio/version.py | hdkai/Raw-IO | f0fa928d7ef59a363c6f4c876d642af6dede6ae4 | [
"Apache-2.0"
] | null | null | null | rawio/version.py | hdkai/Raw-IO | f0fa928d7ef59a363c6f4c876d642af6dede6ae4 | [
"Apache-2.0"
] | null | null | null | #
# RawIO
# Copyright (c) 2021 Yusuf Olokoba
#
__version__ = "0.0.2" | 12.333333 | 36 | 0.608108 |
f25bf9ae7c148c657195588eeaabaa2a69203213 | 2,826 | py | Python | research/cv/tgcn/postprocess.py | leelige/mindspore | 5199e05ba3888963473f2b07da3f7bca5b9ef6dc | [
"Apache-2.0"
] | 77 | 2021-10-15T08:32:37.000Z | 2022-03-30T13:09:11.000Z | research/cv/tgcn/postprocess.py | leelige/mindspore | 5199e05ba3888963473f2b07da3f7bca5b9ef6dc | [
"Apache-2.0"
] | 3 | 2021-10-30T14:44:57.000Z | 2022-02-14T06:57:57.000Z | research/cv/tgcn/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... | 41.558824 | 116 | 0.664544 |
4b46f2d31b27c83d856b9db699c2eae2dd2e2f1b | 151 | py | Python | Shivani/grade.py | 63Shivani/Python-BootCamp | 2ed0ef95af35d35c0602031670fecfc92d8cea0a | [
"MIT"
] | null | null | null | Shivani/grade.py | 63Shivani/Python-BootCamp | 2ed0ef95af35d35c0602031670fecfc92d8cea0a | [
"MIT"
] | null | null | null | Shivani/grade.py | 63Shivani/Python-BootCamp | 2ed0ef95af35d35c0602031670fecfc92d8cea0a | [
"MIT"
] | null | null | null | n=int(input("enter grade\n"))
if(n>90):
print("A")
elif(n>80 and n<=90):
print("B")
elif(n>=60 and n<=80):
print("C")
else:
print("D")
| 15.1 | 29 | 0.523179 |
4ba78d172cb7265da53324107f1b6136e2105a5d | 538 | py | Python | frappe-bench/apps/erpnext/erpnext/patches/v8_0/disable_instructor_role.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/v8_0/disable_instructor_role.py | Semicheche/foa_frappe_docker | a186b65d5e807dd4caf049e8aeb3620a799c1225 | [
"MIT"
] | null | null | null | frappe-bench/apps/erpnext/erpnext/patches/v8_0/disable_instructor_role.py | Semicheche/foa_frappe_docker | a186b65d5e807dd4caf049e8aeb3620a799c1225 | [
"MIT"
] | 1 | 2021-04-29T14:39:01.000Z | 2021-04-29T14:39:01.000Z | # Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors
# License: GNU General Public License v3. See license.txt
from __future__ import unicode_literals
import frappe
def execute():
"""
disable the instructor role for companies with domain other than
Education.
"""
domains = frappe.db.sql_li... | 29.888889 | 71 | 0.739777 |
4bae93cb2111ddfd0f54457dd771bbc32b8ec3b5 | 6,493 | py | Python | Python/Buch_Python3_Das_umfassende_Praxisbuch/Kapitel_04_Standarddatentypen/03_kapitel_04_repetitionsfragen.py | Apop85/Scripts | e71e1c18539e67543e3509c424c7f2d6528da654 | [
"MIT"
] | null | null | null | Python/Buch_Python3_Das_umfassende_Praxisbuch/Kapitel_04_Standarddatentypen/03_kapitel_04_repetitionsfragen.py | Apop85/Scripts | e71e1c18539e67543e3509c424c7f2d6528da654 | [
"MIT"
] | 6 | 2020-12-24T15:15:09.000Z | 2022-01-13T01:58:35.000Z | Python/Buch_Python3_Das_umfassende_Praxisbuch/Kapitel_04_Standarddatentypen/03_kapitel_04_repetitionsfragen.py | Apop85/Scripts | 1d8dad316c55e1f1343526eac9e4b3d0909e4873 | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
# -*- coding:utf-8 -*-
###
# File: 03_kapitel_04_repetitionsfragen.py
# Project: Kapitel_04_Standarddatentypen
# Created Date: Saturday 23.02.2019, 11:41
# Author: Apop85
# -----
# Last Modified: Saturday 23.02.2019, 14:51
# -----
# Copyright (c) 2019 Apop85
# This software is published under the... | 58.495495 | 243 | 0.733405 |
d9ab02fd30b2b1ac15f55485f3492dc9c79b733e | 17,387 | py | Python | exercises/networking_selfpaced/networking-workshop/collections/ansible_collections/community/general/plugins/modules/network/exos/exos_config.py | tr3ck3r/linklight | 5060f624c235ecf46cb62cefcc6bddc6bf8ca3e7 | [
"MIT"
] | null | null | null | exercises/networking_selfpaced/networking-workshop/collections/ansible_collections/community/general/plugins/modules/network/exos/exos_config.py | tr3ck3r/linklight | 5060f624c235ecf46cb62cefcc6bddc6bf8ca3e7 | [
"MIT"
] | null | null | null | exercises/networking_selfpaced/networking-workshop/collections/ansible_collections/community/general/plugins/modules/network/exos/exos_config.py | tr3ck3r/linklight | 5060f624c235ecf46cb62cefcc6bddc6bf8ca3e7 | [
"MIT"
] | null | null | null | #!/usr/bin/python
# Copyright: (c) 2018, Extreme Networks Inc.
# 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)
ANSIBLE_METADATA = {'metadata_version': '1.1',
'status': ['preview'],
... | 39.787185 | 154 | 0.661701 |
d9ec74ec5dc85c766202a29e042caa339c802853 | 3,446 | py | Python | tests/test_tokenization_dpr.py | zyxdSTU/pytorch-pretrained-BERT | 5ec89489dd66302023821f2d27e109861e9f593d | [
"Apache-2.0"
] | 4 | 2021-01-15T20:20:47.000Z | 2021-11-14T18:33:42.000Z | tests/test_tokenization_dpr.py | yym6472/transformers | abd01205561e5caec167c1fbb20bccea24d7ba46 | [
"Apache-2.0"
] | 1 | 2021-09-15T09:20:01.000Z | 2022-03-02T17:16:01.000Z | tests/test_tokenization_dpr.py | yym6472/transformers | abd01205561e5caec167c1fbb20bccea24d7ba46 | [
"Apache-2.0"
] | 3 | 2021-04-26T08:01:16.000Z | 2022-03-23T04:47:56.000Z | # coding=utf-8
# Copyright 2020 Huggingface
#
# 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 ... | 39.609195 | 118 | 0.744631 |
8a1343f22639f42455a6f70bbc8ab554952e9d52 | 9,466 | py | Python | applications/doc_vqa/OCR_process/ocr_process.py | mukaiu/PaddleNLP | 0315365dbafa6e3b1c7147121ba85e05884125a5 | [
"Apache-2.0"
] | null | null | null | applications/doc_vqa/OCR_process/ocr_process.py | mukaiu/PaddleNLP | 0315365dbafa6e3b1c7147121ba85e05884125a5 | [
"Apache-2.0"
] | null | null | null | applications/doc_vqa/OCR_process/ocr_process.py | mukaiu/PaddleNLP | 0315365dbafa6e3b1c7147121ba85e05884125a5 | [
"Apache-2.0"
] | null | null | null | import os
import json
from paddleocr import PaddleOCR
import numpy as np
import re
import time
import sys
from multiprocessing import Process, Queue
from paddlenlp.transformers import LayoutXLMTokenizer
tokenizer = LayoutXLMTokenizer.from_pretrained("layoutxlm-base-uncased")
def get_all_chars(tokenizer):
all_ch... | 34.547445 | 79 | 0.471266 |
8abbd849b046c2fe8f362dff9f4c330ca123d4ce | 5,314 | py | Python | Utils/py/RL_ActionSelection/env_0/tools/naoth/math2d.py | tarsoly/NaoTH | dcd2b67ef6bf9953c81d3e1b26e543b5922b7d52 | [
"ECL-2.0",
"Apache-2.0"
] | 15 | 2015-01-12T10:46:29.000Z | 2022-03-28T05:13:14.000Z | Utils/py/RL_ActionSelection/env_0/tools/naoth/math2d.py | tarsoly/NaoTH | dcd2b67ef6bf9953c81d3e1b26e543b5922b7d52 | [
"ECL-2.0",
"Apache-2.0"
] | 2 | 2019-01-20T21:07:50.000Z | 2020-01-22T14:00:28.000Z | Utils/py/RL_ActionSelection/env_0/tools/naoth/math2d.py | tarsoly/NaoTH | dcd2b67ef6bf9953c81d3e1b26e543b5922b7d52 | [
"ECL-2.0",
"Apache-2.0"
] | 5 | 2018-02-07T18:18:10.000Z | 2019-10-15T17:01:41.000Z | import math
def clamp(x, minimum, maximum):
return max(minimum, min(x, maximum))
class Vector2:
def __init__(self, x=0.0, y=0.0):
self.x = x
self.y = y
def __add__(self, other):
return Vector2(self.x + other.x, self.y + other.y)
def __sub__(self, other):
return Vect... | 27.677083 | 101 | 0.577531 |
0a2556801f1ca3afb03f945e3b696fcb024368e3 | 4,654 | py | Python | deprecated/examples/local_sgd/resnet/utils/img_tool.py | hutuxian/FleetX | 843c7aa33f5a14680becf058a3aaf0327eefafd4 | [
"Apache-2.0"
] | 170 | 2020-08-12T12:07:01.000Z | 2022-03-07T02:38:26.000Z | deprecated/examples/local_sgd/resnet/utils/img_tool.py | hutuxian/FleetX | 843c7aa33f5a14680becf058a3aaf0327eefafd4 | [
"Apache-2.0"
] | 195 | 2020-08-13T03:22:15.000Z | 2022-03-30T07:40:25.000Z | deprecated/examples/local_sgd/resnet/utils/img_tool.py | hutuxian/FleetX | 843c7aa33f5a14680becf058a3aaf0327eefafd4 | [
"Apache-2.0"
] | 67 | 2020-08-14T02:07:46.000Z | 2022-03-28T10:05:33.000Z | #copyright (c) 2019 PaddlePaddle Authors. All Rights Reserve.
#
#Licensed under the Apache License, Version 2.0 (the "License");
#you may not use this file except in compliance with the License.
#You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
#Unless required by applicable l... | 31.445946 | 84 | 0.612806 |
e407cebbc8873de8d45dcd4f1bc3ca119e2108e5 | 2,189 | py | Python | ci/record_rep_weights.py | bademcurrency/badem-node | 85579a2ad4fe5d4caacc3d637687fa6f324a9632 | [
"BSD-2-Clause"
] | null | null | null | ci/record_rep_weights.py | bademcurrency/badem-node | 85579a2ad4fe5d4caacc3d637687fa6f324a9632 | [
"BSD-2-Clause"
] | null | null | null | ci/record_rep_weights.py | bademcurrency/badem-node | 85579a2ad4fe5d4caacc3d637687fa6f324a9632 | [
"BSD-2-Clause"
] | null | null | null | import requests
import argparse
import string
from binascii import unhexlify
from base64 import b32decode
from binascii import hexlify, unhexlify
parser = argparse.ArgumentParser(description='Generate bootstrap representative weight file.')
parser.add_argument("output", type=str, help="output weight file")
parser.add... | 33.166667 | 140 | 0.663317 |
7c4077215097094efb439c61fa1519ba463a318d | 2,168 | py | Python | Backdoor-ReverseShellPack/darkrise_rpwsh.py | Unam3dd/Train-2018-2020 | afb6ae70fe338cbe55a21b74648d91996b818fa2 | [
"MIT"
] | 4 | 2021-04-23T15:39:17.000Z | 2021-12-27T22:53:24.000Z | Backdoor-ReverseShellPack/darkrise_rpwsh.py | Unam3dd/Train-2018-2020 | afb6ae70fe338cbe55a21b74648d91996b818fa2 | [
"MIT"
] | null | null | null | Backdoor-ReverseShellPack/darkrise_rpwsh.py | Unam3dd/Train-2018-2020 | afb6ae70fe338cbe55a21b74648d91996b818fa2 | [
"MIT"
] | 2 | 2021-04-19T08:28:54.000Z | 2022-01-19T13:23:29.000Z | #!/usr/bin/python2
#-*- coding:utf-8 -*-
import subprocess
import os
import sys
import threading
import socket
import platform
import sys
def sys_required():
if sys.version[0] =='3':
sys.exit('[*] Please Run Backdoor With Python2')
def required_platform():
if 'Windows' not in platform.platform():
... | 25.809524 | 197 | 0.641144 |
6b3a87fdaaff7b0a0d0f450c08757fcfd3c9b07b | 383 | py | Python | books/SystemProgramming/ch4_advanced/test_sudo.py | zeroam/TIL | 43e3573be44c7f7aa4600ff8a34e99a65cbdc5d1 | [
"MIT"
] | null | null | null | books/SystemProgramming/ch4_advanced/test_sudo.py | zeroam/TIL | 43e3573be44c7f7aa4600ff8a34e99a65cbdc5d1 | [
"MIT"
] | null | null | null | books/SystemProgramming/ch4_advanced/test_sudo.py | zeroam/TIL | 43e3573be44c7f7aa4600ff8a34e99a65cbdc5d1 | [
"MIT"
] | null | null | null | #!/bin/env python
from getpass import getpass
from subprocess import Popen, PIPE
password = getpass("Please enter your password: ")
# sudo requires the flag '-S' in order to take input from stdin
proc = Popen("sudo -S apach2ctl restart".split(), stdin=PIPE, stdout=PIPE, stderr=PIPE)
# Popen only accepts byte-arrays so... | 42.555556 | 87 | 0.765013 |
861e31c6e0289e959825e6d5659532eb5fa83d0a | 7,103 | py | Python | python/oneflow/compatible/single_client/test/ops/test_MarginRankingLoss.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/test/ops/test_MarginRankingLoss.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/test/ops/test_MarginRankingLoss.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... | 35.163366 | 88 | 0.664649 |
86aebd221d5615cb12d2157852710112ba00cf3b | 138 | py | Python | scripts/hello_world_pandres95.py | breezage/Hacktoberfest-1 | 6f6d52248c79c0e72fd13b599500318fce3f9ab0 | [
"MIT"
] | null | null | null | scripts/hello_world_pandres95.py | breezage/Hacktoberfest-1 | 6f6d52248c79c0e72fd13b599500318fce3f9ab0 | [
"MIT"
] | null | null | null | scripts/hello_world_pandres95.py | breezage/Hacktoberfest-1 | 6f6d52248c79c0e72fd13b599500318fce3f9ab0 | [
"MIT"
] | 1 | 2019-10-24T06:45:21.000Z | 2019-10-24T06:45:21.000Z | # LANGUAGE: Python
# ENV: Python 2.7.13
# AUTHOR: Pablo Andrés Dorado Suárez
# GITHUB: https://github.com/pandre95
print 'Hello, folks!'
| 19.714286 | 37 | 0.717391 |
86ee4055fdc8c845a501b02a4384af26509a217b | 2,077 | py | Python | research/cv/vgg19/postprocess.py | leelige/mindspore | 5199e05ba3888963473f2b07da3f7bca5b9ef6dc | [
"Apache-2.0"
] | 77 | 2021-10-15T08:32:37.000Z | 2022-03-30T13:09:11.000Z | research/cv/vgg19/postprocess.py | leelige/mindspore | 5199e05ba3888963473f2b07da3f7bca5b9ef6dc | [
"Apache-2.0"
] | 3 | 2021-10-30T14:44:57.000Z | 2022-02-14T06:57:57.000Z | research/cv/vgg19/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... | 44.191489 | 113 | 0.649494 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.