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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
c3066f8aead04370f0f64513a71c81f3247f0872 | 10,014 | py | Python | scripts/dim-reduction/suzhou-pca-lda.py | jenniferxkuo/ultramisc | 65bff53c97715eb9a24acc62b77460f22e0dabc6 | [
"MIT"
] | null | null | null | scripts/dim-reduction/suzhou-pca-lda.py | jenniferxkuo/ultramisc | 65bff53c97715eb9a24acc62b77460f22e0dabc6 | [
"MIT"
] | null | null | null | scripts/dim-reduction/suzhou-pca-lda.py | jenniferxkuo/ultramisc | 65bff53c97715eb9a24acc62b77460f22e0dabc6 | [
"MIT"
] | null | null | null | import os, sys, glob, re
import argparse
import numpy as np
import pandas as pd
from hashlib import sha1
from sklearn.decomposition import PCA
from sklearn.discriminant_analysis import LinearDiscriminantAnalysis as LDA
import matplotlib.pyplot as plt
# TODO make sure this is assigning a label to everything
... | 38.515385 | 106 | 0.677452 |
6f27bfc77ea8e0d14eff3cb7db7ff318eedcd58b | 1,243 | gyp | Python | bsp-gonk/vendor/silk/silk-audioplayer/binding.gyp | silklabs/silk | 08c273949086350aeddd8e23e92f0f79243f446f | [
"MIT"
] | 172 | 2016-06-07T09:02:34.000Z | 2022-03-18T07:43:55.000Z | bsp-gonk/vendor/silk/silk-audioplayer/binding.gyp | silklabs/silk | 08c273949086350aeddd8e23e92f0f79243f446f | [
"MIT"
] | 24 | 2016-06-08T08:09:39.000Z | 2017-09-08T04:15:51.000Z | bsp-gonk/vendor/silk/silk-audioplayer/binding.gyp | silklabs/silk | 08c273949086350aeddd8e23e92f0f79243f446f | [
"MIT"
] | 37 | 2016-06-08T16:56:14.000Z | 2021-10-05T09:49:08.000Z | {
"variables": {
"library_type%": "loadable_module",
},
"targets": [
{
"target_name": "silk-audioplayer",
"type": "<(library_type)",
"include_dirs": [
"<!(node -e \"require('nan')\")",
],
"conditions": [
[ "OS==\"android\"", {
"sources": [
... | 27.622222 | 71 | 0.465809 |
d2b932f3007f7874cfa803e87c8ccb2173e472b0 | 482 | py | Python | einzelner_zug.py | raswz/wifionice | 67f1fa7a6b396afe7a447a4d10adbc64dcbcdd4f | [
"CC-BY-4.0"
] | null | null | null | einzelner_zug.py | raswz/wifionice | 67f1fa7a6b396afe7a447a4d10adbc64dcbcdd4f | [
"CC-BY-4.0"
] | null | null | null | einzelner_zug.py | raswz/wifionice | 67f1fa7a6b396afe7a447a4d10adbc64dcbcdd4f | [
"CC-BY-4.0"
] | null | null | null | import numpy as np
import pandas as pd
import plotly.express as px
data_raw = pd.read_parquet(r'c:\Users\Ronja\Documents\GitHub\wifionice\wifionice.parquet') #Importiert die WifionIce.parquet-Datei
# data_raw = data_raw['sid'].astype(int) #Konvertiert die Spalte sid in einen Integer
# data_raw = data_raw[data_raw['s... | 32.133333 | 130 | 0.757261 |
816a5fd9f4d9fb990eff9592faa0cebb9a2f8908 | 30,187 | py | Python | ucs-school-umc-licenses/umc/python/licenses/__init__.py | univention/bildungslogin | 29bebe858a5445dd5566aad594b33b9dd716eca4 | [
"MIT"
] | null | null | null | ucs-school-umc-licenses/umc/python/licenses/__init__.py | univention/bildungslogin | 29bebe858a5445dd5566aad594b33b9dd716eca4 | [
"MIT"
] | null | null | null | ucs-school-umc-licenses/umc/python/licenses/__init__.py | univention/bildungslogin | 29bebe858a5445dd5566aad594b33b9dd716eca4 | [
"MIT"
] | null | null | null | #!/usr/bin/python2.7
# -*- coding: utf-8 -*-
#
# Univention Management Console module:
# Manage licenses
#
# Copyright 2021 Univention GmbH
#
# http://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
... | 45.325826 | 120 | 0.614039 |
1ef072a522e3ebaf1c467e789fe873ef901086f2 | 295 | py | Python | Assignments/Assignment 7/prime_or_composite_copy.py | ryan-gonfiantini/CMPT-120L-902-21S | e5807251e26ce422ce0c70f99ac62661b5881c18 | [
"MIT"
] | null | null | null | Assignments/Assignment 7/prime_or_composite_copy.py | ryan-gonfiantini/CMPT-120L-902-21S | e5807251e26ce422ce0c70f99ac62661b5881c18 | [
"MIT"
] | null | null | null | Assignments/Assignment 7/prime_or_composite_copy.py | ryan-gonfiantini/CMPT-120L-902-21S | e5807251e26ce422ce0c70f99ac62661b5881c18 | [
"MIT"
] | null | null | null | def is_prime(n):
for i in range(2,n):
if(n%i==0):
return False
return True
numbers=[1, 2, 10, 31, 47, 89, 101, 103, 97, 187, 981, 19201]
for i in numbers:
if is_prime(i):
print(i, "is a prime number")
else:
print(i, "is a composite number") | 26.818182 | 62 | 0.538983 |
82f622243c76e200e723656b54728b9cfa584ac1 | 2,296 | py | Python | monitoring/zabbix/zabbix_collections/zabbix-hadoop-template/ResourceManager-template/zabbix-yarn.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-hadoop-template/ResourceManager-template/zabbix-yarn.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-hadoop-template/ResourceManager-template/zabbix-yarn.py | smthkissinger/docker-images | 35e868295d04fa780325ada4168381f1e80e8fe4 | [
"BSD-3-Clause"
] | 40 | 2018-01-22T16:31:16.000Z | 2022-03-08T04:40:42.000Z | __author__ = 'ssj'
import json
import urllib
import logging
import sys
import time
# ---------------------------------
# Generate URL
# ---------------------------------
# This function converts the servername to URL which we need to query.
def get_url(server_name, listen_port):
"""
Generating URL to get ... | 27.011765 | 131 | 0.614111 |
96356eaabcd272b9ec50937fd4d1d638865946f2 | 238 | py | Python | StoryTellingGame/util/flask_utils_types.py | kkysen/Soft-Dev | b19881b1fcc9c7daefc817e6b975ff6bce545d81 | [
"Apache-2.0"
] | null | null | null | StoryTellingGame/util/flask_utils_types.py | kkysen/Soft-Dev | b19881b1fcc9c7daefc817e6b975ff6bce545d81 | [
"Apache-2.0"
] | 2 | 2017-10-26T16:52:58.000Z | 2017-11-01T16:58:52.000Z | StoryTellingGame/util/flask_utils_types.py | kkysen/Soft-Dev | b19881b1fcc9c7daefc817e6b975ff6bce545d81 | [
"Apache-2.0"
] | null | null | null | from flask import Response
from typing import Callable, Union
Function = Union[Callable, callable]
Precondition = Union[Callable[[], bool], callable]
Route = Union[Callable[[], Response], callable]
Router = Callable[[Route], Route] | 34 | 51 | 0.739496 |
73c7e538a5859bab1dca6e983149b304821c8f0a | 4,562 | py | Python | quant/api/huobi.py | doubleDragon/QuantBot | 53a1d6c62ecece47bf777da0c0754430b706b7fd | [
"MIT"
] | 7 | 2017-10-22T15:00:09.000Z | 2019-09-19T11:45:43.000Z | quant/api/huobi.py | doubleDragon/QuantBot | 53a1d6c62ecece47bf777da0c0754430b706b7fd | [
"MIT"
] | 1 | 2018-01-19T16:19:40.000Z | 2018-01-19T16:19:40.000Z | quant/api/huobi.py | doubleDragon/QuantBot | 53a1d6c62ecece47bf777da0c0754430b706b7fd | [
"MIT"
] | 5 | 2017-12-11T15:10:29.000Z | 2018-12-21T17:40:58.000Z | #!/usr/bin/env python
# -*- coding: UTF-8 -*-
import base64
import hashlib
import hmac
import urllib
import urlparse
import requests
import json
import datetime
MARKET_URL = TRADE_URL = "https://api.huobi.pro"
TIMEOUT = 5
EXTRA_PUBLIC_HEADERS = {
"Content-type": "application/x-www-form-urlencoded",
'User-Age... | 29.432258 | 107 | 0.581324 |
73ea71519925860009ad883930131034582e5e8c | 628 | py | Python | Crashkurs Python/02_Variablen BMI Berechnung.py | slogslog/Kurzgeschichten-in-CSharp | 3918c4174220e558cdeeada0edac941811418b93 | [
"Unlicense"
] | 2 | 2019-03-15T20:48:34.000Z | 2019-04-22T15:24:09.000Z | Crashkurs Python/02_Variablen BMI Berechnung.py | slogslog/Coding-Kurzgeschichten | 9b08237038147c6c348d4cf4c69567178e07dd1d | [
"Unlicense"
] | null | null | null | Crashkurs Python/02_Variablen BMI Berechnung.py | slogslog/Coding-Kurzgeschichten | 9b08237038147c6c348d4cf4c69567178e07dd1d | [
"Unlicense"
] | null | null | null | # Console.Write("Wie ist Dein Name? ");
# string name = Console.ReadLine();
#
# Console.Write("Gewicht in kg: ");
# double kg = double.Parse(Console.ReadLine());
#
# Console.Write("Größe in cm: ");
# int cm = int.Parse(Console.ReadLine());
#
# double bmi = kg / Math.Pow(cm/100.0, 2);
#
# Console.WriteLine($"{name} hat ... | 26.166667 | 69 | 0.640127 |
e38d71690dfb2512e649c81d7ff55aa100336b32 | 131 | py | Python | ProjectEuler_plus/euler_013.py | byung-u/HackerRank | 4c02fefff7002b3af774b99ebf8d40f149f9d163 | [
"MIT"
] | null | null | null | ProjectEuler_plus/euler_013.py | byung-u/HackerRank | 4c02fefff7002b3af774b99ebf8d40f149f9d163 | [
"MIT"
] | null | null | null | ProjectEuler_plus/euler_013.py | byung-u/HackerRank | 4c02fefff7002b3af774b99ebf8d40f149f9d163 | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
t = int(input())
digit = []
for a0 in range(t):
digit.append(int(input()))
print(str(sum(digit))[:10])
| 16.375 | 30 | 0.610687 |
5829c987e72c5359207bc157805a1e2d2fd28a8a | 23,072 | py | Python | Packs/Hackuity/Integrations/Hackuity/Hackuity.py | cstone112/content | 7f039931b8cfc20e89df52d895440b7321149a0d | [
"MIT"
] | 2 | 2021-12-06T21:38:24.000Z | 2022-01-13T08:23:36.000Z | Packs/Hackuity/Integrations/Hackuity/Hackuity.py | cstone112/content | 7f039931b8cfc20e89df52d895440b7321149a0d | [
"MIT"
] | 87 | 2022-02-23T12:10:53.000Z | 2022-03-31T11:29:05.000Z | Packs/Hackuity/Integrations/Hackuity/Hackuity.py | cstone112/content | 7f039931b8cfc20e89df52d895440b7321149a0d | [
"MIT"
] | 2 | 2022-01-05T15:27:01.000Z | 2022-02-01T19:27:43.000Z | import traceback
from functools import partial
from typing import Any, Callable, Dict, List, Optional, Tuple, TypeVar, Union
import dateutil.parser
import demistomock as demisto
import requests
from CommonServerPython import * # noqa # pylint: disable=unused-wildcard-import
from CommonServerUserPython import * # noq... | 32.819346 | 87 | 0.522235 |
54b6f89a0dcc171f49d6e6ca3cfb139c0aadfe14 | 282 | py | Python | app/xlib/sr_matcher.py | marwanad/music_bot | c7a9c704f510d455fc6d1d7c057d5cfa31dcd7cf | [
"MIT"
] | 1 | 2020-12-07T13:30:59.000Z | 2020-12-07T13:30:59.000Z | app/xlib/sr_matcher.py | marwanad/music_bot | c7a9c704f510d455fc6d1d7c057d5cfa31dcd7cf | [
"MIT"
] | null | null | null | app/xlib/sr_matcher.py | marwanad/music_bot | c7a9c704f510d455fc6d1d7c057d5cfa31dcd7cf | [
"MIT"
] | null | null | null | from sr_strings import suggested_responses
class SR_Matcher(object):
def match_sr(self, body):
name = suggested_responses.inv_srs.get('name')
if name:
return '.{}'.format(name)
else:
return '.fallback'
sr_matcher = SR_Matcher()
| 23.5 | 54 | 0.624113 |
b71b5f2fb70c70ecffc2ca58b2cc6223e857697c | 30,167 | py | Python | Co-Simulation/Sumo/sumo-1.7.0/tools/contributed/sumopy/coremodules/demand/wxgui.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/coremodules/demand/wxgui.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/coremodules/demand/wxgui.py | uruzahe/carla | 940c2ab23cce1eda1ef66de35f66b42d40865fb1 | [
"MIT"
] | 1 | 2020-11-20T19:31:26.000Z | 2020-11-20T19:31:26.000Z | # 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 of the Eclipse Public ... | 41.438187 | 119 | 0.580336 |
3fef4cb56a82bbb1b018b11944ca857e4b322edd | 260 | py | Python | Curso_Python/Secao2-Python-Basico-Logica-Programacao/22_operadores_logicos/exercicio.py | pedrohd21/Cursos-Feitos | b223aad83867bfa45ad161d133e33c2c200d42bd | [
"MIT"
] | null | null | null | Curso_Python/Secao2-Python-Basico-Logica-Programacao/22_operadores_logicos/exercicio.py | pedrohd21/Cursos-Feitos | b223aad83867bfa45ad161d133e33c2c200d42bd | [
"MIT"
] | null | null | null | Curso_Python/Secao2-Python-Basico-Logica-Programacao/22_operadores_logicos/exercicio.py | pedrohd21/Cursos-Feitos | b223aad83867bfa45ad161d133e33c2c200d42bd | [
"MIT"
] | null | null | null | usuario = str(input('Nome do usuário: '))
senha = str(input('Senha do usuário: '))
usuario_vd = 'Pedro'
senha_vd = '123456'
if usuario_vd == usuario and senha_vd == senha:
print('Você está logado no sistema.')
else:
print('Usuário ou senha invalidos.') | 32.5 | 47 | 0.688462 |
b7adcd91b2b18c2c4de620e572fd3d07761856c1 | 6,419 | py | Python | doc/fb_memoir/python/fsk_measurements/fsk_measurements.py | ghsecuritylab/project-powerline | 6c0ec13bbfc11c3790c506f644db4fe45021440a | [
"MIT"
] | null | null | null | doc/fb_memoir/python/fsk_measurements/fsk_measurements.py | ghsecuritylab/project-powerline | 6c0ec13bbfc11c3790c506f644db4fe45021440a | [
"MIT"
] | null | null | null | doc/fb_memoir/python/fsk_measurements/fsk_measurements.py | ghsecuritylab/project-powerline | 6c0ec13bbfc11c3790c506f644db4fe45021440a | [
"MIT"
] | 1 | 2020-03-08T01:50:58.000Z | 2020-03-08T01:50:58.000Z | #!/usr/bin/env python3
# coding: utf-8
# In[25]:
import numpy as np
import matplotlib.pyplot as plt
#get_ipython().magic('matplotlib inline')
def open_csv_pia(csv, start, stop, scale_f, scale_L):
f = []
L = []
with open(csv, 'r') as csvfile:
i = 0
for line in csvfile:
i+=1
... | 28.914414 | 131 | 0.609441 |
b7af7cdb808e2421fc1d502348b9908d3a4408da | 2,652 | py | Python | V1/utils/tools.py | marsXyr/GESRL | 3d60dfd4ffa1e0ae24d64b09f431d8ee0a9b5c01 | [
"Apache-2.0"
] | null | null | null | V1/utils/tools.py | marsXyr/GESRL | 3d60dfd4ffa1e0ae24d64b09f431d8ee0a9b5c01 | [
"Apache-2.0"
] | null | null | null | V1/utils/tools.py | marsXyr/GESRL | 3d60dfd4ffa1e0ae24d64b09f431d8ee0a9b5c01 | [
"Apache-2.0"
] | null | null | null | # Code in this file is copied and adapted from
# https://github.com/openai/evolution-strategies-starter.
import numpy as np
import os
def soft_update(target, source, tau):
for target_param, param in zip(target.parameters(), source.parameters()):
target_param.data.copy_(target_param.data * (1.0 - tau) + p... | 31.2 | 110 | 0.660256 |
4d4a8956edc0733ae1119de678fb32d8d41829fa | 338 | py | Python | SHELL/2021/crypto/BruteforceRSA/script.py | ruhan-islam/ctf-archives | 8c2bf6a608c821314d1a1cfaa05a6cccef8e3103 | [
"MIT"
] | 1 | 2021-11-02T20:53:58.000Z | 2021-11-02T20:53:58.000Z | SHELL/2021/crypto/BruteforceRSA/script.py | ruhan-islam/ctf-archives | 8c2bf6a608c821314d1a1cfaa05a6cccef8e3103 | [
"MIT"
] | null | null | null | SHELL/2021/crypto/BruteforceRSA/script.py | ruhan-islam/ctf-archives | 8c2bf6a608c821314d1a1cfaa05a6cccef8e3103 | [
"MIT"
] | null | null | null | from Crypto.Util.number import bytes_to_long,inverse,getPrime,long_to_bytes
from secret import message
import json
p = getPrime(128)
q = getPrime(128)
n = p * q
e = 65537
enc = pow(bytes_to_long(message.encode()),e,n)
print("Encrypted Flag is {}".format(enc))
open('./values.json','w').write(json.dumps({"e":e,"n":n... | 22.533333 | 75 | 0.707101 |
12a5fbab58aded902165cec7253d3e9161ee2faf | 904 | py | Python | opencv_tutorial/opencv_python_tutorials/Gui_Features/trackbar.py | zeroam/TIL | 43e3573be44c7f7aa4600ff8a34e99a65cbdc5d1 | [
"MIT"
] | null | null | null | opencv_tutorial/opencv_python_tutorials/Gui_Features/trackbar.py | zeroam/TIL | 43e3573be44c7f7aa4600ff8a34e99a65cbdc5d1 | [
"MIT"
] | null | null | null | opencv_tutorial/opencv_python_tutorials/Gui_Features/trackbar.py | zeroam/TIL | 43e3573be44c7f7aa4600ff8a34e99a65cbdc5d1 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
"""
Created on Wed Mar 27 16:39:00 2019
@author: jone
"""
import cv2
import numpy as np
def nothing(x):
pass
# 검은 바탕화면의 윈도우 창 생성
img = np.zeros((300, 512, 3), np.uint8)
cv2.namedWindow('image')
# trackbar를 생성하여 named window에 등록
cv2.createTrackbar('R', 'image', 0, 255, nothing)
cv2.creat... | 20.545455 | 50 | 0.590708 |
4250c3cdea0cab6d8bb8f34c3800e7aeaf95d7df | 2,936 | py | Python | Modulos/Criptografia/Scrt_Fence.py | Jonatan966/SODA | 046d8c1e7b9bac3a555526c9fe2f365c2b338aca | [
"MIT"
] | null | null | null | Modulos/Criptografia/Scrt_Fence.py | Jonatan966/SODA | 046d8c1e7b9bac3a555526c9fe2f365c2b338aca | [
"MIT"
] | null | null | null | Modulos/Criptografia/Scrt_Fence.py | Jonatan966/SODA | 046d8c1e7b9bac3a555526c9fe2f365c2b338aca | [
"MIT"
] | null | null | null | import sys
sys.path.append('Nucleo/')
from Nucleo.smain_Variaveis import *
class sMain_Fence:
def __railfence_id(self, tam, key):
''' (Railfence, int, int) -> list of int
Retorna um lista de inteiros com a posicao da
linha que o caracter do texto ira ocupar,
variando de 0 ate key - ... | 35.804878 | 127 | 0.520436 |
c4897fd363800d0996ab3a367c4622217806e78f | 4,510 | py | Python | Packs/GitHub/Integrations/GitHubEventCollector/GitHubEventCollector.py | jrauen/content | 81a92be1cbb053a5f26a6f325eff3afc0ca840e0 | [
"MIT"
] | null | null | null | Packs/GitHub/Integrations/GitHubEventCollector/GitHubEventCollector.py | jrauen/content | 81a92be1cbb053a5f26a6f325eff3afc0ca840e0 | [
"MIT"
] | 40 | 2022-03-03T07:34:00.000Z | 2022-03-31T07:38:35.000Z | Packs/GitHub/Integrations/GitHubEventCollector/GitHubEventCollector.py | jrauen/content | 81a92be1cbb053a5f26a6f325eff3afc0ca840e0 | [
"MIT"
] | null | null | null | from datetime import datetime
import urllib3
from CommonServerPython import *
import demistomock as demisto
import dateparser
from collections.abc import Generator
from SiemApiModule import * # noqa: E402
urllib3.disable_warnings()
def get_github_timestamp_format(value):
"""Converting int(epoch), str(3 days) or... | 32.681159 | 115 | 0.63969 |
67ce9bab1a422a3c0ba91409c1fa9a511adefad5 | 9,654 | py | Python | src/test/tests/databases/ffp.py | visit-dav/vis | c08bc6e538ecd7d30ddc6399ec3022b9e062127e | [
"BSD-3-Clause"
] | 226 | 2018-12-29T01:13:49.000Z | 2022-03-30T19:16:31.000Z | src/test/tests/databases/ffp.py | visit-dav/vis | c08bc6e538ecd7d30ddc6399ec3022b9e062127e | [
"BSD-3-Clause"
] | 5,100 | 2019-01-14T18:19:25.000Z | 2022-03-31T23:08:36.000Z | src/test/tests/databases/ffp.py | visit-dav/vis | c08bc6e538ecd7d30ddc6399ec3022b9e062127e | [
"BSD-3-Clause"
] | 84 | 2019-01-24T17:41:50.000Z | 2022-03-10T10:01:46.000Z | # ----------------------------------------------------------------------------
# CLASSES: nightly
#
# Test Case: ffp.py
#
# Programmer: Olivier Cessenat
# Tue May 8 21:49:21 PDT 2018
#
# Modifications:
# Eddie Rusu, Tue Apr 13 12:08:59 PDT 2021
# Changed Pseudocolor CurrentPlot to ActualData.
# ---------... | 37.130769 | 131 | 0.788896 |
3f12c2ad0123e2e27d3422fdb64094a891c7edc3 | 248 | py | Python | exercises/fr/solution_01_02_03.py | Jette16/spacy-course | 32df0c8f6192de6c9daba89740a28c0537e4d6a0 | [
"MIT"
] | 2,085 | 2019-04-17T13:10:40.000Z | 2022-03-30T21:51:46.000Z | exercises/fr/solution_01_02_03.py | Jette16/spacy-course | 32df0c8f6192de6c9daba89740a28c0537e4d6a0 | [
"MIT"
] | 79 | 2019-04-18T14:42:55.000Z | 2022-03-07T08:15:43.000Z | exercises/fr/solution_01_02_03.py | Jette16/spacy-course | 32df0c8f6192de6c9daba89740a28c0537e4d6a0 | [
"MIT"
] | 361 | 2019-04-17T13:34:32.000Z | 2022-03-28T04:42:45.000Z | # Importe la classe de langue "Spanish"
from spacy.lang.es import Spanish
# Crée l'objet nlp
nlp = Spanish()
# Traite un texte (il signifie "Comment vas-tu ?" en espagnol)
doc = nlp("¿Cómo estás?")
# Affiche le texte du document
print(doc.text)
| 20.666667 | 62 | 0.71371 |
187f7c8b3745e359784239e8b35996a5c45a09bb | 2,725 | py | Python | src/bo4e/enum/regionskriteriumtyp.py | bo4e/BO4E-python | 28b12f853c8a496d14b133759b7aa2d6661f79a0 | [
"MIT"
] | 1 | 2022-03-02T12:49:44.000Z | 2022-03-02T12:49:44.000Z | src/bo4e/enum/regionskriteriumtyp.py | bo4e/BO4E-python | 28b12f853c8a496d14b133759b7aa2d6661f79a0 | [
"MIT"
] | 21 | 2022-02-04T07:38:46.000Z | 2022-03-28T14:01:53.000Z | src/bo4e/enum/regionskriteriumtyp.py | bo4e/BO4E-python | 28b12f853c8a496d14b133759b7aa2d6661f79a0 | [
"MIT"
] | null | null | null | # pylint: disable=missing-module-docstring
from bo4e.enum.strenum import StrEnum
class Regionskriteriumtyp(StrEnum):
"""
Klassifizierung der Kriterien für eine regionale Eingrenzung.
"""
BUNDESLANDKENNZIFFER = "BUNDESLANDKENNZIFFER" #: offizielle Bundeslandkennziffer
BUNDESLAND_NAME = "BUNDESLAN... | 55.612245 | 107 | 0.757798 |
a103bf624ced9fbe9ce797b31d8a132253101612 | 342 | py | Python | src/test/test_experiment.py | kaphka/imi-master-thesis | 2331a3534dc32e30a1333bb21c68c1e1b07ec9e4 | [
"MIT"
] | 2 | 2018-04-27T09:02:15.000Z | 2019-04-19T19:12:13.000Z | src/test/test_experiment.py | kaphka/imi-master-thesis | 2331a3534dc32e30a1333bb21c68c1e1b07ec9e4 | [
"MIT"
] | 1 | 2019-04-19T19:13:08.000Z | 2021-02-22T21:29:55.000Z | src/test/test_experiment.py | kaphka/imi-master-thesis | 2331a3534dc32e30a1333bb21c68c1e1b07ec9e4 | [
"MIT"
] | null | null | null | import experiment.data as d
def test_load_config():
env = d.Environment()
dataset = env.dataset('MNIST')
assert env.models_folder is not None
assert env.datasets_path == dataset.parent
def test_train_log():
log = d.TrainLog()
print(log.save_directory)
print(log.log_directory)
assert ... | 22.8 | 46 | 0.695906 |
a13eec06b558a4b496c15407792478de724024a2 | 2,181 | py | Python | CI-Python/qa327/models.py | michael-fourie/Mags_Co | b9c8ae1730fabde3da95ed0f271ff061505a06c2 | [
"MIT"
] | 3 | 2020-11-06T21:54:57.000Z | 2020-12-10T22:06:24.000Z | CI-Python/qa327/models.py | michael-fourie/Mags_Co | b9c8ae1730fabde3da95ed0f271ff061505a06c2 | [
"MIT"
] | 3 | 2020-11-30T01:04:41.000Z | 2020-12-13T19:29:45.000Z | CI-Python/qa327/models.py | michael-fourie/Mags_Co | b9c8ae1730fabde3da95ed0f271ff061505a06c2 | [
"MIT"
] | 3 | 2020-11-23T19:25:41.000Z | 2022-02-04T15:18:19.000Z | from qa327 import app
from flask_sqlalchemy import SQLAlchemy
"""
This file defines all models used by the server
These models provide us a object-oriented access
to the underlying database, so we don't need to
write SQL queries such as 'select', 'update' etc.
"""
db = SQLAlchemy()
db.init_app(app)
class User(db.... | 31.608696 | 89 | 0.628611 |
a1bd35de34456741667f0adea6027511c3545456 | 241 | py | Python | Curso-Em-Video-Python/2Exercicios/067_tabuada_v3.py | pedrohd21/Cursos-Feitos | b223aad83867bfa45ad161d133e33c2c200d42bd | [
"MIT"
] | null | null | null | Curso-Em-Video-Python/2Exercicios/067_tabuada_v3.py | pedrohd21/Cursos-Feitos | b223aad83867bfa45ad161d133e33c2c200d42bd | [
"MIT"
] | null | null | null | Curso-Em-Video-Python/2Exercicios/067_tabuada_v3.py | pedrohd21/Cursos-Feitos | b223aad83867bfa45ad161d133e33c2c200d42bd | [
"MIT"
] | null | null | null | tabu = n = 0
while True:
n = 0
tabu = int(input('Que ver a tabuada de qual valor? '))
if tabu <= -1:
break
while n < 10:
n += 1
print(f'{tabu:2} X {n:2} = {tabu * n}')
print('Obrigado Volte Sempre!!')
| 21.909091 | 58 | 0.493776 |
c56b922b8a13d0bcf1f5dcdaab2d4b27fa72465c | 6,892 | py | Python | tests/test_lueftungsanlage.py | fgoettel/wgt | e093e2a003fa6c9d4c2082cebbc95701d7f9089d | [
"Unlicense"
] | null | null | null | tests/test_lueftungsanlage.py | fgoettel/wgt | e093e2a003fa6c9d4c2082cebbc95701d7f9089d | [
"Unlicense"
] | null | null | null | tests/test_lueftungsanlage.py | fgoettel/wgt | e093e2a003fa6c9d4c2082cebbc95701d7f9089d | [
"Unlicense"
] | 1 | 2022-01-29T12:01:47.000Z | 2022-01-29T12:01:47.000Z | """Unit tests and mocks for wgt.lueftungsanlage."""
# pylint: disable=too-few-public-methods,redefined-outer-name,unused-argument
from datetime import timedelta
from decimal import Decimal
import pytest
from wgt import WGT
from wgt.types import Betriebsart, Meldung, Prozent
WGT_IP = "127.0.0.1"
WGT_VERSION = "1.10"... | 30.361233 | 88 | 0.687028 |
3db1dafeade152591f2d726d7a8f5feea48e7f7c | 98 | py | Python | src/onegov/chat/models/__init__.py | politbuero-kampagnen/onegov-cloud | 20148bf321b71f617b64376fe7249b2b9b9c4aa9 | [
"MIT"
] | null | null | null | src/onegov/chat/models/__init__.py | politbuero-kampagnen/onegov-cloud | 20148bf321b71f617b64376fe7249b2b9b9c4aa9 | [
"MIT"
] | null | null | null | src/onegov/chat/models/__init__.py | politbuero-kampagnen/onegov-cloud | 20148bf321b71f617b64376fe7249b2b9b9c4aa9 | [
"MIT"
] | null | null | null | from onegov.chat.models.message import Message, MessageFile
__all__ = ('Message', 'MessageFile')
| 24.5 | 59 | 0.77551 |
3dc151198daa0138f85a60032351075d385b2391 | 9,642 | py | Python | src/onegov/town6/views/settings.py | politbuero-kampagnen/onegov-cloud | 20148bf321b71f617b64376fe7249b2b9b9c4aa9 | [
"MIT"
] | null | null | null | src/onegov/town6/views/settings.py | politbuero-kampagnen/onegov-cloud | 20148bf321b71f617b64376fe7249b2b9b9c4aa9 | [
"MIT"
] | null | null | null | src/onegov/town6/views/settings.py | politbuero-kampagnen/onegov-cloud | 20148bf321b71f617b64376fe7249b2b9b9c4aa9 | [
"MIT"
] | null | null | null | """ The settings view, defining things like the logo or color of the org. """
from wtforms import StringField, BooleanField, IntegerField
from onegov.core.security import Secret
from onegov.form import Form, merge_forms, move_fields
from onegov.org import _
from onegov.town6.forms.settings import GeneralSettingsForm, ... | 36.661597 | 79 | 0.715101 |
b8e35df684f54ec1788f5e192dcc56b4312dd8b9 | 1,791 | py | Python | tests/onegov/pdf/test_signature.py | politbuero-kampagnen/onegov-cloud | 20148bf321b71f617b64376fe7249b2b9b9c4aa9 | [
"MIT"
] | null | null | null | tests/onegov/pdf/test_signature.py | politbuero-kampagnen/onegov-cloud | 20148bf321b71f617b64376fe7249b2b9b9c4aa9 | [
"MIT"
] | null | null | null | tests/onegov/pdf/test_signature.py | politbuero-kampagnen/onegov-cloud | 20148bf321b71f617b64376fe7249b2b9b9c4aa9 | [
"MIT"
] | null | null | null | from io import BytesIO
from onegov.pdf import LexworkSigner
from unittest.mock import MagicMock
from unittest.mock import patch
def test_pdf_signing_reasons():
signer = LexworkSigner(
host='http://abcd.ef',
login='abcd',
password='1234',
)
args = {'json.return_value': {'result': [... | 31.982143 | 79 | 0.575098 |
77320a19a4dbc7496bd17964c00e95af725941a4 | 1,364 | py | Python | MazeSolving/Solver/Cell.py | Thukor/MazeSolver | c953e193ce27a7348e8ec9c5592144426dfce193 | [
"MIT"
] | 5 | 2018-02-06T22:48:34.000Z | 2020-01-07T20:19:05.000Z | MazeSolving/Solver/Cell.py | Thukor/MazeSolver | c953e193ce27a7348e8ec9c5592144426dfce193 | [
"MIT"
] | 11 | 2018-01-31T21:47:49.000Z | 2018-04-21T16:42:52.000Z | MazeSolving/Solver/Cell.py | Thukor/MazeSolver | c953e193ce27a7348e8ec9c5592144426dfce193 | [
"MIT"
] | 2 | 2020-06-18T05:40:03.000Z | 2022-02-02T03:46:30.000Z | from collections import namedtuple
from pprint import pformat
class Cell:
def __init__(self, row, column, wall_value):
self.row = row
self.column = column
self.wall_value = wall_value
self.is_start = False
def __eq__(self, other):
return (self.row, self.column, self.wall_value) == (other.row, other.colum... | 22 | 96 | 0.708211 |
773b5543af453b657869f557ef5a0c04d131d2cc | 3,322 | py | Python | udm-bildungslogin/ucs-test/97_bildungslogin_udm/001_metadatum.py | univention/bildungslogin | 29bebe858a5445dd5566aad594b33b9dd716eca4 | [
"MIT"
] | null | null | null | udm-bildungslogin/ucs-test/97_bildungslogin_udm/001_metadatum.py | univention/bildungslogin | 29bebe858a5445dd5566aad594b33b9dd716eca4 | [
"MIT"
] | null | null | null | udm-bildungslogin/ucs-test/97_bildungslogin_udm/001_metadatum.py | univention/bildungslogin | 29bebe858a5445dd5566aad594b33b9dd716eca4 | [
"MIT"
] | null | null | null | #!/usr/share/ucs-test/runner /usr/bin/py.test -slvv --cov --cov-config=.coveragerc --cov-append --cov-report=
# -*- coding: utf-8 -*-
## desc: Run tests for the udm module bildungslogin/metadata
## roles: [domaincontroller_master, domaincontroller_backup, domaincontroller_slave]
## exposure: dangerous
## tags: [bildung... | 40.512195 | 109 | 0.754967 |
62105c63d9a9d0e274bd0d6cb79896ee36a2a742 | 1,375 | py | Python | Beginner/03. Python/fizzBuzzLogicRecursion.py | ankita080208/Hacktoberfest | 2be849e89285260e7b6672f42979943ad6bbec78 | [
"MIT"
] | 1 | 2021-10-06T13:55:02.000Z | 2021-10-06T13:55:02.000Z | Beginner/03. Python/fizzBuzzLogicRecursion.py | ankita080208/Hacktoberfest | 2be849e89285260e7b6672f42979943ad6bbec78 | [
"MIT"
] | null | null | null | Beginner/03. Python/fizzBuzzLogicRecursion.py | ankita080208/Hacktoberfest | 2be849e89285260e7b6672f42979943ad6bbec78 | [
"MIT"
] | null | null | null | """
Problem Statement: To print numbers between 1 and 100 according to some rules which are mentioned below:
- print fizz for multiples of 3
- print buzz for multiples of 5
- print fizzbuzz for their common multiples
- print number otherwise
"""
def check_num(number):
if number % 3 == 0 and nu... | 38.194444 | 111 | 0.690182 |
657d385baab13be5aef6e990ce4118b6b69217f2 | 1,836 | py | Python | python/tutlibs/nns.py | Obarads/Point_Cloud_Tutorial | faf7ae8abf962ecea414cc7557dc35f4fca0e406 | [
"MIT"
] | 1 | 2021-11-22T10:32:49.000Z | 2021-11-22T10:32:49.000Z | python/tutlibs/nns.py | Obarads/Point_Cloud_Tutorial | faf7ae8abf962ecea414cc7557dc35f4fca0e406 | [
"MIT"
] | 1 | 2021-12-09T14:39:51.000Z | 2021-12-09T14:39:51.000Z | python/tutlibs/nns.py | Obarads/Point_Cloud_Tutorial | faf7ae8abf962ecea414cc7557dc35f4fca0e406 | [
"MIT"
] | null | null | null | from typing import Tuple
import numpy as np
from .operator import square_distance
def k_nearest_neighbors(coords1: np.ndarray, coords2: np.ndarray, k: int) -> Tuple[np.ndarray, np.ndarray]:
"""Compute k nearest neighbors between coords1 and coords2.
Args:
coords1: coordinates of centroid points (N, ... | 34 | 139 | 0.681917 |
b2afa064c1130a741ee4a2150e3cdd14ec1cac8e | 2,293 | py | Python | Openharmony v1.0/vendor/hisi/hi35xx/third_party/uboot/tools/binman/etype/blob_dtb.py | clkbit123/TheOpenHarmony | 0e6bcd9dee9f1a2481d762966b8bbd24baad6159 | [
"MIT"
] | 1 | 2022-02-15T08:51:55.000Z | 2022-02-15T08:51:55.000Z | hihope_neptune-oh_hid/00_src/v0.1/device/hisilicon/third_party/uboot/u-boot-2020.01/tools/binman/etype/blob_dtb.py | dawmlight/vendor_oh_fun | bc9fb50920f06cd4c27399f60076f5793043c77d | [
"Apache-2.0"
] | null | null | null | hihope_neptune-oh_hid/00_src/v0.1/device/hisilicon/third_party/uboot/u-boot-2020.01/tools/binman/etype/blob_dtb.py | dawmlight/vendor_oh_fun | bc9fb50920f06cd4c27399f60076f5793043c77d | [
"Apache-2.0"
] | null | null | null | # SPDX-License-Identifier: GPL-2.0+
# Copyright (c) 2018 Google, Inc
# Written by Simon Glass <sjg@chromium.org>
#
# Entry-type module for U-Boot device tree files
#
from entry import Entry
from blob import Entry_blob
class Entry_blob_dtb(Entry_blob):
"""A blob that holds a device tree
This is a blob contain... | 34.223881 | 79 | 0.638901 |
a26b0a2136af1553ee1b887f8800b8b2073e229d | 788 | py | Python | SBTK_League_Helper/src/__init__.py | juanchodepisa/sbtk | 7cba7748e75a02b491e551d6c1be9bd7987c5051 | [
"MIT"
] | null | null | null | SBTK_League_Helper/src/__init__.py | juanchodepisa/sbtk | 7cba7748e75a02b491e551d6c1be9bd7987c5051 | [
"MIT"
] | null | null | null | SBTK_League_Helper/src/__init__.py | juanchodepisa/sbtk | 7cba7748e75a02b491e551d6c1be9bd7987c5051 | [
"MIT"
] | null | null | null | from .script_msg_log import log_entry, waiting # Altering the print command to function as a log.
# APPLICATION-WIDE CONSTANTS
application_encoding = 'utf-8'
application_timeformat = "%Y-%m-%dT%H:%M:%S.%f%z" #ISO 8601 compliant (also readable back and forth)
application_user_agent = "STBK League Assistant/Pre-alpha h... | 32.833333 | 100 | 0.739848 |
a274f9a34f75a72751c531311502aa8904ba4b2e | 4,740 | py | Python | Imagenes/vdWColumnHT_2D/CasoA/plotData.py | efogliatto/Tesis | 058fa0c2e23cd538621d17d41bb216a4db4d211a | [
"CC0-1.0"
] | null | null | null | Imagenes/vdWColumnHT_2D/CasoA/plotData.py | efogliatto/Tesis | 058fa0c2e23cd538621d17d41bb216a4db4d211a | [
"CC0-1.0"
] | null | null | null | Imagenes/vdWColumnHT_2D/CasoA/plotData.py | efogliatto/Tesis | 058fa0c2e23cd538621d17d41bb216a4db4d211a | [
"CC0-1.0"
] | null | null | null | import numpy as np
import matplotlib
matplotlib.use('Agg')
import matplotlib.pyplot as plt
import argparse
import locale
import vdWColumn as vdw
if __name__ == "__main__":
# Argumentos de consola
parser = argparse.ArgumentParser(description='Grafico de vdWColumn')
parser.add_argument('-... | 22.898551 | 187 | 0.45 |
0c3edf4cac58bb75c75983be9c172835e0df83e5 | 125 | py | Python | python/atexit/atexit_simple.py | zeroam/TIL | 43e3573be44c7f7aa4600ff8a34e99a65cbdc5d1 | [
"MIT"
] | 1 | 2018-10-06T23:50:53.000Z | 2018-10-06T23:50:53.000Z | python/atexit/atexit_simple.py | zeroam/TIL | 43e3573be44c7f7aa4600ff8a34e99a65cbdc5d1 | [
"MIT"
] | null | null | null | python/atexit/atexit_simple.py | zeroam/TIL | 43e3573be44c7f7aa4600ff8a34e99a65cbdc5d1 | [
"MIT"
] | 1 | 2018-10-06T23:50:50.000Z | 2018-10-06T23:50:50.000Z | import atexit
def all_done():
print('all_done()')
print('Registering')
atexit.register(all_done)
print('Registered')
| 11.363636 | 25 | 0.712 |
a7a64a1e91961e20fbd6ebf8f16bf275cccfc310 | 2,122 | py | Python | webapp/data_viewer/flask/dataViewer3.py | zeroam/TIL | 43e3573be44c7f7aa4600ff8a34e99a65cbdc5d1 | [
"MIT"
] | null | null | null | webapp/data_viewer/flask/dataViewer3.py | zeroam/TIL | 43e3573be44c7f7aa4600ff8a34e99a65cbdc5d1 | [
"MIT"
] | null | null | null | webapp/data_viewer/flask/dataViewer3.py | zeroam/TIL | 43e3573be44c7f7aa4600ff8a34e99a65cbdc5d1 | [
"MIT"
] | null | null | null | import pandas as pd
from pydataset import data
from flask import Flask, request, render_template, session
from flask_bootstrap import Bootstrap
from bokeh.plotting import Figure
from bokeh.models import ColumnDataSource
from bokeh.embed import components
from bokeh.resources import INLINE
from bokeh.util.string import ... | 27.558442 | 75 | 0.685203 |
a7bc71156e49b4755cc13c34a66af31d8e053186 | 1,155 | py | Python | mahadbt-main/response.py | Zusyaku/Termux-And-Lali-Linux-V2 | b1a1b0841d22d4bf2cc7932b72716d55f070871e | [
"Apache-2.0"
] | 2 | 2021-11-17T03:35:03.000Z | 2021-12-08T06:00:31.000Z | mahadbt-main/response.py | Zusyaku/Termux-And-Lali-Linux-V2 | b1a1b0841d22d4bf2cc7932b72716d55f070871e | [
"Apache-2.0"
] | null | null | null | mahadbt-main/response.py | Zusyaku/Termux-And-Lali-Linux-V2 | b1a1b0841d22d4bf2cc7932b72716d55f070871e | [
"Apache-2.0"
] | 2 | 2021-11-05T18:07:48.000Z | 2022-02-24T21:25:07.000Z | from turtle import update
from telegram import Update
from telegram.ext import Updater, CommandHandler, CallbackContext
import time as t
updater = Updater('1849563775:AAGGX0GCema6OelGZprpu6AdwjzyoWfeULQ')
def hello(update: Update, context: CallbackContext) -> None:
update.message.reply_text(f'Hello {update.effecti... | 39.827586 | 114 | 0.751515 |
ac236bf6e510c67a6d79429827c44dc7ff55eea2 | 415 | py | Python | python/pyqt/pyqt_designer_example/first_steps_with_qt_designer/converting_ui_file_to_python.py | zeroam/TIL | 43e3573be44c7f7aa4600ff8a34e99a65cbdc5d1 | [
"MIT"
] | null | null | null | python/pyqt/pyqt_designer_example/first_steps_with_qt_designer/converting_ui_file_to_python.py | zeroam/TIL | 43e3573be44c7f7aa4600ff8a34e99a65cbdc5d1 | [
"MIT"
] | null | null | null | python/pyqt/pyqt_designer_example/first_steps_with_qt_designer/converting_ui_file_to_python.py | zeroam/TIL | 43e3573be44c7f7aa4600ff8a34e99a65cbdc5d1 | [
"MIT"
] | null | null | null | # command : pyuic5 mainwindow.ui -o MainWindow.py
import sys
from PyQt5 import QtWidgets, uic
from MainWindow import Ui_MainWindow
class MainWindow(QtWidgets.QMainWindow, Ui_MainWindow):
def __init__(self, *args, obj=None, **kwargs):
super(MainWindow, self).__init__(*args, **kwargs)
self.setupUi... | 23.055556 | 57 | 0.73253 |
3baed6869e2e3e49abe074165ba479ad4ee8304b | 2,864 | py | Python | kiosk/urls.py | AndiBr/ffksk | ff4bc4ad26d4571eaa1a6ff815b2e6a876f8ba99 | [
"MIT"
] | null | null | null | kiosk/urls.py | AndiBr/ffksk | ff4bc4ad26d4571eaa1a6ff815b2e6a876f8ba99 | [
"MIT"
] | 14 | 2018-09-12T06:59:55.000Z | 2020-02-26T07:17:48.000Z | kiosk/urls.py | AndiBr/ffksk | ff4bc4ad26d4571eaa1a6ff815b2e6a876f8ba99 | [
"MIT"
] | null | null | null | from django.conf.urls import url
from . import views, slackCommands, slackMessages
urlpatterns = [
url(r'^$', views.start_page, name='start_page'),
url(r'^imkiosk/$', views.imkiosk_page, name='imkiosk_page'),
url(r'^offeneEkListe/$', views.offeneEkListe_page, name='offeneEkListe_page'),
url(r'^impressum/$', views... | 69.853659 | 116 | 0.743366 |
ce2ee1fd8e4feae1304843a79f49b2bceb3d6ad8 | 1,425 | py | Python | Prototype/main prototype/test/TestScript_027.py | fowado/BauphysikSE1 | eb8805196c8fbf99a879c40c5e0725d740c5a0de | [
"CC-BY-4.0"
] | 4 | 2019-12-03T16:13:09.000Z | 2019-12-11T23:22:58.000Z | Prototype/main prototype/test/TestScript_027.py | fowado/BauphysikSE1 | eb8805196c8fbf99a879c40c5e0725d740c5a0de | [
"CC-BY-4.0"
] | 65 | 2019-12-08T17:43:59.000Z | 2020-08-14T15:26:21.000Z | Prototype/main prototype/test/TestScript_027.py | fowado/BauphysikSE1 | eb8805196c8fbf99a879c40c5e0725d740c5a0de | [
"CC-BY-4.0"
] | null | null | null | import unittest
import Calculation
from TabData import TabData
from LayerData import LayerData
class TestScript_027(unittest.TestCase):
"""
U-Berechnung 2 Schichten
analog manuellem TestScript_015
"""
def setUp(self):
self.layer_1 = LayerData()
self.layer_1.widthUnit = 1
se... | 25.446429 | 72 | 0.592281 |
0268be31746dfb19f35437e1a2d8a6f82c73a433 | 1,093 | py | Python | Packs/CommonScripts/Scripts/LanguageDetect/LanguageDetect_test.py | diCagri/content | c532c50b213e6dddb8ae6a378d6d09198e08fc9f | [
"MIT"
] | 799 | 2016-08-02T06:43:14.000Z | 2022-03-31T11:10:11.000Z | Packs/CommonScripts/Scripts/LanguageDetect/LanguageDetect_test.py | diCagri/content | c532c50b213e6dddb8ae6a378d6d09198e08fc9f | [
"MIT"
] | 9,317 | 2016-08-07T19:00:51.000Z | 2022-03-31T21:56:04.000Z | Packs/CommonScripts/Scripts/LanguageDetect/LanguageDetect_test.py | diCagri/content | c532c50b213e6dddb8ae6a378d6d09198e08fc9f | [
"MIT"
] | 1,297 | 2016-08-04T13:59:00.000Z | 2022-03-31T23:43:06.000Z | import demistomock as demisto
from LanguageDetect import main
def test_language_detect_english(mocker):
"""
Given:
- Text in English
When:
- Run the LanguageDetect script
Then:
- Verify the that english is returned.
"""
mocker.patch.object(demisto, 'args', return_val... | 22.306122 | 59 | 0.623056 |
65fa7bc590f53e59647200c186e6eee8c7aab117 | 283 | pyde | Python | sketches/wordcrambasic/wordcrambasic.pyde | kantel/processingpy | 74aae222e46f68d1c8f06307aaede3cdae65c8ec | [
"MIT"
] | 4 | 2018-06-03T02:11:46.000Z | 2021-08-18T19:55:15.000Z | sketches/wordcrambasic/wordcrambasic.pyde | kantel/processingpy | 74aae222e46f68d1c8f06307aaede3cdae65c8ec | [
"MIT"
] | null | null | null | sketches/wordcrambasic/wordcrambasic.pyde | kantel/processingpy | 74aae222e46f68d1c8f06307aaede3cdae65c8ec | [
"MIT"
] | 3 | 2019-12-23T19:12:51.000Z | 2021-04-30T14:00:31.000Z | add_library('WordCram')
def setup():
size(700, 400)
background(255)
wordcram = WordCram(this
).fromWebPage("http://blog.schockwellenreiter.de/2017/04/2017040404.html"
).sizedByWeight(0, 150
).withFont("Copse"
)
wordcram.drawAll() | 23.583333 | 81 | 0.614841 |
ce841d9d86f58af1da883e280e8377cfe5bd6b78 | 2,077 | py | Python | project/api/location/schemas.py | DanielGrams/gsevp | e94034f7b64de76f38754b56455e83092378261f | [
"MIT"
] | 1 | 2021-06-01T14:49:18.000Z | 2021-06-01T14:49:18.000Z | project/api/location/schemas.py | DanielGrams/gsevp | e94034f7b64de76f38754b56455e83092378261f | [
"MIT"
] | 286 | 2020-12-04T14:13:00.000Z | 2022-03-09T19:05:16.000Z | project/api/location/schemas.py | DanielGrams/gsevpt | a92f71694388e227e65ed1b24446246ee688d00e | [
"MIT"
] | null | null | null | from marshmallow import ValidationError, validate, validates_schema
from project.api import marshmallow
from project.api.fields import NumericStr
from project.api.schemas import SQLAlchemyBaseSchema
from project.models import Location
class LocationModelSchema(SQLAlchemyBaseSchema):
class Meta:
model = L... | 31.469697 | 85 | 0.715936 |
0ca6c6a2bcb8bfd5920ef1f719e02fbebb629b3f | 5,807 | py | Python | x2paddle/project_convertor/pytorch/torch2paddle/io.py | usertianqin/X2Paddle | b554a8094ca3e255ef4bd2e80337222a35625133 | [
"Apache-2.0"
] | 559 | 2019-01-14T06:01:55.000Z | 2022-03-31T02:52:43.000Z | x2paddle/project_convertor/pytorch/torch2paddle/io.py | usertianqin/X2Paddle | b554a8094ca3e255ef4bd2e80337222a35625133 | [
"Apache-2.0"
] | 353 | 2019-05-07T13:20:03.000Z | 2022-03-31T05:30:12.000Z | x2paddle/project_convertor/pytorch/torch2paddle/io.py | usertianqin/X2Paddle | b554a8094ca3e255ef4bd2e80337222a35625133 | [
"Apache-2.0"
] | 241 | 2018-12-25T02:13:51.000Z | 2022-03-27T23:21:43.000Z | # Copyright (c) 2021 PaddlePaddle Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by appl... | 30.563158 | 95 | 0.601515 |
0cdb5aeeb9e2fc6203d2950a54b932225f37ed26 | 1,433 | py | Python | Problems/Depth-First Search/easy/AverageLevelsBinaryTree/average_levels_binary_tree.py | dolong2110/Algorithm-By-Problems-Python | 31ecc7367aaabdd2b0ac0af7f63ca5796d70c730 | [
"MIT"
] | 1 | 2021-08-16T14:52:05.000Z | 2021-08-16T14:52:05.000Z | Problems/Depth-First Search/easy/AverageLevelsBinaryTree/average_levels_binary_tree.py | dolong2110/Algorithm-By-Problems-Python | 31ecc7367aaabdd2b0ac0af7f63ca5796d70c730 | [
"MIT"
] | null | null | null | Problems/Depth-First Search/easy/AverageLevelsBinaryTree/average_levels_binary_tree.py | dolong2110/Algorithm-By-Problems-Python | 31ecc7367aaabdd2b0ac0af7f63ca5796d70c730 | [
"MIT"
] | null | null | null | from typing import Optional, List
# Definition for a binary tree node.
class TreeNode:
def __init__(self, val=0, left=None, right=None):
self.val = val
self.left = left
self.right = right
# Recursive
def averageOfLevels(self, root: Optional[TreeNode]) -> List[float]:
levels_stats, sel... | 28.098039 | 67 | 0.579204 |
0cecc712db12d0ba550d0c4445d457d566cee529 | 4,059 | py | Python | tests/onegov/org/test_views_people.py | politbuero-kampagnen/onegov-cloud | 20148bf321b71f617b64376fe7249b2b9b9c4aa9 | [
"MIT"
] | null | null | null | tests/onegov/org/test_views_people.py | politbuero-kampagnen/onegov-cloud | 20148bf321b71f617b64376fe7249b2b9b9c4aa9 | [
"MIT"
] | null | null | null | tests/onegov/org/test_views_people.py | politbuero-kampagnen/onegov-cloud | 20148bf321b71f617b64376fe7249b2b9b9c4aa9 | [
"MIT"
] | null | null | null | from onegov.people import Person
def test_people_view(client):
client.login_admin()
settings = client.get('/module-settings')
settings.form['hidden_people_fields'] = ['academic_title', 'profession']
settings.form.submit()
client.logout()
client.login_editor()
people = client.get('/people... | 31.710938 | 76 | 0.666174 |
0b2b5d8ccf336932c2a688683dc3a418886aadea | 306 | py | Python | exercises/ja/solution_01_09.py | Jette16/spacy-course | 32df0c8f6192de6c9daba89740a28c0537e4d6a0 | [
"MIT"
] | 2,085 | 2019-04-17T13:10:40.000Z | 2022-03-30T21:51:46.000Z | exercises/ja/solution_01_09.py | Jette16/spacy-course | 32df0c8f6192de6c9daba89740a28c0537e4d6a0 | [
"MIT"
] | 79 | 2019-04-18T14:42:55.000Z | 2022-03-07T08:15:43.000Z | exercises/ja/solution_01_09.py | Jette16/spacy-course | 32df0c8f6192de6c9daba89740a28c0537e4d6a0 | [
"MIT"
] | 361 | 2019-04-17T13:34:32.000Z | 2022-03-28T04:42:45.000Z | import spacy
nlp = spacy.load("ja_core_news_sm")
text = "静岡県にある三保の松原は世界遺産の一部です。"
# テキストを処理
doc = nlp(text)
# 固有表現をイテレート
for ent in doc.ents:
# 固有表現の文字列とラベルをプリント
print(ent.text, ent.label_)
# 三保の松原のスパンを取得
mihonomatsubara = doc[4:7]
# スパンの文字列をプリント
print("Missing entity:", mihonomatsubara.text) | 16.105263 | 46 | 0.732026 |
0b6ab7075c6d0e23091331fc6eea61401434e1e2 | 1,158 | py | Python | problems in reality/grouping/gen_test.py | MU001999/codeex | 23e300f9121a8d6bf4f4c9ec103510193808e9ba | [
"MIT"
] | 2 | 2019-01-27T14:16:09.000Z | 2019-05-25T10:05:24.000Z | problems in reality/grouping/gen_test.py | MU001999/codeex | 23e300f9121a8d6bf4f4c9ec103510193808e9ba | [
"MIT"
] | null | null | null | problems in reality/grouping/gen_test.py | MU001999/codeex | 23e300f9121a8d6bf4f4c9ec103510193808e9ba | [
"MIT"
] | 1 | 2020-11-05T05:17:28.000Z | 2020-11-05T05:17:28.000Z | import os
from random import randint
fnames = ["赵", "钱", "孙", "李", "周", "吴", "郑", "王"]
snames = ["欣", "胡", "之", "美", "容", "轩", "钥", "博"]
def gen_name():
sname = ""
length = randint(1, 2)
for i in range(length):
sname += snames[randint(0, len(snames) - 1)]
return fnames[randint(0, len(fnames) ... | 38.6 | 132 | 0.465458 |
f042eabe00ad29a81a3c7feba34a9fa64e4d2c71 | 155 | py | Python | wetterstation/lib/programm.py | SvenPfiffner/Kinderuni2021 | 97e6f1148177c51951a95d88515b3b3008164759 | [
"MIT"
] | null | null | null | wetterstation/lib/programm.py | SvenPfiffner/Kinderuni2021 | 97e6f1148177c51951a95d88515b3b3008164759 | [
"MIT"
] | null | null | null | wetterstation/lib/programm.py | SvenPfiffner/Kinderuni2021 | 97e6f1148177c51951a95d88515b3b3008164759 | [
"MIT"
] | null | null | null | """
Author: -----
Date: -----
"""
from .visualisation import grafik
#Eintrittspunkt des Programms
def start():
grafik.zeigeTemperaturBild([1,2,3,4]) | 17.222222 | 41 | 0.658065 |
b2dae0a5da58bd04d14a8502ac50d6ddc5c552db | 1,983 | py | Python | sendmail.py | stg93/blaulichtsms_einsatzmonitor | db595f535ece0f944ec70a9eac70af7b667f63ef | [
"MIT"
] | 18 | 2017-07-24T18:08:04.000Z | 2021-05-06T06:50:22.000Z | sendmail.py | stg93/blaulichtsms_einsatzmonitor | db595f535ece0f944ec70a9eac70af7b667f63ef | [
"MIT"
] | 19 | 2018-09-25T20:42:17.000Z | 2021-11-23T21:26:18.000Z | sendmail.py | stg93/blaulichtsms_einsatzmonitor | db595f535ece0f944ec70a9eac70af7b667f63ef | [
"MIT"
] | 11 | 2018-05-05T04:49:41.000Z | 2022-02-18T17:33:13.000Z | import smtplib
import logging
from email.mime.base import MIMEBase
from email.mime.multipart import MIMEMultipart
from email.mime.text import MIMEText
from email.encoders import encode_base64
import os
class MailSender:
"""A utility class for sending emails."""
def __init__(self, smtp_server, smtp_port, user... | 31.983871 | 71 | 0.626828 |
65312e4105cf0ac56246d2eacd8e066bc98b3a44 | 32,836 | py | Python | sdk/beaker/__init__.py | MailBeaker/mailbeaker-sdk | 324e48f9e255fd2dfa82d5f7f6bd52ab71e50904 | [
"MIT"
] | null | null | null | sdk/beaker/__init__.py | MailBeaker/mailbeaker-sdk | 324e48f9e255fd2dfa82d5f7f6bd52ab71e50904 | [
"MIT"
] | null | null | null | sdk/beaker/__init__.py | MailBeaker/mailbeaker-sdk | 324e48f9e255fd2dfa82d5f7f6bd52ab71e50904 | [
"MIT"
] | null | null | null | import binascii
import json
import logging
import os
import redis
import requests
import time
from requests.exceptions import RequestException
from sdk import jwt
from sdk import sdk_settings
from sdk import stats
from sdk.beaker import mail
import sys
if (sys.version_info > (3, 0)):
from urllib.parse import urlp... | 37.829493 | 145 | 0.598124 |
33352b8c18a295c49e3819efe255ac945237bd83 | 12,602 | py | Python | examples/language_model/luke/run_open_entity.py | mukaiu/PaddleNLP | 0315365dbafa6e3b1c7147121ba85e05884125a5 | [
"Apache-2.0"
] | null | null | null | examples/language_model/luke/run_open_entity.py | mukaiu/PaddleNLP | 0315365dbafa6e3b1c7147121ba85e05884125a5 | [
"Apache-2.0"
] | null | null | null | examples/language_model/luke/run_open_entity.py | mukaiu/PaddleNLP | 0315365dbafa6e3b1c7147121ba85e05884125a5 | [
"Apache-2.0"
] | null | null | null | # Copyright (c) 2021 PaddlePaddle Authors. All Rights Reserved.
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
# http://www.apache.org/licenses/LICENSE-2.0
# Unless required by applicab... | 37.284024 | 80 | 0.587843 |
acda7298452d94b8c23a5e7946ba2e285214944e | 4,322 | py | Python | app/user/tests/test_user_api.py | mshirzad/find-my-job | 7dca88d6233649952f0b948156a91af5b96352ff | [
"MIT"
] | null | null | null | app/user/tests/test_user_api.py | mshirzad/find-my-job | 7dca88d6233649952f0b948156a91af5b96352ff | [
"MIT"
] | null | null | null | app/user/tests/test_user_api.py | mshirzad/find-my-job | 7dca88d6233649952f0b948156a91af5b96352ff | [
"MIT"
] | 1 | 2022-03-06T17:44:49.000Z | 2022-03-06T17:44:49.000Z | from django.test import TestCase
from django.contrib.auth import get_user_model
from django.urls import reverse
from rest_framework.test import APIClient
from rest_framework import status
CREATE_USER_URL = reverse('user:create')
TOKEN_URL = reverse('user:token')
ME_URL = reverse('user:me')
def create_user(**params):... | 28.813333 | 78 | 0.63466 |
76639f0f42764c3bf1446b4f05247dca56f6169a | 572 | py | Python | admin-tutorial/AdminFilter/filter_horizontal_/models.py | zhengtong0898/django-decode | 69680853a4a5b07f6a9c4b65c7d86b2d401a92b1 | [
"MIT"
] | 5 | 2020-07-14T07:48:10.000Z | 2021-12-20T21:20:10.000Z | admin-tutorial/AdminFilter/filter_horizontal_/models.py | zhengtong0898/django-decode | 69680853a4a5b07f6a9c4b65c7d86b2d401a92b1 | [
"MIT"
] | 7 | 2021-03-26T03:13:38.000Z | 2022-03-12T00:42:03.000Z | admin-tutorial/AdminFilter/filter_horizontal_/models.py | zhengtong0898/django-decode | 69680853a4a5b07f6a9c4b65c7d86b2d401a92b1 | [
"MIT"
] | 1 | 2021-02-16T07:04:25.000Z | 2021-02-16T07:04:25.000Z | from django.db import models
# Create your models here.
class Publication(models.Model):
title = models.CharField(verbose_name="出版社", max_length=30)
class Meta:
ordering = ['title']
def __str__(self):
return self.title
class Article(models.Model):
headline = models.CharField(verbos... | 22.88 | 68 | 0.681818 |
8b1e1bb1744652826a391086158d03b06d269008 | 509 | py | Python | Python/M01_ProgrammingBasics/L06_NestedLoops/Lab/Solutions/P04_SumOfTwoNumbers.py | todorkrastev/softuni-software-engineering | cfc0b5eaeb82951ff4d4668332ec3a31c59a5f84 | [
"MIT"
] | null | null | null | Python/M01_ProgrammingBasics/L06_NestedLoops/Lab/Solutions/P04_SumOfTwoNumbers.py | todorkrastev/softuni-software-engineering | cfc0b5eaeb82951ff4d4668332ec3a31c59a5f84 | [
"MIT"
] | null | null | null | Python/M01_ProgrammingBasics/L06_NestedLoops/Lab/Solutions/P04_SumOfTwoNumbers.py | todorkrastev/softuni-software-engineering | cfc0b5eaeb82951ff4d4668332ec3a31c59a5f84 | [
"MIT"
] | 1 | 2022-02-23T13:03:14.000Z | 2022-02-23T13:03:14.000Z | start = int(input())
end = int(input())
magic_number = int(input())
is_found = False
combinations = 0
for first in range(start, end + 1):
for second in range(start, end + 1):
combinations += 1
if first + second == magic_number:
is_found = True
print(f"Combination N:{combinat... | 26.789474 | 90 | 0.607073 |
8c8ce4fd000a19c2587fc0e3408cba4000684648 | 8,825 | py | Python | exercises/networking_selfpaced/networking-workshop/collections/ansible_collections/community/general/tests/unit/modules/network/onyx/test_onyx_igmp_vlan.py | tr3ck3r/linklight | 5060f624c235ecf46cb62cefcc6bddc6bf8ca3e7 | [
"MIT"
] | null | null | null | exercises/networking_selfpaced/networking-workshop/collections/ansible_collections/community/general/tests/unit/modules/network/onyx/test_onyx_igmp_vlan.py | tr3ck3r/linklight | 5060f624c235ecf46cb62cefcc6bddc6bf8ca3e7 | [
"MIT"
] | null | null | null | exercises/networking_selfpaced/networking-workshop/collections/ansible_collections/community/general/tests/unit/modules/network/onyx/test_onyx_igmp_vlan.py | tr3ck3r/linklight | 5060f624c235ecf46cb62cefcc6bddc6bf8ca3e7 | [
"MIT"
] | null | null | null | #
# Copyright: Ansible Project
# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
# Make coding more python3-ish
from __future__ import (absolute_import, division, print_function)
__metaclass__ = type
from ansible_collections.community.general.tests.unit.compat.mock import pa... | 46.204188 | 109 | 0.696544 |
0fe52e4d15a799a87652d7993c113adf2998b878 | 757 | py | Python | languages/python/exercises/concept/lists/.meta/example.py | AlexLeSang/v3 | 3d35961a961b5a2129b1d42f1d118972d9665357 | [
"MIT"
] | 3 | 2020-07-25T06:24:00.000Z | 2020-09-14T17:39:11.000Z | languages/python/exercises/concept/lists/.meta/example.py | AlexLeSang/v3 | 3d35961a961b5a2129b1d42f1d118972d9665357 | [
"MIT"
] | 45 | 2020-01-24T17:04:52.000Z | 2020-11-24T17:50:18.000Z | languages/python/exercises/concept/lists/.meta/example.py | AlexLeSang/v3 | 3d35961a961b5a2129b1d42f1d118972d9665357 | [
"MIT"
] | 1 | 2020-04-20T11:41:55.000Z | 2020-04-20T11:41:55.000Z | def to_list(arg1, arg2, arg3, arg4, arg5):
return [arg1, arg2, arg3, arg4, arg5]
def list_twice(_list):
return [_list, list(_list)]
def concatenate_lists(list1, list2):
return list1 + list2
def list_contains_object(_list, _object):
return _object in _list
def first_and_last(_list):
return [_... | 15.770833 | 45 | 0.659181 |
fa4447cba807742fa7f42a46e984cee3e3d6559a | 469 | py | Python | presentations/django/code/quotemanager/quotes/views.py | ErikMayrhofer/presentations | a2a8786061167778d8c46ddf06799877a2552e28 | [
"MIT"
] | null | null | null | presentations/django/code/quotemanager/quotes/views.py | ErikMayrhofer/presentations | a2a8786061167778d8c46ddf06799877a2552e28 | [
"MIT"
] | null | null | null | presentations/django/code/quotemanager/quotes/views.py | ErikMayrhofer/presentations | a2a8786061167778d8c46ddf06799877a2552e28 | [
"MIT"
] | null | null | null | from django.shortcuts import render
from rest_framework import viewsets, permissions
from .models import Quote, Person
from .serializers import QuoteSerializer, PersonSerializer
class QuoteView(viewsets.ModelViewSet):
queryset = Quote.objects.all()
serializer_class = QuoteSerializer
permission_classes = ... | 27.588235 | 58 | 0.801706 |
d721e8928b7670818ec0eef38a05f61dc2149417 | 4,417 | py | Python | util.py | jayelm/rl-starter-files | 045302672e6ae5f4704afce56b788a67393dcc52 | [
"MIT"
] | null | null | null | util.py | jayelm/rl-starter-files | 045302672e6ae5f4704afce56b788a67393dcc52 | [
"MIT"
] | null | null | null | util.py | jayelm/rl-starter-files | 045302672e6ae5f4704afce56b788a67393dcc52 | [
"MIT"
] | null | null | null | """
utils
"""
import os
import subprocess
import json
import logs
logger = logs.get_logger(__name__)
def current_git_hash():
"""
Get the hash of the latest commit in this repository. Does not account for unstaged changes.
Returns
-------
git_hash : ``str``, optional
The string correspo... | 29.251656 | 101 | 0.62599 |
a8ea206651e43c1c1b092c45e73f35bd8de01989 | 218 | py | Python | db_utils/db_config.py | raiever/abtest | ff14f20ad23d2a0710e95d23e3d1124a44298a62 | [
"Apache-2.0"
] | null | null | null | db_utils/db_config.py | raiever/abtest | ff14f20ad23d2a0710e95d23e3d1124a44298a62 | [
"Apache-2.0"
] | null | null | null | db_utils/db_config.py | raiever/abtest | ff14f20ad23d2a0710e95d23e3d1124a44298a62 | [
"Apache-2.0"
] | null | null | null | import logging
import os
import sys
MYSQL = {
'host': '127.0.0.1',
'user': 'root',
'password': 'password',
'database': 'abtest',
'port': 3306,
'charset': 'utf8',
'raise_on_warnings': True
} | 16.769231 | 29 | 0.56422 |
d110619c61ac01291c0faea165e4961df18c5b74 | 438 | py | Python | IVTp/2014/Shcherbakov_R_A/task_06_22.py | YukkaSarasti/pythonintask | eadf4245abb65f4400a3bae30a4256b4658e009c | [
"Apache-2.0"
] | null | null | null | IVTp/2014/Shcherbakov_R_A/task_06_22.py | YukkaSarasti/pythonintask | eadf4245abb65f4400a3bae30a4256b4658e009c | [
"Apache-2.0"
] | null | null | null | IVTp/2014/Shcherbakov_R_A/task_06_22.py | YukkaSarasti/pythonintask | eadf4245abb65f4400a3bae30a4256b4658e009c | [
"Apache-2.0"
] | null | null | null | # Задача 6. Вариант 22.
# Создайте игру, в которой компьютер загадывает имена двух братьев, легендарных
# основателей Рима, а игрок должен его угадать.
# Щербаков Р.А.
# 22.05.2016
import random
print("Комп загадал имя одного из двух братьев основавшие рим, попробуй угадать что ли")
name='Рем', 'Ромул'
rand=random.r... | 24.333333 | 88 | 0.730594 |
7e466f0e585402604a326ef44129c54792a01271 | 34,131 | py | Python | repo/script.video.F4mProxy/lib/TSDownloader.py | dbiesecke/dbiesecke.github.io | 5894473591f078fd22d1cb33794c5e656ae9b8dd | [
"MIT"
] | 1 | 2017-11-26T18:18:46.000Z | 2017-11-26T18:18:46.000Z | repo/script.video.F4mProxy/lib/TSDownloader.py | dbiesecke/dbiesecke.github.io | 5894473591f078fd22d1cb33794c5e656ae9b8dd | [
"MIT"
] | null | null | null | repo/script.video.F4mProxy/lib/TSDownloader.py | dbiesecke/dbiesecke.github.io | 5894473591f078fd22d1cb33794c5e656ae9b8dd | [
"MIT"
] | 3 | 2019-09-30T19:52:05.000Z | 2020-04-12T21:20:56.000Z |
import xml.etree.ElementTree as etree
import base64
from struct import unpack, pack
import sys
import io
import os
import time
import itertools
import xbmcaddon
import xbmc
import urllib2,urllib
import traceback
import urlparse
import posixpath
import re
import socket, struct
from flvlib import tags... | 46.563438 | 157 | 0.401102 |
7e9559f8b3ee8ad78d3a0c8a3709ca8b4c82f759 | 413 | py | Python | exercises/pt/exc_01_09.py | Jette16/spacy-course | 32df0c8f6192de6c9daba89740a28c0537e4d6a0 | [
"MIT"
] | 2,085 | 2019-04-17T13:10:40.000Z | 2022-03-30T21:51:46.000Z | exercises/pt/exc_01_09.py | Jette16/spacy-course | 32df0c8f6192de6c9daba89740a28c0537e4d6a0 | [
"MIT"
] | 79 | 2019-04-18T14:42:55.000Z | 2022-03-07T08:15:43.000Z | exercises/pt/exc_01_09.py | Jette16/spacy-course | 32df0c8f6192de6c9daba89740a28c0537e4d6a0 | [
"MIT"
] | 361 | 2019-04-17T13:34:32.000Z | 2022-03-28T04:42:45.000Z | import spacy
nlp = spacy.load("en_core_web_sm")
text = "Upcoming iPhone X release date leaked as Apple reveals pre-orders"
# Processar o texto
doc = ____
# Iterar nas entidades previstas
for ____ in ____.____:
# Print the entity text and label
print(____.____, ____.____)
# Selecionar a partição para "iPhon... | 20.65 | 74 | 0.738499 |
7eb3c6effb8eda4413b82232c4c0fff2778a0111 | 4,117 | py | Python | marsyas-vamp/marsyas/scripts/large-evaluators/make-tempo-distortions.py | jaouahbi/VampPlugins | 27c2248d1c717417fe4d448cdfb4cb882a8a336a | [
"Apache-2.0"
] | null | null | null | marsyas-vamp/marsyas/scripts/large-evaluators/make-tempo-distortions.py | jaouahbi/VampPlugins | 27c2248d1c717417fe4d448cdfb4cb882a8a336a | [
"Apache-2.0"
] | null | null | null | marsyas-vamp/marsyas/scripts/large-evaluators/make-tempo-distortions.py | jaouahbi/VampPlugins | 27c2248d1c717417fe4d448cdfb4cb882a8a336a | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/env python
import sys
import os.path
import scipy.io.wavfile
DEBUG = False
#DEBUG = True
DISTORTIONS = [
("distorted", """
sox \"%(infile)s\" -r8000 /tmp/0_r8000.wav rate
sox /tmp/0_r8000.wav -r8000 /tmp/1_gsm.gsm
sox /tmp/1_gsm.gsm -r44100 -s /tmp/2_gsm-post.wav rate
sox /tmp/2_gsm-post.wav /tmp/3_f... | 32.417323 | 144 | 0.631528 |
0e9e5127f22036ec35950cd3ecfb40f082ea6cff | 2,007 | py | Python | 2019/finals/web-gphotos-finals/app/gallery/views.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/web-gphotos-finals/app/gallery/views.py | iicarus-bit/google-ctf | 4eb8742bca58ff071ff8f6814d41d9ec7eb1db4b | [
"Apache-2.0"
] | 20 | 2019-07-23T15:29:32.000Z | 2022-01-21T12:53:04.000Z | 2019/finals/web-gphotos-finals/app/gallery/views.py | iicarus-bit/google-ctf | 4eb8742bca58ff071ff8f6814d41d9ec7eb1db4b | [
"Apache-2.0"
] | 449 | 2018-05-09T05:54:05.000Z | 2022-03-30T14:54:18.000Z | # Copyright 2019 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# https://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, ... | 30.876923 | 74 | 0.697559 |
7eee8eef730e5e638dd69786ab2c0491d0db6d70 | 3,136 | py | Python | apps/trainer/trainer.py | Obyoxar/RobolabStatistics | 08343ca3ac49df7efdac33692d7cc4b783e851f5 | [
"MIT"
] | 2 | 2017-11-30T21:12:11.000Z | 2017-12-01T07:52:43.000Z | apps/trainer/trainer.py | Obyoxar/RobolabStatistics | 08343ca3ac49df7efdac33692d7cc4b783e851f5 | [
"MIT"
] | 14 | 2017-11-14T18:12:53.000Z | 2018-06-03T16:07:57.000Z | apps/trainer/trainer.py | Obyoxar/RobolabStatistics | 08343ca3ac49df7efdac33692d7cc4b783e851f5 | [
"MIT"
] | 3 | 2018-02-05T10:40:03.000Z | 2018-02-09T09:29:19.000Z | from robolib.networks.erianet import Erianet
from tensorflow.python.client import device_lib
import os
import argparse
import importlib
from robolib.util.model_uuid import get_model_identifier
import robolib.datamanager.datadir as datadir
import time
__ROBOLIB_CONFIG_PACKAGE = "robolib.networks.configurations"
MODEL_E... | 41.813333 | 111 | 0.665179 |
3806b95cebf5c252fdb0b0314b6385df11a8f6f8 | 478 | py | Python | Packs/MalwareInvestigationAndResponse/Scripts/ReadNetstatFileWrapper/ReadNetstatFileWrapper.py | jrauen/content | 81a92be1cbb053a5f26a6f325eff3afc0ca840e0 | [
"MIT"
] | null | null | null | Packs/MalwareInvestigationAndResponse/Scripts/ReadNetstatFileWrapper/ReadNetstatFileWrapper.py | jrauen/content | 81a92be1cbb053a5f26a6f325eff3afc0ca840e0 | [
"MIT"
] | 40 | 2022-03-03T07:34:00.000Z | 2022-03-31T07:38:35.000Z | Packs/MalwareInvestigationAndResponse/Scripts/ReadNetstatFileWrapper/ReadNetstatFileWrapper.py | jrauen/content | 81a92be1cbb053a5f26a6f325eff3afc0ca840e0 | [
"MIT"
] | null | null | null | from CommonServerPython import *
def main():
try:
if 'CrowdStrike' in demisto.context():
return_results(demisto.executeCommand('ReadNetstatFile', {}))
else:
return_results('No data on Netstat found')
except Exception as e:
demisto.error(traceback.format_exc()) ... | 28.117647 | 95 | 0.658996 |
381b77ed8179aacd2accc8f4198140887898fd7f | 4,220 | py | Python | MAIN/STM32F405_C/NORMAL/history/V28/x.py | ozturkahmetcevdet/VSenst | 07c068fefcbd66ae4d8ec0480b4da10d6b5c7410 | [
"MIT"
] | null | null | null | MAIN/STM32F405_C/NORMAL/history/V28/x.py | ozturkahmetcevdet/VSenst | 07c068fefcbd66ae4d8ec0480b4da10d6b5c7410 | [
"MIT"
] | null | null | null | MAIN/STM32F405_C/NORMAL/history/V28/x.py | ozturkahmetcevdet/VSenst | 07c068fefcbd66ae4d8ec0480b4da10d6b5c7410 | [
"MIT"
] | null | null | null | import gc
from micropython import const
from pyb import Pin, SPI
import time
RF_RECEIVER = const(0)
RF_SYNTHESIZER = const(1)
RF_STANDBY = const(2)
RF_SLEEP = const(3)
RF_STOP = const(0x01)
RF_BUSY ... | 56.266667 | 109 | 0.369905 |
38c0da334b77a60ad9f15a46086737c0b80329dc | 12,110 | py | Python | research/cv/faceboxes/src/network.py | leelige/mindspore | 5199e05ba3888963473f2b07da3f7bca5b9ef6dc | [
"Apache-2.0"
] | 77 | 2021-10-15T08:32:37.000Z | 2022-03-30T13:09:11.000Z | research/cv/faceboxes/src/network.py | leelige/mindspore | 5199e05ba3888963473f2b07da3f7bca5b9ef6dc | [
"Apache-2.0"
] | 3 | 2021-10-30T14:44:57.000Z | 2022-02-14T06:57:57.000Z | research/cv/faceboxes/src/network.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... | 47.304688 | 115 | 0.567547 |
2db47e5b90fb3cb5da449aa0b616a32bf30fc6bd | 39,746 | py | Python | MachineTranslation/lib/data_generator/tf_data_prepare_xrh.py | Xinrihui/DeepLearningApp | 8d86b88251ee8d37358c642b1ec4a341767bfd17 | [
"Apache-2.0"
] | 2 | 2021-08-25T01:13:29.000Z | 2021-10-10T14:49:59.000Z | MachineTranslation/lib/data_generator/tf_data_prepare_xrh.py | Xinrihui/DeepLearningApp | 8d86b88251ee8d37358c642b1ec4a341767bfd17 | [
"Apache-2.0"
] | null | null | null | MachineTranslation/lib/data_generator/tf_data_prepare_xrh.py | Xinrihui/DeepLearningApp | 8d86b88251ee8d37358c642b1ec4a341767bfd17 | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/python
# -*- coding: UTF-8 -*-
import os
import numpy as np
from tqdm import tqdm
import pickle
import re
from collections import *
import string
import configparser
import tensorflow_text as tf_text
from tensorflow_text.tools.wordpiece_vocab import bert_vocab_from_dataset as bert_vocab
from lib.data_gene... | 38.439072 | 136 | 0.615584 |
fabdc89eae61438f4cdf804d6b81f846c3003f69 | 462 | py | Python | StarCTF/2021/web/oh-my-socket/source/client/client/client.py | mystickev/ctf-archives | 89e99a5cd5fb6b2923cad3fe1948d3ff78649b4e | [
"MIT"
] | 91 | 2021-01-21T07:37:47.000Z | 2021-11-18T03:08:58.000Z | StarCTF/2021/web/oh-my-socket/source/client/client/client.py | ruhan-islam/ctf-archives | 8c2bf6a608c821314d1a1cfaa05a6cccef8e3103 | [
"MIT"
] | 2 | 2021-01-22T01:21:19.000Z | 2021-01-22T18:29:33.000Z | StarCTF/2021/web/oh-my-socket/source/client/client/client.py | ruhan-islam/ctf-archives | 8c2bf6a608c821314d1a1cfaa05a6cccef8e3103 | [
"MIT"
] | 13 | 2021-01-21T10:11:19.000Z | 2021-03-14T13:10:49.000Z | from socket import *
from requests.exceptions import *
HOST = '172.21.0.2'
PORT = 21587
BUFSIZ =1024
ADDR = (HOST,PORT)
tcpCliSock = socket(AF_INET,SOCK_STREAM)
tcpCliSock.bind(('172.21.0.3',7775))
tcpCliSock.connect(ADDR)
while True:
try:
data1 = tcpCliSock.recv(BUFSIZ)
if not data1:
... | 21 | 40 | 0.645022 |
ea06ad1cfda514be93e28ee86fd7ba1d357a1202 | 4,402 | py | Python | HackTon/cupp/test_cupp.py | GitInitDev/ZohoUniv | 966704837e65f58b52492b56d08e7958df3d220a | [
"Unlicense"
] | 1 | 2020-06-19T13:22:18.000Z | 2020-06-19T13:22:18.000Z | test_cupp.py | trickytech99/instacrack | d96e5b5fc08e456ad795a009cdb0b3369211bda0 | [
"MIT"
] | null | null | null | test_cupp.py | trickytech99/instacrack | d96e5b5fc08e456ad795a009cdb0b3369211bda0 | [
"MIT"
] | 1 | 2020-06-19T13:22:21.000Z | 2020-06-19T13:22:21.000Z | #!/usr/bin/env python3
#
# [Program]
#
# CUPP - Common User Passwords Profiler
#
# [Author]
#
# Mebus, https://github.com/Mebus/
#
# [License]
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Found... | 28.4 | 80 | 0.576783 |
ea22890f4e115d102c10392ebc96ff704e868f79 | 282 | py | Python | 0-notes/job-search/Cracking the Coding Interview/C06MathLogicPuzzles/questions/6.8-question.py | eengineergz/Lambda | 1fe511f7ef550aed998b75c18a432abf6ab41c5f | [
"MIT"
] | null | null | null | 0-notes/job-search/Cracking the Coding Interview/C06MathLogicPuzzles/questions/6.8-question.py | eengineergz/Lambda | 1fe511f7ef550aed998b75c18a432abf6ab41c5f | [
"MIT"
] | null | null | null | 0-notes/job-search/Cracking the Coding Interview/C06MathLogicPuzzles/questions/6.8-question.py | eengineergz/Lambda | 1fe511f7ef550aed998b75c18a432abf6ab41c5f | [
"MIT"
] | null | null | null | # 6.8 The Egg Drop Problem
# There is a building of 100 floors.
# If an egg drops from the Nth floor or above, it will break.
# If it's dropped from any floor below, it will not break.
# You're given two eggs.
# Find N, while minimizing the number of drops for the worst case.
| 35.25 | 66 | 0.716312 |
52c2855550bb629e916a41eb6187f93026bb5a5a | 214 | py | Python | project/views/organization.py | DanielGrams/gsevp | e94034f7b64de76f38754b56455e83092378261f | [
"MIT"
] | 1 | 2021-06-01T14:49:18.000Z | 2021-06-01T14:49:18.000Z | project/views/organization.py | DanielGrams/gsevp | e94034f7b64de76f38754b56455e83092378261f | [
"MIT"
] | 286 | 2020-12-04T14:13:00.000Z | 2022-03-09T19:05:16.000Z | project/views/organization.py | DanielGrams/gsevpt | a92f71694388e227e65ed1b24446246ee688d00e | [
"MIT"
] | null | null | null | from flask import render_template
from project import app
@app.route("/organizations")
@app.route("/organizations/<path:path>")
def organizations(path=None):
return render_template("organization/main.html")
| 21.4 | 52 | 0.771028 |
5e2dda3698066b859a2e6f23612b953606e510c5 | 7,001 | py | Python | abfahrt/testutils/test_generator/test_generator.py | Team-Zugig-zum-Erfolg/InformatiCup | 788076ac38bf6d8f462465b7fb96db14d13bed30 | [
"MIT"
] | 1 | 2022-01-30T14:30:02.000Z | 2022-01-30T14:30:02.000Z | abfahrt/testutils/test_generator/test_generator.py | Team-Zugig-zum-Erfolg/InformatiCup | 788076ac38bf6d8f462465b7fb96db14d13bed30 | [
"MIT"
] | null | null | null | abfahrt/testutils/test_generator/test_generator.py | Team-Zugig-zum-Erfolg/InformatiCup | 788076ac38bf6d8f462465b7fb96db14d13bed30 | [
"MIT"
] | null | null | null | import subprocess
# The subprocess module allows you to spawn new processes, connect to their input/output/error pipes, and obtain their return codes. This module intends to replace several older modules and functions. (https://docs.python.org/3/library/subprocess.html)
import argparse
# The argparse module makes it e... | 44.592357 | 384 | 0.511784 |
eae4e36588ddbb12b4d5315e0f95c9b66cd0c118 | 1,213 | py | Python | pyconuk/migrations/0004_sponsor.py | PyconUK/2017.pyconuk.org | 337a00c034a15e5b41a8ea8683dd44310e14fb9c | [
"MIT"
] | 3 | 2017-10-24T13:33:29.000Z | 2017-10-30T10:47:28.000Z | pyconuk/migrations/0004_sponsor.py | PyconUK/2017.pyconuk.org | 337a00c034a15e5b41a8ea8683dd44310e14fb9c | [
"MIT"
] | 78 | 2017-02-14T16:49:58.000Z | 2018-04-19T06:28:42.000Z | pyconuk/migrations/0004_sponsor.py | PyconUK/2017.pyconuk.org | 337a00c034a15e5b41a8ea8683dd44310e14fb9c | [
"MIT"
] | 36 | 2017-06-19T07:48:38.000Z | 2018-01-19T11:08:10.000Z | # -*- coding: utf-8 -*-
# Generated by Django 1.9.7 on 2017-09-24 14:10
from __future__ import unicode_literals
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('pyconuk', '0003_redirection'),
]
operations = [
migrations.CreateModel(
... | 36.757576 | 155 | 0.560594 |
f496b7f0aafe36b30b9d833a098c2a46431d02bf | 630 | py | Python | kiosk/queries.py | AndiBr/ffksk | ff4bc4ad26d4571eaa1a6ff815b2e6a876f8ba99 | [
"MIT"
] | null | null | null | kiosk/queries.py | AndiBr/ffksk | ff4bc4ad26d4571eaa1a6ff815b2e6a876f8ba99 | [
"MIT"
] | 14 | 2018-09-12T06:59:55.000Z | 2020-02-26T07:17:48.000Z | kiosk/queries.py | AndiBr/ffksk | ff4bc4ad26d4571eaa1a6ff815b2e6a876f8ba99 | [
"MIT"
] | null | null | null | from django.conf import settings
from django.db import connection
def readFromDatabase(fileToQuery, queryArgumentList=[]):
dbInUse = getattr(settings,'DB_IN_USE') # 'Postgre','SQLite'
BASE_DIR = getattr(settings,'BASE_DIR')
fileName = BASE_DIR + "/kiosk/queries/" + fileToQuery + "_" + dbInUse + ".sql"
# Hier sol... | 30 | 79 | 0.728571 |
8030b7bc1456f16a82d67b6137d7e71ea66da287 | 8,289 | py | Python | Co-Simulation/Sumo/sumo-1.7.0/tools/turn-defs/connections.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/turn-defs/connections.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/turn-defs/connections.py | uruzahe/carla | 940c2ab23cce1eda1ef66de35f66b42d40865fb1 | [
"MIT"
] | 1 | 2020-11-20T19:31:26.000Z | 2020-11-20T19:31:26.000Z | # -*- coding: utf-8 -*-
# Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo
# Copyright (C) 2011-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.... | 39.28436 | 84 | 0.631439 |
33e8ca18f9832b3f925d41746e3748bb53d09d6c | 4,566 | py | Python | Liquid-job-benchmarks/scripts/scripts/tf_cnn_benchmarks/ssd_constants.py | PasaLab/YAO | 2e70203197cd79f9522d65731ee5dc0eb236b005 | [
"Apache-2.0"
] | 2 | 2021-08-30T14:12:09.000Z | 2022-01-20T02:14:22.000Z | Liquid-job-benchmarks/scripts/scripts/tf_cnn_benchmarks/ssd_constants.py | PasaLab/YAO | 2e70203197cd79f9522d65731ee5dc0eb236b005 | [
"Apache-2.0"
] | null | null | null | Liquid-job-benchmarks/scripts/scripts/tf_cnn_benchmarks/ssd_constants.py | PasaLab/YAO | 2e70203197cd79f9522d65731ee5dc0eb236b005 | [
"Apache-2.0"
] | null | null | null | # Copyright 2018 Google. 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 ... | 38.369748 | 95 | 0.52212 |
6348bfa2a1bb9ecd36eca10fda3918b55fa8d21b | 5,118 | py | Python | 20-fs-ias-lec/groups/09-loraSense/SenseLink/LoRaSense - Sensor/lib/senselink.py | Kyrus1999/BACnet | 5be8e1377252166041bcd0b066cce5b92b077d06 | [
"MIT"
] | 8 | 2020-03-17T21:12:18.000Z | 2021-12-12T15:55:54.000Z | 20-fs-ias-lec/groups/09-loraSense/SenseLink/LoRaSense - Sensor/lib/senselink.py | Kyrus1999/BACnet | 5be8e1377252166041bcd0b066cce5b92b077d06 | [
"MIT"
] | 2 | 2021-07-19T06:18:43.000Z | 2022-02-10T12:17:58.000Z | 20-fs-ias-lec/groups/09-loraSense/SenseLink/LoRaSense - Sensor/lib/senselink.py | Kyrus1999/BACnet | 5be8e1377252166041bcd0b066cce5b92b077d06 | [
"MIT"
] | 25 | 2020-03-20T09:32:45.000Z | 2021-07-18T18:12:59.000Z | from machine import I2C, ADC, RTC
from network import WLAN
import bme280 as bme280
import time
import sys
import pycom
import _thread
class SenseLink:
"""
Class object that receives optional pin arguments for the SDA-pin (Serial Data), the SCL-pin (Serial Clock) and the
pin for the photometry module. The ... | 37.632353 | 141 | 0.574052 |
9826d8c82f7c4b47ea4fa28308b1a7878ae75cd6 | 6,404 | py | Python | code/pfse2.py | lcordier/pfse | 27db9329d12bc804fa322446c14c59fe8f814264 | [
"MIT"
] | null | null | null | code/pfse2.py | lcordier/pfse | 27db9329d12bc804fa322446c14c59fe8f814264 | [
"MIT"
] | null | null | null | code/pfse2.py | lcordier/pfse | 27db9329d12bc804fa322446c14c59fe8f814264 | [
"MIT"
] | null | null | null | #!/usr/bin/env python
"""
https://www.labri.fr/perso/nrougier/teaching/numpy/numpy.html
"""
import hashlib
import math
import matplotlib
matplotlib.use('Agg')
import matplotlib.animation as manimation
import matplotlib.pyplot as plt
import numpy as np
HEX2BIN = {
'0': '0000',
'1': '0001',
'2': '0010'... | 25.822581 | 114 | 0.588226 |
f68886bfdf7a320e46fa67404552979b38071477 | 1,726 | py | Python | app/models/abtms/StudentStatement.py | nucleo-de-telessaude-do-maranhao/abtms | 8d1b1df223d9f07fc4447836011f3e3678625d59 | [
"MIT"
] | null | null | null | app/models/abtms/StudentStatement.py | nucleo-de-telessaude-do-maranhao/abtms | 8d1b1df223d9f07fc4447836011f3e3678625d59 | [
"MIT"
] | null | null | null | app/models/abtms/StudentStatement.py | nucleo-de-telessaude-do-maranhao/abtms | 8d1b1df223d9f07fc4447836011f3e3678625d59 | [
"MIT"
] | 1 | 2019-03-13T14:34:24.000Z | 2019-03-13T14:34:24.000Z | from app.models.auth.DatabaseFactory import DatabaseFactory
class StudentStatement():
def __init__(self, user=None, path="", createdAt=""):
self.user = user
self.path = path
self.createdAt = createdAt
self.connection = DatabaseFactory().getConnection()
def create(self):
try:
with self.... | 26.553846 | 130 | 0.643105 |
4efde3009acf700f8beaec62efaa98339a1acee8 | 422 | py | Python | balsn-2021-writeup/alldata/crypto/1337pins/dist/deploy/src/server.py | Jimmy01240397/balsn-2021-writeup | 91b71dfbddc1c214552280b12979a82ee1c3cb7e | [
"MIT"
] | null | null | null | balsn-2021-writeup/alldata/crypto/1337pins/dist/deploy/src/server.py | Jimmy01240397/balsn-2021-writeup | 91b71dfbddc1c214552280b12979a82ee1c3cb7e | [
"MIT"
] | null | null | null | balsn-2021-writeup/alldata/crypto/1337pins/dist/deploy/src/server.py | Jimmy01240397/balsn-2021-writeup | 91b71dfbddc1c214552280b12979a82ee1c3cb7e | [
"MIT"
] | null | null | null | #!/usr/local/bin/python3 -u
import signal
import random
#signal.alarm(600)
N = 1337
remaining = N
for i in range(31337):
now = random.getrandbits(32)
print(now);
y = now % 10
x = int(input())
if x == y:
remaining -= 1
print('.')
else:
remaining = N
print(y)
... | 15.071429 | 36 | 0.514218 |
21030abcbbbe7aae62d5d557d23d52c4e4d5939a | 3,657 | py | Python | tests/test_userinfo.py | goosechooser/benwaonline | e2879412aa6c3c230d25cd60072445165517b6b6 | [
"MIT"
] | null | null | null | tests/test_userinfo.py | goosechooser/benwaonline | e2879412aa6c3c230d25cd60072445165517b6b6 | [
"MIT"
] | 16 | 2017-09-13T10:21:40.000Z | 2020-06-01T04:32:22.000Z | tests/test_userinfo.py | goosechooser/benwaonline | e2879412aa6c3c230d25cd60072445165517b6b6 | [
"MIT"
] | null | null | null | import pytest
import requests_mock
from marshmallow import pprint
from flask import url_for, render_template, current_app, json
from benwaonline import mappers
from benwaonline.entities import User, Post, Comment, Tag
from benwaonline.userinfo.views import show_user, show_comments, combine_tags
from benwaonline.excepti... | 42.523256 | 94 | 0.679519 |
2c7d5727e14398da4d67b485b0ddf96bf604d630 | 4,874 | py | Python | apps/materialize/templatetags/materialize.py | OpenAdaptronik/Rattler | c3bdde0ca56b6d77f49bc830fa2b8bb41a26bae4 | [
"MIT"
] | 2 | 2018-05-18T08:38:29.000Z | 2018-05-22T08:26:09.000Z | apps/materialize/templatetags/materialize.py | IT-PM-OpenAdaptronik/Webapp | c3bdde0ca56b6d77f49bc830fa2b8bb41a26bae4 | [
"MIT"
] | 118 | 2017-10-31T13:45:09.000Z | 2018-02-24T20:51:42.000Z | apps/materialize/templatetags/materialize.py | OpenAdaptronik/Rattler | c3bdde0ca56b6d77f49bc830fa2b8bb41a26bae4 | [
"MIT"
] | null | null | null | from functools import wraps
from django import template
from django.forms.fields import TextInput
from django.utils import html
from django.utils.translation import gettext_lazy as _
register = template.Library()
def append_attr(field, attr_name, attr_value):
if field.field.widget.attrs.get(attr_name, False):
... | 29.719512 | 89 | 0.643414 |
46c13ac4fdd0649b86a009200d1b242530028452 | 597 | py | Python | LIT/2021/crypto/Leftovers/Leftovers.py | ruhan-islam/ctf-archives | 8c2bf6a608c821314d1a1cfaa05a6cccef8e3103 | [
"MIT"
] | 1 | 2021-11-02T20:53:58.000Z | 2021-11-02T20:53:58.000Z | LIT/2021/crypto/Leftovers/Leftovers.py | ruhan-islam/ctf-archives | 8c2bf6a608c821314d1a1cfaa05a6cccef8e3103 | [
"MIT"
] | null | null | null | LIT/2021/crypto/Leftovers/Leftovers.py | ruhan-islam/ctf-archives | 8c2bf6a608c821314d1a1cfaa05a6cccef8e3103 | [
"MIT"
] | null | null | null | import random
import binascii
import math
import sympy
random.seed(1337)
class PRNG:
def __init__(self,seed):
self.seed = seed;
self.L = 1;
# Returns a random number between [0,x)
def rand(self,x):
return self.seed % sympy.prevprime(x);
def str2Dec(str):
return int(binascii.hexlify(str.en... | 17.558824 | 55 | 0.631491 |
649f91ec8803c0b91d22b18617fefaca4a379eba | 3,682 | py | Python | pythonBot/testMsgParser.py | tabacha/WoIstDerWagen | feddaedbde494e9e0983f6a2c34b6b5c65a6ed23 | [
"Apache-2.0"
] | 5 | 2016-06-27T07:37:16.000Z | 2018-04-18T12:09:39.000Z | pythonBot/testMsgParser.py | tabacha/WoIstDerWagen | feddaedbde494e9e0983f6a2c34b6b5c65a6ed23 | [
"Apache-2.0"
] | 21 | 2016-06-26T09:46:25.000Z | 2020-02-23T11:08:35.000Z | pythonBot/testMsgParser.py | tabacha/WoIstDerWagen | feddaedbde494e9e0983f6a2c34b6b5c65a6ed23 | [
"Apache-2.0"
] | null | null | null |
import msgParse
import logging
import unittest
log = logging.getLogger(__name__)
def testParse(msg, zugArt, zugNr, bahnhof, waggonNr):
(zugArtParse, zugNrParse, bahnhofParse, waggonNrParse) = msgParse.parseMsg(msg)
if (not((zugArtParse == zugArt) and (zugNrParse == zugNr) and (bahnhofParse == bahnhof) and (wa... | 51.138889 | 198 | 0.629549 |
b3e5c9ef0d3c18db5fc496ba68ed28a681e03905 | 3,395 | py | Python | packages/watchmen-pipeline-kernel/src/watchmen_pipeline_kernel/pipeline_schema/compiled_stage.py | Indexical-Metrics-Measure-Advisory/watchmen | c54ec54d9f91034a38e51fd339ba66453d2c7a6d | [
"MIT"
] | null | null | null | packages/watchmen-pipeline-kernel/src/watchmen_pipeline_kernel/pipeline_schema/compiled_stage.py | Indexical-Metrics-Measure-Advisory/watchmen | c54ec54d9f91034a38e51fd339ba66453d2c7a6d | [
"MIT"
] | null | null | null | packages/watchmen-pipeline-kernel/src/watchmen_pipeline_kernel/pipeline_schema/compiled_stage.py | Indexical-Metrics-Measure-Advisory/watchmen | c54ec54d9f91034a38e51fd339ba66453d2c7a6d | [
"MIT"
] | null | null | null | from logging import getLogger
from traceback import format_exc
from typing import List
from watchmen_auth import PrincipalService
from watchmen_data_kernel.storage_bridge import now, parse_prerequisite_defined_as, parse_prerequisite_in_memory, \
PipelineVariables, spent_ms
from watchmen_model.admin import Pipeline, P... | 38.146067 | 115 | 0.797644 |
45610ed5a733932d850ff7dd1034a8beb5de847c | 387 | py | Python | frappe-bench/apps/erpnext/erpnext/patches/v9_0/update_multi_uom_fields_in_material_request.py | Semicheche/foa_frappe_docker | a186b65d5e807dd4caf049e8aeb3620a799c1225 | [
"MIT"
] | 1 | 2021-04-29T14:55:29.000Z | 2021-04-29T14:55:29.000Z | frappe-bench/apps/erpnext/erpnext/patches/v9_0/update_multi_uom_fields_in_material_request.py | Semicheche/foa_frappe_docker | a186b65d5e807dd4caf049e8aeb3620a799c1225 | [
"MIT"
] | null | null | null | frappe-bench/apps/erpnext/erpnext/patches/v9_0/update_multi_uom_fields_in_material_request.py | Semicheche/foa_frappe_docker | a186b65d5e807dd4caf049e8aeb3620a799c1225 | [
"MIT"
] | 1 | 2021-04-29T14:39:01.000Z | 2021-04-29T14:39:01.000Z | # Copyright (c) 2017, Frappe and Contributors
# License: GNU General Public License v3. See license.txt
from __future__ import unicode_literals
import frappe
def execute():
frappe.reload_doctype('Material Request')
frappe.reload_doctype('Material Request Item')
frappe.db.sql(""" update `tabMaterial Request Item`
... | 32.25 | 67 | 0.767442 |
ff58e4f528c29a3f351686bbae46620cfc8ca0b9 | 2,945 | py | Python | one_cycle_scheduler.py | henrique/jigsaw20 | 5d12de807667810ea9b9bdb9cbccebabea7ed21d | [
"Apache-2.0"
] | 8 | 2020-06-23T13:42:34.000Z | 2022-01-25T11:00:01.000Z | one_cycle_scheduler.py | henrique/jigsaw20 | 5d12de807667810ea9b9bdb9cbccebabea7ed21d | [
"Apache-2.0"
] | null | null | null | one_cycle_scheduler.py | henrique/jigsaw20 | 5d12de807667810ea9b9bdb9cbccebabea7ed21d | [
"Apache-2.0"
] | 3 | 2020-06-24T03:18:26.000Z | 2020-07-30T01:22:53.000Z | import numpy as np
import matplotlib.pyplot as plt
import tensorflow as tf
from tensorflow.keras.callbacks import Callback
class CosineAnnealer:
def __init__(self, start, end, steps):
self.start = start
self.end = end
self.steps = steps
self.n = 0
def step(self):
... | 31 | 121 | 0.598302 |
44910f5b02ddef90c6245aec5360ad1039c301ca | 4,676 | py | Python | src/ingestion/transformers/monosi/monitors.py | monosidev/monosi | a88b689fc74010b10dbabb32f4b2bdeae865f4d5 | [
"Apache-2.0"
] | 156 | 2021-11-19T18:50:14.000Z | 2022-03-31T19:48:59.000Z | src/ingestion/transformers/monosi/monitors.py | monosidev/monosi | a88b689fc74010b10dbabb32f4b2bdeae865f4d5 | [
"Apache-2.0"
] | 30 | 2021-12-27T19:30:56.000Z | 2022-03-30T17:49:00.000Z | src/ingestion/transformers/monosi/monitors.py | monosidev/monosi | a88b689fc74010b10dbabb32f4b2bdeae865f4d5 | [
"Apache-2.0"
] | 14 | 2022-01-17T23:24:34.000Z | 2022-03-29T09:27:47.000Z | from ingestion.transformers.base import Transformer#, JSONTransformer
# class MonitorTransformer(JSONTransformer):
# @classmethod
# def _mapped_schema(cls):
# return '.rows | .[] | { "table_name": .NAME, "database": .DATABASE, "schema": .SCHEMA, "timestamp_field": .TIMESTAMP_FIELD, "type": "table_healt... | 32.248276 | 159 | 0.356074 |
927e876f1520b3e3c09b582df9940923a89e4317 | 1,809 | py | Python | nz_crawl_demo/day8/wh1904/wh1904/pipelines.py | gaohj/nzflask_bbs | 36a94c380b78241ed5d1e07edab9618c3e8d477b | [
"Apache-2.0"
] | null | null | null | nz_crawl_demo/day8/wh1904/wh1904/pipelines.py | gaohj/nzflask_bbs | 36a94c380b78241ed5d1e07edab9618c3e8d477b | [
"Apache-2.0"
] | 27 | 2020-02-12T07:55:58.000Z | 2022-03-12T00:19:09.000Z | nz_crawl_demo/day8/wh1904/wh1904/pipelines.py | gaohj/nzflask_bbs | 36a94c380b78241ed5d1e07edab9618c3e8d477b | [
"Apache-2.0"
] | 2 | 2020-02-18T01:54:55.000Z | 2020-02-21T11:36:28.000Z | # -*- coding: utf-8 -*-
# Define your item pipelines here
#
# Don't forget to add your pipeline to the ITEM_PIPELINES setting
# See: https://docs.scrapy.org/en/latest/topics/item-pipeline.html
# import json
# class Wh1904Pipeline(object):
# def __init__(self):
# self.fp = open('budejie.json','w',encoding=... | 32.890909 | 91 | 0.632394 |
2bb4ab8343ed7b28486c680ee74c5757add73af4 | 4,111 | py | Python | CLI Tools/sendToPyCSW.py | Geosoft2/Geosoftware-II-AALLH | bdb61d9a1111b9082ec2b9f309998c5f2166975e | [
"MIT"
] | null | null | null | CLI Tools/sendToPyCSW.py | Geosoft2/Geosoftware-II-AALLH | bdb61d9a1111b9082ec2b9f309998c5f2166975e | [
"MIT"
] | 38 | 2018-10-24T08:51:58.000Z | 2021-12-13T19:54:39.000Z | CLI Tools/sendToPyCSW.py | Geosoft2/Geosoftware-II-AALLH | bdb61d9a1111b9082ec2b9f309998c5f2166975e | [
"MIT"
] | 12 | 2018-10-24T08:20:13.000Z | 2019-08-12T08:10:14.000Z | '''
Created on 15.01.2018
@author: Henry Fock, Anika Graupner
'''
import click
import time as timeModule
import requests
import os
from geodataExtent import getBoundingBox as box
from geodataExtent import getTimeExtent as timeext
# asking for parameters in command line
@click.command()
@click.option('--path', promp... | 34.838983 | 343 | 0.636828 |
2bec4c505dd20f9f58bd4d6d24115fc22190291f | 425 | py | Python | prime.py | Bertik23/spg | f6449f1ca8f3a869f0f493f3988b3d84901c1be0 | [
"MIT"
] | null | null | null | prime.py | Bertik23/spg | f6449f1ca8f3a869f0f493f3988b3d84901c1be0 | [
"MIT"
] | null | null | null | prime.py | Bertik23/spg | f6449f1ca8f3a869f0f493f3988b3d84901c1be0 | [
"MIT"
] | null | null | null | import time
def prime(num):
start = time.time()
primes = []
if num >= 3:
primes.append(2)
for n in range(3, num, 2):
p = True
for prime in primes:
# print(prime)
if n % prime == 0:
p = False
break
if p:
... | 17 | 30 | 0.461176 |
5b59c19e31a6f162df200f4f938d3caa704d38cb | 8,159 | py | Python | Anime/mudae_cogs/waifus.py | austinmh12/DiscordBots | 55550b68a7ad6423de55e62dbbff93fd88f08ff2 | [
"MIT"
] | null | null | null | Anime/mudae_cogs/waifus.py | austinmh12/DiscordBots | 55550b68a7ad6423de55e62dbbff93fd88f08ff2 | [
"MIT"
] | null | null | null | Anime/mudae_cogs/waifus.py | austinmh12/DiscordBots | 55550b68a7ad6423de55e62dbbff93fd88f08ff2 | [
"MIT"
] | null | null | null | from datetime import datetime as dt, timedelta as td
from discord.ext import commands
import asyncio
from . import *
import logging
import re
import pandas as pd
log = logging.getLogger(__name__)
log.setLevel(logging.INFO)
stream_handler = logging.StreamHandler()
stream_format = logging.Formatter('[%(asctime)s - %(lev... | 36.262222 | 107 | 0.672999 |
5b7287aa8303e0c938752ad05e6e9b5589a04a97 | 1,235 | py | Python | Packs/CommonScripts/Scripts/FileToBase64List/FileToBase64List.py | diCagri/content | c532c50b213e6dddb8ae6a378d6d09198e08fc9f | [
"MIT"
] | 799 | 2016-08-02T06:43:14.000Z | 2022-03-31T11:10:11.000Z | Packs/CommonScripts/Scripts/FileToBase64List/FileToBase64List.py | diCagri/content | c532c50b213e6dddb8ae6a378d6d09198e08fc9f | [
"MIT"
] | 9,317 | 2016-08-07T19:00:51.000Z | 2022-03-31T21:56:04.000Z | Packs/CommonScripts/Scripts/FileToBase64List/FileToBase64List.py | diCagri/content | c532c50b213e6dddb8ae6a378d6d09198e08fc9f | [
"MIT"
] | 1,297 | 2016-08-04T13:59:00.000Z | 2022-03-31T23:43:06.000Z | import demistomock as demisto
from CommonServerPython import *
from CommonServerUserPython import *
import base64
import zlib
def get_file_data(file_path, zip=False):
with open(file_path, 'rb') as f:
data = f.read()
if zip:
data = zlib.compress(data)
return base64.b64encode(data)
... | 26.276596 | 96 | 0.62996 |
caeeeae7faf29a8636bef06ae17904b0bc26343d | 685 | py | Python | gemtown/advertisings/migrations/0003_auto_20190523_1601.py | doramong0926/gemtown | 2c39284e3c68f0cc11994bed0ee2abaad0ea06b6 | [
"MIT"
] | null | null | null | gemtown/advertisings/migrations/0003_auto_20190523_1601.py | doramong0926/gemtown | 2c39284e3c68f0cc11994bed0ee2abaad0ea06b6 | [
"MIT"
] | 5 | 2020-09-04T20:13:39.000Z | 2022-02-17T22:03:33.000Z | gemtown/advertisings/migrations/0003_auto_20190523_1601.py | doramong0926/gemtown | 2c39284e3c68f0cc11994bed0ee2abaad0ea06b6 | [
"MIT"
] | null | null | null | # Generated by Django 2.0.13 on 2019-05-23 07:01
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('advertisings', '0002_auto_20190523_1438'),
]
operations = [
migrations.RenameField(
model_name='advertising',
old_n... | 28.541667 | 183 | 0.594161 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.