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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
955598453a0fc8aeab06efd503e734b94a715059 | 128 | py | Python | server/bumf/core/__init__.py | bumfiness/bumf | 71c404c0a8f804b8f0e127df3de6d8916db4c660 | [
"Apache-2.0"
] | 6 | 2017-01-07T17:59:46.000Z | 2017-02-10T13:19:46.000Z | server/bumf/core/__init__.py | rixx/bumf | 71c404c0a8f804b8f0e127df3de6d8916db4c660 | [
"Apache-2.0"
] | null | null | null | server/bumf/core/__init__.py | rixx/bumf | 71c404c0a8f804b8f0e127df3de6d8916db4c660 | [
"Apache-2.0"
] | null | null | null | from django.apps import AppConfig
class CoreConfig(AppConfig):
name = 'bumf.core'
verbose_name = 'bumf core features'
| 18.285714 | 39 | 0.726563 |
9560395aa51bac2d79d507364f2996ba0a94a4b4 | 804 | py | Python | CareerTinderServer/CareerTinder/migrations/0007_auto_20160918_0434.py | sarojaerabelli/HVGS | 86ec3d2de496540ca439c40f4a0c58c47aa181cf | [
"MIT"
] | 1 | 2016-09-18T16:40:27.000Z | 2016-09-18T16:40:27.000Z | CareerTinderServer/CareerTinder/migrations/0007_auto_20160918_0434.py | sarojaerabelli/HVGS | 86ec3d2de496540ca439c40f4a0c58c47aa181cf | [
"MIT"
] | null | null | null | CareerTinderServer/CareerTinder/migrations/0007_auto_20160918_0434.py | sarojaerabelli/HVGS | 86ec3d2de496540ca439c40f4a0c58c47aa181cf | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
# Generated by Django 1.10.1 on 2016-09-18 08:34
from __future__ import unicode_literals
import datetime
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('CareerTinder', '0006_auto_20160918_0224'),
]
operations = [
... | 28.714286 | 135 | 0.606965 |
c252514e383781c34a179112448804aeae126085 | 457 | py | Python | Crashkurs Python/04_while.py | slogslog/Coding-Kurzgeschichten | 9b08237038147c6c348d4cf4c69567178e07dd1d | [
"Unlicense"
] | 2 | 2020-03-23T14:57:50.000Z | 2021-03-24T18:12:07.000Z | Crashkurs Python/04_while.py | slogslog/Coding-Kurzgeschichten | 9b08237038147c6c348d4cf4c69567178e07dd1d | [
"Unlicense"
] | null | null | null | Crashkurs Python/04_while.py | slogslog/Coding-Kurzgeschichten | 9b08237038147c6c348d4cf4c69567178e07dd1d | [
"Unlicense"
] | null | null | null | # static void Main(string[] args)
# {
# int counter = 10;
#
# while (counter != 0)
# {
# Console.WriteLine(counter);
# counter--;
# }
#
# Console.WriteLine("Nach der Schleife");
# }
# Besonderheit: while haben in Python ein else!
counter = 10
while counter != 0:
print(counter,... | 16.925926 | 47 | 0.571116 |
667aa08c416993335fe43365c96ff1adcb74bf94 | 6,665 | py | Python | code/5/fsms/pwang13.py | pwang13/AutomatedSE_Coursework | b416672d9756fcc60367143b989d29b0c905cfc3 | [
"Unlicense"
] | null | null | null | code/5/fsms/pwang13.py | pwang13/AutomatedSE_Coursework | b416672d9756fcc60367143b989d29b0c905cfc3 | [
"Unlicense"
] | null | null | null | code/5/fsms/pwang13.py | pwang13/AutomatedSE_Coursework | b416672d9756fcc60367143b989d29b0c905cfc3 | [
"Unlicense"
] | null | null | null | from __future__ import print_function, division
import random
# TODO 1: Fill in your unity ID
__name__ = "pwang"
tryRandom = random
def kv(d):
"""
Pretty Print the dictionary.
"""
return '(' + ','.join(['%s: %s'%(k, d[k]) for k in sorted(d.keys()) if k[0] != "_"]) + ')'
def shuffle(lst):
"""
... | 27.541322 | 107 | 0.56129 |
dd2048d0101cf6631e0b89d218cb563888140d01 | 697 | py | Python | Python/zzz_training_challenge/Python_Challenge/solutions/ch04_strings/intro/intro_slicing.py | Kreijeck/learning | eaffee08e61f2a34e01eb8f9f04519aac633f48c | [
"MIT"
] | null | null | null | Python/zzz_training_challenge/Python_Challenge/solutions/ch04_strings/intro/intro_slicing.py | Kreijeck/learning | eaffee08e61f2a34e01eb8f9f04519aac633f48c | [
"MIT"
] | null | null | null | Python/zzz_training_challenge/Python_Challenge/solutions/ch04_strings/intro/intro_slicing.py | Kreijeck/learning | eaffee08e61f2a34e01eb8f9f04519aac633f48c | [
"MIT"
] | null | null | null | # Beispielprogramm für das Buch "Python Challenge"
#
# Copyright 2020 by Michael Inden
strange_message= "a message containing only a message"
mid_chars = strange_message[10:20]
last_seven_chars = strange_message[-7:]
print("midChars:", mid_chars, " / lastFiveChars:", last_seven_chars)
first_char = strange_message[0... | 30.304348 | 74 | 0.767575 |
7c0d74e718aacaad050cdacdc313f3f59cfb9db4 | 303 | py | Python | exercises/en/exc_02_10_03.py | Jette16/spacy-course | 32df0c8f6192de6c9daba89740a28c0537e4d6a0 | [
"MIT"
] | 2,085 | 2019-04-17T13:10:40.000Z | 2022-03-30T21:51:46.000Z | exercises/en/exc_02_10_03.py | Jette16/spacy-course | 32df0c8f6192de6c9daba89740a28c0537e4d6a0 | [
"MIT"
] | 79 | 2019-04-18T14:42:55.000Z | 2022-03-07T08:15:43.000Z | exercises/en/exc_02_10_03.py | Jette16/spacy-course | 32df0c8f6192de6c9daba89740a28c0537e4d6a0 | [
"MIT"
] | 361 | 2019-04-17T13:34:32.000Z | 2022-03-28T04:42:45.000Z | import spacy
nlp = spacy.load("en_core_web_md")
doc = nlp("This was a great restaurant. Afterwards, we went to a really nice bar.")
# Create spans for "great restaurant" and "really nice bar"
span1 = ____
span2 = ____
# Get the similarity of the spans
similarity = ____.____(____)
print(similarity)
| 21.642857 | 83 | 0.739274 |
b00e14e4e203dba35433e65e468a5975f11d645c | 3,704 | py | Python | BtmManager-Prototyp-py/Gui_ui/Neuer_Arbeitsplatz.py | datend3nker/JuFo-BtM | a01e931ec4862c12e8a4861eed0661806ee2d19e | [
"BSD-Source-Code"
] | null | null | null | BtmManager-Prototyp-py/Gui_ui/Neuer_Arbeitsplatz.py | datend3nker/JuFo-BtM | a01e931ec4862c12e8a4861eed0661806ee2d19e | [
"BSD-Source-Code"
] | null | null | null | BtmManager-Prototyp-py/Gui_ui/Neuer_Arbeitsplatz.py | datend3nker/JuFo-BtM | a01e931ec4862c12e8a4861eed0661806ee2d19e | [
"BSD-Source-Code"
] | null | null | null | # -*- coding: utf-8 -*-
# Form implementation generated from reading ui file 'Neuer_Arbeitsplatz.ui'
#
# Created by: PyQt5 UI code generator 5.13.2
#
# WARNING! All changes made in this file will be lost!
from PyQt5 import QtCore, QtGui, QtWidgets
class Ui_Neuer_Arbeitsplatz(object):
def setupUi(self, Neuer_Ar... | 47.487179 | 97 | 0.700054 |
05c2aa6ffc24fb25c007f89e6d23a4de7a83a44a | 159 | py | Python | exercises/ja/solution_01_02_02.py | tuanducdesign/spacy-course | f8d092c5fa2997fccb3f367d174dce8667932b3d | [
"MIT"
] | 2 | 2020-07-07T01:46:37.000Z | 2021-04-20T03:19:43.000Z | exercises/ja/solution_01_02_02.py | tuanducdesign/spacy-course | f8d092c5fa2997fccb3f367d174dce8667932b3d | [
"MIT"
] | null | null | null | exercises/ja/solution_01_02_02.py | tuanducdesign/spacy-course | f8d092c5fa2997fccb3f367d174dce8667932b3d | [
"MIT"
] | null | null | null | # spaCyをインポート
import spacy
# ドイツ語のnlpオブジェクトを作成
nlp = spacy.blank("de")
# テキストを処理(ドイツ語で「よろしく!」の意味)
doc = nlp("Liebe Grüße!")
# docのテキストをプリント
print(doc.text)
| 13.25 | 26 | 0.716981 |
af97bbbd760c13399094522f60abca4cb9366bed | 1,713 | py | Python | kicker/CONST_GAME_FIGURES.py | GeorgJohn/2D_Kicker_git | 8a451f2d573d703ceac1c2011f26e6ff953d2090 | [
"MIT"
] | null | null | null | kicker/CONST_GAME_FIGURES.py | GeorgJohn/2D_Kicker_git | 8a451f2d573d703ceac1c2011f26e6ff953d2090 | [
"MIT"
] | null | null | null | kicker/CONST_GAME_FIGURES.py | GeorgJohn/2D_Kicker_git | 8a451f2d573d703ceac1c2011f26e6ff953d2090 | [
"MIT"
] | 1 | 2018-08-24T17:53:41.000Z | 2018-08-24T17:53:41.000Z | from enum import IntEnum
from kicker.CONST_KICKER import COURT_WIDTH
from kicker.CONST_KICKER import BAR_POSITION_KEEPER
from kicker.CONST_KICKER import BAR_POSITION_DEFENDER
from kicker.CONST_KICKER import BAR_POSITION_MIDFIELDER
from kicker.CONST_KICKER import BAR_POSITION_FORWARD
from kicker.CONST_BALL import BALL_R... | 28.55 | 100 | 0.796264 |
bb906e433a356f833ff395fc0fdae06867be2c49 | 2,468 | py | Python | v204/python/edelstahl.py | chrbeckm/anfaenger-praktikum | 51764ff23901de1bc3d16dc935acfdc66bb2b2b7 | [
"MIT"
] | 2 | 2019-12-10T10:25:11.000Z | 2021-01-26T13:59:40.000Z | v204/python/edelstahl.py | chrbeckm/anfaenger-praktikum | 51764ff23901de1bc3d16dc935acfdc66bb2b2b7 | [
"MIT"
] | null | null | null | v204/python/edelstahl.py | chrbeckm/anfaenger-praktikum | 51764ff23901de1bc3d16dc935acfdc66bb2b2b7 | [
"MIT"
] | 1 | 2020-12-06T21:24:58.000Z | 2020-12-06T21:24:58.000Z | import numpy as np
import matplotlib.pyplot as plt
from scipy.stats import sem
t, t7, t8, T = np.genfromtxt('python/edelstahl.txt', unpack=True)
plt.plot(2*t-2, t7, 'ro', markersize=1, label=r'$T_7$')
plt.plot(2*t-2, t8, 'ko', markersize=1, label=r'$T_8$')
plt.legend()
plt.grid()
plt.xlabel(r'$t\:/\:\si{\second}$')
pl... | 28.367816 | 228 | 0.584684 |
5967ed4429c9228622451e67e2b2b3b832263e97 | 8,444 | py | Python | kts/core/cache.py | konodyuk/kts | 3af5ccbf1d2089cb41d171626fcde4b0ba5aa8a7 | [
"MIT"
] | 18 | 2019-02-14T13:10:07.000Z | 2021-11-26T07:10:13.000Z | kts/core/cache.py | konodyuk/kts | 3af5ccbf1d2089cb41d171626fcde4b0ba5aa8a7 | [
"MIT"
] | 2 | 2019-02-17T14:06:42.000Z | 2019-09-15T18:05:54.000Z | kts/core/cache.py | konodyuk/kts | 3af5ccbf1d2089cb41d171626fcde4b0ba5aa8a7 | [
"MIT"
] | 2 | 2019-09-15T13:12:42.000Z | 2020-04-15T14:05:54.000Z | import os
from abc import ABC, abstractmethod
from collections import defaultdict
from collections.abc import MutableMapping
from glob import glob
from pathlib import Path
from typing import Any, List
from weakref import WeakValueDictionary
import cloudpickle
import dill
import feather
import numpy as np
import pandas... | 29.943262 | 128 | 0.592255 |
ab87f9045721abe43a570a921039797db16901fe | 26,296 | py | Python | research/cvtmodel/regnet/src/regnet_x_800mf.py | leelige/mindspore | 5199e05ba3888963473f2b07da3f7bca5b9ef6dc | [
"Apache-2.0"
] | 77 | 2021-10-15T08:32:37.000Z | 2022-03-30T13:09:11.000Z | research/cvtmodel/regnet/src/regnet_x_800mf.py | leelige/mindspore | 5199e05ba3888963473f2b07da3f7bca5b9ef6dc | [
"Apache-2.0"
] | 3 | 2021-10-30T14:44:57.000Z | 2022-02-14T06:57:57.000Z | research/cvtmodel/regnet/src/regnet_x_800mf.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... | 60.450575 | 119 | 0.526468 |
ab91343d5d1b09daa1bbab91ff1d72547d3f937b | 11,001 | py | Python | frappe-bench/apps/erpnext/erpnext/agriculture/setup.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/agriculture/setup.py | Semicheche/foa_frappe_docker | a186b65d5e807dd4caf049e8aeb3620a799c1225 | [
"MIT"
] | null | null | null | frappe-bench/apps/erpnext/erpnext/agriculture/setup.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 import _
from erpnext.setup.utils import insert_record
def setup_agriculture():
if frappe.get_all('Agriculture Analysis Criteria'):
# already setup
return
create_agriculture_data()
def create_agriculture_data():
records = [
dict(
doctype='I... | 25.524362 | 65 | 0.694301 |
abfcf1cf3c065a10aab788762e5bfdfe50c44b86 | 7,786 | py | Python | meintest.py | Mathias-Mo/Zauberwald_v05 | 7c67b7ed086feb8e3897f4b6c2122b8b66256331 | [
"MIT"
] | null | null | null | meintest.py | Mathias-Mo/Zauberwald_v05 | 7c67b7ed086feb8e3897f4b6c2122b8b66256331 | [
"MIT"
] | null | null | null | meintest.py | Mathias-Mo/Zauberwald_v05 | 7c67b7ed086feb8e3897f4b6c2122b8b66256331 | [
"MIT"
] | null | null | null | """
zum etwas austesten und zwischenspeichern gedacht
"""
import random
# my_list = ['Holz', 'Wasser', 'Mücke']
#
# print(my_list[my_list.index('Holz')+1])
# print(my_list.index('Holz')+1)
#
# my_dict = {'item': {
# 'potion': {
# 'manapotion': 3,
# 'healingpotion... | 26.664384 | 116 | 0.447085 |
f9ec6476d3db5f3ddace68e036b3d270450a9618 | 2,772 | py | Python | official/cv/Deepsort/src/deep/feature_extractor.py | leelige/mindspore | 5199e05ba3888963473f2b07da3f7bca5b9ef6dc | [
"Apache-2.0"
] | 1 | 2021-11-18T08:17:44.000Z | 2021-11-18T08:17:44.000Z | official/cv/Deepsort/src/deep/feature_extractor.py | leelige/mindspore | 5199e05ba3888963473f2b07da3f7bca5b9ef6dc | [
"Apache-2.0"
] | null | null | null | official/cv/Deepsort/src/deep/feature_extractor.py | leelige/mindspore | 5199e05ba3888963473f2b07da3f7bca5b9ef6dc | [
"Apache-2.0"
] | 2 | 2019-09-01T06:17:04.000Z | 2019-10-04T08:39:45.000Z | # Copyright 2021 Huawei Technologies Co., Ltd
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to... | 36.473684 | 78 | 0.604978 |
059004d4fb22e4ff0ae8a82e1aa187dd31c818a0 | 1,533 | py | Python | Packs/LogRhythmRest/Integrations/LogRhythmRest/LogRhythmRest_test.py | diCagri/content | c532c50b213e6dddb8ae6a378d6d09198e08fc9f | [
"MIT"
] | 799 | 2016-08-02T06:43:14.000Z | 2022-03-31T11:10:11.000Z | Packs/LogRhythmRest/Integrations/LogRhythmRest/LogRhythmRest_test.py | diCagri/content | c532c50b213e6dddb8ae6a378d6d09198e08fc9f | [
"MIT"
] | 9,317 | 2016-08-07T19:00:51.000Z | 2022-03-31T21:56:04.000Z | Packs/LogRhythmRest/Integrations/LogRhythmRest/LogRhythmRest_test.py | diCagri/content | c532c50b213e6dddb8ae6a378d6d09198e08fc9f | [
"MIT"
] | 1,297 | 2016-08-04T13:59:00.000Z | 2022-03-31T23:43:06.000Z | from datetime import date, timedelta
def test_get_time_frame():
from LogRhythmRest import get_time_frame
date_format = "%Y-%m-%d"
today = date.today()
start, end = get_time_frame('Today', None, None)
assert end.strftime(date_format) == today.strftime(date_format)
assert start.strftime(date_f... | 41.432432 | 96 | 0.718852 |
55ad594902ce13ae30cf1584cbbd1c40ab9e10a4 | 163 | py | Python | data_tests/saved__backend__/cython/no_arg.py | fluiddyn/transonic | a460e9f6d1139f79b668cb3306d1e8a7e190b72d | [
"BSD-3-Clause"
] | 88 | 2019-01-08T16:39:08.000Z | 2022-02-06T14:19:23.000Z | data_tests/saved__backend__/cython/no_arg.py | fluiddyn/transonic | a460e9f6d1139f79b668cb3306d1e8a7e190b72d | [
"BSD-3-Clause"
] | 13 | 2019-06-20T15:53:10.000Z | 2021-02-09T11:03:29.000Z | data_tests/saved__backend__py3.9/cython/no_arg.py | fluiddyn/transonic | a460e9f6d1139f79b668cb3306d1e8a7e190b72d | [
"BSD-3-Clause"
] | 1 | 2019-11-05T03:03:14.000Z | 2019-11-05T03:03:14.000Z | try:
import cython
except ImportError:
from transonic_cl import cython
def func():
return 1
def func2():
return 1
__transonic__ = ("0.3.3",)
| 10.1875 | 35 | 0.644172 |
9b30d5a6bb9ba6eaf61443e0af6cd594045ab09b | 184 | py | Python | andinopy/test_oled.py | andino-systems/andinopy | 28fc09fbdd67dd690b9b3f80f03a05c342c777e1 | [
"Apache-2.0"
] | null | null | null | andinopy/test_oled.py | andino-systems/andinopy | 28fc09fbdd67dd690b9b3f80f03a05c342c777e1 | [
"Apache-2.0"
] | null | null | null | andinopy/test_oled.py | andino-systems/andinopy | 28fc09fbdd67dd690b9b3f80f03a05c342c777e1 | [
"Apache-2.0"
] | null | null | null |
import andinopy.base_devices.andino_io_oled
myled = andinopy.base_devices.andino_io_oled.andino_io_oled()
myled.rot = 1
myled.set_text([["hehehhehe","hohohohoho"],["huhu","hihi"]]) | 23 | 61 | 0.771739 |
1f7bb614f87ea12c9cd4deb28071405af72050b2 | 1,055 | py | Python | leetcode/133-Clone-Graph/bfs_002_iterative_me.py | cc13ny/all-in | bc0b01e44e121ea68724da16f25f7e24386c53de | [
"MIT"
] | 1 | 2015-12-16T04:01:03.000Z | 2015-12-16T04:01:03.000Z | leetcode/133-Clone-Graph/bfs_002_iterative_me.py | cc13ny/all-in | bc0b01e44e121ea68724da16f25f7e24386c53de | [
"MIT"
] | 1 | 2016-02-09T06:00:07.000Z | 2016-02-09T07:20:13.000Z | leetcode/133-Clone-Graph/bfs_002_iterative_me.py | cc13ny/all-in | bc0b01e44e121ea68724da16f25f7e24386c53de | [
"MIT"
] | 2 | 2019-06-27T09:07:26.000Z | 2019-07-01T04:40:13.000Z | """
Key Points:
mapping -> old node to new node (instead of val to new node)
Good Points:
1. mapping is filled with BFS
Bad Points:
1. I think I should separate BFS as a module/method?
2. use q = [] instead of collections.deque
"""
# Definition for a Node.
class Node:
def __init__(self, val=0, n... | 23.977273 | 64 | 0.554502 |
c0acc84b8675900b590e57fad9ce97521901c873 | 89 | py | Python | Curso_Python/Secao8-Django-Basico/162_incluindo_arquivos_parciais/paginas/apps.py | pedrohd21/Cursos-Feitos | b223aad83867bfa45ad161d133e33c2c200d42bd | [
"MIT"
] | 5 | 2018-02-04T05:41:39.000Z | 2021-11-09T10:51:58.000Z | Curso_Python/Secao8-Django-Basico/162_incluindo_arquivos_parciais/paginas/apps.py | pedrohd21/Cursos-Feitos | b223aad83867bfa45ad161d133e33c2c200d42bd | [
"MIT"
] | 4 | 2020-11-22T16:07:47.000Z | 2022-01-13T03:27:05.000Z | Curso_Python/Secao8-Django-Basico/162_incluindo_arquivos_parciais/paginas/apps.py | pedrohd21/Cursos-Feitos | b223aad83867bfa45ad161d133e33c2c200d42bd | [
"MIT"
] | 4 | 2018-12-22T23:56:47.000Z | 2021-07-31T11:00:54.000Z | from django.apps import AppConfig
class PaginasConfig(AppConfig):
name = 'paginas'
| 14.833333 | 33 | 0.752809 |
b5390edab0877e60ad455361e760890e5ef753c3 | 18,733 | py | Python | savageml/models/layerless_dense_net_model.py | savagewil/SavageML | d5aa9a5305b5de088e3bf32778252c877faec41d | [
"MIT"
] | null | null | null | savageml/models/layerless_dense_net_model.py | savagewil/SavageML | d5aa9a5305b5de088e3bf32778252c877faec41d | [
"MIT"
] | null | null | null | savageml/models/layerless_dense_net_model.py | savagewil/SavageML | d5aa9a5305b5de088e3bf32778252c877faec41d | [
"MIT"
] | null | null | null | from typing import Tuple, List, Callable, Iterable, Union, Dict
import numpy as np
from savageml.utility import ActivationFunctions, ActivationFunctionsDerivatives
from savageml.utility import LossFunctions, LossFunctionDerivatives
from savageml.models import BaseModel
from savageml.utility import get_sample_from_iter... | 42.575 | 124 | 0.604388 |
8d85386d994cb58cc1369b8dcf89d8085aefa9f5 | 1,325 | py | Python | REWORK/src/py/automation.py | JueK3y/Instagram-automated-commenting | 7ecc4119d8e9ff0dfba620488018fbd9fce61606 | [
"RSA-MD"
] | 9 | 2021-06-22T14:01:24.000Z | 2022-03-11T08:59:38.000Z | REWORK/src/py/automation.py | JueK3y/Instagram-automated-commenting | 7ecc4119d8e9ff0dfba620488018fbd9fce61606 | [
"RSA-MD"
] | 6 | 2021-01-15T09:12:11.000Z | 2021-05-25T08:12:10.000Z | REWORK/src/py/automation.py | JueK3y/Instagram-automated-commenting | 7ecc4119d8e9ff0dfba620488018fbd9fce61606 | [
"RSA-MD"
] | 1 | 2021-12-27T18:58:53.000Z | 2021-12-27T18:58:53.000Z | # ┌─────────────────────────────────────────────────────────────────────────┐
# │ Instagram Automated Commenting 2.0 │
# ├─────────────────────────────────────────────────────────────────────────┤
# │ DO NOT indicate used program sections as your own. │
# │ DO N... | 57.608696 | 93 | 0.456604 |
93ff52896e75eb66068043bca3a0550c84caf5d8 | 1,940 | py | Python | workSpace/test/i2c.py | fibeule/Micropython-Tutorial-for-esp32 | eea251efd7b7b6b15af96f6f84d3281e1119234a | [
"MIT"
] | 5 | 2018-07-24T17:41:15.000Z | 2021-02-07T13:59:42.000Z | workSpace/test/i2c.py | fibeule/Micropython-Tutorial-for-esp32 | eea251efd7b7b6b15af96f6f84d3281e1119234a | [
"MIT"
] | null | null | null | workSpace/test/i2c.py | fibeule/Micropython-Tutorial-for-esp32 | eea251efd7b7b6b15af96f6f84d3281e1119234a | [
"MIT"
] | 5 | 2018-07-24T17:41:03.000Z | 2021-10-01T07:06:16.000Z | from time import sleep_ms
from machine import I2C, Pin
# I2C-Bus init
bus = I2C(scl=Pin(22), sda=Pin(21))
# ssd1306 oled Display
oled=None
try:
from lib.display.ssd1306 import SSD1306_I2C
oled = SSD1306_I2C(128, 64, bus)
oled.text("Hello World", 10, 20)
oled.show()
except OSError:
pr... | 28.955224 | 115 | 0.592784 |
f52a05bf03ba8b67e4068e40e85f61d8298e5bf1 | 992 | py | Python | app/config.py | WagnerJM/timetracker | f5413aca5422b21d9fa094fbf9a96f9474487e35 | [
"MIT"
] | null | null | null | app/config.py | WagnerJM/timetracker | f5413aca5422b21d9fa094fbf9a96f9474487e35 | [
"MIT"
] | null | null | null | app/config.py | WagnerJM/timetracker | f5413aca5422b21d9fa094fbf9a96f9474487e35 | [
"MIT"
] | null | null | null | import os
class Config(object):
DEBUG = False
CSRF_ENABLED = True
SECRET_KEY = os.getenv('SECRET_KEY')
JWT_SECRET_KEY = os.getenv('JWT_SECRET')
JWT_BLACKLIST_ENABLED = True
JWT_BLACLIST_TOKEN_CHECKS = ['access', 'refresh']
#REDIS_URL = 'redis://:{pw}@redis:6379/0'.format(pw=os.getenv('REDIS_PW'))
# TODO: cre... | 20.666667 | 77 | 0.71875 |
fd95ad532a175825d91655f3e66b6ddac9627e3d | 3,326 | py | Python | Paddle_Industry_Practice_Sample_Library/nlp_projects/relation_extraction/ernie/predict.py | linuxonly801/awesome-DeepLearning | b063757fa130c4d56aea5cce2e592610f1e169f9 | [
"Apache-2.0"
] | 1 | 2022-01-12T06:52:43.000Z | 2022-01-12T06:52:43.000Z | Paddle_Industry_Practice_Sample_Library/nlp_projects/relation_extraction/ernie/predict.py | linuxonly801/awesome-DeepLearning | b063757fa130c4d56aea5cce2e592610f1e169f9 | [
"Apache-2.0"
] | null | null | null | Paddle_Industry_Practice_Sample_Library/nlp_projects/relation_extraction/ernie/predict.py | linuxonly801/awesome-DeepLearning | b063757fa130c4d56aea5cce2e592610f1e169f9 | [
"Apache-2.0"
] | null | null | null | # 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... | 38.674419 | 124 | 0.735117 |
e31bba6d739071275e7a0ee02dab6c5f41f95f28 | 9,542 | py | Python | benchmark/tuning_hyperparams.py | zentonllo/tfg-tensorflow | 095469a906de26984b4d781699e76bec02b1ef75 | [
"MIT"
] | null | null | null | benchmark/tuning_hyperparams.py | zentonllo/tfg-tensorflow | 095469a906de26984b4d781699e76bec02b1ef75 | [
"MIT"
] | null | null | null | benchmark/tuning_hyperparams.py | zentonllo/tfg-tensorflow | 095469a906de26984b4d781699e76bec02b1ef75 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
"""
Created on Fri May 5 11:26:14 2017
@author: Alberto Terceño
Benchmark module used to perform a grid search for DNN hyperparameters
################# Hyperparameter tuning - Instructions #####################
1 - Choose a dataset (just the name of the csv or npy file)
2 - Choose the h... | 42.789238 | 142 | 0.46594 |
47445e35fa450913c11c026a62ad156c1b29fe30 | 8,054 | py | Python | src/onegov/fsi/forms/subscription.py | politbuero-kampagnen/onegov-cloud | 20148bf321b71f617b64376fe7249b2b9b9c4aa9 | [
"MIT"
] | null | null | null | src/onegov/fsi/forms/subscription.py | politbuero-kampagnen/onegov-cloud | 20148bf321b71f617b64376fe7249b2b9b9c4aa9 | [
"MIT"
] | null | null | null | src/onegov/fsi/forms/subscription.py | politbuero-kampagnen/onegov-cloud | 20148bf321b71f617b64376fe7249b2b9b9c4aa9 | [
"MIT"
] | null | null | null | from wtforms import StringField
from wtforms.validators import InputRequired
from onegov.form import Form
from onegov.form.fields import ChosenSelectField
from onegov.fsi.collections.attendee import CourseAttendeeCollection
from onegov.fsi.collections.course_event import CourseEventCollection
from onegov.fsi import _
... | 30.278195 | 77 | 0.623417 |
9a5b80ad0ad09e58bdc46a2ea37151d183a3d3eb | 3,409 | py | Python | src/roman_numeral_converter.py | BilkisKhan/SASD | ea151f0ead9183e79a9995f6c951fcb2f6e3eca4 | [
"Apache-2.0"
] | null | null | null | src/roman_numeral_converter.py | BilkisKhan/SASD | ea151f0ead9183e79a9995f6c951fcb2f6e3eca4 | [
"Apache-2.0"
] | null | null | null | src/roman_numeral_converter.py | BilkisKhan/SASD | ea151f0ead9183e79a9995f6c951fcb2f6e3eca4 | [
"Apache-2.0"
] | null | null | null | class RomanNumeralConverter(object):
# Test for Arabic Number 1
# Step 1 : Run the test for number 1
# Result: Step 1 Passed
# Step 2: When running the same test for arabic number 2, it failed:
def convert1(self, number):
if (number == 1):
return('I')
# Test for Arabic Number ... | 35.510417 | 120 | 0.618656 |
7bf5def8dbcb34119289f75115f2f9b5b8358871 | 612 | py | Python | 12 beatifulsoup, regex, nltk stemming/DAPHNEARTICLES.py | barjacks/pythonrecherche | c926f087ea7b1fa953b0ac2c4dc255ed9d793262 | [
"MIT"
] | 7 | 2017-09-04T16:36:57.000Z | 2021-10-08T01:30:39.000Z | 12 beatifulsoup, regex, nltk stemming/DAPHNEARTICLES.py | barjacks/pythonrecherche | c926f087ea7b1fa953b0ac2c4dc255ed9d793262 | [
"MIT"
] | null | null | null | 12 beatifulsoup, regex, nltk stemming/DAPHNEARTICLES.py | barjacks/pythonrecherche | c926f087ea7b1fa953b0ac2c4dc255ed9d793262 | [
"MIT"
] | 12 | 2017-09-04T18:33:06.000Z | 2018-07-05T19:51:28.000Z | # coding: utf-8
import pandas as pd
import requests
from bs4 import BeautifulSoup
import time
import progressbar
df = pd.read_csv('allPosts.csv', sep='\t', encoding='utf-16')
urls = list(df['Link'])
titles = list(df['Title'])
bar = progressbar.ProgressBar()
text_list = []
for url,i in zip(urls, bar(range(len(urls)... | 21.857143 | 61 | 0.668301 |
efa753ceb6de365684dbd0197817e08b30cbad1e | 373 | py | Python | hm/valueType.py | debauer/HomematicToInflux | 233a837f0da031f331d771f0e6f7b55f488cd747 | [
"MIT"
] | null | null | null | hm/valueType.py | debauer/HomematicToInflux | 233a837f0da031f331d771f0e6f7b55f488cd747 | [
"MIT"
] | null | null | null | hm/valueType.py | debauer/HomematicToInflux | 233a837f0da031f331d771f0e6f7b55f488cd747 | [
"MIT"
] | null | null | null | from enum import Enum, unique
@unique
class ValueType(Enum):
ivtBinary = 2
ivtFloat = 4
ivtInteger = 16
ivtString = 20
ivtRSSI = 8
@unique
class ValueSubType(Enum):
istPresent = 23 # Anwesenheit
istAlarm = 6 # Alarm
istGeneric = 0 # zahl
istBool = 2 # Logikwert
istEnum = 2... | 18.65 | 36 | 0.63807 |
411776285d93be5cc0657bfc0325b93f94cfe069 | 5,826 | py | Python | site_generation/createMarkdownPages.py | globalwatchpost/CloudRegionsList | f428b39fc797403cf6ed5d38196a5df29f59d8af | [
"MIT"
] | null | null | null | site_generation/createMarkdownPages.py | globalwatchpost/CloudRegionsList | f428b39fc797403cf6ed5d38196a5df29f59d8af | [
"MIT"
] | null | null | null | site_generation/createMarkdownPages.py | globalwatchpost/CloudRegionsList | f428b39fc797403cf6ed5d38196a5df29f59d8af | [
"MIT"
] | null | null | null | #!/usr/bin/python3
import itertools
import datetime
import pprint
def _main():
providerCombinations = _getProviderCombinations()
sortFieldMap = _getSortFields()
for currProviderCombo in providerCombinations:
#print( "Combination: {0}".format( ",".join(currProviderCombo)) )
for so... | 41.614286 | 116 | 0.471679 |
eb1b11d8109772a45cbb2c9a26c47898b2f2ed51 | 97 | py | Python | Python/turtle-drawing/spiral.py | DMeurer/small-projects | 3d9e714db9cd8dd8a626d9b8f0faa44325ef10e1 | [
"MIT"
] | 1 | 2021-03-25T14:23:58.000Z | 2021-03-25T14:23:58.000Z | Python/turtle-drawing/spiral.py | DMeurer/small-projects | 3d9e714db9cd8dd8a626d9b8f0faa44325ef10e1 | [
"MIT"
] | 1 | 2021-01-15T17:03:06.000Z | 2021-02-15T10:02:07.000Z | Python/turtle-drawing/spiral.py | DMeurer/small-projects | 3d9e714db9cd8dd8a626d9b8f0faa44325ef10e1 | [
"MIT"
] | null | null | null | import turtle
t=turtle.Pen()
t.speed(0)
i=0
while True:
i=i+1
t.forward(i)
t.lt(91) | 9.7 | 16 | 0.587629 |
de56b76bda4047829a29c9036c70baa75ad630d4 | 1,657 | py | Python | scripts/finalformula.py | pratikkumar-jain/Twitter-Mining | 228a852f38b8ff8b8c9b86f270d4b530840696f7 | [
"MIT"
] | 1 | 2020-10-04T13:46:21.000Z | 2020-10-04T13:46:21.000Z | scripts/finalformula.py | pratikkumar-jain/Twitter-Mining | 228a852f38b8ff8b8c9b86f270d4b530840696f7 | [
"MIT"
] | null | null | null | scripts/finalformula.py | pratikkumar-jain/Twitter-Mining | 228a852f38b8ff8b8c9b86f270d4b530840696f7 | [
"MIT"
] | null | null | null | #!/usr/local/bin/python3
"""Script to calculate the resutls for all indices combined."""
# import pandas as pd
from cassandra.cluster import Cluster
def getTweets(session, queryText):
"""Get all tweets with all fields."""
results = session.execute(queryText)
res = set(['\'' + str(result.tweet_id) + '\'' ... | 27.616667 | 74 | 0.630658 |
9d3a604967984543773eba5a37a693e2e7c4e2d4 | 1,053 | py | Python | the_platform/urls.py | Thames1990/BadBatBets | 8dffb69561668b8991bf4103919e4b254d4ca56a | [
"MIT"
] | null | null | null | the_platform/urls.py | Thames1990/BadBatBets | 8dffb69561668b8991bf4103919e4b254d4ca56a | [
"MIT"
] | null | null | null | the_platform/urls.py | Thames1990/BadBatBets | 8dffb69561668b8991bf4103919e4b254d4ca56a | [
"MIT"
] | null | null | null | from django.conf.urls import url, include
from django.contrib import admin
from django.contrib.auth.decorators import permission_required
from django.views.generic import TemplateView
from bets.views import index_view
from profiles.views import login_user, signup, feedback
from . import views
urlpatterns = [
url... | 23.931818 | 96 | 0.671415 |
c21349018e5e83a9a2d94b49e8f590dd79294673 | 2,098 | py | Python | Codeforces/643-2/E.py | dipta007/Competitive-Programming | 998d47f08984703c5b415b98365ddbc84ad289c4 | [
"MIT"
] | 6 | 2018-10-15T18:45:05.000Z | 2022-03-29T04:30:10.000Z | Codeforces/643-2/E.py | dipta007/Competitive-Programming | 998d47f08984703c5b415b98365ddbc84ad289c4 | [
"MIT"
] | null | null | null | Codeforces/643-2/E.py | dipta007/Competitive-Programming | 998d47f08984703c5b415b98365ddbc84ad289c4 | [
"MIT"
] | 4 | 2018-01-07T06:20:07.000Z | 2019-08-21T15:45:59.000Z | """ Python 3 compatibility tools. """
from __future__ import division, print_function
import itertools
import sys
if sys.version_info[0] < 3:
input = raw_input
range = xrange
filter = itertools.ifilter
map = itertools.imap
zip = itertools.izip
# input = sys.stdin.read().split('\n')[::-1].pop
# import __py... | 17.483333 | 67 | 0.528122 |
f8c865d5c71437af8f649e4420de00e5a9d10373 | 939 | py | Python | scripts/sqlite_to_mysql.py | swoiow/dsc | 5860e6bfaa70b700e025533c406a6bc52d4ab74b | [
"MIT"
] | null | null | null | scripts/sqlite_to_mysql.py | swoiow/dsc | 5860e6bfaa70b700e025533c406a6bc52d4ab74b | [
"MIT"
] | null | null | null | scripts/sqlite_to_mysql.py | swoiow/dsc | 5860e6bfaa70b700e025533c406a6bc52d4ab74b | [
"MIT"
] | null | null | null | #!/usr/bin/env python
# -*- coding: utf-8 -*-
try:
import fire
import pandas
from sqlalchemy import create_engine
except ModuleNotFoundError as e:
raise Exception("please run: pip install pandas sqlalchemy pymysql git+https://github.com/google/python-fire.git")
def _sqlite_to_mysql(src_db, dst_db, sr... | 29.34375 | 118 | 0.698616 |
900926e2ec9c99ad884c56e8462653e9ebda25c0 | 588 | py | Python | python/en/_numpy/organize_this/test_numpy.Quickstart_tutorial-02.py | aimldl/coding | 70ddbfaa454ab92fd072ee8dc614ecc330b34a70 | [
"MIT"
] | null | null | null | python/en/_numpy/organize_this/test_numpy.Quickstart_tutorial-02.py | aimldl/coding | 70ddbfaa454ab92fd072ee8dc614ecc330b34a70 | [
"MIT"
] | null | null | null | python/en/_numpy/organize_this/test_numpy.Quickstart_tutorial-02.py | aimldl/coding | 70ddbfaa454ab92fd072ee8dc614ecc330b34a70 | [
"MIT"
] | null | null | null | """
test_numpy.Quickstart_tutorial-02.py
* References
Quickstart tutorial
https://docs.scipy.org/doc/numpy/user/quickstart.html
Array Creation
There are several ways to create arrays.
For example, you can create an array from a regular Python list or tuple using
the array function. The type of the resulting a... | 17.294118 | 80 | 0.680272 |
901e92b3b0360de09ef7ca2ecc2b283d79850641 | 500 | py | Python | Strong.py | sanxy/hacktoberfest-1 | 913582b310688d496602e8b1bc9166cb64866e38 | [
"MIT"
] | null | null | null | Strong.py | sanxy/hacktoberfest-1 | 913582b310688d496602e8b1bc9166cb64866e38 | [
"MIT"
] | null | null | null | Strong.py | sanxy/hacktoberfest-1 | 913582b310688d496602e8b1bc9166cb64866e38 | [
"MIT"
] | 1 | 2020-09-30T18:53:05.000Z | 2020-09-30T18:53:05.000Z | num = int(input(" Enter the Number:"))
sum = 0
temp = num
while(temp > 0):
fact = 1
rem = temp % 10
for i in range(1, rem + 1):
fact = fact * i
print("Factorial of %d = %d" %(rem, fact))
sum = sum + fact
temp = temp // 10
print("\n Sum of Factorials of a... | 22.727273 | 69 | 0.512 |
84316e28d98b8ab4b7289a0917912da27ac4b7f2 | 487 | py | Python | jiuzhang/Nine Chapters/3 Binary Tree & Divide Conquer/py/MaximumDepthofBinaryTree_rec_bfs.py | cc13ny/all-in | bc0b01e44e121ea68724da16f25f7e24386c53de | [
"MIT"
] | 1 | 2015-12-16T04:01:03.000Z | 2015-12-16T04:01:03.000Z | jiuzhang/Nine Chapters/3 Binary Tree & Divide Conquer/py/MaximumDepthofBinaryTree_rec_bfs.py | cc13ny/all-in | bc0b01e44e121ea68724da16f25f7e24386c53de | [
"MIT"
] | 1 | 2016-02-09T06:00:07.000Z | 2016-02-09T07:20:13.000Z | jiuzhang/Nine Chapters/3 Binary Tree & Divide Conquer/py/MaximumDepthofBinaryTree_rec_bfs.py | cc13ny/all-in | bc0b01e44e121ea68724da16f25f7e24386c53de | [
"MIT"
] | 2 | 2019-06-27T09:07:26.000Z | 2019-07-01T04:40:13.000Z | """
Definition of TreeNode:
class TreeNode:
def __init__(self, val):
self.val = val
self.left, self.right = None, None
"""
class Solution:
"""
@param root: The root of binary tree.
@return: An integer
"""
def maxDepth(self, root):
# write your code here
if root... | 21.173913 | 59 | 0.566735 |
085225b967f6b30c835f4e8eab6458bcf8ca9fd2 | 2,695 | py | Python | LINE/2021/web/babyweb/public/src/app.py | mystickev/ctf-archives | 89e99a5cd5fb6b2923cad3fe1948d3ff78649b4e | [
"MIT"
] | 1 | 2021-11-02T20:53:58.000Z | 2021-11-02T20:53:58.000Z | LINE/2021/web/babyweb/public/src/app.py | ruhan-islam/ctf-archives | 8c2bf6a608c821314d1a1cfaa05a6cccef8e3103 | [
"MIT"
] | null | null | null | LINE/2021/web/babyweb/public/src/app.py | ruhan-islam/ctf-archives | 8c2bf6a608c821314d1a1cfaa05a6cccef8e3103 | [
"MIT"
] | 1 | 2021-12-19T11:06:24.000Z | 2021-12-19T11:06:24.000Z | from functools import wraps
from flask import Flask, render_template, g, jsonify, request, session, redirect, url_for, abort
from hyper import HTTPConnection
import sqlite3
from internal import internal_bp
from utils import get_uuid
DATABASE = 'database/sql.db'
app = Flask(__name__)
app.register_blueprint(internal_... | 25.666667 | 96 | 0.631911 |
76dfb4f2f1660afe0155d01e96650ef6c7a8b1b0 | 8,185 | py | Python | src/ztc/apache/__init__.py | magistersart/ZTC_fork | ce72734ea575d9846b5b81f3efbfd14fa1f7e532 | [
"PostgreSQL"
] | null | null | null | src/ztc/apache/__init__.py | magistersart/ZTC_fork | ce72734ea575d9846b5b81f3efbfd14fa1f7e532 | [
"PostgreSQL"
] | null | null | null | src/ztc/apache/__init__.py | magistersart/ZTC_fork | ce72734ea575d9846b5b81f3efbfd14fa1f7e532 | [
"PostgreSQL"
] | null | null | null | #!/usr/bin/env python
"""
ztc.apache package
Used in ztc Apache template
Copyright (c) 2010-2012 Vladimir Rusinov <vladimir@greenmice.info>
Copyright (c) 2010 Murano Software [http://muranosoft.com/]
License: GNU GPL v.3
"""
import os
import time
import urllib2
import socket
from ztc.check import ZTCCheck, CheckFail... | 32.609562 | 76 | 0.564569 |
6a5b003605b1e515bf3cebe58a2869ab6f70b619 | 7,428 | py | Python | exercises/networking_selfpaced/networking-workshop/collections/ansible_collections/community/general/plugins/modules/network/aci/mso_schema_template_external_epg_contract.py | tr3ck3r/linklight | 5060f624c235ecf46cb62cefcc6bddc6bf8ca3e7 | [
"MIT"
] | null | null | null | exercises/networking_selfpaced/networking-workshop/collections/ansible_collections/community/general/plugins/modules/network/aci/mso_schema_template_external_epg_contract.py | tr3ck3r/linklight | 5060f624c235ecf46cb62cefcc6bddc6bf8ca3e7 | [
"MIT"
] | null | null | null | exercises/networking_selfpaced/networking-workshop/collections/ansible_collections/community/general/plugins/modules/network/aci/mso_schema_template_external_epg_contract.py | tr3ck3r/linklight | 5060f624c235ecf46cb62cefcc6bddc6bf8ca3e7 | [
"MIT"
] | null | null | null | #!/usr/bin/python
# -*- coding: utf-8 -*-
# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
from __future__ import absolute_import, division, print_function
__metaclass__ = type
ANSIBLE_METADATA = {'metadata_version': '1.1',
'status': ['preview'],
... | 30.195122 | 142 | 0.650915 |
6ac0ca3fe32ff277f88e999c5815342187332c6f | 761 | py | Python | components/amp-utility/python/http2.py | ekmixon/AliOS-Things | 00334295af8aa474d818724149726ca93da4645d | [
"Apache-2.0"
] | 4,538 | 2017-10-20T05:19:03.000Z | 2022-03-30T02:29:30.000Z | components/amp-utility/python/http2.py | ekmixon/AliOS-Things | 00334295af8aa474d818724149726ca93da4645d | [
"Apache-2.0"
] | 1,088 | 2017-10-21T07:57:22.000Z | 2022-03-31T08:15:49.000Z | components/amp-utility/python/http2.py | willianchanlovegithub/AliOS-Things | 637c0802cab667b872d3b97a121e18c66f256eab | [
"Apache-2.0"
] | 1,860 | 2017-10-20T05:22:35.000Z | 2022-03-27T10:54:14.000Z | # -*- coding: UTF-8 -*-
"""
模块功能:HTTP客户端的相关功能函数,包括连接,下载等功能
"""
AF_INET = 0
class Client(object):
"""
初始化client类,获取httpclient实例
:param 空:
:returns: client对象
"""
def __init__(self):
pass
def set_header(self,header):
"""
设置请求header参数
:param head... | 13.12069 | 45 | 0.480946 |
7c2e2a6dcddda5065793b2b268358f6d116f6d94 | 158 | py | Python | Python/BasicDataTypes/nested_list.py | rho2/HackerRank | 4d9cdfcabeb20212db308d8e4f2ac1b8ebf7d266 | [
"MIT"
] | null | null | null | Python/BasicDataTypes/nested_list.py | rho2/HackerRank | 4d9cdfcabeb20212db308d8e4f2ac1b8ebf7d266 | [
"MIT"
] | null | null | null | Python/BasicDataTypes/nested_list.py | rho2/HackerRank | 4d9cdfcabeb20212db308d8e4f2ac1b8ebf7d266 | [
"MIT"
] | null | null | null | l = [[input(), float(input())] for _ in range(int(input()))]
s = sorted(list(set([m for n, m in l])))[1]
print('\n'.join(sorted([a for a,b in l if b == s]))) | 39.5 | 60 | 0.556962 |
8129f02e41535e6bbe0c5da34e88368de25d96a8 | 8,434 | py | Python | prototype/examples/user_support/lab_orchestrator_prototype/kubernetes/controller.py | LernmodulController/LernmodulController-LernmodulControllerDocumentation | 4d0cb3dcac01676f6a97df8f558095a27a4296af | [
"MIT"
] | null | null | null | prototype/examples/user_support/lab_orchestrator_prototype/kubernetes/controller.py | LernmodulController/LernmodulController-LernmodulControllerDocumentation | 4d0cb3dcac01676f6a97df8f558095a27a4296af | [
"MIT"
] | null | null | null | prototype/examples/user_support/lab_orchestrator_prototype/kubernetes/controller.py | LernmodulController/LernmodulController-LernmodulControllerDocumentation | 4d0cb3dcac01676f6a97df8f558095a27a4296af | [
"MIT"
] | 1 | 2021-09-26T12:09:52.000Z | 2021-09-26T12:09:52.000Z | from abc import ABC
from dataclasses import dataclass
from typing import Type, Union, List
from flask import make_response, jsonify
from lab_orchestrator_prototype.app import db
from lab_orchestrator_prototype.kubernetes.api import APIRegistry, NamespacedApi, NotNamespacedApi
from lab_orchestrator_prototype.model imp... | 36.669565 | 116 | 0.708561 |
ed466163d7520f415dc46240eb0ca96b5d35522d | 989 | py | Python | src/main/apps/mlops/urls.py | Nouvellie/django-tflite | 1d08fdc8a2ec58886d7d2b8d40e7b3598613caca | [
"MIT"
] | 2 | 2021-08-23T21:56:07.000Z | 2022-01-20T13:52:19.000Z | src/main/apps/mlops/urls.py | Nouvellie/django-tflite | 1d08fdc8a2ec58886d7d2b8d40e7b3598613caca | [
"MIT"
] | null | null | null | src/main/apps/mlops/urls.py | Nouvellie/django-tflite | 1d08fdc8a2ec58886d7d2b8d40e7b3598613caca | [
"MIT"
] | null | null | null | from .views import (
TFLiteFashionMnist,
HDF5JSONFashionMnist,
TFLiteImdbSentiment,
TFLiteStackoverflow,
TFLiteCatsVsDogs,
HDF5JSONCatsVsDogs,
)
from django.urls import path
urlpatterns = [
# FashionMnist.
path(
'tflite-fmnist',
TFLiteFashionMnist.as_view(),
... | 17.981818 | 39 | 0.588473 |
71eeb6d92f412a116762b09542a952ff1f04e253 | 7,815 | py | Python | experimental/CommonMark/markdown_old.py | jecki/DHParser | c6c1bd7db2de85b5997a3640242f4f444532304e | [
"Apache-2.0"
] | 2 | 2020-12-25T19:37:42.000Z | 2021-03-26T04:59:12.000Z | experimental/CommonMark/markdown_old.py | jecki/DHParser | c6c1bd7db2de85b5997a3640242f4f444532304e | [
"Apache-2.0"
] | 6 | 2018-08-07T22:48:52.000Z | 2021-10-07T18:38:20.000Z | experimental/CommonMark/markdown_old.py | jecki/DHParser | c6c1bd7db2de85b5997a3640242f4f444532304e | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/env python3
"""markdown.py - markdown compiler with parser combinators
Copyright 2016 by Eckhart Arnold
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/lice... | 27.229965 | 107 | 0.647857 |
92e2fa2f1f2ba02b51d6d686a13eb2d880d45cef | 2,615 | py | Python | python/DeepLearning/generate_model.py | TimVan1596/ACM-ICPC | 07f7d728db1ecd09c5a3d0f05521930b14eb9883 | [
"Apache-2.0"
] | 1 | 2019-05-22T07:12:34.000Z | 2019-05-22T07:12:34.000Z | python/DeepLearning/generate_model.py | TimVan1596/ACM-ICPC | 07f7d728db1ecd09c5a3d0f05521930b14eb9883 | [
"Apache-2.0"
] | 3 | 2021-12-10T01:13:54.000Z | 2021-12-14T21:18:42.000Z | python/DeepLearning/generate_model.py | TimVan1596/ACM-ICPC | 07f7d728db1ecd09c5a3d0f05521930b14eb9883 | [
"Apache-2.0"
] | null | null | null | import os
import numpy as np
import matplotlib.pyplot as plt
import h5py
# 导入必要的包
def get_files(file_dir):
yes_list = []
label_yes_list = []
not_list = []
label_not_list = []
for file in os.listdir(file_dir + '/not_tumble'):
not_list.append(file_dir + '/not_tumble' + '/' + file)
... | 31.890244 | 87 | 0.659273 |
b9ab4cad26544bad88b188bc1197d013de2472ad | 6,679 | py | Python | solve5_19.py | yue1234567/QuantumCircuitZJY | 097275a633bc0f0c92bb14ad63e94f460fa8567d | [
"Apache-2.0"
] | null | null | null | solve5_19.py | yue1234567/QuantumCircuitZJY | 097275a633bc0f0c92bb14ad63e94f460fa8567d | [
"Apache-2.0"
] | null | null | null | solve5_19.py | yue1234567/QuantumCircuitZJY | 097275a633bc0f0c92bb14ad63e94f460fa8567d | [
"Apache-2.0"
] | null | null | null | import os
import numpy as np
import paddle
from Reader import ReadU, ReadSystem
from utils import RandomCNOTs, EnumAllCNOT
from ArchitectureSearch import RandomSearch, SequenceJitter, SimulatedAnnealing
from paddle_model import BackwardParams, ParseFromQSystem, GetQSystem, TryRemoveZeros
INPUT_TXT = 'Quest... | 37.105556 | 136 | 0.619105 |
b9c99915ea206e5a008e27c9f79f2e05a4d3bb89 | 1,736 | py | Python | oneflow/python/benchmarks/cnn_benchmark/model_util.py | wanghongsheng01/framework_enflame | debf613e05e3f5ea8084c3e79b60d0dd9e349526 | [
"Apache-2.0"
] | 2 | 2021-09-10T00:19:49.000Z | 2021-11-16T11:27:20.000Z | oneflow/python/benchmarks/cnn_benchmark/model_util.py | duijiudanggecl/oneflow | d2096ae14cf847509394a3b717021e2bd1d72f62 | [
"Apache-2.0"
] | 1 | 2021-06-16T08:37:50.000Z | 2021-06-16T08:37:50.000Z | oneflow/python/benchmarks/cnn_benchmark/model_util.py | duijiudanggecl/oneflow | d2096ae14cf847509394a3b717021e2bd1d72f62 | [
"Apache-2.0"
] | 1 | 2021-11-10T07:57:01.000Z | 2021-11-10T07:57:01.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... | 28.459016 | 78 | 0.677419 |
6a1f4a7fe5e085a7606df86d034680de9dac1041 | 9,082 | py | Python | wz/ui/abitur_pupil_view.py | gradgrind/WZ | 672d93a3c9d7806194d16d6d5b9175e4046bd068 | [
"Apache-2.0"
] | null | null | null | wz/ui/abitur_pupil_view.py | gradgrind/WZ | 672d93a3c9d7806194d16d6d5b9175e4046bd068 | [
"Apache-2.0"
] | null | null | null | wz/ui/abitur_pupil_view.py | gradgrind/WZ | 672d93a3c9d7806194d16d6d5b9175e4046bd068 | [
"Apache-2.0"
] | null | null | null | # -*- coding: utf-8 -*-
"""
ui/abitur_pupil_view.py
Last updated: 2021-03-28
Editor for Abitur results (single pupil).
=+LICENCE=============================
Copyright 2021 Michael Towers
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the ... | 38 | 76 | 0.51013 |
dbf556f060ce33b5954b03363c5903a46a7b434a | 3,867 | py | Python | Co-Simulation/Sumo/sumo-1.7.0/tools/net/patchNetFiles.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/net/patchNetFiles.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/net/patchNetFiles.py | uruzahe/carla | 940c2ab23cce1eda1ef66de35f66b42d40865fb1 | [
"MIT"
] | 1 | 2020-11-20T19:31:26.000Z | 2020-11-20T19:31:26.000Z | #!/usr/bin/env python
# Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo
# Copyright (C) 2008-2020 German Aerospace Center (DLR) and others.
# This program and the accompanying materials are made available under the
# terms of the Eclipse Public License 2.0 which is available at
# https://www.ec... | 32.225 | 77 | 0.594259 |
bcb6d55591fb52190c378fc56f33e4e23b0a8613 | 995 | py | Python | SoSe-21/Uebung-5/Gruppe-Montag/A3-Ausdauersport.py | jonasrdt/Wirtschaftsinformatik2 | 30d5d896808b98664c55cb6fbb3b30a7f1904d9f | [
"MIT"
] | 1 | 2022-03-23T09:40:39.000Z | 2022-03-23T09:40:39.000Z | SoSe-21/Uebung-5/Gruppe-Montag/A3-Ausdauersport.py | jonasrdt/Wirtschaftsinformatik2 | 30d5d896808b98664c55cb6fbb3b30a7f1904d9f | [
"MIT"
] | null | null | null | SoSe-21/Uebung-5/Gruppe-Montag/A3-Ausdauersport.py | jonasrdt/Wirtschaftsinformatik2 | 30d5d896808b98664c55cb6fbb3b30a7f1904d9f | [
"MIT"
] | null | null | null | # Der optimale Puls bei Ausdauersportarten hängt vom Alter ab. Er lässt sich mit der Formel
# P = 165 - 0.75*Alter
# bestimmen. Schreiben Sie ein Programm, das folgenden Dialog ermöglicht:
# Alter: 18
# optimaler Puls: 151.5
# Bringen Sie die Berechnung der Formel in eine Funktion!
# Eingabe des Nutzers empfangen und ... | 36.851852 | 91 | 0.697487 |
d5c6e6d8f7a5ecd2e78866063dcef18963ea6b90 | 9,962 | py | Python | repo/script.module.urlresolver/lib/urlresolver/plugins/lib/helpers.py | dbiesecke/dbiesecke.github.io | 5894473591f078fd22d1cb33794c5e656ae9b8dd | [
"MIT"
] | 1 | 2017-11-26T18:18:46.000Z | 2017-11-26T18:18:46.000Z | repo/script.module.urlresolver/lib/urlresolver/plugins/lib/helpers.py | dbiesecke/dbiesecke.github.io | 5894473591f078fd22d1cb33794c5e656ae9b8dd | [
"MIT"
] | null | null | null | repo/script.module.urlresolver/lib/urlresolver/plugins/lib/helpers.py | dbiesecke/dbiesecke.github.io | 5894473591f078fd22d1cb33794c5e656ae9b8dd | [
"MIT"
] | 3 | 2019-09-30T19:52:05.000Z | 2020-04-12T21:20:56.000Z | """
URLResolver Addon for Kodi
Copyright (C) 2016 t0mm0, tknorris
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 3 of the License, or
(at your option) any late... | 41.857143 | 205 | 0.553604 |
9118f5fa34151346af452342dde4e5f23d3a4a49 | 1,243 | py | Python | app/helpers.py | mwcodebase/avalon-iron-bot | 674d2536a4af36c7c7e00f02765c4061a830f506 | [
"MIT"
] | null | null | null | app/helpers.py | mwcodebase/avalon-iron-bot | 674d2536a4af36c7c7e00f02765c4061a830f506 | [
"MIT"
] | null | null | null | app/helpers.py | mwcodebase/avalon-iron-bot | 674d2536a4af36c7c7e00f02765c4061a830f506 | [
"MIT"
] | null | null | null | from os import path, getcwd
from datetime import date
from re import compile as compile_regex
def get_credentials(manual):
# Retrieves the absolute path to the credentials file regardless of where the script is being run from
creds_file_path = path.dirname(__file__) + "/credentials.env"
if manual and not path.e... | 38.84375 | 104 | 0.7321 |
913acc78e3c8147a8f5dbcb6c1e53085fe03d67a | 3,554 | py | Python | test/test_npu/test_network_ops/test_cosinesimilarity.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_cosinesimilarity.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_cosinesimilarity.py | Ascend/pytorch | 39849cf72dafe8d2fb68bd1679d8fd54ad60fcfc | [
"BSD-3-Clause"
] | null | null | null | # Copyright 2020 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.811765 | 89 | 0.608329 |
e68c58662772421845d071f2f1a42d6a9c62565c | 3,132 | py | Python | musterloesungen/6.5.5/wissensdatenbank.py | giu/appe6-uzh-hs2018 | 204dea36be1e53594124b606cdfa044368e54726 | [
"MIT"
] | null | null | null | musterloesungen/6.5.5/wissensdatenbank.py | giu/appe6-uzh-hs2018 | 204dea36be1e53594124b606cdfa044368e54726 | [
"MIT"
] | null | null | null | musterloesungen/6.5.5/wissensdatenbank.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: 6.5.5
# In dieses Dictionary fügen wir Stichworte inkl. Beschreibungen h... | 37.73494 | 153 | 0.640166 |
5d28bd882f5b405a88b2a1ae9a424f0c410f20a9 | 484 | py | Python | exercises/ja/exc_03_15.py | Jette16/spacy-course | 32df0c8f6192de6c9daba89740a28c0537e4d6a0 | [
"MIT"
] | 2,085 | 2019-04-17T13:10:40.000Z | 2022-03-30T21:51:46.000Z | exercises/ja/exc_03_15.py | Jette16/spacy-course | 32df0c8f6192de6c9daba89740a28c0537e4d6a0 | [
"MIT"
] | 79 | 2019-04-18T14:42:55.000Z | 2022-03-07T08:15:43.000Z | exercises/ja/exc_03_15.py | Jette16/spacy-course | 32df0c8f6192de6c9daba89740a28c0537e4d6a0 | [
"MIT"
] | 361 | 2019-04-17T13:34:32.000Z | 2022-03-28T04:42:45.000Z | import json
from spacy.lang.ja import Japanese
from spacy.tokens import Doc
with open("exercises/ja/bookquotes.json", encoding="utf8") as f:
DATA = json.loads(f.read())
nlp = Japanese()
# デフォルト値がNoneのDoc拡張属性「author」を登録
____
# デフォルト値がNoneのDoc拡張属性「book」を登録
____
for doc, ____ in ____(____, ____):
# doc._.book... | 21.043478 | 64 | 0.698347 |
0717cd53c2e0ae4427cd8b95013517bced5ba9f0 | 171 | py | Python | examples/04 language feature/LanguageBot.py | Killerhaschen/marvin-telegram-bot | c65e890a00450ed6ed4312d93e259db0c080ef6d | [
"MIT"
] | 1 | 2020-01-16T08:40:00.000Z | 2020-01-16T08:40:00.000Z | examples/04 language feature/LanguageBot.py | Killerhaschen/marvin-telegram-bot | c65e890a00450ed6ed4312d93e259db0c080ef6d | [
"MIT"
] | null | null | null | examples/04 language feature/LanguageBot.py | Killerhaschen/marvin-telegram-bot | c65e890a00450ed6ed4312d93e259db0c080ef6d | [
"MIT"
] | 1 | 2019-10-16T08:11:51.000Z | 2019-10-16T08:11:51.000Z | from samt import Bot, Context
bot = Bot()
@bot.default_answer
def default():
return 'unknown', Context.get('message')
if __name__ == "__main__":
bot.listen()
| 13.153846 | 44 | 0.666667 |
073a5d9c4db845039c28b40f69db1388692942c3 | 377 | py | Python | exercises/zh/solution_04_10.py | Jette16/spacy-course | 32df0c8f6192de6c9daba89740a28c0537e4d6a0 | [
"MIT"
] | 2,085 | 2019-04-17T13:10:40.000Z | 2022-03-30T21:51:46.000Z | exercises/zh/solution_04_10.py | Jette16/spacy-course | 32df0c8f6192de6c9daba89740a28c0537e4d6a0 | [
"MIT"
] | 79 | 2019-04-18T14:42:55.000Z | 2022-03-07T08:15:43.000Z | exercises/zh/solution_04_10.py | Jette16/spacy-course | 32df0c8f6192de6c9daba89740a28c0537e4d6a0 | [
"MIT"
] | 361 | 2019-04-17T13:34:32.000Z | 2022-03-28T04:42:45.000Z | TRAINING_DATA = [
(
"我去年去了西安,那里的城墙很壮观!",
{"entities": [(4, 5, "GPE")]},
),
(
"人一辈子一定要去一趟巴黎,但那里的埃菲尔铁塔有点无趣。",
{"entities": [(5, 6, "GPE")]},
),
(
"深圳也有个巴黎的埃菲尔铁塔,哈哈哈",
{"entities": [(0, 1, "GPE"), (4, 5, "GPE")]},
),
(
"北京很适合暑假去:长城、故宫,还有各种... | 19.842105 | 53 | 0.38992 |
ab30a147be0c4a1cf54a2dbb8827cf681d7ee5f3 | 1,544 | py | Python | packages/watchmen-inquiry-kernel/src/watchmen_inquiry_kernel/storage/report_data_service.py | Indexical-Metrics-Measure-Advisory/watchmen | c54ec54d9f91034a38e51fd339ba66453d2c7a6d | [
"MIT"
] | null | null | null | packages/watchmen-inquiry-kernel/src/watchmen_inquiry_kernel/storage/report_data_service.py | Indexical-Metrics-Measure-Advisory/watchmen | c54ec54d9f91034a38e51fd339ba66453d2c7a6d | [
"MIT"
] | null | null | null | packages/watchmen-inquiry-kernel/src/watchmen_inquiry_kernel/storage/report_data_service.py | Indexical-Metrics-Measure-Advisory/watchmen | c54ec54d9f91034a38e51fd339ba66453d2c7a6d | [
"MIT"
] | null | null | null | from watchmen_auth import PrincipalService
from watchmen_inquiry_kernel.schema import ReportSchema
from watchmen_model.common import DataPage, DataResult, Pageable
from watchmen_model.console import Report, Subject
from .subject_data_service import SubjectDataService
from .subject_storage import SubjectStorage
class ... | 38.6 | 108 | 0.806995 |
ab30c8b7c0bddd73ab479f97edf6288cec80be77 | 260 | py | Python | CS305/assignment7/rdt/tcp_client.py | Wycers/Codelib | 86d83787aa577b8f2d66b5410e73102411c45e46 | [
"MIT"
] | 22 | 2018-08-07T06:55:10.000Z | 2021-06-12T02:12:19.000Z | CS305/assignment7/rdt/tcp_client.py | Wycers/Codelib | 86d83787aa577b8f2d66b5410e73102411c45e46 | [
"MIT"
] | 28 | 2020-03-04T23:47:22.000Z | 2022-02-26T18:50:00.000Z | CS305/assignment7/rdt/tcp_client.py | Wycers/Codelib | 86d83787aa577b8f2d66b5410e73102411c45e46 | [
"MIT"
] | 4 | 2019-11-09T15:41:26.000Z | 2021-10-10T08:56:57.000Z | import socket # 导入 socket 模块
s = socket.socket() # 创建 socket 对象
host = socket.gethostname() # 获取本地主机名
port = 12345 # 设置端口号
s.connect((host, port))
print(s.recv(1024))
print(s.getsockname())
while True:
pass
s.close()
| 20 | 42 | 0.588462 |
db83b7708f5109603df522f2a2a51720a1d7f544 | 497 | py | Python | crypto/Do-While/chall.py | vidner/codepwnda-ctf | 7e086044b753fe555b44395b79827d2f5b89da1d | [
"Unlicense"
] | 6 | 2021-02-18T15:07:55.000Z | 2022-02-04T01:38:10.000Z | crypto/Do-While/release/chall.py | vidner/codepwnda-ctf | 7e086044b753fe555b44395b79827d2f5b89da1d | [
"Unlicense"
] | null | null | null | crypto/Do-While/release/chall.py | vidner/codepwnda-ctf | 7e086044b753fe555b44395b79827d2f5b89da1d | [
"Unlicense"
] | null | null | null | from Crypto.Util.number import *
flag = open('flag').read()
m = int(flag.encode('hex'), 16)
e = 65537
p = 10057155855653816519008443883516207669171752595664834420732089141237812002637253398995576187189844504825306970324841764687135753617281559500522417554589779
q = 12751975767081815213173436540140401863485537039153993... | 35.5 | 159 | 0.82495 |
91d3d4b9da45c4190ff0d8fc0a9485ae16c3dd93 | 1,010 | py | Python | python/dictionary/dictionary.py | miroadamy/language-matrix | 510bc33d058555da8a67f87d25353b93d219d750 | [
"MIT"
] | 15 | 2015-03-13T03:45:52.000Z | 2022-02-26T00:11:18.000Z | python/dictionary/dictionary.py | miroadamy/language-matrix | 510bc33d058555da8a67f87d25353b93d219d750 | [
"MIT"
] | 5 | 2015-02-23T18:20:17.000Z | 2021-03-20T21:54:48.000Z | python/dictionary/dictionary.py | miroadamy/language-matrix | 510bc33d058555da8a67f87d25353b93d219d750 | [
"MIT"
] | 9 | 2016-05-11T13:03:22.000Z | 2021-04-11T13:07:12.000Z | national_league = {'reds':'Cincinnati Reds',
'dodgers': 'Los Angeles Dodgers',
'braves' : 'Atlanta Braves',
'astros': 'Houston Astros'}
assert (national_league.get('reds') == 'Cincinnati Reds')
# Getting a value for a key that isn't there will just return a No... | 28.857143 | 70 | 0.690099 |
5303060e10fb768e1198e699cced00450b018e8a | 596 | py | Python | Python/Exercícios_Python/007_média_aritmética.py | vdonoladev/aprendendo-programacao | 83abbcd6701b2105903b28fd549738863418cfb8 | [
"MIT"
] | null | null | null | Python/Exercícios_Python/007_média_aritmética.py | vdonoladev/aprendendo-programacao | 83abbcd6701b2105903b28fd549738863418cfb8 | [
"MIT"
] | null | null | null | Python/Exercícios_Python/007_média_aritmética.py | vdonoladev/aprendendo-programacao | 83abbcd6701b2105903b28fd549738863418cfb8 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
"""007 - Média Aritmética
Automatically generated by Colaboratory.
Original file is located at
https://colab.research.google.com/drive/1hYMBYT5_uIsYInMGSJ8Ve_A2JA5H7FIl
"""
nome = input('Nome do Aluno: ')
nota1 = float(input('Digite a 1° nota do aluno: '))
nota2 = float(input('Digite a 2°... | 31.368421 | 89 | 0.644295 |
7271146995992173de471aa69c8bc6d3c20777ae | 8,527 | py | Python | sandbox/axi_helper.py | colormotor/sandbox | b0f86c33fc3e27e87009508de93e79e14bb6241d | [
"MIT"
] | 2 | 2019-01-23T19:39:17.000Z | 2020-10-26T11:55:44.000Z | sandbox/axi_helper.py | colormotor/sandbox | b0f86c33fc3e27e87009508de93e79e14bb6241d | [
"MIT"
] | null | null | null | sandbox/axi_helper.py | colormotor/sandbox | b0f86c33fc3e27e87009508de93e79e14bb6241d | [
"MIT"
] | null | null | null | import axi
from cm import *
import app
import ui
import numpy as np
import random
import autograff.geom as geom
import autograff.plut as plut
V3_box = geom.make_rect(0, 0, 12, 8.5)
A3_box = geom.make_rect(0, 0, 16.93, 11.69)
A4_box = geom.make_rect(0, 0, 11.69, 8.27)
class AxiHelper:
def __init__(self, global_v... | 29.607639 | 87 | 0.574411 |
728fa49e6902ae9024e547125aa9b0e12d854ca8 | 5,702 | py | Python | research/cv/Pix2Pix/src/models/generator_model.py | leelige/mindspore | 5199e05ba3888963473f2b07da3f7bca5b9ef6dc | [
"Apache-2.0"
] | 77 | 2021-10-15T08:32:37.000Z | 2022-03-30T13:09:11.000Z | research/cv/Pix2Pix/src/models/generator_model.py | leelige/mindspore | 5199e05ba3888963473f2b07da3f7bca5b9ef6dc | [
"Apache-2.0"
] | 3 | 2021-10-30T14:44:57.000Z | 2022-02-14T06:57:57.000Z | research/cv/Pix2Pix/src/models/generator_model.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.546875 | 117 | 0.594353 |
feb9187112ca1cbc0889110b867af0f690cd595d | 2,266 | py | Python | Algorithms/stock_prices/stock_prices.py | tobias-fyi/02_algorithms | ab1a8a07c3560ad66712992e3af906e8fd316fe2 | [
"MIT"
] | null | null | null | Algorithms/stock_prices/stock_prices.py | tobias-fyi/02_algorithms | ab1a8a07c3560ad66712992e3af906e8fd316fe2 | [
"MIT"
] | 8 | 2020-03-24T17:47:23.000Z | 2022-03-12T00:33:21.000Z | cs/lambda_cs/02_algorithms/Algorithms/stock_prices/stock_prices.py | tobias-fyi/vela | b0b3d3c6dc3fa397c8c7a492098a02cf75e0ff82 | [
"MIT"
] | null | null | null | """
Algorithms :: Practice - stock prices
You want to write a bot that will automate the task of day-trading for you
while you're going through Lambda. You decide to have your bot just focus
on buying and selling Amazon stock.
Write a function `find_max_profit` that receives as input a list of stock
prices. Your func... | 35.40625 | 107 | 0.681377 |
fe0437d0b83da8c96843bf3773b8c2b4f46332d6 | 2,148 | py | Python | new-docs/examples/abac/python/test_example.py | saschajullmann/oso | 85d07c6a1825acba5ec043c917bff6e0f5c7128f | [
"Apache-2.0"
] | 1 | 2021-07-08T17:36:08.000Z | 2021-07-08T17:36:08.000Z | new-docs/examples/abac/python/test_example.py | saschajullmann/oso | 85d07c6a1825acba5ec043c917bff6e0f5c7128f | [
"Apache-2.0"
] | 2 | 2021-03-24T19:24:40.000Z | 2021-03-24T19:54:46.000Z | new-docs/examples/abac/python/test_example.py | saschajullmann/oso | 85d07c6a1825acba5ec043c917bff6e0f5c7128f | [
"Apache-2.0"
] | 1 | 2021-06-04T22:15:54.000Z | 2021-06-04T22:15:54.000Z | from pathlib import Path
from runpy import run_path
import sys
import pytest
from oso import Oso
polar_classes = run_path("01-simple.py")
User = polar_classes["User"]
Expense = polar_classes["Expense"]
@pytest.fixture
def oso():
return Oso()
@pytest.fixture
def load(oso):
def load(policy):
oso.lo... | 26.85 | 84 | 0.658287 |
437cc38f2757662fd07d0ba75711473d53b1d3d0 | 238 | py | Python | quant/example/ex_kkex.py | doubleDragon/QuantBot | 53a1d6c62ecece47bf777da0c0754430b706b7fd | [
"MIT"
] | 7 | 2017-10-22T15:00:09.000Z | 2019-09-19T11:45:43.000Z | quant/example/ex_kkex.py | doubleDragon/QuantBot | 53a1d6c62ecece47bf777da0c0754430b706b7fd | [
"MIT"
] | 1 | 2018-01-19T16:19:40.000Z | 2018-01-19T16:19:40.000Z | quant/example/ex_kkex.py | doubleDragon/QuantBot | 53a1d6c62ecece47bf777da0c0754430b706b7fd | [
"MIT"
] | 5 | 2017-12-11T15:10:29.000Z | 2018-12-21T17:40:58.000Z | #!/usr/bin/env python
# -*- coding: UTF-8 -*-
from quant import config
from quant.api.kkex import PrivateClient
client = PrivateClient(config.KKEX_API_KEY, config.KKEX_SECRET_TOKEN)
print(client.depth('BCCBTC'))
print(client.profile())
| 23.8 | 69 | 0.760504 |
601671439824efeeec9a8411c5bcd2e76a38d471 | 135 | py | Python | odeshp/__init__.py | danial29rus/odeshp | 38b0686ad58340236e4df9c45a98355353774442 | [
"MIT"
] | null | null | null | odeshp/__init__.py | danial29rus/odeshp | 38b0686ad58340236e4df9c45a98355353774442 | [
"MIT"
] | null | null | null | odeshp/__init__.py | danial29rus/odeshp | 38b0686ad58340236e4df9c45a98355353774442 | [
"MIT"
] | null | null | null | """
:authors: danial29rus,CHERNOV,martishenya,KAHOROV
:Functions:
odeshp.oderk3()
"""
from .odeshp import oderk3
| 11.25 | 49 | 0.637037 |
719960fe5a9ff3205337ab26a03efb0ea4465213 | 2,328 | py | Python | api/serializers.py | scholaronroad/guts_2021_hackathon | 482b7b59317b67fc37f67f1ccfeaadbf811c00ca | [
"MIT"
] | 1 | 2021-02-05T15:58:02.000Z | 2021-02-05T15:58:02.000Z | api/serializers.py | nathanwelsh8/guts_2021_hackathon | d875000051a423db4a4bb1a8df35d6d9a9e9db63 | [
"MIT"
] | 2 | 2021-02-06T13:54:45.000Z | 2021-02-06T20:05:18.000Z | api/serializers.py | scholaronroad/guts_2021_hackathon | 482b7b59317b67fc37f67f1ccfeaadbf811c00ca | [
"MIT"
] | 2 | 2021-02-05T20:27:48.000Z | 2021-03-31T19:58:07.000Z | from django.conf import settings
from rest_framework import serializers
from rest_framework_simplejwt import serializers as jwt_serializers
from rest_framework_simplejwt.settings import api_settings as jwt_settings
from rest_framework_simplejwt.tokens import RefreshToken
from . import models
class User(serializers.M... | 27.714286 | 75 | 0.614691 |
71ddd6f9aa22d4b0594ce1a813b3fff3880f7a24 | 7,006 | py | Python | ProbabPyReason/HiddenMarkovModel.py | MBALearnsToCode/ProbGraph | a61839669ca84b0bb0103134682dfdf43c6c3f1b | [
"MIT"
] | null | null | null | ProbabPyReason/HiddenMarkovModel.py | MBALearnsToCode/ProbGraph | a61839669ca84b0bb0103134682dfdf43c6c3f1b | [
"MIT"
] | null | null | null | ProbabPyReason/HiddenMarkovModel.py | MBALearnsToCode/ProbGraph | a61839669ca84b0bb0103134682dfdf43c6c3f1b | [
"MIT"
] | null | null | null | from copy import deepcopy
from frozendict import frozendict
from ProbabPy import OnePDF, OnePMF
class HiddenMarkovModel:
def __init__(self, state_var, observation_var,
state_prior_pdf, transition_pdf_template, observation_pdf_template):
self.state_var = state_var
self.observation_... | 48.652778 | 118 | 0.566943 |
1c0b563368430c026025a6f61704375a2b97b4d4 | 13,636 | py | Python | Packs/BeyondTrust_Password_Safe/Integrations/BeyondTrust_Password_Safe/BeyondTrust_Password_Safe.py | diCagri/content | c532c50b213e6dddb8ae6a378d6d09198e08fc9f | [
"MIT"
] | 799 | 2016-08-02T06:43:14.000Z | 2022-03-31T11:10:11.000Z | Packs/BeyondTrust_Password_Safe/Integrations/BeyondTrust_Password_Safe/BeyondTrust_Password_Safe.py | diCagri/content | c532c50b213e6dddb8ae6a378d6d09198e08fc9f | [
"MIT"
] | 9,317 | 2016-08-07T19:00:51.000Z | 2022-03-31T21:56:04.000Z | Packs/BeyondTrust_Password_Safe/Integrations/BeyondTrust_Password_Safe/BeyondTrust_Password_Safe.py | diCagri/content | c532c50b213e6dddb8ae6a378d6d09198e08fc9f | [
"MIT"
] | 1,297 | 2016-08-04T13:59:00.000Z | 2022-03-31T23:43:06.000Z | import demistomock as demisto
from CommonServerPython import *
from CommonServerUserPython import *
''' IMPORTS '''
import json
import requests
from typing import List, Dict
# Disable insecure warnings
requests.packages.urllib3.disable_warnings()
''' GLOBALS/PARAMS '''
USERNAME = demisto.params().get('credentials'... | 30.302222 | 120 | 0.660751 |
c7b2d70d14eab273b4e905172126bc7a55cfa51a | 503 | py | Python | Source/11_XML_RPC_MultiCall/client.py | rbiotblbk/WBS_T9_2022 | 533156db88ff2fe676564b0e5d6e84e888ab0916 | [
"MIT"
] | 1 | 2022-02-28T09:49:35.000Z | 2022-02-28T09:49:35.000Z | Source/11_XML_RPC_MultiCall/client.py | rbiotblbk/WBS_T9_2022 | 533156db88ff2fe676564b0e5d6e84e888ab0916 | [
"MIT"
] | null | null | null | Source/11_XML_RPC_MultiCall/client.py | rbiotblbk/WBS_T9_2022 | 533156db88ff2fe676564b0e5d6e84e888ab0916 | [
"MIT"
] | null | null | null | import xmlrpc.client
proxy = xmlrpc.client.ServerProxy("http://localhost:50000")
multicall = xmlrpc.client.MultiCall(proxy)
# Assign the required functions with its variables
multicall.add(6,4)
multicall.multiply(6,4)
# Call the bundled functions and get the result
results = multicall() # Iterator
# Convert th... | 23.952381 | 59 | 0.751491 |
407f6df6cde41628ca281793e108f1b52a3ba5a0 | 1,148 | py | Python | spider/test1/test1/items.py | shyorange/MovieWebsite | aaf3be332b9f944ea93fbd841e1758b4a11d4581 | [
"Apache-2.0"
] | null | null | null | spider/test1/test1/items.py | shyorange/MovieWebsite | aaf3be332b9f944ea93fbd841e1758b4a11d4581 | [
"Apache-2.0"
] | null | null | null | spider/test1/test1/items.py | shyorange/MovieWebsite | aaf3be332b9f944ea93fbd841e1758b4a11d4581 | [
"Apache-2.0"
] | null | null | null | # -*- coding: utf-8 -*-
# Define here the models for your scraped items
#
# See documentation in:
# https://doc.scrapy.org/en/latest/topics/items.html
import scrapy
# 电影天堂的Item类
class Test1Item(scrapy.Item):
# define the fields for your item here like:
# name = scrapy.Field()
movie_name = scrapy.Field();... | 26.090909 | 59 | 0.635017 |
40e51e7c9119ff5ac81feaf86d24482840ca6a37 | 1,756 | py | Python | Utils/py/GoPro/config.py | tarsoly/NaoTH | dcd2b67ef6bf9953c81d3e1b26e543b5922b7d52 | [
"ECL-2.0",
"Apache-2.0"
] | null | null | null | Utils/py/GoPro/config.py | tarsoly/NaoTH | dcd2b67ef6bf9953c81d3e1b26e543b5922b7d52 | [
"ECL-2.0",
"Apache-2.0"
] | null | null | null | Utils/py/GoPro/config.py | tarsoly/NaoTH | dcd2b67ef6bf9953c81d3e1b26e543b5922b7d52 | [
"ECL-2.0",
"Apache-2.0"
] | null | null | null | from goprocam.constants import *
# NaoCam / a1b0a1b0a1
# NAOCAM_2 / a1b0a1b0a1
# NAOCAM_3 / a1b0a1b0a1
# GP26329941 / family3887 / D6:B9:D4:D7:B7:40
# GP26297683 / epic0546 / F8:D2:E9:F0:AC:0B
ssid = 'GP26329941'
passwd = 'family3887'
mac = 'D6:B9:D4:D7:B7:40'
retries = -1
# if the following configs are set, the ca... | 22.512821 | 87 | 0.589408 |
2979282601520757d60d6a62f5225d9ac3e5ebb5 | 2,204 | py | Python | Pycompile-Kingtebe/enc.py | Zusyaku/Termux-And-Lali-Linux-V2 | b1a1b0841d22d4bf2cc7932b72716d55f070871e | [
"Apache-2.0"
] | 2 | 2021-11-17T03:35:03.000Z | 2021-12-08T06:00:31.000Z | Pycompile-Kingtebe/enc.py | Zusyaku/Termux-And-Lali-Linux-V2 | b1a1b0841d22d4bf2cc7932b72716d55f070871e | [
"Apache-2.0"
] | null | null | null | Pycompile-Kingtebe/enc.py | Zusyaku/Termux-And-Lali-Linux-V2 | b1a1b0841d22d4bf2cc7932b72716d55f070871e | [
"Apache-2.0"
] | 2 | 2021-11-05T18:07:48.000Z | 2022-02-24T21:25:07.000Z | #_* coding:utf-8 *_
# Start : 08-04-2021 15:03 WIB
# Done : 08-04-2021 16:14 WIB
import sys as snif, os, marshal
from time import sleep as date
'''
!-- Note --!
Kalo Mau Rikod Sertakan Sumber Peler
Compile Marshal Only Python3 Not Support Python2
'''
exec(open("etc/.colors").read())
_black_ = lam... | 40.814815 | 477 | 0.552178 |
31b4367a5d8da2a50be01fc17395b2432039c3ca | 1,529 | py | Python | test/fx2trt/converters/acc_op/test_adaptive_avgpool.py | vuanvin/pytorch | 9267fd8d7395074001ad7cf2a8f28082dbff6b0b | [
"Intel"
] | 5 | 2018-04-24T13:41:12.000Z | 2019-07-09T07:32:09.000Z | test/fx2trt/converters/acc_op/test_adaptive_avgpool.py | vuanvin/pytorch | 9267fd8d7395074001ad7cf2a8f28082dbff6b0b | [
"Intel"
] | 8 | 2020-05-17T10:23:03.000Z | 2022-02-28T12:47:56.000Z | test/fx2trt/converters/acc_op/test_adaptive_avgpool.py | vuanvin/pytorch | 9267fd8d7395074001ad7cf2a8f28082dbff6b0b | [
"Intel"
] | 7 | 2020-08-31T22:49:59.000Z | 2020-09-15T14:29:07.000Z | # Owner(s): ["oncall: fx"]
import torch
import torch.fx.experimental.fx_acc.acc_ops as acc_ops
from parameterized import parameterized
from torch.testing._internal.common_fx2trt import AccTestCase, InputTensorSpec
class TestAdaptiveAvgPoolConverter(AccTestCase):
@parameterized.expand(
[
((64,... | 29.980392 | 87 | 0.563113 |
9ed3efb52acf7ded74279b06fb63dcf4f64d9a7b | 3,528 | py | Python | home-assistant/custom_components/lunching/sensor.py | Adamvg/SmartHouse | 740b010260f6f6b38a19e2a75d431446abd54253 | [
"MIT"
] | 136 | 2019-06-27T08:11:47.000Z | 2022-03-11T12:26:53.000Z | home-assistant/custom_components/lunching/sensor.py | Venkysgithu/SmartHouse | d4e42dbbbb1f535f1684d507de411a4421b92e4d | [
"MIT"
] | 5 | 2020-05-30T00:19:22.000Z | 2022-03-25T18:49:47.000Z | home-assistant/custom_components/lunching/sensor.py | Venkysgithu/SmartHouse | d4e42dbbbb1f535f1684d507de411a4421b92e4d | [
"MIT"
] | 63 | 2019-07-15T21:11:58.000Z | 2022-03-13T09:43:24.000Z | """
Fetch information from lunching.pl about ordered food
"""
import voluptuous as vol
import logging
import homeassistant.helpers.config_validation as cv
import async_timeout
import aiohttp
import asyncio
import homeassistant.util as util
import re
from aiohttp.hdrs import AUTHORIZATION
from datetime import timedelt... | 32.366972 | 119 | 0.711168 |
9eef5207d60e1d00df4a88bb010ded83bf0b9d8f | 552 | py | Python | Python/Google Dictionary CLI/GoogleDictionary.py | saurabhpal007/hacktoberfest2021-1 | 5abad37ab426a7b34fc7bcd98ded885fd6ce02ef | [
"CC0-1.0"
] | 81 | 2021-10-01T13:19:13.000Z | 2021-10-06T08:43:35.000Z | Python/Google Dictionary CLI/GoogleDictionary.py | saurabhpal007/hacktoberfest2021-1 | 5abad37ab426a7b34fc7bcd98ded885fd6ce02ef | [
"CC0-1.0"
] | 67 | 2021-10-01T13:43:46.000Z | 2021-10-06T13:55:49.000Z | Python/Google Dictionary CLI/GoogleDictionary.py | saurabhpal007/hacktoberfest2021-1 | 5abad37ab426a7b34fc7bcd98ded885fd6ce02ef | [
"CC0-1.0"
] | 394 | 2021-10-01T11:55:24.000Z | 2021-10-06T13:45:57.000Z | import requests
word = input("Enter a word: ")
api = f"https://api.dictionaryapi.dev/api/v2/entries/en/{word}"
response = requests.get(api).json()[0]['meanings']
for i in response:
print(f'Parts of Speech: {i["partOfSpeech"].title()}')
for definition in i["definitions"]:
print(f"Definition: {definit... | 30.666667 | 75 | 0.639493 |
c316507dc53f6b944a6b91ea1b755deb7f822dc8 | 7,383 | py | Python | huTools/http/engine_appengine.py | gadventures/huTools | 8bc58d63491bcd3cfc3e78d219be703d943ffeb5 | [
"BSD-3-Clause"
] | null | null | null | huTools/http/engine_appengine.py | gadventures/huTools | 8bc58d63491bcd3cfc3e78d219be703d943ffeb5 | [
"BSD-3-Clause"
] | null | null | null | huTools/http/engine_appengine.py | gadventures/huTools | 8bc58d63491bcd3cfc3e78d219be703d943ffeb5 | [
"BSD-3-Clause"
] | null | null | null | #!/usr/bin/env python
# encoding: utf-8
"""
engine_appengine.py implements urlfetch based queries for huTools.http.
See http://code.google.com/appengine/docs/python/urlfetch/overview.html for the basics of the
AppEngine capabilities.
Created by Maximillian Dornseif on 2010-10-24.
Copyright (c) 2010, 2011 HUDORA. All ... | 41.477528 | 106 | 0.64337 |
48b2d8fa66cd3e361726e91efd3607958599ecb8 | 703 | py | Python | app-backend/app/__init__.py | MarlonSchultz/SHM | f9082afb34d41ba20de564939c2e7de0caed907e | [
"MIT"
] | null | null | null | app-backend/app/__init__.py | MarlonSchultz/SHM | f9082afb34d41ba20de564939c2e7de0caed907e | [
"MIT"
] | 1 | 2019-03-12T13:35:46.000Z | 2019-03-12T13:35:46.000Z | app-backend/app/__init__.py | MarlonSchultz/SHM | f9082afb34d41ba20de564939c2e7de0caed907e | [
"MIT"
] | 1 | 2019-03-15T13:29:57.000Z | 2019-03-15T13:29:57.000Z | from flask import Flask
from flask_sqlalchemy import SQLAlchemy
from flask_migrate import Migrate
from flask_cors import CORS
import os
app_object = Flask(__name__)
app_object.config['SQLALCHEMY_DATABASE_URI'] = f"postgresql://{os.environ['POSTGRES_USER']}:{os.environ['POSTGRES_PASSWORD']}@{os.environ['POSTGRES_HOST'... | 29.291667 | 184 | 0.780939 |
5b208ab70ba569a723a98ca9b17376b74700e763 | 258 | py | Python | exercises/es/exc_01_02_02.py | Jette16/spacy-course | 32df0c8f6192de6c9daba89740a28c0537e4d6a0 | [
"MIT"
] | 2,085 | 2019-04-17T13:10:40.000Z | 2022-03-30T21:51:46.000Z | exercises/es/exc_01_02_02.py | Jette16/spacy-course | 32df0c8f6192de6c9daba89740a28c0537e4d6a0 | [
"MIT"
] | 79 | 2019-04-18T14:42:55.000Z | 2022-03-07T08:15:43.000Z | exercises/es/exc_01_02_02.py | Jette16/spacy-course | 32df0c8f6192de6c9daba89740a28c0537e4d6a0 | [
"MIT"
] | 361 | 2019-04-17T13:34:32.000Z | 2022-03-28T04:42:45.000Z | # Importa la clase de lenguaje "German"
from spacy.lang.____ import ____
# Crea el objeto nlp
nlp = ____
# Procesa un texto (aquí dice "Saludos cordiales!" en alemán)
doc = nlp("Liebe Grüße!")
# Imprime en pantalla el texto del documento
print(____.text)
| 21.5 | 61 | 0.736434 |
d2cb724835fdabecc3c9d463253a55f08f36a69a | 2,929 | py | Python | official/gnn/gcn/eval.py | leelige/mindspore | 5199e05ba3888963473f2b07da3f7bca5b9ef6dc | [
"Apache-2.0"
] | 77 | 2021-10-15T08:32:37.000Z | 2022-03-30T13:09:11.000Z | official/gnn/gcn/eval.py | leelige/mindspore | 5199e05ba3888963473f2b07da3f7bca5b9ef6dc | [
"Apache-2.0"
] | 3 | 2021-10-30T14:44:57.000Z | 2022-02-14T06:57:57.000Z | official/gnn/gcn/eval.py | leelige/mindspore | 5199e05ba3888963473f2b07da3f7bca5b9ef6dc | [
"Apache-2.0"
] | 24 | 2021-10-15T08:32:45.000Z | 2022-03-24T18:45:20.000Z | # Copyright 2020 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.253521 | 104 | 0.712188 |
817d5c25d462668a9e446159ab7931e5d68cc755 | 867 | py | Python | scripts/cities_coordinates.py | gaiar/bachelor-beuth-2019 | 391af71bd6ec483b239ed200cee880651cb5396a | [
"MIT"
] | null | null | null | scripts/cities_coordinates.py | gaiar/bachelor-beuth-2019 | 391af71bd6ec483b239ed200cee880651cb5396a | [
"MIT"
] | null | null | null | scripts/cities_coordinates.py | gaiar/bachelor-beuth-2019 | 391af71bd6ec483b239ed200cee880651cb5396a | [
"MIT"
] | null | null | null | import pandas as pd
data = pd.read_csv('../../data/DE/DE.txt', sep='\t', names = ['geonameid', 'name', 'asciiname', 'alternatenames', 'latitude', 'longitude', \
'featureclass', 'featurecode', 'countrycode', 'alternatecountrycode', \
... | 37.695652 | 140 | 0.495963 |
81aff02fa61435beb15e324ade69111e6e38e33d | 333 | py | Python | frappe-bench/apps/erpnext/erpnext/domains/non_profit.py | Semicheche/foa_frappe_docker | a186b65d5e807dd4caf049e8aeb3620a799c1225 | [
"MIT"
] | null | null | null | frappe-bench/apps/erpnext/erpnext/domains/non_profit.py | Semicheche/foa_frappe_docker | a186b65d5e807dd4caf049e8aeb3620a799c1225 | [
"MIT"
] | null | null | null | frappe-bench/apps/erpnext/erpnext/domains/non_profit.py | Semicheche/foa_frappe_docker | a186b65d5e807dd4caf049e8aeb3620a799c1225 | [
"MIT"
] | null | null | null | data = {
'desktop_icons': [
'Non Profit',
'Member',
'Donor',
'Volunteer',
'Grant Application',
'Accounts',
'Buying',
'HR',
'ToDo'
],
'restricted_roles': [
'Non Profit Manager',
'Non Profit Member',
'Non Profit Portal User'
],
'modules': [
'Non Profit'
],
'default_portal_role': 'Non Prof... | 15.136364 | 44 | 0.597598 |
81c0cb746793106a49b366bb9e363145412c0e99 | 345 | py | Python | aoc2020/day_05/part_2.py | en0/aoc2020 | a2f41b909dffe1f366682b3d03fd5fbdbc924ec0 | [
"MIT"
] | null | null | null | aoc2020/day_05/part_2.py | en0/aoc2020 | a2f41b909dffe1f366682b3d03fd5fbdbc924ec0 | [
"MIT"
] | null | null | null | aoc2020/day_05/part_2.py | en0/aoc2020 | a2f41b909dffe1f366682b3d03fd5fbdbc924ec0 | [
"MIT"
] | null | null | null | from aoc2020 import *
from .part_1 import Solution as Part_1
class Solution(Part_1):
expected = 120
def solve(self) -> any:
all_seats = set(self.resource_lines("input", self.int))
for seat_id in all_seats:
if seat_id + 1 not in all_seats:
return seat_id + 1
... | 24.642857 | 63 | 0.623188 |
6fcbaf740f6c124bc26cb12663a2f5777952201a | 1,671 | py | Python | 20-hs-redez-sem/groups/03-doubleRatchet/src/helper_functions/signing.py | Kyrus1999/BACnet | 5be8e1377252166041bcd0b066cce5b92b077d06 | [
"MIT"
] | 8 | 2020-03-17T21:12:18.000Z | 2021-12-12T15:55:54.000Z | 20-hs-redez-sem/groups/03-doubleRatchet/src/helper_functions/signing.py | Kyrus1999/BACnet | 5be8e1377252166041bcd0b066cce5b92b077d06 | [
"MIT"
] | 2 | 2021-07-19T06:18:43.000Z | 2022-02-10T12:17:58.000Z | 20-hs-redez-sem/groups/03-doubleRatchet/src/helper_functions/signing.py | Kyrus1999/BACnet | 5be8e1377252166041bcd0b066cce5b92b077d06 | [
"MIT"
] | 25 | 2020-03-20T09:32:45.000Z | 2021-07-18T18:12:59.000Z | from xeddsa.implementations import XEdDSA25519
from helper_functions.helpers import FOLDERNAME_KEYS
import os
# This is not cryptographically safe. To be that the program should be a fixed set of operations that run every time.
''' HOW TO USE
from signing import xeddsa_sign, xeddsa_verify
##### SENDING PART #####
ms... | 30.944444 | 117 | 0.689408 |
6fd53c7a7ee1b0d4820fad374d319d44c36d7904 | 920 | py | Python | S6/CS334-NPL/003b_message_queue (005b).py | joe247/CSE-LABS | bab17548562bdc9c0bc8b15679f07379a9e98dec | [
"MIT"
] | 2 | 2021-02-03T02:03:21.000Z | 2021-07-03T20:24:14.000Z | S6/CS334-NPL/003b_message_queue (005b).py | joe247/CSE-LABS | bab17548562bdc9c0bc8b15679f07379a9e98dec | [
"MIT"
] | null | null | null | S6/CS334-NPL/003b_message_queue (005b).py | joe247/CSE-LABS | bab17548562bdc9c0bc8b15679f07379a9e98dec | [
"MIT"
] | null | null | null | import multiprocessing
from time import sleep
def square_list(mylist, q):
print('From process p1 ... creating squared queue')
""" function to square a given list """
# append squares of mylist to queue
for num in mylist:
q.put(num * num)
print(f'Queue: {mylist[:]}\n')
def print_queue(q):
""" function to print... | 24.210526 | 67 | 0.692391 |
73d59ad993d57d6c0dd303f45aa58d2cb9c9fb43 | 14,883 | py | Python | Packs/FeedUnit42/Integrations/FeedUnit42/test_data/feed_data.py | diCagri/content | c532c50b213e6dddb8ae6a378d6d09198e08fc9f | [
"MIT"
] | 799 | 2016-08-02T06:43:14.000Z | 2022-03-31T11:10:11.000Z | Packs/FeedUnit42/Integrations/FeedUnit42/test_data/feed_data.py | diCagri/content | c532c50b213e6dddb8ae6a378d6d09198e08fc9f | [
"MIT"
] | 9,317 | 2016-08-07T19:00:51.000Z | 2022-03-31T21:56:04.000Z | Packs/FeedUnit42/Integrations/FeedUnit42/test_data/feed_data.py | diCagri/content | c532c50b213e6dddb8ae6a378d6d09198e08fc9f | [
"MIT"
] | 1,297 | 2016-08-04T13:59:00.000Z | 2022-03-31T23:43:06.000Z | INDICATORS_DATA = [
{"created": "2019-07-30T09:29:07.724Z", "id": "indicator--0025039e-f0b5-4ad2-aaab-5374fe3734be",
"labels": ["malicious-activity"], "modified": "2020-05-12T13:02:30.000000Z",
"name": "c1ec28bc82500bd70f95edcbdf9306746198bbc04a09793ca69bb87f2abdb839",
"pattern": "[file:hashes.'SHA-2... | 66.441964 | 166 | 0.628234 |
73fc1cb663545666c41c40c8e4b08fdeb703d0c7 | 1,255 | py | Python | Python/Exercícios_Python/044_índice_de_massa_corporal.py | vdonoladev/aprendendo-programacao | 83abbcd6701b2105903b28fd549738863418cfb8 | [
"MIT"
] | null | null | null | Python/Exercícios_Python/044_índice_de_massa_corporal.py | vdonoladev/aprendendo-programacao | 83abbcd6701b2105903b28fd549738863418cfb8 | [
"MIT"
] | null | null | null | Python/Exercícios_Python/044_índice_de_massa_corporal.py | vdonoladev/aprendendo-programacao | 83abbcd6701b2105903b28fd549738863418cfb8 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
"""044 - Índice de Massa Corporal
Automatically generated by Colaboratory.
Original file is located at
https://colab.research.google.com/drive/10G3oUpA0PZK6KgfERw-ZURQ0-ciabsUw
"""
peso = float(input('Qual é o seu peso? (Kg) '))
altura = float(input('Qual é a sua altura? (m) '))
imc = pes... | 34.861111 | 103 | 0.688446 |
837e05acb03737319fa83ec36c7f0f1711c834de | 168 | py | Python | Raspberry-Pi/led_example.py | AravindVasudev/code-dump | 9b67c3cd1e8673b5ce4a90e5b17d69c82ad55298 | [
"MIT"
] | null | null | null | Raspberry-Pi/led_example.py | AravindVasudev/code-dump | 9b67c3cd1e8673b5ce4a90e5b17d69c82ad55298 | [
"MIT"
] | 1 | 2021-06-01T21:51:54.000Z | 2021-06-01T21:51:54.000Z | Raspberry-Pi/led_example.py | AravindVasudev/code-dump | 9b67c3cd1e8673b5ce4a90e5b17d69c82ad55298 | [
"MIT"
] | null | null | null | import RPi.GPIO as GPIO
import time
GPIO.setmode(GPIO.BCM)
GPIO.setup(18, GPIO.OUT)
GPIO.output(18, GPIO.HIGH)
time.sleep(5)
GPIO.output(18, GPIO.LOW)
GPIO.cleanup()
| 15.272727 | 26 | 0.744048 |
83f2e2087a3bb87991858b61275f1033c4a84350 | 1,307 | py | Python | src/main/apps/authentication/urls.py | Nouvellie/django-tflite | 1d08fdc8a2ec58886d7d2b8d40e7b3598613caca | [
"MIT"
] | 2 | 2021-08-23T21:56:07.000Z | 2022-01-20T13:52:19.000Z | src/main/apps/authentication/urls.py | Nouvellie/django-tflite | 1d08fdc8a2ec58886d7d2b8d40e7b3598613caca | [
"MIT"
] | null | null | null | src/main/apps/authentication/urls.py | Nouvellie/django-tflite | 1d08fdc8a2ec58886d7d2b8d40e7b3598613caca | [
"MIT"
] | null | null | null | from .views import (
AccountVerification,
PasswordReset,
PasswordResetRequest,
SignIn,
SignUp,
TokenInfoOut,
TokenInfoIn,
UserInfoIn,
UserInfoOut,
Verify,
)
from django.urls import path
urlpatterns = [
# SignUp:
path(
'signup',
SignUp.as_view(),
... | 17.426667 | 39 | 0.511859 |
f7cdca5749507dceca0d1e3befbddb5db9493eca | 741 | py | Python | 10.1111/nph.17101/data/simplify_genealias.py | jqsunac/doi | c5912a40c7bfda8270e5d51fbdd82a9f0650bd23 | [
"MIT"
] | null | null | null | 10.1111/nph.17101/data/simplify_genealias.py | jqsunac/doi | c5912a40c7bfda8270e5d51fbdd82a9f0650bd23 | [
"MIT"
] | null | null | null | 10.1111/nph.17101/data/simplify_genealias.py | jqsunac/doi | c5912a40c7bfda8270e5d51fbdd82a9f0650bd23 | [
"MIT"
] | null | null | null |
tair2name = {}
tair2fullname = {}
with open('gene_aliases_20140331.txt', 'r') as infh:
for buf in infh:
if buf[0:10] == 'locus_name':
continue
tair_id, tair_name, tair_fullname = buf.replace('\n', '').replace('#', '').replace('"', '').replace('\'', '').split('\t')
... | 29.64 | 129 | 0.545209 |
e3a5bcee541bab469f7d9c67e4f1e0249c40c9d1 | 694 | py | Python | icons/genCopyrightNotice.py | Ilaris-Kit/Oculus-Ilaris | 803c49ec7853103d070e409c549e9b2a01a4d312 | [
"MIT"
] | null | null | null | icons/genCopyrightNotice.py | Ilaris-Kit/Oculus-Ilaris | 803c49ec7853103d070e409c549e9b2a01a4d312 | [
"MIT"
] | null | null | null | icons/genCopyrightNotice.py | Ilaris-Kit/Oculus-Ilaris | 803c49ec7853103d070e409c549e9b2a01a4d312 | [
"MIT"
] | 1 | 2022-02-03T23:04:47.000Z | 2022-02-03T23:04:47.000Z | import os
even = True
def splitOnTagclose(x):
global even
if not even:
return x.split(">")[1]
else:
even = False
return ""
def splitOnEndTag(x):
return x.split("</text")[0]
print ("<table id=\"copyrightNoticeIcons\">")
for file_ in os.listdir("."):
currentFile = ""
i... | 23.931034 | 109 | 0.550432 |
3fdeaeced023511bf96b707bbbfdd41f4b7bcfed | 3,655 | py | Python | exercises/networking_selfpaced/networking-workshop/collections/ansible_collections/community/general/plugins/modules/vultr_network_info.py | tr3ck3r/linklight | 5060f624c235ecf46cb62cefcc6bddc6bf8ca3e7 | [
"MIT"
] | null | null | null | exercises/networking_selfpaced/networking-workshop/collections/ansible_collections/community/general/plugins/modules/vultr_network_info.py | tr3ck3r/linklight | 5060f624c235ecf46cb62cefcc6bddc6bf8ca3e7 | [
"MIT"
] | null | null | null | exercises/networking_selfpaced/networking-workshop/collections/ansible_collections/community/general/plugins/modules/vultr_network_info.py | tr3ck3r/linklight | 5060f624c235ecf46cb62cefcc6bddc6bf8ca3e7 | [
"MIT"
] | null | null | null | #!/usr/bin/python
#
# (c) 2018, Yanis Guenane <yanis+ansible@guenane.org>
# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
from __future__ import (absolute_import, division, print_function)
__metaclass__ = type
ANSIBLE_METADATA = {'metadata_version': '1.1',
... | 25.921986 | 99 | 0.660192 |
4d83a329d0a9058d5a944e233ed951cdc9396d5b | 3,548 | py | Python | python_experiments/paper_figures/tkde/query_time_helper.py | RapidsAtHKUST/SimRank | 3a601b08f9a3c281e2b36b914e06aba3a3a36118 | [
"MIT"
] | 8 | 2020-04-14T23:17:00.000Z | 2021-06-21T12:34:04.000Z | python_experiments/paper_figures/tkde/query_time_helper.py | RapidsAtHKUST/SimRank | 3a601b08f9a3c281e2b36b914e06aba3a3a36118 | [
"MIT"
] | null | null | null | python_experiments/paper_figures/tkde/query_time_helper.py | RapidsAtHKUST/SimRank | 3a601b08f9a3c281e2b36b914e06aba3a3a36118 | [
"MIT"
] | 1 | 2021-01-17T16:26:50.000Z | 2021-01-17T16:26:50.000Z | from data_analysis.vldbj_data_parsing.probesim_querying_time_statistics import probesim_tag
from paper_figures.vldbj.draw_indexing_time_size import *
from data_analysis.vldbj_data_parsing.querying_time_accuracy_statistics import *
from data_analysis.vldbj_data_parsing.generate_speedup_over_sling_markdown import get_cpu... | 42.746988 | 119 | 0.649662 |
6733cea1ec9cef41b56edd3da3d4e1991b1c1bf8 | 1,106 | py | Python | app/common/user.py | pushyzheng/docker-oj-web | 119abae3763cd2e53c686a320af7f4f5af1f16ca | [
"MIT"
] | 2 | 2019-06-24T08:34:39.000Z | 2019-06-27T12:23:47.000Z | app/common/user.py | pushyzheng/docker-oj-web | 119abae3763cd2e53c686a320af7f4f5af1f16ca | [
"MIT"
] | null | null | null | app/common/user.py | pushyzheng/docker-oj-web | 119abae3763cd2e53c686a320af7f4f5af1f16ca | [
"MIT"
] | null | null | null | # encoding:utf-8
from app import db
from utils import ModelParent
from app.common.models import RoleName
from datetime import datetime
class User(db.Model, ModelParent):
__tablename__ = 'users'
id = db.Column(db.String(32), primary_key=True)
username = db.Column(db.String(32))
password = db.Column(db... | 29.105263 | 81 | 0.668174 |
221c1b6bb15506de286d3db9879118eaac810e82 | 913 | py | Python | Uebung1/Uebung1_Aufgabe2_2.py | B0mM3L6000/EiP | f68718f95a2d3cde8ead62b6134ac1b5068881a5 | [
"MIT"
] | 1 | 2018-04-18T19:10:06.000Z | 2018-04-18T19:10:06.000Z | Uebung1/Uebung1_Aufgabe2_2.py | B0mM3L6000/EiP | f68718f95a2d3cde8ead62b6134ac1b5068881a5 | [
"MIT"
] | null | null | null | Uebung1/Uebung1_Aufgabe2_2.py | B0mM3L6000/EiP | f68718f95a2d3cde8ead62b6134ac1b5068881a5 | [
"MIT"
] | 1 | 2018-04-29T08:48:00.000Z | 2018-04-29T08:48:00.000Z | zahl1 = int(input("Zahl1:"))
zahl2 = int(input("Zahl2:"))
zahl3 = int(input("Zahl3:"))
print("Die Größte Zahl ist:")
#die einzelnen Fälle überprüfen und den entsprechenden Fall ausgeben:
if zahl1 > zahl2 and zahl1 > zahl3:
print("Zahl1 ist am größten und hat den Wert ", zahl1)
elif zahl2 > zahl1 and zahl2 > zahl... | 39.695652 | 71 | 0.696605 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.