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
344c156b14fab359c29fd935924af770f65c6350
557
py
Python
devscripts/stringview_performance_test.py
jecki/DHParser
c6c1bd7db2de85b5997a3640242f4f444532304e
[ "Apache-2.0" ]
2
2020-12-25T19:37:42.000Z
2021-03-26T04:59:12.000Z
devscripts/stringview_performance_test.py
jecki/DHParser
c6c1bd7db2de85b5997a3640242f4f444532304e
[ "Apache-2.0" ]
6
2018-08-07T22:48:52.000Z
2021-10-07T18:38:20.000Z
devscripts/stringview_performance_test.py
jecki/DHParser
c6c1bd7db2de85b5997a3640242f4f444532304e
[ "Apache-2.0" ]
null
null
null
#!/usr/bin/env python3 import sys sys.path.append('../') from DHParser.stringview import StringView from timeit import timeit import re sv = StringView(" 01234567890 ") rx = re.compile('\s*') print(timeit('s = sv[10:21]', number=5_000_000, globals=globals())) print(timeit('m=sv.match(rx)', numb...
21.423077
68
0.667864
944bbd532cf5ed75302751c1d5014f025c2c6c7e
3,673
py
Python
SENAMHI Scrap/scrap_data.py
DangoMelon0701/SUMPA
c039f6debf6a0876059eefd70ad661c5f35d4715
[ "MIT" ]
null
null
null
SENAMHI Scrap/scrap_data.py
DangoMelon0701/SUMPA
c039f6debf6a0876059eefd70ad661c5f35d4715
[ "MIT" ]
null
null
null
SENAMHI Scrap/scrap_data.py
DangoMelon0701/SUMPA
c039f6debf6a0876059eefd70ad661c5f35d4715
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- """ Created on Thu Feb 22 02:17:11 2018 @author: Gerardo A. Rivera Tello """ import pandas as pd from bs4 import BeautifulSoup from selenium import webdriver from selenium.webdriver.common.by import By from selenium.webdriver.support.ui import WebDriverWait from selenium.webdriver.support imp...
34.650943
104
0.603049
84a3a7642432c8ccb8e49510a0c814ee10958e66
1,202
py
Python
common/libs/member/CartService.py
yao6891/FlaskOrdering
cbd24bd8d95afaba91ce4d6b1b3548c4e82e3807
[ "Apache-2.0" ]
1
2020-03-24T04:26:34.000Z
2020-03-24T04:26:34.000Z
common/libs/member/CartService.py
yao6891/FlaskOrdering
cbd24bd8d95afaba91ce4d6b1b3548c4e82e3807
[ "Apache-2.0" ]
null
null
null
common/libs/member/CartService.py
yao6891/FlaskOrdering
cbd24bd8d95afaba91ce4d6b1b3548c4e82e3807
[ "Apache-2.0" ]
null
null
null
# -*- coding: utf-8 -*- import hashlib,requests,random,string,json from application import app,db from common.models.member.MemberCart import MemberCart from common.libs.Helper import get_current_date class CartService(): @staticmethod def deleteItem( member_id = 0,items = None ): if member_id < 1 or n...
33.388889
97
0.639767
84aa9c4d3fad76225a66aa6c2d1e5af3a5b21639
1,633
py
Python
bot/exts/moderation/defcon.py
thecoderkitty/fluffington-bot
f518e7b66487aaf9e6c507ced43e15760d604be2
[ "MIT" ]
null
null
null
bot/exts/moderation/defcon.py
thecoderkitty/fluffington-bot
f518e7b66487aaf9e6c507ced43e15760d604be2
[ "MIT" ]
null
null
null
bot/exts/moderation/defcon.py
thecoderkitty/fluffington-bot
f518e7b66487aaf9e6c507ced43e15760d604be2
[ "MIT" ]
null
null
null
import discord from discord.ext import commands from bot.bot import Bot from bot.constants import Roles class DefCon(commands.Cog): def __init__(self, bot: Bot): self.bot = bot @commands.Cog.listener() async def on_member_join(self, member: discord.Member): ... @commands.group(name=...
34.744681
87
0.694427
ca156fbb6bd0d5b96ab4232a6b4798522816f1c6
1,219
py
Python
respiratory/Processed Datasets/Processed Datasets/test5.py
easyCZ/SLIP-A-2015
ad386df9c438d93ec89f68c63d3deda12d27d1ed
[ "MIT" ]
2
2020-06-08T19:17:10.000Z
2020-06-08T20:45:07.000Z
respiratory/Processed Datasets/Processed Datasets/test5.py
easyCZ/SLIP-A-2015
ad386df9c438d93ec89f68c63d3deda12d27d1ed
[ "MIT" ]
14
2015-10-07T09:31:50.000Z
2022-02-23T07:34:10.000Z
respiratory/Processed Datasets/Processed Datasets/test5.py
easyCZ/SLIP-A-2015
ad386df9c438d93ec89f68c63d3deda12d27d1ed
[ "MIT" ]
null
null
null
class patients(object): def __init__(self,number,scores,stats,participated,rank,actual_rank,overall): self.number = number # integer from 1-10. patient number. self.scores = scores # list of floats element of [0,10]. Floats are scores for a given exercise. self.stats = stats # for n exercises this is a list c...
34.828571
214
0.687449
eda51e8bb85b116f02f6f98e6e3414ce29317740
22,966
py
Python
Dockerfiles/gedlab-khmer-filter-abund/pymodules/python2.7/lib/python/pybedtools-0.7.6-py2.7-linux-x86_64.egg/pybedtools/contrib/classifier.py
poojavade/Genomics_Docker
829b5094bba18bbe03ae97daf925fee40a8476e8
[ "Apache-2.0" ]
1
2019-07-29T02:53:51.000Z
2019-07-29T02:53:51.000Z
Dockerfiles/gedlab-khmer-filter-abund/pymodules/python2.7/lib/python/pybedtools-0.7.6-py2.7-linux-x86_64.egg/pybedtools/contrib/classifier.py
poojavade/Genomics_Docker
829b5094bba18bbe03ae97daf925fee40a8476e8
[ "Apache-2.0" ]
1
2021-09-11T14:30:32.000Z
2021-09-11T14:30:32.000Z
Dockerfiles/gedlab-khmer-filter-abund/pymodules/python2.7/lib/python/pybedtools-0.7.6-py2.7-linux-x86_64.egg/pybedtools/contrib/classifier.py
poojavade/Genomics_Docker
829b5094bba18bbe03ae97daf925fee40a8476e8
[ "Apache-2.0" ]
2
2016-12-19T02:27:46.000Z
2019-07-29T02:53:54.000Z
import os import pybedtools import itertools from collections import defaultdict class BasePairClassifier(object): def __init__(self, bed, annotations, genome, sample_name='sample', names=None, prefix='split_'): """ Classifies files using bedtools multiinter. The results ...
38.086235
102
0.56797
610afbe43b8694e4d986965d4eb7f9c93615a56b
5,651
py
Python
source/pkgsrc/lang/python27/patches/patch-Lib_cgi.py
Scottx86-64/dotfiles-1
51004b1e2b032664cce6b553d2052757c286087d
[ "Unlicense" ]
1
2021-11-20T22:46:39.000Z
2021-11-20T22:46:39.000Z
source/pkgsrc/lang/python27/patches/patch-Lib_cgi.py
Scottx86-64/dotfiles-1
51004b1e2b032664cce6b553d2052757c286087d
[ "Unlicense" ]
null
null
null
source/pkgsrc/lang/python27/patches/patch-Lib_cgi.py
Scottx86-64/dotfiles-1
51004b1e2b032664cce6b553d2052757c286087d
[ "Unlicense" ]
null
null
null
$NetBSD: patch-Lib_cgi.py,v 1.1.2.2 2021/10/13 21:04:01 tm Exp $ Fix CVE-2021-23336: Add `separator` argument to parse_qs; warn with default Via Fedora: https://src.fedoraproject.org/rpms/python2.7/blob/rawhide/f/00359-CVE-2021-23336.patch --- Lib/cgi.py.orig 2020-04-19 21:13:39.000000000 +0000 +++ Lib/cgi.py @@ -121...
43.806202
99
0.596532
94ae164336c243e9aee77740bc9e35aa865598bd
3,185
py
Python
users/migrations/0001_initial.py
rocky-roll-call/rrc-backend
02e8e11c3dab7661e48650e2e861a4a97788a4ce
[ "MIT" ]
null
null
null
users/migrations/0001_initial.py
rocky-roll-call/rrc-backend
02e8e11c3dab7661e48650e2e861a4a97788a4ce
[ "MIT" ]
null
null
null
users/migrations/0001_initial.py
rocky-roll-call/rrc-backend
02e8e11c3dab7661e48650e2e861a4a97788a4ce
[ "MIT" ]
null
null
null
# Generated by Django 2.1.7 on 2019-03-17 03:08 from django.conf import settings from django.db import migrations, models import django.db.models.deletion import sorl.thumbnail.fields import users.models class Migration(migrations.Migration): initial = True dependencies = [migrations.swappable_dependency(s...
33.526316
84
0.407221
94be7e0547898ec3b7ef71055c1b582cfe617deb
5,998
py
Python
src/visitpy/pyavt/py_src/filters.py
visit-dav/vis
c08bc6e538ecd7d30ddc6399ec3022b9e062127e
[ "BSD-3-Clause" ]
226
2018-12-29T01:13:49.000Z
2022-03-30T19:16:31.000Z
src/visitpy/pyavt/py_src/filters.py
visit-dav/vis
c08bc6e538ecd7d30ddc6399ec3022b9e062127e
[ "BSD-3-Clause" ]
5,100
2019-01-14T18:19:25.000Z
2022-03-31T23:08:36.000Z
src/visitpy/pyavt/py_src/filters.py
visit-dav/vis
c08bc6e538ecd7d30ddc6399ec3022b9e062127e
[ "BSD-3-Clause" ]
84
2019-01-24T17:41:50.000Z
2022-03-10T10:01:46.000Z
############################################################################### # Python Module: filters # # Purpose: Base classes for embedded python filters. # # Programmer: Cyrus Harrison # Creation: Thu Mar 5 09:25:47 PST 2009 # # # Modifications: # Cyrus Harrison, Fri Jul 9 14:25:32 PDT 2010 # Added 'arguments...
32.956044
84
0.578359
a2187ad3018ee017b57c19397cc5ba0ae32d3098
6,340
py
Python
ilswbot/ilswbot.py
Nukesor/ilswach-bot
2e3e9dfa8f43b07caab79f2e94686557dc808731
[ "MIT" ]
null
null
null
ilswbot/ilswbot.py
Nukesor/ilswach-bot
2e3e9dfa8f43b07caab79f2e94686557dc808731
[ "MIT" ]
null
null
null
ilswbot/ilswbot.py
Nukesor/ilswach-bot
2e3e9dfa8f43b07caab79f2e94686557dc808731
[ "MIT" ]
null
null
null
"""A bot which checks if Lukas is already awake. If Lukas isn't awake, we notify everybody who asked, as soon as he wakes up!. Critical importance!!! """ from ilswbot.session import session_wrapper, job_session_wrapper from ilswbot.subscriber import Subscriber from ilswbot.config import config from ilswbot.lukas_help...
31.859296
95
0.693849
bf69952e91d5c64fe31cd6ecd1137f735149ff13
535
py
Python
tmp/analyses/examples/0_classic.py
fluiddyn/transonic
a460e9f6d1139f79b668cb3306d1e8a7e190b72d
[ "BSD-3-Clause" ]
88
2019-01-08T16:39:08.000Z
2022-02-06T14:19:23.000Z
tmp/analyses/examples/0_classic.py
fluiddyn/transonic
a460e9f6d1139f79b668cb3306d1e8a7e190b72d
[ "BSD-3-Clause" ]
13
2019-06-20T15:53:10.000Z
2021-02-09T11:03:29.000Z
tmp/analyses/examples/0_classic.py
fluiddyn/transonic
a460e9f6d1139f79b668cb3306d1e8a7e190b72d
[ "BSD-3-Clause" ]
1
2019-11-05T03:03:14.000Z
2019-11-05T03:03:14.000Z
import numpy as np from transonic import boost import transonic as ts myconst0 = 0 myconst1 = 2*myconst0 # transonic def func( # float[][], # float[][] # ) # transonic def func(int[][], float[][]) @boost def func(a: int, b: int): return myconst1 * (a * np.log(b)).max() # transonic def func1(int, float) @...
13.04878
43
0.603738
01b3b10e4024d8a284db219d448e0a44707cc3ed
483
py
Python
INBa/2014/Andreev_F_I/Andreev_5_2.py
YukkaSarasti/pythonintask
eadf4245abb65f4400a3bae30a4256b4658e009c
[ "Apache-2.0" ]
null
null
null
INBa/2014/Andreev_F_I/Andreev_5_2.py
YukkaSarasti/pythonintask
eadf4245abb65f4400a3bae30a4256b4658e009c
[ "Apache-2.0" ]
null
null
null
INBa/2014/Andreev_F_I/Andreev_5_2.py
YukkaSarasti/pythonintask
eadf4245abb65f4400a3bae30a4256b4658e009c
[ "Apache-2.0" ]
null
null
null
# Задача 5, Вариант 2 # Напишите программу, которая бы при запуске случайным образом отображала имя одного из трех поросят. # Андреев Ф.И. # 24.05.2016 import random print('Программа случайным образом отображает имя одного из трех поросят') feat = random.randint(1,3) print('Поросята', end=" ") if feat == 1...
28.411765
102
0.677019
bdef476d1338ac4576cb18d84cd6b938b3001487
723
py
Python
sub-action.py
minoplhy/filters-development
0a80c1c181454cf13acaa2a095a6ff445d96ab1a
[ "MIT" ]
5
2021-08-15T15:06:55.000Z
2021-12-28T18:56:02.000Z
sub-action.py
minoplhy/filters-development
0a80c1c181454cf13acaa2a095a6ff445d96ab1a
[ "MIT" ]
4
2021-07-31T16:12:19.000Z
2022-03-20T09:22:03.000Z
sub-action.py
minoplhy/filters-development
0a80c1c181454cf13acaa2a095a6ff445d96ab1a
[ "MIT" ]
null
null
null
import os import sys sys.path.append('/filters-maker') import build_make os.makedirs('/gh-releases',exist_ok=True) build_make.filepath_mass_changer('Allowlist' ,'/reprwiki/Private-build/Allowlist' ,'/gh-releases','txt') build_make.filepath_mass_changer('Veneto' ,'/reprwiki/Private-build/veneto' ,'/gh-releases','txt')...
48.2
105
0.770401
da85acb64126e3aba2c75548e4d533531b356b1b
747
py
Python
Curso_Python/Secao2-Python-Basico-Logica-Programacao/32_iterando_strings_com_while/32_iterando_strings_com_while.py
pedrohd21/Cursos-Feitos
b223aad83867bfa45ad161d133e33c2c200d42bd
[ "MIT" ]
null
null
null
Curso_Python/Secao2-Python-Basico-Logica-Programacao/32_iterando_strings_com_while/32_iterando_strings_com_while.py
pedrohd21/Cursos-Feitos
b223aad83867bfa45ad161d133e33c2c200d42bd
[ "MIT" ]
null
null
null
Curso_Python/Secao2-Python-Basico-Logica-Programacao/32_iterando_strings_com_while/32_iterando_strings_com_while.py
pedrohd21/Cursos-Feitos
b223aad83867bfa45ad161d133e33c2c200d42bd
[ "MIT" ]
null
null
null
""" Iterando strings com while em python """ """ minha_string = 'O rato roeu a roupa do rei de roma.' tamanho_string = len(minha_string) c = 0 nova_string = '' while c < tamanho_string: if minha_string[c] == 'r': nova_string += minha_string[c].upper() else: nova_string += minha_string[c] c +...
25.758621
62
0.669344
e5abe9c7b0c327fc73ea54cd24d68c6f5aebf03d
1,226
py
Python
luetzke/ex1.py
appfs/appfs
8cbbfa0e40e4d4a75a498ce8dd894bb2fbc3a9e3
[ "MIT" ]
11
2017-04-21T11:39:55.000Z
2022-02-11T20:25:18.000Z
luetzke/ex1.py
appfs/appfs
8cbbfa0e40e4d4a75a498ce8dd894bb2fbc3a9e3
[ "MIT" ]
69
2017-04-26T09:30:38.000Z
2017-08-01T11:31:21.000Z
luetzke/ex1.py
appfs/appfs
8cbbfa0e40e4d4a75a498ce8dd894bb2fbc3a9e3
[ "MIT" ]
53
2017-04-20T16:16:11.000Z
2017-07-19T12:53:01.000Z
import math file = open("ex1.dat") firstLogSum =0 secondLogSum = 0 file.readline() file.readline() file.readline() line = file.readline()# skip to the first relevant line i=4# linecount count1=0# ...
35.028571
96
0.564437
e5e7ecf9216db2d793382bd1987b8c7ba1f02604
1,080
py
Python
agspiel/api/kapitalmassnahme.py
KingKevin23/agspiel-python-api
33e74ff6bee2f9ce353da757bdb99e929acc1a13
[ "MIT" ]
1
2021-03-09T21:37:41.000Z
2021-03-09T21:37:41.000Z
agspiel/api/kapitalmassnahme.py
KingKevin23/agspiel-python-api
33e74ff6bee2f9ce353da757bdb99e929acc1a13
[ "MIT" ]
4
2020-11-13T19:34:58.000Z
2021-07-24T16:25:27.000Z
agspiel/api/kapitalmassnahme.py
KingKevin23/agspiel-python-api
33e74ff6bee2f9ce353da757bdb99e929acc1a13
[ "MIT" ]
1
2020-08-24T14:38:18.000Z
2020-08-24T14:38:18.000Z
# Copyright (c) 2021 | KingKevin23 (@kingkevin023) from datetime import date class _Kapitalmassnahme: def __init__(self, datum: date, stueckzahl: int, kurs: float, summe: float): self._datum: date = datum self._stueckzahl: int = stueckzahl self._kurs: float = kurs self._summe: fl...
21.176471
80
0.636111
f91ae45c2ab4202ec2fd21f1ce84157412b1397a
36
py
Python
packages/watchmen-dqc/src/watchmen_dqc/boot/__init__.py
Indexical-Metrics-Measure-Advisory/watchmen
c54ec54d9f91034a38e51fd339ba66453d2c7a6d
[ "MIT" ]
null
null
null
packages/watchmen-dqc/src/watchmen_dqc/boot/__init__.py
Indexical-Metrics-Measure-Advisory/watchmen
c54ec54d9f91034a38e51fd339ba66453d2c7a6d
[ "MIT" ]
null
null
null
packages/watchmen-dqc/src/watchmen_dqc/boot/__init__.py
Indexical-Metrics-Measure-Advisory/watchmen
c54ec54d9f91034a38e51fd339ba66453d2c7a6d
[ "MIT" ]
null
null
null
from .boot import init_monitor_jobs
18
35
0.861111
00c72c80f8709cbdbe09087dca3ded120d3f3dc9
71
py
Python
globals/stripe_publishable_key.py
adblockplus/web.adblockplus.org
c2c570ce4f4296afc3577afe233c6b23b128f206
[ "MIT" ]
9
2016-01-29T18:05:29.000Z
2021-10-06T04:21:55.000Z
globals/stripe_publishable_key.py
adblockplus/web.adblockplus.org
c2c570ce4f4296afc3577afe233c6b23b128f206
[ "MIT" ]
9
2015-04-06T19:03:32.000Z
2019-05-28T13:34:55.000Z
globals/stripe_publishable_key.py
adblockplus/web.adblockplus.org
c2c570ce4f4296afc3577afe233c6b23b128f206
[ "MIT" ]
18
2015-04-06T17:42:31.000Z
2021-10-06T04:26:29.000Z
import os stripe_publishable_key = os.getenv('STRIPE_PUBLISHABLE_KEY')
23.666667
60
0.84507
97772854e31038e3636369e5aa8a2859905b3ae5
1,768
py
Python
examples/example_sma_with_same_drawback.py
NewLanded/swbt
8b8e8609cea060d6f124dc3c4bd99cb6243501dc
[ "Apache-2.0" ]
null
null
null
examples/example_sma_with_same_drawback.py
NewLanded/swbt
8b8e8609cea060d6f124dc3c4bd99cb6243501dc
[ "Apache-2.0" ]
null
null
null
examples/example_sma_with_same_drawback.py
NewLanded/swbt
8b8e8609cea060d6f124dc3c4bd99cb6243501dc
[ "Apache-2.0" ]
1
2019-11-28T16:29:49.000Z
2019-11-28T16:29:49.000Z
""" 在有回撤之后买入, 涨到回撤前的高点左右卖出 这个策略不适合下跌行情, 在下跌行情中反应比较慢, 等到买的时候, 差不多反弹也结束了 还是会发生比较大的回撤, 但是也没啥办法 """ import datetime import talib as ta import pandas as pd from core.back_test import BackTest class MyBackTest(BackTest): def sizer(self): if self.bs_flag == "B": self.trans_amount = self.cash // (sel...
36.833333
137
0.585973
c127d80c0cca6ccb253b148803ef334b68f4243d
503
py
Python
HackerRank/30-Days-of-Code/Day 3: Intro to Conditional Statements/condition.py
tareqmahmud/Competitive-Programming
ad5e53300d70280bccbd5046ca01278fb246f314
[ "MIT" ]
2
2020-11-19T19:03:28.000Z
2021-01-04T19:52:11.000Z
30-Days-of-Code/Day 3: Intro to Conditional Statements/condition.py
tareqmahmud/HackerRank
e1b9facab6582f86ea6cc63afcc640e66ba3f67e
[ "MIT" ]
null
null
null
30-Days-of-Code/Day 3: Intro to Conditional Statements/condition.py
tareqmahmud/HackerRank
e1b9facab6582f86ea6cc63afcc640e66ba3f67e
[ "MIT" ]
null
null
null
#!/bin/python3 import math import os import random import re import sys """ If N is odd, print Weird If N is even and in the inclusive range of 2 to 5, print Not Weird If N is even and in the inclusive range of 6 to 20, print Weird If N is even and greater than , print Not Weird """ if __name__ == '_...
21.869565
70
0.584493
a9ccc897aff3e687db6afa46df0aa4dc48a7e154
222
py
Python
platform/mcu/haas1000/prebuild/data/python-apps/driver/adc/main.py
NEXTLEO/AliOS-Things
117ca103144a7bf6a394455bcc59698b7e1dd79d
[ "Apache-2.0" ]
4,538
2017-10-20T05:19:03.000Z
2022-03-30T02:29:30.000Z
platform/mcu/haas1000/prebuild/data/python-apps/driver/adc/main.py
NEXTLEO/AliOS-Things
117ca103144a7bf6a394455bcc59698b7e1dd79d
[ "Apache-2.0" ]
1,088
2017-10-21T07:57:22.000Z
2022-03-31T08:15:49.000Z
components/py_engine/tests/haas/HaaS100/python-apps/driver/adc/main.py
willianchanlovegithub/AliOS-Things
637c0802cab667b872d3b97a121e18c66f256eab
[ "Apache-2.0" ]
1,860
2017-10-20T05:22:35.000Z
2022-03-27T10:54:14.000Z
from driver import ADC print("-------------------start adc test--------------------") adc = ADC() adc.open("ADC0") value = adc.read() print(value) adc.close() print("-------------------end adc test--------------------")
20.181818
62
0.441441
e7455f9454ffb3c7f71ac5de18e87fcf128154d3
1,006
py
Python
skills/date/dateService.py
gidocarper/rhasspy-skills-test
eaf57287a67a0e43a299053cf0b107d61afd9b13
[ "Unlicense" ]
4
2021-01-08T21:08:50.000Z
2021-12-08T15:30:50.000Z
skills/date/dateService.py
gidocarper/rhasspy-skills-test
eaf57287a67a0e43a299053cf0b107d61afd9b13
[ "Unlicense" ]
null
null
null
skills/date/dateService.py
gidocarper/rhasspy-skills-test
eaf57287a67a0e43a299053cf0b107d61afd9b13
[ "Unlicense" ]
null
null
null
#!/usr/bin/env python3 # -*- coding: utf-8 -*- from datetime import datetime import datetime class DateService: def __init__(self, config): self.language = config["language"]["dateService"] return def whatDayIsIt(self): now = datetime.datetime.now() print(now) print(sel...
31.4375
79
0.625249
e768d5483d9ed1dcc1ea0424b7db743266934596
256
py
Python
hardware/chip/rtl872xd/pad.py
wstong999/AliOS-Things
6554769cb5b797e28a30a4aa89b3f4cb2ef2f5d9
[ "Apache-2.0" ]
4,538
2017-10-20T05:19:03.000Z
2022-03-30T02:29:30.000Z
hardware/chip/rtl872xd/pad.py
wstong999/AliOS-Things
6554769cb5b797e28a30a4aa89b3f4cb2ef2f5d9
[ "Apache-2.0" ]
1,088
2017-10-21T07:57:22.000Z
2022-03-31T08:15:49.000Z
hardware/chip/rtl872xd/pad.py
wstong999/AliOS-Things
6554769cb5b797e28a30a4aa89b3f4cb2ef2f5d9
[ "Apache-2.0" ]
1,860
2017-10-20T05:22:35.000Z
2022-03-27T10:54:14.000Z
# Date : 2019/03/08 # Author : Snow Yang # Mail : yangsw@mxchip.com import os import sys image_file = sys.argv[1] size = os.path.getsize(image_file) pad_size = (((size - 1) >> 12) + 1) << 12 open(image_file, 'ab').write(b'\xFF'*(pad_size - size))
21.333333
55
0.632813
4183216b8aea64c157273d19d25b1e520fd9836c
383
py
Python
oracle_of_blair/server.py
skyeto/actf2021
f5f4e280ac459f8d01943f87512cf2b466588f50
[ "MIT" ]
1
2021-11-02T20:53:58.000Z
2021-11-02T20:53:58.000Z
angstrom/2021/crypto/Oracle_of_Blair/server.py
ruhan-islam/ctf-archives
8c2bf6a608c821314d1a1cfaa05a6cccef8e3103
[ "MIT" ]
null
null
null
angstrom/2021/crypto/Oracle_of_Blair/server.py
ruhan-islam/ctf-archives
8c2bf6a608c821314d1a1cfaa05a6cccef8e3103
[ "MIT" ]
1
2021-12-19T11:06:24.000Z
2021-12-19T11:06:24.000Z
from Crypto.Cipher import AES from Crypto.Util.Padding import pad import os key = os.urandom(32) flag = open("flag","rb").read() while 1: try: i = bytes.fromhex(input("give input: ")) if not i: break except: break iv = os.urandom(16) inp = i.replace(b"{}", flag) if len(inp) % 16: inp = pad(inp, 16) p...
18.238095
54
0.639687
d45f318fb64152fa338385db820800c9e3b11d60
1,710
py
Python
Unpublished/TensorflowPlayground/mnist_tensorflowdatasets.py
stanton119/data-analysis
b6fda815c6cc1798ba13a5d2680369b7e5dfcdf9
[ "Apache-2.0" ]
null
null
null
Unpublished/TensorflowPlayground/mnist_tensorflowdatasets.py
stanton119/data-analysis
b6fda815c6cc1798ba13a5d2680369b7e5dfcdf9
[ "Apache-2.0" ]
1
2021-02-11T23:44:52.000Z
2021-02-11T23:44:52.000Z
Unpublished/TensorflowPlayground/mnist_tensorflowdatasets.py
stanton119/data-analysis
b6fda815c6cc1798ba13a5d2680369b7e5dfcdf9
[ "Apache-2.0" ]
1
2021-12-16T01:02:23.000Z
2021-12-16T01:02:23.000Z
# %% Load data # Use tensorflow datasets to stream data from disk to prevent whole dataset being stored in memory # Construct a tf.data.Dataset (ds_train, ds_test), ds_info = tfds.load( name="mnist", split=["train", "test"], shuffle_files=True, as_supervised=True, with_info=True, data_dir=os.p...
24.084507
98
0.728655
cf26a5d43a6cb238a0178d67fb97920810cc2382
332
py
Python
mock.py
tentacle-project/tentacle
78aa1b9c6d25d964c1360cd05cd372505daedb34
[ "MIT" ]
null
null
null
mock.py
tentacle-project/tentacle
78aa1b9c6d25d964c1360cd05cd372505daedb34
[ "MIT" ]
null
null
null
mock.py
tentacle-project/tentacle
78aa1b9c6d25d964c1360cd05cd372505daedb34
[ "MIT" ]
null
null
null
# coding: utf-8 def mock_oserror(*args, **kwargs): ''' mock helper to raise an OSError ''' raise OSError def mock_filenotfounderror(*args, **kwargs): ''' mock helper to raise a FileNotFoundError ''' raise FileNotFoundError def mock_none(*args, **kwargs): ''' mock helper to return none ''' ...
19.529412
52
0.659639
d884acc212c2cf5509c927c92c31a17331c023b2
1,092
py
Python
jocker/backends/jail.py
omab/jocker
44a79d4c12bb4df9c3333da75eb34964de64ad20
[ "BSD-2-Clause" ]
3
2017-10-18T08:11:58.000Z
2019-07-31T23:53:37.000Z
jocker/backends/jail.py
omab/jocker
44a79d4c12bb4df9c3333da75eb34964de64ad20
[ "BSD-2-Clause" ]
null
null
null
jocker/backends/jail.py
omab/jocker
44a79d4c12bb4df9c3333da75eb34964de64ad20
[ "BSD-2-Clause" ]
null
null
null
""" jail wrapper """ import os from .base import Backend from ..utils import run_command class JailBackend(Backend): """Jail backend""" JAILS_DIR = os.environ.get('JOCKER_JAILS_BASE_DIR', '/usr/jails/') def exec(self, command, **kwargs): """Exec the given command in the jail""" return se...
26
75
0.541209
2b455d2ed2debf9e2c65e39a898c4d575a484a0f
1,809
py
Python
roboraptorz/client/mqttApp/TestPublisher.py
icebear8/roboRinth
c0789a9faf978f31b0ed020d26fee2b04fb298ee
[ "MIT" ]
null
null
null
roboraptorz/client/mqttApp/TestPublisher.py
icebear8/roboRinth
c0789a9faf978f31b0ed020d26fee2b04fb298ee
[ "MIT" ]
null
null
null
roboraptorz/client/mqttApp/TestPublisher.py
icebear8/roboRinth
c0789a9faf978f31b0ed020d26fee2b04fb298ee
[ "MIT" ]
1
2019-10-22T07:47:51.000Z
2019-10-22T07:47:51.000Z
import getopt import logging import time import sys from MqttClient import MqttClient logger = logging.getLogger(__name__) client = None def _initializeLogging(loglevel): numeric_level = getattr(logging, loglevel.upper(), None) if not isinstance(numeric_level, int): numeric_level = getattr(logging, DEBUG, N...
25.125
129
0.661139
9946e1f482cd0cfd2955130f3fdfdc0ae64c603a
199
py
Python
src/appconfig/urls.py
oguzhanakan0/covidlab-server
68ea4e6cd3b1244117ae43275335896b911a9b2a
[ "MIT" ]
null
null
null
src/appconfig/urls.py
oguzhanakan0/covidlab-server
68ea4e6cd3b1244117ae43275335896b911a9b2a
[ "MIT" ]
1
2022-03-25T05:33:19.000Z
2022-03-25T05:33:19.000Z
src/appconfig/urls.py
oguzhanakan0/covidlab-server
68ea4e6cd3b1244117ae43275335896b911a9b2a
[ "MIT" ]
null
null
null
from django.urls import path from django.urls import include, re_path # from .views import requery_loan_detail from . import views urlpatterns=[ # path('version-check',views.version_check), ]
18.090909
48
0.763819
9969a3031c4eb1a7a457ae368625fa855a42313d
56
py
Python
python_lessons/freecodecamp_python/001_Calculation.py
1986MMartin/coding-sections-markus
e13be32e5d83e69250ecfb3c76a04ee48a320607
[ "Apache-2.0" ]
null
null
null
python_lessons/freecodecamp_python/001_Calculation.py
1986MMartin/coding-sections-markus
e13be32e5d83e69250ecfb3c76a04ee48a320607
[ "Apache-2.0" ]
null
null
null
python_lessons/freecodecamp_python/001_Calculation.py
1986MMartin/coding-sections-markus
e13be32e5d83e69250ecfb3c76a04ee48a320607
[ "Apache-2.0" ]
null
null
null
width = 15 height= 12.0 print(width/3) print(height/3)
9.333333
15
0.696429
9985e89cbe533127c07136db213159c014f5e874
262
py
Python
BITs/2014/Borsheva_ V_O/task_1_6.py
YukkaSarasti/pythonintask
eadf4245abb65f4400a3bae30a4256b4658e009c
[ "Apache-2.0" ]
null
null
null
BITs/2014/Borsheva_ V_O/task_1_6.py
YukkaSarasti/pythonintask
eadf4245abb65f4400a3bae30a4256b4658e009c
[ "Apache-2.0" ]
null
null
null
BITs/2014/Borsheva_ V_O/task_1_6.py
YukkaSarasti/pythonintask
eadf4245abb65f4400a3bae30a4256b4658e009c
[ "Apache-2.0" ]
null
null
null
# Задача №1.Вариант 6. # Комрьютер пишет род деятельности и псевдоним Йоханнеса Бруфельдта # Борщёва В.О. # 29.02.2016 print ("Юхани Ахо(\"литературный псевдоним Йоханнеса Бруфельдта)-финский писатель, журналист, переводчик.") input (Нажмите Enter для выхода)
29.111111
107
0.774809
5ac10a0278726619c2182f98d8550d895a55bac2
1,070
py
Python
Packs/NetCalc/Scripts/IPCalcReturnAddressBinary/IPCalcReturnAddressBinary.py
diCagri/content
c532c50b213e6dddb8ae6a378d6d09198e08fc9f
[ "MIT" ]
799
2016-08-02T06:43:14.000Z
2022-03-31T11:10:11.000Z
Packs/NetCalc/Scripts/IPCalcReturnAddressBinary/IPCalcReturnAddressBinary.py
diCagri/content
c532c50b213e6dddb8ae6a378d6d09198e08fc9f
[ "MIT" ]
9,317
2016-08-07T19:00:51.000Z
2022-03-31T21:56:04.000Z
Packs/NetCalc/Scripts/IPCalcReturnAddressBinary/IPCalcReturnAddressBinary.py
diCagri/content
c532c50b213e6dddb8ae6a378d6d09198e08fc9f
[ "MIT" ]
1,297
2016-08-04T13:59:00.000Z
2022-03-31T23:43:06.000Z
import demistomock as demisto from CommonServerPython import * from CommonServerUserPython import * import ipaddress import traceback ''' COMMAND FUNCTION ''' def return_address_binary_command(args: Dict[str, Any]) -> CommandResults: ip_address = args.get('ip_address', None) ip_binary = str(ipaddress.ip...
21.4
85
0.686916
7ab61bdbeaa69de72e9fcd010aa4e52d196771a6
535
py
Python
frappe-bench/apps/erpnext/erpnext/patches/v4_2/discount_amount.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/v4_2/discount_amount.py
Semicheche/foa_frappe_docker
a186b65d5e807dd4caf049e8aeb3620a799c1225
[ "MIT" ]
null
null
null
frappe-bench/apps/erpnext/erpnext/patches/v4_2/discount_amount.py
Semicheche/foa_frappe_docker
a186b65d5e807dd4caf049e8aeb3620a799c1225
[ "MIT" ]
1
2021-04-29T14:39:01.000Z
2021-04-29T14:39:01.000Z
# 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.modules import scrub, get_doctype_module def execute(): for dt in ["Quotation", "Sales Order", "Delivery Note", "Sales Invoi...
41.153846
76
0.773832
56c2684df06a4c300c6221fd2661b471c15371fc
144
py
Python
Licence 1/I11/TP4/ex4.1.py
axelcoezard/licence
1ed409c4572dea080169171beb7e8571159ba071
[ "MIT" ]
8
2020-11-26T20:45:12.000Z
2021-11-29T15:46:22.000Z
Licence 1/I11/TP4/ex4.1.py
axelcoezard/licence
1ed409c4572dea080169171beb7e8571159ba071
[ "MIT" ]
null
null
null
Licence 1/I11/TP4/ex4.1.py
axelcoezard/licence
1ed409c4572dea080169171beb7e8571159ba071
[ "MIT" ]
6
2020-10-23T15:29:24.000Z
2021-05-05T19:10:45.000Z
liste = [] word = input("Entrez une mot: ") while word != "": liste += [word] word = input("Entrez une mot: ") print("Liste:", liste)
16
36
0.555556
71341c1abf216c500c1ead63f934c65d7f8bb26d
7,630
py
Python
src/onegov/feriennet/exports/base.py
politbuero-kampagnen/onegov-cloud
20148bf321b71f617b64376fe7249b2b9b9c4aa9
[ "MIT" ]
null
null
null
src/onegov/feriennet/exports/base.py
politbuero-kampagnen/onegov-cloud
20148bf321b71f617b64376fe7249b2b9b9c4aa9
[ "MIT" ]
null
null
null
src/onegov/feriennet/exports/base.py
politbuero-kampagnen/onegov-cloud
20148bf321b71f617b64376fe7249b2b9b9c4aa9
[ "MIT" ]
null
null
null
import re from itertools import chain from html import unescape from onegov.core import mail from onegov.feriennet import _ from onegov.feriennet.exports.const import ACTIVITY_STATES from onegov.feriennet.exports.const import BOOKING_STATES from onegov.feriennet.exports.const import GENDERS from onegov.feriennet.expor...
37.586207
79
0.629751
f1762fea6334f16d1698afc1248230719769c311
1,419
py
Python
private_sdk/utils.py
teambge/bge-private-sdk
b27d4a6caf35bcb89a260938260fd75dba173311
[ "MIT" ]
null
null
null
private_sdk/utils.py
teambge/bge-private-sdk
b27d4a6caf35bcb89a260938260fd75dba173311
[ "MIT" ]
null
null
null
private_sdk/utils.py
teambge/bge-private-sdk
b27d4a6caf35bcb89a260938260fd75dba173311
[ "MIT" ]
null
null
null
#-*- coding: utf-8 -*- import json import logging from datetime import datetime from six.moves import http_client from .signature import Signature def new_logger(name, verbose=False): logging.basicConfig() if verbose: http_client.HTTPConnection.debuglevel = 0 requests_log = logging.getLogge...
26.277778
60
0.627202
779d6e256f8a9e3b81f75cf33db4c2d2162432e9
146
py
Python
python/coursera_python/TORONTO/test/7.py
SayanGhoshBDA/code-backup
8b6135facc0e598e9686b2e8eb2d69dd68198b80
[ "MIT" ]
16
2018-11-26T08:39:42.000Z
2019-05-08T10:09:52.000Z
python/coursera_python/TORONTO/test/7.py
SayanGhoshBDA/code-backup
8b6135facc0e598e9686b2e8eb2d69dd68198b80
[ "MIT" ]
8
2020-05-04T06:29:26.000Z
2022-02-12T05:33:16.000Z
python/coursera_python/TORONTO/test/7.py
SayanGhoshBDA/code-backup
8b6135facc0e598e9686b2e8eb2d69dd68198b80
[ "MIT" ]
5
2020-02-11T16:02:21.000Z
2021-02-05T07:48:30.000Z
a = [1, 2, 3] b = a #b = [1, 2, 3] #doneb[-2] = 'A' #a[1] = a[1][0] #a = [1,'A',3] #b = [1,'A',3] #a[1]='A' b[1] = 'AB' a[1] = a[1][0] print(a,b)
12.166667
16
0.335616
bb0bdf59da127bcbcbe811cf1150538d149c2ec0
242
py
Python
frappe-bench/apps/erpnext/erpnext/patches/v11_0/remove_modules_setup_page.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/v11_0/remove_modules_setup_page.py
Semicheche/foa_frappe_docker
a186b65d5e807dd4caf049e8aeb3620a799c1225
[ "MIT" ]
null
null
null
frappe-bench/apps/erpnext/erpnext/patches/v11_0/remove_modules_setup_page.py
Semicheche/foa_frappe_docker
a186b65d5e807dd4caf049e8aeb3620a799c1225
[ "MIT" ]
1
2021-04-29T14:39:01.000Z
2021-04-29T14:39:01.000Z
# 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 def execute(): frappe.delete_doc("Page", "modules_setup")
26.888889
68
0.780992
24ecba6261a28aa52a57f300d9e0b9c1e40a9488
810
py
Python
quant/observers/t_coinegg_etc.py
doubleDragon/QuantBot
53a1d6c62ecece47bf777da0c0754430b706b7fd
[ "MIT" ]
7
2017-10-22T15:00:09.000Z
2019-09-19T11:45:43.000Z
quant/observers/t_coinegg_etc.py
doubleDragon/QuantBot
53a1d6c62ecece47bf777da0c0754430b706b7fd
[ "MIT" ]
1
2018-01-19T16:19:40.000Z
2018-01-19T16:19:40.000Z
quant/observers/t_coinegg_etc.py
doubleDragon/QuantBot
53a1d6c62ecece47bf777da0c0754430b706b7fd
[ "MIT" ]
5
2017-12-11T15:10:29.000Z
2018-12-21T17:40:58.000Z
#!/usr/bin/env python # -*- coding: UTF-8 -*- from .t_coinegg import T_CoinEgg class T_CoinEgg_ETC(T_CoinEgg): """ bch: python -m quant.cli -mBitfinex_ETC_USD,Coinegg_ETC_BTC,Bitfinex_BTC_USD -o=T_CoinEgg_ETC -f=coinegg_etc -v 目前的限制: """ def __init__(self): base_pair = "Bitfinex_ETC_...
26.129032
110
0.567901
562321f06a89f20ec9bed187811eee1ea44a2482
675
py
Python
src/dualpal.py
xiaonanln/python-usaco
8f0fef19cb5f89232d985f79d955f0de5ef4e10d
[ "MIT" ]
null
null
null
src/dualpal.py
xiaonanln/python-usaco
8f0fef19cb5f89232d985f79d955f0de5ef4e10d
[ "MIT" ]
null
null
null
src/dualpal.py
xiaonanln/python-usaco
8f0fef19cb5f89232d985f79d955f0de5ef4e10d
[ "MIT" ]
null
null
null
""" ID: isaiahl1 LANG: PYTHON2 TASK: dualpal """ def main(fin, fout): N, S = [int(x) for x in fin.read().strip().split()] while True: S += 1 numPal = 0 for base in (2,3,4,5,6,7,8,9,10): ss = strbase(S, base) if ss == ss[::-1]: numPal += 1 if numPal == 2: break if numPal >= 2: print >>...
15.697674
52
0.54963
3092795f5aa2e8aac642f785c30b90a74557c193
7,231
py
Python
official/cv/efficientnet/train.py
leelige/mindspore
5199e05ba3888963473f2b07da3f7bca5b9ef6dc
[ "Apache-2.0" ]
1
2021-11-18T08:17:44.000Z
2021-11-18T08:17:44.000Z
official/cv/efficientnet/train.py
leelige/mindspore
5199e05ba3888963473f2b07da3f7bca5b9ef6dc
[ "Apache-2.0" ]
null
null
null
official/cv/efficientnet/train.py
leelige/mindspore
5199e05ba3888963473f2b07da3f7bca5b9ef6dc
[ "Apache-2.0" ]
2
2019-09-01T06:17:04.000Z
2019-10-04T08:39:45.000Z
# Copyright 2020 Huawei Technologies Co., Ltd # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to...
43.041667
111
0.678606
baa773b41681ee4f9d05ea34c29996deaad50d05
1,820
py
Python
tests/test_visualize_sentiments.py
UBC-MDS/pytweet
dd97089e79ae35a773d0651cc305fc650b1cd590
[ "MIT" ]
2
2021-03-13T02:18:16.000Z
2022-01-14T11:55:32.000Z
tests/test_visualize_sentiments.py
UBC-MDS/pytweet
dd97089e79ae35a773d0651cc305fc650b1cd590
[ "MIT" ]
18
2021-02-25T04:36:22.000Z
2021-03-26T07:28:37.000Z
tests/test_visualize_sentiments.py
UBC-MDS/pytweet
dd97089e79ae35a773d0651cc305fc650b1cd590
[ "MIT" ]
8
2021-02-27T04:33:50.000Z
2021-06-23T21:48:40.000Z
import pandas as pd from pytweet.pytweet import tweet_sentiment_analysis, visualize_sentiment from pytest import raises def test_visualize_sentiments(): """ Tests the visualize_sentiments function to make sure the outputs are correct. Returns -------- None The test should pass and no asser...
39.565217
116
0.693956
234f0725453a6d8f9fb087dbe0ce83dd686e018c
981
py
Python
python/odml/test_scripts/test_unitest_class.py
mpsonntag/snippets
fc3cc42ea49b885c1f29c0aef1379055a931a978
[ "BSD-3-Clause" ]
null
null
null
python/odml/test_scripts/test_unitest_class.py
mpsonntag/snippets
fc3cc42ea49b885c1f29c0aef1379055a931a978
[ "BSD-3-Clause" ]
null
null
null
python/odml/test_scripts/test_unitest_class.py
mpsonntag/snippets
fc3cc42ea49b885c1f29c0aef1379055a931a978
[ "BSD-3-Clause" ]
null
null
null
import unittest import warnings from os import path def formatted_warnings(msg, category=None, *args, **kwargs): final_msg = "%s\n" % str(msg) if category: final_msg = "%s: %s" % (category.__name__, final_msg) return final_msg class TestUnitTestClass(unittest.TestCase): def setUp(self): ...
24.525
67
0.657492
ccbcd804cf64ff3fbcb63dcaa79debfe7a0566f7
454
py
Python
source/pkgsrc/audio/aeneas/patches/patch-setup.py
Scottx86-64/dotfiles-1
51004b1e2b032664cce6b553d2052757c286087d
[ "Unlicense" ]
1
2021-11-20T22:46:39.000Z
2021-11-20T22:46:39.000Z
source/pkgsrc/audio/aeneas/patches/patch-setup.py
Scottx86-64/dotfiles-1
51004b1e2b032664cce6b553d2052757c286087d
[ "Unlicense" ]
null
null
null
source/pkgsrc/audio/aeneas/patches/patch-setup.py
Scottx86-64/dotfiles-1
51004b1e2b032664cce6b553d2052757c286087d
[ "Unlicense" ]
null
null
null
$NetBSD: patch-setup.py,v 1.1 2018/02/28 22:10:13 wiz Exp $ Always build C extension. --- setup.py.orig 2017-03-16 12:48:53.000000000 +0000 +++ setup.py @@ -297,7 +297,7 @@ elif FORCE_CEW: print("[INFO] ") EXTENSIONS.append(EXTENSION_CEW) else: - if IS_LINUX: + if 1: EXTENSIONS.append(EXTENS...
28.375
106
0.508811
4e1d080985d2f4dd62ade43b4e6ab130f34d004d
506
py
Python
Contrib-Inspur/openbmc/poky/meta/lib/oeqa/core/tests/cases/oetag.py
opencomputeproject/Rack-Manager
e1a61d3eeeba0ff655fe9c1301e8b510d9b2122a
[ "MIT" ]
5
2019-11-11T07:57:26.000Z
2022-03-28T08:26:53.000Z
Contrib-Inspur/openbmc/poky/meta/lib/oeqa/core/tests/cases/oetag.py
opencomputeproject/Rack-Manager
e1a61d3eeeba0ff655fe9c1301e8b510d9b2122a
[ "MIT" ]
3
2019-09-05T21:47:07.000Z
2019-09-17T18:10:45.000Z
Contrib-Inspur/openbmc/poky/meta/lib/oeqa/core/tests/cases/oetag.py
opencomputeproject/Rack-Manager
e1a61d3eeeba0ff655fe9c1301e8b510d9b2122a
[ "MIT" ]
11
2019-07-20T00:16:32.000Z
2022-01-11T14:17:48.000Z
# # Copyright (C) 2016 Intel Corporation # # SPDX-License-Identifier: MIT # from oeqa.core.case import OETestCase from oeqa.core.decorator.oetag import OETestTag class TagTest(OETestCase): @OETestTag('goodTag') def testTagGood(self): self.assertTrue(True, msg='How is this possible?') @OETestTag(...
23
58
0.693676
0613f185498a96c8268d12afa4065f6d5f0c4282
1,392
py
Python
Python/zzz_training_challenge/Python_Challenge/solutions/tests/ch02_math/ex01_basiscs_test.py
Kreijeck/learning
eaffee08e61f2a34e01eb8f9f04519aac633f48c
[ "MIT" ]
null
null
null
Python/zzz_training_challenge/Python_Challenge/solutions/tests/ch02_math/ex01_basiscs_test.py
Kreijeck/learning
eaffee08e61f2a34e01eb8f9f04519aac633f48c
[ "MIT" ]
null
null
null
Python/zzz_training_challenge/Python_Challenge/solutions/tests/ch02_math/ex01_basiscs_test.py
Kreijeck/learning
eaffee08e61f2a34e01eb8f9f04519aac633f48c
[ "MIT" ]
null
null
null
# Beispielprogramm für das Buch "Python Challenge" # # Copyright 2020 by Michael Inden import pytest from ch02_math.solutions import ex01_basics from ch02_math.solutions.ex01_basics import calc, calc_v2, \ calc_sum_and_count_all_numbers_div_by_2_or_7_v2 @pytest.mark.parametrize("m, n, expected", ...
32.372093
73
0.568247
88aeaf84139d7ddd568a7c3f2d7aedddbe9d6e51
294
py
Python
pwn/Archer/solve.py
NoXLaw/RaRCTF2021-Challenges-Public
1a1b094359b88f8ebbc83a6b26d27ffb2602458f
[ "MIT" ]
null
null
null
pwn/Archer/solve.py
NoXLaw/RaRCTF2021-Challenges-Public
1a1b094359b88f8ebbc83a6b26d27ffb2602458f
[ "MIT" ]
null
null
null
pwn/Archer/solve.py
NoXLaw/RaRCTF2021-Challenges-Public
1a1b094359b88f8ebbc83a6b26d27ffb2602458f
[ "MIT" ]
null
null
null
#!/usr/bin/python3 from pwn import * if args.REMOTE: r = remote(args.HOST, int(args.PORT)) else: r = process("./src/archer") r.recvuntil(b": ") r.sendline(b"yes") r.clean() r.sendline(b"0xfffffffffff04068") r.clean() r.sendline(b"cat /pwn/flag* 2>/dev/null") print(r.recv().decode())
18.375
41
0.656463
ee0a5a5f111b27b512c4f34138cdd427c93c1ab0
2,522
py
Python
tests/onegov/winterthur/test_mission_reports.py
politbuero-kampagnen/onegov-cloud
20148bf321b71f617b64376fe7249b2b9b9c4aa9
[ "MIT" ]
null
null
null
tests/onegov/winterthur/test_mission_reports.py
politbuero-kampagnen/onegov-cloud
20148bf321b71f617b64376fe7249b2b9b9c4aa9
[ "MIT" ]
null
null
null
tests/onegov/winterthur/test_mission_reports.py
politbuero-kampagnen/onegov-cloud
20148bf321b71f617b64376fe7249b2b9b9c4aa9
[ "MIT" ]
null
null
null
from onegov.winterthur.collections import MissionReportCollection from tests.shared import Client as BaseClient from sedate import replace_timezone from datetime import datetime as dt from tests.shared.utils import open_in_browser class Client(BaseClient): skip_first_form = True def test_mission_report_collect...
33.626667
75
0.688343
ee56f02aebfbcd97470f494d57124f953bc6fe96
1,691
py
Python
skimind/kernel/gFunctions/converter.py
NathBangwa/SkimindFoot
8ae3a00074c56dd981fbfdab30e29898ddcaf6be
[ "MIT" ]
1
2020-11-13T18:30:47.000Z
2020-11-13T18:30:47.000Z
skimind/kernel/gFunctions/converter.py
nathanbangwa243/SkimindFoot
8ae3a00074c56dd981fbfdab30e29898ddcaf6be
[ "MIT" ]
5
2020-11-13T18:16:48.000Z
2021-09-08T01:04:59.000Z
skimind/kernel/gFunctions/converter.py
nathanbangwa243/SkimindFoot
8ae3a00074c56dd981fbfdab30e29898ddcaf6be
[ "MIT" ]
null
null
null
#-*-coding: utf-8 -*- """""" # global config from .. import config as skiconfig # global config from ..interfacedb import fields as iface_db_fields def class_to_betid(task_target, class_target): """ permet de traduire la classe en idbet afin de faciliter le pari :param task_target: str ...
24.157143
94
0.615612
4e70be1b13a71f9544bc1dfa99daa5da0e5709fa
402
py
Python
src/preprocessing/CutOffFilter.py
florianletsch/kinect-juggling
f320cc0b55adf65d338d25986a03106a7e3f46ef
[ "Unlicense", "MIT" ]
7
2015-11-27T09:53:32.000Z
2021-01-13T17:35:54.000Z
src/preprocessing/CutOffFilter.py
florianletsch/kinect-juggling
f320cc0b55adf65d338d25986a03106a7e3f46ef
[ "Unlicense", "MIT" ]
null
null
null
src/preprocessing/CutOffFilter.py
florianletsch/kinect-juggling
f320cc0b55adf65d338d25986a03106a7e3f46ef
[ "Unlicense", "MIT" ]
null
null
null
import numpy as np class CutOffFilter(object): def filter(self, rgb, depth, balls, args = {}): white = np.zeros(shape=(480, 640), dtype=np.uint8) white.fill(0) subset_objects = (depth < 2100) # chosen by experiment for example frames subset_holes = (depth == 0) white[subset...
30.923077
81
0.616915
094aea0a0e43d011ad6e7ab6436bae66a6b153ba
457
py
Python
spo/spo/doctype/mandat/mandat_dashboard.py
libracore/spo
c6617a4624d683e27ee3fde745313c30504f3fd1
[ "MIT" ]
null
null
null
spo/spo/doctype/mandat/mandat_dashboard.py
libracore/spo
c6617a4624d683e27ee3fde745313c30504f3fd1
[ "MIT" ]
6
2019-08-23T18:36:26.000Z
2019-11-12T13:12:12.000Z
spo/spo/doctype/mandat/mandat_dashboard.py
libracore/spo
c6617a4624d683e27ee3fde745313c30504f3fd1
[ "MIT" ]
1
2021-08-14T22:22:43.000Z
2021-08-14T22:22:43.000Z
from frappe import _ def get_data(): return { 'fieldname': 'mandat', 'transactions': [ { 'label': _('Anforderungen'), 'items': ['Vollmacht', 'Anforderung Patientendossier', 'Medizinischer Bericht', 'Triage', 'Abschlussbericht'] }, { 'label': _('Buchhaltung'), 'items': ['Sales ...
21.761905
114
0.557987
e12cdf3a911f4c38343561a85770b0c94e62e900
192
py
Python
exercises/es/exc_01_02_03.py
tuanducdesign/spacy-course
f8d092c5fa2997fccb3f367d174dce8667932b3d
[ "MIT" ]
2
2020-07-07T01:46:37.000Z
2021-04-20T03:19:43.000Z
exercises/es/exc_01_02_03.py
tuanducdesign/spacy-course
f8d092c5fa2997fccb3f367d174dce8667932b3d
[ "MIT" ]
null
null
null
exercises/es/exc_01_02_03.py
tuanducdesign/spacy-course
f8d092c5fa2997fccb3f367d174dce8667932b3d
[ "MIT" ]
null
null
null
# Importa spaCy import ____ # Crea el objeto nlp para procesar español nlp = ____ # Procesa un texto doc = nlp("¿Cómo estás?") # Imprime en pantalla el texto del documento print(____.text)
16
44
0.734375
01236e06d762491992b332b90b5052fe9734e9a0
1,979
py
Python
src/histograms/hist.py
Ellon-M/visualizations
5a42c213ea8fd0597e2035778d9ae6460eb9e821
[ "MIT" ]
null
null
null
src/histograms/hist.py
Ellon-M/visualizations
5a42c213ea8fd0597e2035778d9ae6460eb9e821
[ "MIT" ]
null
null
null
src/histograms/hist.py
Ellon-M/visualizations
5a42c213ea8fd0597e2035778d9ae6460eb9e821
[ "MIT" ]
null
null
null
# histograms # visualizes distributions of partiular variables: import pandas as pd import numpy as np import matplotlib.cm as cmp import matplotlib.colors as cl import matplotlib.pyplot as plt import plotly.express as px import plotly.graph_objects as go # matplotlib fig, ax = plt.subplots(1, figsize=(24,15)) x = n...
34.719298
191
0.734715
6dab5e3affd52b9f65e06b2cec0ef72eab9ab20a
3,064
py
Python
storage/emulated/0/qpython/scripts3/listen.py
wangkaibiao/SettlersFinancialData3
498249e14f24bfa3186f07e8f66ee624d08c6ff1
[ "MIT" ]
null
null
null
storage/emulated/0/qpython/scripts3/listen.py
wangkaibiao/SettlersFinancialData3
498249e14f24bfa3186f07e8f66ee624d08c6ff1
[ "MIT" ]
null
null
null
storage/emulated/0/qpython/scripts3/listen.py
wangkaibiao/SettlersFinancialData3
498249e14f24bfa3186f07e8f66ee624d08c6ff1
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- try: from storage.baidu_cloud import qpython_sync qpython_sync("/scripts3/","listen.py") except: print("using,testing,2") try: import androidhelper droid = androidhelper.Android() droid.makeToast("导入androidhelper成功") except: print("不存在androidhelper库") ...
31.587629
107
0.622063
6dd675e788f586098aaa7b797b84cf624e53ac10
2,312
py
Python
Controller/storage/models/BinaryClassifier/BinaryClassifier.py
th-nuernberg/ml-cloud
6d7527cbf6cceb7062e74dbc43d51998381aa6c8
[ "MIT" ]
null
null
null
Controller/storage/models/BinaryClassifier/BinaryClassifier.py
th-nuernberg/ml-cloud
6d7527cbf6cceb7062e74dbc43d51998381aa6c8
[ "MIT" ]
7
2020-07-19T03:29:21.000Z
2022-03-02T06:46:12.000Z
Controller/storage/models/BinaryClassifier/BinaryClassifier.py
th-nuernberg/ml-cloud
6d7527cbf6cceb7062e74dbc43d51998381aa6c8
[ "MIT" ]
null
null
null
import numpy as np from tensorflow.python.keras.layers import Dense from tensorflow.python.keras.models import Sequential, load_model from tensorflow.python.keras.optimizers import RMSprop from Algorithm import Algorithm from KerasCallback import StatusCallback class BinaryClassifier(Algorithm): def __init__(se...
35.030303
124
0.620675
6ddb3d9f887036b37fc0cba0aa5abbfa054d6a3e
17,757
py
Python
bugmonitor.py
openSUSE-Team/bugbot
e33075e45850ae5a013e4c483ebce4e13e71fc53
[ "MIT" ]
1
2016-02-10T22:17:09.000Z
2016-02-10T22:17:09.000Z
bugmonitor.py
openSUSE-Team/bugbot
e33075e45850ae5a013e4c483ebce4e13e71fc53
[ "MIT" ]
null
null
null
bugmonitor.py
openSUSE-Team/bugbot
e33075e45850ae5a013e4c483ebce4e13e71fc53
[ "MIT" ]
null
null
null
import argparse from datetime import datetime import re import threading import time import sqlite3 from imapclient import IMAPClient import irc.bot import irc.strings try: import suse.bugzilla except ImportError, e: print """*** please git clone git://bolzano/suse/solid-ground *** then symlink the suse subd...
30.353846
118
0.519739
6de54640bc9c4f4780a49fe1ed4a57ea162c38e4
60
py
Python
python/advanced_sw/IP_COLLECTOR/get_ip_domain.py
SayanGhoshBDA/code-backup
8b6135facc0e598e9686b2e8eb2d69dd68198b80
[ "MIT" ]
16
2018-11-26T08:39:42.000Z
2019-05-08T10:09:52.000Z
python/advanced_sw/IP_COLLECTOR/get_ip_domain.py
SayanGhoshBDA/code-backup
8b6135facc0e598e9686b2e8eb2d69dd68198b80
[ "MIT" ]
8
2020-05-04T06:29:26.000Z
2022-02-12T05:33:16.000Z
python/advanced_sw/IP_COLLECTOR/get_ip_domain.py
SayanGhoshBDA/code-backup
8b6135facc0e598e9686b2e8eb2d69dd68198b80
[ "MIT" ]
5
2020-02-11T16:02:21.000Z
2021-02-05T07:48:30.000Z
import socket print(socket.gethostbyname('www.google.com'))
20
45
0.8
09979fdb43a6831971922b00d2e4bbd7f8d95556
1,316
py
Python
robot/csdn/talk.py
East196/hello-py
a77c7a0c8e5e2b5e8cefaf0fda335ab0c3b1da21
[ "Apache-2.0" ]
1
2017-10-23T14:58:47.000Z
2017-10-23T14:58:47.000Z
robot/csdn/talk.py
East196/hello-py
a77c7a0c8e5e2b5e8cefaf0fda335ab0c3b1da21
[ "Apache-2.0" ]
null
null
null
robot/csdn/talk.py
East196/hello-py
a77c7a0c8e5e2b5e8cefaf0fda335ab0c3b1da21
[ "Apache-2.0" ]
1
2018-04-06T07:49:18.000Z
2018-04-06T07:49:18.000Z
#!/usr/bin/env python # -*- coding: utf-8 -*- # coding=utf-8 import configparser import random from selenium import webdriver import time config = configparser.ConfigParser() config.read("csdn.conf") u = config.get("east", "username") p = config.get("east", "password") # print u,p browser = webdriver.Firefox() br...
21.933333
75
0.677052
3adca0d7682b3642a75dbc7fe44ad65af71ec4eb
770
py
Python
7-assets/past-student-repos/_DS-Python/Algorithms-I-Notes-master/practice_algs/sorted_matrix.py
eengineergz/Lambda
1fe511f7ef550aed998b75c18a432abf6ab41c5f
[ "MIT" ]
null
null
null
7-assets/past-student-repos/_DS-Python/Algorithms-I-Notes-master/practice_algs/sorted_matrix.py
eengineergz/Lambda
1fe511f7ef550aed998b75c18a432abf6ab41c5f
[ "MIT" ]
null
null
null
7-assets/past-student-repos/_DS-Python/Algorithms-I-Notes-master/practice_algs/sorted_matrix.py
eengineergz/Lambda
1fe511f7ef550aed998b75c18a432abf6ab41c5f
[ "MIT" ]
null
null
null
# Search In Sorted Matrix # Given a matrix (a two-dimensional array), whose width and height do not # necessarily match, containing distinct integers where each row is sorted and # each column is also sorted, write a function that searches for a target value in # the matrix. The function should return a tuple (or two-...
33.478261
82
0.676623
6ed50c08815d05fdabbb147a2c9945429639b502
785
py
Python
database/mkstartdb.py
huberthoegl/tsgrain
405d0ba8b98c2afa950d27294e55cd1e07506db4
[ "Apache-2.0" ]
1
2021-06-15T08:59:02.000Z
2021-06-15T08:59:02.000Z
database/mkstartdb.py
huberthoegl/tsgrain
405d0ba8b98c2afa950d27294e55cd1e07506db4
[ "Apache-2.0" ]
null
null
null
database/mkstartdb.py
huberthoegl/tsgrain
405d0ba8b98c2afa950d27294e55cd1e07506db4
[ "Apache-2.0" ]
null
null
null
# tinydb.readthedocs.io/en/latest/getting-started.html import os, time from tinydb import TinyDB if os.path.exists('start_db.json'): os.unlink('start_db.json') db = TinyDB('start_db.json') settings = db.table('settings', cache_size=0) # disable cache settings.insert({'type': 'startcnt', 'val': 0}) # count rest...
27.068966
65
0.552866
6e3be2355c3af8c77cdd1e39e5582f49437edf97
403
py
Python
INBa/2015/Primov_G_S/task_1_19.py
YukkaSarasti/pythonintask
eadf4245abb65f4400a3bae30a4256b4658e009c
[ "Apache-2.0" ]
null
null
null
INBa/2015/Primov_G_S/task_1_19.py
YukkaSarasti/pythonintask
eadf4245abb65f4400a3bae30a4256b4658e009c
[ "Apache-2.0" ]
null
null
null
INBa/2015/Primov_G_S/task_1_19.py
YukkaSarasti/pythonintask
eadf4245abb65f4400a3bae30a4256b4658e009c
[ "Apache-2.0" ]
null
null
null
#Задача 1. Вариант 19 #Напишите программу, которая будет сообщать род деятельности и псевдоним под которым скрывается Илья Арнольдович Файзильберг. После вывода информации программа должна дожидаться пока пользователь нажмет Enter для выхода. #Primov G. S. #09.02.2016 print("Илья Арнольдович Файзильберг более известен...
57.571429
220
0.82134
95539732a4847a508aebfab4f7d45ae7c6d8a11b
324
py
Python
zencad/examples/1.GeomPrim/3.prim1d/helix.py
Spiritdude/zencad
4e63b1a6306dd235f4daa2791b10249f7546c95b
[ "MIT" ]
5
2018-04-11T14:11:40.000Z
2018-09-12T19:03:36.000Z
zencad/examples/1.GeomPrim/3.prim1d/helix.py
Spiritdude/zencad
4e63b1a6306dd235f4daa2791b10249f7546c95b
[ "MIT" ]
null
null
null
zencad/examples/1.GeomPrim/3.prim1d/helix.py
Spiritdude/zencad
4e63b1a6306dd235f4daa2791b10249f7546c95b
[ "MIT" ]
null
null
null
#!/usr/bin/env python3 """ ZenCad API example: helix.py """ from zencad import * m1 = helix(r=10, h=40, step=4) m2 = helix(r=10, h=40, step=4, left=True) m3 = helix(r=10, h=40, step=4, angle=deg(10)) m4 = helix(r=10, h=40, step=4, angle=deg(-10)) disp(m1) disp(m2.right(30)) disp(m3.right(60)) disp(m4.right(90)) sho...
17.052632
46
0.62963
9567ccb6aeb3492f01f354727e10e30a0bcd47ec
375
py
Python
logging/logging_basics.py
karinakozarova/Learning-Python
217dfc8ca6931a238445daf0b84e188c02916c52
[ "MIT" ]
1
2019-04-07T23:14:29.000Z
2019-04-07T23:14:29.000Z
logging/logging_basics.py
karinakozarova/Learning-Python
217dfc8ca6931a238445daf0b84e188c02916c52
[ "MIT" ]
null
null
null
logging/logging_basics.py
karinakozarova/Learning-Python
217dfc8ca6931a238445daf0b84e188c02916c52
[ "MIT" ]
null
null
null
import logging logging.basicConfig(filename='test.log', level=logging.DEBUG,format='%(asctime)s:%(levelname)s:%(message)s') if __name__ == "__main__": logging.debug("testing debug logging") logging.info("testing info logging") logging.warning("testing warning logging") logging.critical("testing critic...
37.5
108
0.736
dd097665b8882d3cd6acb0ba94d02f080b5ff27b
389
py
Python
Kapitel 2/Datum.py
mqng/HS-CO_WS2122_IF_FProg
b52470e0991bdbaeba22b154c4029e6cded51fd7
[ "MIT" ]
null
null
null
Kapitel 2/Datum.py
mqng/HS-CO_WS2122_IF_FProg
b52470e0991bdbaeba22b154c4029e6cded51fd7
[ "MIT" ]
null
null
null
Kapitel 2/Datum.py
mqng/HS-CO_WS2122_IF_FProg
b52470e0991bdbaeba22b154c4029e6cded51fd7
[ "MIT" ]
null
null
null
length_of_month = [31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31] d = int(input("Tag eingeben: ")) m = int(input("Monat eingeben: ")) y = int(input("Jahr eingeben: ")) if (y % 4 == 0) and (y % 100 != 0) or (y % 400 == 0): length_of_month[1] = 29 day_in_year = d for i in range(m - 1): day_in_year += length_...
24.3125
66
0.59383
af673f3118082e7c295fda82947cc3b72df9b985
981
py
Python
imwievaluation/__init__.py
ESchae/IMWIEvaluation
2fa661711b7b65cba25c1fa9ba69e09e75c7655f
[ "MIT" ]
null
null
null
imwievaluation/__init__.py
ESchae/IMWIEvaluation
2fa661711b7b65cba25c1fa9ba69e09e75c7655f
[ "MIT" ]
null
null
null
imwievaluation/__init__.py
ESchae/IMWIEvaluation
2fa661711b7b65cba25c1fa9ba69e09e75c7655f
[ "MIT" ]
1
2019-10-19T10:11:17.000Z
2019-10-19T10:11:17.000Z
import logging from os import path, remove # TODO: add modules from this package (?) from .mail import MailServer # http://www.patricksoftwareblog.com/python-logging-tutorial/ # If applicable, delete the existing log file to generate a fresh log file # during each execution if path.isfile("22-06-18-generate-evaluati...
30.65625
80
0.781855
a5454c822499a004da76c3773df9879e14714035
4,671
py
Python
chillow/controller/offline_controller.py
jonashellmann/informaticup21-team-chillow
f2e519af0a5d9a9368d62556703cfb1066ebb58f
[ "MIT" ]
3
2021-01-17T23:32:07.000Z
2022-01-30T14:49:16.000Z
chillow/controller/offline_controller.py
jonashellmann/informaticup21-team-chillow
f2e519af0a5d9a9368d62556703cfb1066ebb58f
[ "MIT" ]
2
2021-01-17T13:37:56.000Z
2021-04-14T12:28:49.000Z
chillow/controller/offline_controller.py
jonashellmann/informaticup21-team-chillow
f2e519af0a5d9a9368d62556703cfb1066ebb58f
[ "MIT" ]
2
2021-04-02T14:53:38.000Z
2021-04-20T11:10:17.000Z
import multiprocessing from datetime import datetime, timedelta, timezone from random import randint from chillow.controller.controller import Controller from chillow.model.action import Action from chillow.model.cell import Cell from chillow.model.direction import Direction from chillow.model.game import Game from ch...
39.923077
114
0.652965
a5a4b540fa009f4c3ff89d2d2948faa81ed8bb34
444
py
Python
P8702N/index.py
wittrup/crap
a77474588fd54a5a998e24df7b1e6e2ab473ded1
[ "MIT" ]
1
2017-12-12T13:58:08.000Z
2017-12-12T13:58:08.000Z
P8702N/index.py
wittrup/crap
a77474588fd54a5a998e24df7b1e6e2ab473ded1
[ "MIT" ]
null
null
null
P8702N/index.py
wittrup/crap
a77474588fd54a5a998e24df7b1e6e2ab473ded1
[ "MIT" ]
1
2019-11-03T10:16:35.000Z
2019-11-03T10:16:35.000Z
import impat impat.addfolder('python') from FunCom import find_between from session import login, host, cookies import requests page=find_between(login.text, "top.location='/", "';") if login.status_code == requests.codes.ok and cookies['SESSION'] is not '': print('=~=~=~=~=~=~=~=~=~=~=~= ...
37
90
0.578829
3c1d9f40166c355c3f069c4527158636b50a7528
394
py
Python
main.py
yangzhijiang/GeektimeTensorflow
80479426a216d1d27fc78e53c581008ccec46cbe
[ "MIT" ]
1
2020-02-16T13:31:42.000Z
2020-02-16T13:31:42.000Z
main.py
yangzhijiang/GeektimeTensorflow
80479426a216d1d27fc78e53c581008ccec46cbe
[ "MIT" ]
null
null
null
main.py
yangzhijiang/GeektimeTensorflow
80479426a216d1d27fc78e53c581008ccec46cbe
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- # @Time : 2019/1/7 21:18 # @Author : LunaFire # @Email : gilgemesh2012@gmail.com # @File : main.py import tensorflow as tf import keras if __name__ == '__main__': hello = tf.constant('Hello Tensorflow!') with tf.Session() as sess: print(sess.run(hello)) print(tf....
20.736842
44
0.637056
3c99aa880abf5033900b79632c99788d09d4c9ab
2,157
py
Python
code/snake/Algorithms/LookAroundHead.py
BogyMitutoyoCTL/AI-Preparation
ef535741816b02e5e63d426a3232a688c9abd726
[ "MIT" ]
1
2020-03-30T09:25:53.000Z
2020-03-30T09:25:53.000Z
code/snake/Algorithms/LookAroundHead.py
BogyMitutoyoCTL/AI-Preparation
ef535741816b02e5e63d426a3232a688c9abd726
[ "MIT" ]
2
2020-02-05T14:00:23.000Z
2020-03-30T19:57:19.000Z
code/snake/Algorithms/LookAroundHead.py
BogyMitutoyoCTL/AI-Preparation
ef535741816b02e5e63d426a3232a688c9abd726
[ "MIT" ]
null
null
null
from Algorithms.Algorithms import Algorithm from GameData import GameData FREE = 0 FOOD = 1 BLOCKED = 2 class LookAroundHead(Algorithm): """ Best result: 47 """ def __init__(self): super().__init__() @staticmethod def get_head_view_with_food(info: GameData): surrounding = ...
30.814286
79
0.52573
593924252c5376251c786da791c560505e91d62d
1,238
py
Python
dqn/model.py
laituan245/Reinforcement-Learning-Dojo
3187621c9188d72fe593ef69ecad6d1288889a51
[ "MIT" ]
null
null
null
dqn/model.py
laituan245/Reinforcement-Learning-Dojo
3187621c9188d72fe593ef69ecad6d1288889a51
[ "MIT" ]
null
null
null
dqn/model.py
laituan245/Reinforcement-Learning-Dojo
3187621c9188d72fe593ef69ecad6d1288889a51
[ "MIT" ]
null
null
null
import torch import torch.nn as nn import torch.nn.functional as F import numpy as np from collections import OrderedDict # Q-Network class Model(nn.Module): def __init__(self, nb_actions): super(Model, self).__init__() self.nb_actions = nb_actions self.conv_layers = nn.Sequential(Ordere...
28.136364
89
0.583199
a730312acb297f7d7acb7590ff2d9c4107424d76
856
py
Python
Lexer_Error.py
Peetee06/compilerbau_ws2122_hsbochum
9b71e33f7385ba946ce7f4d375b7ca68b21dd97f
[ "MIT" ]
null
null
null
Lexer_Error.py
Peetee06/compilerbau_ws2122_hsbochum
9b71e33f7385ba946ce7f4d375b7ca68b21dd97f
[ "MIT" ]
null
null
null
Lexer_Error.py
Peetee06/compilerbau_ws2122_hsbochum
9b71e33f7385ba946ce7f4d375b7ca68b21dd97f
[ "MIT" ]
2
2022-03-13T18:48:24.000Z
2022-03-20T16:45:19.000Z
class Error: def __init__(self, position_start, position_end, error_name, details): self.position_start = position_start self.position_end = position_end self.error_name = error_name self.details = details def as_string(self): result = f'{self.error_name}: {self.d...
38.909091
139
0.706776
5971b4ed43b4cdb39c66326495d02fb459e1c468
1,458
py
Python
loesungsvorschlaege/ml_2_klassifikation_knn_svm/praxis/svm/svm_abstrakt_plot.py
severinhaller/einf-machinelearning
4dfc8f1da0d81c5aa800d1459f81b72d1bf6dd9b
[ "MIT" ]
null
null
null
loesungsvorschlaege/ml_2_klassifikation_knn_svm/praxis/svm/svm_abstrakt_plot.py
severinhaller/einf-machinelearning
4dfc8f1da0d81c5aa800d1459f81b72d1bf6dd9b
[ "MIT" ]
null
null
null
loesungsvorschlaege/ml_2_klassifikation_knn_svm/praxis/svm/svm_abstrakt_plot.py
severinhaller/einf-machinelearning
4dfc8f1da0d81c5aa800d1459f81b72d1bf6dd9b
[ "MIT" ]
null
null
null
import matplotlib.pyplot as plt import numpy as np import pandas as pd from sklearn import svm column_names = ["x1", "x2", "class"] # Wir müssen die Klassen durch Zahlen ersetzen, damit die Farben einfacher gezeichnet werden können. abstrakt_data_set = pd.read_csv("abstrakt_plot.csv", names=column_names, header=None) ...
28.588235
100
0.693416
59cd6a84ff9cb47bea8cc2fe494ac77f8780dc9a
348
py
Python
challenge/setup.py
florianletsch/kinect-juggling
f320cc0b55adf65d338d25986a03106a7e3f46ef
[ "Unlicense", "MIT" ]
7
2015-11-27T09:53:32.000Z
2021-01-13T17:35:54.000Z
challenge/setup.py
florianletsch/kinect-juggling
f320cc0b55adf65d338d25986a03106a7e3f46ef
[ "Unlicense", "MIT" ]
null
null
null
challenge/setup.py
florianletsch/kinect-juggling
f320cc0b55adf65d338d25986a03106a7e3f46ef
[ "Unlicense", "MIT" ]
null
null
null
from distutils.core import setup from distutils.extension import Extension from Cython.Distutils import build_ext import numpy as np setup ( name = 'Sum arrays', cmdclass = { 'build_ext': build_ext }, ext_modules = [ Extension ( "cy_sum_arrays", ["cy_sum_arrays.pyx"], include_dirs =...
26.769231
43
0.666667
ab91a389552ca69b25e89595cb788187d232eecc
3,492
py
Python
Packs/AccentureCTI/Integrations/ACTIVulnerabilityQuery/ACTIVulnerabilityQuery_test.py
cstone112/content
7f039931b8cfc20e89df52d895440b7321149a0d
[ "MIT" ]
1
2022-03-15T13:16:24.000Z
2022-03-15T13:16:24.000Z
Packs/AccentureCTI/Integrations/ACTIVulnerabilityQuery/ACTIVulnerabilityQuery_test.py
cstone112/content
7f039931b8cfc20e89df52d895440b7321149a0d
[ "MIT" ]
87
2022-02-23T12:10:53.000Z
2022-03-31T11:29:05.000Z
Packs/AccentureCTI/Integrations/ACTIVulnerabilityQuery/ACTIVulnerabilityQuery_test.py
cstone112/content
7f039931b8cfc20e89df52d895440b7321149a0d
[ "MIT" ]
null
null
null
import json import io from ACTIVulnerabilityQuery import Client, vuln_command from test_data.response_constants import * from CommonServerPython import DBotScoreReliability import requests_mock API_URL = "https://test.com" def util_load_json(path): with io.open(path, mode='r', encoding='utf-8') as f: re...
37.148936
639
0.63803
f9fdd491a6cac8fcd32279d636b10c198d576a4a
1,708
py
Python
src/onegov/town6/views/allocation.py
politbuero-kampagnen/onegov-cloud
20148bf321b71f617b64376fe7249b2b9b9c4aa9
[ "MIT" ]
null
null
null
src/onegov/town6/views/allocation.py
politbuero-kampagnen/onegov-cloud
20148bf321b71f617b64376fe7249b2b9b9c4aa9
[ "MIT" ]
null
null
null
src/onegov/town6/views/allocation.py
politbuero-kampagnen/onegov-cloud
20148bf321b71f617b64376fe7249b2b9b9c4aa9
[ "MIT" ]
null
null
null
from onegov.core.security import Private from onegov.org.views.allocation import get_new_allocation_form_class, \ get_edit_allocation_form_class, get_allocation_rule_form_class, \ view_allocation_rules, handle_new_allocation, handle_edit_allocation, \ handle_allocation_rule from onegov.town6 import TownApp ...
41.658537
75
0.771663
e64430b74c181ec389b209086ccfc1489bedd519
4,142
py
Python
src/test/tests/queries/scf.py
visit-dav/vis
c08bc6e538ecd7d30ddc6399ec3022b9e062127e
[ "BSD-3-Clause" ]
226
2018-12-29T01:13:49.000Z
2022-03-30T19:16:31.000Z
src/test/tests/queries/scf.py
visit-dav/vis
c08bc6e538ecd7d30ddc6399ec3022b9e062127e
[ "BSD-3-Clause" ]
5,100
2019-01-14T18:19:25.000Z
2022-03-31T23:08:36.000Z
src/test/tests/queries/scf.py
visit-dav/vis
c08bc6e538ecd7d30ddc6399ec3022b9e062127e
[ "BSD-3-Clause" ]
84
2019-01-24T17:41:50.000Z
2022-03-10T10:01:46.000Z
# ---------------------------------------------------------------------------- # CLASSES: nightly # # Test Case: scf.py # Tests: queries - spherical compactness factor # # Defect ID: VisIt00006385 # # Programmer: Hank Childs # Date: July 14, 2005 # # Modifications: # Mark C. Miller, Fri Nov 1...
27.613333
89
0.66731
55621855b718c6c92db6a9851d5e42f02dd2d02e
4,447
py
Python
src/plot_results.py
misogil0116/Biscotti
010ef0f29fbd5d33c9870ce249f1a9824f3471c4
[ "Apache-2.0" ]
10
2018-01-11T01:15:15.000Z
2020-06-22T15:03:31.000Z
src/plot_results.py
misogil0116/Biscotti
010ef0f29fbd5d33c9870ce249f1a9824f3471c4
[ "Apache-2.0" ]
null
null
null
src/plot_results.py
misogil0116/Biscotti
010ef0f29fbd5d33c9870ce249f1a9824f3471c4
[ "Apache-2.0" ]
null
null
null
import json import numpy as np import matplotlib.pyplot as plt """ validations/ 以下の結果から 1. butteraugli 2. 経過時間(elapsed time) : こいつは平均でいいような気がする 3. ファイルサイズ : beforeを横軸, afterを縦軸にグラフをplotする """ def check_image_size(validation_dir): if validation_dir.find("224") > 0: return 224 elif validation_dir.find("5...
33.186567
124
0.645154
e95f4d5105ff7792f156f9427a77e0b0bfa43c11
546
py
Python
pages/themes/beginners/sequenceDataTypes/examples/tupple_change_muttable_item.py
ProgressBG-Python-Course/ProgressBG-Python
6429833696c2c50d9f902f62cc3a65ca62659c69
[ "MIT" ]
null
null
null
pages/themes/beginners/sequenceDataTypes/examples/tupple_change_muttable_item.py
ProgressBG-Python-Course/ProgressBG-Python
6429833696c2c50d9f902f62cc3a65ca62659c69
[ "MIT" ]
null
null
null
pages/themes/beginners/sequenceDataTypes/examples/tupple_change_muttable_item.py
ProgressBG-Python-Course/ProgressBG-Python
6429833696c2c50d9f902f62cc3a65ca62659c69
[ "MIT" ]
null
null
null
users = ( ["Ivan", "Ivanov", 34], ["Maria", "Ivanova", 36], ["Asen", "Asenov", 20], ) ### try to change a tupple item: # users[0] = 5 # # TypeError: 'tuple' object does not support item assignment ### try to change a tupple item: # users[0] = ["Petyr", "Petrov", 45] # # TypeError: 'tuple' object does not ...
24.818182
79
0.602564
e98bcaf2694cb89bfe888ba9261948cc89932274
991
py
Python
Louisa/springer_pdf_miner.py
JonathanOnorato/ChemLP
a7b0d2f9a3899531aacda9bc85d89d721f6450c4
[ "MIT" ]
4
2020-04-13T20:49:01.000Z
2021-02-09T01:05:01.000Z
Louisa/springer_pdf_miner.py
JonathanOnorato/ChemLP
a7b0d2f9a3899531aacda9bc85d89d721f6450c4
[ "MIT" ]
3
2020-04-28T23:16:27.000Z
2020-04-28T23:26:53.000Z
Louisa/springer_pdf_miner.py
JonathanOnorato/ChemLP
a7b0d2f9a3899531aacda9bc85d89d721f6450c4
[ "MIT" ]
null
null
null
#!/usr/bin/env python # coding: utf-8 from pdfminer.high_level import extract_text import json import re as re import string def extract_text_from_pdf(pdf_path): global cleanest_text text = extract_text(pdf_path) pre_clean_text = text.lower().strip().replace('\ufb01', 'fi').replace('\ufb02', 'fl').re...
27.527778
177
0.635721
e99092418968d1c22a5bf747d2ea680d334bce10
3,343
py
Python
exercises/networking_selfpaced/networking-workshop/collections/ansible_collections/community/general/tests/unit/modules/network/voss/test_voss_facts.py
tr3ck3r/linklight
5060f624c235ecf46cb62cefcc6bddc6bf8ca3e7
[ "MIT" ]
null
null
null
exercises/networking_selfpaced/networking-workshop/collections/ansible_collections/community/general/tests/unit/modules/network/voss/test_voss_facts.py
tr3ck3r/linklight
5060f624c235ecf46cb62cefcc6bddc6bf8ca3e7
[ "MIT" ]
null
null
null
exercises/networking_selfpaced/networking-workshop/collections/ansible_collections/community/general/tests/unit/modules/network/voss/test_voss_facts.py
tr3ck3r/linklight
5060f624c235ecf46cb62cefcc6bddc6bf8ca3e7
[ "MIT" ]
null
null
null
# This file is part of Ansible # # Ansible is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # # Ansible is distributed in the hope that ...
38.425287
132
0.679031
f9590e37a90f82779cc48c07ef2b40e190cf48cd
351
py
Python
rdlcompiler/logger.py
MegabytePhreak/rdl
b97912751738da9fddb42a9155f5823716809fc0
[ "MIT" ]
4
2016-05-10T20:40:34.000Z
2020-04-09T13:23:33.000Z
rdlcompiler/logger.py
MegabytePhreak/rdl
b97912751738da9fddb42a9155f5823716809fc0
[ "MIT" ]
null
null
null
rdlcompiler/logger.py
MegabytePhreak/rdl
b97912751738da9fddb42a9155f5823716809fc0
[ "MIT" ]
null
null
null
__author__ = 'megabytephreak' import sys class Logger: def __init__(self, out=sys.stderr): self._out = out def log(self, message): self._out.write(message) def log_line(self, message): self._out.write(message) self._out.write('\n') def get_dest(self): retur...
15.954545
39
0.615385
f9a51981df4957facc46b2370f7531e39bff9013
3,220
py
Python
server/view.py
JungleState/ksr_junglestate
99e86458b5056507bd36906f295bef11f2c734f5
[ "MIT" ]
1
2022-01-25T07:53:12.000Z
2022-01-25T07:53:12.000Z
server/view.py
JungleState/ksr_junglestate
99e86458b5056507bd36906f295bef11f2c734f5
[ "MIT" ]
14
2022-01-03T13:19:11.000Z
2022-01-12T15:36:42.000Z
server/view.py
JungleState/ksr_junglestate
99e86458b5056507bd36906f295bef11f2c734f5
[ "MIT" ]
null
null
null
from random import randint import pygame import sys from pygame.constants import KEYDOWN import game_logic pygame.init() WIN_WIDTH = 680 WIN_HEIGHT = 680 SCREEN = pygame.display.set_mode((WIN_WIDTH, WIN_HEIGHT)) BLACK = (0, 0, 0) WHITE = (255, 255, 255) YELLOW = (255, 211, 0) BROWN = (121, 63, 13) BACKGROUND = (19...
27.058824
62
0.498137
3499461564ff56a30242bcc74d377e7262e54f1f
4,856
py
Python
packages/watchmen-rest-doll/src/watchmen_rest_doll/system/data_source_router.py
Indexical-Metrics-Measure-Advisory/watchmen
c54ec54d9f91034a38e51fd339ba66453d2c7a6d
[ "MIT" ]
null
null
null
packages/watchmen-rest-doll/src/watchmen_rest_doll/system/data_source_router.py
Indexical-Metrics-Measure-Advisory/watchmen
c54ec54d9f91034a38e51fd339ba66453d2c7a6d
[ "MIT" ]
null
null
null
packages/watchmen-rest-doll/src/watchmen_rest_doll/system/data_source_router.py
Indexical-Metrics-Measure-Advisory/watchmen
c54ec54d9f91034a38e51fd339ba66453d2c7a6d
[ "MIT" ]
null
null
null
from typing import List, Optional from fastapi import APIRouter, Body, Depends from watchmen_auth import PrincipalService from watchmen_data_kernel.cache import CacheService from watchmen_meta.common import ask_meta_storage, ask_snowflake_generator from watchmen_meta.system import DataSourceService from watchmen_model...
37.068702
117
0.820222
1fa10d9db8f28156077383cda994bf6950fd383a
968
py
Python
src/d2py/utils/unzip.py
xinetzone/d2py
657362a0451921ef5a7b05b4a8378f7379063cdf
[ "Apache-2.0" ]
3
2022-03-09T14:08:42.000Z
2022-03-10T04:17:17.000Z
src/d2py/utils/unzip.py
xinetzone/d2py
657362a0451921ef5a7b05b4a8378f7379063cdf
[ "Apache-2.0" ]
3
2021-11-07T13:11:26.000Z
2022-03-19T03:28:48.000Z
src/d2py/utils/unzip.py
xinetzone/d2py
657362a0451921ef5a7b05b4a8378f7379063cdf
[ "Apache-2.0" ]
1
2022-03-15T14:18:32.000Z
2022-03-15T14:18:32.000Z
'''解压后中文路径乱码的解决方案 ''' from pathlib import Path from zipfile import ZipFile def decode_path(path): '''将乱码的路径编码为 UTF8 :path: Path 的实例 ''' try: path_name = path.decode('utf-8') except: path_name = path.encode('437').decode('gbk') path_name = path_name.encode('utf-8').decode(...
24.2
70
0.617769
f1b70ab348a95a83074763196d6ed338e661b1f2
9,850
py
Python
backend/app/api/endpoints/courses.py
jinnn-dev/patholearn
b4e6a18cfbf963e71640ed6cac3fc3a618a7ae15
[ "MIT" ]
1
2021-11-04T17:06:07.000Z
2021-11-04T17:06:07.000Z
backend/app/api/endpoints/courses.py
JamesNeumann/learning-by-annotations
c2b5e4b653eeb1c973aa5a7dad35ac8be18cb1ad
[ "MIT" ]
21
2021-11-01T10:13:56.000Z
2021-12-02T10:02:13.000Z
backend/app/api/endpoints/courses.py
jinnn-dev/patholearn
b4e6a18cfbf963e71640ed6cac3fc3a618a7ae15
[ "MIT" ]
1
2021-12-16T18:20:55.000Z
2021-12-16T18:20:55.000Z
from typing import Any, List, Union from app.api.deps import ( check_if_user_can_access_course, get_current_active_superuser, get_current_active_user, get_db, ) from app.crud.crud_base_task import crud_base_task from app.crud.crud_course import crud_course from app.crud.crud_task import crud_...
33.732877
89
0.65533
7b51075af5962d67dc13188d45ac7a71521448ba
91
py
Python
Produkte/apps.py
wmles/scholarium.at
d2356b3e475df772382e035ddcb839fc7dae4305
[ "MIT" ]
1
2017-07-24T10:19:36.000Z
2017-07-24T10:19:36.000Z
Produkte/apps.py
valuehack/scholarium.at
b81220ab18ae6db057132ae2cc43afc22545e5e6
[ "MIT" ]
135
2017-07-31T20:11:59.000Z
2022-03-11T23:16:37.000Z
Produkte/apps.py
valuehack/scholarium.at
b81220ab18ae6db057132ae2cc43afc22545e5e6
[ "MIT" ]
4
2017-11-20T12:10:50.000Z
2018-03-12T10:51:12.000Z
from django.apps import AppConfig class ProdukteConfig(AppConfig): name = 'Produkte'
15.166667
33
0.758242
c87392c45e703f00c9fb9ce982686c45e918fb7b
43,701
py
Python
tests/onegov/swissvotes/test_models.py
politbuero-kampagnen/onegov-cloud
20148bf321b71f617b64376fe7249b2b9b9c4aa9
[ "MIT" ]
null
null
null
tests/onegov/swissvotes/test_models.py
politbuero-kampagnen/onegov-cloud
20148bf321b71f617b64376fe7249b2b9b9c4aa9
[ "MIT" ]
null
null
null
tests/onegov/swissvotes/test_models.py
politbuero-kampagnen/onegov-cloud
20148bf321b71f617b64376fe7249b2b9b9c4aa9
[ "MIT" ]
null
null
null
from datetime import date from decimal import Decimal from io import BytesIO from onegov.core.crypto import random_token from onegov.core.utils import Bunch from onegov.file.utils import as_fileintent from onegov.swissvotes.models import Actor from onegov.swissvotes.models import ColumnMapperDataset from onegov.swissvo...
36.723529
79
0.63399
7405af5c82fda7f21e2887f1c9927ea6b15b9116
169
py
Python
my-cs/projects/own/alg_progression.py
zaqwes8811/cs-courses
aa9cf5ad109c9cfcacaadc11bf2defb2188ddce2
[ "Apache-2.0" ]
null
null
null
my-cs/projects/own/alg_progression.py
zaqwes8811/cs-courses
aa9cf5ad109c9cfcacaadc11bf2defb2188ddce2
[ "Apache-2.0" ]
null
null
null
my-cs/projects/own/alg_progression.py
zaqwes8811/cs-courses
aa9cf5ad109c9cfcacaadc11bf2defb2188ddce2
[ "Apache-2.0" ]
null
null
null
#!/usr/bin/python #-*- coding: utf-8 -*- import math y = 120 ds = 0 for i in range(20) : ds = ds+y*math.pow(2/10.0, i)*(12/10.0) print 'ds : '+str(ds) print 1440/8
16.9
41
0.568047
93c83823d16d70ae3cd06abfc00213568d133843
2,042
py
Python
_posts/code/rejection-sampling/gmm_rejection_sampling.py
agdenadel/agdenadel.github.io
603f042e5d66d998300c720be6f9cf1f4d87ffc9
[ "MIT" ]
null
null
null
_posts/code/rejection-sampling/gmm_rejection_sampling.py
agdenadel/agdenadel.github.io
603f042e5d66d998300c720be6f9cf1f4d87ffc9
[ "MIT" ]
null
null
null
_posts/code/rejection-sampling/gmm_rejection_sampling.py
agdenadel/agdenadel.github.io
603f042e5d66d998300c720be6f9cf1f4d87ffc9
[ "MIT" ]
null
null
null
import numpy as np import matplotlib.pyplot as plt import scipy.stats import seaborn as sns def two_component_mixture_pdf(x): return (scipy.stats.norm.pdf(x, loc=-1, scale=0.5) + scipy.stats.norm.pdf(x, loc=1, scale=0.5))/2 def proposal_pdf(x): return scipy.stats.norm.pdf(x, loc=0, scale=2) def two_compon...
27.972603
112
0.694417
93eb13f2c5368d532ad6e22771e3268ecf37028b
436
py
Python
books/PythonAutomate/google_spreadsheets/spreadsheet_attributes.py
zeroam/TIL
43e3573be44c7f7aa4600ff8a34e99a65cbdc5d1
[ "MIT" ]
null
null
null
books/PythonAutomate/google_spreadsheets/spreadsheet_attributes.py
zeroam/TIL
43e3573be44c7f7aa4600ff8a34e99a65cbdc5d1
[ "MIT" ]
null
null
null
books/PythonAutomate/google_spreadsheets/spreadsheet_attributes.py
zeroam/TIL
43e3573be44c7f7aa4600ff8a34e99a65cbdc5d1
[ "MIT" ]
null
null
null
"""spreadsheet_attributes.py 구글 스프레드시트 문서 속성 값 접근 """ import ezsheets sheet_id = "1FIk-KAb9Ddi03XE2c179-K6Vnnu_wJ2BZLyYOj5G_L4" ss = ezsheets.Spreadsheet(sheet_id) print(ss.title) # 제목 출력 ss.title = "Changed Title" # 제목 변경 print(ss.url) # url 링크 출력 print(ss.sheetTitles) # 해당 문서의 Sheet Title 출력 print(ss.sheets) # ...
27.25
57
0.71789
93f3b0939fb70cf1279f7d6f925dd7ddacfc7726
350
py
Python
zencad/examples/1.GeomPrim/2.prim2d/interpolate2.py
Spiritdude/zencad
4e63b1a6306dd235f4daa2791b10249f7546c95b
[ "MIT" ]
5
2018-04-11T14:11:40.000Z
2018-09-12T19:03:36.000Z
zencad/examples/1.GeomPrim/2.prim2d/interpolate2.py
Spiritdude/zencad
4e63b1a6306dd235f4daa2791b10249f7546c95b
[ "MIT" ]
null
null
null
zencad/examples/1.GeomPrim/2.prim2d/interpolate2.py
Spiritdude/zencad
4e63b1a6306dd235f4daa2791b10249f7546c95b
[ "MIT" ]
null
null
null
#!/usr/bin/env python3 """ ZenCad API example: interpolate2 last update: 06.07.2020 """ from zencad import * POINTS = points2([ [(0,0,0), (10,0,7), (20,0,5)], [(0,5,0), (10,5,7.5), (20,5,7)], [(0,10,2), (10,10,8), (20,10,5)], [(0,15,1.3), (10,15,8.5), (20,15,6)], ]) m = interpolate2(POINTS) disp(m) disp(POI...
16.666667
39
0.557143
f551b2cf9c039adfabca1bd626ec42f0a2217357
829
py
Python
test_gui_hwnd.py
luluci/gui_env
9c2ffe331c2dc8a7e128474ce9590498082de569
[ "MIT" ]
null
null
null
test_gui_hwnd.py
luluci/gui_env
9c2ffe331c2dc8a7e128474ce9590498082de569
[ "MIT" ]
null
null
null
test_gui_hwnd.py
luluci/gui_env
9c2ffe331c2dc8a7e128474ce9590498082de569
[ "MIT" ]
null
null
null
import PySimpleGUI as sg sg.theme("Dark Blue 3") layout = [ [sg.Text("Test GUI.")], [sg.Text("ListBox:")], [sg.Listbox(key="list_box",values=["test1", "test2"], size=(50,10), enable_events=True)], [sg.Text("TextBox:")], [sg.InputText("hoge")] ] window = sg.Window("test window.", layout, finalize=Tr...
24.382353
118
0.6538
1935fa10a8a7eabdbf642ef9d2b2abebd6c99c7d
3,128
py
Python
src/onegov/fsi/forms/audit.py
politbuero-kampagnen/onegov-cloud
20148bf321b71f617b64376fe7249b2b9b9c4aa9
[ "MIT" ]
null
null
null
src/onegov/fsi/forms/audit.py
politbuero-kampagnen/onegov-cloud
20148bf321b71f617b64376fe7249b2b9b9c4aa9
[ "MIT" ]
null
null
null
src/onegov/fsi/forms/audit.py
politbuero-kampagnen/onegov-cloud
20148bf321b71f617b64376fe7249b2b9b9c4aa9
[ "MIT" ]
null
null
null
from cached_property import cached_property from wtforms import SelectField from wtforms.validators import InputRequired from onegov.form import Form from onegov.form.fields import ChosenSelectMultipleField from onegov.fsi import _ from onegov.fsi.models import CourseAttendee class AuditForm(Form): course_id = ...
30.076923
79
0.632033
5ff798fe7be4afb1e0befb9c434164b9600c5a77
1,317
py
Python
Cracking_the_Coding_Interview/stacks_balanced_brackets.py
byung-u/HackerRank
4c02fefff7002b3af774b99ebf8d40f149f9d163
[ "MIT" ]
null
null
null
Cracking_the_Coding_Interview/stacks_balanced_brackets.py
byung-u/HackerRank
4c02fefff7002b3af774b99ebf8d40f149f9d163
[ "MIT" ]
null
null
null
Cracking_the_Coding_Interview/stacks_balanced_brackets.py
byung-u/HackerRank
4c02fefff7002b3af774b99ebf8d40f149f9d163
[ "MIT" ]
null
null
null
#!/usr/bin/env python3 import sys # ['{', '[', '(', ')', ']', '}'] # [123, 91, 40, 41, 93, 125] def is_matched(expression): arr = list(expression) if arr[0] == '}' or arr[0] == ']' or arr[0] == ')': # It was a key. return False found = True while found == False: diff = abs(ord(arr[...
24.849057
72
0.461655
fde96a273dd5e10dd2a60c4ba796e404ae58d767
2,562
py
Python
Packs/ZeroTrustAnalyticsPlatform/Scripts/ZTAPParseFields/ZTAPParseFields.py
diCagri/content
c532c50b213e6dddb8ae6a378d6d09198e08fc9f
[ "MIT" ]
799
2016-08-02T06:43:14.000Z
2022-03-31T11:10:11.000Z
Packs/ZeroTrustAnalyticsPlatform/Scripts/ZTAPParseFields/ZTAPParseFields.py
diCagri/content
c532c50b213e6dddb8ae6a378d6d09198e08fc9f
[ "MIT" ]
9,317
2016-08-07T19:00:51.000Z
2022-03-31T21:56:04.000Z
Packs/ZeroTrustAnalyticsPlatform/Scripts/ZTAPParseFields/ZTAPParseFields.py
diCagri/content
c532c50b213e6dddb8ae6a378d6d09198e08fc9f
[ "MIT" ]
1,297
2016-08-04T13:59:00.000Z
2022-03-31T23:43:06.000Z
from CommonServerPython import * from typing import Dict, Any import traceback from collections import defaultdict """ STANDALONE FUNCTION """ def parse_fields(events, full, max_fields, max_value_length) -> str: """Parses events from the raw trigger events field and returns a section of the events in key/va...
26.968421
77
0.604996
478b61f534d7b3dafa9353b8042be73f767748f3
1,126
py
Python
Welp/api/google_image_search.py
kkysen/Soft-Dev
b19881b1fcc9c7daefc817e6b975ff6bce545d81
[ "Apache-2.0" ]
null
null
null
Welp/api/google_image_search.py
kkysen/Soft-Dev
b19881b1fcc9c7daefc817e6b975ff6bce545d81
[ "Apache-2.0" ]
null
null
null
Welp/api/google_image_search.py
kkysen/Soft-Dev
b19881b1fcc9c7daefc817e6b975ff6bce545d81
[ "Apache-2.0" ]
null
null
null
from __future__ import print_function import requests from typing import Iterable, List USER_AGENT = 'Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:57.0) Gecko/20100101 Firefox/57.0' # simple, non-persistent cache cache = {} def get_img_urls(query): # type: (str) -> List[str] if query in cach...
25.590909
94
0.531083
ef7222014d944f53f50334708988b6e15057238a
10,040
py
Python
Pipeline_detect.py
dimkaart/Machine-Learning-in-Produktion-und-Logistik
2d32ee2a7cd3f5b88ca86178018c40a76db6edd5
[ "MIT" ]
null
null
null
Pipeline_detect.py
dimkaart/Machine-Learning-in-Produktion-und-Logistik
2d32ee2a7cd3f5b88ca86178018c40a76db6edd5
[ "MIT" ]
null
null
null
Pipeline_detect.py
dimkaart/Machine-Learning-in-Produktion-und-Logistik
2d32ee2a7cd3f5b88ca86178018c40a76db6edd5
[ "MIT" ]
null
null
null
# Define environment import os # comment out below line to enable tensorflow outputs os.environ['TF_CPP_MIN_LOG_LEVEL'] = '3' import tensorflow as tf physical_devices = tf.config.experimental.list_physical_devices('GPU') if len(physical_devices) > 0: tf.config.experimental.set_memory_growth(physical_devices[0], Tru...
45.022422
145
0.605478
efd7820467b48613a7da53f57327a21416703781
1,447
py
Python
01_Exercise/ex1.py
appfs/appfs
8cbbfa0e40e4d4a75a498ce8dd894bb2fbc3a9e3
[ "MIT" ]
11
2017-04-21T11:39:55.000Z
2022-02-11T20:25:18.000Z
01_Exercise/ex1.py
appfs/appfs
8cbbfa0e40e4d4a75a498ce8dd894bb2fbc3a9e3
[ "MIT" ]
69
2017-04-26T09:30:38.000Z
2017-08-01T11:31:21.000Z
01_Exercise/ex1.py
appfs/appfs
8cbbfa0e40e4d4a75a498ce8dd894bb2fbc3a9e3
[ "MIT" ]
53
2017-04-20T16:16:11.000Z
2017-07-19T12:53:01.000Z
# TK 17Apr2017 import sys import math def geom_mean(value_list): return math.exp(sum( math.log(x) for x in value_list) / len(value_list)) loc_value = [[], []] with open(sys.argv[1], "r") as f: # enumerate liefert dir die Zeilenummer automatisch. Die started dann aber bei 0. for lineno, line in enumerat...
24.116667
111
0.533518
ef361704f06e556f083da70866a34562f2001e16
317
py
Python
assignments/ps2-template/satisfying_booking.py
tallamjr/mit-6006
c2aa6bb48edef5800c0779ba2eebd697d44249b5
[ "MIT" ]
1
2022-02-26T13:52:31.000Z
2022-02-26T13:52:31.000Z
assignments/ps2-template/satisfying_booking.py
tallamjr/mit-6006
c2aa6bb48edef5800c0779ba2eebd697d44249b5
[ "MIT" ]
null
null
null
assignments/ps2-template/satisfying_booking.py
tallamjr/mit-6006
c2aa6bb48edef5800c0779ba2eebd697d44249b5
[ "MIT" ]
null
null
null
def satisfying_booking(R): ''' Input: R | Tuple of |R| talk request tuples (s, t) Output: B | Tuple of room booking triples (k, s, t) | that is the booking schedule that satisfies R ''' B = [] ################## # YOUR CODE HERE # ################## return tuple(B)
26.416667
61
0.48265
a0cf6328c1727ef7ce968c2fe624cf803df93cd4
594
py
Python
python/fastcampus/chapter06_04_01.py
zeroam/TIL
43e3573be44c7f7aa4600ff8a34e99a65cbdc5d1
[ "MIT" ]
null
null
null
python/fastcampus/chapter06_04_01.py
zeroam/TIL
43e3573be44c7f7aa4600ff8a34e99a65cbdc5d1
[ "MIT" ]
null
null
null
python/fastcampus/chapter06_04_01.py
zeroam/TIL
43e3573be44c7f7aa4600ff8a34e99a65cbdc5d1
[ "MIT" ]
null
null
null
"""파이썬 심화 Asyncio 비동기 I/O Coroutine 작업 - Generator -> 반복적인 객체 Return(yield) - 즉, 실행 stop -> 다른 작업으로 위임 -> stop 지점부터 재실행 원리 - Non-Blocking 비동기 처리에 적합 """ # BlockIO -> 순차 실행 import timeit from urllib.request import urlopen urls = [ "http://daum.net", "https://google.com", "https://tistory.com", "https:/...
18
46
0.631313