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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
4afdea296b7263c9590f311bcf486b5681050e13 | 3,107 | py | Python | internal/sim_parser.py | WarcraftPriests/sl-shadow-priest | 4c8753592b3cc18c6d2de7e9227e5adb8cef3208 | [
"MIT"
] | 13 | 2020-04-10T17:34:49.000Z | 2022-02-13T04:04:30.000Z | internal/sim_parser.py | WarcraftPriests/sl-shadow-priest | 4c8753592b3cc18c6d2de7e9227e5adb8cef3208 | [
"MIT"
] | 213 | 2020-04-10T04:15:00.000Z | 2022-01-20T19:18:55.000Z | internal/sim_parser.py | WarcraftPriests/sl-shadow-priest | 4c8753592b3cc18c6d2de7e9227e5adb8cef3208 | [
"MIT"
] | 7 | 2020-10-08T07:22:08.000Z | 2021-07-08T21:09:33.000Z | """parses a simc output file into a single csv file"""
import os
import json
from os import path
def parse(filename, weights):
# pylint: disable=consider-using-f-string
"""parse the given sim file"""
separator = ','
ret = ''
with open(filename, "r", encoding="utf8") as file:
data = file.re... | 37.433735 | 92 | 0.537174 |
728f1a1e8c45800ad195b399eecb9a7358b6f328 | 2,826 | py | Python | 6_DeepLearning-RNNs/1-Keras_RNN.py | felixdittrich92/DeepLearning-tensorflow-keras | 2880d8ed28ba87f28851affa92b6fa99d2e47be9 | [
"Apache-2.0"
] | null | null | null | 6_DeepLearning-RNNs/1-Keras_RNN.py | felixdittrich92/DeepLearning-tensorflow-keras | 2880d8ed28ba87f28851affa92b6fa99d2e47be9 | [
"Apache-2.0"
] | null | null | null | 6_DeepLearning-RNNs/1-Keras_RNN.py | felixdittrich92/DeepLearning-tensorflow-keras | 2880d8ed28ba87f28851affa92b6fa99d2e47be9 | [
"Apache-2.0"
] | null | null | null | '''
siehe Bilder in diesem Ordner
einmal eigene Implementierung und einmal Keras Implementierung
'''
import random
import numpy as np
import tensorflow as tf
from tensorflow.keras.models import *
from tensorflow.keras.layers import *
from tensorflow.keras.activations import *
def sigmoid(x):
return 1.0 / (1.0... | 31.054945 | 124 | 0.627035 |
72b4779925ce09089741fce9efc62685e1c1f835 | 1,776 | py | Python | Packs/DBotTruthBombs/Scripts/FactsAboutYou/FactsAboutYou.py | diCagri/content | c532c50b213e6dddb8ae6a378d6d09198e08fc9f | [
"MIT"
] | 799 | 2016-08-02T06:43:14.000Z | 2022-03-31T11:10:11.000Z | Packs/DBotTruthBombs/Scripts/FactsAboutYou/FactsAboutYou.py | diCagri/content | c532c50b213e6dddb8ae6a378d6d09198e08fc9f | [
"MIT"
] | 9,317 | 2016-08-07T19:00:51.000Z | 2022-03-31T21:56:04.000Z | Packs/DBotTruthBombs/Scripts/FactsAboutYou/FactsAboutYou.py | diCagri/content | c532c50b213e6dddb8ae6a378d6d09198e08fc9f | [
"MIT"
] | 1,297 | 2016-08-04T13:59:00.000Z | 2022-03-31T23:43:06.000Z | import traceback
from typing import Any, Dict
import demistomock as demisto # noqa: F401
from CommonServerPython import * # noqa: F401
DBOT_NAME = 'DBot'
def dbot_fact(category) -> Dict[str, Any]:
args = {}
if category:
args['category'] = category
res = demisto.executeCommand('dbot-truth-bomb'... | 25.014085 | 95 | 0.65991 |
f44265f0d159c6baff83e6bc2acc8cedfec96dfd | 3,514 | py | Python | TestBot/test_cogs/__init__.py | austinmh12/DiscordBots | 55550b68a7ad6423de55e62dbbff93fd88f08ff2 | [
"MIT"
] | null | null | null | TestBot/test_cogs/__init__.py | austinmh12/DiscordBots | 55550b68a7ad6423de55e62dbbff93fd88f08ff2 | [
"MIT"
] | null | null | null | TestBot/test_cogs/__init__.py | austinmh12/DiscordBots | 55550b68a7ad6423de55e62dbbff93fd88f08ff2 | [
"MIT"
] | null | null | null | from datetime import datetime as dt, timedelta as td
from sqlite3 import connect
import pandas as pd
import logging
import asyncio
from discord.ext import commands
from discord import Embed, Colour
log = logging.getLogger(__name__)
log.setLevel(logging.DEBUG)
stream_handler = logging.StreamHandler()
stream_format = lo... | 26.223881 | 120 | 0.665623 |
22fef01e485328e46961dbef50700be0233b1a02 | 10,339 | py | Python | python/Data.py | Greakz/mdh-cmake-cubevis | 6c64ec0e14dcdd07e69fa1f018aa7954eeeaf173 | [
"MIT"
] | null | null | null | python/Data.py | Greakz/mdh-cmake-cubevis | 6c64ec0e14dcdd07e69fa1f018aa7954eeeaf173 | [
"MIT"
] | 5 | 2021-08-24T11:09:54.000Z | 2021-08-24T21:14:15.000Z | python/Data.py | Greakz/mdh-cmake-cubevis | 6c64ec0e14dcdd07e69fa1f018aa7954eeeaf173 | [
"MIT"
] | null | null | null | class Data:
constants = []
clocks_par = []
clocks_seq = []
cube_nests = []
appearance = {}
arrows = []
def __init__(self, json_object):
self.parse_constants(json_object["constants"])
self.parse_appearance(json_object["appearance"])
self.parse_par_clocks(json_object["... | 43.809322 | 116 | 0.510591 |
4a869a2e8bea5718cf7920f3aa59733902c720ad | 2,628 | py | Python | pythonlib/flask_autoindex/icons.py | Jumpscale/web | 8e8ec2ce01f3105c7647ee8a0c90af09311cbbeb | [
"Apache-2.0"
] | 1 | 2015-10-26T10:38:32.000Z | 2015-10-26T10:38:32.000Z | pythonlib/flask_autoindex/icons.py | Jumpscale/web | 8e8ec2ce01f3105c7647ee8a0c90af09311cbbeb | [
"Apache-2.0"
] | null | null | null | pythonlib/flask_autoindex/icons.py | Jumpscale/web | 8e8ec2ce01f3105c7647ee8a0c90af09311cbbeb | [
"Apache-2.0"
] | null | null | null | from flask.ext.autoindex.entry import File, Default
by_extension = [
('page_white_python.png', 'py'),
('python.png', 'pyc'),
('page_white_text_width.png', ['md', 'markdown', 'rst', 'rtf']),
('page_white_code.png', ['html', 'htm', 'cgi']),
('page_white_visualstudio.png', ['asp', 'vb']),
('page_... | 33.265823 | 76 | 0.550989 |
4abbe259886b39dee3f29987a8a41e77e5509580 | 191 | py | Python | streamlit_custom_slider/app.py | lukexyz/iris | 7290525d15f5283dfdfb6bb9c53c5de479bf30cb | [
"MIT"
] | 1 | 2021-01-04T18:13:28.000Z | 2021-01-04T18:13:28.000Z | streamlit_custom_slider/app.py | lukexyz/iris | 7290525d15f5283dfdfb6bb9c53c5de479bf30cb | [
"MIT"
] | null | null | null | streamlit_custom_slider/app.py | lukexyz/iris | 7290525d15f5283dfdfb6bb9c53c5de479bf30cb | [
"MIT"
] | 1 | 2021-11-08T14:39:57.000Z | 2021-11-08T14:39:57.000Z | # Import the wrapper function from your package
from streamlit_custom_slider import st_custom_slider
import streamlit as st
st.title("Testing Streamlit custom components")
st_custom_slider() | 31.833333 | 52 | 0.848168 |
60017db04cf099ff5ec7ac326969eb41fde1c191 | 1,002 | py | Python | elements/python/7/1/soln.py | mmcloughlin/problems | 6095842ffe007a12ec8c2093850515aa4e046616 | [
"MIT"
] | 11 | 2019-02-08T06:54:34.000Z | 2021-08-07T18:57:39.000Z | elements/python/7/1/soln.py | mmcloughlin/problems | 6095842ffe007a12ec8c2093850515aa4e046616 | [
"MIT"
] | 1 | 2019-05-21T08:14:10.000Z | 2019-05-21T08:14:10.000Z | elements/python/7/1/soln.py | mmcloughlin/problems | 6095842ffe007a12ec8c2093850515aa4e046616 | [
"MIT"
] | null | null | null | import random
def atoi(s):
"""
Convert s to an integer.
"""
# determine sign
sgn = 1
if s[0] == '-':
sgn = -1
s = s[1:]
# accumulate digits
i = 0
for d in s:
x = ord(d) - ord('0')
if x < 0 or x > 9:
raise ValueError('bad digit')
i... | 15.65625 | 43 | 0.441118 |
e0f6635dccb17ef3196f6aeba70bf8a47c3cb6a4 | 73 | py | Python | basics/comment.py | karinakozarova/Learning-Python | 217dfc8ca6931a238445daf0b84e188c02916c52 | [
"MIT"
] | 1 | 2019-04-07T23:14:29.000Z | 2019-04-07T23:14:29.000Z | basics/comment.py | karinakozarova/Learning-Python | 217dfc8ca6931a238445daf0b84e188c02916c52 | [
"MIT"
] | null | null | null | basics/comment.py | karinakozarova/Learning-Python | 217dfc8ca6931a238445daf0b84e188c02916c52 | [
"MIT"
] | null | null | null | city_name = "St. Potatosburg"
# population of the city
city_pop = 340000
| 18.25 | 29 | 0.753425 |
e0fe2ae02e4ef399cf28488b63cbb26c1fa446d4 | 221 | py | Python | 1967-number-of-strings-that-appear-as-substrings-in-word/1967-number-of-strings-that-appear-as-substrings-in-word.py | hyeseonko/LeetCode | 48dfc93f1638e13041d8ce1420517a886abbdc77 | [
"MIT"
] | 2 | 2021-12-05T14:29:06.000Z | 2022-01-01T05:46:13.000Z | 1967-number-of-strings-that-appear-as-substrings-in-word/1967-number-of-strings-that-appear-as-substrings-in-word.py | hyeseonko/LeetCode | 48dfc93f1638e13041d8ce1420517a886abbdc77 | [
"MIT"
] | null | null | null | 1967-number-of-strings-that-appear-as-substrings-in-word/1967-number-of-strings-that-appear-as-substrings-in-word.py | hyeseonko/LeetCode | 48dfc93f1638e13041d8ce1420517a886abbdc77 | [
"MIT"
] | null | null | null | class Solution:
def numOfStrings(self, patterns: List[str], word: str) -> int:
output=0
for pattern in patterns:
if pattern in word:
output+=1
return output
| 27.625 | 66 | 0.533937 |
1ca479ce3e14c33980cd3702cf967ce1979cd03e | 1,196 | py | Python | eve/tests/methods/common.py | RedTurtle/eve | beaf413372294d4c611f4948fbee904b8e4bc043 | [
"BSD-3-Clause"
] | 1 | 2015-02-10T17:38:18.000Z | 2015-02-10T17:38:18.000Z | pythonlib/eve/tests/methods/common.py | Jumpscale/web | 8e8ec2ce01f3105c7647ee8a0c90af09311cbbeb | [
"Apache-2.0"
] | null | null | null | pythonlib/eve/tests/methods/common.py | Jumpscale/web | 8e8ec2ce01f3105c7647ee8a0c90af09311cbbeb | [
"Apache-2.0"
] | null | null | null | from datetime import datetime
from bson import ObjectId
from eve.tests import TestBase
from eve.methods.common import serialize, resource_link
class TestSerializer(TestBase):
def test_serialize_subdocument(self):
# tests fix for #244, serialization of sub-documents.
schema = {'personal': {'type'... | 38.580645 | 78 | 0.594482 |
4080268bbdc5f2e84756a7d889fecd261baa17a0 | 226 | pyde | Python | sketches/filter04_posterize/filter04_posterize.pyde | kantel/processingpy | 74aae222e46f68d1c8f06307aaede3cdae65c8ec | [
"MIT"
] | 4 | 2018-06-03T02:11:46.000Z | 2021-08-18T19:55:15.000Z | sketches/filter04_posterize/filter04_posterize.pyde | kantel/processingpy | 74aae222e46f68d1c8f06307aaede3cdae65c8ec | [
"MIT"
] | null | null | null | sketches/filter04_posterize/filter04_posterize.pyde | kantel/processingpy | 74aae222e46f68d1c8f06307aaede3cdae65c8ec | [
"MIT"
] | 3 | 2019-12-23T19:12:51.000Z | 2021-04-30T14:00:31.000Z | def setup():
global img
size(640, 480)
frame.setTitle("Posterize interaktiv")
img = loadImage("abendrot.jpg")
def draw():
v = map(mouseX, 0, width, 2, 64)
image(img, 0, 0)
filter(POSTERIZE, v)
| 20.545455 | 42 | 0.59292 |
2940a11834ac2bb88f960e6a8586e7532516d754 | 2,209 | py | Python | machine&deep_learning/servers/data_collection_server/src/fetch_exchange_rate.py | mrtonnet/topics_in | 94a174bd32ab89aaba0f58380b97dd90cfda8233 | [
"MIT"
] | null | null | null | machine&deep_learning/servers/data_collection_server/src/fetch_exchange_rate.py | mrtonnet/topics_in | 94a174bd32ab89aaba0f58380b97dd90cfda8233 | [
"MIT"
] | null | null | null | machine&deep_learning/servers/data_collection_server/src/fetch_exchange_rate.py | mrtonnet/topics_in | 94a174bd32ab89aaba0f58380b97dd90cfda8233 | [
"MIT"
] | null | null | null | ##!/bin/python
"""
fetch_exchange_rate.py
crawls exchange rates from Naver Finance at "http://finance.naver.com/marketindex/".
* Rev.1: 2020-03-01 (Sun)
* Draft: 2020-02-28 (Fri)
"""
def get_url_from_command_line_arguments():
# Use the default URL or get an URL from command line argument
import sys
a... | 29.065789 | 165 | 0.628791 |
466593da30b86089807d03aa645d8fe5f497cc7f | 14,421 | py | Python | Packs/Looker/Integrations/Looker/Looker.py | diCagri/content | c532c50b213e6dddb8ae6a378d6d09198e08fc9f | [
"MIT"
] | 799 | 2016-08-02T06:43:14.000Z | 2022-03-31T11:10:11.000Z | Packs/Looker/Integrations/Looker/Looker.py | diCagri/content | c532c50b213e6dddb8ae6a378d6d09198e08fc9f | [
"MIT"
] | 9,317 | 2016-08-07T19:00:51.000Z | 2022-03-31T21:56:04.000Z | Packs/Looker/Integrations/Looker/Looker.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 '''
from typing import Dict
import requests
import traceback
import json
# Disable insecure warnings
requests.packages.urllib3.disable_warnings()
''' CONSTANTS '''
LAST_RUN_TIME_FORMAT = "%Y-%m-%dT%H:%M:%... | 33.151724 | 119 | 0.633382 |
3105fa3f52d76cf5938893f585d71a887dc673ac | 1,934 | py | Python | tests/integration/test_serving.py | pcrete/skil-python | 672a1aa9e8af020c960ab9ee280cbb6b194afc3f | [
"Apache-2.0"
] | 23 | 2018-09-19T13:34:27.000Z | 2022-02-14T09:49:35.000Z | tests/integration/test_serving.py | pcrete/skil-python | 672a1aa9e8af020c960ab9ee280cbb6b194afc3f | [
"Apache-2.0"
] | 33 | 2018-10-18T07:58:05.000Z | 2019-05-16T08:24:12.000Z | tests/integration/test_serving.py | pcrete/skil-python | 672a1aa9e8af020c960ab9ee280cbb6b194afc3f | [
"Apache-2.0"
] | 11 | 2018-10-21T18:58:57.000Z | 2022-02-14T09:49:36.000Z | import pytest
import skil
import os
import time
from keras.datasets import mnist
from keras.models import Model
from keras.layers import Dense, Dropout, Input
work_space = None # because number of workspaces is limited
_sk = None
def _get_sk():
global _sk
if _sk is None:
_sk = skil.Skil()
return... | 22.488372 | 60 | 0.645295 |
6f55fb7673c41e5ec98d9e6acbd087a3a05043a8 | 399 | py | Python | 30 Days of Code/30DoC-day-28/30DoC_day_28.py | nirobio/puzzles | fda8c84d8eefd93b40594636fb9b7f0fde02b014 | [
"MIT"
] | null | null | null | 30 Days of Code/30DoC-day-28/30DoC_day_28.py | nirobio/puzzles | fda8c84d8eefd93b40594636fb9b7f0fde02b014 | [
"MIT"
] | null | null | null | 30 Days of Code/30DoC-day-28/30DoC_day_28.py | nirobio/puzzles | fda8c84d8eefd93b40594636fb9b7f0fde02b014 | [
"MIT"
] | null | null | null | #!/bin/python3
import math
import os
import random
import re
import sys
GmailNames = []
n = int(input())
for i in range(n):
firstNameEmailID = str(input()).split(" ")
firstName = firstNameEmailID[0]
emailID = firstNameEmailID[1]
i += 1
if re.search(".+@gmail\.com$", emailID):
GmailNames... | 15.346154 | 46 | 0.654135 |
d2d8317429b516e8e8c7067c18333a0db9bbba7c | 1,273 | py | Python | 2-resources/_External-learning-resources/02-pyth/python-patterns-master/patterns/behavioral/template.py | eengineergz/Lambda | 1fe511f7ef550aed998b75c18a432abf6ab41c5f | [
"MIT"
] | null | null | null | 2-resources/_External-learning-resources/02-pyth/python-patterns-master/patterns/behavioral/template.py | eengineergz/Lambda | 1fe511f7ef550aed998b75c18a432abf6ab41c5f | [
"MIT"
] | null | null | null | 2-resources/_External-learning-resources/02-pyth/python-patterns-master/patterns/behavioral/template.py | eengineergz/Lambda | 1fe511f7ef550aed998b75c18a432abf6ab41c5f | [
"MIT"
] | 1 | 2021-11-05T07:48:26.000Z | 2021-11-05T07:48:26.000Z | """
An example of the Template pattern in Python
*TL;DR
Defines the skeleton of a base algorithm, deferring definition of exact
steps to subclasses.
*Examples in Python ecosystem:
Django class based views: https://docs.djangoproject.com/en/2.1/topics/class-based-views/
"""
def get_text():
return "plain-text"
... | 17.202703 | 89 | 0.639434 |
d2f1d3a24c3a8774e98ba9dcb8223bb2d512d5c5 | 5,828 | py | Python | beispielanwendungen/graphics/main.py | pbouda/pyqt-und-pyside-buch | a4ec10663ccc8aeda075c9a06b9707ded52382c8 | [
"CC-BY-4.0"
] | 5 | 2017-03-11T13:27:27.000Z | 2022-01-09T10:52:05.000Z | beispielanwendungen/graphics/main.py | pbouda/pyqt-und-pyside-buch | a4ec10663ccc8aeda075c9a06b9707ded52382c8 | [
"CC-BY-4.0"
] | 2 | 2021-02-14T10:59:59.000Z | 2021-10-30T21:46:32.000Z | beispielanwendungen/graphics/main.py | pbouda/pyqt-und-pyside-buch | a4ec10663ccc8aeda075c9a06b9707ded52382c8 | [
"CC-BY-4.0"
] | 1 | 2019-08-07T03:08:18.000Z | 2019-08-07T03:08:18.000Z | # -*- coding: utf-8 -*-
#!/usr/bin/env python
import sys, os
import re
from PyQt4 import QtCore, QtGui
def main(argv):
app = QtGui.QApplication(argv)
main = PhotoViewerWindow()
main.show()
sys.exit(app.exec_())
class PhotoViewer(QtGui.QDialog):
def __init__(self, parent, filepath):
QtGui.QDialog.... | 34.898204 | 77 | 0.61685 |
8297dffe23e7f0ce2b79e1ee08cb56b0d2525690 | 486 | py | Python | Packs/CommonScripts/Scripts/Base64Decode/Base64Decode.py | diCagri/content | c532c50b213e6dddb8ae6a378d6d09198e08fc9f | [
"MIT"
] | 799 | 2016-08-02T06:43:14.000Z | 2022-03-31T11:10:11.000Z | Packs/CommonScripts/Scripts/Base64Decode/Base64Decode.py | diCagri/content | c532c50b213e6dddb8ae6a378d6d09198e08fc9f | [
"MIT"
] | 9,317 | 2016-08-07T19:00:51.000Z | 2022-03-31T21:56:04.000Z | Packs/CommonScripts/Scripts/Base64Decode/Base64Decode.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 *
import base64
def decode(value):
decoded_bytes = base64.urlsafe_b64decode(str(value))
res = decoded_bytes.decode(errors='ignore')
outputs = {
"Base64":
{
"originalValue": value,
"decoded": ... | 19.44 | 56 | 0.600823 |
b510d692c96cb94d551f2dae308a2aa77dc81afc | 1,563 | py | Python | model/all_test.py | Empythy/geometry-learning | 5300d421ef848c2748a2ba41ced5c6e2fba93200 | [
"MIT"
] | 21 | 2018-10-09T08:15:29.000Z | 2022-03-16T08:23:08.000Z | model/all_test.py | reinvantveer/Topology-Learning | 5300d421ef848c2748a2ba41ced5c6e2fba93200 | [
"MIT"
] | 31 | 2017-09-20T13:30:37.000Z | 2018-03-01T13:24:58.000Z | model/all_test.py | reinvantveer/Topology-Learning | 5300d421ef848c2748a2ba41ced5c6e2fba93200 | [
"MIT"
] | 7 | 2018-11-29T11:39:02.000Z | 2022-01-12T07:10:26.000Z | """
Final test script for evaluation statistics
"""
import os
import sys
from sklearn.model_selection import ParameterGrid
from topoml_util.slack_send import notify
notify('ALL TEST SCRIPT RUNNING FINAL TESTS', 'STARTING')
SCRIPT_VERSION = '1.0.0'
N_TIMES = 1
HYPERPARAMS = { # All using standard hyperparameters
... | 28.944444 | 106 | 0.639795 |
96a42b8094e3afd679db23d8c538c7e740f186c4 | 999 | py | Python | LinkS-master/links.py | Zusyaku/Termux-And-Lali-Linux-V2 | b1a1b0841d22d4bf2cc7932b72716d55f070871e | [
"Apache-2.0"
] | 2 | 2021-11-17T03:35:03.000Z | 2021-12-08T06:00:31.000Z | LinkS-master/links.py | Zusyaku/Termux-And-Lali-Linux-V2 | b1a1b0841d22d4bf2cc7932b72716d55f070871e | [
"Apache-2.0"
] | null | null | null | LinkS-master/links.py | Zusyaku/Termux-And-Lali-Linux-V2 | b1a1b0841d22d4bf2cc7932b72716d55f070871e | [
"Apache-2.0"
] | 2 | 2021-11-05T18:07:48.000Z | 2022-02-24T21:25:07.000Z | #code h4cklinker
import json,requests,re,sys
try:
print("""
█ ▄█ ▄ █ █▀ ▄▄▄▄▄
█ ██ █ █▄█ █ ▀▄
█ ██ ██ █ █▀▄ ▄ ▀▀▀▀▄
███▄ ▐█ █ █ █ █ █ ▀▄▄▄▄▀
▀ ▐ █ █ █ █
v.01 █ ██ ▀ SEO ?-
-----------------Tegal1337
""")
if (sys.version_info.major =... | 29.382353 | 148 | 0.398398 |
96a830edea9fadd0414729168d48992ab99dbf0a | 4,100 | py | Python | src/flocker/blueprints/mvg-frame/mvg.py | Muxelmann/home-projects | 85bd06873174b9c5c6276160988c19b460370db8 | [
"MIT"
] | null | null | null | src/flocker/blueprints/mvg-frame/mvg.py | Muxelmann/home-projects | 85bd06873174b9c5c6276160988c19b460370db8 | [
"MIT"
] | null | null | null | src/flocker/blueprints/mvg-frame/mvg.py | Muxelmann/home-projects | 85bd06873174b9c5c6276160988c19b460370db8 | [
"MIT"
] | null | null | null | import requests
import time
class ApiError(Exception):
def __init__(self, code, reason):
self.code = code
self.reason = reason
def __str__(self):
out = "Got status code {}".format(self.code)
if self.reason:
out += " with response {}".format(self.reason)
retu... | 35.964912 | 118 | 0.594634 |
737338057e44561e158d85abb7ecd4ca55831e37 | 14,435 | py | Python | KHM_Friedrichshagen_500x500_delta-x_10m_mf2005_obs_points_C0_MT3D_Szenarios_manuell.py | KWB-R/geosalz.mf | 0393744effd521ee7a90969ba9b2ce04276f7c00 | [
"MIT"
] | null | null | null | KHM_Friedrichshagen_500x500_delta-x_10m_mf2005_obs_points_C0_MT3D_Szenarios_manuell.py | KWB-R/geosalz.mf | 0393744effd521ee7a90969ba9b2ce04276f7c00 | [
"MIT"
] | null | null | null | KHM_Friedrichshagen_500x500_delta-x_10m_mf2005_obs_points_C0_MT3D_Szenarios_manuell.py | KWB-R/geosalz.mf | 0393744effd521ee7a90969ba9b2ce04276f7c00 | [
"MIT"
] | null | null | null | import os
import sys
import numpy as np
import matplotlib.pyplot as plt
import flopy
import flopy.utils.binaryfile as bf
import pandas as pd
sys.path.append('modules')
from get_layerbudget import get_layerbudget
sys.path.append(os.path.join("..", "common"))
### Download latest Modflow 2005 from
### https://water.usgs... | 28.640873 | 196 | 0.641427 |
fb6a994cd22b8d5f1559220e7396620aea493f61 | 4,918 | py | Python | exercises/networking_selfpaced/networking-workshop/collections/ansible_collections/community/general/tests/unit/module_utils/network/nos/test_nos.py | tr3ck3r/linklight | 5060f624c235ecf46cb62cefcc6bddc6bf8ca3e7 | [
"MIT"
] | null | null | null | exercises/networking_selfpaced/networking-workshop/collections/ansible_collections/community/general/tests/unit/module_utils/network/nos/test_nos.py | tr3ck3r/linklight | 5060f624c235ecf46cb62cefcc6bddc6bf8ca3e7 | [
"MIT"
] | null | null | null | exercises/networking_selfpaced/networking-workshop/collections/ansible_collections/community/general/tests/unit/module_utils/network/nos/test_nos.py | tr3ck3r/linklight | 5060f624c235ecf46cb62cefcc6bddc6bf8ca3e7 | [
"MIT"
] | null | null | null | #
# (c) 2018 Extreme Networks Inc.
#
# This file is part of Ansible
#
# Ansible 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 later version.
#
# Ans... | 33.006711 | 99 | 0.655958 |
f780431e4f687a0a1ee0bce8ef8565f4ebe3109c | 5,092 | py | Python | test/test_npu/test_conv1d.py | Ascend/pytorch | 39849cf72dafe8d2fb68bd1679d8fd54ad60fcfc | [
"BSD-3-Clause"
] | 1 | 2021-12-02T03:07:35.000Z | 2021-12-02T03:07:35.000Z | test/test_npu/test_conv1d.py | Ascend/pytorch | 39849cf72dafe8d2fb68bd1679d8fd54ad60fcfc | [
"BSD-3-Clause"
] | 1 | 2021-11-12T07:23:03.000Z | 2021-11-12T08:28:13.000Z | test/test_npu/test_conv1d.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... | 55.347826 | 128 | 0.592105 |
e3c17ca86b511f6023c2dc271df66b09a6f372bb | 873 | py | Python | weibo/test/testMain.py | haiboz/weiboSpider | 517cae2ef3e7bccd9e1d328a40965406707f5362 | [
"Apache-2.0"
] | null | null | null | weibo/test/testMain.py | haiboz/weiboSpider | 517cae2ef3e7bccd9e1d328a40965406707f5362 | [
"Apache-2.0"
] | null | null | null | weibo/test/testMain.py | haiboz/weiboSpider | 517cae2ef3e7bccd9e1d328a40965406707f5362 | [
"Apache-2.0"
] | null | null | null | #encoding:utf8
'''
Created on 2016年4月11日
@author: wb-zhaohaibo
'''
from weibo.login.weiboLogin import WeiboLogin
class TestMain(object):
def __init__(self):
# self.weiboLogin = weiboLogin.WeiboLogin('1069757861@qq.com', 's123456',False)
pass
def craw(self):
try:
... | 26.454545 | 88 | 0.580756 |
58a74cdcaffad62db9d44235c5facacef2fd4623 | 2,873 | py | Python | src/onegov/swissvotes/models/region.py | politbuero-kampagnen/onegov-cloud | 20148bf321b71f617b64376fe7249b2b9b9c4aa9 | [
"MIT"
] | null | null | null | src/onegov/swissvotes/models/region.py | politbuero-kampagnen/onegov-cloud | 20148bf321b71f617b64376fe7249b2b9b9c4aa9 | [
"MIT"
] | null | null | null | src/onegov/swissvotes/models/region.py | politbuero-kampagnen/onegov-cloud | 20148bf321b71f617b64376fe7249b2b9b9c4aa9 | [
"MIT"
] | null | null | null | from onegov.swissvotes import _
class Region(object):
""" A helper class to translate geographical cantons.
Each canton consists of an abbreviation and a label, and might be rendered
as a html span.
"""
def __init__(self, name):
self.name = name
def __eq__(self, other):
ret... | 28.445545 | 78 | 0.386356 |
49ed2a7523782f1d476861c47c653710802183ba | 6,495 | py | Python | Packs/ComputerVisionEngine/Integrations/ComputerVisionEngine/ComputerVisionEngine.py | diCagri/content | c532c50b213e6dddb8ae6a378d6d09198e08fc9f | [
"MIT"
] | 799 | 2016-08-02T06:43:14.000Z | 2022-03-31T11:10:11.000Z | Packs/ComputerVisionEngine/Integrations/ComputerVisionEngine/ComputerVisionEngine.py | diCagri/content | c532c50b213e6dddb8ae6a378d6d09198e08fc9f | [
"MIT"
] | 9,317 | 2016-08-07T19:00:51.000Z | 2022-03-31T21:56:04.000Z | Packs/ComputerVisionEngine/Integrations/ComputerVisionEngine/ComputerVisionEngine.py | diCagri/content | c532c50b213e6dddb8ae6a378d6d09198e08fc9f | [
"MIT"
] | 1,297 | 2016-08-04T13:59:00.000Z | 2022-03-31T23:43:06.000Z | import os
import cv2
import demistomock as demisto
import numpy as np
from CommonServerPython import * # noqa: F401
# The command demisto.command() holds the command sent from the user.
if demisto.command() == 'test-module':
demisto.results('ok')
sys.exit(0)
if demisto.command() == 'yolo-coco-process-image'... | 42.175325 | 99 | 0.603233 |
12968a81faca9855bc22715aead74effaca53124 | 7,040 | py | Python | src/onegov/org/views/payment.py | politbuero-kampagnen/onegov-cloud | 20148bf321b71f617b64376fe7249b2b9b9c4aa9 | [
"MIT"
] | null | null | null | src/onegov/org/views/payment.py | politbuero-kampagnen/onegov-cloud | 20148bf321b71f617b64376fe7249b2b9b9c4aa9 | [
"MIT"
] | null | null | null | src/onegov/org/views/payment.py | politbuero-kampagnen/onegov-cloud | 20148bf321b71f617b64376fe7249b2b9b9c4aa9 | [
"MIT"
] | null | null | null | import decimal
from collections import OrderedDict
from decimal import Decimal
from functools import partial
from onegov.core.security import Private
from onegov.form import merge_forms
from onegov.org import OrgApp, _
from onegov.org.forms import DateRangeForm, ExportForm
from onegov.org.layout import PaymentCollectio... | 28.852459 | 79 | 0.660938 |
422fed91111d2f7becbf1c05699055d9cb22c36b | 2,174 | py | Python | LINE/2021/web/babyweb/public/src/internal.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/internal.py | ruhan-islam/ctf-archives | 8c2bf6a608c821314d1a1cfaa05a6cccef8e3103 | [
"MIT"
] | null | null | null | LINE/2021/web/babyweb/public/src/internal.py | ruhan-islam/ctf-archives | 8c2bf6a608c821314d1a1cfaa05a6cccef8e3103 | [
"MIT"
] | 1 | 2021-12-19T11:06:24.000Z | 2021-12-19T11:06:24.000Z | import functools
import requests
from flask import (
Blueprint, flash, g, redirect, render_template, request, session, url_for, jsonify
)
from utils import *
from config import cfg
internal_bp = Blueprint('internal', __name__, url_prefix='/internal')
@internal_bp.route("/auth", methods=["POST"])
def auth():
... | 31.057143 | 128 | 0.5046 |
42415f3b9309fe50ece445121122966779759fb7 | 2,891 | py | Python | utils/roles.py | Flurry58/Catgalatic | b47396dd479c9d16d5bf0ea4b283b461a9d210e5 | [
"MIT"
] | null | null | null | utils/roles.py | Flurry58/Catgalatic | b47396dd479c9d16d5bf0ea4b283b461a9d210e5 | [
"MIT"
] | null | null | null | utils/roles.py | Flurry58/Catgalatic | b47396dd479c9d16d5bf0ea4b283b461a9d210e5 | [
"MIT"
] | null | null | null | import discord
from utils.config import ROLES, INACCESSIBLE_ROLES
from discord.utils import get
from utils.emojis import get_emoji_from_reaction
def get_role_from_reaction(reaction):
""" Return role paired with reaction """
emoji = get_emoji_from_reaction(reaction);
for subgroup in ROLES.values():
... | 29.20202 | 116 | 0.647873 |
c45c8769789acca7bfb7d64a3c45adc6a73a7ac1 | 3,169 | py | Python | projekte_ss2017/Mondrian2.0_Christin/Mondrian.py | krother/python_abv_zedat | 1e2e1fe16da6612c470f06f519cd053c567e0611 | [
"MIT"
] | 1 | 2019-03-04T20:09:26.000Z | 2019-03-04T20:09:26.000Z | projekte_ss2017/Mondrian2.0_Christin/Mondrian.py | krother/python_abv_zedat | 1e2e1fe16da6612c470f06f519cd053c567e0611 | [
"MIT"
] | null | null | null | projekte_ss2017/Mondrian2.0_Christin/Mondrian.py | krother/python_abv_zedat | 1e2e1fe16da6612c470f06f519cd053c567e0611 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
"""
@author: Christin Jacobsen
Der Programmcode ist unter den Bedingungen der MIT-Lizenz nutzbar.
"""
import numpy as np
import PIL.Image as Image
from scipy.signal import convolve2d as conv
from random import randint
directory = "blume2.jpg"
params = {'threshold': ... | 29.616822 | 88 | 0.533291 |
679fffa84274ff0390d48dd1c1279cf1175cb865 | 476 | py | Python | exercises/fr/exc_04_11_02.py | Jette16/spacy-course | 32df0c8f6192de6c9daba89740a28c0537e4d6a0 | [
"MIT"
] | 2,085 | 2019-04-17T13:10:40.000Z | 2022-03-30T21:51:46.000Z | exercises/fr/exc_04_11_02.py | Jette16/spacy-course | 32df0c8f6192de6c9daba89740a28c0537e4d6a0 | [
"MIT"
] | 79 | 2019-04-18T14:42:55.000Z | 2022-03-07T08:15:43.000Z | exercises/fr/exc_04_11_02.py | Jette16/spacy-course | 32df0c8f6192de6c9daba89740a28c0537e4d6a0 | [
"MIT"
] | 361 | 2019-04-17T13:34:32.000Z | 2022-03-28T04:42:45.000Z | TRAINING_DATA = [
(
"Reddit noue un partenariat avec Patreon pour aider les créateurs à former des communautés",
{"entities": [(0, 6, "WEBSITE"), (32, 39, "WEBSITE")]},
),
("PewDiePie explose le record de YouTube", {"entities": [____, (31, 38, "WEBSITE")]}),
(
"Le fondateur de Re... | 36.615385 | 100 | 0.588235 |
67fb170e9538f539b5c8c3fa21a1219c85032f23 | 502 | py | Python | PPO_Unity/UnityEnvtest.py | xixiha5230/RL | cc957a4231263074b8cf7fad6ba276f4b3899670 | [
"MIT"
] | null | null | null | PPO_Unity/UnityEnvtest.py | xixiha5230/RL | cc957a4231263074b8cf7fad6ba276f4b3899670 | [
"MIT"
] | null | null | null | PPO_Unity/UnityEnvtest.py | xixiha5230/RL | cc957a4231263074b8cf7fad6ba276f4b3899670 | [
"MIT"
] | null | null | null | from gym import Space
from mlagents_envs.environment import UnityEnvironment
from gym_unity.envs import UnityToGymWrapper
def main():
unity_env = UnityEnvironment("UnityEnv/CarDrive.x86_64")
env = UnityToGymWrapper(unity_env, uint8_visual=True)
env.reset()
while True:
action = env.action_space... | 22.818182 | 60 | 0.659363 |
db1958764ef0ce09c7a067c2aa8fc849e3623463 | 1,569 | py | Python | packages/watchmen-auth/src/watchmen_auth/authentication.py | Indexical-Metrics-Measure-Advisory/watchmen | c54ec54d9f91034a38e51fd339ba66453d2c7a6d | [
"MIT"
] | null | null | null | packages/watchmen-auth/src/watchmen_auth/authentication.py | Indexical-Metrics-Measure-Advisory/watchmen | c54ec54d9f91034a38e51fd339ba66453d2c7a6d | [
"MIT"
] | null | null | null | packages/watchmen-auth/src/watchmen_auth/authentication.py | Indexical-Metrics-Measure-Advisory/watchmen | c54ec54d9f91034a38e51fd339ba66453d2c7a6d | [
"MIT"
] | null | null | null | from __future__ import annotations
from abc import abstractmethod
from enum import Enum
from logging import getLogger
from typing import List, Optional, Tuple
from watchmen_model.admin import User
from watchmen_utilities import ArrayHelper
logger = getLogger(__name__)
class AuthenticationScheme(str, Enum):
JWT = ... | 27.051724 | 88 | 0.771829 |
c03608c959b0ef519fd3eb201debc6318379b101 | 2,085 | py | Python | crawler/main.py | macroxu/FundAnalysis | bc94f271fae5df6971aae37b873b97973d25b1c8 | [
"Apache-2.0"
] | null | null | null | crawler/main.py | macroxu/FundAnalysis | bc94f271fae5df6971aae37b873b97973d25b1c8 | [
"Apache-2.0"
] | null | null | null | crawler/main.py | macroxu/FundAnalysis | bc94f271fae5df6971aae37b873b97973d25b1c8 | [
"Apache-2.0"
] | null | null | null | # coding=UTF-8
print('crawler begining!')
fundCompanyBaseUrl='http://fund.eastmoney.com'
from urllib import request
from bs4 import BeautifulSoup
from bs4.element import Tag
import logging
from FundCompanyListCrawler import *
from FundCompanyCrawler import *
import logging
import os
from logging import handlers
... | 22.180851 | 73 | 0.764988 |
fbfdb54a2b02419b4bad209ab53afa0fad457857 | 1,020 | py | Python | spo/spo/report/alle_mandate_in_arbeit/alle_mandate_in_arbeit.py | libracore/spo | c6617a4624d683e27ee3fde745313c30504f3fd1 | [
"MIT"
] | null | null | null | spo/spo/report/alle_mandate_in_arbeit/alle_mandate_in_arbeit.py | libracore/spo | c6617a4624d683e27ee3fde745313c30504f3fd1 | [
"MIT"
] | 6 | 2019-08-23T18:36:26.000Z | 2019-11-12T13:12:12.000Z | spo/spo/report/alle_mandate_in_arbeit/alle_mandate_in_arbeit.py | libracore/spo | efff6da53a776c4483f06d9ef1acc8a7aa96b28e | [
"MIT"
] | 1 | 2021-08-14T22:22:43.000Z | 2021-08-14T22:22:43.000Z | # Copyright (c) 2013, libracore and contributors
# For license information, please see license.txt
from __future__ import unicode_literals
import frappe
from frappe import _
def execute(filters=None):
columns, data = [], []
columns = [
{"label": _("Mandat"), "fieldname": "Mandat", "fieldtype": "Data", "width": 15... | 37.777778 | 95 | 0.619608 |
97eeafef0e849baee178986941c72d302e6dbb1f | 664 | py | Python | year_3/databases_sem2/lab1/lab1/spiders/football_spider.py | honchardev/KPI | f8425681857c02a67127ffb05c0af0563a8473e1 | [
"MIT"
] | null | null | null | year_3/databases_sem2/lab1/lab1/spiders/football_spider.py | honchardev/KPI | f8425681857c02a67127ffb05c0af0563a8473e1 | [
"MIT"
] | 21 | 2020-03-24T16:26:04.000Z | 2022-02-18T15:56:16.000Z | year_3/databases_sem2/lab1/lab1/spiders/football_spider.py | honchardev/KPI | f8425681857c02a67127ffb05c0af0563a8473e1 | [
"MIT"
] | null | null | null | import scrapy
class FootballSpider(scrapy.spiders.CrawlSpider):
name = "football"
start_urls = [
"http://football.ua/newsarc/",
"http://football.ua/newsarc/page2.html"
]
def parse(self, response):
for text in response.xpath("//article[@class='author-article']"):
yi... | 31.619048 | 98 | 0.551205 |
451bf672b8640cd55221af30e1e25b655da3c9b7 | 714 | py | Python | Python/Books/Learning-Programming-with-Python.Tamim-Shahriar-Subeen/chapter-008/ph-8.18-exer.1-print.py | shihab4t/Books-Code | b637b6b2ad42e11faf87d29047311160fe3b2490 | [
"Unlicense"
] | null | null | null | Python/Books/Learning-Programming-with-Python.Tamim-Shahriar-Subeen/chapter-008/ph-8.18-exer.1-print.py | shihab4t/Books-Code | b637b6b2ad42e11faf87d29047311160fe3b2490 | [
"Unlicense"
] | null | null | null | Python/Books/Learning-Programming-with-Python.Tamim-Shahriar-Subeen/chapter-008/ph-8.18-exer.1-print.py | shihab4t/Books-Code | b637b6b2ad42e11faf87d29047311160fe3b2490 | [
"Unlicense"
] | null | null | null | full_string = input("Enter a string with capitall latter, number, more: ")
length = len(full_string)
string = [" "] * length
for i in full_string:
if i >= "A" and i <= "Z":
#string1 += i
string[0] += i
elif i >= "a" and i <= "z":
# string2 += i
string[1] += i
elif i >= "1" ... | 19.297297 | 74 | 0.536415 |
451cc6cfb80bec2659873e6a2e9e7afd92de7069 | 671 | py | Python | euler-45.py | TFabijo/euler2 | 7da205ce02ae3bd12754f99c1fe69fbf20b1e3d0 | [
"MIT"
] | null | null | null | euler-45.py | TFabijo/euler2 | 7da205ce02ae3bd12754f99c1fe69fbf20b1e3d0 | [
"MIT"
] | null | null | null | euler-45.py | TFabijo/euler2 | 7da205ce02ae3bd12754f99c1fe69fbf20b1e3d0 | [
"MIT"
] | null | null | null | # upostevamo da je pri istem n-ju trikotno stevilo najmajse drugo je pentagonalno in tretje je heksagonalno
def Euler_45():
t_i = 285
p_i = 165
h_i = 143
trikotna = []
petagonalna = []
heksagonalna = []
d = True
while d == True:
t_i += 1
p_i += 1
... | 23.964286 | 108 | 0.490313 |
7a0cadae8f2ccf4a6f70270fb5c68306a5258606 | 1,002 | py | Python | 7-assets/past-student-repos/LambdaSchool-master/m6/61c1/src/oop/oop2.py | eengineergz/Lambda | 1fe511f7ef550aed998b75c18a432abf6ab41c5f | [
"MIT"
] | null | null | null | 7-assets/past-student-repos/LambdaSchool-master/m6/61c1/src/oop/oop2.py | eengineergz/Lambda | 1fe511f7ef550aed998b75c18a432abf6ab41c5f | [
"MIT"
] | null | null | null | 7-assets/past-student-repos/LambdaSchool-master/m6/61c1/src/oop/oop2.py | eengineergz/Lambda | 1fe511f7ef550aed998b75c18a432abf6ab41c5f | [
"MIT"
] | null | null | null | class GroundVehicle():
# Also change it so the num_wheels defaults to 4 if not specified when the
# object is constructed.
def __init__(self, num_wheels=4):
self.num_wheels = num_wheels
# To the GroundVehicle class, add method drive() that returns "vroooom".
def drive(self):
return... | 28.628571 | 88 | 0.681637 |
3617e916c38fb365d337a6735c076e3e8e7a1917 | 2,910 | py | Python | Metadataextraction/test_similar.py | corneliazy/Geosoftware2 | 8604c79c58a61b84c602f16b5f1e74e30dfcbd0e | [
"MIT"
] | null | null | null | Metadataextraction/test_similar.py | corneliazy/Geosoftware2 | 8604c79c58a61b84c602f16b5f1e74e30dfcbd0e | [
"MIT"
] | 47 | 2018-11-13T13:55:01.000Z | 2019-09-16T13:38:11.000Z | Metadataextraction/test_similar.py | corneliazy/Geosoftware2 | 8604c79c58a61b84c602f16b5f1e74e30dfcbd0e | [
"MIT"
] | 4 | 2018-11-27T12:36:51.000Z | 2020-10-14T18:07:04.000Z | import similar # used to invoke the function for the similarity score
import os # used to get the location of the testdata
"""
These tests check if the calucated similar score from two Bouding Boxes
is equal to our manually calculated score
"""
#Germany - Poland
def test_germany_poand():
bbox1 = [5.8663155, 47.270... | 30 | 73 | 0.689347 |
3d067c40634e0a50cb5a8775f92492fbc0e11d26 | 682 | py | Python | test/test_datatypes.py | ekut-es/autojail | bc16e40e6df55c0a28a3059715851ffa59b14ba8 | [
"MIT"
] | 6 | 2020-08-12T08:16:15.000Z | 2022-03-05T02:25:53.000Z | test/test_datatypes.py | ekut-es/autojail | bc16e40e6df55c0a28a3059715851ffa59b14ba8 | [
"MIT"
] | 1 | 2021-03-30T10:34:51.000Z | 2021-06-09T11:24:00.000Z | test/test_datatypes.py | ekut-es/autojail | bc16e40e6df55c0a28a3059715851ffa59b14ba8 | [
"MIT"
] | 1 | 2021-11-21T09:30:58.000Z | 2021-11-21T09:30:58.000Z | from pydantic import BaseModel
from autojail.model.datatypes import IntegerList
def test_integer_list_constructor():
my_list = IntegerList([3])
assert 3 in my_list
class ModelForTest(BaseModel):
lst: IntegerList
def test_integer_list_model():
m1 = ModelForTest(lst="3")
m2 = ModelForTest(lst=... | 18.432432 | 48 | 0.675953 |
3d248b071eebde50f702b06e259449b9c85116d3 | 85 | py | Python | leetcode/302-Smallest-Rectangle-Enclosing-Black-Pixels/test_MinRectEnclosingBlackPixels.py.py | cc13ny/all-in | bc0b01e44e121ea68724da16f25f7e24386c53de | [
"MIT"
] | 1 | 2016-04-07T15:08:53.000Z | 2016-04-07T15:08:53.000Z | leetcode/302-Smallest-Rectangle-Enclosing-Black-Pixels/test_MinRectEnclosingBlackPixels.py.py | cc13ny/all-in | bc0b01e44e121ea68724da16f25f7e24386c53de | [
"MIT"
] | 1 | 2016-02-09T06:00:07.000Z | 2016-02-09T07:20:13.000Z | leetcode/302-Smallest-Rectangle-Enclosing-Black-Pixels/test_MinRectEnclosingBlackPixels.py.py | cc13ny/all-in | bc0b01e44e121ea68724da16f25f7e24386c53de | [
"MIT"
] | 2 | 2019-06-27T09:07:26.000Z | 2019-07-01T04:40:13.000Z | sl = Solution()
img = ["0010", "0110", "0100"]
img = []
print
sl.minArea(img, 0, 2)
| 12.142857 | 30 | 0.552941 |
a172f38bb3a1641dedd9fa9e6a662ddcd0fb208f | 216 | py | Python | api/wsgi/src/devices/serializers.py | easyCZ/SLIP-A-2015 | ad386df9c438d93ec89f68c63d3deda12d27d1ed | [
"MIT"
] | 2 | 2020-06-08T19:17:10.000Z | 2020-06-08T20:45:07.000Z | api/wsgi/src/devices/serializers.py | easyCZ/SLIP-A-2015 | ad386df9c438d93ec89f68c63d3deda12d27d1ed | [
"MIT"
] | 14 | 2015-10-07T09:31:50.000Z | 2022-02-23T07:34:10.000Z | api/wsgi/src/devices/serializers.py | easyCZ/SLIP-A-2015 | ad386df9c438d93ec89f68c63d3deda12d27d1ed | [
"MIT"
] | null | null | null | from devices.models import Device
from rest_framework import serializers
class DeviceSerializer(serializers.ModelSerializer):
class Meta:
model = Device
# fields = ('id', 'owner', 'live_url', ) | 24 | 52 | 0.703704 |
4934183bc3636ab540f05f20705b2221031bac7a | 3,656 | py | Python | egs/whamr/TasNet/model.py | groadabike/asteroid | 276d98346ab791d904fbfe79b9b8e374392dd128 | [
"MIT"
] | 1 | 2020-12-18T02:42:23.000Z | 2020-12-18T02:42:23.000Z | egs/whamr/TasNet/model.py | groadabike/asteroid | 276d98346ab791d904fbfe79b9b8e374392dd128 | [
"MIT"
] | null | null | null | egs/whamr/TasNet/model.py | groadabike/asteroid | 276d98346ab791d904fbfe79b9b8e374392dd128 | [
"MIT"
] | null | null | null | import json
import os
import torch
from torch import nn
from asteroid import torch_utils
from asteroid import torch_utils
from asteroid.filterbanks import Encoder, Decoder, FreeFB
from asteroid.masknn.blocks import SingleRNN
from asteroid.engine.optimizers import make_optimizer
from asteroid.masknn.norms import GlobLN... | 34.490566 | 79 | 0.650985 |
623b88fd8467aa97cd9660de75f56f01381442c8 | 447 | py | Python | exercises/es/test_02_09.py | tuanducdesign/spacy-course | f8d092c5fa2997fccb3f367d174dce8667932b3d | [
"MIT"
] | 2 | 2020-07-07T01:46:37.000Z | 2021-04-20T03:19:43.000Z | exercises/es/test_02_09.py | tuanducdesign/spacy-course | f8d092c5fa2997fccb3f367d174dce8667932b3d | [
"MIT"
] | null | null | null | exercises/es/test_02_09.py | tuanducdesign/spacy-course | f8d092c5fa2997fccb3f367d174dce8667932b3d | [
"MIT"
] | null | null | null | def test():
assert (
'spacy.load("es_core_news_md")' in __solution__
), "¿Estás cargando el modelo mediano correctamente?"
assert "doc[4].vector" in __solution__, "¿Estás obteniendo el vector correcto?"
__msg__.good(
"¡Bien hecho! En el próximo ejercicio usarás spaCy para predecir "
... | 40.636364 | 84 | 0.673378 |
628373a9109bdc385e3a6dc68be060c1c379b33c | 2,761 | py | Python | Packs/HostIo/Integrations/HostIo/HostIo_test.py | diCagri/content | c532c50b213e6dddb8ae6a378d6d09198e08fc9f | [
"MIT"
] | 799 | 2016-08-02T06:43:14.000Z | 2022-03-31T11:10:11.000Z | Packs/HostIo/Integrations/HostIo/HostIo_test.py | diCagri/content | c532c50b213e6dddb8ae6a378d6d09198e08fc9f | [
"MIT"
] | 9,317 | 2016-08-07T19:00:51.000Z | 2022-03-31T21:56:04.000Z | Packs/HostIo/Integrations/HostIo/HostIo_test.py | diCagri/content | c532c50b213e6dddb8ae6a378d6d09198e08fc9f | [
"MIT"
] | 1,297 | 2016-08-04T13:59:00.000Z | 2022-03-31T23:43:06.000Z | """Base Integration for Cortex XSOAR - Unit Tests file"""
import json
import io
def util_load_json(path):
with io.open(path, mode='r', encoding='utf-8') as f:
return json.loads(f.read())
def test_domain(requests_mock):
"""Tests the domain reputation command function.
Configures requests_mock i... | 29.37234 | 88 | 0.666063 |
658172f85f465fad9625862f6b3fca83b54bda37 | 1,964 | py | Python | example/Resnet-annalyze.py | JasperMorrison/PytorchToCaffe | 04f0066cdc8a9da92591d7361907c3ea53271707 | [
"MIT"
] | 794 | 2018-09-06T07:38:41.000Z | 2022-03-16T06:30:37.000Z | example/Resnet-annalyze.py | JasperMorrison/PytorchToCaffe | 04f0066cdc8a9da92591d7361907c3ea53271707 | [
"MIT"
] | 111 | 2018-12-04T11:18:27.000Z | 2022-03-31T07:39:11.000Z | example/Resnet-annalyze.py | JasperMorrison/PytorchToCaffe | 04f0066cdc8a9da92591d7361907c3ea53271707 | [
"MIT"
] | 221 | 2018-11-22T08:11:03.000Z | 2022-03-16T07:11:43.000Z | # coding=utf-8
from __future__ import absolute_import
import sys
sys.path.insert(0,'.')
import torch
import argparse
import sys,os
from analysis.PytorchA import analyse
from analysis.utils import save_csv
from torch.autograd import Variable
import torch.nn as nn
import sys
sys.path.insert(0,'.')
from model import mgn
... | 38.509804 | 148 | 0.737271 |
658f842ce9324a0fbce40556d2e9a11c82b6a73b | 1,310 | py | Python | exercises/en/test_04_03.py | Jette16/spacy-course | 32df0c8f6192de6c9daba89740a28c0537e4d6a0 | [
"MIT"
] | 2,085 | 2019-04-17T13:10:40.000Z | 2022-03-30T21:51:46.000Z | exercises/en/test_04_03.py | Jette16/spacy-course | 32df0c8f6192de6c9daba89740a28c0537e4d6a0 | [
"MIT"
] | 79 | 2019-04-18T14:42:55.000Z | 2022-03-07T08:15:43.000Z | exercises/en/test_04_03.py | Jette16/spacy-course | 32df0c8f6192de6c9daba89740a28c0537e4d6a0 | [
"MIT"
] | 361 | 2019-04-17T13:34:32.000Z | 2022-03-28T04:42:45.000Z | def test():
assert len(pattern1) == 2, "pattern1 should describe two tokens."
assert len(pattern2) == 2, "pattern2 should describe two tokens."
assert (
len(pattern1[0]) == 1
), "The first token of pattern1 only needs one attribute."
assert any(
pattern1[0].get(l) == "iphone" for l i... | 39.69697 | 80 | 0.612214 |
b8235e2e146f2d6a12af95b2a329bf0c5814bc9c | 7,385 | py | Python | official/nlp/bert/infer/utils/data_processor_seq.py | leelige/mindspore | 5199e05ba3888963473f2b07da3f7bca5b9ef6dc | [
"Apache-2.0"
] | 77 | 2021-10-15T08:32:37.000Z | 2022-03-30T13:09:11.000Z | official/nlp/bert/infer/utils/data_processor_seq.py | leelige/mindspore | 5199e05ba3888963473f2b07da3f7bca5b9ef6dc | [
"Apache-2.0"
] | 3 | 2021-10-30T14:44:57.000Z | 2022-02-14T06:57:57.000Z | official/nlp/bert/infer/utils/data_processor_seq.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... | 34.189815 | 113 | 0.614895 |
b851d186cb7ae9b5ee69ed2867220ebce5c0413b | 1,476 | py | Python | hints.py | theFox6/HPIMysterybot | 187341ff8fca4a683cc052c813f9cf1fe71117db | [
"MIT"
] | null | null | null | hints.py | theFox6/HPIMysterybot | 187341ff8fca4a683cc052c813f9cf1fe71117db | [
"MIT"
] | null | null | null | hints.py | theFox6/HPIMysterybot | 187341ff8fca4a683cc052c813f9cf1fe71117db | [
"MIT"
] | null | null | null | from telegram import ReplyKeyboardMarkup, ReplyKeyboardRemove, InlineKeyboardMarkup, InlineKeyboardButton, InlineQueryResultArticle
from telegram.ext import CallbackQueryHandler
from threading import Timer
import logging,users
def give_hint(bot, chat_id, hint_text, offer_text):
reply_markup = InlineKeyboardMarkup(... | 37.846154 | 131 | 0.71748 |
a2f4129336d3b28c2424d7d9085b8b38046b54ba | 11,260 | py | Python | src/tools/data/hdfs_export/spark_examples/WireFrame.py | visit-dav/vis | c08bc6e538ecd7d30ddc6399ec3022b9e062127e | [
"BSD-3-Clause"
] | 226 | 2018-12-29T01:13:49.000Z | 2022-03-30T19:16:31.000Z | src/tools/data/hdfs_export/spark_examples/WireFrame.py | visit-dav/vis | c08bc6e538ecd7d30ddc6399ec3022b9e062127e | [
"BSD-3-Clause"
] | 5,100 | 2019-01-14T18:19:25.000Z | 2022-03-31T23:08:36.000Z | src/tools/data/hdfs_export/spark_examples/WireFrame.py | visit-dav/vis | c08bc6e538ecd7d30ddc6399ec3022b9e062127e | [
"BSD-3-Clause"
] | 84 | 2019-01-24T17:41:50.000Z | 2022-03-10T10:01:46.000Z | import sys
import os
from pyspark import SparkContext
from pyspark import SparkConf
#
# Think these all need to be broadcast vars to work. Maybe
# put in a dict and broadcast
#
VTK_EMPTY_CELL = 0
VTK_VERTEX = 1
VTK_POLY_VERTEX = 2
VTK_LINE = 3
VTK_POLY_LINE = 4
VTK_TRIANGLE = 5
VTK_... | 38.040541 | 109 | 0.646359 |
0c421889a04ca400a72a54da71eb83b31226851f | 3,269 | py | Python | app.py | mzurhorst/wassersteuerung | 88e1f31d50e2f4e95606d4612687eceaf6ece69b | [
"MIT"
] | 2 | 2017-08-06T12:53:12.000Z | 2018-05-27T18:03:54.000Z | app.py | mzurhorst/wassersteuerung | 88e1f31d50e2f4e95606d4612687eceaf6ece69b | [
"MIT"
] | null | null | null | app.py | mzurhorst/wassersteuerung | 88e1f31d50e2f4e95606d4612687eceaf6ece69b | [
"MIT"
] | null | null | null | from flask import Flask, abort, request, render_template, json, jsonify
app = Flask(__name__)
app.static_folder = 'static'
@app.before_request
def limit_remote_addr():
if request.remote_addr != '127.0.0.1':
abort(403) # Forbidden
@app.route('/')
def hello():
return render_template('index.html')
@ap... | 28.929204 | 91 | 0.621597 |
0c4adb3d09be4853610b8aa0216e584ab56dc404 | 492 | py | Python | Leetcode/(50) Pow.py | MastaCoder/Projects | ebb0a3134522b12f052fec8d753005f384adf1b1 | [
"MIT"
] | 5 | 2018-10-11T01:55:40.000Z | 2021-12-25T23:38:22.000Z | Leetcode/(50) Pow.py | MastaCoder/mini_projects | ebb0a3134522b12f052fec8d753005f384adf1b1 | [
"MIT"
] | null | null | null | Leetcode/(50) Pow.py | MastaCoder/mini_projects | ebb0a3134522b12f052fec8d753005f384adf1b1 | [
"MIT"
] | 1 | 2019-02-22T14:42:50.000Z | 2019-02-22T14:42:50.000Z | # Binary Expontentiation: https://cp-algorithms.com/algebra/binary-exp.html
# https://leetcode.com/problems/powx-n/
class Solution:
def myPow(self, x: float, n: int) -> float:
if n < 0:
return 1 / self.myPow(x, n * -1)
if n == 0:
return 1
if n % 2 =... | 28.941176 | 75 | 0.477642 |
ac561907f9a382439a0e9078613765554867e0be | 1,676 | py | Python | new-docs/examples/python/getting-started/application/expenses-flask/app/expense.py | saschajullmann/oso | 85d07c6a1825acba5ec043c917bff6e0f5c7128f | [
"Apache-2.0"
] | null | null | null | new-docs/examples/python/getting-started/application/expenses-flask/app/expense.py | saschajullmann/oso | 85d07c6a1825acba5ec043c917bff6e0f5c7128f | [
"Apache-2.0"
] | 2 | 2021-03-24T19:24:40.000Z | 2021-03-24T19:54:46.000Z | new-docs/examples/python/getting-started/application/expenses-flask/app/expense.py | saschajullmann/oso | 85d07c6a1825acba5ec043c917bff6e0f5c7128f | [
"Apache-2.0"
] | 1 | 2021-03-24T19:51:45.000Z | 2021-03-24T19:51:45.000Z | from dataclasses import dataclass
from datetime import datetime
from flask import Blueprint, g, jsonify, request
from werkzeug.exceptions import BadRequest, NotFound
from .authorization import authorize
from .db import query_db
from .user import User
bp = Blueprint("expense", __name__, url_prefix="/expenses")
@data... | 25.784615 | 87 | 0.615155 |
0279a4a64c81ad10980ebd7a88091d95ee525636 | 97 | py | Python | Variablen und Operatoren/Eingabe/text.py | DietrichPaul/Einstieg-in-Python | 0d28402f962773274d85e6bb169ae631c91f66ce | [
"CC0-1.0"
] | null | null | null | Variablen und Operatoren/Eingabe/text.py | DietrichPaul/Einstieg-in-Python | 0d28402f962773274d85e6bb169ae631c91f66ce | [
"CC0-1.0"
] | null | null | null | Variablen und Operatoren/Eingabe/text.py | DietrichPaul/Einstieg-in-Python | 0d28402f962773274d85e6bb169ae631c91f66ce | [
"CC0-1.0"
] | null | null | null | print("Bitte einen Text eingeben")
# Eingabe einer Zeichenkette
x = input()
# Ausgabe
print(x)
| 12.125 | 34 | 0.721649 |
5a7aa042f399a4a7dcbe1697a39daf41e8882131 | 4,102 | py | Python | hark/src/ex1/ex1.py | appfs/appfs | 8cbbfa0e40e4d4a75a498ce8dd894bb2fbc3a9e3 | [
"MIT"
] | 11 | 2017-04-21T11:39:55.000Z | 2022-02-11T20:25:18.000Z | hark/src/ex1/ex1.py | appfs/appfs | 8cbbfa0e40e4d4a75a498ce8dd894bb2fbc3a9e3 | [
"MIT"
] | 69 | 2017-04-26T09:30:38.000Z | 2017-08-01T11:31:21.000Z | hark/src/ex1/ex1.py | appfs/appfs | 8cbbfa0e40e4d4a75a498ce8dd894bb2fbc3a9e3 | [
"MIT"
] | 53 | 2017-04-20T16:16:11.000Z | 2017-07-19T12:53:01.000Z | import math
import sys
## @package ex1
# This script is a solution for exercise 1 from the advanced programming course in the sommer 2017 at TUB.
# For more information see @link http://www.zib.de/koch/lectures/ss2017_appfs.php
floating_point_upper_bound = sys.float_info.max
## This method takes care of the error ha... | 45.577778 | 159 | 0.640663 |
0cfd7131aeddb8ff9134dd8073ec4d446b9148fe | 1,323 | py | Python | benchmarks/matbench_v0.1_Ax_SAASBO_CrabNet_v1.2.7/utils/plotting.py | sparks-baird/matbench | 4424609454286e32fff2bcc724379b2a316c5a76 | [
"MIT"
] | 15 | 2021-11-01T09:02:19.000Z | 2022-03-19T10:59:41.000Z | benchmarks/matbench_v0.1_Ax_SAASBO_CrabNet_v1.2.7/utils/plotting.py | sparks-baird/matbench | 4424609454286e32fff2bcc724379b2a316c5a76 | [
"MIT"
] | 62 | 2021-09-20T14:09:59.000Z | 2022-03-30T19:03:22.000Z | benchmarks/matbench_v0.1_Ax_SAASBO_CrabNet_v1.2.7/utils/plotting.py | sparks-baird/matbench | 4424609454286e32fff2bcc724379b2a316c5a76 | [
"MIT"
] | 3 | 2021-11-26T10:13:48.000Z | 2022-01-08T06:56:03.000Z | def matplotlibify(fig, size=24, width_inches=3.5, height_inches=3.5, dpi=142):
# make it look more like matplotlib
# modified from: https://medium.com/swlh/formatting-a-plotly-figure-with-matplotlib-style-fa56ddd97539)
font_dict = dict(family="Arial", size=size, color="black")
fig.update_layout(
... | 30.767442 | 107 | 0.61678 |
0b2294acdf065c4a634f05f9bd6211ca5efa72ba | 899 | py | Python | graph_network/util/result_writer.py | stevezheng23/graph_network_tf | b48a43453c2731f253bfe5a61e0b6339f4fc9f99 | [
"Apache-2.0"
] | 39 | 2019-02-23T07:55:43.000Z | 2021-05-25T12:39:54.000Z | graph_network/util/result_writer.py | stevezheng23/graph_network_tf | b48a43453c2731f253bfe5a61e0b6339f4fc9f99 | [
"Apache-2.0"
] | 3 | 2019-07-29T08:11:25.000Z | 2021-03-23T05:22:29.000Z | graph_network/util/result_writer.py | stevezheng23/graph_network_tf | b48a43453c2731f253bfe5a61e0b6339f4fc9f99 | [
"Apache-2.0"
] | 7 | 2019-03-17T02:30:45.000Z | 2020-03-03T22:11:06.000Z | import codecs
import os.path
import json
import time
import numpy as np
import tensorflow as tf
__all__ = ["ResultWriter"]
class ResultWriter(object):
"""result writer"""
def __init__(self,
output_dir):
"""initialize result writer"""
self.output_dir = output_dir
... | 31 | 116 | 0.591769 |
0b717dc9d0d8cab692694471132ead5619b7101f | 2,502 | py | Python | python/fleetx/utils/barrier_client_impl.py | hutuxian/FleetX | 843c7aa33f5a14680becf058a3aaf0327eefafd4 | [
"Apache-2.0"
] | 170 | 2020-08-12T12:07:01.000Z | 2022-03-07T02:38:26.000Z | python/fleetx/utils/barrier_client_impl.py | hutuxian/FleetX | 843c7aa33f5a14680becf058a3aaf0327eefafd4 | [
"Apache-2.0"
] | 195 | 2020-08-13T03:22:15.000Z | 2022-03-30T07:40:25.000Z | python/fleetx/utils/barrier_client_impl.py | hutuxian/FleetX | 843c7aa33f5a14680becf058a3aaf0327eefafd4 | [
"Apache-2.0"
] | 67 | 2020-08-14T02:07:46.000Z | 2022-03-28T10:05:33.000Z | # -*- coding: utf-8 -*-
from __future__ import print_function
from concurrent import futures
import grpc
from . import barrier_server_pb2 as barrier_server_pb2
from . import barrier_server_pb2_grpc as barrier_server_pb2_grpc
from concurrent import futures
from multiprocessing import Process
import time
import sys
impo... | 29.785714 | 79 | 0.601119 |
3304230b99dd7798bae7981fe0db6b20fbf26b93 | 877 | py | Python | misc/angrbox/solve/example_client.py | b01lers/circle-city-ctf-2021 | 5d6c341f8d9647487dc69df84a4bea5e61d7ca43 | [
"MIT"
] | 9 | 2021-06-13T19:33:53.000Z | 2021-10-04T13:17:26.000Z | CircleCityCon/2021/misc/angrbox/example_client.py | ruhan-islam/ctf-archives | 8c2bf6a608c821314d1a1cfaa05a6cccef8e3103 | [
"MIT"
] | 1 | 2021-06-13T23:20:05.000Z | 2021-06-13T23:20:05.000Z | CircleCityCon/2021/misc/angrbox/example_client.py | ruhan-islam/ctf-archives | 8c2bf6a608c821314d1a1cfaa05a6cccef8e3103 | [
"MIT"
] | 1 | 2021-06-14T02:09:46.000Z | 2021-06-14T02:09:46.000Z | import pwn
import hashlib
import itertools
import string
"""
This is an example showing how to connect to the challenge with pwntools,
proof-of-work solver included.
"""
def solve_pow(io):
suffix = io.recvlineS().strip().split(" = ")[-1]
h = io.recvlineS().strip().split(" = ")[-1]
prefix_len = int(io.rec... | 27.40625 | 84 | 0.606613 |
684f4876644e67ff55ccf44e78223f45606dc142 | 5,142 | py | Python | oneflow/python/test/ops/test_dynamic_loss_scale_schedule.py | ncnnnnn/oneflow | f6e81f65eed1d87c3125e7a78247cfaa72220020 | [
"Apache-2.0"
] | 2 | 2021-09-10T00:19:49.000Z | 2021-11-16T11:27:20.000Z | oneflow/python/test/ops/test_dynamic_loss_scale_schedule.py | duijiudanggecl/oneflow | d2096ae14cf847509394a3b717021e2bd1d72f62 | [
"Apache-2.0"
] | null | null | null | oneflow/python/test/ops/test_dynamic_loss_scale_schedule.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... | 34.28 | 88 | 0.588681 |
6899ab4c2101e9a05953ab8b06d76389ee9145c8 | 586 | py | Python | Theories/Algorithms/Recursion2/LetterCombinationsPhoneNumber/letter_combinations_phone_number.py | dolong2110/Algorithm-By-Problems-Python | 31ecc7367aaabdd2b0ac0af7f63ca5796d70c730 | [
"MIT"
] | 1 | 2021-08-16T14:52:05.000Z | 2021-08-16T14:52:05.000Z | Theories/Algorithms/Recursion2/LetterCombinationsPhoneNumber/letter_combinations_phone_number.py | dolong2110/Algorithm-By-Problems-Python | 31ecc7367aaabdd2b0ac0af7f63ca5796d70c730 | [
"MIT"
] | null | null | null | Theories/Algorithms/Recursion2/LetterCombinationsPhoneNumber/letter_combinations_phone_number.py | dolong2110/Algorithm-By-Problems-Python | 31ecc7367aaabdd2b0ac0af7f63ca5796d70c730 | [
"MIT"
] | null | null | null | from typing import List
def letterCombinations(digits: str) -> List[str]:
if not digits:
return []
digits_dict = {"2": "abc", "3": "def", "4": "ghi", "5": "jkl", "6": "mno", "7": "pqrs", "8": "tuv", "9": "wxyz"}
letter_combine = []
def combine(cur_digits: str, cur_combine: str):
if ... | 25.478261 | 116 | 0.571672 |
0bf7c095ce11713daa0347478b7f992fd6d4dd6a | 669 | py | Python | PMIa/2015/KOLOV_A_A/task_5_14.py | YukkaSarasti/pythonintask | eadf4245abb65f4400a3bae30a4256b4658e009c | [
"Apache-2.0"
] | null | null | null | PMIa/2015/KOLOV_A_A/task_5_14.py | YukkaSarasti/pythonintask | eadf4245abb65f4400a3bae30a4256b4658e009c | [
"Apache-2.0"
] | null | null | null | PMIa/2015/KOLOV_A_A/task_5_14.py | YukkaSarasti/pythonintask | eadf4245abb65f4400a3bae30a4256b4658e009c | [
"Apache-2.0"
] | null | null | null | # Задача 5. Вариант 14.
# Напишите программу, которая бы при запуске случайным образом отображала название одной из двадцати башен Московского кремля
# Kolov A.A
# 25.05.2016
import random
towers = ['Спасская башня','Царская башня','Набатная башня','Константино-Еленинская башня','Москворецкая башня ','Петровская баш... | 55.75 | 223 | 0.772795 |
9bee644af3e310940387f464dbac0e40ebb1549d | 1,234 | py | Python | main.py | pedroolynth0/Ghost | 485b53dedbd790770b51f1c52d70d3d892efaf2d | [
"MIT"
] | null | null | null | main.py | pedroolynth0/Ghost | 485b53dedbd790770b51f1c52d70d3d892efaf2d | [
"MIT"
] | null | null | null | main.py | pedroolynth0/Ghost | 485b53dedbd790770b51f1c52d70d3d892efaf2d | [
"MIT"
] | null | null | null | from matplotlib.pyplot import text
from vosk import Model, KaldiRecognizer
import os
import pyaudio
import pyttsx3
import json
import core
from nlu.classifier import classify
#sintese de fala
engine = pyttsx3.init()
voices = engine.getProperty('voices')
engine.setProperty('voice', voices[-2].id)
def speak(text):
... | 20.915254 | 98 | 0.65316 |
0fa69822e3677b5ec53e52347bbbba28f48535c5 | 3,063 | py | Python | BCACTF/2021/crypto/FNES_2.5/app.py | ruhan-islam/ctf-archives | 8c2bf6a608c821314d1a1cfaa05a6cccef8e3103 | [
"MIT"
] | 1 | 2021-11-02T20:53:58.000Z | 2021-11-02T20:53:58.000Z | BCACTF/2021/crypto/FNES_2.5/app.py | ruhan-islam/ctf-archives | 8c2bf6a608c821314d1a1cfaa05a6cccef8e3103 | [
"MIT"
] | null | null | null | BCACTF/2021/crypto/FNES_2.5/app.py | ruhan-islam/ctf-archives | 8c2bf6a608c821314d1a1cfaa05a6cccef8e3103 | [
"MIT"
] | null | null | null | from flask import Flask, render_template, request, redirect, make_response
from json import loads, dumps
import secrets
import random
import math
import time
import binascii
import sys
from Crypto.Cipher import AES
from Crypto.Hash import SHA
from Crypto.Util.Padding import pad, unpad
sys.tracebacklimit = 0
app = Fl... | 37.353659 | 237 | 0.691805 |
e889a7c614a820d2557fffcc488ced45fa1beffd | 6,878 | py | Python | yolov5-coreml-tflite-converter/inference-python/python_model/tflite_model.py | SchweizerischeBundesbahnen/sbb-ml-models | 485356aeb0a277907c160d435f7f654154046a70 | [
"MIT"
] | null | null | null | yolov5-coreml-tflite-converter/inference-python/python_model/tflite_model.py | SchweizerischeBundesbahnen/sbb-ml-models | 485356aeb0a277907c160d435f7f654154046a70 | [
"MIT"
] | null | null | null | yolov5-coreml-tflite-converter/inference-python/python_model/tflite_model.py | SchweizerischeBundesbahnen/sbb-ml-models | 485356aeb0a277907c160d435f7f654154046a70 | [
"MIT"
] | null | null | null | import json
import logging
import numpy as np
import tensorflow as tf
from tflite_support import metadata as _metadata
from constants import IMAGE_NAME, IOU_NAME, CONF_NAME, NORMALIZED_SUFFIX, QUANTIZED_SUFFIX, BOUNDINGBOX_NAME, \
CLASSES_NAME, SCORES_NAME, NUMBER_NAME, PREDICTIONS_NAME, SIMPLE
from tf_model.tf_n... | 47.109589 | 144 | 0.653533 |
d715e4b24bfedab021b9fe0d20b0e30d2f73b05b | 14,298 | py | Python | Packs/CommonScripts/Scripts/ParseEmailFilesV2/ParseEmailFilesV2_test.py | PAM360/content | 928aac9c586c6e593b2a452c402a37cb5df28dac | [
"MIT"
] | null | null | null | Packs/CommonScripts/Scripts/ParseEmailFilesV2/ParseEmailFilesV2_test.py | PAM360/content | 928aac9c586c6e593b2a452c402a37cb5df28dac | [
"MIT"
] | 60 | 2022-02-24T14:54:47.000Z | 2022-03-31T10:38:41.000Z | Packs/CommonScripts/Scripts/ParseEmailFilesV2/ParseEmailFilesV2_test.py | PAM360/content | 928aac9c586c6e593b2a452c402a37cb5df28dac | [
"MIT"
] | null | null | null | import demistomock as demisto
from CommonServerPython import *
from ParseEmailFilesV2 import main, data_to_md
def exec_command_for_file(
file_path,
info="RFC 822 mail text, with CRLF line terminators",
file_name=None,
file_type="",
):
"""
Return a executeCommand function which ... | 34.042857 | 121 | 0.556232 |
d7174ccdbf064ca8bdedf742a2f7608ac59098d6 | 3,070 | py | Python | 7-assets/past-student-repos/LambdaSchool-master/m7/71e1/hashtables/ex3/ex3.py | eengineergz/Lambda | 1fe511f7ef550aed998b75c18a432abf6ab41c5f | [
"MIT"
] | null | null | null | 7-assets/past-student-repos/LambdaSchool-master/m7/71e1/hashtables/ex3/ex3.py | eengineergz/Lambda | 1fe511f7ef550aed998b75c18a432abf6ab41c5f | [
"MIT"
] | null | null | null | 7-assets/past-student-repos/LambdaSchool-master/m7/71e1/hashtables/ex3/ex3.py | eengineergz/Lambda | 1fe511f7ef550aed998b75c18a432abf6ab41c5f | [
"MIT"
] | null | null | null | intersection_array = []
cache = {}
def arrays_length_two(arrays, intersection_array):
if len(arrays[1]) <= 5 and len(arrays[0]) <= 5:
for y in arrays[1]:
for x in arrays[0]:
if x == y:
if x not in intersection_array:
intersection_array... | 34.886364 | 67 | 0.597394 |
d7433b465c48a068ef5f5c36afce5a01aff65613 | 16,975 | py | Python | haas_lib_bundles/python/libraries/qmp6988/qmp6988.py | wstong999/AliOS-Things | 6554769cb5b797e28a30a4aa89b3f4cb2ef2f5d9 | [
"Apache-2.0"
] | null | null | null | haas_lib_bundles/python/libraries/qmp6988/qmp6988.py | wstong999/AliOS-Things | 6554769cb5b797e28a30a4aa89b3f4cb2ef2f5d9 | [
"Apache-2.0"
] | null | null | null | haas_lib_bundles/python/libraries/qmp6988/qmp6988.py | wstong999/AliOS-Things | 6554769cb5b797e28a30a4aa89b3f4cb2ef2f5d9 | [
"Apache-2.0"
] | null | null | null | """
Copyright (C) 2015-2021 Alibaba Group Holding Limited
MicroPython's driver for QMP6988
Author: HaaS
Date: 2021/09/14
"""
from driver import I2C
from utime import sleep_ms
from micropython import const
import math
QMP6988_CALC_INT = 1
QMP6988_CHIP_ID = const(0x5C)
QMP6988_CHIP_ID_REG ... | 39.293981 | 290 | 0.570368 |
d7541afa5977eb41a14d1bbf0a2980f48d3b6f9c | 3,305 | py | Python | app/mip/views.py | IoTServ/FlaskSimpleCMS | db0fc4464c6d514db14972156ca3e002a60a4876 | [
"MIT"
] | null | null | null | app/mip/views.py | IoTServ/FlaskSimpleCMS | db0fc4464c6d514db14972156ca3e002a60a4876 | [
"MIT"
] | 4 | 2020-08-29T16:11:12.000Z | 2022-03-12T00:47:03.000Z | app/mip/views.py | IoTServ/FlaskSimpleCMS | db0fc4464c6d514db14972156ca3e002a60a4876 | [
"MIT"
] | null | null | null | #coding:utf-8
import os,json,time,oss2
from datetime import datetime,timedelta
from flask import make_response,send_file
from flask_login import login_required, current_user
from werkzeug.utils import secure_filename
from flask import render_template, request, current_app,flash,redirect,url_for
from . import mip
from ... | 43.486842 | 176 | 0.692587 |
ad29f34553438d094fd973842bbcd5002c98a8e0 | 4,387 | py | Python | official/cv/deeplabv3/ascend310_quant_infer/export_bin.py | leelige/mindspore | 5199e05ba3888963473f2b07da3f7bca5b9ef6dc | [
"Apache-2.0"
] | 77 | 2021-10-15T08:32:37.000Z | 2022-03-30T13:09:11.000Z | official/cv/deeplabv3/ascend310_quant_infer/export_bin.py | leelige/mindspore | 5199e05ba3888963473f2b07da3f7bca5b9ef6dc | [
"Apache-2.0"
] | 3 | 2021-10-30T14:44:57.000Z | 2022-02-14T06:57:57.000Z | official/cv/deeplabv3/ascend310_quant_infer/export_bin.py | leelige/mindspore | 5199e05ba3888963473f2b07da3f7bca5b9ef6dc | [
"Apache-2.0"
] | 24 | 2021-10-15T08:32:45.000Z | 2022-03-24T18:45:20.000Z | # Copyright 2021 Huawei Technologies Co., Ltd
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to... | 33.234848 | 106 | 0.657853 |
0f1b98f7e2acdae6a7e533d7e863c8c906c52fc7 | 14,352 | py | Python | init.py | Mathias-Mo/Zauberwald_v05 | 7c67b7ed086feb8e3897f4b6c2122b8b66256331 | [
"MIT"
] | null | null | null | init.py | Mathias-Mo/Zauberwald_v05 | 7c67b7ed086feb8e3897f4b6c2122b8b66256331 | [
"MIT"
] | null | null | null | init.py | Mathias-Mo/Zauberwald_v05 | 7c67b7ed086feb8e3897f4b6c2122b8b66256331 | [
"MIT"
] | null | null | null | from MyFactory import MyFactory
from player import *
from data import character_props as props
from data import features
from random import shuffle
import time
################################################
"""Beschreibung: Kleines Spiel
Das Spiel befindet sich noch in der Entwicklung, allerdings
kann ma... | 36.705882 | 157 | 0.607302 |
7e28401f7571ad3abc3f1d01b95fe3ead3d7677d | 1,901 | py | Python | Packs/CrowdStrikeFalcon/Scripts/TransformIndicatorToCSFalconIOC/TransformIndicatorToCSFalconIOC_test.py | cstone112/content | 7f039931b8cfc20e89df52d895440b7321149a0d | [
"MIT"
] | 2 | 2021-12-06T21:38:24.000Z | 2022-01-13T08:23:36.000Z | Packs/CrowdStrikeFalcon/Scripts/TransformIndicatorToCSFalconIOC/TransformIndicatorToCSFalconIOC_test.py | cstone112/content | 7f039931b8cfc20e89df52d895440b7321149a0d | [
"MIT"
] | 87 | 2022-02-23T12:10:53.000Z | 2022-03-31T11:29:05.000Z | Packs/CrowdStrikeFalcon/Scripts/TransformIndicatorToCSFalconIOC/TransformIndicatorToCSFalconIOC_test.py | cstone112/content | 7f039931b8cfc20e89df52d895440b7321149a0d | [
"MIT"
] | 2 | 2022-01-05T15:27:01.000Z | 2022-02-01T19:27:43.000Z | import pytest
from TransformIndicatorToCSFalconIOC import *
CS_IOC_BY_VALUE = [
{'expiration': '2022-02-10T17:02:59.193836+02:00', 'type': 'ipv4', 'severity': 'High', 'value': '1.2.3.4',
'action': 'no_action', 'platforms': ['mac'], 'applied_globally': True, 'source': 'Cortex XSOAR'}]
XSOAR_INDICATOR_BY_VAL... | 48.74359 | 120 | 0.678064 |
0e7d904372dc8984d57abf4409a7d06f3cf95228 | 720 | py | Python | exercises/de/test_01_12_01.py | Jette16/spacy-course | 32df0c8f6192de6c9daba89740a28c0537e4d6a0 | [
"MIT"
] | 2,085 | 2019-04-17T13:10:40.000Z | 2022-03-30T21:51:46.000Z | exercises/de/test_01_12_01.py | Jette16/spacy-course | 32df0c8f6192de6c9daba89740a28c0537e4d6a0 | [
"MIT"
] | 79 | 2019-04-18T14:42:55.000Z | 2022-03-07T08:15:43.000Z | exercises/de/test_01_12_01.py | Jette16/spacy-course | 32df0c8f6192de6c9daba89740a28c0537e4d6a0 | [
"MIT"
] | 361 | 2019-04-17T13:34:32.000Z | 2022-03-28T04:42:45.000Z | def test():
assert (
len(pattern) == 2
), "Das Pattern sollte zwei Tokens beschreiben (zwei Dictionaries)."
assert isinstance(pattern[0], dict) and isinstance(
pattern[1], dict
), "Jeder Eintrag im Pattern sollte ein Dictionary sein."
assert (
len(pattern[0]) == 1 and len(pat... | 37.894737 | 72 | 0.622222 |
70fa3bd1e44406147f806ddd018ae12a9cf47a96 | 558 | py | Python | nltk.py | mayur200/hacktoberfest2021 | 5f141fe6dc90916d65bef17a66f0db05649c41ef | [
"MIT"
] | null | null | null | nltk.py | mayur200/hacktoberfest2021 | 5f141fe6dc90916d65bef17a66f0db05649c41ef | [
"MIT"
] | null | null | null | nltk.py | mayur200/hacktoberfest2021 | 5f141fe6dc90916d65bef17a66f0db05649c41ef | [
"MIT"
] | null | null | null | import nltk
from nltk import CFG
grammar = CFG.fromstring("""
NP -> Art Nm | PN
Nm -> Aj Nm | N
VP -> V Aj | V NP | V S | V NP PP
PP -> P NP
PN -> 'Homer' | 'Abe' | 'Lisa'
Art-> 'the' | 'a'
N -> 'cat' | 'rat' | 'tree' | 'dolphin' | 'rope'
Aj -> 'clever' | 'afraid' | 'small' | 'long'
V -> 'tracked' | 'see' | '... | 25.363636 | 61 | 0.582437 |
cb7d49396e68d0fa7977ce5e586ac39661d3f84a | 3,312 | py | Python | ssrmgmt/settings/base.py | dongdawang/ssrmgmt | a41e595aec503dcb191a20ea8d58233bbb8f2db0 | [
"MIT"
] | null | null | null | ssrmgmt/settings/base.py | dongdawang/ssrmgmt | a41e595aec503dcb191a20ea8d58233bbb8f2db0 | [
"MIT"
] | null | null | null | ssrmgmt/settings/base.py | dongdawang/ssrmgmt | a41e595aec503dcb191a20ea8d58233bbb8f2db0 | [
"MIT"
] | null | null | null | """
Django settings for ssrmgmt project.
Generated by 'django-admin startproject' using Django 2.0.5.
For more information on this file, see
https://docs.djangoproject.com/en/2.0/topics/settings/
For the full list of settings and their values, see
https://docs.djangoproject.com/en/2.0/ref/settings/
"""
from __futur... | 28.8 | 91 | 0.701087 |
cbca0cf4c8aea5a1b03258451e247fe4dc7da7e4 | 1,647 | py | Python | tensorflow/basic-rl/tutorial14/code/train_trpo.py | gopala-kr/ds-notebooks | bc35430ecdd851f2ceab8f2437eec4d77cb59423 | [
"MIT"
] | 1 | 2019-05-10T09:16:23.000Z | 2019-05-10T09:16:23.000Z | tensorflow/basic-rl/tutorial14/code/train_trpo.py | gopala-kr/ds-notebooks | bc35430ecdd851f2ceab8f2437eec4d77cb59423 | [
"MIT"
] | null | null | null | tensorflow/basic-rl/tutorial14/code/train_trpo.py | gopala-kr/ds-notebooks | bc35430ecdd851f2ceab8f2437eec4d77cb59423 | [
"MIT"
] | 1 | 2019-05-10T09:17:28.000Z | 2019-05-10T09:17:28.000Z | from baselines.ppo1.mlp_policy import MlpPolicy
from baselines.common.mpi_fork import mpi_fork
from baselines import bench
from baselines.trpo_mpi import trpo_mpi
import gym
import tensorflow as tf
import argparse
import baselines.common.tf_util as U
from baselines.common import set_global_seeds
from mpi4py import MPI
... | 35.042553 | 102 | 0.752277 |
cbcf161397ef0c2affb4a46ffbfa623136e5bd71 | 354 | py | Python | 2-resources/__CHEAT-SHEETS/cheatsheets-master/cheatsheets-master/dynamodb/python/get_item.py | eengineergz/Lambda | 1fe511f7ef550aed998b75c18a432abf6ab41c5f | [
"MIT"
] | 103 | 2019-08-30T10:04:40.000Z | 2022-03-30T22:14:44.000Z | 2-resources/__CHEAT-SHEETS/cheatsheets-master/cheatsheets-master/dynamodb/python/get_item.py | eengineergz/Lambda | 1fe511f7ef550aed998b75c18a432abf6ab41c5f | [
"MIT"
] | 6 | 2021-04-08T08:36:27.000Z | 2021-10-01T07:47:17.000Z | 2-resources/__CHEAT-SHEETS/cheatsheets-master/cheatsheets-master/dynamodb/python/get_item.py | eengineergz/Lambda | 1fe511f7ef550aed998b75c18a432abf6ab41c5f | [
"MIT"
] | 51 | 2019-06-10T06:11:46.000Z | 2022-03-30T16:33:05.000Z | import boto3
client = boto3.Session(region_name='eu-west-1').client('dynamodb', aws_access_key_id='', aws_secret_access_key='', endpoint_url='http://localhost:4567')
response = client.get_item(
Key={
'event': {'S': 'gaming_nationals_zaf'},
'timestamp': {'S': '2019-02-08T14:53'}
},
TableNam... | 25.285714 | 152 | 0.661017 |
69cc881c3132317dc99b291b997c426537752b21 | 591 | py | Python | _Dist/NeuralNetworks/_Tests/_UnitTests/UnitTestUtil.py | leoatchina/MachineLearning | 071f2c0fc6f5af3d9550cfbeafe8d537c35a76d3 | [
"MIT"
] | 1,107 | 2016-09-21T02:18:36.000Z | 2022-03-29T02:52:12.000Z | _Dist/NeuralNetworks/_Tests/_UnitTests/UnitTestUtil.py | leoatchina/MachineLearning | 071f2c0fc6f5af3d9550cfbeafe8d537c35a76d3 | [
"MIT"
] | 18 | 2016-12-22T10:24:47.000Z | 2022-03-11T23:18:43.000Z | _Dist/NeuralNetworks/_Tests/_UnitTests/UnitTestUtil.py | leoatchina/MachineLearning | 071f2c0fc6f5af3d9550cfbeafe8d537c35a76d3 | [
"MIT"
] | 776 | 2016-12-21T12:08:08.000Z | 2022-03-21T06:12:08.000Z | import os
import shutil
root_cwd = os.path.abspath("../")
def clear_cache():
cwd = os.getcwd()
local_data_folder = os.path.join(cwd, "_Data")
if os.path.isdir(local_data_folder):
shutil.rmtree(local_data_folder)
shutil.rmtree(os.path.join(cwd, "_Models"))
remote_cache_folder = os.path.joi... | 31.105263 | 69 | 0.700508 |
38868d304c87873212642f59dd93ccd59c86f919 | 1,777 | py | Python | tests/test_util.py | shipt/py-volley | 0114651478c8df7304d3fe3cb9f72998901bb3fe | [
"MIT"
] | 8 | 2022-02-24T14:59:24.000Z | 2022-03-31T04:37:55.000Z | tests/test_util.py | shipt/py-volley | 0114651478c8df7304d3fe3cb9f72998901bb3fe | [
"MIT"
] | 3 | 2022-02-27T17:08:52.000Z | 2022-03-18T13:11:01.000Z | tests/test_util.py | shipt/py-volley | 0114651478c8df7304d3fe3cb9f72998901bb3fe | [
"MIT"
] | 2 | 2022-02-24T15:03:07.000Z | 2022-03-15T03:12:00.000Z | import threading
import time
from typing import Any
from unittest.mock import MagicMock, patch
import pytest
from example.input_worker import eng
from volley.util import FuncEnvelope
@patch("volley.connectors.rsmq.RSMQProducer", MagicMock())
@patch("volley.connectors.confluent.Consumer")
def test_graceful_kill(mock... | 26.522388 | 79 | 0.697805 |
2de41528acb26f29dda0dfe67025a3da92036559 | 732 | py | Python | micropython/flash/Wifi.py | webbhm/PiRock | 2c8f328bf212d8bcac88061fd1ba23866746626a | [
"Apache-2.0"
] | null | null | null | micropython/flash/Wifi.py | webbhm/PiRock | 2c8f328bf212d8bcac88061fd1ba23866746626a | [
"Apache-2.0"
] | null | null | null | micropython/flash/Wifi.py | webbhm/PiRock | 2c8f328bf212d8bcac88061fd1ba23866746626a | [
"Apache-2.0"
] | null | null | null | import network
import pyb
import conf
import time
led_G = pyb.LED(2)
led_B = pyb.LED(3)
def connect(ssid=conf.SSID, pwd=conf.PWD):
# Connect to network
led_G.on()
wifi = network.WLAN(network.STA_IF)
wifi.config(trace=0)
while True:
wifi.active(True)
wifi.connect(ssid, pwd)
... | 22.181818 | 87 | 0.57377 |
934b26f0fa6738df4931b490bb2b5f5bd6cd85a3 | 6,215 | py | Python | movies/testing/test.py | ptracton/ExperimentalPython | a3159226982ec9656bb0f81f6997687da22f4466 | [
"MIT"
] | null | null | null | movies/testing/test.py | ptracton/ExperimentalPython | a3159226982ec9656bb0f81f6997687da22f4466 | [
"MIT"
] | null | null | null | movies/testing/test.py | ptracton/ExperimentalPython | a3159226982ec9656bb0f81f6997687da22f4466 | [
"MIT"
] | null | null | null | #! /usr/bin/env python3
import requests
import urllib
import datetime
import json
import sys
import imdb
import sqlalchemy
import sqlalchemy.ext.declarative
import sqlalchemy.orm
# Global Setup
user = "postgres"
password = "python"
host = "localhost"
port = 5432
db = "postgres"
url = 'postgresql://{}:{}@{}:{}/{}'
... | 32.369792 | 158 | 0.645696 |
5780c034387dbbe36a4797bf2be065eb00ef2704 | 4,667 | py | Python | migrations/versions/021f602d9965_.py | DanielGrams/gsevp | e94034f7b64de76f38754b56455e83092378261f | [
"MIT"
] | 1 | 2021-06-01T14:49:18.000Z | 2021-06-01T14:49:18.000Z | migrations/versions/021f602d9965_.py | DanielGrams/gsevp | e94034f7b64de76f38754b56455e83092378261f | [
"MIT"
] | 286 | 2020-12-04T14:13:00.000Z | 2022-03-09T19:05:16.000Z | migrations/versions/021f602d9965_.py | DanielGrams/gsevpt | a92f71694388e227e65ed1b24446246ee688d00e | [
"MIT"
] | null | null | null | """empty message
Revision ID: 021f602d9965
Revises: 92f37474ad62
Create Date: 2020-10-22 17:59:27.823624
"""
import sqlalchemy as sa
import sqlalchemy_utils
from alembic import op
from project import dbtypes
from project.models import EventRejectionReason, EventReviewStatus
# revision identifiers, used by Alembic.
... | 35.9 | 88 | 0.62417 |
57ba925414a7cb8ff4ee8d8d4b8107698df998fe | 304 | py | Python | Problems/Dynamic Programming/Easy/MinCostClimbingStair/test_climbing_stairs.py | dolong2110/Algorithm-By-Problems-Python | 31ecc7367aaabdd2b0ac0af7f63ca5796d70c730 | [
"MIT"
] | 1 | 2021-08-16T14:52:05.000Z | 2021-08-16T14:52:05.000Z | Problems/Dynamic Programming/Easy/MinCostClimbingStair/test_climbing_stairs.py | dolong2110/Algorithm-By-Problems-Python | 31ecc7367aaabdd2b0ac0af7f63ca5796d70c730 | [
"MIT"
] | null | null | null | Problems/Dynamic Programming/Easy/MinCostClimbingStair/test_climbing_stairs.py | dolong2110/Algorithm-By-Problems-Python | 31ecc7367aaabdd2b0ac0af7f63ca5796d70c730 | [
"MIT"
] | null | null | null | from unittest import TestCase
from climbing_stairs import minCostClimbingStairs
class Test(TestCase):
def test_min_cost_climbing_stairs(self):
self.assertTrue(minCostClimbingStairs([10, 15, 20]) == 15)
self.assertTrue(minCostClimbingStairs([1, 100, 1, 1, 1, 100, 1, 1, 100, 1]) == 6) | 43.428571 | 89 | 0.723684 |
17b3d06ebb56fc0be41dd59efda1467c65ec3464 | 143 | py | Python | AFluentPython/tools/tempCodeRunnerFile.py | RoboCuper-hujinlei/AI-Job | cf7a081d59700d75f0f2dc73b6d5130863796f01 | [
"Apache-2.0"
] | null | null | null | AFluentPython/tools/tempCodeRunnerFile.py | RoboCuper-hujinlei/AI-Job | cf7a081d59700d75f0f2dc73b6d5130863796f01 | [
"Apache-2.0"
] | null | null | null | AFluentPython/tools/tempCodeRunnerFile.py | RoboCuper-hujinlei/AI-Job | cf7a081d59700d75f0f2dc73b6d5130863796f01 | [
"Apache-2.0"
] | null | null | null | print("Status: ", f.status, f.reason)
# for k, v in f.getheaders():
# print(f"{k}, {v}")
# print('Data:', data.decode('utf-8')) | 35.75 | 42 | 0.517483 |
5e24f3de70a26770fd1ebcb8d113423284544ac3 | 983 | py | Python | python/en/_numpy/python_numpy_tutorial/python_numpy_tutorial-matplotlib-images.py | aimldl/coding | 70ddbfaa454ab92fd072ee8dc614ecc330b34a70 | [
"MIT"
] | null | null | null | python/en/_numpy/python_numpy_tutorial/python_numpy_tutorial-matplotlib-images.py | aimldl/coding | 70ddbfaa454ab92fd072ee8dc614ecc330b34a70 | [
"MIT"
] | null | null | null | python/en/_numpy/python_numpy_tutorial/python_numpy_tutorial-matplotlib-images.py | aimldl/coding | 70ddbfaa454ab92fd072ee8dc614ecc330b34a70 | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
CS231n Convolutional Neural Networks for Visual Recognition
http://cs231n.github.io/
Python Numpy Tutorial
http://cs231n.github.io/python-numpy-tutorial/
matplotlib
https://matplotlib.org/
 ̄
We will highlight some parts of SciPy that you might find useful for this c... | 23.97561 | 80 | 0.732452 |
dc8381f7f25efddca27f5b87adf369bbd85c26cd | 31,272 | py | Python | src/namenum.py | xiaonanln/python-usaco | 8f0fef19cb5f89232d985f79d955f0de5ef4e10d | [
"MIT"
] | null | null | null | src/namenum.py | xiaonanln/python-usaco | 8f0fef19cb5f89232d985f79d955f0de5ef4e10d | [
"MIT"
] | null | null | null | src/namenum.py | xiaonanln/python-usaco | 8f0fef19cb5f89232d985f79d955f0de5ef4e10d | [
"MIT"
] | null | null | null | """
ID: isaiahl1
LANG: PYTHON2
TASK: namenum
"""
TASK = 'namenum'
DICT = """AARON
ABBIE
ABBOTT
ABBRA
ABBY
ABE
ABEL
ABENI
ABIA
ABIBA
ABIE
ABIGAIL
ABNER
ABRAHAM
ABRAM
ABRIANNA
ABRIENDA
ABRIL
ABSOLOM
ABU
ACACIA
ACE
ADA
ADAH
ADAIR
ADALIA
ADAM
ADAMINA
ADAMMA
ADARA
ADDISON
ADE
ADELA
ADELAIDE
ADELE
ADELINE
ADELIO
ADELLE
ADEM... | 6.72227 | 72 | 0.843598 |
76060e7a3c7b0e8f9b6d6e5cebb27b3f9228bc91 | 4,113 | py | Python | sdd-db/db-api/sdd-api-db-get-spatial-data/lambda_function.py | socialdistancingdashboard/virushack | 6ef69d26c5719d0bf257f4594ed2488dd73cdc40 | [
"Apache-2.0"
] | 29 | 2020-03-21T00:47:51.000Z | 2021-07-17T15:50:33.000Z | sdd-db/db-api/sdd-api-db-get-spatial-data/lambda_function.py | socialdistancingdashboard/virushack | 6ef69d26c5719d0bf257f4594ed2488dd73cdc40 | [
"Apache-2.0"
] | 7 | 2020-03-21T14:04:26.000Z | 2022-03-02T08:05:40.000Z | sdd-db/db-api/sdd-api-db-get-spatial-data/lambda_function.py | socialdistancingdashboard/virushack | 6ef69d26c5719d0bf257f4594ed2488dd73cdc40 | [
"Apache-2.0"
] | 13 | 2020-03-21T01:08:08.000Z | 2020-04-08T17:21:11.000Z | """ This Script retrieves data from db and delivers spacial data for dashboard requests."""
import json
import pandas as pd
from datetime import datetime, timedelta
import re
import pymysql
from sqlalchemy import create_engine
from sqlalchemy.pool import NullPool
import dateutil.parser
config = json.load(open("crede... | 30.466667 | 128 | 0.67931 |
87087bf7d1a0c629d640f0f9b2d89b75b83a9714 | 1,173 | py | Python | nz_crawl_demo/day9/jianshu/jianshu/spiders/js.py | gaohj/nzflask_bbs | 36a94c380b78241ed5d1e07edab9618c3e8d477b | [
"Apache-2.0"
] | null | null | null | nz_crawl_demo/day9/jianshu/jianshu/spiders/js.py | gaohj/nzflask_bbs | 36a94c380b78241ed5d1e07edab9618c3e8d477b | [
"Apache-2.0"
] | 27 | 2020-02-12T07:55:58.000Z | 2022-03-12T00:19:09.000Z | nz_crawl_demo/day9/jianshu/jianshu/spiders/js.py | gaohj/nzflask_bbs | 36a94c380b78241ed5d1e07edab9618c3e8d477b | [
"Apache-2.0"
] | 2 | 2020-02-18T01:54:55.000Z | 2020-02-21T11:36:28.000Z | # -*- coding: utf-8 -*-
import scrapy
from scrapy.linkextractors import LinkExtractor
from scrapy.spiders import CrawlSpider, Rule
from jianshu.items import JianshuItem
class JsSpider(CrawlSpider):
name = 'js'
allowed_domains = ['jianshu.com']
start_urls = ['http://jianshu.com/']
rules = (
Rul... | 40.448276 | 102 | 0.613811 |
872414a91700f084a49927d4f22922593fe8a639 | 49 | py | Python | python/extend_to_c/fastprime_test.py | zeroam/TIL | 43e3573be44c7f7aa4600ff8a34e99a65cbdc5d1 | [
"MIT"
] | null | null | null | python/extend_to_c/fastprime_test.py | zeroam/TIL | 43e3573be44c7f7aa4600ff8a34e99a65cbdc5d1 | [
"MIT"
] | null | null | null | python/extend_to_c/fastprime_test.py | zeroam/TIL | 43e3573be44c7f7aa4600ff8a34e99a65cbdc5d1 | [
"MIT"
] | null | null | null | import fastprime
print(fastprime.kthPrime(10000)) | 24.5 | 32 | 0.857143 |
8757947ea6d078ded4d2ceb35464d747e2966533 | 2,568 | py | Python | Python/Video Poker/deck.py | gianvstheworld/POO | f6b9d3d351d703d974a6ca031ee636aea7119367 | [
"MIT"
] | null | null | null | Python/Video Poker/deck.py | gianvstheworld/POO | f6b9d3d351d703d974a6ca031ee636aea7119367 | [
"MIT"
] | null | null | null | Python/Video Poker/deck.py | gianvstheworld/POO | f6b9d3d351d703d974a6ca031ee636aea7119367 | [
"MIT"
] | null | null | null | import random
class Carta(object): # definindo a classe das cartas
def __init__(self, carta, valor, naipe, icone):
# atribuindo os valores, naipes e dizendo se ela está sendo mostrada ou não
self.valor = valor
self.naipe = naipe
self.carta = carta
self.icone = icone
... | 34.702703 | 111 | 0.557243 |
0d731e762bd6706866f5366eccaddc431b6abd50 | 2,398 | py | Python | applications/experimental/pipelines/pipelines/nodes/other/docs2answers.py | mukaiu/PaddleNLP | 0315365dbafa6e3b1c7147121ba85e05884125a5 | [
"Apache-2.0"
] | null | null | null | applications/experimental/pipelines/pipelines/nodes/other/docs2answers.py | mukaiu/PaddleNLP | 0315365dbafa6e3b1c7147121ba85e05884125a5 | [
"Apache-2.0"
] | null | null | null | applications/experimental/pipelines/pipelines/nodes/other/docs2answers.py | mukaiu/PaddleNLP | 0315365dbafa6e3b1c7147121ba85e05884125a5 | [
"Apache-2.0"
] | null | null | null | # Copyright (c) 2022 PaddlePaddle Authors. All Rights Reserved.
# Copyright 2021 deepset GmbH. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.o... | 35.264706 | 93 | 0.581735 |
21c6532e98f9b1702016cae50a8a0184c523f88d | 2,086 | py | Python | src/onegov/agency/views/mutations.py | politbuero-kampagnen/onegov-cloud | 20148bf321b71f617b64376fe7249b2b9b9c4aa9 | [
"MIT"
] | null | null | null | src/onegov/agency/views/mutations.py | politbuero-kampagnen/onegov-cloud | 20148bf321b71f617b64376fe7249b2b9b9c4aa9 | [
"MIT"
] | null | null | null | src/onegov/agency/views/mutations.py | politbuero-kampagnen/onegov-cloud | 20148bf321b71f617b64376fe7249b2b9b9c4aa9 | [
"MIT"
] | null | null | null | from morepath import redirect
from onegov.agency import _
from onegov.agency import AgencyApp
from onegov.agency.forms import ApplyMutationForm
from onegov.agency.layout import AgencyLayout
from onegov.agency.layout import ExtendedPersonLayout
from onegov.agency.models import AgencyMutation
from onegov.agency.models im... | 30.231884 | 69 | 0.697987 |
33f830cf64055d944856e4d2694c5a46a6093824 | 6,865 | py | Python | bearpi-hm_nano-oh_flower/00_src/bearpi-hm_nano_oh_fun/build/lite/hb/cts/list.py | dawmlight/vendor_oh_fun | bc9fb50920f06cd4c27399f60076f5793043c77d | [
"Apache-2.0"
] | 1 | 2022-02-15T08:51:55.000Z | 2022-02-15T08:51:55.000Z | hihope_neptune-oh_hid/00_src/v0.3/build/lite/hb/cts/list.py | dawmlight/vendor_oh_fun | bc9fb50920f06cd4c27399f60076f5793043c77d | [
"Apache-2.0"
] | null | null | null | hihope_neptune-oh_hid/00_src/v0.3/build/lite/hb/cts/list.py | dawmlight/vendor_oh_fun | bc9fb50920f06cd4c27399f60076f5793043c77d | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/env python
# -*- coding: utf-8 -*-
#
# Copyright (c) 2020 Huawei Device 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
... | 36.908602 | 75 | 0.624618 |
1d5e30eefd5c4fa7cfe44240e7a5fcebbe1b4b57 | 3,064 | py | Python | rawio/raw/read.py | hdkai/Raw-IO | f0fa928d7ef59a363c6f4c876d642af6dede6ae4 | [
"Apache-2.0"
] | null | null | null | rawio/raw/read.py | hdkai/Raw-IO | f0fa928d7ef59a363c6f4c876d642af6dede6ae4 | [
"Apache-2.0"
] | null | null | null | rawio/raw/read.py | hdkai/Raw-IO | f0fa928d7ef59a363c6f4c876d642af6dede6ae4 | [
"Apache-2.0"
] | null | null | null | #
# RawIO
# Copyright (c) 2021 Yusuf Olokoba.
#
from numpy import allclose, array
from pathlib import Path
from PIL import Image
from pkg_resources import resource_filename
from rawpy import imread, DemosaicAlgorithm, HighlightMode, Params
from rawpy.enhance import find_bad_pixels, repair_bad_pixels
from torch im... | 37.82716 | 99 | 0.650131 |
d5436a50c5bea43e7767e536710aba6a7687e943 | 20,942 | py | Python | AP_SS16/605/PythonSkript.py | DimensionalScoop/kautschuk | 90403f97cd60b9716cb6a06668196891d5d96578 | [
"MIT"
] | 3 | 2016-04-27T17:07:00.000Z | 2022-02-02T15:43:15.000Z | AP_SS16/605/PythonSkript.py | DimensionalScoop/kautschuk | 90403f97cd60b9716cb6a06668196891d5d96578 | [
"MIT"
] | 5 | 2016-04-27T17:10:03.000Z | 2017-06-20T14:54:20.000Z | AP_SS16/605/PythonSkript.py | DimensionalScoop/kautschuk | 90403f97cd60b9716cb6a06668196891d5d96578 | [
"MIT"
] | null | null | null | # Import system librar
import matplotlib as mpl
mpl.rcdefaults()
mpl.rcParams.update(mpl.rc_params_from_file('meine-matplotlibrc'))
import matplotlib.pyplot as plt
import numpy as np
import scipy.constants as const
import uncertainties.unumpy as unp
from uncertainties import ufloat
from uncertainties.unumpy import (
... | 47.487528 | 175 | 0.628832 |
d55dcc11baddea9d34c8910d7690497fb1f9cd81 | 471 | py | Python | pacman-arch/test/pacman/tests/type001.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/type001.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/type001.py | Scottx86-64/dotfiles-1 | 51004b1e2b032664cce6b553d2052757c286087d | [
"Unlicense"
] | 1 | 2021-09-26T08:44:40.000Z | 2021-09-26T08:44:40.000Z | self.description = "Check the types of default files in a package"
p = pmpkg("pkg1")
p.files = ["foo/file1",
"foo/file2",
"foo/dir/",
"foo/symdir -> dir"]
self.addpkg(p)
self.args = "-U %s" % p.filename()
self.addrule("PACMAN_RETCODE=0")
self.addrule("FILE_TYPE=foo/|dir")
self.addrul... | 26.166667 | 66 | 0.658174 |
891d28ca4291ce9001ffc89548fd43785f2dc2c8 | 2,078 | py | Python | x2paddle/project_convertor/pytorch/torch2paddle/learning_rate_scheduler.py | usertianqin/X2Paddle | b554a8094ca3e255ef4bd2e80337222a35625133 | [
"Apache-2.0"
] | 559 | 2019-01-14T06:01:55.000Z | 2022-03-31T02:52:43.000Z | x2paddle/project_convertor/pytorch/torch2paddle/learning_rate_scheduler.py | usertianqin/X2Paddle | b554a8094ca3e255ef4bd2e80337222a35625133 | [
"Apache-2.0"
] | 353 | 2019-05-07T13:20:03.000Z | 2022-03-31T05:30:12.000Z | x2paddle/project_convertor/pytorch/torch2paddle/learning_rate_scheduler.py | usertianqin/X2Paddle | b554a8094ca3e255ef4bd2e80337222a35625133 | [
"Apache-2.0"
] | 241 | 2018-12-25T02:13:51.000Z | 2022-03-27T23:21:43.000Z | # Copyright (c) 2021 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 appl... | 32.46875 | 74 | 0.586622 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.