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
6f03997b7eed956acd24f7e6f3874523cc24d21d
4,760
py
Python
src/visitpy/visit_flow/flow/src/filters/pyocl_batch.py
visit-dav/vis
c08bc6e538ecd7d30ddc6399ec3022b9e062127e
[ "BSD-3-Clause" ]
226
2018-12-29T01:13:49.000Z
2022-03-30T19:16:31.000Z
src/visitpy/visit_flow/flow/src/filters/pyocl_batch.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_flow/flow/src/filters/pyocl_batch.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: pyocl_batch.py author: Cyrus Harrison <cyrush@llnl.gov> created: 9/1/2012 descriptio...
30.318471
73
0.611134
815113ba4b99314f9d02dbcc6aec625a84a7744a
21,353
py
Python
src/backend/schedule.py
tonyLyx1/CSC4001-Better-SIS
98c69317a2c2ea4bfe45b3fc6f3db4766c4aae91
[ "MIT" ]
null
null
null
src/backend/schedule.py
tonyLyx1/CSC4001-Better-SIS
98c69317a2c2ea4bfe45b3fc6f3db4766c4aae91
[ "MIT" ]
null
null
null
src/backend/schedule.py
tonyLyx1/CSC4001-Better-SIS
98c69317a2c2ea4bfe45b3fc6f3db4766c4aae91
[ "MIT" ]
null
null
null
from course import Course, Instructor, Session from typing import List, Union from utils.printing import iter_to_str from student import Student # TODO # 1. more custom options # GLOBAL CONST MIN_CREDIT = 9 # Min credit each semester MAX_CREDIT = 18 # Max credit each semeste...
39.036563
99
0.594764
81ca769f4d4756b1fbcda16dcc3dd333d367fae9
1,406
py
Python
code/deep-q.py
obernbef/vwa
7d8edaefe6a6e38235b696112fde11ce0eba2a86
[ "MIT" ]
null
null
null
code/deep-q.py
obernbef/vwa
7d8edaefe6a6e38235b696112fde11ce0eba2a86
[ "MIT" ]
null
null
null
code/deep-q.py
obernbef/vwa
7d8edaefe6a6e38235b696112fde11ce0eba2a86
[ "MIT" ]
1
2021-11-10T10:36:01.000Z
2021-11-10T10:36:01.000Z
"""Implementing the Deep Q-Learning algorithm with a neural network.""" __author__ = "Florian Obernberger" __all__ = [] __ref__ = "https://towardsdatascience.com/playing-connect\ -4-with-deep-q-learning-76271ed663ca" import tensorflow as tf from tensorflow import keras from tensorflow.keras import layers def cr...
31.244444
95
0.722617
d21758d031c71b0b8bb265bdb0b9b4b4180882e4
2,144
py
Python
frappe-bench/apps/erpnext/erpnext/patches/v7_0/convert_timelog_to_timesheet.py
Semicheche/foa_frappe_docker
a186b65d5e807dd4caf049e8aeb3620a799c1225
[ "MIT" ]
null
null
null
frappe-bench/apps/erpnext/erpnext/patches/v7_0/convert_timelog_to_timesheet.py
Semicheche/foa_frappe_docker
a186b65d5e807dd4caf049e8aeb3620a799c1225
[ "MIT" ]
null
null
null
frappe-bench/apps/erpnext/erpnext/patches/v7_0/convert_timelog_to_timesheet.py
Semicheche/foa_frappe_docker
a186b65d5e807dd4caf049e8aeb3620a799c1225
[ "MIT" ]
null
null
null
import frappe from erpnext.manufacturing.doctype.work_order.work_order \ import make_timesheet, add_timesheet_detail def execute(): frappe.reload_doc('projects', 'doctype', 'task') frappe.reload_doc('projects', 'doctype', 'timesheet') if not frappe.db.table_exists("Time Log"): return for data in frappe.db.sql(...
31.529412
77
0.739739
9665df1c1c9d036d2335b24f5927d7c78f097cd5
1,409
py
Python
tests/test___init__.py
DanielGrams/cityservice
c487c34b5ba6541dcb441fe903ab2012c2256893
[ "MIT" ]
null
null
null
tests/test___init__.py
DanielGrams/cityservice
c487c34b5ba6541dcb441fe903ab2012c2256893
[ "MIT" ]
35
2022-01-24T22:15:59.000Z
2022-03-31T15:01:35.000Z
tests/test___init__.py
DanielGrams/cityservice
c487c34b5ba6541dcb441fe903ab2012c2256893
[ "MIT" ]
null
null
null
from tests.seeder import Seeder from tests.utils import UtilActions def drop_db(db): db.drop_all() db.engine.execute("DROP TABLE IF EXISTS alembic_version;") def test_migrations(app, seeder: Seeder): from flask_migrate import downgrade, upgrade from project import db from project.init_data impo...
25.160714
86
0.69127
5898934e8f1dd8582d8a66385c34c3d2d432d138
7,882
py
Python
src/codeforces/initc.py
cbarnson/UVa
0dd73fae656613e28b5aaf5880c5dad529316270
[ "Unlicense", "MIT" ]
2
2019-09-07T17:00:26.000Z
2020-08-05T02:08:35.000Z
src/codeforces/initc.py
cbarnson/UVa
0dd73fae656613e28b5aaf5880c5dad529316270
[ "Unlicense", "MIT" ]
null
null
null
src/codeforces/initc.py
cbarnson/UVa
0dd73fae656613e28b5aaf5880c5dad529316270
[ "Unlicense", "MIT" ]
null
null
null
#!/usr/bin/python # Python 2->3 libraries that were renamed. try: from urllib2 import urlopen except: from urllib.request import urlopen try: from HTMLParser import HTMLParser except: from html.parser import HTMLParser # Other libraries. from sys import argv from subprocess import call from functools ...
35.504505
110
0.50812
4d119b0baf2b4e49cd7c7cf2312e92f8e832187d
5,367
py
Python
python/DeepLearning/lesson1/week3/homework/test.py
TimVan1596/ACM-ICPC
07f7d728db1ecd09c5a3d0f05521930b14eb9883
[ "Apache-2.0" ]
1
2019-05-22T07:12:34.000Z
2019-05-22T07:12:34.000Z
python/DeepLearning/lesson1/week3/homework/test.py
TimVan1596/ACM-ICPC
07f7d728db1ecd09c5a3d0f05521930b14eb9883
[ "Apache-2.0" ]
3
2021-12-10T01:13:54.000Z
2021-12-14T21:18:42.000Z
python/DeepLearning/lesson1/week3/homework/test.py
TimVan1596/ACM-ICPC
07f7d728db1ecd09c5a3d0f05521930b14eb9883
[ "Apache-2.0" ]
null
null
null
import numpy as np import numpy.random import matplotlib.pyplot as plt import random import math # 设置常量 # HIDDEN_LAYER_NUM = 隐层的个数 # LEARNING_RATE = 学习率 HIDDEN_LAYER_NUM = 8 LEARNING_RATE = 0.8 # 激活函数 # def sigmoid(x): # return 1 / (1 + np.exp(-x)) def sigmoid(x): s = 1 / (1 + np.exp(-x)) return s # 进...
24.962791
88
0.516303
67214b80905b47757453bef03918a902a1cbb701
447
py
Python
Imaginary/2021/web/SaaS/app.py
ruhan-islam/ctf-archives
8c2bf6a608c821314d1a1cfaa05a6cccef8e3103
[ "MIT" ]
1
2021-11-02T20:53:58.000Z
2021-11-02T20:53:58.000Z
Imaginary/2021/web/SaaS/app.py
ruhan-islam/ctf-archives
8c2bf6a608c821314d1a1cfaa05a6cccef8e3103
[ "MIT" ]
null
null
null
Imaginary/2021/web/SaaS/app.py
ruhan-islam/ctf-archives
8c2bf6a608c821314d1a1cfaa05a6cccef8e3103
[ "MIT" ]
null
null
null
from flask import Flask, render_template, request import html import os app = Flask(__name__) @app.route('/') def index(): return render_template('index.html') blacklist = ["flag", "cat", "|", "&", ";", "`", "$"] @app.route('/backend') def backend(): for word in blacklist: if word in request.args['q...
23.526316
81
0.621924
67375f98b3114d39b6f432e8a9fb4545e535b5b5
434
py
Python
frappe-bench/apps/erpnext/erpnext/selling/report/quotation_trends/quotation_trends.py
Semicheche/foa_frappe_docker
a186b65d5e807dd4caf049e8aeb3620a799c1225
[ "MIT" ]
null
null
null
frappe-bench/apps/erpnext/erpnext/selling/report/quotation_trends/quotation_trends.py
Semicheche/foa_frappe_docker
a186b65d5e807dd4caf049e8aeb3620a799c1225
[ "MIT" ]
null
null
null
frappe-bench/apps/erpnext/erpnext/selling/report/quotation_trends/quotation_trends.py
Semicheche/foa_frappe_docker
a186b65d5e807dd4caf049e8aeb3620a799c1225
[ "MIT" ]
null
null
null
# Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors # License: GNU General Public License v3. See license.txt from __future__ import unicode_literals import frappe from erpnext.controllers.trends import get_columns, get_data def execute(filters=None): if not filters: filters ={} data = [] conditio...
31
68
0.774194
db22f99baba2d841a157f71148f0b0118904da56
1,055
pyde
Python
sketches/globe02/globe02.pyde
kantel/processingpy
74aae222e46f68d1c8f06307aaede3cdae65c8ec
[ "MIT" ]
4
2018-06-03T02:11:46.000Z
2021-08-18T19:55:15.000Z
sketches/globe02/globe02.pyde
kantel/processingpy
74aae222e46f68d1c8f06307aaede3cdae65c8ec
[ "MIT" ]
null
null
null
sketches/globe02/globe02.pyde
kantel/processingpy
74aae222e46f68d1c8f06307aaede3cdae65c8ec
[ "MIT" ]
3
2019-12-23T19:12:51.000Z
2021-04-30T14:00:31.000Z
a = 0.0 def setup(): global globe size(400, 400, P3D) globe = makeSphere(150, 5) def draw(): global globe, a background(0) translate(width/2, height/2) pointLight(255, 255, 255, -250, -250, 500) # lights() with pushMatrix(): rotateX(radians(-30)) rotateY(a) ...
24.534884
58
0.519431
225039ac07aabe1faee25231f6cff66acf72c48d
3,331
py
Python
myems-modbus-tcp/gateway.py
guangyuzhang/myems
c88f0620d3e36154a500c755c805333b771d09c0
[ "MIT" ]
82
2021-02-19T10:24:31.000Z
2022-03-28T06:30:18.000Z
myems-modbus-tcp/gateway.py
guangyuzhang/myems
c88f0620d3e36154a500c755c805333b771d09c0
[ "MIT" ]
188
2021-02-22T07:08:30.000Z
2022-03-02T04:11:03.000Z
myems-modbus-tcp/gateway.py
guangyuzhang/myems
c88f0620d3e36154a500c755c805333b771d09c0
[ "MIT" ]
54
2021-02-19T08:48:46.000Z
2022-03-30T06:21:34.000Z
import mysql.connector import config import time from datetime import datetime import schedule ######################################################################################################################## # Gateway Job Procedures # Step 1: Verify Gateway Token # Step 2: Collect Gateway Information # Step 3:...
38.732558
120
0.451516
3f5fa1493d3bf474ffb516adb74f80d196a1f2f3
2,499
py
Python
Problems/Depth-First Search/medium/ShortestBridge/shortest_bridge.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/ShortestBridge/shortest_bridge.py
dolong2110/Algorithm-By-Problems-Python
31ecc7367aaabdd2b0ac0af7f63ca5796d70c730
[ "MIT" ]
null
null
null
Problems/Depth-First Search/medium/ShortestBridge/shortest_bridge.py
dolong2110/Algorithm-By-Problems-Python
31ecc7367aaabdd2b0ac0af7f63ca5796d70c730
[ "MIT" ]
null
null
null
from typing import List # def shortestBridge(self, grid: List[List[int]]) -> int: # m, n = len(grid), len(grid[0]) # start, end = [], [] # self.ans = m * n # # def dfs(row: int, col: int, is_start): # if row < 0 or row >= m or col < 0 or col >= n or grid[row][col] == -1: # return #...
32.454545
104
0.42457
454139de74f7f1916b37e4aa3f1f4f601232c704
292
py
Python
python/en/archive/dropbox/udacity-ds_and_algos/udacity-ds_and_algos-lesson2-python_refresher-conditional_statements.py
aimldl/coding
70ddbfaa454ab92fd072ee8dc614ecc330b34a70
[ "MIT" ]
null
null
null
python/en/archive/dropbox/udacity-ds_and_algos/udacity-ds_and_algos-lesson2-python_refresher-conditional_statements.py
aimldl/coding
70ddbfaa454ab92fd072ee8dc614ecc330b34a70
[ "MIT" ]
null
null
null
python/en/archive/dropbox/udacity-ds_and_algos/udacity-ds_and_algos-lesson2-python_refresher-conditional_statements.py
aimldl/coding
70ddbfaa454ab92fd072ee8dc614ecc330b34a70
[ "MIT" ]
null
null
null
# udacity-ds_and_algos-lesson2-python_refresher-conditional_statements.py num = 5 if num < 5: print('The number is smaller than 5') elif num ==5: print('The number equals 5.') else: print('The number is greater than 5.') # Expected output # The number equals 5.
22.461538
74
0.667808
18c583d84482db30fe3eb90202a111e6ff98f295
4,931
py
Python
Templates/Integrations/Database/Database.py
diCagri/content
c532c50b213e6dddb8ae6a378d6d09198e08fc9f
[ "MIT" ]
799
2016-08-02T06:43:14.000Z
2022-03-31T11:10:11.000Z
Templates/Integrations/Database/Database.py
diCagri/content
c532c50b213e6dddb8ae6a378d6d09198e08fc9f
[ "MIT" ]
9,317
2016-08-07T19:00:51.000Z
2022-03-31T21:56:04.000Z
Templates/Integrations/Database/Database.py
diCagri/content
c532c50b213e6dddb8ae6a378d6d09198e08fc9f
[ "MIT" ]
1,297
2016-08-04T13:59:00.000Z
2022-03-31T23:43:06.000Z
from typing import Tuple, Dict, Union, Optional import demistomock as demisto from CommonServerPython import * from CommonServerUserPython import * ''' IMPORTS ''' import urllib3 import json # Disable insecure warnings urllib3.disable_warnings() """GLOBALS/PARAMS Attributes: INTEGRATION_NAME: Name of the...
34.971631
117
0.632732
e152ef0a9c79b06a72e5efa8538d3cfb90934743
105
py
Python
docs/fragments/neuron.py
subodhchhabra/ai
7a2b5942e8761d436a33597e94bef8b42e2cf632
[ "MIT" ]
null
null
null
docs/fragments/neuron.py
subodhchhabra/ai
7a2b5942e8761d436a33597e94bef8b42e2cf632
[ "MIT" ]
null
null
null
docs/fragments/neuron.py
subodhchhabra/ai
7a2b5942e8761d436a33597e94bef8b42e2cf632
[ "MIT" ]
null
null
null
w0 = 3 w1 = -4 w2 = 2 def neuron_no_activation(x1, x2): sum = w0 + x1 * w1 + x2 * w2 return sum
13.125
33
0.552381
e195c9cc2ea6deb6ec5bea62e0a1e0fe8088b728
12,101
py
Python
src/onegov/core/cronjobs.py
politbuero-kampagnen/onegov-cloud
20148bf321b71f617b64376fe7249b2b9b9c4aa9
[ "MIT" ]
null
null
null
src/onegov/core/cronjobs.py
politbuero-kampagnen/onegov-cloud
20148bf321b71f617b64376fe7249b2b9b9c4aa9
[ "MIT" ]
null
null
null
src/onegov/core/cronjobs.py
politbuero-kampagnen/onegov-cloud
20148bf321b71f617b64376fe7249b2b9b9c4aa9
[ "MIT" ]
null
null
null
""" Provides a way to specify cronjobs which should be called at an exact time. Example:: # A job that runs at 08:00 exactly @App.cronjob(hour=8, minute=0, timezone='Europe/Zurich') def cleanup_stuff(request): pass # A job that runs every 15 minutes @App.cronjob(hour='*', minute='*/15', t...
33.062842
79
0.654161
36224e3ef3cf481841337373831e8dc8f5e0c82c
539
py
Python
Curso_Python/Secao3-Python-Intermediario-Programacao-Procedural/61_62_exercicios/exercicios.py
pedrohd21/Cursos-Feitos
b223aad83867bfa45ad161d133e33c2c200d42bd
[ "MIT" ]
null
null
null
Curso_Python/Secao3-Python-Intermediario-Programacao-Procedural/61_62_exercicios/exercicios.py
pedrohd21/Cursos-Feitos
b223aad83867bfa45ad161d133e33c2c200d42bd
[ "MIT" ]
null
null
null
Curso_Python/Secao3-Python-Intermediario-Programacao-Procedural/61_62_exercicios/exercicios.py
pedrohd21/Cursos-Feitos
b223aad83867bfa45ad161d133e33c2c200d42bd
[ "MIT" ]
null
null
null
string = '012345678901234567890123456789012345678901234567890123456789' """ n = 10 contadores = [i for i in range(0, len(string), n)] tuplas = [{(i, i + n) for i in range(0, len(string), n)}] lista = [string[i:i + n] for i in range(0, len(string), n)] raw = [f'string [{i}:{i + n}' for i in range(0, len(string), n)] ret...
28.368421
71
0.654917
7fc38b8e478d7622ab7e52b68a4424d5c75f060e
1,114
py
Python
dblp/python/citationsCommon.py
DocSeven/spark
a88330f554a4afc70696dac8d00bcf4d2f512acf
[ "Apache-2.0" ]
null
null
null
dblp/python/citationsCommon.py
DocSeven/spark
a88330f554a4afc70696dac8d00bcf4d2f512acf
[ "Apache-2.0" ]
null
null
null
dblp/python/citationsCommon.py
DocSeven/spark
a88330f554a4afc70696dac8d00bcf4d2f512acf
[ "Apache-2.0" ]
1
2019-11-06T11:29:31.000Z
2019-11-06T11:29:31.000Z
from decimal import localcontext, Decimal # The pairsToArray method gets called from a mapper, so make sure # it's easy to serialize. class pairsToArrayHelper(object): @staticmethod def pairsToArray(pairs): d = dict(pairs) return [d[x] if (x in d) else 0 for x in range(max(d.keys()) + 1)] clas...
32.764706
82
0.614004
3d02105a08cee573950c7b33433b1a8cd378d0b2
33,638
py
Python
tests/onegov/ballot/models/test_election_compound.py
politbuero-kampagnen/onegov-cloud
20148bf321b71f617b64376fe7249b2b9b9c4aa9
[ "MIT" ]
null
null
null
tests/onegov/ballot/models/test_election_compound.py
politbuero-kampagnen/onegov-cloud
20148bf321b71f617b64376fe7249b2b9b9c4aa9
[ "MIT" ]
null
null
null
tests/onegov/ballot/models/test_election_compound.py
politbuero-kampagnen/onegov-cloud
20148bf321b71f617b64376fe7249b2b9b9c4aa9
[ "MIT" ]
null
null
null
from datetime import date from freezegun import freeze_time from onegov.ballot import Candidate from onegov.ballot import CandidateResult from onegov.ballot import Election from onegov.ballot import ElectionCompound from onegov.ballot import ElectionResult from onegov.ballot import List from onegov.ballot import ListCo...
30.441629
79
0.589869
3d54bf10b4c53b16b16a87b5db8faf114ead1802
1,981
py
Python
ImmoXML/mvn-jaxb-cleanup.py
OpenEstate/OpenEstate-IO
180e62a1c23596e5e284ce7fc6d07081918b0a38
[ "Apache-2.0" ]
35
2015-03-31T13:36:07.000Z
2020-12-13T07:27:36.000Z
ImmoXML/mvn-jaxb-cleanup.py
OpenEstate/OpenEstate-IO
180e62a1c23596e5e284ce7fc6d07081918b0a38
[ "Apache-2.0" ]
16
2015-11-05T07:39:11.000Z
2021-08-16T00:45:06.000Z
ImmoXML/mvn-jaxb-cleanup.py
OpenEstate/OpenEstate-IO
180e62a1c23596e5e284ce7fc6d07081918b0a38
[ "Apache-2.0" ]
15
2015-07-31T11:39:25.000Z
2022-03-12T07:38:10.000Z
#!/usr/bin/env python # coding=UTF-8 # # Copyright 2015-2021 OpenEstate.org # # 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 ...
26.77027
74
0.627966
43f29d6e874fc70fd093288871fcbde2346f56c1
980
py
Python
exercises/es/exc_04_04.py
Jette16/spacy-course
32df0c8f6192de6c9daba89740a28c0537e4d6a0
[ "MIT" ]
2,085
2019-04-17T13:10:40.000Z
2022-03-30T21:51:46.000Z
exercises/es/exc_04_04.py
Jette16/spacy-course
32df0c8f6192de6c9daba89740a28c0537e4d6a0
[ "MIT" ]
79
2019-04-18T14:42:55.000Z
2022-03-07T08:15:43.000Z
exercises/es/exc_04_04.py
Jette16/spacy-course
32df0c8f6192de6c9daba89740a28c0537e4d6a0
[ "MIT" ]
361
2019-04-17T13:34:32.000Z
2022-03-28T04:42:45.000Z
import json from spacy.matcher import Matcher from spacy.lang.es import Spanish with open("exercises/es/adidas.json", encoding="utf8") as f: TEXTS = json.loads(f.read()) nlp = Spanish() matcher = Matcher(nlp.vocab) pattern1 = [{"LOWER": "adidas"}, {"LOWER": "zx"}] pattern2 = [{"LOWER": "adidas"}, {"IS_DIGIT": Tru...
35
82
0.695918
a15413f2154d23162ff8174fc8241e6a4d98320a
8,669
py
Python
Uebung7/Aufgabe21.py
B0mM3L6000/EiP
f68718f95a2d3cde8ead62b6134ac1b5068881a5
[ "MIT" ]
1
2018-04-18T19:10:06.000Z
2018-04-18T19:10:06.000Z
Uebung7/Aufgabe21.py
B0mM3L6000/EiP
f68718f95a2d3cde8ead62b6134ac1b5068881a5
[ "MIT" ]
null
null
null
Uebung7/Aufgabe21.py
B0mM3L6000/EiP
f68718f95a2d3cde8ead62b6134ac1b5068881a5
[ "MIT" ]
1
2018-04-29T08:48:00.000Z
2018-04-29T08:48:00.000Z
import pygame as pg import time #einlesen der datei: tmp = "Labyrinth100x100.txt" labdata = open(tmp,"r") #einlesen der zeilen in 2d feld: lab = [] for line in labdata: tmpzeile = [] line = line.rstrip() for letter in line: tmpzeile.append(letter) lab.append(tmpzeile) """ for _ in range(...
30.524648
118
0.56131
62e94cd67e2de95ab53316e4fba5bde139f95ccf
1,863
py
Python
doc/precursers/2019_09-Sneakernet/Sneakernet/_old/create-log.py
Kyrus1999/BACnet
5be8e1377252166041bcd0b066cce5b92b077d06
[ "MIT" ]
8
2020-03-17T21:12:18.000Z
2021-12-12T15:55:54.000Z
doc/precursers/2019_09-Sneakernet/Sneakernet/_old/create-log.py
Kyrus1999/BACnet
5be8e1377252166041bcd0b066cce5b92b077d06
[ "MIT" ]
2
2021-07-19T06:18:43.000Z
2022-02-10T12:17:58.000Z
doc/precursers/2019_09-Sneakernet/Sneakernet/_old/create-log.py
Kyrus1999/BACnet
5be8e1377252166041bcd0b066cce5b92b077d06
[ "MIT" ]
25
2020-03-20T09:32:45.000Z
2021-07-18T18:12:59.000Z
#!/usr/bin/env python3 # Sneakernet/create-log.py """ write the log #create identity | True #input loop (interruptable) | #create event | #seq counter +1 | #timestamp | #co...
25.520548
75
0.492754
c5554fd48227a2abeff7372bbdaf36502e0e59c9
1,896
py
Python
webstart.py
NeumannSven/esp_websocket
9fc4c5a42e92958ecd106b8f32d68cac860ba4dd
[ "MIT" ]
null
null
null
webstart.py
NeumannSven/esp_websocket
9fc4c5a42e92958ecd106b8f32d68cac860ba4dd
[ "MIT" ]
null
null
null
webstart.py
NeumannSven/esp_websocket
9fc4c5a42e92958ecd106b8f32d68cac860ba4dd
[ "MIT" ]
null
null
null
from microWebSrv import MicroWebSrv from machine import Pin, ADC import time pot = ADC(Pin(34)) pot.atten(ADC.ATTN_11DB) webs = [] def _acceptWebSocketCallback(webSocket, httpClient) : global webs print("WS ACCEPT") webSocket.RecvTextCallback = _recvTextCallback webSocket.RecvBinaryCallback = _r...
23.407407
78
0.573312
9afc4a66a3a53c5abd1c2c9de1b542d0519c29ab
18,490
py
Python
Co-Simulation/Sumo/sumo-1.7.0/tools/contributed/sumopy/coremodules/network/publictransportnet.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/publictransportnet.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/publictransportnet.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.738149
170
0.518767
65c91fd859142a5bc77bfbd33a142fb93935131e
2,556
py
Python
research/cv/ibnnet/utils/pth2ckpt.py
leelige/mindspore
5199e05ba3888963473f2b07da3f7bca5b9ef6dc
[ "Apache-2.0" ]
77
2021-10-15T08:32:37.000Z
2022-03-30T13:09:11.000Z
research/cv/ibnnet/utils/pth2ckpt.py
leelige/mindspore
5199e05ba3888963473f2b07da3f7bca5b9ef6dc
[ "Apache-2.0" ]
3
2021-10-30T14:44:57.000Z
2022-02-14T06:57:57.000Z
research/cv/ibnnet/utils/pth2ckpt.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...
31.95
78
0.631847
a26006f5d61092fc3a78aea7e0d7018f46e70435
2,858
py
Python
server/apps/user_operation/views.py
Mayandev/django_morec
8d115f76ad69d7aa78b07dc06aa7047979ad134b
[ "MIT" ]
129
2019-04-20T08:23:25.000Z
2022-03-14T10:02:23.000Z
server/apps/user_operation/views.py
heartplus/django_morec
8d115f76ad69d7aa78b07dc06aa7047979ad134b
[ "MIT" ]
9
2019-05-19T15:06:17.000Z
2021-12-14T06:47:14.000Z
server/apps/user_operation/views.py
heartplus/django_morec
8d115f76ad69d7aa78b07dc06aa7047979ad134b
[ "MIT" ]
34
2019-05-06T06:37:17.000Z
2021-12-09T02:27:58.000Z
from django.shortcuts import render # Create your views here. from rest_framework import viewsets from rest_framework import mixins from .models import UserFavorMovie, UserFavorActor, UserFavorGenre from .serializers import UserFavorMovieSerializer, UserFavorMovieDetailSerializer, \ UserFavorActorDetailSerializer...
37.605263
155
0.774318
a2e9c5c03f8a5b15fa9b9564d64a127ddd65087a
9,270
py
Python
data-pipeline/caids/get_caids.py
broadinstitute/gnomadjs
00da72cdc2cb0753f822c51456ec15147c024a1d
[ "MIT" ]
38
2018-02-24T02:33:52.000Z
2020-03-03T23:17:04.000Z
data-pipeline/caids/get_caids.py
broadinstitute/gnomadjs
00da72cdc2cb0753f822c51456ec15147c024a1d
[ "MIT" ]
385
2018-02-21T16:53:13.000Z
2020-03-04T00:52:40.000Z
data-pipeline/caids/get_caids.py
broadinstitute/gnomadjs
00da72cdc2cb0753f822c51456ec15147c024a1d
[ "MIT" ]
13
2020-05-01T13:03:54.000Z
2022-02-28T13:12:57.000Z
"""Download ClinGen Canonical Allele IDs for variants in the specified VCF.""" import argparse import asyncio import errno import gzip import json import logging import socket from concurrent.futures import ThreadPoolExecutor from typing import Awaitable, Callable, TypeVar import aiohttp from hailtop.aiotools import ...
40.12987
120
0.579288
ac0c25776f9fd8f298c1692f75a0bdcd2cfbd796
357
py
Python
fuzzsvc/model/FuzzingOptionType.py
ifoundthetao/FuzzFlow
86559ac7f85fc89510c0d9647e02880edb95aa2a
[ "MIT" ]
53
2016-08-26T02:51:45.000Z
2021-05-24T21:05:44.000Z
model/FuzzingOptionType.py
FingerLeakers/FuzzFlow
3f2de617c3658904f9640f53a05d5e4e90634e32
[ "MIT" ]
null
null
null
model/FuzzingOptionType.py
FingerLeakers/FuzzFlow
3f2de617c3658904f9640f53a05d5e4e90634e32
[ "MIT" ]
31
2016-08-26T04:08:31.000Z
2021-05-24T21:05:54.000Z
from app import app db = app.config['db'] class FuzzingOptionType(db.Model): id = db.Column(db.Integer, primary_key=True) name = db.Column(db.String(64), unique=True, nullable=False) def __init__(self, name): self.name = name def as_dict(self): return {c.name: str(getattr(self, c.na...
25.5
83
0.666667
ac0f48d3a4b1aef48c41a8c0806cff6fd755798d
1,016
py
Python
methods/transformers/tests/test_activations.py
INK-USC/RiddleSense
a3d57eaf084da9cf6b77692c608e2cd2870fbd97
[ "MIT" ]
3
2021-07-06T20:02:31.000Z
2022-03-27T13:13:01.000Z
methods/transformers/tests/test_activations.py
INK-USC/RiddleSense
a3d57eaf084da9cf6b77692c608e2cd2870fbd97
[ "MIT" ]
null
null
null
methods/transformers/tests/test_activations.py
INK-USC/RiddleSense
a3d57eaf084da9cf6b77692c608e2cd2870fbd97
[ "MIT" ]
null
null
null
import unittest from transformers import is_torch_available from transformers.testing_utils import require_torch if is_torch_available(): import torch from transformers.activations import _gelu_python, gelu_new, get_activation @require_torch class TestActivations(unittest.TestCase): def ...
31.75
82
0.663386
ce0c266444d9bf501006bffdcbb098751c3c3637
366
py
Python
Packs/Confluera/Scripts/ConflueraDetectionsCount/ConflueraDetectionsCount.py
diCagri/content
c532c50b213e6dddb8ae6a378d6d09198e08fc9f
[ "MIT" ]
799
2016-08-02T06:43:14.000Z
2022-03-31T11:10:11.000Z
Packs/Confluera/Scripts/ConflueraDetectionsCount/ConflueraDetectionsCount.py
diCagri/content
c532c50b213e6dddb8ae6a378d6d09198e08fc9f
[ "MIT" ]
9,317
2016-08-07T19:00:51.000Z
2022-03-31T21:56:04.000Z
Packs/Confluera/Scripts/ConflueraDetectionsCount/ConflueraDetectionsCount.py
diCagri/content
c532c50b213e6dddb8ae6a378d6d09198e08fc9f
[ "MIT" ]
1,297
2016-08-04T13:59:00.000Z
2022-03-31T23:43:06.000Z
from CommonServerPython import * from CommonServerUserPython import * # Executes confluera-fetch-detections command/script detections_data = demisto.executeCommand('confluera-fetch-detections', {'hours': '72'}) det_count = 0 if detections_data[1] and detections_data[1]['Contents']: det_count = len(detections_da...
26.142857
87
0.781421
cbf01543b7593dcad9428d7d159b5da4cb7d8996
797
py
Python
Interview Preparation Kits/Interview Preparation Kit/Stacks and Queues/Largest Rectangle/largest_rectangle2.py
xuedong/hacker-rank
ce8a60f80c2c6935b427f9409d7e826ee0d26a89
[ "MIT" ]
1
2021-02-22T17:37:45.000Z
2021-02-22T17:37:45.000Z
Interview Preparation Kits/Interview Preparation Kit/Stacks and Queues/Largest Rectangle/largest_rectangle2.py
xuedong/hacker-rank
ce8a60f80c2c6935b427f9409d7e826ee0d26a89
[ "MIT" ]
null
null
null
Interview Preparation Kits/Interview Preparation Kit/Stacks and Queues/Largest Rectangle/largest_rectangle2.py
xuedong/hacker-rank
ce8a60f80c2c6935b427f9409d7e826ee0d26a89
[ "MIT" ]
null
null
null
#!/bin/python3 import math import os import random import re import sys # Complete the largestRectangle function below. def largestRectangle(h): stack = [] best = 0 i = 0 while i < len(h): if not stack or h[stack[-1]] <= h[i]: stack.append(i) i += 1 else: ...
18.97619
74
0.531995
0240915998afcb6dfde71de7675198292a528d52
4,192
py
Python
oneflow/python/ops/summary_ops.py
wanghongsheng01/framework_enflame
debf613e05e3f5ea8084c3e79b60d0dd9e349526
[ "Apache-2.0" ]
2
2021-09-10T00:19:49.000Z
2021-11-16T11:27:20.000Z
oneflow/python/ops/summary_ops.py
duijiudanggecl/oneflow
d2096ae14cf847509394a3b717021e2bd1d72f62
[ "Apache-2.0" ]
1
2021-06-16T08:37:50.000Z
2021-06-16T08:37:50.000Z
oneflow/python/ops/summary_ops.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...
28.712329
110
0.632634
0c776634ad0bcb38dd0fb1df316833f0969bac1e
518
py
Python
Algorithms/Warmup/time_conversion.py
byung-u/HackerRank
4c02fefff7002b3af774b99ebf8d40f149f9d163
[ "MIT" ]
null
null
null
Algorithms/Warmup/time_conversion.py
byung-u/HackerRank
4c02fefff7002b3af774b99ebf8d40f149f9d163
[ "MIT" ]
null
null
null
Algorithms/Warmup/time_conversion.py
byung-u/HackerRank
4c02fefff7002b3af774b99ebf8d40f149f9d163
[ "MIT" ]
null
null
null
#!/usr/bin/env python3 import sys def timeConversion(s): if (s[-2:] == 'AM'): temp = int(s[0:2]) if temp < 10: res = '0' + str(temp) else: res = str(temp) if res == '12': res = '00' return res + s[2:8] else: temp = s[0:2] ...
18.5
33
0.442085
0bb14cbd17f46a886925f59a19f9b300ed3bed44
768
py
Python
Python/zzz_training_challenge/Python_Challenge/solutions/tests/ch05_datastructures/ex05_maxrevenue_test.py
Kreijeck/learning
eaffee08e61f2a34e01eb8f9f04519aac633f48c
[ "MIT" ]
null
null
null
Python/zzz_training_challenge/Python_Challenge/solutions/tests/ch05_datastructures/ex05_maxrevenue_test.py
Kreijeck/learning
eaffee08e61f2a34e01eb8f9f04519aac633f48c
[ "MIT" ]
null
null
null
Python/zzz_training_challenge/Python_Challenge/solutions/tests/ch05_datastructures/ex05_maxrevenue_test.py
Kreijeck/learning
eaffee08e61f2a34e01eb8f9f04519aac633f48c
[ "MIT" ]
null
null
null
# Beispielprogramm für das Buch "Python Challenge" # # Copyright 2020 by Michael Inden import pytest from ch05_datastructures.solutions.ex05_maxrevenue import max_revenue_optimized, max_revenue def prices_and_expected(): return [([0, 10, 20, 30, 40, 50, 60, 70], 70), ([70, 60, 50, 40, 30, 20, 10], 0...
22.588235
92
0.658854
f07d58db1374135465d8230c2cfb6c5326f7ddc8
15,800
py
Python
src/backend/course.py
tonyLyx1/CSC4001-Better-SIS
98c69317a2c2ea4bfe45b3fc6f3db4766c4aae91
[ "MIT" ]
null
null
null
src/backend/course.py
tonyLyx1/CSC4001-Better-SIS
98c69317a2c2ea4bfe45b3fc6f3db4766c4aae91
[ "MIT" ]
null
null
null
src/backend/course.py
tonyLyx1/CSC4001-Better-SIS
98c69317a2c2ea4bfe45b3fc6f3db4766c4aae91
[ "MIT" ]
null
null
null
from typing import List, Set, Tuple, Dict from utils import * import DB.dbModels as dbMdl from DB.dbModels import db # Global Constant CRE_TO_GRAD = 120 # Credit number to graduate MIN_CREDIT = 9 # Min credit each semester MAX_CREDIT = 18 # Max credit each sem...
32.848233
118
0.567468
653407826bb96891249f721093390bf592f5bd0b
1,106
py
Python
Programming Languages/Python/Theory/100_Python_Challenges/Section _1_Basic_Coding_Exercises/14. boolean values.py
jaswinder9051998/Resources
fd468af37bf24ca57555d153ee64693c018e822e
[ "MIT" ]
101
2021-12-20T11:57:11.000Z
2022-03-23T09:49:13.000Z
Programming Languages/Python/Theory/100_Python_Challenges/Section _1_Basic_Coding_Exercises/14. boolean values.py
Sid-1164/Resources
3987dcaeddc8825f9bc79609ff26094282b8ece1
[ "MIT" ]
4
2022-01-12T11:55:56.000Z
2022-02-12T04:53:33.000Z
Programming Languages/Python/Theory/100_Python_Challenges/Section _1_Basic_Coding_Exercises/14. boolean values.py
Sid-1164/Resources
3987dcaeddc8825f9bc79609ff26094282b8ece1
[ "MIT" ]
38
2022-01-12T11:56:16.000Z
2022-03-23T10:07:52.000Z
""" Write a Python function that accepts three Boolean variables - x, y, and z. The function should return True if at least two out of the three variables are True. Example : x = True, y = False, z = True Expected output = True """ def booleans(x,y,z): if x == "True" and y == "True" and z == "False": ...
29.891892
84
0.516275
3349b66fe4086cf28edcb1ead406458c7a67443d
550
py
Python
data_log_sheet/models.py
antonnifo/DIT
7c496f37bab70229cd84c4b33332708ea8cf278b
[ "MIT" ]
null
null
null
data_log_sheet/models.py
antonnifo/DIT
7c496f37bab70229cd84c4b33332708ea8cf278b
[ "MIT" ]
null
null
null
data_log_sheet/models.py
antonnifo/DIT
7c496f37bab70229cd84c4b33332708ea8cf278b
[ "MIT" ]
null
null
null
from django.db import models class DataLogSheet(models.Model): reel = models.CharField(max_length=200) epi = models.IntegerField() scn = models.CharField(max_length=200) location = models.CharField(max_length=200) clips = models.CharField(max_length=200) shot = models.IntegerField() tak...
30.555556
55
0.692727
d7ded6939c9025b5dfe08974699a6a3b310552b6
29,015
py
Python
Packs/AzureStorageQueue/Integrations/AzureStorageQueue/AzureStorageQueue.py
diCagri/content
c532c50b213e6dddb8ae6a378d6d09198e08fc9f
[ "MIT" ]
2
2021-12-06T21:38:24.000Z
2022-01-13T08:23:36.000Z
Packs/AzureStorageQueue/Integrations/AzureStorageQueue/AzureStorageQueue.py
diCagri/content
c532c50b213e6dddb8ae6a378d6d09198e08fc9f
[ "MIT" ]
87
2022-02-23T12:10:53.000Z
2022-03-31T11:29:05.000Z
Packs/AzureStorageQueue/Integrations/AzureStorageQueue/AzureStorageQueue.py
diCagri/content
c532c50b213e6dddb8ae6a378d6d09198e08fc9f
[ "MIT" ]
2
2022-01-05T15:27:01.000Z
2022-02-01T19:27:43.000Z
from typing import Callable import demistomock as demisto # noqa: F401 from CommonServerPython import * # noqa: F401 import base64 import copy from requests import Response DATE_FORMAT = '%a, %d %b %Y %H:%M:%S GMT' account_sas_token = "" storage_account_name = "" class Client: """ API Client """ ...
33.122146
121
0.641117
d7f72b5880893f1935fb9680891495ae6b06b36b
720
py
Python
frappe-bench/apps/erpnext/erpnext/patches/v6_10/fix_billed_amount_in_drop_ship_po.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/v6_10/fix_billed_amount_in_drop_ship_po.py
Semicheche/foa_frappe_docker
a186b65d5e807dd4caf049e8aeb3620a799c1225
[ "MIT" ]
null
null
null
frappe-bench/apps/erpnext/erpnext/patches/v6_10/fix_billed_amount_in_drop_ship_po.py
Semicheche/foa_frappe_docker
a186b65d5e807dd4caf049e8aeb3620a799c1225
[ "MIT" ]
1
2021-04-29T14:39:01.000Z
2021-04-29T14:39:01.000Z
from __future__ import unicode_literals import frappe def execute(): frappe.db.sql("""update `tabPurchase Order Item` set billed_amt = 0 where delivered_by_supplier=1 and docstatus=1""") drop_ship_pos = frappe.db.sql("""select distinct parent from `tabPurchase Order Item` where delivered_by_supplier=1 and ...
40
88
0.736111
044298703da02ac26cae49f78e949c87aeb844fb
275
py
Python
python/fastcampus/test.py
zeroam/TIL
43e3573be44c7f7aa4600ff8a34e99a65cbdc5d1
[ "MIT" ]
null
null
null
python/fastcampus/test.py
zeroam/TIL
43e3573be44c7f7aa4600ff8a34e99a65cbdc5d1
[ "MIT" ]
null
null
null
python/fastcampus/test.py
zeroam/TIL
43e3573be44c7f7aa4600ff8a34e99a65cbdc5d1
[ "MIT" ]
null
null
null
def gen(): print("start generator") a = yield 1 print(f"a: {a}") print("next") b = yield 2 + a print(f"b: {b}") print("next") c = yield 3 print(f"c: {c}") yield g = gen() print(type(g)) print(next(g)) print("-----") print(g.send(5))
14.473684
28
0.487273
9be6019a4d6f9f4bc003410dd318becb3eb2031b
651
py
Python
___Python/Daniel/2018-06-25-VHS-Bielefeld-Python/p12_notifications/m01_emailing_gmx.py
uvenil/PythonKurs201806
85afa9c9515f5dd8bec0c546f077d8cc39568fe8
[ "Apache-2.0" ]
null
null
null
___Python/Daniel/2018-06-25-VHS-Bielefeld-Python/p12_notifications/m01_emailing_gmx.py
uvenil/PythonKurs201806
85afa9c9515f5dd8bec0c546f077d8cc39568fe8
[ "Apache-2.0" ]
null
null
null
___Python/Daniel/2018-06-25-VHS-Bielefeld-Python/p12_notifications/m01_emailing_gmx.py
uvenil/PythonKurs201806
85afa9c9515f5dd8bec0c546f077d8cc39568fe8
[ "Apache-2.0" ]
null
null
null
import smtplib from email.MIMEMultipart import MIMEMultipart from email.MIMEText import MIMEText senderEmail = "jp42@gmx.de" empfangsEmail = "samuel.brinasdfasdfkmann@googlemail.com" msg = MIMEMultipart() msg['From'] = senderEmail msg['To'] = empfangsEmail msg['Subject'] = "Deine Pflanze verdurstet" emailT...
31
63
0.743472
a8d497a8131917683974ccd6191c995872082cbd
32
py
Python
Zen Of Python .py
ChanderJindal/Semester-6
a1c73d2e684b5a2527048f6fa26999ab1fc9205c
[ "MIT" ]
null
null
null
Zen Of Python .py
ChanderJindal/Semester-6
a1c73d2e684b5a2527048f6fa26999ab1fc9205c
[ "MIT" ]
null
null
null
Zen Of Python .py
ChanderJindal/Semester-6
a1c73d2e684b5a2527048f6fa26999ab1fc9205c
[ "MIT" ]
null
null
null
import this # for Zen Of Python
16
20
0.75
4f9d4489ad6bbad3a000fb34b9dd6a11ff69216d
2,079
py
Python
PINp/2014/Gryadin_V_D/task_8_46.py
YukkaSarasti/pythonintask
eadf4245abb65f4400a3bae30a4256b4658e009c
[ "Apache-2.0" ]
null
null
null
PINp/2014/Gryadin_V_D/task_8_46.py
YukkaSarasti/pythonintask
eadf4245abb65f4400a3bae30a4256b4658e009c
[ "Apache-2.0" ]
null
null
null
PINp/2014/Gryadin_V_D/task_8_46.py
YukkaSarasti/pythonintask
eadf4245abb65f4400a3bae30a4256b4658e009c
[ "Apache-2.0" ]
null
null
null
#Задача 8. Вариант 46 #Доработайте игру "Анаграммы" (см. М.Доусон Программируем на Python. Гл.4) #так, чтобы к каждому слову полагалась подсказка. Игрок должен получать право на #подсказку в том случае, если у него нет никаких предположений. #Разработайте систему начисления очков, по которой бы игроки, #отгадавшие слов...
19.073394
81
0.678211
96c51fbb86f4cb5adfd38a0c1df44ce3284c9af0
1,411
py
Python
src/server/bo/Semester.py
muenstermannmarius/ElectionSystem
a6e60d9147423787e869587b808def4771f89cb7
[ "RSA-MD" ]
null
null
null
src/server/bo/Semester.py
muenstermannmarius/ElectionSystem
a6e60d9147423787e869587b808def4771f89cb7
[ "RSA-MD" ]
null
null
null
src/server/bo/Semester.py
muenstermannmarius/ElectionSystem
a6e60d9147423787e869587b808def4771f89cb7
[ "RSA-MD" ]
null
null
null
from server.bo.NamedBusinessObject import NamedBusinessObject """Realization of an semester class""" class Semester(NamedBusinessObject): def __init__(self): super().__init__() self._submit_projects = False self._grading = False self._election = False def get_submit_proje...
28.795918
62
0.639263
96ea7da16bbc774d172b58892e64157b6526f4e8
7,256
py
Python
Fastir_Collector/registry/registry_obj.py
Unam3dd/Train-2018-2020
afb6ae70fe338cbe55a21b74648d91996b818fa2
[ "MIT" ]
4
2021-04-23T15:39:17.000Z
2021-12-27T22:53:24.000Z
Fastir_Collector/registry/registry_obj.py
Unam3dd/Train-2018-2020
afb6ae70fe338cbe55a21b74648d91996b818fa2
[ "MIT" ]
null
null
null
Fastir_Collector/registry/registry_obj.py
Unam3dd/Train-2018-2020
afb6ae70fe338cbe55a21b74648d91996b818fa2
[ "MIT" ]
2
2021-04-19T08:28:54.000Z
2022-01-19T13:23:29.000Z
from __future__ import unicode_literals from _winreg import QueryInfoKey, OpenKey, EnumKey, EnumValue import _winreg import utils.utils import importlib pyregf = importlib.import_module("_x" + utils.utils.get_architecture() + ".pyregf") HKEY_LOCAL_MACHINE = _winreg.HKEY_LOCAL_MACHINE HKEY_CURRENT_USER = _winreg.HKEY_...
29.737705
107
0.61301
8c1c64f2b20958fc7982995810c5002810da5b96
4,624
py
Python
archive/mumath/Context/CUSTOM.py
fourpoints/mumath
f1c36c4a5b3c32a3e7f8e7a922eafea8b7a14fd4
[ "MIT" ]
null
null
null
archive/mumath/Context/CUSTOM.py
fourpoints/mumath
f1c36c4a5b3c32a3e7f8e7a922eafea8b7a14fd4
[ "MIT" ]
null
null
null
archive/mumath/Context/CUSTOM.py
fourpoints/mumath
f1c36c4a5b3c32a3e7f8e7a922eafea8b7a14fd4
[ "MIT" ]
null
null
null
from .. import Token # It would be preferable to import nodes from .Context, in case of inconsistencies def replicate(tree, p, separator, ellipsis): if tree.children[p+1].type == "SUB": lower = tree.children[p+2] if tree.children[p+3].type == "SUP": upper = tree.children[p+4] ...
29.641026
98
0.566609
8c2df63d2c1999042c756047f9d8b801e753d738
3,159
py
Python
marsyas-vamp/marsyas/src/django/birdsong/application/birdsong/settings.py
jaouahbi/VampPlugins
27c2248d1c717417fe4d448cdfb4cb882a8a336a
[ "Apache-2.0" ]
null
null
null
marsyas-vamp/marsyas/src/django/birdsong/application/birdsong/settings.py
jaouahbi/VampPlugins
27c2248d1c717417fe4d448cdfb4cb882a8a336a
[ "Apache-2.0" ]
null
null
null
marsyas-vamp/marsyas/src/django/birdsong/application/birdsong/settings.py
jaouahbi/VampPlugins
27c2248d1c717417fe4d448cdfb4cb882a8a336a
[ "Apache-2.0" ]
null
null
null
# Django settings for birdsong project. # # Running in Production or Development mode. # import socket if socket.gethostname() == 'django.venus.orchive.net': DEBUG = False else: DEBUG = True TEMPLATE_DEBUG = DEBUG ADMINS = ( # ('Your Name', 'your_email@domain.com'), ) MANAGERS = ADMINS # # Locally # if...
28.981651
88
0.72333
8c2fa8eba86187ad37f5df8b29df903012e214d2
1,782
py
Python
src/server/jobs/base.py
monosidev/monosi
a88b689fc74010b10dbabb32f4b2bdeae865f4d5
[ "Apache-2.0" ]
156
2021-11-19T18:50:14.000Z
2022-03-31T19:48:59.000Z
src/server/jobs/base.py
monosidev/monosi
a88b689fc74010b10dbabb32f4b2bdeae865f4d5
[ "Apache-2.0" ]
30
2021-12-27T19:30:56.000Z
2022-03-30T17:49:00.000Z
src/server/jobs/base.py
monosidev/monosi
a88b689fc74010b10dbabb32f4b2bdeae865f4d5
[ "Apache-2.0" ]
14
2022-01-17T23:24:34.000Z
2022-03-29T09:27:47.000Z
from abc import abstractmethod from ingestion.collector import Collector from scheduler import job from telemetry.events import track_event from server.models import DataSource from server.middleware.db import db class CollectorJob(job.JobBase): MAX_RETRIES = 3 TIMEOUT = 10 def _retrieve_source_con...
30.724138
110
0.675084
8cb0d57571502fea0a0fd8c48db448d8af014e9c
379
py
Python
pyntcloud/utils/dataframe.py
bernssolg/pyntcloud-master
84cf000b7a7f69a2c1b36f9624f05f65160bf992
[ "MIT" ]
1,142
2016-10-10T08:55:30.000Z
2022-03-30T04:46:16.000Z
pyntcloud/utils/dataframe.py
bernssolg/pyntcloud-master
84cf000b7a7f69a2c1b36f9624f05f65160bf992
[ "MIT" ]
195
2016-10-10T08:30:37.000Z
2022-02-17T12:51:17.000Z
pyntcloud/utils/dataframe.py
bernssolg/pyntcloud-master
84cf000b7a7f69a2c1b36f9624f05f65160bf992
[ "MIT" ]
215
2017-02-28T00:50:29.000Z
2022-03-22T17:01:31.000Z
def convert_columns_dtype(df, old_dtype, new_dtype): """ Parameters ---------- df: pandas.DataFrame old_dtype: numpy dtype new_dtype: numpy dtype """ changed = [] for column in df.columns: if df[column].dtype == old_dtype: df[column] = df[column].astype(new_dty...
19.947368
53
0.588391
0ff2fa18b6ad2cc3b2a1dfb10a24cf099d30aef6
11,809
py
Python
src/pfun/sql.py
suned/pfun
46c460646487abfef897bd9627891f6cf7870774
[ "MIT" ]
126
2019-09-16T15:28:20.000Z
2022-03-20T10:57:53.000Z
src/pfun/sql.py
suned/pfun
46c460646487abfef897bd9627891f6cf7870774
[ "MIT" ]
54
2019-09-30T08:44:01.000Z
2022-03-20T11:10:00.000Z
src/pfun/sql.py
suned/pfun
46c460646487abfef897bd9627891f6cf7870774
[ "MIT" ]
11
2020-01-02T08:32:46.000Z
2022-03-20T11:10:24.000Z
from __future__ import annotations import urllib.parse from typing import Any, Iterable, Type, TypeVar, Union from typing_extensions import Protocol from .dict import Dict from .effect import (Effect, Resource, Try, add_repr, catch, depend, error, success) from .either import Either, Left, Right...
29.820707
79
0.578626
e89894e0d1252247bafefc7da01d9ab9e0ddb816
1,306
py
Python
v406/python/rechnungDoppel2.py
chrbeckm/anfaenger-praktikum
51764ff23901de1bc3d16dc935acfdc66bb2b2b7
[ "MIT" ]
2
2019-12-10T10:25:11.000Z
2021-01-26T13:59:40.000Z
v406/python/rechnungDoppel2.py
chrbeckm/anfaenger-praktikum
51764ff23901de1bc3d16dc935acfdc66bb2b2b7
[ "MIT" ]
null
null
null
v406/python/rechnungDoppel2.py
chrbeckm/anfaenger-praktikum
51764ff23901de1bc3d16dc935acfdc66bb2b2b7
[ "MIT" ]
1
2020-12-06T21:24:58.000Z
2020-12-06T21:24:58.000Z
import numpy as np from uncertainties import ufloat from scipy import optimize import matplotlib.pyplot as plt print("--------------------doppelspalt2------------------") doppel2, Int2 = np.genfromtxt('python/doppelspalt2.txt', unpack=True) dsg3 = 0.875 # abstand schirm gitter in meter g3 = 0.075e-3 # in meter λ =...
29.022222
136
0.639357
d7722a3cbfc13150ea3bde3e05cad0fffe21e86c
621
py
Python
DataStructures/LinkedLists/insert_node_head.py
byung-u/HackerRank
4c02fefff7002b3af774b99ebf8d40f149f9d163
[ "MIT" ]
null
null
null
DataStructures/LinkedLists/insert_node_head.py
byung-u/HackerRank
4c02fefff7002b3af774b99ebf8d40f149f9d163
[ "MIT" ]
null
null
null
DataStructures/LinkedLists/insert_node_head.py
byung-u/HackerRank
4c02fefff7002b3af774b99ebf8d40f149f9d163
[ "MIT" ]
null
null
null
#!/usr/bin/env python3 import sys class Node(object): def __init__(self, data=None, next_node=None): self.data = data self.next = next_node def Insert(head, data): if head: N = Node(data=data) N.next = head return N else: head = Node(data=data) ret...
15.146341
62
0.563607
0f366542032fb61dd89f4a087dbe245ab3cc9b19
1,220
py
Python
source/pkgsrc/lang/python37/patches/patch-Lib_ctypes_macholib_dyld.py
Scottx86-64/dotfiles-1
51004b1e2b032664cce6b553d2052757c286087d
[ "Unlicense" ]
1
2021-11-20T22:46:39.000Z
2021-11-20T22:46:39.000Z
source/pkgsrc/lang/python37/patches/patch-Lib_ctypes_macholib_dyld.py
Scottx86-64/dotfiles-1
51004b1e2b032664cce6b553d2052757c286087d
[ "Unlicense" ]
null
null
null
source/pkgsrc/lang/python37/patches/patch-Lib_ctypes_macholib_dyld.py
Scottx86-64/dotfiles-1
51004b1e2b032664cce6b553d2052757c286087d
[ "Unlicense" ]
null
null
null
$NetBSD: patch-Lib_ctypes_macholib_dyld.py,v 1.1 2020/11/17 19:33:26 sjmulder Exp $ Support for macOS 11 and Apple Silicon (ARM). Mostly backported from: https://github.com/python/cpython/pull/22855 --- Lib/ctypes/macholib/dyld.py.orig 2020-08-15 05:20:16.000000000 +0000 +++ Lib/ctypes/macholib/dyld.py @@ -6,6 +6,11 ...
33.888889
83
0.67623
7d16bd874e8bf29b37448fff50db93c25d02ae6f
6,603
py
Python
Licence 1/I21/TP4/pancake.py
axelcoezard/licence
1ed409c4572dea080169171beb7e8571159ba071
[ "MIT" ]
8
2020-11-26T20:45:12.000Z
2021-11-29T15:46:22.000Z
Licence 1/I21/TP4/pancake.py
axelcoezard/licence
1ed409c4572dea080169171beb7e8571159ba071
[ "MIT" ]
null
null
null
Licence 1/I21/TP4/pancake.py
axelcoezard/licence
1ed409c4572dea080169171beb7e8571159ba071
[ "MIT" ]
6
2020-10-23T15:29:24.000Z
2021-05-05T19:10:45.000Z
import tkinter as tk from random import randrange, shuffle from tripancake import tri_pancake PAUSE = 10 NB_PANCAKE = 160 UNITE_DIAMETRE = 6.25 EPAISSEUR = 2.5 ETAT_OFF = 0 ETAT_ON = 1 class Info(tk.Frame): def __init__(self, parent, *args, **kwargs): tk.Frame.__init__(self, parent, *args, **kwargs) ...
33.517766
76
0.52673
70efb22b8813db043f6c9e55f1bb96ad4a330c5e
362
py
Python
Algorithms/notes/recursive_fib2.py
tobias-fyi/02_algorithms
ab1a8a07c3560ad66712992e3af906e8fd316fe2
[ "MIT" ]
null
null
null
Algorithms/notes/recursive_fib2.py
tobias-fyi/02_algorithms
ab1a8a07c3560ad66712992e3af906e8fd316fe2
[ "MIT" ]
8
2020-03-24T17:47:23.000Z
2022-03-12T00:33:21.000Z
cs/lambda_cs/02_algorithms/Algorithms/notes/recursive_fib2.py
tobias-fyi/vela
b0b3d3c6dc3fa397c8c7a492098a02cf75e0ff82
[ "MIT" ]
null
null
null
""" Algorithms :: Notes - Writing Better Solutions """ cache = {0: 1, 1: 1} def rec_fib(n: int) -> int: # Base case is in cache if n in cache: return cache[n] # If not in the cache, calculate it n_minus_1 = rec_fib(n - 1) n_minus_2 = rec_fib(n - 2) cache[n] = n_minus_1 + n_minus_2 ...
15.083333
46
0.59116
cba7685c8a9e3d1a449b286fee0a07ff0f3803a2
3,934
py
Python
app/t1health_app/static/fusioncharts-suite-xt/integrations/django/samples/fusioncharts/samples/chart_tooltip.py
siyaochen/Tier1Health
536591a7534bbb3fb27fe889bfed9de152ec1864
[ "MIT" ]
14
2016-11-03T19:06:21.000Z
2021-11-24T09:05:09.000Z
app/t1health_app/static/fusioncharts-suite-xt/integrations/django/samples/fusioncharts/samples/chart_tooltip.py
siyaochen/Tier1Health
536591a7534bbb3fb27fe889bfed9de152ec1864
[ "MIT" ]
10
2022-02-16T07:17:49.000Z
2022-03-08T12:43:51.000Z
asset/integrations/django/samples/fusioncharts/samples/chart_tooltip.py
Piusshungu/catherine-junior-school
5356f4ff5a5c8383849d32e22a60d638c35b1a48
[ "MIT" ]
17
2016-05-19T13:16:34.000Z
2021-04-30T14:38:42.000Z
from django.shortcuts import render from django.http import HttpResponse # Include the `fusioncharts.py` file which has required functions to embed the charts in html page from ..fusioncharts import FusionCharts # Loading Data from a Static JSON String # It is a example to show a marimekko chart where data is passed ...
42.301075
380
0.361718
cbb4b27da92f97c5f1933a77f499933e353238bb
2,613
py
Python
Q-learning/q-learning.py
xixiha5230/RL
cc957a4231263074b8cf7fad6ba276f4b3899670
[ "MIT" ]
null
null
null
Q-learning/q-learning.py
xixiha5230/RL
cc957a4231263074b8cf7fad6ba276f4b3899670
[ "MIT" ]
null
null
null
Q-learning/q-learning.py
xixiha5230/RL
cc957a4231263074b8cf7fad6ba276f4b3899670
[ "MIT" ]
null
null
null
import gym import numpy from numpy.lib.utils import info from gridworld import CliffWalkingWapper import time class Agent(): def __init__(self, obs_num, act_num, learning_rate, loss_rate, export_rate): self.obs_num = obs_num self.act_num = act_num self.learning_rate = lear...
29.693182
77
0.596632
1de3277a1b86d8eb251e4df5d5142e956a8ac94a
382
py
Python
src/python/py-accepted/160A.py
cbarnson/UVa
0dd73fae656613e28b5aaf5880c5dad529316270
[ "Unlicense", "MIT" ]
2
2019-09-07T17:00:26.000Z
2020-08-05T02:08:35.000Z
src/python/py-accepted/160A.py
cbarnson/UVa
0dd73fae656613e28b5aaf5880c5dad529316270
[ "Unlicense", "MIT" ]
null
null
null
src/python/py-accepted/160A.py
cbarnson/UVa
0dd73fae656613e28b5aaf5880c5dad529316270
[ "Unlicense", "MIT" ]
null
null
null
#! python # Problem # : 160A # Created on : 2019-01-15 20:00:55 def Main(): n = int(input()) arr = [int(x) for x in input().split(" ")] tot = sum(arr) cnt = 0 tot2 = 0 for el in reversed(sorted(arr)): tot2 += el tot -= el cnt += 1 if tot2 > tot: ...
16.608696
46
0.471204
2ae52c15c44fbff7b744382bd48af2468cbca65e
4,003
py
Python
checks/url_reachability.py
thegreenwebfoundation/green-spider
68f22886178bbe5b476a4591a6812ee25cb5651b
[ "Apache-2.0" ]
19
2018-04-20T11:03:41.000Z
2022-01-12T20:58:56.000Z
checks/url_reachability.py
thegreenwebfoundation/green-spider
68f22886178bbe5b476a4591a6812ee25cb5651b
[ "Apache-2.0" ]
160
2018-04-05T16:12:59.000Z
2022-03-01T13:01:27.000Z
checks/url_reachability.py
thegreenwebfoundation/green-spider
68f22886178bbe5b476a4591a6812ee25cb5651b
[ "Apache-2.0" ]
8
2018-11-05T13:07:57.000Z
2021-06-11T11:46:43.000Z
""" This check verifies whether the urls in config are reachable. Some additional information regarding redirects and SSL problems are also recorded and returned as results. Non-accessible URLs are removed from config.urls. A redirect to facebook.com is not considered reachable, as that leads to a different website i...
36.390909
158
0.541344
2d76649179b7808f0810fbed46becaffb6fe7575
1,635
py
Python
backend/products/models.py
saulhappy/drf
5e62da54cdf0f0fead742c891d34e7eacd488a1b
[ "MIT" ]
null
null
null
backend/products/models.py
saulhappy/drf
5e62da54cdf0f0fead742c891d34e7eacd488a1b
[ "MIT" ]
null
null
null
backend/products/models.py
saulhappy/drf
5e62da54cdf0f0fead742c891d34e7eacd488a1b
[ "MIT" ]
null
null
null
from random import choice from django.conf import settings from django.db import models from django.db.models import Q User = settings.AUTH_USER_MODEL EXPENSIVE_PRODUCT_PRICE = 50 PRODUCT_MODEL_TAGS = ["cereal", "chocolate", "candy"] class ProductQuerySet(models.QuerySet): def is_public(self): return se...
28.684211
83
0.686239
934b39770dbc209a73cc722d03194b79558aef79
1,330
py
Python
DataProcess/net/ensemble.py
ZhangQiHang-98/RFID_Scirpt
0f74087add4cf16e2d201ad4f31cc1abd287db7e
[ "MIT" ]
3
2021-12-24T04:52:03.000Z
2021-12-27T02:14:49.000Z
DataProcess/net/ensemble.py
ZhangQiHang-98/RFID_Scirpt
0f74087add4cf16e2d201ad4f31cc1abd287db7e
[ "MIT" ]
null
null
null
DataProcess/net/ensemble.py
ZhangQiHang-98/RFID_Scirpt
0f74087add4cf16e2d201ad4f31cc1abd287db7e
[ "MIT" ]
null
null
null
import keras import numpy as np from utils.utils import calculate_metrics import gc class Classifier_ENSEMBLE: def __init__(self, output_directory, input_shape, nb_classes, verbose=False): self.output_directory = output_directory self.model1 = keras.models.load_model(self.output_directory. ...
34.102564
83
0.581955
aa2437b32468d2b9e9de1f606afa15825e2a8cff
336
py
Python
python/primary/模块/demo_list.py
EstherLacan/jiangfw
a449b1925742873c76dc1b3284aedb359204bc76
[ "Apache-2.0" ]
1
2020-07-29T16:43:46.000Z
2020-07-29T16:43:46.000Z
python/primary/模块/demo_list.py
EstherLacan/jiangfw
a449b1925742873c76dc1b3284aedb359204bc76
[ "Apache-2.0" ]
null
null
null
python/primary/模块/demo_list.py
EstherLacan/jiangfw
a449b1925742873c76dc1b3284aedb359204bc76
[ "Apache-2.0" ]
null
null
null
#Sequence's Basic Operation #index x = [1, 2, 5, 7, 9, 11, 13, 21, 15, 19, 18] x[1] = 3 x[-1] = x[-1] -1 print 'Seq X is:\n' + str(x) #piece print "x[:] is: " + str(x[:]) print "x[:3] is: " + str(x[:3]) print "x[::2] is: " + str(x[::2]) #add y = [10, 12, 14] print 'x+y is: ' + str(x+y) #multiply z = 'Python' print ...
16
43
0.491071
52ba0307364ae1f0346283c85ddfdf55c873f8b9
406
py
Python
tag_1/p_3_3_potenzfunktion.py
techrabbit58/uebung_informatik_vorkurs
e99312ae66ccccd6bfe45bfd3c3f43c01690659c
[ "Unlicense" ]
null
null
null
tag_1/p_3_3_potenzfunktion.py
techrabbit58/uebung_informatik_vorkurs
e99312ae66ccccd6bfe45bfd3c3f43c01690659c
[ "Unlicense" ]
null
null
null
tag_1/p_3_3_potenzfunktion.py
techrabbit58/uebung_informatik_vorkurs
e99312ae66ccccd6bfe45bfd3c3f43c01690659c
[ "Unlicense" ]
null
null
null
""" 3 for/while-Schleifen (Tag 1) 3.3 Lass Dir für eine festgelegte Basis und Exponenten eine feste Potenz berechnen. Beispiele: 2^10 = 1024, 3^4 = 81 """ def potenz(basis, exponent): antwort = basis for _ in range(1, exponent): antwort *= basis return antwort if __name__ == '__main__': ass...
21.368421
83
0.662562
5e2dbcec6f804af7b74301b07a418ee1447c1bcc
1,934
py
Python
src/fig_util.py
icestorm972/Covid19-PyAnalysis-Collection
16127e9c590d37d3dfc89ec9877c52e6336d7d30
[ "MIT" ]
1
2021-05-02T09:53:25.000Z
2021-05-02T09:53:25.000Z
src/fig_util.py
icestorm972/Covid19-PyAnalysis-Collection
16127e9c590d37d3dfc89ec9877c52e6336d7d30
[ "MIT" ]
null
null
null
src/fig_util.py
icestorm972/Covid19-PyAnalysis-Collection
16127e9c590d37d3dfc89ec9877c52e6336d7d30
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- import os import tempfile import numpy as np from matplotlib.image import imread def force_fig_size(fig, target_size_in_px, dpi=100, pad_inches=0.2, max_iter=8): def _win_named_temp_file(suffix): fname = os.path.join(tempfile.gettempdir(), os.urandom(24).hex() + suffix) ...
30.21875
107
0.525336
dc7a321016ca3ea59472aebffeea3208cf7db9d2
2,133
py
Python
teams/codeing_crazy/src/gen_samples.py
AbinMM/PYNQ_Hackathon_2017
711c75e8590b02f313295cef712188691690c948
[ "BSD-3-Clause" ]
19
2017-10-08T03:18:38.000Z
2020-07-07T02:34:18.000Z
teams/codeing_crazy/src/gen_samples.py
AbinMM/PYNQ_Hackathon_2017
711c75e8590b02f313295cef712188691690c948
[ "BSD-3-Clause" ]
2
2017-10-08T03:15:10.000Z
2017-10-10T16:10:32.000Z
teams/codeing_crazy/src/gen_samples.py
AbinMM/PYNQ_Hackathon_2017
711c75e8590b02f313295cef712188691690c948
[ "BSD-3-Clause" ]
28
2017-10-07T23:24:36.000Z
2022-03-29T08:03:40.000Z
from pynq.overlays.base import BaseOverlay import numpy as np import matplotlib.pyplot as plt import wave """ Create sin waves in the .pdm format for use by the demo. Apparently the Pynq can only read from files such as these .pdms, so we create very short clips """ print("Init overlay") base = BaseOverlay("base.b...
28.065789
101
0.680731
522159871905995bfbfca9ec301569df263b868c
6,773
py
Python
research/cv/swin_transformer/src/data/imagenet.py
leelige/mindspore
5199e05ba3888963473f2b07da3f7bca5b9ef6dc
[ "Apache-2.0" ]
77
2021-10-15T08:32:37.000Z
2022-03-30T13:09:11.000Z
research/cv/swin_transformer/src/data/imagenet.py
leelige/mindspore
5199e05ba3888963473f2b07da3f7bca5b9ef6dc
[ "Apache-2.0" ]
3
2021-10-30T14:44:57.000Z
2022-02-14T06:57:57.000Z
research/cv/swin_transformer/src/data/imagenet.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.076923
118
0.641813
52267bbd0316b959d1d58b95d150066d249081dc
3,581
py
Python
crypto/chainfunc/solution/solver.py
vidner/codepwnda-ctf
7e086044b753fe555b44395b79827d2f5b89da1d
[ "Unlicense" ]
6
2021-02-18T15:07:55.000Z
2022-02-04T01:38:10.000Z
crypto/chainfunc/solution/solver.py
vidner/codepwnda-ctf
7e086044b753fe555b44395b79827d2f5b89da1d
[ "Unlicense" ]
null
null
null
crypto/chainfunc/solution/solver.py
vidner/codepwnda-ctf
7e086044b753fe555b44395b79827d2f5b89da1d
[ "Unlicense" ]
null
null
null
import random import hashlib def f0(x): a = 0 b = 1 while(x): a = a + b b = a - b x = x - 1 return (a+b)%10 def f1(x): a = "" for i in range(len(x)): a += chr((ord(x[i])^f0(i))%256) return a def f2(x): q, r, t, k, n, l, y = 1, 0, 1, 1...
25.397163
233
0.443172
5e78e38173bd8ef239a7190bc2d32a5928bb12e1
96
py
Python
warp/utils/__init__.py
j-helland/warp
2a71346f0ec4d4e6fd45ed3b5e972b683724287c
[ "Unlicense" ]
null
null
null
warp/utils/__init__.py
j-helland/warp
2a71346f0ec4d4e6fd45ed3b5e972b683724287c
[ "Unlicense" ]
null
null
null
warp/utils/__init__.py
j-helland/warp
2a71346f0ec4d4e6fd45ed3b5e972b683724287c
[ "Unlicense" ]
null
null
null
from .utils import * from .lazy_loader import LazyLoader from .global_import import GlobalImport
32
39
0.84375
5ec06e0e3fcfd5e8fa2f0d95a86b3abf2ce73563
176
py
Python
exercises/ja/exc_03_14_03.py
Jette16/spacy-course
32df0c8f6192de6c9daba89740a28c0537e4d6a0
[ "MIT" ]
2,085
2019-04-17T13:10:40.000Z
2022-03-30T21:51:46.000Z
exercises/ja/exc_03_14_03.py
Jette16/spacy-course
32df0c8f6192de6c9daba89740a28c0537e4d6a0
[ "MIT" ]
79
2019-04-18T14:42:55.000Z
2022-03-07T08:15:43.000Z
exercises/ja/exc_03_14_03.py
Jette16/spacy-course
32df0c8f6192de6c9daba89740a28c0537e4d6a0
[ "MIT" ]
361
2019-04-17T13:34:32.000Z
2022-03-28T04:42:45.000Z
from spacy.lang.ja import Japanese nlp = Japanese() people = ["デヴィッド・ボウイ", "アンゲラ・メルケル", "レディー・ガガ"] # PhraseMatcherのパターンのリストを作成 patterns = [nlp(person) for person in people]
19.555556
46
0.721591
1d3e56803216c79ce5510358600232a8c72d5a7d
393
py
Python
project/services/oauth2_client.py
DanielGrams/gsevp
e94034f7b64de76f38754b56455e83092378261f
[ "MIT" ]
1
2021-06-01T14:49:18.000Z
2021-06-01T14:49:18.000Z
project/services/oauth2_client.py
DanielGrams/gsevp
e94034f7b64de76f38754b56455e83092378261f
[ "MIT" ]
286
2020-12-04T14:13:00.000Z
2022-03-09T19:05:16.000Z
project/services/oauth2_client.py
DanielGrams/cityservice
c487c34b5ba6541dcb441fe903ab2012c2256893
[ "MIT" ]
null
null
null
import time from werkzeug.security import gen_salt from project.models import OAuth2Client def complete_oauth2_client(oauth2_client: OAuth2Client) -> None: if not oauth2_client.id: oauth2_client.client_id = gen_salt(24) oauth2_client.client_id_issued_at = int(time.time()) if oauth2_client.c...
26.2
64
0.75827
7f9ccc53ed5c0b934190387c63c98bf4a43c869c
31,133
py
Python
easyp2p/p2p_webdriver.py
Ceystyle/easyp2p
99c32e3ec0ff5a34733f157dd1b53d1aa9bc9edc
[ "MIT" ]
4
2019-07-18T10:58:28.000Z
2021-11-18T16:57:45.000Z
easyp2p/p2p_webdriver.py
Ceystyle/easyp2p
99c32e3ec0ff5a34733f157dd1b53d1aa9bc9edc
[ "MIT" ]
1
2019-07-05T09:21:47.000Z
2019-07-05T09:21:47.000Z
easyp2p/p2p_webdriver.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 """ Module implementing P2PWebDriver, a class representing a P2P platform. This module defines the P2PWebDriver class. It contains code for performing log in, log out, opening the account statement page and generating and downloading the account st...
41.510667
80
0.620467
c395fbcafcfa010ad20454a6a1cc8ca2f950845b
13,010
py
Python
code/selfish_proxy/networking.py
simonmulser/master-thesis
5ca2ddda377a0eede5a3c50866e0f90292c5448f
[ "CC-BY-4.0" ]
null
null
null
code/selfish_proxy/networking.py
simonmulser/master-thesis
5ca2ddda377a0eede5a3c50866e0f90292c5448f
[ "CC-BY-4.0" ]
null
null
null
code/selfish_proxy/networking.py
simonmulser/master-thesis
5ca2ddda377a0eede5a3c50866e0f90292c5448f
[ "CC-BY-4.0" ]
1
2019-06-05T09:10:30.000Z
2019-06-05T09:10:30.000Z
from bitcoinnetwork import network from bitcoinnetwork.network import ConnectionLostEvent from bitcoinnetwork.network import ConnectionFailedEvent import logging from bitcoin import core from bitcoin import net from bitcoin import messages from strategy import BlockOrigin import chainutil import behaviour import time i...
42.796053
133
0.577018
f6270990b975c811d7238f837dd45ad8b1fa9be0
2,824
py
Python
qmk_firmware/lib/python/qmk/decorators.py
DanTupi/personal_setup
911b4951e4d8b78d6ea8ca335229e2e970fda871
[ "MIT" ]
null
null
null
qmk_firmware/lib/python/qmk/decorators.py
DanTupi/personal_setup
911b4951e4d8b78d6ea8ca335229e2e970fda871
[ "MIT" ]
null
null
null
qmk_firmware/lib/python/qmk/decorators.py
DanTupi/personal_setup
911b4951e4d8b78d6ea8ca335229e2e970fda871
[ "MIT" ]
null
null
null
"""Helpful decorators that subcommands can use. """ import functools from time import monotonic from milc import cli from qmk.keyboard import find_keyboard_from_dir from qmk.keymap import find_keymap_from_dir def automagic_keyboard(func): """Sets `cli.config.<subcommand>.keyboard` based on environment. Thi...
33.223529
168
0.661473
dcf19d754a8a025e8ecf93900e6f82917f5046ec
185
py
Python
CS208/exercise1/n.py
Wycers/Codelib
86d83787aa577b8f2d66b5410e73102411c45e46
[ "MIT" ]
22
2018-08-07T06:55:10.000Z
2021-06-12T02:12:19.000Z
CS208/exercise1/n.py
Wycers/Codelib
86d83787aa577b8f2d66b5410e73102411c45e46
[ "MIT" ]
28
2020-03-04T23:47:22.000Z
2022-02-26T18:50:00.000Z
CS208/exercise1/n.py
Wycers/Codelib
86d83787aa577b8f2d66b5410e73102411c45e46
[ "MIT" ]
4
2019-11-09T15:41:26.000Z
2021-10-10T08:56:57.000Z
import random def work(n): a = [x for x in range(0, n)] random.shuffle(a) for i in range(0, n): a[i] += 1 # print(a) if __name__ == "__main__": work(10)
13.214286
32
0.513514
b4f73eb125111fd9aa790f55b39e0ec311a04815
393
py
Python
Python/itertools.permutations().py
paurav11/HackerRank
80c91c5cc55dd56671a5906be7a106ad4f1db95e
[ "MIT" ]
1
2021-05-19T06:44:03.000Z
2021-05-19T06:44:03.000Z
Python/itertools.permutations().py
paurav11/HackerRank
80c91c5cc55dd56671a5906be7a106ad4f1db95e
[ "MIT" ]
null
null
null
Python/itertools.permutations().py
paurav11/HackerRank
80c91c5cc55dd56671a5906be7a106ad4f1db95e
[ "MIT" ]
null
null
null
from itertools import permutations if __name__ == '__main__': input_string = input().strip().split() if input_string[0].isupper() and (int(input_string[1]) > 0 and int(input_string[1]) <= len(input_string[0])): permutations_list = sorted(list(permutations(input_string[0],int(input_string[1])))) ...
43.666667
113
0.676845
2e99dcf0c27ed2d1a41832d104907e8c0c0c02d4
10,737
py
Python
app/services/aws_services/aws_s3_services.py
zhiyong-lv/flask-login
d8bf0719bae19ba8f7f44ea6d6a8ca65ba22aa63
[ "MIT" ]
null
null
null
app/services/aws_services/aws_s3_services.py
zhiyong-lv/flask-login
d8bf0719bae19ba8f7f44ea6d6a8ca65ba22aa63
[ "MIT" ]
null
null
null
app/services/aws_services/aws_s3_services.py
zhiyong-lv/flask-login
d8bf0719bae19ba8f7f44ea6d6a8ca65ba22aa63
[ "MIT" ]
null
null
null
import logging import boto3 from botocore.exceptions import ClientError class AwsS3Service(object): def __init__(self, region=None): self._logger = logging.getLogger(__name__) try: self.s3_resource = boto3.resource('s3') if region is None: self.s3_client = ...
42.271654
120
0.5848
d3a2da2a7e20efe4f5550b096f58f65a288ddd02
223
py
Python
Python/Strings/the_minion_game.py
rho2/HackerRank
4d9cdfcabeb20212db308d8e4f2ac1b8ebf7d266
[ "MIT" ]
null
null
null
Python/Strings/the_minion_game.py
rho2/HackerRank
4d9cdfcabeb20212db308d8e4f2ac1b8ebf7d266
[ "MIT" ]
null
null
null
Python/Strings/the_minion_game.py
rho2/HackerRank
4d9cdfcabeb20212db308d8e4f2ac1b8ebf7d266
[ "MIT" ]
null
null
null
a = input() v = 'AEIOU' l = len(a) k, s = 0,0 for i in range(l): if a[i] in v: k += (l-i) else: s += (l-i) if k > s: print("Kevin", k) elif k < s: print("Stuart", s) else: print("Draw")
13.117647
22
0.430493
e26e95b9913bab255f96d15e8cad5e287dec0171
4,067
py
Python
Contrib-Inspur/openbmc/poky/scripts/lib/wic/plugins/source/rootfs.py
opencomputeproject/Rack-Manager
e1a61d3eeeba0ff655fe9c1301e8b510d9b2122a
[ "MIT" ]
5
2019-11-11T07:57:26.000Z
2022-03-28T08:26:53.000Z
Contrib-Inspur/openbmc/poky/scripts/lib/wic/plugins/source/rootfs.py
opencomputeproject/Rack-Manager
e1a61d3eeeba0ff655fe9c1301e8b510d9b2122a
[ "MIT" ]
3
2019-09-05T21:47:07.000Z
2019-09-17T18:10:45.000Z
Contrib-Inspur/openbmc/poky/scripts/lib/wic/plugins/source/rootfs.py
opencomputeproject/Rack-Manager
e1a61d3eeeba0ff655fe9c1301e8b510d9b2122a
[ "MIT" ]
11
2019-07-20T00:16:32.000Z
2022-01-11T14:17:48.000Z
# # Copyright (c) 2014, Intel Corporation. # # SPDX-License-Identifier: GPL-2.0-only # # DESCRIPTION # This implements the 'rootfs' source plugin class for 'wic' # # AUTHORS # Tom Zanussi <tom.zanussi (at] linux.intel.com> # Joao Henrique Ferreira de Freitas <joaohf (at] gmail.com> # import logging import os import sh...
35.99115
93
0.584952
2cbb385eb194c2e1d344b17d4cb9659aa8644e70
19,718
py
Python
Python/output.py
guillaumetousignant/euler3D
7bdfaae7f6b774232b6fc9f83d40a67ccee9a8ae
[ "MIT" ]
1
2019-02-11T00:45:37.000Z
2019-02-11T00:45:37.000Z
Python/output.py
guillaumetousignant/euler3D
7bdfaae7f6b774232b6fc9f83d40a67ccee9a8ae
[ "MIT" ]
null
null
null
Python/output.py
guillaumetousignant/euler3D
7bdfaae7f6b774232b6fc9f83d40a67ccee9a8ae
[ "MIT" ]
null
null
null
import tkinter from tkinter import * from tkinter import ttk from tkinter import messagebox from tkinter import filedialog class Output(): def __init__(self, master): self.master = master # SECTION 3: OUTPUT # SECTION 3.1: FILES TYPE title_section_3_1 = ttk.LabelFrame(mast...
54.469613
200
0.67304
39001131ad582663705f0d2d5390cad7bc704d61
788
py
Python
src/server/app/endpoints/auth/custom_oidc_socket.py
MatthiasRiener/DigiPen
9b4aff4a1c431e06d73733dc3dd3f3f3d4631704
[ "MIT" ]
null
null
null
src/server/app/endpoints/auth/custom_oidc_socket.py
MatthiasRiener/DigiPen
9b4aff4a1c431e06d73733dc3dd3f3f3d4631704
[ "MIT" ]
null
null
null
src/server/app/endpoints/auth/custom_oidc_socket.py
MatthiasRiener/DigiPen
9b4aff4a1c431e06d73733dc3dd3f3f3d4631704
[ "MIT" ]
null
null
null
import requests import json from ...db.settings import IS_SERVER def logoutSession(refresh_token, access_token): secrets_file = "" if IS_SERVER: print("Loading Server FILES1") secrets_file = 'server_secrets.json' else: print("LOADING CLIEnT FILES") secrets_file = 'clie...
29.185185
122
0.676396
46b7b0f443e98d2b24fa3e7b46bab4770c29b75f
1,581
py
Python
research/cv/DBPN/src/model/generator.py
leelige/mindspore
5199e05ba3888963473f2b07da3f7bca5b9ef6dc
[ "Apache-2.0" ]
77
2021-10-15T08:32:37.000Z
2022-03-30T13:09:11.000Z
research/cv/DBPN/src/model/generator.py
leelige/mindspore
5199e05ba3888963473f2b07da3f7bca5b9ef6dc
[ "Apache-2.0" ]
3
2021-10-30T14:44:57.000Z
2022-02-14T06:57:57.000Z
research/cv/DBPN/src/model/generator.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...
39.525
78
0.679949
2045d9d9d5ca25db73b1baf055ae4a54b14b5e68
5,220
py
Python
components/py_engine/create_python_home.py
Gabrielle-OyO/AliOS-Things
a923550ef98bcba49070b64b90b09d010239c25a
[ "Apache-2.0" ]
null
null
null
components/py_engine/create_python_home.py
Gabrielle-OyO/AliOS-Things
a923550ef98bcba49070b64b90b09d010239c25a
[ "Apache-2.0" ]
1
2021-09-11T05:53:30.000Z
2021-09-11T05:53:30.000Z
components/py_engine/create_python_home.py
willianchanlovegithub/AliOS-Things
637c0802cab667b872d3b97a121e18c66f256eab
[ "Apache-2.0" ]
null
null
null
# coding=utf-8 import shutil import os import sys import stat import datetime import subprocess from datetime import datetime def copy_apps_files(script_dir, yaml_dir): framework_dir = os.path.join(script_dir, "framework") pyFile = open(yaml_dir) data = pyFile.read() print(' data to be parsed is %s' ...
32.830189
89
0.644253
6449bf4638114c895e86ab218d159649d8251ffd
2,032
py
Python
Packs/ShiftManagement/Scripts/GetUsersOOO/GetUsersOOO.py
diCagri/content
c532c50b213e6dddb8ae6a378d6d09198e08fc9f
[ "MIT" ]
799
2016-08-02T06:43:14.000Z
2022-03-31T11:10:11.000Z
Packs/ShiftManagement/Scripts/GetUsersOOO/GetUsersOOO.py
diCagri/content
c532c50b213e6dddb8ae6a378d6d09198e08fc9f
[ "MIT" ]
9,317
2016-08-07T19:00:51.000Z
2022-03-31T21:56:04.000Z
Packs/ShiftManagement/Scripts/GetUsersOOO/GetUsersOOO.py
diCagri/content
c532c50b213e6dddb8ae6a378d6d09198e08fc9f
[ "MIT" ]
1,297
2016-08-04T13:59:00.000Z
2022-03-31T23:43:06.000Z
from CommonServerPython import * def main(): # get current time now = datetime.now() # args list_name = demisto.getArg("listname") if not list_name: list_name = 'OOO List' # update list name to start with 'OOO', so we can't overwrite other lists with this if not list_name.startswi...
33.866667
95
0.635335
b3d8a5c12809ff3107590295f1dee479da9ee0f6
5,279
py
Python
tests/onegov/user/test_generic_ldap.py
politbuero-kampagnen/onegov-cloud
20148bf321b71f617b64376fe7249b2b9b9c4aa9
[ "MIT" ]
null
null
null
tests/onegov/user/test_generic_ldap.py
politbuero-kampagnen/onegov-cloud
20148bf321b71f617b64376fe7249b2b9b9c4aa9
[ "MIT" ]
null
null
null
tests/onegov/user/test_generic_ldap.py
politbuero-kampagnen/onegov-cloud
20148bf321b71f617b64376fe7249b2b9b9c4aa9
[ "MIT" ]
null
null
null
import morepath import pytest from hashlib import sha256 from onegov.core import Framework from onegov.core.security import Public, Private, Secret from onegov.core.utils import scan_morepath_modules, module_path from onegov.user import Auth, UserApp from tests.shared.glauth import GLAuth from tests.shared.client impo...
26.933673
79
0.566963
ff0e4205b33c967c11a8884e394301cd0daa6efc
2,991
py
Python
StudentAverage/csv2db.py
kkysen/Soft-Dev
b19881b1fcc9c7daefc817e6b975ff6bce545d81
[ "Apache-2.0" ]
null
null
null
StudentAverage/csv2db.py
kkysen/Soft-Dev
b19881b1fcc9c7daefc817e6b975ff6bce545d81
[ "Apache-2.0" ]
null
null
null
StudentAverage/csv2db.py
kkysen/Soft-Dev
b19881b1fcc9c7daefc817e6b975ff6bce545d81
[ "Apache-2.0" ]
null
null
null
from __future__ import print_function import csv import os import sqlite3 from collections import Iterable class Database(object): """Database wrapper.""" def __init__(self, path, debug=False): # type: (str) -> None self.path = path self._db = sqlite3.connect(path) ...
31.819149
95
0.532263
20be425a9dbdbaf88dc59c2b7b5d7ad4a3cb5df5
938
py
Python
order/migrations/0015_auto_20201207_1014.py
hhdMrLion/Product-System
e870225ab10c32688a87426d5943d922c47c4404
[ "MIT" ]
1
2021-06-18T03:03:42.000Z
2021-06-18T03:03:42.000Z
order/migrations/0015_auto_20201207_1014.py
hhdMrLion/Product-System
e870225ab10c32688a87426d5943d922c47c4404
[ "MIT" ]
null
null
null
order/migrations/0015_auto_20201207_1014.py
hhdMrLion/Product-System
e870225ab10c32688a87426d5943d922c47c4404
[ "MIT" ]
null
null
null
# Generated by Django 2.2.16 on 2020-12-07 02:14 from django.db import migrations, models import django.db.models.deletion class Migration(migrations.Migration): dependencies = [ ('order', '0014_auto_20201204_0905'), ] operations = [ migrations.RemoveField( mod...
31.266667
152
0.575693
45a98959830a56972ddd923b5c8386f0309acf96
1,011
py
Python
custom_dialog.py
VNCompany/PyDafm
9634f5428b9f3739dbf7c159daad34856b372165
[ "Unlicense" ]
null
null
null
custom_dialog.py
VNCompany/PyDafm
9634f5428b9f3739dbf7c159daad34856b372165
[ "Unlicense" ]
null
null
null
custom_dialog.py
VNCompany/PyDafm
9634f5428b9f3739dbf7c159daad34856b372165
[ "Unlicense" ]
null
null
null
from PyQt5 import uic from PyQt5.QtWidgets import QDialog class CustomDialog(QDialog): CUSTOM_DIALOG_RESULT_CANCEL = 0 CUSTOM_DIALOG_RESULT_OK = 1 CUSTOM_DIALOG_RESULT_NO = 2 def __init__(self): super(CustomDialog, self).__init__() uic.loadUi("designer/dialog_delete.ui", self) ...
27.324324
58
0.642928
afdf0cf8b90be5ecfb9a339db8c48a35630a52de
324
py
Python
pyramid-creator/app/schemas/task_image.py
jinnn-dev/patholearn
b4e6a18cfbf963e71640ed6cac3fc3a618a7ae15
[ "MIT" ]
1
2021-11-04T17:06:07.000Z
2021-11-04T17:06:07.000Z
pyramid-creator/app/schemas/task_image.py
JamesNeumann/learning-by-annotations
c2b5e4b653eeb1c973aa5a7dad35ac8be18cb1ad
[ "MIT" ]
21
2021-11-01T10:13:56.000Z
2021-12-02T10:02:13.000Z
pyramid-creator/app/schemas/task_image.py
jinnn-dev/patholearn
b4e6a18cfbf963e71640ed6cac3fc3a618a7ae15
[ "MIT" ]
1
2021-12-16T18:20:55.000Z
2021-12-16T18:20:55.000Z
from typing import Optional from pydantic import BaseModel class TaskImage(BaseModel): name: str task_image_id: str label: Optional[str] class CreateTaskImage(TaskImage): pass class UpdateTaskImage(BaseModel): task_image_id: str name: Optional[str] label: Optional[st...
16.2
34
0.685185
b33ee50aa03616ebe71d2a597ea890f09929887c
1,199
py
Python
Licence 1/I11/TP5/ex4.py
axelcoezard/licence
1ed409c4572dea080169171beb7e8571159ba071
[ "MIT" ]
8
2020-11-26T20:45:12.000Z
2021-11-29T15:46:22.000Z
Licence 1/I11/TP5/ex4.py
axelcoezard/licence
1ed409c4572dea080169171beb7e8571159ba071
[ "MIT" ]
null
null
null
Licence 1/I11/TP5/ex4.py
axelcoezard/licence
1ed409c4572dea080169171beb7e8571159ba071
[ "MIT" ]
6
2020-10-23T15:29:24.000Z
2021-05-05T19:10:45.000Z
def somme(u, v): if len(u) == len(v): sum = () i = 0 while i < len(u): sum += (u[i] + v[i],) i += 1 return sum def mult(u, a): product = () i = 0 while i < len(u): product += (u[i] * a,) i += 1 return product def produit_scala...
22.203704
60
0.511259
b349d1e936564787580505606709c070ef2e106f
1,567
py
Python
src/onegov/town6/views/form_definition.py
politbuero-kampagnen/onegov-cloud
20148bf321b71f617b64376fe7249b2b9b9c4aa9
[ "MIT" ]
null
null
null
src/onegov/town6/views/form_definition.py
politbuero-kampagnen/onegov-cloud
20148bf321b71f617b64376fe7249b2b9b9c4aa9
[ "MIT" ]
null
null
null
src/onegov/town6/views/form_definition.py
politbuero-kampagnen/onegov-cloud
20148bf321b71f617b64376fe7249b2b9b9c4aa9
[ "MIT" ]
null
null
null
from onegov.core.security import Private, Public from onegov.form import FormCollection, FormDefinition from onegov.org.forms.form_definition import FormDefinitionUrlForm from onegov.org.views.form_definition import get_form_class, \ handle_new_definition, handle_edit_definition, handle_defined_form, \ handle_c...
39.175
75
0.767709
b377977bd244173cf9468fc722be44c096bd8330
604
py
Python
Build a Water Hack/analogspitest.py
Akshu-on-github/MLH-INIT-2022
cf3fbbc8abd3eae3b958d3d482ed1fa1467f559e
[ "MIT" ]
1
2021-07-05T14:30:34.000Z
2021-07-05T14:30:34.000Z
Build a Water Hack/analogspitest.py
Akshu-on-github/MLH-INIT-2022
cf3fbbc8abd3eae3b958d3d482ed1fa1467f559e
[ "MIT" ]
1
2021-07-02T15:36:02.000Z
2021-07-02T15:37:25.000Z
Build a Water Hack/analogspitest.py
Akshu-on-github/MLH-INIT-2022
cf3fbbc8abd3eae3b958d3d482ed1fa1467f559e
[ "MIT" ]
1
2021-07-02T15:15:17.000Z
2021-07-02T15:15:17.000Z
#/usr/bin/python import spidev from numpy import interp import os from time import sleep delay = 0.2 spi = spidev.SpiDev() spi.open(0,0) def readChannel(channel): spi.max_speed_hz = 1350000 val = spi.xfer2([1,(8+channel)<<4,0]) data = ((val[1]&3) << 8) + val[2] return data if __name__ == "__main__"...
20.133333
56
0.559603
9230d145a7e8e436b9f96d3fdbc44dca913f882c
760
py
Python
nz_crawl_demo/day1/python2/demo2.py
gaohj/nzflask_bbs
36a94c380b78241ed5d1e07edab9618c3e8d477b
[ "Apache-2.0" ]
null
null
null
nz_crawl_demo/day1/python2/demo2.py
gaohj/nzflask_bbs
36a94c380b78241ed5d1e07edab9618c3e8d477b
[ "Apache-2.0" ]
27
2020-02-12T07:55:58.000Z
2022-03-12T00:19:09.000Z
nz_crawl_demo/day1/python2/demo2.py
gaohj/nzflask_bbs
36a94c380b78241ed5d1e07edab9618c3e8d477b
[ "Apache-2.0" ]
2
2020-02-18T01:54:55.000Z
2020-02-21T11:36:28.000Z
#encoding:utf-8 # import sys # print sys.version 打印python的版本 import urllib2 url = "https://www.baidu.com" response = urllib2.urlopen(url) headers = { "User-Agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/80.0.3987.132 Safari/537.36", } #创建请求对象 request = urllib2.R...
24.516129
136
0.75
923e27d07a719fa89417a8b36760c139b7011e5b
998
py
Python
Versuch2/task1.1.py
Tobias-Schoch/SSS
f8b078ca7f6482fc7c89d5f9e784a549459eefb7
[ "MIT" ]
null
null
null
Versuch2/task1.1.py
Tobias-Schoch/SSS
f8b078ca7f6482fc7c89d5f9e784a549459eefb7
[ "MIT" ]
null
null
null
Versuch2/task1.1.py
Tobias-Schoch/SSS
f8b078ca7f6482fc7c89d5f9e784a549459eefb7
[ "MIT" ]
1
2022-01-06T12:47:53.000Z
2022-01-06T12:47:53.000Z
import cv2 # -------- Aufgabe1.1 -------- # cap = cv2.VideoCapture(0) cap.set(3, 640) cap.set(4, 480) cap.set(10, 200) cap.set(11, 32) cap.set(12, 32) cap.set(14, 20) cap.set(15, -4) cap.set(17, 10000) while (True): ret, frame = cap.read() gray = cv2.cvtColor(frame, cv2.COLOR_BGR2GRAY) cv2.imshow("frame...
24.341463
57
0.54008
924dbc4cb26c591e1d35caf28a0495fd132e6406
609
py
Python
test_app.py
wbigger/2021-tris
381bea2788be2502b83aa7bc93610567acad0263
[ "MIT" ]
null
null
null
test_app.py
wbigger/2021-tris
381bea2788be2502b83aa7bc93610567acad0263
[ "MIT" ]
null
null
null
test_app.py
wbigger/2021-tris
381bea2788be2502b83aa7bc93610567acad0263
[ "MIT" ]
null
null
null
from app import win def test_win_1(): board = [ ['X','X','X'], ['-','O','O'], ['-','-','-'] ] assert win(board) == 'X' def test_win_2(): board = [ ['X','X','-'], ['O','O','O'], ['-','-','-'] ] a...
17.911765
30
0.341544
2becec736ec55abe6ab2c99dc20e637ea4cba139
207
py
Python
project/forms/oauth2_token.py
DanielGrams/gsevp
e94034f7b64de76f38754b56455e83092378261f
[ "MIT" ]
1
2021-06-01T14:49:18.000Z
2021-06-01T14:49:18.000Z
project/forms/oauth2_token.py
DanielGrams/gsevp
e94034f7b64de76f38754b56455e83092378261f
[ "MIT" ]
286
2020-12-04T14:13:00.000Z
2022-03-09T19:05:16.000Z
project/forms/oauth2_token.py
DanielGrams/gsevpt
a92f71694388e227e65ed1b24446246ee688d00e
[ "MIT" ]
null
null
null
from flask_babelex import lazy_gettext from flask_wtf import FlaskForm from wtforms import SubmitField class RevokeOAuth2TokenForm(FlaskForm): submit = SubmitField(lazy_gettext("Revoke OAuth2 token"))
25.875
61
0.830918
92028127be531b7013d77bf893fd14bd8235802f
359
py
Python
web2/bahn/migrations/0004_auto_20200109_1634.py
git-learner-20/wp-bahn
757f9cf91ca645783ffd929a872d1e7bd4faec96
[ "MIT" ]
1
2020-01-09T22:27:29.000Z
2020-01-09T22:27:29.000Z
web2/bahn/migrations/0004_auto_20200109_1634.py
PatriciaKaluza/wp-bahn
a98a297928a9454fa24f033e70ab7ebcdf53a5d5
[ "MIT" ]
null
null
null
web2/bahn/migrations/0004_auto_20200109_1634.py
PatriciaKaluza/wp-bahn
a98a297928a9454fa24f033e70ab7ebcdf53a5d5
[ "MIT" ]
null
null
null
# Generated by Django 2.2.6 on 2020-01-09 16:34 from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('bahn', '0003_fahrt_zeit'), ] operations = [ migrations.AlterField( model_name='fahrt', name='zeit', fiel...
18.894737
47
0.571031
471848058b8b6ed3ad08a83422110125e510f7a2
1,185
py
Python
unhide_rows.py
twothreenine/task-rotation
64a3a648c960df65d03587a3f7009ce4b1f7df44
[ "MIT" ]
null
null
null
unhide_rows.py
twothreenine/task-rotation
64a3a648c960df65d03587a3f7009ce4b1f7df44
[ "MIT" ]
1
2022-01-09T18:35:17.000Z
2022-01-09T18:35:17.000Z
unhide_rows.py
twothreenine/task-rotation
64a3a648c960df65d03587a3f7009ce4b1f7df44
[ "MIT" ]
null
null
null
import ethercalc import logging import script calc_configs = script.get_calc_configs() if calc_configs: if len(calc_configs) == 1: calc_config = calc_configs[0] else: calc_names = [] for calc_config in calc_configs: calc_names.append(calc_config['name']) print("Calc...
42.321429
108
0.686076
5b4f4b531c37d53181fc1094e7a353b1cbe381e8
8,246
py
Python
frappe-bench/apps/erpnext/erpnext/stock/doctype/batch/batch.py
Semicheche/foa_frappe_docker
a186b65d5e807dd4caf049e8aeb3620a799c1225
[ "MIT" ]
null
null
null
frappe-bench/apps/erpnext/erpnext/stock/doctype/batch/batch.py
Semicheche/foa_frappe_docker
a186b65d5e807dd4caf049e8aeb3620a799c1225
[ "MIT" ]
null
null
null
frappe-bench/apps/erpnext/erpnext/stock/doctype/batch/batch.py
Semicheche/foa_frappe_docker
a186b65d5e807dd4caf049e8aeb3620a799c1225
[ "MIT" ]
null
null
null
# Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors # License: GNU General Public License v3. See license.txt from __future__ import unicode_literals import frappe from frappe import _ from frappe.model.document import Document from frappe.model.naming import make_autoname, revert_series_if_last from ...
31.715385
239
0.738297
5bb6b8bcda1028c42b4f49f3e3fdd56f0b10d9c7
1,581
py
Python
Python/zzz_training_challenge/Python_Challenge/solutions/ch03_recursion/util/RecursionUtils.py
Kreijeck/learning
eaffee08e61f2a34e01eb8f9f04519aac633f48c
[ "MIT" ]
null
null
null
Python/zzz_training_challenge/Python_Challenge/solutions/ch03_recursion/util/RecursionUtils.py
Kreijeck/learning
eaffee08e61f2a34e01eb8f9f04519aac633f48c
[ "MIT" ]
null
null
null
Python/zzz_training_challenge/Python_Challenge/solutions/ch03_recursion/util/RecursionUtils.py
Kreijeck/learning
eaffee08e61f2a34e01eb8f9f04519aac633f48c
[ "MIT" ]
null
null
null
# Beispielprogramm für das Buch "Python Challenge" # # Copyright 2020 by Michael Inden def fib_rec(n): if n <= 0: raise ValueError("n must be >= 1") if n == 1 or n == 2: return 1 # rekursiver Abstieg return fib_rec(n - 1) + fib_rec(n - 2) def fib_iterative(n): if n <= 0: ...
19.518519
74
0.578748