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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
9761d786c2c936d447b7c28537e5c161602958ba | 1,631 | py | Python | tapia/exercise2/ex2.py | appfs/appfs | 8cbbfa0e40e4d4a75a498ce8dd894bb2fbc3a9e3 | [
"MIT"
] | 11 | 2017-04-21T11:39:55.000Z | 2022-02-11T20:25:18.000Z | tapia/exercise2/ex2.py | appfs/appfs | 8cbbfa0e40e4d4a75a498ce8dd894bb2fbc3a9e3 | [
"MIT"
] | 69 | 2017-04-26T09:30:38.000Z | 2017-08-01T11:31:21.000Z | tapia/exercise2/ex2.py | appfs/appfs | 8cbbfa0e40e4d4a75a498ce8dd894bb2fbc3a9e3 | [
"MIT"
] | 53 | 2017-04-20T16:16:11.000Z | 2017-07-19T12:53:01.000Z | """@package docstring
Author: Roxana Tapia Campos
Module: Advanced practical programming skills for scientists
SS17 - TU Berlin
Exercise 2: XML to CSV measured
"""
#!/usr/bin/env python
# -*- coding: utf-8 -*-
import sys
from bs4 import BeautifulSoup
def xml_to_csv(data):
"""
Searches all suitable values ... | 27.183333 | 94 | 0.621704 |
c141ea07307fe29cd383d76b50a244cb09e8127b | 1,120 | py | Python | savageml/simulations/binary_reflexive_simulation.py | savagewil/SavageML | d5aa9a5305b5de088e3bf32778252c877faec41d | [
"MIT"
] | null | null | null | savageml/simulations/binary_reflexive_simulation.py | savagewil/SavageML | d5aa9a5305b5de088e3bf32778252c877faec41d | [
"MIT"
] | null | null | null | savageml/simulations/binary_reflexive_simulation.py | savagewil/SavageML | d5aa9a5305b5de088e3bf32778252c877faec41d | [
"MIT"
] | null | null | null | from ..utility import LossFunctions
from savageml.simulations import BaseSimulation, SimulationState
class BinaryReflexiveSimulation(BaseSimulation):
def __init__(self, shape=(1,), max_steps=10, loss_function=LossFunctions.MSE, **kwargs):
super().__init__(**kwargs)
self.shape = shape
self.... | 37.333333 | 92 | 0.600893 |
c1ddeee262c37abc912564038c15a5266f53d3aa | 1,170 | py | Python | rasp/captura.py | alffore/lokroids-python | ac3bbc328140e53ab181034d2e3d5d5d17dc9203 | [
"MIT"
] | null | null | null | rasp/captura.py | alffore/lokroids-python | ac3bbc328140e53ab181034d2e3d5d5d17dc9203 | [
"MIT"
] | null | null | null | rasp/captura.py | alffore/lokroids-python | ac3bbc328140e53ab181034d2e3d5d5d17dc9203 | [
"MIT"
] | null | null | null | ##
## Código básico para captura de imagenes 1 cada minuto
##
## AAFR 29 de marzo de 2018
import time
import json
import socket
from time import sleep
from picamera import PiCamera
def get_ip_address():
s = socket.socket(socket.AF_INET, socket.SOCK_DGRAM)
s.connect(("8.8.8.8", 80))
return s.getsockname()... | 22.075472 | 81 | 0.648718 |
6bd209e833f232d8e92f1f0e47f815110b77e8ec | 844 | py | Python | src/files/files.py | Cibah/Pepper_RL | a105aead34c74ac8c49fa058ee1613f578bcde41 | [
"MIT"
] | null | null | null | src/files/files.py | Cibah/Pepper_RL | a105aead34c74ac8c49fa058ee1613f578bcde41 | [
"MIT"
] | null | null | null | src/files/files.py | Cibah/Pepper_RL | a105aead34c74ac8c49fa058ee1613f578bcde41 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
import json
from src.Settings import *
def saveData(data):
f = open(TRAINING_FILE, "a")
f.write(data)
f.close()
def readData():
f = open(TRAINING_FILE, "r")
print(f.read())
def load():
with open(TRAINING_FILE) as json_file:
data = json.load(json_file)
... | 23.444444 | 61 | 0.515403 |
d8cf72458d728cdd109ccef3a9b83d41ad42f5c3 | 545 | py | Python | source/pkgsrc/devel/py-adb/patches/patch-adb_common.py | Scottx86-64/dotfiles-1 | 51004b1e2b032664cce6b553d2052757c286087d | [
"Unlicense"
] | 1 | 2021-11-20T22:46:39.000Z | 2021-11-20T22:46:39.000Z | source/pkgsrc/devel/py-adb/patches/patch-adb_common.py | Scottx86-64/dotfiles-1 | 51004b1e2b032664cce6b553d2052757c286087d | [
"Unlicense"
] | null | null | null | source/pkgsrc/devel/py-adb/patches/patch-adb_common.py | Scottx86-64/dotfiles-1 | 51004b1e2b032664cce6b553d2052757c286087d | [
"Unlicense"
] | null | null | null | $NetBSD: patch-adb_common.py,v 1.1 2020/04/03 23:06:35 nia Exp $
This fails on NetBSD too.
--- adb/common.py.orig 2018-05-31 08:43:12.000000000 +0000
+++ adb/common.py
@@ -118,6 +118,7 @@ class UsbHandle(object):
iface_number = self._setting.getNumber()
try:
if (platform.system() != 'Wi... | 36.333333 | 66 | 0.601835 |
2b157d5141e7f9180e58c57b7482f860f06a38ec | 510 | py | Python | python/en/_numpy/organize_this/test_numpy.Quickstart_tutorial-01.py | aimldl/coding | 70ddbfaa454ab92fd072ee8dc614ecc330b34a70 | [
"MIT"
] | null | null | null | python/en/_numpy/organize_this/test_numpy.Quickstart_tutorial-01.py | aimldl/coding | 70ddbfaa454ab92fd072ee8dc614ecc330b34a70 | [
"MIT"
] | null | null | null | python/en/_numpy/organize_this/test_numpy.Quickstart_tutorial-01.py | aimldl/coding | 70ddbfaa454ab92fd072ee8dc614ecc330b34a70 | [
"MIT"
] | null | null | null | """
test_numpy.Quickstart_tutorial-01.py
* References
Quickstart tutorial
https://docs.scipy.org/doc/numpy/user/quickstart.html
An example
"""
import numpy as np
a = np.arange(15).reshape( 3, 5 )
"""
>>> a
array([[ 0, 1, 2, 3, 4],
[ 5, 6, 7, 8, 9],
[10, 11, 12, 13, 14]])
>>> a.shape
(3,... | 13.076923 | 57 | 0.537255 |
56f7fc34df18bcd022ac11d2875a111b1d286b9f | 3,474 | py | Python | src/lcdoc/mkdocs/lp/plugs/python/pyplugs/convert/__init__.py | axiros/docutools | f99874a64afba8f5bc740049d843151ccd9ceaf7 | [
"BSD-2-Clause"
] | 24 | 2021-10-04T22:11:59.000Z | 2022-02-02T21:51:43.000Z | src/lcdoc/mkdocs/lp/plugs/python/pyplugs/convert/__init__.py | axiros/docutools | f99874a64afba8f5bc740049d843151ccd9ceaf7 | [
"BSD-2-Clause"
] | 2 | 2021-10-04T21:51:30.000Z | 2021-10-05T14:15:31.000Z | src/lcdoc/mkdocs/lp/plugs/python/pyplugs/convert/__init__.py | axiros/docutools | f99874a64afba8f5bc740049d843151ccd9ceaf7 | [
"BSD-2-Clause"
] | null | null | null | import os
import shutil
from functools import partial
from mkdocs.structure.files import File
from lcdoc.mkdocs.lp.plugs import lightbox, python
from lcdoc.mkdocs.tools import make_img
from lcdoc.tools import dirname, exists
config, page, Session = (python.config, python.page, python.Session)
LP = lambda: python.lp... | 31.297297 | 103 | 0.593552 |
a43376ae9c72ffa2e3d86d96ce6ceacd4e9d408a | 879 | py | Python | mcsf/__main__.py | beremaran/mcsf | 7651e849b860cf4f0517fa8e4fc4b7a417bbc3a4 | [
"MIT"
] | null | null | null | mcsf/__main__.py | beremaran/mcsf | 7651e849b860cf4f0517fa8e4fc4b7a417bbc3a4 | [
"MIT"
] | null | null | null | mcsf/__main__.py | beremaran/mcsf | 7651e849b860cf4f0517fa8e4fc4b7a417bbc3a4 | [
"MIT"
] | null | null | null | import argparse
import logging
import os
from mcsf.commands.configure import ConfigureCommand
from mcsf.commands.down import DownCommand
from mcsf.commands.list_servers import ListCommand
from mcsf.commands.up import UpCommand
if __name__ == "__main__":
logging.basicConfig(level=logging.INFO)
config_dir = os... | 27.46875 | 84 | 0.700796 |
7434cc61f2dfd559a7ea0821a25136b823057f89 | 1,958 | py | Python | extract.py | Sourabh-Kishore-Sharma/Megahack-DualSpecs | 1b51f141bbab2e99e85eb8e4eb343518c16e57ea | [
"MIT"
] | null | null | null | extract.py | Sourabh-Kishore-Sharma/Megahack-DualSpecs | 1b51f141bbab2e99e85eb8e4eb343518c16e57ea | [
"MIT"
] | null | null | null | extract.py | Sourabh-Kishore-Sharma/Megahack-DualSpecs | 1b51f141bbab2e99e85eb8e4eb343518c16e57ea | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
import pdfplumber
import pikepdf
import pandas as pd
import os
import re
import transform
def stmt_extract(file,cols):
df=pd.DataFrame()
data=[]
with pdfplumber.open(file) as pdf:
pages = pdf.pages
for page in pages:
for table in page.extract_tables():... | 26.106667 | 72 | 0.543922 |
7766cb374c75e4331936ff6d9e16ca2f84bf6aa1 | 187 | py | Python | books/SystemProgramming/ch3_introduction/exec_mylog.py | zeroam/TIL | 43e3573be44c7f7aa4600ff8a34e99a65cbdc5d1 | [
"MIT"
] | null | null | null | books/SystemProgramming/ch3_introduction/exec_mylog.py | zeroam/TIL | 43e3573be44c7f7aa4600ff8a34e99a65cbdc5d1 | [
"MIT"
] | null | null | null | books/SystemProgramming/ch3_introduction/exec_mylog.py | zeroam/TIL | 43e3573be44c7f7aa4600ff8a34e99a65cbdc5d1 | [
"MIT"
] | null | null | null | #!/bin/env python
import os
import mylog
logfile = "/var/log/syslog"
file_length = os.path.getsize(logfile)
# 메시지 로그의 중간부터 추적
mylog.printlog(logfile, "fail", int(file_length / 2), 3, 5)
| 20.777778 | 59 | 0.716578 |
bb5ae9e466033c5b87d96234ac69a437b95d8688 | 5,343 | py | Python | monitoring/zabbix/zabbix_collections/zabbix-cli/zabbix_cli/utils.py | smthkissinger/docker-images | 35e868295d04fa780325ada4168381f1e80e8fe4 | [
"BSD-3-Clause"
] | 63 | 2018-02-04T03:31:22.000Z | 2022-03-07T08:27:39.000Z | monitoring/zabbix/zabbix_collections/zabbix-cli/zabbix_cli/utils.py | smthkissinger/docker-images | 35e868295d04fa780325ada4168381f1e80e8fe4 | [
"BSD-3-Clause"
] | 3 | 2020-06-15T03:41:03.000Z | 2020-06-15T03:41:04.000Z | monitoring/zabbix/zabbix_collections/zabbix-cli/zabbix_cli/utils.py | smthkissinger/docker-images | 35e868295d04fa780325ada4168381f1e80e8fe4 | [
"BSD-3-Clause"
] | 40 | 2018-01-22T16:31:16.000Z | 2022-03-08T04:40:42.000Z | """Utility functions."""
def get_ack_status(code):
"""Get ack status from code."""
ack_status = {0: "No", 1: "Yes"}
if code in ack_status:
return ack_status[code] + " (" + str(code) + ")"
return "Unknown ({})".format(str(code))
def get_event_status(code):
"""Get event status from code.... | 26.715 | 116 | 0.578514 |
d94eafab248ceb87130131bde352901916131204 | 69 | py | Python | math_exercise05/start_eth_animation.py | tschibu/hslu-ipcv-exercises | 2d42c2fddfecee4f7694ade378cce22a058bc8ec | [
"MIT"
] | 1 | 2020-07-16T06:23:10.000Z | 2020-07-16T06:23:10.000Z | math_exercise05/start_eth_animation.py | tschibu/hslu-ipcv-exercises | 2d42c2fddfecee4f7694ade378cce22a058bc8ec | [
"MIT"
] | null | null | null | math_exercise05/start_eth_animation.py | tschibu/hslu-ipcv-exercises | 2d42c2fddfecee4f7694ade378cce22a058bc8ec | [
"MIT"
] | null | null | null | import subprocess
subprocess.call(['java', '-jar', 'animator.jar'])
| 17.25 | 49 | 0.695652 |
8ddf9db327e36e1397725e221a05c9b9d60fd533 | 506 | py | Python | backend/api.py | ahangchen/Rasp-Person-Sensor | 77d0e41b1a80cf9012f66c7bd44f062edbc6825d | [
"MIT"
] | 2 | 2018-02-26T10:00:29.000Z | 2018-03-16T11:39:34.000Z | backend/api.py | ahangchen/Rasp-Person-Sensor | 77d0e41b1a80cf9012f66c7bd44f062edbc6825d | [
"MIT"
] | null | null | null | backend/api.py | ahangchen/Rasp-Person-Sensor | 77d0e41b1a80cf9012f66c7bd44f062edbc6825d | [
"MIT"
] | null | null | null | def singleton(cls, *args, **kw):
instances = {}
def _singleton():
if cls not in instances:
instances[cls] = cls(*args, **kw)
return instances[cls]
return _singleton
@singleton
class ApiConfig(object):
host = 'http://222.201.137.47:12346'
urls = {
'upload_wifi_... | 23 | 57 | 0.563241 |
5c2be41e931a2ff6d439eb41e0275757cd17d53e | 630 | py | Python | source/pkgsrc/lang/pfe/patches/patch-doc_pfedoc_docbookdocument.py | Scottx86-64/dotfiles-1 | 51004b1e2b032664cce6b553d2052757c286087d | [
"Unlicense"
] | 1 | 2021-11-20T22:46:39.000Z | 2021-11-20T22:46:39.000Z | source/pkgsrc/lang/pfe/patches/patch-doc_pfedoc_docbookdocument.py | Scottx86-64/dotfiles-1 | 51004b1e2b032664cce6b553d2052757c286087d | [
"Unlicense"
] | null | null | null | source/pkgsrc/lang/pfe/patches/patch-doc_pfedoc_docbookdocument.py | Scottx86-64/dotfiles-1 | 51004b1e2b032664cce6b553d2052757c286087d | [
"Unlicense"
] | null | null | null | $NetBSD: patch-doc_pfedoc_docbookdocument.py,v 1.1 2017/12/28 12:46:58 dholland Exp $
Extend existing upstream hack in the docstrings processor to an
apparently similar case of garbled output that's currently breaking
the build.
--- doc/pfedoc/docbookdocument.py~ 2009-10-04 13:06:40.000000000 +0000
+++ doc/pfedoc/doc... | 37.058824 | 85 | 0.646032 |
a51d5f34e4fe491ce26308664b741750be477429 | 831 | py | Python | Packs/HealthCheck/Scripts/HealthCheckReadConf/HealthCheckReadConf.py | diCagri/content | c532c50b213e6dddb8ae6a378d6d09198e08fc9f | [
"MIT"
] | 799 | 2016-08-02T06:43:14.000Z | 2022-03-31T11:10:11.000Z | Packs/HealthCheck/Scripts/HealthCheckReadConf/HealthCheckReadConf.py | diCagri/content | c532c50b213e6dddb8ae6a378d6d09198e08fc9f | [
"MIT"
] | 9,317 | 2016-08-07T19:00:51.000Z | 2022-03-31T21:56:04.000Z | Packs/HealthCheck/Scripts/HealthCheckReadConf/HealthCheckReadConf.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
multitenant = 'False'
multiRepo = 'False'
res = demisto.executeCommand('getFilePath', {'id': demisto.args()['entryID']})
if res[0]['Type'] == entryTypes['error']:
demisto.results('File not found')
try:
with open(res[0... | 28.655172 | 78 | 0.608905 |
eb4ca7e369711ec19236334dd68a3e6f1f28b3c1 | 342 | py | Python | Archiv/skaffold-test/webapp/hello.py | LennartFertig/BigData | e74761b16812fd034519c06897329ea9ba9968df | [
"Apache-2.0"
] | null | null | null | Archiv/skaffold-test/webapp/hello.py | LennartFertig/BigData | e74761b16812fd034519c06897329ea9ba9968df | [
"Apache-2.0"
] | null | null | null | Archiv/skaffold-test/webapp/hello.py | LennartFertig/BigData | e74761b16812fd034519c06897329ea9ba9968df | [
"Apache-2.0"
] | 1 | 2021-10-19T07:45:12.000Z | 2021-10-19T07:45:12.000Z | #author: Aniket Mukherjee
from flask import Flask, render_template
import emoji
import pyjokes
import socket
#import playsound
app=Flask(__name__)
@app.route('/')
def hello():
return render_template('index.html')
@app.route('/fun')
def fun():
return emoji.emojize('Python development with Skaffol... | 14.25 | 73 | 0.71345 |
ccef7c82da96366bd79d9384234b018e033d56f3 | 2,691 | py | Python | points.py | aertoria/MiscCode | a2e94d0fe0890e6620972f84adcb7976ca9f1408 | [
"Apache-2.0"
] | null | null | null | points.py | aertoria/MiscCode | a2e94d0fe0890e6620972f84adcb7976ca9f1408 | [
"Apache-2.0"
] | null | null | null | points.py | aertoria/MiscCode | a2e94d0fe0890e6620972f84adcb7976ca9f1408 | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/python
# Given n points on a 2D plane, find the maximum number of points that lie on the same straight line.
# Definition for a point.
# class Point:
# def __init__(self, a=0, b=0):
# self.x = a
# self.y = b
class Solution:
# @param {Point[]} points
# @return {integer}
result=[]
d... | 34.948052 | 1,098 | 0.580082 |
691873df02c0d3bcc73b25452b375b2c1f627a47 | 6,084 | py | Python | Simplification/Grid_Creation_Prototype.py | Klark007/Selbstfahrendes-Auto-im-Modell | d7fe81392de2b29b7dbc7c9d929fa0031b89900b | [
"MIT"
] | null | null | null | Simplification/Grid_Creation_Prototype.py | Klark007/Selbstfahrendes-Auto-im-Modell | d7fe81392de2b29b7dbc7c9d929fa0031b89900b | [
"MIT"
] | null | null | null | Simplification/Grid_Creation_Prototype.py | Klark007/Selbstfahrendes-Auto-im-Modell | d7fe81392de2b29b7dbc7c9d929fa0031b89900b | [
"MIT"
] | null | null | null | """
converts the data gathered by the image recognition to a 2d numpy array
representing the image. The array contains integers:
0: free space
1: block
2: car
rectangle element structured
0: real position
1: grid position "not the right one in some circumstances
2: type (0-2)
"""
i... | 37.555556 | 146 | 0.597633 |
15cd2a40ac16b43b9bbf64b51f1ec2f95513afde | 934 | py | Python | exercises/pt/test_03_12.py | tuanducdesign/spacy-course | f8d092c5fa2997fccb3f367d174dce8667932b3d | [
"MIT"
] | null | null | null | exercises/pt/test_03_12.py | tuanducdesign/spacy-course | f8d092c5fa2997fccb3f367d174dce8667932b3d | [
"MIT"
] | null | null | null | exercises/pt/test_03_12.py | tuanducdesign/spacy-course | f8d092c5fa2997fccb3f367d174dce8667932b3d | [
"MIT"
] | null | null | null | def test():
assert (
len(nlp.pipeline) == 1 and nlp.pipe_names[0] == "countries_component"
), "Você adicionou o componente corretamente?"
assert Span.has_extension("capital"), "Você definiu a extensão da partição?"
ext = Span.get_extension("capital")
assert ext[2] is not None, "Você atribuiu... | 46.7 | 92 | 0.67773 |
243ce303a4d341cf0bd8c299dab213361981a274 | 3,402 | py | Python | ProjectEuler_plus/euler_011.py | byung-u/HackerRank | 4c02fefff7002b3af774b99ebf8d40f149f9d163 | [
"MIT"
] | null | null | null | ProjectEuler_plus/euler_011.py | byung-u/HackerRank | 4c02fefff7002b3af774b99ebf8d40f149f9d163 | [
"MIT"
] | null | null | null | ProjectEuler_plus/euler_011.py | byung-u/HackerRank | 4c02fefff7002b3af774b99ebf8d40f149f9d163 | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
g, erg = [], []
for _ in range(20):
g.append([int(grid_t) for grid_t in input().strip().split(' ')])
for y in range(20):
for x in range(20):
if x < 17:
erg.append(g[y][x] * g[y][x+1] * g[y][x+2] * g[y][x+3])
if y < 17:
erg.append(g[y][x] * g[y+1]... | 31.211009 | 88 | 0.47913 |
3016a14e92577fcf561f070282da2153b8609999 | 1,317 | py | Python | web/MicroservicesAsAservice/MAAS2.py | NoXLaw/RaRCTF2021-Challenges-Public | 1a1b094359b88f8ebbc83a6b26d27ffb2602458f | [
"MIT"
] | null | null | null | web/MicroservicesAsAservice/MAAS2.py | NoXLaw/RaRCTF2021-Challenges-Public | 1a1b094359b88f8ebbc83a6b26d27ffb2602458f | [
"MIT"
] | null | null | null | web/MicroservicesAsAservice/MAAS2.py | NoXLaw/RaRCTF2021-Challenges-Public | 1a1b094359b88f8ebbc83a6b26d27ffb2602458f | [
"MIT"
] | null | null | null | #!/usr/bin/python3
import requests
import uuid
import re
import sys
if len(sys.argv) < 2:
print("Usage: solve.py http://host:port/")
exit()
HOST = sys.argv[1]
uid1 = uuid.uuid4().hex
uid2 = uuid.uuid4().hex
s = requests.Session()
s2 = requests.Session()
s.post(HOST + "notes/register", data={"username": uid1}... | 38.735294 | 157 | 0.631739 |
231c2ce91ac292dc651efe3ae0c009c05ae90fe6 | 812 | py | Python | get_upload_link.py | NickForero11/Subbler | ed528514e96ddc30d58230ff98ff0fd5216ea5de | [
"MIT"
] | null | null | null | get_upload_link.py | NickForero11/Subbler | ed528514e96ddc30d58230ff98ff0fd5216ea5de | [
"MIT"
] | null | null | null | get_upload_link.py | NickForero11/Subbler | ed528514e96ddc30d58230ff98ff0fd5216ea5de | [
"MIT"
] | null | null | null | """Module to get an upload url to upload audiofiles to an AWS S3
Bucket.
"""
from json import loads
from requests import get
from requests.exceptions import RequestException
from sys import exit
def get_upload_link():
"""Get an AWS S3 preSignedUrl to upload an audiofile to a S3 Bucket.
Returns:
str: ... | 24.606061 | 78 | 0.62931 |
001a42219ce9ab15fc965de141e175e0f6553b60 | 309 | py | Python | testcode/cute.py | Cl3V0r/MLSeminar | d05f171a9b7d773ea123e1919e07312a7f0c9fe8 | [
"MIT"
] | null | null | null | testcode/cute.py | Cl3V0r/MLSeminar | d05f171a9b7d773ea123e1919e07312a7f0c9fe8 | [
"MIT"
] | null | null | null | testcode/cute.py | Cl3V0r/MLSeminar | d05f171a9b7d773ea123e1919e07312a7f0c9fe8 | [
"MIT"
] | null | null | null | file_in = open("../data/postillon.csv", "r")
file_out = open("../data/postillon.txt","w")
for line in file_in:
if "\"" not in line and "Leserbriefe" not in line and "Postillon" not in line and "Newsticker" not in line and "title" not in line:
file_out.write(line)
file_in.close()
file_out.close()
| 38.625 | 135 | 0.676375 |
cc760559d3baba414b363a7536e0bdb86dc7094a | 2,848 | py | Python | WebHostLib/api/generate.py | Berserker66/ALttPEntranceRandomizer | 9c681cc65d7281ccded03484b050e8f80ea65dc6 | [
"MIT"
] | null | null | null | WebHostLib/api/generate.py | Berserker66/ALttPEntranceRandomizer | 9c681cc65d7281ccded03484b050e8f80ea65dc6 | [
"MIT"
] | 5 | 2020-01-18T21:10:46.000Z | 2020-01-25T20:58:19.000Z | WebHostLib/api/generate.py | Berserker66/ALttPEntranceRandomizer | 9c681cc65d7281ccded03484b050e8f80ea65dc6 | [
"MIT"
] | 2 | 2020-01-18T17:36:50.000Z | 2020-01-22T16:52:08.000Z | import pickle
from uuid import UUID
from . import api_endpoints
from flask import request, session, url_for
from pony.orm import commit
from WebHostLib import app, Generation, STATE_QUEUED, Seed, STATE_ERROR
from WebHostLib.check import get_yaml_data, roll_options
@api_endpoints.route('/generate', methods=['POST'])... | 38.486486 | 101 | 0.579003 |
d1e98bfc5db3f8530bf2e53e2b12eb1d589b8b79 | 11,129 | py | Python | addition_module/DMUE/models/make_model.py | weihaoxie/FaceX-Zoo | db0b087e4f4d28152e172d6c8d3767a8870733b4 | [
"Apache-2.0"
] | 1,329 | 2021-01-13T07:06:30.000Z | 2022-03-31T07:23:39.000Z | addition_module/DMUE/models/make_model.py | weihaoxie/FaceX-Zoo | db0b087e4f4d28152e172d6c8d3767a8870733b4 | [
"Apache-2.0"
] | 115 | 2021-01-13T10:42:57.000Z | 2022-03-28T03:57:52.000Z | addition_module/DMUE/models/make_model.py | weihaoxie/FaceX-Zoo | db0b087e4f4d28152e172d6c8d3767a8870733b4 | [
"Apache-2.0"
] | 351 | 2021-01-13T07:21:00.000Z | 2022-03-29T14:11:39.000Z | import torch
import torch.nn as nn
import torch.nn.functional as F
from torch.nn.parameter import Parameter
from .resnet_multibranch import ResNet, BasicBlock, Bottleneck
from .resnet_ibn_multibranch import resnet50_ibn_a
class GeM(nn.Module):
def __init__(self, p=3.0, eps=1e-6, freeze_p=True):
... | 46.957806 | 153 | 0.530865 |
ae497fef070809fcccd5eecc28b39b0e5053609f | 2,341 | py | Python | angstrom/2020/web/LeetTube/leettube.py | mystickev/ctf-archives | 89e99a5cd5fb6b2923cad3fe1948d3ff78649b4e | [
"MIT"
] | 1 | 2021-11-02T20:53:58.000Z | 2021-11-02T20:53:58.000Z | angstrom/2020/web/LeetTube/leettube.py | ruhan-islam/ctf-archives | 8c2bf6a608c821314d1a1cfaa05a6cccef8e3103 | [
"MIT"
] | null | null | null | angstrom/2020/web/LeetTube/leettube.py | ruhan-islam/ctf-archives | 8c2bf6a608c821314d1a1cfaa05a6cccef8e3103 | [
"MIT"
] | 1 | 2021-12-19T11:06:24.000Z | 2021-12-19T11:06:24.000Z | #!/usr/bin/env python
from http.server import HTTPServer, BaseHTTPRequestHandler
import urllib.parse
import os
videos = []
for file in os.listdir('videos'):
os.chmod('videos/'+file, 0o600)
videos.append({'title': file.split('.')[0], 'path': 'videos/'+file, 'content': open('videos/'+file, 'rb').read()})
published = [... | 34.426471 | 372 | 0.657839 |
ae5096c32dccde3979ad1464d2183dfd7f26ca9c | 2,309 | py | Python | app/auth/views.py | pushyzheng/docker-oj-web | 119abae3763cd2e53c686a320af7f4f5af1f16ca | [
"MIT"
] | 2 | 2019-06-24T08:34:39.000Z | 2019-06-27T12:23:47.000Z | app/auth/views.py | pushyzheng/docker-oj-web | 119abae3763cd2e53c686a320af7f4f5af1f16ca | [
"MIT"
] | null | null | null | app/auth/views.py | pushyzheng/docker-oj-web | 119abae3763cd2e53c686a320af7f4f5af1f16ca | [
"MIT"
] | null | null | null | # encoding:utf-8
from app import app, db
from app.common.models import RoleName
from utils import success, get_uuid, logger, get_avatar_url
from schemas.auth import *
from app.common.user import User
from app.auth.main import auth
from flask import g, abort, session, request
from flask_expects_json import expects_json
... | 25.097826 | 76 | 0.64097 |
ae588f90d84e488d9fec305220f016ca70eb4166 | 4,943 | py | Python | research/cv/CGAN/src/cell.py | leelige/mindspore | 5199e05ba3888963473f2b07da3f7bca5b9ef6dc | [
"Apache-2.0"
] | 1 | 2021-07-03T06:52:20.000Z | 2021-07-03T06:52:20.000Z | research/cv/CGAN/src/cell.py | leelige/mindspore | 5199e05ba3888963473f2b07da3f7bca5b9ef6dc | [
"Apache-2.0"
] | null | null | null | research/cv/CGAN/src/cell.py | leelige/mindspore | 5199e05ba3888963473f2b07da3f7bca5b9ef6dc | [
"Apache-2.0"
] | 2 | 2019-09-01T06:17:04.000Z | 2019-10-04T08:39:45.000Z | # Copyright 2021 Huawei Technologies Co., Ltd
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to... | 36.080292 | 94 | 0.641311 |
8838a417453e871a0e20c8f984edcc5a647677bb | 549 | py | Python | Beginner/03. Python/sliding window.py | ankita080208/Hacktoberfest | 2be849e89285260e7b6672f42979943ad6bbec78 | [
"MIT"
] | 1 | 2021-10-04T05:41:43.000Z | 2021-10-04T05:41:43.000Z | Beginner/03. Python/sliding window.py | ankita080208/Hacktoberfest | 2be849e89285260e7b6672f42979943ad6bbec78 | [
"MIT"
] | null | null | null | Beginner/03. Python/sliding window.py | ankita080208/Hacktoberfest | 2be849e89285260e7b6672f42979943ad6bbec78 | [
"MIT"
] | null | null | null | def maxSum(arr, windowSize):
arrSize = len(arr)
if(arrSize<windowSize):
print("Invalid operation")
return -1
# finding sum of the first window
window_sum = sum(arr[i] for i in range(windowSize))
max_sum = window_sum
for i in range(arrSize-windowSize):
window_sum... | 26.142857 | 59 | 0.624772 |
018ebf78c44ad8112602e4c9fc0a6a7bf2485763 | 775 | py | Python | loesungen/chapter05/meeting.py | SaschaKersken/Daten-Prozessanalyse | 370f07a75b9465329deb3671adbfbef8483f76f6 | [
"Apache-2.0"
] | 2 | 2021-09-20T06:16:41.000Z | 2022-01-17T14:24:43.000Z | loesungen/chapter05/meeting.py | SaschaKersken/Daten-Prozessanalyse | 370f07a75b9465329deb3671adbfbef8483f76f6 | [
"Apache-2.0"
] | null | null | null | loesungen/chapter05/meeting.py | SaschaKersken/Daten-Prozessanalyse | 370f07a75b9465329deb3671adbfbef8483f76f6 | [
"Apache-2.0"
] | null | null | null | from csp import CSP
# Bedingung: Alle Personen brauchen einen gemeinsamen Termin
def meeting_constraint(assignment):
return len(set(assignment.values())) == 1
# Variablen = Personen, die Termine brauchen
variables = ["Alfred", "Birte", "Cem", "Dana"]
# Domänen = Uhrzeiten, zu denen die Personen Zeit haben
domains... | 33.695652 | 65 | 0.67871 |
c95b088585f4b00befaf339643208bc8a18db757 | 2,953 | py | Python | main.py | MusicMemory/Ornithology_1.0 | 08ded140908ecc393218705fd588ceaf91e6b2c0 | [
"Apache-2.0"
] | null | null | null | main.py | MusicMemory/Ornithology_1.0 | 08ded140908ecc393218705fd588ceaf91e6b2c0 | [
"Apache-2.0"
] | null | null | null | main.py | MusicMemory/Ornithology_1.0 | 08ded140908ecc393218705fd588ceaf91e6b2c0 | [
"Apache-2.0"
] | null | null | null | import pygame
import sys
from domain.BirdRepository import BirdRepository
from domain.Game import Game
from domain.ImageRepository import ImageRepository
from gui.GUIProcessor import GUIProcessor
# Wartet darauf, dass eine Taste gedrückt wird, die sich auch in Bezug auf
# key_map mappen lässt. Falls key_map die Tast... | 26.366071 | 78 | 0.658314 |
a388f240a80e4184a0036f2cbc73c768522ca0de | 3,003 | py | Python | code/2/timmons/think3.py | pwang13/AutomatedSE_Coursework | b416672d9756fcc60367143b989d29b0c905cfc3 | [
"Unlicense"
] | null | null | null | code/2/timmons/think3.py | pwang13/AutomatedSE_Coursework | b416672d9756fcc60367143b989d29b0c905cfc3 | [
"Unlicense"
] | null | null | null | code/2/timmons/think3.py | pwang13/AutomatedSE_Coursework | b416672d9756fcc60367143b989d29b0c905cfc3 | [
"Unlicense"
] | null | null | null | #!/usr/bin/python
import sys
def test( f, params=None ) :
try :
print("\n\n#Running %s" % f.__name__)
if params == None :
f()
else :
f(*params)
print("#Function successful!\n#")
except :
print("#Function failed with exception %s" % sys.exc_info()[0])
"""
EXERCISE 1
"""
#T... | 15.166667 | 67 | 0.630037 |
2808861371ef9193d9f40c4217701d92fa4a064b | 4,236 | py | Python | Modulos/Matematica/Smat_Trigonometria.py | Jonatan966/SODA | 046d8c1e7b9bac3a555526c9fe2f365c2b338aca | [
"MIT"
] | null | null | null | Modulos/Matematica/Smat_Trigonometria.py | Jonatan966/SODA | 046d8c1e7b9bac3a555526c9fe2f365c2b338aca | [
"MIT"
] | null | null | null | Modulos/Matematica/Smat_Trigonometria.py | Jonatan966/SODA | 046d8c1e7b9bac3a555526c9fe2f365c2b338aca | [
"MIT"
] | null | null | null | import sys
from Nucleo import *
import math
def mat_TRIGONOMETRIA():
sMain_Avisos().Welcome('TRIGONOMETRIA')
while True:
try:
option = sMain_Saidas().Prompt('MATEMATICA', 'TRIGONOMETRIA')
if option == 'PROGRESSAO ARITMETICA' or option == 'P.A' or option == '0':
n... | 54.307692 | 158 | 0.509915 |
284409f1e1ba265f3c559099e6205041d39efeb5 | 472 | py | Python | hausse/plugins/layout/layouts.py | andrenasturas/hausse | 58e7cb71d5105cf1d6ec7d294e85668855bf8336 | [
"MIT"
] | null | null | null | hausse/plugins/layout/layouts.py | andrenasturas/hausse | 58e7cb71d5105cf1d6ec7d294e85668855bf8336 | [
"MIT"
] | 1 | 2021-08-30T21:41:46.000Z | 2021-08-30T21:41:46.000Z | hausse/plugins/layout/layouts.py | andrenasturas/hausse | 58e7cb71d5105cf1d6ec7d294e85668855bf8336 | [
"MIT"
] | 1 | 2021-08-31T19:27:32.000Z | 2021-08-31T19:27:32.000Z | import logging
from hausse.plugins.layout.handlebars import Handlebars
LAYOUTS = {"handlebars": Handlebars}
# TODO: Merge with LayoutPlugin and make it a metaclass
def Layouts(engine: str = "handlebars", *args, **kwargs):
plugin = LAYOUTS.get(engine.lower())
if plugin is None:
logging.error(
... | 26.222222 | 98 | 0.65678 |
95fa626c1c303f37fdf5a3a8d0d0bd697e929633 | 785 | py | Python | Python/zzz_training_challenge/Python_Challenge/solutions/tests/ch03_recursion/ex05_array_sum_test.py | Kreijeck/learning | eaffee08e61f2a34e01eb8f9f04519aac633f48c | [
"MIT"
] | null | null | null | Python/zzz_training_challenge/Python_Challenge/solutions/tests/ch03_recursion/ex05_array_sum_test.py | Kreijeck/learning | eaffee08e61f2a34e01eb8f9f04519aac633f48c | [
"MIT"
] | null | null | null | Python/zzz_training_challenge/Python_Challenge/solutions/tests/ch03_recursion/ex05_array_sum_test.py | Kreijeck/learning | eaffee08e61f2a34e01eb8f9f04519aac633f48c | [
"MIT"
] | null | null | null | # Beispielprogramm für das Buch "Python Challenge"
#
# Copyright 2020 by Michael Inden
import pytest
from ch03_recursion.solutions.ex05_array_sum import sum_rec, sum_tail, sum_lambda
@pytest.mark.parametrize("values, expected",
[([1], 1), ( [1, 2, 3], 6), ([1, 2, 3, -7], -1)])
def test_sum_... | 30.192308 | 81 | 0.594904 |
250bfaf7c49b013d8fdbfdb16525db61f965ca1c | 675 | py | Python | packages/watchmen-dqc/src/watchmen_dqc/monitor/rule/factor_min_not_in_range.py | Indexical-Metrics-Measure-Advisory/watchmen | c54ec54d9f91034a38e51fd339ba66453d2c7a6d | [
"MIT"
] | null | null | null | packages/watchmen-dqc/src/watchmen_dqc/monitor/rule/factor_min_not_in_range.py | Indexical-Metrics-Measure-Advisory/watchmen | c54ec54d9f91034a38e51fd339ba66453d2c7a6d | [
"MIT"
] | null | null | null | packages/watchmen-dqc/src/watchmen_dqc/monitor/rule/factor_min_not_in_range.py | Indexical-Metrics-Measure-Advisory/watchmen | c54ec54d9f91034a38e51fd339ba66453d2c7a6d | [
"MIT"
] | null | null | null | from datetime import datetime
from typing import Tuple
from watchmen_data_kernel.storage import TopicDataService
from watchmen_model.dqc import MonitorRule
from watchmen_storage import EntityColumnAggregateArithmetic
from .factor_aggregate_value_not_in_range import factor_aggregate_value_not_in_range
from .types impor... | 37.5 | 112 | 0.866667 |
b091099629009d75cac9463e655ad370f2d033c9 | 2,425 | py | Python | pyntcloud/scalar_fields/eigenvalues.py | bernssolg/pyntcloud-master | 84cf000b7a7f69a2c1b36f9624f05f65160bf992 | [
"MIT"
] | 1,142 | 2016-10-10T08:55:30.000Z | 2022-03-30T04:46:16.000Z | pyntcloud/scalar_fields/eigenvalues.py | bernssolg/pyntcloud-master | 84cf000b7a7f69a2c1b36f9624f05f65160bf992 | [
"MIT"
] | 195 | 2016-10-10T08:30:37.000Z | 2022-02-17T12:51:17.000Z | pyntcloud/scalar_fields/eigenvalues.py | bernssolg/pyntcloud-master | 84cf000b7a7f69a2c1b36f9624f05f65160bf992 | [
"MIT"
] | 215 | 2017-02-28T00:50:29.000Z | 2022-03-22T17:01:31.000Z | import numpy as np
from .base import ScalarField
class EigenValuesScalarField(ScalarField):
"""
Parameters
----------
ev : list of str
Column names of the eigen values.
Tip:
ev = self.add_scalar_field("eigen_values", ...)
"""
def __init__(self, *, pyntcloud, ev):
... | 25.260417 | 91 | 0.549278 |
b0d64b1333aa7123afb1e50defbfa6056d1c173d | 10,523 | py | Python | Utils/py/GoPro/utils/GoPro.py | tarsoly/NaoTH | dcd2b67ef6bf9953c81d3e1b26e543b5922b7d52 | [
"ECL-2.0",
"Apache-2.0"
] | null | null | null | Utils/py/GoPro/utils/GoPro.py | tarsoly/NaoTH | dcd2b67ef6bf9953c81d3e1b26e543b5922b7d52 | [
"ECL-2.0",
"Apache-2.0"
] | null | null | null | Utils/py/GoPro/utils/GoPro.py | tarsoly/NaoTH | dcd2b67ef6bf9953c81d3e1b26e543b5922b7d52 | [
"ECL-2.0",
"Apache-2.0"
] | null | null | null | import threading, time, json, inspect
from goprocam import GoProCamera, constants
from .GameControlData import GameControlData
from utils import Logger, blackboard
# setup logger for network related logs
logger = Logger.getLogger("GoPro")
class GoPro(threading.Thread):
def __init__(self, quiet:bool, ignore:boo... | 45.554113 | 196 | 0.560011 |
a560d580079e3257acf967a9973beece7540a6dd | 4,651 | py | Python | server/api/src/google_tools.py | gustavodsf/rdx_hack | 3b504bf8181495fdd1c3a06f963970469f6655f1 | [
"MIT"
] | null | null | null | server/api/src/google_tools.py | gustavodsf/rdx_hack | 3b504bf8181495fdd1c3a06f963970469f6655f1 | [
"MIT"
] | null | null | null | server/api/src/google_tools.py | gustavodsf/rdx_hack | 3b504bf8181495fdd1c3a06f963970469f6655f1 | [
"MIT"
] | null | null | null | import io
import os
# Imports the Google Cloud client library
from google.cloud import speech
from google.cloud.speech import enums
from google.cloud.speech import types
from pydub import AudioSegment
class GoogleTools(object):
def from_speech_to_text(self, audio_path):
self.split_audio_channel()
... | 63.712329 | 203 | 0.601376 |
a574e1f1c97713a42033ce5cc7e4ad8b7faf4053 | 12,665 | py | Python | source/api/config_methods.py | weberval/SocialBot | f45e16c28fe2a1283b09b1f5c7b6334ef03f9a7b | [
"MIT"
] | 2 | 2018-04-07T14:56:12.000Z | 2020-03-26T12:06:51.000Z | source/api/config_methods.py | weberval/SocialBot | f45e16c28fe2a1283b09b1f5c7b6334ef03f9a7b | [
"MIT"
] | 2 | 2018-04-07T14:55:31.000Z | 2018-04-25T07:43:29.000Z | source/api/config_methods.py | weberval/SocialBot | f45e16c28fe2a1283b09b1f5c7b6334ef03f9a7b | [
"MIT"
] | 2 | 2019-09-06T22:31:43.000Z | 2020-03-26T12:06:51.000Z | from api.api_error import APIError
from api.api_message import APIMessage
from api.json_connector import JSONConnector
from api.api_config import APIConfig
from api.api_oauth import OAuthProcess
import json
import asyncio
class ConfigMethods:
@staticmethod
def add_app(req):
"""
Add an app to ... | 40.723473 | 128 | 0.562337 |
59ba880cf9b177b19f255ce0bdf6d668366f4888 | 15,080 | py | Python | SVDD/Svdd.py | Mrxuelovecode/SVDD | fbd7df5cc7df0e24745b8f4df8fab237a2657e88 | [
"Apache-2.0"
] | 6 | 2020-01-08T02:41:10.000Z | 2020-07-24T13:59:04.000Z | SVDD/Svdd.py | Mrxuelovecode/SVDD | fbd7df5cc7df0e24745b8f4df8fab237a2657e88 | [
"Apache-2.0"
] | null | null | null | SVDD/Svdd.py | Mrxuelovecode/SVDD | fbd7df5cc7df0e24745b8f4df8fab237a2657e88 | [
"Apache-2.0"
] | 1 | 2020-03-05T04:21:16.000Z | 2020-03-05T04:21:16.000Z | # -*- coding: utf-8 -*-
"""
Created on Tue Dec 24 10:33:23 2019
@author: Kepeng Qiu
"""
import numpy as np
import matplotlib.pyplot as plt
class Svdd():
'''
C Trade-off parameter\n
ker Kernel function parameters\n
ker = {"type": 'gauss', "width": s}\n
ker = {"type": ... | 29.626719 | 82 | 0.34569 |
e60775053046e4adf3191cdab45a6bd98a5a9d70 | 979 | py | Python | 2-resources/_PYTHON/code-examples-master/sqlite/python/read_from_sqlite.py | eengineergz/Lambda | 1fe511f7ef550aed998b75c18a432abf6ab41c5f | [
"MIT"
] | null | null | null | 2-resources/_PYTHON/code-examples-master/sqlite/python/read_from_sqlite.py | eengineergz/Lambda | 1fe511f7ef550aed998b75c18a432abf6ab41c5f | [
"MIT"
] | null | null | null | 2-resources/_PYTHON/code-examples-master/sqlite/python/read_from_sqlite.py | eengineergz/Lambda | 1fe511f7ef550aed998b75c18a432abf6ab41c5f | [
"MIT"
] | 1 | 2021-11-05T07:48:26.000Z | 2021-11-05T07:48:26.000Z | import sqlite3 as sql
product_name = 'guitar'
db_connection = sql.connect('db.sql')
c = db_connection.cursor()
try:
c.execute('select product_description from products where product_name = "{k}"'.format(k=product_name))
data = c.fetchone()[0]
db_connection.close()
print("=> Product: {p}, Description:... | 31.580645 | 107 | 0.682329 |
e9806a79ef4759275085c2a29bb5946c39db8705 | 2,091 | py | Python | manage.py | anhilo/crawlab | 363f4bf7a4ccc192a99850998c1bd0fc363832a1 | [
"BSD-3-Clause"
] | 1 | 2019-08-20T14:26:39.000Z | 2019-08-20T14:26:39.000Z | manage.py | anhilo/crawlab | 363f4bf7a4ccc192a99850998c1bd0fc363832a1 | [
"BSD-3-Clause"
] | null | null | null | manage.py | anhilo/crawlab | 363f4bf7a4ccc192a99850998c1bd0fc363832a1 | [
"BSD-3-Clause"
] | null | null | null | import argparse
import os
import subprocess
from multiprocessing import Process
import sys
BASE_DIR = os.path.dirname(__file__)
APP_DESC = """
Crawlab CLI tool.
usage: python manage.py [action]
action:
serve: start all necessary services to run crawlab. This is for quick start, please checkout Deployment guide... | 25.192771 | 141 | 0.64945 |
ddd839b8747e74b64e63fe36fd176e5f87097cb7 | 2,343 | py | Python | python/course/leetcode/1~27/13. Roman to Integer_0416.py | TimVan1596/ACM-ICPC | 07f7d728db1ecd09c5a3d0f05521930b14eb9883 | [
"Apache-2.0"
] | 1 | 2019-05-22T07:12:34.000Z | 2019-05-22T07:12:34.000Z | python/course/leetcode/1~27/13. Roman to Integer_0416.py | TimVan1596/ACM-ICPC | 07f7d728db1ecd09c5a3d0f05521930b14eb9883 | [
"Apache-2.0"
] | 3 | 2021-12-10T01:13:54.000Z | 2021-12-14T21:18:42.000Z | python/course/leetcode/1~27/13. Roman to Integer_0416.py | TimVan1596/ACM-ICPC | 07f7d728db1ecd09c5a3d0f05521930b14eb9883 | [
"Apache-2.0"
] | null | null | null | # -*- coding:utf-8 -*-
# @Time:2020/6/19 12:08
# @Author:TimVan
# @File:13. Roman to Integer.py
# @Software:PyCharm
# Roman numerals are represented by seven different symbols: I, V, X, L, C, D and M.
#
# Symbol Value
# I 1
# V 5
# X 10
# L 50
# C 100
#... | 29.2875 | 87 | 0.523261 |
34af3b1afea26278674ae6e36a0b59fe995a1a46 | 2,732 | py | Python | oop/unit_test_employees.py | karinakozarova/Learning-Python | 217dfc8ca6931a238445daf0b84e188c02916c52 | [
"MIT"
] | 1 | 2019-04-07T23:14:29.000Z | 2019-04-07T23:14:29.000Z | oop/unit_test_employees.py | karinakozarova/Learning-Python | 217dfc8ca6931a238445daf0b84e188c02916c52 | [
"MIT"
] | null | null | null | oop/unit_test_employees.py | karinakozarova/Learning-Python | 217dfc8ca6931a238445daf0b84e188c02916c52 | [
"MIT"
] | null | null | null | import unittest
class Team:
def __init__(self,company,employees):
self.company = company
self.employees = employees
def print_employees(self):
print("Employees at {}:".format(self.company),end=" ")
for employee in self.employees:
print(employee.name,end=" ")
... | 30.355556 | 73 | 0.639092 |
5511bac121bbeba442c16aabe106c14fb4876e4d | 512 | py | Python | udacity course code/01-03-numpyarrayindexing.py | bluemurder/mlfl | b895b2f1d01b0f6418a5bcee2f204dd7916062f0 | [
"MIT"
] | 1 | 2021-03-22T22:25:54.000Z | 2021-03-22T22:25:54.000Z | udacity course code/01-03-numpyarrayindexing.py | bluemurder/mlfl | b895b2f1d01b0f6418a5bcee2f204dd7916062f0 | [
"MIT"
] | 6 | 2017-01-16T09:53:21.000Z | 2017-01-18T12:20:09.000Z | udacity course code/01-03-numpyarrayindexing.py | bluemurder/mlfl | b895b2f1d01b0f6418a5bcee2f204dd7916062f0 | [
"MIT"
] | null | null | null | """Indexing."""
import numpy as np
def test_run():
a = np.random.rand(5)
print "Array:\n", a
# Accessing using a list of indices
indices = np.array([1, 1, 2, 3])
print a[indices]
# New array
a = np.array([(20, 25, 10, 23, 26, 32, 10, 5, 0),
(0, 2, 50, 20, 0, 1, 28, 5, 0... | 17.066667 | 53 | 0.494141 |
9b48e18bf38d18b69af71cd11ae45ddfa80364f8 | 119 | py | Python | Licence 1/I22/TP 5/tp_5_2.py | axelcoezard/licence | 1ed409c4572dea080169171beb7e8571159ba071 | [
"MIT"
] | 8 | 2020-11-26T20:45:12.000Z | 2021-11-29T15:46:22.000Z | Licence 1/I22/TP 5/tp_5_2.py | axelcoezard/licence | 1ed409c4572dea080169171beb7e8571159ba071 | [
"MIT"
] | null | null | null | Licence 1/I22/TP 5/tp_5_2.py | axelcoezard/licence | 1ed409c4572dea080169171beb7e8571159ba071 | [
"MIT"
] | 6 | 2020-10-23T15:29:24.000Z | 2021-05-05T19:10:45.000Z | """ LECTURE ET ECRITURE BINAIRE """
"""
QUESTION 1
"""
with open("valeurs", "rb+") as f:
print(f.read(4))
| 14.875 | 35 | 0.537815 |
bd1dbaf56bf9fbf4b1d531a82be82f89d9b62c39 | 378 | py | Python | examples/tensorflow-yolo/quickest_yolo.py | pcrete/skil-python | 672a1aa9e8af020c960ab9ee280cbb6b194afc3f | [
"Apache-2.0"
] | 23 | 2018-09-19T13:34:27.000Z | 2022-02-14T09:49:35.000Z | examples/tensorflow-yolo/quickest_yolo.py | pcrete/skil-python | 672a1aa9e8af020c960ab9ee280cbb6b194afc3f | [
"Apache-2.0"
] | 33 | 2018-10-18T07:58:05.000Z | 2019-05-16T08:24:12.000Z | examples/tensorflow-yolo/quickest_yolo.py | pcrete/skil-python | 672a1aa9e8af020c960ab9ee280cbb6b194afc3f | [
"Apache-2.0"
] | 11 | 2018-10-21T18:58:57.000Z | 2022-02-14T09:49:36.000Z | import skil
import cv2
model = skil.Model('yolo.pb', model_id='yolo_42', name='yolo')
service = model.deploy(skil.Deployment(), input_names=[
'input'], output_names=['output'])
image = cv2.imread("say_yolo_again.jpg")
detection = service.detect_objects(image)
image = skil.utils.yolo.annotate_im... | 31.5 | 62 | 0.706349 |
1f3faede8d03b34c8170473b124fecacf69225f7 | 2,251 | py | Python | examples/store_clicks.py | xinetzone/dash-tests | cd4526caa2f9d906915c31370b3487bdcef92aa4 | [
"Apache-2.0"
] | 1 | 2022-03-01T07:38:32.000Z | 2022-03-01T07:38:32.000Z | examples/store_clicks.py | xinetzone/dash-tests | cd4526caa2f9d906915c31370b3487bdcef92aa4 | [
"Apache-2.0"
] | 12 | 2021-07-13T12:33:36.000Z | 2021-07-14T05:25:19.000Z | examples/store_clicks.py | xinetzone/dash-book | 1f624e87e2aa02c9931318918df969e44bdd2c07 | [
"Apache-2.0"
] | null | null | null | from dash import dcc, html
from dash.dependencies import Input, Output, State
from dash.exceptions import PreventUpdate
from app import app
layout = html.Div([
# 每次刷新页面时,内存存储都会恢复到默认值
dcc.Store(id='memory'),
# 本地存储只会在页面第一次加载时获取初始数据,
# 并一直保存到页面被清除为止。
dcc.Store(id='local', storage_type='local'),
... | 32.157143 | 75 | 0.519325 |
c817882980919d0ae1a24179a254d4d0d295403b | 19,906 | py | Python | src/main.py | minhluu2000/AggiePass | a86198b26e5fbec0f2de68f88fc4fd6aac362233 | [
"MIT"
] | null | null | null | src/main.py | minhluu2000/AggiePass | a86198b26e5fbec0f2de68f88fc4fd6aac362233 | [
"MIT"
] | null | null | null | src/main.py | minhluu2000/AggiePass | a86198b26e5fbec0f2de68f88fc4fd6aac362233 | [
"MIT"
] | null | null | null | import sys
import pandas as pd
import encrypt_tools as enc
from ard_comm import arduino_wr
from registration import new_uid_to_db
from PyQt5 import *
from PyQt5.QtCore import *
from PyQt5.QtGui import *
from PyQt5.QtWidgets import *
from threading import *
from database import mydb as database
from constant import data... | 37.347092 | 127 | 0.653019 |
c0ad2aee1da18e262917f0cad82fd772493b2556 | 283 | py | Python | exercises/pt/solution_04_06.py | Jette16/spacy-course | 32df0c8f6192de6c9daba89740a28c0537e4d6a0 | [
"MIT"
] | 2,085 | 2019-04-17T13:10:40.000Z | 2022-03-30T21:51:46.000Z | exercises/pt/solution_04_06.py | Jette16/spacy-course | 32df0c8f6192de6c9daba89740a28c0537e4d6a0 | [
"MIT"
] | 79 | 2019-04-18T14:42:55.000Z | 2022-03-07T08:15:43.000Z | exercises/pt/solution_04_06.py | Jette16/spacy-course | 32df0c8f6192de6c9daba89740a28c0537e4d6a0 | [
"MIT"
] | 361 | 2019-04-17T13:34:32.000Z | 2022-03-28T04:42:45.000Z | import spacy
# Criar um modelo vazio "en"
nlp = spacy.blank("en")
# Criar um novo identificador de entidades e adicionar ao fluxo de processamento
ner = nlp.create_pipe("ner")
nlp.add_pipe(ner)
# Adicionar o marcador "GADGET" ao identificador de entidades
ner.add_label("GADGET")
| 23.583333 | 80 | 0.759717 |
9b25f40b27584caa8e45ffd5fbfe628f73dce3cb | 1,623 | py | Python | BeautifulData/Admin/file_reader.py | zhangyafeii/Flask | 9c9a5ea282f77aabcda838796dad2411af9b519f | [
"MIT"
] | null | null | null | BeautifulData/Admin/file_reader.py | zhangyafeii/Flask | 9c9a5ea282f77aabcda838796dad2411af9b519f | [
"MIT"
] | null | null | null | BeautifulData/Admin/file_reader.py | zhangyafeii/Flask | 9c9a5ea282f77aabcda838796dad2411af9b519f | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
"""
@Datetime: 2019/1/2
@Author: Zhang Yafei
"""
import threading
import settings
import pandas as pd
class SingletonType(type):
_instance_lock = threading.Lock()
def __call__(cls, *args, **kwargs):
if not hasattr(cls, "_instance"):
with SingletonType._instance_l... | 27.508475 | 86 | 0.63894 |
7b6f72a56a03d7fc45c26660b019e01e6fe6bf4b | 3,405 | py | Python | robot/kuaishou.py | East196/hello-py | a77c7a0c8e5e2b5e8cefaf0fda335ab0c3b1da21 | [
"Apache-2.0"
] | 1 | 2017-10-23T14:58:47.000Z | 2017-10-23T14:58:47.000Z | robot/kuaishou.py | East196/hello-py | a77c7a0c8e5e2b5e8cefaf0fda335ab0c3b1da21 | [
"Apache-2.0"
] | null | null | null | robot/kuaishou.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 urllib.request, urllib.error, urllib.parse, urllib.request, urllib.parse, urllib.error
import json, os, re, socket, time, sys
import queue
import threading
import logging
# 日志模块
logger = logging.getLogger("kwai")
formatter = logging.Formatter('%(asctime)s %(levelna... | 31.238532 | 303 | 0.582379 |
a922a81668e48d6004d0a67083decc804f28f013 | 372 | py | Python | settings.py | metxchris/MMM-Explorer | 251b4d7af56241882611bc47e94ec2923e4be8da | [
"MIT"
] | null | null | null | settings.py | metxchris/MMM-Explorer | 251b4d7af56241882611bc47e94ec2923e4be8da | [
"MIT"
] | null | null | null | settings.py | metxchris/MMM-Explorer | 251b4d7af56241882611bc47e94ec2923e4be8da | [
"MIT"
] | null | null | null | # MMM Driver path (USE FORWARDSLASHES)
MMM_DRIVER_PATH = 'C:/cygwin64/home/metxc/mmmdev/wrapper/mmm.exe'
# Make Profile PDFS when running scans
MAKE_PROFILE_PDFS = True
# Automatically open PDFs after they are merged
AUTO_OPEN_PDFS = True
# Print messages for all saved files
PRINT_SAVE_MESSAGES = False
# Print non-... | 24.8 | 65 | 0.795699 |
a9677085b736bd3cfcc2452676d75e5eec14e1ed | 143 | py | Python | Algorithms/Bit_Manipulation/sum_vs_xor.py | byung-u/HackerRank | 4c02fefff7002b3af774b99ebf8d40f149f9d163 | [
"MIT"
] | null | null | null | Algorithms/Bit_Manipulation/sum_vs_xor.py | byung-u/HackerRank | 4c02fefff7002b3af774b99ebf8d40f149f9d163 | [
"MIT"
] | null | null | null | Algorithms/Bit_Manipulation/sum_vs_xor.py | byung-u/HackerRank | 4c02fefff7002b3af774b99ebf8d40f149f9d163 | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
input_b = bin(int(input()))[2:]
if input_b == '0':
print(1)
else:
print(2 ** sum([b == '0' for b in input_b]))
| 17.875 | 48 | 0.552448 |
8d69cc94ac56b8468d95edca690ca889e7db20c0 | 4,970 | py | Python | src/ztc/nginx/__init__.py | magistersart/ZTC_fork | ce72734ea575d9846b5b81f3efbfd14fa1f7e532 | [
"PostgreSQL"
] | null | null | null | src/ztc/nginx/__init__.py | magistersart/ZTC_fork | ce72734ea575d9846b5b81f3efbfd14fa1f7e532 | [
"PostgreSQL"
] | null | null | null | src/ztc/nginx/__init__.py | magistersart/ZTC_fork | ce72734ea575d9846b5b81f3efbfd14fa1f7e532 | [
"PostgreSQL"
] | null | null | null | #!/usr/bin/env python
#pylint: disable=W0232
"""
ztc.nginx package
Copyright (c) 2010 Vladimir Rusinov <vladimir@greenmice.info>
License: GPL3
This file is part of ZTC [http://bitbucket.org/rvs/ztc/]
"""
import urllib2
import time
#import ztc.commons
from ztc.check import ZTCCheck, CheckFail
from ztc.store import ZT... | 30.121212 | 79 | 0.545674 |
574a1533d1128fd4349fa868c883bd18e15907fa | 19,585 | py | Python | enrich/transform_ocr.py | sonar-idh/Transformer | bbfde9d19ad4a4917257483ba66eb30a8294244d | [
"MIT"
] | null | null | null | enrich/transform_ocr.py | sonar-idh/Transformer | bbfde9d19ad4a4917257483ba66eb30a8294244d | [
"MIT"
] | null | null | null | enrich/transform_ocr.py | sonar-idh/Transformer | bbfde9d19ad4a4917257483ba66eb30a8294244d | [
"MIT"
] | null | null | null | # coding: utf-8
"""
@author: melina
"""
from enrich.enrich_data import search_doublette, wd_id_to_gnd, enrich_entity
from os import listdir
from os.path import isfile, join
import pandas as pd
import json
import re
import fire
def process_tsv(inpath, outfile):
"""
Proceses the ocr .tsv files and
returns t... | 65.942761 | 357 | 0.439316 |
939f8d9c5a80989700b671e3cbfdad6e65c3a79c | 2,188 | py | Python | research/nlp/senta/src/training/optimizer.py | leelige/mindspore | 5199e05ba3888963473f2b07da3f7bca5b9ef6dc | [
"Apache-2.0"
] | 77 | 2021-10-15T08:32:37.000Z | 2022-03-30T13:09:11.000Z | research/nlp/senta/src/training/optimizer.py | leelige/mindspore | 5199e05ba3888963473f2b07da3f7bca5b9ef6dc | [
"Apache-2.0"
] | 3 | 2021-10-30T14:44:57.000Z | 2022-02-14T06:57:57.000Z | research/nlp/senta/src/training/optimizer.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... | 38.385965 | 94 | 0.691499 |
27aad991b80e2c0a0899ae3e27de6d51a6eae642 | 2,263 | py | Python | config/config.py | zhouhongf/bank_hr | a42e5e18f3ec36b1ec65931415fe476c9690e0a0 | [
"MIT"
] | 2 | 2021-11-27T06:40:47.000Z | 2022-01-06T03:12:46.000Z | config/config.py | zhouhongf/bank_hr | a42e5e18f3ec36b1ec65931415fe476c9690e0a0 | [
"MIT"
] | null | null | null | config/config.py | zhouhongf/bank_hr | a42e5e18f3ec36b1ec65931415fe476c9690e0a0 | [
"MIT"
] | null | null | null | import os
class Config:
GROUP_NAME = 'ubank_test'
PROJECT_NAME = 'wealth_state_comp'
SCHEDULED_DICT = {
'spider_interval': int(os.getenv('spider_INTERVAL', 720)), # 定时爬取时间间隔720分钟
'master_interval': int(os.getenv('master_INTERVAL', 1)), # 默认设定时间间隔10分钟
}
... | 33.776119 | 198 | 0.60981 |
fd97d979bebb86e9398cc7f1c9c48f9eb262da8f | 310 | py | Python | Language Proficiency/Python/Sets/Set Mutations/mutations.py | xuedong/hacker-rank | ce8a60f80c2c6935b427f9409d7e826ee0d26a89 | [
"MIT"
] | 1 | 2021-02-22T17:37:45.000Z | 2021-02-22T17:37:45.000Z | Language Proficiency/Python/Sets/Set Mutations/mutations.py | xuedong/hacker-rank | ce8a60f80c2c6935b427f9409d7e826ee0d26a89 | [
"MIT"
] | null | null | null | Language Proficiency/Python/Sets/Set Mutations/mutations.py | xuedong/hacker-rank | ce8a60f80c2c6935b427f9409d7e826ee0d26a89 | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
if __name__ == '__main__':
n = int(input())
set1 = set(map(int, input().split()))
N = int(input())
for _ in range(N):
cmd, _ = input().split()
set2 = set(map(int, input().split()))
eval("set1.{0}({1})".format(cmd, set2))
print(sum(set1))
| 19.375 | 47 | 0.512903 |
e382f50e98b307105e1cafbfcaa5b0f8c5da5a26 | 905 | py | Python | src/models/selfsupervised/train.py | kaphka/imi-master-thesis | 2331a3534dc32e30a1333bb21c68c1e1b07ec9e4 | [
"MIT"
] | 2 | 2018-04-27T09:02:15.000Z | 2019-04-19T19:12:13.000Z | src/models/selfsupervised/train.py | kaphka/imi-master-thesis | 2331a3534dc32e30a1333bb21c68c1e1b07ec9e4 | [
"MIT"
] | 1 | 2019-04-19T19:13:08.000Z | 2021-02-22T21:29:55.000Z | src/models/selfsupervised/train.py | kaphka/imi-master-thesis | 2331a3534dc32e30a1333bb21c68c1e1b07ec9e4 | [
"MIT"
] | null | null | null | import torch
from torch.autograd import Variable
import torch.nn as nn
import torch.nn.functional as F
import torch.optim as optim
import torchvision
from models.selfsupervised.discriminative import triplet_loss
criterion = triplet_loss
optimizer = optim.RMSprop(net.parameters(), lr=0.001, momentum=0.9)
for epoch... | 29.193548 | 67 | 0.644199 |
8b5f97f4b4f22586a1f191c45dbf7484d1f6162f | 7,602 | py | Python | src/sft/protocol/sender.py | huykingsofm/FileTransmitter | f0f8cd0d6f941903bb8c42291a81b711055fcb1a | [
"MIT"
] | 1 | 2020-08-28T19:06:13.000Z | 2020-08-28T19:06:13.000Z | src/sft/protocol/sender.py | huykingsofm/sft | f0f8cd0d6f941903bb8c42291a81b711055fcb1a | [
"MIT"
] | null | null | null | src/sft/protocol/sender.py | huykingsofm/sft | f0f8cd0d6f941903bb8c42291a81b711055fcb1a | [
"MIT"
] | null | null | null | import os
from typing import Callable
import csbuilder
from hks_pylib.done import Done
from hks_pylib.hksenum import HKSEnum
from csbuilder.scheme import Scheme
from csbuilder.scheme.result import SchemeResult
from csbuilder.cspacket.cspacket import CSPacket
from sft.file import FileReader
from sft.protocol import D... | 32.909091 | 86 | 0.610497 |
475836fb52c95412ba12fd46ffe7f7a164511135 | 1,344 | py | Python | forms.py | joomogmbh/GrillMeister | b1b4935d4e7f27dc895d6b16462d5568fb708ff3 | [
"MIT"
] | 1 | 2019-04-22T13:52:01.000Z | 2019-04-22T13:52:01.000Z | forms.py | joomogmbh/GrillMeister | b1b4935d4e7f27dc895d6b16462d5568fb708ff3 | [
"MIT"
] | null | null | null | forms.py | joomogmbh/GrillMeister | b1b4935d4e7f27dc895d6b16462d5568fb708ff3 | [
"MIT"
] | null | null | null | #encoding=utf-8
from flask_wtf import FlaskForm
from wtforms import Form, StringField, SubmitField, SelectField, BooleanField, DateField
from wtforms.validators import InputRequired
class IndexForm(FlaskForm):
name = StringField('Name', validators=[InputRequired()])
date = DateField("Datum", validators=[InputR... | 48 | 124 | 0.721726 |
9a2616897283c5fc92790e61a692e58e734e0c21 | 2,431 | py | Python | rasa_plus/__main__.py | alexandrebarbaruiva/rasa-plus | fe2ef9fcde007e42d62b38bf1afeeadd49f5ba95 | [
"MIT"
] | null | null | null | rasa_plus/__main__.py | alexandrebarbaruiva/rasa-plus | fe2ef9fcde007e42d62b38bf1afeeadd49f5ba95 | [
"MIT"
] | 1 | 2020-08-08T13:00:11.000Z | 2020-08-08T13:00:11.000Z | rasa_plus/__main__.py | alexandrebarbaruiva/rasa-plus | fe2ef9fcde007e42d62b38bf1afeeadd49f5ba95 | [
"MIT"
] | null | null | null | from os import walk
import click
def _get_files(path, type=None):
if path.endswith("/"):
path = path[:-1]
files = []
for (dirpath, dirnames, filenames) in walk(path):
for file in filenames:
files.append(f"{dirpath}/{file}")
files.sort()
return files
def _unify_files(p... | 23.833333 | 86 | 0.615385 |
9a6be6e0813de3a4f581ce49533b8758fba1fe2c | 5,750 | py | Python | fg/tournaments/migrations/0001_initial.py | alex-evans/fgolf | 8fcdfd72d168e25204a914e57d4c3478382fd473 | [
"MIT"
] | null | null | null | fg/tournaments/migrations/0001_initial.py | alex-evans/fgolf | 8fcdfd72d168e25204a914e57d4c3478382fd473 | [
"MIT"
] | null | null | null | fg/tournaments/migrations/0001_initial.py | alex-evans/fgolf | 8fcdfd72d168e25204a914e57d4c3478382fd473 | [
"MIT"
] | null | null | null | # Generated by Django 2.2.2 on 2019-08-05 01:51
from django.db import migrations, models
import django.db.models.deletion
class Migration(migrations.Migration):
initial = True
dependencies = [
]
operations = [
migrations.CreateModel(
name='Person',
fields=[
... | 48.319328 | 139 | 0.576 |
ef98f8ed0b0517043d624d590e2b845c5afc278f | 2,801 | py | Python | program/environment/net.py | SimonSkade/BwKI_autonome_Verkehrslenkung | 41d84ce2103a4338893dc610a46f7b115d584635 | [
"MIT"
] | 4 | 2019-08-22T19:16:28.000Z | 2019-10-27T07:09:09.000Z | program/environment/net.py | SimonSkade/BwKI_autonome_Verkehrslenkung | 41d84ce2103a4338893dc610a46f7b115d584635 | [
"MIT"
] | null | null | null | program/environment/net.py | SimonSkade/BwKI_autonome_Verkehrslenkung | 41d84ce2103a4338893dc610a46f7b115d584635 | [
"MIT"
] | null | null | null |
import numpy as np
def sigm(x):
return 1/(1+np.exp(-x))
class Vertex: #Stellt die Knoten im Netzwerk dar
def __init__(self, ID, position, connections):
self.ID = ID #Einfach eine sequenzielle Zahl; Der Index im Array network.vertexes
self.position = position #Koordinaten
self.connections = connections #Die ... | 35.0125 | 126 | 0.711532 |
eff0d3faf7c5f0777b777317268bb2c83bc43a5e | 6,694 | py | Python | dialogs/contact_to_infected.py | Maxwingber/corobot | a959e0deba734d3900d7b8a826b3fb56964db4c6 | [
"MIT"
] | null | null | null | dialogs/contact_to_infected.py | Maxwingber/corobot | a959e0deba734d3900d7b8a826b3fb56964db4c6 | [
"MIT"
] | null | null | null | dialogs/contact_to_infected.py | Maxwingber/corobot | a959e0deba734d3900d7b8a826b3fb56964db4c6 | [
"MIT"
] | 2 | 2020-03-22T11:38:54.000Z | 2020-03-24T11:11:56.000Z | # Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License.
from datetime import time
from typing import List
from botbuilder.dialogs import (
WaterfallDialog,
WaterfallStepContext,
DialogTurnResult,
ComponentDialog)
from botbuilder.dialogs.prompts import ChoicePrompt,... | 44.039474 | 255 | 0.655363 |
eff6607544c1ccb503e775a7d71599a599c0534c | 1,321 | py | Python | marsyas-vamp/marsyas/src/marsyas_python/task1_pedestrianwalk.py | jaouahbi/VampPlugins | 27c2248d1c717417fe4d448cdfb4cb882a8a336a | [
"Apache-2.0"
] | null | null | null | marsyas-vamp/marsyas/src/marsyas_python/task1_pedestrianwalk.py | jaouahbi/VampPlugins | 27c2248d1c717417fe4d448cdfb4cb882a8a336a | [
"Apache-2.0"
] | null | null | null | marsyas-vamp/marsyas/src/marsyas_python/task1_pedestrianwalk.py | jaouahbi/VampPlugins | 27c2248d1c717417fe4d448cdfb4cb882a8a336a | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/env python
# Exercises from the book:
# Designing Sound - Andy Farnell
# Practice 1 - Pedestrian walk
#
# It is a simple beeping sound
#
# Network description:
# Square wave \\
# ==> Multiplication ==> Output
# Sinusoid //
from marsyas import *
from marsyas_util import *
# We don't have a square... | 28.717391 | 101 | 0.704012 |
4bfe3bf0067ee57ecd31efad9c34a2c3b74e47a4 | 30,797 | py | Python | examples/XML/XMLParser.py | jecki/DHParser | c6c1bd7db2de85b5997a3640242f4f444532304e | [
"Apache-2.0"
] | 2 | 2020-12-25T19:37:42.000Z | 2021-03-26T04:59:12.000Z | examples/XML/XMLParser.py | jecki/DHParser | c6c1bd7db2de85b5997a3640242f4f444532304e | [
"Apache-2.0"
] | 6 | 2018-08-07T22:48:52.000Z | 2021-10-07T18:38:20.000Z | examples/XML/XMLParser.py | jecki/DHParser | c6c1bd7db2de85b5997a3640242f4f444532304e | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/env python3
#######################################################################
#
# SYMBOLS SECTION - Can be edited. Changes will be preserved.
#
#######################################################################
import collections
from functools import partial
import os
import sys
try:
scri... | 37.834152 | 456 | 0.601942 |
323b2ca1c01ae6bf6426d6f91c388526469a49e8 | 9,908 | py | Python | TimeSeries/not_finished/nbeats/nbeats.py | stanton119/data-analysis | b6fda815c6cc1798ba13a5d2680369b7e5dfcdf9 | [
"Apache-2.0"
] | null | null | null | TimeSeries/not_finished/nbeats/nbeats.py | stanton119/data-analysis | b6fda815c6cc1798ba13a5d2680369b7e5dfcdf9 | [
"Apache-2.0"
] | 1 | 2021-02-11T23:44:52.000Z | 2021-02-11T23:44:52.000Z | TimeSeries/not_finished/nbeats/nbeats.py | stanton119/data-analysis | b6fda815c6cc1798ba13a5d2680369b7e5dfcdf9 | [
"Apache-2.0"
] | 1 | 2021-12-16T01:02:23.000Z | 2021-12-16T01:02:23.000Z | # %%
import numpy as np
import pandas as pd
from time import process_time, time
from sklearn.preprocessing import StandardScaler
import matplotlib.pyplot as plt
import utilities
import data
plt.style.use("seaborn-whitegrid")
# %% Generate data
df = data.get_weather_data()
df_train, df_test = utilities.split_ts(df)
... | 23.423168 | 93 | 0.721639 |
f5d6aa75ff4ee63822e60704f9eb2180873cfa11 | 506 | py | Python | leetcode/198-House-Robber/HouseRobber_002.py | cc13ny/all-in | bc0b01e44e121ea68724da16f25f7e24386c53de | [
"MIT"
] | 1 | 2015-12-16T04:01:03.000Z | 2015-12-16T04:01:03.000Z | leetcode/198-House-Robber/HouseRobber_002.py | cc13ny/all-in | bc0b01e44e121ea68724da16f25f7e24386c53de | [
"MIT"
] | 1 | 2016-02-09T06:00:07.000Z | 2016-02-09T07:20:13.000Z | leetcode/198-House-Robber/HouseRobber_002.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 robaux(self, nums, aux):
i = len(nums) - 1
if i < 0:
return 0
if aux[i] > -1:
return aux[i]
if i == 0:
return nums[0]
aux[i] = max(nums[0] + self.robaux(nums[2:]... | 19.461538 | 58 | 0.444664 |
de7503e729a14eb3d6be7bc8fac77e48abba430c | 251 | py | Python | HackerRank/HackerRank-Python/Basic Data Types/Tuples.py | tareqmahmud/Competitive-Programming | ad5e53300d70280bccbd5046ca01278fb246f314 | [
"MIT"
] | 2 | 2020-11-19T19:03:28.000Z | 2021-01-04T19:52:11.000Z | HackerRank-Python/Basic Data Types/Tuples.py | tareqmahmud/HackerRank | e1b9facab6582f86ea6cc63afcc640e66ba3f67e | [
"MIT"
] | null | null | null | HackerRank-Python/Basic Data Types/Tuples.py | tareqmahmud/HackerRank | e1b9facab6582f86ea6cc63afcc640e66ba3f67e | [
"MIT"
] | null | null | null | if __name__ == "__main__":
n = int(input())
integer_list = map(int, input().split())
result = []
for value in integer_list:
result.append(value)
result = tuple(result)
hash_result = hash(result)
print(hash_result)
| 22.818182 | 44 | 0.613546 |
9d1288bd2198ffd4fb19002333c261309353e45f | 368 | py | Python | skimind/kernel/useCases/__init__.py | NathBangwa/SkimindFoot | 8ae3a00074c56dd981fbfdab30e29898ddcaf6be | [
"MIT"
] | 1 | 2020-11-13T18:30:47.000Z | 2020-11-13T18:30:47.000Z | skimind/kernel/useCases/__init__.py | nathanbangwa243/SkimindFoot | 8ae3a00074c56dd981fbfdab30e29898ddcaf6be | [
"MIT"
] | 5 | 2020-11-13T18:16:48.000Z | 2021-09-08T01:04:59.000Z | skimind/kernel/useCases/__init__.py | nathanbangwa243/SkimindFoot | 8ae3a00074c56dd981fbfdab30e29898ddcaf6be | [
"MIT"
] | null | null | null | #-*-coding: utf-8 -*-
#---------------------------------------------------------------------------
# USECASES INIT
#---------------------------------------------------------------------------
# gFunctions
from .. import gFunctions
# interfacedb
from .. import interfacedb
from ..interfacedb import modelRequest
# ... | 21.647059 | 76 | 0.423913 |
dffb57d6de7fccd71a5f722169d63534795143d3 | 10,110 | py | Python | andinopy/tcp/io_x1_emulator.py | andino-systems/andinopy | 28fc09fbdd67dd690b9b3f80f03a05c342c777e1 | [
"Apache-2.0"
] | null | null | null | andinopy/tcp/io_x1_emulator.py | andino-systems/andinopy | 28fc09fbdd67dd690b9b3f80f03a05c342c777e1 | [
"Apache-2.0"
] | null | null | null | andinopy/tcp/io_x1_emulator.py | andino-systems/andinopy | 28fc09fbdd67dd690b9b3f80f03a05c342c777e1 | [
"Apache-2.0"
] | null | null | null | # _ _ _
# / \ _ __ __| (_)_ __ ___ _ __ _ _
# / _ \ | '_ \ / _` | | '_ \ / _ \| '_ \| | | |
# / ___ \| | | | (_| | | | | | (_) | |_) | |_| |
# /_/ \_\_| |_|\__,_|_|_| |_|\___/| .__/ \__, |
# |_| |___/
# by Jakob Groß
import math
import ... | 32.095238 | 117 | 0.615628 |
26caef69f8cf938d604012e07f075e00bf63f2ee | 3,120 | py | Python | assignments/Embeddings/2-preprocessing.py | oliverguhr/htw-nlp-lecture | 371042ef360510d12ac454198056656967317cc1 | [
"MIT"
] | 11 | 2019-04-10T14:26:58.000Z | 2021-04-21T06:10:51.000Z | assignments/Embeddings/2-preprocessing.py | oliverguhr/htw-nlp-lecture | 371042ef360510d12ac454198056656967317cc1 | [
"MIT"
] | null | null | null | assignments/Embeddings/2-preprocessing.py | oliverguhr/htw-nlp-lecture | 371042ef360510d12ac454198056656967317cc1 | [
"MIT"
] | 1 | 2021-06-10T13:05:12.000Z | 2021-06-10T13:05:12.000Z | import fastText
import re
def load_data(path):
file = open(path, "r",encoding="utf-8")
data = file.readlines()
return [line.split("\t") for line in data]
def save_data(path,data):
with open(path, 'w',encoding="utf-8") as f:
f.write("\n".join(data))
def train():
... | 38.518519 | 252 | 0.557051 |
f8bd3f42dd8bfdd42eee15ba6b2c8705c21c415c | 1,640 | py | Python | research/cv/PSPNet/src/utils/metric_and_evalcallback.py | leelige/mindspore | 5199e05ba3888963473f2b07da3f7bca5b9ef6dc | [
"Apache-2.0"
] | 77 | 2021-10-15T08:32:37.000Z | 2022-03-30T13:09:11.000Z | research/cv/PSPNet/src/utils/metric_and_evalcallback.py | leelige/mindspore | 5199e05ba3888963473f2b07da3f7bca5b9ef6dc | [
"Apache-2.0"
] | 3 | 2021-10-30T14:44:57.000Z | 2022-02-14T06:57:57.000Z | research/cv/PSPNet/src/utils/metric_and_evalcallback.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.652174 | 89 | 0.637805 |
e44a44eb885da1e5c92789b6912606c8866e4ced | 4,570 | py | Python | TimeSeries/not_finished/nbeats/nbeats_pytorch.py | stanton119/data-analysis | b6fda815c6cc1798ba13a5d2680369b7e5dfcdf9 | [
"Apache-2.0"
] | null | null | null | TimeSeries/not_finished/nbeats/nbeats_pytorch.py | stanton119/data-analysis | b6fda815c6cc1798ba13a5d2680369b7e5dfcdf9 | [
"Apache-2.0"
] | 1 | 2021-02-11T23:44:52.000Z | 2021-02-11T23:44:52.000Z | TimeSeries/not_finished/nbeats/nbeats_pytorch.py | stanton119/data-analysis | b6fda815c6cc1798ba13a5d2680369b7e5dfcdf9 | [
"Apache-2.0"
] | 1 | 2021-12-16T01:02:23.000Z | 2021-12-16T01:02:23.000Z | # %%
import numpy as np
import pandas as pd
from time import process_time, time
from sklearn.preprocessing import StandardScaler
import matplotlib.pyplot as plt
import utilities
import data
plt.style.use("seaborn-whitegrid")
# %% Generate data
df = data.get_weather_data()
df_train, df_test = utilities.split_ts(df)
... | 23.080808 | 93 | 0.744639 |
5f9c4a4d36f52af5e121a54c9a86ce7a0486e845 | 759 | py | Python | Python/set_discard_remove_pop.py | paurav11/HackerRank | 80c91c5cc55dd56671a5906be7a106ad4f1db95e | [
"MIT"
] | 1 | 2021-05-19T06:44:03.000Z | 2021-05-19T06:44:03.000Z | Python/set_discard_remove_pop.py | paurav11/HackerRank | 80c91c5cc55dd56671a5906be7a106ad4f1db95e | [
"MIT"
] | null | null | null | Python/set_discard_remove_pop.py | paurav11/HackerRank | 80c91c5cc55dd56671a5906be7a106ad4f1db95e | [
"MIT"
] | null | null | null | if __name__ == '__main__':
n = int(input())
s = set(map(int, input().split()))
N = int(input())
if (n > 0 and n < 20) and (N > 0 and N < 20):
for _ in range(N):
try:
command = input().strip().split()
if command[0].lower() == 'discard':
... | 33 | 52 | 0.413702 |
8a6365be0fa2296c5a9b758840a61f198f3b72a6 | 221 | py | Python | exercises/fr/exc_01_07.py | Jette16/spacy-course | 32df0c8f6192de6c9daba89740a28c0537e4d6a0 | [
"MIT"
] | 2,085 | 2019-04-17T13:10:40.000Z | 2022-03-30T21:51:46.000Z | exercises/fr/exc_01_07.py | Jette16/spacy-course | 32df0c8f6192de6c9daba89740a28c0537e4d6a0 | [
"MIT"
] | 79 | 2019-04-18T14:42:55.000Z | 2022-03-07T08:15:43.000Z | exercises/fr/exc_01_07.py | Jette16/spacy-course | 32df0c8f6192de6c9daba89740a28c0537e4d6a0 | [
"MIT"
] | 361 | 2019-04-17T13:34:32.000Z | 2022-03-28T04:42:45.000Z | import spacy
# Charge le modèle "fr_core_news_sm"
nlp = ____
text = "Apple a été créée en 1976 par Steve Wozniak, Steve Jobs et Ron Wayne."
# Traite le texte
doc = ____
# Affiche le texte du document
print(____.____)
| 17 | 78 | 0.733032 |
6a5b99fc445bbfe5fffc07a3a2786a39df793790 | 21,464 | py | Python | myems-api/reports/offlinemetercost.py | 18600575648/myems | 38ab7d509b5ab275a4df0333e6256c586abdfbf9 | [
"MIT"
] | null | null | null | myems-api/reports/offlinemetercost.py | 18600575648/myems | 38ab7d509b5ab275a4df0333e6256c586abdfbf9 | [
"MIT"
] | null | null | null | myems-api/reports/offlinemetercost.py | 18600575648/myems | 38ab7d509b5ab275a4df0333e6256c586abdfbf9 | [
"MIT"
] | null | null | null | import falcon
import simplejson as json
import mysql.connector
import config
from datetime import datetime, timedelta, timezone
from core import utilities
from decimal import Decimal
import excelexporters.offlinemetercost
class Reporting:
@staticmethod
def __init__():
""""Initializes Reporting"""
... | 54.755102 | 120 | 0.526836 |
6a71653a4509f27ceb22f790da6cfa316725ab95 | 3,553 | py | Python | deprecated/benchmark/collective/resnet/utils/learning_rate.py | hutuxian/FleetX | 843c7aa33f5a14680becf058a3aaf0327eefafd4 | [
"Apache-2.0"
] | 170 | 2020-08-12T12:07:01.000Z | 2022-03-07T02:38:26.000Z | deprecated/benchmark/collective/resnet/utils/learning_rate.py | hutuxian/FleetX | 843c7aa33f5a14680becf058a3aaf0327eefafd4 | [
"Apache-2.0"
] | 195 | 2020-08-13T03:22:15.000Z | 2022-03-30T07:40:25.000Z | deprecated/benchmark/collective/resnet/utils/learning_rate.py | hutuxian/FleetX | 843c7aa33f5a14680becf058a3aaf0327eefafd4 | [
"Apache-2.0"
] | 67 | 2020-08-14T02:07:46.000Z | 2022-03-28T10:05:33.000Z | #copyright (c) 2019 PaddlePaddle Authors. All Rights Reserve.
#
#Licensed under the Apache License, Version 2.0 (the "License");
#you may not use this file except in compliance with the License.
#You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
#Unless required by applicable l... | 38.619565 | 120 | 0.678019 |
7c7839ca01ddd2bdcb5fd5229521214bf84d9767 | 1,949 | py | Python | Packs/DateTimeToADTime/Scripts/DateTimeToADTime/DateTimeToADTime.py | diCagri/content | c532c50b213e6dddb8ae6a378d6d09198e08fc9f | [
"MIT"
] | 799 | 2016-08-02T06:43:14.000Z | 2022-03-31T11:10:11.000Z | Packs/DateTimeToADTime/Scripts/DateTimeToADTime/DateTimeToADTime.py | diCagri/content | c532c50b213e6dddb8ae6a378d6d09198e08fc9f | [
"MIT"
] | 9,317 | 2016-08-07T19:00:51.000Z | 2022-03-31T21:56:04.000Z | Packs/DateTimeToADTime/Scripts/DateTimeToADTime/DateTimeToADTime.py | diCagri/content | c532c50b213e6dddb8ae6a378d6d09198e08fc9f | [
"MIT"
] | 1,297 | 2016-08-04T13:59:00.000Z | 2022-03-31T23:43:06.000Z | from calendar import timegm
from datetime import datetime, timedelta, tzinfo
import demistomock as demisto # noqa: F401
from CommonServerPython import * # noqa: F401
EPOCH_AS_FILETIME = 116444736000000000 # January 1, 1970 as MS file time
HUNDREDS_OF_NANOSECONDS = 10000000
ZERO = timedelta(0)
HOUR = timedelta(ho... | 27.450704 | 84 | 0.652129 |
7cd8814953c14c2543976ffa0a347a950368ad47 | 2,592 | py | Python | src/onegov/feriennet/views/userlinks.py | politbuero-kampagnen/onegov-cloud | 20148bf321b71f617b64376fe7249b2b9b9c4aa9 | [
"MIT"
] | null | null | null | src/onegov/feriennet/views/userlinks.py | politbuero-kampagnen/onegov-cloud | 20148bf321b71f617b64376fe7249b2b9b9c4aa9 | [
"MIT"
] | null | null | null | src/onegov/feriennet/views/userlinks.py | politbuero-kampagnen/onegov-cloud | 20148bf321b71f617b64376fe7249b2b9b9c4aa9 | [
"MIT"
] | null | null | null | from onegov.activity import Attendee, AttendeeCollection
from onegov.activity import BookingCollection
from onegov.feriennet import FeriennetApp, _
from onegov.feriennet.collections import BillingCollection
from onegov.feriennet.collections import VacationActivityCollection
from onegov.feriennet.models import VacationA... | 30.139535 | 78 | 0.615741 |
6b425ce167ecdb5deeb2348bbaf45d7dd5a1c5c7 | 1,208 | py | Python | python/course/leetcode/1~27/7. Reverse Integer.py | TimVan1596/ACM-ICPC | 07f7d728db1ecd09c5a3d0f05521930b14eb9883 | [
"Apache-2.0"
] | 1 | 2019-05-22T07:12:34.000Z | 2019-05-22T07:12:34.000Z | python/course/leetcode/1~27/7. Reverse Integer.py | TimVan1596/ACM-ICPC | 07f7d728db1ecd09c5a3d0f05521930b14eb9883 | [
"Apache-2.0"
] | 3 | 2021-12-10T01:13:54.000Z | 2021-12-14T21:18:42.000Z | python/course/leetcode/1~27/7. Reverse Integer.py | TimVan1596/ACM-ICPC | 07f7d728db1ecd09c5a3d0f05521930b14eb9883 | [
"Apache-2.0"
] | null | null | null | # -*- coding:utf-8 -*-
# @Time:2020/6/18 11:59
# @Author:TimVan
# @File:7. Reverse Integer.py
# @Software:PyCharm
# Given a 32-bit signed integer, reverse digits of an integer.
# Example 1:
# Input: 123
# Output: 321
#
# Example 2:
# Input: -123
# Output: -321
#
# Example 3:
# Input: 120
# Output: 21
# Note:
# Assume ... | 22.37037 | 75 | 0.538907 |
869963bda029394e5b8693552634788a9618ec3e | 75,250 | py | Python | exercises/networking_selfpaced/networking-workshop/collections/ansible_collections/community/general/plugins/modules/network/cloudengine/ce_acl_advance.py | tr3ck3r/linklight | 5060f624c235ecf46cb62cefcc6bddc6bf8ca3e7 | [
"MIT"
] | null | null | null | exercises/networking_selfpaced/networking-workshop/collections/ansible_collections/community/general/plugins/modules/network/cloudengine/ce_acl_advance.py | tr3ck3r/linklight | 5060f624c235ecf46cb62cefcc6bddc6bf8ca3e7 | [
"MIT"
] | null | null | null | exercises/networking_selfpaced/networking-workshop/collections/ansible_collections/community/general/plugins/modules/network/cloudengine/ce_acl_advance.py | tr3ck3r/linklight | 5060f624c235ecf46cb62cefcc6bddc6bf8ca3e7 | [
"MIT"
] | null | null | null | #!/usr/bin/python
#
# 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.
#
# Ansible is distribut... | 42.975443 | 155 | 0.52287 |
07728a7c1e18de3c6d850a50a1c070068684998f | 178 | py | Python | python/python_new/Python 3/untitled0xx.py | SayanGhoshBDA/code-backup | 8b6135facc0e598e9686b2e8eb2d69dd68198b80 | [
"MIT"
] | 16 | 2018-11-26T08:39:42.000Z | 2019-05-08T10:09:52.000Z | python/python_new/Python 3/untitled0xx.py | SayanGhoshBDA/code-backup | 8b6135facc0e598e9686b2e8eb2d69dd68198b80 | [
"MIT"
] | 8 | 2020-05-04T06:29:26.000Z | 2022-02-12T05:33:16.000Z | python/python_new/Python 3/untitled0xx.py | SayanGhoshBDA/code-backup | 8b6135facc0e598e9686b2e8eb2d69dd68198b80 | [
"MIT"
] | 5 | 2020-02-11T16:02:21.000Z | 2021-02-05T07:48:30.000Z | import numpy as np
a=np.array([[1,2],[3,4],[5,8]])
b=a.ravel()
print(b)
c=a.min()
print(c)
d=a.max()
print(d)
e=a.sum()
print(e)
f=a.sum(axis=0)
print(f)
g=a.sum(axis=1)
print(g) | 12.714286 | 31 | 0.601124 |
9c1148025ba3110b0e70f1c1119321e672383ce3 | 294 | py | Python | exercises/de/solution_03_14_01.py | Jette16/spacy-course | 32df0c8f6192de6c9daba89740a28c0537e4d6a0 | [
"MIT"
] | 2,085 | 2019-04-17T13:10:40.000Z | 2022-03-30T21:51:46.000Z | exercises/de/solution_03_14_01.py | Jette16/spacy-course | 32df0c8f6192de6c9daba89740a28c0537e4d6a0 | [
"MIT"
] | 79 | 2019-04-18T14:42:55.000Z | 2022-03-07T08:15:43.000Z | exercises/de/solution_03_14_01.py | Jette16/spacy-course | 32df0c8f6192de6c9daba89740a28c0537e4d6a0 | [
"MIT"
] | 361 | 2019-04-17T13:34:32.000Z | 2022-03-28T04:42:45.000Z | import json
import spacy
nlp = spacy.load("de_core_news_sm")
with open("exercises/de/tweets.json", encoding="utf8") as f:
TEXTS = json.loads(f.read())
# Verarbeite den Text und drucke die Nomen
for doc in nlp.pipe(TEXTS):
print([token.text for token in doc if token.pos_ == "NOUN"])
| 24.5 | 64 | 0.704082 |
9c634771ef80249db93e14b65d0adfc5b3c3961c | 592 | py | Python | DarkFAST-main/saya_gans/ngewe/list_pass.py | Zusyaku/Termux-And-Lali-Linux-V2 | b1a1b0841d22d4bf2cc7932b72716d55f070871e | [
"Apache-2.0"
] | 2 | 2021-11-17T03:35:03.000Z | 2021-12-08T06:00:31.000Z | DarkFAST-main/saya_gans/ngewe/list_pass.py | Zusyaku/Termux-And-Lali-Linux-V2 | b1a1b0841d22d4bf2cc7932b72716d55f070871e | [
"Apache-2.0"
] | null | null | null | DarkFAST-main/saya_gans/ngewe/list_pass.py | Zusyaku/Termux-And-Lali-Linux-V2 | b1a1b0841d22d4bf2cc7932b72716d55f070871e | [
"Apache-2.0"
] | 2 | 2021-11-05T18:07:48.000Z | 2022-02-24T21:25:07.000Z | # hallo bro :v
pw_tambahan="""
bismillah|sayang|bangsat|anjing|kontol|rahasia|cantik|786786
""".strip().split("|")
ngntd=((())>(()))+((())>(()))
def awok(ngentod):
return [ngentod,ngentod+"123",ngentod+"12345"]
def pw_list(ngentot):
if len(ngentot)==2:
aap_afandi=ngentot[1].split(" ")
if len(aap_afa... | 25.73913 | 61 | 0.636824 |
13db04f0eeba77eb128e02f7d337971297862423 | 1,240 | py | Python | musterloesungen/6.5.1/wissensdatenbank.py | giu/appe6-uzh-hs2018 | 204dea36be1e53594124b606cdfa044368e54726 | [
"MIT"
] | null | null | null | musterloesungen/6.5.1/wissensdatenbank.py | giu/appe6-uzh-hs2018 | 204dea36be1e53594124b606cdfa044368e54726 | [
"MIT"
] | null | null | null | musterloesungen/6.5.1/wissensdatenbank.py | giu/appe6-uzh-hs2018 | 204dea36be1e53594124b606cdfa044368e54726 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
# Kurs: Python: Grundlagen der Programmierung für Nicht-Informatiker
# Semester: Herbstsemester 2018
# Homepage: http://accaputo.ch/kurs/python-uzh-hs-2018/
# Author: Giuseppe Accaputo
# Aufgabe: 6.5.1
# In dieses Dictionary fügen wir Stichworte inkl. Beschreibungen h... | 31 | 118 | 0.637097 |
168ad615dfbef64be56e1e4b10846b607912545a | 1,949 | py | Python | src/onegov/town6/initial_content.py | politbuero-kampagnen/onegov-cloud | 20148bf321b71f617b64376fe7249b2b9b9c4aa9 | [
"MIT"
] | null | null | null | src/onegov/town6/initial_content.py | politbuero-kampagnen/onegov-cloud | 20148bf321b71f617b64376fe7249b2b9b9c4aa9 | [
"MIT"
] | null | null | null | src/onegov/town6/initial_content.py | politbuero-kampagnen/onegov-cloud | 20148bf321b71f617b64376fe7249b2b9b9c4aa9 | [
"MIT"
] | null | null | null | from onegov.core.utils import module_path
from onegov.reservation import ResourceCollection
from onegov.org.initial_content import add_builtin_forms
from onegov.org.initial_content import builtin_form_definitions
from onegov.org.initial_content import add_filesets, add_pages, load_content
from onegov.org.initial_conten... | 29.984615 | 76 | 0.688045 |
4c1cc8e900500730f73654d938a48acf241c44f3 | 1,980 | py | Python | official/cv/vit/export.py | leelige/mindspore | 5199e05ba3888963473f2b07da3f7bca5b9ef6dc | [
"Apache-2.0"
] | 1 | 2021-11-18T08:17:44.000Z | 2021-11-18T08:17:44.000Z | official/cv/vit/export.py | leelige/mindspore | 5199e05ba3888963473f2b07da3f7bca5b9ef6dc | [
"Apache-2.0"
] | null | null | null | official/cv/vit/export.py | leelige/mindspore | 5199e05ba3888963473f2b07da3f7bca5b9ef6dc | [
"Apache-2.0"
] | 2 | 2019-09-01T06:17:04.000Z | 2019-10-04T08:39:45.000Z | # Copyright 2020-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 agre... | 37.358491 | 97 | 0.731313 |
4c4b894f4a0bef3e4c5638e48ed8764cdd96e81a | 5,281 | py | Python | scripts/fig3.py | gavstrik/BC | 2085872f1ff4241dcf4a5ef64eaa0601fb8ac454 | [
"MIT"
] | null | null | null | scripts/fig3.py | gavstrik/BC | 2085872f1ff4241dcf4a5ef64eaa0601fb8ac454 | [
"MIT"
] | null | null | null | scripts/fig3.py | gavstrik/BC | 2085872f1ff4241dcf4a5ef64eaa0601fb8ac454 | [
"MIT"
] | null | null | null | import os
import numpy as np
import pandas as pd
from scipy.stats import ks_2samp, mannwhitneyu
import matplotlib.pyplot as plt
plt.rcParams["font.family"] = "sans-serif"
PLOTS_DIR = '../plots'
"""
plot means over all rounds.
"""
AMTdata = pd.read_csv('../data/amt.csv')
Nagel95 = pd.read_csv('../data/Nagel95.csv')
d... | 47.151786 | 168 | 0.569021 |
d5e2d3ff173e2871800b17df69475522d7becd59 | 5,736 | py | Python | agents/drgn.py | yerfor/Soft-DRGN | 0c96d1ea295077b949229261c37d8dde25001a03 | [
"MIT"
] | 2 | 2022-02-24T08:21:49.000Z | 2022-03-10T08:57:35.000Z | agents/drgn.py | yerfor/Soft-DRGN | 0c96d1ea295077b949229261c37d8dde25001a03 | [
"MIT"
] | 1 | 2022-02-24T08:40:21.000Z | 2022-02-24T12:01:58.000Z | agents/drgn.py | yerfor/Soft-DRGN | 0c96d1ea295077b949229261c37d8dde25001a03 | [
"MIT"
] | null | null | null | import torch
import torch.nn as nn
import torch.nn.functional as F
import numpy as np
from agents.dgn import DGNAgent
from modules.drgn import DRGNNetwork
from utils.numba_utils import *
from utils.torch_utils import *
from utils.hparams import hparams
class DRGNAgent(DGNAgent):
def __init__(self, in_dim, act_d... | 44.8125 | 119 | 0.624128 |
d5ef48efeecfbe9785559d0f199430fe172d7543 | 29 | py | Python | dask_controller/__init__.py | ncgr/Dask_Interpro | 9aabd13dc0d49d6d5092901bbf4b62fefc9f0c43 | [
"MIT"
] | null | null | null | dask_controller/__init__.py | ncgr/Dask_Interpro | 9aabd13dc0d49d6d5092901bbf4b62fefc9f0c43 | [
"MIT"
] | 23 | 2017-09-20T18:51:56.000Z | 2018-04-12T20:18:17.000Z | dscensor/server/neo4j_db/__init__.py | ncgr/DSCensor | bc2f610b35529d72fdfdd17ef5e497edfae56d5a | [
"MIT"
] | 1 | 2020-07-29T21:12:04.000Z | 2020-07-29T21:12:04.000Z | __author__ = 'ConnorCameron'
| 14.5 | 28 | 0.793103 |
fc330f054665ce2ee88dd4cf0b3233376d42f3bf | 1,218 | py | Python | Source/03_IMAP/app.py | rbiotblbk/WBS_T9_2022 | 533156db88ff2fe676564b0e5d6e84e888ab0916 | [
"MIT"
] | 1 | 2022-02-28T09:49:35.000Z | 2022-02-28T09:49:35.000Z | Source/03_IMAP/app.py | rbiotblbk/WBS_T9_2022 | 533156db88ff2fe676564b0e5d6e84e888ab0916 | [
"MIT"
] | null | null | null | Source/03_IMAP/app.py | rbiotblbk/WBS_T9_2022 | 533156db88ff2fe676564b0e5d6e84e888ab0916 | [
"MIT"
] | null | null | null | """
IMAP : Internet Messasge Access Protocol Version 4
- Cerntral Orient EMails
- MailBoxes
- Multiple Devices
"""
import imaplib
import json
import os
from pathlib import Path
os.chdir(Path(__file__).parent)
im = imaplib.IMAP4_SSL("imap.gmail.com", port = 993)
# Read Credentials from JSON File
with open("./em... | 18.738462 | 62 | 0.679803 |
9169e10cccebe37004d7d794ad22e31cfa926a74 | 9,957 | py | Python | doku/models.py | xJasonxy/einsatzdoku | 8af84446f99475519adaf803619f2c57174c517b | [
"MIT"
] | 1 | 2020-07-09T16:53:45.000Z | 2020-07-09T16:53:45.000Z | doku/models.py | xJasonxy/Einsatzdoku | 8af84446f99475519adaf803619f2c57174c517b | [
"MIT"
] | null | null | null | doku/models.py | xJasonxy/Einsatzdoku | 8af84446f99475519adaf803619f2c57174c517b | [
"MIT"
] | null | null | null | from django.db import models
from django.core.validators import MaxValueValidator, MinValueValidator
from django.contrib.auth import get_user_model
from django.contrib.auth.models import User
from django.dispatch import receiver
from django.db.models.signals import post_save
from datetime import datetime, timezone
impo... | 39.511905 | 108 | 0.702019 |
f43400eb2da68e1ea2292ba27572f17fb3d985b0 | 11,061 | py | Python | deprecated/benchmark/collective/bert/reader/pretraining.py | hutuxian/FleetX | 843c7aa33f5a14680becf058a3aaf0327eefafd4 | [
"Apache-2.0"
] | 170 | 2020-08-12T12:07:01.000Z | 2022-03-07T02:38:26.000Z | deprecated/benchmark/collective/bert/reader/pretraining.py | hutuxian/FleetX | 843c7aa33f5a14680becf058a3aaf0327eefafd4 | [
"Apache-2.0"
] | 195 | 2020-08-13T03:22:15.000Z | 2022-03-30T07:40:25.000Z | deprecated/benchmark/collective/bert/reader/pretraining.py | hutuxian/FleetX | 843c7aa33f5a14680becf058a3aaf0327eefafd4 | [
"Apache-2.0"
] | 67 | 2020-08-14T02:07:46.000Z | 2022-03-28T10:05:33.000Z | # Copyright (c) 2019 PaddlePaddle Authors. All Rights 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 app... | 38.141379 | 136 | 0.546605 |
fe20e910e3e4930c8acb37205ab0db3d1b9c3db5 | 407 | py | Python | 05.Greedy/HG/B1817.py | SP2021-2/Algorithm | 2e629eb5234212fad8bbc11491aad068e5783780 | [
"MIT"
] | 1 | 2021-11-21T06:03:06.000Z | 2021-11-21T06:03:06.000Z | 05.Greedy/HG/B1817.py | SP2021-2/Algorithm | 2e629eb5234212fad8bbc11491aad068e5783780 | [
"MIT"
] | 2 | 2021-10-13T07:21:09.000Z | 2021-11-14T13:53:08.000Z | 05.Greedy/HG/B1817.py | SP2021-2/Algorithm | 2e629eb5234212fad8bbc11491aad068e5783780 | [
"MIT"
] | null | null | null | import sys
import heapq as hq
N, M = map(int, sys.stdin.readline().split(" "))
def sol(n, m):
if N == 0:
print(0)
return 0
books = list(map(int, sys.stdin.readline().split(" ")))
cnt = 1
weight = 0
while books:
cur = books.pop()
if weight + cur > m:
cnt... | 17.695652 | 59 | 0.484029 |
4a36a87f34f44f57b66ae43a3a9effade7c7d6e9 | 11,941 | py | Python | Packs/CofenseIntelligenceV2/Integrations/CofenseIntelligenceV2/CofenseIntelligenceV2_test.py | diCagri/content | c532c50b213e6dddb8ae6a378d6d09198e08fc9f | [
"MIT"
] | 799 | 2016-08-02T06:43:14.000Z | 2022-03-31T11:10:11.000Z | Packs/CofenseIntelligenceV2/Integrations/CofenseIntelligenceV2/CofenseIntelligenceV2_test.py | diCagri/content | c532c50b213e6dddb8ae6a378d6d09198e08fc9f | [
"MIT"
] | 9,317 | 2016-08-07T19:00:51.000Z | 2022-03-31T21:56:04.000Z | Packs/CofenseIntelligenceV2/Integrations/CofenseIntelligenceV2/CofenseIntelligenceV2_test.py | diCagri/content | c532c50b213e6dddb8ae6a378d6d09198e08fc9f | [
"MIT"
] | 1,297 | 2016-08-04T13:59:00.000Z | 2022-03-31T23:43:06.000Z | import io
import json
import pytest
from CofenseIntelligenceV2 import *
from typing import Dict
import base64
mock_params = {'url_threshold': 'Major', 'file_threshold': 'Major', 'email_threshold': 'Major', 'ip_threshold': 'Major',
'domain_threshold': 'Major',
'days_back': 90}
mock_base... | 43.421818 | 128 | 0.662172 |
4a3797dbf1dc5ad6b9c6e7ebc79714798778bce1 | 281 | py | Python | SDorker-master/extract.py | Zusyaku/Termux-And-Lali-Linux-V2 | b1a1b0841d22d4bf2cc7932b72716d55f070871e | [
"Apache-2.0"
] | 2 | 2021-11-17T03:35:03.000Z | 2021-12-08T06:00:31.000Z | SDorker-master/extract.py | Zusyaku/Termux-And-Lali-Linux-V2 | b1a1b0841d22d4bf2cc7932b72716d55f070871e | [
"Apache-2.0"
] | null | null | null | SDorker-master/extract.py | Zusyaku/Termux-And-Lali-Linux-V2 | b1a1b0841d22d4bf2cc7932b72716d55f070871e | [
"Apache-2.0"
] | 2 | 2021-11-05T18:07:48.000Z | 2022-02-24T21:25:07.000Z | import sys,urllib
def main():
f=open(sys.argv[1],"r")
str=f.read()
f.close()
p=str.split("<a href=")
for s in p:
if s.lower().find("url?q=") == 2:
stin=8
ein=int(s.find("&"))
t=s[stin:ein]
t=urllib.unquote_plus(t)
print t
if __name__=="__main__":
main()
| 17.5625 | 35 | 0.58363 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.