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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
76e18b2139b65f0a8a267d1eb0f69f4b77fbbff0 | 73 | py | Python | TestBot/test_cogs/rpgFunctions/__init__.py | austinmh12/DiscordBots | 55550b68a7ad6423de55e62dbbff93fd88f08ff2 | [
"MIT"
] | null | null | null | TestBot/test_cogs/rpgFunctions/__init__.py | austinmh12/DiscordBots | 55550b68a7ad6423de55e62dbbff93fd88f08ff2 | [
"MIT"
] | null | null | null | TestBot/test_cogs/rpgFunctions/__init__.py | austinmh12/DiscordBots | 55550b68a7ad6423de55e62dbbff93fd88f08ff2 | [
"MIT"
] | null | null | null | def floor(n):
return int(n // 1)
def ceil(n):
return int((n // 1) + 1) | 14.6 | 25 | 0.547945 |
0a39d02815824be662acbcff2b1d8c10917b72b2 | 4,156 | py | Python | repo/plugin.video.PsycoTV/plugin.video.PsycoTV/_ytplist.py | dbiesecke/dbiesecke.github.io | 5894473591f078fd22d1cb33794c5e656ae9b8dd | [
"MIT"
] | 1 | 2017-11-26T18:18:46.000Z | 2017-11-26T18:18:46.000Z | repo/plugin.video.PsycoTV/plugin.video.PsycoTV/_ytplist.py | dbiesecke/dbiesecke.github.io | 5894473591f078fd22d1cb33794c5e656ae9b8dd | [
"MIT"
] | null | null | null | repo/plugin.video.PsycoTV/plugin.video.PsycoTV/_ytplist.py | dbiesecke/dbiesecke.github.io | 5894473591f078fd22d1cb33794c5e656ae9b8dd | [
"MIT"
] | 3 | 2019-09-30T19:52:05.000Z | 2020-04-12T21:20:56.000Z | import urllib
import urllib2,json
import xbmcvfs
import requests,time
import os,xbmc,xbmcaddon,xbmcgui,re
addon = xbmcaddon.Addon('plugin.video.wagasworld')
profile = xbmc.translatePath(addon.getAddonInfo('profile').decode('utf-8'))
cacheDir = os.path.join(profile, 'cachedir')
clean_cache=os.path.join(cacheDir,'cleanca... | 40.745098 | 116 | 0.608999 |
0a4ec08c0b81824875e3c289c227b7fd405fa55a | 471 | py | Python | object.py | aertoria/MiscCode | a2e94d0fe0890e6620972f84adcb7976ca9f1408 | [
"Apache-2.0"
] | null | null | null | object.py | aertoria/MiscCode | a2e94d0fe0890e6620972f84adcb7976ca9f1408 | [
"Apache-2.0"
] | null | null | null | object.py | aertoria/MiscCode | a2e94d0fe0890e6620972f84adcb7976ca9f1408 | [
"Apache-2.0"
] | null | null | null | class c(object):
t=990
@staticmethod
def f(i):
c.t=i
return i+1
def g(self,i):
self.t=i
print self.t
print c.t
return i+2
@classmethod # but classmethod let it access to class
def h(self,i):#so cls means current class
c.t=20
self.t=10
return i
c1=c()
#c1.h(10)
#print c1.g(1)
#c1.g(1)
#c... | 10.23913 | 54 | 0.598726 |
6a62e32f02ba0cfdfb22d2c40abe6e29b7c83c4a | 382 | py | Python | Verzweigungen/Mehrfach/u_mehrfach.py | DietrichPaul/Einstieg-in-Python | 0d28402f962773274d85e6bb169ae631c91f66ce | [
"CC0-1.0"
] | null | null | null | Verzweigungen/Mehrfach/u_mehrfach.py | DietrichPaul/Einstieg-in-Python | 0d28402f962773274d85e6bb169ae631c91f66ce | [
"CC0-1.0"
] | null | null | null | Verzweigungen/Mehrfach/u_mehrfach.py | DietrichPaul/Einstieg-in-Python | 0d28402f962773274d85e6bb169ae631c91f66ce | [
"CC0-1.0"
] | null | null | null | # Eingabe
print("Geben Sie ihr Bruttogehalt in Euro ein")
a = input()
# Eingabe in Zahl umwandeln
brutto = float(a)
# Berechnung des Steuersatzes
if brutto > 4000:
steuersatz = 0.26
elif brutto > 2500:
steuersatz = 0.22
else:
steuersatz = 0.18
# Berechnung des Steuerbetrages
steuerbetrag = brutto * steue... | 18.190476 | 47 | 0.719895 |
7c18ff746432e62e149fa905b6adb90f1b8646ab | 1,930 | py | Python | sketches/Evolution_Ecosystem/bloop.py | kantel/processingpy | 74aae222e46f68d1c8f06307aaede3cdae65c8ec | [
"MIT"
] | 4 | 2018-06-03T02:11:46.000Z | 2021-08-18T19:55:15.000Z | sketches/Evolution_Ecosystem/bloop.py | kantel/processingpy | 74aae222e46f68d1c8f06307aaede3cdae65c8ec | [
"MIT"
] | null | null | null | sketches/Evolution_Ecosystem/bloop.py | kantel/processingpy | 74aae222e46f68d1c8f06307aaede3cdae65c8ec | [
"MIT"
] | 3 | 2019-12-23T19:12:51.000Z | 2021-04-30T14:00:31.000Z | from dna import DNA
class Bloop(object):
def __init__(self, dna, loc):
self.location = loc
self.dna = dna
self.lifespan = 255
self.maxspeed = map(self.dna.genes[0], 0.0, 1.0, 15, 0)
self.r = map(self.dna.genes[0], 0.0, 1.0, 0, 50)
self.xoff = random(1000)
se... | 30.15625 | 71 | 0.524352 |
ed042173d74f46bb7b1dd8cc643849c08cdd5d59 | 1,088 | pyde | Python | sketches/riley04/riley04.pyde | kantel/processingpy | 74aae222e46f68d1c8f06307aaede3cdae65c8ec | [
"MIT"
] | 4 | 2018-06-03T02:11:46.000Z | 2021-08-18T19:55:15.000Z | sketches/riley04/riley04.pyde | kantel/processingpy | 74aae222e46f68d1c8f06307aaede3cdae65c8ec | [
"MIT"
] | null | null | null | sketches/riley04/riley04.pyde | kantel/processingpy | 74aae222e46f68d1c8f06307aaede3cdae65c8ec | [
"MIT"
] | 3 | 2019-12-23T19:12:51.000Z | 2021-04-30T14:00:31.000Z | # Hommage an Bridget Riley 4
from random import randint, choice
WIDTH = 600
HEIGHT = 600
FPS = 60
riley = [color(235, 200, 55), color(115, 165, 215), color(155, 195, 80),
color(230, 135, 170), color(230, 80, 70), color(65, 80, 150)]
def setup():
global counter, frontier
size(WIDTH, HEIGHT... | 24.727273 | 72 | 0.522978 |
71f7e161b7710adba935f1a7cb85295ccbf99481 | 5,999 | py | Python | bigbench/bbseqio/tasks.py | dimmollo/BIG-bench | f0dffeb4f16ef5489686a81e2d63362d251cda3e | [
"Apache-2.0"
] | null | null | null | bigbench/bbseqio/tasks.py | dimmollo/BIG-bench | f0dffeb4f16ef5489686a81e2d63362d251cda3e | [
"Apache-2.0"
] | null | null | null | bigbench/bbseqio/tasks.py | dimmollo/BIG-bench | f0dffeb4f16ef5489686a81e2d63362d251cda3e | [
"Apache-2.0"
] | null | null | null | # Copyright 2021 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# https://www.apache.org/licenses/LICENSE-2.0
# Unless required by applicable law or agreed to in writing, so... | 38.703226 | 80 | 0.688115 |
92c4702da48bf31bf0d89ca5c47e6d6e54448ed1 | 27,906 | py | Python | python/fleetx/applications/model.py | hutuxian/FleetX | 843c7aa33f5a14680becf058a3aaf0327eefafd4 | [
"Apache-2.0"
] | 170 | 2020-08-12T12:07:01.000Z | 2022-03-07T02:38:26.000Z | python/fleetx/applications/model.py | hutuxian/FleetX | 843c7aa33f5a14680becf058a3aaf0327eefafd4 | [
"Apache-2.0"
] | 195 | 2020-08-13T03:22:15.000Z | 2022-03-30T07:40:25.000Z | python/fleetx/applications/model.py | hutuxian/FleetX | 843c7aa33f5a14680becf058a3aaf0327eefafd4 | [
"Apache-2.0"
] | 67 | 2020-08-14T02:07:46.000Z | 2022-03-28T10:05:33.000Z | #!/usr/bin/python
# Copyright (c) 2019 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... | 34.795511 | 167 | 0.564968 |
1325891996e25027459fa4bc9342b38b5874e6fd | 1,891 | py | Python | GZP_GTO_QGIS/INSTALLATION/GeoTaskOrganizer/mActionGTOpolyToLine.py | msgis/swwat-gzp-template | 080afbe9d49fb34ed60ba45654383d9cfca01e24 | [
"MIT"
] | 3 | 2019-06-18T15:28:09.000Z | 2019-07-11T07:31:45.000Z | GZP_GTO_QGIS/INSTALLATION/GeoTaskOrganizer/mActionGTOpolyToLine.py | msgis/swwat-gzp-template | 080afbe9d49fb34ed60ba45654383d9cfca01e24 | [
"MIT"
] | 2 | 2019-07-11T14:03:25.000Z | 2021-02-08T16:14:04.000Z | GZP_GTO_QGIS/INSTALLATION/GeoTaskOrganizer/mActionGTOpolyToLine.py | msgis/swwat-gzp-template | 080afbe9d49fb34ed60ba45654383d9cfca01e24 | [
"MIT"
] | 1 | 2019-06-12T11:07:37.000Z | 2019-06-12T11:07:37.000Z | #!/usr/bin/python
# -*- coding: utf-8 -*-
from builtins import str
from builtins import object
from qgis.core import QgsProject, QgsWkbTypes, QgsVectorLayerUtils, QgsCoordinateTransform
class run(object):
def __init__(self, id, gtotool, config, debug):
super(run, self).__init__()
try:
... | 42.022222 | 114 | 0.567425 |
134f531c7b17b74da65437b36c64c8c5bf97ee1e | 7,898 | py | Python | dvwa-app/client/client.py | alxgrk/pratikum-sec-inf-and-event-mgmt | a53d8a79be4664b7b8b249034760bab1d9fbc657 | [
"Apache-2.0"
] | 4 | 2019-05-13T21:39:29.000Z | 2019-08-10T09:19:44.000Z | dvwa-app/client/client.py | alxgrk/pratikum-sec-inf-and-event-mgmt | a53d8a79be4664b7b8b249034760bab1d9fbc657 | [
"Apache-2.0"
] | null | null | null | dvwa-app/client/client.py | alxgrk/pratikum-sec-inf-and-event-mgmt | a53d8a79be4664b7b8b249034760bab1d9fbc657 | [
"Apache-2.0"
] | null | null | null | import argparse
import time
import requests
import numpy as np
import logging
import string
import random
from math import exp
from selenium import webdriver
from selenium.webdriver.chrome.options import Options
from pyvirtualdisplay import Display
logging.basicConfig(level=logging.INFO)
parser = argparse.ArgumentPa... | 32.908333 | 91 | 0.641935 |
b99c9a862fb72ab51043bd94fd708259c5fc867b | 1,066 | py | Python | exercises/es/solution_03_07.py | Jette16/spacy-course | 32df0c8f6192de6c9daba89740a28c0537e4d6a0 | [
"MIT"
] | 2,085 | 2019-04-17T13:10:40.000Z | 2022-03-30T21:51:46.000Z | exercises/es/solution_03_07.py | Jette16/spacy-course | 32df0c8f6192de6c9daba89740a28c0537e4d6a0 | [
"MIT"
] | 79 | 2019-04-18T14:42:55.000Z | 2022-03-07T08:15:43.000Z | exercises/es/solution_03_07.py | Jette16/spacy-course | 32df0c8f6192de6c9daba89740a28c0537e4d6a0 | [
"MIT"
] | 361 | 2019-04-17T13:34:32.000Z | 2022-03-28T04:42:45.000Z | import spacy
from spacy.matcher import PhraseMatcher
from spacy.tokens import Span
nlp = spacy.load("es_core_news_sm")
animals = ["labrador dorado", "gato", "tortuga", "oso de anteojos"]
animal_patterns = list(nlp.pipe(animals))
print("animal_patterns:", animal_patterns)
matcher = PhraseMatcher(nlp.vocab)
matcher.add(... | 34.387097 | 87 | 0.742964 |
e0064cff0b38347fd9366608a404070ff6ff2074 | 12,043 | py | Python | lale/lib/autogen/linear_discriminant_analysis.py | vishalbelsare/lale | 654ca29ec0234b478d26724a25df28b28f5c0bc0 | [
"Apache-2.0"
] | 265 | 2019-08-06T14:45:43.000Z | 2022-03-30T23:57:48.000Z | lale/lib/autogen/linear_discriminant_analysis.py | vishalbelsare/lale | 654ca29ec0234b478d26724a25df28b28f5c0bc0 | [
"Apache-2.0"
] | 467 | 2019-08-08T02:01:21.000Z | 2022-03-25T16:12:00.000Z | lale/lib/autogen/linear_discriminant_analysis.py | vishalbelsare/lale | 654ca29ec0234b478d26724a25df28b28f5c0bc0 | [
"Apache-2.0"
] | 81 | 2019-08-07T19:59:31.000Z | 2022-03-31T09:11:58.000Z | import sklearn
from numpy import inf, nan
from sklearn.discriminant_analysis import LinearDiscriminantAnalysis as Op
from lale.docstrings import set_docstrings
from lale.operators import make_operator
class _LinearDiscriminantAnalysisImpl:
def __init__(self, **hyperparams):
self._hyperparams = hyperparam... | 37.517134 | 189 | 0.496554 |
e045d010d673ceef69c2af6212695acb682bcaa4 | 9,809 | py | Python | deprecated/benchmark/collective/resnet/dali.py | hutuxian/FleetX | 843c7aa33f5a14680becf058a3aaf0327eefafd4 | [
"Apache-2.0"
] | 170 | 2020-08-12T12:07:01.000Z | 2022-03-07T02:38:26.000Z | deprecated/benchmark/collective/resnet/dali.py | hutuxian/FleetX | 843c7aa33f5a14680becf058a3aaf0327eefafd4 | [
"Apache-2.0"
] | 195 | 2020-08-13T03:22:15.000Z | 2022-03-30T07:40:25.000Z | deprecated/benchmark/collective/resnet/dali.py | hutuxian/FleetX | 843c7aa33f5a14680becf058a3aaf0327eefafd4 | [
"Apache-2.0"
] | 67 | 2020-08-14T02:07:46.000Z | 2022-03-28T10:05:33.000Z | # Copyright (c) 2019 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... | 34.660777 | 125 | 0.592211 |
0ec2540d4a85c6dd24cdfa9a309e8b4fcbb3bbb9 | 7,429 | py | Python | src/transformers/modeling_xlm_prophetnet.py | suliuzh/transformers | f34372a9ff99f6bc8619ac83dc07f7afe6b92141 | [
"Apache-2.0"
] | 1 | 2022-03-25T00:00:49.000Z | 2022-03-25T00:00:49.000Z | src/transformers/modeling_xlm_prophetnet.py | suliuzh/transformers | f34372a9ff99f6bc8619ac83dc07f7afe6b92141 | [
"Apache-2.0"
] | null | null | null | src/transformers/modeling_xlm_prophetnet.py | suliuzh/transformers | f34372a9ff99f6bc8619ac83dc07f7afe6b92141 | [
"Apache-2.0"
] | 2 | 2021-03-27T16:46:26.000Z | 2021-12-24T00:33:28.000Z | # coding=utf-8
# Copyright 2020 The Microsoft Authors and The HuggingFace Inc. team.
#
# 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
#
# Unl... | 44.48503 | 158 | 0.729708 |
166f7bc63f8510419668c778fb350e2bfd7b2132 | 13,691 | py | Python | exercises/networking_selfpaced/networking-workshop/collections/ansible_collections/community/general/plugins/modules/postgresql_set.py | tr3ck3r/linklight | 5060f624c235ecf46cb62cefcc6bddc6bf8ca3e7 | [
"MIT"
] | null | null | null | exercises/networking_selfpaced/networking-workshop/collections/ansible_collections/community/general/plugins/modules/postgresql_set.py | tr3ck3r/linklight | 5060f624c235ecf46cb62cefcc6bddc6bf8ca3e7 | [
"MIT"
] | null | null | null | exercises/networking_selfpaced/networking-workshop/collections/ansible_collections/community/general/plugins/modules/postgresql_set.py | tr3ck3r/linklight | 5060f624c235ecf46cb62cefcc6bddc6bf8ca3e7 | [
"MIT"
] | null | null | null | #!/usr/bin/python
# -*- coding: utf-8 -*-
# Copyright: (c) 2018, Andrew Klychkov (@Andersson007) <aaklychkov@mail.ru>
# 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 = {... | 31.401376 | 125 | 0.658024 |
bced94784ca80cd058b66239038c474397be60bc | 14,298 | py | Python | CharakterEditor.py | JoergRue/Sephrasto | a4fa3c2c1b095b674a9e71416ca448e3be3de225 | [
"MIT"
] | null | null | null | CharakterEditor.py | JoergRue/Sephrasto | a4fa3c2c1b095b674a9e71416ca448e3be3de225 | [
"MIT"
] | null | null | null | CharakterEditor.py | JoergRue/Sephrasto | a4fa3c2c1b095b674a9e71416ca448e3be3de225 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
"""
Created on Sun Feb 26 22:36:35 2017
@author: Aeolitus
"""
from PyQt5 import QtWidgets, QtCore
import CharakterBeschreibungWrapper
import CharakterAttributeWrapper
import CharakterEquipmentWrapper
import CharakterFertigkeitenWrapper
import CharakterUebernatuerlichWrapper
import CharakterFre... | 44.403727 | 127 | 0.651 |
e68eaef2a23c9136332ce28ba647d6ad9174d3bb | 120,628 | py | Python | Utils/py/RL_ActionSelection/env_0/tools/naoth/Representations_pb2.py | tarsoly/NaoTH | dcd2b67ef6bf9953c81d3e1b26e543b5922b7d52 | [
"ECL-2.0",
"Apache-2.0"
] | 15 | 2015-01-12T10:46:29.000Z | 2022-03-28T05:13:14.000Z | Utils/py/RL_ActionSelection/env_0/tools/naoth/Representations_pb2.py | tarsoly/NaoTH | dcd2b67ef6bf9953c81d3e1b26e543b5922b7d52 | [
"ECL-2.0",
"Apache-2.0"
] | 2 | 2019-01-20T21:07:50.000Z | 2020-01-22T14:00:28.000Z | Utils/py/RL_ActionSelection/env_0/tools/naoth/Representations_pb2.py | tarsoly/NaoTH | dcd2b67ef6bf9953c81d3e1b26e543b5922b7d52 | [
"ECL-2.0",
"Apache-2.0"
] | 5 | 2018-02-07T18:18:10.000Z | 2019-10-15T17:01:41.000Z | # Generated by the protocol buffer compiler. DO NOT EDIT!
# source: Representations.proto
import sys
_b=sys.version_info[0]<3 and (lambda x:x) or (lambda x:x.encode('latin1'))
from google.protobuf.internal import enum_type_wrapper
from google.protobuf import descriptor as _descriptor
from google.protobuf import messa... | 42.943396 | 13,273 | 0.754792 |
5373ad52e586ece8da1adf6633508cf9fb7e1b28 | 987 | py | Python | Chapter4_NN/Chapter4_2_DeepNeuralNetworks/gradientDescent.py | thisisjako/UdemyTF | ee4102391ed6bd50f764955f732f5740425a9209 | [
"MIT"
] | null | null | null | Chapter4_NN/Chapter4_2_DeepNeuralNetworks/gradientDescent.py | thisisjako/UdemyTF | ee4102391ed6bd50f764955f732f5740425a9209 | [
"MIT"
] | null | null | null | Chapter4_NN/Chapter4_2_DeepNeuralNetworks/gradientDescent.py | thisisjako/UdemyTF | ee4102391ed6bd50f764955f732f5740425a9209 | [
"MIT"
] | null | null | null | import numpy as np
from helper import f
from helper import f_prime_x0
from helper import f_prime_x1
from helper import plot_rosenbrock
if __name__ == "__main__":
x0 = np.random.uniform(-2, 2)
x1 = np.random.uniform(-2, 2)
x_start = (x0, x1)
y_start = f(x0, x1)
print(f"Global minimu... | 25.973684 | 53 | 0.572442 |
53db480399c17df23e21336f9fe79c48ebaaeda2 | 840 | py | Python | src/visuanalytics/tests/analytics/transform/types/test_transform_upper_case.py | mxsph/Data-Analytics | c82ff54b78f50b6660d7640bfee96ea68bef598f | [
"MIT"
] | 3 | 2020-08-24T19:02:09.000Z | 2021-05-27T20:22:41.000Z | src/visuanalytics/tests/analytics/transform/types/test_transform_upper_case.py | mxsph/Data-Analytics | c82ff54b78f50b6660d7640bfee96ea68bef598f | [
"MIT"
] | 342 | 2020-08-13T10:24:23.000Z | 2021-08-12T14:01:52.000Z | src/visuanalytics/tests/analytics/transform/types/test_transform_upper_case.py | visuanalytics/visuanalytics | f9cce7bc9e3227568939648ddd1dd6df02eac752 | [
"MIT"
] | 8 | 2020-09-01T07:11:18.000Z | 2021-04-09T09:02:11.000Z | import unittest
from visuanalytics.tests.analytics.transform.transform_test_helper import prepare_test
class TestTransformUpperCase(unittest.TestCase):
def setUp(self):
self.data = {
"test": ["canada", "CANADA", "CaNaDa", "cAnAdA", "Canada"]
}
def test_upper_case(self):
v... | 28 | 86 | 0.514286 |
4af57cf7c9f59e010f3e4bd726b00de0ea9e745a | 5,459 | py | Python | googleScholar.py | less-lab-uva/less-lab-uva | d91948bbead52be5018e6b3537b61934bf018dd3 | [
"MIT"
] | null | null | null | googleScholar.py | less-lab-uva/less-lab-uva | d91948bbead52be5018e6b3537b61934bf018dd3 | [
"MIT"
] | null | null | null | googleScholar.py | less-lab-uva/less-lab-uva | d91948bbead52be5018e6b3537b61934bf018dd3 | [
"MIT"
] | 1 | 2021-06-24T16:56:45.000Z | 2021-06-24T16:56:45.000Z | from scholarly import scholarly
from fp.fp import FreeProxy
import os.path
from slugify import slugify
def get_authors_names():
authors_names = []
for filename in os.listdir(os.path.abspath(os.getcwd())+"/_team"):
author_file = open(os.path.abspath(os.getcwd())+"/_team/"+filename, "r")
for lin... | 34.770701 | 124 | 0.622092 |
919c3072696813f33f45756ebc67291b12f3ac7b | 483 | py | Python | examples/myqueryset/delete_/migrations/0002_product_date_changed.py | zhengtong0898/django-decode | 69680853a4a5b07f6a9c4b65c7d86b2d401a92b1 | [
"MIT"
] | 5 | 2020-07-14T07:48:10.000Z | 2021-12-20T21:20:10.000Z | examples/myqueryset/delete_/migrations/0002_product_date_changed.py | zhengtong0898/django-decode | 69680853a4a5b07f6a9c4b65c7d86b2d401a92b1 | [
"MIT"
] | 7 | 2021-03-26T03:13:38.000Z | 2022-03-12T00:42:03.000Z | examples/myqueryset/delete_/migrations/0002_product_date_changed.py | zhengtong0898/django-decode | 69680853a4a5b07f6a9c4b65c7d86b2d401a92b1 | [
"MIT"
] | 1 | 2021-02-16T07:04:25.000Z | 2021-02-16T07:04:25.000Z | # Generated by Django 3.1.7 on 2021-04-01 05:50
from django.utils import timezone
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('delete_', '0001_initial'),
]
operations = [
migrations.AddField(
model_name='product',
... | 24.15 | 84 | 0.627329 |
91d9ca42b117f05387672fdaa703007b863f00b5 | 10,838 | py | Python | oneflow/python/benchmarks/bert_benchmark/run_pretraining.py | xxg1413/oneflow | f2e3c85a25b8aecfb6c0c0af1737833b1a77e135 | [
"Apache-2.0"
] | 2 | 2021-09-10T00:19:49.000Z | 2021-11-16T11:27:20.000Z | oneflow/python/benchmarks/bert_benchmark/run_pretraining.py | duijiudanggecl/oneflow | d2096ae14cf847509394a3b717021e2bd1d72f62 | [
"Apache-2.0"
] | null | null | null | oneflow/python/benchmarks/bert_benchmark/run_pretraining.py | duijiudanggecl/oneflow | d2096ae14cf847509394a3b717021e2bd1d72f62 | [
"Apache-2.0"
] | 1 | 2021-11-10T07:57:01.000Z | 2021-11-10T07:57:01.000Z | """
Copyright 2020 The OneFlow Authors. All rights reserved.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agr... | 32.255952 | 87 | 0.700037 |
534b8727f6d886d982f8cceac8e31a1d2579d7ee | 13,034 | py | Python | exercises/networking_selfpaced/networking-workshop/collections/ansible_collections/community/general/tests/unit/modules/source_control/bitbucket/test_bitbucket_pipeline_variable.py | tr3ck3r/linklight | 5060f624c235ecf46cb62cefcc6bddc6bf8ca3e7 | [
"MIT"
] | null | null | null | exercises/networking_selfpaced/networking-workshop/collections/ansible_collections/community/general/tests/unit/modules/source_control/bitbucket/test_bitbucket_pipeline_variable.py | tr3ck3r/linklight | 5060f624c235ecf46cb62cefcc6bddc6bf8ca3e7 | [
"MIT"
] | null | null | null | exercises/networking_selfpaced/networking-workshop/collections/ansible_collections/community/general/tests/unit/modules/source_control/bitbucket/test_bitbucket_pipeline_variable.py | tr3ck3r/linklight | 5060f624c235ecf46cb62cefcc6bddc6bf8ca3e7 | [
"MIT"
] | null | null | null | from ansible_collections.community.general.plugins.module_utils.source_control.bitbucket import BitbucketHelper
from ansible_collections.community.general.plugins.modules.source_control.bitbucket import bitbucket_pipeline_variable
from ansible_collections.community.general.tests.unit.compat import unittest
from ansible... | 44.790378 | 140 | 0.586159 |
f40c9e513806041ec85fb89144969302f82fd53e | 2,002 | py | Python | basic/19-brownie/Brownie/tests/conftest.py | yingjingyang/Dapp-Learning | 5bf10a02932926e429c1a61704d9a9dfee3a13ea | [
"MIT"
] | 634 | 2021-06-28T15:48:19.000Z | 2021-12-19T08:33:57.000Z | basic/19-brownie/Brownie/tests/conftest.py | yingjingyang/Dapp-Learning | 5bf10a02932926e429c1a61704d9a9dfee3a13ea | [
"MIT"
] | 73 | 2021-07-04T03:53:57.000Z | 2021-12-18T06:17:13.000Z | basic/19-brownie/Brownie/tests/conftest.py | yingjingyang/Dapp-Learning | 5bf10a02932926e429c1a61704d9a9dfee3a13ea | [
"MIT"
] | 263 | 2021-06-28T15:26:56.000Z | 2021-12-19T08:14:37.000Z | import pytest
from web3 import Web3
from web3.contract import ConciseContract
from brownie import SimpleToken, UniswapFactory, accounts, Contract, UniswapExchange
# reference to .
# https://github.com/Uniswap/uniswap-v1/blob/master/tests/conftest.py
# brownie made the contract deploying thing easier but hard to unders... | 30.333333 | 87 | 0.724276 |
f43a0fece55919b4a7210a7a3b70cca14f75ac6e | 3,796 | py | Python | MySql/conectar_Python/venv/Lib/site-packages/mysqlx/dbdoc.py | pedrohd21/Cursos-Feitos | b223aad83867bfa45ad161d133e33c2c200d42bd | [
"MIT"
] | 3 | 2021-01-07T18:27:35.000Z | 2021-01-13T19:15:01.000Z | lib/mysqlx/dbdoc.py | maximmasiutin/mysql-connector-python | 9d5e6f532a0342795f380ee1cfeeb93adbe333a0 | [
"BSD-3-Clause"
] | 20 | 2021-05-03T18:02:23.000Z | 2022-03-12T12:01:04.000Z | Lib/site-packages/mysqlx/dbdoc.py | fochoao/cpython | 3dc84b260e5bced65ebc2c45c40c8fa65f9b5aa9 | [
"bzip2-1.0.6",
"0BSD"
] | 2 | 2021-06-12T17:44:26.000Z | 2021-06-22T03:10:55.000Z | # Copyright (c) 2016, 2019, Oracle and/or its affiliates. All rights reserved.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License, version 2.0, as
# published by the Free Software Foundation.
#
# This program is also distributed with certain s... | 33.892857 | 79 | 0.663593 |
be66a013a4ad93bf0eb274d26e9295d1378403c7 | 1,271 | py | Python | test/test_npu/test_network_ops/test_iou.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_iou.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_iou.py | Ascend/pytorch | 39849cf72dafe8d2fb68bd1679d8fd54ad60fcfc | [
"BSD-3-Clause"
] | null | null | null | # Copyright (c) 2020, Huawei Technologies.All rights reserved.
#
# Licensed under the BSD 3-Clause License (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# https://opensource.org/licenses/BSD-3-Clause
#
# Unless required by applicable law... | 42.366667 | 92 | 0.719119 |
fea06f3709bf38a5a0e1fe45df176e232eb40bb0 | 2,124 | py | Python | project/forms/event_place.py | DanielGrams/gsevp | e94034f7b64de76f38754b56455e83092378261f | [
"MIT"
] | 1 | 2021-06-01T14:49:18.000Z | 2021-06-01T14:49:18.000Z | project/forms/event_place.py | DanielGrams/gsevp | e94034f7b64de76f38754b56455e83092378261f | [
"MIT"
] | 286 | 2020-12-04T14:13:00.000Z | 2022-03-09T19:05:16.000Z | project/forms/event_place.py | DanielGrams/gsevpt | a92f71694388e227e65ed1b24446246ee688d00e | [
"MIT"
] | null | null | null | from flask_babelex import lazy_gettext
from flask_wtf import FlaskForm
from wtforms import DecimalField, FormField, StringField, SubmitField, TextAreaField
from wtforms.fields.html5 import URLField
from wtforms.validators import DataRequired, Optional
from project.forms.common import Base64ImageForm
from project.model... | 36.62069 | 86 | 0.72081 |
fe17658558c00052eea676a6f29f70f7703af0eb | 314 | py | Python | reverse-string/reverse-string.py | hyeseonko/LeetCode | 48dfc93f1638e13041d8ce1420517a886abbdc77 | [
"MIT"
] | 2 | 2021-12-05T14:29:06.000Z | 2022-01-01T05:46:13.000Z | reverse-string/reverse-string.py | hyeseonko/LeetCode | 48dfc93f1638e13041d8ce1420517a886abbdc77 | [
"MIT"
] | null | null | null | reverse-string/reverse-string.py | hyeseonko/LeetCode | 48dfc93f1638e13041d8ce1420517a886abbdc77 | [
"MIT"
] | null | null | null | class Solution:
def reverseString(self, s: List[str]) -> None:
"""
Do not return anything, modify s in-place instead.
"""
mid = int(len(s)/2)
for i in range(1,mid+1):
temp=s[mid+i+len(s)%2-1]
s[mid+i+len(s)%2-1]=s[mid-i]
s[mid-i]=temp | 31.4 | 58 | 0.484076 |
4aa61a13de6686e8b91a52966046f4bd5d5501ba | 45,816 | py | Python | scripts/signal_marker_processing/notebook/pp_widgets.py | CsabaWirnhardt/cbm | 1822addd72881057af34ac6a7c2a1f02ea511225 | [
"BSD-3-Clause"
] | 17 | 2021-01-18T07:27:01.000Z | 2022-03-10T12:26:21.000Z | scripts/signal_marker_processing/notebook/pp_widgets.py | CsabaWirnhardt/cbm | 1822addd72881057af34ac6a7c2a1f02ea511225 | [
"BSD-3-Clause"
] | 4 | 2021-04-29T11:20:44.000Z | 2021-12-06T10:19:17.000Z | scripts/signal_marker_processing/notebook/pp_widgets.py | CsabaWirnhardt/cbm | 1822addd72881057af34ac6a7c2a1f02ea511225 | [
"BSD-3-Clause"
] | 47 | 2021-01-21T08:25:22.000Z | 2022-03-21T14:28:42.000Z | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
# This file is part of CbM (https://github.com/ec-jrc/cbm).
# Author : Daniele Borio
# Credits : GTCAP Team
# Copyright : 2021 European Commission, Joint Research Centre
# License : 3-Clause BSD
from ipywidgets import (Text, VBox, Dropdown, SelectMultiple,
... | 32.084034 | 92 | 0.496966 |
43772e76621a2edfc8d047bc8eed15912ebd834b | 8,835 | py | Python | Backend/migrations/alembic/versions/59ad7ea918b6_add_survstat_berlin_hack_view.py | dbvis-ukon/coronavis | f00374ac655c9d68541183d28ede6fe5536581dc | [
"Apache-2.0"
] | 15 | 2020-04-24T20:18:11.000Z | 2022-01-31T21:05:05.000Z | Backend/migrations/alembic/versions/59ad7ea918b6_add_survstat_berlin_hack_view.py | dbvis-ukon/coronavis | f00374ac655c9d68541183d28ede6fe5536581dc | [
"Apache-2.0"
] | 2 | 2021-05-19T07:15:09.000Z | 2022-03-07T08:29:34.000Z | Backend/migrations/alembic/versions/59ad7ea918b6_add_survstat_berlin_hack_view.py | dbvis-ukon/coronavis | f00374ac655c9d68541183d28ede6fe5536581dc | [
"Apache-2.0"
] | 4 | 2020-04-27T16:20:13.000Z | 2021-02-23T10:39:42.000Z | """add survstat berlin hack view
Revision ID: 59ad7ea918b6
Revises: cea34abda294
Create Date: 2021-03-17 19:29:52.864284
"""
from alembic import op
# revision identifiers, used by Alembic.
revision = '59ad7ea918b6'
down_revision = 'cea34abda294'
branch_labels = None
depends_on = None
def upgrade():
op.get_bind... | 42.475962 | 120 | 0.668138 |
60fa1298de306613fb7401185a66e1dfc077ebeb | 5,797 | py | Python | Packs/PANOStoCDLMonitoring/Scripts/PANOStoCortexDataLakeMonitoring/PANOStoCortexDataLakeMonitoring_test.py | diCagri/content | c532c50b213e6dddb8ae6a378d6d09198e08fc9f | [
"MIT"
] | 799 | 2016-08-02T06:43:14.000Z | 2022-03-31T11:10:11.000Z | Packs/PANOStoCDLMonitoring/Scripts/PANOStoCortexDataLakeMonitoring/PANOStoCortexDataLakeMonitoring_test.py | diCagri/content | c532c50b213e6dddb8ae6a378d6d09198e08fc9f | [
"MIT"
] | 9,317 | 2016-08-07T19:00:51.000Z | 2022-03-31T21:56:04.000Z | Packs/PANOStoCDLMonitoring/Scripts/PANOStoCortexDataLakeMonitoring/PANOStoCortexDataLakeMonitoring_test.py | diCagri/content | c532c50b213e6dddb8ae6a378d6d09198e08fc9f | [
"MIT"
] | 1,297 | 2016-08-04T13:59:00.000Z | 2022-03-31T23:43:06.000Z | import pytest
import demistomock as demisto
from PANOStoCortexDataLakeMonitoring import check_instance, get_firewall_serials
ERR_MSG_CDL = "No active Cortex Data Lake integration found, please configure one."
ALL_INSTANCES = {
'Cortex Data Lake_instance_1': {'brand': 'Cortex Data Lake', 'category': 'Analytics & S... | 40.538462 | 118 | 0.477316 |
7176ceda779675a7485e1b6c4d5bf88f107dbd9d | 53,660 | py | Python | boto/iam/connection.py | jamesob/boto | 62d2818fdb6a9fa09e160d0f8c17ccbbc6d28ec8 | [
"MIT"
] | 1 | 2019-07-29T02:53:51.000Z | 2019-07-29T02:53:51.000Z | boto/iam/connection.py | jamesob/boto | 62d2818fdb6a9fa09e160d0f8c17ccbbc6d28ec8 | [
"MIT"
] | 1 | 2021-09-11T14:30:32.000Z | 2021-09-11T14:30:32.000Z | Dockerfiles/gedlab-khmer-filter-abund/pymodules/python2.7/lib/python/boto-2.19.0-py2.7.egg/boto/iam/connection.py | poojavade/Genomics_Docker | 829b5094bba18bbe03ae97daf925fee40a8476e8 | [
"Apache-2.0"
] | 2 | 2016-12-19T02:27:46.000Z | 2019-07-29T02:53:54.000Z | # Copyright (c) 2010-2011 Mitch Garnaat http://garnaat.org/
# Copyright (c) 2010-2011, Eucalyptus Systems, Inc.
#
# Permission is hereby granted, free of charge, to any person obtaining a
# copy of this software and associated documentation files (the
# "Software"), to deal in the Software without restriction, includin... | 37.367688 | 115 | 0.624469 |
1c599505075e85b63bd64e7e59e9e5e90587651d | 2,880 | py | Python | chemist/chemist/spiders/chemist_spider.py | ChineseGardenCat/chemist_crawler | 28fdf1e93c38cddc5f8b16e7098a60e2a51b1a7a | [
"MIT"
] | null | null | null | chemist/chemist/spiders/chemist_spider.py | ChineseGardenCat/chemist_crawler | 28fdf1e93c38cddc5f8b16e7098a60e2a51b1a7a | [
"MIT"
] | null | null | null | chemist/chemist/spiders/chemist_spider.py | ChineseGardenCat/chemist_crawler | 28fdf1e93c38cddc5f8b16e7098a60e2a51b1a7a | [
"MIT"
] | null | null | null | import scrapy
from bs4 import BeautifulSoup
from ..items import ChemistItem
import re
class ChemistSpider(scrapy.Spider):
name = 'chemist_spider'
start_urls = [
'https://www.chemistwarehouse.com.au/categories'
]
chemist_prefix = 'https://www.chemistwarehouse.com.au/'
def parse(self, resp... | 43.636364 | 114 | 0.621875 |
c76319d25ab11459573d2752a5c73dd86d7d1270 | 1,097 | py | Python | EssayScrapy/essay_extractor.py | Superar/PLN | 2ed5ea1f0ebb28ca8dd3729c064758bc5c2abcee | [
"MIT"
] | null | null | null | EssayScrapy/essay_extractor.py | Superar/PLN | 2ed5ea1f0ebb28ca8dd3729c064758bc5c2abcee | [
"MIT"
] | null | null | null | EssayScrapy/essay_extractor.py | Superar/PLN | 2ed5ea1f0ebb28ca8dd3729c064758bc5c2abcee | [
"MIT"
] | null | null | null | import scrapy
import re
class BlogSpider(scrapy.Spider):
name = 'essayspider'
start_urls = ['https://educacao.uol.com.br/bancoderedacoes/redacoes/direito-dos-manos.htm',
'https://educacao.uol.com.br/bancoderedacoes/redacoes/posse-de-armas-o-dilema-da-seguranca-pessoal-no-brasil.htm',
... | 42.192308 | 132 | 0.603464 |
c7cd43870580a58fc22007ea02dc6bb2a7988f39 | 6,272 | py | Python | transonic/compiler.py | fluiddyn/transonic | a460e9f6d1139f79b668cb3306d1e8a7e190b72d | [
"BSD-3-Clause"
] | 88 | 2019-01-08T16:39:08.000Z | 2022-02-06T14:19:23.000Z | transonic/compiler.py | fluiddyn/transonic | a460e9f6d1139f79b668cb3306d1e8a7e190b72d | [
"BSD-3-Clause"
] | 13 | 2019-06-20T15:53:10.000Z | 2021-02-09T11:03:29.000Z | transonic/compiler.py | fluiddyn/transonic | a460e9f6d1139f79b668cb3306d1e8a7e190b72d | [
"BSD-3-Clause"
] | 1 | 2019-11-05T03:03:14.000Z | 2019-11-05T03:03:14.000Z | """Use Pythran to create extensions
===================================
User API
--------
.. autofunction:: wait_for_all_extensions
Internal API
------------
.. autofunction:: make_hex
.. autoclass:: SchedulerPopen
:members:
:private-members:
.. autofunction:: compile_extension
"""
import multiprocessing
... | 25.188755 | 81 | 0.56824 |
31893b94b3b1d51860f6d4b7d07125a98332bce3 | 2,532 | py | Python | Embedded/RaspberryPi/Detector.py | BlaCkinkGJ/SFSH | 0134f1e4698ef34caee2d5a8cd875c51507b3527 | [
"MIT"
] | 1 | 2019-02-28T08:39:55.000Z | 2019-02-28T08:39:55.000Z | Embedded/RaspberryPi/Detector.py | BlaCkinkGJ/SFSH | 0134f1e4698ef34caee2d5a8cd875c51507b3527 | [
"MIT"
] | 5 | 2018-07-17T13:09:34.000Z | 2018-09-11T13:55:33.000Z | Embedded/RaspberryPi/Detector.py | BlaCkinkGJ/SFSH | 0134f1e4698ef34caee2d5a8cd875c51507b3527 | [
"MIT"
] | 2 | 2019-05-17T03:07:08.000Z | 2022-01-01T07:04:31.000Z | from picamera.array import PiRGBArray
from picamera import PiCamera
import time
import cv2
import imutils
class Detect:
def __init__(self, camera: object = PiCamera(), resolution: object = (640, 480), framerate: object = 32) -> object:
self.camera = camera
self.camera.resolution = resolution
... | 30.142857 | 119 | 0.590837 |
b43475f55afbab877e9bf65f719dcdb360b52faa | 1,062 | py | Python | etc/mpipc_client.py | huberthoegl/tsgrain | 405d0ba8b98c2afa950d27294e55cd1e07506db4 | [
"Apache-2.0"
] | 1 | 2021-06-15T08:59:02.000Z | 2021-06-15T08:59:02.000Z | etc/mpipc_client.py | huberthoegl/tsgrain | 405d0ba8b98c2afa950d27294e55cd1e07506db4 | [
"Apache-2.0"
] | null | null | null | etc/mpipc_client.py | huberthoegl/tsgrain | 405d0ba8b98c2afa950d27294e55cd1e07506db4 | [
"Apache-2.0"
] | null | null | null | # Multiprocessing IPC Client
import threading
from multiprocessing.managers import BaseManager
import queue
queue_c_to_s = None
queue_s_to_c = None
def connect():
global queue_s_to_c, queue_c_to_s
BaseManager.register('queue_StoC')
BaseManager.register('queue_CtoS')
m = BaseManager(address=('localh... | 23.6 | 55 | 0.632768 |
c36de4f805349e382d8b6f60c621260d9fdf49b9 | 7,720 | py | Python | Packs/Alexa/Integrations/AlexaV2/AlexaV2.py | diCagri/content | c532c50b213e6dddb8ae6a378d6d09198e08fc9f | [
"MIT"
] | 799 | 2016-08-02T06:43:14.000Z | 2022-03-31T11:10:11.000Z | Packs/Alexa/Integrations/AlexaV2/AlexaV2.py | diCagri/content | c532c50b213e6dddb8ae6a378d6d09198e08fc9f | [
"MIT"
] | 9,317 | 2016-08-07T19:00:51.000Z | 2022-03-31T21:56:04.000Z | Packs/Alexa/Integrations/AlexaV2/AlexaV2.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 * # noqa # pylint: disable=unused-wildcard-import
from CommonServerUserPython import * # noqa
import requests
import traceback
from typing import Dict
# Disable insecure warnings
requests.packages.urllib3.disable_warnings() # pylint: disable=no-member
'... | 40.208333 | 128 | 0.6 |
f203e7bffe36ad99b1b17fa5e56cabadfd5b7bf8 | 1,270 | py | Python | INBa/2015/Rogko_K_A/task_8_20.py | YukkaSarasti/pythonintask | eadf4245abb65f4400a3bae30a4256b4658e009c | [
"Apache-2.0"
] | null | null | null | INBa/2015/Rogko_K_A/task_8_20.py | YukkaSarasti/pythonintask | eadf4245abb65f4400a3bae30a4256b4658e009c | [
"Apache-2.0"
] | null | null | null | INBa/2015/Rogko_K_A/task_8_20.py | YukkaSarasti/pythonintask | eadf4245abb65f4400a3bae30a4256b4658e009c | [
"Apache-2.0"
] | null | null | null | #Задача 8. Вариант 20.
#1-50. Доработайте игру "Анаграммы" (см. М.Доусон Программируем на Python. Гл.4) так, чтобы к каждому слову полагалась подсказка. Игрок должен получать право на подсказку в том случае, если у него нет никаких предположений. Разработайте систему начисления очков, по которой бы игроки, отгадавшие с... | 33.421053 | 393 | 0.683465 |
f216896610008a5bfdb2a638ab100b9adb85238a | 1,040 | py | Python | larq_compute_engine/tf/python/ops/bsign_ops_test.py | timdebruin/compute-engine | bdd3c080ea330ad911cfb6b02dd41b6c574a7cf4 | [
"Apache-2.0"
] | null | null | null | larq_compute_engine/tf/python/ops/bsign_ops_test.py | timdebruin/compute-engine | bdd3c080ea330ad911cfb6b02dd41b6c574a7cf4 | [
"Apache-2.0"
] | null | null | null | larq_compute_engine/tf/python/ops/bsign_ops_test.py | timdebruin/compute-engine | bdd3c080ea330ad911cfb6b02dd41b6c574a7cf4 | [
"Apache-2.0"
] | null | null | null | """Tests for compute engine ops."""
import numpy as np
import sys
import pytest
try:
from larq_compute_engine.tf.python.ops.compute_engine_ops import bsign
from larq_compute_engine.tf.python.utils import eval_op
except ImportError:
from compute_engine_ops import bsign
from compute_engine_ops.tf.python... | 31.515152 | 74 | 0.682692 |
48289a4c492eba2f5955c55f6003fd4e592fb4fd | 1,983 | py | Python | app/datasources/sources/__init__.py | geospatial-jeff/cognition-datasources-api | 9c2f0332f231638e5fb615d2293c32a3ad96654d | [
"Apache-2.0"
] | 18 | 2019-03-27T20:09:37.000Z | 2022-02-04T17:38:07.000Z | app/datasources/sources/__init__.py | geospatial-jeff/cognition-datasources-api | 9c2f0332f231638e5fb615d2293c32a3ad96654d | [
"Apache-2.0"
] | 3 | 2019-06-05T15:12:17.000Z | 2020-04-30T17:54:37.000Z | app/datasources/sources/__init__.py | geospatial-jeff/cognition-datasources-api | 9c2f0332f231638e5fb615d2293c32a3ad96654d | [
"Apache-2.0"
] | 3 | 2019-06-29T01:16:37.000Z | 2020-04-30T17:25:26.000Z |
class collections(object):
def load_sources():
import os
source_files = os.listdir(os.path.dirname(__file__))
sources = []
for item in source_files:
if item.endswith('.py') and item != '__init__.py' and item != 'base.py':
module = os.path.splitext(item)... | 50.846154 | 114 | 0.684821 |
6fbe9143f8e2003b9662f01c881f123a21aa8324 | 2,044 | py | Python | game_logic.py | wdr-data/1live-plays | 68ed22a659ea1540550bc9f5e70fdb83f362fa06 | [
"MIT"
] | 3 | 2020-07-31T11:22:04.000Z | 2020-07-31T19:59:18.000Z | game_logic.py | wdr-data/1live-plays | 68ed22a659ea1540550bc9f5e70fdb83f362fa06 | [
"MIT"
] | null | null | null | game_logic.py | wdr-data/1live-plays | 68ed22a659ea1540550bc9f5e70fdb83f362fa06 | [
"MIT"
] | null | null | null | import numpy as np
ROW_COUNT = 6
COLUMN_COUNT = 7
board = None
def create_board():
global board
board = np.zeros((ROW_COUNT, COLUMN_COUNT))
def drop_piece(row, col, piece):
global board
board[row][col] = piece
def get_valid_locations():
return [col for col in range(COLUMN_COUNT) if is_valid_... | 24.047059 | 73 | 0.488748 |
73a64ff631f98c290deef0bd9fa15aaf9922825d | 5,744 | py | Python | test262/run_sunspider.py | openharmony-sig-ci/ark_ts2abc | 1d6fac6447760fce2e81c3738ac735b4424eed31 | [
"Apache-2.0"
] | null | null | null | test262/run_sunspider.py | openharmony-sig-ci/ark_ts2abc | 1d6fac6447760fce2e81c3738ac735b4424eed31 | [
"Apache-2.0"
] | null | null | null | test262/run_sunspider.py | openharmony-sig-ci/ark_ts2abc | 1d6fac6447760fce2e81c3738ac735b4424eed31 | [
"Apache-2.0"
] | 2 | 2021-09-13T11:32:30.000Z | 2021-09-13T12:12:06.000Z | # coding: utf-8
#!/usr/bin/python3
"""
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 by ... | 30.073298 | 90 | 0.605327 |
f7bdd4de59f14c839958b2017135d6e04792546d | 13,294 | py | Python | python/odml/odml_files_generator.py | mpsonntag/snippets | fc3cc42ea49b885c1f29c0aef1379055a931a978 | [
"BSD-3-Clause"
] | null | null | null | python/odml/odml_files_generator.py | mpsonntag/snippets | fc3cc42ea49b885c1f29c0aef1379055a931a978 | [
"BSD-3-Clause"
] | null | null | null | python/odml/odml_files_generator.py | mpsonntag/snippets | fc3cc42ea49b885c1f29c0aef1379055a931a978 | [
"BSD-3-Clause"
] | null | null | null | import random
import time
import uuid
from abc import ABC, abstractmethod
from os import getcwd, path
import odml
from odml.tools.rdf_converter import RDFReader, RDFWriter
from odml.tools.odmlparser import ODMLWriter
RANDOM_MAX = 1000000000 # might be collisions so better change to uuid
MAX_VALUE_LIST_NUMBER = 5
MA... | 33.486146 | 138 | 0.610275 |
f73f473a495de28d12178fd88344cae3f64fc9e4 | 7,396 | py | Python | import_data.py | FlyingFishBird/msmt | 1278d4a6af3d54aa477d7c99d053549b1b80b2fa | [
"MIT"
] | null | null | null | import_data.py | FlyingFishBird/msmt | 1278d4a6af3d54aa477d7c99d053549b1b80b2fa | [
"MIT"
] | null | null | null | import_data.py | FlyingFishBird/msmt | 1278d4a6af3d54aa477d7c99d053549b1b80b2fa | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
import argparse
import sys
IS_PY2 = sys.version_info.major == 2
def connect_db(host, port, user, passwd):
import pymysql
try:
wconn = pymysql.connect(
host=host,
user=user,
password=passwd,
port=port,
charset='utf8mb... | 28.555985 | 209 | 0.58126 |
5836a3cb326541a1a43514d2e8268302ca78bc4b | 1,549 | py | Python | build/dart/gen_test_invocation.py | opensource-assist/fuschia | 66646c55b3d0b36aae90a4b6706b87f1a6261935 | [
"BSD-3-Clause"
] | null | null | null | build/dart/gen_test_invocation.py | opensource-assist/fuschia | 66646c55b3d0b36aae90a4b6706b87f1a6261935 | [
"BSD-3-Clause"
] | null | null | null | build/dart/gen_test_invocation.py | opensource-assist/fuschia | 66646c55b3d0b36aae90a4b6706b87f1a6261935 | [
"BSD-3-Clause"
] | null | null | null | #!/usr/bin/env python2.7
# Copyright 2017 The Fuchsia Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
import argparse
import os
import stat
import string
import sys
def main():
parser = argparse.ArgumentParser(
descriptio... | 29.788462 | 79 | 0.669464 |
b740294b79848b7a7bd2873aad0148f4c0796b18 | 288 | py | Python | pacman-arch/test/pacman/tests/sync103.py | Maxython/pacman-for-termux | 3b208eb9274cbfc7a27fca673ea8a58f09ebad47 | [
"MIT"
] | 23 | 2021-05-21T19:11:06.000Z | 2022-03-31T18:14:20.000Z | source/pacman-6.0.1/test/pacman/tests/sync103.py | Scottx86-64/dotfiles-1 | 51004b1e2b032664cce6b553d2052757c286087d | [
"Unlicense"
] | 11 | 2021-05-21T12:08:44.000Z | 2021-12-21T08:30:08.000Z | source/pacman-6.0.1/test/pacman/tests/sync103.py | Scottx86-64/dotfiles-1 | 51004b1e2b032664cce6b553d2052757c286087d | [
"Unlicense"
] | 1 | 2021-09-26T08:44:40.000Z | 2021-09-26T08:44:40.000Z | self.description = "Sysupgrade with a local package not existing in sync db"
sp = pmpkg("spkg")
self.addpkg2db("sync", sp)
lp = pmpkg("lpkg")
self.addpkg2db("local", lp)
self.args = "-Su"
self.addrule("PACMAN_RETCODE=0")
self.addrule("PKG_EXIST=lpkg")
self.addrule("!PKG_EXIST=spkg")
| 20.571429 | 76 | 0.715278 |
3f7db4a70b5198de558306d38d3c84349aecdcbb | 192 | py | Python | PYTHON/Math/triangle_quest.py | byung-u/HackerRank | 4c02fefff7002b3af774b99ebf8d40f149f9d163 | [
"MIT"
] | null | null | null | PYTHON/Math/triangle_quest.py | byung-u/HackerRank | 4c02fefff7002b3af774b99ebf8d40f149f9d163 | [
"MIT"
] | null | null | null | PYTHON/Math/triangle_quest.py | byung-u/HackerRank | 4c02fefff7002b3af774b99ebf8d40f149f9d163 | [
"MIT"
] | null | null | null | #!/usr/bin/env python2
if __name__ == '__main__':
for i in range(1,int(input())):
print(((10 ** i - 1) / 9) * i)
# print(int(''.join([str(i) for j in range(1 , i + 1)])))
| 27.428571 | 65 | 0.494792 |
b7f0db5aaf9dacbe85eeecca56b4b948841aeebb | 629 | py | Python | lintcode/000-055-Compare-Strings/CompareStrings_001.py | cc13ny/all-in | bc0b01e44e121ea68724da16f25f7e24386c53de | [
"MIT"
] | 1 | 2015-12-16T04:01:03.000Z | 2015-12-16T04:01:03.000Z | lintcode/000-055-Compare-Strings/CompareStrings_001.py | cc13ny/all-in | bc0b01e44e121ea68724da16f25f7e24386c53de | [
"MIT"
] | 1 | 2016-02-09T06:00:07.000Z | 2016-02-09T07:20:13.000Z | lintcode/000-055-Compare-Strings/CompareStrings_001.py | cc13ny/all-in | bc0b01e44e121ea68724da16f25f7e24386c53de | [
"MIT"
] | 2 | 2019-06-27T09:07:26.000Z | 2019-07-01T04:40:13.000Z | class Solution:
"""
@param A : A string includes Upper Case letters
@param B : A string includes Upper Case letters
@return : if string A contains all of the characters in B return True else return False
"""
def compareStrings(self, A, B):
# write your code here
tb = {}
... | 26.208333 | 92 | 0.45628 |
4d35c70068e900dacc9e128043ee52c8cd90fd4d | 1,589 | py | Python | Co-Simulation/Sumo/sumo-1.7.0/tools/build/sumo/__init__.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/build/sumo/__init__.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/build/sumo/__init__.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) 2020-2020 German Aerospace Center (DLR) and others.
# This program and the accompanying materials are made available under the
# terms of the Eclipse Public License 2.0 which is available at
# https://www.eclipse.org/legal/epl-2.... | 34.543478 | 107 | 0.756451 |
42875a6279022ccf1abd4b6dcd202b97c9b11340 | 43 | py | Python | modelindex/consts.py | datumbox/model-index | a39af5f8aaa2a90b8fc7180744a855282360067a | [
"MIT"
] | 12 | 2021-02-26T08:19:00.000Z | 2022-01-26T14:00:16.000Z | modelindex/consts.py | datumbox/model-index | a39af5f8aaa2a90b8fc7180744a855282360067a | [
"MIT"
] | null | null | null | modelindex/consts.py | datumbox/model-index | a39af5f8aaa2a90b8fc7180744a855282360067a | [
"MIT"
] | 3 | 2021-03-19T13:51:56.000Z | 2021-08-25T05:25:52.000Z |
MODEL_INDEX_ROOT_FILE = "model-index.yml"
| 14.333333 | 41 | 0.790698 |
6733dce558c9769af41f3d5a973ab0c637e89701 | 2,087 | py | Python | collect_images.py | akutan/akutan.github.io | 005d1309a10a481b9fc72a5e568a007dea647b56 | [
"CC-BY-4.0"
] | 1 | 2020-09-01T07:17:27.000Z | 2020-09-01T07:17:27.000Z | collect_images.py | akutan/akutan.github.io | 005d1309a10a481b9fc72a5e568a007dea647b56 | [
"CC-BY-4.0"
] | null | null | null | collect_images.py | akutan/akutan.github.io | 005d1309a10a481b9fc72a5e568a007dea647b56 | [
"CC-BY-4.0"
] | null | null | null | #!/usr/bin/env python
import os
import os.path as osp
post_dir = '_posts/'
image_dir = 'Galerie.markdown'
filenames = os.listdir(post_dir)
filename_images = {}
for filename in filenames[::-1]:
if not filename.endswith('.markdown'):
continue
total_images = []
with open(osp.join(pos... | 25.144578 | 125 | 0.518448 |
67c03e5bcc6edb873b422e2c75802206d9949453 | 730 | py | Python | common/models/food/FoodSaleChangeLog.py | yao6891/FlaskOrdering | cbd24bd8d95afaba91ce4d6b1b3548c4e82e3807 | [
"Apache-2.0"
] | 2 | 2019-06-10T08:57:47.000Z | 2021-06-12T16:22:15.000Z | common/models/food/FoodSaleChangeLog.py | yao6891/FlaskOrdering | cbd24bd8d95afaba91ce4d6b1b3548c4e82e3807 | [
"Apache-2.0"
] | null | null | null | common/models/food/FoodSaleChangeLog.py | yao6891/FlaskOrdering | cbd24bd8d95afaba91ce4d6b1b3548c4e82e3807 | [
"Apache-2.0"
] | null | null | null | # coding: utf-8
from sqlalchemy import Column, DateTime, Integer, Numeric
from sqlalchemy.schema import FetchedValue
from application import db
class FoodSaleChangeLog(db.Model):
__tablename__ = 'food_sale_change_log'
id = db.Column(db.Integer, primary_key=True)
food_id = db.Column(db.Integer, nullable=F... | 45.625 | 97 | 0.765753 |
c02d3276aa96d4c38d04a36ef2efd464b749e306 | 1,000 | py | Python | frappe-bench/apps/erpnext/erpnext/patches/v10_0/update_territory_and_customer_group.py | Semicheche/foa_frappe_docker | a186b65d5e807dd4caf049e8aeb3620a799c1225 | [
"MIT"
] | null | null | null | frappe-bench/apps/erpnext/erpnext/patches/v10_0/update_territory_and_customer_group.py | Semicheche/foa_frappe_docker | a186b65d5e807dd4caf049e8aeb3620a799c1225 | [
"MIT"
] | null | null | null | frappe-bench/apps/erpnext/erpnext/patches/v10_0/update_territory_and_customer_group.py | Semicheche/foa_frappe_docker | a186b65d5e807dd4caf049e8aeb3620a799c1225 | [
"MIT"
] | null | null | null | import frappe
from frappe.model.rename_doc import get_fetch_fields
def execute():
ignore_doctypes = ["Lead", "Opportunity", "POS Profile", "Tax Rule", "Pricing Rule"]
customers = frappe.get_all('Customer', fields=["name", "customer_group"])
customer_group_fetch = get_fetch_fields('Customer', 'Customer Group', ignor... | 34.482759 | 89 | 0.679 |
3f00add3c656ba52183abb451f1c6a22b34e1040 | 11,707 | py | Python | Utils/py/SimsparkTests/AgentController.py | tarsoly/NaoTH | dcd2b67ef6bf9953c81d3e1b26e543b5922b7d52 | [
"ECL-2.0",
"Apache-2.0"
] | null | null | null | Utils/py/SimsparkTests/AgentController.py | tarsoly/NaoTH | dcd2b67ef6bf9953c81d3e1b26e543b5922b7d52 | [
"ECL-2.0",
"Apache-2.0"
] | null | null | null | Utils/py/SimsparkTests/AgentController.py | tarsoly/NaoTH | dcd2b67ef6bf9953c81d3e1b26e543b5922b7d52 | [
"ECL-2.0",
"Apache-2.0"
] | null | null | null | import ctypes
import logging
import multiprocessing
import os
import re
import socket
import struct
import subprocess
import time
import signal
from naoth import Messages_pb2
class Command:
"""Class representing a command for a simspark agent."""
def __init__(self, name, args=None):
"""
Cons... | 39.417508 | 140 | 0.595797 |
58e0e410d5ca182103e145756e72816c20e9c914 | 813 | py | Python | week-03/pyCooper.py | reganartinfo/rtp-sfpc-2020 | ecb478d2e00f57c57ecccb3585135cb2f72753c1 | [
"MIT"
] | null | null | null | week-03/pyCooper.py | reganartinfo/rtp-sfpc-2020 | ecb478d2e00f57c57ecccb3585135cb2f72753c1 | [
"MIT"
] | null | null | null | week-03/pyCooper.py | reganartinfo/rtp-sfpc-2020 | ecb478d2e00f57c57ecccb3585135cb2f72753c1 | [
"MIT"
] | null | null | null | from collections import OrderedDict
import random
def communication_by_design(sr_in):
sr_l = list(sr_in)
color_dict = OrderedDict()
dk_brown = (32, 16, 6)
lt_brown = (128, 65, 46)
orange = (178, 83, 47)
pink = (145, 51, 87)
color_default = dk_brown
colors_random = [lt_brown, orange, p... | 23.228571 | 51 | 0.586716 |
58e27058a02c4375a3ef020f5d0bd3e2264c8f06 | 7,102 | py | Python | tests/test_007_aemtHinzufuegen.py | mribrgr/StuRa-Mitgliederdatenbank | 87a261d66c279ff86056e315b05e6966b79df9fa | [
"MIT"
] | 8 | 2019-11-26T13:34:46.000Z | 2021-06-21T13:41:57.000Z | src/tests/test_007_aemtHinzufuegen.py | Sumarbrander/Stura-Mitgliederdatenbank | 691dbd33683b2c2d408efe7a3eb28e083ebcd62a | [
"MIT"
] | 93 | 2019-12-16T09:29:10.000Z | 2021-04-24T12:03:33.000Z | src/tests/test_007_aemtHinzufuegen.py | Sumarbrander/Stura-Mitgliederdatenbank | 691dbd33683b2c2d408efe7a3eb28e083ebcd62a | [
"MIT"
] | 2 | 2020-12-03T12:43:19.000Z | 2020-12-22T21:48:47.000Z | from tests.MyTestCase import MyTestCase
from tests.MyFuncLogin import loginAsLukasAdmin
from tests.MyFuncAemter import createAmt, createReferat, createUnterbereich
from django.urls import reverse
class TestAemtHinzufuegen(MyTestCase):
"""
Setup and Teardown functions are specified in
MyTestCase
... | 37.57672 | 114 | 0.611518 |
4519113a15e27ffbdab1a389fb98709f986abcef | 25,011 | py | Python | Installer/3rdParty/SWS/Windows/sws_python.py | Pfaufisch/ultraschall-3 | 49f9a57e639b317dffede2c15c5e9cc7f4993f61 | [
"MIT"
] | null | null | null | Installer/3rdParty/SWS/Windows/sws_python.py | Pfaufisch/ultraschall-3 | 49f9a57e639b317dffede2c15c5e9cc7f4993f61 | [
"MIT"
] | null | null | null | Installer/3rdParty/SWS/Windows/sws_python.py | Pfaufisch/ultraschall-3 | 49f9a57e639b317dffede2c15c5e9cc7f4993f61 | [
"MIT"
] | null | null | null | from reaper_python import *
def BR_EnvAlloc(p0,p1):
a=rpr_getfp('BR_EnvAlloc')
f=CFUNCTYPE(c_uint64,c_uint64,c_byte)(a)
t=(rpr_packp('TrackEnvelope*',p0),c_byte(p1))
r=f(t[0],t[1])
return rpr_unpackp('BR_Envelope*',r)
def BR_EnvCountPoints(p0):
a=rpr_getfp('BR_EnvCountPoints')
f=CFUNCTYPE(c_int,c_uint64... | 33.392523 | 197 | 0.712167 |
453e977c1ad6149f2f5c929f9e7e52f6a19b07e3 | 6,297 | py | Python | src/onegov/org/custom.py | politbuero-kampagnen/onegov-cloud | 20148bf321b71f617b64376fe7249b2b9b9c4aa9 | [
"MIT"
] | null | null | null | src/onegov/org/custom.py | politbuero-kampagnen/onegov-cloud | 20148bf321b71f617b64376fe7249b2b9b9c4aa9 | [
"MIT"
] | null | null | null | src/onegov/org/custom.py | politbuero-kampagnen/onegov-cloud | 20148bf321b71f617b64376fe7249b2b9b9c4aa9 | [
"MIT"
] | null | null | null | from onegov.chat import MessageCollection
from onegov.core.elements import Link, LinkGroup
from onegov.org import _, OrgApp
from onegov.org.models import GeneralFileCollection, ImageFileCollection, \
Organisation
from onegov.pay import PaymentProviderCollection, PaymentCollection
from onegov.ticket import TicketCol... | 29.56338 | 79 | 0.462442 |
18d9bea8bbcfb7ec767f1819f41dc8667857dbc8 | 1,463 | py | Python | abfahrt/classes/TrainInStation.py | Team-Zugig-zum-Erfolg/InformatiCup | 788076ac38bf6d8f462465b7fb96db14d13bed30 | [
"MIT"
] | 1 | 2022-01-30T14:30:02.000Z | 2022-01-30T14:30:02.000Z | abfahrt/classes/TrainInStation.py | Team-Zugig-zum-Erfolg/InformatiCup | 788076ac38bf6d8f462465b7fb96db14d13bed30 | [
"MIT"
] | null | null | null | abfahrt/classes/TrainInStation.py | Team-Zugig-zum-Erfolg/InformatiCup | 788076ac38bf6d8f462465b7fb96db14d13bed30 | [
"MIT"
] | null | null | null | from abfahrt.classes.Train import Train
from abfahrt.classes.Station import Station
class TrainInStation:
def __init__(self, arrive_train_time: int, passenger_in_train_time: int, train: Train, leave_time: int, station_id: int):
"""
Represents the assignment/reservation of a station by a train
... | 44.333333 | 244 | 0.691046 |
83182687ea022a1be631dd31b19e986c20720051 | 1,231 | py | Python | tspdb/src/data/generateTrend.py | swipswaps/tspdb | 9c085cef7164c114bb0952519b9715dcfa072b34 | [
"Apache-2.0"
] | 43 | 2019-12-10T00:05:51.000Z | 2022-03-31T21:21:20.000Z | tspdb/src/data/generateTrend.py | swipswaps/tspdb | 9c085cef7164c114bb0952519b9715dcfa072b34 | [
"Apache-2.0"
] | 5 | 2021-05-09T01:12:31.000Z | 2022-03-29T17:34:15.000Z | tspdb/src/data/generateTrend.py | swipswaps/tspdb | 9c085cef7164c114bb0952519b9715dcfa072b34 | [
"Apache-2.0"
] | 14 | 2020-01-13T21:20:07.000Z | 2022-03-31T02:11:26.000Z | ######################################################
#
# Generate Trend data
#
######################################################
import numpy as np
def linearTrendFn(**kwargs):
power = kwargs['power']
displacement =kwargs['displacement']
timeSteps = kwargs['timeSteps']
alpha = 1
... | 26.76087 | 69 | 0.564582 |
3d4ab43e836fe4aa33c5b212dc5fee6c01fb3b8a | 551 | py | Python | python_gui_tkinter/Tkinter/TkinterCourse/6_tk_label_dynamic.py | SayanGhoshBDA/code-backup | 8b6135facc0e598e9686b2e8eb2d69dd68198b80 | [
"MIT"
] | 16 | 2018-11-26T08:39:42.000Z | 2019-05-08T10:09:52.000Z | python_gui_tkinter/Tkinter/TkinterCourse/6_tk_label_dynamic.py | SayanGhoshBDA/code-backup | 8b6135facc0e598e9686b2e8eb2d69dd68198b80 | [
"MIT"
] | 8 | 2020-05-04T06:29:26.000Z | 2022-02-12T05:33:16.000Z | python_gui_tkinter/Tkinter/TkinterCourse/6_tk_label_dynamic.py | SayanGhoshBDA/code-backup | 8b6135facc0e598e9686b2e8eb2d69dd68198b80 | [
"MIT"
] | 5 | 2020-02-11T16:02:21.000Z | 2021-02-05T07:48:30.000Z | import tkinter as tk
# The following script shows an example, where a label is dynamically incremented by 1 until the stop button is pressed:
counter = 0
def counter_label(label):
def count():
global counter
counter += 1
label.config(text=str(counter))
label.after(1000, count) # 1000 represents 1 ... | 23.956522 | 121 | 0.711434 |
3d52a4a1517fe5bff1040cae90fb9d9b7d5dea66 | 1,733 | py | Python | furniture_store/furniture_store/web/forms.py | trenev/softuni-python-web-basics | 0fcf6b7f3389d06685d40615c376dc4027e772f2 | [
"MIT"
] | 1 | 2022-03-03T10:16:14.000Z | 2022-03-03T10:16:14.000Z | furniture_store/furniture_store/web/forms.py | trenev/softuni-python-web-basics | 0fcf6b7f3389d06685d40615c376dc4027e772f2 | [
"MIT"
] | null | null | null | furniture_store/furniture_store/web/forms.py | trenev/softuni-python-web-basics | 0fcf6b7f3389d06685d40615c376dc4027e772f2 | [
"MIT"
] | null | null | null | from django import forms
from django.core.validators import MinLengthValidator, MinValueValidator, MaxValueValidator
from furniture_store.web.validators import validate_min_price
class FurnitureForm(forms.Form):
type = forms.CharField(
max_length=30,
validators=(
MinLengthValidator(4)... | 21.936709 | 91 | 0.55049 |
1865ccdc510ab85617b882c455039cd7084d349b | 547 | py | Python | 一、工程基础/软件工程/算法与数据结构/力扣题目/leetcode_001.py | ethan-sui/AI-algorithm-engineer-knowledge | 24795b23a4cbeb6e6839e0cae65f7745be666da6 | [
"Apache-2.0"
] | 209 | 2020-10-06T08:34:45.000Z | 2022-03-08T08:35:15.000Z | 一、工程基础/软件工程/算法与数据结构/力扣题目/leetcode_001.py | ethan-sui/AI-algorithm-engineer-knowledge | 24795b23a4cbeb6e6839e0cae65f7745be666da6 | [
"Apache-2.0"
] | null | null | null | 一、工程基础/软件工程/算法与数据结构/力扣题目/leetcode_001.py | ethan-sui/AI-algorithm-engineer-knowledge | 24795b23a4cbeb6e6839e0cae65f7745be666da6 | [
"Apache-2.0"
] | 8 | 2020-10-09T09:07:18.000Z | 2021-05-18T10:30:46.000Z | # 1、两数之和
# 一、暴力求解,两层循环,时间复杂度O(n^2),空间复杂度O(1)
def twoSum1(nums, target):
for i in range(len(nums)-1):
for j in range(i+1, len(nums)):
if nums[i] + nums[j] == target:
return [i, j]
# 二、哈希表来做,检查target-num是否在哈希表中,这样就可以将O(n)降为O(1),所以总时间复杂度为O(n),空间时间复杂度O(n)
def twoSum2(nums, target):
... | 28.789474 | 72 | 0.588665 |
a1012cd8b3c77b16a62784a42d4dd644f764d769 | 696 | py | Python | python/synchronization_primitives/barrier_tut.py | zeroam/TIL | 43e3573be44c7f7aa4600ff8a34e99a65cbdc5d1 | [
"MIT"
] | null | null | null | python/synchronization_primitives/barrier_tut.py | zeroam/TIL | 43e3573be44c7f7aa4600ff8a34e99a65cbdc5d1 | [
"MIT"
] | null | null | null | python/synchronization_primitives/barrier_tut.py | zeroam/TIL | 43e3573be44c7f7aa4600ff8a34e99a65cbdc5d1 | [
"MIT"
] | null | null | null | from random import randrange
from threading import Barrier, Thread
from time import ctime, sleep
num = 4
# 4 threads will need to pass this barrier to get released.
b = Barrier(num)
names = ["Harsh", "Lokesh", "George", "Iqbal"]
def player():
name = names.pop()
sleep(randrange(2, 5))
print('%s reached th... | 22.451613 | 95 | 0.672414 |
a125ee59f14a586a9691f4de164f6f9b29fae1a7 | 1,989 | py | Python | Documentation/__init__.py | simonbredemeier/ds100bot | 1318b32b818891f4bc6d24f12fcf0ceae898f8bd | [
"Apache-2.0"
] | 15 | 2019-12-20T08:24:31.000Z | 2022-03-18T09:24:25.000Z | Documentation/__init__.py | simonbredemeier/ds100bot | 1318b32b818891f4bc6d24f12fcf0ceae898f8bd | [
"Apache-2.0"
] | 124 | 2020-04-20T04:36:49.000Z | 2022-01-29T11:08:09.000Z | Documentation/__init__.py | simonbredemeier/ds100bot | 1318b32b818891f4bc6d24f12fcf0ceae898f8bd | [
"Apache-2.0"
] | 12 | 2020-07-08T22:19:39.000Z | 2022-03-19T09:13:11.000Z | """Collects everything for the successful creation of HTML Documentation"""
from xml.etree import ElementTree as ET
from pathlib import Path
from .generator import Generator
from .dump import Dump
from .dump_bl import DumpBlacklist
from .markdowndoc import MarkdownDoc
from .licenses import Licenses
def create_documen... | 37.528302 | 83 | 0.683761 |
62bb5d5670af34be2d21bc5e23439d9dfb231d99 | 432 | py | Python | 120-triangle/120-triangle.py | hyeseonko/LeetCode | 48dfc93f1638e13041d8ce1420517a886abbdc77 | [
"MIT"
] | 2 | 2021-12-05T14:29:06.000Z | 2022-01-01T05:46:13.000Z | triangle/triangle.py | hyeseonko/LeetCode | 48dfc93f1638e13041d8ce1420517a886abbdc77 | [
"MIT"
] | null | null | null | triangle/triangle.py | hyeseonko/LeetCode | 48dfc93f1638e13041d8ce1420517a886abbdc77 | [
"MIT"
] | null | null | null | class Solution:
def minimumTotal(self, triangle: List[List[int]]) -> int:
dp=[triangle[0][0]]
for row_list in triangle[1:]:
# From backwards, value won't be affected.
dp.append(row_list[-1]+dp[-1])
len_row = len(row_list)
for i in range(-2,-(len_row), ... | 39.272727 | 61 | 0.516204 |
b8e410fbe0aeb5ea65572770cad090892c151255 | 2,396 | py | Python | src/torch/npu/npu_frontend_enhance.py | Ascend/pytorch | 39849cf72dafe8d2fb68bd1679d8fd54ad60fcfc | [
"BSD-3-Clause"
] | 1 | 2021-12-02T03:07:35.000Z | 2021-12-02T03:07:35.000Z | src/torch/npu/npu_frontend_enhance.py | Ascend/pytorch | 39849cf72dafe8d2fb68bd1679d8fd54ad60fcfc | [
"BSD-3-Clause"
] | 1 | 2021-11-12T07:23:03.000Z | 2021-11-12T08:28:13.000Z | src/torch/npu/npu_frontend_enhance.py | Ascend/pytorch | 39849cf72dafe8d2fb68bd1679d8fd54ad60fcfc | [
"BSD-3-Clause"
] | null | null | null | # Copyright (c) 2020 Huawei Technologies Co., Ltd
# Copyright (c) 2019, Facebook CORPORATION.
# All rights reserved.
#
# Licensed under the BSD 3-Clause License (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# https://opensource.org/lice... | 32.821918 | 117 | 0.723289 |
772303e83e2f6082b895a0bad2f852771a2a9878 | 1,177 | py | Python | src/visuanalytics/tests/analytics/transform/types/test_transform_add_data.py | mxsph/Data-Analytics | c82ff54b78f50b6660d7640bfee96ea68bef598f | [
"MIT"
] | 3 | 2020-08-24T19:02:09.000Z | 2021-05-27T20:22:41.000Z | src/visuanalytics/tests/analytics/transform/types/test_transform_add_data.py | mxsph/Data-Analytics | c82ff54b78f50b6660d7640bfee96ea68bef598f | [
"MIT"
] | 342 | 2020-08-13T10:24:23.000Z | 2021-08-12T14:01:52.000Z | src/visuanalytics/tests/analytics/transform/types/test_transform_add_data.py | visuanalytics/visuanalytics | f9cce7bc9e3227568939648ddd1dd6df02eac752 | [
"MIT"
] | 8 | 2020-09-01T07:11:18.000Z | 2021-04-09T09:02:11.000Z | import unittest
from visuanalytics.tests.analytics.transform.transform_test_helper import prepare_test
class TestTransformAddData(unittest.TestCase):
def setUp(self):
self.data = {
"test": "test"
}
def test_add_data(self):
values = [
{
"type": ... | 24.020408 | 86 | 0.458794 |
775ba877f49e400d6efe8908ae67ae1ce7f2105f | 1,307 | py | Python | service/pydub_mp3_segment.py | wangkaibiao/SettlersFinancialData3 | 498249e14f24bfa3186f07e8f66ee624d08c6ff1 | [
"MIT"
] | null | null | null | service/pydub_mp3_segment.py | wangkaibiao/SettlersFinancialData3 | 498249e14f24bfa3186f07e8f66ee624d08c6ff1 | [
"MIT"
] | null | null | null | service/pydub_mp3_segment.py | wangkaibiao/SettlersFinancialData3 | 498249e14f24bfa3186f07e8f66ee624d08c6ff1 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
"""
Created on Mon Jan 14 13:04:56 2019
@author: Administrator
"""
from pydub import AudioSegment
from pydub.silence import split_on_silence
def match_target_amplitude(aChunk, target_dBFS):
''' Normalize given audio chunk '''
change_in_dBFS = target_dBFS - aChunk.dBFS ... | 31.119048 | 87 | 0.694721 |
65532074aaeb8150323837b1c8ce84274a9714a4 | 899 | py | Python | PMIa/2014/VINOGRADOVA_J_S/task_4_48.py | YukkaSarasti/pythonintask | eadf4245abb65f4400a3bae30a4256b4658e009c | [
"Apache-2.0"
] | null | null | null | PMIa/2014/VINOGRADOVA_J_S/task_4_48.py | YukkaSarasti/pythonintask | eadf4245abb65f4400a3bae30a4256b4658e009c | [
"Apache-2.0"
] | null | null | null | PMIa/2014/VINOGRADOVA_J_S/task_4_48.py | YukkaSarasti/pythonintask | eadf4245abb65f4400a3bae30a4256b4658e009c | [
"Apache-2.0"
] | null | null | null | # Задача 4. Вариант 48.
# Напишите программу, которая выводит имя, под которым скрывается Герхард Герхардс. Дополнительно необходимо вывести область интересов указанной личности, место рождения, годы рождения и смерти (если человек умер),
# вычислить возраст на данный момент (или момент смерти). Для хранения всех
# ... | 39.086957 | 215 | 0.766407 |
6590ca656921e86fafb30dac24fe913f86234f70 | 2,271 | py | Python | Packs/CommonScripts/Scripts/RegexExtractAll/RegexExtractAll_test.py | diCagri/content | c532c50b213e6dddb8ae6a378d6d09198e08fc9f | [
"MIT"
] | 799 | 2016-08-02T06:43:14.000Z | 2022-03-31T11:10:11.000Z | Packs/CommonScripts/Scripts/RegexExtractAll/RegexExtractAll_test.py | diCagri/content | c532c50b213e6dddb8ae6a378d6d09198e08fc9f | [
"MIT"
] | 9,317 | 2016-08-07T19:00:51.000Z | 2022-03-31T21:56:04.000Z | Packs/CommonScripts/Scripts/RegexExtractAll/RegexExtractAll_test.py | diCagri/content | c532c50b213e6dddb8ae6a378d6d09198e08fc9f | [
"MIT"
] | 1,297 | 2016-08-04T13:59:00.000Z | 2022-03-31T23:43:06.000Z | import demistomock as demisto
def test_main(mocker):
from RegexExtractAll import main
# test basic functionality
with open('TestData/data.txt', 'r') as f:
test_data = f.read()
mocker.patch.object(demisto, 'args', return_value={
'value': test_data,
'regex': r'\b[A-Za-z0-9._%=+... | 32.913043 | 82 | 0.600176 |
b867b39aa4a0374020b25cafbeda8cec9d369bd1 | 6,740 | py | Python | Fastir_Collector/dump/mbr.py | Unam3dd/Train-2018-2020 | afb6ae70fe338cbe55a21b74648d91996b818fa2 | [
"MIT"
] | 4 | 2021-04-23T15:39:17.000Z | 2021-12-27T22:53:24.000Z | Fastir_Collector/dump/mbr.py | Unam3dd/Train-2018-2020 | afb6ae70fe338cbe55a21b74648d91996b818fa2 | [
"MIT"
] | null | null | null | Fastir_Collector/dump/mbr.py | Unam3dd/Train-2018-2020 | afb6ae70fe338cbe55a21b74648d91996b818fa2 | [
"MIT"
] | 2 | 2021-04-19T08:28:54.000Z | 2022-01-19T13:23:29.000Z | from construct import *
from distorm3 import Decode, Decode16Bits
import hexdump
import os
class Mbr:
def __init__(self, path):
self.mbrHexa = ""
self.mbrStruct = ""
self.bootloaderCode = ""
self.offset = 0
self.partition = {"name": []}
self.signature = ""
s... | 50.298507 | 100 | 0.346439 |
b87a6206fa4b36256e81950b05aaa81f0a591ede | 77 | py | Python | python/coursera_python/TORONTO/test/12.py | SayanGhoshBDA/code-backup | 8b6135facc0e598e9686b2e8eb2d69dd68198b80 | [
"MIT"
] | 16 | 2018-11-26T08:39:42.000Z | 2019-05-08T10:09:52.000Z | python/coursera_python/TORONTO/test/12.py | SayanGhoshBDA/code-backup | 8b6135facc0e598e9686b2e8eb2d69dd68198b80 | [
"MIT"
] | 8 | 2020-05-04T06:29:26.000Z | 2022-02-12T05:33:16.000Z | python/coursera_python/TORONTO/test/12.py | SayanGhoshBDA/code-backup | 8b6135facc0e598e9686b2e8eb2d69dd68198b80 | [
"MIT"
] | 5 | 2020-02-11T16:02:21.000Z | 2021-02-05T07:48:30.000Z | values = []
for num in range(1, 4):
values.append(num * 3)
print(values)
| 15.4 | 26 | 0.623377 |
b8b96817006b19edf8da0082b3fd713a39ff8d64 | 1,394 | py | Python | Packs/ForescoutEyeInspect/Scripts/ForescoutEyeInspectButtonGetPCAP/ForescoutEyeInspectButtonGetPCAP_test.py | jrauen/content | 81a92be1cbb053a5f26a6f325eff3afc0ca840e0 | [
"MIT"
] | 2 | 2021-12-06T21:38:24.000Z | 2022-01-13T08:23:36.000Z | Packs/ForescoutEyeInspect/Scripts/ForescoutEyeInspectButtonGetPCAP/ForescoutEyeInspectButtonGetPCAP_test.py | jrauen/content | 81a92be1cbb053a5f26a6f325eff3afc0ca840e0 | [
"MIT"
] | 61 | 2021-10-07T08:54:38.000Z | 2022-03-31T10:25:35.000Z | Packs/ForescoutEyeInspect/Scripts/ForescoutEyeInspectButtonGetPCAP/ForescoutEyeInspectButtonGetPCAP_test.py | henry-sue-pa/content | 043c6badfb4f9c80673cad9242fdea72efe301f7 | [
"MIT"
] | 2 | 2022-01-05T15:27:01.000Z | 2022-02-01T19:27:43.000Z | from pytest_mock.plugin import MockerFixture
import demistomock as demisto
import ForescoutEyeInspectButtonGetPCAP
from CommonServerPython import EntryFormat, EntryType
from ForescoutEyeInspectButtonGetPCAP import get_pcap, main
def test_get_pcap(mocker: MockerFixture):
alert_id = 1
mock_file_result = {
... | 34 | 97 | 0.709469 |
b2a04b76ccf9952e37575b7b0205d1a156209387 | 2,259 | py | Python | pyventskalender/tag22_loesung.py | kopp/pyventskalender | 6f6455f3c1db07f65a772b2716e4be95fbcd1804 | [
"MIT"
] | null | null | null | pyventskalender/tag22_loesung.py | kopp/pyventskalender | 6f6455f3c1db07f65a772b2716e4be95fbcd1804 | [
"MIT"
] | null | null | null | pyventskalender/tag22_loesung.py | kopp/pyventskalender | 6f6455f3c1db07f65a772b2716e4be95fbcd1804 | [
"MIT"
] | null | null | null | import arcade
class FindeDenSchnellstenWeg(arcade.Window):
"""
In dieser Klasse implementieren wir das Spiel.
"""
def __init__(self, breite, hoehe):
super().__init__(breite, hoehe, "Finde den schnellsten Weg")
self.breite = breite
self.hoehe = hoehe
self.spieler = arca... | 33.716418 | 77 | 0.619743 |
0c35f0cd6e55b4882186c3466e3c04bbb54e8d59 | 6,838 | py | Python | src/tools/data/hdfs_export/hdfs_export_utils.py | visit-dav/vis | c08bc6e538ecd7d30ddc6399ec3022b9e062127e | [
"BSD-3-Clause"
] | 226 | 2018-12-29T01:13:49.000Z | 2022-03-30T19:16:31.000Z | src/tools/data/hdfs_export/hdfs_export_utils.py | visit-dav/vis | c08bc6e538ecd7d30ddc6399ec3022b9e062127e | [
"BSD-3-Clause"
] | 5,100 | 2019-01-14T18:19:25.000Z | 2022-03-31T23:08:36.000Z | src/tools/data/hdfs_export/hdfs_export_utils.py | visit-dav/vis | c08bc6e538ecd7d30ddc6399ec3022b9e062127e | [
"BSD-3-Clause"
] | 84 | 2019-01-24T17:41:50.000Z | 2022-03-10T10:01:46.000Z | import os
import vtk
#
# Represent a zero-origin index using a base-64 ascii digits string.
# Digit chars LSC to MSC are 0-9a-zA-Z%# for 64 (6 bits) digit chars.
# Using 6-bit digits chars (base-64) in this way means our ascii
# representation for an integer index is 25% inefficient because
# we're using 8-bit ascii c... | 33.033816 | 136 | 0.606756 |
a7c66f71e57dd58c921dfe81d17fa5111ca6ad6e | 788 | py | Python | bds_setup/views.py | littlegwzh/BDS | 6233ea429d173f855c3f9d19fea284f53778e828 | [
"MIT"
] | null | null | null | bds_setup/views.py | littlegwzh/BDS | 6233ea429d173f855c3f9d19fea284f53778e828 | [
"MIT"
] | null | null | null | bds_setup/views.py | littlegwzh/BDS | 6233ea429d173f855c3f9d19fea284f53778e828 | [
"MIT"
] | null | null | null | from django.shortcuts import render # 导入重定向
from django.contrib.auth.decorators import login_required
from .models import Station
@login_required
def bds_setup(request):
return render(request, "bds_setup/8-bds_setup.html")
@login_required
def station(request):
station_detail = Station.objects.all()
uni... | 32.833333 | 79 | 0.719543 |
0b2cd75a82a77a376eaa8d2c9830063582ce05d3 | 1,773 | py | Python | Co-Simulation/Sumo/sumo-1.7.0/tools/import/transportationTestProblems.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/import/transportationTestProblems.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/import/transportationTestProblems.py | uruzahe/carla | 940c2ab23cce1eda1ef66de35f66b42d40865fb1 | [
"MIT"
] | 1 | 2020-11-20T19:31:26.000Z | 2020-11-20T19:31:26.000Z | #!/usr/bin/env python
# Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo
# Copyright (C) 2014-2020 German Aerospace Center (DLR) and others.
# This program and the accompanying materials are made available under the
# terms of the Eclipse Public License 2.0 which is available at
# https://www.ec... | 37.723404 | 82 | 0.670051 |
0b92b0520e3e59b9924ec3bd95fd66beec9a98ad | 3,479 | py | Python | DataCollector/handlers.py | TrojanCrypto/Dashboard | 3af795980c7aa90505afae684297e43366cb6ee5 | [
"MIT"
] | null | null | null | DataCollector/handlers.py | TrojanCrypto/Dashboard | 3af795980c7aa90505afae684297e43366cb6ee5 | [
"MIT"
] | null | null | null | DataCollector/handlers.py | TrojanCrypto/Dashboard | 3af795980c7aa90505afae684297e43366cb6ee5 | [
"MIT"
] | null | null | null | import logging
import time
import traceback
import webapp2
from google.appengine.api import taskqueue
from .models import CoinbaseMarket, BinanceMarket, CryptoNews
import utils
class CoinbaseMarketHandler(webapp2.RequestHandler):
def update(self):
try:
if self.request.method == 'GET' and "X-... | 33.451923 | 101 | 0.453866 |
b2b4307ba0e505ddc86877782fc3e52deb921fb8 | 349 | py | Python | python/coursera_python/MICHIGAN/DataStructures/week3/mbox.py | SayanGhoshBDA/code-backup | 8b6135facc0e598e9686b2e8eb2d69dd68198b80 | [
"MIT"
] | 16 | 2018-11-26T08:39:42.000Z | 2019-05-08T10:09:52.000Z | python/coursera_python/MICHIGAN/DataStructures/week3/mbox.py | SayanGhoshBDA/code-backup | 8b6135facc0e598e9686b2e8eb2d69dd68198b80 | [
"MIT"
] | 8 | 2020-05-04T06:29:26.000Z | 2022-02-12T05:33:16.000Z | python/coursera_python/MICHIGAN/DataStructures/week3/mbox.py | SayanGhoshBDA/code-backup | 8b6135facc0e598e9686b2e8eb2d69dd68198b80 | [
"MIT"
] | 5 | 2020-02-11T16:02:21.000Z | 2021-02-05T07:48:30.000Z |
fname = input("Enter file name: ")
if len(fname) < 1 : fname = "mbox-short.txt"
fh = open(fname)
count = 0
for line in fh:
line1 = line.rstrip()
if "From:" in line1:
continue
if "From " in line1:
words = line.split()
count = count + 1
print(words[1])
print("There were", count, "lines in the file with... | 14.541667 | 75 | 0.627507 |
685b36c2bf1beac7e5be9e043b0ebf5223b0a655 | 40,418 | py | Python | exercises/networking_selfpaced/networking-workshop/collections/ansible_collections/community/general/tests/unit/module_utils/network/ftd/test_fdm_swagger_validator.py | tr3ck3r/linklight | 5060f624c235ecf46cb62cefcc6bddc6bf8ca3e7 | [
"MIT"
] | null | null | null | exercises/networking_selfpaced/networking-workshop/collections/ansible_collections/community/general/tests/unit/module_utils/network/ftd/test_fdm_swagger_validator.py | tr3ck3r/linklight | 5060f624c235ecf46cb62cefcc6bddc6bf8ca3e7 | [
"MIT"
] | null | null | null | exercises/networking_selfpaced/networking-workshop/collections/ansible_collections/community/general/tests/unit/module_utils/network/ftd/test_fdm_swagger_validator.py | tr3ck3r/linklight | 5060f624c235ecf46cb62cefcc6bddc6bf8ca3e7 | [
"MIT"
] | null | null | null | # Copyright (c) 2018 Cisco and/or its affiliates.
#
# 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 v... | 36.055308 | 147 | 0.405265 |
68a2d8758667dfdc7c8e5dd7014ce99abb953b30 | 1,460 | py | Python | aoc2020/day_19/part_2.py | en0/aoc2020 | a2f41b909dffe1f366682b3d03fd5fbdbc924ec0 | [
"MIT"
] | null | null | null | aoc2020/day_19/part_2.py | en0/aoc2020 | a2f41b909dffe1f366682b3d03fd5fbdbc924ec0 | [
"MIT"
] | null | null | null | aoc2020/day_19/part_2.py | en0/aoc2020 | a2f41b909dffe1f366682b3d03fd5fbdbc924ec0 | [
"MIT"
] | null | null | null | import re
from aoc2020 import *
class Solution(SolutionABC):
expected = 12
rules = None
def get_resource_name(self, name: str) -> str:
if self.testing and name == "input":
return "test-input-2"
return super().get_resource_name(name)
def solve(self) -> any:
with se... | 34.761905 | 100 | 0.517123 |
0409763fd02b12e207eda01bf2cd0a65234e8347 | 294,553 | py | Python | FREE-APN-main/Apn1.py | Zusyaku/Termux-And-Lali-Linux-V2 | b1a1b0841d22d4bf2cc7932b72716d55f070871e | [
"Apache-2.0"
] | 2 | 2021-11-17T03:35:03.000Z | 2021-12-08T06:00:31.000Z | FREE-APN-main/Apn1.py | Zusyaku/Termux-And-Lali-Linux-V2 | b1a1b0841d22d4bf2cc7932b72716d55f070871e | [
"Apache-2.0"
] | null | null | null | FREE-APN-main/Apn1.py | Zusyaku/Termux-And-Lali-Linux-V2 | b1a1b0841d22d4bf2cc7932b72716d55f070871e | [
"Apache-2.0"
] | 2 | 2021-11-05T18:07:48.000Z | 2022-02-24T21:25:07.000Z | # coding=utf-8
# Obfuscate BY Aldi Bachtiar Rifa
Aldi=['00000000000000000000000000000000000', '000000000000000000000000000000000', '00000000000000000000000000000000000000000000000', '000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000', '000000000000000... | 36,819.125 | 294,466 | 0.94566 |
9bf851df417c4a4efa86f3e7d6f1337b42517812 | 1,006 | py | Python | frappe-bench/apps/erpnext/erpnext/accounts/report/delivered_items_to_be_billed/delivered_items_to_be_billed.py | Semicheche/foa_frappe_docker | a186b65d5e807dd4caf049e8aeb3620a799c1225 | [
"MIT"
] | null | null | null | frappe-bench/apps/erpnext/erpnext/accounts/report/delivered_items_to_be_billed/delivered_items_to_be_billed.py | Semicheche/foa_frappe_docker | a186b65d5e807dd4caf049e8aeb3620a799c1225 | [
"MIT"
] | null | null | null | frappe-bench/apps/erpnext/erpnext/accounts/report/delivered_items_to_be_billed/delivered_items_to_be_billed.py | Semicheche/foa_frappe_docker | a186b65d5e807dd4caf049e8aeb3620a799c1225 | [
"MIT"
] | null | null | null | # Copyright (c) 2013, Frappe Technologies Pvt. Ltd. and contributors
# For license information, please see license.txt
from __future__ import unicode_literals
import frappe
from frappe import _
from erpnext.accounts.report.non_billed_report import get_ordered_to_be_billed_data
def execute(filters=None):
columns = ge... | 38.692308 | 109 | 0.680915 |
acce9e66bb47e4fffbda2da1d16c6221518f00e2 | 585 | py | Python | src/assets/experiences/sortierroboter/Demo/plotting.py | TU-Blueberry/bluestberry | fbde8dbcd730fe5c4e69ba15a1208a5c0903aa7d | [
"MIT"
] | 1 | 2022-03-28T17:23:03.000Z | 2022-03-28T17:23:03.000Z | src/assets/experiences/sortierroboter/Demo/plotting.py | TU-Blueberry/bluestberry | fbde8dbcd730fe5c4e69ba15a1208a5c0903aa7d | [
"MIT"
] | null | null | null | src/assets/experiences/sortierroboter/Demo/plotting.py | TU-Blueberry/bluestberry | fbde8dbcd730fe5c4e69ba15a1208a5c0903aa7d | [
"MIT"
] | null | null | null | import plotly.graph_objects as go
import js
def plot_model(X, y, predictions, column_name):
fig = go.Figure()
fig.update_layout(legend=dict(
yanchor="top",
y=0.99,
xanchor="left",
x=0.01
))
fig.add_trace(go.Scatter(x=X.flatten(), y=y,
mode='markers',
... | 26.590909 | 73 | 0.57094 |
a8b40fdaf5905ce996c6aadb002c1007a3a13327 | 1,535 | py | Python | defis/admin.py | lehr-laemp/kiga-webapp-V2 | 1d35dd1deb82962e166169245fa0d4e5f265af22 | [
"Unlicense"
] | null | null | null | defis/admin.py | lehr-laemp/kiga-webapp-V2 | 1d35dd1deb82962e166169245fa0d4e5f265af22 | [
"Unlicense"
] | null | null | null | defis/admin.py | lehr-laemp/kiga-webapp-V2 | 1d35dd1deb82962e166169245fa0d4e5f265af22 | [
"Unlicense"
] | null | null | null | # -*- coding: utf-8 -*-
"""
Begonnen am 12.03.2022
@author: HM
admin.py
- Admin-Seite
"""
# ---------------------------------------------------------
import datetime
import os
import streamlit as st
from defis import helper
# ---------------------------------------------------------
def datei_laden():
... | 25.163934 | 76 | 0.560261 |
a8c0ddce44d6859a27bb083c7a795b4789c9a686 | 1,258 | py | Python | retro/cores/gba/src/platform/python/mgba/__init__.py | MatPoliquin/retro | c70c174a9818d1e97bc36e61abb4694d28fc68e1 | [
"MIT-0",
"MIT"
] | 2,706 | 2018-04-05T18:28:50.000Z | 2022-03-29T16:56:59.000Z | retro/cores/gba/src/platform/python/mgba/__init__.py | MatPoliquin/retro | c70c174a9818d1e97bc36e61abb4694d28fc68e1 | [
"MIT-0",
"MIT"
] | 242 | 2018-04-05T22:30:42.000Z | 2022-03-19T01:55:11.000Z | retro/cores/gba/src/platform/python/mgba/__init__.py | MatPoliquin/retro | c70c174a9818d1e97bc36e61abb4694d28fc68e1 | [
"MIT-0",
"MIT"
] | 464 | 2018-04-05T19:10:34.000Z | 2022-03-28T13:33:32.000Z | # Copyright (c) 2013-2017 Jeffrey Pfau
#
# This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
from ._pylib import ffi, lib
from collections import namedtuple
def createCall... | 37 | 87 | 0.698728 |
4f231b301fad37a8690244c4a9159e7a5d432eef | 3,411 | py | Python | yolov5-coreml-tflite-converter/tflite/tf_utils/representative_dataset.py | SchweizerischeBundesbahnen/sbb-ml-models | 485356aeb0a277907c160d435f7f654154046a70 | [
"MIT"
] | null | null | null | yolov5-coreml-tflite-converter/tflite/tf_utils/representative_dataset.py | SchweizerischeBundesbahnen/sbb-ml-models | 485356aeb0a277907c160d435f7f654154046a70 | [
"MIT"
] | null | null | null | yolov5-coreml-tflite-converter/tflite/tf_utils/representative_dataset.py | SchweizerischeBundesbahnen/sbb-ml-models | 485356aeb0a277907c160d435f7f654154046a70 | [
"MIT"
] | null | null | null | import os
import zipfile
from pathlib import Path
import numpy as np
import torch
from utils.datasets import LoadImages
from constants import DATA_DIR, get_zipfile_path, get_dataset_url
import logging
class RepresentativeDatasetGenerator:
def __init__(self, model_parameters, conversion_parameters, iou_threshold,... | 44.881579 | 124 | 0.646731 |
4f937640f2085ce5ae27ab9442aee9f86fb61604 | 160 | py | Python | RandKicks/test.py | jztech101/Loggy | 1883a09ebbb6c8120cae648aebeb2771e7f39d9b | [
"MIT"
] | null | null | null | RandKicks/test.py | jztech101/Loggy | 1883a09ebbb6c8120cae648aebeb2771e7f39d9b | [
"MIT"
] | 6 | 2018-02-09T18:39:37.000Z | 2018-08-31T18:40:02.000Z | RandKicks/test.py | jztech101/Loggy | 1883a09ebbb6c8120cae648aebeb2771e7f39d9b | [
"MIT"
] | null | null | null |
from supybot.test import *
class RandKicksTestCase(PluginTestCase):
plugins = ('RandKicks',)
# vim:set shiftwidth=4 tabstop=4 expandtab textwidth=79:
| 14.545455 | 56 | 0.7375 |
8c8e72416dff65837ba1c999750ed3221457ab3f | 1,714 | py | Python | CaeserCipher.py | VinayakBector2002/Hacktoberfest2021 | c99fb3dc3f3dc83f99b459b0a9089c3a91ae77a2 | [
"MIT"
] | null | null | null | CaeserCipher.py | VinayakBector2002/Hacktoberfest2021 | c99fb3dc3f3dc83f99b459b0a9089c3a91ae77a2 | [
"MIT"
] | null | null | null | CaeserCipher.py | VinayakBector2002/Hacktoberfest2021 | c99fb3dc3f3dc83f99b459b0a9089c3a91ae77a2 | [
"MIT"
] | null | null | null | small_chars = [chr(item) for item in range(ord('a'), ord('z')+1)]
upper_chars = [item.upper() for item in small_chars]
def encode_chr(chr_item, is_upper_case):
'''
Cipher each chr_item.
'''
# setting orig and end order.
if is_upper_case:
orig_ord = ord('A')
end_ord = ord(... | 32.961538 | 66 | 0.590432 |
fa4e6f5a79f6e0fd4f326d5e88aa458f23b71271 | 1,996 | py | Python | transonic/backends/typing.py | fluiddyn/transonic | a460e9f6d1139f79b668cb3306d1e8a7e190b72d | [
"BSD-3-Clause"
] | 88 | 2019-01-08T16:39:08.000Z | 2022-02-06T14:19:23.000Z | transonic/backends/typing.py | fluiddyn/transonic | a460e9f6d1139f79b668cb3306d1e8a7e190b72d | [
"BSD-3-Clause"
] | 13 | 2019-06-20T15:53:10.000Z | 2021-02-09T11:03:29.000Z | transonic/backends/typing.py | fluiddyn/transonic | a460e9f6d1139f79b668cb3306d1e8a7e190b72d | [
"BSD-3-Clause"
] | 1 | 2019-11-05T03:03:14.000Z | 2019-11-05T03:03:14.000Z | from transonic.typing import format_type_as_backend_type, MemLayout
normalized_types = {"float": "float64", "complex": "complex128", "bool_": "bool"}
class TypeFormatter:
def __init__(self, backend_name=None):
self.backend_name = backend_name
def normalize_type_name(self, name):
try:
... | 32.721311 | 81 | 0.610721 |
ad53eb43ec3aadcf1add2b26552f15764574bc3e | 2,296 | py | Python | gpt3/05-max_tokens.py | sixvo-labs/Sapir | 07ba6fe1c83e2d5fbf139f1601a28df6b6740483 | [
"MIT"
] | null | null | null | gpt3/05-max_tokens.py | sixvo-labs/Sapir | 07ba6fe1c83e2d5fbf139f1601a28df6b6740483 | [
"MIT"
] | null | null | null | gpt3/05-max_tokens.py | sixvo-labs/Sapir | 07ba6fe1c83e2d5fbf139f1601a28df6b6740483 | [
"MIT"
] | null | null | null | #max_tokens.py
"""
Q&A
max_tokens=100,
"""
"""
Grammar correction
max_tokens=60,
"""
"""
Summarize for a 2nd grader
max_tokens=64,
"""
"""
Natural language to OpenAI API
max_tokens=64,
"""
"""
Text to command
max_tokens=100,
"""
"""
English to other languages
max_tokens=150,
"""
"""
Natural language to Str... | 11.537688 | 37 | 0.653746 |
a8f0c3dee2d6f5c2f0a746a47a0ddc4853bff0b2 | 15,875 | py | Python | Python/adventure/beta/lib/player.py | SchickDominik/progprojects | 1eb9c5e3b9445f617b56bd9ceb02f2f182d730e2 | [
"MIT"
] | null | null | null | Python/adventure/beta/lib/player.py | SchickDominik/progprojects | 1eb9c5e3b9445f617b56bd9ceb02f2f182d730e2 | [
"MIT"
] | null | null | null | Python/adventure/beta/lib/player.py | SchickDominik/progprojects | 1eb9c5e3b9445f617b56bd9ceb02f2f182d730e2 | [
"MIT"
] | null | null | null | import random
import time
from lib.static import screen_width, clear, speech_manipulation
from lib import game_object, npc
class Player:
"""
This is the player class. Possibility for multiplayer game.
"""
def __init__(self):
self.name = ""
self.play_class = ""
self.health_max ... | 35.835214 | 135 | 0.495685 |
7e810989bbc23a5adc980d54ad86608a6d9df89d | 3,142 | py | Python | exercises/networking_selfpaced/networking-workshop/collections/ansible_collections/community/general/tests/unit/modules/network/onyx/test_onyx_ntp.py | tr3ck3r/linklight | 5060f624c235ecf46cb62cefcc6bddc6bf8ca3e7 | [
"MIT"
] | null | null | null | exercises/networking_selfpaced/networking-workshop/collections/ansible_collections/community/general/tests/unit/modules/network/onyx/test_onyx_ntp.py | tr3ck3r/linklight | 5060f624c235ecf46cb62cefcc6bddc6bf8ca3e7 | [
"MIT"
] | null | null | null | exercises/networking_selfpaced/networking-workshop/collections/ansible_collections/community/general/tests/unit/modules/network/onyx/test_onyx_ntp.py | tr3ck3r/linklight | 5060f624c235ecf46cb62cefcc6bddc6bf8ca3e7 | [
"MIT"
] | null | null | null | #
# Copyright: Ansible Project
# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
# Make coding more python3-ish
from __future__ import (absolute_import, division, print_function)
__metaclass__ = type
from ansible_collections.community.general.tests.unit.compat.mock import pa... | 40.805195 | 103 | 0.676321 |
7d459e5e55d31039adb950400638c5de3facd789 | 223 | py | Python | diversos/zippa.py | lcarlin/guppe | a0ee7b85e8687e8fb8243fbb509119a94bc6460f | [
"Apache-2.0"
] | 1 | 2021-12-18T15:29:24.000Z | 2021-12-18T15:29:24.000Z | diversos/zippa.py | lcarlin/guppe | a0ee7b85e8687e8fb8243fbb509119a94bc6460f | [
"Apache-2.0"
] | null | null | null | diversos/zippa.py | lcarlin/guppe | a0ee7b85e8687e8fb8243fbb509119a94bc6460f | [
"Apache-2.0"
] | 3 | 2021-08-23T22:45:20.000Z | 2022-02-17T13:17:09.000Z | lista1 = ["avocaddo", "abuceta", "doguinho fiadaputa", "Luiz ConZê"]
lista2 = [ 2, 4, 8, 16 ]
lista3 = [2.99, 4.89, 5.66, 99.99]
for numero , nome, valor in zip (lista2, lista1, lista3 ):
print (numero, valor, nome )
| 31.857143 | 68 | 0.618834 |
7d475d91de3f16d02fde74da5e86551d2a8d4e9d | 588 | py | Python | pacman-arch/test/pacman/tests/database011.py | Maxython/pacman-for-termux | 3b208eb9274cbfc7a27fca673ea8a58f09ebad47 | [
"MIT"
] | 23 | 2021-05-21T19:11:06.000Z | 2022-03-31T18:14:20.000Z | source/pacman-6.0.1/test/pacman/tests/database011.py | Scottx86-64/dotfiles-1 | 51004b1e2b032664cce6b553d2052757c286087d | [
"Unlicense"
] | 11 | 2021-05-21T12:08:44.000Z | 2021-12-21T08:30:08.000Z | source/pacman-6.0.1/test/pacman/tests/database011.py | Scottx86-64/dotfiles-1 | 51004b1e2b032664cce6b553d2052757c286087d | [
"Unlicense"
] | 1 | 2021-09-26T08:44:40.000Z | 2021-09-26T08:44:40.000Z | # TODO: these are labeled as database packages because they sure seem to me to
# be database-type operations. In their current implementation however they are
# calling -U and -R rather than -D. Obviously the tests will need to be updated
# if this changes.
self.description = "Install a package with --dbonly, no files ... | 32.666667 | 79 | 0.709184 |
bc10a33e59778ae2f57b6776349096b36360ee4d | 1,148 | py | Python | Graph/DFS.py | dileeppandey/hello-interview | 78f6cf4e2da4106fd07f4bd86247026396075c69 | [
"MIT"
] | null | null | null | Graph/DFS.py | dileeppandey/hello-interview | 78f6cf4e2da4106fd07f4bd86247026396075c69 | [
"MIT"
] | null | null | null | Graph/DFS.py | dileeppandey/hello-interview | 78f6cf4e2da4106fd07f4bd86247026396075c69 | [
"MIT"
] | 1 | 2020-02-12T16:57:46.000Z | 2020-02-12T16:57:46.000Z | """
DFS traversal of a graph
Credit: https://courses.csail.mit.edu/6.006/fall11/rec/rec14.pdf
"""
class DFSResult:
def __init__(self):
self.parent = {}
self.start_time = {}
self.finish_time = {}
self.edges = {} # Edge classification for directed graph.
self.order = []
... | 28 | 66 | 0.578397 |
cb5ecbb5c2327fb27fd3b2d95747f2e5aba7496c | 859 | py | Python | site/public/courses/BEW-1.1/Lessons/07-More-Testing/demo/tests.py | KitsuneNoctus/makeschool | 5eec1a18146abf70bb78b4ee3d301f6a43c9ede4 | [
"MIT"
] | 1 | 2021-08-24T20:22:19.000Z | 2021-08-24T20:22:19.000Z | site/public/courses/BEW-1.1/Lessons/07-More-Testing/demo/tests.py | KitsuneNoctus/makeschool | 5eec1a18146abf70bb78b4ee3d301f6a43c9ede4 | [
"MIT"
] | null | null | null | site/public/courses/BEW-1.1/Lessons/07-More-Testing/demo/tests.py | KitsuneNoctus/makeschool | 5eec1a18146abf70bb78b4ee3d301f6a43c9ede4 | [
"MIT"
] | null | null | null | from app import app
from unittest import TestCase, main
from unittest.mock import patch, ANY
class AppTests(TestCase):
def setUp(self):
self.app = app.test_client()
self.app.testing = True
@patch('app.requests.get')
def test_weather_results(self, requests_get):
mock_... | 29.62069 | 71 | 0.618161 |
38007afbca424eda3044fc1e6a9b3fe2cebb3c01 | 1,593 | py | Python | year_2/prog_base_sem1/lab7-9/config.py | honchardev/KPI | f8425681857c02a67127ffb05c0af0563a8473e1 | [
"MIT"
] | null | null | null | year_2/prog_base_sem1/lab7-9/config.py | honchardev/KPI | f8425681857c02a67127ffb05c0af0563a8473e1 | [
"MIT"
] | 21 | 2020-03-24T16:26:04.000Z | 2022-02-18T15:56:16.000Z | year_2/prog_base_sem1_cw/config.py | honchardev/KPI | f8425681857c02a67127ffb05c0af0563a8473e1 | [
"MIT"
] | null | null | null | import os
basedir = os.path.abspath(os.path.dirname(__file__))
class Config:
ROOT_FOLDER = basedir + '/app'
IMG_FOLDER = '/static/img/usr/'
MAX_CONTENT_LENGTH = 2 * 1024 * 1024
JSON_AS_ASCII = False
JSON_SORT_KEYS = True
JSONIFY_PRETTYPRINT_REGULAR = True
SECRET_KEY = os.environ.get('SECRE... | 28.446429 | 73 | 0.725047 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.