hexsha stringlengths 40 40 | size int64 5 2.06M | ext stringclasses 11
values | lang stringclasses 1
value | max_stars_repo_path stringlengths 3 251 | max_stars_repo_name stringlengths 4 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 251 | max_issues_repo_name stringlengths 4 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 251 | max_forks_repo_name stringlengths 4 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 1 1.05M | avg_line_length float64 1 1.02M | max_line_length int64 3 1.04M | alphanum_fraction float64 0 1 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
f61eff0aa27ea8fbb3e6d4a3ba4c910c4db8c5f0 | 2,037 | py | Python | toutiao-backend/toutiao/resources/user/profile.py | weiyunfei520/toutiao | f1fdb4dd88aff0f67d11e19b13bd1a90a26ac642 | [
"MIT"
] | null | null | null | toutiao-backend/toutiao/resources/user/profile.py | weiyunfei520/toutiao | f1fdb4dd88aff0f67d11e19b13bd1a90a26ac642 | [
"MIT"
] | null | null | null | toutiao-backend/toutiao/resources/user/profile.py | weiyunfei520/toutiao | f1fdb4dd88aff0f67d11e19b13bd1a90a26ac642 | [
"MIT"
] | null | null | null | from flask import current_app
from flask import g
from flask import request
from flask_restful.reqparse import RequestParser
from flask_restful import Resource
from models import db
from models.user import User
from utils.decorators import login_required
from utils.parser import image_file
from utils.storage import up... | 31.338462 | 86 | 0.634757 |
f620b14338e61be682d35b0543506d9c7f9a1c6d | 905 | py | Python | manim/utils/unit.py | PhotonSpheres/manim | 7399c24b33095e29633fd75460d13eae5703cba9 | [
"MIT"
] | 9,497 | 2020-05-19T04:05:51.000Z | 2022-03-31T19:00:02.000Z | manim/utils/unit.py | PhotonSpheres/manim | 7399c24b33095e29633fd75460d13eae5703cba9 | [
"MIT"
] | 2,052 | 2020-05-19T03:35:26.000Z | 2022-03-31T16:18:06.000Z | manim/utils/unit.py | PhotonSpheres/manim | 7399c24b33095e29633fd75460d13eae5703cba9 | [
"MIT"
] | 1,016 | 2020-05-20T01:16:11.000Z | 2022-03-30T16:47:14.000Z | """Implement the Unit class."""
import numpy as np
from .. import config, constants
__all__ = ["Pixels", "Degrees", "Munits", "Percent"]
Pixels = _PixelUnits()
Degrees = constants.PI / 180
Munits = 1
| 24.459459 | 70 | 0.653039 |
f6228da345431023f7834e4201a3bb44d8f2ebe1 | 112 | py | Python | backend/auth_app/serializers/__init__.py | nitinmehra/TodoApp | e1e8938330df6b59b8b064ac1a2dde61744d8392 | [
"MIT"
] | null | null | null | backend/auth_app/serializers/__init__.py | nitinmehra/TodoApp | e1e8938330df6b59b8b064ac1a2dde61744d8392 | [
"MIT"
] | null | null | null | backend/auth_app/serializers/__init__.py | nitinmehra/TodoApp | e1e8938330df6b59b8b064ac1a2dde61744d8392 | [
"MIT"
] | null | null | null | from .auth_serializer import MyTokenObtainPairSerializer
from .register_serializer import UserRegisterSerializer | 56 | 56 | 0.919643 |
f6232a7604d0160345749d0571f7cdfb8e44d3c3 | 3,137 | py | Python | src/sensors.py | andrew-chang-dewitt/rpi-pir2mqtt-docker | 3da860fed40cd0ec7395ac4864e38d5eb38e0634 | [
"MIT"
] | 1 | 2020-04-13T13:20:50.000Z | 2020-04-13T13:20:50.000Z | src/sensors.py | andrew-chang-dewitt/rpi-security-gpio2mqtt | 3da860fed40cd0ec7395ac4864e38d5eb38e0634 | [
"MIT"
] | 17 | 2020-01-31T21:07:31.000Z | 2020-02-11T15:16:58.000Z | src/sensors.py | andrew-chang-dewitt/rpi-security-gpio2mqtt | 3da860fed40cd0ec7395ac4864e38d5eb38e0634 | [
"MIT"
] | null | null | null | """A module for defining Sensor types.
Classes:
Sensor -- Base Sensor class, all unknown types default to this.
MotionSensor -- Subclass of Sensor, for HC-SR501 type PIR sensors.
ReedSwitch -- Subclass of Sensor, for basic door/window reed switches.
Functions:
build_sensor -- Build & return a ... | 31.37 | 79 | 0.634364 |
f62464c4d4e238629f145959573630850492be9a | 1,940 | py | Python | main.py | TwoShock/Graphics-Card-Web-Scraper | 7161a63dca103826906388c61dbaecaff2f73238 | [
"MIT"
] | null | null | null | main.py | TwoShock/Graphics-Card-Web-Scraper | 7161a63dca103826906388c61dbaecaff2f73238 | [
"MIT"
] | null | null | null | main.py | TwoShock/Graphics-Card-Web-Scraper | 7161a63dca103826906388c61dbaecaff2f73238 | [
"MIT"
] | null | null | null | from urllib.request import urlopen
from bs4 import BeautifulSoup as soup
import re
import pandas as pd
if __name__ == "__main__":
main() | 40.416667 | 135 | 0.655155 |
f62731a6aa290c859ecde18b54feaa791a6e0a5d | 1,228 | py | Python | python/qisrc/actions/checkout.py | aldebaran/qibuild | efea6fa3744664348717fe5e8df708a3cf392072 | [
"BSD-3-Clause"
] | 51 | 2015-01-05T14:35:13.000Z | 2021-07-27T06:46:59.000Z | python/qisrc/actions/checkout.py | aldebaran/qibuild | efea6fa3744664348717fe5e8df708a3cf392072 | [
"BSD-3-Clause"
] | 104 | 2015-04-09T10:48:42.000Z | 2020-09-16T16:33:29.000Z | python/qisrc/actions/checkout.py | aldebaran/qibuild | efea6fa3744664348717fe5e8df708a3cf392072 | [
"BSD-3-Clause"
] | 46 | 2015-01-05T14:35:16.000Z | 2022-02-13T20:39:36.000Z | #!/usr/bin/env python
# -*- coding: utf-8 -*-
# Copyright (c) 2012-2021 SoftBank Robotics. All rights reserved.
# Use of this source code is governed by a BSD-style license (see the COPYING file).
"""
Change the branch of the manifest
Also, checkout the correct branch for every git project in the worktree
"""
from __fu... | 31.487179 | 84 | 0.717427 |
f62827a67ce6f1302ffe03104ae4a729a1a0c806 | 961 | py | Python | experiments/calc_avg_bohb_time.py | automl/learning_environments | c1c7cec4506ba140b19c215f4bf7a8bd222b32a0 | [
"MIT"
] | 11 | 2021-02-06T15:26:12.000Z | 2022-03-05T11:24:17.000Z | experiments/calc_avg_bohb_time.py | automl/learning_environments | c1c7cec4506ba140b19c215f4bf7a8bd222b32a0 | [
"MIT"
] | 2 | 2022-02-10T00:01:37.000Z | 2022-03-12T01:07:59.000Z | experiments/calc_avg_bohb_time.py | automl/learning_environments | c1c7cec4506ba140b19c215f4bf7a8bd222b32a0 | [
"MIT"
] | 1 | 2022-03-14T02:37:48.000Z | 2022-03-14T02:37:48.000Z | import statistics
import hpbandster.core.result as hpres
# smallest value is best -> reverse_loss = True
# largest value is best -> reverse_loss = False
REVERSE_LOSS = True
EXP_LOSS = 1
OUTLIER_PERC_WORST = 0.1
OUTLIER_PERC_BEST = 0.0
if __name__ == '__main__':
# load the example run from the log files
re... | 25.972973 | 102 | 0.680541 |
f62b330cff46dc5c4c549afab05c1b96b01df850 | 2,926 | py | Python | radio/preprocessing/augmented_batch.py | dmitrysarov/radio-1 | c0162e7e2f39018d6ca8cf7d8ef2e37c22dd40fc | [
"Apache-2.0"
] | null | null | null | radio/preprocessing/augmented_batch.py | dmitrysarov/radio-1 | c0162e7e2f39018d6ca8cf7d8ef2e37c22dd40fc | [
"Apache-2.0"
] | null | null | null | radio/preprocessing/augmented_batch.py | dmitrysarov/radio-1 | c0162e7e2f39018d6ca8cf7d8ef2e37c22dd40fc | [
"Apache-2.0"
] | null | null | null | """ Contains CTImagesAugmentedBatch: masked ct-batch with some augmentation actions """
import numpy as np
from .ct_masked_batch import CTImagesMaskedBatch
from ..dataset.dataset import action, Sampler # pylint: disable=no-name-in-module
from .mask import insert_cropped
| 37.512821 | 115 | 0.598086 |
f62d98d9378ef48e987146d478ae9033a3dcf113 | 9,155 | py | Python | tf2/ThickCylinder_DEM.py | ISM-Weimar/DeepEnergyMethods | 3a51131e0827446bf5986d698aaac396c7fa5037 | [
"MIT"
] | 15 | 2019-09-11T01:35:03.000Z | 2022-03-25T03:17:59.000Z | tf2/ThickCylinder_DEM.py | ISM-Weimar/DeepEnergyMethods | 3a51131e0827446bf5986d698aaac396c7fa5037 | [
"MIT"
] | 2 | 2020-10-16T19:06:07.000Z | 2022-01-06T16:23:49.000Z | tf2/ThickCylinder_DEM.py | ISM-Weimar/DeepEnergyMethods | 3a51131e0827446bf5986d698aaac396c7fa5037 | [
"MIT"
] | 15 | 2019-09-11T01:35:05.000Z | 2022-02-18T21:18:55.000Z | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
2D linear elasticity example
Solve the equilibrium equation -\nabla \cdot \sigma(x) = f(x) for x\in\Omega
with the strain-displacement equation:
\epsilon = 1/2(\nabla u + \nabla u^T)
and the constitutive law:
\sigma = 2*\mu*\epsilon + \lambda*(\nabla\cdot u)I,... | 37.830579 | 103 | 0.72343 |
f62fd3c1a6c3577c375970042756089fd3f9e611 | 1,224 | py | Python | src/trw/utils/clamp_n.py | civodlu/trw | b9a1cf045f61d6df9c65c014ef63b4048972dcdc | [
"MIT"
] | 3 | 2019-07-04T01:20:41.000Z | 2020-01-27T02:36:12.000Z | src/trw/utils/clamp_n.py | civodlu/trw | b9a1cf045f61d6df9c65c014ef63b4048972dcdc | [
"MIT"
] | null | null | null | src/trw/utils/clamp_n.py | civodlu/trw | b9a1cf045f61d6df9c65c014ef63b4048972dcdc | [
"MIT"
] | 2 | 2020-10-19T13:46:06.000Z | 2021-12-27T02:18:10.000Z | from typing import Sequence, Any
import torch
def clamp_n(tensor: torch.Tensor, min_values: Sequence[Any], max_values: Sequence[Any]) -> torch.Tensor:
"""
Clamp a tensor with axis dependent values.
Args:
tensor: a N-d torch.Tensor
min_values: a 1D torch.Tensor. Min value is axis dependent... | 37.090909 | 104 | 0.660131 |
f6300d71500ac859671e30287246eb5ec27f0524 | 437 | py | Python | bin2dec.py | Alba3k/BinToDec | 4a4874b40cdd69b732532308484eeb976e158d35 | [
"MIT"
] | null | null | null | bin2dec.py | Alba3k/BinToDec | 4a4874b40cdd69b732532308484eeb976e158d35 | [
"MIT"
] | null | null | null | bin2dec.py | Alba3k/BinToDec | 4a4874b40cdd69b732532308484eeb976e158d35 | [
"MIT"
] | null | null | null |
print(' 8- ')
binNumber = input('>')
if len(binNumber) != 8:
print(' 8- ')
elif not binNumber.isdigit():
print(' 8- ')
else:
print(bin2dec(binNumber)) | 23 | 43 | 0.71167 |
f6302daf57e1897d3b623be1dae10ac2892a5ddb | 1,227 | py | Python | taskmanager/src/modules/tasks/domain/task.py | acostapazo/event-manager | 614c91af19fad39f766ffa1b9a3d1e783f06c72e | [
"MIT"
] | null | null | null | taskmanager/src/modules/tasks/domain/task.py | acostapazo/event-manager | 614c91af19fad39f766ffa1b9a3d1e783f06c72e | [
"MIT"
] | 1 | 2020-04-20T11:20:22.000Z | 2020-04-20T11:20:22.000Z | taskmanager/src/modules/tasks/domain/task.py | acostapazo/event-manager | 614c91af19fad39f766ffa1b9a3d1e783f06c72e | [
"MIT"
] | null | null | null | from typing import Any, Dict
from meiga import Result, Error, Success
from petisco import AggregateRoot
from datetime import datetime
from taskmanager.src.modules.tasks.domain.description import Description
from taskmanager.src.modules.tasks.domain.events import TaskCreated
from taskmanager.src.modules.tasks.domain.t... | 31.461538 | 81 | 0.682967 |
f630f6ea5762c04cfcd310931e443ab55f0888fb | 4,085 | py | Python | CSD_API/get_from_author.py | andrewtarzia/cage_collect | e5e68dc23ec197eceff3b56de6725d996730b8ac | [
"MIT"
] | null | null | null | CSD_API/get_from_author.py | andrewtarzia/cage_collect | e5e68dc23ec197eceff3b56de6725d996730b8ac | [
"MIT"
] | null | null | null | CSD_API/get_from_author.py | andrewtarzia/cage_collect | e5e68dc23ec197eceff3b56de6725d996730b8ac | [
"MIT"
] | null | null | null | #!/usr/bin/env python2
# -*- coding: utf-8 -*-
# Distributed under the terms of the MIT License.
"""
Script to search for and collect CIFs using a list of authors.
Author: Andrew Tarzia
Date Created: 1 Mar 2019
"""
import ccdc.search
import sys
import CSD_f
def write_entry(file, author, number, DOI, CSD, solvent,... | 28.566434 | 68 | 0.520685 |
f6316922d218565500b02ad1c78331fdf583ec07 | 641 | py | Python | src/datastructure/stacks_ex1.py | Valeeswaran/tutorials | 71b43cad46f4d7d2d67d3ff4be61bdaaade2a36a | [
"MIT"
] | null | null | null | src/datastructure/stacks_ex1.py | Valeeswaran/tutorials | 71b43cad46f4d7d2d67d3ff4be61bdaaade2a36a | [
"MIT"
] | null | null | null | src/datastructure/stacks_ex1.py | Valeeswaran/tutorials | 71b43cad46f4d7d2d67d3ff4be61bdaaade2a36a | [
"MIT"
] | null | null | null | import stacks1
print(is_balanced("))((a+b}{"))
print(is_balanced("((a+b))"))
print(is_balanced("))"))
print(is_balanced("[a+b]*(x+2y)*{hh+kk}")) | 20.677419 | 47 | 0.447738 |
f631fd5dc1a814f372da186dbc180a4eadeb0274 | 2,100 | py | Python | recommend.py | Srini96/Market-Basket-Analysis-with-Customer-Profiling-and-Exploratory-Analysis-using-Python | 293291157a4d91c217c4008e058e01b1b930b923 | [
"MIT"
] | 1 | 2021-02-01T02:15:48.000Z | 2021-02-01T02:15:48.000Z | recommend.py | Srini96/Market-Basket-Analysis-with-Customer-Profiling-and-Exploratory-Analysis-using-Python | 293291157a4d91c217c4008e058e01b1b930b923 | [
"MIT"
] | null | null | null | recommend.py | Srini96/Market-Basket-Analysis-with-Customer-Profiling-and-Exploratory-Analysis-using-Python | 293291157a4d91c217c4008e058e01b1b930b923 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
"""
Created on Thu May 3 18:30:29 2018
@author: Koushik
"""
import pandas as pd
from IPython.display import display
import sys
# -*- coding: utf-8 -*-
"""
Created on Sun Apr 29 19:04:35 2018
@author: Koushik
"""
#Python 2.x program for Speech Recognition
import re
#ent... | 30.882353 | 91 | 0.7 |
f6321b2979bddd05bf08689d0cd5e7faac1097ef | 584 | py | Python | image_pipeline/stages/__init__.py | MarcoGlauser/image_pipeline | a33b8a64773e8a0189155ae625d3060e15fb8def | [
"MIT"
] | null | null | null | image_pipeline/stages/__init__.py | MarcoGlauser/image_pipeline | a33b8a64773e8a0189155ae625d3060e15fb8def | [
"MIT"
] | null | null | null | image_pipeline/stages/__init__.py | MarcoGlauser/image_pipeline | a33b8a64773e8a0189155ae625d3060e15fb8def | [
"MIT"
] | null | null | null | from image_pipeline.stages.crop_stage import CropStage
from image_pipeline.stages.jpeg_lossless_compression import JPEGLossLessCompressionStage
from image_pipeline.stages.jpeg_lossy_compression import JPEGLossyCompressionStage
from image_pipeline.stages.resize_stage import ResizeStage
pre_stages = [
ResizeStage,
... | 27.809524 | 88 | 0.813356 |
f634dcfcb0026b1b4daab85dd3790ec59612e959 | 538 | py | Python | pyunitwizard/tests/test_get_form.py | dprada/pyunitwizard | dbfd0c015f9359c76e7e59a5c16ab469b86aed34 | [
"MIT"
] | 2 | 2021-07-01T14:33:58.000Z | 2022-03-19T19:19:09.000Z | pyunitwizard/tests/test_get_form.py | dprada/pyunitwizard | dbfd0c015f9359c76e7e59a5c16ab469b86aed34 | [
"MIT"
] | 15 | 2021-02-11T18:54:16.000Z | 2022-03-18T17:38:03.000Z | pyunitwizard/tests/test_get_form.py | dprada/pyunitwizard | dbfd0c015f9359c76e7e59a5c16ab469b86aed34 | [
"MIT"
] | 2 | 2021-06-17T18:56:02.000Z | 2022-03-08T05:02:17.000Z | import pytest
import pyunitwizard as puw
| 24.454545 | 45 | 0.678439 |
f63545e957985ca6c1cbcde078c84fd5739a594f | 4,393 | py | Python | package/awesome_panel/express/bootstrap/modal.py | slamer59/awesome-panel | 91c30bd6d6859eadf9c65b1e143952f7e64d5290 | [
"Apache-2.0"
] | 179 | 2019-12-04T14:54:53.000Z | 2022-03-30T09:08:38.000Z | package/awesome_panel/express/bootstrap/modal.py | slamer59/awesome-panel | 91c30bd6d6859eadf9c65b1e143952f7e64d5290 | [
"Apache-2.0"
] | 62 | 2019-12-14T16:51:28.000Z | 2022-03-19T18:47:12.000Z | package/awesome_panel/express/bootstrap/modal.py | slamer59/awesome-panel | 91c30bd6d6859eadf9c65b1e143952f7e64d5290 | [
"Apache-2.0"
] | 35 | 2019-12-08T13:19:53.000Z | 2022-03-25T10:33:02.000Z | """In this module we provide the functionality of a Modal.
The Modal can be used to focus some kind of information like text, images, chart or an interactive
dashboard.
The implementation is inspired by
- https://css-tricks.com/considerations-styling-modal/
- https://codepen.io/henchmen/embed/preview/PzQ... | 27.117284 | 99 | 0.572046 |
f636a313757854652da404412374580257d3fe53 | 5,696 | py | Python | python/paddle/distributed/fleet/meta_optimizers/fp16_allreduce_optimizer.py | zmxdream/Paddle | 04f042a5d507ad98f7f2cfc3cbc44b06d7a7f45c | [
"Apache-2.0"
] | 17,085 | 2016-11-18T06:40:52.000Z | 2022-03-31T22:52:32.000Z | python/paddle/distributed/fleet/meta_optimizers/fp16_allreduce_optimizer.py | zmxdream/Paddle | 04f042a5d507ad98f7f2cfc3cbc44b06d7a7f45c | [
"Apache-2.0"
] | 29,769 | 2016-11-18T06:35:22.000Z | 2022-03-31T16:46:15.000Z | python/paddle/distributed/fleet/meta_optimizers/fp16_allreduce_optimizer.py | zmxdream/Paddle | 04f042a5d507ad98f7f2cfc3cbc44b06d7a7f45c | [
"Apache-2.0"
] | 4,641 | 2016-11-18T07:43:33.000Z | 2022-03-31T15:15:02.000Z | # Copyright (c) 2020 PaddlePaddle Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by app... | 38.228188 | 76 | 0.59849 |
f636a882b94f8b074d76f3398dd62f93844dc2ba | 245 | py | Python | factory_djoy/__about__.py | jamescooke/factory_djoy | 97cf68a068b831f2830688a91e7b143b97bc1326 | [
"MIT"
] | 26 | 2016-05-27T19:00:34.000Z | 2022-02-14T14:22:20.000Z | factory_djoy/__about__.py | jamescooke/factory_djoy | 97cf68a068b831f2830688a91e7b143b97bc1326 | [
"MIT"
] | 37 | 2016-05-27T18:58:51.000Z | 2021-10-10T11:35:08.000Z | factory_djoy/__about__.py | jamescooke/factory_djoy | 97cf68a068b831f2830688a91e7b143b97bc1326 | [
"MIT"
] | null | null | null | __name__ = 'factory_djoy'
__version__ = '2.2.0'
__author__ = 'James Cooke'
__copyright__ = '2021, {}'.format(__author__)
__description__ = 'Factories for Django, creating valid model instances every time.'
__email__ = 'github@jamescooke.info'
| 27.222222 | 84 | 0.755102 |
f6385c22b94a6e2e267dcaa60df50ad19fa4a166 | 3,928 | py | Python | garageofcode/sat/fifteen_puzzle.py | tpi12jwe/garageofcode | 3cfaf01f6d77130bb354887e6ed9921c791db849 | [
"MIT"
] | 2 | 2020-02-11T10:32:06.000Z | 2020-02-11T17:00:47.000Z | garageofcode/sat/fifteen_puzzle.py | tpi12jwe/garageofcode | 3cfaf01f6d77130bb354887e6ed9921c791db849 | [
"MIT"
] | null | null | null | garageofcode/sat/fifteen_puzzle.py | tpi12jwe/garageofcode | 3cfaf01f6d77130bb354887e6ed9921c791db849 | [
"MIT"
] | null | null | null | from collections import defaultdict
from sugarrush.solver import SugarRush
from garageofcode.common.utils import flatten_simple
N = 3
if __name__ == '__main__':
main() | 30.6875 | 70 | 0.470468 |
f639470dab223c0a61d56c8eec0fdc664b9c6792 | 3,435 | py | Python | normalize.py | Zoomerhimmer/NT-Textual-Toolkit | c7b236972f6dcef45fd0596b06f113c503dda6d2 | [
"MIT"
] | null | null | null | normalize.py | Zoomerhimmer/NT-Textual-Toolkit | c7b236972f6dcef45fd0596b06f113c503dda6d2 | [
"MIT"
] | null | null | null | normalize.py | Zoomerhimmer/NT-Textual-Toolkit | c7b236972f6dcef45fd0596b06f113c503dda6d2 | [
"MIT"
] | null | null | null | import re
import sys
import os
# Lists of same characters
alpha_equiv = ['','','','','','','','','','','','','','','','','','','','','','','','','','','',''] #Converts to
alpha_subscripted = ['','','','','','','','','','','','','','','','','','','','',''] #Converts to
epsilon_equiv = ['','','','','','','','','','','... | 43.481013 | 165 | 0.52198 |
f63a003b49d1a2ecd8e8f98df7bb4d1aa0a1fd33 | 10,756 | py | Python | tests/test_conveniences.py | CSC-DPR/eopf-cpm | 6af10c0905eec876e8ab884ce62d5b74d52cb5a3 | [
"Apache-2.0"
] | null | null | null | tests/test_conveniences.py | CSC-DPR/eopf-cpm | 6af10c0905eec876e8ab884ce62d5b74d52cb5a3 | [
"Apache-2.0"
] | 171 | 2022-01-29T09:38:27.000Z | 2022-03-30T08:17:35.000Z | tests/test_conveniences.py | CSC-DPR/eopf-cpm | 6af10c0905eec876e8ab884ce62d5b74d52cb5a3 | [
"Apache-2.0"
] | null | null | null | import datetime
import os
import sys
from cmath import inf
from typing import Any
import hypothesis.extra.numpy as xps
import hypothesis.strategies as st
import numpy
import pytest
from hypothesis import assume, given
from eopf.product.utils import (
apply_xpath,
conv,
convert_to_unix_time,
is_date,
... | 37.873239 | 119 | 0.676088 |
f63a76556115387c030b8e4755467f5a63c5c6d2 | 1,227 | py | Python | src/controller/src/depth_hold.py | Fzeak/sauvc-2019 | 573dcb351d0f87f9b7605667c570a5003bedb224 | [
"MIT"
] | null | null | null | src/controller/src/depth_hold.py | Fzeak/sauvc-2019 | 573dcb351d0f87f9b7605667c570a5003bedb224 | [
"MIT"
] | null | null | null | src/controller/src/depth_hold.py | Fzeak/sauvc-2019 | 573dcb351d0f87f9b7605667c570a5003bedb224 | [
"MIT"
] | null | null | null | #!/usr/bin/env python
import rospy
from std_msgs.msgs import UInt16, Float32, String
from mavros_msgs.msg import Mavlink
from struct import pack, unpack
if __name__ == "__main__":
listener()
| 32.289474 | 87 | 0.740831 |
f63af088aba40e29ad224e5c65268768345c6e09 | 6,354 | py | Python | energy/lopy_serial_external_sd/LoPy4_sd/main.py | niclabs/water-monitoring | d18405e7536c985a400816263e80f73318e304b6 | [
"Apache-2.0"
] | 2 | 2020-05-21T03:47:12.000Z | 2021-02-01T16:48:01.000Z | energy/lopy_serial_external_sd/LoPy4_sd/main.py | niclabs/water-monitoring | d18405e7536c985a400816263e80f73318e304b6 | [
"Apache-2.0"
] | 9 | 2021-03-19T16:09:25.000Z | 2021-05-24T22:55:16.000Z | energy/lopy_serial_external_sd/LoPy4_sd/main.py | niclabs/water-monitoring | d18405e7536c985a400816263e80f73318e304b6 | [
"Apache-2.0"
] | 1 | 2021-01-13T14:45:14.000Z | 2021-01-13T14:45:14.000Z |
def save_text_file_sd(readings: list, index: int):
'''
Usage:
file_index = save_text_file_sd(decoded_data, file_index)
'''
if get_free_space(SD_MOUNT_POINT) < 2:
print("LoPy4 - SD - Too litle space available!")
filename = ('data%d' % index) + '.csv'
filepath = SD_MOUNT_PO... | 37.597633 | 125 | 0.586245 |
f63c2ee035cc31867910d8a464ee16f8c9b19ab6 | 741 | py | Python | forms_app/views.py | cs-fullstack-fall-2018/django-forms2-bachmanryan | e0318516f86afe99e991e6796b5e66d8b3e7a728 | [
"Apache-2.0"
] | null | null | null | forms_app/views.py | cs-fullstack-fall-2018/django-forms2-bachmanryan | e0318516f86afe99e991e6796b5e66d8b3e7a728 | [
"Apache-2.0"
] | null | null | null | forms_app/views.py | cs-fullstack-fall-2018/django-forms2-bachmanryan | e0318516f86afe99e991e6796b5e66d8b3e7a728 | [
"Apache-2.0"
] | null | null | null | from django.shortcuts import render, redirect
from .models import FormModel
from datetime import datetime
| 28.5 | 59 | 0.626181 |
f63c8b35a69bb35bff0b3baecdbc71a71d1a0a8f | 342 | py | Python | figurefirst/__init__.py | clbarnes/figurefirst | ed38e246a96f28530bf663eb6920da1c3ccee610 | [
"MIT"
] | 1 | 2020-05-07T01:17:51.000Z | 2020-05-07T01:17:51.000Z | figurefirst/__init__.py | clbarnes/figurefirst | ed38e246a96f28530bf663eb6920da1c3ccee610 | [
"MIT"
] | 1 | 2020-05-07T01:25:27.000Z | 2020-05-28T08:10:19.000Z | figurefirst/__init__.py | clbarnes/figurefirst | ed38e246a96f28530bf663eb6920da1c3ccee610 | [
"MIT"
] | null | null | null | from . import svg_to_axes
#reload(svg_to_axes)
from . import mpl_functions
from .svg_to_axes import FigureLayout
from . import mpl_fig_to_figurefirst_svg
from . import svg_util
from . import deprecated_regenerate
import sys
if sys.version_info[0] > 2: # regenerate uses importlib.utils, which requires python 3?
fro... | 28.5 | 87 | 0.804094 |
f63eceb66bf981ddf69e6d539baa4da5ebac9226 | 3,152 | py | Python | dedsecuritybot.py | dedsecurity/DedSecuritySearch | 294e2e1ed9254499fecc3db7b419f283027361fa | [
"MIT"
] | null | null | null | dedsecuritybot.py | dedsecurity/DedSecuritySearch | 294e2e1ed9254499fecc3db7b419f283027361fa | [
"MIT"
] | null | null | null | dedsecuritybot.py | dedsecurity/DedSecuritySearch | 294e2e1ed9254499fecc3db7b419f283027361fa | [
"MIT"
] | null | null | null | #!/usr/bin/python3
# -*- coding: utf-8 -*-
import tensorflow as tf
import numpy as np
import pandas as pd
import json
import nltk
from tensorflow.keras.preprocessing.text import Tokenizer
from tensorflow.keras.layers import Input, Embedding, LSTM , Dense,GlobalMaxPooling1D,Flatten
from tensorflow.keras.preprocessing.s... | 30.901961 | 114 | 0.745876 |
f641186c18365ae96c79dd45058d2e7e2b96430d | 5,069 | py | Python | tests/html/inline_builder_test.py | a-pompom/Python-markdownParser | 2525ba9c25dc3f77fb70af4ba9af423114940077 | [
"MIT"
] | null | null | null | tests/html/inline_builder_test.py | a-pompom/Python-markdownParser | 2525ba9c25dc3f77fb70af4ba9af423114940077 | [
"MIT"
] | 29 | 2021-07-25T02:06:16.000Z | 2022-03-20T10:55:16.000Z | tests/html/inline_builder_test.py | a-pompom/Python-markdownParser | 2525ba9c25dc3f77fb70af4ba9af423114940077 | [
"MIT"
] | null | null | null | import pytest
from app.html.inline_builder import InlineBuilder, LinkBuilder, CodeBuilder, ImageBuilder
from app.markdown.inline_parser import InlineParser, LinkParser, CodeParser, ImageParser
from app.settings import setting
| 29.300578 | 102 | 0.50582 |
f6414d22c3496a2fc287bc2eb9d1d63bb35b880e | 5,728 | py | Python | lab8/src/main.py | YaelBenShalom/Intro-to-AI | 37df1fc9316544338b8acfa5264316c4d5ce5915 | [
"MIT"
] | null | null | null | lab8/src/main.py | YaelBenShalom/Intro-to-AI | 37df1fc9316544338b8acfa5264316c4d5ce5915 | [
"MIT"
] | null | null | null | lab8/src/main.py | YaelBenShalom/Intro-to-AI | 37df1fc9316544338b8acfa5264316c4d5ce5915 | [
"MIT"
] | null | null | null | import common
import student_code
import array
all_passed = True
filename1 = "../data1.csv"
print("Linear Classifier : Dataset 1")
all_passed = run_experiment1(filename1) and all_passed
filename2 = "../data2.csv"
print("Linear Classifier : Dataset 2")
all_passed = run_experiment1(filename2) and... | 36.025157 | 86 | 0.622905 |
f64190e807ca83a7c40b302396ec9aa0416a19ee | 7,670 | py | Python | webapp/api/Model/basic.py | SCcagg5/My_Youtube | 6234b655ceb18a85d9bdd2c5837ce625c495d07b | [
"MIT"
] | 3 | 2020-05-16T19:24:42.000Z | 2020-09-26T17:05:19.000Z | webapp/api/Model/basic.py | SCcagg5/My_Youtube | 6234b655ceb18a85d9bdd2c5837ce625c495d07b | [
"MIT"
] | 30 | 2020-05-16T16:01:17.000Z | 2020-10-08T23:05:08.000Z | webapp/api/Model/basic.py | SCcagg5/My_Youtube | 6234b655ceb18a85d9bdd2c5837ce625c495d07b | [
"MIT"
] | null | null | null | from bottle import request, response, HTTPResponse
import os, datetime, re
import json as JSON
import jwt
| 32.638298 | 104 | 0.484876 |
f6429da6a835c587318716d02c57de897093290c | 304 | py | Python | data_sniffer/urls.py | thefedoration/django-data-sniffer | c691dbf42e69d6190ab8fb4fe3bfc3cb646716f3 | [
"MIT"
] | null | null | null | data_sniffer/urls.py | thefedoration/django-data-sniffer | c691dbf42e69d6190ab8fb4fe3bfc3cb646716f3 | [
"MIT"
] | null | null | null | data_sniffer/urls.py | thefedoration/django-data-sniffer | c691dbf42e69d6190ab8fb4fe3bfc3cb646716f3 | [
"MIT"
] | null | null | null | from django.conf.urls import include, url
from django.conf import settings
from .views import data_sniffer_health_check
if settings.DATA_SNIFFER_ENABLED:
urlpatterns = [
url(r'^(?P<key>[-\w]+)', data_sniffer_health_check, name="data_sniffer_health_check"),
]
else:
urlpatterns = []
| 25.333333 | 94 | 0.726974 |
f642c7514997e4f67f9ec1097b2c4722eab6d372 | 2,430 | py | Python | crtauth/client.py | spotify/crtauth | 5df8960f81f0c3a7ae3119b59221390707749cac | [
"Apache-2.0"
] | 90 | 2015-01-30T16:19:38.000Z | 2022-03-26T17:53:03.000Z | crtauth/client.py | spotify/crtauth | 5df8960f81f0c3a7ae3119b59221390707749cac | [
"Apache-2.0"
] | 14 | 2015-04-23T08:08:00.000Z | 2020-09-29T12:15:04.000Z | crtauth/client.py | spotify/crtauth | 5df8960f81f0c3a7ae3119b59221390707749cac | [
"Apache-2.0"
] | 20 | 2015-01-25T07:02:18.000Z | 2022-03-19T10:23:21.000Z | # Copyright (c) 2011-2017 Spotify AB
#
# 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 w... | 33.75 | 78 | 0.702058 |
f643843dc611bf1e9914238b418113f9bed6e4cd | 836 | py | Python | editor/api/terminal/endpoints/terminal.py | dporr/skf-editor | 51b660d1356f283629a7f9e9121fa948830b5579 | [
"MIT"
] | 3 | 2021-08-23T16:32:21.000Z | 2021-09-04T02:40:59.000Z | editor/api/terminal/endpoints/terminal.py | dporr/skf-editor | 51b660d1356f283629a7f9e9121fa948830b5579 | [
"MIT"
] | null | null | null | editor/api/terminal/endpoints/terminal.py | dporr/skf-editor | 51b660d1356f283629a7f9e9121fa948830b5579 | [
"MIT"
] | 1 | 2021-07-08T13:40:01.000Z | 2021-07-08T13:40:01.000Z | from flask import request
from flask_restplus import Resource
from editor.api.terminal.business import get_terminal_output
from editor.api.terminal.serializers import terminal_response, terminal_cmd
from editor.api.restplus import api
ns = api.namespace('terminal', description='Operations related to terminal') | 34.833333 | 76 | 0.720096 |
f64680efdbc765125c942cd42b9be9b6e892d55e | 400 | py | Python | mediumwave/migrations/0011_transmitter_iso.py | soundelec/mwradio | b1a7f6d8c24469c13c5336e292cc316980fdea2d | [
"BSD-3-Clause"
] | null | null | null | mediumwave/migrations/0011_transmitter_iso.py | soundelec/mwradio | b1a7f6d8c24469c13c5336e292cc316980fdea2d | [
"BSD-3-Clause"
] | null | null | null | mediumwave/migrations/0011_transmitter_iso.py | soundelec/mwradio | b1a7f6d8c24469c13c5336e292cc316980fdea2d | [
"BSD-3-Clause"
] | null | null | null | # Generated by Django 2.1.2 on 2018-10-19 14:46
from django.db import migrations, models
| 21.052632 | 61 | 0.605 |
f647836ba9f9d26035e89229613150a256f9838c | 953 | py | Python | 3_MapReduce Programming on MovieLens Data/solution/MapReduce/code/userReducer.py | minakoyang/YY_Distributed_Cluster_Computing | 0284569e4a6d0312590acf9ead5cf23bbcd167c9 | [
"MIT"
] | null | null | null | 3_MapReduce Programming on MovieLens Data/solution/MapReduce/code/userReducer.py | minakoyang/YY_Distributed_Cluster_Computing | 0284569e4a6d0312590acf9ead5cf23bbcd167c9 | [
"MIT"
] | null | null | null | 3_MapReduce Programming on MovieLens Data/solution/MapReduce/code/userReducer.py | minakoyang/YY_Distributed_Cluster_Computing | 0284569e4a6d0312590acf9ead5cf23bbcd167c9 | [
"MIT"
] | null | null | null | #!/usr/bin/env python
import sys
import csv
import json
mostRatingUser = None
mostRatingCount = 0
mostRatingInfo = None
for line in sys.stdin:
line = line.strip()
user, genreString = line.split("\t", 1)
genreInfo = json.loads(genreString)
if not mostRatingUser or len(genreInfo) > mostRatingCount:
... | 25.078947 | 135 | 0.672613 |
f64788dcdb43c2e6980587df505c8707237a9135 | 2,901 | py | Python | src/MockingBirdOnlyForUse/logger.py | Diaosi1111/MockingBirdOnlyForUse | 243092621eff36c13418e2648b3909bed6b1ae2d | [
"MIT"
] | null | null | null | src/MockingBirdOnlyForUse/logger.py | Diaosi1111/MockingBirdOnlyForUse | 243092621eff36c13418e2648b3909bed6b1ae2d | [
"MIT"
] | null | null | null | src/MockingBirdOnlyForUse/logger.py | Diaosi1111/MockingBirdOnlyForUse | 243092621eff36c13418e2648b3909bed6b1ae2d | [
"MIT"
] | null | null | null | import logging
import os
import sys
import time
LOG_LEVEL = logging.INFO
OPEN_CONSOLE_LOG = True
OPEN_FILE_LOG = False
LOG_FILE_PATH = None
LOG_NAME = "null"
###############################################################################################################
#
logger = Logger()
| 25.226087 | 111 | 0.541537 |
f647a1e251a956e51f190c8dadc2f437ea0fcb0e | 2,083 | py | Python | tools/GetImages.py | vicyangworld/WaterDispenserEye | 6b2191f99d85dfe89dc9ec4161959e8f908dd16f | [
"MIT"
] | null | null | null | tools/GetImages.py | vicyangworld/WaterDispenserEye | 6b2191f99d85dfe89dc9ec4161959e8f908dd16f | [
"MIT"
] | null | null | null | tools/GetImages.py | vicyangworld/WaterDispenserEye | 6b2191f99d85dfe89dc9ec4161959e8f908dd16f | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
import cv2
import sys
import os
# rotate
if __name__ == '__main__':
picNum = 2000
savePath = '../data/'
#video = "/home/yagnwk/Projects/linzhiling.mp4"
#
#
GetImagesFromVideo("Get Images", picNum, savePath, cameraID=1, bRotate=False)
#GetImagesFromVideo("Get Images", picNum, savePat... | 27.051948 | 118 | 0.670667 |
f6483079842b52a30927c51d2b4ba1bbe9984614 | 503 | py | Python | tests/test_padondehoy.py | kengru/Giru | 93f1b8dc6db35109a58a350218f7a69dcf2e788d | [
"MIT"
] | 3 | 2018-05-29T16:44:14.000Z | 2021-01-13T12:46:05.000Z | tests/test_padondehoy.py | kengru/Giru | 93f1b8dc6db35109a58a350218f7a69dcf2e788d | [
"MIT"
] | 52 | 2018-05-29T17:07:03.000Z | 2021-09-01T18:33:17.000Z | tests/test_padondehoy.py | kengru/Giru | 93f1b8dc6db35109a58a350218f7a69dcf2e788d | [
"MIT"
] | 2 | 2018-06-02T22:06:16.000Z | 2018-06-03T19:01:31.000Z | from unittest import TestCase
from giru.core.commands import PaDondeHoy
from tests.mocks import MockBot, MockUpdate
| 26.473684 | 61 | 0.723658 |
f649717f99a11da8f0544eda17de8a09d6562732 | 2,395 | py | Python | ircConnection.py | mutexlox/NO-FIFTH-GLYPH | 4acb5b8e584093ae7faa9f03c86c0e8d686df8f9 | [
"MIT"
] | 1 | 2019-04-16T10:59:38.000Z | 2019-04-16T10:59:38.000Z | ircConnection.py | mutexlox/NO-FIFTH-GLYPH | 4acb5b8e584093ae7faa9f03c86c0e8d686df8f9 | [
"MIT"
] | null | null | null | ircConnection.py | mutexlox/NO-FIFTH-GLYPH | 4acb5b8e584093ae7faa9f03c86c0e8d686df8f9 | [
"MIT"
] | null | null | null | import socket
import select
import config
| 31.103896 | 79 | 0.548643 |
f64a19aff3d9a4d44aac824d38c6aaef4eeb9f77 | 99 | py | Python | lesson-08/test_m.py | rafaelmartinsbuck/ai-for-trading | 51234e408c94ccdeee9b06301a2f63bd170243e3 | [
"MIT"
] | 1 | 2020-05-15T09:41:14.000Z | 2020-05-15T09:41:14.000Z | lesson-08/test_m.py | rafaelmartinsbuck/ai-for-trading | 51234e408c94ccdeee9b06301a2f63bd170243e3 | [
"MIT"
] | null | null | null | lesson-08/test_m.py | rafaelmartinsbuck/ai-for-trading | 51234e408c94ccdeee9b06301a2f63bd170243e3 | [
"MIT"
] | null | null | null | import pandas as pd
import numpy as np
df = pd.DataFrame({"A":[1,2,3,4], "B":[5,6,7,8]})
print(df) | 19.8 | 49 | 0.616162 |
f64b72c278e266e29f2b5f8013262577a44a9069 | 1,314 | py | Python | services/swimmer_service.py | Design-Patterns-Project-Group/swimming-mangement-in-python | c0acd0efb5f5536d7890801eed3a7bf995744bde | [
"MIT"
] | null | null | null | services/swimmer_service.py | Design-Patterns-Project-Group/swimming-mangement-in-python | c0acd0efb5f5536d7890801eed3a7bf995744bde | [
"MIT"
] | null | null | null | services/swimmer_service.py | Design-Patterns-Project-Group/swimming-mangement-in-python | c0acd0efb5f5536d7890801eed3a7bf995744bde | [
"MIT"
] | null | null | null | import sys, os.path
sys.path.append(os.path.abspath('..'))
from models import *
from . import AbstractSwimmerService
| 26.28 | 100 | 0.444444 |
f64b82838ee7021aed6a41f6268978be205f715f | 973 | py | Python | script.py | inforkgodara/python-network-scanner | 24d064fba907bbc662bb362c61c1e46a1e803129 | [
"MIT"
] | null | null | null | script.py | inforkgodara/python-network-scanner | 24d064fba907bbc662bb362c61c1e46a1e803129 | [
"MIT"
] | null | null | null | script.py | inforkgodara/python-network-scanner | 24d064fba907bbc662bb362c61c1e46a1e803129 | [
"MIT"
] | 1 | 2022-01-21T07:09:42.000Z | 2022-01-21T07:09:42.000Z | import socket
from datetime import datetime
# Author @inforkgodara
ip_address = input("IP Address: ")
splitted_ip_digits = ip_address.split('.')
dot = '.'
first_three_ip_digits = splitted_ip_digits[0] + dot + splitted_ip_digits[1] + dot + splitted_ip_digits[2] + dot
starting_number = int(input("Starting IP Number: "... | 27.8 | 111 | 0.701953 |
f64d0d7507a0bf1361c152ed2a9e7c2c37431db2 | 1,528 | py | Python | uibuilder/backend/__init__.py | stonewell/pyuibuilder | 0ed21f7cc0eee9d808a90a6c072c099b27dfffad | [
"BSD-2-Clause"
] | 1 | 2020-04-21T02:11:12.000Z | 2020-04-21T02:11:12.000Z | uibuilder/backend/__init__.py | stonewell/pyuibuilder | 0ed21f7cc0eee9d808a90a6c072c099b27dfffad | [
"BSD-2-Clause"
] | null | null | null | uibuilder/backend/__init__.py | stonewell/pyuibuilder | 0ed21f7cc0eee9d808a90a6c072c099b27dfffad | [
"BSD-2-Clause"
] | null | null | null | #__init__.py backend
import os
import sys
import logging
from importlib import import_module
L = logging.getLogger('backend')
def create_widget(node):
'''
create widget based on xml node
'''
_widget = None
if 'impl' in node.attrib:
try:
_widget = create_widget_from_impl(node.a... | 23.151515 | 91 | 0.665576 |
f64d58a53350e87f2961f9114eb18d59516ae402 | 638 | py | Python | CondTools/Geometry/python/HGCalParametersWriter_cff.py | ckamtsikis/cmssw | ea19fe642bb7537cbf58451dcf73aa5fd1b66250 | [
"Apache-2.0"
] | 852 | 2015-01-11T21:03:51.000Z | 2022-03-25T21:14:00.000Z | CondTools/Geometry/python/HGCalParametersWriter_cff.py | ckamtsikis/cmssw | ea19fe642bb7537cbf58451dcf73aa5fd1b66250 | [
"Apache-2.0"
] | 30,371 | 2015-01-02T00:14:40.000Z | 2022-03-31T23:26:05.000Z | CondTools/Geometry/python/HGCalParametersWriter_cff.py | ckamtsikis/cmssw | ea19fe642bb7537cbf58451dcf73aa5fd1b66250 | [
"Apache-2.0"
] | 3,240 | 2015-01-02T05:53:18.000Z | 2022-03-31T17:24:21.000Z | import FWCore.ParameterSet.Config as cms
from CondTools.Geometry.HGCalEEParametersWriter_cfi import *
from Configuration.ProcessModifiers.dd4hep_cff import dd4hep
dd4hep.toModify(HGCalEEParametersWriter,
fromDD4Hep = cms.bool(True)
)
HGCalHESiParametersWriter = HGCalEEParametersWriter.clone(
nam... | 29 | 60 | 0.757053 |
f64d7ae0c5f676ffe1417197ce2cd8024ae8d693 | 1,895 | py | Python | Transition_examples_NCL_to_PyNGL/streamlines/TRANS_streamline.py | 1271756664/-xESMF | f2341fe5a949050dc9e350fdc8c7d3e3d3d48222 | [
"MIT"
] | 54 | 2015-11-09T13:39:00.000Z | 2022-02-16T10:31:19.000Z | Transition_examples_NCL_to_PyNGL/streamlines/TRANS_streamline.py | wengensheng/PyEarthScience | 0c5b116a80604c5a892369b975df8b15b9b34717 | [
"MIT"
] | null | null | null | Transition_examples_NCL_to_PyNGL/streamlines/TRANS_streamline.py | wengensheng/PyEarthScience | 0c5b116a80604c5a892369b975df8b15b9b34717 | [
"MIT"
] | 25 | 2016-04-11T20:40:40.000Z | 2021-12-01T14:38:41.000Z | #
# File:
# TRANS_streamline.py
#
# Synopsis:
# Illustrates how to create a streamline plot
#
# Categories:
# streamline plot
#
# Author:
# Karin Meier-Fleischer, based on NCL example
#
# Date of initial publication:
# September 2018
#
# Description:
# This example shows how to create a stream... | 22.559524 | 76 | 0.658047 |
f64d7d189c96dd02a499180601f2f832ec95df53 | 889 | py | Python | src/normalise.py | amystar101/fingerprint-image-enhancement | 45110796f47781317516d053ce876853a2fb682c | [
"Unlicense"
] | 1 | 2021-06-24T17:51:48.000Z | 2021-06-24T17:51:48.000Z | src/normalise.py | amystar101/fingerprint-image-enhancement | 45110796f47781317516d053ce876853a2fb682c | [
"Unlicense"
] | null | null | null | src/normalise.py | amystar101/fingerprint-image-enhancement | 45110796f47781317516d053ce876853a2fb682c | [
"Unlicense"
] | null | null | null | #function to normalise image
#setting new mean = 1, and new varriance = 1
import numpy as np
import math
| 24.027027 | 96 | 0.600675 |
f64de443ca7e5b34fb910ad26f914c99342b2c99 | 222 | py | Python | tests/photos.py | DennyWeinberg/photoprism | 39107489dec1fe1bbdbd86e2d57c2364c6d115a0 | [
"MIT"
] | 1 | 2022-02-26T15:43:53.000Z | 2022-02-26T15:43:53.000Z | tests/photos.py | DennyWeinberg/photoprism | 39107489dec1fe1bbdbd86e2d57c2364c6d115a0 | [
"MIT"
] | null | null | null | tests/photos.py | DennyWeinberg/photoprism | 39107489dec1fe1bbdbd86e2d57c2364c6d115a0 | [
"MIT"
] | null | null | null | import unittest
from photoprism import Client
| 22.2 | 87 | 0.707207 |
f64e55e11d9a142eb48cd1c9e5fe0bd127f8241b | 1,778 | py | Python | simulate.py | mikedigriz/Brave-Trigger | 4decb22b7f75ba4730d5c083af62c8e12386e0a3 | [
"Apache-2.0"
] | 1 | 2022-03-28T23:23:38.000Z | 2022-03-28T23:23:38.000Z | simulate.py | mikedigriz/Brave-Trigger | 4decb22b7f75ba4730d5c083af62c8e12386e0a3 | [
"Apache-2.0"
] | null | null | null | simulate.py | mikedigriz/Brave-Trigger | 4decb22b7f75ba4730d5c083af62c8e12386e0a3 | [
"Apache-2.0"
] | 1 | 2021-12-24T07:14:53.000Z | 2021-12-24T07:14:53.000Z | # Simulate user activity for Windows
# Can trigger Brave Ads
import random
from time import sleep
import pydirectinput
import os
# clear log function
# main simulate function
if __name__ == '__main__':
simulate()
| 28.677419 | 59 | 0.571429 |
f6518ee8615255e8e5a356ab1a00d2f48a8a58b4 | 1,688 | py | Python | modules/module8/extra/manual_predict_demand.py | shourya01/power_data_analytics_tools | 7621eaebb5b3bd107238016b07e5ae71c891c4b1 | [
"MIT"
] | 1 | 2021-09-26T17:29:46.000Z | 2021-09-26T17:29:46.000Z | modules/module8/extra/manual_predict_demand.py | shourya01/power_data_analytics_tools | 7621eaebb5b3bd107238016b07e5ae71c891c4b1 | [
"MIT"
] | null | null | null | modules/module8/extra/manual_predict_demand.py | shourya01/power_data_analytics_tools | 7621eaebb5b3bd107238016b07e5ae71c891c4b1 | [
"MIT"
] | null | null | null | import pandas as pd
import numpy as np
import matplotlib.pyplot as plt
counties_drop_list = ["Year", "Los Angeles County", "Merced County", "Riverside County", "San Diego County", "San Mateo County", "Santa Barbara County", "Santa Clara County", "Santa Cruz County"]
df = pd.read_csv("population_all.csv")
df = pd.con... | 28.610169 | 195 | 0.640403 |
f65224814a8fb77dc67c3f651cede815e9b8f99b | 1,786 | py | Python | config.py | vsmelov/neural-music | 0cbe06080e2c257c323ffc93dc673bb1e0edf2c4 | [
"MIT"
] | 2 | 2020-03-06T19:36:17.000Z | 2022-03-09T07:29:08.000Z | config.py | vsmelov/neural-music | 0cbe06080e2c257c323ffc93dc673bb1e0edf2c4 | [
"MIT"
] | null | null | null | config.py | vsmelov/neural-music | 0cbe06080e2c257c323ffc93dc673bb1e0edf2c4 | [
"MIT"
] | null | null | null | # coding: utf-8
import os
base_dir = os.path.dirname(os.path.realpath(__file__))
music_dir = os.path.join(base_dir, 'music-3')
data_dir = os.path.join(base_dir, 'data-3')
weights_dir = os.path.join(data_dir, 'weights')
weights_file = os.path.join(weights_dir, 'weights')
if not os.path.exists(data_dir):
os.maked... | 25.15493 | 80 | 0.731243 |
f653d187c14a15a2c7898dab067018d3da9f4ba1 | 1,184 | py | Python | tests/conftest.py | BookOps-CAT/ChangeSubject | bff86ad58685db169a99f9ad3b2df1179cffb5a3 | [
"MIT"
] | 1 | 2022-01-13T20:28:12.000Z | 2022-01-13T20:28:12.000Z | tests/conftest.py | BookOps-CAT/ChangeSubject | bff86ad58685db169a99f9ad3b2df1179cffb5a3 | [
"MIT"
] | null | null | null | tests/conftest.py | BookOps-CAT/ChangeSubject | bff86ad58685db169a99f9ad3b2df1179cffb5a3 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
import pytest
from pymarc import Field, Record
| 24.666667 | 79 | 0.525338 |
f65532be9b4201eff4ea7369b593b54567404d32 | 8,132 | py | Python | src/lexer_rules2.py | ezielramos/cool-compiler-2021 | e5b2aa51e47296b21f8b1ea14d73b1c7e7ef0785 | [
"MIT"
] | null | null | null | src/lexer_rules2.py | ezielramos/cool-compiler-2021 | e5b2aa51e47296b21f8b1ea14d73b1c7e7ef0785 | [
"MIT"
] | null | null | null | src/lexer_rules2.py | ezielramos/cool-compiler-2021 | e5b2aa51e47296b21f8b1ea14d73b1c7e7ef0785 | [
"MIT"
] | null | null | null | from TOKEN import LexToken
| 33.327869 | 124 | 0.356739 |
f655f02af6c4b546b8ad4d6e4f667bc6a96d3c25 | 5,578 | py | Python | UCI/abalone/abalone.py | tqtifnypmb/ML | dfcc6f849b1d5ee2efd0faa0f585091fc7263a6c | [
"MIT"
] | null | null | null | UCI/abalone/abalone.py | tqtifnypmb/ML | dfcc6f849b1d5ee2efd0faa0f585091fc7263a6c | [
"MIT"
] | null | null | null | UCI/abalone/abalone.py | tqtifnypmb/ML | dfcc6f849b1d5ee2efd0faa0f585091fc7263a6c | [
"MIT"
] | null | null | null | import pandas as pd
import numpy as np
import math
import matplotlib.pyplot as plt
from sklearn import feature_selection as fs
from sklearn import naive_bayes
from sklearn import model_selection
from sklearn import metrics
from sklearn import linear_model
from sklearn import svm
from imblearn.under_sampling import Ne... | 34.220859 | 87 | 0.674256 |
f6566e16378a091190a0b2c504267d971df5e5d3 | 3,204 | py | Python | os_migrate/plugins/filter/stringfilter.py | jbadiapa/os-migrate | 19b591a672bc9e4af72e62dbd96be94a238a6dc2 | [
"Apache-2.0"
] | 35 | 2020-01-22T18:38:27.000Z | 2022-03-22T16:19:56.000Z | os_migrate/plugins/filter/stringfilter.py | jbadiapa/os-migrate | 19b591a672bc9e4af72e62dbd96be94a238a6dc2 | [
"Apache-2.0"
] | 292 | 2019-12-09T11:15:26.000Z | 2022-03-31T14:37:52.000Z | os_migrate/plugins/filter/stringfilter.py | jbadiapa/os-migrate | 19b591a672bc9e4af72e62dbd96be94a238a6dc2 | [
"Apache-2.0"
] | 32 | 2019-12-09T11:09:44.000Z | 2022-03-24T01:13:31.000Z | from __future__ import (absolute_import, division, print_function)
__metaclass__ = type
from pprint import pformat
import re
from ansible import errors
def stringfilter(items, queries, attribute=None):
"""Filter a `items` list according to a list of `queries`. Values from
`items` are kept if they match at l... | 32.363636 | 116 | 0.604869 |
f65864777f5cc28180536badeeb5028094ebe5da | 1,082 | py | Python | src/qgis_ros/core/translators/wireless_msgs.py | acfrmarine/qgis_ros | 01dd107f963b87df063bf2f11b0a484f4323cae9 | [
"MIT"
] | 31 | 2018-09-11T17:50:17.000Z | 2021-09-13T11:48:47.000Z | src/qgis_ros/core/translators/wireless_msgs.py | acfrmarine/qgis_ros | 01dd107f963b87df063bf2f11b0a484f4323cae9 | [
"MIT"
] | 9 | 2018-09-11T00:45:23.000Z | 2022-01-07T13:19:20.000Z | src/qgis_ros/core/translators/wireless_msgs.py | acfrmarine/qgis_ros | 01dd107f963b87df063bf2f11b0a484f4323cae9 | [
"MIT"
] | 9 | 2018-10-12T12:31:38.000Z | 2021-06-05T02:52:44.000Z | from wireless_msgs.msg import Connection
from .translator import Translator, TableTranslatorMixin
| 29.243243 | 63 | 0.543438 |
f65898c28ffae1a8584de739a8a23ca7c104b359 | 671 | py | Python | Lab11/BacktrackingRecursive.py | alexnaiman/Fundamentals-Of-Programming---Lab-assignments | ef066e6036e20b9c686799f507f10e15e50e3285 | [
"MIT"
] | 4 | 2018-02-19T13:57:38.000Z | 2022-01-08T04:10:54.000Z | Lab11/BacktrackingRecursive.py | alexnaiman/Fundamentals-Of-Programming---Lab-assignments | ef066e6036e20b9c686799f507f10e15e50e3285 | [
"MIT"
] | null | null | null | Lab11/BacktrackingRecursive.py | alexnaiman/Fundamentals-Of-Programming---Lab-assignments | ef066e6036e20b9c686799f507f10e15e50e3285 | [
"MIT"
] | null | null | null | l = ["+", "-"]
n = int(input("Give number"))
list2 = []
for i in range(n):
list2.append(int(input(str(i) + ":")))
backRec([])
| 16.775 | 43 | 0.4307 |
f659ad3a0d5abc3c751802d36141241340ba30f7 | 8,098 | py | Python | RBM.py | alibell/binary_rbm | f9f30005b7866c0b1e2714350c22b81e33dac72c | [
"MIT"
] | null | null | null | RBM.py | alibell/binary_rbm | f9f30005b7866c0b1e2714350c22b81e33dac72c | [
"MIT"
] | null | null | null | RBM.py | alibell/binary_rbm | f9f30005b7866c0b1e2714350c22b81e33dac72c | [
"MIT"
] | null | null | null | import numpy as np
def sigmoid(X):
"""sigmoid
Compute the sigmoid function
Parameters
----------
X: numpy array
Output:
-------
Numpy array of the same size of X
"""
return 1/(1+np.exp(-X)) | 29.234657 | 108 | 0.554828 |
f65cdec3341b6d687da7bd47d8ce74b25665b578 | 745 | py | Python | Day 07/Anagrams.py | sandeep-krishna/100DaysOfCode | af4594fb6933e4281d298fa921311ccc07295a7c | [
"MIT"
] | null | null | null | Day 07/Anagrams.py | sandeep-krishna/100DaysOfCode | af4594fb6933e4281d298fa921311ccc07295a7c | [
"MIT"
] | null | null | null | Day 07/Anagrams.py | sandeep-krishna/100DaysOfCode | af4594fb6933e4281d298fa921311ccc07295a7c | [
"MIT"
] | null | null | null | '''
Anagrams
Given two strings, a and b , that may or may not be of the same length, determine the minimum number of character deletions required to make a and b anagrams. Any characters can be deleted from either of the strings.
Input :
test cases,t
two strings a and b, for each test case
Output:
Desired O/p
Cons... | 16.195652 | 216 | 0.703356 |
f65e0aca86dc9604b4e7e6ec844b23ecb9545677 | 2,031 | py | Python | bookstore/lib/green/__init__.py | Inveracity/python-grpc-betterproto-quartz | a94a0ea8429d93f3275389a66d0c41ca9b4b616c | [
"MIT"
] | null | null | null | bookstore/lib/green/__init__.py | Inveracity/python-grpc-betterproto-quartz | a94a0ea8429d93f3275389a66d0c41ca9b4b616c | [
"MIT"
] | null | null | null | bookstore/lib/green/__init__.py | Inveracity/python-grpc-betterproto-quartz | a94a0ea8429d93f3275389a66d0c41ca9b4b616c | [
"MIT"
] | null | null | null | # Generated by the protocol buffer compiler. DO NOT EDIT!
# sources: green.proto
# plugin: python-betterproto
from dataclasses import dataclass
from typing import Dict, List
import betterproto
from betterproto.grpc.grpclib_server import ServiceBase
import grpclib
class GreenStub(betterproto.ServiceStub):
""... | 25.074074 | 84 | 0.672575 |
f65e102078e64cef47d78af8c0bec25735c6165b | 2,874 | py | Python | install-git-config-upstream.py | omunroe-com/cobaltdepottools | a8c8b5948286ceaa647c8a3bd5f75ea6ffb263da | [
"BSD-3-Clause"
] | null | null | null | install-git-config-upstream.py | omunroe-com/cobaltdepottools | a8c8b5948286ceaa647c8a3bd5f75ea6ffb263da | [
"BSD-3-Clause"
] | null | null | null | install-git-config-upstream.py | omunroe-com/cobaltdepottools | a8c8b5948286ceaa647c8a3bd5f75ea6ffb263da | [
"BSD-3-Clause"
] | null | null | null | """For each repo in DEPS, git config an appropriate depot-tools.upstream.
This will allow git new-branch to set the correct tracking branch.
"""
import argparse
import hashlib
import json
import os
import sys
import textwrap
import gclient_utils
import git_common
def ConfigUpstream(repo_dir, url):
"""Determine t... | 29.9375 | 79 | 0.720251 |
f65e76516161e35a56048949db48a5fb3cb8e36c | 3,269 | py | Python | examples/visualise_labels.py | meyerjo/simple-waymo-open-dataset-reader | 11dc3ecca77b9c877d0c42c71da2f2c93eb0aca0 | [
"Apache-2.0"
] | null | null | null | examples/visualise_labels.py | meyerjo/simple-waymo-open-dataset-reader | 11dc3ecca77b9c877d0c42c71da2f2c93eb0aca0 | [
"Apache-2.0"
] | null | null | null | examples/visualise_labels.py | meyerjo/simple-waymo-open-dataset-reader | 11dc3ecca77b9c877d0c42c71da2f2c93eb0aca0 | [
"Apache-2.0"
] | null | null | null | # Copyright (c) 2019, Grgoire Payen de La Garanderie, Durham University
#
# 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 require... | 34.052083 | 108 | 0.722239 |
f65f255a9168cd924c215d076e0c41cb26abdeb2 | 1,833 | py | Python | utils.py | ProRansum/site-scanner | 39988350980c477996f6bb18b1db3cc097cc0893 | [
"MIT"
] | null | null | null | utils.py | ProRansum/site-scanner | 39988350980c477996f6bb18b1db3cc097cc0893 | [
"MIT"
] | null | null | null | utils.py | ProRansum/site-scanner | 39988350980c477996f6bb18b1db3cc097cc0893 | [
"MIT"
] | null | null | null | import os
import socket
import codecs
import urllib3
from urllib.parse import urlparse
| 19.09375 | 63 | 0.675396 |
f6606f4ec40d7bf3ddd3d04cdb7161f2cd3e479b | 8,504 | py | Python | finnhub/models/filing.py | gavinjay/finnhub-python | b5c409dafeda390d14a2b0618ae6f25ab8d76c5b | [
"Apache-2.0"
] | null | null | null | finnhub/models/filing.py | gavinjay/finnhub-python | b5c409dafeda390d14a2b0618ae6f25ab8d76c5b | [
"Apache-2.0"
] | null | null | null | finnhub/models/filing.py | gavinjay/finnhub-python | b5c409dafeda390d14a2b0618ae6f25ab8d76c5b | [
"Apache-2.0"
] | null | null | null | # coding: utf-8
"""
Finnhub API
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501
The version of the OpenAPI document: 1.0.0
Generated by: https://openapi-generator.tech
"""
import pprint
import re # noqa: F401
import six
fro... | 26.658307 | 193 | 0.563617 |
f661ad9fa986a012f353988d72881833e9a5c889 | 1,876 | py | Python | year_2019/day_11_2019.py | TheTomcat/AdventOfCode | bb81a46f7064bd69e924a0b58e6c5e0cc450e102 | [
"MIT"
] | null | null | null | year_2019/day_11_2019.py | TheTomcat/AdventOfCode | bb81a46f7064bd69e924a0b58e6c5e0cc450e102 | [
"MIT"
] | null | null | null | year_2019/day_11_2019.py | TheTomcat/AdventOfCode | bb81a46f7064bd69e924a0b58e6c5e0cc450e102 | [
"MIT"
] | null | null | null | from collections import defaultdict
from typing import List, Any, Tuple
from util.helpers import solution_timer
from util.input_helper import read_entire_input
from util.console import console
from year_2019.intcode import IntCode, parse
data = read_entire_input(2019,11)
if __name__ == "__main__":
data = read_ent... | 35.396226 | 131 | 0.650853 |
f6630d45727b60cf6121d275d6c726d45711227d | 287 | py | Python | Life.py | lianwt115/python_pygame | 4d70846740e8905f63059de107a8d0831d9ffe0c | [
"MIT"
] | 1 | 2018-08-14T02:54:14.000Z | 2018-08-14T02:54:14.000Z | Life.py | lianwt115/python_pygame | 4d70846740e8905f63059de107a8d0831d9ffe0c | [
"MIT"
] | null | null | null | Life.py | lianwt115/python_pygame | 4d70846740e8905f63059de107a8d0831d9ffe0c | [
"MIT"
] | null | null | null | #
import pygame
| 17.9375 | 43 | 0.620209 |
f665d858f07e9b00c3c2dbdc919c6e8a395f2e99 | 6,588 | py | Python | course_selection/scrape_parse.py | PrincetonUSG/ReCal | a65782602b1a6d8932ff4cca1526cb9a3addacf6 | [
"MIT"
] | 1 | 2017-01-01T22:17:52.000Z | 2017-01-01T22:17:52.000Z | course_selection/scrape_parse.py | PrincetonUSG/recal | d748f6871e7f7bbbd7e9d66482de040c42c8c18b | [
"MIT"
] | 1 | 2022-02-20T19:43:33.000Z | 2022-02-20T19:43:33.000Z | course_selection/scrape_parse.py | PrincetonUSG/ReCal | a65782602b1a6d8932ff4cca1526cb9a3addacf6 | [
"MIT"
] | null | null | null | """
Scrapes OIT's Web Feeds to add courses and sections to database.
Procedure:
- Get list of departments (3-letter department codes)
- Run this: http://etcweb.princeton.edu/webfeeds/courseofferings/?term=current&subject=COS
- Parse it for courses, sections, and lecture times (as recurring events)
"""
from mobileapp... | 32.453202 | 99 | 0.548118 |
f66643e629de4e532f98ff43ed8508b807166f50 | 34,590 | py | Python | wxRavenGUI/application/core/wxViewsManager.py | sLiinuX/wxRaven | a513a029fa1ff2059ee262c524b4b2b45111f1a6 | [
"MIT"
] | 11 | 2021-12-20T15:32:17.000Z | 2022-03-16T03:54:02.000Z | wxRavenGUI/application/core/wxViewsManager.py | sLiinuX/wxRaven | a513a029fa1ff2059ee262c524b4b2b45111f1a6 | [
"MIT"
] | 156 | 2021-12-31T21:01:31.000Z | 2022-03-20T21:57:31.000Z | wxRavenGUI/application/core/wxViewsManager.py | sLiinuX/wxRaven | a513a029fa1ff2059ee262c524b4b2b45111f1a6 | [
"MIT"
] | 3 | 2022-01-21T14:52:43.000Z | 2022-02-12T05:32:19.000Z | '''
Created on 13 dc. 2021
@author: slinux
'''
import inspect
from wxRavenGUI.view import wxRavenAddView
from wxRavenGUI.application.wxcustom.CustomDialog import wxRavenCustomDialog
import wx
import wx.aui
import logging
from .jobs import *
... | 31.733945 | 250 | 0.521798 |
f666df25a3a1f1644fff7b7708a3e6801a52f114 | 4,714 | py | Python | python/image-tools/adjust-exif-timestamp.py | bmaupin/graveyard | 71d52fe6589ce13dfe7433906d1aa50df48c9f94 | [
"MIT"
] | 1 | 2019-11-23T10:44:58.000Z | 2019-11-23T10:44:58.000Z | python/image-tools/adjust-exif-timestamp.py | bmaupin/graveyard | 71d52fe6589ce13dfe7433906d1aa50df48c9f94 | [
"MIT"
] | 8 | 2020-07-16T07:14:12.000Z | 2020-10-14T17:25:33.000Z | python/image-tools/adjust-exif-timestamp.py | bmaupin/graveyard | 71d52fe6589ce13dfe7433906d1aa50df48c9f94 | [
"MIT"
] | 1 | 2019-11-23T10:45:00.000Z | 2019-11-23T10:45:00.000Z | #!/usr/bin/env python
import datetime
import optparse
import os
import os.path
import struct
import sys
# sudo pip3 install piexif
import piexif
# Make this negative to subtract time, e.g.:
# -datetime.timedelta(hours=5, minutes=9)
#TIME_ADJUSTMENT = datetime.timedelta(hours=5, minutes=9)
#TIME_ADJUSTMENT = datetim... | 35.179104 | 136 | 0.663131 |
f6686b5276ad867dc68aa933b114b3472854d95c | 99 | py | Python | change_funname.py | poojadhoble32/python-projects | 4c094dd0072d4213344e26476e4e99a4a12246e7 | [
"bzip2-1.0.6"
] | null | null | null | change_funname.py | poojadhoble32/python-projects | 4c094dd0072d4213344e26476e4e99a4a12246e7 | [
"bzip2-1.0.6"
] | null | null | null | change_funname.py | poojadhoble32/python-projects | 4c094dd0072d4213344e26476e4e99a4a12246e7 | [
"bzip2-1.0.6"
] | null | null | null | old as new
new("pooja",23)
| 19.8 | 49 | 0.606061 |
f66a07a388a781ad9ca3ffd91259ea2672b30eef | 2,449 | py | Python | idgo_admin/views/sld_preview.py | neogeo-technologies/idgo | 23e028b0d7fb2daf54d7e2954e0cc4d7b9be4210 | [
"Apache-2.0"
] | null | null | null | idgo_admin/views/sld_preview.py | neogeo-technologies/idgo | 23e028b0d7fb2daf54d7e2954e0cc4d7b9be4210 | [
"Apache-2.0"
] | 2 | 2018-09-14T07:12:00.000Z | 2019-11-13T09:32:24.000Z | idgo_admin/views/sld_preview.py | neogeo-technologies/idgo | 23e028b0d7fb2daf54d7e2954e0cc4d7b9be4210 | [
"Apache-2.0"
] | 2 | 2019-03-25T08:27:43.000Z | 2019-10-07T15:25:30.000Z | # Copyright (c) 2017-2021 Neogeo-Technologies.
# All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by... | 31.805195 | 88 | 0.721111 |
f66a1e25a8296b28e107195d808f86bbb9fe4c11 | 14,785 | py | Python | FM/deepFM.py | sameul-yuan/markdowns | fcb8b77bfe402ffabba42352f1ae686cf1a12ecd | [
"MIT"
] | null | null | null | FM/deepFM.py | sameul-yuan/markdowns | fcb8b77bfe402ffabba42352f1ae686cf1a12ecd | [
"MIT"
] | null | null | null | FM/deepFM.py | sameul-yuan/markdowns | fcb8b77bfe402ffabba42352f1ae686cf1a12ecd | [
"MIT"
] | null | null | null | import os
import sys
import numpy as np
import pandas as pd
import tensorflow as tf
from losses import focal_loss,weighted_binary_crossentropy
from utils import Dataset
if __name__ == '__main__':
BASE_PATH = os.path.dirname(os.path.abspath(__file__))
params ={'feature_size':None,
'field_size':None,... | 52.429078 | 162 | 0.573216 |
f66b8ff9a4185c06c771d36dfd22c91e6cab609f | 3,815 | py | Python | pfa.py | JonathanSilver/pyKT | 2bef7e926177725e3ddd79226895a67fa9b13cba | [
"MIT"
] | 1 | 2021-03-06T08:48:10.000Z | 2021-03-06T08:48:10.000Z | pfa.py | moduxiaohunhun/pyKT | 2bef7e926177725e3ddd79226895a67fa9b13cba | [
"MIT"
] | null | null | null | pfa.py | moduxiaohunhun/pyKT | 2bef7e926177725e3ddd79226895a67fa9b13cba | [
"MIT"
] | 3 | 2021-03-15T12:19:06.000Z | 2021-04-13T12:09:19.000Z | import numpy as np
from math import log
from sklearn.linear_model import LogisticRegression
from sklearn.metrics import roc_auc_score, mean_squared_error, mean_absolute_error, classification_report
from math import sqrt
import json
from pprint import pprint
import argparse
parser = argparse.ArgumentParser(f... | 35.990566 | 106 | 0.527392 |
f66f8d8c41fecc47a0097bf4d34448a0a8795388 | 207 | py | Python | apps/web/api/urls.py | rubmu/QuestBot | 34c42a25e8400060a80e1a234ca7bc7a265769ae | [
"MIT"
] | 16 | 2017-12-01T04:45:50.000Z | 2021-08-28T17:25:11.000Z | apps/web/api/urls.py | daniilzinevich/QuestBot | 927b9f35aa4a4c88bf3825b965387d358c98f413 | [
"MIT"
] | 2 | 2018-08-18T16:42:49.000Z | 2021-02-25T21:16:06.000Z | apps/web/api/urls.py | daniilzinevich/QuestBot | 927b9f35aa4a4c88bf3825b965387d358c98f413 | [
"MIT"
] | 13 | 2018-01-26T14:35:51.000Z | 2020-05-10T20:48:36.000Z | from django.urls import path
from .views import ProcessWebHookAPIView
urlpatterns = [
path(
'webhook/<hook_id>/',
ProcessWebHookAPIView.as_view(),
name='hooks-handler'
),
]
| 17.25 | 40 | 0.642512 |
f67092cd8f576ff8a96e8e2a3849a3ba743001f8 | 3,534 | py | Python | databand_airflow_monitor.py | databand-ai/databand_templates | e5cae45b3bb73fa7214f6f1d38d001f74752360c | [
"Apache-2.0"
] | 4 | 2021-03-15T15:54:01.000Z | 2022-02-21T20:35:25.000Z | databand_airflow_monitor.py | databand-ai/databand_templates | e5cae45b3bb73fa7214f6f1d38d001f74752360c | [
"Apache-2.0"
] | null | null | null | databand_airflow_monitor.py | databand-ai/databand_templates | e5cae45b3bb73fa7214f6f1d38d001f74752360c | [
"Apache-2.0"
] | 3 | 2021-03-30T12:41:50.000Z | 2022-01-03T07:44:35.000Z | import logging
import os
from datetime import timedelta
from airflow import settings
from airflow.hooks.base_hook import BaseHook
from airflow.models import DAG
from airflow.operators.bash_operator import BashOperator
from airflow.utils.dates import days_ago
CHECK_INTERVAL = 10 # Sleep time (in seconds) between sy... | 29.697479 | 85 | 0.649123 |
f673429c5f822b682d2ef47c28ccc96363542050 | 1,092 | py | Python | src/search/sort/prepare_data.py | lingeen/lingeen-Ying | b7d4771d556e2168bd3dfae15b39336046319a9c | [
"Apache-2.0"
] | null | null | null | src/search/sort/prepare_data.py | lingeen/lingeen-Ying | b7d4771d556e2168bd3dfae15b39336046319a9c | [
"Apache-2.0"
] | null | null | null | src/search/sort/prepare_data.py | lingeen/lingeen-Ying | b7d4771d556e2168bd3dfae15b39336046319a9c | [
"Apache-2.0"
] | null | null | null | # -*- coding: utf-8 -*-
# @Time : 2020/12/23 2:27 PM
# @Author : Kevin
import config
from utils.sentence_process import cut_sentence_by_character
from search.sort.word_to_sequence import Word2Sequence
import pickle
if __name__ == '__main__':
# prepare_dict_model()
# test_dict_model()
make_data_f... | 23.234043 | 62 | 0.667582 |
f67473386f78c6d97077c35b82b59ca8dd569a05 | 681 | py | Python | equipment_piece.py | cookyt/mhw_optimizer | 05dc4483f9bb0b6f8c2d8e205239d58bbd4c274a | [
"MIT"
] | null | null | null | equipment_piece.py | cookyt/mhw_optimizer | 05dc4483f9bb0b6f8c2d8e205239d58bbd4c274a | [
"MIT"
] | null | null | null | equipment_piece.py | cookyt/mhw_optimizer | 05dc4483f9bb0b6f8c2d8e205239d58bbd4c274a | [
"MIT"
] | null | null | null | from enum import Enum
| 22.7 | 75 | 0.666667 |
f674e20787b0a96114591ae162f4d1c5ca96e86b | 11,984 | py | Python | tests/message_handler_test.py | FelixSchwarz/mailqueue-runner | 8e1a53ac4b363ced55636b1dda042c605386fc81 | [
"0BSD"
] | 3 | 2019-12-15T18:17:16.000Z | 2022-03-18T23:00:49.000Z | tests/message_handler_test.py | FelixSchwarz/mailqueue-runner | 8e1a53ac4b363ced55636b1dda042c605386fc81 | [
"0BSD"
] | 24 | 2018-10-12T21:13:00.000Z | 2020-11-12T23:03:31.000Z | tests/message_handler_test.py | FelixSchwarz/mailqueue-runner | 8e1a53ac4b363ced55636b1dda042c605386fc81 | [
"0BSD"
] | null | null | null | # -*- coding: utf-8 -*-
# SPDX-License-Identifier: MIT
from __future__ import absolute_import, print_function, unicode_literals
import os
import shutil
try:
from unittest.mock import MagicMock
except ImportError:
from mock import MagicMock
import uuid
from ddt import ddt as DataDrivenTestCase, data as ddt_da... | 41.467128 | 99 | 0.685831 |
f674f2c2add88e217619ce81024522e2b7f8ad3d | 1,632 | py | Python | Python3/687.longest-univalue-path.py | 610yilingliu/leetcode | 30d071b3685c2131bd3462ba77c6c05114f3f227 | [
"MIT"
] | null | null | null | Python3/687.longest-univalue-path.py | 610yilingliu/leetcode | 30d071b3685c2131bd3462ba77c6c05114f3f227 | [
"MIT"
] | null | null | null | Python3/687.longest-univalue-path.py | 610yilingliu/leetcode | 30d071b3685c2131bd3462ba77c6c05114f3f227 | [
"MIT"
] | null | null | null | #
# @lc app=leetcode id=687 lang=python3
#
# [687] Longest Univalue Path
#
# @lc code=start
from collections import deque
# Definition for a binary tree node.
if __name__ == '__main__':
tree = construct_tree([5,4,5,1,1,5])
b = Solution()
c = b.longestUnivaluePath(tree)
print(c)
# @lc code=en... | 24.358209 | 85 | 0.525123 |
f6768e992a307af16822d4dff6a0e361ad829926 | 6,803 | py | Python | tests/reflinks_tests.py | xqt/pwb | 9a4fe27138f32952e533256195849d05855df0b0 | [
"MIT"
] | 1 | 2022-02-10T00:20:42.000Z | 2022-02-10T00:20:42.000Z | tests/reflinks_tests.py | euku/spbot | e6d505c8965b4e6730b3dc4505f92e35a3edb2e2 | [
"MIT"
] | 1 | 2021-12-08T16:29:41.000Z | 2021-12-08T16:29:41.000Z | tests/reflinks_tests.py | euku/spbot | e6d505c8965b4e6730b3dc4505f92e35a3edb2e2 | [
"MIT"
] | 2 | 2022-01-04T04:10:38.000Z | 2022-01-04T04:18:18.000Z | #!/usr/bin/python3
"""Tests for reflinks script."""
#
# (C) Pywikibot team, 2014-2022
#
# Distributed under the terms of the MIT license.
#
import unittest
from scripts.reflinks import ReferencesRobot, XmlDumpPageGenerator, main
from tests import join_xml_data_path
from tests.aspects import ScriptMainTestCase, TestCas... | 38.435028 | 79 | 0.575922 |
f67b88939087fdc071c7e83e728a3ef5a850c797 | 319 | py | Python | sunny/publisher/ioloop.py | AnkitAggarwalPEC/HFT-Analytics-Luigi | b01a48d7384accaca1869a7728912019b73f7e9c | [
"MIT"
] | null | null | null | sunny/publisher/ioloop.py | AnkitAggarwalPEC/HFT-Analytics-Luigi | b01a48d7384accaca1869a7728912019b73f7e9c | [
"MIT"
] | null | null | null | sunny/publisher/ioloop.py | AnkitAggarwalPEC/HFT-Analytics-Luigi | b01a48d7384accaca1869a7728912019b73f7e9c | [
"MIT"
] | null | null | null |
import asyncio
| 13.291667 | 59 | 0.583072 |
f67c5cfd49d70bb094eaf858bc53e07e4d05c0a5 | 1,756 | py | Python | Data Science and Machine Learning/Machine-Learning-In-Python-THOROUGH/EXAMPLES/EDABIT/EARLIER/49_triangle_challenge.py | okara83/Becoming-a-Data-Scientist | f09a15f7f239b96b77a2f080c403b2f3e95c9650 | [
"MIT"
] | null | null | null | Data Science and Machine Learning/Machine-Learning-In-Python-THOROUGH/EXAMPLES/EDABIT/EARLIER/49_triangle_challenge.py | okara83/Becoming-a-Data-Scientist | f09a15f7f239b96b77a2f080c403b2f3e95c9650 | [
"MIT"
] | null | null | null | Data Science and Machine Learning/Machine-Learning-In-Python-THOROUGH/EXAMPLES/EDABIT/EARLIER/49_triangle_challenge.py | okara83/Becoming-a-Data-Scientist | f09a15f7f239b96b77a2f080c403b2f3e95c9650 | [
"MIT"
] | 2 | 2022-02-09T15:41:33.000Z | 2022-02-11T07:47:40.000Z | """
Triangle Challenge
Given the perimeter and the area of a triangle, devise a function that returns the length of the sides of all triangles that fit those specifications. The length of the sides must be integers. Sort results in ascending order.
triangle(perimeter, area) [[s1, s2, s3]]
Examples
triangle(12, 6) [[... | 35.12 | 225 | 0.490888 |
f68047cd370902e0716ae55685d30c821200f866 | 4,232 | py | Python | src/my_resnet.py | fahim19dipu/Seed-classifier | 8acce2be9482cb8d8c11fa14433f9b4f8d4d92ba | [
"MIT"
] | null | null | null | src/my_resnet.py | fahim19dipu/Seed-classifier | 8acce2be9482cb8d8c11fa14433f9b4f8d4d92ba | [
"MIT"
] | null | null | null | src/my_resnet.py | fahim19dipu/Seed-classifier | 8acce2be9482cb8d8c11fa14433f9b4f8d4d92ba | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
"""
Created on Sun Jul 4 17:01:28 2021
@author: fahim
"""
from keras.models import Model
from keras.layers import Input, Add, Activation, ZeroPadding2D, BatchNormalization, Conv2D, AveragePooling2D, MaxPooling2D
from keras.initializers import glorot_uniform | 42.747475 | 170 | 0.641777 |
9c8515789c228e61ad777a8d32e3b11f40b6960c | 808 | py | Python | integration-test/630-bus-routes-z12.py | slachiewicz/vector-datasource | fb37603ba264be05839992f40eba1b5ae8a9c290 | [
"MIT"
] | null | null | null | integration-test/630-bus-routes-z12.py | slachiewicz/vector-datasource | fb37603ba264be05839992f40eba1b5ae8a9c290 | [
"MIT"
] | 2 | 2021-03-26T00:41:17.000Z | 2021-12-13T20:49:38.000Z | integration-test/630-bus-routes-z12.py | slachiewicz/vector-datasource | fb37603ba264be05839992f40eba1b5ae8a9c290 | [
"MIT"
] | null | null | null | # block between mission & 6th and howard & 5th in SF.
# appears to have lots of buses.
# https://www.openstreetmap.org/way/88572932 -- Mission St
# https://www.openstreetmap.org/relation/3406710 -- 14X to Daly City
# https://www.openstreetmap.org/relation/3406709 -- 14X to Downtown
# https://www.openstreetmap.org/relat... | 35.130435 | 68 | 0.67698 |
9c85502891b8c1bec06144b4cf625c033b9b3990 | 1,137 | py | Python | bioinf/cli.py | szymanskir/bioinf | e55adf696d0116845f26901decb93a771ffa1489 | [
"MIT"
] | 1 | 2021-01-19T18:18:21.000Z | 2021-01-19T18:18:21.000Z | bioinf/cli.py | szymanskir/bioinf | e55adf696d0116845f26901decb93a771ffa1489 | [
"MIT"
] | null | null | null | bioinf/cli.py | szymanskir/bioinf | e55adf696d0116845f26901decb93a771ffa1489 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
"""Console script for bioinf."""
import sys
import click
from .sequence import Sequence
from .sequence_alignment import NeedlemanWunschSequenceAlignmentAlgorithm
from .utils import read_config, read_sequence
if __name__ == "__main__":
sys.exit(main()) # pragma: no cover
| 29.153846 | 73 | 0.66139 |
9c85e485ac5021974344ec109d1e1572822b9624 | 703 | py | Python | package_one/tests/test_integer_adder.py | afaquejam/AwesomeApp | d86cc29b4047d9341e6e368530e922f28daad309 | [
"MIT"
] | 4 | 2018-07-28T01:18:55.000Z | 2019-04-04T09:32:19.000Z | package_one/tests/test_integer_adder.py | afaquejam/AwesomeApp | d86cc29b4047d9341e6e368530e922f28daad309 | [
"MIT"
] | null | null | null | package_one/tests/test_integer_adder.py | afaquejam/AwesomeApp | d86cc29b4047d9341e6e368530e922f28daad309 | [
"MIT"
] | null | null | null | import pytest
from package_one.module_one import IntegerAdder
"""
In case you'd like to declare a fixture that executes only once per module, then declare a fixture like this:
@pytest.fixture(scope="module")
"""
| 22.677419 | 109 | 0.671408 |
9c8686e93160db726ab6ec2f606cf595263e00fa | 1,179 | py | Python | tests/local/test_json.py | abarisain/mopidy | 4026e16996280016ceadfe98bd48f574306e2cef | [
"Apache-2.0"
] | 2 | 2015-07-09T09:36:26.000Z | 2019-10-05T04:13:19.000Z | tests/local/test_json.py | abarisain/mopidy | 4026e16996280016ceadfe98bd48f574306e2cef | [
"Apache-2.0"
] | null | null | null | tests/local/test_json.py | abarisain/mopidy | 4026e16996280016ceadfe98bd48f574306e2cef | [
"Apache-2.0"
] | 1 | 2019-10-05T04:13:10.000Z | 2019-10-05T04:13:10.000Z | from __future__ import unicode_literals
import unittest
from mopidy.local import json
from mopidy.models import Ref
| 35.727273 | 77 | 0.641221 |
9c86a8fde028ad53edc3558eed458f5bce3f030f | 2,214 | py | Python | test/test_oximachine.py | ltalirz/oximachinerunner | ca8092a8b247216cb98b7d308862dba184e27f1e | [
"MIT"
] | null | null | null | test/test_oximachine.py | ltalirz/oximachinerunner | ca8092a8b247216cb98b7d308862dba184e27f1e | [
"MIT"
] | null | null | null | test/test_oximachine.py | ltalirz/oximachinerunner | ca8092a8b247216cb98b7d308862dba184e27f1e | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
# pylint:disable=missing-module-docstring, missing-function-docstring
import os
from oximachinerunner import OximachineRunner
THIS_DIR = os.path.dirname(os.path.realpath(__file__))
| 23.305263 | 87 | 0.531165 |
9c875ae7c2afe703c37e9e06e4b3067ddcb1e099 | 11,643 | py | Python | src/OTLMOW/OTLModel/Datatypes/KlVerlichtingstoestelModelnaam.py | davidvlaminck/OTLClassPython | 71330afeb37c3ea6d9981f521ff8f4a3f8b946fc | [
"MIT"
] | 2 | 2022-02-01T08:58:11.000Z | 2022-02-08T13:35:17.000Z | src/OTLMOW/OTLModel/Datatypes/KlVerlichtingstoestelModelnaam.py | davidvlaminck/OTLMOW | 71330afeb37c3ea6d9981f521ff8f4a3f8b946fc | [
"MIT"
] | null | null | null | src/OTLMOW/OTLModel/Datatypes/KlVerlichtingstoestelModelnaam.py | davidvlaminck/OTLMOW | 71330afeb37c3ea6d9981f521ff8f4a3f8b946fc | [
"MIT"
] | null | null | null | # coding=utf-8
from OTLMOW.OTLModel.Datatypes.KeuzelijstField import KeuzelijstField
from OTLMOW.OTLModel.Datatypes.KeuzelijstWaarde import KeuzelijstWaarde
# Generated with OTLEnumerationCreator. To modify: extend, do not edit
| 76.098039 | 149 | 0.562913 |
9c878638bf1045523352e1ded796f50059e55f03 | 4,007 | py | Python | api/src/domain/object/user_interface/modal/Modal.py | SamuelJansen/Application | 6ab3202fb7de12782510f477a3e74d8800ea2927 | [
"MIT"
] | null | null | null | api/src/domain/object/user_interface/modal/Modal.py | SamuelJansen/Application | 6ab3202fb7de12782510f477a3e74d8800ea2927 | [
"MIT"
] | null | null | null | api/src/domain/object/user_interface/modal/Modal.py | SamuelJansen/Application | 6ab3202fb7de12782510f477a3e74d8800ea2927 | [
"MIT"
] | null | null | null | import UserInterface
import surfaceFunction, eventFunction
print('Modal library imported')
| 48.865854 | 268 | 0.639132 |
9c879e5d1943efd11dd7e5215bb6e0131412a141 | 209 | py | Python | ospath/ospath_expanduser.py | dineshkumar2509/learning-python | e8af11ff0b396da4c3f2cfe21d14131bae4b2adb | [
"MIT"
] | 86 | 2015-06-13T16:53:55.000Z | 2022-03-24T20:56:42.000Z | ospath/ospath_expanduser.py | pei-zheng-yi/learning-python | 55e350dfe44cf04f7d4408e76e72d2f467bd42ce | [
"MIT"
] | 9 | 2015-05-27T07:52:44.000Z | 2022-03-29T21:52:40.000Z | ospath/ospath_expanduser.py | pei-zheng-yi/learning-python | 55e350dfe44cf04f7d4408e76e72d2f467bd42ce | [
"MIT"
] | 124 | 2015-12-10T01:17:18.000Z | 2021-11-08T04:03:38.000Z | #!/usr/bin/env python
# encoding: utf-8
"""Expand tilde in filenames.
"""
import os.path
for user in ['', 'dhellmann', 'postgres']:
lookup = '~' + user
print lookup, ':', os.path.expanduser(lookup)
| 17.416667 | 49 | 0.62201 |
9c8a9179f77e608d06dcb7f9c2663a4c5550e626 | 5,103 | py | Python | tests/test_repo.py | OmegaDroid/git-hooks | d890621e890796d0ab800267493444000c75214e | [
"MIT"
] | 2 | 2016-01-08T17:57:59.000Z | 2016-08-10T00:54:35.000Z | tests/test_repo.py | OmegaDroid/git-hooks | d890621e890796d0ab800267493444000c75214e | [
"MIT"
] | 4 | 2016-01-09T13:50:37.000Z | 2016-08-25T10:50:40.000Z | tests/test_repo.py | wildfish/git-hooks | d890621e890796d0ab800267493444000c75214e | [
"MIT"
] | null | null | null | import string
from unittest2 import TestCase
import os
from hypothesis import given
from hypothesis.strategies import text, lists
from mock import patch, Mock
from githooks import repo
| 36.978261 | 112 | 0.676073 |
9c8c0ef5b1b94d70574d07bd18de4607864827eb | 1,056 | py | Python | src/hashing_.py | pawelmhm/recenseo.es | 026ac67cb6e146745aad1649c338ed89b83f0c63 | [
"MIT"
] | null | null | null | src/hashing_.py | pawelmhm/recenseo.es | 026ac67cb6e146745aad1649c338ed89b83f0c63 | [
"MIT"
] | 1 | 2021-03-19T22:06:54.000Z | 2021-03-19T22:06:54.000Z | src/hashing_.py | pawelmhm/recenseo.es | 026ac67cb6e146745aad1649c338ed89b83f0c63 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
from hmac import HMAC
from hashlib import sha256
import random
import logging
logging.basicConfig(level=logging.DEBUG)
logger = logging.getLogger(__name__)
def pbkd(password,salt):
"""
password must be a string in ascii, for some reasons
string of type unicode provokes the follow... | 31.058824 | 89 | 0.710227 |
9c8f281197fddfa1af410d31983e1c6f137a5fe2 | 2,312 | py | Python | neural-net/tensorflow/datasets.py | burntcustard/DeskBot-Zero | 5efb6bcca21eb66f88499b3671c8fda5f6517b11 | [
"MIT"
] | null | null | null | neural-net/tensorflow/datasets.py | burntcustard/DeskBot-Zero | 5efb6bcca21eb66f88499b3671c8fda5f6517b11 | [
"MIT"
] | null | null | null | neural-net/tensorflow/datasets.py | burntcustard/DeskBot-Zero | 5efb6bcca21eb66f88499b3671c8fda5f6517b11 | [
"MIT"
] | null | null | null |
# Useful tutorial on tensorflow.contrib.data:
# https://kratzert.github.io/2017/06/15/example-of-tensorflows-new-input-pipeline.html
import glob # Used to generate image filename list
import tensorflow as tf
def input_parser(image_path, label):
"""
Convert label to one_hot, read image from file & perform ... | 39.186441 | 86 | 0.719291 |
9c90a31f9f59a4bbc673d9e0cd9b46fab6dc56ae | 2,999 | py | Python | uis/widget_formatter.py | AlberLC/qt-app | 96fe79293de7f570a505845ed4ecd73f9f55572d | [
"MIT"
] | null | null | null | uis/widget_formatter.py | AlberLC/qt-app | 96fe79293de7f570a505845ed4ecd73f9f55572d | [
"MIT"
] | null | null | null | uis/widget_formatter.py | AlberLC/qt-app | 96fe79293de7f570a505845ed4ecd73f9f55572d | [
"MIT"
] | null | null | null | import os
import subprocess
import pathlib
try:
url_archivo = input('Archivo: ').strip().strip('"').strip("'")
nombre, extension = os.path.splitext(os.path.basename(url_archivo))
nombre_clase = nombre.title().replace('_', '')
if extension == '.ui':
# Creo el codigo python a partir del .ui
... | 35.282353 | 189 | 0.64955 |
9c90c9812ecdd62e381c8bf6cedd2186659f9529 | 2,450 | py | Python | applications/HDF5Application/python_scripts/single_mesh_xdmf_output_process.py | AndreaVoltan/MyKratos7.0 | e977752722e8ef1b606f25618c4bf8fd04c434cc | [
"BSD-4-Clause"
] | 2 | 2020-04-30T19:13:08.000Z | 2021-04-14T19:40:47.000Z | applications/HDF5Application/python_scripts/single_mesh_xdmf_output_process.py | AndreaVoltan/MyKratos7.0 | e977752722e8ef1b606f25618c4bf8fd04c434cc | [
"BSD-4-Clause"
] | 1 | 2020-04-30T19:19:09.000Z | 2020-05-02T14:22:36.000Z | applications/HDF5Application/python_scripts/single_mesh_xdmf_output_process.py | AndreaVoltan/MyKratos7.0 | e977752722e8ef1b606f25618c4bf8fd04c434cc | [
"BSD-4-Clause"
] | 1 | 2020-06-12T08:51:24.000Z | 2020-06-12T08:51:24.000Z | import KratosMultiphysics as KM
import KratosMultiphysics.HDF5Application.temporal_output_process_factory as output_factory
import KratosMultiphysics.HDF5Application.file_utilities as file_utils
def Factory(settings, Model):
"""Return a process for writing simulation results for a single mesh to HDF5.
It also ... | 50 | 107 | 0.739592 |
9c92c7ba102b28aaf3f497f452ff69ebb7754948 | 2,551 | py | Python | docs/rename_function.py | samaid/sdc | bcc377f430d58c2f167e09754c65abfedde263f6 | [
"BSD-2-Clause"
] | 1 | 2019-11-06T18:10:07.000Z | 2019-11-06T18:10:07.000Z | docs/rename_function.py | samaid/sdc | bcc377f430d58c2f167e09754c65abfedde263f6 | [
"BSD-2-Clause"
] | null | null | null | docs/rename_function.py | samaid/sdc | bcc377f430d58c2f167e09754c65abfedde263f6 | [
"BSD-2-Clause"
] | null | null | null | """
This script requires developers to add the following information:
1. add file and function name to srcfiles_srcfuncs
2. add file and directory name to srcdir_srcfiles
3. add expected display name for the function to display_names
"""
import os
import itertools
from shutil import copyfile... | 34.013333 | 121 | 0.689142 |
9c944fb70978ce339d17a2b5185083d51125ce9b | 1,442 | py | Python | src/entities/user.py | clayz/crazy-quiz-web | 7601809ad521d95ae251a026f171b9ec6939c55f | [
"Apache-2.0"
] | null | null | null | src/entities/user.py | clayz/crazy-quiz-web | 7601809ad521d95ae251a026f171b9ec6939c55f | [
"Apache-2.0"
] | null | null | null | src/entities/user.py | clayz/crazy-quiz-web | 7601809ad521d95ae251a026f171b9ec6939c55f | [
"Apache-2.0"
] | null | null | null | from google.appengine.ext import ndb
from google.appengine.ext.ndb import msgprop
from entities import BaseEntity
from constants import Gender, UserStatus, Device, APIStatus
from errors import DataError
| 36.05 | 89 | 0.73301 |
9c983e06b9771f99c2823cbf81e31f60d912dcdd | 3,327 | py | Python | paytm/models.py | Faisal-Manzer/django-paytm-checkout | bc796fca160f2664d85d0a09acf558532cc74442 | [
"MIT"
] | 10 | 2019-11-08T12:10:19.000Z | 2019-11-16T09:59:45.000Z | paytm/models.py | Faisal-Manzer/django-paytm-checkout | bc796fca160f2664d85d0a09acf558532cc74442 | [
"MIT"
] | 6 | 2019-11-09T09:16:46.000Z | 2022-02-10T11:30:55.000Z | paytm/models.py | Faisal-Manzer/django-paytm-checkout | bc796fca160f2664d85d0a09acf558532cc74442 | [
"MIT"
] | 1 | 2020-06-02T15:56:56.000Z | 2020-06-02T15:56:56.000Z | __all__ = ['Order', 'Item']
from django.db import models
from django.contrib.auth import get_user_model
from paytm import conf as paytm_conf
from paytm.helpers import sha256
| 28.681034 | 98 | 0.612564 |
9c98805df16923bcad50b539375b76c4c6448e60 | 125 | py | Python | tffm/__init__.py | FlorisHoogenboom/tffm | baf8086a8696a2b71bebdefe3a64d3b897599f72 | [
"MIT"
] | null | null | null | tffm/__init__.py | FlorisHoogenboom/tffm | baf8086a8696a2b71bebdefe3a64d3b897599f72 | [
"MIT"
] | null | null | null | tffm/__init__.py | FlorisHoogenboom/tffm | baf8086a8696a2b71bebdefe3a64d3b897599f72 | [
"MIT"
] | null | null | null | from .models import TFFMClassifier, TFFMRegressor, TFFMRankNet
__all__ = ['TFFMClassifier', 'TFFMRegressor', 'TFFMRankNet']
| 31.25 | 62 | 0.792 |