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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
ced3e6ac8a79ff016f9d61426e293cec6fc87da9 | 2,809 | py | Python | src/onegov/translator_directory/custom.py | politbuero-kampagnen/onegov-cloud | 20148bf321b71f617b64376fe7249b2b9b9c4aa9 | [
"MIT"
] | null | null | null | src/onegov/translator_directory/custom.py | politbuero-kampagnen/onegov-cloud | 20148bf321b71f617b64376fe7249b2b9b9c4aa9 | [
"MIT"
] | null | null | null | src/onegov/translator_directory/custom.py | politbuero-kampagnen/onegov-cloud | 20148bf321b71f617b64376fe7249b2b9b9c4aa9 | [
"MIT"
] | null | null | null | from onegov.core.elements import Link
from onegov.org.models import GeneralFileCollection
from onegov.translator_directory import TranslatorDirectoryApp
from onegov.translator_directory.collections.language import LanguageCollection
from onegov.translator_directory.collections.translator import \
TranslatorCollecti... | 29.882979 | 79 | 0.585618 |
e8fe5ec3b3b3db8d03a6c3181a9eefd28de32e5a | 1,019 | py | Python | post/count_rules.py | PAULUAPAUL/MasterThesis_AssociationRulesBiodiversity | 0855abc5ec4835a28be4aa305e5e45e73297b389 | [
"MIT"
] | null | null | null | post/count_rules.py | PAULUAPAUL/MasterThesis_AssociationRulesBiodiversity | 0855abc5ec4835a28be4aa305e5e45e73297b389 | [
"MIT"
] | null | null | null | post/count_rules.py | PAULUAPAUL/MasterThesis_AssociationRulesBiodiversity | 0855abc5ec4835a28be4aa305e5e45e73297b389 | [
"MIT"
] | null | null | null | import csv
from collections import Counter
from collections import defaultdict
import os
words_rule=[]
path="/home/paul/Documents/master-thesis-data-mining/student_work/Code/data/Apriori-Int"
for file in os.listdir(path):
if file.endswith("_rules.csv"):
with open(os.path.join(path, file), 'r') a... | 26.815789 | 93 | 0.640824 |
68688ae6faaaf28701889744bc013d134d7ce2e5 | 3,949 | py | Python | test/test_npu/test_network_ops/test_slow_conv_dilated2d_backward.py | Ascend/pytorch | 39849cf72dafe8d2fb68bd1679d8fd54ad60fcfc | [
"BSD-3-Clause"
] | 1 | 2021-12-02T03:07:35.000Z | 2021-12-02T03:07:35.000Z | test/test_npu/test_network_ops/test_slow_conv_dilated2d_backward.py | Ascend/pytorch | 39849cf72dafe8d2fb68bd1679d8fd54ad60fcfc | [
"BSD-3-Clause"
] | 1 | 2021-11-12T07:23:03.000Z | 2021-11-12T08:28:13.000Z | test/test_npu/test_network_ops/test_slow_conv_dilated2d_backward.py | Ascend/pytorch | 39849cf72dafe8d2fb68bd1679d8fd54ad60fcfc | [
"BSD-3-Clause"
] | null | null | null | # Copyright (c) 2020, Huawei Technologies.All rights reserved.
#
# Licensed under the BSD 3-Clause License (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# https://opensource.org/licenses/BSD-3-Clause
#
# Unless required by applicable law... | 40.71134 | 114 | 0.652317 |
0bc9eca7dac51b6b620dcc2e64659de0152e8044 | 1,418 | py | Python | tensorflow/basic-rl/extra/egoallocentric/qlearn.py | gopala-kr/ds-notebooks | bc35430ecdd851f2ceab8f2437eec4d77cb59423 | [
"MIT"
] | 1 | 2019-05-10T09:16:23.000Z | 2019-05-10T09:16:23.000Z | tensorflow/basic-rl/extra/egoallocentric/qlearn.py | gopala-kr/ds-notebooks | bc35430ecdd851f2ceab8f2437eec4d77cb59423 | [
"MIT"
] | null | null | null | tensorflow/basic-rl/extra/egoallocentric/qlearn.py | gopala-kr/ds-notebooks | bc35430ecdd851f2ceab8f2437eec4d77cb59423 | [
"MIT"
] | 1 | 2019-10-14T07:30:18.000Z | 2019-10-14T07:30:18.000Z | import random
class QLearn:
def __init__(self, actions, epsilon=0.1, alpha=0.2, gamma=0.9):
self.q = {}
self.epsilon = epsilon
self.alpha = alpha
self.gamma = gamma
self.actions = actions
def getQ(self, state, action):
return self.q.get((state, ac... | 27.269231 | 77 | 0.504231 |
0436b22f5586b713eee6e56aa25b9f97b5b0355d | 2,728 | py | Python | Textadventure/enemies.py | clemens2107/textadventure | 870f3ff98accdadad386a2cae4bd4328341f7eb9 | [
"CC0-1.0"
] | null | null | null | Textadventure/enemies.py | clemens2107/textadventure | 870f3ff98accdadad386a2cae4bd4328341f7eb9 | [
"CC0-1.0"
] | null | null | null | Textadventure/enemies.py | clemens2107/textadventure | 870f3ff98accdadad386a2cae4bd4328341f7eb9 | [
"CC0-1.0"
] | null | null | null | # -*- coding: utf-8 -*-
import sys
from inventory import game_inventory
# basic commands for Player and Enemies
class Character:
def __init__(self, name, level, hp, attack):
self.name = name
self.level = level
self.hp = hp
self.attack = attack
def ge... | 34.1 | 107 | 0.557551 |
f0ca2adcedbc33bc60cbc6d375d82c05408299d3 | 1,377 | py | Python | mltrain-nips-2017/lu_jensen/visdial_workshop.pytorch/script/download.py | gopala-kr/ds-notebooks | bc35430ecdd851f2ceab8f2437eec4d77cb59423 | [
"MIT"
] | 123 | 2017-10-05T00:29:34.000Z | 2022-03-28T14:16:06.000Z | mltrain-nips-2017/lu_jensen/visdial_workshop.pytorch/script/download.py | gopala-kr/ds-notebooks | bc35430ecdd851f2ceab8f2437eec4d77cb59423 | [
"MIT"
] | 13 | 2017-10-23T09:33:33.000Z | 2022-01-05T09:42:29.000Z | mltrain-nips-2017/lu_jensen/visdial_workshop.pytorch/script/download.py | gopala-kr/ds-notebooks | bc35430ecdd851f2ceab8f2437eec4d77cb59423 | [
"MIT"
] | 37 | 2017-10-06T09:47:05.000Z | 2020-06-27T21:06:01.000Z | import os
import argparse
import json
def download_model(path):
os.system('wget https://filebox.ece.vt.edu/~jiasenlu/codeRelease/visDial.pytorch/model/HCIAE-D-MLE.pth -P %s' %(path))
os.system('wget https://filebox.ece.vt.edu/~jiasenlu/codeRelease/visDial.pytorch/model/HCIAE-G-MLE.pth -P %s' %(path))
os.sy... | 40.5 | 125 | 0.694989 |
f0fb1401741feb362bbd662eb4b746276e0a5db3 | 4,760 | py | Python | pk/data/cluster/dcluster/DCplot.py | gwdgithubnom/ox-patient | cddf4fe381cb4506db8e0d62803dd2044cf7ad92 | [
"MIT"
] | null | null | null | pk/data/cluster/dcluster/DCplot.py | gwdgithubnom/ox-patient | cddf4fe381cb4506db8e0d62803dd2044cf7ad92 | [
"MIT"
] | null | null | null | pk/data/cluster/dcluster/DCplot.py | gwdgithubnom/ox-patient | cddf4fe381cb4506db8e0d62803dd2044cf7ad92 | [
"MIT"
] | 1 | 2021-04-14T00:45:38.000Z | 2021-04-14T00:45:38.000Z | import matplotlib.pyplot as plt
import matplotlib.cm as cm
import numpy as np
try:
input = raw_input
except NameError:
pass
def plot1(rho, delta):
f, axarr = plt.subplots(1,3)
axarr[0].set_title('DECISION GRAPH')
axarr[0].scatter(rho, delta, alpha=0.6,c='white')
axarr[0].set_xlabel(r'$\rho$')
... | 40 | 130 | 0.521008 |
5027e8355d36bf04f0c112c9f3e4bba459864ab7 | 1,668 | py | Python | solutions/pedestrian_search/webserver/src/preprocessor/preprocess.py | naetimus/bootcamp | 0182992df7c54012944b51fe9b70532ab6a0059b | [
"Apache-2.0"
] | 1 | 2021-01-11T18:40:22.000Z | 2021-01-11T18:40:22.000Z | solutions/pedestrian_search/webserver/src/preprocessor/preprocess.py | naetimus/bootcamp | 0182992df7c54012944b51fe9b70532ab6a0059b | [
"Apache-2.0"
] | null | null | null | solutions/pedestrian_search/webserver/src/preprocessor/preprocess.py | naetimus/bootcamp | 0182992df7c54012944b51fe9b70532ab6a0059b | [
"Apache-2.0"
] | null | null | null | import torch
import pickle
import os
import re
import numpy as np
class Vocabulary(object):
"""
Vocabulary wrapper
"""
def __init__(self, vocab, unk_id):
"""
:param vocab: A dictionary of word to word_id
:param unk_id: Id of the bad/unknown words
"""
self._vocab ... | 28.758621 | 88 | 0.651079 |
aca8d89dfb2f0ba984f928d5db803b1678c9ddd5 | 18,310 | py | Python | deploy/deployctl/subcommands/setup.py | broadinstitute/gnomadjs | 00da72cdc2cb0753f822c51456ec15147c024a1d | [
"MIT"
] | 38 | 2018-02-24T02:33:52.000Z | 2020-03-03T23:17:04.000Z | deploy/deployctl/subcommands/setup.py | broadinstitute/gnomadjs | 00da72cdc2cb0753f822c51456ec15147c024a1d | [
"MIT"
] | 385 | 2018-02-21T16:53:13.000Z | 2020-03-04T00:52:40.000Z | deploy/deployctl/subcommands/setup.py | broadinstitute/gnomadjs | 00da72cdc2cb0753f822c51456ec15147c024a1d | [
"MIT"
] | 12 | 2018-02-22T09:45:43.000Z | 2020-02-27T21:37:52.000Z | import argparse
import os
import subprocess
import sys
import typing
from deployctl.config import config
from deployctl.shell import gcloud, kubectl
def create_network() -> None:
# Create a VPC network
# https://cloud.google.com/vpc/docs/using-vpc
gcloud(["compute", "networks", "create", config.network_n... | 37.443763 | 130 | 0.57089 |
acd6efd9e8f50b5a815ac06731ec431052a7ae6c | 5,590 | py | Python | deploy/deployctl/subcommands/ingress_demo.py | broadinstitute/gnomadjs | 00da72cdc2cb0753f822c51456ec15147c024a1d | [
"MIT"
] | 38 | 2018-02-24T02:33:52.000Z | 2020-03-03T23:17:04.000Z | deploy/deployctl/subcommands/ingress_demo.py | broadinstitute/gnomadjs | 00da72cdc2cb0753f822c51456ec15147c024a1d | [
"MIT"
] | 385 | 2018-02-21T16:53:13.000Z | 2020-03-04T00:52:40.000Z | deploy/deployctl/subcommands/ingress_demo.py | broadinstitute/gnomadjs | 00da72cdc2cb0753f822c51456ec15147c024a1d | [
"MIT"
] | 13 | 2020-05-01T13:03:54.000Z | 2022-02-28T13:12:57.000Z | import argparse
import json
import sys
import typing
from deployctl.shell import kubectl, get_most_recent_k8s_deployment, k8s_deployment_exists
SERVICES_MANIFEST_TEMPLATE = """---
apiVersion: v1
kind: Service
metadata:
name: gnomad-browser-demo-{name}
labels:
tier: demo
spec:
type: NodePort
selector:
... | 31.055556 | 114 | 0.667084 |
8c4b13245b4f6407b447482b78dcd943c17cb2d7 | 544 | py | Python | Chapter7_CNN/Chapter7_1_CNN_Layers/cnnPoolingExercise.py | thisisjako/UdemyTF | ee4102391ed6bd50f764955f732f5740425a9209 | [
"MIT"
] | null | null | null | Chapter7_CNN/Chapter7_1_CNN_Layers/cnnPoolingExercise.py | thisisjako/UdemyTF | ee4102391ed6bd50f764955f732f5740425a9209 | [
"MIT"
] | null | null | null | Chapter7_CNN/Chapter7_1_CNN_Layers/cnnPoolingExercise.py | thisisjako/UdemyTF | ee4102391ed6bd50f764955f732f5740425a9209 | [
"MIT"
] | null | null | null | import matplotlib.pyplot as plt
import numpy as np
from tensorflow.keras.datasets import mnist
def max_pooling(image: np.ndarray) -> np.ndarray:
return image
if __name__ == "__main__":
(x_train, y_train), (x_test, y_test) = mnist.load_data()
image = x_train[0]
image = image.reshape((28... | 20.923077 | 61 | 0.648897 |
fa0c338dc5f7f06fbccfdd9f1a4372059129f474 | 1,174 | py | Python | doc/precursers/2019_09-Sneakernet/Sneakernet/lib/crypto.py | Kyrus1999/BACnet | 5be8e1377252166041bcd0b066cce5b92b077d06 | [
"MIT"
] | 8 | 2020-03-17T21:12:18.000Z | 2021-12-12T15:55:54.000Z | doc/precursers/2019_09-Sneakernet/Sneakernet/lib/crypto.py | Kyrus1999/BACnet | 5be8e1377252166041bcd0b066cce5b92b077d06 | [
"MIT"
] | 2 | 2021-07-19T06:18:43.000Z | 2022-02-10T12:17:58.000Z | doc/precursers/2019_09-Sneakernet/Sneakernet/lib/crypto.py | Kyrus1999/BACnet | 5be8e1377252166041bcd0b066cce5b92b077d06 | [
"MIT"
] | 25 | 2020-03-20T09:32:45.000Z | 2021-07-18T18:12:59.000Z | # sn/lib/crypto.py
import nacl.signing
import nacl.encoding
import nacl.public
import nacl.exceptions
class ED25519:
def __init__(self):
self.seed = 0
self.public = b'...'
self.private = b'...'
def create(self):
self.private = nacl.signing.SigningKey.generate()
self.... | 28.634146 | 155 | 0.637138 |
d770888b54825a08f97cbd070d4c129fb21f481a | 469 | py | Python | aoc2020/day_06/part_1.py | en0/aoc2020 | a2f41b909dffe1f366682b3d03fd5fbdbc924ec0 | [
"MIT"
] | null | null | null | aoc2020/day_06/part_1.py | en0/aoc2020 | a2f41b909dffe1f366682b3d03fd5fbdbc924ec0 | [
"MIT"
] | null | null | null | aoc2020/day_06/part_1.py | en0/aoc2020 | a2f41b909dffe1f366682b3d03fd5fbdbc924ec0 | [
"MIT"
] | null | null | null | from aoc2020 import *
class Solution(SolutionABC):
expected = 11
c2i = lambda s, c: ord(c) - ord('a')
def solve(self) -> any:
rt, yes_answers = 0, [0] * 26
for line in self.resource_lines("input"):
if line == "":
rt += sum(yes_answers)
yes_answe... | 26.055556 | 49 | 0.481876 |
d7974da8bbf5e403d236e2c68eaf74a868ce4dc8 | 8,027 | py | Python | bawwab/process.py | leibniz-psychology/bawwab | 2e7129bf59b33c0ee22a960e7b2835888068fd1a | [
"MIT"
] | 2 | 2021-07-06T06:00:22.000Z | 2022-01-15T09:29:44.000Z | bawwab/process.py | leibniz-psychology/bawwab | 2e7129bf59b33c0ee22a960e7b2835888068fd1a | [
"MIT"
] | 11 | 2020-11-26T10:53:44.000Z | 2022-03-31T09:42:51.000Z | bawwab/process.py | leibniz-psychology/bawwab | 2e7129bf59b33c0ee22a960e7b2835888068fd1a | [
"MIT"
] | 1 | 2022-01-15T09:30:46.000Z | 2022-01-15T09:30:46.000Z | # Copyright 2019–2020 Leibniz Institute for Psychology
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
# in the Software without restriction, including without limitation the rights
# to use, copy, modify, ... | 28.164912 | 93 | 0.715087 |
ad4662206e33c20e56a1fade3a06ca5072536ede | 630 | py | Python | 2-resources/__CHEAT-SHEETS/cheatsheets-master/cheatsheets-master/dynamodb/python/put_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/put_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/put_item.py | eengineergz/Lambda | 1fe511f7ef550aed998b75c18a432abf6ab41c5f | [
"MIT"
] | 51 | 2019-06-10T06:11:46.000Z | 2022-03-30T16:33:05.000Z | import boto3
import time
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.put_item(
TableName='gamescores',
Item={
'event': {'S': 'gaming_nationals_zaf'},
'timestamp': {'S'... | 27.391304 | 152 | 0.553968 |
0f5d0cddda3c664f3f7f55c9990e8437eb487fd3 | 1,494 | py | Python | python/oneflow/compatible/single_client/eager/symbol_storage.py | wangyuyue/oneflow | 0a71c22fe8355392acc8dc0e301589faee4c4832 | [
"Apache-2.0"
] | 3,285 | 2020-07-31T05:51:22.000Z | 2022-03-31T15:20:16.000Z | python/oneflow/compatible/single_client/eager/symbol_storage.py | wangyuyue/oneflow | 0a71c22fe8355392acc8dc0e301589faee4c4832 | [
"Apache-2.0"
] | 2,417 | 2020-07-31T06:28:58.000Z | 2022-03-31T23:04:14.000Z | python/oneflow/compatible/single_client/eager/symbol_storage.py | wangyuyue/oneflow | 0a71c22fe8355392acc8dc0e301589faee4c4832 | [
"Apache-2.0"
] | 520 | 2020-07-31T05:52:42.000Z | 2022-03-29T02:38:11.000Z | """
Copyright 2020 The OneFlow Authors. All rights reserved.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agr... | 27.163636 | 72 | 0.797189 |
7e6542c7b400777a95a566476ea1e47469e60131 | 1,150 | py | Python | hardware/chip/rtl872xd/ota.py | wstong999/AliOS-Things | 6554769cb5b797e28a30a4aa89b3f4cb2ef2f5d9 | [
"Apache-2.0"
] | 4,538 | 2017-10-20T05:19:03.000Z | 2022-03-30T02:29:30.000Z | hardware/chip/rtl872xd/ota.py | wstong999/AliOS-Things | 6554769cb5b797e28a30a4aa89b3f4cb2ef2f5d9 | [
"Apache-2.0"
] | 1,088 | 2017-10-21T07:57:22.000Z | 2022-03-31T08:15:49.000Z | hardware/chip/rtl872xd/ota.py | willianchanlovegithub/AliOS-Things | 637c0802cab667b872d3b97a121e18c66f256eab | [
"Apache-2.0"
] | 1,860 | 2017-10-20T05:22:35.000Z | 2022-03-27T10:54:14.000Z | import sys, hashlib, os
import struct
# changed by yanxiaoyong.yxy
# https://blog.csdn.net/qq_43192819/article/details/108981008
# https://blog.csdn.net/whatday/article/details/107769032
def MD5(input):
md5 = hashlib.md5()
md5.update(input)
return bytes.fromhex(md5.hexdigest())
#return md5.hexdigest... | 24.468085 | 61 | 0.678261 |
7e9b7e885bc1c710abc5a0eb937f3b1108c5536c | 2,238 | py | Python | sketches/amoeba1/amoeba.py | kantel/processingpy | 74aae222e46f68d1c8f06307aaede3cdae65c8ec | [
"MIT"
] | 4 | 2018-06-03T02:11:46.000Z | 2021-08-18T19:55:15.000Z | sketches/amoeba1/amoeba.py | kantel/processingpy | 74aae222e46f68d1c8f06307aaede3cdae65c8ec | [
"MIT"
] | null | null | null | sketches/amoeba1/amoeba.py | kantel/processingpy | 74aae222e46f68d1c8f06307aaede3cdae65c8ec | [
"MIT"
] | 3 | 2019-12-23T19:12:51.000Z | 2021-04-30T14:00:31.000Z | class Amoeba():
def __init__(self, _x, _y, _diameter, _x_speed, _y_speed):
self.location = PVector(_x, _y)
self.propulsion = PVector(_x_speed, _y_speed)
self.d = _diameter
self.nucleus = {
"fill": color(random(20, 250), random(20, 250), random(20, 250)),
... | 43.882353 | 107 | 0.474978 |
7d0ade7b3e80647082216e36294fd69cff725b82 | 2,610 | py | Python | Fake_Info.py | Peufra/Fake_Information | 81fe4e2cd5b64422589fca392ba4aa3bfb490e3a | [
"CC0-1.0"
] | null | null | null | Fake_Info.py | Peufra/Fake_Information | 81fe4e2cd5b64422589fca392ba4aa3bfb490e3a | [
"CC0-1.0"
] | null | null | null | Fake_Info.py | Peufra/Fake_Information | 81fe4e2cd5b64422589fca392ba4aa3bfb490e3a | [
"CC0-1.0"
] | null | null | null | from faker import Faker
from faker import Faker
import faker
from requests import get, post
from urllib.request import Request, urlopen
import os
import re
import json
from colorama import Fore, Back, Style, init
import time
fake = Faker()
init()
print(Fore.BLUE + """ooooooooo. .o... | 40.78125 | 428 | 0.543295 |
1df8b8fdbe41c3e1a7e0d44f323ed54cc30843c1 | 1,182 | py | Python | official/nlp/gnmt_v2/src/gnmt_model/__init__.py | leelige/mindspore | 5199e05ba3888963473f2b07da3f7bca5b9ef6dc | [
"Apache-2.0"
] | 77 | 2021-10-15T08:32:37.000Z | 2022-03-30T13:09:11.000Z | official/nlp/gnmt_v2/src/gnmt_model/__init__.py | leelige/mindspore | 5199e05ba3888963473f2b07da3f7bca5b9ef6dc | [
"Apache-2.0"
] | 3 | 2021-10-30T14:44:57.000Z | 2022-02-14T06:57:57.000Z | official/nlp/gnmt_v2/src/gnmt_model/__init__.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... | 35.818182 | 79 | 0.71912 |
382918293ab6bef46d86efa511c89aa12bc1f0c3 | 861 | py | Python | csv_to_plot/CSV_to_Radar.py | d4v1d-247/Ultrasonic-Code | cc1b01e078aec9bfa08272b2e633ac9ff0ebd148 | [
"Unlicense"
] | null | null | null | csv_to_plot/CSV_to_Radar.py | d4v1d-247/Ultrasonic-Code | cc1b01e078aec9bfa08272b2e633ac9ff0ebd148 | [
"Unlicense"
] | null | null | null | csv_to_plot/CSV_to_Radar.py | d4v1d-247/Ultrasonic-Code | cc1b01e078aec9bfa08272b2e633ac9ff0ebd148 | [
"Unlicense"
] | 1 | 2021-03-19T11:38:41.000Z | 2021-03-19T11:38:41.000Z | import matplotlib.pyplot as plt
import numpy as np
from math import pi
import os
import sys
if not len(sys.argv) >= 2:
for f in os.listdir():
if f.endswith(".csv"):
File = f
print(f"Nutze {f}")
if not File:
print("Konnte keine .csv Datei finden.")
exit()
else:
... | 21 | 69 | 0.623693 |
aa7faf5fb2300877bbacf11e580aa3e967dc283d | 2,924 | py | Python | apps/facerecog/aifacerec_keras_train.py | Obyoxar/RobolabStatistics | 08343ca3ac49df7efdac33692d7cc4b783e851f5 | [
"MIT"
] | 2 | 2017-11-30T21:12:11.000Z | 2017-12-01T07:52:43.000Z | apps/facerecog/aifacerec_keras_train.py | Obyoxar/RobolabStatistics | 08343ca3ac49df7efdac33692d7cc4b783e851f5 | [
"MIT"
] | 14 | 2017-11-14T18:12:53.000Z | 2018-06-03T16:07:57.000Z | apps/facerecog/aifacerec_keras_train.py | Obyoxar/RobolabStatistics | 08343ca3ac49df7efdac33692d7cc4b783e851f5 | [
"MIT"
] | 3 | 2018-02-05T10:40:03.000Z | 2018-02-09T09:29:19.000Z | import numpy as np
from keras.models import Sequential
from keras.layers import Input, Lambda, Dense, Dropout
from keras.models import Model, load_model
from keras.optimizers import RMSprop
from keras.callbacks import TensorBoard
from sklearn.model_selection import train_test_split
from os import path
from robolib.kera... | 31.44086 | 102 | 0.74487 |
2d92bd5e71e4ad6af086c44f9461bbc82aefe356 | 429 | py | Python | python/deep_learning/MLWP/day1/reg.py | SayanGhoshBDA/code-backup | 8b6135facc0e598e9686b2e8eb2d69dd68198b80 | [
"MIT"
] | 16 | 2018-11-26T08:39:42.000Z | 2019-05-08T10:09:52.000Z | python/deep_learning/MLWP/day1/reg.py | SayanGhoshBDA/code-backup | 8b6135facc0e598e9686b2e8eb2d69dd68198b80 | [
"MIT"
] | 8 | 2020-05-04T06:29:26.000Z | 2022-02-12T05:33:16.000Z | python/deep_learning/MLWP/day1/reg.py | SayanGhoshBDA/code-backup | 8b6135facc0e598e9686b2e8eb2d69dd68198b80 | [
"MIT"
] | 5 | 2020-02-11T16:02:21.000Z | 2021-02-05T07:48:30.000Z | # Regression model -- simple
import pandas as pd
import quandl
df = quandl.get('WIKI/GOOGL')
print(df.head())
df = df[['Adj. Open','Adj. High','Adj. Low','Adj. Close','Adj. Volume']]
df ['HL_PCT'] = (df['Adj. High']- df['Adj. Close'])/df['Adj. Close'] * 100
df ['PCT_change'] = (df['Adj. Close']- df['Adj. Open'... | 17.875 | 78 | 0.587413 |
fa8b16e4d099a109f53cede4e354d5733ed5c6d0 | 1,033 | py | Python | leetcode/318-Maximum-Product-of-Word-Lengths/MaxProdofWordLens_001.py | cc13ny/all-in | bc0b01e44e121ea68724da16f25f7e24386c53de | [
"MIT"
] | 1 | 2015-12-16T04:01:03.000Z | 2015-12-16T04:01:03.000Z | leetcode/318-Maximum-Product-of-Word-Lengths/MaxProdofWordLens_001.py | cc13ny/all-in | bc0b01e44e121ea68724da16f25f7e24386c53de | [
"MIT"
] | 1 | 2016-02-09T06:00:07.000Z | 2016-02-09T07:20:13.000Z | leetcode/318-Maximum-Product-of-Word-Lengths/MaxProdofWordLens_001.py | cc13ny/all-in | bc0b01e44e121ea68724da16f25f7e24386c53de | [
"MIT"
] | 2 | 2019-06-27T09:07:26.000Z | 2019-07-01T04:40:13.000Z | class Solution(object):
def maxProduct(self, words):
"""
:type words: List[str]
:rtype: int
"""
ones = [0] * 26
t = 1
for i in range(26):
ones[i] = t
t = t << 1
pairs = []
for word in words:
rep = 0
... | 25.825 | 52 | 0.354308 |
17d5a1aba5ac3e7587c0b3d69bb74f5894dc014a | 869 | py | Python | Hackergame_2019/regex/run.py | Wycers/Codelib | 86d83787aa577b8f2d66b5410e73102411c45e46 | [
"MIT"
] | 22 | 2018-08-07T06:55:10.000Z | 2021-06-12T02:12:19.000Z | Hackergame_2019/regex/run.py | Wycers/Codelib | 86d83787aa577b8f2d66b5410e73102411c45e46 | [
"MIT"
] | 28 | 2020-03-04T23:47:22.000Z | 2022-02-26T18:50:00.000Z | Hackergame_2019/regex/run.py | Wycers/Codelib | 86d83787aa577b8f2d66b5410e73102411c45e46 | [
"MIT"
] | 4 | 2019-11-09T15:41:26.000Z | 2021-10-10T08:56:57.000Z | #!/usr/bin/env python3
# import signal
import re
def flag(*args, **kwargs):
print(open("flag").read())
exit()
def main():
print("Welcome to the free online Regular Expression Verifier")
print("Please enter your RegEx and string and I will match them for you\n")
# r = input("RegEx: ")
r = "... | 20.690476 | 79 | 0.575374 |
10488ca6fbf27e12a6864a7cf071ae7a7c4c282c | 257 | py | Python | packages/watchmen-inquiry-trino/src/watchmen_inquiry_trino/trino_storage_helper.py | Indexical-Metrics-Measure-Advisory/watchmen | c54ec54d9f91034a38e51fd339ba66453d2c7a6d | [
"MIT"
] | null | null | null | packages/watchmen-inquiry-trino/src/watchmen_inquiry_trino/trino_storage_helper.py | Indexical-Metrics-Measure-Advisory/watchmen | c54ec54d9f91034a38e51fd339ba66453d2c7a6d | [
"MIT"
] | null | null | null | packages/watchmen-inquiry-trino/src/watchmen_inquiry_trino/trino_storage_helper.py | Indexical-Metrics-Measure-Advisory/watchmen | c54ec54d9f91034a38e51fd339ba66453d2c7a6d | [
"MIT"
] | null | null | null | from watchmen_auth import PrincipalService
from .trino_storage import TrinoStorage
from .trino_storage_spi import TrinoStorageSPI
def ask_trino_topic_storage(principal_service: PrincipalService) -> TrinoStorageSPI:
return TrinoStorage(principal_service)
| 32.125 | 84 | 0.875486 |
21d26ea5b2f73c47ee4b9c4b1140867ef43ee458 | 8,862 | py | Python | research/nlp/atae_lstm/infer/utils/data_processor.py | leelige/mindspore | 5199e05ba3888963473f2b07da3f7bca5b9ef6dc | [
"Apache-2.0"
] | 77 | 2021-10-15T08:32:37.000Z | 2022-03-30T13:09:11.000Z | research/nlp/atae_lstm/infer/utils/data_processor.py | leelige/mindspore | 5199e05ba3888963473f2b07da3f7bca5b9ef6dc | [
"Apache-2.0"
] | 3 | 2021-10-30T14:44:57.000Z | 2022-02-14T06:57:57.000Z | research/nlp/atae_lstm/infer/utils/data_processor.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... | 35.733871 | 103 | 0.583051 |
80548596c98f90eacc8a15a1edd90d9d09b56a6b | 4,412 | py | Python | rfvision/datasets/pipelines/__init__.py | mvig-robotflow/rfvision | cc662f213dfe5a3e8864a6b5685a668a4436e397 | [
"Apache-2.0"
] | 6 | 2021-09-25T03:53:06.000Z | 2022-02-19T03:25:11.000Z | rfvision/datasets/pipelines/__init__.py | mvig-robotflow/rfvision | cc662f213dfe5a3e8864a6b5685a668a4436e397 | [
"Apache-2.0"
] | 1 | 2021-07-21T13:14:54.000Z | 2021-07-21T13:14:54.000Z | rfvision/datasets/pipelines/__init__.py | mvig-robotflow/rfvision | cc662f213dfe5a3e8864a6b5685a668a4436e397 | [
"Apache-2.0"
] | 2 | 2021-07-16T03:25:04.000Z | 2021-11-22T06:04:01.000Z | from .auto_augment import (AutoAugment, BrightnessTransform, ColorTransform,
ContrastTransform, EqualizeTransform, Rotate, Shear,
Translate)
from .compose import Compose
from .formating import (Collect, DefaultFormatBundle, ImageToTensor,
ToD... | 56.564103 | 108 | 0.714869 |
d506769f805aac5e70233f4e62891db24abcb9e0 | 2,809 | py | Python | Sorting/src/iterative_sorting/iterative_sorting.py | tobias-fyi/02_algorithms | ab1a8a07c3560ad66712992e3af906e8fd316fe2 | [
"MIT"
] | null | null | null | Sorting/src/iterative_sorting/iterative_sorting.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/Sorting/src/iterative_sorting/iterative_sorting.py | tobias-fyi/vela | b0b3d3c6dc3fa397c8c7a492098a02cf75e0ff82 | [
"MIT"
] | null | null | null | """
Algorithms :: Iterative sorting
"""
# Import time to track algorithm runtime
import time
# Test list to use while writing functionality
unsorted = [18, 70, 1, 54, 84, 48, 7, 28, 96, 13, 2, 77, 63, 46, 87, 73, 52, 29]
# Implement the Bubble Sort function below
def bubble_sort(arr: list):
"""Simple implementat... | 31.920455 | 83 | 0.656461 |
d54f52068009fc04947c9d12fcfab330256b6e01 | 1,758 | py | Python | zplus_scraper/database.py | tstaec/ZplusScraper | 38c4f9534b8ee3822a80b48a6827ef4f52793c0b | [
"MIT"
] | null | null | null | zplus_scraper/database.py | tstaec/ZplusScraper | 38c4f9534b8ee3822a80b48a6827ef4f52793c0b | [
"MIT"
] | 1 | 2021-07-04T12:02:57.000Z | 2021-07-04T12:02:57.000Z | zplus_scraper/database.py | tstaec/ZplusScraper | 38c4f9534b8ee3822a80b48a6827ef4f52793c0b | [
"MIT"
] | null | null | null | from __future__ import print_function
import mysql.connector
from mysql.connector import errorcode
TABLES = {}
TABLES['articles'] = (
"CREATE TABLE `articles` ("
" `id` bigint(20) NOT NULL AUTO_INCREMENT,"
" `created` DATETIME NOT NULL,"
" `last_modified` DATETIME NOT NULL,"
" `title` varchar(... | 30.310345 | 88 | 0.600683 |
898e2b06ef819766b936482763aa64a96f137037 | 593 | py | Python | Packs/DeveloperTools/Scripts/VerifyEnoughIndicators/VerifyEnoughIndicators.py | diCagri/content | c532c50b213e6dddb8ae6a378d6d09198e08fc9f | [
"MIT"
] | 799 | 2016-08-02T06:43:14.000Z | 2022-03-31T11:10:11.000Z | Packs/DeveloperTools/Scripts/VerifyEnoughIndicators/VerifyEnoughIndicators.py | diCagri/content | c532c50b213e6dddb8ae6a378d6d09198e08fc9f | [
"MIT"
] | 9,317 | 2016-08-07T19:00:51.000Z | 2022-03-31T21:56:04.000Z | Packs/DeveloperTools/Scripts/VerifyEnoughIndicators/VerifyEnoughIndicators.py | diCagri/content | c532c50b213e6dddb8ae6a378d6d09198e08fc9f | [
"MIT"
] | 1,297 | 2016-08-04T13:59:00.000Z | 2022-03-31T23:43:06.000Z | import demistomock as demisto # noqa: F401
from CommonServerPython import * # noqa: F401
def main():
args = demisto.args()
query = args.get('query')
size = int(args.get('size'))
query_result = demisto.searchIndicators(query=query, size=1, page=0)
total = query_result.get('total', 0)
outputs ... | 28.238095 | 112 | 0.652614 |
89fe1456dd016cce14384a3075621c648ed2ed48 | 571 | py | Python | 1.Array/Python/rotate_array.py | Vinaypatil-Ev/vinEvC_datastructure | 3e02e49c03a2b7d2e09af9a2dce080e6d9abbf74 | [
"MIT"
] | 3 | 2020-09-10T18:40:40.000Z | 2020-09-15T17:32:12.000Z | 1.Array/Python/rotate_array.py | Vinaypatil-Ev/vinEvC_datastructure | 3e02e49c03a2b7d2e09af9a2dce080e6d9abbf74 | [
"MIT"
] | null | null | null | 1.Array/Python/rotate_array.py | Vinaypatil-Ev/vinEvC_datastructure | 3e02e49c03a2b7d2e09af9a2dce080e6d9abbf74 | [
"MIT"
] | null | null | null | # block swap algorithm of array rotation
def rotateArr(arr, d, n):
if d == n or d == 0:
return
a = d
b = n - d
while a != b:
if a < b:
swap(arr, d - a, d + b - a, a)
b -= a
else:
swap(arr, d - a, d, b)
a -= b
swap(arr, d - a, d... | 20.392857 | 42 | 0.411559 |
c3e2320a25a02bf234d5b76d4efefda894d94e69 | 504 | py | Python | pacman-arch/test/pacman/tests/sync702.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/sync702.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/sync702.py | Scottx86-64/dotfiles-1 | 51004b1e2b032664cce6b553d2052757c286087d | [
"Unlicense"
] | 1 | 2021-09-26T08:44:40.000Z | 2021-09-26T08:44:40.000Z | self.description = "incoming package replaces symlink with directory (order 2)"
lp = pmpkg("pkg2")
lp.files = ["usr/lib/foo",
"lib -> usr/lib"]
self.addpkg2db("local", lp)
p1 = pmpkg("pkg1")
p1.files = ["lib/bar"]
self.addpkg2db("sync", p1)
p2 = pmpkg("pkg2", "1.0-2")
p2.files = ["usr/lib/foo"]
self.addp... | 22.909091 | 79 | 0.662698 |
7f2410b24a5e3fb09e1591c0cc0edd0f8de1e586 | 1,472 | py | Python | setup.py | fourpoints/mumath | f1c36c4a5b3c32a3e7f8e7a922eafea8b7a14fd4 | [
"MIT"
] | null | null | null | setup.py | fourpoints/mumath | f1c36c4a5b3c32a3e7f8e7a922eafea8b7a14fd4 | [
"MIT"
] | null | null | null | setup.py | fourpoints/mumath | f1c36c4a5b3c32a3e7f8e7a922eafea8b7a14fd4 | [
"MIT"
] | null | null | null | from setuptools import setup, find_packages
from pathlib import Path
from distutils.util import convert_path
# Import __version__ (ugly, but works)
version = Path(__file__).parent / "mumath" / "config.py"
exec(version.read_text(encoding="utf-8"))
long_description = """
# Mumath
Mumath is a LATEX-like to MathML conv... | 25.37931 | 76 | 0.632473 |
f675bd2bd9ec9cf6b9aab9fcf33eb53d520ba972 | 1,682 | py | Python | h_RNN/Playground.py | leoatchina/MachineLearning | 071f2c0fc6f5af3d9550cfbeafe8d537c35a76d3 | [
"MIT"
] | 1,107 | 2016-09-21T02:18:36.000Z | 2022-03-29T02:52:12.000Z | h_RNN/Playground.py | leoatchina/MachineLearning | 071f2c0fc6f5af3d9550cfbeafe8d537c35a76d3 | [
"MIT"
] | 18 | 2016-12-22T10:24:47.000Z | 2022-03-11T23:18:43.000Z | h_RNN/Playground.py | leoatchina/MachineLearning | 071f2c0fc6f5af3d9550cfbeafe8d537c35a76d3 | [
"MIT"
] | 776 | 2016-12-21T12:08:08.000Z | 2022-03-21T06:12:08.000Z | import numpy as np
class RNN1:
def __init__(self, u, v, w):
self._u, self._v, self._w = np.asarray(u), np.asarray(v), np.asarray(w)
self._states = None
def activate(self, x):
return x
def transform(self, x):
return x
def run(self, x):
output = ... | 29.508772 | 80 | 0.483948 |
9ca8f8355f8186cfd99e092effd5ab17e7b9de8b | 427 | py | Python | visitor_counter/settings.py | jcromerohdz/FlaskDev | 29539259cba3a0e18c205fb439ee916fb12e5318 | [
"MIT"
] | null | null | null | visitor_counter/settings.py | jcromerohdz/FlaskDev | 29539259cba3a0e18c205fb439ee916fb12e5318 | [
"MIT"
] | null | null | null | visitor_counter/settings.py | jcromerohdz/FlaskDev | 29539259cba3a0e18c205fb439ee916fb12e5318 | [
"MIT"
] | null | null | null | import os
SECRETE_KEY = os.getenv('SECRETE_KEY')
DB_USERNAME = os.environ['DB_USERNAME']
DB_PASSWORD = os.environ['DB_PASSWORD']
DB_HOST = os.environ['DB_HOST']
DATABASE_NAME = os.environ['DATABASE_NAME']
DB_URI = 'postgresql://%s:%s@%s:5433/%s' %(DB_USERNAME, DB_PASSWORD, DB_HOST, DATABASE_NAME)
SQLALCHEMY_DATABASE_U... | 38.818182 | 92 | 0.796253 |
0d52b233db509fe88e6fbce55fb1cc5ac23a3425 | 724 | py | Python | testbed1/navi_app.py | Benny93/HMI-Protocol | 5f98873129acebed1b2b3cf4376c2733907ead70 | [
"MIT"
] | null | null | null | testbed1/navi_app.py | Benny93/HMI-Protocol | 5f98873129acebed1b2b3cf4376c2733907ead70 | [
"MIT"
] | null | null | null | testbed1/navi_app.py | Benny93/HMI-Protocol | 5f98873129acebed1b2b3cf4376c2733907ead70 | [
"MIT"
] | 1 | 2019-10-20T20:35:23.000Z | 2019-10-20T20:35:23.000Z | #!/usr/bin/python3
import can
import time
import constants as const
from app_c import AppController, start_app
class NavigationApp(AppController):
def __init__(self, ):
self.filter = [{"can_id": const.NAV_HMI_RESP, "can_mask": 0x7FF}]
self.request_arbitration_id = const.NAV_HMI_REQ
super()... | 28.96 | 83 | 0.660221 |
2e95e538378b3f06e6d64411340884156d7b3d6e | 17,882 | py | Python | EXPERT-ZONE1-main/EXPERT-ZONE1.py | Zusyaku/Termux-And-Lali-Linux-V2 | b1a1b0841d22d4bf2cc7932b72716d55f070871e | [
"Apache-2.0"
] | 2 | 2021-11-17T03:35:03.000Z | 2021-12-08T06:00:31.000Z | EXPERT-ZONE1-main/EXPERT-ZONE1.py | Zusyaku/Termux-And-Lali-Linux-V2 | b1a1b0841d22d4bf2cc7932b72716d55f070871e | [
"Apache-2.0"
] | null | null | null | EXPERT-ZONE1-main/EXPERT-ZONE1.py | Zusyaku/Termux-And-Lali-Linux-V2 | b1a1b0841d22d4bf2cc7932b72716d55f070871e | [
"Apache-2.0"
] | 2 | 2021-11-05T18:07:48.000Z | 2022-02-24T21:25:07.000Z | #!/usr/bin/python2
#coding=utf-8
# Python Auto Dis Parser 1.1.0
# Author : THANDA-BABA | MR AKASH
# https://www.facebook.com/Thanda.Babaa
# https://www.facebook.com/Thanda.Babaa
# ------------------------------------------
# Embedded File : AKASH
# Python Bytecode : 2.7 (62211)
# Decompiled at : Mon April ... | 43.936118 | 330 | 0.40633 |
d30944faa368f03d442519616404c4c3512b5bb0 | 842 | py | Python | raspberry-code/licht.py | maschnetwork/raspberry-alexa-iot | e75d1f1363010beacc105536cf6866e4f9fe9f7f | [
"MIT"
] | null | null | null | raspberry-code/licht.py | maschnetwork/raspberry-alexa-iot | e75d1f1363010beacc105536cf6866e4f9fe9f7f | [
"MIT"
] | null | null | null | raspberry-code/licht.py | maschnetwork/raspberry-alexa-iot | e75d1f1363010beacc105536cf6866e4f9fe9f7f | [
"MIT"
] | null | null | null | import time
from gpiozero import LED
from cloud import Cloud
r = LED(17)
b = LED(27)
g = LED(22)
def callback(state):
color = state.get('color', 'off')
print('light changed', color)
if color == 'rot':
r.on()
g.off()
b.off()
elif color == 'blau':
r.off()
g.off()
... | 17.914894 | 37 | 0.431116 |
d38423075c8353838ce22b17bd2c4ea3aaf0306e | 502 | py | Python | source/pkgsrc/finance/electrum/patches/patch-setup.py | Scottx86-64/dotfiles-1 | 51004b1e2b032664cce6b553d2052757c286087d | [
"Unlicense"
] | 1 | 2021-11-20T22:46:39.000Z | 2021-11-20T22:46:39.000Z | source/pkgsrc/finance/electrum/patches/patch-setup.py | Scottx86-64/dotfiles-1 | 51004b1e2b032664cce6b553d2052757c286087d | [
"Unlicense"
] | null | null | null | source/pkgsrc/finance/electrum/patches/patch-setup.py | Scottx86-64/dotfiles-1 | 51004b1e2b032664cce6b553d2052757c286087d | [
"Unlicense"
] | null | null | null | $NetBSD: patch-setup.py,v 1.1 2021/05/15 09:50:08 nia Exp $
Install desktop files on all operating systems.
--- setup.py.orig 2000-11-11 11:11:11.000000000 +0000
+++ setup.py
@@ -32,7 +32,7 @@ version_spec.loader.exec_module(version_
data_files = []
-if platform.system() in ['Linux', 'FreeBSD', 'DragonFly']:
+if... | 31.375 | 81 | 0.675299 |
9f3d2ebcf26917e4321c5ecc80a458c42a77a327 | 850 | py | Python | PMIa/2014/KHASANOVA_I_F/task_6_30.py | YukkaSarasti/pythonintask | eadf4245abb65f4400a3bae30a4256b4658e009c | [
"Apache-2.0"
] | null | null | null | PMIa/2014/KHASANOVA_I_F/task_6_30.py | YukkaSarasti/pythonintask | eadf4245abb65f4400a3bae30a4256b4658e009c | [
"Apache-2.0"
] | null | null | null | PMIa/2014/KHASANOVA_I_F/task_6_30.py | YukkaSarasti/pythonintask | eadf4245abb65f4400a3bae30a4256b4658e009c | [
"Apache-2.0"
] | null | null | null | # Задача 6. Вариант 30.
# Создайте игру, в которой компьютер загадывает название одного из двенадцати
# месяцев, а игрок должен его угадать.
# Khasanova I. F.
# 31.03.2016
import random
name = random.randint(1,12)
if name == 1 :
name = 'Январь'
elif name == 2 :
name = 'Февраль'
elif name == 3 :
name... | 19.767442 | 77 | 0.597647 |
e2afa4a63d3f56ea2d09b3ed4fdc023cf1eef366 | 518 | py | Python | python/python_backup/PRAC_PYTHON/a35.py | SayanGhoshBDA/code-backup | 8b6135facc0e598e9686b2e8eb2d69dd68198b80 | [
"MIT"
] | 16 | 2018-11-26T08:39:42.000Z | 2019-05-08T10:09:52.000Z | python/python_backup/PRAC_PYTHON/a35.py | SayanGhoshBDA/code-backup | 8b6135facc0e598e9686b2e8eb2d69dd68198b80 | [
"MIT"
] | 8 | 2020-05-04T06:29:26.000Z | 2022-02-12T05:33:16.000Z | python/python_backup/PRAC_PYTHON/a35.py | SayanGhoshBDA/code-backup | 8b6135facc0e598e9686b2e8eb2d69dd68198b80 | [
"MIT"
] | 5 | 2020-02-11T16:02:21.000Z | 2021-02-05T07:48:30.000Z | a=[]
for i in range(0,5,1):
k=input("Enter value:")
a.insert(i,k)
for i in range(0,5,1):
print a[i]
b=[]
for i in range(0,5,1):
k=input("Enter value:")
b.insert(i,k)
for i in range(0,5,1):
print b[i]
for i in range(0,5-1,1):
for j in range((i+1),5,1):
if a[i]>... | 21.583333 | 32 | 0.388031 |
392e1baa86d7a4b9bfd3d0f95e23a965f7a58a11 | 172 | py | Python | IF11C/ITT/Codes/beispiel1.py | Semoxeaa/sjsaueressig.github.io | 55f81360e1285b46bb67b89d16060479be297489 | [
"MIT"
] | 1 | 2021-12-13T08:07:14.000Z | 2021-12-13T08:07:14.000Z | IF11C/ITT/Codes/beispiel1.py | Semoxeaa/sjsaueressig.github.io | 55f81360e1285b46bb67b89d16060479be297489 | [
"MIT"
] | null | null | null | IF11C/ITT/Codes/beispiel1.py | Semoxeaa/sjsaueressig.github.io | 55f81360e1285b46bb67b89d16060479be297489 | [
"MIT"
] | null | null | null | parkplatz = [0,0,0,1,2,0,0,1]
while True:
i = 0
while i <= 9:
#strings in python können durch + oder , zusammengefügt werden
print("PP" , str(i))
| 21.5 | 71 | 0.55814 |
b37cfe0656660d10d7fc682079d0c7e502791d72 | 357 | py | Python | Language Proficiency/Python/Basic Data Types/Nested Lists/nested_lists.py | xuedong/hacker-rank | ce8a60f80c2c6935b427f9409d7e826ee0d26a89 | [
"MIT"
] | 1 | 2021-02-22T17:37:45.000Z | 2021-02-22T17:37:45.000Z | Language Proficiency/Python/Basic Data Types/Nested Lists/nested_lists.py | xuedong/hacker-rank | ce8a60f80c2c6935b427f9409d7e826ee0d26a89 | [
"MIT"
] | null | null | null | Language Proficiency/Python/Basic Data Types/Nested Lists/nested_lists.py | xuedong/hacker-rank | ce8a60f80c2c6935b427f9409d7e826ee0d26a89 | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
if __name__ == '__main__':
scores = []
for _ in range(int(input())):
name = input()
score = float(input())
scores.append([name, score])
second_lowest = sorted(list(set([score for _, score in scores])))[1]
print('\n'.join([name for name, score in sorted(s... | 25.5 | 88 | 0.596639 |
80c0d8bb6346b940780a8e431219d60a3d3f7877 | 233 | py | Python | WD/Cwiczenia/GenerowanieListy.py | galursa/UWM | b7ab4a275662764a91af6c5bc79da0d98177d0ac | [
"MIT"
] | 1 | 2020-02-29T14:38:33.000Z | 2020-02-29T14:38:33.000Z | WD/Cwiczenia/GenerowanieListy.py | galursa/UWM | b7ab4a275662764a91af6c5bc79da0d98177d0ac | [
"MIT"
] | null | null | null | WD/Cwiczenia/GenerowanieListy.py | galursa/UWM | b7ab4a275662764a91af6c5bc79da0d98177d0ac | [
"MIT"
] | null | null | null | #chcemy wygenerować listę liczb od 5 15
lista=[]
for i in range(5,15):
lista+=[i]
print(lista)
#Chcemy dodawać 1 tyle razy ile jest elementów
# w liście
licznik=0;
for j in lista:
licznik+=1
print(licznik)
| 14.5625 | 47 | 0.648069 |
4548b2cd18f43d3c66946a5c62eaf2dad3cd80fd | 1,115 | py | Python | LeetCode_problems/First Missing Positive/solution.py | gbrls/CompetitiveCode | b6f1b817a655635c3c843d40bd05793406fea9c6 | [
"MIT"
] | 165 | 2020-10-03T08:01:11.000Z | 2022-03-31T02:42:08.000Z | LeetCode_problems/First Missing Positive/solution.py | gbrls/CompetitiveCode | b6f1b817a655635c3c843d40bd05793406fea9c6 | [
"MIT"
] | 383 | 2020-10-03T07:39:11.000Z | 2021-11-20T07:06:35.000Z | LeetCode_problems/First Missing Positive/solution.py | gbrls/CompetitiveCode | b6f1b817a655635c3c843d40bd05793406fea9c6 | [
"MIT"
] | 380 | 2020-10-03T08:05:04.000Z | 2022-03-19T06:56:59.000Z | # Observations:
# 1. The first missing positive number cannot be negative. So discard nums[i]<0
# 2. The numbers greater than the array length cannot be the missing number
# Approach:
# 1. We can use the array index for storing and storing the values to its respective index of array i.e. nums[nums[i]]=nums[i]
# 2. Las... | 39.821429 | 126 | 0.603587 |
45e19e95e63dd4c8212aebe2a825c5f22fb4a3eb | 1,328 | py | Python | CI-Python/qa327_test/integration/test_purchasing.py | michael-fourie/Mags_Co | b9c8ae1730fabde3da95ed0f271ff061505a06c2 | [
"MIT"
] | 3 | 2020-11-06T21:54:57.000Z | 2020-12-10T22:06:24.000Z | CI-Python/qa327_test/integration/test_purchasing.py | michael-fourie/Mags_Co | b9c8ae1730fabde3da95ed0f271ff061505a06c2 | [
"MIT"
] | 3 | 2020-11-30T01:04:41.000Z | 2020-12-13T19:29:45.000Z | CI-Python/qa327_test/integration/test_purchasing.py | michael-fourie/Mags_Co | b9c8ae1730fabde3da95ed0f271ff061505a06c2 | [
"MIT"
] | 3 | 2020-11-23T19:25:41.000Z | 2022-02-04T15:18:19.000Z | import pytest
from seleniumbase import BaseCase
from qa327_test.conftest import base_url
# integration testing: the test case interacts with the
# browser, and test the whole system (frontend+backend).
@pytest.mark.usefixtures('server')
class Purchased(BaseCase):
def register(self):
"""register new use... | 27.666667 | 71 | 0.599398 |
b330bf7c489ff85c2eb5b01687e65c532da9ae36 | 1,436 | py | Python | scripts/ue01_turtlesim_richtung_zum_ziel/ue01_dir_to_goal_mit_fkt.py | ProfJust/Ruhr-TurtleBot-Competition-RTC- | 5c2425bee331b4d5033757a9425676932d111775 | [
"Unlicense",
"MIT"
] | null | null | null | scripts/ue01_turtlesim_richtung_zum_ziel/ue01_dir_to_goal_mit_fkt.py | ProfJust/Ruhr-TurtleBot-Competition-RTC- | 5c2425bee331b4d5033757a9425676932d111775 | [
"Unlicense",
"MIT"
] | null | null | null | scripts/ue01_turtlesim_richtung_zum_ziel/ue01_dir_to_goal_mit_fkt.py | ProfJust/Ruhr-TurtleBot-Competition-RTC- | 5c2425bee331b4d5033757a9425676932d111775 | [
"Unlicense",
"MIT"
] | null | null | null | #!/usr/bin/env python
# --- ue01_dir_to_goal.py ------
# Version vom 11.10.2021 by OJ
# Weg zum Ziel in der TurtleSim berechnen
# ---------------------------------------
# Import math Library wegen atan2()
import math
def EingabePose():
# --- Eingabe Pose ------
eingabe = input(" Pose x ? >:") # str
x ... | 26.109091 | 57 | 0.600975 |
b36bc91f33f498370eb03a41e79a3e60bfd446d1 | 1,741 | py | Python | src/onegov/user/forms/reset_password.py | politbuero-kampagnen/onegov-cloud | 20148bf321b71f617b64376fe7249b2b9b9c4aa9 | [
"MIT"
] | null | null | null | src/onegov/user/forms/reset_password.py | politbuero-kampagnen/onegov-cloud | 20148bf321b71f617b64376fe7249b2b9b9c4aa9 | [
"MIT"
] | null | null | null | src/onegov/user/forms/reset_password.py | politbuero-kampagnen/onegov-cloud | 20148bf321b71f617b64376fe7249b2b9b9c4aa9 | [
"MIT"
] | null | null | null | from onegov.form import Form
from onegov.user import _
from onegov.user import UserCollection
from wtforms import HiddenField, StringField, PasswordField, validators
class RequestPasswordResetForm(Form):
""" A generic password reset request form for onegov.user. """
email = StringField(
label=_("E-Ma... | 30.017241 | 77 | 0.642734 |
2fe52696624698a7fdf57140f328063c22d890a5 | 622 | py | Python | exercises/es/test_03_03.py | tuanducdesign/spacy-course | f8d092c5fa2997fccb3f367d174dce8667932b3d | [
"MIT"
] | 2 | 2020-07-07T01:46:37.000Z | 2021-04-20T03:19:43.000Z | exercises/es/test_03_03.py | tuanducdesign/spacy-course | f8d092c5fa2997fccb3f367d174dce8667932b3d | [
"MIT"
] | null | null | null | exercises/es/test_03_03.py | tuanducdesign/spacy-course | f8d092c5fa2997fccb3f367d174dce8667932b3d | [
"MIT"
] | null | null | null | def test():
assert nlp.meta["name"] == "core_news_sm", "¿Estás cargando el pipeline correcto?"
assert nlp.meta["lang"] == "es", "¿Estás cargando el pipeline correcto?"
assert (
"print(nlp.pipe_names)" in __solution__
), "¿Estás imprimiendo en pantalla los nombres de los componentes del pipeline?... | 41.466667 | 86 | 0.66881 |
ff2a8b9942b91bc0034e46de27043660adaf31af | 1,951 | py | Python | python/simstb_setzer.py | MarkusBreuer1964/SimSTB | d9a530a5457b4296961e09b955e99900a6ea9047 | [
"MIT"
] | null | null | null | python/simstb_setzer.py | MarkusBreuer1964/SimSTB | d9a530a5457b4296961e09b955e99900a6ea9047 | [
"MIT"
] | null | null | null | python/simstb_setzer.py | MarkusBreuer1964/SimSTB | d9a530a5457b4296961e09b955e99900a6ea9047 | [
"MIT"
] | 1 | 2020-11-26T09:42:53.000Z | 2020-11-26T09:42:53.000Z | """ SimSTB - Setzer für Werte
SimSTB - Simulation digitaler und analoger Ein- und Ausgaben
Das Modul Setzer stellt verschiedene Funktioen bereit, die als Reaktion auf Knöpfe
die Werte in den Austauschdateien setzen.
Name: Markus Breuer
Organisaion: STB
Erstellt: ... | 34.22807 | 86 | 0.665812 |
ff35768d2832ad2f7af331405cd285e946ba0cfb | 781 | py | Python | jumeaux/addons/did_challenge/sleep.py | ihatov08/jumeaux | 7d983474df4b6dcfa57ea1a66901fbc99ebababa | [
"MIT"
] | 11 | 2017-10-02T01:29:12.000Z | 2022-03-31T08:37:22.000Z | jumeaux/addons/did_challenge/sleep.py | ihatov08/jumeaux | 7d983474df4b6dcfa57ea1a66901fbc99ebababa | [
"MIT"
] | 79 | 2017-07-16T14:47:17.000Z | 2022-03-31T08:49:14.000Z | jumeaux/addons/did_challenge/sleep.py | ihatov08/jumeaux | 7d983474df4b6dcfa57ea1a66901fbc99ebababa | [
"MIT"
] | 2 | 2019-01-28T06:11:58.000Z | 2021-01-25T07:21:21.000Z | # -*- coding:utf-8 -*-
import random
import time
from owlmixin import OwlMixin
from jumeaux.addons.did_challenge import DidChallengeExecutor
from jumeaux.models import DidChallengeAddOnPayload, DidChallengeAddOnReference
from jumeaux.logger import Logger
logger: Logger = Logger(__name__)
class Config(OwlMixin):
... | 25.193548 | 122 | 0.737516 |
ff9969c3219306548f5b6a960742b1987d96748b | 1,037 | py | Python | tests/test_frame.py | S0S-90/geocachingTooly | a6ed356d0187dd517a9436a83bded3752d488db5 | [
"MIT"
] | null | null | null | tests/test_frame.py | S0S-90/geocachingTooly | a6ed356d0187dd517a9436a83bded3752d488db5 | [
"MIT"
] | null | null | null | tests/test_frame.py | S0S-90/geocachingTooly | a6ed356d0187dd517a9436a83bded3752d488db5 | [
"MIT"
] | null | null | null | #!/usr/bin/python
# -*- coding: utf-8 -*-
"""provide general features for running tests, e.g. change the path to the sources folder"""
import unittest
from io import StringIO
import os
import sys
sys.path.append('../src') # for importing modules
os.chdir('../src') # switching path for using modules
saved_stdout =... | 30.5 | 92 | 0.717454 |
443a757bb34f4acd3a4c8e5623b2a11f0cbd65f9 | 311 | py | Python | python/coding_dojang/judge_decorator.py | zeroam/TIL | 43e3573be44c7f7aa4600ff8a34e99a65cbdc5d1 | [
"MIT"
] | null | null | null | python/coding_dojang/judge_decorator.py | zeroam/TIL | 43e3573be44c7f7aa4600ff8a34e99a65cbdc5d1 | [
"MIT"
] | null | null | null | python/coding_dojang/judge_decorator.py | zeroam/TIL | 43e3573be44c7f7aa4600ff8a34e99a65cbdc5d1 | [
"MIT"
] | null | null | null | def html_tag(tag):
def real_decorator(func):
def wrapper():
r = func()
r = f'<{tag}>{r}</{tag}>'
return r
return wrapper
return real_decorator
a, b = input().split()
@html_tag(a)
@html_tag(b)
def hello():
return 'Hello, world!'
print(hello())
| 16.368421 | 37 | 0.524116 |
927950fd0f10b98f10ecf91a079b7ab263d66909 | 27,931 | py | Python | src/onegov/org/forms/settings.py | politbuero-kampagnen/onegov-cloud | 20148bf321b71f617b64376fe7249b2b9b9c4aa9 | [
"MIT"
] | null | null | null | src/onegov/org/forms/settings.py | politbuero-kampagnen/onegov-cloud | 20148bf321b71f617b64376fe7249b2b9b9c4aa9 | [
"MIT"
] | null | null | null | src/onegov/org/forms/settings.py | politbuero-kampagnen/onegov-cloud | 20148bf321b71f617b64376fe7249b2b9b9c4aa9 | [
"MIT"
] | null | null | null | import re
from cached_property import cached_property
from lxml import etree
from wtforms.validators import NumberRange, InputRequired
from onegov.core.widgets import transform_structure
from onegov.core.widgets import XML_LINE_OFFSET
from onegov.form import Form
from onegov.form import with_options
from onegov.form.... | 31.347924 | 79 | 0.590956 |
927b84b993ae44504d9cc99d98ffa7f9778ab7c5 | 740 | py | Python | problems about math/dice/verify.py | MU001999/codeex | 23e300f9121a8d6bf4f4c9ec103510193808e9ba | [
"MIT"
] | 2 | 2019-01-27T14:16:09.000Z | 2019-05-25T10:05:24.000Z | problems about math/dice/verify.py | MU001999/codeex | 23e300f9121a8d6bf4f4c9ec103510193808e9ba | [
"MIT"
] | null | null | null | problems about math/dice/verify.py | MU001999/codeex | 23e300f9121a8d6bf4f4c9ec103510193808e9ba | [
"MIT"
] | 1 | 2020-11-05T05:17:28.000Z | 2020-11-05T05:17:28.000Z | from random import randint, shuffle
def dice():
return randint(1, 6)
def say_which(r, t):
vals = [i for i in range(1, 7) if i != r and i != t]
shuffle(vals)
return vals[0]
def cal_once():
real_result = dice()
think_result = dice()
which_not = say_which(real_result, think_result)
retur... | 21.142857 | 56 | 0.605405 |
921be47d1f62d6bc6736da85c24d233447a90cac | 1,161 | py | Python | python/asyncio/example_4.py | zeroam/TIL | 43e3573be44c7f7aa4600ff8a34e99a65cbdc5d1 | [
"MIT"
] | null | null | null | python/asyncio/example_4.py | zeroam/TIL | 43e3573be44c7f7aa4600ff8a34e99a65cbdc5d1 | [
"MIT"
] | null | null | null | python/asyncio/example_4.py | zeroam/TIL | 43e3573be44c7f7aa4600ff8a34e99a65cbdc5d1 | [
"MIT"
] | null | null | null | """
example_4.py
Just a short example demonstrating a simple state machine in Python
However, this one has delays that affect it
"""
import gevent
from gevent import monkey
monkey.patch_all()
import time
import queue
def task(name, work_queue):
while not work_queue.empty():
count = work_queue.get()
... | 22.326923 | 80 | 0.602067 |
a6778937278066c53744fa3857742d0b1367ce06 | 85 | py | Python | doc/examples/import_local_module/mod1.py | fluiddyn/transonic | a460e9f6d1139f79b668cb3306d1e8a7e190b72d | [
"BSD-3-Clause"
] | 88 | 2019-01-08T16:39:08.000Z | 2022-02-06T14:19:23.000Z | doc/examples/import_local_module/mod1.py | fluiddyn/transonic | a460e9f6d1139f79b668cb3306d1e8a7e190b72d | [
"BSD-3-Clause"
] | 13 | 2019-06-20T15:53:10.000Z | 2021-02-09T11:03:29.000Z | doc/examples/import_local_module/mod1.py | fluiddyn/transonic | a460e9f6d1139f79b668cb3306d1e8a7e190b72d | [
"BSD-3-Clause"
] | 1 | 2019-11-05T03:03:14.000Z | 2019-11-05T03:03:14.000Z |
import numpy as np
const = 1
def func_import():
return const + np.pi - np.pi
| 9.444444 | 32 | 0.635294 |
47125e0b0e69e8ec84027ed8479335567537b618 | 5,977 | py | Python | src/onegov/server/core.py | politbuero-kampagnen/onegov-cloud | 20148bf321b71f617b64376fe7249b2b9b9c4aa9 | [
"MIT"
] | null | null | null | src/onegov/server/core.py | politbuero-kampagnen/onegov-cloud | 20148bf321b71f617b64376fe7249b2b9b9c4aa9 | [
"MIT"
] | null | null | null | src/onegov/server/core.py | politbuero-kampagnen/onegov-cloud | 20148bf321b71f617b64376fe7249b2b9b9c4aa9 | [
"MIT"
] | null | null | null | import logging.config
from onegov.server.collection import ApplicationCollection
from webob import BaseRequest
from webob.exc import HTTPNotFound, HTTPForbidden
try:
from urllib.parse import urlparse
except ImportError:
from urlparse import urlparse
local_hostnames = {
'127.0.0.1',
'::1',
'local... | 32.840659 | 79 | 0.641794 |
5b3a59a6c69027c0d8739ee8ac1342f8efa7df9e | 159 | py | Python | graph_network/util/__init__.py | stevezheng23/graph_network_tf | b48a43453c2731f253bfe5a61e0b6339f4fc9f99 | [
"Apache-2.0"
] | null | null | null | graph_network/util/__init__.py | stevezheng23/graph_network_tf | b48a43453c2731f253bfe5a61e0b6339f4fc9f99 | [
"Apache-2.0"
] | null | null | null | graph_network/util/__init__.py | stevezheng23/graph_network_tf | b48a43453c2731f253bfe5a61e0b6339f4fc9f99 | [
"Apache-2.0"
] | null | null | null | __all__ = ["debug_logger", "train_logger", "eval_logger.py", "summary_writer", "result_writer",
"default_util", "param_util", "graph_network_util"]
| 53 | 95 | 0.698113 |
34188720d002dd04b5c32370c772739becc80367 | 4,290 | py | Python | src/onegov/election_day/views/archive.py | politbuero-kampagnen/onegov-cloud | 20148bf321b71f617b64376fe7249b2b9b9c4aa9 | [
"MIT"
] | null | null | null | src/onegov/election_day/views/archive.py | politbuero-kampagnen/onegov-cloud | 20148bf321b71f617b64376fe7249b2b9b9c4aa9 | [
"MIT"
] | null | null | null | src/onegov/election_day/views/archive.py | politbuero-kampagnen/onegov-cloud | 20148bf321b71f617b64376fe7249b2b9b9c4aa9 | [
"MIT"
] | null | null | null | from onegov.core.security import Public
from onegov.election_day import ElectionDayApp
from onegov.election_day.collections import ArchivedResultCollection
from onegov.election_day.collections.archived_results import (
SearchableArchivedResultCollection
)
from onegov.election_day.forms.archive import ArchiveSearchF... | 26 | 79 | 0.682984 |
3452f53addab46446614cf9be83f2e0f64365ea3 | 644 | py | Python | Gmail-Bruteforce/main.py | Zusyaku/Termux-And-Lali-Linux-V2 | b1a1b0841d22d4bf2cc7932b72716d55f070871e | [
"Apache-2.0"
] | 2 | 2021-11-17T03:35:03.000Z | 2021-12-08T06:00:31.000Z | Gmail-Bruteforce/main.py | Zusyaku/Termux-And-Lali-Linux-V2 | b1a1b0841d22d4bf2cc7932b72716d55f070871e | [
"Apache-2.0"
] | null | null | null | Gmail-Bruteforce/main.py | Zusyaku/Termux-And-Lali-Linux-V2 | b1a1b0841d22d4bf2cc7932b72716d55f070871e | [
"Apache-2.0"
] | 2 | 2021-11-05T18:07:48.000Z | 2022-02-24T21:25:07.000Z | from Core.gmailBrute import login
from Core.header import header
print(header)
operation = input("Select action\n\n1-)Gmail Brute Force\n2-)Yandex Brute Force\nChoose:")
if operation=="1":
data = input("1-)Mini Data\n2-)Big Data\n3-)Add yourself\nChoose:")
if data=="1":
login()
elif data=="... | 33.894737 | 91 | 0.586957 |
946cf10b0c389409a4f5950bb3af08c760ed493b | 8,311 | py | Python | sync.py | tjarbo/FileSync-python | ae56a0299218738e1c674405f836341882f4465c | [
"MIT"
] | null | null | null | sync.py | tjarbo/FileSync-python | ae56a0299218738e1c674405f836341882f4465c | [
"MIT"
] | null | null | null | sync.py | tjarbo/FileSync-python | ae56a0299218738e1c674405f836341882f4465c | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
## FileSync ##
from os import path
from os import system
import glob
## Config ##
PathOnC = ""
OrdnerName = "test"
print("\033[46m //####### ## // //####### \033[0m")
print("\033[46m // ## // // \033[0m")
print("\033[46m //##### ## // //######... | 34.485477 | 126 | 0.6045 |
b6f949e768307732605075e3a5be534bc082b935 | 5,140 | py | Python | mumath/markdown.py | fourpoints/mumath | f1c36c4a5b3c32a3e7f8e7a922eafea8b7a14fd4 | [
"MIT"
] | null | null | null | mumath/markdown.py | fourpoints/mumath | f1c36c4a5b3c32a3e7f8e7a922eafea8b7a14fd4 | [
"MIT"
] | null | null | null | mumath/markdown.py | fourpoints/mumath | f1c36c4a5b3c32a3e7f8e7a922eafea8b7a14fd4 | [
"MIT"
] | null | null | null | import markdown
import re
import xml.etree.ElementTree as ET
from markdown.blockprocessors import BlockProcessor
from markdown.inlinepatterns import InlineProcessor
from markdown.extensions import Extension
from .util import peek, pop
from .glyph import Glyph
from .lex import Lexer
from .grammar import MathParser
def... | 28.555556 | 82 | 0.578405 |
edf927eb8f6046116d30ec45b95f24c6f3603aa5 | 2,050 | py | Python | Computerorietierte_Mathematik/U9/qsort.py | qiaw99/Data-Structure | 3b1cdce96d4f35329ccfec29c03de57378ef0552 | [
"MIT"
] | 1 | 2019-10-29T08:21:41.000Z | 2019-10-29T08:21:41.000Z | Computerorietierte_Mathematik/U9/qsort.py | qiaw99/Data-Structure | 3b1cdce96d4f35329ccfec29c03de57378ef0552 | [
"MIT"
] | null | null | null | Computerorietierte_Mathematik/U9/qsort.py | qiaw99/Data-Structure | 3b1cdce96d4f35329ccfec29c03de57378ef0552 | [
"MIT"
] | null | null | null | __author__ = "Qianli Wang und Nazar Sopiha"
__copyright__ = "Copyright (c) 2019 qiaw99"
# https://github.com/qiaw99/WS2019-20/blob/master/LICENSE
#!/usr/bin/env python
# -*- coding: utf-8 -*-
import random
import numpy as np
import matplotlib.pyplot as plt
# Aufgabe 3
def quicksort(A, low, high):
global counter ... | 25.308642 | 62 | 0.514634 |
b633d9774d55f540aca7157c2c7db9eec77a7efd | 1,608 | py | Python | Contrib-Inspur/openbmc/poky/bitbake/lib/toaster/tests/commands/test_loaddata.py | opencomputeproject/Rack-Manager | e1a61d3eeeba0ff655fe9c1301e8b510d9b2122a | [
"MIT"
] | 5 | 2019-11-11T07:57:26.000Z | 2022-03-28T08:26:53.000Z | Contrib-Inspur/openbmc/poky/bitbake/lib/toaster/tests/commands/test_loaddata.py | opencomputeproject/Rack-Manager | e1a61d3eeeba0ff655fe9c1301e8b510d9b2122a | [
"MIT"
] | 3 | 2019-09-05T21:47:07.000Z | 2019-09-17T18:10:45.000Z | Contrib-Inspur/openbmc/poky/bitbake/lib/toaster/tests/commands/test_loaddata.py | opencomputeproject/Rack-Manager | e1a61d3eeeba0ff655fe9c1301e8b510d9b2122a | [
"MIT"
] | 11 | 2019-07-20T00:16:32.000Z | 2022-01-11T14:17:48.000Z | #! /usr/bin/env python
#
# BitBake Toaster Implementation
#
# Copyright (C) 2016 Intel Corporation
#
# SPDX-License-Identifier: GPL-2.0-only
#
from django.test import TestCase
from django.core import management
from orm.models import Layer_Version, Layer, Release, ToasterSetting
class TestLoadDataFixtures(TestCase)... | 32.16 | 78 | 0.65796 |
1e379835793f5e98a691af2de0104063f124dd99 | 598 | py | Python | INBa/2015/Ionova_A_K/task_5_8.py | YukkaSarasti/pythonintask | eadf4245abb65f4400a3bae30a4256b4658e009c | [
"Apache-2.0"
] | null | null | null | INBa/2015/Ionova_A_K/task_5_8.py | YukkaSarasti/pythonintask | eadf4245abb65f4400a3bae30a4256b4658e009c | [
"Apache-2.0"
] | null | null | null | INBa/2015/Ionova_A_K/task_5_8.py | YukkaSarasti/pythonintask | eadf4245abb65f4400a3bae30a4256b4658e009c | [
"Apache-2.0"
] | null | null | null | # Задача 5. Вариант 8.
# Напишите программу, которая бы при запуске случайным образом отображала название одного из семи дней недели.
# Ionova A.K.
# 30.04.2016
import random
print ("Программа случайным образом отображает название одного из семи дней недели.")
x = int (random.randint (1,7))
print ('\nОдин из дней - '... | 23 | 110 | 0.665552 |
1ed1db5694ff37a5ac97b369051b3b04d241d0bf | 397 | py | Python | leetcode/053-Maximum-Subarray/MaxSubarray_001.py | cc13ny/all-in | bc0b01e44e121ea68724da16f25f7e24386c53de | [
"MIT"
] | 1 | 2015-12-16T04:01:03.000Z | 2015-12-16T04:01:03.000Z | leetcode/053-Maximum-Subarray/MaxSubarray_001.py | cc13ny/all-in | bc0b01e44e121ea68724da16f25f7e24386c53de | [
"MIT"
] | 1 | 2016-02-09T06:00:07.000Z | 2016-02-09T07:20:13.000Z | leetcode/053-Maximum-Subarray/MaxSubarray_001.py | cc13ny/all-in | bc0b01e44e121ea68724da16f25f7e24386c53de | [
"MIT"
] | 2 | 2019-06-27T09:07:26.000Z | 2019-07-01T04:40:13.000Z | class Solution:
# @param {integer[]} nums
# @return {integer}
def maxSubArray(self, nums):
for i in range(1, len(nums)):
nums[i] += nums[i - 1]
minnum = nums[:]
for i in range(1, len(nums)):
minnum[i] = min(minnum[i - 1], nums[i - 1], 0)
for i in ran... | 24.8125 | 58 | 0.483627 |
bf5d1dd5e18064e781b9021d768c76901d852fe7 | 97 | py | Python | Python/Books/Learning-Programming-with-Python.Tamim-Shahriar-Subeen/chapter-006/ph-6.11-divisible-by-5-efeciently.py | shihab4t/Books-Code | b637b6b2ad42e11faf87d29047311160fe3b2490 | [
"Unlicense"
] | null | null | null | Python/Books/Learning-Programming-with-Python.Tamim-Shahriar-Subeen/chapter-006/ph-6.11-divisible-by-5-efeciently.py | shihab4t/Books-Code | b637b6b2ad42e11faf87d29047311160fe3b2490 | [
"Unlicense"
] | null | null | null | Python/Books/Learning-Programming-with-Python.Tamim-Shahriar-Subeen/chapter-006/ph-6.11-divisible-by-5-efeciently.py | shihab4t/Books-Code | b637b6b2ad42e11faf87d29047311160fe3b2490 | [
"Unlicense"
] | null | null | null | result = 0
for num in range(5, 101, 5):
print(num)
result += num
print("Sum is", result)
| 16.166667 | 28 | 0.597938 |
782e98d423a7b61203b9fe253ff48cdd09d94807 | 2,885 | py | Python | repo/service.vpn.manager/api.py | dbiesecke/dbiesecke.github.io | 5894473591f078fd22d1cb33794c5e656ae9b8dd | [
"MIT"
] | 1 | 2017-11-26T18:18:46.000Z | 2017-11-26T18:18:46.000Z | repo/service.vpn.manager/api.py | dbiesecke/dbiesecke.github.io | 5894473591f078fd22d1cb33794c5e656ae9b8dd | [
"MIT"
] | null | null | null | repo/service.vpn.manager/api.py | dbiesecke/dbiesecke.github.io | 5894473591f078fd22d1cb33794c5e656ae9b8dd | [
"MIT"
] | 3 | 2019-09-30T19:52:05.000Z | 2020-04-12T21:20:56.000Z | #!/usr/bin/python
# -*- coding: utf-8 -*-
#
# Copyright (C) 2016 Zomboided
#
# 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... | 37.960526 | 104 | 0.615251 |
785b0e91c31470aabc7e686bb3ebc4fa2e76a451 | 2,892 | py | Python | solutions/graph_based_recommend/webserver/src/indexer/tools.py | naetimus/bootcamp | 0182992df7c54012944b51fe9b70532ab6a0059b | [
"Apache-2.0"
] | 1 | 2021-04-06T06:13:20.000Z | 2021-04-06T06:13:20.000Z | solutions/graph_based_recommend/webserver/src/indexer/tools.py | naetimus/bootcamp | 0182992df7c54012944b51fe9b70532ab6a0059b | [
"Apache-2.0"
] | null | null | null | solutions/graph_based_recommend/webserver/src/indexer/tools.py | naetimus/bootcamp | 0182992df7c54012944b51fe9b70532ab6a0059b | [
"Apache-2.0"
] | null | null | null | import logging
from common.config import MYSQL_HOST, MYSQL_PORT, MYSQL_USER, MYSQL_PWD, MYSQL_DB
import pymysql
def connect_mysql():
try:
# conn = pymysql.connect(host="127.0.0.1",user="root",port=3306,password="123456",database="mysql", local_infile=True)
conn = pymysql.connect(host=MYSQL_HOST,us... | 31.434783 | 135 | 0.620332 |
787e10febbc219df00b3fd7d84ec3d1ec892b6c5 | 148 | py | Python | Scholien/admin.py | wmles/scholarium.at | d2356b3e475df772382e035ddcb839fc7dae4305 | [
"MIT"
] | 1 | 2017-07-24T10:19:36.000Z | 2017-07-24T10:19:36.000Z | Scholien/admin.py | wmles/scholarium.at | d2356b3e475df772382e035ddcb839fc7dae4305 | [
"MIT"
] | 9 | 2017-07-26T14:16:08.000Z | 2022-03-11T23:14:40.000Z | Scholien/admin.py | wmles/scholarium.at | d2356b3e475df772382e035ddcb839fc7dae4305 | [
"MIT"
] | 1 | 2017-03-07T12:38:23.000Z | 2017-03-07T12:38:23.000Z | from django.contrib import admin
from .models import *
# Register your models here.
admin.site.register(Buechlein)
admin.site.register(Artikel)
| 14.8 | 32 | 0.783784 |
ec8a749a74f33d6a604a2b278bf1d4477f71959c | 3,566 | py | Python | official/cv/posenet/infer/sdk/eval/eval_by_sdk.py | leelige/mindspore | 5199e05ba3888963473f2b07da3f7bca5b9ef6dc | [
"Apache-2.0"
] | 77 | 2021-10-15T08:32:37.000Z | 2022-03-30T13:09:11.000Z | official/cv/posenet/infer/sdk/eval/eval_by_sdk.py | leelige/mindspore | 5199e05ba3888963473f2b07da3f7bca5b9ef6dc | [
"Apache-2.0"
] | 3 | 2021-10-30T14:44:57.000Z | 2022-02-14T06:57:57.000Z | official/cv/posenet/infer/sdk/eval/eval_by_sdk.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... | 40.067416 | 103 | 0.577678 |
171ebbb8612b286dcbf2e5d4926042084d673009 | 8,026 | py | Python | source/pkgsrc/devel/py-hash/patches/patch-pyhash.py | Scottx86-64/dotfiles-1 | 51004b1e2b032664cce6b553d2052757c286087d | [
"Unlicense"
] | 1 | 2021-11-20T22:46:39.000Z | 2021-11-20T22:46:39.000Z | source/pkgsrc/devel/py-hash/patches/patch-pyhash.py | Scottx86-64/dotfiles-1 | 51004b1e2b032664cce6b553d2052757c286087d | [
"Unlicense"
] | null | null | null | source/pkgsrc/devel/py-hash/patches/patch-pyhash.py | Scottx86-64/dotfiles-1 | 51004b1e2b032664cce6b553d2052757c286087d | [
"Unlicense"
] | null | null | null | $NetBSD: patch-pyhash.py,v 1.1 2016/06/21 18:00:02 joerg Exp $
--- pyhash.py.orig 2014-07-29 06:26:59.000000000 +0000
+++ pyhash.py
@@ -58,9 +58,9 @@ class TestHasher(unittest.TestCase):
class TestFNV1(TestHasher):
def testFNV1_32(self):
self.doTest(hasher_type=fnv1_32,
- bytes_hash=3... | 43.383784 | 75 | 0.603663 |
da1990b0db509ba81a77de28c5940e1ecffc2c29 | 2,317 | py | Python | official/cv/yolov3_resnet18/ascend310_quant_infer/acc.py | leelige/mindspore | 5199e05ba3888963473f2b07da3f7bca5b9ef6dc | [
"Apache-2.0"
] | 77 | 2021-10-15T08:32:37.000Z | 2022-03-30T13:09:11.000Z | official/cv/yolov3_resnet18/ascend310_quant_infer/acc.py | leelige/mindspore | 5199e05ba3888963473f2b07da3f7bca5b9ef6dc | [
"Apache-2.0"
] | 3 | 2021-10-30T14:44:57.000Z | 2022-02-14T06:57:57.000Z | official/cv/yolov3_resnet18/ascend310_quant_infer/acc.py | leelige/mindspore | 5199e05ba3888963473f2b07da3f7bca5b9ef6dc | [
"Apache-2.0"
] | 24 | 2021-10-15T08:32:45.000Z | 2022-03-24T18:45:20.000Z | # Copyright 2021 Huawei Technologies Co., Ltd
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to... | 44.557692 | 114 | 0.673716 |
da5818972a6c3151a090483e0e4ea516f2c676d3 | 32,062 | py | Python | tests/onegov/gazette/test_pdf.py | politbuero-kampagnen/onegov-cloud | 20148bf321b71f617b64376fe7249b2b9b9c4aa9 | [
"MIT"
] | null | null | null | tests/onegov/gazette/test_pdf.py | politbuero-kampagnen/onegov-cloud | 20148bf321b71f617b64376fe7249b2b9b9c4aa9 | [
"MIT"
] | null | null | null | tests/onegov/gazette/test_pdf.py | politbuero-kampagnen/onegov-cloud | 20148bf321b71f617b64376fe7249b2b9b9c4aa9 | [
"MIT"
] | null | null | null | from freezegun import freeze_time
from io import BytesIO
from onegov.core.crypto import random_token
from onegov.file.utils import as_fileintent
from onegov.gazette.collections import GazetteNoticeCollection
from onegov.gazette.layout import Layout
from onegov.gazette.models import GazetteNotice
from onegov.gazette.mod... | 33.749474 | 79 | 0.486776 |
e50eb52d788bbcc519b5f8926227ccdf8e0e7078 | 2,047 | py | Python | steganoImageGet.py | SvelaT/StegWeb | 0031e177c6c4c18c75e872df3eec21c157327540 | [
"MIT"
] | 1 | 2020-11-01T19:39:03.000Z | 2020-11-01T19:39:03.000Z | steganoImageGet.py | SvelaT/StegWeb | 0031e177c6c4c18c75e872df3eec21c157327540 | [
"MIT"
] | null | null | null | steganoImageGet.py | SvelaT/StegWeb | 0031e177c6c4c18c75e872df3eec21c157327540 | [
"MIT"
] | 1 | 2020-11-01T19:42:51.000Z | 2020-11-01T19:42:51.000Z | from PIL import Image
import math
import sys
def getbytes(bitData):
byteLength = math.ceil(len(bitData)/4)
byteData = bytearray(byteLength)
bitConvert = [0] * 4
for i in range(byteLength):
bitConvert[0] = bitData[4*i]
bitConvert[1] = (bitData[4*i + 1])<<2
bitConvert[2] = (bitDat... | 24.369048 | 83 | 0.621886 |
e5dadac2a357c46c4163588dbcea8345c1fa08e5 | 383 | py | Python | pkg/build/builder/ansible/werf/__init__.py | kayanme/werf | 655dbdc5f5ddba6e604274d29ee3d885ed79559e | [
"Apache-2.0"
] | 1,426 | 2020-06-05T13:43:08.000Z | 2022-03-31T19:58:57.000Z | pkg/build/builder/ansible/werf/__init__.py | kayanme/werf | 655dbdc5f5ddba6e604274d29ee3d885ed79559e | [
"Apache-2.0"
] | 1,053 | 2020-06-17T14:58:08.000Z | 2022-03-31T15:44:52.000Z | pkg/build/builder/ansible/werf/__init__.py | kayanme/werf | 655dbdc5f5ddba6e604274d29ee3d885ed79559e | [
"Apache-2.0"
] | 84 | 2020-06-05T14:28:46.000Z | 2022-03-29T22:42:05.000Z | # -*- coding: utf-8 -*-
def termPrint(args):
import sys
orig_stdout = sys.stdout
term = open("/dev/pts/0", "wb+", buffering=0)
sys.stdout = term
print(args)
sys.stdout = orig_stdout
term.close()
STDOUT_UNIX_SOCK_NAME = '/.werf/ansible-tmpdir/local/ansible_live_stdout.sock'
STDERR_UNIX_SOCK... | 27.357143 | 78 | 0.691906 |
f9265b3512677041c9924b68cc5463568e5e5ecf | 4,598 | py | Python | 7-assets/past-student-repos/LambdaSchool-master/m7/71a1/applications/histo/histo.py | eengineergz/Lambda | 1fe511f7ef550aed998b75c18a432abf6ab41c5f | [
"MIT"
] | null | null | null | 7-assets/past-student-repos/LambdaSchool-master/m7/71a1/applications/histo/histo.py | eengineergz/Lambda | 1fe511f7ef550aed998b75c18a432abf6ab41c5f | [
"MIT"
] | null | null | null | 7-assets/past-student-repos/LambdaSchool-master/m7/71a1/applications/histo/histo.py | eengineergz/Lambda | 1fe511f7ef550aed998b75c18a432abf6ab41c5f | [
"MIT"
] | null | null | null | # This function takes a single filename string as an argument, e.g. robin.txt
# It should open the file, and work through it to produce the output.
from collections import OrderedDict
import operator
def word_count(s):
cache = {}
# Ignore each of the following characters: " : , . - + = / \ | [] {}() * ... | 43.790476 | 109 | 0.53284 |
972b7a90bc2dd7bdd1e0a410d47839ecadad6b10 | 163 | py | Python | Python/Courses/Python-Tutorials.Telusko/00.Fundamentals/08.14-Map-Function.py | shihab4t/Books-Code | b637b6b2ad42e11faf87d29047311160fe3b2490 | [
"Unlicense"
] | null | null | null | Python/Courses/Python-Tutorials.Telusko/00.Fundamentals/08.14-Map-Function.py | shihab4t/Books-Code | b637b6b2ad42e11faf87d29047311160fe3b2490 | [
"Unlicense"
] | null | null | null | Python/Courses/Python-Tutorials.Telusko/00.Fundamentals/08.14-Map-Function.py | shihab4t/Books-Code | b637b6b2ad42e11faf87d29047311160fe3b2490 | [
"Unlicense"
] | null | null | null | nums = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10]
evens = list(filter(lambda x : x % 2 == 0, nums))
print(evens)
evens = list(map(lambda x : x * 2, evens))
print(evens)
| 14.818182 | 49 | 0.552147 |
974a965b62e42228587ad3d040d2b4f589ffc8ac | 8,267 | py | Python | Lib/IBtoGCode_Helper.py | eeMKeey/IBtoGCode | 11b307615a38d371f6e78b70373c4cfaa1b23bdb | [
"MIT"
] | null | null | null | Lib/IBtoGCode_Helper.py | eeMKeey/IBtoGCode | 11b307615a38d371f6e78b70373c4cfaa1b23bdb | [
"MIT"
] | null | null | null | Lib/IBtoGCode_Helper.py | eeMKeey/IBtoGCode | 11b307615a38d371f6e78b70373c4cfaa1b23bdb | [
"MIT"
] | null | null | null | from Lib.IBtoGCode_Lib import get_slope_pos
import math
import mmap
import os
import numpy as np
import pandas as pd
from scipy.signal import medfilt, savgol_filter
from Lib import dataObject
def test_if_string_helper(doj: dataObject.DataFile):
with open(doj.pfad, 'rb', 0) as file, \
mmap.mmap(file.f... | 36.258772 | 126 | 0.612193 |
8add8b4792b5ed5efb515e5595a0bed863dddda3 | 6,798 | py | Python | deep-dream.py | jayChung0302/SideProject-sudalchongbo | fb0a3d0aee53ba24d3b8ec2dd8c52d0e8f6c33d7 | [
"MIT"
] | 1 | 2021-03-22T12:14:30.000Z | 2021-03-22T12:14:30.000Z | deep-dream.py | jayChung0302/SideProject-sudalchongbo | fb0a3d0aee53ba24d3b8ec2dd8c52d0e8f6c33d7 | [
"MIT"
] | null | null | null | deep-dream.py | jayChung0302/SideProject-sudalchongbo | fb0a3d0aee53ba24d3b8ec2dd8c52d0e8f6c33d7 | [
"MIT"
] | null | null | null | import torch
import torch.nn as nn
import torch.nn.functional as F
import torch.optim as optim
import torchvision
import torchvision.models as models
import torchvision.transforms as transforms
import torchvision.utils as vutils
import numpy as np
import cv2
import mypy
import random
import sys
from tqdm import tqdm
... | 40.706587 | 114 | 0.651662 |
c1a063b046efcb9234ff81fe2a7fab0041a406a0 | 1,878 | py | Python | opencv_tutorial/opencv_python_tutorials/Image_Processing/histogram.py | zeroam/TIL | 43e3573be44c7f7aa4600ff8a34e99a65cbdc5d1 | [
"MIT"
] | null | null | null | opencv_tutorial/opencv_python_tutorials/Image_Processing/histogram.py | zeroam/TIL | 43e3573be44c7f7aa4600ff8a34e99a65cbdc5d1 | [
"MIT"
] | null | null | null | opencv_tutorial/opencv_python_tutorials/Image_Processing/histogram.py | zeroam/TIL | 43e3573be44c7f7aa4600ff8a34e99a65cbdc5d1 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
"""
Created on Wed Apr 3 17:45:55 2019
@author: jone
"""
#%% Histogram in OpenCV
import cv2
from matplotlib import pyplot as plt
img1 = cv2.imread('img/flower1.jpg', 0)
img2 = cv2.imread('img/flower2.jpg', 0)
hist1 = cv2.calcHist([img1], [0], None, [256], [0,256])
hist2 = cv2.calcHist([img2... | 24.38961 | 75 | 0.658147 |
99bd80cc68556ebd8f830322a4b1408b8ea2dc15 | 1,729 | py | Python | Theories/DataStructures/QueueAndStack/StackDFS/TargetSum/target_sum.py | dolong2110/Algorithm-By-Problems-Python | 31ecc7367aaabdd2b0ac0af7f63ca5796d70c730 | [
"MIT"
] | 1 | 2021-08-16T14:52:05.000Z | 2021-08-16T14:52:05.000Z | Theories/DataStructures/QueueAndStack/StackDFS/TargetSum/target_sum.py | dolong2110/Algorithm-By-Problems-Python | 31ecc7367aaabdd2b0ac0af7f63ca5796d70c730 | [
"MIT"
] | null | null | null | Theories/DataStructures/QueueAndStack/StackDFS/TargetSum/target_sum.py | dolong2110/Algorithm-By-Problems-Python | 31ecc7367aaabdd2b0ac0af7f63ca5796d70c730 | [
"MIT"
] | null | null | null | from typing import List
# Naive approach
# def findTargetSumWays(nums: List[int], target: int) -> int:
# def get_target_sum(nums_list: List[int], cur_sum: int) -> int:
# if not nums_list:
# return int(cur_sum == target)
#
# return get_target_sum(nums_list[1:], cur_sum + nums_list[0]) + ... | 33.25 | 114 | 0.567958 |
6b8242b46894490ed1b3039125113f8f36710d4f | 262 | py | Python | Kapitel 2/Tanzkurs.py | mqng/HS-CO_WS2122_IF_FProg | b52470e0991bdbaeba22b154c4029e6cded51fd7 | [
"MIT"
] | null | null | null | Kapitel 2/Tanzkurs.py | mqng/HS-CO_WS2122_IF_FProg | b52470e0991bdbaeba22b154c4029e6cded51fd7 | [
"MIT"
] | null | null | null | Kapitel 2/Tanzkurs.py | mqng/HS-CO_WS2122_IF_FProg | b52470e0991bdbaeba22b154c4029e6cded51fd7 | [
"MIT"
] | null | null | null | damen = set(["Alina", "Mia", "Elsa", "Kali"])
herren = set(["John", "Jack", "James","Jacob"])
tanzlehrer = set(["Unisex"])
paare = set(tuple((d,h))
for d in damen|tanzlehrer
for h in herren|tanzlehrer
)
for p in paare:
print(p, " ")
| 23.818182 | 47 | 0.553435 |
d847c338b96009eee1e1454f8bdd211ae46a251d | 808 | py | Python | DataProcess/auto_rotation/phase_orientation_tag_pair.py | zhangupkai/RFID_Script | 9e05fad86e71dc6bd5dd12650d369f13d5a835c8 | [
"MIT"
] | null | null | null | DataProcess/auto_rotation/phase_orientation_tag_pair.py | zhangupkai/RFID_Script | 9e05fad86e71dc6bd5dd12650d369f13d5a835c8 | [
"MIT"
] | null | null | null | DataProcess/auto_rotation/phase_orientation_tag_pair.py | zhangupkai/RFID_Script | 9e05fad86e71dc6bd5dd12650d369f13d5a835c8 | [
"MIT"
] | null | null | null | import numpy as np
import pandas as pd
import matplotlib.pyplot as plt
from base_list import get_degree_list
# 相位随角度(9个固定角度)的变化
# tag1 = 'B034'
# tag2 = 'B029'
# tag1 = 'B016'
# tag2 = 'B023'
# tag1 = 'E002'
# tag2 = 'E006'
# tag1 = 'F001'
# tag2 = 'F005'
# tag1 = 'F001'
# tag2 = 'E006'
# tag1 = 'E002'
# tag2 = ... | 17.955556 | 92 | 0.632426 |
2b4ea9b58d5d43e79d57e079a112231de9faf8c3 | 142 | py | Python | faas/vmware-dispatch/examples/python3/http_func.py | smthkissinger/docker-images | 35e868295d04fa780325ada4168381f1e80e8fe4 | [
"BSD-3-Clause"
] | 63 | 2018-02-04T03:31:22.000Z | 2022-03-07T08:27:39.000Z | faas/vmware-dispatch/examples/python3/http_func.py | smthkissinger/docker-images | 35e868295d04fa780325ada4168381f1e80e8fe4 | [
"BSD-3-Clause"
] | 3 | 2020-06-15T03:41:03.000Z | 2020-06-15T03:41:04.000Z | faas/vmware-dispatch/examples/python3/http_func.py | smthkissinger/docker-images | 35e868295d04fa780325ada4168381f1e80e8fe4 | [
"BSD-3-Clause"
] | 40 | 2018-01-22T16:31:16.000Z | 2022-03-08T04:40:42.000Z | import time
import requests
def handle(ctx, payload):
resp = requests.get("http://example.com")
return {"status": resp.status_code}
| 17.75 | 45 | 0.697183 |
995ec17f762c77abd68d9db01a518600916f27f4 | 792 | py | Python | teams/team_snapback/dropbox_support.py | AbinMM/PYNQ_Hackathon_2017 | 711c75e8590b02f313295cef712188691690c948 | [
"BSD-3-Clause"
] | 19 | 2017-10-08T03:18:38.000Z | 2020-07-07T02:34:18.000Z | teams/team_snapback/dropbox_support.py | AbinMM/PYNQ_Hackathon_2017 | 711c75e8590b02f313295cef712188691690c948 | [
"BSD-3-Clause"
] | 2 | 2017-10-08T03:15:10.000Z | 2017-10-10T16:10:32.000Z | teams/team_snapback/dropbox_support.py | AbinMM/PYNQ_Hackathon_2017 | 711c75e8590b02f313295cef712188691690c948 | [
"BSD-3-Clause"
] | 28 | 2017-10-07T23:24:36.000Z | 2022-03-29T08:03:40.000Z | import dropbox, sys, os
import config
dbx = dropbox.Dropbox(config.dropbox_key)
project_dir = '/home/xilinx/jupyter_notebooks/nhan_dev/snapback1/capture_moments'
print('Attempting to upload...')
if not os.path.exists(project_dir):
project_dir = raw_input("Can't find videos. Enter the path of the snapback directory! ... | 31.68 | 90 | 0.713384 |
99a2149dccdb976d27c91a2aedd41af2eb9bf465 | 2,104 | py | Python | 2019/beginners/reversing-family-computer/test_disk_image.py | iicarus-bit/google-ctf | 4eb8742bca58ff071ff8f6814d41d9ec7eb1db4b | [
"Apache-2.0"
] | 2,757 | 2018-04-28T21:41:36.000Z | 2022-03-29T06:33:36.000Z | 2019/beginners/reversing-family-computer/test_disk_image.py | iicarus-bit/google-ctf | 4eb8742bca58ff071ff8f6814d41d9ec7eb1db4b | [
"Apache-2.0"
] | 20 | 2019-07-23T15:29:32.000Z | 2022-01-21T12:53:04.000Z | 2019/beginners/reversing-family-computer/test_disk_image.py | iicarus-bit/google-ctf | 4eb8742bca58ff071ff8f6814d41d9ec7eb1db4b | [
"Apache-2.0"
] | 449 | 2018-05-09T05:54:05.000Z | 2022-03-30T14:54:18.000Z | #!/usr/bin/python3
# Copyright 2019 Google LLC
#
# 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
#
# https://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or ag... | 31.878788 | 102 | 0.696293 |
7a4b227cb920bf06412c1a0b13585e517df99532 | 417 | py | Python | rrc/storage_backends.py | rocky-roll-call/rrc-backend | 02e8e11c3dab7661e48650e2e861a4a97788a4ce | [
"MIT"
] | null | null | null | rrc/storage_backends.py | rocky-roll-call/rrc-backend | 02e8e11c3dab7661e48650e2e861a4a97788a4ce | [
"MIT"
] | null | null | null | rrc/storage_backends.py | rocky-roll-call/rrc-backend | 02e8e11c3dab7661e48650e2e861a4a97788a4ce | [
"MIT"
] | null | null | null | """
File storage config
"""
from django_cleanup.signals import cleanup_pre_delete
from storages.backends.s3boto3 import S3Boto3Storage
class MediaStorage(S3Boto3Storage):
location = "media"
def sorl_delete(**kwargs):
"""
Function to delete thumbnails when deleting the original photo
"""
from so... | 18.130435 | 66 | 0.748201 |
64e5533f9a08a857ead43445b2b39e13035eb196 | 992 | py | Python | leetcode/004-Median-of-Two-Sorted-Arrays/Med2SortedArr_001.py | cc13ny/all-in | bc0b01e44e121ea68724da16f25f7e24386c53de | [
"MIT"
] | 1 | 2016-04-07T15:08:53.000Z | 2016-04-07T15:08:53.000Z | leetcode/004-Median-of-Two-Sorted-Arrays/Med2SortedArr_001.py | cc13ny/all-in | bc0b01e44e121ea68724da16f25f7e24386c53de | [
"MIT"
] | 1 | 2016-02-09T06:00:07.000Z | 2016-02-09T07:20:13.000Z | leetcode/004-Median-of-Two-Sorted-Arrays/Med2SortedArr_001.py | cc13ny/all-in | bc0b01e44e121ea68724da16f25f7e24386c53de | [
"MIT"
] | 2 | 2019-06-27T09:07:26.000Z | 2019-07-01T04:40:13.000Z | '''
same as: http://www.jiuzhang.com/solutions/median-of-two-sorted-arrays/
'''
class Solution:
# @param {integer[]} nums1
# @param {integer[]} nums2
# @return {float}
def findMedianSortedArrays(self, nums1, nums2):
A = nums1
B = nums2
n = len(A) + len(B)
if n % 2 ==... | 28.342857 | 74 | 0.455645 |
8596139f51f31e0784fc33582a6d392a21b91bd4 | 330 | py | Python | lib/util/PathFinding/pathfinding_algorithms.py | Thukor/MazeSolver | c953e193ce27a7348e8ec9c5592144426dfce193 | [
"MIT"
] | 5 | 2018-02-06T22:48:34.000Z | 2020-01-07T20:19:05.000Z | lib/util/PathFinding/pathfinding_algorithms.py | Thukor/MazeSolver | c953e193ce27a7348e8ec9c5592144426dfce193 | [
"MIT"
] | 11 | 2018-01-31T21:47:49.000Z | 2018-04-21T16:42:52.000Z | lib/util/PathFinding/pathfinding_algorithms.py | Thukor/MazeSolver | c953e193ce27a7348e8ec9c5592144426dfce193 | [
"MIT"
] | 2 | 2020-06-18T05:40:03.000Z | 2022-02-02T03:46:30.000Z | from networkx.algorithm.traversal import *
from networkx.algorithm.shortest_paths import *
def nx_shortest_path(G, start, end):
return shortest_path(G,start,end)
def a_star(G, start, end, heuristic):
return astar_path(G, start, end, heuristic)
def dijkstra_shortest_path(G, start, end):
return dijsktra_path(G, sta... | 25.384615 | 47 | 0.775758 |
8e5c58539c700962aa2bb2c85b1470ccc75df591 | 1,058 | py | Python | Apps/Model Evaluation/playground.py | RGreinacher/bachelor-thesis | 60dbc03ce40e3ec42f2538d67a6aabfea6fbbfc8 | [
"MIT"
] | 1 | 2021-04-13T10:00:46.000Z | 2021-04-13T10:00:46.000Z | Apps/Model Evaluation/playground.py | RGreinacher/bachelor-thesis | 60dbc03ce40e3ec42f2538d67a6aabfea6fbbfc8 | [
"MIT"
] | null | null | null | Apps/Model Evaluation/playground.py | RGreinacher/bachelor-thesis | 60dbc03ce40e3ec42f2538d67a6aabfea6fbbfc8 | [
"MIT"
] | null | null | null | import nltk
import pickle
import json
from nltk import Tree
from nltk import ChunkScore
from pprint import pprint as pp
from nltk.chunk.api import ChunkParserI
from os import listdir
from os.path import isfile, join
import maxent_chunker
POS_TAGGER_PATH = 'nltk_german_pos_classifier_data.pickle'
CHUNKER_PICKLE_NAME = ... | 24.604651 | 66 | 0.761815 |
8e63b0232a75cd3b8b175ffcc17d81427d6c2fa9 | 4,250 | py | Python | Txt.BoardGame/tools/lib/SvgWriter.py | okard/depot | ac10c2388799a76bfabf9ddf20b11cd2c516bcab | [
"MIT"
] | null | null | null | Txt.BoardGame/tools/lib/SvgWriter.py | okard/depot | ac10c2388799a76bfabf9ddf20b11cd2c516bcab | [
"MIT"
] | null | null | null | Txt.BoardGame/tools/lib/SvgWriter.py | okard/depot | ac10c2388799a76bfabf9ddf20b11cd2c516bcab | [
"MIT"
] | null | null | null |
# Svg Library
class SvgWriter:
"""SVG Writer Class to create SVG Files"""
# track internal state
# openTag: 'defs' 'symbol' 'svg' 'initial' 'end'
tabs = 0
stroke_color = "black"
stroke_width = "1px"
fill_color = "white"
ident = 0
font_family = 'Arial'
font_size = '1mm'... | 41.666667 | 226 | 0.570824 |
d91a38b1329820b80b169043e43ff21765b9bbec | 12,036 | py | Python | gemtown/gems/views.py | doramong0926/gemtown | 2c39284e3c68f0cc11994bed0ee2abaad0ea06b6 | [
"MIT"
] | null | null | null | gemtown/gems/views.py | doramong0926/gemtown | 2c39284e3c68f0cc11994bed0ee2abaad0ea06b6 | [
"MIT"
] | 5 | 2020-09-04T20:13:39.000Z | 2022-02-17T22:03:33.000Z | gemtown/gems/views.py | doramong0926/gemtown | 2c39284e3c68f0cc11994bed0ee2abaad0ea06b6 | [
"MIT"
] | null | null | null | from rest_framework.views import APIView
from rest_framework.response import Response
from rest_framework import status
from rest_framework.permissions import BasePermission, AllowAny, IsAdminUser, IsAuthenticated
from . import models, serializers
from gemtown.users import models as user_models
from django.conf import ... | 35.928358 | 93 | 0.556913 |
8df74ab21adea15dcddd1d505bfe6ed28770f919 | 8,623 | py | Python | mltrain-nips-2017/rose_yu/trnn.py | gopala-kr/ds-notebooks | bc35430ecdd851f2ceab8f2437eec4d77cb59423 | [
"MIT"
] | 1 | 2019-05-10T09:16:23.000Z | 2019-05-10T09:16:23.000Z | mltrain-nips-2017/rose_yu/trnn.py | gopala-kr/ds-notebooks | bc35430ecdd851f2ceab8f2437eec4d77cb59423 | [
"MIT"
] | null | null | null | mltrain-nips-2017/rose_yu/trnn.py | gopala-kr/ds-notebooks | bc35430ecdd851f2ceab8f2437eec4d77cb59423 | [
"MIT"
] | 1 | 2019-05-10T09:17:28.000Z | 2019-05-10T09:17:28.000Z | from __future__ import print_function
import tensorflow as tf
from tensorflow.python.ops import variable_scope as vs
from tensorflow.python.ops import array_ops
from tensorflow.python.ops import nn_ops
from tensorflow.python.ops.math_ops import tanh
from tensorflow.contrib.rnn import RNNCell
from tensorflow.python.uti... | 36.850427 | 122 | 0.647339 |
a5156a316fa192189577aaa8222643ab6c111a81 | 1,603 | py | Python | python_gui_tkinter/KALU/GARBAGE1/SAFE26JUL/GRBG/editable_tree.py | SayanGhoshBDA/code-backup | 8b6135facc0e598e9686b2e8eb2d69dd68198b80 | [
"MIT"
] | 16 | 2018-11-26T08:39:42.000Z | 2019-05-08T10:09:52.000Z | python_gui_tkinter/KALU/GARBAGE1/SAFE26JUL/GRBG/editable_tree.py | SayanGhoshBDA/code-backup | 8b6135facc0e598e9686b2e8eb2d69dd68198b80 | [
"MIT"
] | 8 | 2020-05-04T06:29:26.000Z | 2022-02-12T05:33:16.000Z | python_gui_tkinter/KALU/GARBAGE1/SAFE26JUL/GRBG/editable_tree.py | SayanGhoshBDA/code-backup | 8b6135facc0e598e9686b2e8eb2d69dd68198b80 | [
"MIT"
] | 5 | 2020-02-11T16:02:21.000Z | 2021-02-05T07:48:30.000Z | def onDoubleClick(self, event):
''' Executed, when a row is double-clicked. Opens
read-only EntryPopup above the item's column, so it is possible
to select text '''
# close previous popups
self.destroyPopups()
# what row and column was clicked on
rowid = self._tree.identify_row(event.y)
... | 28.625 | 67 | 0.613849 |
6938a12c22e15e51361a39cc90b99678a7125f9f | 1,447 | py | Python | ds/practice/daily_practice/21-04/distr_candies.py | tobias-fyi/vela | b0b3d3c6dc3fa397c8c7a492098a02cf75e0ff82 | [
"MIT"
] | null | null | null | ds/practice/daily_practice/21-04/distr_candies.py | tobias-fyi/vela | b0b3d3c6dc3fa397c8c7a492098a02cf75e0ff82 | [
"MIT"
] | 8 | 2020-03-24T17:47:23.000Z | 2022-03-12T00:33:21.000Z | ds/practice/daily_practice/21-04/distr_candies.py | tobias-fyi/vela | b0b3d3c6dc3fa397c8c7a492098a02cf75e0ff82 | [
"MIT"
] | null | null | null | """Distribute Candies - LeetCode Problem"""
from typing import List
class Solution:
def distributeCandies(self, candyType: List[int]) -> int:
# Calculate number of candies Alice can eat
# Find number of unique types of candies
# Return the lower of the two
pass
def distributeCan... | 25.385965 | 64 | 0.635107 |
6952431f068e4553c0484cec9dc8227724731cf5 | 1,082 | py | Python | wz/local/text_config.py | gradgrind/WZ | 672d93a3c9d7806194d16d6d5b9175e4046bd068 | [
"Apache-2.0"
] | null | null | null | wz/local/text_config.py | gradgrind/WZ | 672d93a3c9d7806194d16d6d5b9175e4046bd068 | [
"Apache-2.0"
] | null | null | null | wz/local/text_config.py | gradgrind/WZ | 672d93a3c9d7806194d16d6d5b9175e4046bd068 | [
"Apache-2.0"
] | null | null | null | # -*- coding: utf-8 -*-
"""
local/text_config.py
Last updated: 2021-04-06
Configuration items for text (Waldorf) reports.
==============================
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 Licen... | 30.055556 | 75 | 0.668207 |
d67a2c8d0d516c2f227315c083674eaf356cc191 | 735 | py | Python | hello/hello_dataset.py | East196/hello-py | a77c7a0c8e5e2b5e8cefaf0fda335ab0c3b1da21 | [
"Apache-2.0"
] | 1 | 2017-10-23T14:58:47.000Z | 2017-10-23T14:58:47.000Z | hello/hello_dataset.py | East196/hello-py | a77c7a0c8e5e2b5e8cefaf0fda335ab0c3b1da21 | [
"Apache-2.0"
] | null | null | null | hello/hello_dataset.py | East196/hello-py | a77c7a0c8e5e2b5e8cefaf0fda335ab0c3b1da21 | [
"Apache-2.0"
] | 1 | 2018-04-06T07:49:18.000Z | 2018-04-06T07:49:18.000Z | #!/usr/bin/env python
# -*- coding: utf-8 -*-
import os
import dataset
from hello import logger
# https://dataset.readthedocs.io/en/latest/index.html
db = dataset.connect('sqlite:///hello.db')
print(db.tables)
print(db['city'].columns)
class CityRender(object):
def rend(self, citys=[]):
body = " | ".j... | 22.96875 | 92 | 0.610884 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.