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
f60bb57b8fe0641b11e8154ef22eecc207b39150
13,323
py
Python
generate_plots.py
mwunderlich/klimawatch
1192230933e6b48b52a22190163951f564ef3a98
[ "Apache-2.0" ]
null
null
null
generate_plots.py
mwunderlich/klimawatch
1192230933e6b48b52a22190163951f564ef3a98
[ "Apache-2.0" ]
null
null
null
generate_plots.py
mwunderlich/klimawatch
1192230933e6b48b52a22190163951f564ef3a98
[ "Apache-2.0" ]
null
null
null
import json # writing json import os # possibility to delete files import sys # reading command line arguments import textwrap # wrapping long lines import numpy as np # make it easier with numeric values import pandas import plotly.graph_objects as go # plots from scipy.stats import linregress # for computing ...
32.896296
156
0.619755
1495ae31e06d7956932e0a1cb459cb30acff1262
2,553
py
Python
python_project/python/MyClass.py
sinomiko/project
00fadb0033645f103692f5b06c861939a9d4aa0e
[ "BSD-3-Clause" ]
1
2018-12-30T14:07:42.000Z
2018-12-30T14:07:42.000Z
python_project/python/MyClass.py
sinomiko/project
00fadb0033645f103692f5b06c861939a9d4aa0e
[ "BSD-3-Clause" ]
null
null
null
python_project/python/MyClass.py
sinomiko/project
00fadb0033645f103692f5b06c861939a9d4aa0e
[ "BSD-3-Clause" ]
null
null
null
#!/usr/bin/python #coding=utf-8 #TODO:类方法 class MyClass: name1="default" def __init__(self): self.name1="MyClass" def method(self): print self.name1 print "I have a MyClass method1" def __IAMethod(self): print "I have a MyClass __IAMethod " def setName1(self,name): ...
18.366906
44
0.623188
216bc0d5c9fa7691559dcebb605b9363d3ebffd9
381
py
Python
AP_SS16/US1/python_custom_scripts/curve_fit.py
DimensionalScoop/kautschuk
90403f97cd60b9716cb6a06668196891d5d96578
[ "MIT" ]
3
2016-04-27T17:07:00.000Z
2022-02-02T15:43:15.000Z
FP_2017/18/python_custom_scripts/curve_fit.py
DimensionalScoop/kautschuk
90403f97cd60b9716cb6a06668196891d5d96578
[ "MIT" ]
5
2016-04-27T17:10:03.000Z
2017-06-20T14:54:20.000Z
latex-template/python_custom_scripts/curve_fit.py
DimensionalScoop/kautschuk
90403f97cd60b9716cb6a06668196891d5d96578
[ "MIT" ]
null
null
null
import numpy as np import scipy.optimize import uncertainties as unc import uncertainties.unumpy as unp def ucurve_fit(f, x, y, **kwargs): if np.any(unp.std_devs(y) == 0): sigma = None else: sigma = unp.std_devs(y) popt, pcov = scipy.optimize.curve_fit(f, x, unp.nominal_values(y), sigma=si...
25.4
93
0.682415
2ebd6ec37ba90a44d11b7302cba8075f21953961
134
py
Python
scripts/hello_world_aswinmguptha.py
breezage/Hacktoberfest-1
6f6d52248c79c0e72fd13b599500318fce3f9ab0
[ "MIT" ]
null
null
null
scripts/hello_world_aswinmguptha.py
breezage/Hacktoberfest-1
6f6d52248c79c0e72fd13b599500318fce3f9ab0
[ "MIT" ]
null
null
null
scripts/hello_world_aswinmguptha.py
breezage/Hacktoberfest-1
6f6d52248c79c0e72fd13b599500318fce3f9ab0
[ "MIT" ]
1
2019-10-24T06:45:21.000Z
2019-10-24T06:45:21.000Z
# Language: Python # AUTHOR: Aswin M Guptha # GitHub: https://www.github.com/aswinmguptha #!/usr/bin/python2.7 print "Hello, World"
16.75
45
0.716418
258db84c61a3f951cb36bf1655354605df386fd4
1,432
py
Python
EXAMPLE.py
tjczec01/RadauD
e064b183cc3c34f592a4f471c4069876963d2f41
[ "MIT" ]
null
null
null
EXAMPLE.py
tjczec01/RadauD
e064b183cc3c34f592a4f471c4069876963d2f41
[ "MIT" ]
null
null
null
EXAMPLE.py
tjczec01/RadauD
e064b183cc3c34f592a4f471c4069876963d2f41
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- """ Created on Wed Jun 24 12:10:55 2020 Github: https://github.com/tjczec01 @author: Travis J Czechorski E-mail: tjczec01@gmail.com """ from __future__ import division, print_function, absolute_import import os dir_path = os.path.dirname(os.path.realpath(__file__)) exec(open(r...
30.468085
132
0.585196
d376d44cd2eae16872b7f08c988044b18108a18d
4,291
py
Python
pe.py
matt-biss/forensics-evidence
3484498eb2ca17e72cbfdad0178a837e92ec96b9
[ "MIT" ]
null
null
null
pe.py
matt-biss/forensics-evidence
3484498eb2ca17e72cbfdad0178a837e92ec96b9
[ "MIT" ]
null
null
null
pe.py
matt-biss/forensics-evidence
3484498eb2ca17e72cbfdad0178a837e92ec96b9
[ "MIT" ]
null
null
null
import glob import os import re from enum import Enum, auto class DiffType(Enum): """ Enumeration, die mögliche Sektionen des idiff-Files darstellt """ NEW = auto() DELETED = auto() RENAMED = auto() MODIFIED = auto() CHANGED_PROPS = auto() idiff_dir = 'idiff/' pe_dir = 'pe/' timestam...
42.068627
116
0.522489
9f4cc2da04d7f34925e49417a9ce1e25219a56d5
1,728
py
Python
Packs/GoogleChronicleBackstory/Scripts/ChronicleAssetIdentifierScript/ChronicleAssetIdentifierScript.py
diCagri/content
c532c50b213e6dddb8ae6a378d6d09198e08fc9f
[ "MIT" ]
799
2016-08-02T06:43:14.000Z
2022-03-31T11:10:11.000Z
Packs/GoogleChronicleBackstory/Scripts/ChronicleAssetIdentifierScript/ChronicleAssetIdentifierScript.py
diCagri/content
c532c50b213e6dddb8ae6a378d6d09198e08fc9f
[ "MIT" ]
9,317
2016-08-07T19:00:51.000Z
2022-03-31T21:56:04.000Z
Packs/GoogleChronicleBackstory/Scripts/ChronicleAssetIdentifierScript/ChronicleAssetIdentifierScript.py
diCagri/content
c532c50b213e6dddb8ae6a378d6d09198e08fc9f
[ "MIT" ]
1,297
2016-08-04T13:59:00.000Z
2022-03-31T23:43:06.000Z
from CommonServerPython import * from typing import Any, Dict, List, Optional def has_key(dictionary: Dict[str, Any], key: str) -> bool: """ Check whether dictionary has given key is present or not :param dictionary: Dictionary that need to check if key present or not :param key: Key value that need...
32.603774
112
0.683449
e25081a23441920e707f5b981e02464995e37d26
8,799
py
Python
src/network/node.py
TimmMoetz/blockchain-lab
02bb55cc201586dbdc8fdc252a32381f525e83ff
[ "RSA-MD" ]
2
2021-11-08T12:00:02.000Z
2021-11-12T18:37:52.000Z
src/network/node.py
TimmMoetz/blockchain-lab
02bb55cc201586dbdc8fdc252a32381f525e83ff
[ "RSA-MD" ]
null
null
null
src/network/node.py
TimmMoetz/blockchain-lab
02bb55cc201586dbdc8fdc252a32381f525e83ff
[ "RSA-MD" ]
1
2022-03-28T13:49:37.000Z
2022-03-28T13:49:37.000Z
import time import json import socket from p2pnetwork.node import Node from .bo.messages.prepare_to_validate import Prepare_to_validate from .conversations.block_download import Block_download from .conversations.transaction_validation import Transaction_Validation from .conversations.initial_peer_discovery import Init...
42.507246
135
0.629958
b3f551212467e0213fb11ca82c6e995cc48ba115
225
py
Python
1389-create-target-array-in-the-given-order/1389-create-target-array-in-the-given-order.py
hyeseonko/LeetCode
48dfc93f1638e13041d8ce1420517a886abbdc77
[ "MIT" ]
2
2021-12-05T14:29:06.000Z
2022-01-01T05:46:13.000Z
1389-create-target-array-in-the-given-order/1389-create-target-array-in-the-given-order.py
hyeseonko/LeetCode
48dfc93f1638e13041d8ce1420517a886abbdc77
[ "MIT" ]
null
null
null
1389-create-target-array-in-the-given-order/1389-create-target-array-in-the-given-order.py
hyeseonko/LeetCode
48dfc93f1638e13041d8ce1420517a886abbdc77
[ "MIT" ]
null
null
null
class Solution: def createTargetArray(self, nums: List[int], index: List[int]) -> List[int]: output=[] for i, num in enumerate(nums): output.insert(index[i], num) return output
32.142857
80
0.568889
b6040182874c8058d90c2c5e00b711c783c8e4aa
168
py
Python
sandbox/action/action.py
gergelyszaz/SandboxVN
b6855d1c952df66296e8fb3af42c2f8b46908a07
[ "MIT" ]
null
null
null
sandbox/action/action.py
gergelyszaz/SandboxVN
b6855d1c952df66296e8fb3af42c2f8b46908a07
[ "MIT" ]
1
2022-03-22T23:50:32.000Z
2022-03-22T23:50:32.000Z
sandbox/action/action.py
gergelyszaz/SandboxVN
b6855d1c952df66296e8fb3af42c2f8b46908a07
[ "MIT" ]
null
null
null
from sandbox.character.character import Character class Action: duration: int def do(self, character: Character): print(character.name + type(self))
18.666667
49
0.708333
20b12b2838ca6967cf8ded00b37e9a3eefe6a935
7,885
py
Python
hashing/scripts/throughput_scale_lazy.py
ShuhaoZhangTony/WalnutDB
9ccc10b23351aa2e6793e0f5c7bd3dd511d7b050
[ "MIT" ]
null
null
null
hashing/scripts/throughput_scale_lazy.py
ShuhaoZhangTony/WalnutDB
9ccc10b23351aa2e6793e0f5c7bd3dd511d7b050
[ "MIT" ]
null
null
null
hashing/scripts/throughput_scale_lazy.py
ShuhaoZhangTony/WalnutDB
9ccc10b23351aa2e6793e0f5c7bd3dd511d7b050
[ "MIT" ]
null
null
null
import itertools as it import os import matplotlib import matplotlib as mpl mpl.use('Agg') import matplotlib.pyplot as plt import pylab from matplotlib.font_manager import FontProperties from matplotlib.ticker import MaxNLocator, LinearLocator, ScalarFormatter OPT_FONT_NAME = 'Helvetica' TICK_FONT_SIZE = 24 LABEL_F...
32.991632
111
0.595561
45c7edbbd41267a3e7598c100cbb262a7f80b01b
2,083
py
Python
KMeans/src/utils.py
quqixun/MLAlgorithms
1ad46a899a6280a08c196fb4eb0931408c8636c7
[ "MIT" ]
2
2018-04-25T18:00:28.000Z
2018-08-08T09:39:18.000Z
KMeans/src/utils.py
quqixun/MLAlgorithms
1ad46a899a6280a08c196fb4eb0931408c8636c7
[ "MIT" ]
null
null
null
KMeans/src/utils.py
quqixun/MLAlgorithms
1ad46a899a6280a08c196fb4eb0931408c8636c7
[ "MIT" ]
2
2019-03-03T02:55:48.000Z
2021-01-21T04:50:46.000Z
# Conventional Machine Learning Algorithms # Helper functions for Class of "KMeans". # Author: Qixun Qu # Create on: 2018/05/06 # Modify on: 2018/05/08 # ,,, ,,, # ;" '; ;' ", # ; @.ss$$$$$$s.@ ; # `s$$$$$$$$$$$$$$$' # $$$$$$$$$$$$$$$$$$ # $$$$P""Y$$$Y""W$$$$$ # $$$$ p"$$$"q $$$$$ # ...
28.930556
65
0.567451
b329fb0dedecffdf344612ac61f7f0b1af261db0
363
py
Python
exercises/zh/solution_01_09.py
Jette16/spacy-course
32df0c8f6192de6c9daba89740a28c0537e4d6a0
[ "MIT" ]
2,085
2019-04-17T13:10:40.000Z
2022-03-30T21:51:46.000Z
exercises/zh/solution_01_09.py
Jette16/spacy-course
32df0c8f6192de6c9daba89740a28c0537e4d6a0
[ "MIT" ]
79
2019-04-18T14:42:55.000Z
2022-03-07T08:15:43.000Z
exercises/zh/solution_01_09.py
Jette16/spacy-course
32df0c8f6192de6c9daba89740a28c0537e4d6a0
[ "MIT" ]
361
2019-04-17T13:34:32.000Z
2022-03-28T04:42:45.000Z
import spacy nlp = spacy.load("zh_core_web_sm") text = "苹果公布了预购细节,泄露了即将到来的iPhone X的发布日期。" # 处理文本 doc = nlp(text) # 打印token及序号 for i, token in enumerate(doc): print(i, token.text) # 遍历实体 for ent in doc.ents: # 打印实体文本和标签 print(ent.text, ent.label_) # 获取"iPhone X"的跨度(span) iphone_x = doc[11:13] # 打印span...
15.782609
41
0.69146
b36c7651721700311a7d286b9d31b730b52f1885
308
py
Python
euler-6.py
TFabijo/euler
58dc07b9adb236890556ccd5d75ca9dbd2b50df9
[ "MIT" ]
null
null
null
euler-6.py
TFabijo/euler
58dc07b9adb236890556ccd5d75ca9dbd2b50df9
[ "MIT" ]
null
null
null
euler-6.py
TFabijo/euler
58dc07b9adb236890556ccd5d75ca9dbd2b50df9
[ "MIT" ]
null
null
null
def vsota_kvadratov(n): vsota = 0 for x in range(n+1): vsota += x ** 2 return vsota def kvadrat_vsote(n): vsota = 0 for x in range(n+1): vsota += x return vsota ** 2 def razlika(n): return - kvadrat_vsote(n) - vsota_kvadratov(n) razlika(100)
17.111111
52
0.542208
926f6e6b90b03b1601447afdc130071776798dc0
554
py
Python
Python-Fundamentals/disneyland_journey.py
dechevh/SoftwareUniversity
8be1c0c096cf385a84093265a31767afd4454476
[ "MIT" ]
null
null
null
Python-Fundamentals/disneyland_journey.py
dechevh/SoftwareUniversity
8be1c0c096cf385a84093265a31767afd4454476
[ "MIT" ]
null
null
null
Python-Fundamentals/disneyland_journey.py
dechevh/SoftwareUniversity
8be1c0c096cf385a84093265a31767afd4454476
[ "MIT" ]
null
null
null
journey_cost = float(input()) number_of_months = int(input()) each_month_saves = 0.25 * journey_cost savings = 0 counter = 0 for x in range(1, number_of_months + 1): counter += 1 if x % 2 != 0 and counter != 1: savings -= savings * 0.16 if x % 4 == 0: savings += savings * 0.25 savings ...
27.7
110
0.646209
920bc87352c879bf873a851c5bcbbf79b57ff912
25,472
py
Python
src/onegov/feriennet/views/activity.py
politbuero-kampagnen/onegov-cloud
20148bf321b71f617b64376fe7249b2b9b9c4aa9
[ "MIT" ]
null
null
null
src/onegov/feriennet/views/activity.py
politbuero-kampagnen/onegov-cloud
20148bf321b71f617b64376fe7249b2b9b9c4aa9
[ "MIT" ]
null
null
null
src/onegov/feriennet/views/activity.py
politbuero-kampagnen/onegov-cloud
20148bf321b71f617b64376fe7249b2b9b9c4aa9
[ "MIT" ]
null
null
null
import sedate from datetime import date, timedelta from itertools import groupby from onegov.activity import Booking from onegov.activity import Occasion from onegov.activity import OccasionCollection from onegov.activity import Period from onegov.activity.models import ACTIVITY_STATES, DAYS from onegov.core.security ...
29.757009
79
0.607098
470d756e92e02fbdb4b99fd71f28c6a4d6dc04f3
317
py
Python
0-notes/job-search/Cracking the Coding Interview/C10SortingSearching/questions/10.8-question.py
eengineergz/Lambda
1fe511f7ef550aed998b75c18a432abf6ab41c5f
[ "MIT" ]
null
null
null
0-notes/job-search/Cracking the Coding Interview/C10SortingSearching/questions/10.8-question.py
eengineergz/Lambda
1fe511f7ef550aed998b75c18a432abf6ab41c5f
[ "MIT" ]
null
null
null
0-notes/job-search/Cracking the Coding Interview/C10SortingSearching/questions/10.8-question.py
eengineergz/Lambda
1fe511f7ef550aed998b75c18a432abf6ab41c5f
[ "MIT" ]
null
null
null
# Find Duplicates # You have an array with all the numbers from 1 to n, where n is at most 32k. # The array may hv duplicate entries and you do not know what n is. # With only 4kb of memory available, how would you print all duplicate # elements in the array? # time complexity: O() # space complexity: O()
28.818182
77
0.712934
944df06241415aece6714bd6ba4567330e450bd4
19,121
py
Python
quantel/__init__.py
RatherBland/Quantel-py
abb4ec3c1f72a7409aea3eb0a5e0f1ad5c6dbbe1
[ "MIT" ]
37
2021-08-13T09:23:17.000Z
2021-12-15T17:25:05.000Z
quantel/__init__.py
RatherBland/Quantel-py
abb4ec3c1f72a7409aea3eb0a5e0f1ad5c6dbbe1
[ "MIT" ]
1
2021-08-24T05:51:08.000Z
2021-09-27T05:15:50.000Z
quantel/__init__.py
RatherBland/Quantel-py
abb4ec3c1f72a7409aea3eb0a5e0f1ad5c6dbbe1
[ "MIT" ]
2
2021-09-19T09:50:00.000Z
2021-10-31T18:21:09.000Z
import asyncio from typing import Union, List, Dict import aiohttp import requests from quantel.exceptions import InvalidAPIKey, GatewayError, TooManyRequests class _Ticker: def __init__(self, symbols: Union[list, str], host: str, api_key: str, asynchronous: bool = False): self.asynchronous = asynchron...
27.551873
134
0.575022
04bec2883d7cc0c0599b5d77188d1d7f2e71b936
714
py
Python
klausur/6_version2.py
larsaars/pgki_uebungen
24eee86b4f51f5ba3ca65526afeb6dad0110c739
[ "Apache-2.0" ]
null
null
null
klausur/6_version2.py
larsaars/pgki_uebungen
24eee86b4f51f5ba3ca65526afeb6dad0110c739
[ "Apache-2.0" ]
null
null
null
klausur/6_version2.py
larsaars/pgki_uebungen
24eee86b4f51f5ba3ca65526afeb6dad0110c739
[ "Apache-2.0" ]
null
null
null
from typing import Union def caesar(msg: str, k: int = 3) -> Union[str, None]: out = '' if abs(k) >= 26: return None A, Z, a, z = ord('A'), ord('Z'), ord('a'), ord('z') for c in msg: oc = ord(c) if a <= oc <= z: shift = (oc - a + k) % 26 ...
21
56
0.448179
6d16e0f9badd9d8cc9206d3d24db9c321e2c1d17
3,233
py
Python
src/train.py
HaasStefan/Pixorize_2020
31dbc537a68195003f50ae989e3c4677c9c96ac4
[ "MIT" ]
2
2020-03-25T15:48:48.000Z
2022-02-02T18:36:24.000Z
src/train.py
HaasStefan/Pixorize_2020
31dbc537a68195003f50ae989e3c4677c9c96ac4
[ "MIT" ]
null
null
null
src/train.py
HaasStefan/Pixorize_2020
31dbc537a68195003f50ae989e3c4677c9c96ac4
[ "MIT" ]
null
null
null
import data_preparation as prep from model import AE from output_to_image import output_to_image import torch import torch.nn as nn from torch.utils.data import DataLoader import matplotlib.pyplot as plt from datetime import datetime import os from colorama import Fore input_folder = "./images/aigner" output_folder =...
24.126866
73
0.585524
edc41551673d67e9b6faa3a18f71da6c2d40fb58
28
py
Python
Python/Books/Learning-Programming-with-Python.Tamim-Shahriar-Subeen/chapter-009.03-set/ph-28-declear-empty-set.py
shihab4t/Books-Code
b637b6b2ad42e11faf87d29047311160fe3b2490
[ "Unlicense" ]
null
null
null
Python/Books/Learning-Programming-with-Python.Tamim-Shahriar-Subeen/chapter-009.03-set/ph-28-declear-empty-set.py
shihab4t/Books-Code
b637b6b2ad42e11faf87d29047311160fe3b2490
[ "Unlicense" ]
null
null
null
Python/Books/Learning-Programming-with-Python.Tamim-Shahriar-Subeen/chapter-009.03-set/ph-28-declear-empty-set.py
shihab4t/Books-Code
b637b6b2ad42e11faf87d29047311160fe3b2490
[ "Unlicense" ]
null
null
null
A = set() print(A, type(A))
9.333333
17
0.535714
edf7a7c237395b924628a05604909e477488812a
2,867
py
Python
pyetl/etl_teomjobgrade.py
febridev/portfoliode
ef2cea76c92b9676102cb76ca476f663a920b659
[ "MIT" ]
null
null
null
pyetl/etl_teomjobgrade.py
febridev/portfoliode
ef2cea76c92b9676102cb76ca476f663a920b659
[ "MIT" ]
null
null
null
pyetl/etl_teomjobgrade.py
febridev/portfoliode
ef2cea76c92b9676102cb76ca476f663a920b659
[ "MIT" ]
null
null
null
import os import sqlalchemy #library for handle exception from sqlalchemy.exc import InterfaceError, OperationalError, ProgrammingError import pandas as pd from dotenv import load_dotenv #load .env file load_dotenv() #Credential DB Demo hostdbdemo = os.getenv('hostdbdemo') portdbdemo = os.getenv('portdbdemo') userdbd...
34.542169
117
0.675619
b66e17985a1d0db54913db97a93e9d3b17c74f8a
2,308
py
Python
apps/flowguard/management/commands/migrate_old.py
LvanArkel/sbzwebsite
a26efbb050585312c53010f14f86c23616a8071f
[ "BSD-3-Clause" ]
1
2017-01-08T13:21:43.000Z
2017-01-08T13:21:43.000Z
apps/flowguard/management/commands/migrate_old.py
LvanArkel/sbzwebsite
a26efbb050585312c53010f14f86c23616a8071f
[ "BSD-3-Clause" ]
17
2018-12-03T14:22:14.000Z
2021-07-14T15:15:12.000Z
apps/flowguard/management/commands/migrate_old.py
LvanArkel/sbzwebsite
a26efbb050585312c53010f14f86c23616a8071f
[ "BSD-3-Clause" ]
2
2018-12-03T14:58:49.000Z
2019-12-01T13:24:42.000Z
import json from datetime import datetime from decimal import Decimal from django.core.management import BaseCommand from pytz import UTC, timezone from apps.flowguard.models import FlowChannel, FlowValue class Command(BaseCommand): def add_arguments(self, parser): parser.add_argument('json_file', type=...
40.491228
150
0.665078
1e6eae3913f68f665e1b3df0333381b15ec3bfa4
342
py
Python
docker/django/restaurant/restapi/views/user_view.py
gitmehedi/cloudtuts
3008b1cf7fbf22728c9bb2c059c4bd196043a93e
[ "Unlicense" ]
3
2019-08-29T10:14:40.000Z
2021-03-05T09:50:15.000Z
docker/django/restaurant/restapi/views/user_view.py
gitmehedi/cloudtuts
3008b1cf7fbf22728c9bb2c059c4bd196043a93e
[ "Unlicense" ]
null
null
null
docker/django/restaurant/restapi/views/user_view.py
gitmehedi/cloudtuts
3008b1cf7fbf22728c9bb2c059c4bd196043a93e
[ "Unlicense" ]
1
2021-03-05T09:50:29.000Z
2021-03-05T09:50:29.000Z
from rest_framework import generics from rest_framework.permissions import AllowAny from django.contrib.auth.models import User from restapi.serializers.user_serializer import UserSerializer class UserView(generics.CreateAPIView): queryset = User.objects.all() permission_classes = (AllowAny,) serializer_c...
31.090909
62
0.821637
1e7523515025fc509acead5c15b0a0ad1f060f80
39
py
Python
lib/python3.5/rlcompleter.py
hwroitzsch/BikersLifeSaver
469c738fdd6352c44a3f20689b17fa8ac04ad8a2
[ "MIT" ]
1
2020-08-16T04:04:23.000Z
2020-08-16T04:04:23.000Z
lib/python3.5/rlcompleter.py
hwroitzsch/BikersLifeSaver
469c738fdd6352c44a3f20689b17fa8ac04ad8a2
[ "MIT" ]
5
2020-06-05T18:53:24.000Z
2021-12-13T19:49:15.000Z
lib/python3.5/rlcompleter.py
hwroitzsch/BikersLifeSaver
469c738fdd6352c44a3f20689b17fa8ac04ad8a2
[ "MIT" ]
null
null
null
/usr/local/lib/python3.5/rlcompleter.py
39
39
0.820513
1e9b10958d8160b3320a5b66712672d834dfd88e
3,323
py
Python
CSVParser/src/csvparser.py
xd23fe39/python-sandbox
91f649a1efcfe895a2e5e9d8322458955d56a445
[ "Apache-2.0" ]
null
null
null
CSVParser/src/csvparser.py
xd23fe39/python-sandbox
91f649a1efcfe895a2e5e9d8322458955d56a445
[ "Apache-2.0" ]
2
2019-12-27T00:10:39.000Z
2021-10-03T09:43:20.000Z
CSVParser/src/csvparser.py
xd23fe39/python-sandbox
91f649a1efcfe895a2e5e9d8322458955d56a445
[ "Apache-2.0" ]
1
2021-10-03T09:34:58.000Z
2021-10-03T09:34:58.000Z
#!/usr/bin/python3 ## -*- coding: utf-8 -*- # Module einbinden import os # Filesystem Operationen import re # Regular Expressions import csv # CSV DictReader # Anwendungsdaten AppData = { "ID": "2020031123", "TYPE": "Application", "NAME": "CSV Parser", "VERSION": "Version 0.1", "I...
36.119565
116
0.457117
1ead39ed7856b28f7e3d9cf249ca88cd07d3d1e5
459
py
Python
Coursera/Using Python to Access Web Data/Week-6/Assignment/UsingTheGeoJSONAPI.py
rishav3101/Online-Courses-Learning
1e9356af331b27b6ee33d376d8d7104edaeac2fa
[ "MIT" ]
331
2019-10-22T09:06:28.000Z
2022-03-27T13:36:03.000Z
Coursera/Using Python to Access Web Data/Week-6/Assignment/UsingTheGeoJSONAPI.py
rishav3101/Online-Courses-Learning
1e9356af331b27b6ee33d376d8d7104edaeac2fa
[ "MIT" ]
8
2020-04-10T07:59:06.000Z
2022-02-06T11:36:47.000Z
Coursera/Using Python to Access Web Data/Week-6/Assignment/UsingTheGeoJSONAPI.py
rishav3101/Online-Courses-Learning
1e9356af331b27b6ee33d376d8d7104edaeac2fa
[ "MIT" ]
572
2019-07-28T23:43:35.000Z
2022-03-27T22:40:08.000Z
import urllib.request, urllib.parse, urllib.error import json #Api api = 'http://py4e-data.dr-chuck.net/geojson?' #Input data link = input('Enter location: ') link = api + urllib.parse.urlencode({'address':link}) print('Retrieving', link) html = urllib.request.urlopen(link).read().decode() print('Retrieved', len(htm...
20.863636
53
0.690632
94c5d52ed5ba15eb9e8d6dd066438bd3e4e38b91
1,169
py
Python
src/bo4e/com/menge.py
bo4e/BO4E-python
28b12f853c8a496d14b133759b7aa2d6661f79a0
[ "MIT" ]
1
2022-03-02T12:49:44.000Z
2022-03-02T12:49:44.000Z
src/bo4e/com/menge.py
bo4e/BO4E-python
28b12f853c8a496d14b133759b7aa2d6661f79a0
[ "MIT" ]
21
2022-02-04T07:38:46.000Z
2022-03-28T14:01:53.000Z
src/bo4e/com/menge.py
bo4e/BO4E-python
28b12f853c8a496d14b133759b7aa2d6661f79a0
[ "MIT" ]
null
null
null
""" Contains Menge class and corresponding marshmallow schema for de-/serialization """ from decimal import Decimal import attr from marshmallow import fields from marshmallow_enum import EnumField # type:ignore[import] from bo4e.com.com import COM, COMSchema from bo4e.enum.mengeneinheit import Mengeneinheit # py...
27.186047
165
0.736527
bfc473e63c1df09d075eeff5a2788f908c5ced3f
509
py
Python
pages/extensions/extract_highlights_info/__init__.py
ericandrewlewis/amp.dev
cf8e3d34a5582696ead97563c0809036804ab5c7
[ "Apache-2.0" ]
300
2015-12-09T20:35:37.000Z
2019-07-16T06:41:29.000Z
pages/extensions/extract_highlights_info/__init__.py
ericandrewlewis/amp.dev
cf8e3d34a5582696ead97563c0809036804ab5c7
[ "Apache-2.0" ]
2,099
2019-07-16T13:24:27.000Z
2022-03-26T12:31:51.000Z
pages/extensions/extract_highlights_info/__init__.py
ericandrewlewis/amp.dev
cf8e3d34a5582696ead97563c0809036804ab5c7
[ "Apache-2.0" ]
543
2019-07-18T09:06:14.000Z
2022-03-31T02:43:10.000Z
# -*- coding: utf-8 -*- from grow import extensions from .page_info_collector import PageInfoCollector CONFIG_INPUT_FILE = 'input_file' CONFIG_OUTPUT_FOLDER = 'output_folder' class ExtractHighlightsInfoExtension(extensions.BaseExtension): def __init__(self, pod, config): super(ExtractHighlightsInfoExtension, s...
29.941176
69
0.789784
44b1cc1da4b6efae9f293ef053fe2c92b8a171e4
3,365
py
Python
03_Django/wiki/encyclopedia/views.py
DaviNakamuraCardoso/Harvard-CS50-Web-Programming
afec745eede41f7b294c3ee6ebaff9ac042e5e4c
[ "MIT" ]
null
null
null
03_Django/wiki/encyclopedia/views.py
DaviNakamuraCardoso/Harvard-CS50-Web-Programming
afec745eede41f7b294c3ee6ebaff9ac042e5e4c
[ "MIT" ]
null
null
null
03_Django/wiki/encyclopedia/views.py
DaviNakamuraCardoso/Harvard-CS50-Web-Programming
afec745eede41f7b294c3ee6ebaff9ac042e5e4c
[ "MIT" ]
null
null
null
from django.shortcuts import render from django.http import HttpResponseRedirect from django import template from django import forms from django.urls import reverse from django.contrib import messages from . import util import markdown2 import re import random def index(request): return render(request, "encyclop...
28.041667
83
0.615453
01f5f2452426d8fd6556c4b5c9054f4ddf3f51a6
1,099
py
Python
src/data_analysis/kalman.py
Qjammer/tfg
e832db3b344d0c422c50e398110cd0b6d5d97a60
[ "MIT" ]
null
null
null
src/data_analysis/kalman.py
Qjammer/tfg
e832db3b344d0c422c50e398110cd0b6d5d97a60
[ "MIT" ]
null
null
null
src/data_analysis/kalman.py
Qjammer/tfg
e832db3b344d0c422c50e398110cd0b6d5d97a60
[ "MIT" ]
null
null
null
#!/usr/bin/python import matplotlib.pyplot as plt import csv import numpy as np from mpl_toolkits.mplot3d import Axes3D #fig=plt.figure() #ax=fig.add_subplot(111,projection='2d') #ax.set_xlabel('x') #ax.set_ylabel('y') t=[] rotvel=[] gyr=[] tac=[] with open('data/state_data.txt','r') as csvdata: plots=csv.reader(...
25.55814
85
0.5596
17492bdc79a382ac9720f8c7e63a5a2fe0862d45
203
py
Python
exercises/ja/exc_02_02_01.py
tuanducdesign/spacy-course
f8d092c5fa2997fccb3f367d174dce8667932b3d
[ "MIT" ]
2
2020-07-07T01:46:37.000Z
2021-04-20T03:19:43.000Z
exercises/ja/exc_02_02_01.py
tuanducdesign/spacy-course
f8d092c5fa2997fccb3f367d174dce8667932b3d
[ "MIT" ]
null
null
null
exercises/ja/exc_02_02_01.py
tuanducdesign/spacy-course
f8d092c5fa2997fccb3f367d174dce8667932b3d
[ "MIT" ]
null
null
null
import spacy nlp = spacy.blank("ja") doc = nlp("私はネコを飼っています") # 単語「ネコ」のハッシュを引く cat_hash = ____.____.____[____] print(cat_hash) # cat_hashを使って文字列を引く cat_string = ____.____.____[____] print(cat_string)
15.615385
33
0.743842
bd8662c2a2baed8c5ad66167253972f7b269fc85
115
py
Python
Source/12_URLib/app.py
rbiotblbk/WBS_T9_2022
533156db88ff2fe676564b0e5d6e84e888ab0916
[ "MIT" ]
1
2022-02-28T09:49:35.000Z
2022-02-28T09:49:35.000Z
Source/12_URLib/app.py
rbiotblbk/WBS_T9_2022
533156db88ff2fe676564b0e5d6e84e888ab0916
[ "MIT" ]
null
null
null
Source/12_URLib/app.py
rbiotblbk/WBS_T9_2022
533156db88ff2fe676564b0e5d6e84e888ab0916
[ "MIT" ]
null
null
null
import urllib.request import urllib.parse x = urllib.request.urlopen("https://www.google.com") print(x.read())
16.428571
52
0.730435
da70e5cf8e6e7d4ba98a668a9f8643b25c73981c
11,224
py
Python
plugins/tff_backend/rogerthat_callbacks.py
threefoldfoundation/app_backend
b3cea2a3ff9e10efcc90d3d6e5e8e46b9e84312a
[ "Apache-2.0" ]
null
null
null
plugins/tff_backend/rogerthat_callbacks.py
threefoldfoundation/app_backend
b3cea2a3ff9e10efcc90d3d6e5e8e46b9e84312a
[ "Apache-2.0" ]
178
2017-08-02T12:58:06.000Z
2017-12-20T15:01:12.000Z
plugins/tff_backend/rogerthat_callbacks.py
threefoldfoundation/app_backend
b3cea2a3ff9e10efcc90d3d6e5e8e46b9e84312a
[ "Apache-2.0" ]
2
2018-01-10T10:43:12.000Z
2018-03-18T10:42:23.000Z
# -*- coding: utf-8 -*- # Copyright 2017 GIG Technology NV # # 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...
48.8
119
0.772808
da77b8ac64b82b59dad4d9a48007c6729fd30f1a
1,161
py
Python
sticker.py
jibonaronno/RP2040AudioRecord
c31824129d8b603ae2662bbba5bcc63d1213556b
[ "CC0-1.0" ]
null
null
null
sticker.py
jibonaronno/RP2040AudioRecord
c31824129d8b603ae2662bbba5bcc63d1213556b
[ "CC0-1.0" ]
null
null
null
sticker.py
jibonaronno/RP2040AudioRecord
c31824129d8b603ae2662bbba5bcc63d1213556b
[ "CC0-1.0" ]
null
null
null
#!/usr/bin/python3 ''' Drag and drop concept came from https://www.youtube.com/watch?v=s1QZIwg3x3o excelent video. ''' from PyQt5.QtCore import * from PyQt5.QtGui import * from PyQt5.QtWidgets import * class Sticker(QWidget): def __init__(self, *args, png:str): super().__init__(*args) self.pix = ...
26.386364
91
0.588286
00cb0b4afac0651f035427ef90659e65e3b1964c
169
py
Python
Python/Books/Learning-Programming-with-Python.Tamim-Shahriar-Subeen/chapter-004/pg-4.6-1-number-judge.py
shihab4t/Books-Code
b637b6b2ad42e11faf87d29047311160fe3b2490
[ "Unlicense" ]
null
null
null
Python/Books/Learning-Programming-with-Python.Tamim-Shahriar-Subeen/chapter-004/pg-4.6-1-number-judge.py
shihab4t/Books-Code
b637b6b2ad42e11faf87d29047311160fe3b2490
[ "Unlicense" ]
null
null
null
Python/Books/Learning-Programming-with-Python.Tamim-Shahriar-Subeen/chapter-004/pg-4.6-1-number-judge.py
shihab4t/Books-Code
b637b6b2ad42e11faf87d29047311160fe3b2490
[ "Unlicense" ]
null
null
null
number = input("Plase Enter a Number: ") number = int(number) if number >= 0: print(number, "is a Positive number") else: print(number, "is a Negative number")
21.125
41
0.662722
daa6bee87f1673e1d5b7028fd277600a92a62923
607
py
Python
components/py_engine/tests/haas/HaaSEdu/python-apps/oss/main.py
ekmixon/AliOS-Things
00334295af8aa474d818724149726ca93da4645d
[ "Apache-2.0" ]
4,538
2017-10-20T05:19:03.000Z
2022-03-30T02:29:30.000Z
components/py_engine/tests/haas/HaaSEdu/python-apps/oss/main.py
ekmixon/AliOS-Things
00334295af8aa474d818724149726ca93da4645d
[ "Apache-2.0" ]
1,088
2017-10-21T07:57:22.000Z
2022-03-31T08:15:49.000Z
components/py_engine/tests/haas/HaaSEdu/python-apps/oss/main.py
willianchanlovegithub/AliOS-Things
637c0802cab667b872d3b97a121e18c66f256eab
[ "Apache-2.0" ]
1,860
2017-10-20T05:22:35.000Z
2022-03-27T10:54:14.000Z
import OSS print("-------------------Welcome OSS MicroPython--------------------") print("-----OSS demo start-----") OSS_ACCESS_KEY = "xxxx" OSS_ACCESS_SECRET = "xxxx" OSS_ENDPOINT = "xxxx" OSS_BUCKET = "xxxx" File_PATH = "/data/python-apps/oss/res/test.jpg" File_CONTENT = "oss test content" urlFile = OSS.uploadFil...
27.590909
105
0.700165
c16566dd4ac582335f3b6cd6ec7caf15771cdfae
2,983
py
Python
project/api/resources.py
DanielGrams/cityservice
c487c34b5ba6541dcb441fe903ab2012c2256893
[ "MIT" ]
null
null
null
project/api/resources.py
DanielGrams/cityservice
c487c34b5ba6541dcb441fe903ab2012c2256893
[ "MIT" ]
35
2022-01-24T22:15:59.000Z
2022-03-31T15:01:35.000Z
project/api/resources.py
DanielGrams/cityservice
c487c34b5ba6541dcb441fe903ab2012c2256893
[ "MIT" ]
null
null
null
from functools import wraps from authlib.integrations.flask_oauth2 import current_token from authlib.oauth2 import OAuth2Error from authlib.oauth2.rfc6749 import MissingAuthorizationError from flask import abort, request from flask_apispec import marshal_with from flask_apispec.views import MethodResource from flask_l...
31.4
86
0.658398
e7c1b7fa3616367f3048dec19b4edf0a78876705
307
py
Python
HackerRank/HackerRank-Python/Basic Data Types/Find the Runner-Up Score!.py
tareqmahmud/Competitive-Programming
ad5e53300d70280bccbd5046ca01278fb246f314
[ "MIT" ]
2
2020-11-19T19:03:28.000Z
2021-01-04T19:52:11.000Z
HackerRank-Python/Basic Data Types/Find the Runner-Up Score!.py
tareqmahmud/HackerRank
e1b9facab6582f86ea6cc63afcc640e66ba3f67e
[ "MIT" ]
null
null
null
HackerRank-Python/Basic Data Types/Find the Runner-Up Score!.py
tareqmahmud/HackerRank
e1b9facab6582f86ea6cc63afcc640e66ba3f67e
[ "MIT" ]
null
null
null
if __name__ == "__main__": n = int(input()) numbers = map(int, input().split()) # Unique numbers list unique_numbers = list(set(numbers)) # Remove the max number unique_numbers.remove(max(unique_numbers)) # Fetch the second (now largest) number print(max(unique_numbers))
23.615385
46
0.65798
41d2adb2f1c117ccb4f63d7fcb1e22a328e08daf
498
py
Python
python/python_backup/PRAC_PYTHON/fr.py
SayanGhoshBDA/code-backup
8b6135facc0e598e9686b2e8eb2d69dd68198b80
[ "MIT" ]
16
2018-11-26T08:39:42.000Z
2019-05-08T10:09:52.000Z
python/python_backup/PRAC_PYTHON/fr.py
SayanGhoshBDA/code-backup
8b6135facc0e598e9686b2e8eb2d69dd68198b80
[ "MIT" ]
8
2020-05-04T06:29:26.000Z
2022-02-12T05:33:16.000Z
python/python_backup/PRAC_PYTHON/fr.py
SayanGhoshBDA/code-backup
8b6135facc0e598e9686b2e8eb2d69dd68198b80
[ "MIT" ]
5
2020-02-11T16:02:21.000Z
2021-02-05T07:48:30.000Z
class palindrome: def __init__(self): self.a="" def input(self,k1): self.a=k1 def calculate(self): f=0 i=0 j=len(self.a)-1 while i<len(self.a)/2: if self.a[i]!=self.a[j]: f=1 break i=i+1 j=j-1 ...
21.652174
55
0.459839
5aa00ab92583a36111601c2e5d4d4602a86696c0
2,578
py
Python
src/test/tests/databases/ANALYZE.py
visit-dav/vis
c08bc6e538ecd7d30ddc6399ec3022b9e062127e
[ "BSD-3-Clause" ]
226
2018-12-29T01:13:49.000Z
2022-03-30T19:16:31.000Z
src/test/tests/databases/ANALYZE.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/databases/ANALYZE.py
visit-dav/vis
c08bc6e538ecd7d30ddc6399ec3022b9e062127e
[ "BSD-3-Clause" ]
84
2019-01-24T17:41:50.000Z
2022-03-10T10:01:46.000Z
# ---------------------------------------------------------------------------- # CLASSES: nightly # # Test Case: ANALYZE.py # # Tests: mesh - 3D rectilinear, single domain # plots - Pseudocolor, Contour # operators - Slice # # Programmer: Brad Whitlock # Date: Fri Dec...
22.614035
78
0.646237
5ad646ac1bfd8fce91e963bb6aa04d9e9e7636eb
718
py
Python
mark.py
gitskim/DnntalPrivate
20f84782e9ab20c68b43f32efb16cd22262b8ceb
[ "MIT" ]
null
null
null
mark.py
gitskim/DnntalPrivate
20f84782e9ab20c68b43f32efb16cd22262b8ceb
[ "MIT" ]
null
null
null
mark.py
gitskim/DnntalPrivate
20f84782e9ab20c68b43f32efb16cd22262b8ceb
[ "MIT" ]
2
2019-05-16T05:48:26.000Z
2021-01-27T01:26:22.000Z
import numpy as np import matplotlib.pyplot as plt def imageshow(img, dpi=200): if dpi > 0: F = plt.gcf() F.set_dpi(dpi) plt.imshow(img) def checking(image): array2 = image.copy() length,wide, z = image.shape size = 128 length = int(length/size)*size wide = int(wide/size)*size f...
20.514286
44
0.56546
cfd2a8b4c56a9f8caf956d6f87311f9313fbd89a
4,101
py
Python
Modulos/Matematica/Smat_Areas.py
Jonatan966/SODA
046d8c1e7b9bac3a555526c9fe2f365c2b338aca
[ "MIT" ]
null
null
null
Modulos/Matematica/Smat_Areas.py
Jonatan966/SODA
046d8c1e7b9bac3a555526c9fe2f365c2b338aca
[ "MIT" ]
null
null
null
Modulos/Matematica/Smat_Areas.py
Jonatan966/SODA
046d8c1e7b9bac3a555526c9fe2f365c2b338aca
[ "MIT" ]
null
null
null
import sys from Nucleo.smain_Variaveis import * import math def mat_AREAS(): sMain_Avisos().Welcome('AREAS') try: while True: option = sMain_Saidas().Prompt('MATEMATICA', 'AREAS') if option == 'QUADRADO' or option == '0': n1 = sMain_Avisos().Resposta('Digite a m...
47.686047
113
0.49744
5ca60e7f1e458ea208339e061bab3b3198c790c0
2,168
py
Python
rgbw_sinus.py
zam-haus/zamusiclight-scripts
9710ac1136f0688b31135579f709c7c599768615
[ "MIT" ]
null
null
null
rgbw_sinus.py
zam-haus/zamusiclight-scripts
9710ac1136f0688b31135579f709c7c599768615
[ "MIT" ]
null
null
null
rgbw_sinus.py
zam-haus/zamusiclight-scripts
9710ac1136f0688b31135579f709c7c599768615
[ "MIT" ]
null
null
null
#!/usr/bin/env python # encoding: utf-8 # Copyright (c) 2019-2022 Thomas Kolb # This file is licensed under the terms of the MIT license. See COPYING for # details. # Importieren von sk6812_multistrip.py, welches das Netzwerkprotokoll für die # LED-Leiste abstrahiert. import sk6812_multistrip as sk6812 import time ...
32.358209
84
0.641144
5ccc3c0e08e24fb2314e761b24cddc82fef9e8c7
1,938
py
Python
S5/CS331-SS/PGM_007 - Disk Scheduling.py
joe247/CSE-LABS
bab17548562bdc9c0bc8b15679f07379a9e98dec
[ "MIT" ]
2
2021-02-03T02:03:21.000Z
2021-07-03T20:24:14.000Z
S5/CS331-SS/PGM_007 - Disk Scheduling.py
joe247/CSE-LABS
bab17548562bdc9c0bc8b15679f07379a9e98dec
[ "MIT" ]
null
null
null
S5/CS331-SS/PGM_007 - Disk Scheduling.py
joe247/CSE-LABS
bab17548562bdc9c0bc8b15679f07379a9e98dec
[ "MIT" ]
null
null
null
''' request_list = [13, 43, 153, 12, 53, 122, 80, 147, 130] head = 100 print(request_list) print(head,'\n') ''' from bisect import bisect_left def get_closest(rl, hd): #get closest using binary search pos = bisect_left(rl, head) if pos == len(rl): return rl[-1] before = rl[pos - 1] after = rl[pos] if after - h...
23.349398
91
0.633127
8f71a8a8223f46d10016d3ce61ddd3f86afa548b
1,341
py
Python
addition_module/DMUE/losses/softLoss.py
weihaoxie/FaceX-Zoo
db0b087e4f4d28152e172d6c8d3767a8870733b4
[ "Apache-2.0" ]
1,329
2021-01-13T07:06:30.000Z
2022-03-31T07:23:39.000Z
addition_module/DMUE/losses/softLoss.py
weihaoxie/FaceX-Zoo
db0b087e4f4d28152e172d6c8d3767a8870733b4
[ "Apache-2.0" ]
115
2021-01-13T10:42:57.000Z
2022-03-28T03:57:52.000Z
addition_module/DMUE/losses/softLoss.py
weihaoxie/FaceX-Zoo
db0b087e4f4d28152e172d6c8d3767a8870733b4
[ "Apache-2.0" ]
351
2021-01-13T07:21:00.000Z
2022-03-29T14:11:39.000Z
import torch import torch.nn.functional as F import numpy as np class SoftLoss(object): def __call__(self, outputs_x, targets_x, softlabel_x, epoch=None): # output_x: tensor # softlabel_x: tensor , size like output_x probs_x = torch.softmax(outputs_x, dim=1).cuda() mask =...
37.25
92
0.614467
859f4b2d456ad07539eb25dbc66c8f2621b42aa4
363
py
Python
torch/ao/quantization/fx/quantization_types.py
vuanvin/pytorch
9267fd8d7395074001ad7cf2a8f28082dbff6b0b
[ "Intel" ]
183
2018-04-06T21:10:36.000Z
2022-03-30T15:05:24.000Z
torch/ao/quantization/fx/quantization_types.py
vuanvin/pytorch
9267fd8d7395074001ad7cf2a8f28082dbff6b0b
[ "Intel" ]
631
2018-06-05T16:59:11.000Z
2022-03-31T16:26:57.000Z
torch/ao/quantization/fx/quantization_types.py
vuanvin/pytorch
9267fd8d7395074001ad7cf2a8f28082dbff6b0b
[ "Intel" ]
58
2018-06-05T16:40:18.000Z
2022-03-16T15:37:29.000Z
from typing import Any, Tuple, Union from torch.fx import Node from ..utils import Pattern # noqa: F401 NodePattern = Union[Tuple[Node, Node], Tuple[Node, Tuple[Node, Node]], Any] # This is the Quantizer class instance from torch/quantization/fx/quantize.py. # Define separately to prevent circular imports. # TODO(fu...
33
78
0.760331
74ad5f4ff5b0cf6e7646f4c9c552140e59096131
2,094
py
Python
packages/watchmen-storage-mysql/test/watchmen_storage_mysql_test/report_test.py
Indexical-Metrics-Measure-Advisory/watchmen
c54ec54d9f91034a38e51fd339ba66453d2c7a6d
[ "MIT" ]
null
null
null
packages/watchmen-storage-mysql/test/watchmen_storage_mysql_test/report_test.py
Indexical-Metrics-Measure-Advisory/watchmen
c54ec54d9f91034a38e51fd339ba66453d2c7a6d
[ "MIT" ]
null
null
null
packages/watchmen-storage-mysql/test/watchmen_storage_mysql_test/report_test.py
Indexical-Metrics-Measure-Advisory/watchmen
c54ec54d9f91034a38e51fd339ba66453d2c7a6d
[ "MIT" ]
null
null
null
from unittest import TestCase from watchmen_model.admin import Factor, FactorType, Topic, TopicKind, TopicType from watchmen_storage import ColumnNameLiteral, EntityCriteriaExpression, EntityCriteriaOperator, \ FreeAggregateArithmetic, FreeAggregateColumn, FreeAggregator, FreeColumn, FreeJoin from watchmen_storage_my...
28.297297
99
0.694842
3b3495efe4752199d5ca22c563b64ad4d3f5d5a0
2,103
py
Python
backend/match4healthcare/logging/formatters.py
match4healthcare/match4healthcare
acf69e3b781d715f0a947c2a9df6646e94f1ca6b
[ "MIT" ]
2
2020-03-28T13:56:39.000Z
2020-03-29T10:16:12.000Z
backend/match4healthcare/logging/formatters.py
match4healthcare/match4healthcare
acf69e3b781d715f0a947c2a9df6646e94f1ca6b
[ "MIT" ]
76
2020-03-27T21:53:04.000Z
2020-03-30T20:27:43.000Z
backend/match4healthcare/logging/formatters.py
match4healthcare/match4healthcare
acf69e3b781d715f0a947c2a9df6646e94f1ca6b
[ "MIT" ]
null
null
null
from datetime import datetime from enum import Enum import logging from django.views.debug import SafeExceptionReporterFilter import json_log_formatter class LogLevel(Enum): DEBUG = "debug" INFO = "info" WARNING = "warn" ERROR = "error" CRITICAL = "error" class OneLineExceptionFormatter(logging...
36.258621
110
0.627199
3b5f4df5259144750bf9d2900b2b2bb56ee9e013
460
py
Python
crypto/Little-Bit/chall.py
vidner/codepwnda-ctf
7e086044b753fe555b44395b79827d2f5b89da1d
[ "Unlicense" ]
6
2021-02-18T15:07:55.000Z
2022-02-04T01:38:10.000Z
crypto/Little-Bit/release/chall.py
vidner/codepwnda-ctf
7e086044b753fe555b44395b79827d2f5b89da1d
[ "Unlicense" ]
null
null
null
crypto/Little-Bit/release/chall.py
vidner/codepwnda-ctf
7e086044b753fe555b44395b79827d2f5b89da1d
[ "Unlicense" ]
null
null
null
import base64, random def pad(msg): return msg << (6 - (msg.bit_length() % 6)) def cut(msg): res = [] while msg: res.append(msg & (2**6 - 1)) msg = msg >> 6 return res def encrypt(msg): msg = pad(int(msg.encode('hex'), 16)) myBits = cut(msg) return ''.join(chr(4*x + random.randint(0, 3)) for x in myBits) ...
18.4
64
0.61087
3b6e2509420e0ebab88e0090c75786d644a74c39
2,978
py
Python
research/cv/DBPN/src/trainonestep/trainonestepgen.py
leelige/mindspore
5199e05ba3888963473f2b07da3f7bca5b9ef6dc
[ "Apache-2.0" ]
77
2021-10-15T08:32:37.000Z
2022-03-30T13:09:11.000Z
research/cv/DBPN/src/trainonestep/trainonestepgen.py
leelige/mindspore
5199e05ba3888963473f2b07da3f7bca5b9ef6dc
[ "Apache-2.0" ]
3
2021-10-30T14:44:57.000Z
2022-02-14T06:57:57.000Z
research/cv/DBPN/src/trainonestep/trainonestepgen.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...
41.943662
95
0.688381
8eb1e34a536a9f4d98c013943863e3b66b8bcfd4
382
py
Python
Contrib-Inspur/openbmc/poky/bitbake/lib/toaster/bldcollector/urls.py
opencomputeproject/Rack-Manager
e1a61d3eeeba0ff655fe9c1301e8b510d9b2122a
[ "MIT" ]
5
2019-11-11T07:57:26.000Z
2022-03-28T08:26:53.000Z
Contrib-Inspur/openbmc/poky/bitbake/lib/toaster/bldcollector/urls.py
opencomputeproject/Rack-Manager
e1a61d3eeeba0ff655fe9c1301e8b510d9b2122a
[ "MIT" ]
3
2019-09-05T21:47:07.000Z
2019-09-17T18:10:45.000Z
Contrib-Inspur/openbmc/poky/bitbake/lib/toaster/bldcollector/urls.py
opencomputeproject/Rack-Manager
e1a61d3eeeba0ff655fe9c1301e8b510d9b2122a
[ "MIT" ]
11
2019-07-20T00:16:32.000Z
2022-01-11T14:17:48.000Z
# # BitBake Toaster Implementation # # Copyright (C) 2014-2017 Intel Corporation # # SPDX-License-Identifier: GPL-2.0-only # from django.conf.urls import include, url import bldcollector.views urlpatterns = [ # landing point for pushing a bitbake_eventlog.json file to this toaster instace url(r'^ev...
22.470588
88
0.730366
8de3c7d062934c4f85945c53c3270491c3d24ebe
716
py
Python
QuickDemos/FinalProject/app.py
ryan-gonfiantini/CMPT-120L-902-21S
e5807251e26ce422ce0c70f99ac62661b5881c18
[ "MIT" ]
null
null
null
QuickDemos/FinalProject/app.py
ryan-gonfiantini/CMPT-120L-902-21S
e5807251e26ce422ce0c70f99ac62661b5881c18
[ "MIT" ]
null
null
null
QuickDemos/FinalProject/app.py
ryan-gonfiantini/CMPT-120L-902-21S
e5807251e26ce422ce0c70f99ac62661b5881c18
[ "MIT" ]
null
null
null
from flask import Flask, render_template, logging app = Flask(__name__) @app.route('/index') def page(): app.logger.info("Moving to the index page"); return render_template ("index.html") @app.route('/page1') def page1(): app.logger.info("Moving to the page1 page"); return render_template ("page...
25.571429
50
0.666201
eba7c2ff2780845059a1e9317238484610d0af0d
997
py
Python
Google_Translate_ID_Ke_EN-main/translate.py
Zusyaku/Termux-And-Lali-Linux-V2
b1a1b0841d22d4bf2cc7932b72716d55f070871e
[ "Apache-2.0" ]
2
2021-11-17T03:35:03.000Z
2021-12-08T06:00:31.000Z
Google_Translate_ID_Ke_EN-main/translate.py
Zusyaku/Termux-And-Lali-Linux-V2
b1a1b0841d22d4bf2cc7932b72716d55f070871e
[ "Apache-2.0" ]
null
null
null
Google_Translate_ID_Ke_EN-main/translate.py
Zusyaku/Termux-And-Lali-Linux-V2
b1a1b0841d22d4bf2cc7932b72716d55f070871e
[ "Apache-2.0" ]
2
2021-11-05T18:07:48.000Z
2022-02-24T21:25:07.000Z
import requests import json banner = """ Translate ID To EN | Python Code """ print(banner) TEXT = raw_input('Text Kamu :' ) header = {'User-Agent': 'Mozilla/5.0 (Linux; Android 10; Redmi Note 9 Pro Build/QKQ1.191215.002; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/87.0.4280.101 Mobile Safari/537...
52.473684
304
0.764293
69129372d43e907593ca871b3a54fc5fb26575c6
704
py
Python
grid.py
kantel/drawbot
db5db08c75a235de4274198c2bb0c0553b14adfe
[ "MIT" ]
null
null
null
grid.py
kantel/drawbot
db5db08c75a235de4274198c2bb0c0553b14adfe
[ "MIT" ]
null
null
null
grid.py
kantel/drawbot
db5db08c75a235de4274198c2bb0c0553b14adfe
[ "MIT" ]
null
null
null
from random import choice riley1 = [(4/255, 21/255, 31/255), (1/255, 155/255, 183/255), (226/255, 107/255, 67/255), (60/255, 76/255, 97/255), (144/255, 166/255, 215/255), (240/255, 192/255, 68/255)] margin = 5 gridsize = 30 size(900, 900) fill(240/255, 245/255, 248/255) rect(0, 0, width...
26.074074
66
0.572443
696a8561b5d9b79ee9e32184d3992b1b2ac14a83
1,630
py
Python
zencad/geom/general_transformation.py
Spiritdude/zencad
4e63b1a6306dd235f4daa2791b10249f7546c95b
[ "MIT" ]
5
2018-04-11T14:11:40.000Z
2018-09-12T19:03:36.000Z
zencad/geom/general_transformation.py
Spiritdude/zencad
4e63b1a6306dd235f4daa2791b10249f7546c95b
[ "MIT" ]
null
null
null
zencad/geom/general_transformation.py
Spiritdude/zencad
4e63b1a6306dd235f4daa2791b10249f7546c95b
[ "MIT" ]
null
null
null
import sys import numpy import pickle import base64 as b64 from OCC.Core.gp import gp_GTrsf, gp_Trsf, gp_Mat, gp_Vec, gp_Ax1, gp_Ax2, gp_Pnt, gp_Dir, gp_XYZ, gp_Quaternion import zencad.util #from zencad.util import point3, vector3 class GeneralTransformation: def __init__(self, gtrsf): self._gtrsf = gt...
23.623188
112
0.592638
c615d5ad9b491cc77d362cff3f6a24bf9a71909a
4,723
py
Python
exercises/networking_selfpaced/networking-workshop/collections/ansible_collections/community/general/tests/unit/modules/network/exos/test_exos_facts.py
tr3ck3r/linklight
5060f624c235ecf46cb62cefcc6bddc6bf8ca3e7
[ "MIT" ]
null
null
null
exercises/networking_selfpaced/networking-workshop/collections/ansible_collections/community/general/tests/unit/modules/network/exos/test_exos_facts.py
tr3ck3r/linklight
5060f624c235ecf46cb62cefcc6bddc6bf8ca3e7
[ "MIT" ]
null
null
null
exercises/networking_selfpaced/networking-workshop/collections/ansible_collections/community/general/tests/unit/modules/network/exos/test_exos_facts.py
tr3ck3r/linklight
5060f624c235ecf46cb62cefcc6bddc6bf8ca3e7
[ "MIT" ]
null
null
null
# # (c) 2018 Extreme Networks Inc. # # This file is part of Ansible # # Ansible is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # # Ans...
38.08871
162
0.656362
c63559751cb02aac242e735b86433aae86b43d58
524
py
Python
7-assets/past-student-repos/data_struct_and_algo-master/sprial_rotation.py
eengineergz/Lambda
1fe511f7ef550aed998b75c18a432abf6ab41c5f
[ "MIT" ]
4
2021-08-31T00:56:40.000Z
2021-11-29T03:08:55.000Z
7-assets/past-student-repos/data_struct_and_algo-master/sprial_rotation.py
eengineergz/Lambda
1fe511f7ef550aed998b75c18a432abf6ab41c5f
[ "MIT" ]
3
2022-02-14T18:48:11.000Z
2022-03-30T05:26:26.000Z
7-assets/past-student-repos/data_struct_and_algo-master/sprial_rotation.py
eengineergz/Lambda
1fe511f7ef550aed998b75c18a432abf6ab41c5f
[ "MIT" ]
1
2021-08-31T00:54:51.000Z
2021-08-31T00:54:51.000Z
def sprialMatrix(arr,m,n): k=0 l=0 while k<m and l<n: for i in range(l,n): print(arr[k][i],end=" ") k+=1 for i in range(k,m): print(arr[i][n-1],end=" ") n-=1 if k<m: for i in range(n-1,l-1,-1): print(arr[m-1][i],e...
19.407407
43
0.385496
ba608625e63abab4ac48c4fe358cf0043969081c
374
py
Python
models/hr_holidays_status_type.py
aroodooteam/aro_hr
bf26f026593493486b4b5c13b26b9b47b9fe3825
[ "BSD-2-Clause" ]
null
null
null
models/hr_holidays_status_type.py
aroodooteam/aro_hr
bf26f026593493486b4b5c13b26b9b47b9fe3825
[ "BSD-2-Clause" ]
null
null
null
models/hr_holidays_status_type.py
aroodooteam/aro_hr
bf26f026593493486b4b5c13b26b9b47b9fe3825
[ "BSD-2-Clause" ]
3
2017-09-11T08:02:11.000Z
2020-04-04T08:13:23.000Z
# -*- coding: utf-8 -*- from openerp import models, api, fields, tools, _ import logging _logger = logging.getLogger(__name__) class hr_holidays_status_type(models.Model): _name = "hr.holidays.status.type" _description = 'Type de permission' name = fields.Char('Type de permission') limit = fields.Fl...
24.933333
49
0.703209
ba6b0c94deaf0108513f98311757a7b003e48522
2,068
py
Python
Kapitel_6/_3_check_instance_args.py
Geralonx/Classes_Tutorial
9499db8159efce1e3c38975b66a9c649631c6727
[ "MIT" ]
1
2020-12-24T15:42:54.000Z
2020-12-24T15:42:54.000Z
Kapitel_6/_3_check_instance_args.py
Geralonx/Classes_Tutorial
9499db8159efce1e3c38975b66a9c649631c6727
[ "MIT" ]
null
null
null
Kapitel_6/_3_check_instance_args.py
Geralonx/Classes_Tutorial
9499db8159efce1e3c38975b66a9c649631c6727
[ "MIT" ]
null
null
null
""" Diese Metaklasse solle überprüfen, ob die Argumente, welche bei der Instanziierung einer Instanz verwedet werden, ALLE kleingeschrieben sind. """ import inspect # --- Metaklasse mit den 'Regeln' für die Klassenerstellung --- # class CheckInstanceArgs(type): def __new__(metacls, clsname, bases, clsdct, **kwa...
36.280702
107
0.646518
2461f1c2bec36307a7a3bd212c75e1a65d79010d
3,118
py
Python
lintcode/501-mini-twitter/push.py
cc13ny/all-in
bc0b01e44e121ea68724da16f25f7e24386c53de
[ "MIT" ]
1
2015-12-16T04:01:03.000Z
2015-12-16T04:01:03.000Z
lintcode/501-mini-twitter/push.py
cc13ny/all-in
bc0b01e44e121ea68724da16f25f7e24386c53de
[ "MIT" ]
1
2016-02-09T06:00:07.000Z
2016-02-09T07:20:13.000Z
lintcode/501-mini-twitter/push.py
cc13ny/all-in
bc0b01e44e121ea68724da16f25f7e24386c53de
[ "MIT" ]
2
2019-06-27T09:07:26.000Z
2019-07-01T04:40:13.000Z
''' Definition of Tweet: class Tweet: @classmethod def create(cls, user_id, tweet_text): # This will create a new tweet object, # and auto fill id ''' from bisect import bisect_left class MiniTwitter: def __init__(self): # do intialization if necessary self.count_limit = ...
33.170213
114
0.669981
ebf3c8e3563c4225460e335ee415d0f9c24d0fb0
2,355
py
Python
x2paddle/project_convertor/pytorch/utils.py
usertianqin/X2Paddle
b554a8094ca3e255ef4bd2e80337222a35625133
[ "Apache-2.0" ]
559
2019-01-14T06:01:55.000Z
2022-03-31T02:52:43.000Z
x2paddle/project_convertor/pytorch/utils.py
usertianqin/X2Paddle
b554a8094ca3e255ef4bd2e80337222a35625133
[ "Apache-2.0" ]
353
2019-05-07T13:20:03.000Z
2022-03-31T05:30:12.000Z
x2paddle/project_convertor/pytorch/utils.py
usertianqin/X2Paddle
b554a8094ca3e255ef4bd2e80337222a35625133
[ "Apache-2.0" ]
241
2018-12-25T02:13:51.000Z
2022-03-27T23:21:43.000Z
# Copyright (c) 2021 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 appl...
37.983871
77
0.630573
2360f9de23a7f8059489fa0edac145b6ec4e26e0
4,192
py
Python
docs/content/code/equation-solver.py
PaulCCCCCCH/m5-101
81201b00cd81c1747ea0cd5f042a09eda02d6d1c
[ "MIT" ]
4
2021-03-25T13:15:38.000Z
2021-11-10T12:29:19.000Z
docs/content/code/equation-solver.py
PaulCCCCCCH/m5-101
81201b00cd81c1747ea0cd5f042a09eda02d6d1c
[ "MIT" ]
null
null
null
docs/content/code/equation-solver.py
PaulCCCCCCH/m5-101
81201b00cd81c1747ea0cd5f042a09eda02d6d1c
[ "MIT" ]
4
2021-03-25T13:18:10.000Z
2021-04-08T13:44:48.000Z
''' Author: Chonghan Chen (paulcccccch@gmail.com) ----- Last Modified: Thursday, 18th March 2021 3:06:59 pm Modified By: Chonghan Chen (paulcccccch@gmail.com) ----- Copyright (c) 2021 IceWould Information Technology Co., Ltd. ''' import math ################# ### Section 1 ### ################# def solve_linear(a, b):...
28.712329
119
0.496422
2374bb27c3455e594f7cd7b0d6aa96c05d7d2be8
163
py
Python
Chapter9_Packages/1_Packages/my_package/calculations/internal_calculations.py
kernbeisser/UdemyPythonPro
000d5e66031bcc22b2d8f115edfbd5ef0e80d5b9
[ "MIT" ]
4
2020-12-28T23:43:35.000Z
2022-01-01T18:34:18.000Z
Chapter9_Packages/1_Packages/my_package/calculations/internal_calculations.py
kernbeisser/UdemyPythonPro
000d5e66031bcc22b2d8f115edfbd5ef0e80d5b9
[ "MIT" ]
null
null
null
Chapter9_Packages/1_Packages/my_package/calculations/internal_calculations.py
kernbeisser/UdemyPythonPro
000d5e66031bcc22b2d8f115edfbd5ef0e80d5b9
[ "MIT" ]
9
2020-09-26T19:29:28.000Z
2022-02-07T06:41:00.000Z
def addition(a, b): return a + b def subtraction(a, b): return a - b def multiplication(a, b): return a * b def division(a, b): return a / b
10.866667
25
0.570552
88ea977667895c5581a37cff21f6a301d4ee0e65
1,697
py
Python
marsyas-vamp/marsyas/scripts/Python/icme2011_plot_dtw.py
jaouahbi/VampPlugins
27c2248d1c717417fe4d448cdfb4cb882a8a336a
[ "Apache-2.0" ]
null
null
null
marsyas-vamp/marsyas/scripts/Python/icme2011_plot_dtw.py
jaouahbi/VampPlugins
27c2248d1c717417fe4d448cdfb4cb882a8a336a
[ "Apache-2.0" ]
null
null
null
marsyas-vamp/marsyas/scripts/Python/icme2011_plot_dtw.py
jaouahbi/VampPlugins
27c2248d1c717417fe4d448cdfb4cb882a8a336a
[ "Apache-2.0" ]
null
null
null
#!/usr/bin/python # # Run DTW on all .txt files in this directory, and generate a # matrix from this # import sys import os import datetime import commands import re import numpy as np import matplotlib.pyplot as plt import mlpy if len(sys.argv) != 3: print "Usage: icme2001_dtw_matrix.py path output_file" ex...
21.2125
72
0.63406
aea29577ccce3af4a2b12dff2b8ee503f8c39599
4,002
py
Python
Packs/Hey/Scripts/Hey/Hey_test.py
diCagri/content
c532c50b213e6dddb8ae6a378d6d09198e08fc9f
[ "MIT" ]
2
2021-12-06T21:38:24.000Z
2022-01-13T08:23:36.000Z
Packs/Hey/Scripts/Hey/Hey_test.py
diCagri/content
c532c50b213e6dddb8ae6a378d6d09198e08fc9f
[ "MIT" ]
87
2022-02-23T12:10:53.000Z
2022-03-31T11:29:05.000Z
Packs/Hey/Scripts/Hey/Hey_test.py
diCagri/content
c532c50b213e6dddb8ae6a378d6d09198e08fc9f
[ "MIT" ]
2
2022-01-05T15:27:01.000Z
2022-02-01T19:27:43.000Z
import demistomock as demisto # noqa: F401 from CommonServerPython import * # noqa: F401 import Hey as hey import pytest def test_try_re(): # Too many extracted values -> None assert hey.try_re(hey.INT_RE, '7 days and not 8 or 6', 0) is None # Expected extracted values -> value assert hey.try_re(he...
31.265625
113
0.612944
9db3bcb9074b3c64f16ae6ddaaa81deebd88dd38
242
py
Python
pages/themes/beginners/loops/Task_and_HW/proper_user_prompt_with_while.py
ProgressBG-Python-Course/ProgressBG-Python
6429833696c2c50d9f902f62cc3a65ca62659c69
[ "MIT" ]
null
null
null
pages/themes/beginners/loops/Task_and_HW/proper_user_prompt_with_while.py
ProgressBG-Python-Course/ProgressBG-Python
6429833696c2c50d9f902f62cc3a65ca62659c69
[ "MIT" ]
null
null
null
pages/themes/beginners/loops/Task_and_HW/proper_user_prompt_with_while.py
ProgressBG-Python-Course/ProgressBG-Python
6429833696c2c50d9f902f62cc3a65ca62659c69
[ "MIT" ]
null
null
null
while True: user_name = input("Enter your user name (at least 3 symbols): ") if len(user_name) >= 3: break else: print("*** At least 3 symbols, please! Try again.\n") print("Nice, your user_name is: ", user_name)
26.888889
68
0.607438
c9a97d11908e2e733143cbf25883eb4ea3e37905
804
py
Python
packages/watchmen-pipeline-kernel/src/watchmen_pipeline_kernel/pipeline_schema_interface/compiled_pipeline.py
Indexical-Metrics-Measure-Advisory/watchmen
c54ec54d9f91034a38e51fd339ba66453d2c7a6d
[ "MIT" ]
null
null
null
packages/watchmen-pipeline-kernel/src/watchmen_pipeline_kernel/pipeline_schema_interface/compiled_pipeline.py
Indexical-Metrics-Measure-Advisory/watchmen
c54ec54d9f91034a38e51fd339ba66453d2c7a6d
[ "MIT" ]
null
null
null
packages/watchmen-pipeline-kernel/src/watchmen_pipeline_kernel/pipeline_schema_interface/compiled_pipeline.py
Indexical-Metrics-Measure-Advisory/watchmen
c54ec54d9f91034a38e51fd339ba66453d2c7a6d
[ "MIT" ]
null
null
null
from abc import abstractmethod from typing import Any, Callable, Dict, List, Optional from watchmen_auth import PrincipalService from watchmen_model.admin import Pipeline from watchmen_model.pipeline_kernel import PipelineMonitorLog, PipelineTriggerTraceId from .pipeline_context import PipelineContext from .topic_stor...
30.923077
87
0.809701
a01cf8d9517abca2df9103cdc1ec23d87c0ea824
6,330
py
Python
StockDataTest_v4/full_code_prediction.py
TrunkingW/Deep_Learning
85add772a2c613f8034985872eb3e44683d47bee
[ "MIT" ]
null
null
null
StockDataTest_v4/full_code_prediction.py
TrunkingW/Deep_Learning
85add772a2c613f8034985872eb3e44683d47bee
[ "MIT" ]
null
null
null
StockDataTest_v4/full_code_prediction.py
TrunkingW/Deep_Learning
85add772a2c613f8034985872eb3e44683d47bee
[ "MIT" ]
null
null
null
import pandas as pd import tensorflow as tf import numpy as np import matplotlib.pyplot as plt TB=3290 TE=3390 BATCH_START = 0 TIME_STEPS = 1 BATCH_SIZE = 1 INPUT_SIZE = 7 OUTPUT_SIZE = 1 CELL_SIZE = 10 LR = 0.006 f=open('test.csv') df=pd.read_csv(f) data=df.iloc[:,2:10].values def get_train_data(train_begin=T...
39.5625
114
0.635545
e10c6acb593359e95bc793f205668ebac8ecfd57
1,049
py
Python
task_3/victory_test.py
christopher-besch/bwinf39
e5394b37894a56608312057d179029d8a5df98fd
[ "MIT" ]
1
2021-01-04T15:16:44.000Z
2021-01-04T15:16:44.000Z
task_3/victory_test.py
christopher-besch/bwinf39
e5394b37894a56608312057d179029d8a5df98fd
[ "MIT" ]
null
null
null
task_3/victory_test.py
christopher-besch/bwinf39
e5394b37894a56608312057d179029d8a5df98fd
[ "MIT" ]
null
null
null
from typing import List from find_winning_players import find_winning_player_ko, find_winning_player_liga from rng_simulation import play_rng, play_rng_5 def does_player_win(game_name: str, skill_levels: List[int]) -> bool: """ find out if the expected best player wins and return a boolean """ ...
45.608696
118
0.735939
011f348f9b4fdf969b24253c784b22e9a7b18bc3
5,154
py
Python
Classes/Screen_codes/Application_server.py
EKaczmarek/BomberMan
a232d00ff0fe9be0a1276fba22c3f120e2bb4e5d
[ "MIT" ]
1
2018-04-30T15:46:47.000Z
2018-04-30T15:46:47.000Z
Classes/Screen_codes/Application_server.py
EKaczmarek/BomberMan
a232d00ff0fe9be0a1276fba22c3f120e2bb4e5d
[ "MIT" ]
1
2018-06-03T13:20:19.000Z
2018-06-03T20:19:25.000Z
Classes/Screen_codes/Application_server.py
EKaczmarek/BomberMan
a232d00ff0fe9be0a1276fba22c3f120e2bb4e5d
[ "MIT" ]
1
2018-06-03T12:59:11.000Z
2018-06-03T12:59:11.000Z
from PyQt5.QtWidgets import QApplication from PyQt5.QtCore import pyqtSlot from threading import Thread from Classes import Server import json import time class Application_server(QApplication): def __init__(self, *agrs, **kwargs): super(Application_server, self).__init__(*agrs, **kwargs) self.se...
40.582677
115
0.605937
017e8a2b8c1498ceabffc0065e21f12de7836861
2,310
py
Python
gemtown/copyrights/models.py
doramong0926/gemtown
2c39284e3c68f0cc11994bed0ee2abaad0ea06b6
[ "MIT" ]
null
null
null
gemtown/copyrights/models.py
doramong0926/gemtown
2c39284e3c68f0cc11994bed0ee2abaad0ea06b6
[ "MIT" ]
5
2020-09-04T20:13:39.000Z
2022-02-17T22:03:33.000Z
gemtown/copyrights/models.py
doramong0926/gemtown
2c39284e3c68f0cc11994bed0ee2abaad0ea06b6
[ "MIT" ]
null
null
null
from django.db import models from django.utils.encoding import python_2_unicode_compatible from gemtown.users import models as user_models from gemtown.songs import models as song_models from gemtown.modelphotos import models as modelphoto_models @python_2_unicode_compatible class TimeStampModel(models.Model): cre...
31.216216
90
0.690043
fed7beb069ebe93b54ed3756b8eadbcda7eeff1e
13,140
py
Python
Beginner/03. Python/Calculator_tkinter.py
ankita080208/Hacktoberfest
2be849e89285260e7b6672f42979943ad6bbec78
[ "MIT" ]
1
2021-10-06T13:55:02.000Z
2021-10-06T13:55:02.000Z
Beginner/03. Python/Calculator_tkinter.py
ankita080208/Hacktoberfest
2be849e89285260e7b6672f42979943ad6bbec78
[ "MIT" ]
null
null
null
Beginner/03. Python/Calculator_tkinter.py
ankita080208/Hacktoberfest
2be849e89285260e7b6672f42979943ad6bbec78
[ "MIT" ]
null
null
null
from tkinter import *; from tkinter import messagebox; def actionauthor(): messagebox.showinfo("Author", "Pranta Sarker\nBatch: 6th\nDepartment: CSE\nNorth East University Bangladesh") #Check weather the input string is a number or not def is_number(s): if(s != ''): if (s.replace('.', '', 1).isdigit()...
32.127139
123
0.633181
c94cd81a9efc0e46a2b1cf269c8f3d78243dcb0c
175
py
Python
Curso-Em-Video-Python/2Exercicios/046_contagem_regressiva.py
pedrohd21/Cursos-Feitos
b223aad83867bfa45ad161d133e33c2c200d42bd
[ "MIT" ]
null
null
null
Curso-Em-Video-Python/2Exercicios/046_contagem_regressiva.py
pedrohd21/Cursos-Feitos
b223aad83867bfa45ad161d133e33c2c200d42bd
[ "MIT" ]
null
null
null
Curso-Em-Video-Python/2Exercicios/046_contagem_regressiva.py
pedrohd21/Cursos-Feitos
b223aad83867bfa45ad161d133e33c2c200d42bd
[ "MIT" ]
null
null
null
from time import sleep import emoji for contador in range(10, 0, -1): print(contador) sleep(1) print(emoji.emojize(':collision: :collision: :collision: :collision:'))
25
71
0.708571
42d503e016045333cd54d91b62daa16e003d3827
1,353
py
Python
src/config.py
staugur/ssp
1f5a0cec7369b078a09e9846d81881cc37dd2c3c
[ "BSD-3-Clause" ]
1
2019-03-25T06:43:54.000Z
2019-03-25T06:43:54.000Z
src/config.py
saintic/ssp
1f5a0cec7369b078a09e9846d81881cc37dd2c3c
[ "BSD-3-Clause" ]
null
null
null
src/config.py
saintic/ssp
1f5a0cec7369b078a09e9846d81881cc37dd2c3c
[ "BSD-3-Clause" ]
1
2019-10-13T12:25:07.000Z
2019-10-13T12:25:07.000Z
# -*- coding: utf-8 -*- """ ssp.config ~~~~~~~~~~~ The program configuration file, the preferred configuration item, reads the system environment variable first. :copyright: (c) 2019 by staugur. :license: BSD 3-Clause, see LICENSE for more details. """ from os import getenv # Configuration Infor...
32.214286
136
0.697709
6e02559b8061d2cfdc204fb4402337dd52a3d805
788
py
Python
euler-42.py
TFabijo/euler
58dc07b9adb236890556ccd5d75ca9dbd2b50df9
[ "MIT" ]
null
null
null
euler-42.py
TFabijo/euler
58dc07b9adb236890556ccd5d75ca9dbd2b50df9
[ "MIT" ]
null
null
null
euler-42.py
TFabijo/euler
58dc07b9adb236890556ccd5d75ca9dbd2b50df9
[ "MIT" ]
null
null
null
abeceda = {'A' : 1,'B' : 2, 'C' : 3, 'D' : 4, 'E' : 5, 'F' : 6, 'G' : 7, 'H' : 8, 'I' : 9, 'J' : 10, 'K' : 11, 'L' : 12, 'M' : 13, 'N' : 14, 'O' : 15, 'P' : 16, 'Q' : 17, 'R' : 18, 'S' : 19, 'T' : 20, 'U' : 21, 'V' : 22, 'W' : 23, 'X' : 24, 'Y' : 25, 'Z' : 26} def trikotnr_besede(besede_tekst): st = 0 tr...
32.833333
261
0.445431
6e53556692c3739fed35d1541dc22698fd46280e
465
py
Python
lego/calculus/exception.py
tipptop3d/Horst-oder-Klaus
2afda1a64b5ccace74ebc7b806a5e5501c0f12bb
[ "MIT" ]
null
null
null
lego/calculus/exception.py
tipptop3d/Horst-oder-Klaus
2afda1a64b5ccace74ebc7b806a5e5501c0f12bb
[ "MIT" ]
null
null
null
lego/calculus/exception.py
tipptop3d/Horst-oder-Klaus
2afda1a64b5ccace74ebc7b806a5e5501c0f12bb
[ "MIT" ]
null
null
null
class ParsingError(Exception): """Exception raised by a parsing error.""" class EvaluationError(Exception): """Exception raised if a Expression couldn't be evaluated.""" class DifferentationError(Exception): """Exception raised if a Expression couldn't be differentiated""" class TokenizingError(Except...
24.473684
69
0.735484
28285024f4d5ce7ff56c77df4ef50fde7bddd554
1,345
py
Python
test/test_npu/test_network_ops/test_pad_packed_sequence.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_pad_packed_sequence.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_pad_packed_sequence.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...
44.833333
81
0.742751
284e7f16eabe6413623418ee5fbc4b5d14594def
871
py
Python
robot/__init__.py
East196/hello-py
a77c7a0c8e5e2b5e8cefaf0fda335ab0c3b1da21
[ "Apache-2.0" ]
1
2017-10-23T14:58:47.000Z
2017-10-23T14:58:47.000Z
robot/__init__.py
East196/hello-py
a77c7a0c8e5e2b5e8cefaf0fda335ab0c3b1da21
[ "Apache-2.0" ]
null
null
null
robot/__init__.py
East196/hello-py
a77c7a0c8e5e2b5e8cefaf0fda335ab0c3b1da21
[ "Apache-2.0" ]
1
2018-04-06T07:49:18.000Z
2018-04-06T07:49:18.000Z
# -*- coding: utf-8 -*- import time def timestamp_datetime(value): format = '%Y-%m-%d %H:%M:%S' # value为传入的值为时间戳(整形),如:1332888820 value = time.localtime(value) ## 经过localtime转换后变成 ## time.struct_time(tm_year=2012, tm_mon=3, tm_mday=28, tm_hour=6, tm_min=53, tm_sec=40, tm_wday=2, tm_yday=88, tm_isdst=0) # 最后...
36.291667
127
0.676234
66794719ca8ccd73459ac2c7425a2413d6761a0a
347
py
Python
PYTHON/Strings/merge_the_tools.py
byung-u/HackerRank
4c02fefff7002b3af774b99ebf8d40f149f9d163
[ "MIT" ]
null
null
null
PYTHON/Strings/merge_the_tools.py
byung-u/HackerRank
4c02fefff7002b3af774b99ebf8d40f149f9d163
[ "MIT" ]
null
null
null
PYTHON/Strings/merge_the_tools.py
byung-u/HackerRank
4c02fefff7002b3af774b99ebf8d40f149f9d163
[ "MIT" ]
null
null
null
#!/usr/bin/env python3 def merge_the_tools(string, k): for i in range(0, len(string), k): ret = [] for s in string[i:i + k]: if s in ret: continue ret.append(s) print(''.join(ret)) if __name__ == '__main__': string, k = input(), int(input()) ...
23.133333
38
0.51585
b0b57fa30e94f7e3a77df86e82e8551508c8ecab
157
py
Python
musicbeats/admin.py
VICTOR4046/MusiX
4a13d849e9db9a20b3ef8f286a8d047c0de86170
[ "MIT" ]
null
null
null
musicbeats/admin.py
VICTOR4046/MusiX
4a13d849e9db9a20b3ef8f286a8d047c0de86170
[ "MIT" ]
null
null
null
musicbeats/admin.py
VICTOR4046/MusiX
4a13d849e9db9a20b3ef8f286a8d047c0de86170
[ "MIT" ]
null
null
null
from django.contrib import admin from .models import Song, Watchlater # Register your models here. admin.site.register(Song) admin.site.register(Watchlater)
26.166667
36
0.815287
af8c1d68d762ab16e0738e094114d0131f4963fe
3,333
py
Python
Imagenes/Maxwell2D/Coexistencia/Coexistencia.py
efogliatto/Tesis
058fa0c2e23cd538621d17d41bb216a4db4d211a
[ "CC0-1.0" ]
null
null
null
Imagenes/Maxwell2D/Coexistencia/Coexistencia.py
efogliatto/Tesis
058fa0c2e23cd538621d17d41bb216a4db4d211a
[ "CC0-1.0" ]
null
null
null
Imagenes/Maxwell2D/Coexistencia/Coexistencia.py
efogliatto/Tesis
058fa0c2e23cd538621d17d41bb216a4db4d211a
[ "CC0-1.0" ]
null
null
null
import numpy as np import matplotlib.pyplot as plt import MaxwellConstruction as mx import collections import argparse import locale if __name__ == "__main__": # Argumentos de consola parser = argparse.ArgumentParser(description='EOS para fluidos definidos en CoolProp') parser.add_argument('-png'...
19.377907
124
0.485449
3c2670611b6d122ce0cac3231a5e9594d0e6b531
60
py
Python
Python/zzz_training_challenge/UdemyPythonPro/Chapter9_Packages/3_HTML_Doc/fastvector/__init__.py
Kreijeck/learning
eaffee08e61f2a34e01eb8f9f04519aac633f48c
[ "MIT" ]
4
2020-12-28T23:43:35.000Z
2022-01-01T18:34:18.000Z
Python/zzz_training_challenge/UdemyPythonPro/Chapter9_Packages/3_HTML_Doc/fastvector/__init__.py
Kreijeck/learning
eaffee08e61f2a34e01eb8f9f04519aac633f48c
[ "MIT" ]
null
null
null
Python/zzz_training_challenge/UdemyPythonPro/Chapter9_Packages/3_HTML_Doc/fastvector/__init__.py
Kreijeck/learning
eaffee08e61f2a34e01eb8f9f04519aac633f48c
[ "MIT" ]
9
2020-09-26T19:29:28.000Z
2022-02-07T06:41:00.000Z
from .vector import Vector2D __all__ = [ 'Vector2D' ]
8.571429
28
0.65
b1f1704862b25b3ae1644edcb1622bc6af8ff155
8,154
py
Python
gemtown/copyrights/views.py
doramong0926/gemtown
2c39284e3c68f0cc11994bed0ee2abaad0ea06b6
[ "MIT" ]
null
null
null
gemtown/copyrights/views.py
doramong0926/gemtown
2c39284e3c68f0cc11994bed0ee2abaad0ea06b6
[ "MIT" ]
5
2020-09-04T20:13:39.000Z
2022-02-17T22:03:33.000Z
gemtown/copyrights/views.py
doramong0926/gemtown
2c39284e3c68f0cc11994bed0ee2abaad0ea06b6
[ "MIT" ]
null
null
null
from rest_framework.views import APIView from rest_framework.response import Response from rest_framework import status from rest_framework.permissions import BasePermission, AllowAny, IsAdminUser, IsAuthenticated from . import models, serializers from gemtown.users import models as user_models from django.conf import ...
37.232877
109
0.590262
5932334712864bf515f8a866fecf8ea92fcad3db
60
py
Python
data_tests/saved__backend__py3.9/pythran/assign_func_boost.py
fluiddyn/transonic
a460e9f6d1139f79b668cb3306d1e8a7e190b72d
[ "BSD-3-Clause" ]
88
2019-01-08T16:39:08.000Z
2022-02-06T14:19:23.000Z
data_tests/saved__backend__/pythran/assign_func_boost.py
fluiddyn/transonic
a460e9f6d1139f79b668cb3306d1e8a7e190b72d
[ "BSD-3-Clause" ]
13
2019-06-20T15:53:10.000Z
2021-02-09T11:03:29.000Z
data_tests/saved__backend__/pythran/assign_func_boost.py
fluiddyn/transonic
a460e9f6d1139f79b668cb3306d1e8a7e190b72d
[ "BSD-3-Clause" ]
1
2019-11-05T03:03:14.000Z
2019-11-05T03:03:14.000Z
def func(x): return x ** 2 __transonic__ = ("0.3.0",)
10
26
0.533333
0575a51c313eacafc3ae349a630f41782b45da83
412
py
Python
source/pkgsrc/lang/py-python-language-server/patches/patch-setup.py
Scottx86-64/dotfiles-1
51004b1e2b032664cce6b553d2052757c286087d
[ "Unlicense" ]
1
2021-11-20T22:46:39.000Z
2021-11-20T22:46:39.000Z
source/pkgsrc/lang/py-python-language-server/patches/patch-setup.py
Scottx86-64/dotfiles-1
51004b1e2b032664cce6b553d2052757c286087d
[ "Unlicense" ]
null
null
null
source/pkgsrc/lang/py-python-language-server/patches/patch-setup.py
Scottx86-64/dotfiles-1
51004b1e2b032664cce6b553d2052757c286087d
[ "Unlicense" ]
null
null
null
$NetBSD: patch-setup.py,v 1.1 2020/05/18 13:36:49 wiz Exp $ Accept any ujson. --- setup.py.orig 2020-05-13 20:39:42.000000000 +0000 +++ setup.py @@ -38,7 +38,7 @@ setup( 'jedi>=0.17.0,<0.18.0', 'python-jsonrpc-server>=0.3.2', 'pluggy', - 'ujson<=1.35; platform_system!="Windows"' + ...
25.75
68
0.575243
557615e3f3e7b18ce57526038571c244b18231a5
11,028
py
Python
src/onegov/file/models/file.py
politbuero-kampagnen/onegov-cloud
20148bf321b71f617b64376fe7249b2b9b9c4aa9
[ "MIT" ]
null
null
null
src/onegov/file/models/file.py
politbuero-kampagnen/onegov-cloud
20148bf321b71f617b64376fe7249b2b9b9c4aa9
[ "MIT" ]
null
null
null
src/onegov/file/models/file.py
politbuero-kampagnen/onegov-cloud
20148bf321b71f617b64376fe7249b2b9b9c4aa9
[ "MIT" ]
null
null
null
import json import sedate import isodate from depot.fields.sqlalchemy import UploadedFileField as UploadedFileFieldBase from onegov.core.crypto import random_token from onegov.core.orm import Base from onegov.core.orm.abstract import Associable from onegov.core.orm.mixins import TimestampMixin from onegov.core.orm.typ...
34.679245
79
0.659322
55bfe8558d6b84d96dcc2687603f28af7f25a8f2
12,408
py
Python
test/test_schedule.py
scuervo91/dcapy
46c9277e607baff437e5707167476d5f7e2cf80c
[ "MIT" ]
4
2021-05-21T13:26:10.000Z
2021-11-15T17:17:01.000Z
test/test_schedule.py
scuervo91/dcapy
46c9277e607baff437e5707167476d5f7e2cf80c
[ "MIT" ]
null
null
null
test/test_schedule.py
scuervo91/dcapy
46c9277e607baff437e5707167476d5f7e2cf80c
[ "MIT" ]
null
null
null
import unittest import numpy as np from datetime import date from pandas.testing import assert_frame_equal import pandas as pd import os import yaml from dcapy.wiener import Brownian, GeometricBrownian,MeanReversion from dcapy.dca import ProbVar from dcapy.schedule import Period, Scenario, Well, model_from_dict from ...
32.566929
134
0.387975
e972d143d3604d8a528f931118e5a01c04241e4d
8,362
py
Python
Packs/Accessdata/Integrations/Accessdata/Accessdata_test.py
diCagri/content
c532c50b213e6dddb8ae6a378d6d09198e08fc9f
[ "MIT" ]
799
2016-08-02T06:43:14.000Z
2022-03-31T11:10:11.000Z
Packs/Accessdata/Integrations/Accessdata/Accessdata_test.py
diCagri/content
c532c50b213e6dddb8ae6a378d6d09198e08fc9f
[ "MIT" ]
9,317
2016-08-07T19:00:51.000Z
2022-03-31T21:56:04.000Z
Packs/Accessdata/Integrations/Accessdata/Accessdata_test.py
diCagri/content
c532c50b213e6dddb8ae6a378d6d09198e08fc9f
[ "MIT" ]
1,297
2016-08-04T13:59:00.000Z
2022-03-31T23:43:06.000Z
import demistomock as demisto from CommonServerPython import * from Accessdata import Client, create_jobstate_context, create_contents, wrap_jobstate_context, main from test_data.constants import MOCK_URL, FAKE_SITESERVER_TOKEN, JOB_JUST_WITHOUT_CASEJOBID, JOB_JUST_WITH_CASEJOBID, \ MOCK_PARAMS, MOCK_TEST_MODULE_RE...
44.010526
123
0.684884
757c4489bc4319787efd3d5a7311bee13513d7a3
51
py
Python
python_project/python/Proj1/readFile.py
sinomiko/project
00fadb0033645f103692f5b06c861939a9d4aa0e
[ "BSD-3-Clause" ]
1
2018-12-30T14:07:42.000Z
2018-12-30T14:07:42.000Z
python_project/python/Proj1/readFile.py
sinomiko/project
00fadb0033645f103692f5b06c861939a9d4aa0e
[ "BSD-3-Clause" ]
null
null
null
python_project/python/Proj1/readFile.py
sinomiko/project
00fadb0033645f103692f5b06c861939a9d4aa0e
[ "BSD-3-Clause" ]
null
null
null
f=open('C:/Miko/Code/test.txt','r+') f.readline()
12.75
36
0.607843
dddc48169075eab11e825fbb39f5da3e9cd22fbb
1,618
py
Python
Openharmony v1.0/third_party/ltp/testcases/kernel/power_management/pm_sched_domain.py
clkbit123/TheOpenHarmony
0e6bcd9dee9f1a2481d762966b8bbd24baad6159
[ "MIT" ]
1
2022-02-15T08:51:55.000Z
2022-02-15T08:51:55.000Z
hihope_neptune-oh_hid/00_src/v0.3/third_party/ltp/testcases/kernel/power_management/pm_sched_domain.py
dawmlight/vendor_oh_fun
bc9fb50920f06cd4c27399f60076f5793043c77d
[ "Apache-2.0" ]
null
null
null
hihope_neptune-oh_hid/00_src/v0.3/third_party/ltp/testcases/kernel/power_management/pm_sched_domain.py
dawmlight/vendor_oh_fun
bc9fb50920f06cd4c27399f60076f5793043c77d
[ "Apache-2.0" ]
null
null
null
#!/usr/bin/env python3 ''' This Python script validates sched domain information in dmesg with information in sysfs topology ''' import os import sys from pm_sched_mc import * from optparse import OptionParser __author__ = "Poornima Nayak <mpnayak@linux.vnet.ibm.com>" class Usage(Exception): def __init__(sel...
29.418182
83
0.629172
b5e9c7b573db47169d89990bbf6aa3d2b9165837
745
py
Python
misc/utils.py
joomogmbh/GrillMeister
b1b4935d4e7f27dc895d6b16462d5568fb708ff3
[ "MIT" ]
1
2019-04-22T13:52:01.000Z
2019-04-22T13:52:01.000Z
misc/utils.py
joomogmbh/GrillMeister
b1b4935d4e7f27dc895d6b16462d5568fb708ff3
[ "MIT" ]
null
null
null
misc/utils.py
joomogmbh/GrillMeister
b1b4935d4e7f27dc895d6b16462d5568fb708ff3
[ "MIT" ]
null
null
null
bratwurstPreis = 1.0 schinkengrillerPreis = 1.5 def getOrderPrice(req_key, req_values): '''returns dict with names as keys and individual cost values''' result = {} for order in req_values: resultV = 0.0 # TODO Keys verwenden, nicht einfach von Reihenfolge ausgehen!! resultV = resul...
33.863636
91
0.671141
1ffb979c80ac5f9e5dd6891159b9988a11fc40be
173
py
Python
2020-09-03-1226-gma_Klassen_main_becher.py
gmaubach/OOP-with-Python
9b059e911d55d616e756324564f1f2cc524aa53d
[ "MIT" ]
null
null
null
2020-09-03-1226-gma_Klassen_main_becher.py
gmaubach/OOP-with-Python
9b059e911d55d616e756324564f1f2cc524aa53d
[ "MIT" ]
null
null
null
2020-09-03-1226-gma_Klassen_main_becher.py
gmaubach/OOP-with-Python
9b059e911d55d616e756324564f1f2cc524aa53d
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- from becher import * a = Becher(500, 200) a.ausgabe() b = Becher(300) b.ausgabe() #c = Becher(-100) d = Becher(100, -200) # EOF .
11.533333
24
0.526012
1f92a199eb08d08b4639bfe0fed2646c6b411864
2,195
py
Python
Graphalgorithmen/Breitensuche (BFS)/Breitensuche.py
NiclasDev63/Algorithmen
64c24d0501f9e12ea9be6ae4fa946ad8a40134f6
[ "MIT" ]
null
null
null
Graphalgorithmen/Breitensuche (BFS)/Breitensuche.py
NiclasDev63/Algorithmen
64c24d0501f9e12ea9be6ae4fa946ad8a40134f6
[ "MIT" ]
null
null
null
Graphalgorithmen/Breitensuche (BFS)/Breitensuche.py
NiclasDev63/Algorithmen
64c24d0501f9e12ea9be6ae4fa946ad8a40134f6
[ "MIT" ]
null
null
null
from collections import defaultdict from collections import deque # Hier erstellen wir die Klasse Graph class Graph(): # Das ist der Konstruktor der Klasse # Hier erstellen wir ein defaultdict mit einer Liste, # welches genutzt wird um die Knoten und Kanten zu speichern def __init__(self): se...
26.445783
101
0.614579
2f22ecc0c6b65514f2828da358c232f879b8e58a
2,580
py
Python
Co-Simulation/Sumo/sumo-1.7.0/tools/output/walkFactor.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/output/walkFactor.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/output/walkFactor.py
uruzahe/carla
940c2ab23cce1eda1ef66de35f66b42d40865fb1
[ "MIT" ]
1
2020-11-20T19:31:26.000Z
2020-11-20T19:31:26.000Z
#!/usr/bin/env python # -*- coding: utf-8 -*- # Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo # Copyright (C) 2012-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 avail...
39.090909
87
0.646512
f199ce79cad30aa62338a9227671870d8d1e57f9
1,448
py
Python
src/Raspberry Pi/Particle Sensor/serialv2.py
Air92/AtmosphericPollutionCollecting
9c152b2d961535fa1e1b87f1d7c47f25573f7ca7
[ "MIT" ]
1
2018-06-07T21:54:56.000Z
2018-06-07T21:54:56.000Z
src/Raspberry Pi/Particle Sensor/serialv2.py
Air92/AtmosphericPollutionCollecting
9c152b2d961535fa1e1b87f1d7c47f25573f7ca7
[ "MIT" ]
1
2018-01-26T16:13:15.000Z
2018-01-26T18:39:26.000Z
src/Raspberry Pi/Particle Sensor/serialv2.py
Air92/AtmosphericPollutionCollecting
9c152b2d961535fa1e1b87f1d7c47f25573f7ca7
[ "MIT" ]
5
2017-11-20T09:39:07.000Z
2019-10-28T13:10:50.000Z
import time import serial def checkValue(buffer, length ): recievedflag = False recievedSum = 0 for i in range(0, (length-2)): recievedSum = recievedSum + int(buffer[i],16) recievedSum = recievedSum + 0x42 if((int(buffer[length-2],16)<<8)+(int(buffer[length-1],16))==recievedSum): ...
24.965517
146
0.687845
b5793ce8d8c725addfcc3b868010b7a33a4b5755
278
py
Python
CS305/assignment7/rdt/server.py
Wycers/Codelib
86d83787aa577b8f2d66b5410e73102411c45e46
[ "MIT" ]
22
2018-08-07T06:55:10.000Z
2021-06-12T02:12:19.000Z
CS305/assignment7/rdt/server.py
Wycers/Codelib
86d83787aa577b8f2d66b5410e73102411c45e46
[ "MIT" ]
28
2020-03-04T23:47:22.000Z
2022-02-26T18:50:00.000Z
CS305/assignment7/rdt/server.py
Wycers/Codelib
86d83787aa577b8f2d66b5410e73102411c45e46
[ "MIT" ]
4
2019-11-09T15:41:26.000Z
2021-10-10T08:56:57.000Z
from rdt import socket import time server = socket() server.bind(('127.0.0.1', 2333)) # conn, client = server.accept() data = server.recv(2048) print(data) data = server.recv(2048) print(data) with open('alice~.txt', 'w') as f: f.write(server.recv(2048).decode('utf-8'))
18.533333
46
0.672662
b58bc4cf40438fc58926f8cfb7833ac1e1cea01c
654
py
Python
split_files.py
ligang945/pyMisc
3107c80f7f53ffc797b289ec73d1ef4db80f0b63
[ "MIT" ]
null
null
null
split_files.py
ligang945/pyMisc
3107c80f7f53ffc797b289ec73d1ef4db80f0b63
[ "MIT" ]
null
null
null
split_files.py
ligang945/pyMisc
3107c80f7f53ffc797b289ec73d1ef4db80f0b63
[ "MIT" ]
null
null
null
import os src_dir = '/data2/yibiao/1214/stage_01' dst_dirs = ['/data2/yibiao/1214/stage_01_1', '/data2/yibiao/1214/stage_01_2'] for dst_dir in dst_dirs: if not os.path.isdir(dst_dir): os.mkdir(dst_dir) for parent, dirnames, filenames in os.walk(src_dir): pass filenames.sort() size = len(filenames)...
23.357143
86
0.657492
a909afbd4fbae8bc9013083915b57e9f9d6e4e2f
650
py
Python
source/pkgsrc/mail/thunderbird52/patches/patch-mozilla_build_pgo_profileserver.py
Scottx86-64/dotfiles-1
51004b1e2b032664cce6b553d2052757c286087d
[ "Unlicense" ]
1
2021-11-20T22:46:39.000Z
2021-11-20T22:46:39.000Z
source/pkgsrc/mail/thunderbird52/patches/patch-mozilla_build_pgo_profileserver.py
Scottx86-64/dotfiles-1
51004b1e2b032664cce6b553d2052757c286087d
[ "Unlicense" ]
null
null
null
source/pkgsrc/mail/thunderbird52/patches/patch-mozilla_build_pgo_profileserver.py
Scottx86-64/dotfiles-1
51004b1e2b032664cce6b553d2052757c286087d
[ "Unlicense" ]
null
null
null
$NetBSD: patch-mozilla_build_pgo_profileserver.py,v 1.1 2018/12/16 08:29:48 ryoon Exp $ --- mozilla/build/pgo/profileserver.py.orig 2016-04-07 21:33:18.000000000 +0000 +++ mozilla/build/pgo/profileserver.py @@ -68,7 +68,7 @@ if __name__ == '__main__': env["MOZ_JAR_LOG_FILE"] = os.path.abspath(jarlog) pri...
46.428571
87
0.629231
a96c984d787e7c0d51dd87254fe72373c9443af8
173
py
Python
reports/admin.py
Daniel-Hoerauf/cs3240-f16-team11
0377bcb8ede9599c04daf7683b065abb2a47f893
[ "MIT" ]
null
null
null
reports/admin.py
Daniel-Hoerauf/cs3240-f16-team11
0377bcb8ede9599c04daf7683b065abb2a47f893
[ "MIT" ]
null
null
null
reports/admin.py
Daniel-Hoerauf/cs3240-f16-team11
0377bcb8ede9599c04daf7683b065abb2a47f893
[ "MIT" ]
null
null
null
from django.contrib import admin from .models import Report, UploadedFile, Folder admin.site.register(Report) admin.site.register(UploadedFile) admin.site.register(Folder)
24.714286
48
0.82659