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
512a494d92fbf1e23d34b24734f317d3aec4e3c3
1,458
py
Python
python/coursera_python/MICHIGAN/WEB/test/re_1.py
SayanGhoshBDA/code-backup
8b6135facc0e598e9686b2e8eb2d69dd68198b80
[ "MIT" ]
16
2018-11-26T08:39:42.000Z
2019-05-08T10:09:52.000Z
python/coursera_python/MICHIGAN/WEB/test/re_1.py
SayanGhoshBDA/code-backup
8b6135facc0e598e9686b2e8eb2d69dd68198b80
[ "MIT" ]
8
2020-05-04T06:29:26.000Z
2022-02-12T05:33:16.000Z
python/coursera_python/MICHIGAN/WEB/test/re_1.py
SayanGhoshBDA/code-backup
8b6135facc0e598e9686b2e8eb2d69dd68198b80
[ "MIT" ]
5
2020-02-11T16:02:21.000Z
2021-02-05T07:48:30.000Z
# To use the re function import re hand = open('test.txt') for line in hand: line=line.rstrip() # To find if a line contains a 'from' and print it if re.search("from",line): print("\nTo find if a line contains a 'from' and print it\n") print(line) # To find if the line starts...
29.16
125
0.654321
5138951bcd0c69061f2809b634041058061897c2
1,038
py
Python
checklisten/tests/test_urls.py
mribrgr/StuRa-Mitgliederdatenbank
87a261d66c279ff86056e315b05e6966b79df9fa
[ "MIT" ]
8
2019-11-26T13:34:46.000Z
2021-06-21T13:41:57.000Z
src/checklisten/tests/test_urls.py
Sumarbrander/Stura-Mitgliederdatenbank
691dbd33683b2c2d408efe7a3eb28e083ebcd62a
[ "MIT" ]
93
2019-12-16T09:29:10.000Z
2021-04-24T12:03:33.000Z
src/checklisten/tests/test_urls.py
Sumarbrander/Stura-Mitgliederdatenbank
691dbd33683b2c2d408efe7a3eb28e083ebcd62a
[ "MIT" ]
2
2020-12-03T12:43:19.000Z
2020-12-22T21:48:47.000Z
from django.test import SimpleTestCase from django.urls import reverse, resolve from checklisten.views import * class TestUrls(SimpleTestCase): def test_main_screen_url_resolves(self): url = reverse('checklisten:main_screen') self.assertEqual(resolve(url).func, main_screen) def test_abhaken_ur...
31.454545
59
0.702312
7a216ac140a8792d415caca521c5845aad159a3a
471
py
Python
Packs/MajorBreachesInvestigationandResponse/Scripts/RapidBreachResponseParseBlog/RapidBreachResponseParseBlog.py
diCagri/content
c532c50b213e6dddb8ae6a378d6d09198e08fc9f
[ "MIT" ]
799
2016-08-02T06:43:14.000Z
2022-03-31T11:10:11.000Z
Packs/MajorBreachesInvestigationandResponse/Scripts/RapidBreachResponseParseBlog/RapidBreachResponseParseBlog.py
diCagri/content
c532c50b213e6dddb8ae6a378d6d09198e08fc9f
[ "MIT" ]
9,317
2016-08-07T19:00:51.000Z
2022-03-31T21:56:04.000Z
Packs/MajorBreachesInvestigationandResponse/Scripts/RapidBreachResponseParseBlog/RapidBreachResponseParseBlog.py
diCagri/content
c532c50b213e6dddb8ae6a378d6d09198e08fc9f
[ "MIT" ]
1,297
2016-08-04T13:59:00.000Z
2022-03-31T23:43:06.000Z
import demistomock as demisto # noqa: F401 from bs4 import BeautifulSoup from CommonServerPython import * # noqa: F401 args = demisto.args() response = requests.get(args.get("url")) soup = BeautifulSoup(response.content, "html.parser") article = soup.find("article").get_text() _, article = article.split("Phishing Em...
36.230769
93
0.749469
8fe9124ccbaa7c4af6dca4b2a0eeaa3e566dc3cb
2,723
py
Python
software/supervisor/receiver.py
ghsecuritylab/project-powerline
6c0ec13bbfc11c3790c506f644db4fe45021440a
[ "MIT" ]
null
null
null
software/supervisor/receiver.py
ghsecuritylab/project-powerline
6c0ec13bbfc11c3790c506f644db4fe45021440a
[ "MIT" ]
null
null
null
software/supervisor/receiver.py
ghsecuritylab/project-powerline
6c0ec13bbfc11c3790c506f644db4fe45021440a
[ "MIT" ]
1
2020-03-08T01:50:58.000Z
2020-03-08T01:50:58.000Z
# imports import time from database import Panels, Strings, session, panels, strings # todo While Schleife mit delay und Abfrage beim IC oder falls moeglich auf Meldung von IC warten ob neue Daten gekommen sind # todo ev. Interrupt um angekickt zu werden # todo Wenn Daten gekommen sind: # todo I^2C entschluesseln # ...
34.0375
161
0.739258
8f4f0e1d3e25244ee885910263b3f5f9b211e497
443
py
Python
marsyas-vamp/marsyas/src/django/birdsong/application/birdsong/annotations/models.py
jaouahbi/VampPlugins
27c2248d1c717417fe4d448cdfb4cb882a8a336a
[ "Apache-2.0" ]
null
null
null
marsyas-vamp/marsyas/src/django/birdsong/application/birdsong/annotations/models.py
jaouahbi/VampPlugins
27c2248d1c717417fe4d448cdfb4cb882a8a336a
[ "Apache-2.0" ]
null
null
null
marsyas-vamp/marsyas/src/django/birdsong/application/birdsong/annotations/models.py
jaouahbi/VampPlugins
27c2248d1c717417fe4d448cdfb4cb882a8a336a
[ "Apache-2.0" ]
null
null
null
from django.db import models from recordings.models import Recording # Create your models here. class Annotation(models.Model): start_time_ms = models.IntegerField(default = 0) end_time_ms = models.IntegerField(default = 0) label = models.CharField(max_length = 200) recording = models.ForeignKey(Recor...
31.642857
90
0.724605
8efc21fb05db623003cc35301755f8de360a8752
1,631
py
Python
examples/example_sma.py
NewLanded/swbt
8b8e8609cea060d6f124dc3c4bd99cb6243501dc
[ "Apache-2.0" ]
null
null
null
examples/example_sma.py
NewLanded/swbt
8b8e8609cea060d6f124dc3c4bd99cb6243501dc
[ "Apache-2.0" ]
null
null
null
examples/example_sma.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 // (self.price + self.commission)) // 2 elif self.bs...
39.780488
191
0.6168
f10f3b720844b90f3b1df10b6533c22bada595b9
45
py
Python
src/cory/dao/reminder_dao.py
MBogert/ReminderCory
a687c70a12f49a807d9fb023d45f799292a37f26
[ "MIT" ]
null
null
null
src/cory/dao/reminder_dao.py
MBogert/ReminderCory
a687c70a12f49a807d9fb023d45f799292a37f26
[ "MIT" ]
null
null
null
src/cory/dao/reminder_dao.py
MBogert/ReminderCory
a687c70a12f49a807d9fb023d45f799292a37f26
[ "MIT" ]
null
null
null
class ReminderDao: def __init__(self):
9
20
0.688889
f14aef6c02208f9e4ddc9f53a91f3a6e7a0f08dd
17,550
py
Python
Co-Simulation/Sumo/sumo-1.7.0/tools/contributed/sumopy/agilepy/lib_wx/toolbox.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/agilepy/lib_wx/toolbox.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/agilepy/lib_wx/toolbox.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 ...
32.025547
117
0.591909
f180725a67e0f18a5aa21168ec71ba46b0daf5cf
331
py
Python
Problems/Dynamic Programming/Easy/MinCostClimbingStair/climbing_stairs.py
dolong2110/Algorithm-By-Problems-Python
31ecc7367aaabdd2b0ac0af7f63ca5796d70c730
[ "MIT" ]
1
2021-08-16T14:52:05.000Z
2021-08-16T14:52:05.000Z
Problems/Dynamic Programming/Easy/MinCostClimbingStair/climbing_stairs.py
dolong2110/Algorithm-By-Problems-Python
31ecc7367aaabdd2b0ac0af7f63ca5796d70c730
[ "MIT" ]
null
null
null
Problems/Dynamic Programming/Easy/MinCostClimbingStair/climbing_stairs.py
dolong2110/Algorithm-By-Problems-Python
31ecc7367aaabdd2b0ac0af7f63ca5796d70c730
[ "MIT" ]
null
null
null
from typing import List def minCostClimbingStairs(cost: List[int]) -> int: n = len(cost) if not cost: return 0 dt = [0 for _ in range(n)] dt[0] = cost[0] if n >= 2: dt[1] = cost[1] for i in range(2, n): dt[i] = cost[i] + min(dt[i - 1], dt[i - 2]) return min(dt[-...
18.388889
51
0.495468
24779c38d7ae66ffe9af7faafd5076fef8341abb
7,520
py
Python
x2paddle/optimizer/pytorch_code_optimizer/subgraphs_union.py
usertianqin/X2Paddle
b554a8094ca3e255ef4bd2e80337222a35625133
[ "Apache-2.0" ]
559
2019-01-14T06:01:55.000Z
2022-03-31T02:52:43.000Z
x2paddle/optimizer/pytorch_code_optimizer/subgraphs_union.py
usertianqin/X2Paddle
b554a8094ca3e255ef4bd2e80337222a35625133
[ "Apache-2.0" ]
353
2019-05-07T13:20:03.000Z
2022-03-31T05:30:12.000Z
x2paddle/optimizer/pytorch_code_optimizer/subgraphs_union.py
usertianqin/X2Paddle
b554a8094ca3e255ef4bd2e80337222a35625133
[ "Apache-2.0" ]
241
2018-12-25T02:13:51.000Z
2022-03-27T23:21:43.000Z
# -*- coding:UTF-8 -*- # Copyright (c) 2020 PaddlePaddle Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License" # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # ...
48.205128
132
0.63484
3b29ff066ca13ce397f305f577e8cb4642dbca08
1,793
py
Python
python/en/archive/topics/command_line_arguments/TODOs/04-cmd_line_args_parsing2.py
aimldl/coding
70ddbfaa454ab92fd072ee8dc614ecc330b34a70
[ "MIT" ]
null
null
null
python/en/archive/topics/command_line_arguments/TODOs/04-cmd_line_args_parsing2.py
aimldl/coding
70ddbfaa454ab92fd072ee8dc614ecc330b34a70
[ "MIT" ]
null
null
null
python/en/archive/topics/command_line_arguments/TODOs/04-cmd_line_args_parsing2.py
aimldl/coding
70ddbfaa454ab92fd072ee8dc614ecc330b34a70
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- import sys, getopt def usage(): print("usage: python3 04-cmd_line_args_parsing2.py arg1 arg2 arg3") def print_opts(): print("file_name =", file_name ) print("argc =", argc ) print("argv =", argv ) print("opts =", opts ) print("args =", args ) print("input_file...
26.367647
88
0.560513
3b7ea78abb9f5498d5b75b4c449c53937d1747fe
358
py
Python
05_fibinacci/example.py
wuyueCreator/python-test
6072ac9264a257c89925469238c14fff3bda5630
[ "MIT" ]
1
2019-03-25T03:44:54.000Z
2019-03-25T03:44:54.000Z
05_fibinacci/example.py
wuyueCreator/python-test
6072ac9264a257c89925469238c14fff3bda5630
[ "MIT" ]
null
null
null
05_fibinacci/example.py
wuyueCreator/python-test
6072ac9264a257c89925469238c14fff3bda5630
[ "MIT" ]
null
null
null
import math import profile def fibonacci(n): return int(1 / math.sqrt(5) * (((1 + math.sqrt(5)) / 2) ** n - ((1 - math.sqrt(5)) / 2) ** n)) def fibonacci2(n): a, b = 0, 1 while n: a, b = b, a + b n -= 1 return a def main(): fibonacci(1474) fibonacci2(1474) if __name__ == ...
14.916667
98
0.511173
d9723e9a68baa8f046126f72a03c5da9b45f1837
576
py
Python
rabbitmq/tutorial/new_task.py
zeroam/TIL
43e3573be44c7f7aa4600ff8a34e99a65cbdc5d1
[ "MIT" ]
null
null
null
rabbitmq/tutorial/new_task.py
zeroam/TIL
43e3573be44c7f7aa4600ff8a34e99a65cbdc5d1
[ "MIT" ]
null
null
null
rabbitmq/tutorial/new_task.py
zeroam/TIL
43e3573be44c7f7aa4600ff8a34e99a65cbdc5d1
[ "MIT" ]
null
null
null
import sys import pika credentials = pika.PlainCredentials('admin', '1q2w3e') parameters = pika.ConnectionParameters('192.168.1.197', 5672, '/', credentials) connection = pika.BlockingConnection(parameters) channel = connection.channel() channel.queue_declare(queue='task_queue', durable=True) message = ' '.join(sys....
28.8
79
0.729167
8db51bc16dbab990ff9228de53b1906a0da4969e
8,392
py
Python
defis/helper.py
lehr-laemp/kiga-webapp-V2
1d35dd1deb82962e166169245fa0d4e5f265af22
[ "Unlicense" ]
null
null
null
defis/helper.py
lehr-laemp/kiga-webapp-V2
1d35dd1deb82962e166169245fa0d4e5f265af22
[ "Unlicense" ]
null
null
null
defis/helper.py
lehr-laemp/kiga-webapp-V2
1d35dd1deb82962e166169245fa0d4e5f265af22
[ "Unlicense" ]
null
null
null
# -*- coding: utf-8 -*- """ Begonnen am 12.03.2022 @author: HM helper.py - alle nötigen Funktionen """ # --------------------------------------------------------- import datetime import os import pickle import shutil import smtplib # für Mail import ssl # für Mail from email.message import EmailMessage f...
27.605263
97
0.596163
d68f402a96a70f5e448461903c08393ab7d4363c
1,628
py
Python
solutions/pedestrian_search/webserver/src/service/models/model.py
naetimus/bootcamp
0182992df7c54012944b51fe9b70532ab6a0059b
[ "Apache-2.0" ]
1
2021-04-06T06:13:20.000Z
2021-04-06T06:13:20.000Z
solutions/pedestrian_search/webserver/src/service/models/model.py
naetimus/bootcamp
0182992df7c54012944b51fe9b70532ab6a0059b
[ "Apache-2.0" ]
null
null
null
solutions/pedestrian_search/webserver/src/service/models/model.py
naetimus/bootcamp
0182992df7c54012944b51fe9b70532ab6a0059b
[ "Apache-2.0" ]
null
null
null
import torch.nn as nn from .bi_lstm import BiLSTM from .mobilenet import MobileNetV1 from .resnet import resnet50 class Model(nn.Module): def __init__(self, args): super(Model, self).__init__() if args.image_model == 'mobilenet_v1': self.image_model = MobileNetV1() self.ima...
36.177778
101
0.679361
ba9499f6452662b5f5c804d2f00576ceace5f45e
25,166
py
Python
hihope_neptune-oh_hid/00_src/v0.1/third_party/LVM2/daemons/lvmdbusd/lv.py
dawmlight/vendor_oh_fun
bc9fb50920f06cd4c27399f60076f5793043c77d
[ "Apache-2.0" ]
1
2022-02-15T08:51:55.000Z
2022-02-15T08:51:55.000Z
hihope_neptune-oh_hid/00_src/v0.3/third_party/LVM2/daemons/lvmdbusd/lv.py
dawmlight/vendor_oh_fun
bc9fb50920f06cd4c27399f60076f5793043c77d
[ "Apache-2.0" ]
null
null
null
hihope_neptune-oh_hid/00_src/v0.3/third_party/LVM2/daemons/lvmdbusd/lv.py
dawmlight/vendor_oh_fun
bc9fb50920f06cd4c27399f60076f5793043c77d
[ "Apache-2.0" ]
null
null
null
# Copyright (C) 2015-2016 Red Hat, Inc. All rights reserved. # # This copyrighted material is made available to anyone wishing to use, # modify, copy, or redistribute it subject to the terms and conditions # of the GNU General Public License v.2. # # You should have received a copy of the GNU General Public License # a...
30.247596
79
0.710522
036fb7b6cbbad0bc47fd87c70ccf51053854b213
548
py
Python
jumeaux/addons/models.py
ihatov08/jumeaux
7d983474df4b6dcfa57ea1a66901fbc99ebababa
[ "MIT" ]
11
2017-10-02T01:29:12.000Z
2022-03-31T08:37:22.000Z
jumeaux/addons/models.py
ihatov08/jumeaux
7d983474df4b6dcfa57ea1a66901fbc99ebababa
[ "MIT" ]
79
2017-07-16T14:47:17.000Z
2022-03-31T08:49:14.000Z
jumeaux/addons/models.py
ihatov08/jumeaux
7d983474df4b6dcfa57ea1a66901fbc99ebababa
[ "MIT" ]
2
2019-01-28T06:11:58.000Z
2021-01-25T07:21:21.000Z
# -*- coding: utf-8 -*- from owlmixin import OwlMixin, TOption, TList class Addon(OwlMixin): name: str cls_name: str = "Executor" config: TOption[dict] include: TOption[str] tags: TOption[TList[str]] # List is None... class Addons(OwlMixin): log2reqs: Addon reqs2reqs: TList[Addon] = [] ...
22.833333
45
0.614964
037b15551d166c8c16f7ab353f07ce460a9c9d1e
4,696
py
Python
FuzzyMachine.py
siej88/FuzzyACO
989a58049c8417cd023cfc312fb99d2649333ca7
[ "MIT" ]
null
null
null
FuzzyMachine.py
siej88/FuzzyACO
989a58049c8417cd023cfc312fb99d2649333ca7
[ "MIT" ]
null
null
null
FuzzyMachine.py
siej88/FuzzyACO
989a58049c8417cd023cfc312fb99d2649333ca7
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- """ UNIVERSIDAD DE CONCEPCION Departamento de Ingenieria Informatica y Ciencias de la Computacion Memoria de Titulo Ingenieria Civil Informatica DETECCION DE BORDES EN IMAGENES DGGE USANDO UN SISTEMA HIBRIDO ACO CON LOGICA DIFUSA Autor: Sebastian Ignacio Espinoza Jimenez Patrocinant...
45.592233
117
0.619676
00266780457269454f028a075438fc674e350e31
1,505
py
Python
pages/extensions/amp_example_preview/util/preview_test.py
ericandrewlewis/amp.dev
cf8e3d34a5582696ead97563c0809036804ab5c7
[ "Apache-2.0" ]
300
2015-12-09T20:35:37.000Z
2019-07-16T06:41:29.000Z
pages/extensions/amp_example_preview/util/preview_test.py
ericandrewlewis/amp.dev
cf8e3d34a5582696ead97563c0809036804ab5c7
[ "Apache-2.0" ]
2,099
2019-07-16T13:24:27.000Z
2022-03-26T12:31:51.000Z
pages/extensions/amp_example_preview/util/preview_test.py
ericandrewlewis/amp.dev
cf8e3d34a5582696ead97563c0809036804ab5c7
[ "Apache-2.0" ]
543
2019-07-18T09:06:14.000Z
2022-03-31T02:43:10.000Z
"""Tests for the source code extractor.""" import unittest import sys import os sys.path.extend([os.path.join(os.path.dirname(__file__), '.')]) from preview import ExamplePreview, ExamplePreviewMatch class PreviewTestCase(unittest.TestCase): def test_preview_wrap_and_extract(self): example_code = '<h1>test...
31.354167
80
0.663787
cc5f0dc491a1c6ec70913655d806751ad73db3fc
388
py
Python
PINp/2014/Platonova Olga/task_2_21.py
YukkaSarasti/pythonintask
eadf4245abb65f4400a3bae30a4256b4658e009c
[ "Apache-2.0" ]
null
null
null
PINp/2014/Platonova Olga/task_2_21.py
YukkaSarasti/pythonintask
eadf4245abb65f4400a3bae30a4256b4658e009c
[ "Apache-2.0" ]
null
null
null
PINp/2014/Platonova Olga/task_2_21.py
YukkaSarasti/pythonintask
eadf4245abb65f4400a3bae30a4256b4658e009c
[ "Apache-2.0" ]
null
null
null
# Задача 2. Вариант 21. #Напишите программу, которая будет выводить на экран наиболее понравившееся вам высказывание, автором которого является Леонардо да Винчи. Не забудьте о том, что автор должен быть упомянут на отдельной строке. # Platonova O. A. # 29.05.2016 print("Истина была единственной дочерью времени.\n\t\...
43.111111
209
0.775773
4e3f760bed76b655bdf6c28d45247b833f2f0db2
319
py
Python
frappe-bench/apps/erpnext/erpnext/patches/v5_0/is_group.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/v5_0/is_group.py
Semicheche/foa_frappe_docker
a186b65d5e807dd4caf049e8aeb3620a799c1225
[ "MIT" ]
null
null
null
frappe-bench/apps/erpnext/erpnext/patches/v5_0/is_group.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.reload_doctype("Account") frappe.reload_doctype("Cost Center") frappe.db.sql("update tabAccount set is_group = if(group_or_ledger='Group', 1, 0)") frappe.db.sql("update `tabCost Center` set is_group = if(group_or_ledger='Group', 1, 0)")
31.9
90
0.758621
ae3e6b56ca14287a054210c4def72bed4b5418c6
638
py
Python
Kapitel_2/_2_classmethods.py
Geralonx/Classes_Tutorial
9499db8159efce1e3c38975b66a9c649631c6727
[ "MIT" ]
1
2020-12-24T15:42:54.000Z
2020-12-24T15:42:54.000Z
Kapitel_2/_2_classmethods.py
Geralonx/Classes_Tutorial
9499db8159efce1e3c38975b66a9c649631c6727
[ "MIT" ]
null
null
null
Kapitel_2/_2_classmethods.py
Geralonx/Classes_Tutorial
9499db8159efce1e3c38975b66a9c649631c6727
[ "MIT" ]
null
null
null
# --- Deklaration einer Klasse mit Konstruktor und Factory/Class-Method als alternative Instanziierungsmöglichkeit --- # class Circle: def __init__(self, radius): self.radius = radius # --- Facorymethod, um eine Instanz der 'Cricle' Klasse mittels dem Durchmesse zu erstellen --- # @classmethod ...
27.73913
120
0.703762
ee0e435fca44bec4eaeb0484af61116ce2b6a586
1,606
py
Python
Curso_Python/Secao3-Python-Intermediario-Programacao-Procedural/56_dicionarios/dicionario.py
pedrohd21/Cursos-Feitos
b223aad83867bfa45ad161d133e33c2c200d42bd
[ "MIT" ]
null
null
null
Curso_Python/Secao3-Python-Intermediario-Programacao-Procedural/56_dicionarios/dicionario.py
pedrohd21/Cursos-Feitos
b223aad83867bfa45ad161d133e33c2c200d42bd
[ "MIT" ]
null
null
null
Curso_Python/Secao3-Python-Intermediario-Programacao-Procedural/56_dicionarios/dicionario.py
pedrohd21/Cursos-Feitos
b223aad83867bfa45ad161d133e33c2c200d42bd
[ "MIT" ]
null
null
null
""" Dicionários """ """ parte 1 dicionario = {1: 'Valor 1', 2: 'Valor 2', 3: 'Valor3'} dicionario['str'] = 'valor' dicionario['1'] = 'Agora existe' if dicionario.get('str') is not None: # Retorna um valor none, mas como existe nn retorna um valor None print(dicionario.get('str')) print(dicionario) del dicionario['...
27.220339
120
0.629514
c9e37eee7feaad158cc918f0c8d44eb747a75acf
4,114
py
Python
experiments/extract_arguments.py
habecker/transfer-gan
b935e69d0fa0d37ba80aab091ce59e1657eacb1e
[ "BSD-3-Clause" ]
null
null
null
experiments/extract_arguments.py
habecker/transfer-gan
b935e69d0fa0d37ba80aab091ce59e1657eacb1e
[ "BSD-3-Clause" ]
5
2021-03-19T14:21:08.000Z
2022-03-12T00:42:00.000Z
experiments/extract_arguments.py
habecker/transfer-gan
b935e69d0fa0d37ba80aab091ce59e1657eacb1e
[ "BSD-3-Clause" ]
null
null
null
import glob import re import yaml import os from collections import OrderedDict ignore_files = {'./train_classifier.sh'} options_set = set() options_possibilities = {} options_for_file = OrderedDict() experiments = [] train_regex = re.compile(r'^[ ]*python3? train\.py[ ]*(?P<options>.*)$') test_regex = re.compile(r'^...
34.571429
101
0.563928
11de5f6f23f811d80a89019be05c5475357fc7bb
8,067
py
Python
lib/SPDbCall.py
TechLabCommunity/SaintPeterTalent
eb80237de4d73f3a99e82e02edb714f5057bd559
[ "MIT" ]
1
2019-01-03T12:59:19.000Z
2019-01-03T12:59:19.000Z
lib/SPDbCall.py
TechLabCommunity/SaintPeterTalent
eb80237de4d73f3a99e82e02edb714f5057bd559
[ "MIT" ]
null
null
null
lib/SPDbCall.py
TechLabCommunity/SaintPeterTalent
eb80237de4d73f3a99e82e02edb714f5057bd559
[ "MIT" ]
null
null
null
from enum import IntEnum from lib.AbstractSQL import AbstractSQL class TypeEnter(IntEnum): NOTHING = 0, ENTER = 1, EXIT = 2 class TypeAlarmAction(IntEnum): NOTHING = 0, ACTIVATE = 1, DEACTIVATE = 2 class SPDbCall: @staticmethod def exists_access_code(access_code): query = Abs...
35.537445
107
0.621669
e10c2ef51435bb629627c237835b659150cabfe6
2,145
py
Python
bot/booking.py
kopytjuk/uni-unterkunft
c81664e0070f97f45baa6eaff6a71039a267fd37
[ "MIT" ]
null
null
null
bot/booking.py
kopytjuk/uni-unterkunft
c81664e0070f97f45baa6eaff6a71039a267fd37
[ "MIT" ]
null
null
null
bot/booking.py
kopytjuk/uni-unterkunft
c81664e0070f97f45baa6eaff6a71039a267fd37
[ "MIT" ]
null
null
null
import dotenv dotenv.load_dotenv() from datetime import datetime, date import argparse import logging import os from typing import Union import requests import shapely from pyproj import Transformer from flatdict import FlatDict import pandas as pd DT_FORMAT = "%Y-%m-%d" def get_cheapest_nearby_hotels(loc: Union[s...
28.986486
111
0.666667
61f6c12ca46613d73115b3bc502b0d10ecdc2982
405
py
Python
languages/python/exercises/concept/list_methods/list_methods.py
AlexLeSang/v3
3d35961a961b5a2129b1d42f1d118972d9665357
[ "MIT" ]
null
null
null
languages/python/exercises/concept/list_methods/list_methods.py
AlexLeSang/v3
3d35961a961b5a2129b1d42f1d118972d9665357
[ "MIT" ]
45
2020-01-24T17:04:52.000Z
2020-11-24T17:50:18.000Z
languages/python/exercises/concept/list_methods/list_methods.py
AlexLeSang/v3
3d35961a961b5a2129b1d42f1d118972d9665357
[ "MIT" ]
null
null
null
def add_me_to_the_queue(express_queue, normal_queue, ticket_type, person_name): pass def find_his_friend(queue, friend_name): pass def add_person_with_his_friends(queue, index, person_name): pass def remove_the_mean_person(queue, person_name): pass def how_many_dopplegangers(queue, person_name): ...
20.25
79
0.775309
c9148be425e76bc7a0d06155a23a2bc1cbc2459c
3,716
py
Python
src/aijack/collaborative/fedmd/api.py
luoshenseeker/AIJack
4e871a5b3beb4b7c976d38060d6956efcebf880d
[ "MIT" ]
1
2022-03-17T21:17:44.000Z
2022-03-17T21:17:44.000Z
src/aijack/collaborative/fedmd/api.py
luoshenseeker/AIJack
4e871a5b3beb4b7c976d38060d6956efcebf880d
[ "MIT" ]
null
null
null
src/aijack/collaborative/fedmd/api.py
luoshenseeker/AIJack
4e871a5b3beb4b7c976d38060d6956efcebf880d
[ "MIT" ]
1
2022-03-17T21:17:46.000Z
2022-03-17T21:17:46.000Z
import copy from ..core.api import BaseFLKnowledgeDistillationAPI class FedMDAPI(BaseFLKnowledgeDistillationAPI): def __init__( self, server, clients, public_dataloader, local_dataloaders, validation_dataloader, criterion, client_optimizers, ...
33.477477
88
0.569699
c97111e3f8b9a3d6d078bc3dd074e625d02ce72c
6,207
py
Python
frappe-bench/apps/erpnext/erpnext/regional/report/fichier_des_ecritures_comptables_[fec]/fichier_des_ecritures_comptables_[fec].py
Semicheche/foa_frappe_docker
a186b65d5e807dd4caf049e8aeb3620a799c1225
[ "MIT" ]
null
null
null
frappe-bench/apps/erpnext/erpnext/regional/report/fichier_des_ecritures_comptables_[fec]/fichier_des_ecritures_comptables_[fec].py
Semicheche/foa_frappe_docker
a186b65d5e807dd4caf049e8aeb3620a799c1225
[ "MIT" ]
null
null
null
frappe-bench/apps/erpnext/erpnext/regional/report/fichier_des_ecritures_comptables_[fec]/fichier_des_ecritures_comptables_[fec].py
Semicheche/foa_frappe_docker
a186b65d5e807dd4caf049e8aeb3620a799c1225
[ "MIT" ]
null
null
null
# Copyright (c) 2018, Frappe Technologies Pvt. Ltd. and contributors # For license information, please see license.txt from __future__ import unicode_literals import frappe from frappe.utils import format_datetime from frappe import _ def execute(filters=None): account_details = {} for acc in frappe.db.sql("""selec...
34.870787
159
0.688739
c2f719203b3a0529afd0b1b28d46936d6815d2db
2,753
py
Python
python_playground/data/LowRank.py
RapidsAtHKUST/SimRank
3a601b08f9a3c281e2b36b914e06aba3a3a36118
[ "MIT" ]
8
2020-04-14T23:17:00.000Z
2021-06-21T12:34:04.000Z
python_playground/data/LowRank.py
RapidsAtHKUST/SimRank
3a601b08f9a3c281e2b36b914e06aba3a3a36118
[ "MIT" ]
null
null
null
python_playground/data/LowRank.py
RapidsAtHKUST/SimRank
3a601b08f9a3c281e2b36b914e06aba3a3a36118
[ "MIT" ]
1
2021-01-17T16:26:50.000Z
2021-01-17T16:26:50.000Z
# the low-rank method for simrank # Fast computation of SimRank for static and dynamic information networks (EDBT'10) from memory_profiler import profile from simrank import * from utils import make_index_of_vec_n np.set_printoptions(precision=2) def preprocess(AT, k=5, IE=False, c=0.6): ''' AT: A.T, csr sp...
29.923913
83
0.614239
666c35295c51c3f212b7fc8179a29dbc8f1d7e70
777
py
Python
Python/Exercícios_Python/038_conversor_de_bases_numéricas.py
vdonoladev/aprendendo-programacao
83abbcd6701b2105903b28fd549738863418cfb8
[ "MIT" ]
null
null
null
Python/Exercícios_Python/038_conversor_de_bases_numéricas.py
vdonoladev/aprendendo-programacao
83abbcd6701b2105903b28fd549738863418cfb8
[ "MIT" ]
null
null
null
Python/Exercícios_Python/038_conversor_de_bases_numéricas.py
vdonoladev/aprendendo-programacao
83abbcd6701b2105903b28fd549738863418cfb8
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- """038 - Conversor de Bases Numéricas Automatically generated by Colaboratory. Original file is located at https://colab.research.google.com/drive/1pIfJpkGhz-bPEbuO2ea93R6Ba18s437l """ n = int(input('Digite um valor decimal: ')) escolha = int(input('Digite: \n- 1 para binário: \n- 2 para ...
40.894737
127
0.676963
dd538e9575b667e388101cfd07c63c814e56ae91
746
py
Python
prune_tree.py
YueYvetteHao/Sandbox
db2b8b0e751bfb7d86e7f2506fb81a75f8c3a3e5
[ "MIT" ]
null
null
null
prune_tree.py
YueYvetteHao/Sandbox
db2b8b0e751bfb7d86e7f2506fb81a75f8c3a3e5
[ "MIT" ]
null
null
null
prune_tree.py
YueYvetteHao/Sandbox
db2b8b0e751bfb7d86e7f2506fb81a75f8c3a3e5
[ "MIT" ]
null
null
null
#!/usr/bin/python import dendropy import sys treefile = str(sys.argv[1]) tree = dendropy.Tree.get(path=treefile, schema="newick") #print("Before:") #print(tree.as_string(schema='newick')) #print(tree.as_ascii_plot()) subspp = ["RRRR","PSEX", "PJEN", "PBIA", "PTET", "PQUA"] #, "PTET", "PQUA" taxons = [] for taxon in...
26.642857
124
0.715818
dd632ca1b8502767c1e572e2ad094813b01c037e
1,341
py
Python
src/onegov/org/models/publication.py
politbuero-kampagnen/onegov-cloud
20148bf321b71f617b64376fe7249b2b9b9c4aa9
[ "MIT" ]
null
null
null
src/onegov/org/models/publication.py
politbuero-kampagnen/onegov-cloud
20148bf321b71f617b64376fe7249b2b9b9c4aa9
[ "MIT" ]
null
null
null
src/onegov/org/models/publication.py
politbuero-kampagnen/onegov-cloud
20148bf321b71f617b64376fe7249b2b9b9c4aa9
[ "MIT" ]
null
null
null
import sedate from datetime import datetime from onegov.core.collection import GenericCollection from onegov.file import File from sqlalchemy import and_, text class PublicationCollection(GenericCollection): def __init__(self, session, year=None): super().__init__(session) self.year = year ...
27.9375
77
0.625652
c6b98708c364897c069ab80620efcd99afb5edcb
368
py
Python
source/pkgsrc/games/py-renpy/patches/patch-module_setup.py
Scottx86-64/dotfiles-1
51004b1e2b032664cce6b553d2052757c286087d
[ "Unlicense" ]
1
2021-11-20T22:46:39.000Z
2021-11-20T22:46:39.000Z
source/pkgsrc/games/py-renpy/patches/patch-module_setup.py
Scottx86-64/dotfiles-1
51004b1e2b032664cce6b553d2052757c286087d
[ "Unlicense" ]
null
null
null
source/pkgsrc/games/py-renpy/patches/patch-module_setup.py
Scottx86-64/dotfiles-1
51004b1e2b032664cce6b553d2052757c286087d
[ "Unlicense" ]
null
null
null
$NetBSD: patch-module_setup.py,v 1.2 2017/06/24 19:39:47 adam Exp $ * png from pkgsrc is libpng16.so --- module/setup.py.orig 2014-08-05 01:19:58.000000000 +0000 +++ module/setup.py @@ -75,7 +75,7 @@ include("libswscale/swscale.h") include("GL/glew.h") library("SDL") -library("png") +library("png16") library("av...
23
67
0.679348
c6c5ae95e75f590240d1fa37e17a600041652dd2
330
py
Python
___Python/Michael/p07_file_io_MA/m01_count_files.py
uvenil/PythonKurs201806
85afa9c9515f5dd8bec0c546f077d8cc39568fe8
[ "Apache-2.0" ]
null
null
null
___Python/Michael/p07_file_io_MA/m01_count_files.py
uvenil/PythonKurs201806
85afa9c9515f5dd8bec0c546f077d8cc39568fe8
[ "Apache-2.0" ]
null
null
null
___Python/Michael/p07_file_io_MA/m01_count_files.py
uvenil/PythonKurs201806
85afa9c9515f5dd8bec0c546f077d8cc39568fe8
[ "Apache-2.0" ]
null
null
null
from pathlib import Path # Anzahl Ordner inkl. Unterordner def count_dirs(path): subdirs = [subdir for subdir in path.iterdir() if subdir.is_dir()] return len(subdirs) path = Path("O:\Spielwiese") def alldirs(path): if len(subdirs(path)) == 0: return return subdirs(path) prin...
20.625
71
0.651515
05dcef9566df8c6588f858a036fd4fa4467a78bc
1,217
py
Python
Problems/Depth-First Search/medium/AllNodesDistanceKBT/all_nodes_distance_k_in_bt.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/AllNodesDistanceKBT/all_nodes_distance_k_in_bt.py
dolong2110/Algorithm-By-Problems-Python
31ecc7367aaabdd2b0ac0af7f63ca5796d70c730
[ "MIT" ]
null
null
null
Problems/Depth-First Search/medium/AllNodesDistanceKBT/all_nodes_distance_k_in_bt.py
dolong2110/Algorithm-By-Problems-Python
31ecc7367aaabdd2b0ac0af7f63ca5796d70c730
[ "MIT" ]
null
null
null
from typing import List # Definition for a binary tree node. class TreeNode: def __init__(self, x): self.val = x self.left = None self.right = None class Solution: def distanceK(self, root: TreeNode, target: TreeNode, k: int) -> List[int]: ans = [] self.left, self.righ...
25.893617
86
0.537387
af6ea748ade41afec09a7f0db0075d7bf098bcf6
448
py
Python
config.py
meerkat-code/meerkat_consul
983851b360f330ad258e15d45d98251e0fe21100
[ "MIT" ]
null
null
null
config.py
meerkat-code/meerkat_consul
983851b360f330ad258e15d45d98251e0fe21100
[ "MIT" ]
1
2018-07-18T16:36:12.000Z
2018-07-18T16:36:12.000Z
config.py
fjelltopp/meerkat_consul
983851b360f330ad258e15d45d98251e0fe21100
[ "MIT" ]
null
null
null
class Config(object): DEBUG = False TESTING = False PRODUCTION = False LOGGING_LEVEL = "ERROR" LOGGING_FORMAT = '%(asctime)s - %(levelname)-7s - %(module)s:%(filename)s:%(lineno)d - %(message)s' COUNTRY_LOCATION_ID = 1 class Production(Config): PRODUCTION = True class Development(Conf...
15.448276
103
0.645089
af801afc38b1483bab4022ddc1eca05c64fd7dee
247
py
Python
Verzweigungen/Einfach/u_einfach.py
DietrichPaul/Einstieg-in-Python
0d28402f962773274d85e6bb169ae631c91f66ce
[ "CC0-1.0" ]
null
null
null
Verzweigungen/Einfach/u_einfach.py
DietrichPaul/Einstieg-in-Python
0d28402f962773274d85e6bb169ae631c91f66ce
[ "CC0-1.0" ]
null
null
null
Verzweigungen/Einfach/u_einfach.py
DietrichPaul/Einstieg-in-Python
0d28402f962773274d85e6bb169ae631c91f66ce
[ "CC0-1.0" ]
null
null
null
# Eingabe print("Geben Sie Ihr Bruttogehalt in Euro ein:") brutto = float(input()) # Berechnung if brutto > 2500: steuer = brutto * 0.22 else: steuer = brutto * 0.18 # Ausgabe print("Es ergibt sich ein Steuerbetrag von", steuer, "Euro")
19
60
0.680162
a5b2e2336d105289cb8635838685c5ec230e2b9d
350
py
Python
config.py
ponyatov/ST
4aab2004608fe5f85366870c8387451f05451adc
[ "MIT" ]
null
null
null
config.py
ponyatov/ST
4aab2004608fe5f85366870c8387451f05451adc
[ "MIT" ]
null
null
null
config.py
ponyatov/ST
4aab2004608fe5f85366870c8387451f05451adc
[ "MIT" ]
null
null
null
import os # SECURITY WARNING: keep the secret key used in production secret! SECRET_KEY = b'\x80<C\x83\xf7\xb3Z\xfa\xedu,>\xbc\xec\xa1\xb1\r@i\x8b\x91)\xe7\x1f\xaat\xa6\xfb\x13\xea\x14\xa1\x10\xc4' # SECURITY WARNING: don't run with debug turned on in production! DEBUG = True HOST = os.getenv('HOST', '127.0.0.1') PO...
31.818182
120
0.714286
59e01f315e48991105e3e55d9a955fdadfdc784e
15,691
py
Python
Packs/Pcysys/Integrations/Pcysys/Pcysys.py
diCagri/content
c532c50b213e6dddb8ae6a378d6d09198e08fc9f
[ "MIT" ]
799
2016-08-02T06:43:14.000Z
2022-03-31T11:10:11.000Z
Packs/Pcysys/Integrations/Pcysys/Pcysys.py
diCagri/content
c532c50b213e6dddb8ae6a378d6d09198e08fc9f
[ "MIT" ]
9,317
2016-08-07T19:00:51.000Z
2022-03-31T21:56:04.000Z
Packs/Pcysys/Integrations/Pcysys/Pcysys.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 jwt import requests import csv import io import json from typing import List from enum import Enum # Disable insecure warnings requests.packages.urllib3.disable_warnings() HEADERS = {'Accept': 'application/jso...
40.968668
115
0.641132
758143c8edb9ac7caeb03ce2169a369f0c3f1c03
899
py
Python
codeit/algorithm/max_profit_memo.py
zeroam/TIL
43e3573be44c7f7aa4600ff8a34e99a65cbdc5d1
[ "MIT" ]
null
null
null
codeit/algorithm/max_profit_memo.py
zeroam/TIL
43e3573be44c7f7aa4600ff8a34e99a65cbdc5d1
[ "MIT" ]
null
null
null
codeit/algorithm/max_profit_memo.py
zeroam/TIL
43e3573be44c7f7aa4600ff8a34e99a65cbdc5d1
[ "MIT" ]
null
null
null
def max_profit_memo(price_list, count, cache): # base case if count in [0, 1]: return price_list[count] if count in cache: return cache[count] if count < len(price_list): profit = price_list[count] else: profit = 0 # recursive case for i in ...
25.685714
74
0.596218
dde4ccb40e6afb779d2bf1b372bce3d68a2e2d61
266
py
Python
Crashkurs TensorFlow/09_range.py
slogslog/Kurzgeschichten-in-CSharp
3918c4174220e558cdeeada0edac941811418b93
[ "Unlicense" ]
2
2019-03-15T20:48:34.000Z
2019-04-22T15:24:09.000Z
Crashkurs TensorFlow/09_range.py
slogslog/Coding-Kurzgeschichten
9b08237038147c6c348d4cf4c69567178e07dd1d
[ "Unlicense" ]
null
null
null
Crashkurs TensorFlow/09_range.py
slogslog/Coding-Kurzgeschichten
9b08237038147c6c348d4cf4c69567178e07dd1d
[ "Unlicense" ]
null
null
null
# Unterdrückt die AVX2 Warnung import os os.environ['TF_CPP_MIN_LOG_LEVEL']='2' import tensorflow as tf a = tf.range(1,21) print(a.numpy()) b = tf.range(10,0,-2) print(b.numpy()) c = tf.range(5., 13., 0.5) print(c.numpy()) d = tf.linspace(-2., 3., 20) print(d)
14.777778
38
0.650376
fb24e3d9d3f133d9100fe9d04185373d283d05ff
4,917
py
Python
packages/watchmen-storage/src/watchmen_storage/competitive_worker_id_generator.py
Indexical-Metrics-Measure-Advisory/watchmen
c54ec54d9f91034a38e51fd339ba66453d2c7a6d
[ "MIT" ]
null
null
null
packages/watchmen-storage/src/watchmen_storage/competitive_worker_id_generator.py
Indexical-Metrics-Measure-Advisory/watchmen
c54ec54d9f91034a38e51fd339ba66453d2c7a6d
[ "MIT" ]
null
null
null
packages/watchmen-storage/src/watchmen_storage/competitive_worker_id_generator.py
Indexical-Metrics-Measure-Advisory/watchmen
c54ec54d9f91034a38e51fd339ba66453d2c7a6d
[ "MIT" ]
null
null
null
from abc import abstractmethod from datetime import datetime from enum import Enum from logging import getLogger from os import getpid from random import randrange from socket import AF_INET, SOCK_DGRAM, socket from threading import Thread from typing import Callable, List, Optional from time import sleep from watchm...
26.435484
101
0.767541
fb39e81cc76189e1ff84b8f4859a0a5d79c71246
23,315
py
Python
Packs/PhishLabs/Integrations/PhishLabsIOC_DRP/PhishLabsIOC_DRP.py
diCagri/content
c532c50b213e6dddb8ae6a378d6d09198e08fc9f
[ "MIT" ]
799
2016-08-02T06:43:14.000Z
2022-03-31T11:10:11.000Z
Packs/PhishLabs/Integrations/PhishLabsIOC_DRP/PhishLabsIOC_DRP.py
diCagri/content
c532c50b213e6dddb8ae6a378d6d09198e08fc9f
[ "MIT" ]
9,317
2016-08-07T19:00:51.000Z
2022-03-31T21:56:04.000Z
Packs/PhishLabs/Integrations/PhishLabsIOC_DRP/PhishLabsIOC_DRP.py
diCagri/content
c532c50b213e6dddb8ae6a378d6d09198e08fc9f
[ "MIT" ]
1,297
2016-08-04T13:59:00.000Z
2022-03-31T23:43:06.000Z
""" IMPORTS """ # Std imports from datetime import datetime # 3-rd party imports from typing import Dict, Tuple, Union, Optional, List, Any, AnyStr import urllib3 # Local imports import demistomock as demisto from CommonServerPython import * from CommonServerUserPython import * """GLOBALS/PARAMS Attributes: INT...
41.119929
121
0.567532
34d7c7c5eb13220926df4c119b7410eecc7ea9c7
7,951
py
Python
MapMaker.py
Turidus/Minecraft-MapMaker
16e4015d03d67f04cfd247c11c9e3e2a5429b79f
[ "MIT" ]
1
2018-10-24T16:02:08.000Z
2018-10-24T16:02:08.000Z
MapMaker.py
Turidus/Minecraft-MapMaker
16e4015d03d67f04cfd247c11c9e3e2a5429b79f
[ "MIT" ]
2
2018-07-16T19:04:00.000Z
2018-07-29T11:43:53.000Z
MapMaker.py
Turidus/Minecraft-MapMaker
16e4015d03d67f04cfd247c11c9e3e2a5429b79f
[ "MIT" ]
null
null
null
""" Manger for the differnt calculations needed to provided the requestet data. See Readme for details. Can be used directly with a command line tool or with a GUI. Made by Turidus https://github.com/Turidus/Minecraft-MapMaker Copyright (c) 2018 Turidus Permission is hereby granted, free of charge, to any person obta...
38.97549
182
0.667337
1f4593ac5b700281a13ab944e7c95b90804f0e53
425
py
Python
doc/examples/using_jit.py
fluiddyn/transonic
a460e9f6d1139f79b668cb3306d1e8a7e190b72d
[ "BSD-3-Clause" ]
88
2019-01-08T16:39:08.000Z
2022-02-06T14:19:23.000Z
doc/examples/using_jit.py
fluiddyn/transonic
a460e9f6d1139f79b668cb3306d1e8a7e190b72d
[ "BSD-3-Clause" ]
13
2019-06-20T15:53:10.000Z
2021-02-09T11:03:29.000Z
doc/examples/using_jit.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 jit def func0(a, b): return a + b @jit def func1(a: int, b: int): print("b", b) return np.exp(a) * b * func0(a, b) if __name__ == "__main__": from time import sleep a = b = np.zeros([2, 3]) for i in range(20): print(f"{i}, call with arra...
15.178571
40
0.531765
23bcd4ffaefa3e89e34bce80ced4b456a28dde6b
445
py
Python
year_3/databases_sem1/lab3/api/migrations/0003_auto_20171226_2034.py
honchardev/KPI
f8425681857c02a67127ffb05c0af0563a8473e1
[ "MIT" ]
null
null
null
year_3/databases_sem1/lab3/api/migrations/0003_auto_20171226_2034.py
honchardev/KPI
f8425681857c02a67127ffb05c0af0563a8473e1
[ "MIT" ]
21
2020-03-24T16:26:04.000Z
2022-02-18T15:56:16.000Z
year_3/databases_sem1/lab3/api/migrations/0003_auto_20171226_2034.py
honchardev/KPI
f8425681857c02a67127ffb05c0af0563a8473e1
[ "MIT" ]
null
null
null
# Generated by Django 2.0 on 2017-12-26 17:34 from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('api', '0002_payroll'), ] operations = [ migrations.AlterField( model_name='payment', name='method', field=...
23.421053
125
0.593258
f1d6c9f1c379c7963cc254399f3d882b86e0a5b5
2,153
py
Python
tests/test_rechnungsposition.py
bo4e/BO4E-python
28b12f853c8a496d14b133759b7aa2d6661f79a0
[ "MIT" ]
1
2022-03-02T12:49:44.000Z
2022-03-02T12:49:44.000Z
tests/test_rechnungsposition.py
bo4e/BO4E-python
28b12f853c8a496d14b133759b7aa2d6661f79a0
[ "MIT" ]
21
2022-02-04T07:38:46.000Z
2022-03-28T14:01:53.000Z
tests/test_rechnungsposition.py
bo4e/BO4E-python
28b12f853c8a496d14b133759b7aa2d6661f79a0
[ "MIT" ]
null
null
null
from datetime import datetime, timezone import pytest # type:ignore[import] from bo4e.com.rechnungsposition import Rechnungsposition, RechnungspositionSchema from bo4e.enum.artikelid import ArtikelId from bo4e.enum.bdewartikelnummer import BDEWArtikelnummer from bo4e.enum.zeiteinheit import Zeiteinheit from tests.se...
42.215686
92
0.665583
7b0257e77974e2bc48d09f8e4dd6b072d78240ee
455
py
Python
Programming Languages/Python/Theory/100_Python_Challenges/Section_2_String/38. remove all occurrences of a given character from an input string.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_2_String/38. remove all occurrences of a given character from an input string.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_2_String/38. remove all occurrences of a given character from an input string.py
Sid-1164/Resources
3987dcaeddc8825f9bc79609ff26094282b8ece1
[ "MIT" ]
38
2022-01-12T11:56:16.000Z
2022-03-23T10:07:52.000Z
""" Write a function that accepts a string and a character. The function should remove all occurrences of the given character from the input string and return the string. Example: input_string = 'technique' char = 'e' Expected output = 'tchniqu' """ def remove_char(input_string, char): new_str = "" for i ...
20.681818
110
0.635165
19a5557b63c35974cdea0c529a2c4b4e7ccc56e9
2,319
py
Python
research/cv/SRGAN/preprocess.py
leelige/mindspore
5199e05ba3888963473f2b07da3f7bca5b9ef6dc
[ "Apache-2.0" ]
77
2021-10-15T08:32:37.000Z
2022-03-30T13:09:11.000Z
research/cv/SRGAN/preprocess.py
leelige/mindspore
5199e05ba3888963473f2b07da3f7bca5b9ef6dc
[ "Apache-2.0" ]
3
2021-10-30T14:44:57.000Z
2022-02-14T06:57:57.000Z
research/cv/SRGAN/preprocess.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.982759
99
0.663217
271670ccee1d88305179d71e574ad1cc94902fd0
1,090
py
Python
nz_crawl_demo/day5/demo2.py
gaohj/nzflask_bbs
36a94c380b78241ed5d1e07edab9618c3e8d477b
[ "Apache-2.0" ]
null
null
null
nz_crawl_demo/day5/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/day5/demo2.py
gaohj/nzflask_bbs
36a94c380b78241ed5d1e07edab9618c3e8d477b
[ "Apache-2.0" ]
2
2020-02-18T01:54:55.000Z
2020-02-21T11:36:28.000Z
from selenium import webdriver from lxml import etree import time from selenium.webdriver.common.by import By driver = webdriver.Chrome() # driver.get("https://www.zhihu.com/signin?next=%2F") # driver.get("https://www.baidu.com/") driver.get("https://v3.bootcss.com/examples/signin/") html = driver.page_source # html =...
35.16129
83
0.738532
2786572b449ddc1407f3069c88529370b47fc8e0
6,737
py
Python
spider/get_HKProtest.py
iecasszyjy/tweet_search-master
e4978521a39964c22ae46bf35d6ff17710e8e6c6
[ "MIT" ]
null
null
null
spider/get_HKProtest.py
iecasszyjy/tweet_search-master
e4978521a39964c22ae46bf35d6ff17710e8e6c6
[ "MIT" ]
2
2021-03-31T18:54:16.000Z
2021-12-13T19:49:08.000Z
spider/get_HKProtest.py
iecasszyjy/tweet_search-master
e4978521a39964c22ae46bf35d6ff17710e8e6c6
[ "MIT" ]
null
null
null
# -*- coding:utf-8 -*- # '2019香港'事件获取 import pymongo from pymongo import InsertOne from pymongo.errors import BulkWriteError import random from pprint import pprint from tqdm import tqdm client = pymongo.MongoClient('mongodb://3.220.111.222:27017/') client.admin.authenticate("aircas", "aircas@2018", mechanism='SCRAM-...
81.168675
2,232
0.659641
9a2534954721c24643d91d34abc0efe06b17e9c4
3,015
py
Python
ts2panda/scripts/run.py
openharmony-sig-ci/ark_ts2abc
1d6fac6447760fce2e81c3738ac735b4424eed31
[ "Apache-2.0" ]
null
null
null
ts2panda/scripts/run.py
openharmony-sig-ci/ark_ts2abc
1d6fac6447760fce2e81c3738ac735b4424eed31
[ "Apache-2.0" ]
null
null
null
ts2panda/scripts/run.py
openharmony-sig-ci/ark_ts2abc
1d6fac6447760fce2e81c3738ac735b4424eed31
[ "Apache-2.0" ]
2
2021-09-13T11:32:30.000Z
2021-09-13T12:12:06.000Z
#!/usr/bin/env python3 # coding: utf-8 """ Copyright (c) 2021 Huawei Device 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...
30.765306
73
0.643781
9a6ea1ca15de37cc3b3d5f33f269730b46239e7a
7,983
py
Python
mongo_cache/__init__.py
pricez/werkzeug_cache_mongodb
039a7cf6f70ac0a7f36ef3885b1012e014e638c6
[ "MIT" ]
null
null
null
mongo_cache/__init__.py
pricez/werkzeug_cache_mongodb
039a7cf6f70ac0a7f36ef3885b1012e014e638c6
[ "MIT" ]
5
2015-07-08T00:58:13.000Z
2015-07-20T21:34:38.000Z
mongo_cache/__init__.py
pricez/werkzeug_cache_mongodb
039a7cf6f70ac0a7f36ef3885b1012e014e638c6
[ "MIT" ]
null
null
null
# coding: UTF-8 import pickle from werkzeug.contrib.cache import BaseCache from pymongo import MongoClient from pymongo.errors import PyMongoError from time import time from bson.binary import Binary class MongoCache(BaseCache): """Cache that uses MongoDB to store data. :param default_timeout: the default t...
35.638393
91
0.57635
ef72fcac0c9daefe02a1acaf326730e174aa3246
1,318
py
Python
src/bo4e/com/betrag.py
bo4e/BO4E-python
28b12f853c8a496d14b133759b7aa2d6661f79a0
[ "MIT" ]
1
2022-03-02T12:49:44.000Z
2022-03-02T12:49:44.000Z
src/bo4e/com/betrag.py
bo4e/BO4E-python
28b12f853c8a496d14b133759b7aa2d6661f79a0
[ "MIT" ]
21
2022-02-04T07:38:46.000Z
2022-03-28T14:01:53.000Z
src/bo4e/com/betrag.py
bo4e/BO4E-python
28b12f853c8a496d14b133759b7aa2d6661f79a0
[ "MIT" ]
null
null
null
""" Contains Betrag class and corresponding marshmallow schema for de-/serialization """ from decimal import Decimal import attr from marshmallow import fields from marshmallow_enum import EnumField # type:ignore[import] from bo4e.com.com import COM, COMSchema from bo4e.enum.waehrungscode import Waehrungscode # p...
29.954545
167
0.743551
ef5c7f42535bdc7001316bd2f0ff713f7ae21b7e
38,735
py
Python
SLIX/toolbox.py
oliviaguest/SLIX
2f19382c650267d0a76456c796cd3e0afe04d880
[ "MIT" ]
null
null
null
SLIX/toolbox.py
oliviaguest/SLIX
2f19382c650267d0a76456c796cd3e0afe04d880
[ "MIT" ]
null
null
null
SLIX/toolbox.py
oliviaguest/SLIX
2f19382c650267d0a76456c796cd3e0afe04d880
[ "MIT" ]
null
null
null
import multiprocessing import nibabel import numpy import pymp import tifffile import tqdm import time from scipy.signal import peak_widths, savgol_filter, find_peaks, peak_prominences pymp.config.nested = True # DEFAULT PARAMETERS BACKGROUND_COLOR = -1 CPU_COUNT = min(16, multiprocessing.cpu_count()) MAX_DISTANCE_F...
47.065614
266
0.685865
322c3cadec788710b2de57173c1bc8e648bd6fc7
3,731
py
Python
IdeaProjects/PandasProj/PandasCourse2.py
sinomiko/project
00fadb0033645f103692f5b06c861939a9d4aa0e
[ "BSD-3-Clause" ]
1
2018-12-30T14:07:42.000Z
2018-12-30T14:07:42.000Z
IdeaProjects/PandasProj/PandasCourse2.py
sinomiko/project
00fadb0033645f103692f5b06c861939a9d4aa0e
[ "BSD-3-Clause" ]
null
null
null
IdeaProjects/PandasProj/PandasCourse2.py
sinomiko/project
00fadb0033645f103692f5b06c861939a9d4aa0e
[ "BSD-3-Clause" ]
null
null
null
# encoding: utf-8 import pandas as pd import numpy as np # 二、Pandas 常见的基本方法 # # 2.1 数据读取与存储 # # Pandas 支持大部分常见数据文件读取与存储。一般清楚下,读取文件的方法以 pd.read_ 开头,而写入文件的方法以 pd.to_ 开头。详细的表格如下。 # # 此处输入图片的描述 # # 拿刚刚下载好的数据文件举例,如果没有下载,请看 1.5 小节。 df = pd.read_csv("los_census.csv") #读取 csv 文件 print df # 可以看到,文件已经读取出来了。由于列数太多,所以分段显示了。输出...
22.612121
128
0.691236
0889fa2aa3e3f7524a17275a5e401ed854c8c3f3
592
py
Python
Programming Languages/Python/Theory/100_Python_Exercises/Exercises/Exercise 82/82.py
jaswinder9051998/Resources
fd468af37bf24ca57555d153ee64693c018e822e
[ "MIT" ]
101
2021-12-20T11:57:11.000Z
2022-03-23T09:49:13.000Z
Programming Languages/Python/Theory/100_Python_Exercises/Exercises/Exercise 82/82.py
jaswinder9051998/Resources
fd468af37bf24ca57555d153ee64693c018e822e
[ "MIT" ]
4
2022-01-12T11:55:56.000Z
2022-02-12T04:53:33.000Z
Programming Languages/Python/Theory/100_Python_Exercises/Exercises/Exercise 82/82.py
jaswinder9051998/Resources
fd468af37bf24ca57555d153ee64693c018e822e
[ "MIT" ]
38
2022-01-12T11:56:16.000Z
2022-03-23T10:07:52.000Z
#Use Python to calculate the distance (in AU units) between Jupiter and Sun on January 1, 1230. #A: I didn't know this so I did some internet research and reveal that ephem is used for astronomical clculations. #The ephem library was installed with pip, and for Windows a precompiled library from http://www.lfd.uci.edu/...
49.333333
159
0.793919
08f612cde2c2fa73d6466afe8e1bd9db483c0d2f
8,139
py
Python
hihope_neptune-oh_hid/00_src/v0.1/third_party/LVM2/test/dbus/testlib.py
dawmlight/vendor_oh_fun
bc9fb50920f06cd4c27399f60076f5793043c77d
[ "Apache-2.0" ]
1
2022-02-15T08:51:55.000Z
2022-02-15T08:51:55.000Z
hihope_neptune-oh_hid/00_src/v0.3/third_party/LVM2/test/dbus/testlib.py
dawmlight/vendor_oh_fun
bc9fb50920f06cd4c27399f60076f5793043c77d
[ "Apache-2.0" ]
null
null
null
hihope_neptune-oh_hid/00_src/v0.3/third_party/LVM2/test/dbus/testlib.py
dawmlight/vendor_oh_fun
bc9fb50920f06cd4c27399f60076f5793043c77d
[ "Apache-2.0" ]
null
null
null
#!/usr/bin/python3 # Copyright (C) 2015-2016 Red Hat, Inc. All rights reserved. # # This copyrighted material is made available to anyone wishing to use, # modify, copy, or redistribute it subject to the terms and conditions # of the GNU General Public License v.2. # # You should have received a copy of the GNU Genera...
27.220736
77
0.675513
eb014668e291f4c33e5d7b62d8f19a18367dba12
921
py
Python
Algorithms/2_Implementation/62.py
abphilip-codes/Hackerrank_DSA
bb9e233d9d45c5b14c138830602695ad4113fba4
[ "MIT" ]
1
2021-11-25T13:39:30.000Z
2021-11-25T13:39:30.000Z
Algorithms/2_Implementation/62.py
abphilip-codes/Hackerrank_DSA
bb9e233d9d45c5b14c138830602695ad4113fba4
[ "MIT" ]
null
null
null
Algorithms/2_Implementation/62.py
abphilip-codes/Hackerrank_DSA
bb9e233d9d45c5b14c138830602695ad4113fba4
[ "MIT" ]
null
null
null
# https://www.hackerrank.com/challenges/3d-surface-area/problem #!/bin/python3 import math import os import random import re import sys # # Complete the 'surfaceArea' function below. # # The function is expected to return an INTEGER. # The function accepts 2D_INTEGER_ARRAY A as parameter. # def surfaceArea(A): ...
22.463415
110
0.618893
debfc54ae8cddc984ade037ca457a6cafe80a638
2,648
py
Python
test/test_npu/test_network_ops/test_confusion_transpose_backward.py
Ascend/pytorch
39849cf72dafe8d2fb68bd1679d8fd54ad60fcfc
[ "BSD-3-Clause" ]
1
2021-12-02T03:07:35.000Z
2021-12-02T03:07:35.000Z
test/test_npu/test_network_ops/test_confusion_transpose_backward.py
Ascend/pytorch
39849cf72dafe8d2fb68bd1679d8fd54ad60fcfc
[ "BSD-3-Clause" ]
1
2021-11-12T07:23:03.000Z
2021-11-12T08:28:13.000Z
test/test_npu/test_network_ops/test_confusion_transpose_backward.py
Ascend/pytorch
39849cf72dafe8d2fb68bd1679d8fd54ad60fcfc
[ "BSD-3-Clause" ]
null
null
null
# Copyright (c) 2020 Huawei Technologies Co., Ltd # Copyright (c) 2019, Facebook CORPORATION. # All rights reserved. # # Licensed under the BSD 3-Clause License (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # https://opensource.org/licen...
44.133333
93
0.672961
def32a8fceaa7d1439b301e7160c0245a2e3ec89
1,786
py
Python
x/fetch/main.py
miku/lc-extra
afeb3cb5f532069be17c54d6508aa7c0c8373c2a
[ "MIT" ]
null
null
null
x/fetch/main.py
miku/lc-extra
afeb3cb5f532069be17c54d6508aa7c0c8373c2a
[ "MIT" ]
null
null
null
x/fetch/main.py
miku/lc-extra
afeb3cb5f532069be17c54d6508aa7c0c8373c2a
[ "MIT" ]
1
2020-02-04T08:09:01.000Z
2020-02-04T08:09:01.000Z
#!/usr/bin/env python # # https://sigel.staatsbibliothek-berlin.de/api/hydra/?q=* # # { # "@context": "https://sigel.staatsbibliothek-berlin.de/typo3conf/ext/zdb_json_api/Resources/Public/context.jsonld", # "id": "https://sigel.staatsbibliothek-berlin.de/api/hydra/?q=%2A", # "type": "Collection", # ...
25.15493
122
0.583987
9d5efb9dc24f0c0de4631e494d44ffebde7322d1
2,423
py
Python
jumeaux/commands/server/main.py
ihatov08/jumeaux
7d983474df4b6dcfa57ea1a66901fbc99ebababa
[ "MIT" ]
11
2017-10-02T01:29:12.000Z
2022-03-31T08:37:22.000Z
jumeaux/commands/server/main.py
ihatov08/jumeaux
7d983474df4b6dcfa57ea1a66901fbc99ebababa
[ "MIT" ]
79
2017-07-16T14:47:17.000Z
2022-03-31T08:49:14.000Z
jumeaux/commands/server/main.py
ihatov08/jumeaux
7d983474df4b6dcfa57ea1a66901fbc99ebababa
[ "MIT" ]
2
2019-01-28T06:11:58.000Z
2021-01-25T07:21:21.000Z
"""Boot mock API server Usage: {cli} [--port <port>] [-v|-vv|-vvv] {cli} (-h | --help) Options: --port <port> Running port [default: 8000] -v Logger level (`-v` or `-vv` or `-vvv`) -h --help Show this screen. """ import json import socketserver i...
30.2875
101
0.57078
261d2c174d707e9450cd0b7fd3995fbb4fec6e28
112
py
Python
scripts/hello_world_Oliver.py
breezage/Hacktoberfest-1
6f6d52248c79c0e72fd13b599500318fce3f9ab0
[ "MIT" ]
null
null
null
scripts/hello_world_Oliver.py
breezage/Hacktoberfest-1
6f6d52248c79c0e72fd13b599500318fce3f9ab0
[ "MIT" ]
null
null
null
scripts/hello_world_Oliver.py
breezage/Hacktoberfest-1
6f6d52248c79c0e72fd13b599500318fce3f9ab0
[ "MIT" ]
1
2019-10-24T06:45:21.000Z
2019-10-24T06:45:21.000Z
// LANGUAGE: Python // AUTHOR: Justin Oliver // GITHUB: https://github.com/justinoliver print('Hello, World!')
18.666667
42
0.705357
13ffeb5f50c02edce4a3a5eacd3e988666c5e7f9
1,457
py
Python
tag_generator.py
5nizza/5nizza.github.io
234cb066164648715f5440be29ff55507b8d2999
[ "CC-BY-3.0" ]
null
null
null
tag_generator.py
5nizza/5nizza.github.io
234cb066164648715f5440be29ff55507b8d2999
[ "CC-BY-3.0" ]
null
null
null
tag_generator.py
5nizza/5nizza.github.io
234cb066164648715f5440be29ff55507b8d2999
[ "CC-BY-3.0" ]
null
null
null
#!/usr/bin/env python """ This script creates tags for jekyll blog. Source: Inspired by http://longqian.me/2017/02/09/github-jekyll-tag/ """ import glob import os post_dir = '_posts/' tag_dir = 'tag/' file_names = glob.glob(post_dir + '**/*.md', recursive=True) tags = set() for file in file_names: f = open(fil...
26.981481
109
0.540151
26e766c55c5afa429c8e1e08831eac89a2455913
958
py
Python
Interview Preparation Kits/Interview Preparation Kit/String Manipulation/Special String Again/special_string_count.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/String Manipulation/Special String Again/special_string_count.py
xuedong/hacker-rank
ce8a60f80c2c6935b427f9409d7e826ee0d26a89
[ "MIT" ]
null
null
null
Interview Preparation Kits/Interview Preparation Kit/String Manipulation/Special String Again/special_string_count.py
xuedong/hacker-rank
ce8a60f80c2c6935b427f9409d7e826ee0d26a89
[ "MIT" ]
null
null
null
#!/bin/python3 import math import os import random import re import sys # Complete the substrCount function below. def substrCount(n, s): counts = [] current = None count = 0 ans = 0 for i in range(n): if s[i] == current: count += 1 else: if current is ...
19.16
66
0.516701
f87081fefdd7a7c218bb1c70ed69788ca2e01c52
3,942
py
Python
train.py
PMingEli/FDSR
73563b5e148647fff2712602b1fc8720b8739589
[ "MIT" ]
null
null
null
train.py
PMingEli/FDSR
73563b5e148647fff2712602b1fc8720b8739589
[ "MIT" ]
null
null
null
train.py
PMingEli/FDSR
73563b5e148647fff2712602b1fc8720b8739589
[ "MIT" ]
null
null
null
import os os.environ["CUDA_VISIBLE_DEVICES"] = "0" import torch import numpy as np import cv2 import argparse from models import * from nyu_dataloader import * from torch.utils.data import Dataset, DataLoader from PIL import Image from torchvision import transforms, utils import torch.optim as optim import torch.o...
32.578512
109
0.659056
3e19cc404d78a16c21bc9cdc7262fa7acc665fbb
2,269
py
Python
3_DeepLearning-CNNs/03_CNN_MNIST_Classification/1-CNN_MNIST_Model.py
felixdittrich92/DeepLearning-tensorflow-keras
2880d8ed28ba87f28851affa92b6fa99d2e47be9
[ "Apache-2.0" ]
null
null
null
3_DeepLearning-CNNs/03_CNN_MNIST_Classification/1-CNN_MNIST_Model.py
felixdittrich92/DeepLearning-tensorflow-keras
2880d8ed28ba87f28851affa92b6fa99d2e47be9
[ "Apache-2.0" ]
null
null
null
3_DeepLearning-CNNs/03_CNN_MNIST_Classification/1-CNN_MNIST_Model.py
felixdittrich92/DeepLearning-tensorflow-keras
2880d8ed28ba87f28851affa92b6fa99d2e47be9
[ "Apache-2.0" ]
null
null
null
import os import numpy as np from tensorflow.keras.datasets import mnist from tensorflow.keras.utils import to_categorical from tensorflow.keras.layers import * from tensorflow.keras.activations import * from tensorflow.keras.models import * from tensorflow.keras.optimizers import * from tensorflow.keras.initializers...
25.494382
91
0.749229
3985796a0bec60a952235752d6d89eea89e17ace
11,917
py
Python
src/onegov/directory/migration.py
politbuero-kampagnen/onegov-cloud
20148bf321b71f617b64376fe7249b2b9b9c4aa9
[ "MIT" ]
null
null
null
src/onegov/directory/migration.py
politbuero-kampagnen/onegov-cloud
20148bf321b71f617b64376fe7249b2b9b9c4aa9
[ "MIT" ]
null
null
null
src/onegov/directory/migration.py
politbuero-kampagnen/onegov-cloud
20148bf321b71f617b64376fe7249b2b9b9c4aa9
[ "MIT" ]
null
null
null
from onegov.directory.models.directory_entry import DirectoryEntry from onegov.form import as_internal_id from onegov.form import flatten_fieldsets from onegov.form import parse_form from onegov.form import parse_formcode from sqlalchemy.orm import object_session, joinedload, undefer from sqlalchemy.orm.attributes impo...
32.829201
79
0.619619
39a67bb7385d264d8d2a6627d7b47e4e5048a380
859
py
Python
Backtracking/GenerateParanthesis.py
dileeppandey/hello-interview
78f6cf4e2da4106fd07f4bd86247026396075c69
[ "MIT" ]
null
null
null
Backtracking/GenerateParanthesis.py
dileeppandey/hello-interview
78f6cf4e2da4106fd07f4bd86247026396075c69
[ "MIT" ]
null
null
null
Backtracking/GenerateParanthesis.py
dileeppandey/hello-interview
78f6cf4e2da4106fd07f4bd86247026396075c69
[ "MIT" ]
1
2020-02-12T16:57:46.000Z
2020-02-12T16:57:46.000Z
""" Given n pairs of parentheses, write a function to generate all combinations of well-formed parentheses. """ class Solution(object): def generateParanthesisHelper(self, left, right, current, result, n): if right == 0: result.append(current) if left > 0: self.generatePara...
28.633333
79
0.576251
8a2afa8b1aef55b0683647413167ec45f9dfffd7
806
py
Python
setup.py
FrieAT/MD_CompressedWavelet
82bd10edd611485cd5f0b81da744e07a3b7c98eb
[ "MIT" ]
2
2020-03-28T11:50:45.000Z
2020-12-08T13:36:26.000Z
setup.py
FrieAT/MD_CompressedWavelet
82bd10edd611485cd5f0b81da744e07a3b7c98eb
[ "MIT" ]
2
2020-04-20T11:12:59.000Z
2020-05-11T05:37:36.000Z
setup.py
FrieAT/MD_CompressedWavelet
82bd10edd611485cd5f0b81da744e07a3b7c98eb
[ "MIT" ]
null
null
null
import os from setuptools import setup # Utility function to read the README file. # Used for the long_description. It's nice, because now 1) we have a top level # README file and 2) it's easier to type in the README file than to put a raw # string in below ... def read(fname): return open(os.path.join(os.path.di...
29.851852
79
0.630273
8a6114b61e2c65ee0b7fd099bedb0a958a8541ac
8,478
py
Python
Packs/UnifiVideoNVR/Integrations/UnifiVideo/UnifiVideo.py
diCagri/content
c532c50b213e6dddb8ae6a378d6d09198e08fc9f
[ "MIT" ]
799
2016-08-02T06:43:14.000Z
2022-03-31T11:10:11.000Z
Packs/UnifiVideoNVR/Integrations/UnifiVideo/UnifiVideo.py
diCagri/content
c532c50b213e6dddb8ae6a378d6d09198e08fc9f
[ "MIT" ]
9,317
2016-08-07T19:00:51.000Z
2022-03-31T21:56:04.000Z
Packs/UnifiVideoNVR/Integrations/UnifiVideo/UnifiVideo.py
diCagri/content
c532c50b213e6dddb8ae6a378d6d09198e08fc9f
[ "MIT" ]
1,297
2016-08-04T13:59:00.000Z
2022-03-31T23:43:06.000Z
import cv2 import demistomock as demisto # noqa: F401 from CommonServerPython import * # noqa: F401 from unifi_video import UnifiVideoAPI import dateparser import json demisto_format = '%Y-%m-%dT%H:%M:%SZ' params = demisto.params() args = demisto.args() api_key = params.get('api_key') address = params.get('addr') po...
41.558824
128
0.647087
0a5f60eefe99ceb4ed28a5c98f6f2dedba8d805f
455
py
Python
118-pascals-triangle/118-pascals-triangle.py
hyeseonko/LeetCode
48dfc93f1638e13041d8ce1420517a886abbdc77
[ "MIT" ]
2
2021-12-05T14:29:06.000Z
2022-01-01T05:46:13.000Z
pascals-triangle/pascals-triangle.py
hyeseonko/LeetCode
48dfc93f1638e13041d8ce1420517a886abbdc77
[ "MIT" ]
null
null
null
pascals-triangle/pascals-triangle.py
hyeseonko/LeetCode
48dfc93f1638e13041d8ce1420517a886abbdc77
[ "MIT" ]
null
null
null
class Solution: def generate(self, numRows: int) -> List[List[int]]: if numRows==1: return [[1]] else: output=[[1], [1,1]] for i in range(numRows-2): dp=[1] for idx in range(len(output[-1])-1): dp.append(output[-...
35
64
0.415385
6a61ccfc3516cfd051605ca670e7b43162efd089
4,111
py
Python
exercises/networking_selfpaced/networking-workshop/collections/ansible_collections/community/general/plugins/modules/ipa_config.py
tr3ck3r/linklight
5060f624c235ecf46cb62cefcc6bddc6bf8ca3e7
[ "MIT" ]
null
null
null
exercises/networking_selfpaced/networking-workshop/collections/ansible_collections/community/general/plugins/modules/ipa_config.py
tr3ck3r/linklight
5060f624c235ecf46cb62cefcc6bddc6bf8ca3e7
[ "MIT" ]
null
null
null
exercises/networking_selfpaced/networking-workshop/collections/ansible_collections/community/general/plugins/modules/ipa_config.py
tr3ck3r/linklight
5060f624c235ecf46cb62cefcc6bddc6bf8ca3e7
[ "MIT" ]
null
null
null
#!/usr/bin/python # -*- coding: utf-8 -*- # Copyright: (c) 2018, Fran Fitzpatrick <francis.x.fitzpatrick@gmail.com> # GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) from __future__ import absolute_import, division, print_function __metaclass__ = type ANSIBLE_METADATA = {'me...
28.748252
103
0.705911
7c19d60f2d7db293ba8e9b27b5522bb04175668d
324
py
Python
Python/Courses/Python-Tutorials.Telusko/01.Object-Oriented-Programming/15.03-Constructor-Inheritance.py
shihab4t/Books-Code
b637b6b2ad42e11faf87d29047311160fe3b2490
[ "Unlicense" ]
null
null
null
Python/Courses/Python-Tutorials.Telusko/01.Object-Oriented-Programming/15.03-Constructor-Inheritance.py
shihab4t/Books-Code
b637b6b2ad42e11faf87d29047311160fe3b2490
[ "Unlicense" ]
null
null
null
Python/Courses/Python-Tutorials.Telusko/01.Object-Oriented-Programming/15.03-Constructor-Inheritance.py
shihab4t/Books-Code
b637b6b2ad42e11faf87d29047311160fe3b2490
[ "Unlicense" ]
null
null
null
class A: def __init__(self): print("At A init") def feature1(self): print("Feature 1 working") def feature2(self): print("Feature 2 working") class B(A): def feature3(self): print("Feature 3 working") def feature4(self): print("Feature 4 working") b1 = ...
15.428571
34
0.564815
7c3b09cd1be045ceff75c8e2d57e18eea020fc59
872
py
Python
python/oneflow/compatible/single_client/unittest/__init__.py
wangyuyue/oneflow
0a71c22fe8355392acc8dc0e301589faee4c4832
[ "Apache-2.0" ]
3,285
2020-07-31T05:51:22.000Z
2022-03-31T15:20:16.000Z
python/oneflow/compatible/single_client/unittest/__init__.py
wangyuyue/oneflow
0a71c22fe8355392acc8dc0e301589faee4c4832
[ "Apache-2.0" ]
2,417
2020-07-31T06:28:58.000Z
2022-03-31T23:04:14.000Z
python/oneflow/compatible/single_client/unittest/__init__.py
wangyuyue/oneflow
0a71c22fe8355392acc8dc0e301589faee4c4832
[ "Apache-2.0" ]
520
2020-07-31T05:52:42.000Z
2022-03-29T02:38:11.000Z
""" Copyright 2020 The OneFlow Authors. All rights reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agr...
30.068966
72
0.772936
7c58ba4aebffcc1fa56edd7c43d697cbbf88678c
930
py
Python
python/en/_matplotlib/gallery/text_labels_and_annotations/composing_custom_legends.py
aimldl/coding
70ddbfaa454ab92fd072ee8dc614ecc330b34a70
[ "MIT" ]
null
null
null
python/en/_matplotlib/gallery/text_labels_and_annotations/composing_custom_legends.py
aimldl/coding
70ddbfaa454ab92fd072ee8dc614ecc330b34a70
[ "MIT" ]
null
null
null
python/en/_matplotlib/gallery/text_labels_and_annotations/composing_custom_legends.py
aimldl/coding
70ddbfaa454ab92fd072ee8dc614ecc330b34a70
[ "MIT" ]
null
null
null
#!/usr/bin/env python3 # -*- coding: utf-8 -*- """ text_labels_and_annotations/composing_custom_legends.py Matplotlib > Gallery > Text, labels and annotations> Composing Custom Legends https://matplotlib.org/3.1.1/gallery/text_labels_and_annotations/custom_legends.html#sphx-glr-gallery-text-labels-and-annotations-custo...
34.444444
147
0.762366
6b05a198af42a360d93fe96744515315528adc10
3,803
py
Python
Python/Buch_ATBS/Teil_1/Kapitel_06_Stringbearbeitung/10_molare_masse.py
Apop85/Scripts
1d8dad316c55e1f1343526eac9e4b3d0909e4873
[ "MIT" ]
null
null
null
Python/Buch_ATBS/Teil_1/Kapitel_06_Stringbearbeitung/10_molare_masse.py
Apop85/Scripts
1d8dad316c55e1f1343526eac9e4b3d0909e4873
[ "MIT" ]
6
2020-12-24T15:15:09.000Z
2022-01-13T01:58:35.000Z
Python/Buch_ATBS/Teil_1/Kapitel_06_Stringbearbeitung/10_molare_masse.py
Apop85/Scripts
1d8dad316c55e1f1343526eac9e4b3d0909e4873
[ "MIT" ]
null
null
null
# Berechne molare Masse anhand chemischer Summenformel periodensystem={ 'H' : 1.0079, 'He' : 4.0026, 'Li' : 6.941, 'Be' : 9.0122, 'B' : 10.811, 'C' : 12.011, 'N' : 14.007, 'O' : 15.999, 'F' : 18.988, 'Ne' : 20.180, 'Na' : 22.990, 'Mg' : 24.305, 'Al' : 26.982, 'Si' : 28.086, 'P' : 30.9...
50.039474
281
0.506179
868d1e021d5b45d47108767f8f7aa79bc8b8371d
1,791
py
Python
apps/multivers/migrations/0010_conceptorder_conceptorderdrink_conceptorderdrinkline.py
LvanArkel/sbzwebsite
a26efbb050585312c53010f14f86c23616a8071f
[ "BSD-3-Clause" ]
1
2017-01-08T13:21:43.000Z
2017-01-08T13:21:43.000Z
apps/multivers/migrations/0010_conceptorder_conceptorderdrink_conceptorderdrinkline.py
LvanArkel/sbzwebsite
a26efbb050585312c53010f14f86c23616a8071f
[ "BSD-3-Clause" ]
17
2018-12-03T14:22:14.000Z
2021-07-14T15:15:12.000Z
apps/multivers/migrations/0010_conceptorder_conceptorderdrink_conceptorderdrinkline.py
LvanArkel/sbzwebsite
a26efbb050585312c53010f14f86c23616a8071f
[ "BSD-3-Clause" ]
2
2018-12-03T14:58:49.000Z
2019-12-01T13:24:42.000Z
# -*- coding: utf-8 -*- # Generated by Django 1.11.14 on 2018-07-04 14:22 from __future__ import unicode_literals from django.db import migrations, models import django.db.models.deletion class Migration(migrations.Migration): dependencies = [ ('multivers', '0009_auto_20180704_1144'), ] operati...
40.704545
124
0.598548
07d57dbd387d64d3f3800858f9a51e88000932d4
8,040
py
Python
src/onegov/file/upgrade.py
politbuero-kampagnen/onegov-cloud
20148bf321b71f617b64376fe7249b2b9b9c4aa9
[ "MIT" ]
null
null
null
src/onegov/file/upgrade.py
politbuero-kampagnen/onegov-cloud
20148bf321b71f617b64376fe7249b2b9b9c4aa9
[ "MIT" ]
null
null
null
src/onegov/file/upgrade.py
politbuero-kampagnen/onegov-cloud
20148bf321b71f617b64376fe7249b2b9b9c4aa9
[ "MIT" ]
null
null
null
""" Contains upgrade tasks that are executed when the application is being upgraded on the server. See :class:`onegov.core.upgrade.upgrade_task`. """ import multiprocessing from concurrent.futures import ThreadPoolExecutor from copy import copy from onegov.core.orm import as_selectable from onegov.core.orm.types impo...
31.042471
79
0.651493
07f36396019c9f26deab72fab94dbd2d8ca01c06
547
py
Python
crawlab/worker.py
anhilo/crawlab
363f4bf7a4ccc192a99850998c1bd0fc363832a1
[ "BSD-3-Clause" ]
1
2019-08-20T14:26:39.000Z
2019-08-20T14:26:39.000Z
crawlab/worker.py
anhilo/crawlab
363f4bf7a4ccc192a99850998c1bd0fc363832a1
[ "BSD-3-Clause" ]
null
null
null
crawlab/worker.py
anhilo/crawlab
363f4bf7a4ccc192a99850998c1bd0fc363832a1
[ "BSD-3-Clause" ]
null
null
null
import sys import os # make sure the working directory is in system path file_dir = os.path.dirname(os.path.realpath(__file__)) root_path = os.path.abspath(os.path.join(file_dir, '..')) sys.path.append(root_path) from tasks.celery import celery_app # import necessary tasks import tasks.spider import tasks.deploy if...
27.35
88
0.678245
ed42b186ba3ca9f281d95a201823fcbdc0bbf605
2,376
py
Python
research/nlp/seq2seq/src/utils/loss_monitor.py
leelige/mindspore
5199e05ba3888963473f2b07da3f7bca5b9ef6dc
[ "Apache-2.0" ]
77
2021-10-15T08:32:37.000Z
2022-03-30T13:09:11.000Z
research/nlp/seq2seq/src/utils/loss_monitor.py
leelige/mindspore
5199e05ba3888963473f2b07da3f7bca5b9ef6dc
[ "Apache-2.0" ]
3
2021-10-30T14:44:57.000Z
2022-02-14T06:57:57.000Z
research/nlp/seq2seq/src/utils/loss_monitor.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...
35.462687
120
0.630471
ed885b8c33209e84bb25fde1cdadb83524732f1d
6,663
py
Python
notebooks_and_scripts/graph_miner/repositories/kg_obo_graph_repository.py
LucaCappelletti94/EnsmallenGraph
572532b6d3f4352bf58f9ccca955376acd95fd89
[ "MIT" ]
null
null
null
notebooks_and_scripts/graph_miner/repositories/kg_obo_graph_repository.py
LucaCappelletti94/EnsmallenGraph
572532b6d3f4352bf58f9ccca955376acd95fd89
[ "MIT" ]
null
null
null
notebooks_and_scripts/graph_miner/repositories/kg_obo_graph_repository.py
LucaCappelletti94/EnsmallenGraph
572532b6d3f4352bf58f9ccca955376acd95fd89
[ "MIT" ]
null
null
null
"""Sub-module handling the retrieval and building of graphs from KG-OBO.""" from typing import List, Dict import os import requests from bs4 import BeautifulSoup import yaml from .graph_repository import GraphRepository import requests from bs4 import BeautifulSoup from urllib.parse import urljoin class KGOBOGraphRep...
30.705069
121
0.512382
71ffefff6d77a99b588f62a319efabc2857435d2
4,461
py
Python
Project3/test_main.py
veronikadim99/Wissenschaftliches-Rechnen
3b7c86e9488bf434f3ad1d590f5b9bb9b4cdf218
[ "Apache-2.0" ]
null
null
null
Project3/test_main.py
veronikadim99/Wissenschaftliches-Rechnen
3b7c86e9488bf434f3ad1d590f5b9bb9b4cdf218
[ "Apache-2.0" ]
null
null
null
Project3/test_main.py
veronikadim99/Wissenschaftliches-Rechnen
3b7c86e9488bf434f3ad1d590f5b9bb9b4cdf218
[ "Apache-2.0" ]
null
null
null
import numpy as np import matplotlib.pyplot as plt import unittest from main import power_iteration, load_images, setup_data_matrix, calculate_pca, accumulated_energy, project_faces, \ identify_faces from lib import visualize_eigenfaces, plot_singular_values_and_energy, plot_identified_faces class Tests(unittest...
41.691589
120
0.635956
92bb9babe840d176a211d0b6f3653a9fa6fad339
11,633
py
Python
Packs/MailListener_-_POP3/Integrations/MailListener_POP3/MailListener_POP3.py
diCagri/content
c532c50b213e6dddb8ae6a378d6d09198e08fc9f
[ "MIT" ]
799
2016-08-02T06:43:14.000Z
2022-03-31T11:10:11.000Z
Packs/MailListener_-_POP3/Integrations/MailListener_POP3/MailListener_POP3.py
diCagri/content
c532c50b213e6dddb8ae6a378d6d09198e08fc9f
[ "MIT" ]
9,317
2016-08-07T19:00:51.000Z
2022-03-31T21:56:04.000Z
Packs/MailListener_-_POP3/Integrations/MailListener_POP3/MailListener_POP3.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 poplib import base64 import quopri from email.parser import Parser from htmlentitydefs import name2codepoint from HTMLParser import HTMLParser, HTMLParseError ''' GLOBALS/PARAMS ''' SERVER = demisto.params().g...
31.611413
112
0.581621
13a56c1a124274ac135fb4660130f866c08d3e0b
733
py
Python
tests/onegov/core/test_datamanager.py
politbuero-kampagnen/onegov-cloud
20148bf321b71f617b64376fe7249b2b9b9c4aa9
[ "MIT" ]
null
null
null
tests/onegov/core/test_datamanager.py
politbuero-kampagnen/onegov-cloud
20148bf321b71f617b64376fe7249b2b9b9c4aa9
[ "MIT" ]
null
null
null
tests/onegov/core/test_datamanager.py
politbuero-kampagnen/onegov-cloud
20148bf321b71f617b64376fe7249b2b9b9c4aa9
[ "MIT" ]
null
null
null
import os import transaction from onegov.core.datamanager import FileDataManager def test_file_data_manager_commit(temporary_directory): data = 'data'.encode('utf-8') path = '{}/a.txt'.format(temporary_directory) FileDataManager.write_file(data, path) assert not os.path.exists(path) transaction...
22.212121
55
0.706685
b9abc0d330e08eb91d69a0e9a1e877248f5ddf1a
7,382
py
Python
applications/sentiment_analysis/pp_minilm/train.py
mukaiu/PaddleNLP
0315365dbafa6e3b1c7147121ba85e05884125a5
[ "Apache-2.0" ]
null
null
null
applications/sentiment_analysis/pp_minilm/train.py
mukaiu/PaddleNLP
0315365dbafa6e3b1c7147121ba85e05884125a5
[ "Apache-2.0" ]
null
null
null
applications/sentiment_analysis/pp_minilm/train.py
mukaiu/PaddleNLP
0315365dbafa6e3b1c7147121ba85e05884125a5
[ "Apache-2.0" ]
null
null
null
# Copyright (c) 2020 PaddlePaddle Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by appli...
45.850932
135
0.643999
bc7cfd5b8651bca24d23beb4c20091b29ec53fac
2,275
py
Python
pySchloss/schloss_config.py
ruum42/pySchloss
f1415b48187ef0966019051e7681ae59a274215b
[ "Apache-2.0" ]
12
2015-02-14T15:15:40.000Z
2020-06-23T12:32:05.000Z
pySchloss/schloss_config.py
hassoon1986/pySchloss
f1415b48187ef0966019051e7681ae59a274215b
[ "Apache-2.0" ]
null
null
null
pySchloss/schloss_config.py
hassoon1986/pySchloss
f1415b48187ef0966019051e7681ae59a274215b
[ "Apache-2.0" ]
7
2015-07-29T18:54:37.000Z
2021-01-27T17:24:37.000Z
#!/usr/bin/python2 # -*- coding: utf-8 -*- from itertools import combinations __schloss_data_directory__ = '../data/' schloss_pickle_file = 'pySchloss.pkl' schloss_ini_file = 'config.ini' ini_section_alias = 'Alias' import os import os.path import pickle import ConfigParser import re class ProjectPathNotFound(Excep...
27.743902
75
0.62989
bc9a6425655ae894a596fddd4da8d573705aaa16
3,729
py
Python
parser/Parser.py
weidler/tyrex
76a3d2c36405b1213f230a7a414c2741237933f8
[ "MIT" ]
1
2015-12-08T15:11:15.000Z
2015-12-08T15:11:15.000Z
parser/Parser.py
weidler/tyrex
76a3d2c36405b1213f230a7a414c2741237933f8
[ "MIT" ]
null
null
null
parser/Parser.py
weidler/tyrex
76a3d2c36405b1213f230a7a414c2741237933f8
[ "MIT" ]
null
null
null
import re from html2text import * class Parser(): """ Parser class that contains basic functionality for file reading and the main normalization method. Can be used to parse a single file and get the result. To process multiple Files use MultiParser (subclass) @parameters filename string the name/path of the fil...
30.818182
110
0.621614
4c11e5baccb94977cda069e361af3664723d83d0
474
py
Python
documents/normal-distribution-z/generate_numbers.py
RalfGuder/LaTeX-examples
a1bf9fe422969be1ca4674394ebd2170c07f7693
[ "MIT" ]
1,231
2015-01-07T04:04:25.000Z
2022-03-31T17:43:29.000Z
documents/normal-distribution-z/generate_numbers.py
DoubleL61/LaTeX-examples
cd0d97f85fadb59b7c6e9062b37a8bf7d725ba0c
[ "MIT" ]
5
2015-05-10T13:10:47.000Z
2021-05-02T21:28:49.000Z
documents/normal-distribution-z/generate_numbers.py
DoubleL61/LaTeX-examples
cd0d97f85fadb59b7c6e9062b37a8bf7d725ba0c
[ "MIT" ]
400
2015-01-05T06:22:18.000Z
2022-03-19T04:07:59.000Z
#!/usr/bin/env python """ Generate the LaTeX code for a table of the PPF of a normal distribution. PPF stands for Percent point function (inverse of cdf - percentiles). """ from scipy.stats import norm from numpy import arange for x in arange(0.0, 1.0, 0.1): line = "\\textbf{%0.1f} & " % x values = [norm.pp...
26.333333
73
0.618143
d5d931ddc81a15284e6bbab913da86a367341866
1,620
py
Python
sentinel/vpn/utils.py
allagog0x01/sentwg
52285ecf2b03c30a78901a29a7af96c8ab5764c8
[ "Apache-2.0" ]
null
null
null
sentinel/vpn/utils.py
allagog0x01/sentwg
52285ecf2b03c30a78901a29a7af96c8ab5764c8
[ "Apache-2.0" ]
null
null
null
sentinel/vpn/utils.py
allagog0x01/sentwg
52285ecf2b03c30a78901a29a7af96c8ab5764c8
[ "Apache-2.0" ]
null
null
null
import re import subprocess def convert_to_seconds(time_in_words): secs = 0 def to_secs(s): mat = re.match(r"((?P<hours>\d+)\s?hour)?\s?((?P<minutes>\d+)\s?min)?\s?((?P<seconds>\d+)\s?sec)?", s) secs = 0 secs += int(mat.group("hours")) * 3600 if mat.group("hours") else 0 secs +...
30.566038
110
0.511111
fc4905d6abd1cf0caa00831384e676c94e297162
2,109
py
Python
software/supervisor/views/HandyNbView.py
ghsecuritylab/project-powerline
6c0ec13bbfc11c3790c506f644db4fe45021440a
[ "MIT" ]
null
null
null
software/supervisor/views/HandyNbView.py
ghsecuritylab/project-powerline
6c0ec13bbfc11c3790c506f644db4fe45021440a
[ "MIT" ]
null
null
null
software/supervisor/views/HandyNbView.py
ghsecuritylab/project-powerline
6c0ec13bbfc11c3790c506f644db4fe45021440a
[ "MIT" ]
1
2020-03-08T01:50:58.000Z
2020-03-08T01:50:58.000Z
""" comment """ from PyQt5.QtWidgets import QWidget, QPushButton, QGridLayout, QLineEdit class HandyNbView(QWidget): def __init__(self, parent): super(HandyNbView, self).__init__(parent) self.handy_nb = '' #saved handynumber self.grid = QGridLayout() self.grid.setSpacing(2) ...
31.477612
72
0.598388
53a3256e928332e13e9971b0e14d74510bc2fb51
3,786
py
Python
20-hs-redez-sem/groups/01-decentFS/misc/bacnet1/event.py
Kyrus1999/BACnet
5be8e1377252166041bcd0b066cce5b92b077d06
[ "MIT" ]
8
2020-03-17T21:12:18.000Z
2021-12-12T15:55:54.000Z
20-hs-redez-sem/groups/01-decentFS/misc/bacnet1/event.py
Kyrus1999/BACnet
5be8e1377252166041bcd0b066cce5b92b077d06
[ "MIT" ]
2
2021-07-19T06:18:43.000Z
2022-02-10T12:17:58.000Z
20-hs-redez-sem/groups/01-decentFS/misc/bacnet1/event.py
Kyrus1999/BACnet
5be8e1377252166041bcd0b066cce5b92b077d06
[ "MIT" ]
25
2020-03-20T09:32:45.000Z
2021-07-18T18:12:59.000Z
#!/usr/bin/env python3 # lib/event.py # Jan 2020 <christian.tschudin@unibas.ch> ''' event data structure (="log entry") +-event------------------------------------------------------------------+ | +-meta---------------------------------------+ | | | feed_id, seq_no, h_prev, sign_info, h...
29.811024
80
0.506075
ab189e4fdea78e471d1598412dbe5435326aa0b3
3,138
py
Python
src/onegov/town6/views/resource.py
politbuero-kampagnen/onegov-cloud
20148bf321b71f617b64376fe7249b2b9b9c4aa9
[ "MIT" ]
null
null
null
src/onegov/town6/views/resource.py
politbuero-kampagnen/onegov-cloud
20148bf321b71f617b64376fe7249b2b9b9c4aa9
[ "MIT" ]
null
null
null
src/onegov/town6/views/resource.py
politbuero-kampagnen/onegov-cloud
20148bf321b71f617b64376fe7249b2b9b9c4aa9
[ "MIT" ]
null
null
null
from onegov.core.security import Public, Private from onegov.org.views.resource import view_resources, get_room_form, \ get_daypass_form, handle_new_room, handle_new_daypass, \ get_resource_form, handle_edit_resource, view_resource, \ handle_cleanup_allocations, view_occupancy, \ view_resource_subscrib...
40.753247
79
0.758445
db61ecd69f978e84c7f3a5a9f70e95563d333e02
235
py
Python
7-assets/_SNIPPETS/bryan-guner-gists/pyenum2string/enum-2-string.py
eengineergz/Lambda
1fe511f7ef550aed998b75c18a432abf6ab41c5f
[ "MIT" ]
null
null
null
7-assets/_SNIPPETS/bryan-guner-gists/pyenum2string/enum-2-string.py
eengineergz/Lambda
1fe511f7ef550aed998b75c18a432abf6ab41c5f
[ "MIT" ]
null
null
null
7-assets/_SNIPPETS/bryan-guner-gists/pyenum2string/enum-2-string.py
eengineergz/Lambda
1fe511f7ef550aed998b75c18a432abf6ab41c5f
[ "MIT" ]
null
null
null
# Converts an enumeration to a printable string. # def enumToString(constants, enum, elem): all = constants.all_values(enum) for e in all.keys(): if str(elem) == str(all[e]): return e return "<unknown>"
26.111111
48
0.621277
91e5ffdbcbeb8fd8095cb23f7f2b1bf4d5539098
5,806
py
Python
paddlenlp/datasets/wmt14ende.py
mukaiu/PaddleNLP
0315365dbafa6e3b1c7147121ba85e05884125a5
[ "Apache-2.0" ]
null
null
null
paddlenlp/datasets/wmt14ende.py
mukaiu/PaddleNLP
0315365dbafa6e3b1c7147121ba85e05884125a5
[ "Apache-2.0" ]
null
null
null
paddlenlp/datasets/wmt14ende.py
mukaiu/PaddleNLP
0315365dbafa6e3b1c7147121ba85e05884125a5
[ "Apache-2.0" ]
null
null
null
import collections import os import warnings from paddle.io import Dataset from paddle.dataset.common import md5file from paddle.utils.download import get_path_from_url from paddlenlp.utils.env import DATA_HOME from . import DatasetBuilder __all__ = ['WMT14ende'] class WMT14ende(DatasetBuilder): ''' This da...
43.007407
80
0.573028
72bf9863fc14133026673011d872899fc96220c8
690
py
Python
_get_realized_.py
paulowiz/AiesecBot
ac77cc5426ed6382772603afa8015208020c0fba
[ "MIT" ]
6
2019-10-18T17:47:30.000Z
2021-03-18T06:04:06.000Z
_get_realized_.py
paulowiz/AiesecBot
ac77cc5426ed6382772603afa8015208020c0fba
[ "MIT" ]
1
2020-09-24T08:17:29.000Z
2020-09-28T08:16:39.000Z
_get_realized_.py
paulowiz/AiesecBot
ac77cc5426ed6382772603afa8015208020c0fba
[ "MIT" ]
3
2019-10-20T18:40:20.000Z
2021-04-15T01:27:59.000Z
import psycopg2.extras from controller import RobotRotine as rr from api import graphqlconsume, querygraphql import time import datetime import numpy as np import schedule def job(): robo2 = rr.RobotRotine() dtfim = np.datetime64(datetime.datetime.now()) dtinit = np.datetime64(dtfim) - np.timedelta64(110,...
25.555556
60
0.688406
72ced540713909e5a3fb6f18cdbe13858a40b871
28,056
py
Python
Packs/Workday/Integrations/WorkdayIAMEventsGenerator/WorkdayIAMEventsGenerator.py
diCagri/content
c532c50b213e6dddb8ae6a378d6d09198e08fc9f
[ "MIT" ]
799
2016-08-02T06:43:14.000Z
2022-03-31T11:10:11.000Z
Packs/Workday/Integrations/WorkdayIAMEventsGenerator/WorkdayIAMEventsGenerator.py
diCagri/content
c532c50b213e6dddb8ae6a378d6d09198e08fc9f
[ "MIT" ]
9,317
2016-08-07T19:00:51.000Z
2022-03-31T21:56:04.000Z
Packs/Workday/Integrations/WorkdayIAMEventsGenerator/WorkdayIAMEventsGenerator.py
diCagri/content
c532c50b213e6dddb8ae6a378d6d09198e08fc9f
[ "MIT" ]
1,297
2016-08-04T13:59:00.000Z
2022-03-31T23:43:06.000Z
# noqa: F401 from flask import Flask, jsonify from gevent.pywsgi import WSGIServer from CommonServerPython import * FIRST_RUN_REPORT = { "Report_Entry": [ { "Employee_Type": "Regular", "Leadership": "Yes-HQ", "Work_Country_Code": "840", "Street_Address": "300...
40.838428
116
0.559524
be9f272fbb8ad4237daf7d8186aa07fed9c5e8af
53
py
Python
src/mvg/__init__.py
dfrommi/alfred-mvv
5310f80ca3e17686fb534db0e53a613043a1b352
[ "MIT" ]
2
2019-07-07T19:24:15.000Z
2019-10-16T09:07:25.000Z
src/mvg/__init__.py
dfrommi/alfred-mvv
5310f80ca3e17686fb534db0e53a613043a1b352
[ "MIT" ]
1
2020-06-05T16:49:17.000Z
2020-06-05T16:49:17.000Z
src/mvg/__init__.py
dfrommi/alfred-mvv
5310f80ca3e17686fb534db0e53a613043a1b352
[ "MIT" ]
2
2017-04-03T11:47:59.000Z
2019-10-16T09:09:26.000Z
from .api import MVG from .favorites import Favorites
26.5
32
0.830189
43d39546ea2d1046b2d090b13c9a78e4f68b1b01
246
py
Python
Python/B2-Wuerfel/Wuerfel.py
frankyhub/Calliope
335f0ef5ca9bcf57e14166319501ec9086bc09bf
[ "MIT" ]
null
null
null
Python/B2-Wuerfel/Wuerfel.py
frankyhub/Calliope
335f0ef5ca9bcf57e14166319501ec9086bc09bf
[ "MIT" ]
null
null
null
Python/B2-Wuerfel/Wuerfel.py
frankyhub/Calliope
335f0ef5ca9bcf57e14166319501ec9086bc09bf
[ "MIT" ]
null
null
null
def on_button_pressed_a(): basic.show_number(randint(1, 6)) input.on_button_pressed(Button.A, on_button_pressed_a) def on_button_pressed_b(): basic.show_number(randint(1, 4)) input.on_button_pressed(Button.B, on_button_pressed_b)
30.75
55
0.772358