hexsha
stringlengths
40
40
size
int64
5
2.06M
ext
stringclasses
10 values
lang
stringclasses
1 value
max_stars_repo_path
stringlengths
3
248
max_stars_repo_name
stringlengths
5
125
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
248
max_issues_repo_name
stringlengths
5
125
max_issues_repo_head_hexsha
stringlengths
40
78
max_issues_repo_licenses
listlengths
1
10
max_issues_count
int64
1
67k
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
248
max_forks_repo_name
stringlengths
5
125
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
5
2.06M
avg_line_length
float64
1
1.02M
max_line_length
int64
3
1.03M
alphanum_fraction
float64
0
1
count_classes
int64
0
1.6M
score_classes
float64
0
1
count_generators
int64
0
651k
score_generators
float64
0
1
count_decorators
int64
0
990k
score_decorators
float64
0
1
count_async_functions
int64
0
235k
score_async_functions
float64
0
1
count_documentation
int64
0
1.04M
score_documentation
float64
0
1
98e0601566ba652e64eedad746be214634e5e438
17,357
py
Python
MrWorldwide.py
AnonymousHacker1279/MrWorldwide
a782194e1ebe3a1cd73409e3d4dc9946700bcc0e
[ "MIT" ]
null
null
null
MrWorldwide.py
AnonymousHacker1279/MrWorldwide
a782194e1ebe3a1cd73409e3d4dc9946700bcc0e
[ "MIT" ]
null
null
null
MrWorldwide.py
AnonymousHacker1279/MrWorldwide
a782194e1ebe3a1cd73409e3d4dc9946700bcc0e
[ "MIT" ]
null
null
null
from PyQt6.QtWidgets import QApplication, QWidget, QFileDialog import PyQt6.QtCore as QtCore import PyQt6.QtGui as QtGui import sys, time, json, requests, traceback, configparser, os import MrWorldwideUI, ConfigurationUI, UpdateManagerUI version = "v1.0.0" class LangTypes: ENGLISH = "English" ARABIC = "Arabic" CHI...
37.008529
399
0.75157
16,182
0.932089
0
0
239
0.013766
0
0
4,154
0.239272
98e15c2d42b427bf4ffb23842980cd80d4cd57bf
7,429
py
Python
tools/az_cli.py
google/cloud-forensics-utls
719093b4a229e5e97c30d93faabb1ccf3b6ee422
[ "Apache-2.0" ]
null
null
null
tools/az_cli.py
google/cloud-forensics-utls
719093b4a229e5e97c30d93faabb1ccf3b6ee422
[ "Apache-2.0" ]
null
null
null
tools/az_cli.py
google/cloud-forensics-utls
719093b4a229e5e97c30d93faabb1ccf3b6ee422
[ "Apache-2.0" ]
null
null
null
# -*- coding: utf-8 -*- # Copyright 2020 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 ...
35.208531
79
0.679768
0
0
0
0
0
0
0
0
2,852
0.383901
98e581895367116db85fb5bcc24f1ed7b42ed751
2,181
py
Python
bbio/bbio.py
timgates42/PyBBIO
0d46115059ed7ec0c17afb6dd7ed2f507b4f2b8a
[ "MIT" ]
102
2015-01-29T04:28:49.000Z
2022-01-03T18:27:50.000Z
bbio/bbio.py
timgates42/PyBBIO
0d46115059ed7ec0c17afb6dd7ed2f507b4f2b8a
[ "MIT" ]
62
2015-01-29T11:05:13.000Z
2019-12-03T04:30:34.000Z
bbio/bbio.py
timgates42/PyBBIO
0d46115059ed7ec0c17afb6dd7ed2f507b4f2b8a
[ "MIT" ]
58
2015-02-10T14:31:18.000Z
2022-03-29T13:24:03.000Z
""" PyBBIO - bbio.py Copyright (c) 2012-2015 - Alexander Hiam <alex@graycat.io> Released under the MIT license https://github.com/graycatlabs/PyBBIO """ import sys, atexit from .platform import platform_init, platform_cleanup from .common import ADDITIONAL_CLEANUP, util_init def bbio_init(): """ Pre-run initia...
32.073529
85
0.692343
0
0
0
0
0
0
0
0
1,384
0.634571
98e5e44eba98b059fc30bc12fb7cf43b26e82f78
365
py
Python
app/models/endeavors.py
theLaborInVain/kdm-manager-api
fa8744c9b8a739262d1b94900648254cc69d16e1
[ "MIT" ]
2
2020-03-04T13:43:45.000Z
2020-11-03T20:34:21.000Z
app/models/endeavors.py
theLaborInVain/kdm-manager-api
fa8744c9b8a739262d1b94900648254cc69d16e1
[ "MIT" ]
64
2019-07-19T19:19:50.000Z
2022-03-03T21:19:28.000Z
app/models/endeavors.py
theLaborInVain/kdm-manager-api
fa8744c9b8a739262d1b94900648254cc69d16e1
[ "MIT" ]
null
null
null
""" The Endeavors asset collection has a number of irregular assets. Be careful writing any custom code here. """ from app.assets import endeavors from app import models class Assets(models.AssetCollection): def __init__(self, *args, **kwargs): self.root_module = endeavors models.Asset...
20.277778
79
0.706849
180
0.493151
0
0
0
0
0
0
122
0.334247
98e710a1b1cb3e42d4cbdb66250958e21888c440
804
py
Python
interface/inter5.py
CeciliaDornelas/Python
883959ed2e10cd8e8ace2b640e1944edc0c1d8a3
[ "MIT" ]
null
null
null
interface/inter5.py
CeciliaDornelas/Python
883959ed2e10cd8e8ace2b640e1944edc0c1d8a3
[ "MIT" ]
null
null
null
interface/inter5.py
CeciliaDornelas/Python
883959ed2e10cd8e8ace2b640e1944edc0c1d8a3
[ "MIT" ]
null
null
null
import sys from PyQt5 import QtCore, QtWidgets from PyQt5.QtWidgets import QMainWindow, QLabel, QGridLayout, QWidget from PyQt5.QtCore import QSize class HelloWindow(QMainWindow): def __init__(self): QMainWindow.__init__(self) self.setMinimumSize(QSize(280, 120)) self.setWindowTitle("Olá, ...
26.8
69
0.691542
508
0.630273
0
0
0
0
0
0
60
0.074442
98e753afbcdb25feef4bb770897b167108c721b5
1,523
py
Python
setup.py
notwa/scipybiteopt
62e1510789b680483ad867984849af215a9848c5
[ "MIT" ]
null
null
null
setup.py
notwa/scipybiteopt
62e1510789b680483ad867984849af215a9848c5
[ "MIT" ]
null
null
null
setup.py
notwa/scipybiteopt
62e1510789b680483ad867984849af215a9848c5
[ "MIT" ]
null
null
null
#!/usr/bin/env python import os import sys import numpy from setuptools import setup, Extension #include markdown description in pip page this_directory = os.path.abspath(os.path.dirname(__file__)) with open(os.path.join(this_directory, 'README.md'), encoding='utf-8') as f: long_description = f.read() # https://g...
35.418605
119
0.670387
0
0
0
0
0
0
0
0
601
0.394616
98e97be18c63f8ef9e8f59a9c1da5ea5229f6454
2,619
py
Python
qiskit_experiments/data_processing/__init__.py
yoshida-ryuhei/qiskit-experiments
82561acf86b407dcda0a9ec69fe18de2b0a592a2
[ "Apache-2.0" ]
null
null
null
qiskit_experiments/data_processing/__init__.py
yoshida-ryuhei/qiskit-experiments
82561acf86b407dcda0a9ec69fe18de2b0a592a2
[ "Apache-2.0" ]
null
null
null
qiskit_experiments/data_processing/__init__.py
yoshida-ryuhei/qiskit-experiments
82561acf86b407dcda0a9ec69fe18de2b0a592a2
[ "Apache-2.0" ]
null
null
null
# This code is part of Qiskit. # # (C) Copyright IBM 2021. # # This code is licensed under the Apache License, Version 2.0. You may # obtain a copy of this license in the LICENSE.txt file in the root directory # of this source tree or at http://www.apache.org/licenses/LICENSE-2.0. # # Any modifications or derivative wo...
31.178571
97
0.71974
0
0
0
0
0
0
0
0
2,345
0.89538
98e9db17617d3ce2f8dbdda50ebfbe93ce11f25b
10,064
py
Python
models/pointnet2_sem_seg_msg_haptic.py
yufeiwang63/Pointnet_Pointnet2_pytorch
f9078a71b973c13ae7ffa897e142dc7b1e8e88be
[ "MIT" ]
null
null
null
models/pointnet2_sem_seg_msg_haptic.py
yufeiwang63/Pointnet_Pointnet2_pytorch
f9078a71b973c13ae7ffa897e142dc7b1e8e88be
[ "MIT" ]
null
null
null
models/pointnet2_sem_seg_msg_haptic.py
yufeiwang63/Pointnet_Pointnet2_pytorch
f9078a71b973c13ae7ffa897e142dc7b1e8e88be
[ "MIT" ]
null
null
null
import torch.nn as nn import torch.nn.functional as F from haptic.Pointnet_Pointnet2_pytorch.models.pointnet2_utils import PointNetSetAbstractionMsg,PointNetFeaturePropagation class get_shared_model(nn.Module): def __init__(self, use_batch_norm, num_classes, num_input_channel=7): super(get_shared_model, s...
54.695652
207
0.64527
9,757
0.969495
0
0
0
0
0
0
244
0.024245
98eaf0ff524a7491427b7b19f617c3c6aaefc6a4
100
py
Python
backend/src/notifications/admin.py
YujithIsura/request-management
3c683274881ef7798779e03a24042034edcd941c
[ "MIT" ]
3
2021-11-21T20:46:00.000Z
2021-12-02T14:47:18.000Z
notification/admin.py
lautarianoo/django_social_network
ec83af7267f830a2463cb591138dae1a088f9a4e
[ "BSD-3-Clause" ]
169
2020-04-09T08:39:25.000Z
2021-09-03T01:07:01.000Z
notification/admin.py
lautarianoo/django_social_network
ec83af7267f830a2463cb591138dae1a088f9a4e
[ "BSD-3-Clause" ]
13
2020-04-05T20:53:11.000Z
2022-02-28T14:52:17.000Z
from django.contrib import admin from .models import Notification admin.site.register(Notification)
25
33
0.85
0
0
0
0
0
0
0
0
0
0
98eb89e6efe4554abbe1506f10c8ccfbcb3dedf8
2,234
py
Python
HoverSlam.py
GiantWaffleCode/WafflePython
d3e85ce6d9c792e7338eb825307f7bb48113742a
[ "MIT" ]
13
2020-10-13T00:19:21.000Z
2020-12-31T02:38:58.000Z
HoverSlam.py
GiantWaffleCode/WafflePython
d3e85ce6d9c792e7338eb825307f7bb48113742a
[ "MIT" ]
null
null
null
HoverSlam.py
GiantWaffleCode/WafflePython
d3e85ce6d9c792e7338eb825307f7bb48113742a
[ "MIT" ]
10
2020-10-13T00:19:52.000Z
2020-12-31T02:39:42.000Z
import krpc import time import math from simple_pid import PID conn = krpc.connect(name="UI Test") vessel = conn.space_center.active_vessel kerbin_frame = vessel.orbit.body.reference_frame orb_frame = vessel.orbital_reference_frame srf_frame = vessel.surface_reference_frame surface_gravity = vessel.orbit.body.surface_...
33.848485
91
0.705461
0
0
0
0
0
0
0
0
149
0.066697
98ee2fa044a20258e55e590fef0af310684f4e34
433
py
Python
tests/unit_tests/cx_core/integration/integration_test.py
clach04/controllerx
b5cd92d3371c352c50f7d5ba7dae4538d7c15dfe
[ "MIT" ]
204
2020-01-18T10:12:13.000Z
2022-03-27T09:40:17.000Z
tests/unit_tests/cx_core/integration/integration_test.py
clach04/controllerx
b5cd92d3371c352c50f7d5ba7dae4538d7c15dfe
[ "MIT" ]
329
2020-01-17T17:18:53.000Z
2022-03-29T11:20:30.000Z
tests/unit_tests/cx_core/integration/integration_test.py
clach04/controllerx
b5cd92d3371c352c50f7d5ba7dae4538d7c15dfe
[ "MIT" ]
66
2020-01-19T20:17:21.000Z
2022-03-13T15:03:41.000Z
from cx_core import integration as integration_module from cx_core.controller import Controller def test_get_integrations(fake_controller: Controller): integrations = integration_module.get_integrations(fake_controller, {}) inteagration_names = {i.name for i in integrations} assert inteagration_names == {...
27.0625
75
0.678984
0
0
0
0
0
0
0
0
46
0.106236
98ee487f9a2345f91b85bcae94f9855580455dc1
478
py
Python
asystem-adoc/src/main/template/python/script_util.py
ggear/asystem_archive
b97f67218e8aa60991fba386c9e73d27d20d6c47
[ "Apache-2.0" ]
null
null
null
asystem-adoc/src/main/template/python/script_util.py
ggear/asystem_archive
b97f67218e8aa60991fba386c9e73d27d20d6c47
[ "Apache-2.0" ]
2
2021-03-25T21:27:09.000Z
2022-02-11T03:38:48.000Z
asystem-adoc/src/main/template/python/script_util.py
ggear/asystem_archive
b97f67218e8aa60991fba386c9e73d27d20d6c47
[ "Apache-2.0" ]
null
null
null
############################################################################### # # Python script utilities as included from the cloudera-framework-assembly, # do not edit directly # ############################################################################### import os import re def qualify(path): return path...
29.875
79
0.433054
0
0
0
0
0
0
0
0
315
0.658996
98ee7596428318903272a404f3751220eec8a490
11,760
py
Python
datapackage_pipelines/web/server.py
gperonato/datapackage-pipelines
72b98918db1c19590586a3a85c5b087227cbbc3b
[ "MIT" ]
109
2016-09-01T08:41:55.000Z
2021-11-10T10:08:35.000Z
datapackage_pipelines/web/server.py
gperonato/datapackage-pipelines
72b98918db1c19590586a3a85c5b087227cbbc3b
[ "MIT" ]
144
2016-08-30T16:26:50.000Z
2021-04-18T09:06:12.000Z
datapackage_pipelines/web/server.py
gperonato/datapackage-pipelines
72b98918db1c19590586a3a85c5b087227cbbc3b
[ "MIT" ]
34
2016-09-05T12:46:53.000Z
2022-03-05T01:53:49.000Z
import datetime import os from io import BytesIO import logging from functools import wraps from copy import deepcopy from collections import Counter import slugify import yaml import mistune import requests from flask import \ Blueprint, Flask, render_template, abort, send_file, make_response from flask_cors imp...
33.696275
79
0.631463
0
0
0
0
8,090
0.687925
0
0
2,074
0.176361
98eec9960afb05f934f3e80b57d22d6b3147c3f1
1,425
py
Python
MoveSim/code/models/losses.py
tobinsouth/privacy-preserving-synthetic-mobility-data
fd4d1851b47e3e7304761a894b460e8345fae5db
[ "MIT" ]
null
null
null
MoveSim/code/models/losses.py
tobinsouth/privacy-preserving-synthetic-mobility-data
fd4d1851b47e3e7304761a894b460e8345fae5db
[ "MIT" ]
null
null
null
MoveSim/code/models/losses.py
tobinsouth/privacy-preserving-synthetic-mobility-data
fd4d1851b47e3e7304761a894b460e8345fae5db
[ "MIT" ]
null
null
null
# coding: utf-8 import numpy as np import torch.nn as nn class distance_loss(nn.Module): def __init__(self): with open('../data/raw/Cellular_Baselocation_baidu') as f: gpss = f.readlines() self.X = [] self.Y = [] for gps in gpss: x, y = float(gps.split()[0]...
27.403846
67
0.523509
1,362
0.955789
0
0
0
0
0
0
240
0.168421
98ef6a5aa62915725ae521746cef94f51adfcf47
1,316
py
Python
board/game.py
petthauk/chess_ml
2a66ca8511fd4eef71607a7f56417d039d94dbf9
[ "MIT" ]
null
null
null
board/game.py
petthauk/chess_ml
2a66ca8511fd4eef71607a7f56417d039d94dbf9
[ "MIT" ]
null
null
null
board/game.py
petthauk/chess_ml
2a66ca8511fd4eef71607a7f56417d039d94dbf9
[ "MIT" ]
null
null
null
import pygame as pg from pygame.locals import * import sys import board.chess_board as board w = 60 * 8 h = 60 * 8 class Game: """ Class to setup and start a game """ def __init__(self): self.b = board.Board(w, h) def get_board(self): """ Returns board :return: B...
24.830189
73
0.458207
1,084
0.823708
0
0
0
0
0
0
331
0.25152
98efb4404db7ca8bc8ddf99fbe40494ec2e70aa1
2,515
py
Python
pix2pix/Dataset_util.py
Atharva-Phatak/Season-Tranfer
d6a0d4d42e396677920ffb81ab0086b0aa05d3c3
[ "MIT" ]
2
2019-07-02T14:00:15.000Z
2019-07-11T15:50:41.000Z
pix2pix/Dataset_util.py
Atharva-Phatak/Season-Tranfer
d6a0d4d42e396677920ffb81ab0086b0aa05d3c3
[ "MIT" ]
null
null
null
pix2pix/Dataset_util.py
Atharva-Phatak/Season-Tranfer
d6a0d4d42e396677920ffb81ab0086b0aa05d3c3
[ "MIT" ]
null
null
null
#importing libraries import torch import torch.utils.data as data import os import random from PIL import Image class CreateDataset(data.Dataset): def __init__(self , imagedir , subfolder='train' , direction = 'AtoB' , flip = False , transform = None ,resize_scale = None , crop_size = None): ...
36.985294
150
0.553082
2,360
0.93837
0
0
0
0
0
0
46
0.01829
98efd5c91e56c42872a45ff29528b847156d1400
20,126
py
Python
crslab/system/C2CRS_System.py
Zyh716/WSDM2022-C2CRS
8ef2fa7c44bdba1799ab79f379ae7394bd468c02
[ "MIT" ]
4
2022-03-24T02:14:50.000Z
2022-03-30T02:28:19.000Z
crslab/system/C2CRS_System.py
RUCAIBox/WSDM2022-C2CRS
8ef2fa7c44bdba1799ab79f379ae7394bd468c02
[ "MIT" ]
null
null
null
crslab/system/C2CRS_System.py
RUCAIBox/WSDM2022-C2CRS
8ef2fa7c44bdba1799ab79f379ae7394bd468c02
[ "MIT" ]
2
2022-03-23T02:24:24.000Z
2022-03-28T12:45:43.000Z
# @Time : 2022/1/1 # @Author : Yuanhang Zhou # @email : sdzyh002@gmail.com import os from math import floor import torch from loguru import logger from typing import List, Dict from copy import copy, deepcopy import pickle import os import numpy import ipdb from crslab.config import PRETRAIN_PATH, SAVE_P...
42.549683
154
0.622131
19,494
0.968598
0
0
0
0
0
0
3,529
0.175345
98efe77eec76324cc9234c09e5f48bc8417b9d98
1,198
py
Python
morepath/__init__.py
hugovk/morepath
5596f9ce43ee4e5cd73eaa2ab9ef37825f88ae28
[ "BSD-3-Clause" ]
314
2015-01-01T01:42:52.000Z
2022-01-07T21:46:15.000Z
morepath/__init__.py
hugovk/morepath
5596f9ce43ee4e5cd73eaa2ab9ef37825f88ae28
[ "BSD-3-Clause" ]
369
2015-01-02T19:10:40.000Z
2021-07-03T04:37:27.000Z
morepath/__init__.py
hugovk/morepath
5596f9ce43ee4e5cd73eaa2ab9ef37825f88ae28
[ "BSD-3-Clause" ]
37
2015-01-11T09:22:02.000Z
2021-07-02T20:48:20.000Z
# flake8: noqa """This is the main public API of Morepath. Additional public APIs can be imported from the :mod:`morepath.error` and :mod:`morepath.pdbsupport` modules. For custom directive implementations that interact with core directives for grouping or subclassing purposes, or that need to use one of the Morepath ...
37.4375
76
0.810518
0
0
0
0
0
0
0
0
581
0.484975
98f2204e0eeff6cafe4a1031fc879a4bec0db151
37
py
Python
src/AuShadha/demographics/email_and_fax/dijit_fields_constants.py
GosthMan/AuShadha
3ab48825a0dba19bf880b6ac6141ab7a6adf1f3e
[ "PostgreSQL" ]
46
2015-03-04T14:19:47.000Z
2021-12-09T02:58:46.000Z
src/AuShadha/demographics/email_and_fax/dijit_fields_constants.py
aytida23/AuShadha
3ab48825a0dba19bf880b6ac6141ab7a6adf1f3e
[ "PostgreSQL" ]
2
2015-06-05T10:29:04.000Z
2015-12-06T16:54:10.000Z
src/AuShadha/demographics/email_and_fax/dijit_fields_constants.py
aytida23/AuShadha
3ab48825a0dba19bf880b6ac6141ab7a6adf1f3e
[ "PostgreSQL" ]
24
2015-03-23T01:38:11.000Z
2022-01-24T16:23:42.000Z
EMAIL_AND_FAX_FORM_CONSTANTS = { }
12.333333
32
0.756757
0
0
0
0
0
0
0
0
0
0
98f428d0ea0b7f44539193898ee9647b5c6c689f
2,242
py
Python
marketDataRetrieval.py
amertx/Monte-Carlo-Simulation
6c3a616bc67e668d80a73247ca279e10f6d46cd5
[ "MIT" ]
null
null
null
marketDataRetrieval.py
amertx/Monte-Carlo-Simulation
6c3a616bc67e668d80a73247ca279e10f6d46cd5
[ "MIT" ]
null
null
null
marketDataRetrieval.py
amertx/Monte-Carlo-Simulation
6c3a616bc67e668d80a73247ca279e10f6d46cd5
[ "MIT" ]
null
null
null
#Prediction model using an instance of the Monte Carlo simulation and Brownian Motion equation #import of libraries import numpy as np import pandas as pd from pandas_datareader import data as wb import matplotlib.pyplot as plt from scipy.stats import norm #ticker selection def mainFunction(tradingSymbol): data ...
29.116883
118
0.711864
0
0
0
0
0
0
0
0
951
0.424175
98f43fcd4c7844a9b69d2baa890a95f4841f18e8
31,716
py
Python
HelloDeepSpeed/train_bert_ds.py
mrwyattii/DeepSpeedExamples
6bd444a7c62e9d7d320dd4c1e1142062f50c861d
[ "MIT" ]
null
null
null
HelloDeepSpeed/train_bert_ds.py
mrwyattii/DeepSpeedExamples
6bd444a7c62e9d7d320dd4c1e1142062f50c861d
[ "MIT" ]
null
null
null
HelloDeepSpeed/train_bert_ds.py
mrwyattii/DeepSpeedExamples
6bd444a7c62e9d7d320dd4c1e1142062f50c861d
[ "MIT" ]
null
null
null
""" Modified version of train_bert.py that adds DeepSpeed """ import os import datetime import json import pathlib import re import string from functools import partial from typing import Any, Callable, Dict, Iterable, List, Optional, Tuple, TypeVar, Union import random import datasets import fire import logging impo...
36.836237
95
0.576334
5,177
0.16323
0
0
0
0
0
0
13,426
0.423319
98f5a9225473ea31a925278ee4add1b0f458f788
825
py
Python
programming/leetcode/linkedLists/PalindromeLinkedList/PalindromeLinkedList.py
vamsitallapudi/Coderefer-Python-Projects
a7acc682251661e296c64533f4a85d47e6eedda2
[ "Apache-2.0" ]
1
2021-01-03T06:42:58.000Z
2021-01-03T06:42:58.000Z
programming/leetcode/linkedLists/PalindromeLinkedList/PalindromeLinkedList.py
vamsitallapudi/Coderefer-Python-Projects
a7acc682251661e296c64533f4a85d47e6eedda2
[ "Apache-2.0" ]
null
null
null
programming/leetcode/linkedLists/PalindromeLinkedList/PalindromeLinkedList.py
vamsitallapudi/Coderefer-Python-Projects
a7acc682251661e296c64533f4a85d47e6eedda2
[ "Apache-2.0" ]
null
null
null
# Given a singly linked list, determine if it is a palindrome. # Definition for singly-linked list. class ListNode: def __init__(self, val=0, next=None): self.val = val self.next = next class Solution: def isPalindrome(self, head: ListNode) -> bool: fast = slow = head # find t...
22.916667
62
0.530909
715
0.866667
0
0
0
0
0
0
206
0.249697
98f70d5ddc8fc406905d54058613214bd95d62ce
290
py
Python
__init__.py
CloudCIX/rolly
8fafd655cb82881ae2cf75a475904cddc39e2f9a
[ "Apache-2.0" ]
6
2019-12-09T16:13:21.000Z
2020-07-16T11:42:33.000Z
__init__.py
CloudCIX/rolly
8fafd655cb82881ae2cf75a475904cddc39e2f9a
[ "Apache-2.0" ]
null
null
null
__init__.py
CloudCIX/rolly
8fafd655cb82881ae2cf75a475904cddc39e2f9a
[ "Apache-2.0" ]
1
2021-01-02T09:44:39.000Z
2021-01-02T09:44:39.000Z
""" Rocky is a CLI based provisioning and management tool for CloudCIX Cloud software. Rocky is designed to operate in an out of band (OOB) network, serarated from other CloudCIX networks. Rocky's purpose is to facilitate monitoring, testing, debug and recovery """ __version__ = '0.3.5'
32.222222
101
0.772414
0
0
0
0
0
0
0
0
273
0.941379
98f808b42f55c190413c10c0ee75bee408ae97c6
1,671
py
Python
calculator.py
harshitbansal373/Python-Games
4e879b0a97b4b420ed6d440cd2d6a0332a2109b7
[ "MIT" ]
null
null
null
calculator.py
harshitbansal373/Python-Games
4e879b0a97b4b420ed6d440cd2d6a0332a2109b7
[ "MIT" ]
null
null
null
calculator.py
harshitbansal373/Python-Games
4e879b0a97b4b420ed6d440cd2d6a0332a2109b7
[ "MIT" ]
null
null
null
from tkinter import * import time root=Tk() root.title('Calculator') root.config(bg='wheat') def display(x): global s s=s+x text.set(s) def solve(): global s try: s=str(eval(text.get())) except Exception as e: text.set(e) s='' else: text.set(s) def clear(): global s s='' text.set(...
25.318182
125
0.668462
0
0
0
0
0
0
0
0
292
0.174746
98f8ea06315deb6bd9599f36bf3f99bf2965db61
8,280
py
Python
src/Main.py
OlavH96/Master
f98476063e579b7b2a80b81a2c0ca4005f5fce80
[ "MIT" ]
null
null
null
src/Main.py
OlavH96/Master
f98476063e579b7b2a80b81a2c0ca4005f5fce80
[ "MIT" ]
null
null
null
src/Main.py
OlavH96/Master
f98476063e579b7b2a80b81a2c0ca4005f5fce80
[ "MIT" ]
null
null
null
import glob import os import keras import tensorflow as tf from keras.models import load_model from keras.callbacks import ModelCheckpoint import matplotlib matplotlib.use('Agg') import matplotlib.pyplot as plt import src.util.Files as Files from src.util.ImageLoader import load_images_generator, resize_image, load...
35.844156
139
0.620411
0
0
755
0.091184
0
0
0
0
1,286
0.155314
98f921edc0f4676c7070bf0e769ce5e1dab739bb
1,353
py
Python
daproli/manipulation.py
ermshaua/daproli
c1f7aeec431d9c60ae06eeac23455c1a03bc82cf
[ "BSD-3-Clause" ]
null
null
null
daproli/manipulation.py
ermshaua/daproli
c1f7aeec431d9c60ae06eeac23455c1a03bc82cf
[ "BSD-3-Clause" ]
null
null
null
daproli/manipulation.py
ermshaua/daproli
c1f7aeec431d9c60ae06eeac23455c1a03bc82cf
[ "BSD-3-Clause" ]
null
null
null
from .utils import _get_return_type def windowed(data, size, step=1, ret_type=None): ''' dp.windowed applies a window function to a collection of data items. Parameters ----------- :param data: an iterable collection of data :param size: the window size :param step: the window step :p...
30.066667
81
0.610495
0
0
0
0
0
0
0
0
960
0.709534
98fc678951f86f4c4317fc775c6ba763f66da302
8,717
py
Python
ambari-server/src/test/python/stacks/2.3/ATLAS/test_metadata_server.py
gcxtx/ambari
133d9c4661b21182482c25f96c3f0bf0a9740a9f
[ "Apache-2.0" ]
1
2021-05-06T06:24:04.000Z
2021-05-06T06:24:04.000Z
ambari-server/src/test/python/stacks/2.3/ATLAS/test_metadata_server.py
gcxtx/ambari
133d9c4661b21182482c25f96c3f0bf0a9740a9f
[ "Apache-2.0" ]
null
null
null
ambari-server/src/test/python/stacks/2.3/ATLAS/test_metadata_server.py
gcxtx/ambari
133d9c4661b21182482c25f96c3f0bf0a9740a9f
[ "Apache-2.0" ]
null
null
null
#!/usr/bin/env python ''' 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")...
46.367021
141
0.494207
7,718
0.885396
0
0
7,754
0.889526
0
0
2,688
0.308363
98fd965b02157810b02af85a0eee51f0f9a9f9e1
5,040
py
Python
Udacity P3 Additional Files/model.py
sayeayed/Udacity-Project4
da39d0013d35d90818f9aa24ef097e185e705489
[ "MIT" ]
null
null
null
Udacity P3 Additional Files/model.py
sayeayed/Udacity-Project4
da39d0013d35d90818f9aa24ef097e185e705489
[ "MIT" ]
null
null
null
Udacity P3 Additional Files/model.py
sayeayed/Udacity-Project4
da39d0013d35d90818f9aa24ef097e185e705489
[ "MIT" ]
null
null
null
import os import csv import numpy as np from sklearn.utils import shuffle ## Read in frame data samples = [] with open('/../opt/carnd_p3/data/driving_log.csv') as csvfile: #open the log file reader = csv.reader(csvfile) #as a readable csv for line in reader: samples.append(line) #add each line of th...
48.461538
222
0.709127
0
0
1,761
0.349405
0
0
0
0
2,288
0.453968
98fe28b6ed135c40a04274c069f20df97e941299
2,357
py
Python
utils/wavelengthfit_prim.py
GeminiDRSoftware/GHOSTDR
79cd1ac81a7458e06668d6dac51fc6f9c9c61b31
[ "BSD-3-Clause" ]
1
2019-09-05T15:29:25.000Z
2019-09-05T15:29:25.000Z
utils/wavelengthfit_prim.py
GeminiDRSoftware/GHOSTDR
79cd1ac81a7458e06668d6dac51fc6f9c9c61b31
[ "BSD-3-Clause" ]
null
null
null
utils/wavelengthfit_prim.py
GeminiDRSoftware/GHOSTDR
79cd1ac81a7458e06668d6dac51fc6f9c9c61b31
[ "BSD-3-Clause" ]
2
2017-10-10T23:23:53.000Z
2022-02-15T23:28:22.000Z
#!/usr/bin/env python3 """ A script containing the basic principles of the extraction primitive inner workings""" from __future__ import division, print_function from ghostdr import polyfit import numpy as pn # Firstly, let's find all the needed files fitsdir='/Users/mireland/data/ghost/cal_frames/' #Define the f...
35.712121
107
0.801018
0
0
0
0
0
0
0
0
1,347
0.571489
98ff5d19bcbfb3d13ae61a0ad4df7649e741ec52
1,506
py
Python
time_management/test/kronos_test.py
AyushRawal/time-management
a8876f7b681da837c41f17cf896eaa895017f17f
[ "MIT" ]
1
2021-11-15T19:35:51.000Z
2021-11-15T19:35:51.000Z
time_management/test/kronos_test.py
AyushRawal/time-management
a8876f7b681da837c41f17cf896eaa895017f17f
[ "MIT" ]
null
null
null
time_management/test/kronos_test.py
AyushRawal/time-management
a8876f7b681da837c41f17cf896eaa895017f17f
[ "MIT" ]
null
null
null
import unittest import datetime import kronos string_format_time = "%Y-%m-%d %H:%M:%S" date_time_str = "2020-07-19 18:14:21" class KronosTest(unittest.TestCase): def test_get_day_of_week(self): for i in range(len(kronos.week_days)): date = kronos.get_date_time_from_string(f"2020-08-{10 + i} 1...
41.833333
83
0.717131
1,377
0.914343
0
0
0
0
0
0
194
0.128818
98ffa0f6e3c8edf444c1fa0391cb1792a90df5ec
1,368
py
Python
mfc/mfc.py
FuelCellUAV/FC_datalogger
1b4b4fecb6a842f3ba685115db01a50cca7596c7
[ "CC0-1.0" ]
null
null
null
mfc/mfc.py
FuelCellUAV/FC_datalogger
1b4b4fecb6a842f3ba685115db01a50cca7596c7
[ "CC0-1.0" ]
null
null
null
mfc/mfc.py
FuelCellUAV/FC_datalogger
1b4b4fecb6a842f3ba685115db01a50cca7596c7
[ "CC0-1.0" ]
null
null
null
##!/usr/bin/env python3 # Mass Flow Controller Arduino driver # Copyright (C) 2015 Simon Howroyd, Jason James # # This program 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 o...
32.571429
101
0.638889
390
0.285088
0
0
62
0.045322
0
0
1,018
0.744152
c70208d0f7ec90b8fef96ebe7d673c28540df5bc
2,558
py
Python
odm/dialects/postgresql/green.py
quantmind/pulsar-odm
5955c20beca0a89270c2b390335838deb7d5915e
[ "BSD-3-Clause" ]
16
2015-02-17T22:23:48.000Z
2020-08-08T09:35:53.000Z
odm/dialects/postgresql/green.py
quantmind/pulsar-odm
5955c20beca0a89270c2b390335838deb7d5915e
[ "BSD-3-Clause" ]
11
2015-02-25T11:37:09.000Z
2016-03-04T12:08:11.000Z
odm/dialects/postgresql/green.py
quantmind/pulsar-odm
5955c20beca0a89270c2b390335838deb7d5915e
[ "BSD-3-Clause" ]
3
2017-02-27T10:24:31.000Z
2020-10-08T05:43:15.000Z
from asyncio import Future from greenlet import getcurrent import psycopg2 from psycopg2 import * # noqa from psycopg2 import extensions, OperationalError __version__ = psycopg2.__version__ def psycopg2_wait_callback(conn): """A wait callback to allow greenlet to work with Psycopg. The caller must be from...
29.744186
76
0.67631
0
0
0
0
0
0
0
0
1,060
0.414386
c70375d862917fab136e0bc4321aa240c2c6c44e
27,984
py
Python
test/test_replica_set_connection.py
h4ck3rm1k3/mongo-python-driver
dfaadd53e86a62c72ca8a7564fdacb30cd0ac01c
[ "Apache-2.0" ]
1
2019-04-27T20:15:11.000Z
2019-04-27T20:15:11.000Z
test/test_replica_set_connection.py
h4ck3rm1k3/mongo-python-driver
dfaadd53e86a62c72ca8a7564fdacb30cd0ac01c
[ "Apache-2.0" ]
null
null
null
test/test_replica_set_connection.py
h4ck3rm1k3/mongo-python-driver
dfaadd53e86a62c72ca8a7564fdacb30cd0ac01c
[ "Apache-2.0" ]
null
null
null
# Copyright 2011-2012 10gen, 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,...
36.966975
85
0.611885
26,339
0.941216
0
0
0
0
0
0
5,044
0.180246
c703e56a113105edf215384785217acba5d2eb75
2,177
py
Python
jqi/cmd.py
jan-g/jqi
f304f9fda33ac9b9eae98848d2a64acbe0893131
[ "CC-BY-3.0", "Apache-2.0" ]
3
2020-04-15T13:40:59.000Z
2021-06-30T10:09:33.000Z
jqi/cmd.py
jan-g/jqi
f304f9fda33ac9b9eae98848d2a64acbe0893131
[ "CC-BY-3.0", "Apache-2.0" ]
null
null
null
jqi/cmd.py
jan-g/jqi
f304f9fda33ac9b9eae98848d2a64acbe0893131
[ "CC-BY-3.0", "Apache-2.0" ]
null
null
null
import argparse_helper as argparse import config_dir import sys from .editor import Editor def main(*args): if len(args) > 0: args = [args] parser = argparse.ArgumentParser() parser.add_argument("-f", dest="cfg_file", help="query save name") parser.add_argument("-x", default=False, action="st...
31.550725
109
0.601746
0
0
0
0
0
0
0
0
344
0.158016
c704254fb8b8187007babe4836f7f7b5682b3b65
888
py
Python
setup.py
ASKBOT/python-import-utils
9cc317cc2a42dd46d41d53e8209203ccfe528c11
[ "BSD-2-Clause" ]
1
2015-07-19T10:36:42.000Z
2015-07-19T10:36:42.000Z
setup.py
ASKBOT/python-import-utils
9cc317cc2a42dd46d41d53e8209203ccfe528c11
[ "BSD-2-Clause" ]
null
null
null
setup.py
ASKBOT/python-import-utils
9cc317cc2a42dd46d41d53e8209203ccfe528c11
[ "BSD-2-Clause" ]
null
null
null
import ez_setup ez_setup.use_setuptools() from setuptools import setup, find_packages import import_utils setup( name = "import-utils", version = import_utils.__version__, description = 'A module that supports simple programmatic module imports', packages = find_packages(), author = 'Evgeny.Fadeev...
30.62069
78
0.647523
0
0
0
0
0
0
0
0
411
0.462838
c704a4dc1d06546eaf240da05c092e6fa0ab7b9d
1,704
py
Python
visual_dynamics/policies/random_offset_camera_target_policy.py
alexlee-gk/visual_dynamics
90227bb0d0aebb1989117b5c25ca311655ca7cc7
[ "MIT" ]
30
2017-04-05T12:55:09.000Z
2022-03-14T14:31:31.000Z
visual_dynamics/policies/random_offset_camera_target_policy.py
alexlee-gk/visual_dynamics
90227bb0d0aebb1989117b5c25ca311655ca7cc7
[ "MIT" ]
1
2017-06-19T02:39:03.000Z
2017-06-19T02:39:03.000Z
visual_dynamics/policies/random_offset_camera_target_policy.py
alexlee-gk/visual_dynamics
90227bb0d0aebb1989117b5c25ca311655ca7cc7
[ "MIT" ]
13
2017-04-05T12:55:09.000Z
2021-03-16T01:59:12.000Z
import numpy as np from visual_dynamics.policies import CameraTargetPolicy class RandomOffsetCameraTargetPolicy(CameraTargetPolicy): def __init__(self, env, target_env, camera_node_name, agent_node_name, target_node_name, height=12.0, radius=16.0, angle=(-np.pi/4, np.pi/4), tightness=0.1, hra_in...
47.333333
112
0.629695
1,625
0.953638
0
0
0
0
0
0
67
0.039319
c70662701931e0df30976bfadaca0ac6c230e738
1,401
py
Python
Day3/Day3.py
ErAgOn-AmAnSiRoHi/Advent-of-Code-2021
0f0d59483d93f6fce4aa06fb36101aea08b02fc3
[ "MIT" ]
null
null
null
Day3/Day3.py
ErAgOn-AmAnSiRoHi/Advent-of-Code-2021
0f0d59483d93f6fce4aa06fb36101aea08b02fc3
[ "MIT" ]
null
null
null
Day3/Day3.py
ErAgOn-AmAnSiRoHi/Advent-of-Code-2021
0f0d59483d93f6fce4aa06fb36101aea08b02fc3
[ "MIT" ]
null
null
null
with open("inputday3.txt") as f: data = [x for x in f.read().split()] gamma = "" epsilon = "" for b in range(0, len(data[0])): one = 0 zero = 0 for c in range(0, len(data)): if data[c][b] == '0': zero += 1 else: one += 1 if zero > one: ...
18.932432
41
0.417559
0
0
0
0
0
0
0
0
60
0.042827
c706f98a7ed12b68d12a292394d4a9f058dbea40
12,449
py
Python
keras2pytorch_dataset.py
MPCAICDM/MPCA
c996435a0578ea4160f934bc01041c2ef23468f3
[ "MIT" ]
null
null
null
keras2pytorch_dataset.py
MPCAICDM/MPCA
c996435a0578ea4160f934bc01041c2ef23468f3
[ "MIT" ]
null
null
null
keras2pytorch_dataset.py
MPCAICDM/MPCA
c996435a0578ea4160f934bc01041c2ef23468f3
[ "MIT" ]
null
null
null
from __future__ import print_function from PIL import Image import os import os.path import numpy as np import sys from misc import AverageMeter from eval_accuracy import simple_accuracy if sys.version_info[0] == 2: import cPickle as pickle else: import pickle import torch.utils.data as data import torch from ...
34.969101
139
0.618684
10,292
0.826733
0
0
0
0
0
0
1,569
0.126034
c7075ad8e2a1229e14b617586ca8b05a9f86dd2f
1,920
py
Python
mir/tools/mir_repo_utils.py
fenrir-z/ymir-cmd
6fbffd3c1ff5dd1c9a44b55de411523b50567661
[ "Apache-2.0" ]
1
2022-01-12T03:12:47.000Z
2022-01-12T03:12:47.000Z
mir/tools/mir_repo_utils.py
fenrir-z/ymir-cmd
6fbffd3c1ff5dd1c9a44b55de411523b50567661
[ "Apache-2.0" ]
null
null
null
mir/tools/mir_repo_utils.py
fenrir-z/ymir-cmd
6fbffd3c1ff5dd1c9a44b55de411523b50567661
[ "Apache-2.0" ]
null
null
null
import json import logging import os from typing import Optional from mir import scm from mir.tools import mir_storage def mir_check_repo_dvc_dirty(mir_root: str = ".") -> bool: names = [name for name in mir_storage.get_all_mir_paths() if os.path.isfile(os.path.join(mir_root, name))] if names: dvc_cm...
32.542373
110
0.655729
0
0
0
0
0
0
0
0
354
0.184375
c70864a5d3c270e78a0bc9da8738245a6e27664f
3,624
py
Python
utils/edit_utils.py
ermekaitygulov/STIT
93dca8d589b555fa99a5c5438a8517a52d8898c3
[ "BSD-3-Clause", "BSD-2-Clause", "MIT" ]
6
2022-03-11T23:42:12.000Z
2022-03-28T09:39:25.000Z
utils/edit_utils.py
bycloudai/STIT-Windows
cadb2a01457bfd1c90bcd8d220587b48e1c2327a
[ "BSD-3-Clause", "BSD-2-Clause", "MIT" ]
null
null
null
utils/edit_utils.py
bycloudai/STIT-Windows
cadb2a01457bfd1c90bcd8d220587b48e1c2327a
[ "BSD-3-Clause", "BSD-2-Clause", "MIT" ]
null
null
null
import argparse import math import os import pickle from typing import List import cv2 import numpy as np import torch from PIL import Image, ImageDraw, ImageFont import configs.paths_config from configs import paths_config from training.networks import SynthesisBlock def add_texts_to_image_vertical(texts, pivot_im...
32.648649
117
0.683499
0
0
0
0
0
0
0
0
97
0.026766
c7087550ae8556b1933bc7961a3ed0e9783aaa07
6,845
py
Python
conll_df/conll_df.py
interrogator/conll-df
35611f295e3f8230f574142151e3a19098edfdca
[ "MIT" ]
27
2017-03-17T15:39:16.000Z
2021-11-23T09:10:10.000Z
conll_df/conll_df.py
interrogator/conll-df
35611f295e3f8230f574142151e3a19098edfdca
[ "MIT" ]
2
2017-11-21T05:33:04.000Z
2018-09-22T13:05:06.000Z
conll_df/conll_df.py
interrogator/conll-df
35611f295e3f8230f574142151e3a19098edfdca
[ "MIT" ]
8
2017-03-17T14:59:34.000Z
2022-02-25T19:09:27.000Z
import pandas as pd # UD 1.0 CONLL_COLUMNS = ['i', 'w', 'l', 'p', 'n', 'm', 'g', 'f', 'd', 'c'] # UD 2.0 CONLL_COLUMNS_V2 = ['i', 'w', 'l', 'x', 'p', 'm', 'g', 'f', 'e', 'o'] # possible morphological attributes MORPH_ATTS = ['type', 'animacy', #'gender', 'number' ...
30.154185
100
0.512491
0
0
0
0
0
0
0
0
1,804
0.26355
c708da26fb5e59e5b2a82edc62ad3d6177cc9df2
2,491
py
Python
scripts/postgres_to_lmdb_bars_60m.py
alexanu/atpy
3f4b5cfe7de7633ef053d2feaddae421806a9799
[ "MIT" ]
24
2018-03-22T06:22:11.000Z
2022-03-14T09:04:44.000Z
scripts/postgres_to_lmdb_bars_60m.py
alexanu/atpy
3f4b5cfe7de7633ef053d2feaddae421806a9799
[ "MIT" ]
null
null
null
scripts/postgres_to_lmdb_bars_60m.py
alexanu/atpy
3f4b5cfe7de7633ef053d2feaddae421806a9799
[ "MIT" ]
9
2018-03-22T06:22:11.000Z
2020-09-19T16:47:13.000Z
#!/bin/python3 import argparse import datetime import functools import logging import os import psycopg2 from dateutil.relativedelta import relativedelta from atpy.data.cache.lmdb_cache import * from atpy.data.cache.postgres_cache import BarsInPeriodProvider from atpy.data.cache.postgres_cache import request_adjustm...
43.701754
158
0.733842
0
0
0
0
0
0
0
0
394
0.158169
c7091f356e0452faea68f2b17a6227d31b0f1d34
746
py
Python
src/download_pdf.py
luccanunes/class-url-automation
6ccb77feaa9aede4c8475d9f79149cc8c2c31cc4
[ "MIT" ]
1
2020-10-17T02:08:10.000Z
2020-10-17T02:08:10.000Z
src/download_pdf.py
luccanunes/class-url-automation
6ccb77feaa9aede4c8475d9f79149cc8c2c31cc4
[ "MIT" ]
null
null
null
src/download_pdf.py
luccanunes/class-url-automation
6ccb77feaa9aede4c8475d9f79149cc8c2c31cc4
[ "MIT" ]
1
2020-12-20T23:53:30.000Z
2020-12-20T23:53:30.000Z
def download_pdf(URL): from selenium import webdriver from time import sleep URL = URL options = webdriver.ChromeOptions() options.add_experimental_option('prefs', { # Change default directory for downloads "download.default_directory": r"E:\coding\other\class-url-automation\src\pdf...
35.52381
87
0.687668
0
0
0
0
0
0
0
0
333
0.446381
c709a775fc2c2a745cb1ed61a6cbd8778daaee06
609
py
Python
datadog_checks_dev/datadog_checks/dev/tooling/commands/env/__init__.py
vbarbaresi/integrations-core
ab26ab1cd6c28a97c1ad1177093a93659658c7aa
[ "BSD-3-Clause" ]
1
2021-01-28T01:45:37.000Z
2021-01-28T01:45:37.000Z
datadog_checks_dev/datadog_checks/dev/tooling/commands/env/__init__.py
vbarbaresi/integrations-core
ab26ab1cd6c28a97c1ad1177093a93659658c7aa
[ "BSD-3-Clause" ]
3
2021-01-27T04:56:40.000Z
2021-02-26T06:29:22.000Z
datadog_checks_dev/datadog_checks/dev/tooling/commands/env/__init__.py
vbarbaresi/integrations-core
ab26ab1cd6c28a97c1ad1177093a93659658c7aa
[ "BSD-3-Clause" ]
1
2021-04-07T16:58:27.000Z
2021-04-07T16:58:27.000Z
# (C) Datadog, Inc. 2018-present # All rights reserved # Licensed under a 3-clause BSD style license (see LICENSE) import click from ..console import CONTEXT_SETTINGS from .check import check_run from .ls import ls from .prune import prune from .reload import reload_env from .shell import shell from .start import star...
23.423077
81
0.771757
0
0
0
0
101
0.165846
0
0
133
0.218391
c709d0df6d7c96b0dace86ff6283e481bd4f3000
8,584
py
Python
sdk/python/pulumi_azure_nextgen/marketplace/private_store_offer.py
pulumi/pulumi-azure-nextgen
452736b0a1cf584c2d4c04666e017af6e9b2c15c
[ "Apache-2.0" ]
31
2020-09-21T09:41:01.000Z
2021-02-26T13:21:59.000Z
sdk/python/pulumi_azure_nextgen/marketplace/private_store_offer.py
pulumi/pulumi-azure-nextgen
452736b0a1cf584c2d4c04666e017af6e9b2c15c
[ "Apache-2.0" ]
231
2020-09-21T09:38:45.000Z
2021-03-01T11:16:03.000Z
sdk/python/pulumi_azure_nextgen/marketplace/private_store_offer.py
pulumi/pulumi-azure-nextgen
452736b0a1cf584c2d4c04666e017af6e9b2c15c
[ "Apache-2.0" ]
4
2020-09-29T14:14:59.000Z
2021-02-10T20:38:16.000Z
# coding=utf-8 # *** WARNING: this file was generated by the Pulumi SDK Generator. *** # *** Do not edit by hand unless you're certain you know what you are doing! *** import warnings import pulumi import pulumi.runtime from typing import Any, Mapping, Optional, Sequence, Union from .. import _utilities, _tables from ...
40.11215
230
0.646086
8,165
0.951188
0
0
3,773
0.439539
0
0
3,569
0.415774
c70a49b112aadc6ae32c90aac8b9581dc39ca540
1,491
py
Python
examples/custom_shape/stages.py
oksumoron/locust
fddfefe7ef1082bc5284cd2dd8477221484dfb0c
[ "MIT" ]
18,336
2015-01-03T20:38:40.000Z
2022-03-31T16:02:35.000Z
examples/custom_shape/stages.py
oksumoron/locust
fddfefe7ef1082bc5284cd2dd8477221484dfb0c
[ "MIT" ]
1,779
2015-01-01T02:09:30.000Z
2022-03-31T09:58:10.000Z
examples/custom_shape/stages.py
oksumoron/locust
fddfefe7ef1082bc5284cd2dd8477221484dfb0c
[ "MIT" ]
2,689
2015-01-05T02:01:50.000Z
2022-03-31T13:13:09.000Z
from locust import HttpUser, TaskSet, task, constant from locust import LoadTestShape class UserTasks(TaskSet): @task def get_root(self): self.client.get("/") class WebsiteUser(HttpUser): wait_time = constant(0.5) tasks = [UserTasks] class StagesShape(LoadTestShape): """ A simply l...
29.82
90
0.602951
1,396
0.936284
0
0
58
0.0389
0
0
766
0.513749
c70b23f1cce14640f16607fb8ec77754089292bc
2,115
py
Python
db/seed_ids.py
xtuyaowu/jtyd_python_spider
ca5c3efd5519f592c0d587c22f03812e7756c8ea
[ "MIT" ]
7
2017-08-19T22:36:29.000Z
2018-06-03T07:02:04.000Z
db/seed_ids.py
xtuyaowu/jtyd_python_spider
ca5c3efd5519f592c0d587c22f03812e7756c8ea
[ "MIT" ]
2
2021-04-30T20:37:14.000Z
2021-12-13T19:46:29.000Z
db/seed_ids.py
xtuyaowu/jtyd_python_spider
ca5c3efd5519f592c0d587c22f03812e7756c8ea
[ "MIT" ]
4
2017-09-06T03:00:11.000Z
2017-12-10T08:04:21.000Z
# coding:utf-8 from sqlalchemy import text from db.basic_db import db_session from db.models import SeedIds from decorators.decorator import db_commit_decorator def get_seed(): """ Get all user id to be crawled :return: user ids """ return db_session.query(SeedIds).filter(text('status=0')).all() d...
24.593023
99
0.659102
0
0
0
0
1,323
0.625532
0
0
553
0.261466
c70b35ed30f0bbb93f6ab0a59185f9e44b410fce
16,745
py
Python
tobler/area_weighted/area_interpolate.py
sjsrey/tobler
8e3ebd5d01de459e4387fabd57cbb12cb6735596
[ "BSD-3-Clause" ]
1
2019-06-21T19:32:22.000Z
2019-06-21T19:32:22.000Z
tobler/area_weighted/area_interpolate.py
sjsrey/tobler
8e3ebd5d01de459e4387fabd57cbb12cb6735596
[ "BSD-3-Clause" ]
null
null
null
tobler/area_weighted/area_interpolate.py
sjsrey/tobler
8e3ebd5d01de459e4387fabd57cbb12cb6735596
[ "BSD-3-Clause" ]
null
null
null
""" Area Weighted Interpolation """ import numpy as np import geopandas as gpd from ._vectorized_raster_interpolation import _fast_append_profile_in_gdf import warnings from scipy.sparse import dok_matrix, diags, coo_matrix import pandas as pd from tobler.util.util import _check_crs, _nan_check, _inf_check, _check_p...
33.828283
225
0.657928
0
0
0
0
0
0
0
0
9,059
0.540997
c70bc413822aaad70486fa31ce67b5a7d9e44d76
49,568
py
Python
cave/com.raytheon.viz.gfe/python/autotest/VTEC_GHG_FFA_TestScript.py
srcarter3/awips2
37f31f5e88516b9fd576eaa49d43bfb762e1d174
[ "Apache-2.0" ]
null
null
null
cave/com.raytheon.viz.gfe/python/autotest/VTEC_GHG_FFA_TestScript.py
srcarter3/awips2
37f31f5e88516b9fd576eaa49d43bfb762e1d174
[ "Apache-2.0" ]
null
null
null
cave/com.raytheon.viz.gfe/python/autotest/VTEC_GHG_FFA_TestScript.py
srcarter3/awips2
37f31f5e88516b9fd576eaa49d43bfb762e1d174
[ "Apache-2.0" ]
1
2021-10-30T00:03:05.000Z
2021-10-30T00:03:05.000Z
## # This software was developed and / or modified by Raytheon Company, # pursuant to Contract DG133W-05-CQ-1067 with the US Government. # # U.S. EXPORT CONTROLLED TECHNICAL DATA # This software product contains export-restricted data whose # export/transfer/disclosure is restricted by U.S. law. Dissemination # to ...
47.342884
261
0.588162
0
0
0
0
0
0
0
0
37,653
0.759623
c70bf8219d2bb2dabd3039c6feeeaba05de046c4
1,701
py
Python
main.py
hasanzadeh99/mapna_test_2021
1e2e50a9aff32e2d730bf3d0fd20393e5aea0872
[ "MIT" ]
null
null
null
main.py
hasanzadeh99/mapna_test_2021
1e2e50a9aff32e2d730bf3d0fd20393e5aea0872
[ "MIT" ]
null
null
null
main.py
hasanzadeh99/mapna_test_2021
1e2e50a9aff32e2d730bf3d0fd20393e5aea0872
[ "MIT" ]
null
null
null
import time old_input_value = False flag_falling_edge = None start = None flag_output_mask = False DELAY_CONST = 10 # delay time from falling edge ... . output = None def response_function(): global old_input_value, flag_falling_edge, start, flag_output_mask, output if flag_falling...
25.772727
79
0.621399
0
0
0
0
0
0
0
0
281
0.165197
c70c23e78ecc9c77169196b937ad121dbbab19c4
1,345
py
Python
ansiblemetrics/playbook/num_deprecated_modules.py
radon-h2020/AnsibleMetrics
8a8e27d9b54fc1578d00526c8663184a2e686cb2
[ "Apache-2.0" ]
1
2020-04-24T16:09:14.000Z
2020-04-24T16:09:14.000Z
ansiblemetrics/playbook/num_deprecated_modules.py
radon-h2020/AnsibleMetrics
8a8e27d9b54fc1578d00526c8663184a2e686cb2
[ "Apache-2.0" ]
null
null
null
ansiblemetrics/playbook/num_deprecated_modules.py
radon-h2020/AnsibleMetrics
8a8e27d9b54fc1578d00526c8663184a2e686cb2
[ "Apache-2.0" ]
null
null
null
from ansiblemetrics.ansible_modules import DEPRECATED_MODULES_LIST from ansiblemetrics.ansible_metric import AnsibleMetric class NumDeprecatedModules(AnsibleMetric): """ This class measures the number of times tasks use deprecated modules.""" def count(self): """Return the deprecated modules occurren...
25.377358
90
0.553903
1,219
0.90632
0
0
0
0
0
0
886
0.658736
c70c9127731c0e67539a6749c14a06e75f1c3481
789
py
Python
app/api/v1/validators/validators.py
GraceKiarie/iReporter
1011f878f9fb643798192aeed1b68c3e6de4dedc
[ "MIT" ]
1
2018-12-14T09:52:39.000Z
2018-12-14T09:52:39.000Z
app/api/v1/validators/validators.py
GraceKiarie/iReporter
1011f878f9fb643798192aeed1b68c3e6de4dedc
[ "MIT" ]
6
2018-12-08T11:15:46.000Z
2018-12-15T11:04:36.000Z
app/api/v1/validators/validators.py
GraceKiarie/iReporter
1011f878f9fb643798192aeed1b68c3e6de4dedc
[ "MIT" ]
5
2018-12-04T11:00:54.000Z
2019-06-13T12:53:50.000Z
""" This module does validation for data input in incidents """ import re class Validate(): """ methods for validatin incidents input data """ def valid_email(self, email): self.vemail = re.match( r"(^[a-zA-Z0-9_.+-]+@[a-zA-Z0-9-]+\.[a-zA-Z0-9-.]+$)", email) if not self.vem...
24.65625
70
0.532319
707
0.896071
0
0
0
0
0
0
264
0.334601
c70da4e644f1e748e2087d4c879dc99b2751ebd0
2,710
py
Python
bin/find_latest_versions.py
ebreton/ghost-in-a-shell
8b3382d60a86322c74c6ee1b52f068dfcfc3d79e
[ "MIT" ]
2
2018-05-31T08:56:16.000Z
2020-01-23T15:12:44.000Z
bin/find_latest_versions.py
ebreton/ghost-in-a-shell
8b3382d60a86322c74c6ee1b52f068dfcfc3d79e
[ "MIT" ]
null
null
null
bin/find_latest_versions.py
ebreton/ghost-in-a-shell
8b3382d60a86322c74c6ee1b52f068dfcfc3d79e
[ "MIT" ]
null
null
null
#!/usr/bin/python from distutils.version import LooseVersion import argparse import logging import requests import re session = requests.Session() # authorization token TOKEN_URL = "https://auth.docker.io/token?service=registry.docker.io&scope=repository:%s:pull" # find all tags TAGS_URL = "https://index.docker.io...
30.449438
94
0.667897
1,090
0.402214
0
0
0
0
0
0
922
0.340221
c70ef8c2db16a8357afdb58004c2cb5a69fd6d01
326
py
Python
tests/conftest.py
badarsebard/terraform-pytest
58c8096f0405ec1d0061723fc1dd2d099655c3c5
[ "MIT" ]
null
null
null
tests/conftest.py
badarsebard/terraform-pytest
58c8096f0405ec1d0061723fc1dd2d099655c3c5
[ "MIT" ]
null
null
null
tests/conftest.py
badarsebard/terraform-pytest
58c8096f0405ec1d0061723fc1dd2d099655c3c5
[ "MIT" ]
1
2021-11-19T16:36:31.000Z
2021-11-19T16:36:31.000Z
from .terraform import TerraformManager import pytest from _pytest.tmpdir import TempPathFactory @pytest.fixture(scope='session') def tfenv(tmp_path_factory: TempPathFactory): env_vars = { } with TerraformManager(path_factory=tmp_path_factory, env_vars=env_vars) as deployment: yield deplo...
25.076923
90
0.760736
0
0
193
0.592025
226
0.693252
0
0
9
0.027607
c70f068d9386d59199952ccdcd03582e192c0909
2,933
py
Python
pelicanconf.py
myrle-krantz/treasurer-site
e0beca3d0d724ae09300974f7020a5611fbd3034
[ "Apache-2.0" ]
1
2021-11-09T21:42:44.000Z
2021-11-09T21:42:44.000Z
pelicanconf.py
myrle-krantz/treasurer-site
e0beca3d0d724ae09300974f7020a5611fbd3034
[ "Apache-2.0" ]
1
2021-11-01T11:14:10.000Z
2021-11-01T11:14:10.000Z
pelicanconf.py
isabella232/treasurer-site
9a2e33c85e040183df049d63814ef6b1b0bb7a46
[ "Apache-2.0" ]
3
2021-06-04T09:07:48.000Z
2021-11-09T21:42:31.000Z
#!/usr/bin/env python # -*- coding: utf-8 -*- # # vim: encoding=utf-8 # # 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 yo...
27.411215
99
0.715309
0
0
0
0
0
0
0
0
2,064
0.703716
c70f37923d6264953c0f43a70aaafcb143563524
10,935
py
Python
TurtleArt/taturtle.py
sugar-activities/4585-activity
38e6efd7b4fcb9cf820efaf7406ce7abde92406e
[ "MIT" ]
null
null
null
TurtleArt/taturtle.py
sugar-activities/4585-activity
38e6efd7b4fcb9cf820efaf7406ce7abde92406e
[ "MIT" ]
null
null
null
TurtleArt/taturtle.py
sugar-activities/4585-activity
38e6efd7b4fcb9cf820efaf7406ce7abde92406e
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- #Copyright (c) 2010,12 Walter Bender #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 without limitation the rights #to use, copy, modify, ...
34.936102
78
0.561225
9,194
0.840786
0
0
0
0
0
0
2,695
0.246456
c71003847371f17bbe96951b791e894ed7483c4a
1,384
py
Python
django_backend/group.py
holg/django_backend
6cef76a378664e6621619862e6db476788a58992
[ "BSD-3-Clause" ]
null
null
null
django_backend/group.py
holg/django_backend
6cef76a378664e6621619862e6db476788a58992
[ "BSD-3-Clause" ]
null
null
null
django_backend/group.py
holg/django_backend
6cef76a378664e6621619862e6db476788a58992
[ "BSD-3-Clause" ]
null
null
null
try: from django.forms.utils import pretty_name except ImportError: from django.forms.forms import pretty_name from django.template import Context from django.template.loader import render_to_string from .compat import context_flatten class Group(list): """ A simplistic representation of backends tha...
28.833333
77
0.66474
1,137
0.821532
0
0
59
0.04263
0
0
199
0.143786
c7102803d3080f23edcd56ddbfc0360cc305ab8a
971
py
Python
src/eodc_openeo_bindings/map_comparison_processes.py
eodcgmbh/eodc-openeo-bindings
4e80eba036771a0c81359e1ac66862f1eead407b
[ "MIT" ]
null
null
null
src/eodc_openeo_bindings/map_comparison_processes.py
eodcgmbh/eodc-openeo-bindings
4e80eba036771a0c81359e1ac66862f1eead407b
[ "MIT" ]
7
2020-02-18T17:12:31.000Z
2020-09-24T07:19:04.000Z
src/eodc_openeo_bindings/map_comparison_processes.py
eodcgmbh/eodc-openeo-bindings
4e80eba036771a0c81359e1ac66862f1eead407b
[ "MIT" ]
null
null
null
""" """ from eodc_openeo_bindings.map_utils import map_default def map_lt(process): """ """ param_dict = {'y': 'float'} return map_default(process, 'lt', 'apply', param_dict) def map_lte(process): """ """ param_dict = {'y': 'float'} return map_default(process, 'lte', 'apply',...
15.918033
59
0.589083
0
0
0
0
0
0
0
0
315
0.324408
c711129f24117223c3e97558213be4cfb18083e6
38
py
Python
scripts/flow_tests/__init__.py
rombie/contrail-test
a68c71d6f282142501a7e2e889bbb232fdd82dc3
[ "Apache-2.0" ]
5
2020-09-29T00:36:57.000Z
2022-02-16T06:51:32.000Z
serial_scripts/system_test/flow_tests/__init__.py
vkolli/contrail-test-perf
db04b8924a2c330baabe3059788b149d957a7d67
[ "Apache-2.0" ]
27
2019-11-02T02:18:34.000Z
2022-02-24T18:49:08.000Z
serial_scripts/system_test/flow_tests/__init__.py
vkolli/contrail-test-perf
db04b8924a2c330baabe3059788b149d957a7d67
[ "Apache-2.0" ]
20
2019-11-28T16:02:25.000Z
2022-01-06T05:56:58.000Z
"""FLOW RELATED SYSTEM TEST CASES."""
19
37
0.684211
0
0
0
0
0
0
0
0
37
0.973684
c711b732931b1daa135dbab87c710f6b0e8237b0
1,444
py
Python
server/main.py
KejiaQiang/Spicy_pot_search
72aaa9618e54178da513371802c2bcb751037bb0
[ "MIT" ]
1
2021-03-04T09:02:05.000Z
2021-03-04T09:02:05.000Z
server/main.py
yanansong0930/Spicy_pot_search
72aaa9618e54178da513371802c2bcb751037bb0
[ "MIT" ]
null
null
null
server/main.py
yanansong0930/Spicy_pot_search
72aaa9618e54178da513371802c2bcb751037bb0
[ "MIT" ]
1
2021-03-04T08:59:02.000Z
2021-03-04T08:59:02.000Z
#!/usr/bin/python # -*- coding: utf-8 -*- from flask import Flask, request, abort, render_template from datetime import timedelta import pymysql from search import start_search, decorate page_dir = "E:/WEBPAGES_RAW" app = Flask(__name__) app.config['DEBUG'] = True app.config['SEND_FILE_MAX_AGE_DEFAULT'] ...
29.469388
103
0.637812
0
0
0
0
923
0.639197
0
0
319
0.220914
c711e0dd9090b2b45a4e1e0eca15dbcffe106551
5,355
py
Python
examples/3d/subduction/viz/plot_dispwarp.py
cehanagan/pylith
cf5c1c34040460a82f79b6eb54df894ed1b1ee93
[ "MIT" ]
93
2015-01-08T16:41:22.000Z
2022-02-25T13:40:02.000Z
examples/3d/subduction/viz/plot_dispwarp.py
sloppyjuicy/pylith
ac2c1587f87e45c948638b19560813d4d5b6a9e3
[ "MIT" ]
277
2015-02-20T16:27:35.000Z
2022-03-30T21:13:09.000Z
examples/3d/subduction/viz/plot_dispwarp.py
sloppyjuicy/pylith
ac2c1587f87e45c948638b19560813d4d5b6a9e3
[ "MIT" ]
71
2015-03-24T12:11:08.000Z
2022-03-03T04:26:02.000Z
#!/usr/bin/env pvpython # -*- Python -*- (syntax highlighting) # ---------------------------------------------------------------------- # # Brad T. Aagaard, U.S. Geological Survey # Charles A. Williams, GNS Science # Matthew G. Knepley, University at Buffalo # # This code was developed as part of the Computational Infr...
35
118
0.651727
400
0.074697
0
0
0
0
0
0
2,213
0.413259
c713402fab437e2023ffb914ab06de89a1b21a69
220
py
Python
src/spaceone/inventory/manager/rds_manager.py
jean1042/plugin-aws-cloud-services
1cf192557b03478af33ae81f40b2a49f735716bb
[ "Apache-2.0" ]
4
2020-06-22T01:48:07.000Z
2020-08-24T00:51:09.000Z
src/spaceone/inventory/manager/rds_manager.py
jean1042/plugin-aws-cloud-services
1cf192557b03478af33ae81f40b2a49f735716bb
[ "Apache-2.0" ]
2
2020-07-20T01:58:32.000Z
2020-08-04T07:41:37.000Z
src/spaceone/inventory/manager/rds_manager.py
jean1042/plugin-aws-cloud-services
1cf192557b03478af33ae81f40b2a49f735716bb
[ "Apache-2.0" ]
6
2020-06-22T09:19:40.000Z
2020-09-17T06:35:37.000Z
from spaceone.inventory.libs.manager import AWSManager # todo: __init__에서 한번에 명세 할수 있게 바꾸기 # 지금은 로케이터에서 글로벌에서 값을 가져오는 로직 때문에 별도 파일이 없으면 에러 발생 class RDSConnectorManager(AWSManager): connector_name = 'RDSConnector'
24.444444
54
0.777273
74
0.229814
0
0
0
0
0
0
201
0.624224
c714251263633c1447c106182ffec957c2c483cc
1,775
py
Python
script/upload-checksums.py
fireball-x/atom-shell
d229338e40058a9b4323b2544f62818a3c55748c
[ "MIT" ]
4
2016-04-02T14:53:54.000Z
2017-07-26T05:47:43.000Z
script/upload-checksums.py
cocos-creator/atom-shell
d229338e40058a9b4323b2544f62818a3c55748c
[ "MIT" ]
null
null
null
script/upload-checksums.py
cocos-creator/atom-shell
d229338e40058a9b4323b2544f62818a3c55748c
[ "MIT" ]
2
2015-07-18T09:31:03.000Z
2019-12-24T09:55:03.000Z
#!/usr/bin/env python import argparse import hashlib import os import tempfile from lib.config import s3_config from lib.util import download, rm_rf, s3put DIST_URL = 'https://atom.io/download/atom-shell/' def main(): args = parse_args() url = DIST_URL + args.version + '/' directory, files = download_files...
23.666667
75
0.668169
0
0
0
0
0
0
0
0
318
0.179155
c71481b1ca69523b36b0345fe995b27fb6d37535
2,533
py
Python
pythoncode/kmeansimage.py
loganpadon/PokemonOneShot
22f9904250c8c90b4fe4573d6ca060fd9f95c1d3
[ "MIT" ]
null
null
null
pythoncode/kmeansimage.py
loganpadon/PokemonOneShot
22f9904250c8c90b4fe4573d6ca060fd9f95c1d3
[ "MIT" ]
1
2019-04-04T20:40:20.000Z
2019-04-04T20:40:20.000Z
pythoncode/kmeansimage.py
loganpadon/PokemonOneShot
22f9904250c8c90b4fe4573d6ca060fd9f95c1d3
[ "MIT" ]
null
null
null
# import the necessary packages from sklearn.cluster import KMeans import skimage import matplotlib.pyplot as plt import argparse import cv2 def mean_image(image,clt): image2=image for x in range(len(image2)): classes=clt.predict(image2[x]) for y in range(len(classes)): image2[x,y]=clt.cluster_cen...
28.460674
78
0.696802
0
0
0
0
0
0
0
0
861
0.339913
c716271a9b4b9b525bfcb14f8c07170e7179b37f
134
py
Python
tests/encode.py
EddieBreeg/C_b64
d49b155d1ae889c2ab779f54e6215f9d5e1031e6
[ "MIT" ]
null
null
null
tests/encode.py
EddieBreeg/C_b64
d49b155d1ae889c2ab779f54e6215f9d5e1031e6
[ "MIT" ]
null
null
null
tests/encode.py
EddieBreeg/C_b64
d49b155d1ae889c2ab779f54e6215f9d5e1031e6
[ "MIT" ]
null
null
null
from sys import argv from base64 import b64encode with open("data", 'rb') as fIn: b = fIn.read() print(b64encode(b).decode())
22.333333
32
0.671642
0
0
0
0
0
0
0
0
10
0.074627
c7162d1c243872610bbf29a5583204c35093859d
1,691
py
Python
src/json_sort/lib.py
cdumay/json-sort
a76fe2deaad649264e8ca0d1cc096d9741c60a04
[ "Apache-2.0" ]
3
2017-01-03T14:36:25.000Z
2021-03-06T05:42:08.000Z
src/json_sort/lib.py
cdumay/json-sort
a76fe2deaad649264e8ca0d1cc096d9741c60a04
[ "Apache-2.0" ]
null
null
null
src/json_sort/lib.py
cdumay/json-sort
a76fe2deaad649264e8ca0d1cc096d9741c60a04
[ "Apache-2.0" ]
null
null
null
#!/usr/bin/env python # -*- coding: utf-8 -*- """ .. codeauthor:: Cédric Dumay <cedric.dumay@gmail.com> """ import logging import sys, os, json from cdumay_rest_client.client import RESTClient from cdumay_rest_client.exceptions import NotFound, HTTPException class NoSuchFile(NotFound): """NoSuchFile""" def o...
23.486111
73
0.622708
48
0.028369
0
0
0
0
0
0
376
0.222222
c7165074ee0affcd71c302a41edf2c2139ea9a06
4,484
py
Python
test/test_create_dataset.py
gregstarr/ttools
fc8dcbf094370e9885311126724697830167d931
[ "MIT" ]
null
null
null
test/test_create_dataset.py
gregstarr/ttools
fc8dcbf094370e9885311126724697830167d931
[ "MIT" ]
null
null
null
test/test_create_dataset.py
gregstarr/ttools
fc8dcbf094370e9885311126724697830167d931
[ "MIT" ]
null
null
null
import numpy as np import pytest import apexpy import tempfile import os import h5py from ttools import create_dataset, config, io, utils map_periods = [np.timedelta64(10, 'm'), np.timedelta64(30, 'm'), np.timedelta64(1, 'h'), np.timedelta64(2, 'h')] @pytest.fixture def times(): yield np.datetime64('2010-01-01T...
40.396396
115
0.599242
0
0
101
0.022525
2,131
0.475245
0
0
289
0.064451
c717ca8a8d1e158509ebb8f364af201eeca89e64
296
py
Python
docs_src/options/callback/tutorial001.py
madkinsz/typer
a1520dcda685220a9a796288f5eaaebd00d68845
[ "MIT" ]
7,615
2019-12-24T13:08:20.000Z
2022-03-31T22:07:53.000Z
docs_src/options/callback/tutorial001.py
madkinsz/typer
a1520dcda685220a9a796288f5eaaebd00d68845
[ "MIT" ]
351
2019-12-24T22:17:54.000Z
2022-03-31T15:35:08.000Z
docs_src/options/callback/tutorial001.py
jina-ai/typer
8b5e14b25ddf0dd777403015883301b17bedcee0
[ "MIT" ]
360
2019-12-24T15:29:59.000Z
2022-03-30T20:33:10.000Z
import typer def name_callback(value: str): if value != "Camila": raise typer.BadParameter("Only Camila is allowed") return value def main(name: str = typer.Option(..., callback=name_callback)): typer.echo(f"Hello {name}") if __name__ == "__main__": typer.run(main)
18.5
64
0.658784
0
0
0
0
0
0
0
0
57
0.192568
c719c2fbf99902f8dda33cce99ae748883db934d
3,276
py
Python
qft-client-py2.py
bocajspear1/qft
7a8f3bb5d24bf173489dc4ad6159021e9365e9c4
[ "MIT" ]
null
null
null
qft-client-py2.py
bocajspear1/qft
7a8f3bb5d24bf173489dc4ad6159021e9365e9c4
[ "MIT" ]
null
null
null
qft-client-py2.py
bocajspear1/qft
7a8f3bb5d24bf173489dc4ad6159021e9365e9c4
[ "MIT" ]
null
null
null
import socket import threading from time import sleep from threading import Thread import json import sys def display_test(address, port,text_result, test): if (text_result == "QFT_SUCCESS" and test == True) or (text_result != "QFT_SUCCESS" and test == False): # Test is correct ...
30.616822
108
0.514042
0
0
0
0
0
0
0
0
686
0.209402
c719cc42bfa09eeceed2d7963f0cd71faeceedf7
14,277
py
Python
mdemanipulation/src/mdeoperation.py
modelia/ai-for-model-manipulation
0b15b9d59b0f6009a5709b20db4e55b7d511ac38
[ "BSD-3-Clause" ]
null
null
null
mdemanipulation/src/mdeoperation.py
modelia/ai-for-model-manipulation
0b15b9d59b0f6009a5709b20db4e55b7d511ac38
[ "BSD-3-Clause" ]
1
2022-01-10T14:16:48.000Z
2022-01-10T14:16:48.000Z
mdemanipulation/src/mdeoperation.py
modelia/ai-for-model-manipulation
0b15b9d59b0f6009a5709b20db4e55b7d511ac38
[ "BSD-3-Clause" ]
null
null
null
#!/usr/bin/env python2 import math import os import random import sys import time import logging import argparse import numpy as np from six.moves import xrange import json import torch import torch.nn as nn import torch.optim as optim from torch import cuda from torch.autograd import Variable from torch.nn.utils im...
43.794479
155
0.665826
0
0
0
0
0
0
0
0
2,982
0.208867
c71a546240f7c071174fd45a93cc36d20aa838b4
5,388
py
Python
barbican/common/resources.py
stanzikratel/barbican-2
10fae57c1cae3e140c19069a48f562d62ca53663
[ "Apache-2.0" ]
null
null
null
barbican/common/resources.py
stanzikratel/barbican-2
10fae57c1cae3e140c19069a48f562d62ca53663
[ "Apache-2.0" ]
null
null
null
barbican/common/resources.py
stanzikratel/barbican-2
10fae57c1cae3e140c19069a48f562d62ca53663
[ "Apache-2.0" ]
null
null
null
# Copyright (c) 2013-2014 Rackspace, 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 ...
37.416667
76
0.625464
0
0
0
0
0
0
0
0
2,188
0.406088
c71ac734d6782f901c4c5400d878122dd11ea416
567
py
Python
7/prime.py
redfast00/euler
98fc49a1fcb8b49415cc4384952a6447378bd4f4
[ "MIT" ]
null
null
null
7/prime.py
redfast00/euler
98fc49a1fcb8b49415cc4384952a6447378bd4f4
[ "MIT" ]
null
null
null
7/prime.py
redfast00/euler
98fc49a1fcb8b49415cc4384952a6447378bd4f4
[ "MIT" ]
null
null
null
from math import sqrt def stream_primes(num): primes = [] candidate = 2 for i in range(num): prime = next_prime(primes, candidate) primes.append(prime) candidate = prime + 1 yield prime def next_prime(primes, candidate): while True: for prime in primes: ...
22.68
45
0.560847
0
0
207
0.365079
0
0
0
0
0
0
c71be407b214b6130f22496ab986a3ca003cfe56
777
py
Python
app/utils.py
HealYouDown/flo-league
c729cad1daddfb89e997c101bd2da505b7137d98
[ "MIT" ]
null
null
null
app/utils.py
HealYouDown/flo-league
c729cad1daddfb89e997c101bd2da505b7137d98
[ "MIT" ]
3
2021-05-03T19:05:11.000Z
2021-06-12T09:43:02.000Z
app/utils.py
HealYouDown/flo-league
c729cad1daddfb89e997c101bd2da505b7137d98
[ "MIT" ]
null
null
null
import datetime from app.models import Log from flask_login import current_user from app.extensions import db # https://stackoverflow.com/questions/6558535/find-the-date-for-the-first-monday-after-a-given-date def next_weekday( d: datetime.datetime = datetime.datetime.utcnow(), weekday: int = 0, ) -> datetime...
28.777778
99
0.705277
0
0
0
0
0
0
0
0
181
0.232947
c71c00b730b4e3cf508cdefb7968765436ad7ce3
68,625
py
Python
benchmarks/SimResults/combinations_spec_mylocality/oldstuff/cmp_soplexmcfcalculixgcc/power.py
TugberkArkose/MLScheduler
e493b6cbf7b9d29a2c9300d7dd6f0c2f102e4061
[ "Unlicense" ]
null
null
null
benchmarks/SimResults/combinations_spec_mylocality/oldstuff/cmp_soplexmcfcalculixgcc/power.py
TugberkArkose/MLScheduler
e493b6cbf7b9d29a2c9300d7dd6f0c2f102e4061
[ "Unlicense" ]
null
null
null
benchmarks/SimResults/combinations_spec_mylocality/oldstuff/cmp_soplexmcfcalculixgcc/power.py
TugberkArkose/MLScheduler
e493b6cbf7b9d29a2c9300d7dd6f0c2f102e4061
[ "Unlicense" ]
null
null
null
power = {'BUSES': {'Area': 1.33155, 'Bus/Area': 1.33155, 'Bus/Gate Leakage': 0.00662954, 'Bus/Peak Dynamic': 0.0, 'Bus/Runtime Dynamic': 0.0, 'Bus/Subthreshold Leakage': 0.0691322, 'Bus/Subthreshold Leakage with power gating': 0.0259246, 'Gate...
75.082057
124
0.682157
0
0
0
0
0
0
0
0
46,943
0.684051
c71c6e80583baf2cb3846a4c3d378463d41f4b27
9,582
py
Python
packages/gtmcore/gtmcore/environment/conda.py
gigabackup/gigantum-client
70fe6b39b87b1c56351f2b4c551b6f1693813e4f
[ "MIT" ]
60
2018-09-26T15:46:00.000Z
2021-10-10T02:37:14.000Z
packages/gtmcore/gtmcore/environment/conda.py
gigabackup/gigantum-client
70fe6b39b87b1c56351f2b4c551b6f1693813e4f
[ "MIT" ]
1,706
2018-09-26T16:11:22.000Z
2021-08-20T13:37:59.000Z
packages/gtmcore/gtmcore/environment/conda.py
griffinmilsap/gigantum-client
70fe6b39b87b1c56351f2b4c551b6f1693813e4f
[ "MIT" ]
11
2019-03-14T13:23:51.000Z
2022-01-25T01:29:16.000Z
from typing import List, Dict import json from gtmcore.http import ConcurrentRequestManager, ConcurrentRequest from gtmcore.environment.packagemanager import PackageManager, PackageResult, PackageMetadata from gtmcore.container import container_for_context from gtmcore.labbook import LabBook from gtmcore.logging impor...
40.774468
120
0.611668
9,210
0.961177
0
0
0
0
0
0
3,749
0.391254
c71da90915f08f68f935060eea6dba44dc3beaac
1,147
py
Python
netchos/io/io_mpl_to_px.py
brainets/netchos
ccfcd2ec85894adffbd20fbc67410dbdacfe6812
[ "BSD-3-Clause" ]
11
2021-04-20T19:45:23.000Z
2021-11-17T15:18:33.000Z
netchos/io/io_mpl_to_px.py
brainets/netchos
ccfcd2ec85894adffbd20fbc67410dbdacfe6812
[ "BSD-3-Clause" ]
3
2021-04-26T09:01:42.000Z
2021-06-30T12:09:15.000Z
netchos/io/io_mpl_to_px.py
brainets/netchos
ccfcd2ec85894adffbd20fbc67410dbdacfe6812
[ "BSD-3-Clause" ]
2
2021-05-06T20:28:46.000Z
2021-05-24T10:36:44.000Z
"""Conversion of Matplotlib / Seaborn inputs to plotly.""" import os.path as op from pkg_resources import resource_filename import json def mpl_to_px_inputs(inputs, plt_types=None): """Convert typical matplotlib inputs to plotly to simplify API. Parameters ---------- inputs : dict Dictionary ...
25.488889
77
0.62075
0
0
0
0
0
0
0
0
544
0.474281
c71dc157e40f86937d395921d62896697e8b4c70
186
py
Python
fizzbuzz_for_02.py
toastyxen/FizzBuzz
094270e3882e743a80c5d32b3903c2483d37755f
[ "MIT" ]
null
null
null
fizzbuzz_for_02.py
toastyxen/FizzBuzz
094270e3882e743a80c5d32b3903c2483d37755f
[ "MIT" ]
null
null
null
fizzbuzz_for_02.py
toastyxen/FizzBuzz
094270e3882e743a80c5d32b3903c2483d37755f
[ "MIT" ]
null
null
null
"""Fizzbuzz for loop variant 3""" for x in range(1, 101): OUTPUT = "" if x % 3 == 0: OUTPUT += "Fizz" if x % 5 == 0: OUTPUT += "Buzz" print(OUTPUT or x)
18.6
33
0.473118
0
0
0
0
0
0
0
0
47
0.252688
c71ef3a9007aa0aebc08a606ded35bff47c69406
242
py
Python
cnn/struct/layer/parse_tensor_module.py
hslee1539/GIS_GANs
6901c830b924e59fd06247247db3f925bab26583
[ "MIT" ]
null
null
null
cnn/struct/layer/parse_tensor_module.py
hslee1539/GIS_GANs
6901c830b924e59fd06247247db3f925bab26583
[ "MIT" ]
null
null
null
cnn/struct/layer/parse_tensor_module.py
hslee1539/GIS_GANs
6901c830b924e59fd06247247db3f925bab26583
[ "MIT" ]
null
null
null
from tensor.main_module import Tensor import numpy as np def getTensor(value): if type(value) is np.ndarray: return Tensor.numpy2Tensor(value) elif type(value) is Tensor: return value else: raise Exception
24.2
41
0.68595
0
0
0
0
0
0
0
0
0
0
c71f19c3cf33a6be263067d8b8a273844fc916bd
3,337
py
Python
openstack_dashboard/dashboards/admin/volume_types/qos_specs/forms.py
hemantsonawane95/horizon-apelby
01a5e72219aeca8c1451701ee85e232ed0618751
[ "Apache-2.0" ]
null
null
null
openstack_dashboard/dashboards/admin/volume_types/qos_specs/forms.py
hemantsonawane95/horizon-apelby
01a5e72219aeca8c1451701ee85e232ed0618751
[ "Apache-2.0" ]
null
null
null
openstack_dashboard/dashboards/admin/volume_types/qos_specs/forms.py
hemantsonawane95/horizon-apelby
01a5e72219aeca8c1451701ee85e232ed0618751
[ "Apache-2.0" ]
null
null
null
# 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, software # distributed under t...
39.72619
77
0.585556
2,367
0.70932
0
0
0
0
0
0
1,169
0.350315
c71fc189fa6f73122afbe242bbfd89bd9a8a50ea
9,050
py
Python
data_structure/const_tree.py
alipay/StructuredLM_RTDT
6edf2acf8747e17015523d78b6c580431a4f7b5c
[ "Apache-2.0" ]
42
2021-06-01T07:07:12.000Z
2022-03-18T02:38:53.000Z
data_structure/const_tree.py
alipay/StructuredLM_RTDT
6edf2acf8747e17015523d78b6c580431a4f7b5c
[ "Apache-2.0" ]
1
2021-12-15T03:50:24.000Z
2021-12-15T08:46:56.000Z
data_structure/const_tree.py
alipay/StructuredLM_RTDT
6edf2acf8747e17015523d78b6c580431a4f7b5c
[ "Apache-2.0" ]
7
2021-06-02T02:28:01.000Z
2022-01-14T06:59:29.000Z
# coding=utf-8 # Copyright (c) 2021 Ant Group import sys LABEL_SEP = '@' INDENT_STRING1 = '│   ' INDENT_STRING2 = '├──' EMPTY_TOKEN = '___EMPTY___' def print_tree(const_tree, indent=0, out=sys.stdout): for i in range(indent - 1): out.write(INDENT_STRING1) if indent > 0: out.write(INDENT_STR...
30.782313
98
0.575912
6,953
0.767439
1,207
0.133223
517
0.057064
0
0
611
0.067439
c71fcfdd300a9f0f56bf5188a7e7a694d05f3faa
4,098
py
Python
tests/test_minimize.py
The-Ludwig/iminuit
8eef7b711846d6c8db9fe1fc883f6fa0977eb514
[ "MIT" ]
null
null
null
tests/test_minimize.py
The-Ludwig/iminuit
8eef7b711846d6c8db9fe1fc883f6fa0977eb514
[ "MIT" ]
null
null
null
tests/test_minimize.py
The-Ludwig/iminuit
8eef7b711846d6c8db9fe1fc883f6fa0977eb514
[ "MIT" ]
null
null
null
import pytest from iminuit import minimize import numpy as np from numpy.testing import assert_allclose, assert_equal opt = pytest.importorskip("scipy.optimize") def func(x, *args): c = args[0] if args else 1 return c + x[0] ** 2 + (x[1] - 1) ** 2 + (x[2] - 2) ** 2 def grad(x, *args): return 2 * (x - (...
26.269231
85
0.59346
128
0.031235
0
0
0
0
0
0
211
0.051489
c72190831a83ec1b623a951d123f7148309fad86
2,468
py
Python
murtanto/parsing.py
amandatv20/botfb
2be3ce0265fd86f48f24d2b496d36fd346e49d29
[ "MIT" ]
1
2021-03-24T13:54:33.000Z
2021-03-24T13:54:33.000Z
murtanto/parsing.py
amandatv20/botfb
2be3ce0265fd86f48f24d2b496d36fd346e49d29
[ "MIT" ]
2
2020-06-15T08:10:55.000Z
2020-06-16T15:03:19.000Z
murtanto/parsing.py
amandatv20/botfb
2be3ce0265fd86f48f24d2b496d36fd346e49d29
[ "MIT" ]
null
null
null
# coded by: salism3 # 23 - 05 - 2020 23:18 (Malam Takbir) from bs4 import BeautifulSoup as parser from . import sorting import re def to_bs4(html): return parser(html, "html.parser") def refsrc(html): return True if re.search(r'http.+\Wrefsrc', html) else False def parsing_href(html, href, one = Fals...
31.641026
113
0.636548
0
0
0
0
0
0
0
0
398
0.161264
c721ab40af9f4d2f1e869b104c622361e1311025
878
py
Python
test/test_watchdog_status.py
ike709/tgs4-api-pyclient
97918cfe614cc4ef06ef2485efff163417a8cd44
[ "MIT" ]
null
null
null
test/test_watchdog_status.py
ike709/tgs4-api-pyclient
97918cfe614cc4ef06ef2485efff163417a8cd44
[ "MIT" ]
null
null
null
test/test_watchdog_status.py
ike709/tgs4-api-pyclient
97918cfe614cc4ef06ef2485efff163417a8cd44
[ "MIT" ]
null
null
null
# coding: utf-8 """ TGS API A production scale tool for BYOND server management # noqa: E501 OpenAPI spec version: 9.0.0 Generated by: https://github.com/swagger-api/swagger-codegen.git """ from __future__ import absolute_import import unittest import swagger_client from swagger_client.model...
21.95
86
0.702733
407
0.463554
0
0
0
0
0
0
444
0.505695
c721d7a43c6300b41e4a0357169d5ebc646135d1
235
py
Python
setup.py
joesan/housing-classification-example
93f921cf01c79ab63732ef302ab52d2c9ffedee1
[ "FTL" ]
null
null
null
setup.py
joesan/housing-classification-example
93f921cf01c79ab63732ef302ab52d2c9ffedee1
[ "FTL" ]
null
null
null
setup.py
joesan/housing-classification-example
93f921cf01c79ab63732ef302ab52d2c9ffedee1
[ "FTL" ]
null
null
null
from setuptools import find_packages, setup setup( name='src', packages=find_packages(), version='0.1.0', description='Python codebase for the housing classification ML problem', author='Joesan', license='', )
21.363636
76
0.685106
0
0
0
0
0
0
0
0
81
0.344681
c7226ff1219f925df17003fe42d233729469035d
4,187
py
Python
tests/test_models/test_backbones/test_sr_backbones/test_edvr_net.py
wangruohui/mmediting
6577d307caf9edfb34c6e46547994e6314fffc37
[ "Apache-2.0" ]
45
2022-03-05T06:54:34.000Z
2022-03-30T02:15:42.000Z
tests/test_models/test_backbones/test_sr_backbones/test_edvr_net.py
wangruohui/mmediting
6577d307caf9edfb34c6e46547994e6314fffc37
[ "Apache-2.0" ]
1
2022-03-25T14:04:39.000Z
2022-03-31T04:48:38.000Z
tests/test_models/test_backbones/test_sr_backbones/test_edvr_net.py
wangruohui/mmediting
6577d307caf9edfb34c6e46547994e6314fffc37
[ "Apache-2.0" ]
1
2022-03-10T01:00:24.000Z
2022-03-10T01:00:24.000Z
# Copyright (c) OpenMMLab. All rights reserved. import pytest import torch from mmedit.models.backbones.sr_backbones.edvr_net import (EDVRNet, PCDAlignment, TSAFusion) def test_pcd_alignment(): "...
28.482993
76
0.578696
0
0
0
0
0
0
0
0
371
0.088608
c72294488588ee770a6039927fb6209367d51df5
225
py
Python
mat2py/core/datastoreio.py
mat2py/mat2py
2776fbe9ca4ad2aaa3eac6aa79d17747a9ec24a8
[ "MIT" ]
null
null
null
mat2py/core/datastoreio.py
mat2py/mat2py
2776fbe9ca4ad2aaa3eac6aa79d17747a9ec24a8
[ "MIT" ]
37
2021-12-23T03:22:20.000Z
2022-02-16T15:40:47.000Z
mat2py/core/datastoreio.py
mat2py/mat2py
2776fbe9ca4ad2aaa3eac6aa79d17747a9ec24a8
[ "MIT" ]
2
2022-01-23T07:59:10.000Z
2022-02-03T09:15:54.000Z
# type: ignore __all__ = [ "readDatastoreImage", "datastore", ] def readDatastoreImage(*args): raise NotImplementedError("readDatastoreImage") def datastore(*args): raise NotImplementedError("datastore")
15
51
0.711111
0
0
0
0
0
0
0
0
76
0.337778
c7235d9e02846d039085054a4375d4bc687a9231
12,229
py
Python
enjoliver-api/tests/test_generate_groups.py
netturpin/enjoliver
9700470939da40ff84304af6e8c7210a5fd693a4
[ "MIT" ]
11
2017-11-06T08:42:55.000Z
2021-01-08T11:01:02.000Z
enjoliver-api/tests/test_generate_groups.py
netturpin/enjoliver
9700470939da40ff84304af6e8c7210a5fd693a4
[ "MIT" ]
7
2017-12-28T12:05:50.000Z
2021-04-02T15:04:46.000Z
enjoliver-api/tests/test_generate_groups.py
netturpin/enjoliver
9700470939da40ff84304af6e8c7210a5fd693a4
[ "MIT" ]
4
2017-11-08T10:03:31.000Z
2018-06-03T17:59:43.000Z
import os from shutil import rmtree from tempfile import mkdtemp from unittest import TestCase from enjoliver import generator class GenerateGroupTestCase(TestCase): api_uri = None test_matchbox_path = None test_resources_path = None tests_path = None @classmethod def setUpClass(cls): ...
35.446377
93
0.568485
12,086
0.988306
0
0
2,436
0.199199
0
0
2,738
0.223894
c72423d0c9647d3f45e1ae401dca8a26496518f2
265
py
Python
HackerRank/Calendar Module/solution.py
nikku1234/Code-Practise
94eb6680ea36efd10856c377000219285f77e5a4
[ "Apache-2.0" ]
9
2020-07-02T06:06:17.000Z
2022-02-26T11:08:09.000Z
HackerRank/Calendar Module/solution.py
nikku1234/Code-Practise
94eb6680ea36efd10856c377000219285f77e5a4
[ "Apache-2.0" ]
1
2021-11-04T17:26:36.000Z
2021-11-04T17:26:36.000Z
HackerRank/Calendar Module/solution.py
nikku1234/Code-Practise
94eb6680ea36efd10856c377000219285f77e5a4
[ "Apache-2.0" ]
8
2021-01-31T10:31:12.000Z
2022-03-13T09:15:55.000Z
# Enter your code here. Read input from STDIN. Print output to STDOUT import calendar mm,dd,yyyy = map(int,input().split()) day = ["MONDAY","TUESDAY","WEDNESDAY","THURSDAY","FRIDAY","SATURDAY","SUNDAY"] val = int (calendar.weekday(yyyy,mm,dd)) print(day[val])
22.083333
78
0.698113
0
0
0
0
0
0
0
0
133
0.501887
c7245a8913ae3a1c31f00b1392df9f4dd3d991e9
7,560
py
Python
scale/trigger/models.py
stevevarner/scale
9623b261db4ddcf770f00df16afc91176142bb7c
[ "Apache-2.0" ]
null
null
null
scale/trigger/models.py
stevevarner/scale
9623b261db4ddcf770f00df16afc91176142bb7c
[ "Apache-2.0" ]
null
null
null
scale/trigger/models.py
stevevarner/scale
9623b261db4ddcf770f00df16afc91176142bb7c
[ "Apache-2.0" ]
null
null
null
"""Defines the models for trigger rules and events""" from __future__ import unicode_literals import django.contrib.postgres.fields from django.db import models, transaction from django.utils.timezone import now class TriggerEventManager(models.Manager): """Provides additional methods for handling trigger events...
38.769231
120
0.693783
7,335
0.970238
0
0
433
0.057275
0
0
4,776
0.631746
c724bce6559444b809161c07169a0eaf827f8a70
1,125
py
Python
leetcode/0506_relative_ranks.py
chaosWsF/Python-Practice
ff617675b6bcd125933024bb4c246b63a272314d
[ "BSD-2-Clause" ]
null
null
null
leetcode/0506_relative_ranks.py
chaosWsF/Python-Practice
ff617675b6bcd125933024bb4c246b63a272314d
[ "BSD-2-Clause" ]
null
null
null
leetcode/0506_relative_ranks.py
chaosWsF/Python-Practice
ff617675b6bcd125933024bb4c246b63a272314d
[ "BSD-2-Clause" ]
null
null
null
""" Given scores of N athletes, find their relative ranks and the people with the top three highest scores, who will be awarded medals: "Gold Medal", "Silver Medal" and "Bronze Medal". Example 1: Input: [5, 4, 3, 2, 1] Output: ["Gold Medal", "Silver Medal", "Bronze Medal", "4", "5"] Explanation: The fir...
32.142857
84
0.593778
456
0.405333
0
0
0
0
0
0
705
0.626667
c724c503b44eb473d695fa13f0446956650e0c2b
987
py
Python
barriers/models/history/assessments/economic_impact.py
felix781/market-access-python-frontend
3b0e49feb4fdf0224816326938a46002aa4a2b1c
[ "MIT" ]
1
2021-12-15T04:14:03.000Z
2021-12-15T04:14:03.000Z
barriers/models/history/assessments/economic_impact.py
felix781/market-access-python-frontend
3b0e49feb4fdf0224816326938a46002aa4a2b1c
[ "MIT" ]
19
2019-12-11T11:32:47.000Z
2022-03-29T15:40:57.000Z
barriers/models/history/assessments/economic_impact.py
felix781/market-access-python-frontend
3b0e49feb4fdf0224816326938a46002aa4a2b1c
[ "MIT" ]
2
2021-02-09T09:38:45.000Z
2021-03-29T19:07:09.000Z
from ..base import BaseHistoryItem, GenericHistoryItem from ..utils import PolymorphicBase class ArchivedHistoryItem(BaseHistoryItem): field = "archived" field_name = "Valuation assessment: Archived" def get_value(self, value): if value is True: return "Archived" elif value is...
24.675
59
0.68997
884
0.895643
0
0
0
0
0
0
191
0.193516
c72537aa56e0fec5c2e19ae544ffe17dd652b46b
727
py
Python
link_prob_show.py
Rheinwalt/spatial-effects-networks
7b77a22b45341b024a57e1759b7b61cd91d90849
[ "MIT" ]
3
2018-12-21T20:19:18.000Z
2021-01-02T12:58:56.000Z
link_prob_show.py
rick-foo/spatial-effects-networks
7b77a22b45341b024a57e1759b7b61cd91d90849
[ "MIT" ]
null
null
null
link_prob_show.py
rick-foo/spatial-effects-networks
7b77a22b45341b024a57e1759b7b61cd91d90849
[ "MIT" ]
2
2020-09-03T14:18:37.000Z
2021-10-01T18:06:42.000Z
import sys import numpy as np from sern import * ids, lon, lat = np.loadtxt('nodes', unpack = True) links = np.loadtxt('links', dtype = 'int') A, b = AdjacencyMatrix(ids, links) lon, lat = lon[b], lat[b] n = A.shape[0] # LinkProbability expects A as triu A = A[np.triu_indices(n, 1)] # play around with the scale, may...
25.964286
63
0.707015
0
0
0
0
0
0
0
0
266
0.365887
c7268aa939534725180b033986da1a690622e70b
3,899
py
Python
controller/components/app.py
isabella232/flight-lab
bd666b1d2bcec6f928a2e8da9f13fd5dae21319f
[ "Apache-2.0" ]
15
2018-10-18T07:50:46.000Z
2021-10-21T03:40:55.000Z
controller/components/app.py
google/flight-lab
bd666b1d2bcec6f928a2e8da9f13fd5dae21319f
[ "Apache-2.0" ]
9
2018-09-17T23:00:02.000Z
2019-01-22T21:08:04.000Z
controller/components/app.py
isabella232/flight-lab
bd666b1d2bcec6f928a2e8da9f13fd5dae21319f
[ "Apache-2.0" ]
12
2019-01-07T12:43:37.000Z
2021-10-21T03:40:44.000Z
# Copyright 2018 Flight Lab authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # https://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in w...
33.612069
77
0.691459
3,136
0.804309
0
0
0
0
0
0
1,324
0.339574
c727467c9c5f9cbcf49804ff4103bf27f2140c3f
1,504
py
Python
botorch/acquisition/__init__.py
jmren168/botorch
6c067185f56d3a244c4093393b8a97388fb1c0b3
[ "MIT" ]
1
2020-03-29T20:06:45.000Z
2020-03-29T20:06:45.000Z
botorch/acquisition/__init__.py
jmren168/botorch
6c067185f56d3a244c4093393b8a97388fb1c0b3
[ "MIT" ]
null
null
null
botorch/acquisition/__init__.py
jmren168/botorch
6c067185f56d3a244c4093393b8a97388fb1c0b3
[ "MIT" ]
1
2020-03-29T20:06:48.000Z
2020-03-29T20:06:48.000Z
#!/usr/bin/env python3 # Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved from .acquisition import AcquisitionFunction from .analytic import ( AnalyticAcquisitionFunction, ConstrainedExpectedImprovement, ExpectedImprovement, NoisyExpectedImprovement, PosteriorMean, Probabil...
25.491525
70
0.757979
0
0
0
0
0
0
0
0
609
0.40492
c72c87715b18d844a4d1e6b4c82ec44a40f2bde2
2,810
py
Python
examples/pybullet/gym/pybullet_envs/minitaur/envs/env_randomizers/minitaur_alternating_legs_env_randomizer.py
felipeek/bullet3
6a59241074720e9df119f2f86bc01765917feb1e
[ "Zlib" ]
9,136
2015-01-02T00:41:45.000Z
2022-03-31T15:30:02.000Z
examples/pybullet/gym/pybullet_envs/minitaur/envs/env_randomizers/minitaur_alternating_legs_env_randomizer.py
felipeek/bullet3
6a59241074720e9df119f2f86bc01765917feb1e
[ "Zlib" ]
2,424
2015-01-05T08:55:58.000Z
2022-03-30T19:34:55.000Z
examples/pybullet/gym/pybullet_envs/minitaur/envs/env_randomizers/minitaur_alternating_legs_env_randomizer.py
felipeek/bullet3
6a59241074720e9df119f2f86bc01765917feb1e
[ "Zlib" ]
2,921
2015-01-02T10:19:30.000Z
2022-03-31T02:48:42.000Z
"""Randomize the minitaur_gym_alternating_leg_env when reset() is called. The randomization include swing_offset, extension_offset of all legs that mimics bent legs, desired_pitch from user input, battery voltage and motor damping. """ import os, inspect currentdir = os.path.dirname(os.path.abspath(inspect.getfile(in...
45.322581
86
0.70605
2,102
0.748043
0
0
0
0
0
0
421
0.149822
c72ca1c8b4319d09d601fa708b5ddc14cb8e0859
14,704
py
Python
pygsti/modelmembers/states/tensorprodstate.py
pyGSTi-Developers/pyGSTi
bfedc1de4d604f14b0f958615776fb80ddb59e33
[ "Apache-2.0" ]
73
2016-01-28T05:02:05.000Z
2022-03-30T07:46:33.000Z
pygsti/modelmembers/states/tensorprodstate.py
pyGSTi-Developers/pyGSTi
bfedc1de4d604f14b0f958615776fb80ddb59e33
[ "Apache-2.0" ]
113
2016-02-25T15:32:18.000Z
2022-03-31T13:18:13.000Z
pygsti/modelmembers/states/tensorprodstate.py
pyGSTi-Developers/pyGSTi
bfedc1de4d604f14b0f958615776fb80ddb59e33
[ "Apache-2.0" ]
41
2016-03-15T19:32:07.000Z
2022-02-16T10:22:05.000Z
""" The TensorProductState class and supporting functionality. """ #*************************************************************************************************** # Copyright 2015, 2019 National Technology & Engineering Solutions of Sandia, LLC (NTESS). # Under the terms of Contract DE-NA0003525 with NTESS, the U....
42.994152
118
0.609698
13,589
0.92417
0
0
934
0.06352
0
0
7,913
0.538153
c72d167470fc1e484c9ed6ee92db56b541a26d0c
3,216
py
Python
edivorce/apps/core/views/graphql.py
gerritvdm/eDivorce
e3c0a4037a7141769250b96df6cc4eb4ea5ef3af
[ "Apache-2.0" ]
6
2017-03-24T18:20:33.000Z
2021-01-29T03:25:07.000Z
edivorce/apps/core/views/graphql.py
gerritvdm/eDivorce
e3c0a4037a7141769250b96df6cc4eb4ea5ef3af
[ "Apache-2.0" ]
13
2018-10-12T17:20:37.000Z
2021-11-05T23:13:21.000Z
edivorce/apps/core/views/graphql.py
gerritvdm/eDivorce
e3c0a4037a7141769250b96df6cc4eb4ea5ef3af
[ "Apache-2.0" ]
11
2017-03-15T12:36:39.000Z
2021-03-05T14:35:59.000Z
import graphene import graphene_django from django.http import HttpResponseForbidden from graphene_django.views import GraphQLView from graphql import GraphQLError from edivorce.apps.core.models import Document class PrivateGraphQLView(GraphQLView): def dispatch(self, request, *args, **kwargs): if not re...
36.545455
135
0.668221
2,915
0.906405
0
0
0
0
0
0
334
0.103856
c72e729bd791fda04d1f1bf87cc60496068da071
5,862
py
Python
amazing/maze.py
danieloconell/maze-solver
f60e476d827d59bfa17cd2148787332707846882
[ "MIT" ]
null
null
null
amazing/maze.py
danieloconell/maze-solver
f60e476d827d59bfa17cd2148787332707846882
[ "MIT" ]
2
2021-06-08T19:35:19.000Z
2021-09-08T00:44:59.000Z
amazing/maze.py
danieloconell/amazing
f60e476d827d59bfa17cd2148787332707846882
[ "MIT" ]
null
null
null
from .exceptions import MazeNotSolved, AlgorithmNotFound from .dijkstra import Dijkstra from .astar import Astar from functools import wraps import warnings from daedalus import Maze as _maze from PIL import Image warnings.simplefilter("once", UserWarning) class Maze: """ Create a maze and solve it. A...
32.932584
114
0.525589
5,601
0.95515
0
0
1,257
0.214359
0
0
1,608
0.274216
c72eaa2b73efe739c3a50690c7c96660b59023bd
4,215
py
Python
config.py
FarbodFarhangfar/midi_player_python
924cd164b7867d294c761a70d06ab330fa1b8373
[ "MIT" ]
null
null
null
config.py
FarbodFarhangfar/midi_player_python
924cd164b7867d294c761a70d06ab330fa1b8373
[ "MIT" ]
null
null
null
config.py
FarbodFarhangfar/midi_player_python
924cd164b7867d294c761a70d06ab330fa1b8373
[ "MIT" ]
null
null
null
import os def get_note_dic(): _note_dic = {'C': 0, 'C#': 1, 'Db': 1, 'D': 2, 'D#': 3, 'Eb': 3, 'E': 4, 'F': 5, 'F#': 6, 'Gb': 6, 'G': 7, 'G#': 8, 'Ab': 8, 'A': 9, 'A#': 10, 'Bb': 10, 'B': 11} return _note_dic def get_value_list(): values = {"16": 16, "8": 8, "4": 4, "2"...
38.669725
106
0.474496
0
0
0
0
0
0
0
0
2,622
0.622064
c72f4c5b309a87813b09f64b422ca7519b3e740b
2,182
py
Python
roles/openshift_health_checker/library/ocutil.py
shgriffi/openshift-ansible
6313f519307cf50055589c3876d8bec398bbc4d4
[ "Apache-2.0" ]
164
2015-07-29T17:35:04.000Z
2021-12-16T16:38:04.000Z
roles/openshift_health_checker/library/ocutil.py
shgriffi/openshift-ansible
6313f519307cf50055589c3876d8bec398bbc4d4
[ "Apache-2.0" ]
3,634
2015-06-09T13:49:15.000Z
2022-03-23T20:55:44.000Z
roles/openshift_health_checker/library/ocutil.py
shgriffi/openshift-ansible
6313f519307cf50055589c3876d8bec398bbc4d4
[ "Apache-2.0" ]
250
2015-06-08T19:53:11.000Z
2022-03-01T04:51:23.000Z
#!/usr/bin/python """Interface to OpenShift oc command""" import os import shlex import shutil import subprocess from ansible.module_utils.basic import AnsibleModule ADDITIONAL_PATH_LOOKUPS = ['/usr/local/bin', os.path.expanduser('~/bin')] def locate_oc_binary(): """Find and return oc binary file""" # htt...
29.486486
91
0.636114
0
0
0
0
0
0
0
0
576
0.263978