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
f3af091c8fffa7ccabb119f921d118725438c3e3
1,294
py
Python
shaun/sheep.py
kantel/py5
1bed40dbf732fce28412a206e7c043bd9a01a521
[ "MIT" ]
null
null
null
shaun/sheep.py
kantel/py5
1bed40dbf732fce28412a206e7c043bd9a01a521
[ "MIT" ]
null
null
null
shaun/sheep.py
kantel/py5
1bed40dbf732fce28412a206e7c043bd9a01a521
[ "MIT" ]
null
null
null
from pvector import PVector import settings as s import py5 class Sheep: def __init__ (self, x, y, col): self.pos = PVector(x, y) self.sz = 5 # Size self.move = 10 self.energy = 20 # Energy level self.col = col def update(self): self.e...
28.130435
55
0.491499
cadda2da21bf6fbf2019fe60aa076d698ef13b71
601
py
Python
python/generator_tricks_for_systemprogrammer/sendto.py
zeroam/TIL
43e3573be44c7f7aa4600ff8a34e99a65cbdc5d1
[ "MIT" ]
null
null
null
python/generator_tricks_for_systemprogrammer/sendto.py
zeroam/TIL
43e3573be44c7f7aa4600ff8a34e99a65cbdc5d1
[ "MIT" ]
null
null
null
python/generator_tricks_for_systemprogrammer/sendto.py
zeroam/TIL
43e3573be44c7f7aa4600ff8a34e99a65cbdc5d1
[ "MIT" ]
null
null
null
# sendto.py # # Send items to a remote machine import socket from genpickle import gen_pickle def sendto(source, addr): s = socket.socket(socket.AF_INET, socket.SOCK_STREAM) s.connect(addr) for pitem in gen_pickle(source): s.sendall(pitem) s.close() # Example use. This requi...
22.259259
58
0.66223
94067642768a6c16ca94b71106be3aff83eb50d9
251
py
Python
src/onegov/core/orm/types/hstore_type.py
politbuero-kampagnen/onegov-cloud
20148bf321b71f617b64376fe7249b2b9b9c4aa9
[ "MIT" ]
null
null
null
src/onegov/core/orm/types/hstore_type.py
politbuero-kampagnen/onegov-cloud
20148bf321b71f617b64376fe7249b2b9b9c4aa9
[ "MIT" ]
null
null
null
src/onegov/core/orm/types/hstore_type.py
politbuero-kampagnen/onegov-cloud
20148bf321b71f617b64376fe7249b2b9b9c4aa9
[ "MIT" ]
null
null
null
from sqlalchemy.dialects.postgresql import HSTORE as HSTOREBase from sqlalchemy.ext.mutable import MutableDict class HSTORE(HSTOREBase): """ Extends the default HSTORE type to make it mutable by default. """ MutableDict.associate_with(HSTORE)
25.1
74
0.796813
94433d247f3fd796a3ceb6baae0b9548f3f98b97
7,651
py
Python
closed/PengChengLaboratory/code/ad/tiny/v0.1/training/anomaly_detection/02_convert.py
AidanYok/tiny_results_v0.5
3ec2c4a4fb5c7261876bb3e468b34d4e0e2ab4b2
[ "Apache-2.0" ]
5
2021-06-22T15:34:37.000Z
2022-03-29T06:12:03.000Z
closed/PengChengLaboratory/code/ad/tiny/v0.1/training/anomaly_detection/02_convert.py
AidanYok/tiny_results_v0.5
3ec2c4a4fb5c7261876bb3e468b34d4e0e2ab4b2
[ "Apache-2.0" ]
null
null
null
closed/PengChengLaboratory/code/ad/tiny/v0.1/training/anomaly_detection/02_convert.py
AidanYok/tiny_results_v0.5
3ec2c4a4fb5c7261876bb3e468b34d4e0e2ab4b2
[ "Apache-2.0" ]
5
2021-08-02T16:39:02.000Z
2022-03-29T06:12:04.000Z
""" @file 02_convert.py @brief Script to convert model to tflite @author Csaba Kiraly Copyright (C) 2020 Hitachi, Ltd. All right reserved. """ ######################################################################## # import default python-library ################################################################...
46.652439
165
0.525029
849b85b63f78648133a06cff7900670eefbf04ff
268
py
Python
telegrambot/src/corona_assistent_bot/__main__.py
LittleKita/CoronaAssistent
1e0862d94bdc509aa468921ee7b056ec59e6f472
[ "MIT" ]
1
2020-03-20T22:05:14.000Z
2020-03-20T22:05:14.000Z
telegrambot/src/corona_assistent_bot/__main__.py
LittleKita/CoronaAssistent
1e0862d94bdc509aa468921ee7b056ec59e6f472
[ "MIT" ]
6
2020-03-21T12:22:36.000Z
2022-02-27T01:33:33.000Z
telegrambot/src/corona_assistent_bot/__main__.py
LittleKita/CoronaAssistent
1e0862d94bdc509aa468921ee7b056ec59e6f472
[ "MIT" ]
null
null
null
import click from dotenv import load_dotenv from corona_assistent_bot.bot import run_bot @click.group() def cli(): """CLI for the CoronaAssistent Bot""" @cli.command() def telegram_bot(): load_dotenv() run_bot() if __name__ == '__main__': cli()
13.4
44
0.690299
8e2d1227aa4b1da11f47d126871d304ed66c0a83
1,086
py
Python
withdraw.py
bank-manage/Bank
1e88bde04b8c1cd59513844457b3db9ed739bfeb
[ "Apache-2.0" ]
null
null
null
withdraw.py
bank-manage/Bank
1e88bde04b8c1cd59513844457b3db9ed739bfeb
[ "Apache-2.0" ]
null
null
null
withdraw.py
bank-manage/Bank
1e88bde04b8c1cd59513844457b3db9ed739bfeb
[ "Apache-2.0" ]
null
null
null
import time bank = {} # 銀行大字典 # 取錢 def withdraw(account,password): # 登陸使用帳號和密碼 out_money = 0 if account in bank: # 這個銀行有這個卡 if bank[account][2] == password: print("密碼正確") while True: money = float(input("收入你要支出的金額").strip()) if money % 100 == 0 and 10000> money > 0: config = input("確定支出...
22.163265
109
0.529466
edd603db40eec85f676b7d62991deb401ca9d2fd
688
py
Python
generater.py
vt-dev-team/vt-randomName
84be5dc761e98472e5b0ceaacb4ab0ab100822cf
[ "MIT" ]
null
null
null
generater.py
vt-dev-team/vt-randomName
84be5dc761e98472e5b0ceaacb4ab0ab100822cf
[ "MIT" ]
null
null
null
generater.py
vt-dev-team/vt-randomName
84be5dc761e98472e5b0ceaacb4ab0ab100822cf
[ "MIT" ]
null
null
null
a = """柴妍伊 女 政史地 陈锦皓 男 政史地 陈奕晓 女 地史生 胡昇昇 男 史地物 蒋雯宁 女 政史地 李佳伟 男 物地史 卢乐萱 女 政史地 罗安琪 女 政史地 潘妍冰 女 史地生 阮楚炜 女 政史地 阮永洁 女 政史地 施森涵 男 史地化 施姚 男 史地生 孙晨洁 女 物地史 童洢帆 女 史地化 王炅 男 政史地 王嘉城 男 史地物 王萌 女 政史地 王若曦 女 史地生 王思洁 女 政史地 吴丹 女 政史地 谢卓伶 女 政史地 熊闻涛 男 政史地 徐梁清 女 政史地 徐宁之 女 政史地 徐王洁 女 政史地 余雄 男 物地史 张佳咪 女 政史地 张佳诺 女 史地技 ...
12.981132
31
0.508721
edea7b6247f3b6750aaadfa5777f20a3e7e38562
1,188
py
Python
Code/dessins_tortue.py
CPEGM/Swinnen-2012
ce6a2621cc66ec7818abe4e4cb2b6cff1d6e151b
[ "CC0-1.0" ]
null
null
null
Code/dessins_tortue.py
CPEGM/Swinnen-2012
ce6a2621cc66ec7818abe4e4cb2b6cff1d6e151b
[ "CC0-1.0" ]
null
null
null
Code/dessins_tortue.py
CPEGM/Swinnen-2012
ce6a2621cc66ec7818abe4e4cb2b6cff1d6e151b
[ "CC0-1.0" ]
null
null
null
# -*- coding: utf-8 -*- """ Created on Mon Oct 1 20:16:49 2018 @author: CPEGM """ from turtle import * from math import pi, sqrt # Exercice 7.* # Création de différentes fonctions de dessins skin = ['blue', 'brown', 'black', 'red', 'yellow', 'green', 'purple'] def equilateral(s, c, a=1): ''' Méthode pour dessin...
18.5625
72
0.544613
784d9dd4ab1365ce47eda59dcb8256453edf5bdc
2,356
py
Python
lib/python/algebra/modular.py
nullputra/nlptr-lib
618c2c74c3d3033bae04de9ba9a253bb6eb31a6c
[ "CC0-1.0" ]
null
null
null
lib/python/algebra/modular.py
nullputra/nlptr-lib
618c2c74c3d3033bae04de9ba9a253bb6eb31a6c
[ "CC0-1.0" ]
null
null
null
lib/python/algebra/modular.py
nullputra/nlptr-lib
618c2c74c3d3033bae04de9ba9a253bb6eb31a6c
[ "CC0-1.0" ]
null
null
null
MOD = 998244353 class Modular: def __init__(self, v=0): self._v = 0 if v == 0 else v % MOD def init_unchecked(self, v): x = Modular() x._v = v return x def val(self): return self._v def __iadd__(self, rhs): self._v += rhs._v if isinstance(rhs, Modular...
25.333333
82
0.539049
154d63e68320931e6d5dfb98081696a140cbff47
485
py
Python
python/p020.py
tlming16/Projec_Euler
797824c5159fae67493de9eba24c22cc7512d95d
[ "MIT" ]
4
2018-11-14T12:03:05.000Z
2019-09-03T14:33:28.000Z
python/p020.py
tlming16/Projec_Euler
797824c5159fae67493de9eba24c22cc7512d95d
[ "MIT" ]
null
null
null
python/p020.py
tlming16/Projec_Euler
797824c5159fae67493de9eba24c22cc7512d95d
[ "MIT" ]
1
2018-11-17T14:39:22.000Z
2018-11-17T14:39:22.000Z
#!/usr/bin/python3 #-*- coding:utf-8 -*- class solution: def __init__(self,n): self.n=n def compute(self): s=1 for v in range(1,self.n+1): s*=v str_res=str(s) res=0 for digit in str_res: res+= int(digit) return re...
15.15625
35
0.472165
175447e89b18254e8b4b23ae594870b15a327417
132
py
Python
sandbox/schedule/timeframe.py
gergelyszaz/SandboxVN
b6855d1c952df66296e8fb3af42c2f8b46908a07
[ "MIT" ]
null
null
null
sandbox/schedule/timeframe.py
gergelyszaz/SandboxVN
b6855d1c952df66296e8fb3af42c2f8b46908a07
[ "MIT" ]
1
2022-03-22T23:50:32.000Z
2022-03-22T23:50:32.000Z
sandbox/schedule/timeframe.py
gergelyszaz/SandboxVN
b6855d1c952df66296e8fb3af42c2f8b46908a07
[ "MIT" ]
null
null
null
class TimeFrame: start: int end: int def check(self, time: int) -> bool: return self.start <= time <= self.end
18.857143
45
0.583333
179db7836184b50eeb253ad4d93c072dc2f9ec45
428
py
Python
Books/Gonit-Korbo-Joi/chapter-05/01_gcd_with_euclid_algorithm.py
shihab4t/Competitive-Programming
e8eec7d4f7d86bfa1c00b7fbbedfd6a1518f19be
[ "Unlicense" ]
3
2021-06-15T01:19:23.000Z
2022-03-16T18:23:53.000Z
Books/Gonit-Korbo-Joi/chapter-05/01_gcd_with_euclid_algorithm.py
shihab4t/Competitive-Programming
e8eec7d4f7d86bfa1c00b7fbbedfd6a1518f19be
[ "Unlicense" ]
null
null
null
Books/Gonit-Korbo-Joi/chapter-05/01_gcd_with_euclid_algorithm.py
shihab4t/Competitive-Programming
e8eec7d4f7d86bfa1c00b7fbbedfd6a1518f19be
[ "Unlicense" ]
null
null
null
a = input("Enter the first number: ") a = int(a) b = input("Enter the second number: ") b = int(b) # main algorithm # a ও b-এর গসাগু = (a - b) ও b-এর গসাগু if b > a: #b যদি a-এর চেয়ে বড় হয়, তাহলো তাদেরকে অদলবদল করে দিচ্ছি a, b = b, a while a != b: if b == 0: #b-এর মান 0 হলে, গসাগু হবে a, তাই আমরা লুপ থে...
20.380952
74
0.464953
e501de255c4d8f4c555d9bd0a6136b03e6df5083
22,170
py
Python
Co-Simulation/Sumo/sumo-1.7.0/tools/contributed/sumopy/coremodules/landuse/maps.py
uruzahe/carla
940c2ab23cce1eda1ef66de35f66b42d40865fb1
[ "MIT" ]
4
2020-11-13T02:35:56.000Z
2021-03-29T20:15:54.000Z
Co-Simulation/Sumo/sumo-1.7.0/tools/contributed/sumopy/coremodules/landuse/maps.py
uruzahe/carla
940c2ab23cce1eda1ef66de35f66b42d40865fb1
[ "MIT" ]
9
2020-12-09T02:12:39.000Z
2021-02-18T00:15:28.000Z
Co-Simulation/Sumo/sumo-1.7.0/tools/contributed/sumopy/coremodules/landuse/maps.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 ...
42.634615
192
0.499549
007d4e4357c121820cd6919554794d1e84142fda
30
py
Python
plugins/service_worker/__init__.py
fernanluis/fernanluis.github.io
eb063d40f2893fb9dd5b22662f343827aa6b157a
[ "MIT" ]
1
2021-02-15T12:19:44.000Z
2021-02-15T12:19:44.000Z
plugins/service_worker/__init__.py
fernanluis/fernanluis.github.io
eb063d40f2893fb9dd5b22662f343827aa6b157a
[ "MIT" ]
null
null
null
plugins/service_worker/__init__.py
fernanluis/fernanluis.github.io
eb063d40f2893fb9dd5b22662f343827aa6b157a
[ "MIT" ]
null
null
null
from .service_worker import *
15
29
0.8
dabcf6df2ab3267629596a03508875659c0c6843
3,367
py
Python
misc.py
CityU-AIM-Group/GFBS
d71361243f1bcf699e1a20b312b05fe0be4dfd6d
[ "MIT" ]
null
null
null
misc.py
CityU-AIM-Group/GFBS
d71361243f1bcf699e1a20b312b05fe0be4dfd6d
[ "MIT" ]
null
null
null
misc.py
CityU-AIM-Group/GFBS
d71361243f1bcf699e1a20b312b05fe0be4dfd6d
[ "MIT" ]
1
2021-12-19T12:31:05.000Z
2021-12-19T12:31:05.000Z
from PIL import Image import os import shutil import pickle as pkl import time from datetime import datetime import numpy as np import torch import random def pil_loader(path): with open(path, 'rb') as f: with Image.open(f) as img: return img.convert('RGB') class Logger(object): def __in...
26.936
69
0.580636
dae20c54d216f6a2e26ef5fb6f1078ccfd7313f3
404
py
Python
src/visitpy/visit_flow/flow/src/parser/__init__.py
visit-dav/vis
c08bc6e538ecd7d30ddc6399ec3022b9e062127e
[ "BSD-3-Clause" ]
226
2018-12-29T01:13:49.000Z
2022-03-30T19:16:31.000Z
src/visitpy/visit_flow/flow/src/parser/__init__.py
visit-dav/vis
c08bc6e538ecd7d30ddc6399ec3022b9e062127e
[ "BSD-3-Clause" ]
5,100
2019-01-14T18:19:25.000Z
2022-03-31T23:08:36.000Z
src/visitpy/visit_flow/flow/src/parser/__init__.py
visit-dav/vis
c08bc6e538ecd7d30ddc6399ec3022b9e062127e
[ "BSD-3-Clause" ]
84
2019-01-24T17:41:50.000Z
2022-03-10T10:01:46.000Z
# Copyright (c) Lawrence Livermore National Security, LLC and other VisIt # Project developers. See the top-level LICENSE file for dates and other # details. No copyright assignment is required to contribute to VisIt. """ file: __init__.py author: Cyrus Harrison <cyrush@llnl.gov> created: 8/29/2012 description: ...
25.25
73
0.735149
c17d2ac3634c84819e5bb13a62461688940691bd
768
py
Python
scriptsForPreprocessing/remove_bad_mask.py
fishial/Object-Detection-Model
4792f65ea785156a8e240d9cdbbc0c9d013ea0bb
[ "CC0-1.0" ]
1
2022-01-03T14:00:17.000Z
2022-01-03T14:00:17.000Z
scriptsForPreprocessing/remove_bad_mask.py
fishial/Object-Detection-Model
4792f65ea785156a8e240d9cdbbc0c9d013ea0bb
[ "CC0-1.0" ]
null
null
null
scriptsForPreprocessing/remove_bad_mask.py
fishial/Object-Detection-Model
4792f65ea785156a8e240d9cdbbc0c9d013ea0bb
[ "CC0-1.0" ]
1
2021-12-21T09:50:53.000Z
2021-12-21T09:50:53.000Z
import os, json # import data path_to_json = r'resources/fishial/val/via_region_data.json' json_tmp = json.load(open(path_to_json)) unique_img_array = [] json_tmp_clone = json_tmp.copy() cnt_bad = 0 print(len(json_tmp)) # for key, v in json_tmp.items(): # if len(v["regions"]['0']['shape_attributes']['all_points...
28.444444
87
0.653646
c19af6db9c180b13137d472fb78fda62ebdf6342
298
py
Python
Python/Courses/Python-Tutorials.Zulkarnine-Mahmud/00.Fundamentals/08.0-Loop.py
shihab4t/Books-Code
b637b6b2ad42e11faf87d29047311160fe3b2490
[ "Unlicense" ]
null
null
null
Python/Courses/Python-Tutorials.Zulkarnine-Mahmud/00.Fundamentals/08.0-Loop.py
shihab4t/Books-Code
b637b6b2ad42e11faf87d29047311160fe3b2490
[ "Unlicense" ]
null
null
null
Python/Courses/Python-Tutorials.Zulkarnine-Mahmud/00.Fundamentals/08.0-Loop.py
shihab4t/Books-Code
b637b6b2ad42e11faf87d29047311160fe3b2490
[ "Unlicense" ]
null
null
null
def is_even(number): if number % 2 == 0: return True return False even_number = [] starting = 0 user_input = int(input("Limit: ")) while starting < user_input: if is_even(starting): even_number.append(starting) starting += 1 print(f"Even numbers: {even_number}")
18.625
37
0.644295
c1fb08a737022886c3fae5698ad35f20e218d8b5
1,705
py
Python
python_lessons/Textastic_Files/Python SQLite Tutorial - MtMk/appDatabase.py
1986MMartin/coding-sections-markus
e13be32e5d83e69250ecfb3c76a04ee48a320607
[ "Apache-2.0" ]
null
null
null
python_lessons/Textastic_Files/Python SQLite Tutorial - MtMk/appDatabase.py
1986MMartin/coding-sections-markus
e13be32e5d83e69250ecfb3c76a04ee48a320607
[ "Apache-2.0" ]
null
null
null
python_lessons/Textastic_Files/Python SQLite Tutorial - MtMk/appDatabase.py
1986MMartin/coding-sections-markus
e13be32e5d83e69250ecfb3c76a04ee48a320607
[ "Apache-2.0" ]
null
null
null
from tkinter import* import sqlite3 root = Tk() root.title('Markus Martin - 2020') root.geometry("600x600") myDatabaseConnection = sqlite3.connect("buying.db") myDatabaseCursor = myDatabaseConnection.cursor() CREATE_TABLE_BUYING = ("""CREATE TABLE IF NOT EXISTS buying ( id INTEGER PRIMARY KEY, b_date TEXT, ...
24.710145
77
0.727859
e70f2a22555379b61a4807904b0e03cc83c54dc8
674
py
Python
Algorithms/Implementation/CavityMap.py
baby5/HackerRank
1e68a85f40499adb9b52a4da16936f85ac231233
[ "MIT" ]
null
null
null
Algorithms/Implementation/CavityMap.py
baby5/HackerRank
1e68a85f40499adb9b52a4da16936f85ac231233
[ "MIT" ]
null
null
null
Algorithms/Implementation/CavityMap.py
baby5/HackerRank
1e68a85f40499adb9b52a4da16936f85ac231233
[ "MIT" ]
null
null
null
# coding:utf-8 n = int(raw_input()) Map = [map(int, list(raw_input())) for _ in xrange(n)] c = len(Map[0]) if n <= 2 or c <= 2: for row in Map: print ''.join(map(str, row)) else: for i in xrange(1, n-1): for j in xrange(1, c-1): if (Map[i-1][j] != 'X' and Map[i+1][j...
28.083333
54
0.396142
e7d7c398a0eb793568839065937d78d064ca12f0
4,649
py
Python
packages/watchmen-model/src/watchmen_model/console/subject.py
Indexical-Metrics-Measure-Advisory/watchmen
c54ec54d9f91034a38e51fd339ba66453d2c7a6d
[ "MIT" ]
null
null
null
packages/watchmen-model/src/watchmen_model/console/subject.py
Indexical-Metrics-Measure-Advisory/watchmen
c54ec54d9f91034a38e51fd339ba66453d2c7a6d
[ "MIT" ]
null
null
null
packages/watchmen-model/src/watchmen_model/console/subject.py
Indexical-Metrics-Measure-Advisory/watchmen
c54ec54d9f91034a38e51fd339ba66453d2c7a6d
[ "MIT" ]
null
null
null
from enum import Enum from typing import List, Optional, Union from pydantic import BaseModel from watchmen_model.common import Auditable, ConnectedSpaceId, construct_parameter, construct_parameter_conditions, \ construct_parameter_joint, DataModel, FactorId, LastVisit, Pageable, Parameter, ParameterCondition, \ Pa...
27.838323
117
0.768337
820b27123459f4de1ad8e22454b660d98fe8fa5f
6,378
py
Python
deprecated/benchmark/ps/distribute_ctr/tensorflow/eval.py
hutuxian/FleetX
843c7aa33f5a14680becf058a3aaf0327eefafd4
[ "Apache-2.0" ]
170
2020-08-12T12:07:01.000Z
2022-03-07T02:38:26.000Z
deprecated/benchmark/ps/distribute_ctr/tensorflow/eval.py
hutuxian/FleetX
843c7aa33f5a14680becf058a3aaf0327eefafd4
[ "Apache-2.0" ]
195
2020-08-13T03:22:15.000Z
2022-03-30T07:40:25.000Z
deprecated/benchmark/ps/distribute_ctr/tensorflow/eval.py
hutuxian/FleetX
843c7aa33f5a14680becf058a3aaf0327eefafd4
[ "Apache-2.0" ]
67
2020-08-14T02:07:46.000Z
2022-03-28T10:05:33.000Z
#!/usr/bin/env python # coding=utf-8 # from __future__ import absolute_import # from __future__ import division # from __future__ import print_function import time import argparse import shutil import sys import os import glob import json import random from datetime import date, timedelta # import numpy as np import...
42.238411
153
0.632643
8213e6f7d34231f44875d59c31fd866095d55a95
3,317
py
Python
sCRAPing/eiendom/adresse.py
wittrup/crap
a77474588fd54a5a998e24df7b1e6e2ab473ded1
[ "MIT" ]
1
2017-12-12T13:58:08.000Z
2017-12-12T13:58:08.000Z
sCRAPing/eiendom/adresse.py
wittrup/crap
a77474588fd54a5a998e24df7b1e6e2ab473ded1
[ "MIT" ]
null
null
null
sCRAPing/eiendom/adresse.py
wittrup/crap
a77474588fd54a5a998e24df7b1e6e2ab473ded1
[ "MIT" ]
1
2019-11-03T10:16:35.000Z
2019-11-03T10:16:35.000Z
import requests import json from distutils.util import strtobool from os.path import isfile, splitext as pathsplitext import pickle import collections import grunnbok import re gatenavn, destfolder, husnrlav = [l.strip() for l in open("ignore/config.txt", encoding='utf-8').readlines()] print('Lagrer grunnbøker for',...
43.077922
120
0.575219
6b558fed080dc913bff7664fb54a281ea8166d1a
2,307
py
Python
mycroft.py
Domeee/mycroft
6575bc68a2a602c7110cbbb81af25ecae3072285
[ "MIT" ]
null
null
null
mycroft.py
Domeee/mycroft
6575bc68a2a602c7110cbbb81af25ecae3072285
[ "MIT" ]
null
null
null
mycroft.py
Domeee/mycroft
6575bc68a2a602c7110cbbb81af25ecae3072285
[ "MIT" ]
null
null
null
from os import listdir from os.path import isfile, join from random import randint from sys import exit from codecs import open from markdown import markdown import smtplib from email.mime.multipart import MIMEMultipart from email.mime.text import MIMEText import mycroft_config import logging def drop_knowledge(): ...
31.60274
130
0.676636
6ba08723317fdcfd3555a9755abceb60d246f1e4
18,863
py
Python
sol_fun.py
andrejborstnik/SkiSOL
dd2e7aa1f7fedef2c86125243e19b712d66ebcf2
[ "Apache-2.0" ]
null
null
null
sol_fun.py
andrejborstnik/SkiSOL
dd2e7aa1f7fedef2c86125243e19b712d66ebcf2
[ "Apache-2.0" ]
null
null
null
sol_fun.py
andrejborstnik/SkiSOL
dd2e7aa1f7fedef2c86125243e19b712d66ebcf2
[ "Apache-2.0" ]
null
null
null
def sumniki(niz): #Vrne enak niz, brez sumnikov. sumniki={'š':'s','č':'c','ž':'z','Š':'S','Č':'C','Ž':'Z','ć':'c','Ć':'C','ö':'o','ä':'a','Ä':'A','Ö':'O'} a='' for i in niz: if sumniki.get(i): a+=sumniki.get(i) else: a+=i return a def presledki(niz): a=''...
47.875635
535
0.426072
2e7ddd30e7dd2de51cc39a351fb6e8828c6eb25b
499
py
Python
PYTHON/XML/find_the_score.py
byung-u/HackerRank
4c02fefff7002b3af774b99ebf8d40f149f9d163
[ "MIT" ]
null
null
null
PYTHON/XML/find_the_score.py
byung-u/HackerRank
4c02fefff7002b3af774b99ebf8d40f149f9d163
[ "MIT" ]
null
null
null
PYTHON/XML/find_the_score.py
byung-u/HackerRank
4c02fefff7002b3af774b99ebf8d40f149f9d163
[ "MIT" ]
null
null
null
#!/usr/bin/env python3 import sys import xml.etree.ElementTree as etree def get_attr_number(node): attr_cnt = 0 for child in root.iter(): attr_cnt += len(child.attrib) return attr_cnt if __name__ == '__main__': # sys.stdin.readline() # xml = sys.stdin.read() N = int(input()) xml ...
21.695652
51
0.613226
cf0a755b805f531fa6b9de844b5f6c57566b4e74
759
py
Python
gemtown/gems/migrations/0004_auto_20190420_1737.py
doramong0926/gemtown
2c39284e3c68f0cc11994bed0ee2abaad0ea06b6
[ "MIT" ]
null
null
null
gemtown/gems/migrations/0004_auto_20190420_1737.py
doramong0926/gemtown
2c39284e3c68f0cc11994bed0ee2abaad0ea06b6
[ "MIT" ]
5
2020-09-04T20:13:39.000Z
2022-02-17T22:03:33.000Z
gemtown/gems/migrations/0004_auto_20190420_1737.py
doramong0926/gemtown
2c39284e3c68f0cc11994bed0ee2abaad0ea06b6
[ "MIT" ]
null
null
null
# Generated by Django 2.0.13 on 2019-04-20 08:37 from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('gems', '0003_auto_20190420_1532'), ] operations = [ migrations.AddField( model_name='bonusgem', name='bonus_type', ...
26.172414
63
0.586298
cf1f94e97553d1602028db4f5bf2f6fecb8e117a
790
py
Python
beispielanwendungen/designer/helloworld2.py
pbouda/pyqt-und-pyside-buch
a4ec10663ccc8aeda075c9a06b9707ded52382c8
[ "CC-BY-4.0" ]
5
2017-03-11T13:27:27.000Z
2022-01-09T10:52:05.000Z
beispielanwendungen/designer/helloworld2.py
pbouda/pyqt-und-pyside-buch
a4ec10663ccc8aeda075c9a06b9707ded52382c8
[ "CC-BY-4.0" ]
2
2021-02-14T10:59:59.000Z
2021-10-30T21:46:32.000Z
beispielanwendungen/designer/helloworld2.py
pbouda/pyqt-und-pyside-buch
a4ec10663ccc8aeda075c9a06b9707ded52382c8
[ "CC-BY-4.0" ]
1
2019-08-07T03:08:18.000Z
2019-08-07T03:08:18.000Z
# -*- coding: utf-8 -*- import sys from PyQt4 import QtCore, QtGui from ui_helloworld import Ui_MainWindow def main(argv): app = QtGui.QApplication(argv) mainwindow = MyMainWindow() mainwindow.show() sys.exit(app.exec_()) class MyMainWindow(QtGui.QMainWindow): def __init__(self, *args): ...
23.235294
67
0.670886
5af90c62f6681d367e3926865e57bf3c2379f611
1,014
py
Python
pkg/suggestion/v1beta1/bayesianoptimization/utils.py
d-gol/katib
2c8758b26ffd543e08b70464f8ac7b286f3ca2ea
[ "Apache-2.0" ]
17
2018-04-04T08:44:06.000Z
2018-04-19T18:02:05.000Z
pkg/suggestion/v1beta1/bayesianoptimization/utils.py
d-gol/katib
2c8758b26ffd543e08b70464f8ac7b286f3ca2ea
[ "Apache-2.0" ]
58
2018-04-03T19:05:50.000Z
2018-04-19T16:14:04.000Z
pkg/suggestion/v1beta1/bayesianoptimization/utils.py
d-gol/katib
2c8758b26ffd543e08b70464f8ac7b286f3ca2ea
[ "Apache-2.0" ]
10
2018-04-04T02:06:20.000Z
2018-04-19T08:53:04.000Z
# Copyright 2022 The Kubeflow Authors. # # 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 in ...
31.6875
74
0.752465
51b5931c4ee617a7b1c2095ff5f6924689b16e4d
2,805
py
Python
research/cv/DeepID/src/report.py
leelige/mindspore
5199e05ba3888963473f2b07da3f7bca5b9ef6dc
[ "Apache-2.0" ]
77
2021-10-15T08:32:37.000Z
2022-03-30T13:09:11.000Z
research/cv/DeepID/src/report.py
leelige/mindspore
5199e05ba3888963473f2b07da3f7bca5b9ef6dc
[ "Apache-2.0" ]
3
2021-10-30T14:44:57.000Z
2022-02-14T06:57:57.000Z
research/cv/DeepID/src/report.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.961538
110
0.613904
710ee45be272a9ecbda627df21db800786d0f9e3
603
py
Python
py-td2/ex3.py
HuguesGuilleus/istyPOO
f460665799be2b2f34a1ebaa9878e06bb028a410
[ "BSD-3-Clause" ]
null
null
null
py-td2/ex3.py
HuguesGuilleus/istyPOO
f460665799be2b2f34a1ebaa9878e06bb028a410
[ "BSD-3-Clause" ]
null
null
null
py-td2/ex3.py
HuguesGuilleus/istyPOO
f460665799be2b2f34a1ebaa9878e06bb028a410
[ "BSD-3-Clause" ]
null
null
null
#!/usr/bin/env python3 # -*- coding: utf-8 -*- # GUILLEUS Hugues IATIC3 <hugues.guilleus@ens.uvsq.fr> import random def des(j): """ Lance le dé tant que le joueur n'a pas gagné ou n'a pas fait 1. """ while True: input("Lancer le dé ") r = random.randint(1,6) if r == 1: print(f"On change de joueur") r...
17.228571
64
0.59204
a41d1b158f9531066d68638471387bc69c1c2f68
3,003
py
Python
snake/game.py
dotKuro/vorsemesterWISE19-20
436c6d1846b6c1bfb087652e8ca179bd1b12c28e
[ "CC0-1.0" ]
1
2019-09-27T13:47:20.000Z
2019-09-27T13:47:20.000Z
snake/game.py
dotKuro/vorsemesterWISE19-20
436c6d1846b6c1bfb087652e8ca179bd1b12c28e
[ "CC0-1.0" ]
null
null
null
snake/game.py
dotKuro/vorsemesterWISE19-20
436c6d1846b6c1bfb087652e8ca179bd1b12c28e
[ "CC0-1.0" ]
null
null
null
import pygame from random import randint from threading import Thread from time import sleep from draw import Drawer from object import Object, ObjectName from snake import Direction, Snake class Game(): DEFAULT_FRAME_RATE = 20 def __init__(self, grid_width=60, grid_height=40, ai=None): pygame.ini...
29.441176
75
0.601066
746f87cbfacb84f8f68b3c5c5f206c1cb267df22
2,618
py
Python
intelligence/anthill/src/recommenders/Prod_Prod.py
FoxComm/highlander
1aaf8f9e5353b94c34d574c2a92206a1c363b5be
[ "MIT" ]
10
2018-04-12T22:29:52.000Z
2021-10-18T17:07:45.000Z
intelligence/anthill/src/recommenders/Prod_Prod.py
FoxComm/highlander
1aaf8f9e5353b94c34d574c2a92206a1c363b5be
[ "MIT" ]
null
null
null
intelligence/anthill/src/recommenders/Prod_Prod.py
FoxComm/highlander
1aaf8f9e5353b94c34d574c2a92206a1c363b5be
[ "MIT" ]
1
2018-07-06T18:42:05.000Z
2018-07-06T18:42:05.000Z
from math import sqrt import numpy as np from scipy.sparse import csr_matrix class Prod_Prod(object): """Prod_Prod a recommender based on products which have been purchased by the same customers """ def __init__(self): self.events = set() self.up_to_date = False self.mat = c...
30.091954
79
0.577158
77d8c129a05d13ded1776787036a8371edcd784c
621
py
Python
MiniProjects/Projects/GIF_Con/gif_convert.py
GitInitDev/ZohoUniv
966704837e65f58b52492b56d08e7958df3d220a
[ "Unlicense" ]
null
null
null
MiniProjects/Projects/GIF_Con/gif_convert.py
GitInitDev/ZohoUniv
966704837e65f58b52492b56d08e7958df3d220a
[ "Unlicense" ]
null
null
null
MiniProjects/Projects/GIF_Con/gif_convert.py
GitInitDev/ZohoUniv
966704837e65f58b52492b56d08e7958df3d220a
[ "Unlicense" ]
null
null
null
import imageio import os clip = os.path.abspath('D:\Projects\Codes\Challenges\python_challenges\gif_converter\stock1.mp4') def gifMaker(inputPath, targetFormat): outputPath = os.path.splitext(inputPath)[0] + targetFormat print(f'Converting {inputPath} to {outputPath}') reader = imageio.get_reader(...
31.05
98
0.674718
3b0a9b74afd1a140850b54b94708aac11ca3e497
387
py
Python
sketches/shaunsim2/grass.py
kantel/processingpy
74aae222e46f68d1c8f06307aaede3cdae65c8ec
[ "MIT" ]
4
2018-06-03T02:11:46.000Z
2021-08-18T19:55:15.000Z
sketches/shaunsim2/grass.py
kantel/processingpy
74aae222e46f68d1c8f06307aaede3cdae65c8ec
[ "MIT" ]
null
null
null
sketches/shaunsim2/grass.py
kantel/processingpy
74aae222e46f68d1c8f06307aaede3cdae65c8ec
[ "MIT" ]
3
2019-12-23T19:12:51.000Z
2021-04-30T14:00:31.000Z
# coding=utf-8 from config import Settings s = Settings() class Grass(): def __init__(self, x, y, sz): self.x = x self.y = y self.energy = 5 self.eaten = False self.sz = sz def update(self): if self.eaten: fill(s.BROWN) else: ...
18.428571
46
0.49354
3b14b2683c594cd776d2d0459347323c78b47fc6
1,301
py
Python
furniture_store/furniture_store/web/models.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/models.py
trenev/softuni-python-web-basics
0fcf6b7f3389d06685d40615c376dc4027e772f2
[ "MIT" ]
null
null
null
furniture_store/furniture_store/web/models.py
trenev/softuni-python-web-basics
0fcf6b7f3389d06685d40615c376dc4027e772f2
[ "MIT" ]
null
null
null
from django.core.validators import MinLengthValidator, MinValueValidator, MaxValueValidator from django.db import models from furniture_store.web.validators import validate_min_price class Profile(models.Model): first_name = models.CharField( max_length=20, ) last_name = models.CharField( ...
19.41791
91
0.579554
d965448ab116a92b9406552a9c51fa0fc9b1e4fa
35
py
Python
lib/python3.5/hashlib.py
hwroitzsch/BikersLifeSaver
469c738fdd6352c44a3f20689b17fa8ac04ad8a2
[ "MIT" ]
1
2020-08-16T04:04:23.000Z
2020-08-16T04:04:23.000Z
lib/python3.5/hashlib.py
hwroitzsch/BikersLifeSaver
469c738fdd6352c44a3f20689b17fa8ac04ad8a2
[ "MIT" ]
5
2020-06-05T18:53:24.000Z
2021-12-13T19:49:15.000Z
lib/python3.5/hashlib.py
hwroitzsch/BikersLifeSaver
469c738fdd6352c44a3f20689b17fa8ac04ad8a2
[ "MIT" ]
null
null
null
/usr/local/lib/python3.5/hashlib.py
35
35
0.8
79792e05504432db96945d591d8de9acc418c53c
1,921
py
Python
Versuch4/task1.3.py
Tobias-Schoch/SSS
f8b078ca7f6482fc7c89d5f9e784a549459eefb7
[ "MIT" ]
null
null
null
Versuch4/task1.3.py
Tobias-Schoch/SSS
f8b078ca7f6482fc7c89d5f9e784a549459eefb7
[ "MIT" ]
null
null
null
Versuch4/task1.3.py
Tobias-Schoch/SSS
f8b078ca7f6482fc7c89d5f9e784a549459eefb7
[ "MIT" ]
1
2022-01-06T12:47:53.000Z
2022-01-06T12:47:53.000Z
# ------------------------------------- # Task 1.3 # ------------------------------------- import matplotlib.pyplot as plt import numpy as np # Einlesen der .npy Datei data = np.load('data/test.npy') freq = np.zeros(225280) # Darstellung des Amplitudenspektrums plt.plot(data) plt.grid() plt.xlabel('Zeit') plt.ylabel...
25.613333
103
0.720979
8db2687fdc8d035d8ae0097de421e4c5f47b9557
1,268
py
Python
stphohapp/migrations/0003_auto_20200913_1827.py
itechtian/stphoh
5a778deece3a690e0ec92c799b0b87ba26f1892c
[ "MIT" ]
null
null
null
stphohapp/migrations/0003_auto_20200913_1827.py
itechtian/stphoh
5a778deece3a690e0ec92c799b0b87ba26f1892c
[ "MIT" ]
null
null
null
stphohapp/migrations/0003_auto_20200913_1827.py
itechtian/stphoh
5a778deece3a690e0ec92c799b0b87ba26f1892c
[ "MIT" ]
null
null
null
# Generated by Django 3.0.7 on 2020-09-13 17:27 from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('stphohapp', '0002_auto_20200913_1809'), ] operations = [ migrations.CreateModel( name='Patient', fields=[ ...
33.368421
114
0.550473
8dfbf1252d9a9af86fc03054141327e8b2b95e21
482
py
Python
30-Days-of-Code/Day02-Operators.py
sadikkuzu/HackerRank
2b1ed2cf41f6a5404c5b9293186f301b646b5d33
[ "Apache-2.0" ]
5
2019-03-09T22:44:01.000Z
2021-09-14T00:11:38.000Z
30-Days-of-Code/Day02-Operators.py
jguerra7/HackerRank-4
7e1663d0050ffbb0fd885b8affdada9ea13b0e80
[ "Apache-2.0" ]
4
2018-08-16T09:39:47.000Z
2018-09-14T17:37:07.000Z
30-Days-of-Code/Day02-Operators.py
jguerra7/HackerRank-4
7e1663d0050ffbb0fd885b8affdada9ea13b0e80
[ "Apache-2.0" ]
1
2020-06-01T23:38:35.000Z
2020-06-01T23:38:35.000Z
#!/bin/python import math import os import random import re import sys # Complete the solve function below. def solve(meal_cost, tip_percent, tax_percent): total = round(meal_cost * (1.0 + ((tip_percent+tax_percent)*1.0 / 100))) print "The total meal cost is "+str(int(total))+" dollars." if __name__ == '__ma...
21.909091
76
0.697095
15c46747849c450ffdb6ffe21838969d3df7dc18
496
py
Python
Flask/FastAPI/Django/Python-API-Development.freeCodeCamp.org/13-Deployment-Heroku/app/main.py
shihab4t/Software-Development
0843881f2ba04d9fca34e44443b5f12f509f671e
[ "Unlicense" ]
null
null
null
Flask/FastAPI/Django/Python-API-Development.freeCodeCamp.org/13-Deployment-Heroku/app/main.py
shihab4t/Software-Development
0843881f2ba04d9fca34e44443b5f12f509f671e
[ "Unlicense" ]
null
null
null
Flask/FastAPI/Django/Python-API-Development.freeCodeCamp.org/13-Deployment-Heroku/app/main.py
shihab4t/Software-Development
0843881f2ba04d9fca34e44443b5f12f509f671e
[ "Unlicense" ]
null
null
null
from fastapi import FastAPI from .routers import post, user, auth, vote from fastapi.middleware.cors import CORSMiddleware app = FastAPI() origins = ["*"] app.add_middleware( CORSMiddleware, allow_origins=origins, allow_credentials=True, allow_methods=["*"], allow_headers=["*"] ) app.include_rout...
19.84
50
0.72379
15fa2c0f389a5fec0448d50de4148829fb2f8b27
6,403
py
Python
DQN_IMG/dqn_img.py
xixiha5230/RL
cc957a4231263074b8cf7fad6ba276f4b3899670
[ "MIT" ]
null
null
null
DQN_IMG/dqn_img.py
xixiha5230/RL
cc957a4231263074b8cf7fad6ba276f4b3899670
[ "MIT" ]
null
null
null
DQN_IMG/dqn_img.py
xixiha5230/RL
cc957a4231263074b8cf7fad6ba276f4b3899670
[ "MIT" ]
null
null
null
import numpy import torch import torch.nn as nn import torch.nn.functional as F import gym from dataclasses import dataclass from typing import Any from collections import deque import random import wandb from tqdm import tqdm @dataclass class Sarsd: obs: Any action: int reward: float next_obs: Any ...
32.338384
79
0.575511
cc94e8ac87585e9698a846d97ad71f6df11cbbd8
127
py
Python
Algorithms/Implementation/strange-advertising.py
rho2/HackerRank
4d9cdfcabeb20212db308d8e4f2ac1b8ebf7d266
[ "MIT" ]
null
null
null
Algorithms/Implementation/strange-advertising.py
rho2/HackerRank
4d9cdfcabeb20212db308d8e4f2ac1b8ebf7d266
[ "MIT" ]
null
null
null
Algorithms/Implementation/strange-advertising.py
rho2/HackerRank
4d9cdfcabeb20212db308d8e4f2ac1b8ebf7d266
[ "MIT" ]
null
null
null
import math n = int(input()) l = 0 a = 5 for i in range(n): l += math.floor(a/2) a = math.floor(a/2)*3 print(l)
10.583333
25
0.519685
d1788bfdf4ca19a2a57985e782fe6a577bbbceb5
148
py
Python
python/coursera_python/MICHIGAN/DATABASES/week1/1.py
SayanGhoshBDA/code-backup
8b6135facc0e598e9686b2e8eb2d69dd68198b80
[ "MIT" ]
16
2018-11-26T08:39:42.000Z
2019-05-08T10:09:52.000Z
python/coursera_python/MICHIGAN/DATABASES/week1/1.py
SayanGhoshBDA/code-backup
8b6135facc0e598e9686b2e8eb2d69dd68198b80
[ "MIT" ]
8
2020-05-04T06:29:26.000Z
2022-02-12T05:33:16.000Z
python/coursera_python/MICHIGAN/DATABASES/week1/1.py
SayanGhoshBDA/code-backup
8b6135facc0e598e9686b2e8eb2d69dd68198b80
[ "MIT" ]
5
2020-02-11T16:02:21.000Z
2021-02-05T07:48:30.000Z
class PartyAnimal: x = 0 def party(self): self.x = self.x + 1 print("So far",self.x) an = PartyAnimal() an.party() an.party() an.party()
10.571429
24
0.608108
ae954b1d2cc5d3719dda3d71c1ddeb39f17e2055
156
py
Python
foundation/www/conf/2017/proposals.py
prafful1234/foundation
6fcb027e76eae8d307c3dd70436a9657ff681f01
[ "MIT" ]
59
2017-03-15T08:14:52.000Z
2021-11-17T14:21:58.000Z
foundation/www/conf/2017/proposals.py
prafful1234/foundation
6fcb027e76eae8d307c3dd70436a9657ff681f01
[ "MIT" ]
147
2017-01-25T10:44:47.000Z
2020-11-05T04:24:22.000Z
foundation/www/conf/2017/proposals.py
prafful1234/foundation
6fcb027e76eae8d307c3dd70436a9657ff681f01
[ "MIT" ]
134
2017-03-14T14:04:21.000Z
2022-03-18T08:19:47.000Z
import frappe import frappe.www.list def get_context(context): context.update(frappe.www.list.get_context(context, doctype='Conference Talk Proposal'))
22.285714
52
0.801282
8871bf1df9dc3d023d6e80c7ddf6c4b450dffd9b
1,691
py
Python
hisim/components/simple_controller.py
sdickler/HiSim
09a11d99f220f7cadb3cb7b09a6fce8f147243c8
[ "MIT" ]
12
2021-10-05T11:38:24.000Z
2022-03-25T09:56:08.000Z
hisim/components/simple_controller.py
sdickler/HiSim
09a11d99f220f7cadb3cb7b09a6fce8f147243c8
[ "MIT" ]
6
2021-10-06T13:27:55.000Z
2022-03-10T12:55:15.000Z
hisim/components/simple_controller.py
sdickler/HiSim
09a11d99f220f7cadb3cb7b09a6fce8f147243c8
[ "MIT" ]
4
2022-02-21T19:00:50.000Z
2022-03-22T11:01:38.000Z
# Generic/Built-in import copy # Owned from hisim.component import Component, SingleTimeStepValues, ComponentInput, ComponentOutput from hisim import loadtypes as lt from hisim.simulationparameters import SimulationParameters __authors__ = "Vitor Hugo Bellotto Zago" __copyright__ = "Copyright 2021, the House Infrastru...
39.325581
153
0.735659
c9900c6cb936dc8f5df258dd0620ae501f078a12
358
py
Python
env/Scripts/alembic-script.py
YangWang1231/FlaskWeb
7d1f53f1b3e69781cba3c850bfd9e10cd6e4b088
[ "MIT" ]
null
null
null
env/Scripts/alembic-script.py
YangWang1231/FlaskWeb
7d1f53f1b3e69781cba3c850bfd9e10cd6e4b088
[ "MIT" ]
null
null
null
env/Scripts/alembic-script.py
YangWang1231/FlaskWeb
7d1f53f1b3e69781cba3c850bfd9e10cd6e4b088
[ "MIT" ]
null
null
null
#!C:\Users\Administrator\source\repos\FLaskempty\env\Scripts\python.exe # EASY-INSTALL-ENTRY-SCRIPT: 'alembic==1.0.11','console_scripts','alembic' __requires__ = 'alembic==1.0.11' import sys from pkg_resources import load_entry_point if __name__ == '__main__': sys.exit( load_entry_point('alembic==1.0.11', ...
32.545455
75
0.723464
117c40c59f26b913f612514e56ca6be98340f21d
413
py
Python
frappe-bench/apps/erpnext/erpnext/patches/v7_0/update_status_for_timesheet.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/v7_0/update_status_for_timesheet.py
Semicheche/foa_frappe_docker
a186b65d5e807dd4caf049e8aeb3620a799c1225
[ "MIT" ]
null
null
null
frappe-bench/apps/erpnext/erpnext/patches/v7_0/update_status_for_timesheet.py
Semicheche/foa_frappe_docker
a186b65d5e807dd4caf049e8aeb3620a799c1225
[ "MIT" ]
1
2021-04-29T14:39:01.000Z
2021-04-29T14:39:01.000Z
from __future__ import unicode_literals import frappe def execute(): frappe.db.sql("""update `tabTimesheet` as ts, ( select min(from_time)as from_time, max(to_time) as to_time, parent from `tabTimesheet Detail` group by parent ) as tsd set ts.status = 'Submitted', ts.start_date = tsd.from_time, ts.end_dat...
37.545455
112
0.726392
119b6877b0f249fc6d0ca533ee444f195011f353
581
py
Python
compare_the_triplets.py
nirobio/puzzles
fda8c84d8eefd93b40594636fb9b7f0fde02b014
[ "MIT" ]
null
null
null
compare_the_triplets.py
nirobio/puzzles
fda8c84d8eefd93b40594636fb9b7f0fde02b014
[ "MIT" ]
null
null
null
compare_the_triplets.py
nirobio/puzzles
fda8c84d8eefd93b40594636fb9b7f0fde02b014
[ "MIT" ]
null
null
null
import math import os import random import re import sys def compareTriplets(a,b): alice_score = 0; bob_score = 0; for x,y in zip(a,b): if x > y: alice_score +=1; elif x < y: bob_score +=1; return [alice_score, bob_score] if __name__ == '__main__': f...
15.289474
48
0.562823
eef4e1eb27ce570d4e0fd474d29a597e75222c8b
573
py
Python
RDS/circle2_use_cases/metadata/src/api/Research.py
Sciebo-RDS/Sciebo-RDS
d71cf449ed045a2a7a049e2cb77c99fd5a9195bd
[ "MIT" ]
10
2020-06-24T08:22:24.000Z
2022-01-13T16:17:36.000Z
RDS/circle2_use_cases/metadata/src/api/Research.py
Sciebo-RDS/Sciebo-RDS
d71cf449ed045a2a7a049e2cb77c99fd5a9195bd
[ "MIT" ]
78
2020-01-23T14:32:06.000Z
2022-03-07T14:11:16.000Z
RDS/circle2_use_cases/metadata/src/api/Research.py
Sciebo-RDS/Sciebo-RDS
d71cf449ed045a2a7a049e2cb77c99fd5a9195bd
[ "MIT" ]
1
2020-06-24T08:33:48.000Z
2020-06-24T08:33:48.000Z
from lib.Metadata import Metadata from flask import jsonify, current_app, request def get(research_id): req = request.json result = Metadata(testing=current_app.config.get("TESTING")).getMetadataForResearch(researchId=research_id, metadataFields=req) return jsonify({"length": len(result), "list": result...
28.65
131
0.736475
11109243ff64910e0ae78a0251c85051f8730507
265
py
Python
hm/deviceType.py
debauer/HomematicToInflux
233a837f0da031f331d771f0e6f7b55f488cd747
[ "MIT" ]
null
null
null
hm/deviceType.py
debauer/HomematicToInflux
233a837f0da031f331d771f0e6f7b55f488cd747
[ "MIT" ]
null
null
null
hm/deviceType.py
debauer/HomematicToInflux
233a837f0da031f331d771f0e6f7b55f488cd747
[ "MIT" ]
null
null
null
from enum import Enum, unique @unique class DeviceType(Enum): STH = "HmIP-STH" ETRV2 = "HmIP-eTRV-2" FALMOTC12 = "HmIP-FALMOT-C12" STHO = "HmIP-STHO" SWDO = 'HMIP-SWDO' PSM = 'HMIP-PSM' RCV50 = 'HmIP-RCV-50' ESTXWM = 'HM-ES-TX-WM'
18.928571
33
0.592453
feface049b5e6e2cf19daece7e0d663d37c9b24c
555
py
Python
Coursera/Python Data Structures/Assignment-7.2.py
rishav3101/Online-Courses-Learning
1e9356af331b27b6ee33d376d8d7104edaeac2fa
[ "MIT" ]
331
2019-10-22T09:06:28.000Z
2022-03-27T13:36:03.000Z
Coursera/Python Data Structures/Assignment-7.2.py
rishav3101/Online-Courses-Learning
1e9356af331b27b6ee33d376d8d7104edaeac2fa
[ "MIT" ]
8
2020-04-10T07:59:06.000Z
2022-02-06T11:36:47.000Z
Coursera/Python Data Structures/Assignment-7.2.py
rishav3101/Online-Courses-Learning
1e9356af331b27b6ee33d376d8d7104edaeac2fa
[ "MIT" ]
572
2019-07-28T23:43:35.000Z
2022-03-27T22:40:08.000Z
# Use the file name mbox-short.txt as the file name if __name__ == '__main__': fname = input("Enter file name: ") fh = open(fname) s = 0.0 con = 0 for line in fh: if not line.startswith("X-DSPAM-Confidence:"): continue else: try: l = len(line...
24.130435
56
0.443243
6eb03210b6689527445364d7760b003fcf65206c
3,735
py
Python
test/test_npu/test_log2.py
Ascend/pytorch
39849cf72dafe8d2fb68bd1679d8fd54ad60fcfc
[ "BSD-3-Clause" ]
1
2021-12-02T03:07:35.000Z
2021-12-02T03:07:35.000Z
test/test_npu/test_log2.py
Ascend/pytorch
39849cf72dafe8d2fb68bd1679d8fd54ad60fcfc
[ "BSD-3-Clause" ]
1
2021-11-12T07:23:03.000Z
2021-11-12T08:28:13.000Z
test/test_npu/test_log2.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...
36.980198
74
0.604552
6edf3ed64454c258cf3639bb40c8afb6457370a7
202
py
Python
basketball/player/player.py
ptracton/ExperimentalPython
a3159226982ec9656bb0f81f6997687da22f4466
[ "MIT" ]
null
null
null
basketball/player/player.py
ptracton/ExperimentalPython
a3159226982ec9656bb0f81f6997687da22f4466
[ "MIT" ]
null
null
null
basketball/player/player.py
ptracton/ExperimentalPython
a3159226982ec9656bb0f81f6997687da22f4466
[ "MIT" ]
null
null
null
#! /usr/bin/env python3 import sys import PyQt5 import UI if __name__ == "__main__": app = PyQt5.QtWidgets.QApplication(sys.argv) gui = UI.UI() gui.show() app.exec_() sys.exit(0)
14.428571
48
0.633663
95ff34c56959a8a401b57e9c3c2637a32670a7d9
815
py
Python
service/app.py
fausecteam/faustctf-2019-responsivesecurity
65b4e02bdc9de278166c38697ab992638977d511
[ "0BSD" ]
null
null
null
service/app.py
fausecteam/faustctf-2019-responsivesecurity
65b4e02bdc9de278166c38697ab992638977d511
[ "0BSD" ]
null
null
null
service/app.py
fausecteam/faustctf-2019-responsivesecurity
65b4e02bdc9de278166c38697ab992638977d511
[ "0BSD" ]
null
null
null
import flask import os app = flask.Flask(__name__) from client import client from pwned_passwords import pwned from storage import storage class Config: SQLALCHEMY_DATABASE_URI = 'sqlite:///data/storage.db' SQLALCHEMY_TRACK_MODIFICATIONS = False # quiet the startup warning SQLALCHEMY_ECHO = False # enabl...
29.107143
88
0.758282
2531a5347cbe7ca6d06561540c19fb1f41409426
732
py
Python
python/coursera_python/RICE/PPE/date_m.py
SayanGhoshBDA/code-backup
8b6135facc0e598e9686b2e8eb2d69dd68198b80
[ "MIT" ]
16
2018-11-26T08:39:42.000Z
2019-05-08T10:09:52.000Z
python/coursera_python/RICE/PPE/date_m.py
SayanGhoshBDA/code-backup
8b6135facc0e598e9686b2e8eb2d69dd68198b80
[ "MIT" ]
8
2020-05-04T06:29:26.000Z
2022-02-12T05:33:16.000Z
python/coursera_python/RICE/PPE/date_m.py
SayanGhoshBDA/code-backup
8b6135facc0e598e9686b2e8eb2d69dd68198b80
[ "MIT" ]
5
2020-02-11T16:02:21.000Z
2021-02-05T07:48:30.000Z
""" Demonstration of some of the features of the datetime module. """ import datetime # Create some dates print("Creating Dates") print("==============") date1 = datetime.date(1999, 12, 31) date2 = datetime.date(2000, 1, 1) date3 = datetime.date(2016, 4, 15) # date4 = datetime.date(2012, 8, 32) # Today's date today...
14.938776
61
0.647541
dd1818e14bf70063da39342e46ab42c0a6e1fa35
6,116
py
Python
nlpl/generators.py
nemanja-m/nlpl
9e34564a5b7e2b5b957cd09f96bcd1292403cd1b
[ "MIT" ]
null
null
null
nlpl/generators.py
nemanja-m/nlpl
9e34564a5b7e2b5b957cd09f96bcd1292403cd1b
[ "MIT" ]
4
2021-04-30T21:07:54.000Z
2022-02-10T01:23:11.000Z
nlpl/generators.py
nemanja-m/nlpl
9e34564a5b7e2b5b957cd09f96bcd1292403cd1b
[ "MIT" ]
null
null
null
from abc import ABC, abstractmethod from collections import Generator from typing import List, Tuple, Union import numpy as np from tensorflow.keras.preprocessing import sequence from .sampling import Sampler # List[int] for skipgram and List[List[int]] for CBOW samples. SamplesBatch = List[Union[int, List[int]]] ...
31.689119
86
0.61707
dd5d49b8c7399aadff5dfa34b1aa882501a82ac9
1,615
py
Python
manage.py
breezage/Hacktoberfest-1
6f6d52248c79c0e72fd13b599500318fce3f9ab0
[ "MIT" ]
null
null
null
manage.py
breezage/Hacktoberfest-1
6f6d52248c79c0e72fd13b599500318fce3f9ab0
[ "MIT" ]
null
null
null
manage.py
breezage/Hacktoberfest-1
6f6d52248c79c0e72fd13b599500318fce3f9ab0
[ "MIT" ]
1
2019-10-24T06:45:21.000Z
2019-10-24T06:45:21.000Z
""" Script for managing the CONTRIBUTOR.md file. What this script does? - Remove trailing whitespaces before '####' - Replace every heading with '####' - Sort the list of contributors Running the script - python3 manage.py PS: DO NOT USE PYTHON 2 """ import re def format_contributor(contrib): """ Helper func...
29.363636
84
0.639628
06e3903d988302a85aad9cbebd9c5be49159cd6a
482
py
Python
BIZa/2014/Zyabko_A_A/task_4_45.py
YukkaSarasti/pythonintask
eadf4245abb65f4400a3bae30a4256b4658e009c
[ "Apache-2.0" ]
null
null
null
BIZa/2014/Zyabko_A_A/task_4_45.py
YukkaSarasti/pythonintask
eadf4245abb65f4400a3bae30a4256b4658e009c
[ "Apache-2.0" ]
null
null
null
BIZa/2014/Zyabko_A_A/task_4_45.py
YukkaSarasti/pythonintask
eadf4245abb65f4400a3bae30a4256b4658e009c
[ "Apache-2.0" ]
null
null
null
# Задача № 4. Вариант 45 # Напишите программу, которая выводит имя, под которым скрывается Борис Николаевич Кампов. # Зябко Антон #13. 04. 2016 print("Борис Николаевич Кампов, более известный под фамилией Полевой") oblinter="Любил природу" mrozh="Москва,Россия" msmert="Так же в Москве" vzhizni=1908-1981 print("Обла...
26.777778
91
0.748963
b0f84ebf5a12b3931e907f464f9960d645c97183
703
py
Python
python/contextlib/contextlib_redirect.py
zeroam/TIL
43e3573be44c7f7aa4600ff8a34e99a65cbdc5d1
[ "MIT" ]
null
null
null
python/contextlib/contextlib_redirect.py
zeroam/TIL
43e3573be44c7f7aa4600ff8a34e99a65cbdc5d1
[ "MIT" ]
null
null
null
python/contextlib/contextlib_redirect.py
zeroam/TIL
43e3573be44c7f7aa4600ff8a34e99a65cbdc5d1
[ "MIT" ]
null
null
null
""" Poorly designed library code may write directly to sys.stdout or sys.stderr, without providing arguments to configure different output destinations. The `redirect_stdout()` and `redirect_stderr()` context mangers can be used to capture output from functions like this, for which the source cannot be changed to acc...
29.291667
77
0.762447
a55208083baedf19ba91b03ac4b465ec4d28c2e8
2,233
py
Python
course/serializers.py
MIXISAMA/MIS-backend
7aaa1be773718de1beb3ce0080edca7c4114b7ad
[ "MIT" ]
null
null
null
course/serializers.py
MIXISAMA/MIS-backend
7aaa1be773718de1beb3ce0080edca7c4114b7ad
[ "MIT" ]
null
null
null
course/serializers.py
MIXISAMA/MIS-backend
7aaa1be773718de1beb3ce0080edca7c4114b7ad
[ "MIT" ]
2
2020-04-20T07:26:51.000Z
2020-04-30T11:51:54.000Z
from django.shortcuts import get_object_or_404 from rest_framework import serializers from user.models import Student, Teacher, CM from user.serializers import SimpleStudentSerializer, SimpleTeacherSerializer, SimpleCMSerializer from plan.models import OfferingCourse from plan.serializers import SimpleOfferingCourseS...
34.890625
97
0.726377
3c9133b8a403757d8c2be73a201f53a75b5772c0
55
py
Python
sandbox/test_pymaid.py
tliu68/maggot_connectome
ef4bbd2011fa9e03da187fcca8c8c1ca79209a36
[ "MIT" ]
1
2021-01-20T00:37:31.000Z
2021-01-20T00:37:31.000Z
sandbox/test_pymaid.py
tliu68/maggot_connectome
ef4bbd2011fa9e03da187fcca8c8c1ca79209a36
[ "MIT" ]
17
2021-03-03T14:48:54.000Z
2021-09-08T15:52:50.000Z
sandbox/test_pymaid.py
tliu68/maggot_connectome
ef4bbd2011fa9e03da187fcca8c8c1ca79209a36
[ "MIT" ]
2
2021-03-05T12:23:20.000Z
2021-03-29T11:49:53.000Z
from pkg.pymaid import start_instance start_instance()
18.333333
37
0.854545
b1bd62a3438d5ad1c7bede36754fd1051f44d875
13,566
py
Python
Licence 1/I11/TP7/pocketgl.py
axelcoezard/licence
1ed409c4572dea080169171beb7e8571159ba071
[ "MIT" ]
8
2020-11-26T20:45:12.000Z
2021-11-29T15:46:22.000Z
Licence 1/I11/TP7/pocketgl.py
axelcoezard/licence
1ed409c4572dea080169171beb7e8571159ba071
[ "MIT" ]
null
null
null
Licence 1/I11/TP7/pocketgl.py
axelcoezard/licence
1ed409c4572dea080169171beb7e8571159ba071
[ "MIT" ]
6
2020-10-23T15:29:24.000Z
2021-05-05T19:10:45.000Z
#!/usr/bin/env python3 # coding: utf-8 #-------------------------------------------------------------- # PocketGL - Pocket Graphics Library # Version 1.0 (19 mai 2016) # module graphique minimaliste # Christian NGUYEN - nguyen@univ-tln.fr # http://nguyen.univ-tln.fr #---------------------------------------------------...
31.475638
94
0.542607
ab6589da01524fae213b8c910f3a7915e002fc37
982
py
Python
misc/min_distance_substring.py
Floozutter/coursework
244548f415553f058098cae84ccdd4ce3f58c245
[ "Unlicense" ]
null
null
null
misc/min_distance_substring.py
Floozutter/coursework
244548f415553f058098cae84ccdd4ce3f58c245
[ "Unlicense" ]
null
null
null
misc/min_distance_substring.py
Floozutter/coursework
244548f415553f058098cae84ccdd4ce3f58c245
[ "Unlicense" ]
null
null
null
""" finding the index of the closest substring, for Rachel """ from typing import Iterator def string_distance(a: str, b: str) -> int: return sum(1 for aa, bb in zip(a, b) if aa != bb) def sliding_window(text: str, size: int) -> Iterator[str]: if size < 1: return for index in range(len(text) - si...
29.757576
61
0.633401
e9cf4f7e2db1af2223270a602ca11cf6d807474a
4,615
py
Python
Python/plotSlicesCp.py
guillaumetousignant/euler3D
7bdfaae7f6b774232b6fc9f83d40a67ccee9a8ae
[ "MIT" ]
1
2019-02-11T00:45:37.000Z
2019-02-11T00:45:37.000Z
Python/plotSlicesCp.py
guillaumetousignant/euler3D
7bdfaae7f6b774232b6fc9f83d40a67ccee9a8ae
[ "MIT" ]
null
null
null
Python/plotSlicesCp.py
guillaumetousignant/euler3D
7bdfaae7f6b774232b6fc9f83d40a67ccee9a8ae
[ "MIT" ]
null
null
null
import tecplot import numpy as np import math import string from tecplot.exception import * from tecplot.constant import * class plotSlicesCp(object): def __init__(self, mySurfaceFlowFile, Type, Axis, firstCoordinate, lastCoordinate, numberOfSlices): print("plotSlicesCp...............................
36.054688
121
0.525894
f95bc106a2e330b98a45dd297f92567571c1486b
5,821
py
Python
vae2gan/gan_train.py
x6rulin/AiLab
b810590d4da645915b8472554794d0c6908109e3
[ "MIT" ]
null
null
null
vae2gan/gan_train.py
x6rulin/AiLab
b810590d4da645915b8472554794d0c6908109e3
[ "MIT" ]
null
null
null
vae2gan/gan_train.py
x6rulin/AiLab
b810590d4da645915b8472554794d0c6908109e3
[ "MIT" ]
null
null
null
import sys import os import torch from torchvision.utils import save_image rootpath = os.path.dirname(os.path.dirname(os.path.abspath(__file__))) sys.path.append(rootpath) from dnnlib.miscs import ArgParse, Trainer from dnnlib.util import Logger, EMA from vae2gan.core.loss import G_loss, D_loss class Args(ArgParse)...
46.198413
143
0.586841
f9ce9c8f13ba8d17f35cac343facbec8b92425bb
1,517
py
Python
spo/spo/report/aktive_mitglieder_per_stichtag/aktive_mitglieder_per_stichtag.py
libracore/spo
c6617a4624d683e27ee3fde745313c30504f3fd1
[ "MIT" ]
null
null
null
spo/spo/report/aktive_mitglieder_per_stichtag/aktive_mitglieder_per_stichtag.py
libracore/spo
c6617a4624d683e27ee3fde745313c30504f3fd1
[ "MIT" ]
6
2019-08-23T18:36:26.000Z
2019-11-12T13:12:12.000Z
spo/spo/report/aktive_mitglieder_per_stichtag/aktive_mitglieder_per_stichtag.py
libracore/spo
c6617a4624d683e27ee3fde745313c30504f3fd1
[ "MIT" ]
1
2021-08-14T22:22:43.000Z
2021-08-14T22:22:43.000Z
# Copyright (c) 2013, libracore and contributors # For license information, please see license.txt from __future__ import unicode_literals import frappe from frappe.utils.data import getdate from frappe import _ def execute(filters=None): columns, data = ["Mitgliedschaft:Link/Mitgliedschaft:150", "Mitglied:Link/Cust...
45.969697
243
0.775873
ddb36486110263e79f79b139f4efa12a8d6385ff
5,528
py
Python
src/test/tests/plots/parcoords.py
visit-dav/vis
c08bc6e538ecd7d30ddc6399ec3022b9e062127e
[ "BSD-3-Clause" ]
226
2018-12-29T01:13:49.000Z
2022-03-30T19:16:31.000Z
src/test/tests/plots/parcoords.py
visit-dav/vis
c08bc6e538ecd7d30ddc6399ec3022b9e062127e
[ "BSD-3-Clause" ]
5,100
2019-01-14T18:19:25.000Z
2022-03-31T23:08:36.000Z
src/test/tests/plots/parcoords.py
visit-dav/vis
c08bc6e538ecd7d30ddc6399ec3022b9e062127e
[ "BSD-3-Clause" ]
84
2019-01-24T17:41:50.000Z
2022-03-10T10:01:46.000Z
# ---------------------------------------------------------------------------- # MODES: serial # CLASSES: nightly # # Test Case: parcoords.py # # Tests: Tests the parallel coordinates plot # # Programmer: Jeremy Meredith # Date: January 31, 2008 # # Modifications: # Jeremy Meredith, Mon Feb 4 16:...
28.204082
83
0.713278
ddf072c2c52f228cda32ab3cd5caccfa0ec45cef
814
py
Python
src/Themes/SizeRatioTheme.py
LukasTinnes/VenturePainter
cb1f24fda2a43d402a9c5a401d713af0c950270b
[ "Unlicense" ]
1
2020-05-29T21:09:33.000Z
2020-05-29T21:09:33.000Z
src/Themes/SizeRatioTheme.py
LukasTinnes/VenturePainter
cb1f24fda2a43d402a9c5a401d713af0c950270b
[ "Unlicense" ]
3
2020-06-14T11:33:54.000Z
2022-01-13T03:31:06.000Z
src/Themes/SizeRatioTheme.py
LukasTinnes/VenturePainter
cb1f24fda2a43d402a9c5a401d713af0c950270b
[ "Unlicense" ]
null
null
null
from .Theme import Theme from src.Graph import Graph class SizeRatioTheme(Theme): def __init__(self): super().__init__() self.node_sizes = [] self.max = 0 self.min = 0 def prepare(self, graph, shapes): node_sizes = [] for shape in shapes: size = sh...
30.148148
91
0.603194
9b2e69ab40987da72d7b0b7657ea7e6d1ad93dc0
4,342
py
Python
Utils/py/SimsparkTests/Tests/pseudo_simple_penalty_kicker.py
tarsoly/NaoTH
dcd2b67ef6bf9953c81d3e1b26e543b5922b7d52
[ "ECL-2.0", "Apache-2.0" ]
null
null
null
Utils/py/SimsparkTests/Tests/pseudo_simple_penalty_kicker.py
tarsoly/NaoTH
dcd2b67ef6bf9953c81d3e1b26e543b5922b7d52
[ "ECL-2.0", "Apache-2.0" ]
null
null
null
Utils/py/SimsparkTests/Tests/pseudo_simple_penalty_kicker.py
tarsoly/NaoTH
dcd2b67ef6bf9953c81d3e1b26e543b5922b7d52
[ "ECL-2.0", "Apache-2.0" ]
null
null
null
import math from naoth import BehaviorParser, Framework_Representations_pb2 from AgentController import AgentController from SimsparkController import SimsparkController from Utils import * def ball_out_or_doesnt_move(s, last_ball): _ = s.get_ball() if _['x'] < 4.5 and abs(_['y']) < 3.0 and math.sqrt(math.po...
39.472727
149
0.598572
fd1e9b0d626b18b8334b0a14889146c250543a7f
1,752
py
Python
etl/transforms/primitives/df/tests/test_restructure.py
cloud-cds/cds-stack
d68a1654d4f604369a071f784cdb5c42fc855d6e
[ "Apache-2.0" ]
6
2018-06-27T00:09:55.000Z
2019-03-07T14:06:53.000Z
etl/transforms/primitives/df/tests/test_restructure.py
cloud-cds/cds-stack
d68a1654d4f604369a071f784cdb5c42fc855d6e
[ "Apache-2.0" ]
3
2021-03-31T18:37:46.000Z
2021-06-01T21:49:41.000Z
etl/transforms/primitives/df/tests/test_restructure.py
cloud-cds/cds-stack
d68a1654d4f604369a071f784cdb5c42fc855d6e
[ "Apache-2.0" ]
3
2020-01-24T16:40:49.000Z
2021-09-30T02:28:55.000Z
from etl.transforms.primitives.df import restructure from etl.core import test_utils import pytest import pandas as pd def test_extract_internal_ids(): df = pd.DataFrame([{ 'ID_col': [ {'Type': 'bad_type1',}, {'Type': 'good_type', 'ID': j}, {'Type': 'bad_type2', 'ID': str(j+10)} ], 'Extra': 'still_here...
24.676056
76
0.589612
bd1dfa13944249b1819974d264c6f9d3fb27f001
449
py
Python
Algorithms/Implementation/library_fine.py
byung-u/HackerRank
4c02fefff7002b3af774b99ebf8d40f149f9d163
[ "MIT" ]
null
null
null
Algorithms/Implementation/library_fine.py
byung-u/HackerRank
4c02fefff7002b3af774b99ebf8d40f149f9d163
[ "MIT" ]
null
null
null
Algorithms/Implementation/library_fine.py
byung-u/HackerRank
4c02fefff7002b3af774b99ebf8d40f149f9d163
[ "MIT" ]
null
null
null
#!/usr/bin/env python3 import sys D1, M1, Y1 = list(map(int, input().split())) # actual D2, M2, Y2 = list(map(int, input().split())) # expected # delay year, month, day dy = Y1 - Y2 dm = M1 - M2 dd = D1 - D2 if dy < 0: print(0) elif dy <= 0 and dm < 0: print(0) elif dy <= 0 and dm <= 0 and dd <= 0: prin...
19.521739
56
0.545657
bd3ebf4cefc09856f375b52c8e164c6205ba4d61
10,982
py
Python
modules/visiualize.py
J0nasW/Bachelorarbeit
37052be075713f2016d42782397ff875e3e982f8
[ "MIT" ]
null
null
null
modules/visiualize.py
J0nasW/Bachelorarbeit
37052be075713f2016d42782397ff875e3e982f8
[ "MIT" ]
null
null
null
modules/visiualize.py
J0nasW/Bachelorarbeit
37052be075713f2016d42782397ff875e3e982f8
[ "MIT" ]
null
null
null
""" VISIUALIZATION MODULE loading Parameter Matrices CALL BY: <visiualize.py> RETURN: Environment simulation (animated) & Plots INFO: This Module can load a specific File Dump (cPickle) and visiualize the containig matrices onto a OpenAI Gym Environment """ # Some dependencies import numpy as np import...
34.31875
236
0.583956
bd4edd21bc8a47cb486a5152708318d067be0148
360
py
Python
python/data_sutram/scraper/convert_jpeg.py
SayanGhoshBDA/code-backup
8b6135facc0e598e9686b2e8eb2d69dd68198b80
[ "MIT" ]
16
2018-11-26T08:39:42.000Z
2019-05-08T10:09:52.000Z
python/data_sutram/scraper/convert_jpeg.py
SayanGhoshBDA/code-backup
8b6135facc0e598e9686b2e8eb2d69dd68198b80
[ "MIT" ]
8
2020-05-04T06:29:26.000Z
2022-02-12T05:33:16.000Z
python/data_sutram/scraper/convert_jpeg.py
SayanGhoshBDA/code-backup
8b6135facc0e598e9686b2e8eb2d69dd68198b80
[ "MIT" ]
5
2020-02-11T16:02:21.000Z
2021-02-05T07:48:30.000Z
from __future__ import print_function import os, sys from PIL import Image for infile in sys.argv[1:]: f, e = os.path.splitext(infile) outfile = f + ".jpg" print(outfile) if infile != outfile: try: Image.open(infile).save(outfile) except IOError: print("cannot co...
25.714286
44
0.622222
c0b6296252a7b9017803e7190a7be0da60e83e83
101
py
Python
src/test/test_env.py
kaphka/imi-master-thesis
2331a3534dc32e30a1333bb21c68c1e1b07ec9e4
[ "MIT" ]
2
2018-04-27T09:02:15.000Z
2019-04-19T19:12:13.000Z
src/test/test_env.py
kaphka/imi-master-thesis
2331a3534dc32e30a1333bb21c68c1e1b07ec9e4
[ "MIT" ]
1
2019-04-19T19:13:08.000Z
2021-02-22T21:29:55.000Z
src/test/test_env.py
kaphka/imi-master-thesis
2331a3534dc32e30a1333bb21c68c1e1b07ec9e4
[ "MIT" ]
null
null
null
import torch def test_torch_gpu(): assert torch.cuda.is_available() torch.eye(1).cuda()
16.833333
36
0.673267
8d079036071f98c8348f551acb0b508392461567
3,318
py
Python
research/nlp/gpt2/src/GPT2ForCBT.py
leelige/mindspore
5199e05ba3888963473f2b07da3f7bca5b9ef6dc
[ "Apache-2.0" ]
77
2021-10-15T08:32:37.000Z
2022-03-30T13:09:11.000Z
research/nlp/gpt2/src/GPT2ForCBT.py
leelige/mindspore
5199e05ba3888963473f2b07da3f7bca5b9ef6dc
[ "Apache-2.0" ]
3
2021-10-30T14:44:57.000Z
2022-02-14T06:57:57.000Z
research/nlp/gpt2/src/GPT2ForCBT.py
leelige/mindspore
5199e05ba3888963473f2b07da3f7bca5b9ef6dc
[ "Apache-2.0" ]
24
2021-10-15T08:32:45.000Z
2022-03-24T18:45:20.000Z
# Copyright 2020 Huawei Technologies Co., Ltd # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to...
39.035294
102
0.64135
9eb1332628fc7da9d61608a4e2dcf1f4067ec754
1,100
py
Python
projects/g3h2-algorithm/practice2/2_lcs.py
keybrl/xdu-coursework
9d0e905bef28c18d87d3b97643de0d32f9f08ee0
[ "MIT" ]
null
null
null
projects/g3h2-algorithm/practice2/2_lcs.py
keybrl/xdu-coursework
9d0e905bef28c18d87d3b97643de0d32f9f08ee0
[ "MIT" ]
null
null
null
projects/g3h2-algorithm/practice2/2_lcs.py
keybrl/xdu-coursework
9d0e905bef28c18d87d3b97643de0d32f9f08ee0
[ "MIT" ]
null
null
null
def lcs(x, y): m = len(x) n = len(y) c = [[0 for _ in range(n + 1)] for _ in range(m + 1)] b = [[0 for _ in range(n)] for _ in range(m)] for i in range(m): for j in range(n): if x[i] == y[j]: c[i+1][j+1] = c[i][j] + 1 b[i][j] = 0 elif...
23.913043
75
0.383636
c8b2ea46825e79a7aec6032b7bb91a5bbf133011
144
py
Python
robolib/robogui/_robogui_tests.py
Obyoxar/RobolabStatistics
08343ca3ac49df7efdac33692d7cc4b783e851f5
[ "MIT" ]
2
2017-11-30T21:12:11.000Z
2017-12-01T07:52:43.000Z
robolib/robogui/_robogui_tests.py
Obyoxar/RobolabStatistics
08343ca3ac49df7efdac33692d7cc4b783e851f5
[ "MIT" ]
14
2017-11-14T18:12:53.000Z
2018-06-03T16:07:57.000Z
robolib/robogui/_robogui_tests.py
Obyoxar/RobolabStatistics
08343ca3ac49df7efdac33692d7cc4b783e851f5
[ "MIT" ]
3
2018-02-05T10:40:03.000Z
2018-02-09T09:29:19.000Z
import robolib.robogui.pixel_editor as pe import numpy as np size = 20 img = pe.get_drawing_input(9, 9) print(img.shape) pe.show_image(img)
13.090909
41
0.756944
a955b85a64e0ff7572fa03d95417f3acb16baa14
7,030
py
Python
Packs/ArcSightESM/Integrations/ArcSightESMv2/ArcSightESMv2_test.py
diCagri/content
c532c50b213e6dddb8ae6a378d6d09198e08fc9f
[ "MIT" ]
799
2016-08-02T06:43:14.000Z
2022-03-31T11:10:11.000Z
Packs/ArcSightESM/Integrations/ArcSightESMv2/ArcSightESMv2_test.py
diCagri/content
c532c50b213e6dddb8ae6a378d6d09198e08fc9f
[ "MIT" ]
9,317
2016-08-07T19:00:51.000Z
2022-03-31T21:56:04.000Z
Packs/ArcSightESM/Integrations/ArcSightESMv2/ArcSightESMv2_test.py
diCagri/content
c532c50b213e6dddb8ae6a378d6d09198e08fc9f
[ "MIT" ]
1,297
2016-08-04T13:59:00.000Z
2022-03-31T23:43:06.000Z
import demistomock as demisto import pytest import requests_mock PARAMS = { 'server': 'https://server', 'credentials': {}, 'proxy': True} ARGS = {'ids': 'lastDateRange', 'lastDateRange': '2 hours'} def test_decode_ip(mocker): mocker.patch.object(demisto, 'getIntegrationContext', return_value...
37.795699
116
0.647795
f530bc62b57b0d834024cc796fa5218e4cb5ae35
159
py
Python
kernel/scripts/generate_interrupts_impl.py
losfair/FlatMk-v0
6e78666e8982e41688c24828093ea6b73b76ea11
[ "MIT" ]
5
2020-01-11T22:38:34.000Z
2021-06-01T13:40:55.000Z
kernel/scripts/generate_interrupts_impl.py
losfair/FlatMk-v0
6e78666e8982e41688c24828093ea6b73b76ea11
[ "MIT" ]
null
null
null
kernel/scripts/generate_interrupts_impl.py
losfair/FlatMk-v0
6e78666e8982e41688c24828093ea6b73b76ea11
[ "MIT" ]
null
null
null
for i in range(32, 256): print("interrupt!(intr_{}, __intr_{}, frame, registers, {{ handle_external_interrupt(frame, registers, {}) }});".format(i, i, i))
53
133
0.654088
27a31c891c95b46872cf156f637c1b78068f91b7
11,196
py
Python
weather_data.py
mzurhorst/wassersteuerung
88e1f31d50e2f4e95606d4612687eceaf6ece69b
[ "MIT" ]
2
2017-08-06T12:53:12.000Z
2018-05-27T18:03:54.000Z
weather_data.py
mzurhorst/wassersteuerung
88e1f31d50e2f4e95606d4612687eceaf6ece69b
[ "MIT" ]
null
null
null
weather_data.py
mzurhorst/wassersteuerung
88e1f31d50e2f4e95606d4612687eceaf6ece69b
[ "MIT" ]
null
null
null
#!/usr/bin/python3 # #File : weather_data.py #Author : Marcus Zurhorst #Email : marcuszurhorst@gmail.com #License : MIT License #Copyright : (c) 2017 Marcus Zurhorst # #Description : This module provides functions to fetch weather data from # OpenWeatherM...
32.452174
151
0.667917
fdd1ddf66c39065c12e5a2f9cbddcde7123dd39a
4,175
py
Python
src/pyboost/fahrzeug.py
lueck/learn-python-lego-de
db44b1c2cd4048f229fa5096655ccf3ab2fe34ec
[ "MIT" ]
null
null
null
src/pyboost/fahrzeug.py
lueck/learn-python-lego-de
db44b1c2cd4048f229fa5096655ccf3ab2fe34ec
[ "MIT" ]
null
null
null
src/pyboost/fahrzeug.py
lueck/learn-python-lego-de
db44b1c2cd4048f229fa5096655ccf3ab2fe34ec
[ "MIT" ]
null
null
null
from pylgbst.hub import MoveHub, VisionSensor LINKS = 1 # gegen den Uhrzeugersinn (mathematisch positive Drehung) RECHTS = -1 # im Uhrzeigersinn (mathematisch negative Drehung) class Einachser(MoveHub): """Ein einfaches einachsiges Fahrzeug auf Movehub-Basis (Vernie).""" # Fahrzeugparameter RAD_DUR...
40.931373
115
0.677126
8bff48a54f8f4220a89ead51154dc8238cb3613a
89
py
Python
run/core/models/wrapper.py
matthewmuccio/FlaskBase
b2d7288a33b20badee1f4667526cfc528599a9ef
[ "MIT" ]
null
null
null
run/core/models/wrapper.py
matthewmuccio/FlaskBase
b2d7288a33b20badee1f4667526cfc528599a9ef
[ "MIT" ]
null
null
null
run/core/models/wrapper.py
matthewmuccio/FlaskBase
b2d7288a33b20badee1f4667526cfc528599a9ef
[ "MIT" ]
null
null
null
#!/usr/bin/env python3 #import json #import requests def get_data(x): pass
8.9
23
0.629213
8bdfe14e4cf5cc1f218f3541055a23cd91f37a67
1,147
py
Python
example/solid_example/computer_srp.py
zeroam/TIL
43e3573be44c7f7aa4600ff8a34e99a65cbdc5d1
[ "MIT" ]
null
null
null
example/solid_example/computer_srp.py
zeroam/TIL
43e3573be44c7f7aa4600ff8a34e99a65cbdc5d1
[ "MIT" ]
null
null
null
example/solid_example/computer_srp.py
zeroam/TIL
43e3573be44c7f7aa4600ff8a34e99a65cbdc5d1
[ "MIT" ]
null
null
null
class Computer: def __init__(self, mouse, keyboard, monitor): self.mouse = Mouse(mouse) self.keyboard = Keyboard(keyboard) self.monitor = Monitor(monitor, self.keyboard) class Mouse: def __init__(self, name): self.name = name def click(self): print(f'{self.name}: 클...
22.490196
64
0.598082
d053083e4ba483b755cbc7eb272885318d18fb20
76
py
Python
service/wkb/poseMusic/Piano/__init__.py
wangkaibiao/SettlersFinancialData3
498249e14f24bfa3186f07e8f66ee624d08c6ff1
[ "MIT" ]
null
null
null
service/wkb/poseMusic/Piano/__init__.py
wangkaibiao/SettlersFinancialData3
498249e14f24bfa3186f07e8f66ee624d08c6ff1
[ "MIT" ]
null
null
null
service/wkb/poseMusic/Piano/__init__.py
wangkaibiao/SettlersFinancialData3
498249e14f24bfa3186f07e8f66ee624d08c6ff1
[ "MIT" ]
null
null
null
from bin.make_music import Piano __version__ = '0.1' __author__ = 'return'
15.2
32
0.75
3259db4fc6b7eac06260958c0a812f136f6bf80d
15,475
py
Python
presenter/presenter.py
Limatationz/pandemiesimulator
91d21fda2f9c77d616a9e9401271fc044b421007
[ "MIT" ]
null
null
null
presenter/presenter.py
Limatationz/pandemiesimulator
91d21fda2f9c77d616a9e9401271fc044b421007
[ "MIT" ]
null
null
null
presenter/presenter.py
Limatationz/pandemiesimulator
91d21fda2f9c77d616a9e9401271fc044b421007
[ "MIT" ]
null
null
null
""" Coordinator of the simulator. Contains the Presenter class. """ from PyQt5 import QtCore from PyQt5.QtCore import QSize from PyQt5.QtWidgets import QFileDialog from constants import FPS from model.simulation import Simulation from presenter.errors import InfectionError from util import open_doc_in_browser...
50.737705
120
0.565363
eb39800d0d7bdf918228278885ccfce5481e8140
2,614
py
Python
python/fastcampus/chapter04_02.py
zeroam/TIL
43e3573be44c7f7aa4600ff8a34e99a65cbdc5d1
[ "MIT" ]
null
null
null
python/fastcampus/chapter04_02.py
zeroam/TIL
43e3573be44c7f7aa4600ff8a34e99a65cbdc5d1
[ "MIT" ]
null
null
null
python/fastcampus/chapter04_02.py
zeroam/TIL
43e3573be44c7f7aa4600ff8a34e99a65cbdc5d1
[ "MIT" ]
null
null
null
""" 일급 함수(일급 객체) Decorator & Closure """ # 파이썬 변수 범위 (global) # Closure (클로저) # 반환되는 내부 함수에 대해서 선언 된 연결을 가지고 참조하는 방식 # 반환 당시 함수 유효범위를 벗어난 변수 또는 메소드에 직접 접근이 가능하다. a = 10 print(a + 10) print(a + 100) # 결과를 누적할 수는 없을까? # 클래스 이용 class Averager(): def __init__(self): self._series = [] def __call__(self,...
19.362963
69
0.650727
dfa8b7d20b46cc44d5296f659089597ff204404c
2,312
py
Python
official/nlp/cpm/data_process/tokenizer_cpm.py
leelige/mindspore
5199e05ba3888963473f2b07da3f7bca5b9ef6dc
[ "Apache-2.0" ]
77
2021-10-15T08:32:37.000Z
2022-03-30T13:09:11.000Z
official/nlp/cpm/data_process/tokenizer_cpm.py
leelige/mindspore
5199e05ba3888963473f2b07da3f7bca5b9ef6dc
[ "Apache-2.0" ]
3
2021-10-30T14:44:57.000Z
2022-02-14T06:57:57.000Z
official/nlp/cpm/data_process/tokenizer_cpm.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...
32.111111
109
0.664792
dffba0cabc1099b3f2fc1691758e37bea493d4a1
9,485
py
Python
examples/basic_household_Districtheating.py
sdickler/HiSim
09a11d99f220f7cadb3cb7b09a6fce8f147243c8
[ "MIT" ]
null
null
null
examples/basic_household_Districtheating.py
sdickler/HiSim
09a11d99f220f7cadb3cb7b09a6fce8f147243c8
[ "MIT" ]
null
null
null
examples/basic_household_Districtheating.py
sdickler/HiSim
09a11d99f220f7cadb3cb7b09a6fce8f147243c8
[ "MIT" ]
1
2022-03-13T16:15:36.000Z
2022-03-13T16:15:36.000Z
# -*- coding: utf-8 -*- import inspect import os import sys from hisim import simulator as sim from hisim import components as cps from hisim.components import occupancy from hisim.components import weather from hisim.components import pvs from hisim.components import building from hisim.components import district_heat...
52.115385
224
0.593147
5f2e678015be6c270a7717f35122ee9e299050a2
219
py
Python
Lehrjahr_2/Modul_122/python/listcpuinfo.py
severinkaderli/gibb
5b4952cedacb3885ab4a0eb9fd6c1cab5674e3ee
[ "MIT" ]
5
2015-05-19T14:26:53.000Z
2016-06-24T17:03:03.000Z
Lehrjahr_2/Modul_122/python/listcpuinfo.py
severinkaderli/gibb
5b4952cedacb3885ab4a0eb9fd6c1cab5674e3ee
[ "MIT" ]
null
null
null
Lehrjahr_2/Modul_122/python/listcpuinfo.py
severinkaderli/gibb
5b4952cedacb3885ab4a0eb9fd6c1cab5674e3ee
[ "MIT" ]
6
2015-05-26T06:25:05.000Z
2020-04-30T07:25:30.000Z
#!/usr/bin/python3.4 # #SCRIPT: listcpuinfo.py #AUTHOR: Severin Kaderli #PURPOSE: List cpu info #USAGE: ./listcpuinfo.py def getcpuinfo(): cpuinfo = open('/proc/cpuinfo', 'r') liste = cpuinfo.readlines() return liste
21.9
37
0.716895
901edb41829374c0779ffc0d4351713ebc7729bb
118
py
Python
2278-percentage-of-letter-in-string/2278-percentage-of-letter-in-string.py
hyeseonko/LeetCode
48dfc93f1638e13041d8ce1420517a886abbdc77
[ "MIT" ]
2
2021-12-05T14:29:06.000Z
2022-01-01T05:46:13.000Z
2278-percentage-of-letter-in-string/2278-percentage-of-letter-in-string.py
hyeseonko/LeetCode
48dfc93f1638e13041d8ce1420517a886abbdc77
[ "MIT" ]
null
null
null
2278-percentage-of-letter-in-string/2278-percentage-of-letter-in-string.py
hyeseonko/LeetCode
48dfc93f1638e13041d8ce1420517a886abbdc77
[ "MIT" ]
null
null
null
class Solution: def percentageLetter(self, s: str, letter: str) -> int: return 100*s.count(letter)//len(s)
39.333333
59
0.652542
840f9aca187aae9e4485c966a0efc66c5a7e8017
485
py
Python
Fastir_Collector/filecatcher/listfiles.py
Unam3dd/Train-2018-2020
afb6ae70fe338cbe55a21b74648d91996b818fa2
[ "MIT" ]
4
2021-04-23T15:39:17.000Z
2021-12-27T22:53:24.000Z
Fastir_Collector/filecatcher/listfiles.py
Unam3dd/Train-2018-2020
afb6ae70fe338cbe55a21b74648d91996b818fa2
[ "MIT" ]
null
null
null
Fastir_Collector/filecatcher/listfiles.py
Unam3dd/Train-2018-2020
afb6ae70fe338cbe55a21b74648d91996b818fa2
[ "MIT" ]
2
2021-04-19T08:28:54.000Z
2022-01-19T13:23:29.000Z
# -*- coding: utf-8 -*- from __future__ import unicode_literals import os class _ListFiles(object): def __init__(self, root, logger, sep='\\'): self.root = root self.list_file = [] self.sep = sep self.files = [] self.logger = logger def list_files(self, dircurrent): ...
26.944444
80
0.604124
4ba2f685bb29bacf3484a9a4540182818cebf2ab
877
py
Python
tests/timestamp_test.py
I4-Projektseminar-HHU-2016/seminar-project-marionline03
ec2b2d2b588baa647c7a5e542e1d20a39cd0fc09
[ "CC0-1.0" ]
null
null
null
tests/timestamp_test.py
I4-Projektseminar-HHU-2016/seminar-project-marionline03
ec2b2d2b588baa647c7a5e542e1d20a39cd0fc09
[ "CC0-1.0" ]
null
null
null
tests/timestamp_test.py
I4-Projektseminar-HHU-2016/seminar-project-marionline03
ec2b2d2b588baa647c7a5e542e1d20a39cd0fc09
[ "CC0-1.0" ]
null
null
null
# http://stackoverflow.com/questions/2775864/python-create-unix-timestamp-five-minutes-in-the-future import time import datetime import os current_time = datetime.datetime.now(datetime.timezone.utc) unix_timestamp = current_time.timestamp() # works if Python >= 3.3 unix_timestamp_plus_5_min = unix_timestamp + (1 * 10...
36.541667
100
0.77423
4b12d72bd960b4863bc5b000e3ace94eff1bcb48
1,067
py
Python
export.py
twothreenine/task-rotation
64a3a648c960df65d03587a3f7009ce4b1f7df44
[ "MIT" ]
null
null
null
export.py
twothreenine/task-rotation
64a3a648c960df65d03587a3f7009ce4b1f7df44
[ "MIT" ]
1
2022-01-09T18:35:17.000Z
2022-01-09T18:35:17.000Z
export.py
twothreenine/task-rotation
64a3a648c960df65d03587a3f7009ce4b1f7df44
[ "MIT" ]
null
null
null
#!/usr/bin/env python3 import ethercalc import json import logging import pprint import script import os pp = pprint.PrettyPrinter(indent=4) def export(host, page, sheets=[None,1,2,3,4,5], folder=None): if not folder: folder = page folder = "exported_sheets/" + folder if not os.path.exists(folder)...
26.02439
97
0.618557
6a8d2b79f445716fd0e66c426611437f6cbcabfc
682
py
Python
marsyas-vamp/marsyas/scripts/large-evaluators/tempo-reference-implementation/multiple-options.py
jaouahbi/VampPlugins
27c2248d1c717417fe4d448cdfb4cb882a8a336a
[ "Apache-2.0" ]
null
null
null
marsyas-vamp/marsyas/scripts/large-evaluators/tempo-reference-implementation/multiple-options.py
jaouahbi/VampPlugins
27c2248d1c717417fe4d448cdfb4cb882a8a336a
[ "Apache-2.0" ]
null
null
null
marsyas-vamp/marsyas/scripts/large-evaluators/tempo-reference-implementation/multiple-options.py
jaouahbi/VampPlugins
27c2248d1c717417fe4d448cdfb4cb882a8a336a
[ "Apache-2.0" ]
null
null
null
#!/usr/bin/env python import itertools import sys import tempo_stem_file import defs_class #ONSETS = range(3) #BH = range(2) #OPTIONS = [zip(x, BH) for x # in itertools.permutations(ONSETS, len(BH))] OPTIONS = range(5) if __name__ == "__main__": user_filename = sys.argv[1] if user_filename[-3:] == ".mf":...
20.666667
69
0.589443
6ab1c52b5780d56c67332bbe56b2673000cef923
5,356
py
Python
python/oneflow/compatible/single_client/summary/summary_projector.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/summary/summary_projector.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/summary/summary_projector.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...
33.685535
88
0.630508
7c4d9898f53a9f3d2b9da6910ef4ca0537ede073
1,815
py
Python
kafka/cruise-control/cruise-control-client/cruisecontrolclient/client/CCParameter/RegularExpressionParameter.py
smthkissinger/docker-images
35e868295d04fa780325ada4168381f1e80e8fe4
[ "BSD-3-Clause" ]
2,177
2017-08-28T15:07:01.000Z
2022-03-30T11:06:01.000Z
kafka/cruise-control/cruise-control-client/cruisecontrolclient/client/CCParameter/RegularExpressionParameter.py
smthkissinger/docker-images
35e868295d04fa780325ada4168381f1e80e8fe4
[ "BSD-3-Clause" ]
1,079
2017-08-30T07:25:06.000Z
2022-03-31T17:49:07.000Z
kafka/cruise-control/cruise-control-client/cruisecontrolclient/client/CCParameter/RegularExpressionParameter.py
smthkissinger/docker-images
35e868295d04fa780325ada4168381f1e80e8fe4
[ "BSD-3-Clause" ]
489
2017-08-28T16:17:03.000Z
2022-03-31T15:52:18.000Z
import re from typing import Union, Pattern from cruisecontrolclient.client.CCParameter.Parameter import AbstractParameter class AbstractRegularExpressionParameter(AbstractParameter): def __init__(self, value: Union[str, Pattern]): AbstractParameter.__init__(self, value) def validate_value(self): ...
36.3
101
0.651791
7c553cfbbfe0ef9c2f2f848dde58faa8194a03f1
3,157
py
Python
solutions/ctirg/webserver/src/indexer/index.py
naetimus/bootcamp
0182992df7c54012944b51fe9b70532ab6a0059b
[ "Apache-2.0" ]
1
2021-01-11T18:40:22.000Z
2021-01-11T18:40:22.000Z
solutions/ctirg/webserver/src/indexer/index.py
naetimus/bootcamp
0182992df7c54012944b51fe9b70532ab6a0059b
[ "Apache-2.0" ]
null
null
null
solutions/ctirg/webserver/src/indexer/index.py
naetimus/bootcamp
0182992df7c54012944b51fe9b70532ab6a0059b
[ "Apache-2.0" ]
null
null
null
import logging from milvus import Milvus, IndexType, MetricType, Status from common.config import MILVUS_HOST, MILVUS_PORT, VECTOR_DIMENSION, TOP_K def milvus_client(): try: milvus = Milvus(host=MILVUS_HOST, port=MILVUS_PORT) # status = milvus.connect(MILVUS_HOST, MILVUS_PORT) return milvu...
28.963303
120
0.656636
6b375e7a0ba1191b186d5dd635797f9fc8ffa351
4,608
py
Python
face_sdk/models/network_def/mobilefacenet_def.py
weihaoxie/FaceX-Zoo
db0b087e4f4d28152e172d6c8d3767a8870733b4
[ "Apache-2.0" ]
1,329
2021-01-13T07:06:30.000Z
2022-03-31T07:23:39.000Z
face_sdk/models/network_def/mobilefacenet_def.py
weihaoxie/FaceX-Zoo
db0b087e4f4d28152e172d6c8d3767a8870733b4
[ "Apache-2.0" ]
115
2021-01-13T10:42:57.000Z
2022-03-28T03:57:52.000Z
face_sdk/models/network_def/mobilefacenet_def.py
weihaoxie/FaceX-Zoo
db0b087e4f4d28152e172d6c8d3767a8870733b4
[ "Apache-2.0" ]
351
2021-01-13T07:21:00.000Z
2022-03-29T14:11:39.000Z
""" @author: Jun Wang @date: 20201019 @contact: jun21wangustc@gmail.com """ # based on: # https://github.com/TreB1eN/InsightFace_Pytorch/blob/master/model.py from torch.nn import Linear, Conv2d, BatchNorm1d, BatchNorm2d, PReLU, Sequential, Module import torch class Flatten(Module): def forward(self, input): ...
43.471698
131
0.613281
86140aa2e38098111b888c423f43343271a1a4ad
3,046
py
Python
Chapter5_DNN/Chapter5_4_TensorBoard/tensorboard1.py
thisisjako/UdemyTF
ee4102391ed6bd50f764955f732f5740425a9209
[ "MIT" ]
null
null
null
Chapter5_DNN/Chapter5_4_TensorBoard/tensorboard1.py
thisisjako/UdemyTF
ee4102391ed6bd50f764955f732f5740425a9209
[ "MIT" ]
null
null
null
Chapter5_DNN/Chapter5_4_TensorBoard/tensorboard1.py
thisisjako/UdemyTF
ee4102391ed6bd50f764955f732f5740425a9209
[ "MIT" ]
null
null
null
import os import numpy as np from tensorflow.keras.callbacks import TensorBoard from tensorflow.keras.datasets import mnist from tensorflow.keras.initializers import Constant from tensorflow.keras.initializers import TruncatedNormal from tensorflow.keras.layers import Activation from tensorflow.keras.layers import Den...
31.729167
112
0.717006