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
1790e779701b24dd58128db5e27a129c280c8abb
204
py
Python
Curso_Python/Secao2-Python-Basico-Logica-Programacao/27/03usuario.py
pedrohd21/Cursos-Feitos
b223aad83867bfa45ad161d133e33c2c200d42bd
[ "MIT" ]
null
null
null
Curso_Python/Secao2-Python-Basico-Logica-Programacao/27/03usuario.py
pedrohd21/Cursos-Feitos
b223aad83867bfa45ad161d133e33c2c200d42bd
[ "MIT" ]
null
null
null
Curso_Python/Secao2-Python-Basico-Logica-Programacao/27/03usuario.py
pedrohd21/Cursos-Feitos
b223aad83867bfa45ad161d133e33c2c200d42bd
[ "MIT" ]
null
null
null
nome = input('Qual o seu nome: ') if len(nome) < 5: print(f'{nome} seu nome é Pequeno.') elif len(nome) < 8: print(f'{nome} seu nome é Normal.') else: print(f'{nome} seu nome é Muito Grande.')
29.142857
45
0.612745
bd5749047f18ec6298af81c1d495c7fcefe64ac1
3,149
py
Python
python/dual_moving_average.py
uredkar/BAU
269aa3f1a74ea0202a33e73cdeeb0a74d26f3698
[ "Unlicense" ]
null
null
null
python/dual_moving_average.py
uredkar/BAU
269aa3f1a74ea0202a33e73cdeeb0a74d26f3698
[ "Unlicense" ]
null
null
null
python/dual_moving_average.py
uredkar/BAU
269aa3f1a74ea0202a33e73cdeeb0a74d26f3698
[ "Unlicense" ]
null
null
null
%%zipline --start 2004-1-1 --end 2010-1-1 -o results.pickle # Zipline trading algorithm # Taken from zipline.examples.olmar import numpy as np from zipline.finance import commission, slippage STOCKS = ['SPY', 'TAIL', 'BND'] # On-Line Portfolio Moving Average Reversion # More info can be found in the correspondin...
29.157407
77
0.637345
da6f4571b2c5e5d1a7559c861344fdd86667ade7
1,123
py
Python
Source/01_SMTP/01_SMTP.py
rbiotblbk/WBS_T9_2022
533156db88ff2fe676564b0e5d6e84e888ab0916
[ "MIT" ]
1
2022-02-28T09:49:35.000Z
2022-02-28T09:49:35.000Z
Source/05_FTP/SMTP_download.py
rbiotblbk/WBS_T9_2022
533156db88ff2fe676564b0e5d6e84e888ab0916
[ "MIT" ]
null
null
null
Source/05_FTP/SMTP_download.py
rbiotblbk/WBS_T9_2022
533156db88ff2fe676564b0e5d6e84e888ab0916
[ "MIT" ]
null
null
null
""" SMTP : Simple Mail Transfer Protocol Only for ASCII Encoding """ import os from pathlib import Path import smtplib import json os.chdir(Path(__file__).parent) # Read Credentials from JSON File with open("./email.json", mode = "r", encoding= "UTF-8") as f: json_text = f.read() json_dict = json.loads(json_...
16.275362
64
0.666073
da91094dd3797cc24cfa7407c5570135068ce5ac
688
py
Python
easyp2p/platforms/__init__.py
Ceystyle/easyp2p
99c32e3ec0ff5a34733f157dd1b53d1aa9bc9edc
[ "MIT" ]
4
2019-07-18T10:58:28.000Z
2021-11-18T16:57:45.000Z
easyp2p/platforms/__init__.py
Ceystyle/easyp2p
99c32e3ec0ff5a34733f157dd1b53d1aa9bc9edc
[ "MIT" ]
1
2019-07-05T09:21:47.000Z
2019-07-05T09:21:47.000Z
easyp2p/platforms/__init__.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 """Package containing all platform specific classes.""" from easyp2p.platforms.bondora import Bondora from easyp2p.platforms.dofinance import DoFinance from easyp2p.platforms.estateguru import Estateguru from easyp2p.platforms.grupeer import Grupee...
38.222222
55
0.837209
e53ecc6b4190f07c022346a116bb21aa67b4dc82
7,434
py
Python
hyperts/search_space.py
zhangxjohn/HyperTS
c43c8d820d26dd362510997c1c294341279ce1e1
[ "Apache-2.0" ]
null
null
null
hyperts/search_space.py
zhangxjohn/HyperTS
c43c8d820d26dd362510997c1c294341279ce1e1
[ "Apache-2.0" ]
null
null
null
hyperts/search_space.py
zhangxjohn/HyperTS
c43c8d820d26dd362510997c1c294341279ce1e1
[ "Apache-2.0" ]
null
null
null
# -*- coding:utf-8 -*- import numpy as np from hypernets.pipeline.base import DataFrameMapper from hypernets.pipeline.base import Pipeline from hypernets.pipeline.transformers import SimpleImputer from hypernets.core.ops import HyperInput from hypernets.core.search_space import HyperSpace, Choice from hypern...
51.268966
164
0.54883
00d9963ed1324ccaf770cd869024d98627867cb4
242
py
Python
exercises/es/exc_01_02_01.py
tuanducdesign/spacy-course
f8d092c5fa2997fccb3f367d174dce8667932b3d
[ "MIT" ]
2
2020-07-07T01:46:37.000Z
2021-04-20T03:19:43.000Z
exercises/es/exc_01_02_01.py
tuanducdesign/spacy-course
f8d092c5fa2997fccb3f367d174dce8667932b3d
[ "MIT" ]
null
null
null
exercises/es/exc_01_02_01.py
tuanducdesign/spacy-course
f8d092c5fa2997fccb3f367d174dce8667932b3d
[ "MIT" ]
null
null
null
# Importa spaCy import ____ # Crea el objeto nlp para procesar inglés nlp = ____ # Procesa un texto (aquí dice "Esta es una oración" en inglés) doc = nlp("This is a sentence.") # Imprime en pantalla el texto del documento print(____.text)
20.166667
62
0.735537
c12fc79449cdfb908d77c5a9270e977b98051ccd
848
py
Python
Hero/2021/steg/RansomWTF/scramble.py
mystickev/ctf-archives
89e99a5cd5fb6b2923cad3fe1948d3ff78649b4e
[ "MIT" ]
1
2021-11-02T20:53:58.000Z
2021-11-02T20:53:58.000Z
Hero/2021/steg/RansomWTF/scramble.py
ruhan-islam/ctf-archives
8c2bf6a608c821314d1a1cfaa05a6cccef8e3103
[ "MIT" ]
null
null
null
Hero/2021/steg/RansomWTF/scramble.py
ruhan-islam/ctf-archives
8c2bf6a608c821314d1a1cfaa05a6cccef8e3103
[ "MIT" ]
1
2021-12-19T11:06:24.000Z
2021-12-19T11:06:24.000Z
import numpy as np import cv2 import sys """ EGGMAN'S RANSOMWARE. I LIKE EGGS, ESPECIALLY SCRAMBLED ONES. LET'S SEE HOW YOU LIKE YOUR SCRAMBLED PICTURES ! """ def scramble(image): # 420 EGGS ! np.random.seed(420) # Image dimensions : 1280x720 to_hide = cv2.imread(image) to_hide_a...
22.918919
64
0.627358
e777cb41f67753a031a60e4127cdaba09a5f0217
449
py
Python
Python/Courses/LearnToCodeInPython3ProgrammingBeginnerToAdvancedYourProgress/python_course/Section2DataTypes/12ExerciseListsAndTuples.py
JamieBort/LearningDirectory
afca79c5f1333c079d0e96202ff44ca21b2ceb81
[ "Info-ZIP" ]
1
2022-02-02T21:56:08.000Z
2022-02-02T21:56:08.000Z
Python/Courses/LearnToCodeInPython3ProgrammingBeginnerToAdvancedYourProgress/python_course/Section2DataTypes/12ExerciseListsAndTuples.py
JamieBort/LearningDirectory
afca79c5f1333c079d0e96202ff44ca21b2ceb81
[ "Info-ZIP" ]
27
2020-06-27T23:25:59.000Z
2022-02-27T20:40:56.000Z
Python/Courses/LearnToCodeInPython3ProgrammingBeginnerToAdvancedYourProgress/python_course/Section2DataTypes/12ExerciseListsAndTuples.py
JamieBort/LearningDirectory
afca79c5f1333c079d0e96202ff44ca21b2ceb81
[ "Info-ZIP" ]
null
null
null
# Started. Not finished. # mylist = ["one", "two", "three"] monthTuble = ("January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December") # print("Please enter your birthdate in the formate of MM-DD-YYYY.") def week(i): switcher={0:'Sunday', 1:'Monday', 2:...
40.818182
135
0.639198
99ed022eef4561525e430f569ace343fc78a59b9
3,074
py
Python
packages/watchmen-data-kernel/src/watchmen_data_kernel/storage_bridge/variables.py
Indexical-Metrics-Measure-Advisory/watchmen
c54ec54d9f91034a38e51fd339ba66453d2c7a6d
[ "MIT" ]
null
null
null
packages/watchmen-data-kernel/src/watchmen_data_kernel/storage_bridge/variables.py
Indexical-Metrics-Measure-Advisory/watchmen
c54ec54d9f91034a38e51fd339ba66453d2c7a6d
[ "MIT" ]
null
null
null
packages/watchmen-data-kernel/src/watchmen_data_kernel/storage_bridge/variables.py
Indexical-Metrics-Measure-Advisory/watchmen
c54ec54d9f91034a38e51fd339ba66453d2c7a6d
[ "MIT" ]
null
null
null
from __future__ import annotations from copy import deepcopy from typing import Any, Dict, List, Optional, Tuple from watchmen_model.admin import Factor, FactorType, Topic from watchmen_utilities import ArrayHelper, is_blank class PipelineVariables: def __init__( self, previous_data: Optional[Dict[str, Any]], c...
31.690722
99
0.73715
6b642f970b8d099efd2ce5808a8eb2128d4a0265
92
py
Python
2015/04/opportunity-youth-cities-20150415/graphic_config.py
nprapps/graphics-archive
97b0ef326b46a959df930f5522d325e537f7a655
[ "FSFAP" ]
14
2015-05-08T13:41:51.000Z
2021-02-24T12:34:55.000Z
2015/04/opportunity-youth-cities-20150415/graphic_config.py
nprapps/graphics-archive
97b0ef326b46a959df930f5522d325e537f7a655
[ "FSFAP" ]
null
null
null
2015/04/opportunity-youth-cities-20150415/graphic_config.py
nprapps/graphics-archive
97b0ef326b46a959df930f5522d325e537f7a655
[ "FSFAP" ]
7
2015-04-04T04:45:54.000Z
2021-02-18T11:12:48.000Z
#!/usr/bin/env python COPY_GOOGLE_DOC_KEY = '1buY27ebYmb0Rer3C0aON8NIMj3Nzuj_jyEQyX6xNXWA'
23
68
0.847826
2e0e5832f9cc79cce31bdcfbfd6f9a6ac61b4e0f
426
py
Python
project/i18n.py
DanielGrams/cityservice
c487c34b5ba6541dcb441fe903ab2012c2256893
[ "MIT" ]
null
null
null
project/i18n.py
DanielGrams/cityservice
c487c34b5ba6541dcb441fe903ab2012c2256893
[ "MIT" ]
35
2022-01-24T22:15:59.000Z
2022-03-31T15:01:35.000Z
project/i18n.py
DanielGrams/cityservice
c487c34b5ba6541dcb441fe903ab2012c2256893
[ "MIT" ]
null
null
null
from flask import request from flask_babelex import gettext from project import app, babel @babel.localeselector def get_locale(): return request.accept_languages.best_match(app.config["LANGUAGES"]) def print_dynamic_texts(): gettext("Scope_openid") gettext("Scope_profile") gettext("Scope_user:read...
22.421053
71
0.753521
d89a9bb3f8cc85be8d70604a0e3af30560b79b47
3,427
py
Python
packages/watchmen-meta/src/watchmen_meta/system/data_source_service.py
Indexical-Metrics-Measure-Advisory/watchmen
c54ec54d9f91034a38e51fd339ba66453d2c7a6d
[ "MIT" ]
null
null
null
packages/watchmen-meta/src/watchmen_meta/system/data_source_service.py
Indexical-Metrics-Measure-Advisory/watchmen
c54ec54d9f91034a38e51fd339ba66453d2c7a6d
[ "MIT" ]
null
null
null
packages/watchmen-meta/src/watchmen_meta/system/data_source_service.py
Indexical-Metrics-Measure-Advisory/watchmen
c54ec54d9f91034a38e51fd339ba66453d2c7a6d
[ "MIT" ]
null
null
null
from typing import List, Optional from watchmen_meta.common import TupleService, TupleShaper from watchmen_model.common import DataPage, DataSourceId, Pageable, TenantId from watchmen_model.system import DataSource, DataSourceParam from watchmen_storage import ColumnNameLiteral, EntityCriteriaExpression, EntityCriteri...
36.073684
110
0.772396
5ce305550e9090c06e366ed2d40203caa47bda43
3,093
py
Python
haas_lib_bundles/python/libraries/irremote/irremote.py
wstong999/AliOS-Things
6554769cb5b797e28a30a4aa89b3f4cb2ef2f5d9
[ "Apache-2.0" ]
null
null
null
haas_lib_bundles/python/libraries/irremote/irremote.py
wstong999/AliOS-Things
6554769cb5b797e28a30a4aa89b3f4cb2ef2f5d9
[ "Apache-2.0" ]
null
null
null
haas_lib_bundles/python/libraries/irremote/irremote.py
wstong999/AliOS-Things
6554769cb5b797e28a30a4aa89b3f4cb2ef2f5d9
[ "Apache-2.0" ]
null
null
null
import os import utime import micropython import ujson from driver import GPIO micropython.alloc_emergency_exception_buf(100) class IRREMOTE(object): CODE = {207: "1", 231: "2", 133: "3", 239: "4", 199: "5", 165: "6", 189: "7", 181: "8", 173: "9", 151: "0", 221: "PREV", 253: "NEXT", 31: "VOL-", 87: "VO...
29.457143
114
0.520207
7a9c0e3bbde78061d91051483a11f56ff16afad6
1,489
py
Python
wz/_test/rotate_text.py
gradgrind/WZ
672d93a3c9d7806194d16d6d5b9175e4046bd068
[ "Apache-2.0" ]
null
null
null
wz/_test/rotate_text.py
gradgrind/WZ
672d93a3c9d7806194d16d6d5b9175e4046bd068
[ "Apache-2.0" ]
null
null
null
wz/_test/rotate_text.py
gradgrind/WZ
672d93a3c9d7806194d16d6d5b9175e4046bd068
[ "Apache-2.0" ]
null
null
null
# -*- coding: utf-8 -*- """ rotate_text.py draw a rotated text with PySide's QPainter class """ from PySide6.QtCore import * from PySide6.QtGui import * from PySide6.QtWidgets import * class MyWindow(QWidget): def __init__(self, text, degrees): # QWidget will be self QWidget.__init__(self) ...
25.237288
56
0.619208
8ff9f26cdcb10ebe2b94133450e80703696a26cc
200
py
Python
Language Proficiency/Python/Itertools/itertools.permutations()/permutations.py
xuedong/hacker-rank
ce8a60f80c2c6935b427f9409d7e826ee0d26a89
[ "MIT" ]
1
2021-02-22T17:37:45.000Z
2021-02-22T17:37:45.000Z
Language Proficiency/Python/Itertools/itertools.permutations()/permutations.py
xuedong/hacker-rank
ce8a60f80c2c6935b427f9409d7e826ee0d26a89
[ "MIT" ]
null
null
null
Language Proficiency/Python/Itertools/itertools.permutations()/permutations.py
xuedong/hacker-rank
ce8a60f80c2c6935b427f9409d7e826ee0d26a89
[ "MIT" ]
null
null
null
#!/usr/bin/env python3 from itertools import permutations if __name__ == "__main__": S, n = input().split() n = int(n) print('\n'.join(map(''.join, sorted(list(permutations(S, n))))))
18.181818
68
0.615
8f23fc3eb4bdcc49e49f3c5e2a68593542ca0dac
208
pyde
Python
sketches/Evolution_Ecosystem/Evolution_Ecosystem.pyde
kantel/processingpy
74aae222e46f68d1c8f06307aaede3cdae65c8ec
[ "MIT" ]
4
2018-06-03T02:11:46.000Z
2021-08-18T19:55:15.000Z
sketches/Evolution_Ecosystem/Evolution_Ecosystem.pyde
kantel/processingpy
74aae222e46f68d1c8f06307aaede3cdae65c8ec
[ "MIT" ]
null
null
null
sketches/Evolution_Ecosystem/Evolution_Ecosystem.pyde
kantel/processingpy
74aae222e46f68d1c8f06307aaede3cdae65c8ec
[ "MIT" ]
3
2019-12-23T19:12:51.000Z
2021-04-30T14:00:31.000Z
from world import World def setup(): global world size(600, 400) world = World(20) frameRate(30) def draw(): global world # background("#1f2838") background(255) world.run()
14.857143
27
0.610577
7af49d7fc0040f05f46f5d6fa3bc8cb556432749
570
py
Python
src/network/bo/peer.py
TimHabeck/blockchain-lab
3cd050ee43f26cf0a1f70869100f0b40a6abae07
[ "RSA-MD" ]
null
null
null
src/network/bo/peer.py
TimHabeck/blockchain-lab
3cd050ee43f26cf0a1f70869100f0b40a6abae07
[ "RSA-MD" ]
null
null
null
src/network/bo/peer.py
TimHabeck/blockchain-lab
3cd050ee43f26cf0a1f70869100f0b40a6abae07
[ "RSA-MD" ]
null
null
null
class Peer(): def __init__(self, host, port) -> None: super().__init__() self._host = host self._port = port def get_host(self): return self._host def set_host(self, host): self._host = host def get_port(self): return self._port def set_port(self, ...
20.357143
47
0.535088
3b1b12c2a997cdf020167f85969e905ea2256607
1,135
py
Python
RDS/circle1_adapters_and_ports/port_openscienceframework/src/__init__.py
Sciebo-RDS/Sciebo-RDS
d71cf449ed045a2a7a049e2cb77c99fd5a9195bd
[ "MIT" ]
10
2020-06-24T08:22:24.000Z
2022-01-13T16:17:36.000Z
RDS/circle1_adapters_and_ports/port_openscienceframework/src/__init__.py
Sciebo-RDS/Sciebo-RDS
d71cf449ed045a2a7a049e2cb77c99fd5a9195bd
[ "MIT" ]
78
2020-01-23T14:32:06.000Z
2022-03-07T14:11:16.000Z
RDS/circle1_adapters_and_ports/port_openscienceframework/src/__init__.py
Sciebo-RDS/Sciebo-RDS
d71cf449ed045a2a7a049e2cb77c99fd5a9195bd
[ "MIT" ]
1
2020-06-24T08:33:48.000Z
2020-06-24T08:33:48.000Z
from connexion_plus import App, MultipleResourceResolver, Util import json from jaeger_client import Config as jConfig from jaeger_client.metrics.prometheus import PrometheusMetricsFactory import requests from werkzeug.exceptions import abort import logging, os log_level = os.environ.get("LOGLEVEL", "DEBUG") logger ...
25.795455
87
0.680176
7972474729038c67b69f065d0fc67008fc452bb9
280
py
Python
leetcode/476-Number-Complement/NumComplement.py
cc13ny/all-in
bc0b01e44e121ea68724da16f25f7e24386c53de
[ "MIT" ]
1
2015-12-16T04:01:03.000Z
2015-12-16T04:01:03.000Z
leetcode/476-Number-Complement/NumComplement.py
cc13ny/all-in
bc0b01e44e121ea68724da16f25f7e24386c53de
[ "MIT" ]
1
2016-02-09T06:00:07.000Z
2016-02-09T07:20:13.000Z
leetcode/476-Number-Complement/NumComplement.py
cc13ny/all-in
bc0b01e44e121ea68724da16f25f7e24386c53de
[ "MIT" ]
2
2019-06-27T09:07:26.000Z
2019-07-01T04:40:13.000Z
class Solution(object): def findComplement(self, num): """ :type num: int :rtype: int """ res = 0 i = 0 while num: res += (1 - (num & 1)) << i num = num >> 1 i += 1 return res
20
39
0.364286
79a2932b7955512389059df8ebd91815e6af8b8f
78
py
Python
ebenezer/atencion/models/choices.py
davrv93/ebenezer-backend
d3db4dafd9a8c35bea9f32afe2be1dd451f64298
[ "Apache-2.0" ]
null
null
null
ebenezer/atencion/models/choices.py
davrv93/ebenezer-backend
d3db4dafd9a8c35bea9f32afe2be1dd451f64298
[ "Apache-2.0" ]
3
2020-02-11T23:15:00.000Z
2021-06-10T20:52:17.000Z
ebenezer/atencion/models/choices.py
davrv93/ebenezer-backend
d3db4dafd9a8c35bea9f32afe2be1dd451f64298
[ "Apache-2.0" ]
null
null
null
NIC='NIC' NOC='NOC' TAXONOMIA_CHOICES=( (NIC, NIC,), (NOC, NOC,), )
8.666667
19
0.525641
d6a983f571b237b77384d304e285aef2817671cc
2,303
py
Python
source/pkgsrc/devel/py-game/patches/patch-buildconfig_config__unix.py
Scottx86-64/dotfiles-1
51004b1e2b032664cce6b553d2052757c286087d
[ "Unlicense" ]
1
2021-11-20T22:46:39.000Z
2021-11-20T22:46:39.000Z
source/pkgsrc/devel/py-game/patches/patch-buildconfig_config__unix.py
Scottx86-64/dotfiles-1
51004b1e2b032664cce6b553d2052757c286087d
[ "Unlicense" ]
null
null
null
source/pkgsrc/devel/py-game/patches/patch-buildconfig_config__unix.py
Scottx86-64/dotfiles-1
51004b1e2b032664cce6b553d2052757c286087d
[ "Unlicense" ]
null
null
null
$NetBSD: patch-buildconfig_config__unix.py,v 1.2 2020/06/22 11:33:41 ryoon Exp $ Detect X11R6 or X11R7; avoid localbase overriding search. Use correct libpng. Disable portmidi and porttime; porttime is a part of portmidi. --- buildconfig/config_unix.py.orig 2019-04-25 06:14:17.000000000 +0000 +++ buildconfig/config_u...
44.288462
88
0.587495
0673f5bfb72308afb37da6dd6088127b5dd3d6a3
496
py
Python
sendbulk.py
XLAR-8/M-KIT
19952ebe92e61b1733d63b8e59b107bc9c9e6f64
[ "Apache-2.0" ]
null
null
null
sendbulk.py
XLAR-8/M-KIT
19952ebe92e61b1733d63b8e59b107bc9c9e6f64
[ "Apache-2.0" ]
null
null
null
sendbulk.py
XLAR-8/M-KIT
19952ebe92e61b1733d63b8e59b107bc9c9e6f64
[ "Apache-2.0" ]
null
null
null
import pandas as da import smtplib from .tool import config as ca from .tool import pagan as data e = da.read_excel("Email.xlsx") emails = e['Emails'].values server = smtplib.SMTP("smtp.gmail.com", 587) server.ehlo() server.starttls() server.login(ca.SenderAddress, ca.password) body = "Subject: {}\n\n{}".format(data....
21.565217
56
0.701613
8850b864c2336838ee2aadec659dc32ff7976599
1,034
py
Python
Server/admin/food.py
TateYdq/DietRegimen
66c88e84b7c4d9226db1d9567d300b1c6f7344b7
[ "MIT" ]
null
null
null
Server/admin/food.py
TateYdq/DietRegimen
66c88e84b7c4d9226db1d9567d300b1c6f7344b7
[ "MIT" ]
null
null
null
Server/admin/food.py
TateYdq/DietRegimen
66c88e84b7c4d9226db1d9567d300b1c6f7344b7
[ "MIT" ]
null
null
null
import requests import json from utils.config import * ss = requests.session() def addFood(): data = json.dumps({ "name":"马铃薯", # "food_kind_id":1, # "food_kind":"水果", "info":''' 马铃薯,属茄科一年生草本植物,块茎可供食用,是全球第四大重要的粮食作物,仅次于小麦、稻谷和玉米。马铃薯又称地蛋、土豆 、洋山芋等,茄科植物的块茎。与小麦、稻谷、玉米、高...
27.210526
113
0.602515
31f1976a21d4f1ee853bc53ac21f71b6debd0600
3,783
py
Python
src/visitpy/visit_utils/src/builtin/pyqt_support.py
visit-dav/vis
c08bc6e538ecd7d30ddc6399ec3022b9e062127e
[ "BSD-3-Clause" ]
226
2018-12-29T01:13:49.000Z
2022-03-30T19:16:31.000Z
src/visitpy/visit_utils/src/builtin/pyqt_support.py
visit-dav/vis
c08bc6e538ecd7d30ddc6399ec3022b9e062127e
[ "BSD-3-Clause" ]
5,100
2019-01-14T18:19:25.000Z
2022-03-31T23:08:36.000Z
src/visitpy/visit_utils/src/builtin/pyqt_support.py
visit-dav/vis
c08bc6e538ecd7d30ddc6399ec3022b9e062127e
[ "BSD-3-Clause" ]
84
2019-01-24T17:41:50.000Z
2022-03-10T10:01:46.000Z
# 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: pyqt_suppor...
27.413043
158
0.652128
ee61f5411b690d6a427648088582b6babca158b1
3,099
py
Python
BiliReNamer/BiliReNamer.py
Luke-li-Chen/BiliReNamer
1e83f54840caef23af5f23da5fd5640222c7a73b
[ "Apache-2.0" ]
null
null
null
BiliReNamer/BiliReNamer.py
Luke-li-Chen/BiliReNamer
1e83f54840caef23af5f23da5fd5640222c7a73b
[ "Apache-2.0" ]
null
null
null
BiliReNamer/BiliReNamer.py
Luke-li-Chen/BiliReNamer
1e83f54840caef23af5f23da5fd5640222c7a73b
[ "Apache-2.0" ]
null
null
null
import os import GetURL import shutil import configparser from GetHTML import GetHTML from TitleHTMLParser import GetTitle # 替换不能作为文件名的字符 def CharFilter(str): str = str.replace('\\', '_') str = str.replace('/', '_') str = str.replace(':', ':') str = str.replace('*', '_') str = str.replace('?', '?'...
24.023256
89
0.565989
3a4df30f5a84290823afe0b987766024a054a963
545
py
Python
数据结构/NowCode/19_NumberOf1.py
Blankwhiter/LearningNotes
83e570bf386a8e2b5aa699c3d38b83e5dcdd9cb0
[ "MIT" ]
null
null
null
数据结构/NowCode/19_NumberOf1.py
Blankwhiter/LearningNotes
83e570bf386a8e2b5aa699c3d38b83e5dcdd9cb0
[ "MIT" ]
3
2020-08-14T07:50:27.000Z
2020-08-14T08:51:06.000Z
数据结构/NowCode/19_NumberOf1.py
Blankwhiter/LearningNotes
83e570bf386a8e2b5aa699c3d38b83e5dcdd9cb0
[ "MIT" ]
2
2021-03-14T05:58:45.000Z
2021-08-29T17:25:52.000Z
# 二进制中1的个数 # 输入一个整数,输出该数二进制表示中1的个数。其中负数用补码表示 class Solution: def NumberOf1(self, n): # 这一步是求补码的 n = n & 0xFFFFFFFF count = 0 for c in str(bin(n)): if c == "1": count +=1 return count def NumberOf2(self, n): # 这一步是求补码的 n = n & ...
20.961538
35
0.46789
3a54b92922c0a707a05d0b9b68cd9ecf53f02be6
9,137
py
Python
Co-Simulation/Sumo/sumo-1.7.0/tools/contributed/sumopy/coremodules/network/netgenerate.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/network/netgenerate.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/network/netgenerate.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 ...
43.303318
131
0.478603
aaff61a367af9a50804f9aee8531cc1c8ed1efac
3,841
py
Python
larq_compute_engine/tflite/python/bconv2d_inference_test.py
timdebruin/compute-engine
bdd3c080ea330ad911cfb6b02dd41b6c574a7cf4
[ "Apache-2.0" ]
null
null
null
larq_compute_engine/tflite/python/bconv2d_inference_test.py
timdebruin/compute-engine
bdd3c080ea330ad911cfb6b02dd41b6c574a7cf4
[ "Apache-2.0" ]
null
null
null
larq_compute_engine/tflite/python/bconv2d_inference_test.py
timdebruin/compute-engine
bdd3c080ea330ad911cfb6b02dd41b6c574a7cf4
[ "Apache-2.0" ]
null
null
null
"""Test for compute engine TF lite Python wrapper""" import numpy as np import tensorflow as tf import larq_compute_engine as lqce import sys import pytest from tflite_runtime.interpreter import Interpreter def _create_bconv2d_layer( bconv_op, in_channels, filters, kernel_size, hw_strides=(1, 1),...
28.664179
84
0.685759
c96b32e9aac8ede5617ee7df65c7ece86b89430f
405
py
Python
app/__init__.py
marwanad/music_bot
c7a9c704f510d455fc6d1d7c057d5cfa31dcd7cf
[ "MIT" ]
1
2020-12-07T13:30:59.000Z
2020-12-07T13:30:59.000Z
app/__init__.py
marwanad/music_bot
c7a9c704f510d455fc6d1d7c057d5cfa31dcd7cf
[ "MIT" ]
null
null
null
app/__init__.py
marwanad/music_bot
c7a9c704f510d455fc6d1d7c057d5cfa31dcd7cf
[ "MIT" ]
null
null
null
from flask import Flask from config import config from flask.ext.sqlalchemy import SQLAlchemy import os app = Flask(__name__) app.config['SQLALCHEMY_DATABASE_URI'] = os.environ['DATABASE_URL'] db = SQLAlchemy(app) def create_app(config_name): app.config.from_object(config[config_name]) from app.main impo...
19.285714
66
0.775309
6e57a24bc65986b4ca83ea237888ec682b7002a4
372
py
Python
computer-networking-a-top-down-approach/cp2/exercise12.py
Jocs/reading-notes
26b8331877a2de034b8860bc3e3967893112d52d
[ "MIT" ]
3
2021-08-04T07:59:48.000Z
2022-03-26T23:58:17.000Z
computer-networking-a-top-down-approach/cp2/exercise12.py
Jocs/reading-notes
26b8331877a2de034b8860bc3e3967893112d52d
[ "MIT" ]
null
null
null
computer-networking-a-top-down-approach/cp2/exercise12.py
Jocs/reading-notes
26b8331877a2de034b8860bc3e3967893112d52d
[ "MIT" ]
null
null
null
from socket import * serverSocket = socket(AF_INET, SOCK_STREAM) serverSocket.bind(('', 1234)) serverSocket.listen(1) while True: connectSocket, addr = serverSocket.accept() message = connectSocket.recv(1024) print(message) res = 'HTTP/1.1 200 OK\r\n\r\nhello world' try: connectSocket.sendall(res) exc...
21.882353
45
0.725806
6e617b3d1d861394523f5c5105ba9bf08874f492
3,201
py
Python
registry/models.py
KSIUJ/erc-backend
a78a6ee85c2865c8d25c15f40dc72fe32ba4bfd3
[ "MIT" ]
null
null
null
registry/models.py
KSIUJ/erc-backend
a78a6ee85c2865c8d25c15f40dc72fe32ba4bfd3
[ "MIT" ]
5
2020-10-10T00:21:37.000Z
2021-09-22T18:01:46.000Z
registry/models.py
KSIUJ/erc-backend
a78a6ee85c2865c8d25c15f40dc72fe32ba4bfd3
[ "MIT" ]
null
null
null
from django.core.validators import validate_email from django.db import models class NullCharField(models.CharField): def get_db_prep_value(self, value, *args, **kwargs): if self.blank is True and self.null is True and value == '': value = None return super().get_db_prep_value(value, *...
34.419355
115
0.691034
6e381ce145154bc10f07a291a7c993cb690cc8bb
7,652
py
Python
Liquid-optimizer/serve.py
PasaLab/YAO
2e70203197cd79f9522d65731ee5dc0eb236b005
[ "Apache-2.0" ]
2
2021-08-30T14:12:09.000Z
2022-01-20T02:14:22.000Z
Liquid-optimizer/serve.py
PasaLab/YAO
2e70203197cd79f9522d65731ee5dc0eb236b005
[ "Apache-2.0" ]
null
null
null
Liquid-optimizer/serve.py
PasaLab/YAO
2e70203197cd79f9522d65731ee5dc0eb236b005
[ "Apache-2.0" ]
null
null
null
#!/usr/bin/python from threading import Thread from threading import Lock from http.server import BaseHTTPRequestHandler, HTTPServer import cgi import json from urllib import parse import pandas as pd import numpy as np import csv import random import traceback import pickle import os from sklearn.ensembl...
28.552239
97
0.617878
2846af5ed30564d9b1c1f8f0b5ad6bf0eebaa582
4,389
py
Python
src/onegov/election_day/screen_widgets/generic.py
politbuero-kampagnen/onegov-cloud
20148bf321b71f617b64376fe7249b2b9b9c4aa9
[ "MIT" ]
null
null
null
src/onegov/election_day/screen_widgets/generic.py
politbuero-kampagnen/onegov-cloud
20148bf321b71f617b64376fe7249b2b9b9c4aa9
[ "MIT" ]
null
null
null
src/onegov/election_day/screen_widgets/generic.py
politbuero-kampagnen/onegov-cloud
20148bf321b71f617b64376fe7249b2b9b9c4aa9
[ "MIT" ]
null
null
null
from onegov.election_day import ElectionDayApp @ElectionDayApp.screen_widget(tag='h1', category='generic') class H1Widget: tag = 'h1' template = """ <xsl:template match="h1"> <h1 class="{@class}"> <xsl:apply-templates select="node()"/> </h1> </xsl:templa...
26.281437
73
0.535202
c28852b3c466cd032f6c4ab63f0d21cff4ac38fb
1,389
py
Python
Highscore.py
BogyMitutoyoCTL/Riesen-Tetris-3
349d7b6f12c2ddf0b66683c904406a5e8596228d
[ "MIT" ]
1
2019-10-22T14:02:34.000Z
2019-10-22T14:02:34.000Z
Highscore.py
BogyMitutoyoCTL/Riesen-Tetris-3
349d7b6f12c2ddf0b66683c904406a5e8596228d
[ "MIT" ]
null
null
null
Highscore.py
BogyMitutoyoCTL/Riesen-Tetris-3
349d7b6f12c2ddf0b66683c904406a5e8596228d
[ "MIT" ]
null
null
null
from LED_Matrix_Maler import Painter from Sound import Sound import os.path class Highscore: def __init__(self, filename, leonardo: Painter, sounds: Sound): self.points = 0 self.name = "" self.filename = filename self.sounds = sounds self.leonardo = leonardo self.lo...
26.207547
67
0.597552
6661fa37f109fb4e3108764692f3a16ff3434f28
1,469
py
Python
Aggregator/agg_webcam.py
cfleschhut/virushack
2fe7ded0be8672b066edef7fed52573794db2ba5
[ "Apache-2.0" ]
null
null
null
Aggregator/agg_webcam.py
cfleschhut/virushack
2fe7ded0be8672b066edef7fed52573794db2ba5
[ "Apache-2.0" ]
null
null
null
Aggregator/agg_webcam.py
cfleschhut/virushack
2fe7ded0be8672b066edef7fed52573794db2ba5
[ "Apache-2.0" ]
null
null
null
import pandas as pd from datetime import datetime, date, timedelta # compatibility with ipython #os.chdir(os.path.dirname(__file__)) import json import boto3 from coords_to_kreis import coords_convert def aggregate(date): s3_client = boto3.client('s3') data = pd.DataFrame() for x in range(0,20): tr...
36.725
217
0.624915
bbef27c8f99de4874f2c4ff3d0ca324b6a5b3b14
1,371
py
Python
Pythonskripte/p3env/fuseWav.py
NoahEmbedded/EmbeddedKWD
2380d56b0b75bae4fedeb60885358332766f7319
[ "MIT" ]
null
null
null
Pythonskripte/p3env/fuseWav.py
NoahEmbedded/EmbeddedKWD
2380d56b0b75bae4fedeb60885358332766f7319
[ "MIT" ]
null
null
null
Pythonskripte/p3env/fuseWav.py
NoahEmbedded/EmbeddedKWD
2380d56b0b75bae4fedeb60885358332766f7319
[ "MIT" ]
null
null
null
from pydub import AudioSegment as AS import os def fuse(in0,in1,out): sound0 = AS.from_wav(in0) sound1 = AS.from_wav(in1) kombi_sound = sound0 + sound1 if len(kombi_sound) < 2000: kombi_sound = kombi_sound + AS.silent(duration=(2000-len(kombi_sound)),frame_rate=16000) kombi_sound.export(out,...
41.545455
103
0.706054
a5622416c7ee206c1c7a089ece1f5a36ac4be8e8
3,848
py
Python
pyROI/makeAllMicrographs.py
swharden/ROI-Analysis-Pipeline
e83d96c43fdd50cb44be365289e964576492617e
[ "MIT" ]
4
2017-06-20T19:56:22.000Z
2021-05-29T10:07:47.000Z
pyROI/makeAllMicrographs.py
swharden/ROI-Analysis-Pipeline
e83d96c43fdd50cb44be365289e964576492617e
[ "MIT" ]
11
2017-05-31T19:14:32.000Z
2018-09-12T23:44:11.000Z
pyROI/makeAllMicrographs.py
swharden/ROI-Analysis-Pipeline
e83d96c43fdd50cb44be365289e964576492617e
[ "MIT" ]
2
2017-06-20T17:14:38.000Z
2017-06-20T19:51:34.000Z
import glob import os import subprocess import sys from PIL import Image from PIL import ImageDraw from PIL import ImageFont from PIL import ImageEnhance from PIL import ImageOps import scipy.ndimage import numpy as np def image_convert(fname,saveAs=True,showToo=False): """ Convert weird TIF files into web-fri...
30.0625
82
0.663721
a59ad5bd91a1266df025c59121ec19e4db1a9101
72,206
py
Python
Telegrat-main/Builder.py
Zusyaku/Termux-And-Lali-Linux-V2
b1a1b0841d22d4bf2cc7932b72716d55f070871e
[ "Apache-2.0" ]
2
2021-11-17T03:35:03.000Z
2021-12-08T06:00:31.000Z
Telegrat-main/Builder.py
Zusyaku/Termux-And-Lali-Linux-V2
b1a1b0841d22d4bf2cc7932b72716d55f070871e
[ "Apache-2.0" ]
null
null
null
Telegrat-main/Builder.py
Zusyaku/Termux-And-Lali-Linux-V2
b1a1b0841d22d4bf2cc7932b72716d55f070871e
[ "Apache-2.0" ]
2
2021-11-05T18:07:48.000Z
2022-02-24T21:25:07.000Z
""" Скрипт написал @lamer112311 Обфускация для того, чтоб всякие мрази, вроде slivmens не спиздили код. Интересуют исходники? Пиши в телеграм @lamer112311 """ from pytransform import pyarmor_runtime pyarmor_runtime() __pyarmor__(__name__, __file__, b'\x50\x59\x41\x52\x4d\x4f\x52\x00\x00\x03\x08\x00\x55\x0d\x0d\...
8,022.888889
71,980
0.750076
590bc8a43ab8d13ae7fbb49d795fd35067eebf4e
113
py
Python
book/_build/jupyter_execute/docs/0904_Gase_als_wichtige_Ausgangsstoffe_fuer_Industrierohstoffe.py
tom-tubeless/Chemie
bcd10e84b341121c260526c306f86b1556a6c034
[ "MIT" ]
null
null
null
book/_build/jupyter_execute/docs/0904_Gase_als_wichtige_Ausgangsstoffe_fuer_Industrierohstoffe.py
tom-tubeless/Chemie
bcd10e84b341121c260526c306f86b1556a6c034
[ "MIT" ]
null
null
null
book/_build/jupyter_execute/docs/0904_Gase_als_wichtige_Ausgangsstoffe_fuer_Industrierohstoffe.py
tom-tubeless/Chemie
bcd10e84b341121c260526c306f86b1556a6c034
[ "MIT" ]
null
null
null
#!/usr/bin/env python # coding: utf-8 # # 0904_Gase, wichtige Ausgangsstoffe für Industrierohstoffe # # **8h**
16.142857
61
0.699115
a701f66d4c52b68feb7bb104ee8012317ab6535e
299
py
Python
pyScript/custom_src/Variable.py
Shirazbello/Pyscriptining
0f2c80a9bb10477d65966faeccc7783f20385c1b
[ "MIT" ]
null
null
null
pyScript/custom_src/Variable.py
Shirazbello/Pyscriptining
0f2c80a9bb10477d65966faeccc7783f20385c1b
[ "MIT" ]
null
null
null
pyScript/custom_src/Variable.py
Shirazbello/Pyscriptining
0f2c80a9bb10477d65966faeccc7783f20385c1b
[ "MIT" ]
null
null
null
# unfortunately, I can't accomplish the same with a simple dice ({name: val}) in Script, because I need a ref to an # object in VarsList_VarWidget to always show the current value and stuff class Variable: def __init__(self, name='', val=None): self.name = name self.val = val
33.222222
115
0.692308
a7103fd729de0d0ee5c89c2d97cc91b651a70299
519
py
Python
examples/first_load.py
xinetzone/dash-tests
cd4526caa2f9d906915c31370b3487bdcef92aa4
[ "Apache-2.0" ]
null
null
null
examples/first_load.py
xinetzone/dash-tests
cd4526caa2f9d906915c31370b3487bdcef92aa4
[ "Apache-2.0" ]
12
2021-07-13T12:33:36.000Z
2021-07-14T05:25:19.000Z
examples/first_load.py
xinetzone/dash-book
1f624e87e2aa02c9931318918df969e44bdd2c07
[ "Apache-2.0" ]
null
null
null
from dash.dependencies import Input, Output from dash import html from app import app layout = html.Div( [ html.Button("执行回调", id="button_1"), html.Div(children="回调不执行", id="first_output_1"), html.Div(children="回调不执行", id="second_output_1"), ] ) @app.callback( Output("first_output...
24.714286
74
0.653179
e60063e412b66cf0441adab0c7f22afcc1ffc28a
3,187
py
Python
betriebstechnik/alphabet_trainer.py
mw-ste/amateurfunkausbildung
92c7670a47faec9e20d08e4ab2c0373fbeb4a49e
[ "MIT" ]
null
null
null
betriebstechnik/alphabet_trainer.py
mw-ste/amateurfunkausbildung
92c7670a47faec9e20d08e4ab2c0373fbeb4a49e
[ "MIT" ]
null
null
null
betriebstechnik/alphabet_trainer.py
mw-ste/amateurfunkausbildung
92c7670a47faec9e20d08e4ab2c0373fbeb4a49e
[ "MIT" ]
null
null
null
#!/usr/bin/env python3 # -*- coding: utf-8 -*- """ Created on Thu May 13 13:29:35 2021 @author: michi """ import time import requests from difflib import SequenceMatcher translations = { "A": "Alpha", "B": "Bravo", "C": "Charlie", "D": "Delta", "E": "Echo", "F": "Foxtrott", "G": "Golf", ...
23.962406
99
0.559147
e636200a8e95a2dab6ae0b0c903115bd99abb132
1,240
py
Python
Problems/Depth-First Search/medium/FindLargestValueEachTreeRow/find_largest_value_each_tree_row.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/medium/FindLargestValueEachTreeRow/find_largest_value_each_tree_row.py
dolong2110/Algorithm-By-Problems-Python
31ecc7367aaabdd2b0ac0af7f63ca5796d70c730
[ "MIT" ]
null
null
null
Problems/Depth-First Search/medium/FindLargestValueEachTreeRow/find_largest_value_each_tree_row.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 largestValues(self, root: Optional[TreeNode]) -> List[int]: max_array, self.n = [...
25.306122
68
0.584677
e98e3110ca0fcec2d256d60f9f3763166bd4e53b
1,059
py
Python
setup.py
kkaruso/niv
67ba82c93279db4dae503d4dceec7ba5e9931c0a
[ "MIT" ]
null
null
null
setup.py
kkaruso/niv
67ba82c93279db4dae503d4dceec7ba5e9931c0a
[ "MIT" ]
null
null
null
setup.py
kkaruso/niv
67ba82c93279db4dae503d4dceec7ba5e9931c0a
[ "MIT" ]
null
null
null
""" setup.py for building and distribution """ from setuptools import setup from setuptools import find_packages # Load the README file. with open(file="README.md", mode="r") as readme_handle: long_description = readme_handle.read() setup( name='niv', author='HS Worms Top', version='1.5', descripti...
27.868421
92
0.644004
e995315aa47c3b9afb060fd79c5552d63617c329
568
py
Python
Project Euler/Problem_7/solution.py
Nidita/Data-Structures-Algorithms
7b5198c8d37e9a70dd0885c6eef6dddd9d85d74a
[ "MIT" ]
26
2019-07-17T11:05:43.000Z
2022-02-06T08:31:40.000Z
Project Euler/Problem_7/solution.py
Nidita/Data-Structures-Algorithms
7b5198c8d37e9a70dd0885c6eef6dddd9d85d74a
[ "MIT" ]
7
2019-07-16T19:52:25.000Z
2022-01-08T08:03:44.000Z
Project Euler/Problem_7/solution.py
Nidita/Data-Structures-Algorithms
7b5198c8d37e9a70dd0885c6eef6dddd9d85d74a
[ "MIT" ]
19
2020-01-14T02:44:28.000Z
2021-12-27T17:31:59.000Z
def is_prime(prime): if prime <= 1: return False if prime == 2: return True if prime > 2 and prime%2 == 0: return False import math t = math.floor(math.sqrt(prime)) for i in range(3, 1 + t, 2): if prime % i == 0: return False return True def main(): ...
20.285714
39
0.5
e9c247e719e1654428626b1a09eb64a275666eeb
7,782
py
Python
test/test_card_recognition.py
vidagy/setsolver
1d69dc33768ddb5b2110b6321106947de87cb7ac
[ "Apache-2.0" ]
null
null
null
test/test_card_recognition.py
vidagy/setsolver
1d69dc33768ddb5b2110b6321106947de87cb7ac
[ "Apache-2.0" ]
null
null
null
test/test_card_recognition.py
vidagy/setsolver
1d69dc33768ddb5b2110b6321106947de87cb7ac
[ "Apache-2.0" ]
null
null
null
import os import pickle from unittest import TestCase from setsolver.image_detection.card_recognition import CardRecognition path = os.path.join(os.path.dirname(os.path.abspath(__file__))) class TestSetFinder(TestCase): solutions_number5 = { 0: 3, 1: 1, 2: 2, 3: 1, 4: 2, ...
23.023669
78
0.439604
75766fbd5e48a853383378dbb490c9d576953b25
5,216
py
Python
sandbox/plot.py
colormotor/sandbox
b0f86c33fc3e27e87009508de93e79e14bb6241d
[ "MIT" ]
2
2019-01-23T19:39:17.000Z
2020-10-26T11:55:44.000Z
sandbox/plot.py
colormotor/sandbox
b0f86c33fc3e27e87009508de93e79e14bb6241d
[ "MIT" ]
null
null
null
sandbox/plot.py
colormotor/sandbox
b0f86c33fc3e27e87009508de93e79e14bb6241d
[ "MIT" ]
null
null
null
from cm import * import numpy as np class Figure: def __init__(self): self.box = Box(0, 0, 300, 500) self.reset() def reset(self): self.Xs = [] self.Ys = [] self.markers = [] self.vlines = [] self.colors = [] self.axis = 'normal' ...
26.886598
84
0.421204
f95a9a50aa73827e84978b80de26938cea26b3b4
298
py
Python
exercise5.py
nikhadif/Advanced-Programming
e5bf4f5014c17c252bc0cb93c9d44c7c615b79c0
[ "MIT" ]
1
2020-11-21T16:57:40.000Z
2020-11-21T16:57:40.000Z
exercise5.py
nikhadif/Advanced-Programming
e5bf4f5014c17c252bc0cb93c9d44c7c615b79c0
[ "MIT" ]
null
null
null
exercise5.py
nikhadif/Advanced-Programming
e5bf4f5014c17c252bc0cb93c9d44c7c615b79c0
[ "MIT" ]
null
null
null
import matplotlib.pyplot as plt x = [0, 1, 2, 3] y = [10, 100, 50, 80] x2 = [0, 1, 2, 3] y2 = [100, 70, 30, 30] plt.bar(x, y, label="First Line") plt.bar(x2,y2, label="Second Line") plt.xlabel("Plot Number") plt.ylabel("sample Value") plt.title(" Sample Data\n 0 - 100") plt.legend() plt.show()
18.625
35
0.61745
fb01f3da5b4324e2f1120298b17d5023f4d4863e
387
py
Python
Source/10_XML_RPC/server.py
rbiotblbk/WBS_T9_2022
533156db88ff2fe676564b0e5d6e84e888ab0916
[ "MIT" ]
1
2022-02-28T09:49:35.000Z
2022-02-28T09:49:35.000Z
Source/10_XML_RPC/server.py
rbiotblbk/WBS_T9_2022
533156db88ff2fe676564b0e5d6e84e888ab0916
[ "MIT" ]
null
null
null
Source/10_XML_RPC/server.py
rbiotblbk/WBS_T9_2022
533156db88ff2fe676564b0e5d6e84e888ab0916
[ "MIT" ]
null
null
null
from xmlrpc.server import SimpleXMLRPCServer as Server # Define functions def addieren(x,y): return x + y def subtrahieren(x,y): return x - y # Create a Server with Tuple [IP, PORT] srv = Server(("127.0.0.1", 40000)) # Register the functions to the server srv.register_function(addieren) srv.registe...
16.125
55
0.718346
fb132be710ba0585d6ce390e8bf0a04b56c9fe8f
11,983
py
Python
program/simulation.py
SimonSkade/BwKI_autonome_Verkehrslenkung
41d84ce2103a4338893dc610a46f7b115d584635
[ "MIT" ]
4
2019-08-22T19:16:28.000Z
2019-10-27T07:09:09.000Z
program/simulation.py
SimonSkade/BwKI_autonome_Verkehrslenkung
41d84ce2103a4338893dc610a46f7b115d584635
[ "MIT" ]
null
null
null
program/simulation.py
SimonSkade/BwKI_autonome_Verkehrslenkung
41d84ce2103a4338893dc610a46f7b115d584635
[ "MIT" ]
null
null
null
import numpy as np import matplotlib.pyplot as plt import networkx as nx from environment import net #In dieser Datei sollen verschiedene Funktionen geschrieben werden, die eine realistische und praktische Simulation ermöglichen #Mehrere Zentren wären gut def generate_nodepositions_per_center(n_nodes, space_size): #ge...
50.775424
277
0.75966
34e645532e2a64e4e17d4413ca6e41207457c062
752
py
Python
python/test/building_good_tests/test_landing_page.py
zeroam/TIL
43e3573be44c7f7aa4600ff8a34e99a65cbdc5d1
[ "MIT" ]
null
null
null
python/test/building_good_tests/test_landing_page.py
zeroam/TIL
43e3573be44c7f7aa4600ff8a34e99a65cbdc5d1
[ "MIT" ]
null
null
null
python/test/building_good_tests/test_landing_page.py
zeroam/TIL
43e3573be44c7f7aa4600ff8a34e99a65cbdc5d1
[ "MIT" ]
null
null
null
import pytest class LoginPage: def __init__(self, driver): self.driver = driver class LandingPage: def __init__(self, driver): self.driver = driver class TestAfterLogin: @pytest.fixture(scope="class", autouse=True) def login_page(self, driver): driver.get("h...
24.258065
67
0.62766
32d5984668d05046fb1cd292d33ddcb4eedd5bbb
8,153
py
Python
research/cv/IRN/eval.py
leelige/mindspore
5199e05ba3888963473f2b07da3f7bca5b9ef6dc
[ "Apache-2.0" ]
77
2021-10-15T08:32:37.000Z
2022-03-30T13:09:11.000Z
research/cv/IRN/eval.py
leelige/mindspore
5199e05ba3888963473f2b07da3f7bca5b9ef6dc
[ "Apache-2.0" ]
3
2021-10-30T14:44:57.000Z
2022-02-14T06:57:57.000Z
research/cv/IRN/eval.py
leelige/mindspore
5199e05ba3888963473f2b07da3f7bca5b9ef6dc
[ "Apache-2.0" ]
24
2021-10-15T08:32:45.000Z
2022-03-24T18:45:20.000Z
# Copyright 2021 Huawei Technologies Co., Ltd # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to...
40.162562
116
0.619404
1fbf118f5abb6836204dddeeb03f07d9899c2619
4,911
py
Python
bloatware.hunter.py
Piloair/Bloatware-Hunter
5269425ce393c3b34937ef0b720012c16f6459f5
[ "MIT" ]
null
null
null
bloatware.hunter.py
Piloair/Bloatware-Hunter
5269425ce393c3b34937ef0b720012c16f6459f5
[ "MIT" ]
null
null
null
bloatware.hunter.py
Piloair/Bloatware-Hunter
5269425ce393c3b34937ef0b720012c16f6459f5
[ "MIT" ]
null
null
null
import os import subprocess import time from datetime import date from datetime import datetime def inicio(): os.system ("echo off") os.system ("color 1A") os.system ("cls") os.system ("title = Blotware.hunter 1.0") def configuracion_inicial(): global continuar continuar = False archivo_configuracio...
38.069767
134
0.618408
1f069750ad7221050001d9e684f677a925be3fda
399
py
Python
6.py
alvinbengeorge/HackerRank
11101db16df57736cbcacd0a7d9e0b61069ba750
[ "MIT" ]
1
2021-11-06T13:24:58.000Z
2021-11-06T13:24:58.000Z
6.py
alvinbengeorge/HackerRank
11101db16df57736cbcacd0a7d9e0b61069ba750
[ "MIT" ]
null
null
null
6.py
alvinbengeorge/HackerRank
11101db16df57736cbcacd0a7d9e0b61069ba750
[ "MIT" ]
null
null
null
# https://www.hackerrank.com/challenges/py-if-else/problem?isFullScreen=true #!/bin/python3 import math import os import random import re import sys if __name__ == '__main__': n = int(input().strip()) if n%2!=0: print("Weird") else: if n>=2 and n<=5: print("Not Weird") ...
19.95
77
0.576441
1f24059e9903bc5a359ff6508fcafa520b3ed7c5
2,085
py
Python
packages/watchmen-storage-mssql/src/watchmen_storage_mssql/storage_mssql_configuration.py
Indexical-Metrics-Measure-Advisory/watchmen
c54ec54d9f91034a38e51fd339ba66453d2c7a6d
[ "MIT" ]
null
null
null
packages/watchmen-storage-mssql/src/watchmen_storage_mssql/storage_mssql_configuration.py
Indexical-Metrics-Measure-Advisory/watchmen
c54ec54d9f91034a38e51fd339ba66453d2c7a6d
[ "MIT" ]
null
null
null
packages/watchmen-storage-mssql/src/watchmen_storage_mssql/storage_mssql_configuration.py
Indexical-Metrics-Measure-Advisory/watchmen
c54ec54d9f91034a38e51fd339ba66453d2c7a6d
[ "MIT" ]
null
null
null
from __future__ import annotations from watchmen_model.system import DataSource, DataSourceType from .data_source_mssql import MSSQLDataSourceHelper, MSSQLDataSourceParams from .storage_mssql import StorageMSSQL, TopicDataStorageMSSQL # noinspection PyRedeclaration class Configuration: dataSource: DataSource = Data...
31.119403
92
0.777458
23bedde423374abdd3e12fabc7fce62f5bcf5ff7
447
py
Python
Codeforces_problems/Team/solution.py
gbrls/CompetitiveCode
b6f1b817a655635c3c843d40bd05793406fea9c6
[ "MIT" ]
165
2020-10-03T08:01:11.000Z
2022-03-31T02:42:08.000Z
Codeforces_problems/Team/solution.py
gbrls/CompetitiveCode
b6f1b817a655635c3c843d40bd05793406fea9c6
[ "MIT" ]
383
2020-10-03T07:39:11.000Z
2021-11-20T07:06:35.000Z
Codeforces_problems/Team/solution.py
gbrls/CompetitiveCode
b6f1b817a655635c3c843d40bd05793406fea9c6
[ "MIT" ]
380
2020-10-03T08:05:04.000Z
2022-03-19T06:56:59.000Z
n = int(input()) #taking number of test cases as input sures = [] #list for appending sureties of all 3 count = 0 for i in range(0,n): x = [int(x) for x in input().split()] #taking 3 elements as list together and appending in list sures[] sures.append(x) if x.count(1)>=2: #if more than 2 people are sure, th...
44.7
107
0.691275
7b785a0bc7d588dab8387a55ac78548b5844b8c4
2,407
py
Python
website-addons-14.0/website_seo_url/ir_http.py
Reathline/DOD_PODCAST
ffadd4bd11f268d9983668b87348f29dd2f4a6a5
[ "MIT" ]
null
null
null
website-addons-14.0/website_seo_url/ir_http.py
Reathline/DOD_PODCAST
ffadd4bd11f268d9983668b87348f29dd2f4a6a5
[ "MIT" ]
null
null
null
website-addons-14.0/website_seo_url/ir_http.py
Reathline/DOD_PODCAST
ffadd4bd11f268d9983668b87348f29dd2f4a6a5
[ "MIT" ]
null
null
null
# Copyright 2021 Denis Mudarisov <https://github.com/trojikman> # Copyright 2021 Ivan Yelizariev <https://twitter.com/yelizariev> # License MIT (https://opensource.org/licenses/MIT). from odoo import api, models from odoo.http import request import odoo.addons.http_routing.models.ir_http as ir_http_file from odoo.add...
33.430556
82
0.599501
b554f306d2a3e5a720050c3df2e656872d37ada5
28,877
py
Python
plotting/scripts/plot_validation_paper.py
metxchris/MMM-Explorer
251b4d7af56241882611bc47e94ec2923e4be8da
[ "MIT" ]
null
null
null
plotting/scripts/plot_validation_paper.py
metxchris/MMM-Explorer
251b4d7af56241882611bc47e94ec2923e4be8da
[ "MIT" ]
null
null
null
plotting/scripts/plot_validation_paper.py
metxchris/MMM-Explorer
251b4d7af56241882611bc47e94ec2923e4be8da
[ "MIT" ]
null
null
null
#!/usr/bin/python3 """General non-automated plotting for the ETGM paper Discharges listed below EAST: * 80208: T04, R02 xo, q * 85122: T04, W57, q * 85124: T02, W02 * 85126: T02, W05, q * 85610: T01, W02 * 90328: T01, W23 KSTR: * 15334: T03, P01 * 16295: T10, P03 xx * 16296: T10, P02 xx * 16297: T01, P02 xx * 16299...
38.247682
132
0.492018
a93d1580f541a02de9a51ea2593ebe6d38d03f89
1,904
py
Python
test/test_npu/test_network_ops/test_layer_norm_eval.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_layer_norm_eval.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_layer_norm_eval.py
Ascend/pytorch
39849cf72dafe8d2fb68bd1679d8fd54ad60fcfc
[ "BSD-3-Clause" ]
null
null
null
# Copyright (c) 2020 Huawei Technologies Co., Ltd # Copyright (c) 2019, Facebook CORPORATION. # 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/lice...
37.333333
90
0.674895
8d6e14460068aec460677fa3a6968e0f9218f4fc
6,956
py
Python
wz/ui/grade_grid_single.py
gradgrind/WZ
672d93a3c9d7806194d16d6d5b9175e4046bd068
[ "Apache-2.0" ]
null
null
null
wz/ui/grade_grid_single.py
gradgrind/WZ
672d93a3c9d7806194d16d6d5b9175e4046bd068
[ "Apache-2.0" ]
null
null
null
wz/ui/grade_grid_single.py
gradgrind/WZ
672d93a3c9d7806194d16d6d5b9175e4046bd068
[ "Apache-2.0" ]
null
null
null
# -*- coding: utf-8 -*- """ ui/grade_grid_single.py Last updated: 2021-03-02 Manage the grid for the grade-editor (single pupil). =+LICENCE============================= Copyright 2021 Michael Towers Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in complianc...
38.21978
75
0.593157
5704b0295676c6d20976800b5981185a39903ef8
2,483
py
Python
src/test/test_discriminative.py
kaphka/imi-master-thesis
2331a3534dc32e30a1333bb21c68c1e1b07ec9e4
[ "MIT" ]
2
2018-04-27T09:02:15.000Z
2019-04-19T19:12:13.000Z
src/test/test_discriminative.py
kaphka/imi-master-thesis
2331a3534dc32e30a1333bb21c68c1e1b07ec9e4
[ "MIT" ]
1
2019-04-19T19:13:08.000Z
2021-02-22T21:29:55.000Z
src/test/test_discriminative.py
kaphka/imi-master-thesis
2331a3534dc32e30a1333bb21c68c1e1b07ec9e4
[ "MIT" ]
null
null
null
import models.selfsupervised.discriminative as dis import numpy as np import torch as t import torch.autograd as grad import test.mock from torch.utils.data import DataLoader from torchvision.datasets import MNIST import torchvision.transforms as transforms from experiment.data import Environment def test_triplet_lo...
31.43038
94
0.666935
93f42d3bd93aa26629da14f358f8e057c18aa7ff
2,972
py
Python
HackerEarth_problems/Xenny and Partially Sorted Strings/solution.py
gbrls/CompetitiveCode
b6f1b817a655635c3c843d40bd05793406fea9c6
[ "MIT" ]
165
2020-10-03T08:01:11.000Z
2022-03-31T02:42:08.000Z
HackerEarth_problems/Xenny and Partially Sorted Strings/solution.py
gbrls/CompetitiveCode
b6f1b817a655635c3c843d40bd05793406fea9c6
[ "MIT" ]
383
2020-10-03T07:39:11.000Z
2021-11-20T07:06:35.000Z
HackerEarth_problems/Xenny and Partially Sorted Strings/solution.py
gbrls/CompetitiveCode
b6f1b817a655635c3c843d40bd05793406fea9c6
[ "MIT" ]
380
2020-10-03T08:05:04.000Z
2022-03-19T06:56:59.000Z
''' Problem: Xenny and Partially Sorted Strings Accept number of testcases as t for each test case: Given 3 integers N, K, M for each test case. Do the following steps- Accept all N number of strings and store them in a list sort the list by only considering first m charcaters in every element of l...
51.241379
128
0.711642
5fd87ac6ca3cf3a04b6fbb1daaec10faf3801028
2,048
py
Python
src/bo4e/enum/messpreistyp.py
bo4e/BO4E-python
28b12f853c8a496d14b133759b7aa2d6661f79a0
[ "MIT" ]
1
2022-03-02T12:49:44.000Z
2022-03-02T12:49:44.000Z
src/bo4e/enum/messpreistyp.py
bo4e/BO4E-python
28b12f853c8a496d14b133759b7aa2d6661f79a0
[ "MIT" ]
21
2022-02-04T07:38:46.000Z
2022-03-28T14:01:53.000Z
src/bo4e/enum/messpreistyp.py
bo4e/BO4E-python
28b12f853c8a496d14b133759b7aa2d6661f79a0
[ "MIT" ]
null
null
null
# pylint: disable=missing-module-docstring from bo4e.enum.strenum import StrEnum class Messpreistyp(StrEnum): """ Festlegung, welcher Typ von Messung mit einem Preis belegt wird """ MESSPREIS_G2_5 = "MESSPREIS_G2_5" #: MESSPREIS_G2_5 MESSPREIS_G4 = "MESSPREIS_G4" #: MESSPREIS_G4 MESSPREIS_G...
60.235294
98
0.79834
278d26a67e2a84389521afb3982497f737d1a684
800
py
Python
code/so_chrono/pull.py
niplav/site
09380a8585e6b067c4cce23da13ca9601320bd51
[ "MIT" ]
2
2022-02-09T14:02:59.000Z
2022-03-23T11:50:47.000Z
code/so_chrono/pull.py
niplav/site
09380a8585e6b067c4cce23da13ca9601320bd51
[ "MIT" ]
null
null
null
code/so_chrono/pull.py
niplav/site
09380a8585e6b067c4cce23da13ca9601320bd51
[ "MIT" ]
null
null
null
import urllib2 from bs4 import BeautifulSoup import sys import datetime author='Scott Aaronson' for year in range(2005, datetime.datetime.now().year+1): yearposts=[] for page in range(1, 100): url='https://www.scottaaronson.com/blog/?m={}1&paged={}'.format(year, page) req=urllib2.Request(url, headers={'User-Age...
27.586207
95
0.6725
fd800b4d3cf70a57f60856edd10ff39385c249b3
444
py
Python
Zinssatz_Vorlesung.py
B0mM3L6000/EiP
f68718f95a2d3cde8ead62b6134ac1b5068881a5
[ "MIT" ]
1
2018-04-18T19:10:06.000Z
2018-04-18T19:10:06.000Z
Zinssatz_Vorlesung.py
B0mM3L6000/EiP
f68718f95a2d3cde8ead62b6134ac1b5068881a5
[ "MIT" ]
null
null
null
Zinssatz_Vorlesung.py
B0mM3L6000/EiP
f68718f95a2d3cde8ead62b6134ac1b5068881a5
[ "MIT" ]
1
2018-04-29T08:48:00.000Z
2018-04-29T08:48:00.000Z
#K Kapital #p Zinssatz #Z Zinsen #Programmablauf und Symbole # Start (kreis/Elipse) -> Eingabe K durch Nutzer (Parallalelogramm) -> p ist gesetzt auf 0.02 (Rechteck) # -> Z = K*p (Rechteck) -> Aushabe Z (Parallelogramm) -> Ende (Kreis/Elipse) #Programm: #Eingabe K: K = input("Wieviel Kapital hast du?") #Se...
17.076923
106
0.666667
fdd874ebef69dcf89080556c188df3e2bed2a12a
4,131
py
Python
reroll.py
linkian209/reroll
69075129806fa752d9a4a75bfd8e0b50c41e0bc0
[ "MIT" ]
null
null
null
reroll.py
linkian209/reroll
69075129806fa752d9a4a75bfd8e0b50c41e0bc0
[ "MIT" ]
null
null
null
reroll.py
linkian209/reroll
69075129806fa752d9a4a75bfd8e0b50c41e0bc0
[ "MIT" ]
null
null
null
import requests import numpy as np from io import BytesIO from PIL import Image, ImageEnhance # API data keys we care about for images keys = [ 'mini_base', 'pet', 'cloak', 'off_hand', 'body', 'hair', 'face', 'legs', 'feet', 'chest', 'head', 'waist', 'hands', 'main_hand', 'horns', 'wings', 'tattoo', 'ears'...
35.612069
94
0.530864
e333471f4b581c0d5290edb823e840ba9f94a1b1
380
py
Python
LeetCode_problems/XOR Operation in an Array/solution.py
gbrls/CompetitiveCode
b6f1b817a655635c3c843d40bd05793406fea9c6
[ "MIT" ]
165
2020-10-03T08:01:11.000Z
2022-03-31T02:42:08.000Z
LeetCode_problems/XOR Operation in an Array/solution.py
gbrls/CompetitiveCode
b6f1b817a655635c3c843d40bd05793406fea9c6
[ "MIT" ]
383
2020-10-03T07:39:11.000Z
2021-11-20T07:06:35.000Z
LeetCode_problems/XOR Operation in an Array/solution.py
gbrls/CompetitiveCode
b6f1b817a655635c3c843d40bd05793406fea9c6
[ "MIT" ]
380
2020-10-03T08:05:04.000Z
2022-03-19T06:56:59.000Z
class Solution: def xorOperation(self, n: int, start: int) -> int: # build the initial array of numbers following the formula nums = list() for i in range(n): nums.append(2 * i + start) # compute the xor of all of the numbers xor = nums[0] for...
29.230769
66
0.521053
8bbad0c640a4fc1163c97e7f34c49237917af90b
1,351
py
Python
__openerp__.py
aroodooteam/aro_hr
bf26f026593493486b4b5c13b26b9b47b9fe3825
[ "BSD-2-Clause" ]
null
null
null
__openerp__.py
aroodooteam/aro_hr
bf26f026593493486b4b5c13b26b9b47b9fe3825
[ "BSD-2-Clause" ]
null
null
null
__openerp__.py
aroodooteam/aro_hr
bf26f026593493486b4b5c13b26b9b47b9fe3825
[ "BSD-2-Clause" ]
3
2017-09-11T08:02:11.000Z
2020-04-04T08:13:23.000Z
# -*- coding: utf-8 -*- { 'name': 'ARO HR', 'version': '0.1', 'author': 'Rakotomalala Haritiana <haryoran04@gmail.com>', 'category': 'Tools', 'complexity': 'normal', 'data': [ # 'data/templates.xml', # un comment to enable js, css code # 'security/security.xml', #'securi...
27.571429
67
0.570688
47588213525fb7929c80e979e842ba67afa97beb
1,028
py
Python
source-code/Pseudocode/SolveLinearCongruences/solveLinearCongruences.py
keithmannock/LaTeX-examples
6829f6cf9710b314a4bf0b64abdae5bcf6997fd0
[ "MIT" ]
2
2017-11-02T10:09:12.000Z
2017-11-24T22:16:18.000Z
source-code/Pseudocode/SolveLinearCongruences/solveLinearCongruences.py
everbot/LaTeX-examples
9558d8b3c19776cb068b9753dcd3f88645dd7134
[ "MIT" ]
null
null
null
source-code/Pseudocode/SolveLinearCongruences/solveLinearCongruences.py
everbot/LaTeX-examples
9558d8b3c19776cb068b9753dcd3f88645dd7134
[ "MIT" ]
null
null
null
#!/usr/bin/env python # -*- coding: utf-8 -*- def ExtendedEuclideanAlgorithm(a, b): """ Calculates gcd(a,b) and a linear combination such that gcd(a,b) = a*x + b*y As a side effect: If gcd(a,b) = 1 = a*x + b*y Then x is multiplicative inverse of a modulo b. """ aO, bO = a, b x=lasty=0 y=lastx=1 while...
20.56
62
0.603113
4790f32a7f9f24d5daca6dde3f7244b8ddb3cd12
373
py
Python
python/requests/python_requests_library_guide/customize_authenticate.py
zeroam/TIL
43e3573be44c7f7aa4600ff8a34e99a65cbdc5d1
[ "MIT" ]
null
null
null
python/requests/python_requests_library_guide/customize_authenticate.py
zeroam/TIL
43e3573be44c7f7aa4600ff8a34e99a65cbdc5d1
[ "MIT" ]
null
null
null
python/requests/python_requests_library_guide/customize_authenticate.py
zeroam/TIL
43e3573be44c7f7aa4600ff8a34e99a65cbdc5d1
[ "MIT" ]
null
null
null
import requests from requests.auth import AuthBase class TokenAuth(AuthBase): """커스텀 인증 클래스 구현""" def __init__(self, token): self.token = token def __call__(self, r): """API 토큰을 헤더에 추가한다""" r.headers['X-TokenAuth'] = f'{self.token}' return r print(requests.get('https://ht...
23.3125
82
0.632708
47e00aed7179f5b9b5b578d84b3e46e781f8d5a7
2,049
py
Python
frds/io/wrds/__init__.py
mgao6767/wrds
7dca2651a181bf38c61ebde675c9f64d6c96f608
[ "MIT" ]
31
2020-06-17T13:19:12.000Z
2022-03-27T08:56:38.000Z
frds/io/wrds/__init__.py
mgao6767/wrds
7dca2651a181bf38c61ebde675c9f64d6c96f608
[ "MIT" ]
null
null
null
frds/io/wrds/__init__.py
mgao6767/wrds
7dca2651a181bf38c61ebde675c9f64d6c96f608
[ "MIT" ]
8
2020-06-14T15:21:51.000Z
2021-09-29T06:28:53.000Z
import os import json import pandas as pd import sqlalchemy as sa from frds.data import CREDENTIALS_FILE_PATH from frds.data.wrds import WRDSDataset from frds.io.wrds.connection import Connection, CredentialsError def setup(username="", password="", save_credentials=False): credentials = dict() if os.path.ex...
28.859155
85
0.651537
324ec3e9f4e691a4f84a5cd9fdbe5aee6558b1dc
869
py
Python
LeetCode_problems/add-binary/Solution.py
gbrls/CompetitiveCode
b6f1b817a655635c3c843d40bd05793406fea9c6
[ "MIT" ]
165
2020-10-03T08:01:11.000Z
2022-03-31T02:42:08.000Z
LeetCode_problems/add-binary/Solution.py
gbrls/CompetitiveCode
b6f1b817a655635c3c843d40bd05793406fea9c6
[ "MIT" ]
383
2020-10-03T07:39:11.000Z
2021-11-20T07:06:35.000Z
LeetCode_problems/add-binary/Solution.py
gbrls/CompetitiveCode
b6f1b817a655635c3c843d40bd05793406fea9c6
[ "MIT" ]
380
2020-10-03T08:05:04.000Z
2022-03-19T06:56:59.000Z
# -*- coding: utf-8 -*- """ Created on Mon Oct 5 2020 @author: Shrey1608 """ ''' Given two binary strings, return their sum (also a binary string). The input strings are both non-empty and contains only characters 1 or 0.''' # Approach : 1) basic binary conversion into int then compute the sum and then convert agai...
29.965517
156
0.611047
08b676a93b35234f8a8bd143bd7110e3562d570e
7,690
py
Python
bot.py
sah-py/SolveMyProblem
e569027b6aae65a1b7a4d480633adbb32becb329
[ "MIT" ]
null
null
null
bot.py
sah-py/SolveMyProblem
e569027b6aae65a1b7a4d480633adbb32becb329
[ "MIT" ]
null
null
null
bot.py
sah-py/SolveMyProblem
e569027b6aae65a1b7a4d480633adbb32becb329
[ "MIT" ]
1
2020-03-07T22:03:13.000Z
2020-03-07T22:03:13.000Z
import asyncio from os import environ from googletrans import Translator, LANGUAGES from telebotapi.telebotapi import Bot from solvemyproblem.znanija import AsyncZnanija from solvemyproblem.tigeralgebra import AsyncTigerAlgebra from solvemyproblem.wikipedia import Wikipedia bot = Bot(environ('token'), pr...
32.863248
103
0.549285
de84b85522ae10fcb4ce13849e7ccb813b020c6e
306
py
Python
SAT/views/getTime.py
Riddikulus/SAT
98a474a9f6d43b22f6d18770e4c1e961ce890634
[ "Apache-2.0" ]
null
null
null
SAT/views/getTime.py
Riddikulus/SAT
98a474a9f6d43b22f6d18770e4c1e961ce890634
[ "Apache-2.0" ]
null
null
null
SAT/views/getTime.py
Riddikulus/SAT
98a474a9f6d43b22f6d18770e4c1e961ce890634
[ "Apache-2.0" ]
null
null
null
from django.http import HttpResponse, JsonResponse def getTime(request): # Get an HttpRequest - the request parameter # perform operations using information from the request. # Return HttpResponse response = JsonResponse({1:'a', 2:'b', 3:''}, safe=False) return HttpResponse(response)
34
61
0.722222
dea7baa523f9d38b5031cd5e66dcd553b25224b8
12,330
py
Python
src/onegov/form/parser/form.py
politbuero-kampagnen/onegov-cloud
20148bf321b71f617b64376fe7249b2b9b9c4aa9
[ "MIT" ]
null
null
null
src/onegov/form/parser/form.py
politbuero-kampagnen/onegov-cloud
20148bf321b71f617b64376fe7249b2b9b9c4aa9
[ "MIT" ]
null
null
null
src/onegov/form/parser/form.py
politbuero-kampagnen/onegov-cloud
20148bf321b71f617b64376fe7249b2b9b9c4aa9
[ "MIT" ]
null
null
null
from html import escape from onegov.form import errors from onegov.form.core import FieldDependency from onegov.form.core import Form from onegov.form.fields import MultiCheckboxField, DateTimeLocalField from onegov.form.fields import UploadField from onegov.form.parser.core import parse_formcode from onegov.form.utils...
32.447368
79
0.618897
19d808c3f5b95e6c8cbbc61bd8c67434b04b32d1
1,439
py
Python
src/onegov/quill/fields.py
politbuero-kampagnen/onegov-cloud
20148bf321b71f617b64376fe7249b2b9b9c4aa9
[ "MIT" ]
null
null
null
src/onegov/quill/fields.py
politbuero-kampagnen/onegov-cloud
20148bf321b71f617b64376fe7249b2b9b9c4aa9
[ "MIT" ]
null
null
null
src/onegov/quill/fields.py
politbuero-kampagnen/onegov-cloud
20148bf321b71f617b64376fe7249b2b9b9c4aa9
[ "MIT" ]
null
null
null
from bleach.sanitizer import Cleaner from onegov.quill.widgets import QuillInput from onegov.quill.widgets import TAGS from wtforms import TextAreaField class QuillField(TextAreaField): """ A textfield using the quill editor and with integrated sanitation. Allows to specifiy which tags to use in the editor a...
30.617021
76
0.641418
5f05d902bd7cd7e83faa120c9ad5130ea094d802
585
py
Python
src/third_party_module/deal_with_database/pycharm_python3_oracle.py
HuangHuaBingZiGe/GitHub-Demo
f3710f73b0828ef500343932d46c61d3b1e04ba9
[ "Apache-2.0" ]
null
null
null
src/third_party_module/deal_with_database/pycharm_python3_oracle.py
HuangHuaBingZiGe/GitHub-Demo
f3710f73b0828ef500343932d46c61d3b1e04ba9
[ "Apache-2.0" ]
null
null
null
src/third_party_module/deal_with_database/pycharm_python3_oracle.py
HuangHuaBingZiGe/GitHub-Demo
f3710f73b0828ef500343932d46c61d3b1e04ba9
[ "Apache-2.0" ]
null
null
null
#!-*- encoding: utf-8 -*- import cx_Oracle as oracle ''' 连接方法1: conn = oracle.connect('bingzi','123456','localhost:1521/orcl') 连接方法2: conn = oracle.connect('bingzi/123456@localhost/orcl') conn = oracle.connect('user_name','password','ip:1521/service_name') sql=cur.execute('SELECT * FROM wyz_test') sql=cur.execute('SE...
27.857143
70
0.712821
26b62c6ee121db582d3a23c28b8c1404682f306c
3,626
py
Python
test/test_npu/test_network_ops/test_full_like.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_full_like.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_full_like.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...
41.678161
74
0.723387
5fc5d05534fa69ddabc98ed909fcecf2ac769e87
5,763
py
Python
mmutils.py
rJIaDuaTOP/backtester
90035e005a0eaf0113cacfbe36341df5fa2b4f42
[ "MIT" ]
null
null
null
mmutils.py
rJIaDuaTOP/backtester
90035e005a0eaf0113cacfbe36341df5fa2b4f42
[ "MIT" ]
null
null
null
mmutils.py
rJIaDuaTOP/backtester
90035e005a0eaf0113cacfbe36341df5fa2b4f42
[ "MIT" ]
null
null
null
from collections import deque class MovingAverage: def __init__(self, size): self.que = deque([]) self.size = size self.total = 0.0 def next(self, val): # write your code here if len(self.que) < self.size: self.total += val self.que...
35.140244
96
0.476141
840f821af4f538731ab20840bbcc038cfa62f1e7
4,965
py
Python
test-python/test_punkte.py
jupfi81/NotenManager
ee96a41088bb898c025aed7b3c904741cb71d004
[ "MIT" ]
null
null
null
test-python/test_punkte.py
jupfi81/NotenManager
ee96a41088bb898c025aed7b3c904741cb71d004
[ "MIT" ]
null
null
null
test-python/test_punkte.py
jupfi81/NotenManager
ee96a41088bb898c025aed7b3c904741cb71d004
[ "MIT" ]
null
null
null
""" Teste punkte.py""" import unittest import tempfile import csv import bewerte.punkte as punkte class TestPunkte(unittest.TestCase): """ Teste PunkteZaehler """ def test_init(self): """ Teste die Funktion __init__ """ messung = punkte.PunkteZaehler() self.assertEqual(messung.tabelle...
36.777778
98
0.506546
fff710b61db539bcee91ae4d5ce3da98b6aee1c4
5,194
py
Python
LibMS/settings.py
StephenWayen/LibMS
df6078a8171f77b75f2ad3ac91e9747ef753d2a6
[ "MIT" ]
2
2021-05-31T13:11:50.000Z
2021-06-05T04:37:51.000Z
LibMS/settings.py
StephenWayen/LibMS
df6078a8171f77b75f2ad3ac91e9747ef753d2a6
[ "MIT" ]
null
null
null
LibMS/settings.py
StephenWayen/LibMS
df6078a8171f77b75f2ad3ac91e9747ef753d2a6
[ "MIT" ]
null
null
null
""" Django settings for LibMS project. Generated by 'django-admin startproject' using Django 3.0.7. For more information on this file, see https://docs.djangoproject.com/en/3.0/topics/settings/ For the full list of settings and their values, see https://docs.djangoproject.com/en/3.0/ref/settings/ """ import os # B...
25.840796
107
0.616673
8a3ee13786c6d595ea2247e28cdbf824c4d02f8b
8,372
py
Python
networks/conv_net.py
kkahloots/Generative-Models-03
5399fb8a504543b0a4196a81b182ead79ee247df
[ "MIT" ]
null
null
null
networks/conv_net.py
kkahloots/Generative-Models-03
5399fb8a504543b0a4196a81b182ead79ee247df
[ "MIT" ]
null
null
null
networks/conv_net.py
kkahloots/Generative-Models-03
5399fb8a504543b0a4196a81b182ead79ee247df
[ "MIT" ]
null
null
null
""" Created on Thu Sep 13 00:32:57 2018 @author: pablosanchez """ import tensorflow as tf from networks.dense_net import DenseNet class ConvNet(object): def __init__(self, hidden_dim, output_dim, reuse, transfer_fct=tf.nn.relu, act_out=tf.nn.sigmoid, drop_rate=0.2, batch_norm=True, ki...
43.604167
142
0.457238
76f82d9ccc2c7606b836067cb27b16df9360c70d
323
py
Python
pacman-termux/test/pacman/tests/query010.py
Maxython/pacman-for-termux
3b208eb9274cbfc7a27fca673ea8a58f09ebad47
[ "MIT" ]
23
2021-05-21T19:11:06.000Z
2022-03-31T18:14:20.000Z
source/pacman-6.0.1/test/pacman/tests/query010.py
Scottx86-64/dotfiles-1
51004b1e2b032664cce6b553d2052757c286087d
[ "Unlicense" ]
11
2021-05-21T12:08:44.000Z
2021-12-21T08:30:08.000Z
source/pacman-6.0.1/test/pacman/tests/query010.py
Scottx86-64/dotfiles-1
51004b1e2b032664cce6b553d2052757c286087d
[ "Unlicense" ]
1
2021-09-26T08:44:40.000Z
2021-09-26T08:44:40.000Z
self.description = "Query info on a package (optdep install status [uninstalled])" optstr = "dep: for foobar" pkg = pmpkg("dummy", "1.0-2") pkg.optdepends = [optstr] self.addpkg2db("local", pkg) self.args = "-Qi %s" % pkg.name self.addrule("PACMAN_RETCODE=0") self.addrule("PACMAN_OUTPUT=^Optional Deps.*%s$" % optst...
24.846154
82
0.696594
7caa3833078e6940e5c54cd7150df43feaf56d5d
1,868
py
Python
python/en/archive/books/jump2python/j2p-02_2_1-strings_wt_single_double_triple_quotes.py
aimldl/coding
70ddbfaa454ab92fd072ee8dc614ecc330b34a70
[ "MIT" ]
null
null
null
python/en/archive/books/jump2python/j2p-02_2_1-strings_wt_single_double_triple_quotes.py
aimldl/coding
70ddbfaa454ab92fd072ee8dc614ecc330b34a70
[ "MIT" ]
null
null
null
python/en/archive/books/jump2python/j2p-02_2_1-strings_wt_single_double_triple_quotes.py
aimldl/coding
70ddbfaa454ab92fd072ee8dc614ecc330b34a70
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- """ jump2python-02_2-strings_wt_single_double_triple_quotes.py jump2python-02_2-문자열 자료형 """ # Single quote '' 'Python is fun' # Double quote "" "Hello, world" # Triple? with ', ''' ''' This is a multi-line comments. Life is too short. You need Python.''' # Triple? wi...
24.578947
65
0.69379
7cbb5ca47e61ce078d5c7a0085e5240370d30e6b
24,538
py
Python
Contrib-Inspur/openbmc/poky/bitbake/lib/bb/event.py
opencomputeproject/Rack-Manager
e1a61d3eeeba0ff655fe9c1301e8b510d9b2122a
[ "MIT" ]
5
2019-11-11T07:57:26.000Z
2022-03-28T08:26:53.000Z
Contrib-Inspur/openbmc/poky/bitbake/lib/bb/event.py
opencomputeproject/Rack-Manager
e1a61d3eeeba0ff655fe9c1301e8b510d9b2122a
[ "MIT" ]
3
2019-09-05T21:47:07.000Z
2019-09-17T18:10:45.000Z
Contrib-Inspur/openbmc/poky/bitbake/lib/bb/event.py
opencomputeproject/Rack-Manager
e1a61d3eeeba0ff655fe9c1301e8b510d9b2122a
[ "MIT" ]
11
2019-07-20T00:16:32.000Z
2022-01-11T14:17:48.000Z
""" BitBake 'Event' implementation Classes and functions for manipulating 'events' in the BitBake build tools. """ # Copyright (C) 2003, 2004 Chris Larson # # SPDX-License-Identifier: GPL-2.0-only # import os, sys import warnings import pickle import logging import atexit import traceback import ast import threadin...
29.81531
148
0.637216
868eda1d350c5ea85d0c4cd7cb14ec0da1d73f59
3,383
py
Python
src/rds_postgres_instance/launch_rds_instance.py
viclule/api_models_deployment_framework
7595cf0b4f3e277925b968014102d7561547bcd4
[ "MIT" ]
null
null
null
src/rds_postgres_instance/launch_rds_instance.py
viclule/api_models_deployment_framework
7595cf0b4f3e277925b968014102d7561547bcd4
[ "MIT" ]
null
null
null
src/rds_postgres_instance/launch_rds_instance.py
viclule/api_models_deployment_framework
7595cf0b4f3e277925b968014102d7561547bcd4
[ "MIT" ]
null
null
null
import boto3 from botocore.exceptions import ClientError rds_client = boto3.client('rds', region_name='eu-central-1') RDS_DB_SUBNET_GROUP = 'rds-db_subnet_group' SECURITY_GROUP_NAME = 'rds_public_security_group' def create_db_subnet_group(): """Create a DB Subnet Group""" print('Creating RDS DB Subnet Grou...
34.876289
80
0.689329
8103aa1a0063cdf8be1605a6be0a28fd7856b1ad
344
py
Python
Python/zzz_training_challenge/UdemyPythonPro/Chapter7_CodingGuidelines/PEP8/test_isort.py
Kreijeck/learning
eaffee08e61f2a34e01eb8f9f04519aac633f48c
[ "MIT" ]
null
null
null
Python/zzz_training_challenge/UdemyPythonPro/Chapter7_CodingGuidelines/PEP8/test_isort.py
Kreijeck/learning
eaffee08e61f2a34e01eb8f9f04519aac633f48c
[ "MIT" ]
null
null
null
Python/zzz_training_challenge/UdemyPythonPro/Chapter7_CodingGuidelines/PEP8/test_isort.py
Kreijeck/learning
eaffee08e61f2a34e01eb8f9f04519aac633f48c
[ "MIT" ]
null
null
null
# with isort <file> the tool sorts the imports ganz oben nach: # future - System - Third party - first party local folder # settings: sortImports import os import sys from my_lib import Object from my_lib import Object3 from third_party import lib1 from third_party import lib2 from third_party import lib15 print(...
16.380952
62
0.770349
8110f2bc5ced1f40a9ca43aaa6c609e5dafca971
1,879
py
Python
src/onegov/feriennet/sponsors.py
politbuero-kampagnen/onegov-cloud
20148bf321b71f617b64376fe7249b2b9b9c4aa9
[ "MIT" ]
null
null
null
src/onegov/feriennet/sponsors.py
politbuero-kampagnen/onegov-cloud
20148bf321b71f617b64376fe7249b2b9b9c4aa9
[ "MIT" ]
null
null
null
src/onegov/feriennet/sponsors.py
politbuero-kampagnen/onegov-cloud
20148bf321b71f617b64376fe7249b2b9b9c4aa9
[ "MIT" ]
null
null
null
import time import yaml from pathlib import Path from onegov.core.static import StaticFile def load_sponsors(sponsors_path): root = Path(sponsors_path) with (root / 'sponsors.yml').open('r') as f: return [Sponsor(**sponsor) for sponsor in yaml.safe_load(f)] class Sponsor(object): __slots__ = ...
25.739726
74
0.551889
07bed168f3e6fffe5246923a898e14cbeb52966c
287
py
Python
exercises/pt/solution_03_14_02.py
Jette16/spacy-course
32df0c8f6192de6c9daba89740a28c0537e4d6a0
[ "MIT" ]
2,085
2019-04-17T13:10:40.000Z
2022-03-30T21:51:46.000Z
exercises/pt/solution_03_14_02.py
Jette16/spacy-course
32df0c8f6192de6c9daba89740a28c0537e4d6a0
[ "MIT" ]
79
2019-04-18T14:42:55.000Z
2022-03-07T08:15:43.000Z
exercises/pt/solution_03_14_02.py
Jette16/spacy-course
32df0c8f6192de6c9daba89740a28c0537e4d6a0
[ "MIT" ]
361
2019-04-17T13:34:32.000Z
2022-03-28T04:42:45.000Z
import json import spacy nlp = spacy.load("en_core_web_sm") with open("exercises/en/tweets.json", encoding="utf8") as f: TEXTS = json.loads(f.read()) # Processar os textos e imprimir as entidades docs = list(nlp.pipe(TEXTS)) entities = [doc.ents for doc in docs] print(*entities)
22.076923
60
0.721254
07ffdabb3abcf552d494876d4a05df2195fe2d17
869
py
Python
common/models/stat/StatDailySite.py
yao6891/FlaskOrdering
cbd24bd8d95afaba91ce4d6b1b3548c4e82e3807
[ "Apache-2.0" ]
2
2019-06-10T08:57:47.000Z
2021-06-12T16:22:15.000Z
common/models/stat/StatDailySite.py
yao6891/FlaskOrdering
cbd24bd8d95afaba91ce4d6b1b3548c4e82e3807
[ "Apache-2.0" ]
null
null
null
common/models/stat/StatDailySite.py
yao6891/FlaskOrdering
cbd24bd8d95afaba91ce4d6b1b3548c4e82e3807
[ "Apache-2.0" ]
null
null
null
# coding: utf-8 from sqlalchemy import Column, Date, DateTime, Integer, Numeric from sqlalchemy.schema import FetchedValue from application import db class StatDailySite(db.Model): __tablename__ = 'stat_daily_site' id = db.Column(db.Integer, primary_key=True) date = db.Column(db.Date, nullable=False, ind...
45.736842
100
0.762946
71f8371e875ff68b033ceb5512601568adf2bcf3
1,100
py
Python
python/pyqt/LearnPyQt/tab_widget.py
zeroam/TIL
43e3573be44c7f7aa4600ff8a34e99a65cbdc5d1
[ "MIT" ]
null
null
null
python/pyqt/LearnPyQt/tab_widget.py
zeroam/TIL
43e3573be44c7f7aa4600ff8a34e99a65cbdc5d1
[ "MIT" ]
null
null
null
python/pyqt/LearnPyQt/tab_widget.py
zeroam/TIL
43e3573be44c7f7aa4600ff8a34e99a65cbdc5d1
[ "MIT" ]
null
null
null
import sys from PyQt5.QtWidgets import ( QApplication, QMainWindow, QWidget, QTabWidget, ) from PyQt5.QtGui import ( QPalette, QColor, ) class Color(QWidget): def __init__(self, color, *args, **kwargs): super(Color, self).__init__(*args, **kwargs) self.setAutoFillBackgroun...
22.44898
70
0.639091
9c54b76349cc21a2027ce3796260f0441dd687c9
1,409
py
Python
src/bo4e/com/geokoordinaten.py
bo4e/BO4E-python
28b12f853c8a496d14b133759b7aa2d6661f79a0
[ "MIT" ]
1
2022-03-02T12:49:44.000Z
2022-03-02T12:49:44.000Z
src/bo4e/com/geokoordinaten.py
bo4e/BO4E-python
28b12f853c8a496d14b133759b7aa2d6661f79a0
[ "MIT" ]
21
2022-02-04T07:38:46.000Z
2022-03-28T14:01:53.000Z
src/bo4e/com/geokoordinaten.py
bo4e/BO4E-python
28b12f853c8a496d14b133759b7aa2d6661f79a0
[ "MIT" ]
null
null
null
""" Contains Geokoordinaten class and corresponding marshmallow schema for de-/serialization """ from decimal import Decimal import attr from marshmallow import fields from bo4e.com.com import COM, COMSchema # pylint: disable=too-few-public-methods @attr.s(auto_attribs=True, kw_only=True) class Geokoordinaten(COM):...
32.022727
183
0.756565
13a2bb8d5a9ee764a6891942e1dbacb0a275ad4a
1,140
py
Python
frappe-bench/apps/erpnext/erpnext/patches/v7_2/arrear_leave_encashment_as_salary_component.py
Semicheche/foa_frappe_docker
a186b65d5e807dd4caf049e8aeb3620a799c1225
[ "MIT" ]
null
null
null
frappe-bench/apps/erpnext/erpnext/patches/v7_2/arrear_leave_encashment_as_salary_component.py
Semicheche/foa_frappe_docker
a186b65d5e807dd4caf049e8aeb3620a799c1225
[ "MIT" ]
null
null
null
frappe-bench/apps/erpnext/erpnext/patches/v7_2/arrear_leave_encashment_as_salary_component.py
Semicheche/foa_frappe_docker
a186b65d5e807dd4caf049e8aeb3620a799c1225
[ "MIT" ]
null
null
null
import frappe def execute(): frappe.reload_doctype('Salary Slip', 'Salary Component') salary_components = [['Arrear', "ARR"], ['Leave Encashment', 'LENC']] for salary_component, salary_abbr in salary_components: if not frappe.db.exists('Salary Component', salary_component): sal_comp = frappe.get_doc({ "doc...
34.545455
106
0.708772
fc5569d2a5ab1b135c6245d000c40af8defddb88
8,790
py
Python
research/nlp/dam/data2mindrecord.py
leelige/mindspore
5199e05ba3888963473f2b07da3f7bca5b9ef6dc
[ "Apache-2.0" ]
77
2021-10-15T08:32:37.000Z
2022-03-30T13:09:11.000Z
research/nlp/dam/data2mindrecord.py
leelige/mindspore
5199e05ba3888963473f2b07da3f7bca5b9ef6dc
[ "Apache-2.0" ]
3
2021-10-30T14:44:57.000Z
2022-02-14T06:57:57.000Z
research/nlp/dam/data2mindrecord.py
leelige/mindspore
5199e05ba3888963473f2b07da3f7bca5b9ef6dc
[ "Apache-2.0" ]
24
2021-10-15T08:32:45.000Z
2022-03-24T18:45:20.000Z
# Copyright 2021 Huawei Technologies Co., Ltd # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to...
34.743083
120
0.619795
fc8ac423e3ca7e288782aa21c7958e02ad139f8f
2,493
py
Python
tests/test_dump_result.py
guruvamsi-policharla/noisy-krotov
c5397d9dbde68d06f17e88620d6a6b2c74664841
[ "BSD-3-Clause" ]
49
2018-11-07T06:43:33.000Z
2022-03-18T20:53:06.000Z
tests/test_dump_result.py
guruvamsi-policharla/noisy-krotov
c5397d9dbde68d06f17e88620d6a6b2c74664841
[ "BSD-3-Clause" ]
94
2018-11-06T20:15:04.000Z
2022-01-06T09:06:15.000Z
tests/test_dump_result.py
qucontrol/krotov
9f9a22336c433dc3a37637ce8cc8324df4290b46
[ "BSD-3-Clause" ]
20
2018-11-06T20:03:11.000Z
2022-03-12T05:29:21.000Z
"""Test the dump_result convergence routine""" import copy import os import pytest import krotov def incl_range(a, b, step=1): e = 1 if step > 0 else -1 return range(a, b + e, step) @pytest.fixture def oct_result_20(request): testdir = os.path.splitext(request.module.__file__)[0] filename = os.pat...
28.988372
77
0.734858
54d1d3928d4d60dda2fe26670cf7eed5d517d030
653
py
Python
Python/zzz_training_challenge/Python_Challenge/solutions/tests/ch04_strings/ex14_version_numbers_test.py
Kreijeck/learning
eaffee08e61f2a34e01eb8f9f04519aac633f48c
[ "MIT" ]
null
null
null
Python/zzz_training_challenge/Python_Challenge/solutions/tests/ch04_strings/ex14_version_numbers_test.py
Kreijeck/learning
eaffee08e61f2a34e01eb8f9f04519aac633f48c
[ "MIT" ]
null
null
null
Python/zzz_training_challenge/Python_Challenge/solutions/tests/ch04_strings/ex14_version_numbers_test.py
Kreijeck/learning
eaffee08e61f2a34e01eb8f9f04519aac633f48c
[ "MIT" ]
null
null
null
# Beispielprogramm für das Buch "Python Challenge" # # Copyright 2020 by Michael Inden import pytest from ch04_strings.solutions.ex14_version_numbers import compare_versions @pytest.mark.parametrize("version1, version2, expected", [("1.11.17", "2.3.5", "<"), ("2.3....
34.368421
72
0.491577
54fc431e0ddae5f7835519dc37ace4a9f4eeeff3
2,866
py
Python
chapter6/createdataset.py
yangzhijiang/GeektimeTensorflow
80479426a216d1d27fc78e53c581008ccec46cbe
[ "MIT" ]
1
2020-02-16T13:31:42.000Z
2020-02-16T13:31:42.000Z
chapter6/createdataset.py
yangzhijiang/GeektimeTensorflow
80479426a216d1d27fc78e53c581008ccec46cbe
[ "MIT" ]
null
null
null
chapter6/createdataset.py
yangzhijiang/GeektimeTensorflow
80479426a216d1d27fc78e53c581008ccec46cbe
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- # @Time : 2019/3/12 17:36 # @Author : LunaFire # @Email : gilgemesh2012@gmail.com # @File : createdataset.py import random import numpy as np import matplotlib.pyplot as plt from tensorflow import gfile from captcha.image import ImageCaptcha from PIL import Image NUMBER = ['0', '1',...
31.494505
100
0.572226
07170d9f596feff6ed13f7b58ece7eded06cab63
1,825
py
Python
src/onegov/onboarding/app.py
politbuero-kampagnen/onegov-cloud
20148bf321b71f617b64376fe7249b2b9b9c4aa9
[ "MIT" ]
null
null
null
src/onegov/onboarding/app.py
politbuero-kampagnen/onegov-cloud
20148bf321b71f617b64376fe7249b2b9b9c4aa9
[ "MIT" ]
null
null
null
src/onegov/onboarding/app.py
politbuero-kampagnen/onegov-cloud
20148bf321b71f617b64376fe7249b2b9b9c4aa9
[ "MIT" ]
null
null
null
from onegov.core import Framework, utils from onegov.file import DepotApp from onegov.onboarding.theme import OnboardingTheme from onegov.reservation import LibresIntegration from onegov.search import ElasticsearchApp class OnboardingApp(Framework, LibresIntegration, DepotApp, ElasticsearchApp): serve_static_fil...
24.662162
78
0.724384
ab068545844bb006160710db591d7261d86ef58d
1,816
py
Python
oneflow/python/test/ops/test_demo_matmul.py
caishenghang/oneflow
db239cc9f98e551823bf6ce2d4395bd5c339b1c5
[ "Apache-2.0" ]
2
2021-09-10T00:19:49.000Z
2021-11-16T11:27:20.000Z
oneflow/python/test/ops/test_demo_matmul.py
duijiudanggecl/oneflow
d2096ae14cf847509394a3b717021e2bd1d72f62
[ "Apache-2.0" ]
null
null
null
oneflow/python/test/ops/test_demo_matmul.py
duijiudanggecl/oneflow
d2096ae14cf847509394a3b717021e2bd1d72f62
[ "Apache-2.0" ]
1
2021-11-10T07:57:01.000Z
2021-11-10T07:57:01.000Z
""" Copyright 2020 The OneFlow Authors. All rights reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agr...
31.859649
87
0.615639
9161853175b17dc16641446828e94d923d3721ba
720
pyde
Python
sketches/kochkurve/kochkurve.pyde
kantel/processingpy
74aae222e46f68d1c8f06307aaede3cdae65c8ec
[ "MIT" ]
4
2018-06-03T02:11:46.000Z
2021-08-18T19:55:15.000Z
sketches/kochkurve/kochkurve.pyde
kantel/processingpy
74aae222e46f68d1c8f06307aaede3cdae65c8ec
[ "MIT" ]
null
null
null
sketches/kochkurve/kochkurve.pyde
kantel/processingpy
74aae222e46f68d1c8f06307aaede3cdae65c8ec
[ "MIT" ]
3
2019-12-23T19:12:51.000Z
2021-04-30T14:00:31.000Z
add_library('Turtle') # Konstanten-Deklaration WIDTH = 400 HEIGHT = 200 it = 4 # Iterationstiefe def setup(): global koch size(WIDTH, HEIGHT) this.surface.setTitle("Koch-Kurve") background(232, 226, 7) koch = Turtle(this) noLoop() def draw(): koch.penUp() koch.goToPoint(40, 1...
20
39
0.580556