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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
d40d47523dce33ab8ed57cb699ae2f22a539280b | 3,672 | py | Python | rewise-main/rewise/rewise.py | Zusyaku/Termux-And-Lali-Linux-V2 | b1a1b0841d22d4bf2cc7932b72716d55f070871e | [
"Apache-2.0"
] | 73 | 2021-02-09T08:34:23.000Z | 2022-02-18T04:41:07.000Z | rewise-main/rewise/rewise.py | Zusyaku/Termux-And-Lali-Linux-V2 | b1a1b0841d22d4bf2cc7932b72716d55f070871e | [
"Apache-2.0"
] | null | null | null | rewise-main/rewise/rewise.py | Zusyaku/Termux-And-Lali-Linux-V2 | b1a1b0841d22d4bf2cc7932b72716d55f070871e | [
"Apache-2.0"
] | 4 | 2021-02-12T04:24:07.000Z | 2022-03-22T19:23:42.000Z | import json
import re
from urllib import parse, request
def _request(url, data):
"""This function is responsible for making HTTP GET requests.
Args:
url (str): url
data (dict): query data
Returns:
str : HTTP body
"""
query_str = parse.urlencode(data)
url += '?' + que... | 22.95 | 73 | 0.529412 |
d445a73c3e198285c2fc4cdc161d738d12fc2175 | 156 | py | Python | Python/Books/Learning-Programming-with-Python.Tamim-Shahriar-Subeen/chapter-009.02-tuple/ph-9.25-tuple-pack-or-unpack.py | shihab4t/Books-Code | b637b6b2ad42e11faf87d29047311160fe3b2490 | [
"Unlicense"
] | null | null | null | Python/Books/Learning-Programming-with-Python.Tamim-Shahriar-Subeen/chapter-009.02-tuple/ph-9.25-tuple-pack-or-unpack.py | shihab4t/Books-Code | b637b6b2ad42e11faf87d29047311160fe3b2490 | [
"Unlicense"
] | null | null | null | Python/Books/Learning-Programming-with-Python.Tamim-Shahriar-Subeen/chapter-009.02-tuple/ph-9.25-tuple-pack-or-unpack.py | shihab4t/Books-Code | b637b6b2ad42e11faf87d29047311160fe3b2490 | [
"Unlicense"
] | null | null | null | # tuple pack
numbers = (10, 20, 30, 40)
n1, n2, n3, n4 = numbers
print(n1)
print(n2)
print(n3)
print(n4)
# tuple unpack
t = n3, n4
print(t, "\n", type(t))
| 13 | 26 | 0.608974 |
2e06032eb237de86563029bd4e0e6109cd8147a9 | 93 | py | Python | Curso_Python/Secao2-Python-Basico-Logica-Programacao/38_trocando_valor_variaveis/38_trocando_valor_variaveis.py | pedrohd21/Cursos-Feitos | b223aad83867bfa45ad161d133e33c2c200d42bd | [
"MIT"
] | null | null | null | Curso_Python/Secao2-Python-Basico-Logica-Programacao/38_trocando_valor_variaveis/38_trocando_valor_variaveis.py | pedrohd21/Cursos-Feitos | b223aad83867bfa45ad161d133e33c2c200d42bd | [
"MIT"
] | null | null | null | Curso_Python/Secao2-Python-Basico-Logica-Programacao/38_trocando_valor_variaveis/38_trocando_valor_variaveis.py | pedrohd21/Cursos-Feitos | b223aad83867bfa45ad161d133e33c2c200d42bd | [
"MIT"
] | null | null | null | """
Trocando o valor entre variaveis
"""
x = 10
y = 5
z = 20
x, y, z = z, x, y
print(x, y, z) | 11.625 | 32 | 0.537634 |
2e8bc9f0ad2a107c627b36966ede8e2963e519cf | 107 | py | Python | backups/backup/python/hello-python/database_playground.py | roskenet/Playground | 3cce70eeb38646b0f2ffbd071c3aaec7b8f5b9cb | [
"MIT"
] | null | null | null | backups/backup/python/hello-python/database_playground.py | roskenet/Playground | 3cce70eeb38646b0f2ffbd071c3aaec7b8f5b9cb | [
"MIT"
] | null | null | null | backups/backup/python/hello-python/database_playground.py | roskenet/Playground | 3cce70eeb38646b0f2ffbd071c3aaec7b8f5b9cb | [
"MIT"
] | 1 | 2020-10-02T04:57:25.000Z | 2020-10-02T04:57:25.000Z | # java -cp ./h2-1.4.200.jar org.h2.tools.Server -tcp -tcpAllowOthers -tcpPort 5234 -baseDir ./ -ifNotExists | 107 | 107 | 0.728972 |
cf40719f2f7c86164e5ba05e34bee0aaa866bc05 | 193 | py | Python | Licence 2/I33/TP 4/ex_5.py | axelcoezard/licence | 1ed409c4572dea080169171beb7e8571159ba071 | [
"MIT"
] | 8 | 2020-11-26T20:45:12.000Z | 2021-11-29T15:46:22.000Z | Licence 2/I33/TP 4/ex_5.py | axelcoezard/licence | 1ed409c4572dea080169171beb7e8571159ba071 | [
"MIT"
] | null | null | null | Licence 2/I33/TP 4/ex_5.py | axelcoezard/licence | 1ed409c4572dea080169171beb7e8571159ba071 | [
"MIT"
] | 6 | 2020-10-23T15:29:24.000Z | 2021-05-05T19:10:45.000Z | import random
from ex_3 import gentrianginf
def genasym(n, t):
L = gentrianginf(n, t)
for i in range(n):
for j in range(i + 1, n):
L[i][j] = -L[j][i]
return L
| 17.545455 | 33 | 0.53886 |
cf41c5430311a85321dea4d5108d9137af876ae5 | 2,077 | py | Python | apps/utils/mixin.py | dongdawang/ssrmgmt | a41e595aec503dcb191a20ea8d58233bbb8f2db0 | [
"MIT"
] | null | null | null | apps/utils/mixin.py | dongdawang/ssrmgmt | a41e595aec503dcb191a20ea8d58233bbb8f2db0 | [
"MIT"
] | null | null | null | apps/utils/mixin.py | dongdawang/ssrmgmt | a41e595aec503dcb191a20ea8d58233bbb8f2db0 | [
"MIT"
] | null | null | null | from functools import wraps
from django.contrib.auth.decorators import login_required
from django.utils.decorators import method_decorator
from django.http import HttpResponse
from django.conf import settings
import jwt
class LoginRequireMixin(object):
"""判断是否登录
"""
@method_decorator(login_required(logi... | 32.453125 | 86 | 0.599904 |
5129540201fd2fbd586d0e97305e275a019e36ad | 991 | py | Python | melodeiprogrammierer.py | luforst/bs1-melodeiprogrammierer | 9f11f8ec6e0ce0ae7804e317c8bcf10e2c76a3cc | [
"MIT"
] | null | null | null | melodeiprogrammierer.py | luforst/bs1-melodeiprogrammierer | 9f11f8ec6e0ce0ae7804e317c8bcf10e2c76a3cc | [
"MIT"
] | null | null | null | melodeiprogrammierer.py | luforst/bs1-melodeiprogrammierer | 9f11f8ec6e0ce0ae7804e317c8bcf10e2c76a3cc | [
"MIT"
] | null | null | null | #!/usr/bin/python3
"""Programm, um ein PBASIC-Programm für den BASIC Stamp 1 automatisiert zu schreiben.
Das erzeugte PBASIC-Programm lässt eine Melodei erklingen und automatisiert die Zuordnung von Tönen zu PBASIC-spezifischen Tonnummern.
GROSSBUCHSTABEN entsprechen erhöhten Halbtönen, z.B. C = cis
x bezeichne... | 35.392857 | 135 | 0.641776 |
5132352cb9b9460c7bed75e05978c8314c92681c | 614 | py | Python | Packs/KELARaDark/Scripts/MapRaDarkIncidentDetails/MapRaDarkIncidentDetails.py | diCagri/content | c532c50b213e6dddb8ae6a378d6d09198e08fc9f | [
"MIT"
] | 799 | 2016-08-02T06:43:14.000Z | 2022-03-31T11:10:11.000Z | Packs/KELARaDark/Scripts/MapRaDarkIncidentDetails/MapRaDarkIncidentDetails.py | diCagri/content | c532c50b213e6dddb8ae6a378d6d09198e08fc9f | [
"MIT"
] | 9,317 | 2016-08-07T19:00:51.000Z | 2022-03-31T21:56:04.000Z | Packs/KELARaDark/Scripts/MapRaDarkIncidentDetails/MapRaDarkIncidentDetails.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
import traceback
''' MAIN FUNCTION '''
def main():
try:
# Map the incident_markdown parsed before to kelaradarkitems field.
demisto.executeCommand("setIncident", {"kelaradarkdetails": demisto.args().get(... | 24.56 | 114 | 0.68241 |
51737688fe66ac3a5a153f6da94b09f3d1ba9a15 | 839 | py | Python | elements/python/9/5/soln.py | mmcloughlin/problems | 6095842ffe007a12ec8c2093850515aa4e046616 | [
"MIT"
] | 11 | 2019-02-08T06:54:34.000Z | 2021-08-07T18:57:39.000Z | elements/python/9/5/soln.py | mmcloughlin/problems | 6095842ffe007a12ec8c2093850515aa4e046616 | [
"MIT"
] | 1 | 2019-05-21T08:14:10.000Z | 2019-05-21T08:14:10.000Z | elements/python/9/5/soln.py | mmcloughlin/problems | 6095842ffe007a12ec8c2093850515aa4e046616 | [
"MIT"
] | null | null | null | def normalize_path(path):
parts = path.split('/')
if len(parts) == 0:
return ''
is_absolute = parts[0] == ''
stack = []
for part in parts:
if part == '' or part == '.':
continue
if part == '..':
if len(stack) > 0 and stack[-1] != '..':
... | 22.675676 | 89 | 0.508939 |
51a6beecde961925063075c2e51ec64ff0cc821e | 3,196 | py | Python | app-example.py | fox34/deCONZ-Event-Handler | 626dd7e4afbf49e8f41dc5f9470554741d38f353 | [
"CC-BY-4.0"
] | null | null | null | app-example.py | fox34/deCONZ-Event-Handler | 626dd7e4afbf49e8f41dc5f9470554741d38f353 | [
"CC-BY-4.0"
] | null | null | null | app-example.py | fox34/deCONZ-Event-Handler | 626dd7e4afbf49e8f41dc5f9470554741d38f353 | [
"CC-BY-4.0"
] | null | null | null | #!/usr/bin/env python3
# Beobachte deCONZ-Websocket auf Sensor-Ereignisse und schalte Licht entsprechend an/aus
import asyncio
import argparse
from datetime import datetime, time
import deCONZ
import logging
import json
import os
import sys
if __name__ != "__main__":
print("Kann nicht als Modul geladen werden.")... | 26.633333 | 94 | 0.714643 |
85a17200962c0bb7cc79777cb655e2041738f3c1 | 2,426 | py | Python | shinrl/solvers/discrete_pi/_build_table_mixin.py | omron-sinicx/ShinRL | 09f4ae274a33d1fc1d9d542f816aef40014af6b5 | [
"MIT"
] | 34 | 2021-12-09T07:12:57.000Z | 2022-03-11T08:17:20.000Z | shinrl/solvers/discrete_pi/_build_table_mixin.py | omron-sinicx/ShinRL | 09f4ae274a33d1fc1d9d542f816aef40014af6b5 | [
"MIT"
] | null | null | null | shinrl/solvers/discrete_pi/_build_table_mixin.py | omron-sinicx/ShinRL | 09f4ae274a33d1fc1d9d542f816aef40014af6b5 | [
"MIT"
] | 4 | 2021-12-11T07:48:01.000Z | 2022-03-01T23:50:33.000Z | """ MixIn to prepare tables in self.data.
Author: Toshinori Kitamura
Affiliation: NAIST & OSX
"""
from typing import Optional
import distrax
import gym
import jax
import jax.numpy as jnp
from chex import Array
import shinrl as srl
from .config import PiConfig
class BuildTableMixIn:
def initialize(self, env: gy... | 31.921053 | 87 | 0.652102 |
f18ee91bd14bf3154246de412ede201c0256f717 | 848 | py | Python | fbm.py | Nabizeus/merkmalskonstruktion | e6553a290d36b3bb4079e0ba21989e192d70eb6b | [
"Apache-2.0"
] | null | null | null | fbm.py | Nabizeus/merkmalskonstruktion | e6553a290d36b3bb4079e0ba21989e192d70eb6b | [
"Apache-2.0"
] | null | null | null | fbm.py | Nabizeus/merkmalskonstruktion | e6553a290d36b3bb4079e0ba21989e192d70eb6b | [
"Apache-2.0"
] | null | null | null | # A realization of 1D Fractional Brownian motion with time step dt = .5
import matplotlib.pyplot as pl
import numpy as np
t0 = 0.0
dt = 0.5
t_final = 1000.0
T = np.arange(t0, t_final+dt, dt)
H = .55
ax = pl.figure().add_subplot(111)
ax.set_xlabel('t')
ax.set_ylabel('X')
np.random.seed(0)
Gamma = [[0.0 for _ in T] f... | 22.315789 | 77 | 0.604953 |
2d1a1a55e59a2f8092aad82d3e38b7f4bf66c381 | 3,412 | py | Python | Webpage/custom/customOIDCAB.py | ASV-Aachen/Website | bbfc02d71dde67fdf89a4b819b795a73435da7cf | [
"Apache-2.0"
] | null | null | null | Webpage/custom/customOIDCAB.py | ASV-Aachen/Website | bbfc02d71dde67fdf89a4b819b795a73435da7cf | [
"Apache-2.0"
] | 46 | 2022-01-08T12:03:24.000Z | 2022-03-30T08:51:05.000Z | Webpage/custom/customOIDCAB.py | ASV-Aachen/Website | bbfc02d71dde67fdf89a4b819b795a73435da7cf | [
"Apache-2.0"
] | null | null | null |
from django.contrib.auth.models import User
from django.shortcuts import get_object_or_404
from mozilla_django_oidc.auth import OIDCAuthenticationBackend
import logging
from member.models import profile, role
import datetime
from django.contrib.auth.models import Group, Permission
def updateRoles(userProfile, claims)... | 27.296 | 84 | 0.597304 |
7428787736a70573651ebf55df1396dbe2b2aac1 | 3,199 | py | Python | python-bildungslogin/bildungslogin_metadata.py | univention/bildungslogin | 29bebe858a5445dd5566aad594b33b9dd716eca4 | [
"MIT"
] | null | null | null | python-bildungslogin/bildungslogin_metadata.py | univention/bildungslogin | 29bebe858a5445dd5566aad594b33b9dd716eca4 | [
"MIT"
] | null | null | null | python-bildungslogin/bildungslogin_metadata.py | univention/bildungslogin | 29bebe858a5445dd5566aad594b33b9dd716eca4 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
#
# Copyright 2021 Univention GmbH
#
# https://www.univention.de/
#
# All rights reserved.
#
# The source code of this program is made available
# under the terms of the GNU Affero General Public License version 3
# (GNU AGPL V3) as published by the Free Software Foundation.
#
# Binary versions ... | 35.153846 | 95 | 0.661144 |
77c42e621612fe1242c84224dcfdb48e3f9c167a | 1,350 | py | Python | 2267-check-if-there-is-a-valid-parentheses-string-path/2267-check-if-there-is-a-valid-parentheses-string-path.py | hyeseonko/LeetCode | 48dfc93f1638e13041d8ce1420517a886abbdc77 | [
"MIT"
] | 2 | 2021-12-05T14:29:06.000Z | 2022-01-01T05:46:13.000Z | 2267-check-if-there-is-a-valid-parentheses-string-path/2267-check-if-there-is-a-valid-parentheses-string-path.py | hyeseonko/LeetCode | 48dfc93f1638e13041d8ce1420517a886abbdc77 | [
"MIT"
] | null | null | null | 2267-check-if-there-is-a-valid-parentheses-string-path/2267-check-if-there-is-a-valid-parentheses-string-path.py | hyeseonko/LeetCode | 48dfc93f1638e13041d8ce1420517a886abbdc77 | [
"MIT"
] | null | null | null | class Solution:
def hasValidPath(self, grid: List[List[str]]) -> bool:
m, n = len(grid), len(grid[0])
# Three quick failure cases
if grid[0][0]==")": return False
if grid[-1][-1]=="(": return False
if (m+n)%2==0: return False
# Let's start!
q... | 39.705882 | 106 | 0.47037 |
77d19bdb6c191a5439685997ef9f8c94a5c16e02 | 491 | py | Python | exercises/fr/test_03_09_02.py | Jette16/spacy-course | 32df0c8f6192de6c9daba89740a28c0537e4d6a0 | [
"MIT"
] | 2,085 | 2019-04-17T13:10:40.000Z | 2022-03-30T21:51:46.000Z | exercises/fr/test_03_09_02.py | Jette16/spacy-course | 32df0c8f6192de6c9daba89740a28c0537e4d6a0 | [
"MIT"
] | 79 | 2019-04-18T14:42:55.000Z | 2022-03-07T08:15:43.000Z | exercises/fr/test_03_09_02.py | Jette16/spacy-course | 32df0c8f6192de6c9daba89740a28c0537e4d6a0 | [
"MIT"
] | 361 | 2019-04-17T13:34:32.000Z | 2022-03-28T04:42:45.000Z | def test():
assert Token.has_extension(
"reversed"
), "As-tu déclaré l'extension du token?"
ext = Token.get_extension("reversed")
assert ext[2] is not None, "As-tu défini correctement le getter ?"
assert (
"getter=get_reversed" in __solution__
), "As-tu affecté get_reversed comme... | 37.769231 | 87 | 0.680244 |
ae027450a8a84bad777d798b8763b8408c019391 | 157 | py | Python | python/abc/abc_find_subclasses.py | zeroam/TIL | 43e3573be44c7f7aa4600ff8a34e99a65cbdc5d1 | [
"MIT"
] | null | null | null | python/abc/abc_find_subclasses.py | zeroam/TIL | 43e3573be44c7f7aa4600ff8a34e99a65cbdc5d1 | [
"MIT"
] | null | null | null | python/abc/abc_find_subclasses.py | zeroam/TIL | 43e3573be44c7f7aa4600ff8a34e99a65cbdc5d1 | [
"MIT"
] | null | null | null | import abc
from abc_base import PluginBase
import abc_subclass
# import abc_register
for sc in PluginBase.__subclasses__():
print(sc.__name__)
| 17.444444 | 39 | 0.757962 |
7ad638c688d8e030414f2ae68ead964441cef832 | 8,364 | py | Python | 20-fs-ias-lec/groups/01-dev2dev/Code/BTonly/lib/logMerge/logMerge.py | Kyrus1999/BACnet | 5be8e1377252166041bcd0b066cce5b92b077d06 | [
"MIT"
] | 8 | 2020-03-17T21:12:18.000Z | 2021-12-12T15:55:54.000Z | 20-fs-ias-lec/groups/01-dev2dev/Code/BTonly/lib/logMerge/logMerge.py | Kyrus1999/BACnet | 5be8e1377252166041bcd0b066cce5b92b077d06 | [
"MIT"
] | 2 | 2021-07-19T06:18:43.000Z | 2022-02-10T12:17:58.000Z | 20-fs-ias-lec/groups/01-dev2dev/Code/BTonly/lib/logMerge/logMerge.py | Kyrus1999/BACnet | 5be8e1377252166041bcd0b066cce5b92b077d06 | [
"MIT"
] | 25 | 2020-03-20T09:32:45.000Z | 2021-07-18T18:12:59.000Z | # The connection api for transport groups
# Authors: Günes Aydin, Joey Zgraggen, Nikodem Kernbach
# VERSION: 1.0
import hashlib
import hmac
import nacl.encoding
import nacl.signing
import nacl.exceptions
import os
from os import walk
from Event import Event
from PCAP import PCAP
from logStore.transconn.database_conn... | 41.20197 | 136 | 0.667623 |
24cccde0e5196d70236d88b3e6a2821f5499012a | 722 | py | Python | books/PythonCleanCode/ch9_design_pattern/decorator_1.py | zeroam/TIL | 43e3573be44c7f7aa4600ff8a34e99a65cbdc5d1 | [
"MIT"
] | null | null | null | books/PythonCleanCode/ch9_design_pattern/decorator_1.py | zeroam/TIL | 43e3573be44c7f7aa4600ff8a34e99a65cbdc5d1 | [
"MIT"
] | null | null | null | books/PythonCleanCode/ch9_design_pattern/decorator_1.py | zeroam/TIL | 43e3573be44c7f7aa4600ff8a34e99a65cbdc5d1 | [
"MIT"
] | null | null | null | """Clean Code in Python - Chatper 9: Common Design Patterns
> Decorator
"""
class DictQuery:
def __init__(self, **kwargs):
self._raw_query = kwargs
def render(self) -> dict:
return self._raw_query
class QueryEnhancer:
def __init__(self, query: DictQuery):
self.d... | 21.878788 | 60 | 0.608033 |
707dd4be305d17c7ec149cf0b1969493582dbeff | 701 | py | Python | main.py | joy-mdy-geo/ufc-old | c3b4ab63c21984f57f802ae8d6680ddcf32af220 | [
"MIT"
] | null | null | null | main.py | joy-mdy-geo/ufc-old | c3b4ab63c21984f57f802ae8d6680ddcf32af220 | [
"MIT"
] | 3 | 2018-08-25T06:01:34.000Z | 2018-08-25T06:01:51.000Z | main.py | joy-mdy-geo/ufc-old | c3b4ab63c21984f57f802ae8d6680ddcf32af220 | [
"MIT"
] | null | null | null | from flask import Flask, render_template, jsonify, request
import controller
import pyperclip
app = Flask(__name__)
@app.route('/')
@app.route('/index')
def index():
return render_template('index.html')
@app.route('/_convert', methods=["POST"])
def convert():
from_text = request.form['from_text']
from_... | 21.90625 | 67 | 0.697575 |
3b7924750952207d8c24778f9b4f9425f83aa1db | 2,326 | py | Python | test_app.py | fluffy-critter/Publ | 868c5a17c605707dde4d1a95d79405301bd12f05 | [
"MIT"
] | 6 | 2018-03-29T02:07:44.000Z | 2018-09-26T00:17:31.000Z | test_app.py | fluffy-critter/Publ | 868c5a17c605707dde4d1a95d79405301bd12f05 | [
"MIT"
] | 82 | 2018-04-01T08:53:59.000Z | 2018-09-28T23:45:05.000Z | test_app.py | fluffy-critter/Publ | 868c5a17c605707dde4d1a95d79405301bd12f05 | [
"MIT"
] | null | null | null | """ Smoke test site runner """
# pylint:disable=invalid-name
import logging
import os
try:
import authl.flask
except ImportError:
authl = None
try:
import whoosh
except ImportError:
whoosh = None
import flask
import publ
import publ.image
APP_PATH = os.path.join(os.path.dirname(os.path.abspath(__f... | 28.365854 | 92 | 0.643594 |
8e746e3cfc0fddff1074ce114f3c231ae6ecb9d5 | 2,410 | py | Python | data_models/user_profile.py | Maxwingber/corobot | a959e0deba734d3900d7b8a826b3fb56964db4c6 | [
"MIT"
] | null | null | null | data_models/user_profile.py | Maxwingber/corobot | a959e0deba734d3900d7b8a826b3fb56964db4c6 | [
"MIT"
] | null | null | null | data_models/user_profile.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 typing import List
class PersonalData:
def __init__(self, family_name: str = None, first_name: str = None, gender: str = None, street: str = None,\
zipcode: str = None, city: str = None, telephone: str = Non... | 47.254902 | 112 | 0.66888 |
79db2b596add4d2cbfc33487cb61ef3869ad118d | 908 | py | Python | bigdata/flink/flinkk8soperator/examples/beam-python/src/beam_example/pipeline.py | smthkissinger/docker-images | 35e868295d04fa780325ada4168381f1e80e8fe4 | [
"BSD-3-Clause"
] | 475 | 2019-05-30T22:57:30.000Z | 2022-03-31T21:29:26.000Z | bigdata/flink/flinkk8soperator/examples/beam-python/src/beam_example/pipeline.py | smthkissinger/docker-images | 35e868295d04fa780325ada4168381f1e80e8fe4 | [
"BSD-3-Clause"
] | 182 | 2019-05-30T23:56:26.000Z | 2022-03-30T13:28:52.000Z | bigdata/flink/flinkk8soperator/examples/beam-python/src/beam_example/pipeline.py | smthkissinger/docker-images | 35e868295d04fa780325ada4168381f1e80e8fe4 | [
"BSD-3-Clause"
] | 171 | 2019-05-30T23:51:56.000Z | 2022-02-13T15:42:05.000Z | from __future__ import print_function
from __future__ import absolute_import
import sys
import apache_beam as beam
from apache_beam.options.pipeline_options import PipelineOptions
if __name__ == "__main__":
# --job_endpoint argument supplied by the Flink entry point
args = [
"--runner=PortableRunner"... | 31.310345 | 72 | 0.657489 |
8db02a16daab86a70036c2fbbec35c2149cbb5d8 | 4,347 | py | Python | src/onegov/election_day/collections/notifications.py | politbuero-kampagnen/onegov-cloud | 20148bf321b71f617b64376fe7249b2b9b9c4aa9 | [
"MIT"
] | null | null | null | src/onegov/election_day/collections/notifications.py | politbuero-kampagnen/onegov-cloud | 20148bf321b71f617b64376fe7249b2b9b9c4aa9 | [
"MIT"
] | null | null | null | src/onegov/election_day/collections/notifications.py | politbuero-kampagnen/onegov-cloud | 20148bf321b71f617b64376fe7249b2b9b9c4aa9 | [
"MIT"
] | null | null | null | from onegov.ballot import Election
from onegov.ballot import Vote
from onegov.election_day import _
from onegov.election_day.models import EmailNotification
from onegov.election_day.models import Notification
from onegov.election_day.models import SmsNotification
from onegov.election_day.models import WebhookNotificati... | 35.631148 | 75 | 0.604555 |
8df49e4312cc1fe9502e3c18ba45f03084c93e1a | 39 | py | Python | frontend/infra/provision/route53.py | jim-hill-r/BlueSteel | fa3ac479096679146b99bf5b12792fad25d9d0f1 | [
"MIT"
] | 2 | 2020-04-03T12:19:00.000Z | 2020-04-03T13:32:11.000Z | frontend/infra/provision/route53.py | jim-hill-r/BlueSteel | fa3ac479096679146b99bf5b12792fad25d9d0f1 | [
"MIT"
] | 25 | 2020-04-23T23:17:20.000Z | 2020-05-29T21:00:44.000Z | frontend/infra/provision/route53.py | jim-hill-r/BlueSteel | fa3ac479096679146b99bf5b12792fad25d9d0f1 | [
"MIT"
] | null | null | null | #TODO: Create automation around route53 | 39 | 39 | 0.846154 |
069f3aa9a43165e9b398f127797e8e8fa9c168d7 | 3,821 | py | Python | 2019/finals/reversing-tob/flag_encryptor.py | iicarus-bit/google-ctf | 4eb8742bca58ff071ff8f6814d41d9ec7eb1db4b | [
"Apache-2.0"
] | 2,757 | 2018-04-28T21:41:36.000Z | 2022-03-29T06:33:36.000Z | 2019/finals/reversing-tob/flag_encryptor.py | iicarus-bit/google-ctf | 4eb8742bca58ff071ff8f6814d41d9ec7eb1db4b | [
"Apache-2.0"
] | 20 | 2019-07-23T15:29:32.000Z | 2022-01-21T12:53:04.000Z | 2019/finals/reversing-tob/flag_encryptor.py | iicarus-bit/google-ctf | 4eb8742bca58ff071ff8f6814d41d9ec7eb1db4b | [
"Apache-2.0"
] | 449 | 2018-05-09T05:54:05.000Z | 2022-03-30T14:54:18.000Z | #!/usr/bin/env python2
# -------------------------------------------------------------------------------------------------
# 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 Lic... | 34.423423 | 100 | 0.49228 |
9db70ec9ce617080439c219dbde3ffd29908b4cc | 8,291 | py | Python | Packs/Base/Scripts/WordTokenizerV2/WordTokenizerV2.py | diCagri/content | c532c50b213e6dddb8ae6a378d6d09198e08fc9f | [
"MIT"
] | 799 | 2016-08-02T06:43:14.000Z | 2022-03-31T11:10:11.000Z | Packs/Base/Scripts/WordTokenizerV2/WordTokenizerV2.py | diCagri/content | c532c50b213e6dddb8ae6a378d6d09198e08fc9f | [
"MIT"
] | 9,317 | 2016-08-07T19:00:51.000Z | 2022-03-31T21:56:04.000Z | Packs/Base/Scripts/WordTokenizerV2/WordTokenizerV2.py | diCagri/content | c532c50b213e6dddb8ae6a378d6d09198e08fc9f | [
"MIT"
] | 1,297 | 2016-08-04T13:59:00.000Z | 2022-03-31T23:43:06.000Z | import spacy
import string
from HTMLParser import HTMLParser
from re import compile as _Re
from CommonServerPython import *
import sys
reload(sys)
sys.setdefaultencoding('utf-8') # pylint: disable=no-member
MAX_TEXT_LENGTH = 10 ** 5
NUMBER_PATTERN = "NUMBER_PATTERN"
URL_PATTERN = "URL_PATTERN"
EMAIL_PATTERN = "EMAI... | 36.364035 | 116 | 0.646243 |
d17b37b308f983588a69cc4194dbf2977cf3000f | 2,045 | py | Python | research/hpc/pinns/src/NavierStokes/eval_ns.py | leelige/mindspore | 5199e05ba3888963473f2b07da3f7bca5b9ef6dc | [
"Apache-2.0"
] | 77 | 2021-10-15T08:32:37.000Z | 2022-03-30T13:09:11.000Z | research/hpc/pinns/src/NavierStokes/eval_ns.py | leelige/mindspore | 5199e05ba3888963473f2b07da3f7bca5b9ef6dc | [
"Apache-2.0"
] | 3 | 2021-10-30T14:44:57.000Z | 2022-02-14T06:57:57.000Z | research/hpc/pinns/src/NavierStokes/eval_ns.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... | 43.510638 | 100 | 0.712469 |
ee3078efb61b674ba630bfbb6ac8565f76733523 | 2,852 | py | Python | Properties/API/functionlevel.py | NazaninBayati/SCA | 74e670462dd0da5e24147aab86df393b38405176 | [
"MIT"
] | null | null | null | Properties/API/functionlevel.py | NazaninBayati/SCA | 74e670462dd0da5e24147aab86df393b38405176 | [
"MIT"
] | null | null | null | Properties/API/functionlevel.py | NazaninBayati/SCA | 74e670462dd0da5e24147aab86df393b38405176 | [
"MIT"
] | null | null | null | import understand
import sys
func_list = []
final_list = []
function_list = []
def metric(file):
file_metric = []
metrics = file.metric(file.metrics())
for k, v in sorted(metrics.items()):
file_metric.append(v)
return file_metric
def printCallPairs(ent):
lineString = ''
ret=[]
... | 28.52 | 92 | 0.553296 |
118f125a71a10bba03e29c7c0ec5a92b283720dc | 329 | py | Python | playlist/musica.py | samcost/POO | 5c280407abb7aa9db1c82e52c34fd372465e8fe2 | [
"MIT"
] | null | null | null | playlist/musica.py | samcost/POO | 5c280407abb7aa9db1c82e52c34fd372465e8fe2 | [
"MIT"
] | null | null | null | playlist/musica.py | samcost/POO | 5c280407abb7aa9db1c82e52c34fd372465e8fe2 | [
"MIT"
] | null | null | null | class Musica:
def __init__ (self, artista, titulo):
self.__artista=artista
self.__titulo=titulo
@property
def artista (self):
return self.__artista
@property
def titulo (self):
return self.__titulo
def __str__ (self):
return f'{self.__artista} - {self._... | 21.933333 | 52 | 0.617021 |
0990ef57b01372a39ea0dd26bcf014b07e1a90d2 | 793 | py | Python | Python/zzz_training_challenge/Python_Challenge/solutions/tests/ch03_recursion/ex07_convert_test.py | Kreijeck/learning | eaffee08e61f2a34e01eb8f9f04519aac633f48c | [
"MIT"
] | null | null | null | Python/zzz_training_challenge/Python_Challenge/solutions/tests/ch03_recursion/ex07_convert_test.py | Kreijeck/learning | eaffee08e61f2a34e01eb8f9f04519aac633f48c | [
"MIT"
] | null | null | null | Python/zzz_training_challenge/Python_Challenge/solutions/tests/ch03_recursion/ex07_convert_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.ex07_convert import to_binary, to_octal, to_hex
@pytest.mark.parametrize("value, expected",
[(5, "101"), (7, "111"), (22, "10110"),
(4... | 28.321429 | 77 | 0.593947 |
61d07e1777b3cbfac840b459a6fd359f903f111a | 2,855 | py | Python | Packs/Workday/Integrations/Workday_IAM/test_data/fetch_incidents_partial_name_match_mock_data.py | diCagri/content | c532c50b213e6dddb8ae6a378d6d09198e08fc9f | [
"MIT"
] | 799 | 2016-08-02T06:43:14.000Z | 2022-03-31T11:10:11.000Z | Packs/Workday/Integrations/Workday_IAM/test_data/fetch_incidents_partial_name_match_mock_data.py | diCagri/content | c532c50b213e6dddb8ae6a378d6d09198e08fc9f | [
"MIT"
] | 9,317 | 2016-08-07T19:00:51.000Z | 2022-03-31T21:56:04.000Z | Packs/Workday/Integrations/Workday_IAM/test_data/fetch_incidents_partial_name_match_mock_data.py | diCagri/content | c532c50b213e6dddb8ae6a378d6d09198e08fc9f | [
"MIT"
] | 1,297 | 2016-08-04T13:59:00.000Z | 2022-03-31T23:43:06.000Z | full_report = {
"Report_Entry": [
{
"Employment_Status": "Active",
"Last_Day_Of_Work": "10/05/2035",
"Last_Hire_Date": "10/05/2020",
"Emp_ID": "100123",
"Display_Name": "Rony Rahardjo",
"Email_Address": "rarahardjo@paloaltonetworks.com"... | 36.139241 | 588 | 0.589142 |
28ad3d0460980fcbd58ccfdc0865a7b0d728f9e0 | 1,046 | py | Python | utils/gen_train_file.py | weihaoxie/FaceX-Zoo | db0b087e4f4d28152e172d6c8d3767a8870733b4 | [
"Apache-2.0"
] | 1,329 | 2021-01-13T07:06:30.000Z | 2022-03-31T07:23:39.000Z | utils/gen_train_file.py | weihaoxie/FaceX-Zoo | db0b087e4f4d28152e172d6c8d3767a8870733b4 | [
"Apache-2.0"
] | 115 | 2021-01-13T10:42:57.000Z | 2022-03-28T03:57:52.000Z | utils/gen_train_file.py | weihaoxie/FaceX-Zoo | db0b087e4f4d28152e172d6c8d3767a8870733b4 | [
"Apache-2.0"
] | 351 | 2021-01-13T07:21:00.000Z | 2022-03-29T14:11:39.000Z | """
@author: Jun Wang
@date: 20210105
@contact: jun21wangustc@gmail.com
"""
import os
def gen_train_file(data_root, train_file):
"""Generate the train file, which has the following format.
relative_path0 label0
relative_path1 label1
relative_path2 label2
"""
train_file_buf = open(train_fi... | 31.69697 | 105 | 0.688337 |
e926f818cf5625451b46d26110ff81d874206a93 | 2,554 | py | Python | Python/Buch_ATBS/Teil_2/Kapitel_11_Webscraping/04_suche_nach_summenformel_auf_wikipedia.py | Apop85/Scripts | 1d8dad316c55e1f1343526eac9e4b3d0909e4873 | [
"MIT"
] | null | null | null | Python/Buch_ATBS/Teil_2/Kapitel_11_Webscraping/04_suche_nach_summenformel_auf_wikipedia.py | Apop85/Scripts | 1d8dad316c55e1f1343526eac9e4b3d0909e4873 | [
"MIT"
] | 6 | 2020-12-24T15:15:09.000Z | 2022-01-13T01:58:35.000Z | Python/Buch_ATBS/Teil_2/Kapitel_11_Webscraping/04_suche_nach_summenformel_auf_wikipedia.py | Apop85/Scripts | 1d8dad316c55e1f1343526eac9e4b3d0909e4873 | [
"MIT"
] | null | null | null | # 04_suche_nach_summenformel_auf_wikipedia.py
# Webscraper für Summenformeln aus Wikipedia
import requests, logging, re, os
os.chdir(os.path.dirname(__file__))
logging.basicConfig(level=logging.CRITICAL, format='%(asctime)s - %(levelname)s - %(message)s')
def search_in_string(content):
global attempt
logging... | 34.053333 | 95 | 0.641738 |
c92c92b0dd1024b156e2da99675785bb47cbd3a0 | 10,624 | py | Python | racksorter.py | WolleTD/RackSorterPython | f6eb4f562e4b6008ce9ec9e64de1f1947cb84318 | [
"MIT"
] | null | null | null | racksorter.py | WolleTD/RackSorterPython | f6eb4f562e4b6008ce9ec9e64de1f1947cb84318 | [
"MIT"
] | null | null | null | racksorter.py | WolleTD/RackSorterPython | f6eb4f562e4b6008ce9ec9e64de1f1947cb84318 | [
"MIT"
] | null | null | null | #!/usr/bin/env python
# -*- coding: utf-8 -*-
"""
racksorter.py
~~~~~~~~~~~
Contains all logic to find fast solutions for sorting a rack
by only moving one element at a time. See paper for details.
:copyright: (c) 2017-2018 by Eicke Herbertz, Dominik Hilbers
:license: MIT, see LICENSE for deta... | 36.761246 | 91 | 0.607775 |
6ee43145bbe17a9291c7f4d4b93898042d76643c | 6,416 | py | Python | Packs/Graylog/Integrations/Graylog/Graylog.py | diCagri/content | c532c50b213e6dddb8ae6a378d6d09198e08fc9f | [
"MIT"
] | 799 | 2016-08-02T06:43:14.000Z | 2022-03-31T11:10:11.000Z | Packs/Graylog/Integrations/Graylog/Graylog.py | diCagri/content | c532c50b213e6dddb8ae6a378d6d09198e08fc9f | [
"MIT"
] | 9,317 | 2016-08-07T19:00:51.000Z | 2022-03-31T21:56:04.000Z | Packs/Graylog/Integrations/Graylog/Graylog.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
''' IMPORTS '''
from datetime import datetime
import dateparser
import requests
# Disable insecure warnings
requests.packages.urllib3.disable_warnings()
def results_return(command, thingtoreturn):
results = CommandResul... | 41.662338 | 130 | 0.586191 |
6c557729b0702c8b78fe94ebe526f0a63cbe1eff | 5,477 | py | Python | venv/Lib/site-packages/pynance/common.py | LeonardoHMS/imobi | 6b2b97a05df67ea7d493f7b601382f65c6629cc2 | [
"MIT"
] | 35 | 2015-03-12T04:16:14.000Z | 2020-12-17T18:10:15.000Z | venv/Lib/site-packages/pynance/common.py | LeonardoHMS/imobi | 6b2b97a05df67ea7d493f7b601382f65c6629cc2 | [
"MIT"
] | 31 | 2015-03-16T21:31:04.000Z | 2021-01-26T00:12:34.000Z | venv/Lib/site-packages/pynance/common.py | LeonardoHMS/imobi | 6b2b97a05df67ea7d493f7b601382f65c6629cc2 | [
"MIT"
] | 18 | 2015-09-30T10:40:26.000Z | 2021-01-25T21:20:44.000Z | """
.. Copyright (c) 2014, 2015 Marshall Farrier
license http://opensource.org/licenses/MIT
Common - generic functions (:mod:`pynance.common`)
==================================================
.. currentmodule:: pynance.common
"""
import pandas as pd
def featurize(equity_data, n_sessions, **kwargs):
"""
... | 30.943503 | 104 | 0.593391 |
dd3068f776c0d9e28d6dfe991d0b2210e7f66210 | 873 | py | Python | leetcode/105-Construct-Binary-Tree-from-Preorder-and-Inorder-Traversal/recursive.py | cc13ny/all-in | bc0b01e44e121ea68724da16f25f7e24386c53de | [
"MIT"
] | 1 | 2015-12-16T04:01:03.000Z | 2015-12-16T04:01:03.000Z | leetcode/105-Construct-Binary-Tree-from-Preorder-and-Inorder-Traversal/recursive.py | cc13ny/all-in | bc0b01e44e121ea68724da16f25f7e24386c53de | [
"MIT"
] | 1 | 2016-02-09T06:00:07.000Z | 2016-02-09T07:20:13.000Z | leetcode/105-Construct-Binary-Tree-from-Preorder-and-Inorder-Traversal/recursive.py | cc13ny/all-in | bc0b01e44e121ea68724da16f25f7e24386c53de | [
"MIT"
] | 2 | 2019-06-27T09:07:26.000Z | 2019-07-01T04:40:13.000Z | # Definition for a binary tree node.
# class TreeNode:
# def __init__(self, x):
# self.val = x
# self.left = None
# self.right = None
class Solution:
def buildTree(self, preorder: List[int], inorder: List[int]) -> TreeNode:
# preorder: root [left sub-tree] [right sub-tree]
... | 32.333333 | 115 | 0.557847 |
06c96e0abc745ac8c79d15c36d0350851e8b0174 | 463 | py | Python | envs/rpg/entities/barrier.py | etigerstudio/zilong-on-fire | 5144a471b2d39ea38a47d394e648de00dd13cd8b | [
"MIT"
] | 2 | 2021-01-07T01:10:49.000Z | 2022-01-21T09:37:16.000Z | envs/rpg/entities/barrier.py | etigerstudio/zilong-on-fire | 5144a471b2d39ea38a47d394e648de00dd13cd8b | [
"MIT"
] | null | null | null | envs/rpg/entities/barrier.py | etigerstudio/zilong-on-fire | 5144a471b2d39ea38a47d394e648de00dd13cd8b | [
"MIT"
] | null | null | null | from envs.rpg.entity import Entity
class Barrier(Entity):
REPRESENTATION = 2
BARRIER_REWARD = -1
DESTROY_REWARD = 0.125
def start(self, world):
pass
def update(self, world):
actor = world.get_actor_entity()
if actor.position == self.position:
actor.destroy(wor... | 22.047619 | 43 | 0.632829 |
b03b7ea2d3f0015c969c81fa0d7964f5e7013585 | 212 | py | Python | phypi.py | RMGrau/PhyPiDAQ | e7ea08a0d5de9772a1a5e32ccd0ab1bfddf9ff54 | [
"BSD-2-Clause"
] | 7 | 2018-11-30T13:38:27.000Z | 2021-03-10T15:37:56.000Z | phypi.py | RMGrau/PhyPiDAQ | e7ea08a0d5de9772a1a5e32ccd0ab1bfddf9ff54 | [
"BSD-2-Clause"
] | 5 | 2020-11-11T09:19:00.000Z | 2022-02-06T09:04:55.000Z | phypi.py | RMGrau/PhyPiDAQ | e7ea08a0d5de9772a1a5e32ccd0ab1bfddf9ff54 | [
"BSD-2-Clause"
] | 16 | 2019-04-16T10:15:45.000Z | 2021-12-15T14:59:31.000Z | #!/usr/bin/python3
# -*- coding: utf-8 -*-
''' run graphical user interface of PhyPiDAQ
'''
from phypidaq.runPhyPiUi import *
if __name__ == "__main__": # - - - - - - - - - - - - - - - - - - - -
runPhyPiUi()
| 21.2 | 68 | 0.537736 |
3c4b6b51b349dcaf4514109060fc84be871f3cd6 | 3,569 | py | Python | test/test_npu/test_network_ops/test_sigmoid_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_sigmoid_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_sigmoid_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... | 35.69 | 79 | 0.665733 |
3c79adc2cdf6073c91cf2b8980f8754291489ddf | 77 | py | Python | mcsf/commands/base.py | beremaran/mcsf | 7651e849b860cf4f0517fa8e4fc4b7a417bbc3a4 | [
"MIT"
] | null | null | null | mcsf/commands/base.py | beremaran/mcsf | 7651e849b860cf4f0517fa8e4fc4b7a417bbc3a4 | [
"MIT"
] | null | null | null | mcsf/commands/base.py | beremaran/mcsf | 7651e849b860cf4f0517fa8e4fc4b7a417bbc3a4 | [
"MIT"
] | null | null | null | class Command:
def handle(self, args):
raise NotImplementedError
| 19.25 | 33 | 0.688312 |
f9d14fcf4cc6531c2cf4bfb661a57809c5bc6a90 | 362 | py | Python | server/apps/movie/migrations/0004_auto_20190428_1616.py | Mayandev/django_morec | 8d115f76ad69d7aa78b07dc06aa7047979ad134b | [
"MIT"
] | 129 | 2019-04-20T08:23:25.000Z | 2022-03-14T10:02:23.000Z | server/apps/movie/migrations/0004_auto_20190428_1616.py | heartplus/django_morec | 8d115f76ad69d7aa78b07dc06aa7047979ad134b | [
"MIT"
] | 9 | 2019-05-19T15:06:17.000Z | 2021-12-14T06:47:14.000Z | server/apps/movie/migrations/0004_auto_20190428_1616.py | heartplus/django_morec | 8d115f76ad69d7aa78b07dc06aa7047979ad134b | [
"MIT"
] | 34 | 2019-05-06T06:37:17.000Z | 2021-12-09T02:27:58.000Z | # Generated by Django 2.1.4 on 2019-04-28 16:16
from django.db import migrations
class Migration(migrations.Migration):
dependencies = [
('movie', '0003_auto_20190428_1615'),
]
operations = [
migrations.RenameField(
model_name='movie',
old_name='movidId',
... | 19.052632 | 47 | 0.582873 |
34f5d9321b2e8ad5a1a211eb071b563c8180b100 | 3,755 | py | Python | spider/buyWatch.py | ABUGADAY/ShellsYouMayUse | d104b19c399cd163d328571d893b2f81124bb1ae | [
"Apache-2.0"
] | null | null | null | spider/buyWatch.py | ABUGADAY/ShellsYouMayUse | d104b19c399cd163d328571d893b2f81124bb1ae | [
"Apache-2.0"
] | null | null | null | spider/buyWatch.py | ABUGADAY/ShellsYouMayUse | d104b19c399cd163d328571d893b2f81124bb1ae | [
"Apache-2.0"
] | null | null | null | from json import JSONDecodeError
import requests
from datetime import datetime
from requests.adapters import HTTPAdapter
import time
def queryQuote(a, b):
cookie = "" #登陆苹果官网后的cookie
headers = {
'authority': 'www.apple.com.cn',
'pragma': 'no-cache',
'cache-control': 'no-cache',
... | 35.424528 | 145 | 0.525166 |
23c5a41f2d3e171348663fb165814c5bddb411be | 1,002 | py | Python | python/requests/advanced_usage/testing_and_mocking_requests.py | zeroam/TIL | 43e3573be44c7f7aa4600ff8a34e99a65cbdc5d1 | [
"MIT"
] | null | null | null | python/requests/advanced_usage/testing_and_mocking_requests.py | zeroam/TIL | 43e3573be44c7f7aa4600ff8a34e99a65cbdc5d1 | [
"MIT"
] | null | null | null | python/requests/advanced_usage/testing_and_mocking_requests.py | zeroam/TIL | 43e3573be44c7f7aa4600ff8a34e99a65cbdc5d1 | [
"MIT"
] | null | null | null | import unittest
import requests
import responses
class TestAPI(unittest.TestCase):
@responses.activate # intercept HTTP calls within this method
def test_simple(self):
response_data = {
'id': 'ch_1GH8so2eZvKYlo2CSMeAfRqt',
'object': 'charge',
'custom': {'id': 'cu_1G... | 29.470588 | 82 | 0.628743 |
a80fbe8b4b03116c91643cccb9920963bebce578 | 3,884 | py | Python | preprocessors/quac_general_processor.py | mrknight21/Roberta_QuAC | e837315bb7f1f45b4fb78e26835ce80d3d034f6e | [
"MIT"
] | null | null | null | preprocessors/quac_general_processor.py | mrknight21/Roberta_QuAC | e837315bb7f1f45b4fb78e26835ce80d3d034f6e | [
"MIT"
] | null | null | null | preprocessors/quac_general_processor.py | mrknight21/Roberta_QuAC | e837315bb7f1f45b4fb78e26835ce80d3d034f6e | [
"MIT"
] | null | null | null | import json
import logging
import msgpack
log = logging.getLogger(__name__)
class QuacGeneralProcessor:
def __init__(self, args):
self.train_file = args.train_file
self.dev_file = args.dev_file
self.save_train_file = args.save_train_file
self.save_dev_file = args.save_dev_file
... | 35.633028 | 75 | 0.509269 |
575785e138adb3d59aa9d1b25d84885341ab463d | 94 | py | Python | testfile.py | BruhMano/LoremPizzum | 8909a9f21ea2878cf9accf035989edbd15c3d285 | [
"BSD-3-Clause"
] | null | null | null | testfile.py | BruhMano/LoremPizzum | 8909a9f21ea2878cf9accf035989edbd15c3d285 | [
"BSD-3-Clause"
] | null | null | null | testfile.py | BruhMano/LoremPizzum | 8909a9f21ea2878cf9accf035989edbd15c3d285 | [
"BSD-3-Clause"
] | null | null | null | PRODUCT_QUANTITY_CHOICES = [(i, str(i)) for i in range(1, 21)]
print(PRODUCT_QUANTITY_CHOICES) | 47 | 62 | 0.765957 |
f58e614c61d2b5156d1102961f522f5e5aeb51ae | 889 | py | Python | IVTp/2014/LOHINA_L_M/task_4_11.py | YukkaSarasti/pythonintask | eadf4245abb65f4400a3bae30a4256b4658e009c | [
"Apache-2.0"
] | null | null | null | IVTp/2014/LOHINA_L_M/task_4_11.py | YukkaSarasti/pythonintask | eadf4245abb65f4400a3bae30a4256b4658e009c | [
"Apache-2.0"
] | null | null | null | IVTp/2014/LOHINA_L_M/task_4_11.py | YukkaSarasti/pythonintask | eadf4245abb65f4400a3bae30a4256b4658e009c | [
"Apache-2.0"
] | null | null | null | #Задача 4. Вариант 11.
#Напишите программу, которая выводит имя, под которым скрывается Йоханнес Бруфельдт. Дополнительно необходимо вывести область интересов указанной личности, место рождения, годы рождения и смерти (если человек умер), вычислить возраст на данный момент (или момент смерти). Для хранения всех необход... | 46.789474 | 438 | 0.775028 |
271f1054272cb1a39361a375c5df53941fe67113 | 360 | py | Python | Webpage/cruises/utils.py | ASV-Aachen/Website | bbfc02d71dde67fdf89a4b819b795a73435da7cf | [
"Apache-2.0"
] | null | null | null | Webpage/cruises/utils.py | ASV-Aachen/Website | bbfc02d71dde67fdf89a4b819b795a73435da7cf | [
"Apache-2.0"
] | 46 | 2022-01-08T12:03:24.000Z | 2022-03-30T08:51:05.000Z | Webpage/cruises/utils.py | ASV-Aachen/Website | bbfc02d71dde67fdf89a4b819b795a73435da7cf | [
"Apache-2.0"
] | null | null | null | import datetime
from django.shortcuts import redirect
SEASON_END_MONTH = 7 # Juli
def get_aktuelle_saison():
now = datetime.datetime.now()
year = now.year
month = now.month
return year
def check_authentication_redirect_if_fails(request, redirect_location="/"):
if not request.user.is_authentica... | 22.5 | 75 | 0.744444 |
7e06eb0528cbb3d5affae999548d5b8f65eef7f0 | 3,035 | py | Python | attackWiFi.py | Zusyaku/Termux-And-Lali-Linux-V2 | b1a1b0841d22d4bf2cc7932b72716d55f070871e | [
"Apache-2.0"
] | 2 | 2021-11-17T03:35:03.000Z | 2021-12-08T06:00:31.000Z | attackWiFi.py | Zusyaku/Termux-And-Lali-Linux-V2 | b1a1b0841d22d4bf2cc7932b72716d55f070871e | [
"Apache-2.0"
] | null | null | null | attackWiFi.py | Zusyaku/Termux-And-Lali-Linux-V2 | b1a1b0841d22d4bf2cc7932b72716d55f070871e | [
"Apache-2.0"
] | 2 | 2021-11-05T18:07:48.000Z | 2022-02-24T21:25:07.000Z | # -*- coding: utf-8 -*-
# @Author: lock
# @Date: 2017-01-21 22:39:51
# @Last Modified by: lock
# @Last Modified time: 2017-01-22 09:47:30
import sys
import urllib
import urllib2
import json
import hashlib
from Crypto.Cipher import AES
import collections
import optparse
from urllib import unquote
def getMd5(str):
... | 30.35 | 94 | 0.570675 |
fd8f54aa66e9d75108f45366614805305cd09c17 | 533 | py | Python | testcode/parser.py | Cl3V0r/MLSeminar | d05f171a9b7d773ea123e1919e07312a7f0c9fe8 | [
"MIT"
] | null | null | null | testcode/parser.py | Cl3V0r/MLSeminar | d05f171a9b7d773ea123e1919e07312a7f0c9fe8 | [
"MIT"
] | null | null | null | testcode/parser.py | Cl3V0r/MLSeminar | d05f171a9b7d773ea123e1919e07312a7f0c9fe8 | [
"MIT"
] | null | null | null | from bs4 import BeautifulSoup
import requests
#understand xpath http://zvon.org/comp/r/tut-XPath_1.html
def crawl_postillion(url):
result = []
req = requests.get(url)
i=0
while(req is not None and i<2):
soup = BeautifulSoup(req.text, "lxml")
containers=soup.find_all("div",{"class":"post he... | 21.32 | 62 | 0.651032 |
8b99bf5e0902bd00dbec9879575740569496161d | 3,361 | py | Python | NeuralNet/Oli/libs/TrainingLogger.py | alex-ta/Fontinator | 7ca9effe3b61ded032176557520127e1d4b7a5ef | [
"Apache-2.0"
] | 6 | 2017-04-12T14:05:19.000Z | 2021-01-29T11:23:50.000Z | NeuralNet/Oli/libs/TrainingLogger.py | alex-ta/Fontinator | 7ca9effe3b61ded032176557520127e1d4b7a5ef | [
"Apache-2.0"
] | null | null | null | NeuralNet/Oli/libs/TrainingLogger.py | alex-ta/Fontinator | 7ca9effe3b61ded032176557520127e1d4b7a5ef | [
"Apache-2.0"
] | null | null | null | from pathlib import Path
import matplotlib.pyplot as plt
import keras
import pandas as pd
from datetime import datetime
# The names of the columns
K_VAL_LOSS = 'val_loss'
K_VAL_ACC = 'val_acc'
K_ACC = 'acc'
K_LOSS = 'loss'
K_TDIFF = 'tdiff'
class TrainingLogger(keras.callbacks.Callback):
"""
This class logs ... | 33.277228 | 92 | 0.637905 |
d04b19f93384a49fbcc3252f5afdc50d8e517b10 | 11,729 | py | Python | 20-fs-ias-lec/groups/11-sensUI/sensui/ViewConfigTab.py | Kyrus1999/BACnet | 5be8e1377252166041bcd0b066cce5b92b077d06 | [
"MIT"
] | 8 | 2020-03-17T21:12:18.000Z | 2021-12-12T15:55:54.000Z | 20-fs-ias-lec/groups/11-sensUI/sensui/ViewConfigTab.py | Kyrus1999/BACnet | 5be8e1377252166041bcd0b066cce5b92b077d06 | [
"MIT"
] | 2 | 2021-07-19T06:18:43.000Z | 2022-02-10T12:17:58.000Z | 20-fs-ias-lec/groups/11-sensUI/sensui/ViewConfigTab.py | Kyrus1999/BACnet | 5be8e1377252166041bcd0b066cce5b92b077d06 | [
"MIT"
] | 25 | 2020-03-20T09:32:45.000Z | 2021-07-18T18:12:59.000Z | import os
# PyQt5
from PyQt5.QtWidgets import QWidget
from PyQt5.QtWidgets import QLineEdit, QCheckBox, QComboBox, QPushButton
from PyQt5.QtWidgets import QListView, QListWidget, QListWidgetItem, QAbstractItemView
from PyQt5.QtCore import QVariant, Qt
from PyQt5 import uic
# Own Modules
from View import View
from Sen... | 40.444828 | 115 | 0.687953 |
ef9fdd6b39309bb8c2700132124d4c5bd3e20866 | 10,982 | py | Python | service/mail_monitor.py | wangkaibiao/SettlersFinancialData3 | 498249e14f24bfa3186f07e8f66ee624d08c6ff1 | [
"MIT"
] | null | null | null | service/mail_monitor.py | wangkaibiao/SettlersFinancialData3 | 498249e14f24bfa3186f07e8f66ee624d08c6ff1 | [
"MIT"
] | null | null | null | service/mail_monitor.py | wangkaibiao/SettlersFinancialData3 | 498249e14f24bfa3186f07e8f66ee624d08c6ff1 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
"""舆情监控"""
import os,sys,poplib,base64,csv
from urllib.request import urlopen
sys.path.append(os.getcwd()+"/storage/emulated/0/qpython/lib/python3.2/site-packages")
#from aip import AipNlp
from aip.nlp import AipNlp
from lxml import etree
from bs4 import BeautifulSoup
from readabil... | 37.481229 | 126 | 0.574759 |
efa1251f548c2dcbe0a12cda223f3b857899ed24 | 258 | py | Python | lib/path.py | wchming1987/Tumbler | e309771779c8eb44e685adbb691a428d29009e05 | [
"Apache-2.0"
] | null | null | null | lib/path.py | wchming1987/Tumbler | e309771779c8eb44e685adbb691a428d29009e05 | [
"Apache-2.0"
] | null | null | null | lib/path.py | wchming1987/Tumbler | e309771779c8eb44e685adbb691a428d29009e05 | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/env python
# -*- coding=utf-8 -*-
import os
HOME_PATH = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))
#BIZ_PATH = os.path.join(HOME_PATH, 'biz')
ETC_PATH = os.path.join(HOME_PATH, 'etc')
LIB_PATH = os.path.join(HOME_PATH, 'lib')
| 21.5 | 71 | 0.693798 |
effcb4bb4947a4ea04a9fc8f003c7292309863f5 | 123 | py | Python | Python/Books/Learning-Programming-with-Python.Tamim-Shahriar-Subeen/chapter-003/pg-3.7-mathamatical-oparation.py | shihab4t/Books-Code | b637b6b2ad42e11faf87d29047311160fe3b2490 | [
"Unlicense"
] | null | null | null | Python/Books/Learning-Programming-with-Python.Tamim-Shahriar-Subeen/chapter-003/pg-3.7-mathamatical-oparation.py | shihab4t/Books-Code | b637b6b2ad42e11faf87d29047311160fe3b2490 | [
"Unlicense"
] | null | null | null | Python/Books/Learning-Programming-with-Python.Tamim-Shahriar-Subeen/chapter-003/pg-3.7-mathamatical-oparation.py | shihab4t/Books-Code | b637b6b2ad42e11faf87d29047311160fe3b2490 | [
"Unlicense"
] | null | null | null | # this program only run in interpater
>> > 5 / 2
2.5
>> > 5 - 2
3
>> > 5 * 2
10
>> > 5 // 2
2
>> > 5 % 2
1
>> > 5 ** 2
25
| 8.2 | 37 | 0.414634 |
324a8fc942db456df0a041ddba3065b4686b2015 | 1,048 | py | Python | Versuch2/data/old/task3.2.py | Tobias-Schoch/SSS | f8b078ca7f6482fc7c89d5f9e784a549459eefb7 | [
"MIT"
] | null | null | null | Versuch2/data/old/task3.2.py | Tobias-Schoch/SSS | f8b078ca7f6482fc7c89d5f9e784a549459eefb7 | [
"MIT"
] | null | null | null | Versuch2/data/old/task3.2.py | Tobias-Schoch/SSS | f8b078ca7f6482fc7c89d5f9e784a549459eefb7 | [
"MIT"
] | 1 | 2022-01-06T12:47:53.000Z | 2022-01-06T12:47:53.000Z | import numpy as np
import cv2
# ------------------------------ Aufgabe3.2 ------------------------------ #
white_minus_black = np.zeros((480, 640))
whiteavg = cv2.imread('data/whiteaverage.png')
blackavg = cv2.imread('data/blackaverage.png')
for y in range(0, 480):
for z in range(0, 640):
r1, g1, b1 ... | 26.871795 | 76 | 0.658397 |
3eec027af48cd1f54797e758f5c38f5df8d597c7 | 458 | py | Python | PlaidCTF/2020/crypto/sidhe/pow.py | mystickev/ctf-archives | 89e99a5cd5fb6b2923cad3fe1948d3ff78649b4e | [
"MIT"
] | 1 | 2021-11-02T20:53:58.000Z | 2021-11-02T20:53:58.000Z | PlaidCTF/2020/crypto/sidhe/pow.py | ruhan-islam/ctf-archives | 8c2bf6a608c821314d1a1cfaa05a6cccef8e3103 | [
"MIT"
] | null | null | null | PlaidCTF/2020/crypto/sidhe/pow.py | ruhan-islam/ctf-archives | 8c2bf6a608c821314d1a1cfaa05a6cccef8e3103 | [
"MIT"
] | 1 | 2021-12-19T11:06:24.000Z | 2021-12-19T11:06:24.000Z | import sys
import string
import random
import hashlib
# proof of work
prefix = ''.join(random.choice(string.ascii_letters + string.digits) for i in range(10))
print("Give me a string starting with {} of length {} so its sha256sum ends in fffffff.".format(prefix, len(prefix)+8))
l = input().strip()
if len(l) != len(pre... | 35.230769 | 122 | 0.69869 |
cd3ed364e129345878926a21fba7d7a2135fa4e5 | 170 | py | Python | exam_recipes/exam_recipes/web/validators.py | trenev/softuni-python-web-basics | 0fcf6b7f3389d06685d40615c376dc4027e772f2 | [
"MIT"
] | 1 | 2022-03-03T10:16:14.000Z | 2022-03-03T10:16:14.000Z | exam_recipes/exam_recipes/web/validators.py | trenev/softuni-python-web-basics | 0fcf6b7f3389d06685d40615c376dc4027e772f2 | [
"MIT"
] | null | null | null | exam_recipes/exam_recipes/web/validators.py | trenev/softuni-python-web-basics | 0fcf6b7f3389d06685d40615c376dc4027e772f2 | [
"MIT"
] | null | null | null | from django.core.exceptions import ValidationError
def validate_time_value(value):
if not value > 0:
raise ValidationError('Time must be positive number!')
| 24.285714 | 62 | 0.747059 |
26e0ae672d0db33c6527ba5e76fa2fa4c9ccde28 | 739 | py | Python | python/primary/模块/print_dict.py | EstherLacan/jiangfw | a449b1925742873c76dc1b3284aedb359204bc76 | [
"Apache-2.0"
] | 1 | 2020-07-29T16:43:46.000Z | 2020-07-29T16:43:46.000Z | python/primary/模块/print_dict.py | EstherLacan/jiangfw | a449b1925742873c76dc1b3284aedb359204bc76 | [
"Apache-2.0"
] | null | null | null | python/primary/模块/print_dict.py | EstherLacan/jiangfw | a449b1925742873c76dc1b3284aedb359204bc76 | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/python
# Filename: using_dict.py
# 'ab' is short for 'a'ddress'b'ook
ab = { 'Swaroop' : 'swaroopch@byteofpython.info',
'Larry' : 'larry@wall.org',
'Matsumoto' : 'matz@ruby-lang.org',
'Spammer' : 'spammer@hotmail.com'
}
help(dict)
print ("Swaroop's a... | 28.423077 | 85 | 0.596752 |
26eb7f3f65d721d8b3fbd2bf91ede0e79ac6c4d9 | 2,207 | py | Python | Packs/PrismaCloud/Scripts/PrismaCloudAttribution/PrismaCloudAttribution_test.py | diCagri/content | c532c50b213e6dddb8ae6a378d6d09198e08fc9f | [
"MIT"
] | 799 | 2016-08-02T06:43:14.000Z | 2022-03-31T11:10:11.000Z | Packs/PrismaCloud/Scripts/PrismaCloudAttribution/PrismaCloudAttribution_test.py | diCagri/content | c532c50b213e6dddb8ae6a378d6d09198e08fc9f | [
"MIT"
] | 9,317 | 2016-08-07T19:00:51.000Z | 2022-03-31T21:56:04.000Z | Packs/PrismaCloud/Scripts/PrismaCloudAttribution/PrismaCloudAttribution_test.py | diCagri/content | c532c50b213e6dddb8ae6a378d6d09198e08fc9f | [
"MIT"
] | 1,297 | 2016-08-04T13:59:00.000Z | 2022-03-31T23:43:06.000Z | from PrismaCloudAttribution import attribution_command
import demistomock as demisto # noqa # pylint: disable=unused-wildcard-import
import json
import io
MOCK_RESULT = [
{
"accountId": "123456",
"accountName": "aws-user-personal",
"cloudType": "aws",
"fqdn": [
"applica... | 31.985507 | 111 | 0.614862 |
e4127c4eefb91c1c7578d47df9c0d22921d23512 | 512 | py | Python | exercises/fr/test_01_08_01.py | Jette16/spacy-course | 32df0c8f6192de6c9daba89740a28c0537e4d6a0 | [
"MIT"
] | 2,085 | 2019-04-17T13:10:40.000Z | 2022-03-30T21:51:46.000Z | exercises/fr/test_01_08_01.py | Jette16/spacy-course | 32df0c8f6192de6c9daba89740a28c0537e4d6a0 | [
"MIT"
] | 79 | 2019-04-18T14:42:55.000Z | 2022-03-07T08:15:43.000Z | exercises/fr/test_01_08_01.py | Jette16/spacy-course | 32df0c8f6192de6c9daba89740a28c0537e4d6a0 | [
"MIT"
] | 361 | 2019-04-17T13:34:32.000Z | 2022-03-28T04:42:45.000Z | def test():
assert (
"token_text = token.text" in __solution__
), "Obtiens-tu correctement le texte du token ?"
assert (
"token_pos = token.pos_" in __solution__
), "Obtiens-tu correctement la partie de discours du token ? Pense à utiliser l'attribut avec le tiret bas."
assert (
... | 42.666667 | 116 | 0.673828 |
84367636053faf3c12dab5131ddd2b40cb9986ed | 559 | py | Python | Algorithms/3_Strings/23.py | abphilip-codes/Hackerrank_DSA | bb9e233d9d45c5b14c138830602695ad4113fba4 | [
"MIT"
] | 1 | 2021-11-25T13:39:30.000Z | 2021-11-25T13:39:30.000Z | Algorithms/3_Strings/23.py | abphilip-codes/Hackerrank_DSA | bb9e233d9d45c5b14c138830602695ad4113fba4 | [
"MIT"
] | null | null | null | Algorithms/3_Strings/23.py | abphilip-codes/Hackerrank_DSA | bb9e233d9d45c5b14c138830602695ad4113fba4 | [
"MIT"
] | null | null | null | # https://www.hackerrank.com/challenges/game-of-thrones/problem
#!/bin/python3
import math
import os
import random
import re
import sys
#
# Complete the 'gameOfThrones' function below.
#
# The function is expected to return a STRING.
# The function accepts STRING s as parameter.
#
def gameOfThrones(s):
return '... | 18.633333 | 78 | 0.670841 |
d9fa06fd4d6d6a91dceb1612d7d30a8a050618a9 | 6,097 | py | Python | TreeOutputLib/OneTreeOneFile/OneTreeOneFile.py | jvollhueter/pyMANGA-1 | 414204a394d44405225b4b8224b19464c1006f1d | [
"MIT"
] | null | null | null | TreeOutputLib/OneTreeOneFile/OneTreeOneFile.py | jvollhueter/pyMANGA-1 | 414204a394d44405225b4b8224b19464c1006f1d | [
"MIT"
] | null | null | null | TreeOutputLib/OneTreeOneFile/OneTreeOneFile.py | jvollhueter/pyMANGA-1 | 414204a394d44405225b4b8224b19464c1006f1d | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
@date: 2018-Today
@author: jasper.bathmann@ufz.de
"""
from TreeOutputLib.TreeOutput import TreeOutput
import os
## Output class. This class creates one file per tree at a defined location.
# A line containing time, position, desired geometric measures and desired
# ... | 48.776 | 80 | 0.541414 |
8a0b93d9d8ef43d4ec1cd5df824d562e4d695597 | 894 | py | Python | frappe-bench/apps/erpnext/erpnext/patches/v5_0/convert_stock_reconciliation.py | Semicheche/foa_frappe_docker | a186b65d5e807dd4caf049e8aeb3620a799c1225 | [
"MIT"
] | null | null | null | frappe-bench/apps/erpnext/erpnext/patches/v5_0/convert_stock_reconciliation.py | Semicheche/foa_frappe_docker | a186b65d5e807dd4caf049e8aeb3620a799c1225 | [
"MIT"
] | null | null | null | frappe-bench/apps/erpnext/erpnext/patches/v5_0/convert_stock_reconciliation.py | Semicheche/foa_frappe_docker | a186b65d5e807dd4caf049e8aeb3620a799c1225 | [
"MIT"
] | null | null | null | import frappe, json
def execute():
# stock reco now amendable
frappe.db.sql("""update tabDocPerm set `amend` = 1 where parent='Stock Reconciliation' and submit = 1""")
frappe.reload_doc("stock", "doctype", "stock_reconciliation_item")
frappe.reload_doctype("Stock Reconciliation")
if frappe.db.has_column("Stock... | 28.83871 | 106 | 0.653244 |
7c4c9ae6dc4bdace1fb1cdff4759295ce360860d | 412 | py | Python | src/tokenizer/yomi_tokenizer.py | katsugeneration/schuss | 30e2303aa0646f0a4424cbc4b5422acc58a06218 | [
"Apache-2.0"
] | 6 | 2018-12-20T06:50:52.000Z | 2021-12-16T13:08:38.000Z | src/tokenizer/yomi_tokenizer.py | katsugeneration/schuss | 30e2303aa0646f0a4424cbc4b5422acc58a06218 | [
"Apache-2.0"
] | 1 | 2020-06-29T07:00:51.000Z | 2020-06-29T07:00:51.000Z | src/tokenizer/yomi_tokenizer.py | katsugeneration/schuss | 30e2303aa0646f0a4424cbc4b5422acc58a06218 | [
"Apache-2.0"
] | 1 | 2022-03-04T07:29:55.000Z | 2022-03-04T07:29:55.000Z | # -*- coding: utf-8 -*-
import subprocess
class YomiTokenizer(object):
'''
Japanese Yomi Tokenizer
'''
def __init__(self):
self.vocab = []
def encode(self, sentence):
sentence = sentence.replace("\'", "\"")
f = subprocess.check_output("echo \'" + sentence + "\' | mecab -Oy... | 24.235294 | 117 | 0.572816 |
7c7af8c556161e0957f0d8a4f159fdc7b0bb3c31 | 4,670 | py | Python | src/onegov/fsi/forms/course.py | politbuero-kampagnen/onegov-cloud | 20148bf321b71f617b64376fe7249b2b9b9c4aa9 | [
"MIT"
] | null | null | null | src/onegov/fsi/forms/course.py | politbuero-kampagnen/onegov-cloud | 20148bf321b71f617b64376fe7249b2b9b9c4aa9 | [
"MIT"
] | null | null | null | src/onegov/fsi/forms/course.py | politbuero-kampagnen/onegov-cloud | 20148bf321b71f617b64376fe7249b2b9b9c4aa9 | [
"MIT"
] | null | null | null | import datetime
import re
from collections import OrderedDict
from datetime import timedelta
from onegov.core.utils import linkify, _email_regex
from onegov.form import Form
from onegov.form.fields import HtmlField
from onegov.fsi import _
from wtforms import StringField, BooleanField, TextAreaField, IntegerField
from... | 28.13253 | 79 | 0.643255 |
6b100bc0cd5f06a33ec5c214e485926a4fec9a97 | 187 | py | Python | python/argparse/positional_arugments.py | zeroam/TIL | 43e3573be44c7f7aa4600ff8a34e99a65cbdc5d1 | [
"MIT"
] | null | null | null | python/argparse/positional_arugments.py | zeroam/TIL | 43e3573be44c7f7aa4600ff8a34e99a65cbdc5d1 | [
"MIT"
] | null | null | null | python/argparse/positional_arugments.py | zeroam/TIL | 43e3573be44c7f7aa4600ff8a34e99a65cbdc5d1 | [
"MIT"
] | null | null | null | import argparse
parser = argparse.ArgumentParser()
# echo 라는 positional 인자값 추가
parser.add_argument('echo', help='echo the string you use here')
args = parser.parse_args()
print(args.echo) | 31.166667 | 64 | 0.775401 |
ed54cb03fd15c400d653e12c1b1c3217de332b10 | 1,398 | py | Python | Packs/SplunkPy/Scripts/SplunkShowIdentity/SplunkShowIdentity.py | diCagri/content | c532c50b213e6dddb8ae6a378d6d09198e08fc9f | [
"MIT"
] | 799 | 2016-08-02T06:43:14.000Z | 2022-03-31T11:10:11.000Z | Packs/SplunkPy/Scripts/SplunkShowIdentity/SplunkShowIdentity.py | diCagri/content | c532c50b213e6dddb8ae6a378d6d09198e08fc9f | [
"MIT"
] | 9,317 | 2016-08-07T19:00:51.000Z | 2022-03-31T21:56:04.000Z | Packs/SplunkPy/Scripts/SplunkShowIdentity/SplunkShowIdentity.py | diCagri/content | c532c50b213e6dddb8ae6a378d6d09198e08fc9f | [
"MIT"
] | 1,297 | 2016-08-04T13:59:00.000Z | 2022-03-31T23:43:06.000Z | import json
import demistomock as demisto # noqa: F401
from CommonServerPython import * # noqa: F401
def main():
incident = demisto.incident()
if not incident:
raise ValueError("Error - demisto.incident() expected to return current incident "
"from context but returned None... | 34.95 | 100 | 0.681688 |
6a3d735f171ac44401450c81cdc122c0e0f7434a | 2,595 | py | Python | python/oneflow/compatible/single_client/test/ops/test_mod.py | wangyuyue/oneflow | 0a71c22fe8355392acc8dc0e301589faee4c4832 | [
"Apache-2.0"
] | 3,285 | 2020-07-31T05:51:22.000Z | 2022-03-31T15:20:16.000Z | python/oneflow/compatible/single_client/test/ops/test_mod.py | wangyuyue/oneflow | 0a71c22fe8355392acc8dc0e301589faee4c4832 | [
"Apache-2.0"
] | 2,417 | 2020-07-31T06:28:58.000Z | 2022-03-31T23:04:14.000Z | python/oneflow/compatible/single_client/test/ops/test_mod.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... | 32.848101 | 87 | 0.684778 |
16142ad05d886ef22a22af843e0170ea03fafee1 | 763 | py | Python | exercises/es/exc_03_11.py | Jette16/spacy-course | 32df0c8f6192de6c9daba89740a28c0537e4d6a0 | [
"MIT"
] | 2,085 | 2019-04-17T13:10:40.000Z | 2022-03-30T21:51:46.000Z | exercises/es/exc_03_11.py | Jette16/spacy-course | 32df0c8f6192de6c9daba89740a28c0537e4d6a0 | [
"MIT"
] | 79 | 2019-04-18T14:42:55.000Z | 2022-03-07T08:15:43.000Z | exercises/es/exc_03_11.py | Jette16/spacy-course | 32df0c8f6192de6c9daba89740a28c0537e4d6a0 | [
"MIT"
] | 361 | 2019-04-17T13:34:32.000Z | 2022-03-28T04:42:45.000Z | import spacy
from spacy.tokens import Span
nlp = spacy.load("es_core_news_sm")
def get_wikipedia_url(span):
# Obtén la URL de Wikipedia si el span tiene uno de los siguientes labels
if ____ in ("PER", "ORG", "LOC"):
entity_text = span.text.replace(" ", "_")
return "https://es.wikipedia.org/w/... | 30.52 | 80 | 0.703801 |
bccc84ea05d74111fa6a3d9c885cb0e86dc5522b | 442 | py | Python | python_project/python/pyplot.py | sinomiko/project | 00fadb0033645f103692f5b06c861939a9d4aa0e | [
"BSD-3-Clause"
] | 1 | 2018-12-30T14:07:42.000Z | 2018-12-30T14:07:42.000Z | python_project/python/pyplot.py | sinomiko/project | 00fadb0033645f103692f5b06c861939a9d4aa0e | [
"BSD-3-Clause"
] | null | null | null | python_project/python/pyplot.py | sinomiko/project | 00fadb0033645f103692f5b06c861939a9d4aa0e | [
"BSD-3-Clause"
] | null | null | null | #!/usr/bin/python
#coding=utf-8
import numpy as np
import matplotlib.pyplot as plt
plt.figure(1) # 创建图表1
plt.figure(2) # 创建图表2
ax1 = plt.subplot(211) # 在图表2中创建子图1
ax2 = plt.subplot(212) # 在图表2中创建子图2
x = np.linspace(0, 3, 100)
for i in xrange(5):
plt.figure(1) #❶ # 选择图表1
plt.plot(x, np.exp(i*x/3))
plt.sca... | 22.1 | 35 | 0.635747 |
4c597a8706165724f9e997ff31e724a8ffabdc55 | 13,868 | py | Python | exercises/networking_selfpaced/networking-workshop/collections/ansible_collections/community/general/plugins/modules/nos_facts.py | tr3ck3r/linklight | 5060f624c235ecf46cb62cefcc6bddc6bf8ca3e7 | [
"MIT"
] | null | null | null | exercises/networking_selfpaced/networking-workshop/collections/ansible_collections/community/general/plugins/modules/nos_facts.py | tr3ck3r/linklight | 5060f624c235ecf46cb62cefcc6bddc6bf8ca3e7 | [
"MIT"
] | null | null | null | exercises/networking_selfpaced/networking-workshop/collections/ansible_collections/community/general/plugins/modules/nos_facts.py | tr3ck3r/linklight | 5060f624c235ecf46cb62cefcc6bddc6bf8ca3e7 | [
"MIT"
] | null | null | null | #!/usr/bin/python
#
# (c) 2018 Extreme Networks Inc.
#
# This file is part of Ansible
#
# Ansible is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any late... | 30.213508 | 150 | 0.621647 |
e6dbfd49a901090a1368ba0cb3fd87a0f46186a9 | 70 | py | Python | moviemon/classes/movies.test.py | 42bbichero/MovieMon | 4fee28e0449429ffcd3e0a284365a7f3e7c64e3d | [
"MIT"
] | null | null | null | moviemon/classes/movies.test.py | 42bbichero/MovieMon | 4fee28e0449429ffcd3e0a284365a7f3e7c64e3d | [
"MIT"
] | null | null | null | moviemon/classes/movies.test.py | 42bbichero/MovieMon | 4fee28e0449429ffcd3e0a284365a7f3e7c64e3d | [
"MIT"
] | 1 | 2019-01-12T10:42:25.000Z | 2019-01-12T10:42:25.000Z |
from movies import Movies
test = Movies()
print(test.get_movie())
| 8.75 | 25 | 0.714286 |
e6e4ce80a726774d73828c143833b4cca0cb103e | 22,553 | py | Python | linux-5.0.1/tools/testing/selftests/tc-testing/tdc.py | Ponny035/LFS | 7ae2280072d71f43e395149d0ad0692483a24b70 | [
"Unlicense"
] | null | null | null | linux-5.0.1/tools/testing/selftests/tc-testing/tdc.py | Ponny035/LFS | 7ae2280072d71f43e395149d0ad0692483a24b70 | [
"Unlicense"
] | null | null | null | linux-5.0.1/tools/testing/selftests/tc-testing/tdc.py | Ponny035/LFS | 7ae2280072d71f43e395149d0ad0692483a24b70 | [
"Unlicense"
] | null | null | null | #!/usr/bin/env python3
# SPDX-License-Identifier: GPL-2.0
"""
tdc.py - Linux tc (Traffic Control) unit test driver
Copyright (C) 2017 Lucas Bates <lucasb@mojatatu.com>
"""
import re
import os
import sys
import argparse
import importlib
import json
import subprocess
import time
import traceback
from collections impor... | 32.638205 | 115 | 0.5848 |
fc564c3df997fc184c3105df213d8d20d0d5b63e | 2,748 | py | Python | frappe-bench/apps/erpnext/erpnext/templates/pages/integrations/gocardless_confirmation.py | Semicheche/foa_frappe_docker | a186b65d5e807dd4caf049e8aeb3620a799c1225 | [
"MIT"
] | null | null | null | frappe-bench/apps/erpnext/erpnext/templates/pages/integrations/gocardless_confirmation.py | Semicheche/foa_frappe_docker | a186b65d5e807dd4caf049e8aeb3620a799c1225 | [
"MIT"
] | null | null | null | frappe-bench/apps/erpnext/erpnext/templates/pages/integrations/gocardless_confirmation.py | Semicheche/foa_frappe_docker | a186b65d5e807dd4caf049e8aeb3620a799c1225 | [
"MIT"
] | null | null | null | # Copyright (c) 2018, Frappe Technologies Pvt. Ltd. and Contributors
# License: GNU General Public License v3. See license.txt
from __future__ import unicode_literals
import frappe
from frappe import _
from erpnext.erpnext_integrations.doctype.gocardless_settings.gocardless_settings import gocardless_initialization, ge... | 31.953488 | 151 | 0.77147 |
5d94ff6f34d0525d272d1d71e0e10340283e010a | 1,393 | py | Python | annotation_constants/neg_annotation_constants.py | ChristianKitte/Textextraktion-und-Einordnung-mit-Hilfe-neuronaler-Netze | 53d3fc6b1c17f31146741cdebd743f4aa12a09e0 | [
"MIT"
] | null | null | null | annotation_constants/neg_annotation_constants.py | ChristianKitte/Textextraktion-und-Einordnung-mit-Hilfe-neuronaler-Netze | 53d3fc6b1c17f31146741cdebd743f4aa12a09e0 | [
"MIT"
] | 16 | 2020-01-28T23:04:13.000Z | 2022-03-12T00:02:40.000Z | annotation_constants/neg_annotation_constants.py | ChristianKitte/Textextraktion-und-Einordnung-mit-Hilfe-neuronaler-Netze | 53d3fc6b1c17f31146741cdebd743f4aa12a09e0 | [
"MIT"
] | null | null | null | import cv2
class NEG_ANNOTATION_CONTANTS():
"""A class for defining the text output of the annotation for texts recognized in images, which
identify ingredients via their static methods.
"""
@staticmethod
def FONT():
"""Defines the font.
(Example: cv2.FONT_HERSHEY_SIMPL... | 22.111111 | 100 | 0.529074 |
5dc9eea19f14c932816f2046122317788b68f176 | 1,019 | py | Python | Python/Tipos e comandos/Bissecao.py | gianvstheworld/POO | f6b9d3d351d703d974a6ca031ee636aea7119367 | [
"MIT"
] | null | null | null | Python/Tipos e comandos/Bissecao.py | gianvstheworld/POO | f6b9d3d351d703d974a6ca031ee636aea7119367 | [
"MIT"
] | null | null | null | Python/Tipos e comandos/Bissecao.py | gianvstheworld/POO | f6b9d3d351d703d974a6ca031ee636aea7119367 | [
"MIT"
] | null | null | null | '''
-- Nome: Gianluca Capezzuto Sardinha
-- NUSP: 11876933
-- Exercício 8
'''
def f(x):
fx = x**3 - x**2 - (13 * x) + 8
return fx
def leu():
while(True):
try:
k = int(input('Digite um inteiro: '))
break
except ValueError:
print('O valor digitado deve... | 16.435484 | 105 | 0.489696 |
5de44f5475fa7d1487892ff069d7f0be8d7f91d7 | 5,334 | py | Python | Co-Simulation/Sumo/sumo-1.7.0/tools/contributed/sumopy/sumopy_gui.py | uruzahe/carla | 940c2ab23cce1eda1ef66de35f66b42d40865fb1 | [
"MIT"
] | 4 | 2020-11-13T02:35:56.000Z | 2021-03-29T20:15:54.000Z | Co-Simulation/Sumo/sumo-1.7.0/tools/contributed/sumopy/sumopy_gui.py | uruzahe/carla | 940c2ab23cce1eda1ef66de35f66b42d40865fb1 | [
"MIT"
] | 9 | 2020-12-09T02:12:39.000Z | 2021-02-18T00:15:28.000Z | Co-Simulation/Sumo/sumo-1.7.0/tools/contributed/sumopy/sumopy_gui.py | uruzahe/carla | 940c2ab23cce1eda1ef66de35f66b42d40865fb1 | [
"MIT"
] | 1 | 2020-11-20T19:31:26.000Z | 2020-11-20T19:31:26.000Z | #!/usr/bin/env python
# Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo
# Copyright (C) 2016-2020 German Aerospace Center (DLR) and others.
# SUMOPy module
# Copyright (C) 2012-2017 University of Bologna - DICAM
# This program and the accompanying materials are made available under the
# terms ... | 36.786207 | 173 | 0.651481 |
f8d445d13808b981906fe8c696215675e274ea4d | 2,288 | py | Python | frappe-bench/env/lib/python2.7/site-packages/stdnum/eu/banknote.py | Semicheche/foa_frappe_docker | a186b65d5e807dd4caf049e8aeb3620a799c1225 | [
"MIT"
] | null | null | null | frappe-bench/env/lib/python2.7/site-packages/stdnum/eu/banknote.py | Semicheche/foa_frappe_docker | a186b65d5e807dd4caf049e8aeb3620a799c1225 | [
"MIT"
] | null | null | null | frappe-bench/env/lib/python2.7/site-packages/stdnum/eu/banknote.py | Semicheche/foa_frappe_docker | a186b65d5e807dd4caf049e8aeb3620a799c1225 | [
"MIT"
] | null | null | null | # banknote.py - functions for handling Euro banknote serial numbers
#
# Copyright (C) 2017 Arthur de Jong
#
# This library is free software; you can redistribute it and/or
# modify it under the terms of the GNU Lesser General Public
# License as published by the Free Software Foundation; either
# version 2.1 of the Lic... | 31.342466 | 77 | 0.718094 |
f8f83e531a514ee31a5d331645754f4c27c6b47d | 2,410 | py | Python | 1_DeepLearning-Basics/03_NeuralNetwork_Basics_2/OneHot_softmax_crossEntropy.py | felixdittrich92/DeepLearning-tensorflow-keras | 2880d8ed28ba87f28851affa92b6fa99d2e47be9 | [
"Apache-2.0"
] | null | null | null | 1_DeepLearning-Basics/03_NeuralNetwork_Basics_2/OneHot_softmax_crossEntropy.py | felixdittrich92/DeepLearning-tensorflow-keras | 2880d8ed28ba87f28851affa92b6fa99d2e47be9 | [
"Apache-2.0"
] | null | null | null | 1_DeepLearning-Basics/03_NeuralNetwork_Basics_2/OneHot_softmax_crossEntropy.py | felixdittrich92/DeepLearning-tensorflow-keras | 2880d8ed28ba87f28851affa92b6fa99d2e47be9 | [
"Apache-2.0"
] | null | null | null | # One-Hot-Encoding:
#╔════════════╦═════════════════╦════════╗
#║ CompanyName Categoricalvalue ║ Price ║
#╠════════════╬═════════════════╣════════║
#║ VW ╬ 1 ║ 20000 ║
#║ Acura ╬ 2 ║ 10011 ║
#║ Honda ╬ 3 ║ 50000 ║
#║ Honda ╬ 3 ║ 10000 ... | 29.036145 | 97 | 0.515768 |
53dbc7dc106bddac8a7d75a1d2e7e82f1b009094 | 90 | py | Python | Shivani/equilateral triangle.py | 63Shivani/Python-BootCamp | 2ed0ef95af35d35c0602031670fecfc92d8cea0a | [
"MIT"
] | null | null | null | Shivani/equilateral triangle.py | 63Shivani/Python-BootCamp | 2ed0ef95af35d35c0602031670fecfc92d8cea0a | [
"MIT"
] | null | null | null | Shivani/equilateral triangle.py | 63Shivani/Python-BootCamp | 2ed0ef95af35d35c0602031670fecfc92d8cea0a | [
"MIT"
] | null | null | null | a=int(input("enter side\n"))
area=(1.73*a*a)/4
print("area of equilateral triangle",area)
| 22.5 | 42 | 0.7 |
54e4d199c9b3f948ef80e14f996d7b4c8a3caa4a | 3,987 | py | Python | research/cv/gan/train.py | leelige/mindspore | 5199e05ba3888963473f2b07da3f7bca5b9ef6dc | [
"Apache-2.0"
] | 77 | 2021-10-15T08:32:37.000Z | 2022-03-30T13:09:11.000Z | research/cv/gan/train.py | leelige/mindspore | 5199e05ba3888963473f2b07da3f7bca5b9ef6dc | [
"Apache-2.0"
] | 3 | 2021-10-30T14:44:57.000Z | 2022-02-14T06:57:57.000Z | research/cv/gan/train.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... | 37.261682 | 112 | 0.678706 |
54ef34717b09f2cc6db6bc2ab9f359954929755c | 1,097 | py | Python | PopulationLib/TreeGroup.py | jvollhueter/pyMANGA-1 | 414204a394d44405225b4b8224b19464c1006f1d | [
"MIT"
] | null | null | null | PopulationLib/TreeGroup.py | jvollhueter/pyMANGA-1 | 414204a394d44405225b4b8224b19464c1006f1d | [
"MIT"
] | null | null | null | PopulationLib/TreeGroup.py | jvollhueter/pyMANGA-1 | 414204a394d44405225b4b8224b19464c1006f1d | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
@date: 2018-Today
@author: jasper.bathmann@ufz.de
"""
import PopulationLib as PLib
if __name__ == '__main__' and __package__ is None:
from os import sys, path
sys.path.append(path.dirname(path.dirname(path.abspath(__file__))))
class TreeGroup:
def __init... | 27.425 | 73 | 0.634458 |
0754f0d3c41a0cb014e0e84628102078f9758473 | 7,888 | py | Python | python_experiments/paper_figures/legacy/draw_varying_eps_c_cpu_mem.py | RapidsAtHKUST/SimRank | 3a601b08f9a3c281e2b36b914e06aba3a3a36118 | [
"MIT"
] | 8 | 2020-04-14T23:17:00.000Z | 2021-06-21T12:34:04.000Z | python_experiments/paper_figures/legacy/draw_varying_eps_c_cpu_mem.py | RapidsAtHKUST/SimRank | 3a601b08f9a3c281e2b36b914e06aba3a3a36118 | [
"MIT"
] | null | null | null | python_experiments/paper_figures/legacy/draw_varying_eps_c_cpu_mem.py | RapidsAtHKUST/SimRank | 3a601b08f9a3c281e2b36b914e06aba3a3a36118 | [
"MIT"
] | 1 | 2021-01-17T16:26:50.000Z | 2021-01-17T16:26:50.000Z | import matplotlib
import numpy as np
matplotlib.use("pdf")
import matplotlib.pyplot as plt
import os
from paper_figures.legacy.experimental_config import *
def TKDE17_get_data_file_base(g_name, c, epsilon):
r = "TKDE17_"
r += g_name
r += "-"
r += "%.3f" % c
r += "-"
r += "%.6f" % epsilon
... | 34.596491 | 101 | 0.602307 |
4af822d125f78a6086e1c53e3c54d0e2d9af925e | 1,460 | py | Python | tests/plugins/test_keep.py | andrenasturas/hausse | 58e7cb71d5105cf1d6ec7d294e85668855bf8336 | [
"MIT"
] | null | null | null | tests/plugins/test_keep.py | andrenasturas/hausse | 58e7cb71d5105cf1d6ec7d294e85668855bf8336 | [
"MIT"
] | 1 | 2021-08-30T21:41:46.000Z | 2021-08-30T21:41:46.000Z | tests/plugins/test_keep.py | andrenasturas/hausse | 58e7cb71d5105cf1d6ec7d294e85668855bf8336 | [
"MIT"
] | 1 | 2021-08-31T19:27:32.000Z | 2021-08-31T19:27:32.000Z | from pathlib import PurePath
import pytest
from hausse.lib import Element, Project
from hausse.plugins import Keep
def test_keep_simple_pattern():
d1 = Element(PurePath("a/b/c"))
d2 = Element(PurePath("a/b/f"))
d3 = Element(PurePath("a/k/c"))
d4 = Element(PurePath("a/k/d/c"))
project = Project(... | 22.121212 | 42 | 0.642466 |
ab0bc97347ff919fd2e3ca71605df14fcfe28808 | 3,952 | py | Python | easyp2p/platforms/twino.py | Ceystyle/easyp2p | 99c32e3ec0ff5a34733f157dd1b53d1aa9bc9edc | [
"MIT"
] | 4 | 2019-07-18T10:58:28.000Z | 2021-11-18T16:57:45.000Z | easyp2p/platforms/twino.py | Ceystyle/easyp2p | 99c32e3ec0ff5a34733f157dd1b53d1aa9bc9edc | [
"MIT"
] | 1 | 2019-07-05T09:21:47.000Z | 2019-07-05T09:21:47.000Z | easyp2p/platforms/twino.py | Ceystyle/easyp2p | 99c32e3ec0ff5a34733f157dd1b53d1aa9bc9edc | [
"MIT"
] | 2 | 2019-07-05T08:56:34.000Z | 2020-06-09T10:03:42.000Z | # -*- coding: utf-8 -*-
# Copyright (c) 2018-2020 Niko Sandschneider
"""
Download and parse Twino statement.
"""
from easyp2p.p2p_credentials import get_credentials
from easyp2p.p2p_parser import P2PParser
from easyp2p.p2p_session import P2PSession
from easyp2p.p2p_signals import PlatformFailedError
from easyp2p.pl... | 33.210084 | 80 | 0.631579 |
ab327ee9f8a2c51f37e266a33e8d28693ebc440f | 1,846 | py | Python | Co-Simulation/Sumo/sumo-1.7.0/docs/examples/traas/runner.py | uruzahe/carla | 940c2ab23cce1eda1ef66de35f66b42d40865fb1 | [
"MIT"
] | null | null | null | Co-Simulation/Sumo/sumo-1.7.0/docs/examples/traas/runner.py | uruzahe/carla | 940c2ab23cce1eda1ef66de35f66b42d40865fb1 | [
"MIT"
] | null | null | null | Co-Simulation/Sumo/sumo-1.7.0/docs/examples/traas/runner.py | uruzahe/carla | 940c2ab23cce1eda1ef66de35f66b42d40865fb1 | [
"MIT"
] | null | null | null | #!/usr/bin/env python
# Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo
# Copyright (C) 2019-2020 German Aerospace Center (DLR) and others.
# This program and the accompanying materials are made available under the
# terms of the Eclipse Public License 2.0 which is available at
# https://www.ec... | 37.673469 | 110 | 0.709101 |
ab5f79719dadd18f550a9b06ccee3ac5b1add6ac | 2,503 | py | Python | examples/chk-pub.py | jadeblaquiere/pyfspke | 1c7305e8a28639e55b1620e731a5dd7c312c295b | [
"BSD-3-Clause"
] | null | null | null | examples/chk-pub.py | jadeblaquiere/pyfspke | 1c7305e8a28639e55b1620e731a5dd7c312c295b | [
"BSD-3-Clause"
] | null | null | null | examples/chk-pub.py | jadeblaquiere/pyfspke | 1c7305e8a28639e55b1620e731a5dd7c312c295b | [
"BSD-3-Clause"
] | null | null | null | # Copyright (c) 2017, Joseph deBlaquiere <jadeblaquiere@yahoo.com>
# All rights reserved
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are met:
#
# * Redistributions of source code must retain the above copyright notice, this
... | 41.032787 | 101 | 0.756692 |
db4c2dedd61f912034ee06819c3d5994dbff89dc | 2,931 | py | Python | simple-sklearn-demo/test10/regressionTest.py | crackedcd/Intern.MT | 36398837af377a7e1c4edd7cbb15eabecd2c3103 | [
"MIT"
] | 1 | 2019-07-05T03:42:17.000Z | 2019-07-05T03:42:17.000Z | simple-sklearn-demo/test10/regressionTest.py | crackedcd/Intern.MT | 36398837af377a7e1c4edd7cbb15eabecd2c3103 | [
"MIT"
] | null | null | null | simple-sklearn-demo/test10/regressionTest.py | crackedcd/Intern.MT | 36398837af377a7e1c4edd7cbb15eabecd2c3103 | [
"MIT"
] | 1 | 2019-06-24T05:56:55.000Z | 2019-06-24T05:56:55.000Z | """
目标值为连续数据时的问题被称作回归问题 regression
线性回归 Linear Regression
逻辑回归 Logistic Regression
房价/销售额度/贷款额度等等问题, 目标值都是连续的
假定一个线性回归函数
y = w1x1 + w2x2 + w3x3 + ... + b
在统计学中, y称作因变量(目标值)(标签), x称作自变量(特征值)(属性), w称作回归系数(权重), b称作偏置
这里的w和x的关系, 其实是一个矩阵乘法, 即 y = wTx + b
(偏重可以也算在矩阵中, b = b * 1 -> 权重是b, 自变量是1)
例如:
期末成绩 = 平时成绩 * 0.3 + 考试成绩... | 25.486957 | 84 | 0.718526 |
91560acc89db06474ff8b31505a69762988f3386 | 2,293 | py | Python | python/oneflow/compatible/single_client/nn/optimizer/step_lr.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/nn/optimizer/step_lr.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/nn/optimizer/step_lr.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... | 38.216667 | 111 | 0.687309 |
37f6ec5672bd43cb5802b4a120bb1e416c528110 | 2,807 | py | Python | forge/lib/tiles.py | Pandinosaurus/3d-forge | d631e14a9351911c3e5612c73c1608d97ed547d2 | [
"BSD-3-Clause"
] | 31 | 2015-07-13T15:36:50.000Z | 2022-02-07T21:37:51.000Z | forge/lib/tiles.py | Pandinosaurus/3d-forge | d631e14a9351911c3e5612c73c1608d97ed547d2 | [
"BSD-3-Clause"
] | 109 | 2015-04-24T10:03:24.000Z | 2019-04-12T13:34:01.000Z | forge/lib/tiles.py | Pandinosaurus/3d-forge | d631e14a9351911c3e5612c73c1608d97ed547d2 | [
"BSD-3-Clause"
] | 16 | 2015-10-03T06:03:22.000Z | 2022-03-31T08:24:37.000Z | # -*- coding: utf-8 -*-
from gatilegrid import getTileGrid
def grid(bounds, minZ, maxZ):
geodetic = getTileGrid(4326)(extent=bounds, originCorner='bottom-left', tmsCompatible=True)
gridGenerator = geodetic.iterGrid(
minZ,
maxZ)
for tileBounds, tileZ, tileX, tileY in gridGenerator:
... | 33.416667 | 95 | 0.628429 |
72cbde5a2b00d707deb5f69d6b982ed4c3ad8d6a | 487 | py | Python | Python/Books/Learning-Programming-with-Python.Tamim-Shahriar-Subeen/chapter-010/ph-10.14-3-primel-exer-input-range.py | shihab4t/Books-Code | b637b6b2ad42e11faf87d29047311160fe3b2490 | [
"Unlicense"
] | null | null | null | Python/Books/Learning-Programming-with-Python.Tamim-Shahriar-Subeen/chapter-010/ph-10.14-3-primel-exer-input-range.py | shihab4t/Books-Code | b637b6b2ad42e11faf87d29047311160fe3b2490 | [
"Unlicense"
] | null | null | null | Python/Books/Learning-Programming-with-Python.Tamim-Shahriar-Subeen/chapter-010/ph-10.14-3-primel-exer-input-range.py | shihab4t/Books-Code | b637b6b2ad42e11faf87d29047311160fe3b2490 | [
"Unlicense"
] | null | null | null | import math
def is_primel_5(n):
if n < 2:
return False
if n == 2:
return True
if n % 2 == 0:
return False
m = math.sqrt(n)
m = int(m) + 1
for x in range(3, m, 2):
if n % x == 0:
return False
return True
n1 = int(input("Enter the lower value of ... | 19.48 | 56 | 0.521561 |
f460be292b5694410f490997bd93d2f823e00aa9 | 18,627 | py | Python | src/test/visit_test_reports.py | visit-dav/vis | c08bc6e538ecd7d30ddc6399ec3022b9e062127e | [
"BSD-3-Clause"
] | 226 | 2018-12-29T01:13:49.000Z | 2022-03-30T19:16:31.000Z | src/test/visit_test_reports.py | visit-dav/vis | c08bc6e538ecd7d30ddc6399ec3022b9e062127e | [
"BSD-3-Clause"
] | 5,100 | 2019-01-14T18:19:25.000Z | 2022-03-31T23:08:36.000Z | src/test/visit_test_reports.py | visit-dav/vis | c08bc6e538ecd7d30ddc6399ec3022b9e062127e | [
"BSD-3-Clause"
] | 84 | 2019-01-24T17:41:50.000Z | 2022-03-10T10:01:46.000Z | #!/bin/env python
# Copyright (c) Lawrence Livermore National Security, LLC and other VisIt
# Project developers. See the top-level LICENSE file for dates and other
# details. No copyright assignment is required to contribute to VisIt.
"""
file: visit_test_reports.py
description: Beta Test Report Generation.
author: ... | 37.478873 | 148 | 0.491813 |
be7f35aae7d50732bd24598a1300a8bca9b45f86 | 1,706 | py | Python | src/sft/file.py | huykingsofm/FileTransmitter | f0f8cd0d6f941903bb8c42291a81b711055fcb1a | [
"MIT"
] | 1 | 2020-08-28T19:06:13.000Z | 2020-08-28T19:06:13.000Z | src/sft/file.py | huykingsofm/sft | f0f8cd0d6f941903bb8c42291a81b711055fcb1a | [
"MIT"
] | null | null | null | src/sft/file.py | huykingsofm/sft | f0f8cd0d6f941903bb8c42291a81b711055fcb1a | [
"MIT"
] | null | null | null | import os
from hks_pylib.cryptography.hashes import HKSHash, SHA256
class File(object):
def __init__(self, filename: str) -> None:
self._filename = filename
self._stream = None
def name(self):
return self._filename
def size(self):
raise NotImplementedError()
def dige... | 26.65625 | 77 | 0.601407 |
beb1d2dc80d276a2bc764bf02a716281ebab5cc9 | 536 | pyde | Python | sketches/particleSystem04/particleSystem04.pyde | kantel/processingpy | 74aae222e46f68d1c8f06307aaede3cdae65c8ec | [
"MIT"
] | 4 | 2018-06-03T02:11:46.000Z | 2021-08-18T19:55:15.000Z | sketches/particleSystem04/particleSystem04.pyde | kantel/processingpy | 74aae222e46f68d1c8f06307aaede3cdae65c8ec | [
"MIT"
] | null | null | null | sketches/particleSystem04/particleSystem04.pyde | kantel/processingpy | 74aae222e46f68d1c8f06307aaede3cdae65c8ec | [
"MIT"
] | 3 | 2019-12-23T19:12:51.000Z | 2021-04-30T14:00:31.000Z | # Single Particle
from particle import Particle
from rectparticle import RectParticle
particles = []
def setup():
global loc
size(640, 480)
loc = PVector(width/2, 50)
def draw():
global loc
background("#800080")
ch = random(10)
if ch <= 5:
particles.append(Particle(loc))
else... | 21.44 | 46 | 0.600746 |
a3e5e1ba494a3cd26a326f0b80c1cdca21f5079c | 2,001 | py | Python | google_places_popularity/get_missing_cities.py | cfleschhut/virushack | 2fe7ded0be8672b066edef7fed52573794db2ba5 | [
"Apache-2.0"
] | 29 | 2020-03-21T00:47:51.000Z | 2021-07-17T15:50:33.000Z | google_places_popularity/get_missing_cities.py | cfleschhut/virushack | 2fe7ded0be8672b066edef7fed52573794db2ba5 | [
"Apache-2.0"
] | 7 | 2020-03-21T14:04:26.000Z | 2022-03-02T08:05:40.000Z | google_places_popularity/get_missing_cities.py | cfleschhut/virushack | 2fe7ded0be8672b066edef7fed52573794db2ba5 | [
"Apache-2.0"
] | 13 | 2020-03-21T01:08:08.000Z | 2020-04-08T17:21:11.000Z | import requests
import pandas as pd
import datetime
import json
import numpy as np
from coords_to_kreis import coords_convert
#Specify Timeframe
#min_date = datetime.datetime.now().date() - datetime.timedelta(days=6)
#max_date = datetime.datetime.now().date()
#params = {"min_date": str(min_date), "max_date": str(max_d... | 42.574468 | 169 | 0.732134 |
602103da292d471dddd1335567ba3c067b3398e0 | 82 | py | Python | geol/representations/__init__.py | PyGeoL/GeoL | 67a5bd2f63091e19041094c14d419055fa5ce6f0 | [
"MIT"
] | 8 | 2018-03-09T16:44:38.000Z | 2021-04-07T11:33:30.000Z | geol/enrichers/__init__.py | PyGeoL/GeoL | 67a5bd2f63091e19041094c14d419055fa5ce6f0 | [
"MIT"
] | 4 | 2020-03-24T15:34:54.000Z | 2021-06-01T21:54:33.000Z | geol/representations/__init__.py | PyGeoL/GeoL | 67a5bd2f63091e19041094c14d419055fa5ce6f0 | [
"MIT"
] | 1 | 2020-05-13T14:30:55.000Z | 2020-05-13T14:30:55.000Z | """
File description
"""
# Authors: Gianni Barlacchi <gianni.barlacchi@gmail.com> | 16.4 | 56 | 0.731707 |
6024ddad9a2f4d1071e1365050fadfab2f9635e2 | 4,304 | py | Python | examples/machine_translation/seq2seq/deploy/python/infer.py | mukaiu/PaddleNLP | 0315365dbafa6e3b1c7147121ba85e05884125a5 | [
"Apache-2.0"
] | null | null | null | examples/machine_translation/seq2seq/deploy/python/infer.py | mukaiu/PaddleNLP | 0315365dbafa6e3b1c7147121ba85e05884125a5 | [
"Apache-2.0"
] | null | null | null | examples/machine_translation/seq2seq/deploy/python/infer.py | mukaiu/PaddleNLP | 0315365dbafa6e3b1c7147121ba85e05884125a5 | [
"Apache-2.0"
] | null | null | null | # Copyright (c) 2020 PaddlePaddle Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by appli... | 35.866667 | 86 | 0.637779 |
60bafb5cab71d7aa15252defc7bb10d008135468 | 187 | py | Python | book/_build/jupyter_execute/docs/001_ziele.py | tom-tubeless/wwg-digitales-miteinander | d9391046a7ed12b91b538b937993161c67d77d68 | [
"CC0-1.0"
] | null | null | null | book/_build/jupyter_execute/docs/001_ziele.py | tom-tubeless/wwg-digitales-miteinander | d9391046a7ed12b91b538b937993161c67d77d68 | [
"CC0-1.0"
] | null | null | null | book/_build/jupyter_execute/docs/001_ziele.py | tom-tubeless/wwg-digitales-miteinander | d9391046a7ed12b91b538b937993161c67d77d68 | [
"CC0-1.0"
] | null | null | null | #!/usr/bin/env python
# coding: utf-8
# # Zielsetzung
#
# ## Medien im Wandel
#
# ## Zeitgemäße Lernkultur
#
# ## Bezug zu Kernlehrplänen
#
# ```{bibliography}
# :style: plain
# ```
| 12.466667 | 28 | 0.604278 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.