hexsha
stringlengths
40
40
size
int64
3
1.03M
ext
stringclasses
10 values
lang
stringclasses
1 value
max_stars_repo_path
stringlengths
3
972
max_stars_repo_name
stringlengths
6
130
max_stars_repo_head_hexsha
stringlengths
40
78
max_stars_repo_licenses
listlengths
1
10
max_stars_count
int64
1
191k
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
3
972
max_issues_repo_name
stringlengths
6
130
max_issues_repo_head_hexsha
stringlengths
40
78
max_issues_repo_licenses
listlengths
1
10
max_issues_count
int64
1
116k
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
3
972
max_forks_repo_name
stringlengths
6
130
max_forks_repo_head_hexsha
stringlengths
40
78
max_forks_repo_licenses
listlengths
1
10
max_forks_count
int64
1
105k
max_forks_repo_forks_event_min_datetime
stringlengths
24
24
max_forks_repo_forks_event_max_datetime
stringlengths
24
24
content
stringlengths
3
1.03M
avg_line_length
float64
1.13
941k
max_line_length
int64
2
941k
alphanum_fraction
float64
0
1
204b08839af056b68f2e1f91aa8cea38061c18c8
2,301
py
Python
library/pyjamas/Canvas/Color.py
certik/pyjamas
5bb72e63e50f09743ac986f4c9690ba50c499ba9
[ "ECL-2.0", "Apache-2.0" ]
1
2018-09-19T09:14:16.000Z
2018-09-19T09:14:16.000Z
library/pyjamas/Canvas/Color.py
andreyvit/pyjamas
1154abe3340a84dba7530b8174aaddecfc1a0944
[ "ECL-2.0", "Apache-2.0" ]
null
null
null
library/pyjamas/Canvas/Color.py
andreyvit/pyjamas
1154abe3340a84dba7530b8174aaddecfc1a0944
[ "ECL-2.0", "Apache-2.0" ]
1
2019-08-13T20:32:25.000Z
2019-08-13T20:32:25.000Z
""" * Copyright 2008 Google Inc. * * 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 writing, s...
27.722892
79
0.643199
b66a24d064151429fd72128b56c7744f506fb7ad
4,497
py
Python
run_pty.py
tobiasrenkin/sublime-console
cb404fb7fd7febd9a4aff922244814a719d93386
[ "MIT" ]
null
null
null
run_pty.py
tobiasrenkin/sublime-console
cb404fb7fd7febd9a4aff922244814a719d93386
[ "MIT" ]
null
null
null
run_pty.py
tobiasrenkin/sublime-console
cb404fb7fd7febd9a4aff922244814a719d93386
[ "MIT" ]
null
null
null
#!/usr/bin/env python from __future__ import print_function import os, sys, select, signal, termios, fcntl, tty, pty, subprocess, atexit, argparse, struct, time print('Sublime LinkedTerminal') parser = argparse.ArgumentParser(description='Sublime LinkedTerminal connects your terminal to Sublime Text through a named ...
38.435897
142
0.723594
7f3b1140c3609d2c0f0723bade96488c07fabb60
357
py
Python
crudapp/controller/curl_controller.py
MrMattSim/crudmap
77fb0bb35a10f69b84804d228399e843e8c09f24
[ "MIT" ]
null
null
null
crudapp/controller/curl_controller.py
MrMattSim/crudmap
77fb0bb35a10f69b84804d228399e843e8c09f24
[ "MIT" ]
null
null
null
crudapp/controller/curl_controller.py
MrMattSim/crudmap
77fb0bb35a10f69b84804d228399e843e8c09f24
[ "MIT" ]
3
2016-07-12T17:45:02.000Z
2021-04-15T13:28:13.000Z
#!/usr/bin/env python # -*- coding: utf-8 -*- import flask import crudapp.model.curl_print as curl_print def def_control(app): @app.before_request def before(): curl_print.print_incoming_request(flask.request) @app.after_request def after(response): curl_print.print_outgoing_respon...
18.789474
56
0.70028
41c9a68e07cbc44f9bbef2eb04ad8d384620c375
5,336
py
Python
gui.py
AhmadMehrbodTalkdesk/image-caption-generator-using-deep-learning
46aace56c0b06f95aec23781f0a597344697ce49
[ "MIT" ]
null
null
null
gui.py
AhmadMehrbodTalkdesk/image-caption-generator-using-deep-learning
46aace56c0b06f95aec23781f0a597344697ce49
[ "MIT" ]
null
null
null
gui.py
AhmadMehrbodTalkdesk/image-caption-generator-using-deep-learning
46aace56c0b06f95aec23781f0a597344697ce49
[ "MIT" ]
1
2021-11-16T22:57:37.000Z
2021-11-16T22:57:37.000Z
import tkinter as tk from tkinter import filedialog from tkinter import * from PIL import ImageTk, Image import numpy as np import cv2 #load the trained model to classify sign from tensorflow.keras.models import load_model from tensorflow.keras.preprocessing.sequence import pad_sequences from tensorflow.keras.models i...
33.559748
93
0.658358
13ef24de74f15434f3df5b19b7d40d3a16863dc7
24,047
py
Python
neorpc/Client.py
CityOfZion/neo-python-rpc
89d22c4043654b2941bf26b15a1c09082901d9ef
[ "MIT" ]
27
2017-11-12T17:22:34.000Z
2021-12-02T10:27:18.000Z
neorpc/Client.py
CityOfZion/neo-python-rpc
89d22c4043654b2941bf26b15a1c09082901d9ef
[ "MIT" ]
19
2017-11-13T22:00:36.000Z
2019-10-25T23:49:19.000Z
neorpc/Client.py
CityOfZion/neo-python-rpc
89d22c4043654b2941bf26b15a1c09082901d9ef
[ "MIT" ]
19
2017-11-13T20:03:21.000Z
2019-02-14T05:37:04.000Z
from neorpc.Settings import settings as rpc_settings import requests import binascii class NEORPCException(Exception): pass class RPCClient(): id_counter = 0 _settings = rpc_settings _addr_list = None @property def endpoints(self): return self._addr_list @property def def...
41.531952
225
0.648314
1acae55751881e50f62b033a89801b0871fcb25f
630
py
Python
check_db_connection.py
benavir/python_training
3e4019335e993bab9d6610005489d2ff14a3d515
[ "Apache-2.0" ]
null
null
null
check_db_connection.py
benavir/python_training
3e4019335e993bab9d6610005489d2ff14a3d515
[ "Apache-2.0" ]
null
null
null
check_db_connection.py
benavir/python_training
3e4019335e993bab9d6610005489d2ff14a3d515
[ "Apache-2.0" ]
null
null
null
# import pymysql.cursors from fixture.orm import ORMFixture from model.group import Group # connection = pymysql.connect(host="127.0.0.1", database="addressbook", user="root", password="") db = ORMFixture(host="127.0.0.1", name="addressbook", user="root", password="") try: # groups = db.get_group_list() l = d...
26.25
98
0.644444
2ad45f282d1c01238e7ec88b1c2e25b1a3ad437c
811
py
Python
tests/gradient_test.py
Tahlor/pytorch-mdn
7737a9c512d06c9a2e192b2c745be1cfe5d6ce3f
[ "MIT" ]
168
2018-04-19T12:49:57.000Z
2022-03-16T03:18:56.000Z
tests/gradient_test.py
Tahlor/pytorch-mdn
7737a9c512d06c9a2e192b2c745be1cfe5d6ce3f
[ "MIT" ]
7
2018-12-16T14:37:32.000Z
2021-11-26T07:21:02.000Z
tests/gradient_test.py
Tahlor/pytorch-mdn
7737a9c512d06c9a2e192b2c745be1cfe5d6ce3f
[ "MIT" ]
46
2018-05-22T21:21:11.000Z
2022-01-19T03:11:17.000Z
import unittest import torch import torch.nn as nn import torch.optim as optim from mdn import mdn class BackpropDecreasesLossMDN(unittest.TestCase): def testLossDecreases(self): model = nn.Sequential( nn.Linear(1, 5), nn.Tanh(), mdn.MDN(5, 1, 2) ) torc...
26.16129
67
0.565968
60f0ab0a915ea2cabe65fd9893aa85a16595d3bd
15,869
py
Python
apperance_patch_generator.py
nabulago/anomalous-event-detection
960f5f15f6f9be3103dfb2ca7e867b79cc8ce0bc
[ "MIT" ]
50
2018-02-25T06:23:09.000Z
2022-03-16T07:09:53.000Z
apperance_patch_generator.py
Tiacy/anomaly-event-detection
960f5f15f6f9be3103dfb2ca7e867b79cc8ce0bc
[ "MIT" ]
3
2018-01-12T12:12:05.000Z
2019-10-02T10:48:10.000Z
apperance_patch_generator.py
Tiacy/anomaly-event-detection
960f5f15f6f9be3103dfb2ca7e867b79cc8ce0bc
[ "MIT" ]
25
2018-01-31T12:30:11.000Z
2021-09-03T19:19:06.000Z
## # To run from console # python appearance_path_generator.py -p /UCSD_Anomaly_Dataset.v1p2/UCSDped1/Train -dd Project/data # or # python --path /home/hduser/Desktop/Project/UCSD_Anomaly_Dataset.v1p2/UCSDped1/Train --datadst /home/hduser/Desktop # of if you are using the pycharm provide script arguments # in the ide ...
47.942598
324
0.523032
085b86c88b98a478b3fb5f2dc7047e6e88c53fb6
2,684
py
Python
setup.py
SWxTREC/pymsis
cc4390fbdb65737a80cad15445c5a37ae24750f7
[ "MIT" ]
3
2020-10-30T21:59:03.000Z
2022-02-02T18:09:04.000Z
setup.py
SWxTREC/pymsis
cc4390fbdb65737a80cad15445c5a37ae24750f7
[ "MIT" ]
null
null
null
setup.py
SWxTREC/pymsis
cc4390fbdb65737a80cad15445c5a37ae24750f7
[ "MIT" ]
null
null
null
#!/usr/bin/env python """The setup script.""" import os import sys from numpy.distutils.core import Extension, setup # Some system's don't include the local directory on the # base Python path for some reason, so add it in directly sys.path.insert(0, os.getcwd()) from pymsis import __version__ from tools.download_sou...
36.767123
78
0.65462
594f29c2139b52846bdaf14a43dc14ff6d309a53
4,947
py
Python
opts.py
dongxinshuai/RIFT-NeurIPS2021
633ba92d6951432e03956f942c53cacf575e15c9
[ "MIT" ]
7
2021-12-04T15:33:21.000Z
2022-03-06T02:50:30.000Z
opts.py
dongxinshuai/RIFT-NeurIPS2021
633ba92d6951432e03956f942c53cacf575e15c9
[ "MIT" ]
1
2021-12-28T15:35:05.000Z
2022-03-06T02:53:32.000Z
opts.py
dongxinshuai/RIFT-NeurIPS2021
633ba92d6951432e03956f942c53cacf575e15c9
[ "MIT" ]
null
null
null
import argparse, os, re import configparser import sys def parse_opt(): parser = argparse.ArgumentParser() # Data input settings parser.add_argument('--dataset', type=str, default="imdb", help='dataset') # snli parser.add_argument('--torch_seed', type=float, default=0, help='') parser.add_argumen...
54.966667
133
0.683647
a604bb5605fc29e953841926ca231af386caedb6
15,382
py
Python
apilogs/core.py
rpgreen/apilogs
fab4325e7de0786f7f9691cb9f4e3518568fcb1c
[ "BSD-3-Clause" ]
233
2016-09-07T19:08:23.000Z
2022-03-03T14:46:50.000Z
apilogs/core.py
bsrammca/apilogs
fab4325e7de0786f7f9691cb9f4e3518568fcb1c
[ "BSD-3-Clause" ]
8
2016-09-07T20:01:50.000Z
2019-11-13T18:51:36.000Z
apilogs/core.py
bsrammca/apilogs
fab4325e7de0786f7f9691cb9f4e3518568fcb1c
[ "BSD-3-Clause" ]
21
2016-09-28T15:58:02.000Z
2022-01-20T11:25:00.000Z
import logging import re import sys import os import time from threading import Thread, Event from datetime import datetime, timedelta from collections import deque try: from Queue import Queue except ImportError: from queue import Queue import boto3 from botocore.compat import total_seconds from termcolor im...
39.139949
135
0.548563
a3b70a90a0bf981f7268a8bac7d1b09384555086
321
py
Python
vowels.py
datwheat/hsCode
880425c86f043c72ee3eb5bd4d8ca715f61b773d
[ "MIT" ]
1
2017-10-04T17:55:02.000Z
2017-10-04T17:55:02.000Z
vowels.py
datwheat/hsCode
880425c86f043c72ee3eb5bd4d8ca715f61b773d
[ "MIT" ]
null
null
null
vowels.py
datwheat/hsCode
880425c86f043c72ee3eb5bd4d8ca715f61b773d
[ "MIT" ]
null
null
null
# Write a function that takes a string input and # tells the user how many vowels are in the string. def vowels_in(string): "Returns the number of vowels in the provided string as an integer" vowels = list('aeiou') vowel_count = 0 for char in string: if char in vowels: vowel_count += 1 return vowel_count ...
21.4
68
0.728972
ed2f6b973dd039111e7afa146d88b37d54802ce3
1,406
py
Python
misc/demo_external_func.py
JYLeeLYJ/taichi
c4c057ff68ca0fd0ce68cba665c1f65c95a08cdc
[ "MIT" ]
2
2020-10-22T14:57:47.000Z
2020-10-24T07:30:47.000Z
misc/demo_external_func.py
SingleFYD/taichi
cdff76dd529e7c1a41b219b44712f0ab0584277a
[ "MIT" ]
3
2020-08-24T09:07:15.000Z
2020-08-24T09:18:29.000Z
misc/demo_external_func.py
SingleFYD/taichi
cdff76dd529e7c1a41b219b44712f0ab0584277a
[ "MIT" ]
1
2020-09-29T17:56:48.000Z
2020-09-29T17:56:48.000Z
import taichi as ti import os import ctypes ti.init() N = 1024 x = ti.field(ti.i32, shape=N) y = ti.field(ti.i32, shape=N) z = ti.field(ti.i32, shape=N) source = ''' extern "C" { void add_and_mul(float a, float b, float *c, float *d, int *e) { *c = a + b; *d = a * b; *e = int(a * b + a); ...
18.25974
79
0.516358
209628b78745d56bcefa49b9b245a4d81a9bb5ed
3,273
py
Python
tensorcv/train/simple.py
lwj2018/C3D-tensorflow
9ea64d13e784f5700e6bacbb1f809dd5931594d2
[ "MIT" ]
2
2017-09-15T19:13:43.000Z
2017-09-15T19:13:45.000Z
tensorcv/train/simple.py
lwj2018/C3D-tensorflow
9ea64d13e784f5700e6bacbb1f809dd5931594d2
[ "MIT" ]
null
null
null
tensorcv/train/simple.py
lwj2018/C3D-tensorflow
9ea64d13e784f5700e6bacbb1f809dd5931594d2
[ "MIT" ]
null
null
null
from abc import abstractmethod import tensorflow as tf from .config import TrainConfig, GANTrainConfig from .base import Trainer from ..callbacks.inputs import FeedInput from ..callbacks.group import Callbacks from ..callbacks.hooks import Callback2Hook from ..models.base import BaseModel, GANBaseModel from...
33.397959
79
0.644363
9c6e50bb2a6b61edb840dd1fd458c21ec4eadc02
288
py
Python
p044.py
scottwillmoore/project-euler
e8b24a72d88fc30e8ab701e2f56622c363600ea4
[ "MIT" ]
1
2018-07-09T09:19:58.000Z
2018-07-09T09:19:58.000Z
p044.py
scottwillmoore/project-euler
e8b24a72d88fc30e8ab701e2f56622c363600ea4
[ "MIT" ]
null
null
null
p044.py
scottwillmoore/project-euler
e8b24a72d88fc30e8ab701e2f56622c363600ea4
[ "MIT" ]
null
null
null
from math import sqrt is_pentagonal = lambda x: sqrt(24 * x + 1) % 6 == 5 s = 5000 for j in range(1, s): pj = j * (3 * j - 1) // 2 for k in range(j, s): pk = k * (3 * k - 1) // 2 if is_pentagonal(pj + pk) and is_pentagonal(pk - pj): print(pk - pj)
20.571429
61
0.489583
1848b6a6e7450621893105f55553421bc45d35c5
2,650
py
Python
mxp/tests.py
IMTMarburg/mxp
e51dc4b6702da4b3807f5f0550212a9377ab0cf9
[ "MIT" ]
null
null
null
mxp/tests.py
IMTMarburg/mxp
e51dc4b6702da4b3807f5f0550212a9377ab0cf9
[ "MIT" ]
null
null
null
mxp/tests.py
IMTMarburg/mxp
e51dc4b6702da4b3807f5f0550212a9377ab0cf9
[ "MIT" ]
null
null
null
import unittest from __init__ import * def read_exported_data(instrument_export_filename, text_export_filename): well_name_lookup = {} text_report_count = 0 df = pd.read_csv(text_export_filename, sep="\t",low_memory=False) df.columns = [x.strip() for x in df.columns] for ii, row in df.iterrows(): ...
37.857143
110
0.639623
bffe72f78e7797dcb231ef0501760e6fbdba17ba
2,247
py
Python
Dynamic Programming/1395. Count Number of Teams.py
beckswu/Leetcode
480e8dc276b1f65961166d66efa5497d7ff0bdfd
[ "MIT" ]
138
2020-02-08T05:25:26.000Z
2021-11-04T11:59:28.000Z
Dynamic Programming/1395. Count Number of Teams.py
beckswu/Leetcode
480e8dc276b1f65961166d66efa5497d7ff0bdfd
[ "MIT" ]
null
null
null
Dynamic Programming/1395. Count Number of Teams.py
beckswu/Leetcode
480e8dc276b1f65961166d66efa5497d7ff0bdfd
[ "MIT" ]
24
2021-01-02T07:18:43.000Z
2022-03-20T08:17:54.000Z
class Solution: def numTeams(self, rating: List[int]) -> int: after = collections.Counter(rating) before = collections.defaultdict(int) res = 0 for i in rating: after_large, after_small = 0, 0 before_large, before_small = 0, 0 for k, v in after.it...
33.044118
84
0.461504
fcc705e362d63778f569c31b79438fa5b1a72c4c
7,689
py
Python
PyTorch/loss.py
Jarvis73/LDA
6585c2b225da11412297b064dc625c9dbf7372d7
[ "MIT" ]
5
2020-09-10T12:40:41.000Z
2022-02-04T09:22:02.000Z
PyTorch/loss.py
Jarvis73/LDA
6585c2b225da11412297b064dc625c9dbf7372d7
[ "MIT" ]
null
null
null
PyTorch/loss.py
Jarvis73/LDA
6585c2b225da11412297b064dc625c9dbf7372d7
[ "MIT" ]
null
null
null
import torch import torch.nn as nn import scipy.linalg as slinalg class EigValsH(torch.autograd.Function): """ Solving the generalized eigenvalue problem A x = lambda B x Gradients of this function is customized. Parameters ---------- A: Tensor Left-side matrix with shape [D, D] B: T...
36.614286
117
0.553128
a16a3d2094c11fba7c3e8889f6bb7e96c41243f7
3,540
py
Python
nova/scheduler/filters/disk_filter.py
vmthunder/nova
baf05caab705c5778348d9f275dc541747b7c2de
[ "Apache-2.0" ]
1
2015-11-25T10:18:22.000Z
2015-11-25T10:18:22.000Z
nova/scheduler/filters/disk_filter.py
vmthunder/nova
baf05caab705c5778348d9f275dc541747b7c2de
[ "Apache-2.0" ]
9
2015-05-20T11:20:17.000Z
2017-07-27T08:21:33.000Z
nova/scheduler/filters/disk_filter.py
vmthunder/nova
baf05caab705c5778348d9f275dc541747b7c2de
[ "Apache-2.0" ]
13
2015-05-05T09:34:04.000Z
2017-11-08T02:03:46.000Z
# Copyright (c) 2012 OpenStack Foundation # 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 ...
38.901099
79
0.678249
3053cf05915fe1498ea29102ae11ea755473d6bd
3,426
py
Python
aerp/database/utils/userDataValidity.py
awesome-erp/flask-be
cd0706f6ec2ac06afb1881d747a2ddebe1126241
[ "Apache-2.0" ]
null
null
null
aerp/database/utils/userDataValidity.py
awesome-erp/flask-be
cd0706f6ec2ac06afb1881d747a2ddebe1126241
[ "Apache-2.0" ]
1
2021-01-14T03:01:28.000Z
2021-01-22T11:04:03.000Z
aerp/database/utils/userDataValidity.py
awesome-erp/flask-be
cd0706f6ec2ac06afb1881d747a2ddebe1126241
[ "Apache-2.0" ]
null
null
null
from typing import Dict, Any, Tuple from datetime import datetime import re def checkName(name: str) -> bool: """ Checks if a string is a valid name Only spaces and alphabets allowed Parameters ---------- name: str The name to be Tested Returns ------- bool True/F...
22.993289
102
0.55575
2725f77f0c0ff9610a564e8775d05eb6d80a418f
5,440
py
Python
tests/test_frame.py
VinayaSathyanarayana/maro
0ba55f36d89c235ef3af04efbac78b3885d8695d
[ "MIT" ]
1
2020-09-30T09:31:05.000Z
2020-09-30T09:31:05.000Z
tests/test_frame.py
VinayaSathyanarayana/maro
0ba55f36d89c235ef3af04efbac78b3885d8695d
[ "MIT" ]
null
null
null
tests/test_frame.py
VinayaSathyanarayana/maro
0ba55f36d89c235ef3af04efbac78b3885d8695d
[ "MIT" ]
null
null
null
# Copyright (c) Microsoft Corporation. # Licensed under the MIT license. import unittest from maro.backends.frame import node, NodeBase, NodeAttribute, FrameNode, FrameBase from maro.utils.exception.backends_exception import ( BackendsGetItemInvalidException, BackendsSetItemInvalidException, BackendsArr...
33.170732
129
0.655699
5a088991eb9922d96e68d8b2332922992cf2480d
5,661
py
Python
src/v5.3/enrollment/swagger_client/models/student_student_education_organization_association_student_education_organization_association_race.py
xmarcosx/edfi-notebook
0564ebdf1d0f45a9d25056e7e61369f0a837534d
[ "Apache-2.0" ]
2
2021-04-27T17:18:17.000Z
2021-04-27T19:14:39.000Z
src/v5.3/enrollment/swagger_client/models/student_student_education_organization_association_student_education_organization_association_race.py
xmarcosx/edfi-notebook
0564ebdf1d0f45a9d25056e7e61369f0a837534d
[ "Apache-2.0" ]
null
null
null
src/v5.3/enrollment/swagger_client/models/student_student_education_organization_association_student_education_organization_association_race.py
xmarcosx/edfi-notebook
0564ebdf1d0f45a9d25056e7e61369f0a837534d
[ "Apache-2.0" ]
1
2022-01-06T09:43:11.000Z
2022-01-06T09:43:11.000Z
# coding: utf-8 """ Ed-Fi Operational Data Store API The Ed-Fi ODS / API enables applications to read and write education data stored in an Ed-Fi ODS through a secure REST interface. *** > *Note: Consumers of ODS / API information should sanitize all data for display and storage. The ODS / API provides reas...
43.546154
482
0.682565
fe18d3667f624f00eae5f67d679e4ea4d5c2b496
1,068
py
Python
api/views.py
meteosangue/meteosangue
dc5fb27cfd9060b909907a0c68066dc2f3ca1bd3
[ "MIT" ]
6
2016-09-23T08:41:36.000Z
2021-12-13T21:03:43.000Z
api/views.py
meteosangue/meteosangue
dc5fb27cfd9060b909907a0c68066dc2f3ca1bd3
[ "MIT" ]
17
2016-10-15T18:36:19.000Z
2022-03-11T23:15:57.000Z
api/views.py
meteosangue/meteosangue
dc5fb27cfd9060b909907a0c68066dc2f3ca1bd3
[ "MIT" ]
3
2016-09-23T08:41:37.000Z
2020-02-01T03:52:16.000Z
from .serializers import BloodGroupSerializer from core.models import BloodGroup from rest_framework import viewsets from rest_framework.response import Response BLOODS_DOES_NOT_EXIST = "Empty database, sorry" BLOOD_DOES_NOT_EXIST = "This Blood Group does not exist" class BloodGroupViewSet(viewsets.ViewSet): d...
35.6
76
0.708801
ad345fda7e7a792479236e593f329d3f8f0e75b7
19
py
Python
utils/XeThru_utils/xeX4Thru_software/ModuleConnector/ModuleConnector-osx-1/python37-x86_64-apple-darwin/pymoduleconnector/version.py
ApocalyVec/mGesf
21e0bf37a9d11a3cdde86a8d54e2f6c6a2211ab5
[ "MIT" ]
18
2020-06-02T11:21:47.000Z
2022-03-25T08:16:57.000Z
utils/XeThru_utils/xeX4Thru_software/ModuleConnector/ModuleConnector-osx-1/python37-x86_64-apple-darwin/pymoduleconnector/version.py
ApocalyVec/mGesf
21e0bf37a9d11a3cdde86a8d54e2f6c6a2211ab5
[ "MIT" ]
4
2020-06-20T13:53:44.000Z
2021-09-11T22:58:21.000Z
utils/XeThru_utils/xeX4Thru_software/ModuleConnector/ModuleConnector-osx-1/python27-x86_64-apple-darwin/pymoduleconnector/version.py
ApocalyVec/mGesf
21e0bf37a9d11a3cdde86a8d54e2f6c6a2211ab5
[ "MIT" ]
6
2020-04-23T21:30:17.000Z
2021-08-03T19:59:12.000Z
version = '1.6.3'
6.333333
17
0.526316
fee72e4a28e5fe3a5f7c738ad918258455de2c08
8,854
py
Python
doc/conf.py
antoinediez/monaco
613e4d792523e7ec0d8e0dca7934b5b5f0b1fa24
[ "MIT" ]
1
2021-03-11T00:54:56.000Z
2021-03-11T00:54:56.000Z
doc/conf.py
antoinediez/monaco
613e4d792523e7ec0d8e0dca7934b5b5f0b1fa24
[ "MIT" ]
null
null
null
doc/conf.py
antoinediez/monaco
613e4d792523e7ec0d8e0dca7934b5b5f0b1fa24
[ "MIT" ]
1
2021-10-04T15:18:06.000Z
2021-10-04T15:18:06.000Z
#!/usr/bin/env python3 # -*- coding: utf-8 -*- # # This file is execfile()d with the current directory set to its # containing dir. # # Note that not all possible configuration values are present in this # autogenerated file. # # All configuration values have a default; values that are commented out # serve to show the...
30.115646
79
0.681387
75b5554491855c57251c198264702364ca4584bd
4,069
py
Python
openGaussBase/testcase/GUC/ERRORLOG/Opengauss_Function_Guc_ErrorLog_Case0033.py
opengauss-mirror/Yat
aef107a8304b94e5d99b4f1f36eb46755eb8919e
[ "MulanPSL-1.0" ]
null
null
null
openGaussBase/testcase/GUC/ERRORLOG/Opengauss_Function_Guc_ErrorLog_Case0033.py
opengauss-mirror/Yat
aef107a8304b94e5d99b4f1f36eb46755eb8919e
[ "MulanPSL-1.0" ]
null
null
null
openGaussBase/testcase/GUC/ERRORLOG/Opengauss_Function_Guc_ErrorLog_Case0033.py
opengauss-mirror/Yat
aef107a8304b94e5d99b4f1f36eb46755eb8919e
[ "MulanPSL-1.0" ]
null
null
null
""" Copyright (c) 2022 Huawei Technologies Co.,Ltd. openGauss is licensed under Mulan PSL v2. You can use this software according to the terms and conditions of the Mulan PSL v2. You may obtain a copy of Mulan PSL v2 at: http://license.coscl.org.cn/MulanPSL2 THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, W...
42.385417
84
0.629884
043dc66efc9499f8a476e06eb7bca7363feef2da
7,516
py
Python
code/reasoningtool/kg-construction/BuildMasterKG.py
andrewsu/RTX
dd1de262d0817f7e6d2f64e5bec7d5009a3a2740
[ "MIT" ]
31
2018-03-05T20:01:10.000Z
2022-02-01T03:31:22.000Z
code/reasoningtool/kg-construction/BuildMasterKG.py
andrewsu/RTX
dd1de262d0817f7e6d2f64e5bec7d5009a3a2740
[ "MIT" ]
1,774
2018-03-06T01:55:03.000Z
2022-03-31T03:09:04.000Z
code/reasoningtool/kg-construction/BuildMasterKG.py
andrewsu/RTX
dd1de262d0817f7e6d2f64e5bec7d5009a3a2740
[ "MIT" ]
19
2018-05-10T00:43:19.000Z
2022-03-08T19:26:16.000Z
'''Builds a master knowledge graph and pushes it to Neo4j. Uses BioNetExpander and Orangeboard. Usage: sh run_build_master_kg.sh ''' __author__ = 'Stephen Ramsey' __copyright__ = 'Oregon State University' __credits__ = ['Stephen Ramsey', 'Yao Yao', 'Zheng Liu'] __license__ = 'MIT' __version__ = '0.1.0' __maintai...
41.988827
126
0.614023
e9a41b58e1210eed67b3384c87c307d870441d8c
20,423
py
Python
tests/unit/bokeh/document/test_events__document.py
samwill/bokeh
228132eba4b696b91b2a77f7e9d07771ba868093
[ "BSD-3-Clause" ]
1
2021-05-03T15:19:05.000Z
2021-05-03T15:19:05.000Z
tests/unit/bokeh/document/test_events__document.py
samwill/bokeh
228132eba4b696b91b2a77f7e9d07771ba868093
[ "BSD-3-Clause" ]
3
2021-09-08T03:16:42.000Z
2022-03-12T00:57:18.000Z
tests/unit/bokeh/document/test_events__document.py
samwill/bokeh
228132eba4b696b91b2a77f7e9d07771ba868093
[ "BSD-3-Clause" ]
2
2021-01-12T18:22:24.000Z
2021-10-30T00:32:02.000Z
#----------------------------------------------------------------------------- # Copyright (c) 2012 - 2020, Anaconda, Inc., and Bokeh Contributors. # All rights reserved. # # The full license is in the file LICENSE.txt, distributed with this software. #-------------------------------------------------------------------...
39.733463
137
0.553004
c204b41dbc06dee0bee569e9c43c1ba4ad93dc92
603
py
Python
post/forms.py
mishellscripts/Dots
a8438da63d955c9f4d383deab46f422280f0862c
[ "Apache-2.0" ]
null
null
null
post/forms.py
mishellscripts/Dots
a8438da63d955c9f4d383deab46f422280f0862c
[ "Apache-2.0" ]
null
null
null
post/forms.py
mishellscripts/Dots
a8438da63d955c9f4d383deab46f422280f0862c
[ "Apache-2.0" ]
null
null
null
from django import forms from . import models class PostForm(forms.ModelForm): text = forms.CharField(widget=forms.Textarea #(attrs={'style': 'font-size: 1.5em'}), ,label='', ) text.widget.attrs.update({'class': 'form_input...
25.125
71
0.510779
2eb7716c2c9269fe361603bddfbac2c620bc5c8d
36,791
py
Python
sdk/monitor/azure-monitor-opentelemetry-exporter/azure/monitor/opentelemetry/exporter/_generated/models/_models.py
rsdoherty/azure-sdk-for-python
6bba5326677468e6660845a703686327178bb7b1
[ "MIT" ]
2,728
2015-01-09T10:19:32.000Z
2022-03-31T14:50:33.000Z
sdk/monitor/azure-monitor-opentelemetry-exporter/azure/monitor/opentelemetry/exporter/_generated/models/_models.py
rsdoherty/azure-sdk-for-python
6bba5326677468e6660845a703686327178bb7b1
[ "MIT" ]
17,773
2015-01-05T15:57:17.000Z
2022-03-31T23:50:25.000Z
sdk/monitor/azure-monitor-opentelemetry-exporter/azure/monitor/opentelemetry/exporter/_generated/models/_models.py
rsdoherty/azure-sdk-for-python
6bba5326677468e6660845a703686327178bb7b1
[ "MIT" ]
1,916
2015-01-19T05:05:41.000Z
2022-03-31T19:36:44.000Z
# coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may ...
41.199328
226
0.635291
32887796ac8431711bd298d5bc702bcbbd129ddd
15,270
py
Python
SCons/Utilities/sconsign.py
ravenAtSafe/scons
ebe6e9b1b2fedbe3dd44c07aa2b6739d4079879e
[ "MIT" ]
null
null
null
SCons/Utilities/sconsign.py
ravenAtSafe/scons
ebe6e9b1b2fedbe3dd44c07aa2b6739d4079879e
[ "MIT" ]
1
2020-11-09T00:19:51.000Z
2020-11-09T00:19:51.000Z
SCons/Utilities/sconsign.py
ravenAtSafe/scons
ebe6e9b1b2fedbe3dd44c07aa2b6739d4079879e
[ "MIT" ]
null
null
null
#! /usr/bin/env python # # SCons - a Software Constructor # # MIT License # # Copyright The SCons Foundation # # Permission is hereby granted, free of charge, to any person obtaining # a copy of this software and associated documentation files (the # "Software"), to deal in the Software without restriction, including #...
30.848485
88
0.527832
70f2b52bdbd9eb627540bb9306ae60357f0656b8
1,032
py
Python
Image_Sudoko_Solver/knntry.py
gsGupta11/Sudoku-Solver
b08c5da8f38e915bc3fa5869b5815ec3b3f7e47b
[ "MIT" ]
null
null
null
Image_Sudoko_Solver/knntry.py
gsGupta11/Sudoku-Solver
b08c5da8f38e915bc3fa5869b5815ec3b3f7e47b
[ "MIT" ]
null
null
null
Image_Sudoko_Solver/knntry.py
gsGupta11/Sudoku-Solver
b08c5da8f38e915bc3fa5869b5815ec3b3f7e47b
[ "MIT" ]
1
2021-07-31T10:39:43.000Z
2021-07-31T10:39:43.000Z
import imagesplitting import pickle import cv2 import matplotlib.pyplot as plt import numpy as np model_pickle = open("../knn.model", 'rb') model = pickle.load(model_pickle) model_pickle.close() image = cv2.imread("./testimages/test5.png", 1) toidentifyarr, matrixdic,colorcelldict = imagesplitting.splitFunc(image) f...
30.352941
72
0.66376
3d50292c87e64f90f147d2952e8f08ab1959ced8
5,454
py
Python
hubspot/crm/extensions/cards/models/card_patch_request.py
Ronfer/hubspot-api-python
1c87274ecbba4aa3c7728f890ccc6e77b2b6d2e4
[ "Apache-2.0" ]
117
2020-04-06T08:22:53.000Z
2022-03-18T03:41:29.000Z
hubspot/crm/extensions/cards/models/card_patch_request.py
Ronfer/hubspot-api-python
1c87274ecbba4aa3c7728f890ccc6e77b2b6d2e4
[ "Apache-2.0" ]
62
2020-04-06T16:21:06.000Z
2022-03-17T16:50:44.000Z
hubspot/crm/extensions/cards/models/card_patch_request.py
Ronfer/hubspot-api-python
1c87274ecbba4aa3c7728f890ccc6e77b2b6d2e4
[ "Apache-2.0" ]
45
2020-04-06T16:13:52.000Z
2022-03-30T21:33:17.000Z
# coding: utf-8 """ CRM cards Allows an app to extend the CRM UI by surfacing custom cards in the sidebar of record pages. These cards are defined up-front as part of app configuration, then populated by external data fetch requests when the record page is accessed by a user. # noqa: E501 The version of...
29.641304
264
0.609278
7bf93dc7bb4ce8fd1af226e0a66f1c6229d3ebe4
5,989
py
Python
bodymocap/models/hmr.py
jinfagang/frankmocap
07e9d15a0061c7ea535646db5a9ce1cd87fd4691
[ "BSD-3-Clause" ]
null
null
null
bodymocap/models/hmr.py
jinfagang/frankmocap
07e9d15a0061c7ea535646db5a9ce1cd87fd4691
[ "BSD-3-Clause" ]
null
null
null
bodymocap/models/hmr.py
jinfagang/frankmocap
07e9d15a0061c7ea535646db5a9ce1cd87fd4691
[ "BSD-3-Clause" ]
null
null
null
# Original code from SPIN: https://github.com/nkolot/SPIN import torch import torch.nn as nn import torchvision.models.resnet as resnet import numpy as np import math import sys from bodymocap.utils.geometry import rot6d_to_rotmat class Bottleneck(nn.Module): """ Redefinition of Bottleneck residual block ...
35.64881
93
0.60344
b839c94315481fa671f3053137555fa27d4cc3fa
22,090
py
Python
sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2020_06_01/aio/operations/_ssh_public_keys_operations.py
dubiety/azure-sdk-for-python
62ffa839f5d753594cf0fe63668f454a9d87a346
[ "MIT" ]
1
2022-02-01T18:50:12.000Z
2022-02-01T18:50:12.000Z
sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2020_06_01/aio/operations/_ssh_public_keys_operations.py
ellhe-blaster/azure-sdk-for-python
82193ba5e81cc5e5e5a5239bba58abe62e86f469
[ "MIT" ]
null
null
null
sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2020_06_01/aio/operations/_ssh_public_keys_operations.py
ellhe-blaster/azure-sdk-for-python
82193ba5e81cc5e5e5a5239bba58abe62e86f469
[ "MIT" ]
null
null
null
# pylint: disable=too-many-lines # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. # Code generated by Microsoft (R) AutoRe...
43.656126
244
0.666048
99aa906d07bbc78b7d6f945b2e7315aff711ec47
240
py
Python
models/group_member.py
Bookmark-Novels/Asgard
423fbcb26d31d8a080527091c82cacb0c94f5042
[ "MIT" ]
null
null
null
models/group_member.py
Bookmark-Novels/Asgard
423fbcb26d31d8a080527091c82cacb0c94f5042
[ "MIT" ]
72
2016-10-01T04:11:27.000Z
2017-01-21T09:14:47.000Z
models/group_member.py
Bookmark-Novels/Asgard
423fbcb26d31d8a080527091c82cacb0c94f5042
[ "MIT" ]
null
null
null
from sqlalchemy import Column, Integer from db import Model class GroupMember(Model): __tablename__ = 'bookmark_group_members' id = Column(Integer, primary_key=True) account_id = Column(Integer) group_id = Column(Integer)
24
44
0.75
d6a3c2941843573f73aee4755ac05f3bc7cfd1a7
4,408
py
Python
src/ds4_driver/controller.py
gabrielsan/ds4_driver
31253666fe0c565005f138fd2769d90e49efc56b
[ "MIT" ]
57
2019-09-25T07:22:25.000Z
2022-03-07T11:08:38.000Z
src/ds4_driver/controller.py
gabrielsan/ds4_driver
31253666fe0c565005f138fd2769d90e49efc56b
[ "MIT" ]
24
2019-12-09T12:57:49.000Z
2022-03-04T03:23:31.000Z
src/ds4_driver/controller.py
gabrielsan/ds4_driver
31253666fe0c565005f138fd2769d90e49efc56b
[ "MIT" ]
29
2019-12-10T15:58:20.000Z
2022-02-21T05:39:03.000Z
import ds4drv from ds4drv.eventloop import EventLoop from threading import Thread from distutils.version import StrictVersion # Based on DS4Controller class in __main__.py of ds4drv class Controller(Thread): # Reference: https://www.psdevwiki.com/ps4/DualShock_4#Specifications MAX_VOLTAGE = 3.65 # Refere...
31.262411
83
0.53902
d5e78c848cd990067d8b2709c3a8b4866fd67a6e
25,763
py
Python
tools/RAiDER/models/weatherModel.py
18pattonj/RAiDER
40a0ae0f840ea08b881e7e4fbe4204333e05b637
[ "Apache-2.0" ]
null
null
null
tools/RAiDER/models/weatherModel.py
18pattonj/RAiDER
40a0ae0f840ea08b881e7e4fbe4204333e05b637
[ "Apache-2.0" ]
null
null
null
tools/RAiDER/models/weatherModel.py
18pattonj/RAiDER
40a0ae0f840ea08b881e7e4fbe4204333e05b637
[ "Apache-2.0" ]
null
null
null
import datetime import logging import os from abc import ABC, abstractmethod import h5py import numpy as np from pyproj import CRS, Transformer from RAiDER import constants as const from RAiDER import utilFcns as util from RAiDER.constants import Zenith from RAiDER.delayFcns import _integrateLOS, interpolate2, make_i...
39.574501
130
0.58487
976d21570bac17137c25b7149ee72421c2c9c605
12,663
py
Python
flare/gp.py
YuuuuXie/Stanene_FLARE
b6678927dd7fe3b6e6dc405a5f27d1a3339782eb
[ "MIT" ]
null
null
null
flare/gp.py
YuuuuXie/Stanene_FLARE
b6678927dd7fe3b6e6dc405a5f27d1a3339782eb
[ "MIT" ]
null
null
null
flare/gp.py
YuuuuXie/Stanene_FLARE
b6678927dd7fe3b6e6dc405a5f27d1a3339782eb
[ "MIT" ]
null
null
null
import math import numpy as np from scipy.linalg import solve_triangular from scipy.optimize import minimize from typing import List, Callable from flare.env import AtomicEnvironment from flare.struc import Structure from flare.gp_algebra import get_ky_mat, get_ky_and_hyp, get_like_from_ky_mat,\ get_like_gr...
38.141566
80
0.532733
f49a48b1076f3e8e52218ee12c501e6df5b8a4bc
12,768
py
Python
sdk/storage/azure-mgmt-storage/azure/mgmt/storage/v2019_06_01/aio/operations/_management_policies_operations.py
vbarbaresi/azure-sdk-for-python
397ba46c51d001ff89c66b170f5576cf8f49c05f
[ "MIT" ]
8
2021-01-13T23:44:08.000Z
2021-03-17T10:13:36.000Z
sdk/storage/azure-mgmt-storage/azure/mgmt/storage/v2019_06_01/aio/operations/_management_policies_operations.py
vbarbaresi/azure-sdk-for-python
397ba46c51d001ff89c66b170f5576cf8f49c05f
[ "MIT" ]
2
2021-11-03T06:10:36.000Z
2021-12-01T06:29:39.000Z
sdk/storage/azure-mgmt-storage/azure/mgmt/storage/v2019_06_01/aio/operations/_management_policies_operations.py
vbarbaresi/azure-sdk-for-python
397ba46c51d001ff89c66b170f5576cf8f49c05f
[ "MIT" ]
1
2021-05-19T02:55:10.000Z
2021-05-19T02:55:10.000Z
# coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may ...
52.54321
225
0.689615
057ca7f099a40d0ec07c12abe92c57e9cc38b59d
23
py
Python
atomity/__init__.py
AtomScott/atomity
a4d4e6b3390a6c79eb7a13535cea92af06dea168
[ "MIT" ]
null
null
null
atomity/__init__.py
AtomScott/atomity
a4d4e6b3390a6c79eb7a13535cea92af06dea168
[ "MIT" ]
null
null
null
atomity/__init__.py
AtomScott/atomity
a4d4e6b3390a6c79eb7a13535cea92af06dea168
[ "MIT" ]
null
null
null
from .atomity import *
11.5
22
0.73913
c764265107dcaca92e86b1957852485a75a9657c
52,418
bzl
Python
tools/build_variables.bzl
zhaoruic-intel/pytorch
db11619901e1bd941042af4c49c6e9da7b0d206d
[ "Intel" ]
null
null
null
tools/build_variables.bzl
zhaoruic-intel/pytorch
db11619901e1bd941042af4c49c6e9da7b0d206d
[ "Intel" ]
null
null
null
tools/build_variables.bzl
zhaoruic-intel/pytorch
db11619901e1bd941042af4c49c6e9da7b0d206d
[ "Intel" ]
null
null
null
# In both open-source and fbcode builds, these are generated into # torch/csrc/{autgrad,jit}/generated.i GENERATED_CPP = [ "autograd/generated/Functions.cpp", "autograd/generated/VariableType_0.cpp", "autograd/generated/VariableType_1.cpp", "autograd/generated/VariableType_2.cpp", "autograd/generate...
47.05386
134
0.737953
fa124765b876045a5e3aec04effac29a41d188c5
3,999
py
Python
wlst/sec.py
M-Spencer-94/configNOW
56828587253202089e77cfdfcf5329f2a7f09b3f
[ "PSF-2.0", "Apache-2.0", "MIT" ]
3
2019-07-09T20:02:48.000Z
2021-11-21T20:00:37.000Z
wlst/sec.py
M-Spencer-94/configNOW
56828587253202089e77cfdfcf5329f2a7f09b3f
[ "PSF-2.0", "Apache-2.0", "MIT" ]
null
null
null
wlst/sec.py
M-Spencer-94/configNOW
56828587253202089e77cfdfcf5329f2a7f09b3f
[ "PSF-2.0", "Apache-2.0", "MIT" ]
null
null
null
# ============================================================================ # # Copyright (c) 2007-2010 Integral Technology Solutions Pty Ltd, # All Rights Reserved. # # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABIL...
47.607143
144
0.667667
9330e75b8cdda1083f57eeaa61410d9ff94496b0
2,284
py
Python
RLS/NNs/callbacks.py
KaiL4eK/keras_traffic_signs_localization
38d5f9b2a11c5db04850ddba3ae91f18dcb98066
[ "MIT" ]
4
2019-01-03T18:21:39.000Z
2022-01-25T00:24:07.000Z
RLS/NNs/callbacks.py
KaiL4eK/keras_traffic_signs_localization
38d5f9b2a11c5db04850ddba3ae91f18dcb98066
[ "MIT" ]
1
2020-09-26T00:37:57.000Z
2020-09-26T00:37:57.000Z
RLS/NNs/callbacks.py
KaiL4eK/keras_traffic_signs_localization
38d5f9b2a11c5db04850ddba3ae91f18dcb98066
[ "MIT" ]
null
null
null
from keras.callbacks import ModelCheckpoint class CustomModelCheckpoint(ModelCheckpoint): """ Save model with custom name model_to_save - Keras model of NN kwargs - arguments for ModelCheckpoint """ def __init__(self, model_to_save, **kwargs): super(CustomModelCheckpoint, s...
46.612245
85
0.51007
6753bb1b6c7f9da64496545179d64e93ec397618
707
py
Python
python/example_code/iam/create_account_alias.py
MacCracken/aws-doc-sdk-examples
dab56d85a5726b36cebeffeb73bda79dccb1070c
[ "Apache-2.0" ]
1
2021-07-21T19:03:45.000Z
2021-07-21T19:03:45.000Z
python/example_code/iam/create_account_alias.py
MacCracken/aws-doc-sdk-examples
dab56d85a5726b36cebeffeb73bda79dccb1070c
[ "Apache-2.0" ]
null
null
null
python/example_code/iam/create_account_alias.py
MacCracken/aws-doc-sdk-examples
dab56d85a5726b36cebeffeb73bda79dccb1070c
[ "Apache-2.0" ]
null
null
null
# Copyright 2010-2017 Amazon.com, Inc. or its affiliates. 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. A copy of # the License is located at # # http://aws.amazon.com/apache2.0/ # # or in the "license" file ac...
30.73913
78
0.752475
5f31bcfd826beb75b62c65774cbec3030f45a828
58,432
py
Python
deform/tests/test_widget.py
benzheren/deform
79d8ac16743815f0c24c27c2ca7ea4287dc5ffb4
[ "CC-BY-3.0" ]
1
2017-10-27T13:20:33.000Z
2017-10-27T13:20:33.000Z
deform/tests/test_widget.py
benzheren/deform
79d8ac16743815f0c24c27c2ca7ea4287dc5ffb4
[ "CC-BY-3.0" ]
null
null
null
deform/tests/test_widget.py
benzheren/deform
79d8ac16743815f0c24c27c2ca7ea4287dc5ffb4
[ "CC-BY-3.0" ]
null
null
null
import unittest def invalid_exc(func, *arg, **kw): from colander import Invalid try: func(*arg, **kw) except Invalid, e: return e else: raise AssertionError('Invalid not raised') # pragma: no cover class TestWidget(unittest.TestCase): def _makeOne(self, **kw): from ...
36.935525
80
0.63508
56b11415326b6898ad276ba3a8948cc57c7eaae6
82
py
Python
tests/fixtures/code.py
pawamoy/duty
dac90183543b73fdd6e5fab354a56c5484d5762a
[ "0BSD" ]
25
2020-10-09T08:46:12.000Z
2022-03-16T18:58:39.000Z
tests/fixtures/code.py
pawamoy/duty
dac90183543b73fdd6e5fab354a56c5484d5762a
[ "0BSD" ]
4
2020-11-12T19:27:41.000Z
2021-08-01T13:24:31.000Z
tests/fixtures/code.py
pawamoy/duty
dac90183543b73fdd6e5fab354a56c5484d5762a
[ "0BSD" ]
null
null
null
from duty import duty @duty def exit_with(ctx, code): ctx.run(lambda: code)
11.714286
25
0.695122
9cb0e82e37ba67aa972f44b1de67375026a51b36
118
py
Python
abp/adaptives/mb_ts/__init__.py
osu-xai/abp
cd83eaa2810a1c5350c849303d61639576c0bb0d
[ "MIT" ]
null
null
null
abp/adaptives/mb_ts/__init__.py
osu-xai/abp
cd83eaa2810a1c5350c849303d61639576c0bb0d
[ "MIT" ]
9
2018-11-14T23:35:05.000Z
2019-05-22T18:31:30.000Z
abp/adaptives/mb_ts/__init__.py
osu-xai/abp
cd83eaa2810a1c5350c849303d61639576c0bb0d
[ "MIT" ]
1
2018-11-14T22:34:09.000Z
2018-11-14T22:34:09.000Z
from .adaptive import MBTSAdaptive from .adaptive_trans import TransAdaptive __all__ = [MBTSAdaptive, TransAdaptive]
23.6
41
0.838983
551d2a5c0611e261cb207032c84ca516e4f8fae4
517
py
Python
try_except.py
jeffb4real/scripts
349bc3d3d819684261281a05db7a5b9389d664f1
[ "MIT" ]
null
null
null
try_except.py
jeffb4real/scripts
349bc3d3d819684261281a05db7a5b9389d664f1
[ "MIT" ]
null
null
null
try_except.py
jeffb4real/scripts
349bc3d3d819684261281a05db7a5b9389d664f1
[ "MIT" ]
null
null
null
#!/usr/bin/env python try: float(['this','is', 'a', 'list']) except TypeError, diag: print 'There was an exception: %s' % str(diag) # There was an exception: float() argument must be a string or a number try: fp = open('', 'w') except IOError, e: print 'There was an exception: %s' % str(e) # There wa...
24.619048
71
0.642166
45b8c5360829991cf0cf2ec7bb43ce2c1f47f611
2,647
py
Python
python/p11.py
tonyfg/project_euler
3a9e6352a98faaa506056b42160c91bffe93838c
[ "WTFPL" ]
null
null
null
python/p11.py
tonyfg/project_euler
3a9e6352a98faaa506056b42160c91bffe93838c
[ "WTFPL" ]
null
null
null
python/p11.py
tonyfg/project_euler
3a9e6352a98faaa506056b42160c91bffe93838c
[ "WTFPL" ]
null
null
null
#Q: What is the greatest product of four adjacent numbers in any direction (up, down, left, right, or diagonally) in the 2020 grid? #A: 70600674 matrix = [[8, 02, 22, 97, 38, 15, 00, 40, 00, 75, 04, 05, 07, 78, 52, 12, 50, 77, 91, 8], [49, 49, 99, 40, 17, 81, 18, 57, 60, 87, 17, 40, 98, 43, 69, 48, 04, 56, 62, 00], [8...
45.637931
131
0.515678
458757205785a271323ffd8f808fb40b7737f244
3,237
py
Python
azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/models/percentile_metric_value_py3.py
Christina-Kang/azure-sdk-for-python
bbf982eb06aab04b8151f69f1d230b7f5fb96ebf
[ "MIT" ]
null
null
null
azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/models/percentile_metric_value_py3.py
Christina-Kang/azure-sdk-for-python
bbf982eb06aab04b8151f69f1d230b7f5fb96ebf
[ "MIT" ]
null
null
null
azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/models/percentile_metric_value_py3.py
Christina-Kang/azure-sdk-for-python
bbf982eb06aab04b8151f69f1d230b7f5fb96ebf
[ "MIT" ]
null
null
null
# coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for # license information. # # Code generated by Microsoft (R) AutoRest Code Generator. # Changes ...
35.966667
76
0.561631
a8181f45b972b746803ff29239fafccebefb73e7
1,758
py
Python
tests/unit/shipping/discount_tests.py
dimka665/django-oscar
e405bf0279bff6f5d152b4d74140cdbb31dae0d5
[ "BSD-3-Clause" ]
null
null
null
tests/unit/shipping/discount_tests.py
dimka665/django-oscar
e405bf0279bff6f5d152b4d74140cdbb31dae0d5
[ "BSD-3-Clause" ]
1
2021-12-13T20:48:46.000Z
2021-12-13T20:48:46.000Z
tests/unit/shipping/discount_tests.py
dimka665/django-oscar
e405bf0279bff6f5d152b4d74140cdbb31dae0d5
[ "BSD-3-Clause" ]
2
2018-12-27T09:42:38.000Z
2018-12-27T10:21:07.000Z
from decimal import Decimal as D from django.test import TestCase from nose.plugins.attrib import attr import mock from oscar.apps.shipping import methods from oscar.apps.shipping.models import OrderAndItemCharges @attr('shipping') class TestStandardMethods(TestCase): def setUp(self): self.non_discount...
33.807692
68
0.67463
fd4545f6ef90d6b500f7b8c3fe2c1c1f63cb9abf
2,000
py
Python
Python/debug/test_hmm.py
JohnReid/biopsy
1eeb714ba5b53f2ecf776d865d32e2078cbc0338
[ "MIT" ]
null
null
null
Python/debug/test_hmm.py
JohnReid/biopsy
1eeb714ba5b53f2ecf776d865d32e2078cbc0338
[ "MIT" ]
null
null
null
Python/debug/test_hmm.py
JohnReid/biopsy
1eeb714ba5b53f2ecf776d865d32e2078cbc0338
[ "MIT" ]
null
null
null
try: import _hmm as hmm except: print 'Could not import _hmm, trying hmm' import hmm import numpy, os, math nt = hmm.numpy_test() nt.print_shape() nt.array = numpy.zeros( (4,10) ) nt.print_shape() nt.print_first() nt.array = 4.5 * numpy.ones( (4,10) ) nt.print_first() print nt.array raise RuntimeError(...
25.974026
79
0.5475
c8ef5affffd0de8a9c1bd1250a370c6fa757759f
2,939
py
Python
app/recipe/tests/test_tags_api.py
starscream2290/reciper-app-api
9655456ff1dadb34f44dcdb88d8727ec5bd5f90f
[ "MIT" ]
null
null
null
app/recipe/tests/test_tags_api.py
starscream2290/reciper-app-api
9655456ff1dadb34f44dcdb88d8727ec5bd5f90f
[ "MIT" ]
null
null
null
app/recipe/tests/test_tags_api.py
starscream2290/reciper-app-api
9655456ff1dadb34f44dcdb88d8727ec5bd5f90f
[ "MIT" ]
null
null
null
from django.contrib.auth import get_user_model from django.urls import reverse from django.test import TestCase from rest_framework import status from rest_framework.test import APIClient from core.models import Tag from recipe.serializers import TagSerializer #tag-serializers to make the test pass after we write th...
38.671053
130
0.70228
5b0a6f4ac43458276f8040dedbaaf2fd549268ab
2,785
py
Python
lib/core/sql_scan/sqli_scan.py
dikshakumari5643/Pybelt
4cba71867d0b4d96f52a919a489be82837b15b83
[ "MIT" ]
474
2017-01-23T13:38:28.000Z
2022-03-16T02:53:33.000Z
lib/core/sql_scan/sqli_scan.py
Warlockk/Pybelt
b4ff6d2e58b5322cca6c7c830b2319a0b86aedd1
[ "MIT" ]
7
2017-02-17T12:14:03.000Z
2017-05-27T15:46:26.000Z
lib/core/sql_scan/sqli_scan.py
Warlockk/Pybelt
b4ff6d2e58b5322cca6c7c830b2319a0b86aedd1
[ "MIT" ]
116
2017-01-23T13:52:43.000Z
2022-02-20T13:54:57.000Z
import urllib2 import random from urlparse import urlparse from bs4 import BeautifulSoup from lib.core.settings import RANDOM_COMMON_COLUMN from lib.core.settings import SQLI_ERROR_REGEX class SQLiScanner(object): """ Scan a URL for SQL injection possibilities. """ vulnerable = False def __init__(self,...
38.680556
110
0.528905
84e0428bacc99a67faf3325c26628ac9640fb62f
2,960
py
Python
glue/viewers/profile/qt/tests/test_python_export.py
HPLegion/glue
1843787ccb4de852dfe103ff58473da13faccf5f
[ "BSD-3-Clause" ]
550
2015-01-08T13:51:06.000Z
2022-03-31T11:54:47.000Z
glue/viewers/profile/qt/tests/test_python_export.py
HPLegion/glue
1843787ccb4de852dfe103ff58473da13faccf5f
[ "BSD-3-Clause" ]
1,362
2015-01-03T19:15:52.000Z
2022-03-30T13:23:11.000Z
glue/viewers/profile/qt/tests/test_python_export.py
HPLegion/glue
1843787ccb4de852dfe103ff58473da13faccf5f
[ "BSD-3-Clause" ]
142
2015-01-08T13:08:00.000Z
2022-03-18T13:25:57.000Z
from astropy.utils import NumpyRNGContext from glue.core import Data, DataCollection from glue.app.qt.application import GlueApplication from glue.viewers.matplotlib.qt.tests.test_python_export import BaseTestExportPython, random_with_nan from glue.viewers.profile.qt import ProfileViewer from glue.viewers.profile.test...
33.636364
101
0.673311
b2fbc6c68a13c5bb25d522ddd69247e88053cd22
3,351
py
Python
mimesis/providers/choice.py
ExpandedMind/mimesis
ae79b84f8dc7cdb054cc1df8a896876995a4d555
[ "MIT" ]
null
null
null
mimesis/providers/choice.py
ExpandedMind/mimesis
ae79b84f8dc7cdb054cc1df8a896876995a4d555
[ "MIT" ]
null
null
null
mimesis/providers/choice.py
ExpandedMind/mimesis
ae79b84f8dc7cdb054cc1df8a896876995a4d555
[ "MIT" ]
null
null
null
"""Provides a random choice from items in a sequence.""" from typing import Any, Optional, Sequence, Union from mimesis.providers.base import BaseDataProvider __all__ = ['Choice'] class Choice(BaseDataProvider): """Class for generating a random choice from items in a sequence.""" def __init__(self, *args,...
41.8875
79
0.593256
c6f923772d520a52d9756d28fa1d22444fef3d9c
2,110
py
Python
permabots/models/messenger_api.py
ckarrie/permabots
f1238e0e6a4cf07ef4ad7a80d7e1f457626debb3
[ "BSD-3-Clause" ]
null
null
null
permabots/models/messenger_api.py
ckarrie/permabots
f1238e0e6a4cf07ef4ad7a80d7e1f457626debb3
[ "BSD-3-Clause" ]
null
null
null
permabots/models/messenger_api.py
ckarrie/permabots
f1238e0e6a4cf07ef4ad7a80d7e1f457626debb3
[ "BSD-3-Clause" ]
null
null
null
# -*- coding: utf-8 -*- from django.db import models from django.utils.encoding import python_2_unicode_compatible from django.utils.translation import ugettext_lazy as _ from permabots.models.base import PermabotsModel @python_2_unicode_compatible class MessengerMessage(PermabotsModel): bot = models.ForeignKey('...
32.461538
127
0.635071
6da24b97336a261b5611780a05c19f17d563bc49
1,168
py
Python
2 assignment/main.py
nastae/programavimas_python
7e65ad834c5f52e146fb5fcd0408b344545dc30e
[ "Apache-2.0" ]
null
null
null
2 assignment/main.py
nastae/programavimas_python
7e65ad834c5f52e146fb5fcd0408b344545dc30e
[ "Apache-2.0" ]
null
null
null
2 assignment/main.py
nastae/programavimas_python
7e65ad834c5f52e146fb5fcd0408b344545dc30e
[ "Apache-2.0" ]
null
null
null
import pymongo client = pymongo.MongoClient("mongodb://localhost:27017/") db = client['restaurants_db'] collection_restaurant = db['restaurant'] print("1. Parašykite užklausą atvaizduojančią visus dokumentus iš restoranų rinkinio") for x in collection_restaurant.find(): print(x) print("2. Parašykite užklausą, ku...
46.72
149
0.726027
ca862c16fa0063e26b0ece92658c0b01e684e3e1
22,102
py
Python
ml_part/mllibs/dataset.py
marek2901/fast-ai-lesson1-exercise
4c2e7573217d8879036c5268f640bc1b75225090
[ "MIT" ]
2
2018-07-29T21:01:24.000Z
2018-07-30T10:48:40.000Z
ml_part/mllibs/dataset.py
marek2901/fast-ai-lesson1-exercise
4c2e7573217d8879036c5268f640bc1b75225090
[ "MIT" ]
8
2021-03-18T20:46:24.000Z
2022-03-11T23:26:30.000Z
ml_part/mllibs/dataset.py
marek2901/fast-ai-lesson1-exercise
4c2e7573217d8879036c5268f640bc1b75225090
[ "MIT" ]
null
null
null
import csv from .imports import * from .torch_imports import * from .core import * from .transforms import * from .layer_optimizer import * from .dataloader import DataLoader def get_cv_idxs(n, cv_idx=0, val_pct=0.2, seed=42): """ Get a list of index values for Validation set from a dataset Arguments: ...
41.623352
146
0.64044
c551a9d315bdddfc97d4a582f7c1950b836ee08c
849
py
Python
xinyu/python/node/pianoNode/mixer_test.py
xzhuah/codingDimension
9b90b93a3a3b8afee28e3a2a571050ca3f86f066
[ "Apache-2.0" ]
1
2020-11-06T20:39:11.000Z
2020-11-06T20:39:11.000Z
xinyu/python/node/pianoNode/mixer_test.py
xzhuah/codingDimension
9b90b93a3a3b8afee28e3a2a571050ca3f86f066
[ "Apache-2.0" ]
1
2021-08-28T02:29:51.000Z
2021-08-28T02:29:51.000Z
xinyu/python/node/pianoNode/mixer_test.py
xzhuah/codingDimension
9b90b93a3a3b8afee28e3a2a571050ca3f86f066
[ "Apache-2.0" ]
null
null
null
# Created by Xinyu Zhu on 2021/4/20, 18:17 import pygame pygame.mixer.init() # pygame.mixer.set_num_channels(2) # sound0 = pygame.mixer.Sound('left.wav') # sound0.set_volume(0.2) m = pygame.mixer.Sound('left.wav') n = pygame.mixer.Sound('right.wav') # m.set_volume(0.2) # n.set_volume(0.2) channel1 = pygame.mixer.Ch...
23.583333
63
0.709069
bc8f0a47588ef5b8f13af1d6adee1bf7f793fa68
13,916
py
Python
sippy/Udp_server.py
beebuu/b2bua
7623ba01341c85d19f3db297e4eb5c2f7d870d21
[ "BSD-2-Clause" ]
135
2015-01-05T22:51:24.000Z
2022-03-08T08:12:58.000Z
sippy/Udp_server.py
beebuu/b2bua
7623ba01341c85d19f3db297e4eb5c2f7d870d21
[ "BSD-2-Clause" ]
24
2015-04-15T21:58:27.000Z
2022-01-25T07:42:26.000Z
sippy/Udp_server.py
beebuu/b2bua
7623ba01341c85d19f3db297e4eb5c2f7d870d21
[ "BSD-2-Clause" ]
62
2015-04-30T00:17:38.000Z
2022-03-30T07:24:10.000Z
# Copyright (c) 2003-2005 Maxim Sobolev. All rights reserved. # Copyright (c) 2006-2014 Sippy Software, Inc. All rights reserved. # # All rights reserved. # # Redistribution and use in source and binary forms, with or without modification, # are permitted provided that the following conditions are met: # # 1. Redistrib...
38.871508
105
0.590328
d926f574938829ae3b482c179de48cae1e2dafab
3,574
py
Python
utilities/myyaml.py
merretbuurman/rapydo-utils
54cdbf2f39f262f50057656e04d47f19c5b56b11
[ "MIT" ]
null
null
null
utilities/myyaml.py
merretbuurman/rapydo-utils
54cdbf2f39f262f50057656e04d47f19c5b56b11
[ "MIT" ]
null
null
null
utilities/myyaml.py
merretbuurman/rapydo-utils
54cdbf2f39f262f50057656e04d47f19c5b56b11
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- import os import yaml from collections import OrderedDict # from functools import lru_cache YAML_EXT = 'yaml' SHORT_YAML_EXT = 'yml' # Test the library as soon as possible yaml.dump({}) ##################### class OrderedLoader(yaml.SafeLoader): """ A 'workaround' good enough for or...
25.898551
74
0.614158
e49056fde1daf86fd472fe5855551c18860045e7
674
py
Python
tests/test_find_levels.py
davtoh/RRTools
6dde2d4622719d9031bf21ffbf7723231a0e2003
[ "BSD-3-Clause" ]
1
2019-07-16T03:54:22.000Z
2019-07-16T03:54:22.000Z
tests/test_find_levels.py
davtoh/RRTools
6dde2d4622719d9031bf21ffbf7723231a0e2003
[ "BSD-3-Clause" ]
null
null
null
tests/test_find_levels.py
davtoh/RRTools
6dde2d4622719d9031bf21ffbf7723231a0e2003
[ "BSD-3-Clause" ]
1
2019-07-09T02:49:06.000Z
2019-07-09T02:49:06.000Z
from __future__ import absolute_import import cv2 import numpy as np from .tesisfunctions import brightness,sigmoid,IMAGEPATH,Plotim import glob rootpath = IMAGEPATH+r"cellphone_retinal/ALCATEL ONE TOUCH IDOL X/left_DAVID/" imlist= glob.glob(rootpath+"IMG*.jpg") fn1 = imlist[3] #fn1 = r"C:\Users\Davtoh\Documents\20...
30.636364
132
0.756677
1437d9e3f58e8f4d2fa96a29a6aac4c8d921f2c4
1,841
py
Python
backend/api/fixtures/operational/0017_add_exclusion_report_signing_assertions.py
amichard/tfrs
ed3973016cc5c2ae48999d550a23b41a5ddad807
[ "Apache-2.0" ]
18
2017-05-10T21:55:11.000Z
2021-03-01T16:41:32.000Z
backend/api/fixtures/operational/0017_add_exclusion_report_signing_assertions.py
amichard/tfrs
ed3973016cc5c2ae48999d550a23b41a5ddad807
[ "Apache-2.0" ]
1,167
2017-03-04T00:18:43.000Z
2022-03-03T22:31:51.000Z
backend/api/fixtures/operational/0017_add_exclusion_report_signing_assertions.py
amichard/tfrs
ed3973016cc5c2ae48999d550a23b41a5ddad807
[ "Apache-2.0" ]
48
2017-03-09T17:19:39.000Z
2022-02-24T16:38:17.000Z
from django.db import transaction from api.management.data_script import OperationalDataScript from api.models.SigningAuthorityAssertion import SigningAuthorityAssertion class AddComplianceReportSigningAssertions(OperationalDataScript): """ Adds Signing Assertions for Exclusion Report """ is_revertab...
39.170213
78
0.623574
1d20c16ea1faf099cef38cc2767b8d6b5ddd0fa8
13,285
py
Python
sdk/resources/azure-mgmt-resource/azure/mgmt/resource/policy/v2015_10_01_preview/aio/operations/_policy_definitions_operations.py
rsdoherty/azure-sdk-for-python
6bba5326677468e6660845a703686327178bb7b1
[ "MIT" ]
2,728
2015-01-09T10:19:32.000Z
2022-03-31T14:50:33.000Z
sdk/resources/azure-mgmt-resource/azure/mgmt/resource/policy/v2015_10_01_preview/aio/operations/_policy_definitions_operations.py
rsdoherty/azure-sdk-for-python
6bba5326677468e6660845a703686327178bb7b1
[ "MIT" ]
17,773
2015-01-05T15:57:17.000Z
2022-03-31T23:50:25.000Z
sdk/resources/azure-mgmt-resource/azure/mgmt/resource/policy/v2015_10_01_preview/aio/operations/_policy_definitions_operations.py
rsdoherty/azure-sdk-for-python
6bba5326677468e6660845a703686327178bb7b1
[ "MIT" ]
1,916
2015-01-19T05:05:41.000Z
2022-03-31T19:36:44.000Z
# coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may ...
47.616487
165
0.670305
3e7a7c289eda094dc3ed5eb2bdb280cb99340d03
22,658
py
Python
wikibot/smw.py
tholzheim/py-3rdparty-mediawiki
3fce5138b74479cb208433b8db79b74b0e19883a
[ "Apache-2.0" ]
null
null
null
wikibot/smw.py
tholzheim/py-3rdparty-mediawiki
3fce5138b74479cb208433b8db79b74b0e19883a
[ "Apache-2.0" ]
null
null
null
wikibot/smw.py
tholzheim/py-3rdparty-mediawiki
3fce5138b74479cb208433b8db79b74b0e19883a
[ "Apache-2.0" ]
null
null
null
''' Created on 2020-05-29 @author: wf ''' import re import sys from datetime import datetime from urllib.parse import unquote class PrintRequest(object): debug=False """ construct the given print request see https://www.semantic-mediawiki.org/wiki/Serialization_(JSON) :ivar smw: SMW context for th...
39.611888
161
0.566511
a56f0066b8489668d243b50adfc8344a952db6a6
730
py
Python
medium/python/c0129_264_ugly-number-ii/00_leetcode_0129.py
drunkwater/leetcode
8cc4a07763e71efbaedb523015f0c1eff2927f60
[ "Ruby" ]
null
null
null
medium/python/c0129_264_ugly-number-ii/00_leetcode_0129.py
drunkwater/leetcode
8cc4a07763e71efbaedb523015f0c1eff2927f60
[ "Ruby" ]
null
null
null
medium/python/c0129_264_ugly-number-ii/00_leetcode_0129.py
drunkwater/leetcode
8cc4a07763e71efbaedb523015f0c1eff2927f60
[ "Ruby" ]
3
2018-02-09T02:46:48.000Z
2021-02-20T08:32:03.000Z
# DRUNKWATER TEMPLATE(add description and prototypes) # Question Title and Description on leetcode.com # Function Declaration and Function Prototypes on leetcode.com #264. Ugly Number II #Write a program to find the n-th ugly number. #Ugly numbers are positive numbers whose prime factors only include 2, 3, 5. For examp...
38.421053
166
0.708219
bef2844cf9fe5d61bbaf5fef8bcc2c21b75abaa7
18,583
py
Python
airflow/providers/microsoft/azure/hooks/wasb.py
ChaseKnowlden/airflow
6b71eac1997a7c0db3b8e3aed6b4e65d01871440
[ "Apache-2.0" ]
15,947
2019-01-05T13:51:02.000Z
2022-03-31T23:33:16.000Z
airflow/providers/microsoft/azure/hooks/wasb.py
ChaseKnowlden/airflow
6b71eac1997a7c0db3b8e3aed6b4e65d01871440
[ "Apache-2.0" ]
14,603
2019-01-05T09:43:19.000Z
2022-03-31T23:11:59.000Z
airflow/providers/microsoft/azure/hooks/wasb.py
ChaseKnowlden/airflow
6b71eac1997a7c0db3b8e3aed6b4e65d01871440
[ "Apache-2.0" ]
8,429
2019-01-05T19:45:47.000Z
2022-03-31T22:13:01.000Z
# # Licensed to the Apache Software Foundation (ASF) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. The ASF licenses this file # to you under the Apache License, Version 2.0 (the # "License"); you may not...
42.426941
109
0.65307
ed02f010b05d0ff9bc2450472d16b16dd709eed7
8,282
py
Python
king_phisher/geoip.py
P3t3rp4rk3r/king-phisher
e42bcd75b6325c83d4f6f3c565920e90919386ab
[ "BSD-3-Clause" ]
1
2020-05-09T07:53:57.000Z
2020-05-09T07:53:57.000Z
king_phisher/geoip.py
cyberconsultant3199/Phishing-KIngphisher
3d6a1b59730bd8c05de02d6c6ee4b2a83608bdb9
[ "BSD-3-Clause" ]
null
null
null
king_phisher/geoip.py
cyberconsultant3199/Phishing-KIngphisher
3d6a1b59730bd8c05de02d6c6ee4b2a83608bdb9
[ "BSD-3-Clause" ]
1
2019-10-19T11:37:42.000Z
2019-10-19T11:37:42.000Z
#!/usr/bin/env python # -*- coding: utf-8 -*- # # king_phisher/geoip.py # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are # met: # # * Redistributions of source code must retain the above copyright # notice, this list ...
39.251185
103
0.752113
2ece1caf246d648b28142692515d23d79a4ab5ac
6,302
py
Python
udacity_mlnd/customer_segments/visuals.py
ronaldokun/Machine-Learning-Projects
e68dbe9ea0a169ba4a742f29f208281ff4924721
[ "MIT" ]
null
null
null
udacity_mlnd/customer_segments/visuals.py
ronaldokun/Machine-Learning-Projects
e68dbe9ea0a169ba4a742f29f208281ff4924721
[ "MIT" ]
null
null
null
udacity_mlnd/customer_segments/visuals.py
ronaldokun/Machine-Learning-Projects
e68dbe9ea0a169ba4a742f29f208281ff4924721
[ "MIT" ]
null
null
null
########################################### # Suppress matplotlib user warnings # Necessary for newer version of matplotlib import warnings warnings.filterwarnings("ignore", category=UserWarning, module="matplotlib") # # Display inline matplotlib plots with IPython from IPython import get_ipython get_ipython().run_line...
36.427746
123
0.650904
ab66d92a1fafe8f8efc6ab004b8106d0cafe82b7
8,528
py
Python
spiga.py
WSTNPHX/scripts-n-tools
8bc1ddcdb731376bc2a0638d44283658c9ce14e1
[ "WTFPL" ]
51
2015-02-03T08:42:59.000Z
2018-07-16T03:14:09.000Z
spiga.py
phxbandit/scripts-and-tools
8bc1ddcdb731376bc2a0638d44283658c9ce14e1
[ "WTFPL" ]
2
2016-06-11T12:51:15.000Z
2017-06-13T21:01:45.000Z
spiga.py
WSTNPHX/scripts-n-tools
8bc1ddcdb731376bc2a0638d44283658c9ce14e1
[ "WTFPL" ]
23
2015-05-18T15:30:49.000Z
2018-04-23T22:52:09.000Z
#!/usr/bin/env python # spiga.py 0.7.6 - Configurable web resource scanner # phxbandit # # Please read spiga.conf and spiga.py -h for instructions. import argparse import os import Queue import random import re import sys import threading import time import urllib import urlparse # Define the number of threads to us...
33.70751
148
0.576102
2c6dcb50617395381f5679db38e8b071b0a506d7
1,191
py
Python
task2.py
dsp-uga/Douglas2Code-p0
f91853e7a6b26650546a9517d10df8d673980a4f
[ "MIT" ]
null
null
null
task2.py
dsp-uga/Douglas2Code-p0
f91853e7a6b26650546a9517d10df8d673980a4f
[ "MIT" ]
null
null
null
task2.py
dsp-uga/Douglas2Code-p0
f91853e7a6b26650546a9517d10df8d673980a4f
[ "MIT" ]
null
null
null
""" This project is for basic NLP operation like word segementation, counting and TF-IDF score calculation """ # import necessary package from dask.distributed import Client, progress from dask import delayed import dask.bag as db import pandas as pd from time import sleep import json # create 8 parallel workers cl...
22.055556
102
0.655751
7fd2c550ca7da9daca68c8a8b461df69f9703646
4,571
py
Python
isi_sdk_8_2_2/isi_sdk_8_2_2/models/quota_notifications_extended.py
mohitjain97/isilon_sdk_python
a371f438f542568edb8cda35e929e6b300b1177c
[ "Unlicense" ]
24
2018-06-22T14:13:23.000Z
2022-03-23T01:21:26.000Z
isi_sdk_8_2_2/isi_sdk_8_2_2/models/quota_notifications_extended.py
mohitjain97/isilon_sdk_python
a371f438f542568edb8cda35e929e6b300b1177c
[ "Unlicense" ]
46
2018-04-30T13:28:22.000Z
2022-03-21T21:11:07.000Z
isi_sdk_8_2_2/isi_sdk_8_2_2/models/quota_notifications_extended.py
mohitjain97/isilon_sdk_python
a371f438f542568edb8cda35e929e6b300b1177c
[ "Unlicense" ]
29
2018-06-19T00:14:04.000Z
2022-02-08T17:51:19.000Z
# coding: utf-8 """ Isilon SDK Isilon SDK - Language bindings for the OneFS API # noqa: E501 OpenAPI spec version: 9 Contact: sdk@isilon.com Generated by: https://github.com/swagger-api/swagger-codegen.git """ import pprint import re # noqa: F401 import six from isi_sdk_8_2_2.models.quota_n...
30.885135
132
0.606869
094ae1f514c792171fea554494044fa4c62943df
2,360
py
Python
tests/test_coad_modeling.py
pasmopy/breast_cancer
ec25b16844d7321ca00c7cbbd8c49c314e6da13b
[ "Apache-2.0" ]
2
2021-10-02T03:48:15.000Z
2022-03-12T04:20:46.000Z
tests/test_coad_modeling.py
pasmopy/breast_cancer
ec25b16844d7321ca00c7cbbd8c49c314e6da13b
[ "Apache-2.0" ]
1
2021-11-18T13:53:18.000Z
2021-11-18T13:53:18.000Z
tests/test_coad_modeling.py
pasmopy/breast_cancer
ec25b16844d7321ca00c7cbbd8c49c314e6da13b
[ "Apache-2.0" ]
null
null
null
import os import random import shutil import sys import time from typing import List from pasmopy import PatientModelSimulations try: import models.colon except ImportError: print("can't import 'colon' from 'models'.") if sys.version_info[:2] < (3, 7): raise RuntimeError("`pasmopy` requires Python 3.7+ t...
34.202899
95
0.68178
31098aed091ac8a8331b470bee9b76c7021de70b
625
py
Python
libs/oracle_common.py
kylesoule/AHArbitrage
2385c86f1f6a0f56c5441fa18888634fd2d359d9
[ "MIT" ]
null
null
null
libs/oracle_common.py
kylesoule/AHArbitrage
2385c86f1f6a0f56c5441fa18888634fd2d359d9
[ "MIT" ]
null
null
null
libs/oracle_common.py
kylesoule/AHArbitrage
2385c86f1f6a0f56c5441fa18888634fd2d359d9
[ "MIT" ]
null
null
null
"""This module provides common functionality. """ from oracle_connect import connect, commitandclose def doall(sql): """Executes SQL statement and closes connection. Args: sql (TYPE): Description """ connection, cursor = connect() cursor.execute(sql) commitandclose(connection, cursor)...
21.551724
65
0.6672
8013fe191a368bd29c5e30688f236578c116138b
1,594
py
Python
examples/speaker_recognition/test.py
JINHXu/NeMo
835db62e39919436824ce022fd3b3f6bac301cd6
[ "Apache-2.0" ]
null
null
null
examples/speaker_recognition/test.py
JINHXu/NeMo
835db62e39919436824ce022fd3b3f6bac301cd6
[ "Apache-2.0" ]
null
null
null
examples/speaker_recognition/test.py
JINHXu/NeMo
835db62e39919436824ce022fd3b3f6bac301cd6
[ "Apache-2.0" ]
null
null
null
# Experiment: restore model and Extract Speaker Embeddings import os import pytorch_lightning as pl from omegaconf.listconfig import ListConfig from pytorch_lightning import seed_everything from nemo.collections.asr.models import ExtractSpeakerEmbeddingsModel from nemo.core.config import hydra_runner from nemo.utils...
27.482759
81
0.705772
1914e737cdc0050cc9760195dc7fc356337b88b7
4,167
py
Python
tests/wallet/test_puzzle_store.py
grayfallstown/greendoge-blockchain
31e325913374d694dc0859140d006a642e7f95ac
[ "Apache-2.0" ]
44
2021-07-06T10:09:06.000Z
2022-02-09T04:30:14.000Z
tests/wallet/test_puzzle_store.py
grayfallstown/greendoge-blockchain
31e325913374d694dc0859140d006a642e7f95ac
[ "Apache-2.0" ]
67
2021-07-06T11:57:18.000Z
2022-02-02T16:14:15.000Z
tests/wallet/test_puzzle_store.py
grayfallstown/greendoge-blockchain
31e325913374d694dc0859140d006a642e7f95ac
[ "Apache-2.0" ]
16
2021-07-06T10:36:37.000Z
2022-03-15T08:35:16.000Z
import asyncio from pathlib import Path from secrets import token_bytes import aiosqlite import pytest from blspy import AugSchemeMPL from greendoge.util.db_wrapper import DBWrapper from greendoge.util.ints import uint32 from greendoge.wallet.derivation_record import DerivationRecord from greendoge.wallet.util.wallet...
38.943925
95
0.610271
f81f665b7a785cea2762bdc9a28c03a9d771010c
5,619
py
Python
examples/tensorflow-mnist-feature-squeezing/src/models.py
usnistgov/dioptra
08a08e96c27787915bafc75a483431333e2c70ca
[ "CC-BY-4.0" ]
14
2021-06-17T15:16:12.000Z
2021-11-08T10:25:37.000Z
examples/tensorflow-mnist-feature-squeezing/src/models.py
usnistgov/dioptra
08a08e96c27787915bafc75a483431333e2c70ca
[ "CC-BY-4.0" ]
7
2021-09-20T20:20:26.000Z
2022-03-30T13:17:43.000Z
examples/tensorflow-mnist-feature-squeezing/src/models.py
usnistgov/dioptra
08a08e96c27787915bafc75a483431333e2c70ca
[ "CC-BY-4.0" ]
4
2021-06-29T16:52:42.000Z
2022-01-21T16:56:45.000Z
# This Software (Dioptra) is being made available as a public service by the # National Institute of Standards and Technology (NIST), an Agency of the United # States Department of Commerce. This software was developed in part by employees of # NIST and in part by NIST contractors. Copyright in portions of this softwar...
31.216667
84
0.69087
16f24b8618ee570da29295b9c516051a7fab86a0
1,187
py
Python
tests/optim/test_auto_gauss_newton.py
tomerlance/AutoOpt
551757627c6b0e0b3caf607f684db421d92b856a
[ "Apache-2.0" ]
null
null
null
tests/optim/test_auto_gauss_newton.py
tomerlance/AutoOpt
551757627c6b0e0b3caf607f684db421d92b856a
[ "Apache-2.0" ]
1
2021-02-24T03:08:17.000Z
2021-02-24T03:08:17.000Z
tests/optim/test_auto_gauss_newton.py
tomerlance/AutoOpt
551757627c6b0e0b3caf607f684db421d92b856a
[ "Apache-2.0" ]
null
null
null
""" Copyright 2019 eBay Inc. Developers/Architects: Selcuk Kopru, Tomer Lancewicki 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 a...
33.914286
91
0.738837
0b4454ef44fca458abcffb8b2adb8637f3845135
111
py
Python
bob/bio/face/config/database/gbu_bad.py
bioidiap/bob.bio.face
2341e6423ca5a412ebe23fa18acacd69ea1ef914
[ "BSD-3-Clause" ]
4
2016-09-01T13:16:46.000Z
2021-09-03T03:27:18.000Z
bob/bio/face/config/database/gbu_bad.py
bioidiap/bob.bio.face
2341e6423ca5a412ebe23fa18acacd69ea1ef914
[ "BSD-3-Clause" ]
6
2015-09-02T19:31:15.000Z
2016-10-10T21:48:39.000Z
bob/bio/face/config/database/gbu_bad.py
bioidiap/bob.bio.face
2341e6423ca5a412ebe23fa18acacd69ea1ef914
[ "BSD-3-Clause" ]
6
2015-10-07T17:18:48.000Z
2017-07-18T19:41:14.000Z
#!/usr/bin/env python from bob.bio.face.database import GBUDatabase database = GBUDatabase(protocol="Bad")
13.875
45
0.756757
4638d3ad3f63e5ba7c2475ac059cdb42b93532d6
6,590
py
Python
hangmanbot.py
AlexZhou876/hangmanbot
63f22e7ab6f46466f445c833a6d7def27487fee0
[ "MIT" ]
null
null
null
hangmanbot.py
AlexZhou876/hangmanbot
63f22e7ab6f46466f445c833a6d7def27487fee0
[ "MIT" ]
null
null
null
hangmanbot.py
AlexZhou876/hangmanbot
63f22e7ab6f46466f445c833a6d7def27487fee0
[ "MIT" ]
null
null
null
import json import os import random import time import praw import requests FORFEIT = 'forfeit' WIN = 'You win! Big-brained, you are.' LOSS = 'You lose. Try again.' MIN_LEN = 4 INIT_LIVES = 5 ARCHIVE_PATH = '' ACTIVE_PATH = '..' INFO = '____________\n\n[Source](https://github.com/AlexZhou876/hangmanbot) | PM me to re...
35.621622
129
0.635812
9e435afb8592cc069b8f7858e1c18fc56f02dbc3
1,449
py
Python
.history/my_classes/FirstClassFunctions/MapFilterZipList_20210706152318.py
minefarmer/deep-Dive-1
b0675b853180c5b5781888266ea63a3793b8d855
[ "Unlicense" ]
null
null
null
.history/my_classes/FirstClassFunctions/MapFilterZipList_20210706152318.py
minefarmer/deep-Dive-1
b0675b853180c5b5781888266ea63a3793b8d855
[ "Unlicense" ]
null
null
null
.history/my_classes/FirstClassFunctions/MapFilterZipList_20210706152318.py
minefarmer/deep-Dive-1
b0675b853180c5b5781888266ea63a3793b8d855
[ "Unlicense" ]
null
null
null
"""Map Filter Zip List Comprehensions Higher order functions A function that takes a function as a parameter and/or returns a function as it's return value Example: sorted map _ | -- modern alternative -> list comprehensions and generator expressions ...
21.954545
144
0.645273
94f66ed907b7022e26dffdbe05b13f868ea2bbf4
1,575
py
Python
nwb_conversion_tools/ophys/miniscope/miniscope.py
wuffi/nwb-conversion-tools
39cfb95b714155b26a17fdda9ed7d801eefd14ea
[ "BSD-3-Clause" ]
null
null
null
nwb_conversion_tools/ophys/miniscope/miniscope.py
wuffi/nwb-conversion-tools
39cfb95b714155b26a17fdda9ed7d801eefd14ea
[ "BSD-3-Clause" ]
null
null
null
nwb_conversion_tools/ophys/miniscope/miniscope.py
wuffi/nwb-conversion-tools
39cfb95b714155b26a17fdda9ed7d801eefd14ea
[ "BSD-3-Clause" ]
null
null
null
import os from ndx_miniscope import read_settings, read_notes, load_miniscope_timestamps from pynwb.image import ImageSeries from natsort import natsorted from glob import glob from nwb_conversion_tools.ophys import OphysNWBConverter class Miniscope2NWB(OphysNWBConverter): def __init__(self, nwbfile, from_path=...
33.510638
110
0.64
fd1f3162017e773fc6898c38413cdde04ab20789
4,566
py
Python
scripts/historical_exporter.py
BobTheBuidler/yearn-exporter
0bfdc8128b23d38d8fe7b0c7070575f475b72573
[ "MIT" ]
null
null
null
scripts/historical_exporter.py
BobTheBuidler/yearn-exporter
0bfdc8128b23d38d8fe7b0c7070575f475b72573
[ "MIT" ]
null
null
null
scripts/historical_exporter.py
BobTheBuidler/yearn-exporter
0bfdc8128b23d38d8fe7b0c7070575f475b72573
[ "MIT" ]
1
2021-09-22T06:36:54.000Z
2021-09-22T06:36:54.000Z
import logging import os from datetime import datetime, timedelta, timezone import time import math from yearn.yearn import Yearn from yearn.outputs import victoria from yearn.utils import closest_block_after_timestamp from itertools import count from toolz import partition_all from joblib import Parallel, delayed imp...
33.086957
91
0.614761
6c4e3b1b78e8f9310b7bacdd1ad21f0c89d4d936
179
py
Python
timestrap/wsgi.py
timgates42/timestrap
744ebcb0cd5fc536245c18058236169f4f36cb8b
[ "BSD-2-Clause" ]
1,758
2017-04-21T08:42:59.000Z
2022-03-09T22:58:53.000Z
timestrap/wsgi.py
timgates42/timestrap
744ebcb0cd5fc536245c18058236169f4f36cb8b
[ "BSD-2-Clause" ]
172
2017-04-23T21:30:03.000Z
2022-02-10T20:10:06.000Z
timestrap/wsgi.py
timgates42/timestrap
744ebcb0cd5fc536245c18058236169f4f36cb8b
[ "BSD-2-Clause" ]
138
2017-04-23T23:02:16.000Z
2022-03-25T04:44:19.000Z
import os from django.core.wsgi import get_wsgi_application os.environ.setdefault("DJANGO_SETTINGS_MODULE", "timestrap.settings.docker") application = get_wsgi_application()
17.9
76
0.821229
fb36b6d5935b9694b86d354ab8da79872134bed4
118,793
py
Python
mayachemtools/lib/Python/PyMOLUtil.py
Govindakc/LingandNetWorkflow
47db36749309d7f2efa3c08c26cf2752f43d2c94
[ "MIT" ]
null
null
null
mayachemtools/lib/Python/PyMOLUtil.py
Govindakc/LingandNetWorkflow
47db36749309d7f2efa3c08c26cf2752f43d2c94
[ "MIT" ]
1
2020-03-15T16:48:37.000Z
2020-03-15T16:48:37.000Z
mayachemtools/lib/Python/PyMOLUtil.py
Govindakc/LingandNetWorkflow
47db36749309d7f2efa3c08c26cf2752f43d2c94
[ "MIT" ]
null
null
null
# # File: PyMOLUtil.py # Author: Manish Sud <msud@san.rr.com> # # Copyright (C) 2019 Manish Sud. All rights reserved. # # The functionality available in this file is implemented using PyMOL, a # molecular visualization system on an open source foundation originally # developed by Warren DeLano. # # This file is part of...
42.170039
1,603
0.670999
2d9908addbdf0d60213cb2fcf72d71036c4d5323
2,945
py
Python
release/stubs.min/System/Net/__init___parts/DownloadProgressChangedEventHandler.py
htlcnn/ironpython-stubs
780d829e2104b2789d5f4d6f32b0ec9f2930ca03
[ "MIT" ]
182
2017-06-27T02:26:15.000Z
2022-03-30T18:53:43.000Z
release/stubs.min/System/Net/__init___parts/DownloadProgressChangedEventHandler.py
htlcnn/ironpython-stubs
780d829e2104b2789d5f4d6f32b0ec9f2930ca03
[ "MIT" ]
28
2017-06-27T13:38:23.000Z
2022-03-15T11:19:44.000Z
release/stubs.min/System/Net/__init___parts/DownloadProgressChangedEventHandler.py
htlcnn/ironpython-stubs
780d829e2104b2789d5f4d6f32b0ec9f2930ca03
[ "MIT" ]
67
2017-06-28T09:43:59.000Z
2022-03-20T21:17:10.000Z
class DownloadProgressChangedEventHandler(MulticastDelegate,ICloneable,ISerializable): """ Represents the method that will handle the System.Net.WebClient.DownloadProgressChanged event of a System.Net.WebClient. DownloadProgressChangedEventHandler(object: object,method: IntPtr) """ def BeginInvoke(self...
31
215
0.726995
07458bc385d61e359d6bb15618e573a27cba5dbe
5,178
py
Python
tools/memory_inspector/memory_inspector/data/file_storage_unittest.py
justremotephone/android_external_chromium_org
246856e61da7acf5494076c74198f2aea894a721
[ "BSD-3-Clause-No-Nuclear-License-2014", "BSD-3-Clause" ]
2
2020-01-25T10:18:18.000Z
2021-01-23T15:29:56.000Z
tools/memory_inspector/memory_inspector/data/file_storage_unittest.py
justremotephone/android_external_chromium_org
246856e61da7acf5494076c74198f2aea894a721
[ "BSD-3-Clause-No-Nuclear-License-2014", "BSD-3-Clause" ]
1
2018-02-10T21:00:08.000Z
2018-03-20T05:09:50.000Z
tools/memory_inspector/memory_inspector/data/file_storage_unittest.py
justremotephone/android_external_chromium_org
246856e61da7acf5494076c74198f2aea894a721
[ "BSD-3-Clause-No-Nuclear-License-2014", "BSD-3-Clause" ]
2
2015-04-17T13:19:09.000Z
2021-10-21T12:55:15.000Z
# Copyright 2014 The Chromium Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. """This unittest covers both file_storage and serialization modules.""" import os import tempfile import time import unittest from memory_inspector.core im...
37.521739
74
0.689455
078a6fe226b1f79db248bb1c1845407854fdbc98
673
py
Python
hw/hw10/tests/q2_1.py
ds-modules/Colab-demo
cccaff13633f8a5ec697cd4aeca9087f2feec2e4
[ "BSD-3-Clause" ]
null
null
null
hw/hw10/tests/q2_1.py
ds-modules/Colab-demo
cccaff13633f8a5ec697cd4aeca9087f2feec2e4
[ "BSD-3-Clause" ]
null
null
null
hw/hw10/tests/q2_1.py
ds-modules/Colab-demo
cccaff13633f8a5ec697cd4aeca9087f2feec2e4
[ "BSD-3-Clause" ]
null
null
null
test = { 'name': 'q2_1', 'points': 1, 'suites': [ { 'cases': [ {'code': '>>> # Make sure you assigned `binary options` to an array;\n>>> type(binary_options) == np.ndarray\nTrue', 'hidden': False, 'locked': False}, { 'code': '>>> # Should be a two element array of a ...
61.181818
186
0.408618
f878255b7a7b561bc44f20830353602d3d64ce36
6,501
py
Python
chainer/optimizers/adam.py
LuoYuanke/PrivChainer
758d765c7903f6913cfd58c21db069d5f2a12203
[ "MIT" ]
null
null
null
chainer/optimizers/adam.py
LuoYuanke/PrivChainer
758d765c7903f6913cfd58c21db069d5f2a12203
[ "MIT" ]
null
null
null
chainer/optimizers/adam.py
LuoYuanke/PrivChainer
758d765c7903f6913cfd58c21db069d5f2a12203
[ "MIT" ]
null
null
null
from __future__ import division import math import numpy as np from chainer.backends import cuda from chainer import optimizer _default_hyperparam = optimizer.Hyperparameter() _default_hyperparam.alpha = 0.001 _default_hyperparam.beta1 = 0.9 _default_hyperparam.beta2 = 0.999 _default_hyperparam.eps = 1e-8 _default_...
36.116667
80
0.614367
42f306995fe51bdf6ea5d208954c0e9cd88561fa
559
py
Python
tf_tools/diagnose.py
akosiorek/tf_tools
381ae6a3131b4cb28baadeb830f3a6e2ceeea60a
[ "MIT" ]
1
2019-01-17T16:22:13.000Z
2019-01-17T16:22:13.000Z
tf_tools/diagnose.py
akosiorek/tf_tools
381ae6a3131b4cb28baadeb830f3a6e2ceeea60a
[ "MIT" ]
null
null
null
tf_tools/diagnose.py
akosiorek/tf_tools
381ae6a3131b4cb28baadeb830f3a6e2ceeea60a
[ "MIT" ]
null
null
null
import gpustat import resource import objgraph def memory_usage(device_num=0): g = gpustat.GPUStatCollection.new_query(); k = g.gpus.keys()[device_num] return { 'device': int(g.gpus[k].entry['memory.used']), 'host': resource.getrusage(resource.RUSAGE_SELF).ru_maxrss / 1024} ...
25.409091
83
0.651163
89d10abfa750db473684fa7e0ed7c9ff11f0f9ec
394
py
Python
kubernetify/kubernetify.py
gregford117/kubernetify
22f0f00a09d2ef6319977eb04da19d29f679b087
[ "MIT" ]
1
2019-11-01T09:14:58.000Z
2019-11-01T09:14:58.000Z
kubernetify/kubernetify.py
gregford117/kubernetify
22f0f00a09d2ef6319977eb04da19d29f679b087
[ "MIT" ]
1
2019-10-31T20:14:21.000Z
2019-10-31T20:14:21.000Z
kubernetify/kubernetify.py
gregford117/kubernetify
22f0f00a09d2ef6319977eb04da19d29f679b087
[ "MIT" ]
1
2019-10-31T19:30:02.000Z
2019-10-31T19:30:02.000Z
def kubernetify(string_to_kubernetify:str): kubernetified_string = "" for word in string_to_kubernetify.split(" "): if kubernetified_string != "": kubernetified_string += " " if len(word) > 2: kubernetified_string += word[0] + str(len(word)-2) + word[-1:] else: ...
28.142857
74
0.609137
af86e51710fd2abbe09dd52b72dd8568b811f268
2,339
py
Python
rul_pm/transformation/target.py
lucianolorenti/rul_pm
da9dfad79129dd47d24923cfd6c833869ef7b6a7
[ "MIT" ]
1
2021-09-01T13:13:10.000Z
2021-09-01T13:13:10.000Z
rul_pm/transformation/target.py
lucianolorenti/rul_pm
da9dfad79129dd47d24923cfd6c833869ef7b6a7
[ "MIT" ]
3
2021-08-24T15:23:52.000Z
2021-11-09T10:28:51.000Z
rul_pm/transformation/target.py
lucianolorenti/rul_pm
da9dfad79129dd47d24923cfd6c833869ef7b6a7
[ "MIT" ]
1
2021-12-25T14:00:16.000Z
2021-12-25T14:00:16.000Z
from typing import Optional import numpy as np from temporis.transformation import TransformerStep import pandas as pd class TargetToClasses(TransformerStep): def __init__(self, bins): super().__init__() self.bins = bins def transform(self, X): X_new = pd.DataFrame(index=X.index) ...
24.882979
87
0.593844
3679565dd2a71bc394586823e54af4a45426ffe6
1,854
py
Python
xlsxwriter/test/comparison/test_chart_format29.py
dthadi3/XlsxWriter
f1801e82240aa9c746ce14948ef95990b83162cf
[ "BSD-2-Clause-FreeBSD" ]
1
2020-07-01T07:24:37.000Z
2020-07-01T07:24:37.000Z
xlsxwriter/test/comparison/test_chart_format29.py
dthadi3/XlsxWriter
f1801e82240aa9c746ce14948ef95990b83162cf
[ "BSD-2-Clause-FreeBSD" ]
null
null
null
xlsxwriter/test/comparison/test_chart_format29.py
dthadi3/XlsxWriter
f1801e82240aa9c746ce14948ef95990b83162cf
[ "BSD-2-Clause-FreeBSD" ]
null
null
null
############################################################################### # # Tests for XlsxWriter. # # Copyright (c), 2013-2020, John McNamara, jmcnamara@cpan.org # from ..excel_comparison_test import ExcelComparisonTest from ...workbook import Workbook class TestCompareXLSXFiles(ExcelComparisonTest): """...
26.112676
79
0.480043
dc264325ec71f3e34e408e041720cd8301f98e85
8,173
py
Python
rustici_software_cloud_v2/__init__.py
ryanhope2/scormcloud-api-v2-client-python
fcc392933218d32b70987f8bfb1711f891f31c06
[ "Apache-2.0" ]
null
null
null
rustici_software_cloud_v2/__init__.py
ryanhope2/scormcloud-api-v2-client-python
fcc392933218d32b70987f8bfb1711f891f31c06
[ "Apache-2.0" ]
null
null
null
rustici_software_cloud_v2/__init__.py
ryanhope2/scormcloud-api-v2-client-python
fcc392933218d32b70987f8bfb1711f891f31c06
[ "Apache-2.0" ]
null
null
null
# coding: utf-8 """ SCORM Cloud Rest API REST API used for SCORM Cloud integrations. OpenAPI spec version: 2.0 Contact: systems@rusticisoftware.com Generated by: https://github.com/swagger-api/swagger-codegen.git """ from __future__ import absolute_import # import models into sdk package from ...
53.769737
101
0.893063
83e558bdeebff1316a62702f6b18ed2b9f720f11
1,623
py
Python
09_pingometer/pingometer.py
unexdk/water
b1defd998d299badcf25f1aca34f8ed9d3c0490a
[ "MIT" ]
null
null
null
09_pingometer/pingometer.py
unexdk/water
b1defd998d299badcf25f1aca34f8ed9d3c0490a
[ "MIT" ]
null
null
null
09_pingometer/pingometer.py
unexdk/water
b1defd998d299badcf25f1aca34f8ed9d3c0490a
[ "MIT" ]
null
null
null
import subprocess, time import RPi.GPIO as GPIO from squid import * HOSTNAME = "us.mineplex.com" # HOSTNAME = "google.com" PING_PERIOD = 3.0 # seconds GOOD_PING = 0.1 # seconds OK_PING = 0.3 # seconds SERVO_PIN = 25 # control pin of servo MIN_ANGLE = 30 MAX_ANGLE = 150 # Configure the GPIO pin GPIO.setmode(GPI...
24.969231
82
0.632779
bcd1cb8319f120b85699a69de274492ad1e2dd8a
1,939
py
Python
grunnur/queue.py
fjarri/grunnur
5eea8ec408e431f43a59780cdf8be2f441a9ebb5
[ "MIT" ]
1
2020-12-04T12:19:18.000Z
2020-12-04T12:19:18.000Z
grunnur/queue.py
fjarri/grunnur
5eea8ec408e431f43a59780cdf8be2f441a9ebb5
[ "MIT" ]
11
2021-03-11T00:20:23.000Z
2021-03-11T01:05:54.000Z
grunnur/queue.py
fjarri/grunnur
5eea8ec408e431f43a59780cdf8be2f441a9ebb5
[ "MIT" ]
null
null
null
from __future__ import annotations from abc import ABC from typing import Optional, Iterable, Sequence, Tuple, Set, Dict import weakref from .adapter_base import QueueAdapter from .context import BoundDevice, BoundMultiDevice from .device import Device class MultiQueue: """ A queue on multiple devices. ...
29.830769
104
0.658587
a92290e210893340c19ebfcb62cc8f35b7abd362
6,481
py
Python
synth.py
asrikumar2002/Google-API
4a7211b3b10f47e3c6b046686d81261002e9ec36
[ "Apache-2.0" ]
null
null
null
synth.py
asrikumar2002/Google-API
4a7211b3b10f47e3c6b046686d81261002e9ec36
[ "Apache-2.0" ]
null
null
null
synth.py
asrikumar2002/Google-API
4a7211b3b10f47e3c6b046686d81261002e9ec36
[ "Apache-2.0" ]
null
null
null
# Copyright 2018 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, s...
31.461165
89
0.644808
44c32511adabccc557e2bc146b081b6b69ed4b3c
35,542
py
Python
core/storage/collection/gae_models.py
luccasparoni/oppia
988f7c1e818faf774ec424e33b5dd0267c40237b
[ "Apache-2.0" ]
null
null
null
core/storage/collection/gae_models.py
luccasparoni/oppia
988f7c1e818faf774ec424e33b5dd0267c40237b
[ "Apache-2.0" ]
null
null
null
core/storage/collection/gae_models.py
luccasparoni/oppia
988f7c1e818faf774ec424e33b5dd0267c40237b
[ "Apache-2.0" ]
null
null
null
# coding: utf-8 # # Copyright 2015 The Oppia 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 requi...
42.311905
91
0.677536