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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
88bea4fa9c19bdca4e8c6da218e8d49f1310845f | 240 | py | Python | api_ui/views.py | mihail-ivanov/base-vue-api | a2ef8ae360d3d26425093aefaf521082cf3684c5 | [
"MIT"
] | null | null | null | api_ui/views.py | mihail-ivanov/base-vue-api | a2ef8ae360d3d26425093aefaf521082cf3684c5 | [
"MIT"
] | null | null | null | api_ui/views.py | mihail-ivanov/base-vue-api | a2ef8ae360d3d26425093aefaf521082cf3684c5 | [
"MIT"
] | null | null | null |
from django.contrib.auth.models import User
from rest_framework import generics
from .serializers import UserSerializer
class UserList(generics.ListCreateAPIView):
queryset = User.objects.all()
serializer_class = UserSerializer
| 21.818182 | 43 | 0.808333 | 115 | 0.479167 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
88beff2251e1c3db657b53d33c4f8b3982f9a861 | 5,093 | py | Python | metashade/hlsl/sm5/profile.py | ppenenko/metashade | 7148e808e47bace59e61e1483da9ddf3f9daa1cc | [
"Apache-2.0"
] | 3 | 2020-04-02T13:29:06.000Z | 2020-09-07T17:43:09.000Z | metashade/hlsl/sm5/profile.py | ppenenko/metashade | 7148e808e47bace59e61e1483da9ddf3f9daa1cc | [
"Apache-2.0"
] | null | null | null | metashade/hlsl/sm5/profile.py | ppenenko/metashade | 7148e808e47bace59e61e1483da9ddf3f9daa1cc | [
"Apache-2.0"
] | null | null | null | # Copyright 2017 Pavlo Penenko
#
# 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... | 34.181208 | 79 | 0.634204 | 4,042 | 0.793638 | 0 | 0 | 0 | 0 | 0 | 0 | 1,063 | 0.208718 |
88beffc16b35e904c09d6505bf831f2d157a3465 | 1,981 | py | Python | ads_refine/create_refine_project.py | adsabs/refine-affiliations | b51290221d22400fa8fee6d5dac98c4930fbd7f3 | [
"OLDAP-2.6",
"Python-2.0"
] | 1 | 2015-02-06T05:44:26.000Z | 2015-02-06T05:44:26.000Z | ads_refine/create_refine_project.py | adsabs/refine-affiliations | b51290221d22400fa8fee6d5dac98c4930fbd7f3 | [
"OLDAP-2.6",
"Python-2.0"
] | null | null | null | ads_refine/create_refine_project.py | adsabs/refine-affiliations | b51290221d22400fa8fee6d5dac98c4930fbd7f3 | [
"OLDAP-2.6",
"Python-2.0"
] | null | null | null | #!/usr/bin/python2.6
import os
import sys
import time
from optparse import OptionParser
from google.refine import refine
from clean_ads_affiliations import clean_ads_affs
assert sys.hexversion >= 0x02060000
SERVER = 'http://adsx.cfa.harvard.edu:3333'
def create_refine_project(path, name, pretend=False, verbose=0):... | 31.951613 | 136 | 0.648662 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 501 | 0.252903 |
88c000e9e02c415df05d77f3582eae21f519869a | 8,256 | py | Python | backend/views.py | johnzhang1999/Pop | 284cc1c5195efdc676759d8494965b2dfb44cf78 | [
"MIT"
] | 1 | 2019-02-10T06:50:25.000Z | 2019-02-10T06:50:25.000Z | backend/views.py | johnzhang1999/Pop | 284cc1c5195efdc676759d8494965b2dfb44cf78 | [
"MIT"
] | null | null | null | backend/views.py | johnzhang1999/Pop | 284cc1c5195efdc676759d8494965b2dfb44cf78 | [
"MIT"
] | null | null | null | from django.http import JsonResponse, Http404
from django.views.decorators.csrf import csrf_exempt
from exponent_server_sdk import PushClient, PushMessage, DeviceNotRegisteredError
from .models import Group, User, Event
import hashlib, uuid
def getParams(request, tags):
print(request.POST)
return [request.POST... | 38.222222 | 128 | 0.56468 | 0 | 0 | 0 | 0 | 7,774 | 0.941618 | 0 | 0 | 1,133 | 0.137234 |
88c03f34e857962f5d9b4b18e80b0b7a54e0e36b | 3,572 | py | Python | SDFConv/code/utils/vis/unet_vis.py | zshyang/FieldConvolution | ca88df568a6f2143dcb85d22c005fce4562a7523 | [
"MIT"
] | 1 | 2021-01-03T18:53:06.000Z | 2021-01-03T18:53:06.000Z | SDFConv/code/utils/vis/unet_vis.py | zshyang/FieldConvolution | ca88df568a6f2143dcb85d22c005fce4562a7523 | [
"MIT"
] | null | null | null | SDFConv/code/utils/vis/unet_vis.py | zshyang/FieldConvolution | ca88df568a6f2143dcb85d22c005fce4562a7523 | [
"MIT"
] | null | null | null | """Implement this function across different project.
----ZY.2020.Oct.
"""
import os
from easydict import EasyDict
from torchvision.utils import save_image
from logging import Logger
from subprocess import call
def create_save_folders(root_folder, folder_list: list):
"""Create folders to save visualization image.
... | 37.208333 | 114 | 0.645017 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1,223 | 0.342385 |
88c151ffa4679f358142c0fae2020059a35ad3a9 | 1,465 | py | Python | tests/test_models/test_metric_report.py | wikimedia/analytics-wikimetrics | 1d2036657b06ccd16ecfc76edd3f9a6119ff75f4 | [
"MIT"
] | 6 | 2015-01-28T05:59:08.000Z | 2018-01-09T07:48:57.000Z | tests/test_models/test_metric_report.py | wikimedia/analytics-wikimetrics | 1d2036657b06ccd16ecfc76edd3f9a6119ff75f4 | [
"MIT"
] | 2 | 2020-05-09T16:36:43.000Z | 2020-05-09T16:52:35.000Z | tests/test_models/test_metric_report.py | wikimedia/analytics-wikimetrics | 1d2036657b06ccd16ecfc76edd3f9a6119ff75f4 | [
"MIT"
] | 1 | 2016-01-13T07:19:44.000Z | 2016-01-13T07:19:44.000Z | from nose.tools import assert_equals, assert_true
from wikimetrics.metrics import metric_classes
from wikimetrics.models import (
MetricReport
)
from ..fixtures import DatabaseTest
class MetricReportTest(DatabaseTest):
def setUp(self):
DatabaseTest.setUp(self)
self.common_cohort_1()
d... | 28.173077 | 57 | 0.524915 | 1,277 | 0.871672 | 0 | 0 | 0 | 0 | 0 | 0 | 181 | 0.123549 |
88c2edc9c66f0cdca479957d50dd7215d509131a | 615 | py | Python | setup.py | manu-mannattil/clut2dtstyle | 4d4cbea540de9f3b3bde209fbe1f8696e441492d | [
"Unlicense"
] | 9 | 2018-09-13T04:27:23.000Z | 2022-01-02T23:34:20.000Z | setup.py | manu-mannattil/clut2dtstyle | 4d4cbea540de9f3b3bde209fbe1f8696e441492d | [
"Unlicense"
] | null | null | null | setup.py | manu-mannattil/clut2dtstyle | 4d4cbea540de9f3b3bde209fbe1f8696e441492d | [
"Unlicense"
] | null | null | null | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
from setuptools import setup
setup(
name="clut2dtstyle",
license="Unlicense",
version="0.1",
author="Manu Mannattil",
author_email="[email protected]",
description="Script to convert Hald CLUTs to darktable styles",
py_modules=["clut2dt... | 24.6 | 67 | 0.621138 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 368 | 0.598374 |
88c3e3d167bb3169d56f9fd93e05df1be55709b1 | 1,903 | py | Python | xugrid/data/synthetic.py | Deltares/xugrid | 41881977e5e49d0f87a90dd995960283b812b921 | [
"MIT"
] | 15 | 2021-10-04T15:18:33.000Z | 2022-03-14T13:58:27.000Z | xugrid/data/synthetic.py | Deltares/xugrid | 41881977e5e49d0f87a90dd995960283b812b921 | [
"MIT"
] | 10 | 2021-11-10T15:12:02.000Z | 2022-02-10T14:35:57.000Z | xugrid/data/synthetic.py | Deltares/xugrid | 41881977e5e49d0f87a90dd995960283b812b921 | [
"MIT"
] | null | null | null | import meshzoo
import numpy as np
import xarray as xr
import xugrid
def transform(vertices, minx, maxx, miny):
"""
Transform vertices to fit within minx to maxx.
Maintains x:y aspect ratio.
"""
x, y = vertices.T
xmin = x.min()
xmax = x.max()
ymin = y.min()
ymax = y.max()
dx = ... | 27.985294 | 105 | 0.527063 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 239 | 0.125591 |
88c491334363ecfc6c68f1628bee0883ccd9f9e7 | 898 | py | Python | calendar_generator/migrations/0006_resetday.py | rectory-school/rectory-apps-updated | a6d47f6d5928f0c816eb45fd229da2f9f2fa2ff1 | [
"MIT"
] | null | null | null | calendar_generator/migrations/0006_resetday.py | rectory-school/rectory-apps-updated | a6d47f6d5928f0c816eb45fd229da2f9f2fa2ff1 | [
"MIT"
] | 30 | 2021-07-16T12:54:14.000Z | 2021-12-24T16:59:04.000Z | calendar_generator/migrations/0006_resetday.py | rectory-school/rectory-apps-updated | a6d47f6d5928f0c816eb45fd229da2f9f2fa2ff1 | [
"MIT"
] | null | null | null | # Generated by Django 3.2.5 on 2021-07-19 20:22
from django.db import migrations, models
import django.db.models.deletion
class Migration(migrations.Migration):
dependencies = [
('calendar_generator', '0005_alter_calendar_options'),
]
operations = [
migrations.CreateModel(
n... | 33.259259 | 127 | 0.601336 | 772 | 0.859688 | 0 | 0 | 0 | 0 | 0 | 0 | 221 | 0.246102 |
88c4cf9f6f8d805d5af7d3c164350e7934f1fcde | 2,492 | py | Python | ckanext/tess/group.py | ElixirUK/ckanext-tess | 01725ff81b74f31d906875cb0cf493e7d3533615 | [
"BSD-3-Clause"
] | 1 | 2015-05-18T08:31:28.000Z | 2015-05-18T08:31:28.000Z | ckanext/tess/group.py | ElixirUK/ckanext-tess | 01725ff81b74f31d906875cb0cf493e7d3533615 | [
"BSD-3-Clause"
] | null | null | null | ckanext/tess/group.py | ElixirUK/ckanext-tess | 01725ff81b74f31d906875cb0cf493e7d3533615 | [
"BSD-3-Clause"
] | null | null | null |
import ckan.plugins as plugins
import ckan.model as model
import ckan.logic as logic
import ckan.plugins.toolkit as toolkit
import ckan.lib.plugins as plugs
from pylons import c
NotFound = logic.NotFound
get_action = logic.get_action
class GroupPlugin(plugins.SingletonPlugin, plugs.DefaultGroupForm):
plugins.imp... | 33.675676 | 123 | 0.656902 | 1,703 | 0.683387 | 0 | 0 | 0 | 0 | 0 | 0 | 366 | 0.14687 |
88c6dfcf5b1c5b830035587feb18704990928ca6 | 2,087 | py | Python | package/spack-discovardenovo/package.py | ctuning/ck-spack | 307934efce1be2d4f104251275c82fbc70127105 | [
"BSD-3-Clause"
] | 1 | 2018-07-17T07:45:09.000Z | 2018-07-17T07:45:09.000Z | package/spack-discovardenovo/package.py | ctuning/ck-spack | 307934efce1be2d4f104251275c82fbc70127105 | [
"BSD-3-Clause"
] | null | null | null | package/spack-discovardenovo/package.py | ctuning/ck-spack | 307934efce1be2d4f104251275c82fbc70127105 | [
"BSD-3-Clause"
] | null | null | null | ##############################################################################
# Copyright (c) 2013-2018, Lawrence Livermore National Security, LLC.
# Produced at the Lawrence Livermore National Laboratory.
#
# This file is part of Spack.
# Created by Todd Gamblin, [email protected], All rights reserved.
# LLNL-CODE-64... | 45.369565 | 115 | 0.689506 | 829 | 0.397221 | 0 | 0 | 0 | 0 | 0 | 0 | 1,868 | 0.895065 |
88c7e5dd6da0bf02bd4f18142f4b9f76bc68b52c | 10,379 | py | Python | s2_convert.py | uscensusbureau/SABLE | 883d449e4e6b75636d2589f540e86a5401e09932 | [
"CC0-1.0"
] | 27 | 2017-11-06T22:55:24.000Z | 2021-06-11T12:56:03.000Z | s2_convert.py | uscensusbureau/SABLE | 883d449e4e6b75636d2589f540e86a5401e09932 | [
"CC0-1.0"
] | 1 | 2018-01-31T18:26:23.000Z | 2018-01-31T18:26:23.000Z | s2_convert.py | uscensusbureau/SABLE | 883d449e4e6b75636d2589f540e86a5401e09932 | [
"CC0-1.0"
] | 8 | 2017-10-05T19:17:05.000Z | 2020-10-21T23:08:34.000Z | #Name: s2_convert.py
#Purpose: Convert PDFs to TXT format
#Invocation: python3 s2_convert.py <projName> <lng> <clss>
import codecs
import os
import re
import sys
#Name: valid_arguments
#Purpose: Check whether the command-line arguments are valid
#Parameters: sys.argv (globally defin... | 34.946128 | 169 | 0.544561 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 3,981 | 0.383563 |
88cac1cf2db3436095332a2a6eb18693a59b0f08 | 1,004 | py | Python | 04_flask_intro/test/test_api.py | coryandrewtaylor/IntroToPython | 26eb6bbd8811aeb9181054162227638b19e254f1 | [
"MIT"
] | null | null | null | 04_flask_intro/test/test_api.py | coryandrewtaylor/IntroToPython | 26eb6bbd8811aeb9181054162227638b19e254f1 | [
"MIT"
] | 5 | 2020-04-17T17:12:28.000Z | 2021-03-07T23:47:13.000Z | 04_flask_intro/test/test_api.py | coryandrewtaylor/IntroToPython | 26eb6bbd8811aeb9181054162227638b19e254f1 | [
"MIT"
] | 7 | 2020-04-23T21:46:38.000Z | 2021-03-09T00:05:40.000Z | def test_greet_user(client, test_strings):
for s in test_strings:
_route = f"/api/v1/greeting/{s}"
r = client.get(_route)
assert r.status_code == 200
assert r.json == {"greeting": "Hello", "user": s}
def test_add_int_success(client, test_ints):
_data = {"add": test_ints}
r ... | 31.375 | 57 | 0.651394 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 149 | 0.148406 |
88cc5b4b5dc736d6b8f2e83c34762ada5532c58b | 200 | py | Python | sdata_experiments/tension_test.py | lepy/sdata_experiments | 84aa32ec497639a30d4f71c7fa9e463cf2d8f037 | [
"MIT"
] | 1 | 2020-12-21T18:28:00.000Z | 2020-12-21T18:28:00.000Z | sdata_experiments/tension_test.py | lepy/sdata_experiments | 84aa32ec497639a30d4f71c7fa9e463cf2d8f037 | [
"MIT"
] | null | null | null | sdata_experiments/tension_test.py | lepy/sdata_experiments | 84aa32ec497639a30d4f71c7fa9e463cf2d8f037 | [
"MIT"
] | null | null | null | # -*-coding: utf-8-*-
from sdata.experiments import Test
class TensionTest(Test):
"""Tension test
"""
def __init__(self, name, **kwargs):
Test.__init__(self, name=name, **kwargs) | 22.222222 | 48 | 0.63 | 142 | 0.71 | 0 | 0 | 0 | 0 | 0 | 0 | 45 | 0.225 |
88cc892509c73d91def940743039ba5fd8a12e2f | 5,818 | py | Python | copy-net3_main0_1_2_20-01-10_14-12-14_epoch600_lr0-3_decay0-0_decay20-0_decay39e-05_seed0/main0.py | ninfueng/nsn | a214eafbcf5cf6dedb57131bc6eb1d307797f2ab | [
"MIT"
] | null | null | null | copy-net3_main0_1_2_20-01-10_14-12-14_epoch600_lr0-3_decay0-0_decay20-0_decay39e-05_seed0/main0.py | ninfueng/nsn | a214eafbcf5cf6dedb57131bc6eb1d307797f2ab | [
"MIT"
] | null | null | null | copy-net3_main0_1_2_20-01-10_14-12-14_epoch600_lr0-3_decay0-0_decay20-0_decay39e-05_seed0/main0.py | ninfueng/nsn | a214eafbcf5cf6dedb57131bc6eb1d307797f2ab | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""The code implementation of SharedGradNet.
main0.py is for neural networks without hidden layer.
Some part from: https://jhui.github.io/2018/02/09/PyTorch-Variables-functionals-and-Autograd/
2019/06/17: Update with hyper-parameter tuning script.
2019/06/25: Committed mai... | 46.174603 | 117 | 0.653489 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1,746 | 0.300103 |
88cc9bf2217df7c1469f0332dd2da660bb7b852c | 19,144 | py | Python | src/win/efuseWin_BootCfg2.py | KKKelvin7/NXP-MCUBootUtility | b4cded82aa9d20c2cb718f60493d1226fc999b43 | [
"Apache-2.0"
] | null | null | null | src/win/efuseWin_BootCfg2.py | KKKelvin7/NXP-MCUBootUtility | b4cded82aa9d20c2cb718f60493d1226fc999b43 | [
"Apache-2.0"
] | null | null | null | src/win/efuseWin_BootCfg2.py | KKKelvin7/NXP-MCUBootUtility | b4cded82aa9d20c2cb718f60493d1226fc999b43 | [
"Apache-2.0"
] | null | null | null | # -*- coding: utf-8 -*-
###########################################################################
## Python code generated with wxFormBuilder (version Aug 8 2018)
## http://www.wxformbuilder.org/
##
## PLEASE DO *NOT* EDIT THIS FILE!
###########################################################################
impor... | 48.465823 | 190 | 0.729994 | 18,621 | 0.972681 | 0 | 0 | 0 | 0 | 0 | 0 | 1,589 | 0.083003 |
88cd7b4748dfc9d48b07e74cd1faaed730733d74 | 55 | py | Python | python.py | Ayesha-Anjum-639/assignment | 5a57fdfd360467d540cf12fe0f842ddd458371b8 | [
"MIT"
] | 1 | 2019-10-12T17:28:12.000Z | 2019-10-12T17:28:12.000Z | python.py | Ayesha-Anjum-639/assignment | 5a57fdfd360467d540cf12fe0f842ddd458371b8 | [
"MIT"
] | null | null | null | python.py | Ayesha-Anjum-639/assignment | 5a57fdfd360467d540cf12fe0f842ddd458371b8 | [
"MIT"
] | null | null | null | print("Hello World")
print(5+4)
print(5,"+",4,"=",5+4)
| 13.75 | 22 | 0.563636 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 19 | 0.345455 |
88cd952c28db68aa348176e890db4ed64336fc66 | 332 | py | Python | hud_api_replace/management/commands/delete_expired_geodata.py | Ooblioob/django-hud | 66aac9f182f8c68a380dc36ade46d7e0df30bf24 | [
"CC0-1.0"
] | 10 | 2015-01-05T21:13:07.000Z | 2017-05-28T04:08:15.000Z | hud_api_replace/management/commands/delete_expired_geodata.py | Ooblioob/django-hud | 66aac9f182f8c68a380dc36ade46d7e0df30bf24 | [
"CC0-1.0"
] | 15 | 2015-01-29T02:08:39.000Z | 2018-01-17T13:24:50.000Z | hud_api_replace/management/commands/delete_expired_geodata.py | Ooblioob/django-hud | 66aac9f182f8c68a380dc36ade46d7e0df30bf24 | [
"CC0-1.0"
] | 34 | 2015-01-26T19:34:47.000Z | 2021-02-20T10:55:22.000Z | from django.core.management.base import BaseCommand, CommandError
import time
from hud_api_replace.models import CachedGeodata
class Command(BaseCommand):
help = 'Deletes geodata records that are expired.'
def handle(self, *args, **options):
CachedGeodata.objects.all().filter(expires__lte=time.time(... | 27.666667 | 77 | 0.759036 | 201 | 0.605422 | 0 | 0 | 0 | 0 | 0 | 0 | 43 | 0.129518 |
88cfb3f12d8dd1b1dd5417858d82ba8a891b227e | 7,694 | py | Python | etc/dbus-serialbattery/battery.py | Carstijn/dbus-serialbattery | 23afec33c2fd87fd4d4c53516f0a25f290643c82 | [
"MIT"
] | null | null | null | etc/dbus-serialbattery/battery.py | Carstijn/dbus-serialbattery | 23afec33c2fd87fd4d4c53516f0a25f290643c82 | [
"MIT"
] | null | null | null | etc/dbus-serialbattery/battery.py | Carstijn/dbus-serialbattery | 23afec33c2fd87fd4d4c53516f0a25f290643c82 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
from __future__ import absolute_import, division, print_function, unicode_literals
import utils
class Protection(object):
# 2 = Alarm, 1 = Warning, 0 = Normal
def __init__(self):
self.voltage_high = None
self.voltage_low = None
self.voltage_cell_low = None
... | 35.786047 | 101 | 0.618144 | 7,558 | 0.982324 | 0 | 0 | 0 | 0 | 0 | 0 | 1,161 | 0.150897 |
88d2d07a327a91f5956c30f18f5820061fc0b593 | 16,227 | py | Python | lumicks/pylake/kymotracker/detail/binding_times.py | lumicks/pylake | b5875d156d6416793a371198f3f2590fca2be4cd | [
"Apache-2.0"
] | 8 | 2019-02-18T07:56:39.000Z | 2022-03-19T01:14:48.000Z | lumicks/pylake/kymotracker/detail/binding_times.py | lumicks/pylake | b5875d156d6416793a371198f3f2590fca2be4cd | [
"Apache-2.0"
] | 42 | 2018-11-30T14:40:35.000Z | 2022-03-29T11:43:45.000Z | lumicks/pylake/kymotracker/detail/binding_times.py | lumicks/pylake | b5875d156d6416793a371198f3f2590fca2be4cd | [
"Apache-2.0"
] | 4 | 2019-01-09T13:45:53.000Z | 2021-07-06T14:06:52.000Z | import numpy as np
from scipy.special import logsumexp
from scipy.optimize import minimize
from functools import partial
from dataclasses import dataclass, field
import matplotlib.pyplot as plt
@dataclass
class BindingDwelltimesBootstrap:
"""Bootstrap distributions for a binding dwelltime model.
This class i... | 38.913669 | 101 | 0.638442 | 11,198 | 0.690084 | 0 | 0 | 11,233 | 0.692241 | 0 | 0 | 7,919 | 0.488014 |
88d4df17e09f04b37643b41464da40650a4a1467 | 302 | py | Python | ExPython/CursoemVideo/ex011.py | MatheusEwen/Exercicios_Do_CursoDePython | 7c21f95f0d31ec1e6c17e1b957c1442843118c48 | [
"MIT"
] | 1 | 2020-10-06T00:27:05.000Z | 2020-10-06T00:27:05.000Z | ExPython/CursoemVideo/ex011.py | MatheusEwen/Exercicios_Do_CursoDePython | 7c21f95f0d31ec1e6c17e1b957c1442843118c48 | [
"MIT"
] | null | null | null | ExPython/CursoemVideo/ex011.py | MatheusEwen/Exercicios_Do_CursoDePython | 7c21f95f0d31ec1e6c17e1b957c1442843118c48 | [
"MIT"
] | null | null | null | largura=float(input('digite qual a largura da sua parede:'))
comprimento=float(input('digite qual o comprimento da sua parede:'))
quantidade=((largura*comprimento)/2)
print('A area da sua parede é de',(largura*comprimento),'para pintar sua parede será necessario {} litros de tinta'.format(quantidade)) | 75.5 | 135 | 0.771523 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 168 | 0.552632 |
88d788b313f88688621166e29c634f6bf47ff41a | 508 | py | Python | GUI/crab.py | 31337H4X0R/crab-tracker | c822a40010d172ba797b5de8c340931d0feea6e4 | [
"MIT"
] | 1 | 2019-07-31T01:32:17.000Z | 2019-07-31T01:32:17.000Z | GUI/crab.py | 31337H4X0R/crab-tracker | c822a40010d172ba797b5de8c340931d0feea6e4 | [
"MIT"
] | 47 | 2017-11-04T02:04:42.000Z | 2018-06-16T01:00:48.000Z | GUI/crab.py | 31337H4X0R/crab-tracker | c822a40010d172ba797b5de8c340931d0feea6e4 | [
"MIT"
] | 2 | 2018-06-10T21:58:49.000Z | 2019-06-18T17:21:03.000Z | class Crab:
def __init__(self, crab_id, sex, species, color, damage, carapace, mass, epibiont, molt):
self.id = crab_id
self.sex = sex
self.species = species
self.color = color
self.damage = damage
self.carapace = carapace
self.mass = mass
self.epibion... | 33.866667 | 123 | 0.622047 | 507 | 0.998031 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
88da52cb71a753a4cfdc782a27d2b76618927365 | 2,821 | py | Python | build/fbcode_builder_config.py | YangKian/LogDevice | e5c2168c11e9de867a1bcf519f95016e1c879b5c | [
"BSD-3-Clause"
] | 1,831 | 2018-09-12T15:41:52.000Z | 2022-01-05T02:38:03.000Z | build/fbcode_builder_config.py | YangKian/LogDevice | e5c2168c11e9de867a1bcf519f95016e1c879b5c | [
"BSD-3-Clause"
] | 183 | 2018-09-12T16:14:59.000Z | 2021-12-07T15:49:43.000Z | build/fbcode_builder_config.py | YangKian/LogDevice | e5c2168c11e9de867a1bcf519f95016e1c879b5c | [
"BSD-3-Clause"
] | 228 | 2018-09-12T15:41:51.000Z | 2022-01-05T08:12:09.000Z | #!/usr/bin/env python
# Copyright (c) Facebook, Inc. and its affiliates.
# All rights reserved.
#
# This source code is licensed under the BSD-style license found in the
# LICENSE file in the root directory of this source tree.
from __future__ import absolute_import, division, print_function, unicode_literals
import... | 31.344444 | 87 | 0.684864 | 511 | 0.181141 | 0 | 0 | 249 | 0.088267 | 0 | 0 | 1,660 | 0.588444 |
88da8643ac576a43d9d46ba217a9282045a5ba68 | 3,040 | py | Python | setup.py | ikalnytskyi/em | 3e7c20c16814bed86409212e0a2a9fee49398994 | [
"BSD-3-Clause"
] | null | null | null | setup.py | ikalnytskyi/em | 3e7c20c16814bed86409212e0a2a9fee49398994 | [
"BSD-3-Clause"
] | 1 | 2018-10-18T17:49:13.000Z | 2018-10-18T17:49:13.000Z | setup.py | ikalnytskyi/em | 3e7c20c16814bed86409212e0a2a9fee49398994 | [
"BSD-3-Clause"
] | null | null | null | #!/usr/bin/env python
# coding: utf-8
"""
Em
--
Em is a terminal tool that prints FILE(s), or standard input to standard
output and highlights the expressions that are matched the PATTERN.
The expression will be highlighted iff the terminal is ANSI-compatible.
Em is Cool
``````````
.. code:: bash
$ tail -f /p... | 23.937008 | 78 | 0.593421 | 1,139 | 0.374671 | 0 | 0 | 0 | 0 | 0 | 0 | 1,433 | 0.471382 |
88dac5f28a975211597a7acd699981246fdfddd1 | 1,883 | py | Python | Python-Programs/Discord-bot-Motivation Bot/main.py | adityaverma121/Simple-Programs | 8450560b97f89e0fa3da16a623ad35c0b26409c9 | [
"MIT"
] | 71 | 2021-09-30T11:25:12.000Z | 2021-10-03T11:33:22.000Z | Python-Programs/Discord-bot-Motivation Bot/main.py | adityaverma121/Simple-Programs | 8450560b97f89e0fa3da16a623ad35c0b26409c9 | [
"MIT"
] | 186 | 2021-09-30T12:25:16.000Z | 2021-10-03T13:45:04.000Z | Python-Programs/Discord-bot-Motivation Bot/main.py | adityaverma121/Simple-Programs | 8450560b97f89e0fa3da16a623ad35c0b26409c9 | [
"MIT"
] | 385 | 2021-09-30T11:34:23.000Z | 2021-10-03T13:41:00.000Z | import json
import os
import random
import string
import requests
from keep_alive import keep_alive
from nltk.sentiment.vader import SentimentIntensityAnalyzer
import discord
client = discord.Client()
starter_motivator = [
"Cheer Up!",
"Always remember, I am here for you!",
"You are a great person. Reme... | 25.445946 | 153 | 0.630377 | 0 | 0 | 0 | 0 | 1,167 | 0.619756 | 1,139 | 0.604886 | 626 | 0.332448 |
88debece08c1e96c24b4f8a33cbf44d5d6611a9b | 1,655 | py | Python | Malaria-Cell-Analyzer/mysite/core/gen_dataset_completed.py | suryabranwal/Malaria-Cell-Analyzer | eadbad1e0b5a51eeeb43fa75367d8b4d9eabe033 | [
"MIT"
] | 1 | 2019-12-20T18:04:40.000Z | 2019-12-20T18:04:40.000Z | Malaria-Cell-Analyzer/mysite/core/gen_dataset_completed.py | suryabranwal/Malaria-Cell-Analyzer | eadbad1e0b5a51eeeb43fa75367d8b4d9eabe033 | [
"MIT"
] | null | null | null | Malaria-Cell-Analyzer/mysite/core/gen_dataset_completed.py | suryabranwal/Malaria-Cell-Analyzer | eadbad1e0b5a51eeeb43fa75367d8b4d9eabe033 | [
"MIT"
] | 1 | 2019-11-26T14:06:03.000Z | 2019-11-26T14:06:03.000Z | import cv2, os
import numpy as np
import csv
import glob
label = "Parasitized"
dirList = glob.glob("cell_images/" + label + "/*.png")
file = open("csv/dataset.csv", "a")
for img_path in dirList:
im = cv2.imread(img_path)
im = cv2.GaussianBlur(im, (5, 5), 2)
im_gray = cv2.cvtColor(im, cv2.COLOR_BGR2GRAY... | 18.388889 | 63 | 0.575227 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 207 | 0.125076 |
88df26756f4d2511b8925b4ee5ec1ed8cec09d0b | 1,234 | py | Python | utils.py | wangke0809/learn-statistical-learning-method | 10772659ff52ef64e7ff36dd3b701615e58de335 | [
"MIT"
] | null | null | null | utils.py | wangke0809/learn-statistical-learning-method | 10772659ff52ef64e7ff36dd3b701615e58de335 | [
"MIT"
] | null | null | null | utils.py | wangke0809/learn-statistical-learning-method | 10772659ff52ef64e7ff36dd3b701615e58de335 | [
"MIT"
] | null | null | null | import os
import numpy as np
def load_mnist(path='mnist'):
data_dir = os.path.join("./data", path)
fd = open(os.path.join(data_dir,'train-images-idx3-ubyte'))
loaded = np.fromfile(file=fd,dtype=np.uint8)
trX = loaded[16:].reshape((60000,28,28,1)).astype(np.float)
fd = open(os.path.join(data_dir,'... | 29.380952 | 63 | 0.638574 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 308 | 0.249595 |
88df286145e7e147b9e1130f9bc8b72465b90272 | 180 | py | Python | mysite/iic/views.py | sandeepkeshav/iicj | c457fec176918af500699c8607f1d8cfc7543f1d | [
"MIT"
] | 1 | 2020-11-25T17:02:25.000Z | 2020-11-25T17:02:25.000Z | mysite/iic/views.py | sandeepkeshav/iicj | c457fec176918af500699c8607f1d8cfc7543f1d | [
"MIT"
] | null | null | null | mysite/iic/views.py | sandeepkeshav/iicj | c457fec176918af500699c8607f1d8cfc7543f1d | [
"MIT"
] | 1 | 2020-11-25T17:01:33.000Z | 2020-11-25T17:01:33.000Z | from __future__ import unicode_literals
from django.shortcuts import render
from django.http import HttpResponse
def iichome(request):
return render(request, 'iic/home.html')
| 25.714286 | 43 | 0.811111 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 15 | 0.083333 |
88e15f87d60572f7354fdd0f31ccffeddc289a42 | 2,210 | py | Python | src/analysis.py | aliFrancis/mars-crater-catalogue | 5e6ac4e1f7967b1d37d95e436edaa31ef2f2ed55 | [
"CC-BY-4.0"
] | null | null | null | src/analysis.py | aliFrancis/mars-crater-catalogue | 5e6ac4e1f7967b1d37d95e436edaa31ef2f2ed55 | [
"CC-BY-4.0"
] | null | null | null | src/analysis.py | aliFrancis/mars-crater-catalogue | 5e6ac4e1f7967b1d37d95e436edaa31ef2f2ed55 | [
"CC-BY-4.0"
] | null | null | null | import numpy as np
import matplotlib.pyplot as plt
import pandas as pd
import seaborn as sn
from utils import convert, iou
def average_pairwise_IOU(IOU_mat):
n = IOU_mat.shape[0]
mean_IOU = (np.sum(IOU_mat)-n)/(np.size(IOU_mat)-n)
return mean_IOU
def group_IOU_matrices(paths):
survey_names = [p.repl... | 34.53125 | 97 | 0.608597 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 391 | 0.176923 |
88e195f25d51cac398d0cfdc139ce3c46cd5aeca | 257 | py | Python | prototype/zlua_prototype/tests/test_debugger.py | Zolo-mario/ZoloLua | 7527a78b12c3f97cb729327d4d0c724f3dba17f9 | [
"MIT"
] | 9 | 2019-03-11T04:43:03.000Z | 2019-05-12T08:33:31.000Z | prototype/zlua_prototype/tests/test_debugger.py | zoloypzuo/ZeloLua | 7527a78b12c3f97cb729327d4d0c724f3dba17f9 | [
"MIT"
] | 2 | 2019-04-10T05:20:45.000Z | 2019-06-02T13:56:39.000Z | prototype/zlua_prototype/tests/test_debugger.py | Zolo-mario/zlua | 7527a78b12c3f97cb729327d4d0c724f3dba17f9 | [
"MIT"
] | 1 | 2021-12-29T03:13:49.000Z | 2021-12-29T03:13:49.000Z | from unittest import TestCase
class TestDebugger(TestCase):
def test_execute(self):
# self.fail()
pass
def test_parse_instr(self):
from zlua_prototype.debugger import _parse_instr
assert _parse_instr('f ')==('f','') | 25.7 | 56 | 0.657588 | 225 | 0.875486 | 0 | 0 | 0 | 0 | 0 | 0 | 22 | 0.085603 |
88e45fe24cb4ac33e12b90a494c738b76fd18630 | 3,033 | py | Python | scripts/test_tensorflow_spectrogram.py | RichardLitt/Vesper | 5360844f42a06942e7684121c650b08cf8616285 | [
"MIT"
] | 29 | 2017-07-10T14:49:15.000Z | 2022-02-02T23:14:38.000Z | scripts/test_tensorflow_spectrogram.py | Tubbz-alt/Vesper | 76e5931ca0c7fbe070c53b1362ec246ec9007beb | [
"MIT"
] | 167 | 2015-03-17T14:45:22.000Z | 2022-03-30T21:00:05.000Z | scripts/test_tensorflow_spectrogram.py | Tubbz-alt/Vesper | 76e5931ca0c7fbe070c53b1362ec246ec9007beb | [
"MIT"
] | 4 | 2015-02-06T03:30:27.000Z | 2020-12-27T08:38:52.000Z | """
Compares spectrogram computations with TensorFlow and Vesper.
As of 2018-11-09, Vesper is a little more than three times faster than
TensorFlow at computing spectrograms with a DFT size of 128.
"""
import functools
import time
import numpy as np
import tensorflow as tf
import vesper.util.data_windows as data_w... | 26.146552 | 78 | 0.672272 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 559 | 0.184306 |
88e5027947cf3cde1a9b3d2b5bfc1dfa177d0b10 | 110 | py | Python | html/semantics/embedded-content/media-elements/loading-the-media-resource/resources/delayed-broken-video.py | ziransun/wpt | ab8f451eb39eb198584d547f5d965ef54df2a86a | [
"BSD-3-Clause"
] | 777 | 2017-08-29T15:15:32.000Z | 2022-03-21T05:29:41.000Z | html/semantics/embedded-content/media-elements/loading-the-media-resource/resources/delayed-broken-video.py | ziransun/wpt | ab8f451eb39eb198584d547f5d965ef54df2a86a | [
"BSD-3-Clause"
] | 66 | 2017-08-30T18:31:18.000Z | 2021-08-02T10:59:35.000Z | html/semantics/embedded-content/media-elements/loading-the-media-resource/resources/delayed-broken-video.py | ziransun/wpt | ab8f451eb39eb198584d547f5d965ef54df2a86a | [
"BSD-3-Clause"
] | 123 | 2017-08-30T01:19:34.000Z | 2022-03-17T22:55:31.000Z | import time
def main(request, response):
time.sleep(0.1)
return [("Content-Type", "text/plain")], "FAIL"
| 18.333333 | 49 | 0.663636 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 32 | 0.290909 |
88e6289afe035056ed74d3dd93dfce6766f5f5c7 | 401 | py | Python | tests/util.py | alexsilva/django-npm | 8d5c55c0219fda074ceabdd93b3806e65a008d9e | [
"MIT"
] | null | null | null | tests/util.py | alexsilva/django-npm | 8d5c55c0219fda074ceabdd93b3806e65a008d9e | [
"MIT"
] | null | null | null | tests/util.py | alexsilva/django-npm | 8d5c55c0219fda074ceabdd93b3806e65a008d9e | [
"MIT"
] | 1 | 2019-10-17T15:13:13.000Z | 2019-10-17T15:13:13.000Z | import os
from django.conf import settings
import django
def configure_settings():
settings.configure(
DEBUG=True,
INSTALLED_APPS=['npm'],
NPM_EXECUTABLE_PATH=os.environ.get('NPM_EXECUTABLE_PATH', 'npm'),
CACHES={
'default': {
'BACKEND': 'django.core.ca... | 21.105263 | 73 | 0.583541 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 94 | 0.234414 |
88e644ee347cd6bc7d3ce925d9db807476d778e2 | 2,770 | py | Python | Station A/Pooling M300/v1_station_a_S30_pooling.py | Opentrons/covid19-system-30 | 4db5980a93e87f9f607b727678b7ea6d528109ba | [
"Apache-2.0"
] | null | null | null | Station A/Pooling M300/v1_station_a_S30_pooling.py | Opentrons/covid19-system-30 | 4db5980a93e87f9f607b727678b7ea6d528109ba | [
"Apache-2.0"
] | null | null | null | Station A/Pooling M300/v1_station_a_S30_pooling.py | Opentrons/covid19-system-30 | 4db5980a93e87f9f607b727678b7ea6d528109ba | [
"Apache-2.0"
] | 1 | 2020-07-29T14:52:28.000Z | 2020-07-29T14:52:28.000Z | from opentrons import protocol_api
import json
import os
import math
# metadata
metadata = {
'protocolName': 'V1 S14 Station A MagMax',
'author': 'Nick <[email protected]>',
'source': 'Custom Protocol Request',
'apiLevel': '2.4'
}
NUM_SAMPLES = 64
SAMPLE_VOLUME = 100
TIP_TRACK = False
def run(... | 31.123596 | 78 | 0.574729 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 605 | 0.218254 |
88e81d74f7c94f8645b9faca1575d321f2ec48d6 | 2,683 | py | Python | rlxnix/plugins/efish/baseline.py | jgrewe/relacsed_nix | 8c5bf486018891baf886635608677faf2487fd48 | [
"BSD-3-Clause"
] | null | null | null | rlxnix/plugins/efish/baseline.py | jgrewe/relacsed_nix | 8c5bf486018891baf886635608677faf2487fd48 | [
"BSD-3-Clause"
] | 3 | 2021-11-04T17:32:35.000Z | 2021-11-07T11:10:35.000Z | rlxnix/plugins/efish/baseline.py | jgrewe/relacsed_nix | 8c5bf486018891baf886635608677faf2487fd48 | [
"BSD-3-Clause"
] | null | null | null | import logging
import numpy as np
from .efish_ephys_repro import EfishEphys
class Baseline(EfishEphys):
"""Represents the run of the Baseline repro of the efish plugin-set.
"""
_repro_name = "BaselineActivity"
def __init__(self, repro_run, traces, relacs_nix_version=1.1) -> None:
super().__i... | 33.962025 | 182 | 0.61312 | 2,603 | 0.970183 | 0 | 0 | 1,560 | 0.581439 | 0 | 0 | 1,449 | 0.540067 |
88e86a165bc8af8615ecf882a5209b22de9aecc5 | 1,258 | py | Python | blogs/migrations/0001_initial.py | daniil-lebedev/N3code-site | bda415bd2140f582ae22101b55f34fc2786d7b45 | [
"MIT"
] | 3 | 2021-05-30T18:26:40.000Z | 2021-07-17T11:45:53.000Z | blogs/migrations/0001_initial.py | daniil-lebedev/N3code-site | bda415bd2140f582ae22101b55f34fc2786d7b45 | [
"MIT"
] | 5 | 2021-06-06T16:13:42.000Z | 2022-02-10T12:10:23.000Z | blogs/migrations/0001_initial.py | daniil-lebedev/N3code-site | bda415bd2140f582ae22101b55f34fc2786d7b45 | [
"MIT"
] | 8 | 2021-06-02T15:00:46.000Z | 2021-07-15T21:27:33.000Z | # Generated by Django 3.2.3 on 2021-05-17 15:31
from django.db import migrations, models
import django.db.models.deletion
class Migration(migrations.Migration):
initial = True
dependencies = [
]
operations = [
migrations.CreateModel(
name='Blogs',
fields=[
... | 34 | 117 | 0.557234 | 1,132 | 0.899841 | 0 | 0 | 0 | 0 | 0 | 0 | 158 | 0.125596 |
88e9ebaa162edc8b9d8c063256bea5900e94971c | 5,101 | py | Python | Reuters/reuters.py | dheeraj7596/SCDV | e83fc81e1b59bebfa2fa1e334097caa44f9e7f48 | [
"MIT"
] | 60 | 2017-05-25T14:08:50.000Z | 2022-02-04T19:29:44.000Z | Reuters/reuters.py | vgupta123/SCDV | 329b13a413318262f1888d872d8e33b30217cbc7 | [
"MIT"
] | 2 | 2020-03-27T14:01:12.000Z | 2020-07-16T14:33:31.000Z | Reuters/reuters.py | vgupta123/SCDV | 329b13a413318262f1888d872d8e33b30217cbc7 | [
"MIT"
] | 19 | 2017-11-10T01:06:28.000Z | 2021-09-25T19:31:25.000Z | # Reuters-21578 dataset downloader and parser
#
# Author: Eustache Diemert <[email protected]>
# http://scikit-learn.org/stable/auto_examples/applications/plot_out_of_core_classification.html
#
# Modified by @herrfz, get pandas DataFrame from the orig SGML
# License: BSD 3 clause
from __future__ import print_funct... | 30.183432 | 96 | 0.556558 | 3,872 | 0.759067 | 645 | 0.126446 | 0 | 0 | 0 | 0 | 1,450 | 0.284258 |
88eac0a7976441ef42ccc1c8a624876cda4f745b | 7,908 | py | Python | sims/ch4-effective-g1-duration/run-well-mixed-effective-g1-duration.py | ThomasPak/cell-competition | bb058d67e297d95c4c8ff2a0aea5b1fe5a82be09 | [
"BSD-3-Clause"
] | null | null | null | sims/ch4-effective-g1-duration/run-well-mixed-effective-g1-duration.py | ThomasPak/cell-competition | bb058d67e297d95c4c8ff2a0aea5b1fe5a82be09 | [
"BSD-3-Clause"
] | null | null | null | sims/ch4-effective-g1-duration/run-well-mixed-effective-g1-duration.py | ThomasPak/cell-competition | bb058d67e297d95c4c8ff2a0aea5b1fe5a82be09 | [
"BSD-3-Clause"
] | null | null | null | import numpy as np
import pandas as pd
from scipy.stats import expon, uniform
import sys
sys.path.append('../../well_mixed')
from well_mixed_death_clock import (WellMixedSimulator,
WellMixedSimulationData, exponential_ccm, uniform_ccm,
base_rate_death_signal)
# Exponential cell cycle model
tG1 = 50
tG2 = 50
... | 31.759036 | 88 | 0.682473 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1,606 | 0.203085 |
88ebd6984c24756abffb46e10ea57a9b5e6af63f | 485 | py | Python | ratemyprof_api/professor.py | nananananate/ratemyprof-api | c037e68e763154cc60812393538c7aa380fbb90e | [
"MIT"
] | 7 | 2021-09-29T22:48:56.000Z | 2022-02-23T16:54:10.000Z | ratemyprof_api/professor.py | nananananate/ratemyprof-api | c037e68e763154cc60812393538c7aa380fbb90e | [
"MIT"
] | null | null | null | ratemyprof_api/professor.py | nananananate/ratemyprof-api | c037e68e763154cc60812393538c7aa380fbb90e | [
"MIT"
] | 1 | 2021-11-19T02:48:08.000Z | 2021-11-19T02:48:08.000Z |
class Professor:
def __init__(self, ratemyprof_id: int, first_name: str, last_name: str, num_of_ratings: int, overall_rating):
self.ratemyprof_id = ratemyprof_id
self.name = f"{first_name} {last_name}"
self.first_name = first_name
self.last_name = last_name
self.num_of_rati... | 30.3125 | 113 | 0.65567 | 483 | 0.995876 | 0 | 0 | 0 | 0 | 0 | 0 | 27 | 0.05567 |
88ec6c26cd7a2f727e00f467fdd178e22cb46386 | 810 | py | Python | hello/hello_sqlite.py | East196/hello-py | a77c7a0c8e5e2b5e8cefaf0fda335ab0c3b1da21 | [
"Apache-2.0"
] | 1 | 2017-10-23T14:58:47.000Z | 2017-10-23T14:58:47.000Z | hello/hello_sqlite.py | East196/hello-py | a77c7a0c8e5e2b5e8cefaf0fda335ab0c3b1da21 | [
"Apache-2.0"
] | null | null | null | hello/hello_sqlite.py | East196/hello-py | a77c7a0c8e5e2b5e8cefaf0fda335ab0c3b1da21 | [
"Apache-2.0"
] | 1 | 2018-04-06T07:49:18.000Z | 2018-04-06T07:49:18.000Z | #!/usr/bin/env python
# -*- coding: utf-8 -*-
# 导入SQLite驱动:
import sqlite3
# 连接到SQLite数据库
# 数据库文件是test.db
# 如果文件不存在,会自动在当前目录创建:
conn = sqlite3.connect('hello.db')
# 创建一个Cursor:
cursor = conn.cursor()
cursor.execute('drop table user')
# 执行一条SQL语句,创建user表:
cursor.execute('create table user (id varchar(20) primary key, n... | 26.129032 | 82 | 0.707407 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 650 | 0.667351 |
88edaae7baa65ef0737db43dff89261e7016c55e | 1,324 | py | Python | ig_data/InstaSearch.py | swapnanildutta/instagram-search | 919a3383f0f7789671108f899d9ba9092a69009f | [
"MIT"
] | 1 | 2022-01-04T16:51:50.000Z | 2022-01-04T16:51:50.000Z | ig_data/InstaSearch.py | swapnanildutta/instagram-search | 919a3383f0f7789671108f899d9ba9092a69009f | [
"MIT"
] | 3 | 2020-10-26T13:31:05.000Z | 2022-01-05T23:11:42.000Z | ig_data/InstaSearch.py | swapnanildutta/instagram-search | 919a3383f0f7789671108f899d9ba9092a69009f | [
"MIT"
] | 2 | 2020-04-07T09:24:07.000Z | 2020-04-14T06:38:49.000Z | # imports
import requests, json
# beautifulsoup4
from bs4 import BeautifulSoup
def searchDisplay(username):
# base url for the data
url = 'https://www.instagram.com/{}/'.format(username)
try:
req = requests.get(url).content
soup=BeautifulSoup(req,"html.parser")
row=soup.f... | 33.948718 | 116 | 0.58006 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 442 | 0.333837 |
88ef1b2b45df53d3ae9e2451d75c76436af81011 | 2,369 | py | Python | tests/jax_ops_test.py | ita9naiwa/fast-soft-sort | 72cbd93ecc229736f9e05bfdfd0f48c09432904f | [
"Apache-2.0"
] | 389 | 2020-06-08T22:30:18.000Z | 2022-03-25T23:04:28.000Z | tests/jax_ops_test.py | ita9naiwa/fast-soft-sort | 72cbd93ecc229736f9e05bfdfd0f48c09432904f | [
"Apache-2.0"
] | 14 | 2020-06-21T13:21:51.000Z | 2021-10-18T18:02:07.000Z | tests/jax_ops_test.py | ita9naiwa/fast-soft-sort | 72cbd93ecc229736f9e05bfdfd0f48c09432904f | [
"Apache-2.0"
] | 32 | 2020-06-20T17:25:10.000Z | 2022-03-26T13:34:23.000Z | # Copyright 2020 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# https://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, ... | 32.452055 | 80 | 0.71718 | 1,340 | 0.56564 | 0 | 0 | 518 | 0.218658 | 0 | 0 | 642 | 0.271 |
88ef5220f71a9bb493ff8c46c52c8179ab59c4c0 | 507 | py | Python | server/accounts/migrations/0004_userdata_primaryfield.py | cristicismas/top-budget | d61db578287b2f77c12032045fca21e58c9ae1eb | [
"MIT"
] | null | null | null | server/accounts/migrations/0004_userdata_primaryfield.py | cristicismas/top-budget | d61db578287b2f77c12032045fca21e58c9ae1eb | [
"MIT"
] | 11 | 2019-12-05T15:21:40.000Z | 2021-10-05T22:08:17.000Z | server/accounts/migrations/0004_userdata_primaryfield.py | cristicismas/top-budget | d61db578287b2f77c12032045fca21e58c9ae1eb | [
"MIT"
] | null | null | null | # Generated by Django 2.2.5 on 2019-09-25 14:30
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('accounts', '0003_auto_20190629_1623'),
]
operations = [
migrations.AddField(
model_name='userdata',
name='primaryFie... | 26.684211 | 164 | 0.619329 | 414 | 0.816568 | 0 | 0 | 0 | 0 | 0 | 0 | 182 | 0.358974 |
88ef90d13386cd8f42e7af523b73ce0b09325d97 | 580 | bzl | Python | source/bazel/deps/Poppy/get.bzl | luxe/unilang | 6c8a431bf61755f4f0534c6299bd13aaeba4b69e | [
"MIT"
] | 33 | 2019-05-30T07:43:32.000Z | 2021-12-30T13:12:32.000Z | source/bazel/deps/Poppy/get.bzl | luxe/unilang | 6c8a431bf61755f4f0534c6299bd13aaeba4b69e | [
"MIT"
] | 371 | 2019-05-16T15:23:50.000Z | 2021-09-04T15:45:27.000Z | source/bazel/deps/Poppy/get.bzl | luxe/unilang | 6c8a431bf61755f4f0534c6299bd13aaeba4b69e | [
"MIT"
] | 6 | 2019-08-22T17:37:36.000Z | 2020-11-07T07:15:32.000Z | # Do not edit this file directly.
# It was auto-generated by: code/programs/reflexivity/reflexive_refresh
load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive")
def poppy():
http_archive(
name="Poppy" ,
build_file="//bazel/deps/Poppy:build.BUILD" ,
sha256="905921192994f6243e... | 34.117647 | 103 | 0.706897 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 407 | 0.701724 |
88ef9a2c09c1a2b19ed7b65cb09a3ea45e5657d4 | 4,023 | py | Python | stubs.min/Rhino/Geometry/__init___parts/Rectangle3d.py | ricardyn/ironpython-stubs | 4d2b405eda3ceed186e8adca55dd97c332c6f49d | [
"MIT"
] | 1 | 2021-02-02T13:39:16.000Z | 2021-02-02T13:39:16.000Z | stubs.min/Rhino/Geometry/__init___parts/Rectangle3d.py | hdm-dt-fb/ironpython-stubs | 4d2b405eda3ceed186e8adca55dd97c332c6f49d | [
"MIT"
] | null | null | null | stubs.min/Rhino/Geometry/__init___parts/Rectangle3d.py | hdm-dt-fb/ironpython-stubs | 4d2b405eda3ceed186e8adca55dd97c332c6f49d | [
"MIT"
] | null | null | null | class Rectangle3d(object,IEpsilonComparable[Rectangle3d]):
"""
Rectangle3d(plane: Plane,width: float,height: float)
Rectangle3d(plane: Plane,width: Interval,height: Interval)
Rectangle3d(plane: Plane,cornerA: Point3d,cornerB: Point3d)
"""
def ClosestPoint(self,point,includeInterior=None):
"""
Closes... | 31.186047 | 215 | 0.679592 | 4,019 | 0.999006 | 0 | 0 | 577 | 0.143425 | 0 | 0 | 2,345 | 0.582898 |
88f03654581e59a140ad7f0b316b54846b6a53fc | 99 | py | Python | openfecli/commands/__init__.py | mikemhenry/openfe | d4c78af62a7ae05b99eb95d173661ac134b7e7b9 | [
"MIT"
] | 14 | 2022-01-24T22:01:19.000Z | 2022-03-31T04:58:35.000Z | openfecli/commands/__init__.py | mikemhenry/openfe | d4c78af62a7ae05b99eb95d173661ac134b7e7b9 | [
"MIT"
] | 109 | 2022-01-24T18:57:05.000Z | 2022-03-31T20:13:07.000Z | openfecli/commands/__init__.py | mikemhenry/openfe | d4c78af62a7ae05b99eb95d173661ac134b7e7b9 | [
"MIT"
] | 4 | 2022-01-24T18:45:54.000Z | 2022-02-21T06:28:24.000Z | # shouldn't apparently need this file, but here we are
from . import atommapping
from . import echo | 33 | 54 | 0.777778 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 54 | 0.545455 |
88f18a67e803424dde5d28eb3302913d647a3a2f | 27,163 | py | Python | src/pages/pe_cuencas.py | ValentinSilvestri/cammesa | 33ff17ad4a0447fd4668b6adad1c4bbfd88aba8e | [
"MIT"
] | null | null | null | src/pages/pe_cuencas.py | ValentinSilvestri/cammesa | 33ff17ad4a0447fd4668b6adad1c4bbfd88aba8e | [
"MIT"
] | null | null | null | src/pages/pe_cuencas.py | ValentinSilvestri/cammesa | 33ff17ad4a0447fd4668b6adad1c4bbfd88aba8e | [
"MIT"
] | null | null | null | import os
import re
import pymongo
import pandas as pd
import numpy as np
import streamlit as st
from bokeh.plotting import figure
from bokeh.palettes import Set1_9, Set3_12, Inferno256
@st.cache(suppress_st_warning=True, allow_output_mutation=True)
def get_caudales():
"""Function to obtain the rivers basin flows... | 39.538574 | 130 | 0.555793 | 0 | 0 | 0 | 0 | 7,864 | 0.288059 | 0 | 0 | 13,855 | 0.507509 |
88f1cc3699cf5781999a9874993e5299f3224a9d | 5,930 | py | Python | utils/gen-vowel-constraints.py | ctrlcctrlv/fontFeatures | 76d68586da2c1c42bb3cd79f92d583e63f52cf02 | [
"BSD-3-Clause"
] | 51 | 2020-01-15T09:28:51.000Z | 2022-03-30T06:48:36.000Z | utils/gen-vowel-constraints.py | ctrlcctrlv/fontFeatures | 76d68586da2c1c42bb3cd79f92d583e63f52cf02 | [
"BSD-3-Clause"
] | 51 | 2020-05-11T18:51:25.000Z | 2021-12-20T12:55:08.000Z | utils/gen-vowel-constraints.py | ctrlcctrlv/fontFeatures | 76d68586da2c1c42bb3cd79f92d583e63f52cf02 | [
"BSD-3-Clause"
] | 8 | 2020-08-28T20:03:14.000Z | 2021-12-08T01:22:28.000Z | #!/usr/bin/env python3
"""Generator of the function to prohibit certain vowel sequences.
It creates ``_hb_preprocess_text_vowel_constraints``, which inserts dotted
circles into sequences prohibited by the USE script development spec.
This function should be used as the ``preprocess_text`` of an
``hb_ot_complex_shaper... | 37.770701 | 130 | 0.579764 | 3,488 | 0.588196 | 0 | 0 | 237 | 0.039966 | 0 | 0 | 2,015 | 0.339798 |
88f228f6aba01067ca766c9e905ecf9ba9e9f3a0 | 1,719 | py | Python | rules.py | ONSdigital/blaise-data-delivery-alerts | 5077ae6da9ef406549c994bc735745fcbb02e61d | [
"MIT"
] | null | null | null | rules.py | ONSdigital/blaise-data-delivery-alerts | 5077ae6da9ef406549c994bc735745fcbb02e61d | [
"MIT"
] | null | null | null | rules.py | ONSdigital/blaise-data-delivery-alerts | 5077ae6da9ef406549c994bc735745fcbb02e61d | [
"MIT"
] | null | null | null | from datetime import datetime, timedelta
import pytz
ALLOWED_AGE_PER_STATUS = {
"default": 5 * 60,
# LMS instruments can take a very long time to generate when the SPS is not cached
"started": 35 * 60,
"nifi_notified": 30 * 60,
}
COMPLETE_STATES = ["inactive", "in_arc"]
def slow_process(state_recor... | 29.135593 | 87 | 0.709133 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 408 | 0.237347 |
88f349a60a782c3197475116d0068eb5bfe4f4a8 | 2,229 | py | Python | src/SocketServer.py | iamyyl/DDNS | 537babb8a0f2debc65326f12ff3cc15d73692f98 | [
"Apache-2.0"
] | null | null | null | src/SocketServer.py | iamyyl/DDNS | 537babb8a0f2debc65326f12ff3cc15d73692f98 | [
"Apache-2.0"
] | null | null | null | src/SocketServer.py | iamyyl/DDNS | 537babb8a0f2debc65326f12ff3cc15d73692f98 | [
"Apache-2.0"
] | null | null | null | import socket
import select
fd_to_socket = {}
READ_ONLY = ( select.POLLIN | select.POLLPRI | select.POLLHUP | select.POLLERR)
READ_WRITE = (READ_ONLY|select.POLLOUT)
poller = select.poll()
server = None
IP = '127.0.0.1'
Port = 7002
def getAddress ():
return IP, Port
def initServer(ip=IP, port=Port):
global se... | 30.121622 | 79 | 0.544639 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 87 | 0.039031 |
88f4ca8390bec41333df4559d2ca341bcce83beb | 39,506 | py | Python | pysnmp/A3COM-HUAWEI-SNA-DLSW-MIB.py | agustinhenze/mibs.snmplabs.com | 1fc5c07860542b89212f4c8ab807057d9a9206c7 | [
"Apache-2.0"
] | 11 | 2021-02-02T16:27:16.000Z | 2021-08-31T06:22:49.000Z | pysnmp/A3COM-HUAWEI-SNA-DLSW-MIB.py | agustinhenze/mibs.snmplabs.com | 1fc5c07860542b89212f4c8ab807057d9a9206c7 | [
"Apache-2.0"
] | 75 | 2021-02-24T17:30:31.000Z | 2021-12-08T00:01:18.000Z | pysnmp/A3COM-HUAWEI-SNA-DLSW-MIB.py | agustinhenze/mibs.snmplabs.com | 1fc5c07860542b89212f4c8ab807057d9a9206c7 | [
"Apache-2.0"
] | 10 | 2019-04-30T05:51:36.000Z | 2022-02-16T03:33:41.000Z | #
# PySNMP MIB module A3COM-HUAWEI-SNA-DLSW-MIB (http://snmplabs.com/pysmi)
# ASN.1 source file:///Users/davwang4/Dev/mibs.snmplabs.com/asn1/A3COM-HUAWEI-SNA-DLSW-MIB
# Produced by pysmi-0.3.4 at Mon Apr 29 16:52:16 2019
# On host DAVWANG4-M-1475 platform Darwin version 18.5.0 by user davwang4
# Using Python version 3.... | 131.249169 | 5,640 | 0.75505 | 1,669 | 0.042247 | 0 | 0 | 0 | 0 | 0 | 0 | 4,981 | 0.126082 |
88f5b3a545f8379f5c6bd871ff166dd1442dd335 | 1,263 | py | Python | solutions/validate-binary-search-tree.py | edab/-LC_StudyPlan_Python | e065f0ced68d23800d7b5001102c2e930ee35e23 | [
"MIT"
] | null | null | null | solutions/validate-binary-search-tree.py | edab/-LC_StudyPlan_Python | e065f0ced68d23800d7b5001102c2e930ee35e23 | [
"MIT"
] | 1 | 2022-02-22T15:42:54.000Z | 2022-02-25T00:10:04.000Z | solutions/validate-binary-search-tree.py | edab/-LC_StudyPlan_Python | e065f0ced68d23800d7b5001102c2e930ee35e23 | [
"MIT"
] | null | null | null | # Leetcode 98. Validate Binary Search Tree
#
# Link: https://leetcode.com/problems/validate-binary-search-tree/
# Difficulty: Medium
# Complexity:
# O(N) time | where N represent the number of elements in the input tree
# O(N) space | where N represent the number of elements in the input tree
# Definition for a bi... | 30.071429 | 104 | 0.63658 | 771 | 0.610451 | 0 | 0 | 0 | 0 | 0 | 0 | 477 | 0.377672 |
88f8317bf62d16d93d0f7dd37a85760c1a1014e1 | 763 | py | Python | setup.py | stanford-ccb/ccb | ba75d490663958703f19e7a13f72001b050da229 | [
"MIT"
] | 3 | 2020-02-13T00:49:06.000Z | 2020-06-24T23:53:25.000Z | setup.py | stanford-ccb/ccb | ba75d490663958703f19e7a13f72001b050da229 | [
"MIT"
] | null | null | null | setup.py | stanford-ccb/ccb | ba75d490663958703f19e7a13f72001b050da229 | [
"MIT"
] | 4 | 2020-01-29T17:21:59.000Z | 2021-01-27T01:53:05.000Z | from setuptools import setup
version = open("ccb/__version__.py").read().strip('"\n')
setup_args = {
"name": "ccb",
"version": version,
"url": "https://github.com/earth-chris/ccb",
"license": "MIT",
"author": "Christopher Anderson",
"author_email": "[email protected]",
"description": "... | 34.681818 | 111 | 0.643512 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 517 | 0.677588 |
88f8e7ad2c848fa7633da12c05df70cdb4d3835a | 1,576 | py | Python | Unit4/Lesson8.py | szhua/PythonLearn | 12eaf7cc74a0310bb23e21773f3c83deb91d0362 | [
"Apache-2.0"
] | null | null | null | Unit4/Lesson8.py | szhua/PythonLearn | 12eaf7cc74a0310bb23e21773f3c83deb91d0362 | [
"Apache-2.0"
] | null | null | null | Unit4/Lesson8.py | szhua/PythonLearn | 12eaf7cc74a0310bb23e21773f3c83deb91d0362 | [
"Apache-2.0"
] | null | null | null |
# import time
#
# def reader():
# """A generator that fakes a read from a file, socket, etc."""
# for i in range(101):
# yield '<< %s' % i
#
# def consumer():
# r = ''
# while True:
# #但是Python的yield不但可以返回一个值,它还可以接收调用者发出的参数。
# #此处的n是接受参数
# n = yield from reader()
# ... | 17.909091 | 68 | 0.498096 | 0 | 0 | 524 | 0.290466 | 0 | 0 | 0 | 0 | 1,169 | 0.648004 |
88fb6794a48a5fc109dca145fcd71d6498bacc28 | 1,288 | py | Python | tools/transferComponentSelection.py | fsanges/glTools | 8ff0899de43784a18bd4543285655e68e28fb5e5 | [
"MIT"
] | 165 | 2015-01-26T05:22:04.000Z | 2022-03-22T02:50:41.000Z | tools/transferComponentSelection.py | qeeji/glTools | 8ff0899de43784a18bd4543285655e68e28fb5e5 | [
"MIT"
] | 5 | 2015-12-02T02:39:44.000Z | 2020-12-09T02:45:54.000Z | tools/transferComponentSelection.py | qeeji/glTools | 8ff0899de43784a18bd4543285655e68e28fb5e5 | [
"MIT"
] | 83 | 2015-02-10T17:18:24.000Z | 2022-02-10T07:16:47.000Z | import maya.cmds as mc
import maya.OpenMaya as OpenMaya
import glTools.utils.base
def transferComponentSelection(sourceSelection,targetMesh,threshold=0.0001):
'''
'''
# Check selection target mesh
if not mc.objExists(targetMesh):
raise Exception('Target mesh "'+targetMesh+'" does not exist!')
# Flatten selec... | 22.596491 | 76 | 0.699534 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 420 | 0.326087 |
88fcbd1db9da3e509077f5b7cc6ecfe05a708ea8 | 3,289 | py | Python | pyprika/__init__.py | muppetize/pyprika | c1a4c086ee99935f5e7cf7361a4552fe69fe4b44 | [
"MIT"
] | 7 | 2016-03-10T22:23:28.000Z | 2021-01-17T03:25:50.000Z | pyprika/__init__.py | muppetize/pyprika | c1a4c086ee99935f5e7cf7361a4552fe69fe4b44 | [
"MIT"
] | 1 | 2017-01-19T21:35:23.000Z | 2017-01-27T04:11:44.000Z | pyprika/__init__.py | muppetize/pyprika | c1a4c086ee99935f5e7cf7361a4552fe69fe4b44 | [
"MIT"
] | 4 | 2016-11-19T21:48:41.000Z | 2022-02-18T01:23:23.000Z | """
A Python package for recipe parsing and management.
"""
import yaml
try:
from cStringIO import StringIO
except ImportError:
from io import StringIO
from .exceptions import LoadError, ParseError, PyprikaError, FieldError # noqa
from .ingredient import Ingredient # noqa
from .quantity import Quantity # n... | 33.907216 | 79 | 0.644573 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 2,162 | 0.657343 |
88fcc966d96adb9a2926e13a38e7ae9f04bcd664 | 1,202 | py | Python | tests/molecular/molecules/constructed_molecule/test_get_bond_infos.py | stevenbennett96/stk | 6e5af87625b83e0bfc7243bc42d8c7a860cbeb76 | [
"MIT"
] | 21 | 2018-04-12T16:25:24.000Z | 2022-02-14T23:05:43.000Z | tests/molecular/molecules/constructed_molecule/test_get_bond_infos.py | stevenbennett96/stk | 6e5af87625b83e0bfc7243bc42d8c7a860cbeb76 | [
"MIT"
] | 8 | 2019-03-19T12:36:36.000Z | 2020-11-11T12:46:00.000Z | tests/molecular/molecules/constructed_molecule/test_get_bond_infos.py | stevenbennett96/stk | 6e5af87625b83e0bfc7243bc42d8c7a860cbeb76 | [
"MIT"
] | 5 | 2018-08-07T13:00:16.000Z | 2021-11-01T00:55:10.000Z | def test_get_bond_infos(case_data):
"""
Test :meth:`.ConstructedMolecule.get_bond_infos`.
Parameters
----------
case_data : :class:`.CaseData`
A test case. Holds the constructed molecule to test and the
correct number of new bonds.
Returns
-------
None : :class:`NoneTyp... | 23.568627 | 67 | 0.645591 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 623 | 0.518303 |
88fd1341d14bed024a3961fac8b9b61a8a5de30e | 94 | py | Python | generic_views/base_views/apps.py | markbirds/Django-Code-Repo | b55762d2dab00640acf2e8e00ddc66716d53c6b5 | [
"MIT"
] | 1 | 2021-11-25T00:02:36.000Z | 2021-11-25T00:02:36.000Z | generic_views/base_views/apps.py | markbirds/Django-Code-Repo | b55762d2dab00640acf2e8e00ddc66716d53c6b5 | [
"MIT"
] | null | null | null | generic_views/base_views/apps.py | markbirds/Django-Code-Repo | b55762d2dab00640acf2e8e00ddc66716d53c6b5 | [
"MIT"
] | null | null | null | from django.apps import AppConfig
class BaseViewsConfig(AppConfig):
name = 'base_views'
| 15.666667 | 33 | 0.765957 | 57 | 0.606383 | 0 | 0 | 0 | 0 | 0 | 0 | 12 | 0.12766 |
88fe054080de49b8785340e2f3ce23ac82e4a3fa | 324 | py | Python | the_office/test.py | zubyjaved/reddit-bots | 9f15f5ee9eede5223c975c29527c9e58d68bb517 | [
"MIT"
] | 2 | 2019-09-07T09:40:23.000Z | 2021-06-19T08:40:00.000Z | the_office/test.py | zubyjaved/reddit-bots | 9f15f5ee9eede5223c975c29527c9e58d68bb517 | [
"MIT"
] | 2 | 2019-09-05T04:42:23.000Z | 2019-09-05T04:44:37.000Z | the_office/test.py | zubyjaved/reddit-bots | 9f15f5ee9eede5223c975c29527c9e58d68bb517 | [
"MIT"
] | null | null | null | import json
import praw
reddit = praw.Reddit("dwight-schrute-bot")
for submission in reddit.subreddit('all').rising(limit=15):
submission.comments.replace_more(limit=None)
print(submission.subreddit.display_name)
if not submission.over_18:
for comment in submission.comments.list():
pri... | 29.454545 | 59 | 0.722222 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 25 | 0.07716 |
88fe820e78b74b43c84647fdd224db13efd8f585 | 1,311 | py | Python | Scripts/Client/ManualControlTest.py | Fzeak/sauvc-2019 | 573dcb351d0f87f9b7605667c570a5003bedb224 | [
"MIT"
] | null | null | null | Scripts/Client/ManualControlTest.py | Fzeak/sauvc-2019 | 573dcb351d0f87f9b7605667c570a5003bedb224 | [
"MIT"
] | null | null | null | Scripts/Client/ManualControlTest.py | Fzeak/sauvc-2019 | 573dcb351d0f87f9b7605667c570a5003bedb224 | [
"MIT"
] | null | null | null | from pymavlink import mavutil
import time
# Create the connection
master = mavutil.mavlink_connection('udpin:0.0.0.0:14550')
# Wait a heartbeat before sending commands
master.wait_heartbeat()
# Send a positive x value, negative y, negative z,
# positive rotation and no button.
# http://mavlink.org/messages/common#MAN... | 28.5 | 100 | 0.695652 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 653 | 0.498093 |
88febcb95df370f538bcc67acef3a199df882aef | 1,734 | py | Python | HEIC en JPG.py | PictorSomni/Image_manipulations | 7b91dd8514a2bb4383308c199e03e26539cef430 | [
"MIT"
] | null | null | null | HEIC en JPG.py | PictorSomni/Image_manipulations | 7b91dd8514a2bb4383308c199e03e26539cef430 | [
"MIT"
] | null | null | null | HEIC en JPG.py | PictorSomni/Image_manipulations | 7b91dd8514a2bb4383308c199e03e26539cef430 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
#############################################################
# IMPORTS #
#############################################################
import os
from PIL import Image
import pyheif
#####################################################... | 36.893617 | 107 | 0.336794 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 838 | 0.483276 |
88ffda9c63fb74eb6eeb58819eb9951a55e13efa | 17,863 | py | Python | tplbuild/config.py | msg555/tplbuild | 1517fa97b17df4883f6885a7fb3ccfe017576e53 | [
"BSD-3-Clause"
] | null | null | null | tplbuild/config.py | msg555/tplbuild | 1517fa97b17df4883f6885a7fb3ccfe017576e53 | [
"BSD-3-Clause"
] | null | null | null | tplbuild/config.py | msg555/tplbuild | 1517fa97b17df4883f6885a7fb3ccfe017576e53 | [
"BSD-3-Clause"
] | null | null | null | import functools
import os
import ssl
import uuid
from typing import Any, Dict, List, Literal, Optional, Tuple
import jinja2
import pydantic
import yaml
from .exceptions import TplBuildException, TplBuildTemplateException
RESERVED_PROFILE_KEYS = {
"begin_stage",
"platform",
}
def _normalize_rel_path(path: ... | 40.141573 | 96 | 0.666014 | 16,732 | 0.936685 | 0 | 0 | 4,481 | 0.250854 | 0 | 0 | 10,557 | 0.590998 |
00002c1133ee1a3e69c2c023cddb9b34c36440ca | 1,634 | py | Python | setup.py | DNA-and-Natural-Algorithms-Group/peppercompiler | effbcdedfb17534300fb3504a552e46c1ead41e4 | [
"MIT"
] | 3 | 2019-06-10T18:44:03.000Z | 2021-11-17T10:57:09.000Z | setup.py | DNA-and-Natural-Algorithms-Group/peppercompiler | effbcdedfb17534300fb3504a552e46c1ead41e4 | [
"MIT"
] | 2 | 2017-12-15T01:09:49.000Z | 2021-03-25T20:42:23.000Z | setup.py | DNA-and-Natural-Algorithms-Group/peppercompiler | effbcdedfb17534300fb3504a552e46c1ead41e4 | [
"MIT"
] | 4 | 2017-08-21T03:32:51.000Z | 2019-10-18T04:09:38.000Z | #!/usr/bin/env python
from setuptools import setup
from distutils.command.build import build
from setuptools.command.develop import develop
class build_with_spurious(build):
def run(self):
import os
if "CC" in os.environ:
cc = os.environ['CC']
else:
cc = "cc"
... | 29.709091 | 106 | 0.641983 | 582 | 0.356181 | 0 | 0 | 0 | 0 | 0 | 0 | 725 | 0.443696 |
00004b28f6ae2b9a9b673b26fbf0fba70c90416d | 1,126 | py | Python | client/client.py | flavioribeiro/playmobil | d104b80fd666158e7ae3d1e28ce8d3ba68e93a68 | [
"Apache-2.0"
] | 1 | 2016-10-27T21:30:30.000Z | 2016-10-27T21:30:30.000Z | client/client.py | flavioribeiro/playmobil | d104b80fd666158e7ae3d1e28ce8d3ba68e93a68 | [
"Apache-2.0"
] | null | null | null | client/client.py | flavioribeiro/playmobil | d104b80fd666158e7ae3d1e28ce8d3ba68e93a68 | [
"Apache-2.0"
] | null | null | null | import sys
sys.path.append("/Library/Frameworks/GStreamer.framework/Versions/0.10/lib/python2.7/site-packages/")
import gobject
gobject.threads_init()
import pygst
pygst.require("0.10")
import gst
class Client(object):
def __init__(self):
self.pipeline = gst.Pipeline('client')
self.videotestsrc = s... | 34.121212 | 101 | 0.71492 | 855 | 0.759325 | 0 | 0 | 0 | 0 | 0 | 0 | 202 | 0.179396 |
00005f4a70c5144076952dbbb1c77de24a5e43d7 | 3,852 | py | Python | InternetSemLimites/api/tests/test_edit_view.py | InternetSemLimites/PublicAPI | 3dd0f17fe66688ef2895de540950f45d69bcd9d8 | [
"MIT"
] | 18 | 2016-04-14T17:03:29.000Z | 2020-01-01T00:54:03.000Z | InternetSemLimites/api/tests/test_edit_view.py | InternetSemLimites/PublicAPI | 3dd0f17fe66688ef2895de540950f45d69bcd9d8 | [
"MIT"
] | 48 | 2016-04-15T12:33:33.000Z | 2018-01-25T16:01:45.000Z | InternetSemLimites/api/tests/test_edit_view.py | InternetSemLimites/PublicAPI | 3dd0f17fe66688ef2895de540950f45d69bcd9d8 | [
"MIT"
] | 4 | 2016-04-15T07:57:04.000Z | 2017-09-10T18:10:40.000Z | from django.contrib.auth.models import User
from django.core import mail
from django.shortcuts import resolve_url
from django.test import TestCase
from InternetSemLimites.core.forms import ProviderForm
from InternetSemLimites.core.models import Provider, State
class TestPostValid(TestCase):
def setUp(self):
... | 39.306122 | 98 | 0.637072 | 3,596 | 0.930883 | 0 | 0 | 0 | 0 | 0 | 0 | 657 | 0.170075 |
000066c365ae5f522b2bf93ad57e924347136b00 | 2,780 | py | Python | expr_parse_tree.py | PlaskED/z3-python | e433af3ce7ebc9547630e4528ce6d38d1a5aefd6 | [
"MIT"
] | null | null | null | expr_parse_tree.py | PlaskED/z3-python | e433af3ce7ebc9547630e4528ce6d38d1a5aefd6 | [
"MIT"
] | null | null | null | expr_parse_tree.py | PlaskED/z3-python | e433af3ce7ebc9547630e4528ce6d38d1a5aefd6 | [
"MIT"
] | null | null | null | from z3 import *
CONNECTIVE_OPS = [Z3_OP_NOT,Z3_OP_AND,Z3_OP_OR,Z3_OP_IMPLIES,Z3_OP_IFF,Z3_OP_ITE]
REL_OPS = [Z3_OP_EQ,Z3_OP_LE,Z3_OP_LT,Z3_OP_GE,Z3_OP_GT]
OPERATORS = CONNECTIVE_OPS + REL_OPS
# var is tuple (type, name)
def createVar(var):
t = var[0]
n = var[1]
if t=="int":
return Int('%s' % n)
elif t=="... | 24.60177 | 83 | 0.614748 | 1,037 | 0.373022 | 0 | 0 | 0 | 0 | 0 | 0 | 305 | 0.109712 |
000069dbeffca39b13535cbec664af30b8b425d2 | 351 | py | Python | algorithm-study/therory/selectionSort.py | Seongkyun-Yu/TIL | 2be6a2a68246bc98996b1421e2cc20e025c876ed | [
"MIT"
] | 1 | 2020-02-17T15:15:55.000Z | 2020-02-17T15:15:55.000Z | algorithm-study/therory/selectionSort.py | Seongkyun-Yu/TIL | 2be6a2a68246bc98996b1421e2cc20e025c876ed | [
"MIT"
] | 6 | 2020-07-31T17:03:56.000Z | 2022-02-27T04:17:57.000Z | algorithm-study/therory/selectionSort.py | Seongkyun-Yu/TIL | 2be6a2a68246bc98996b1421e2cc20e025c876ed | [
"MIT"
] | null | null | null | import random
data_list = random.sample(range(100), 50)
def selectionSort(arr):
for index1 in range(len(arr) - 1):
lowestIndex = index1
for index2 in range(index1, len(arr)):
if(arr[lowestIndex] > arr[index2]):
lowestIndex = index2
arr[index1] = arr[lowestIndex]
return arr
print(sele... | 18.473684 | 42 | 0.65812 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
00021f532b1a8ddd0a8c15783c8737edde030453 | 12,045 | py | Python | platform/core/polyaxon/monitor_statuses/monitor.py | hackerwins/polyaxon | ff56a098283ca872abfbaae6ba8abba479ffa394 | [
"Apache-2.0"
] | null | null | null | platform/core/polyaxon/monitor_statuses/monitor.py | hackerwins/polyaxon | ff56a098283ca872abfbaae6ba8abba479ffa394 | [
"Apache-2.0"
] | null | null | null | platform/core/polyaxon/monitor_statuses/monitor.py | hackerwins/polyaxon | ff56a098283ca872abfbaae6ba8abba479ffa394 | [
"Apache-2.0"
] | null | null | null | import logging
from typing import Any, Mapping
import redis
import conf
import ocular
import workers
from constants.experiment_jobs import get_experiment_job_uuid
from db.redis.containers import RedisJobContainers
from db.redis.statuses import RedisStatuses
from lifecycles.jobs import JobLifeCycle
from options.regi... | 39.491803 | 94 | 0.594687 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1,439 | 0.119469 |
0003b8ab877e0ee926932cb4211e0799fd7d5511 | 14,636 | py | Python | flow65/wing_tool.py | corygoates/Flow65 | 148eddaeeed8711eae37a16820215c89f93f01d5 | [
"MIT"
] | null | null | null | flow65/wing_tool.py | corygoates/Flow65 | 148eddaeeed8711eae37a16820215c89f93f01d5 | [
"MIT"
] | null | null | null | flow65/wing_tool.py | corygoates/Flow65 | 148eddaeeed8711eae37a16820215c89f93f01d5 | [
"MIT"
] | null | null | null | import sys
import json
import numpy as np
import matplotlib.pyplot as plt
class Wing:
"""A class for modeling a finite wing using the sine-series solution to Prandtl's lifting-line equation.
Parameters
----------
planform : str
May be "elliptic" or "tapered".
b : float
Wingspan.... | 36.227723 | 197 | 0.583903 | 10,839 | 0.740571 | 0 | 0 | 0 | 0 | 0 | 0 | 4,440 | 0.303362 |
000445b6df45545c85a37ba990d9f92d918eec00 | 271 | py | Python | tutorial/listTask/models.py | PabloSuarez/API_django | 522cc5b052c13c38fc7ef95353b8e3640126feaa | [
"MIT"
] | null | null | null | tutorial/listTask/models.py | PabloSuarez/API_django | 522cc5b052c13c38fc7ef95353b8e3640126feaa | [
"MIT"
] | null | null | null | tutorial/listTask/models.py | PabloSuarez/API_django | 522cc5b052c13c38fc7ef95353b8e3640126feaa | [
"MIT"
] | null | null | null | from django.db import models
class Task(models.Model):
title = models.CharField(max_length=40)
description = models.TextField(max_length=500)
date_created = models.DateTimeField(auto_now_add=True)
date_last_modified = models.DateTimeField(auto_now=True)
| 33.875 | 60 | 0.778598 | 240 | 0.885609 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
0005a7c39d8aea447086a691df1fb17b38ca23eb | 927 | py | Python | UAC.py | weareblahs/wsa-auto-install | 0633d2b4e36ba50ddbe5b16505b8a09ff764df26 | [
"MIT"
] | 76 | 2021-10-29T23:41:26.000Z | 2021-12-09T06:31:04.000Z | UAC.py | weareblahs/wsa-auto-install | 0633d2b4e36ba50ddbe5b16505b8a09ff764df26 | [
"MIT"
] | 7 | 2021-11-10T19:05:26.000Z | 2021-12-07T15:53:43.000Z | UAC.py | weareblahs/wsa-auto-install | 0633d2b4e36ba50ddbe5b16505b8a09ff764df26 | [
"MIT"
] | 16 | 2021-11-06T06:17:58.000Z | 2021-12-08T22:08:24.000Z | def elevate():
import ctypes, win32com, win32event, win32process, os, sys
outpath = r'%s\%s.out' % (os.environ["TEMP"], os.path.basename(__file__))
if ctypes.windll.shell32.IsUserAnAdmin():
if os.path.isfile(outpath):
sys.stderr = sys.stdout = open(outpath, 'w', 0)
return
wit... | 38.625 | 91 | 0.593312 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 57 | 0.061489 |
0006b94d0b62d69c3ab03500298cb1fb2775bd17 | 629 | py | Python | etikihead/urls.py | hodeld/etiki-prototype1 | bcae893423519f6ddfa4f67b980066e04062d9f3 | [
"MIT"
] | 1 | 2019-08-31T18:04:39.000Z | 2019-08-31T18:04:39.000Z | etikihead/urls.py | hodeld/etiki-prototype1 | bcae893423519f6ddfa4f67b980066e04062d9f3 | [
"MIT"
] | 19 | 2019-12-12T01:38:49.000Z | 2022-03-12T00:26:14.000Z | etikihead/urls.py | hodeld/etiki-prototype1 | bcae893423519f6ddfa4f67b980066e04062d9f3 | [
"MIT"
] | null | null | null | from django.urls import path
from django.conf import settings
from django.conf.urls.static import static
from . import views
app_name = 'etikihead'
urlpatterns = [
path('', views.entry_mask, name='entrymask'),
path('contact/', views.contact, name='contact'),
path('privacy/', views.privacy, name='privac... | 26.208333 | 61 | 0.658188 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 163 | 0.259141 |
0007473466f54c5bf5a586f0d058eba177c13018 | 1,070 | py | Python | test_proj/test_tcA002.py | leeltib/vizsgamunka_ref | 59dc64d499c32a548a6e83c251cf16e2787e8672 | [
"MIT"
] | null | null | null | test_proj/test_tcA002.py | leeltib/vizsgamunka_ref | 59dc64d499c32a548a6e83c251cf16e2787e8672 | [
"MIT"
] | null | null | null | test_proj/test_tcA002.py | leeltib/vizsgamunka_ref | 59dc64d499c32a548a6e83c251cf16e2787e8672 | [
"MIT"
] | null | null | null | # TC002 test case - Login in with new user data - exit
import data.data_tcA002 as da02
import func.func_01 as fu01
from selenium import webdriver
from selenium.webdriver.common.by import By
import time
from selenium.webdriver.chrome.options import Options
from webdriver_manager.chrome import ChromeDriverManager
opti... | 23.26087 | 91 | 0.675701 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 279 | 0.259535 |
000803fab8613a18bfb601cb4e0f3433d97e4dce | 966 | py | Python | lisc/tests/test_data_utils.py | jasongfleischer/lisc | ed30be957d7ce13ccbac51092990869840e6f176 | [
"Apache-2.0"
] | 1 | 2020-05-11T18:36:16.000Z | 2020-05-11T18:36:16.000Z | lisc/tests/test_data_utils.py | jasongfleischer/lisc | ed30be957d7ce13ccbac51092990869840e6f176 | [
"Apache-2.0"
] | null | null | null | lisc/tests/test_data_utils.py | jasongfleischer/lisc | ed30be957d7ce13ccbac51092990869840e6f176 | [
"Apache-2.0"
] | null | null | null | """Tests for the data utilities from lisc."""
from lisc.data.utils import *
###################################################################################################
###################################################################################################
def test_count_elements():
tdat = ['... | 23.560976 | 99 | 0.471014 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 371 | 0.384058 |
0008876f23a1dced29f967f65132c7d09b0756dc | 2,316 | py | Python | repos/system_upgrade/el8toel9/actors/firewalldcheckallowzonedrifting/actor.py | tmds/leapp-repository | 7c9ea115a68530eb25f5c23d3fcadd60c501bf78 | [
"Apache-2.0"
] | null | null | null | repos/system_upgrade/el8toel9/actors/firewalldcheckallowzonedrifting/actor.py | tmds/leapp-repository | 7c9ea115a68530eb25f5c23d3fcadd60c501bf78 | [
"Apache-2.0"
] | 1 | 2022-03-07T15:34:11.000Z | 2022-03-07T15:35:15.000Z | repos/system_upgrade/el8toel9/actors/firewalldcheckallowzonedrifting/actor.py | tmds/leapp-repository | 7c9ea115a68530eb25f5c23d3fcadd60c501bf78 | [
"Apache-2.0"
] | null | null | null | from leapp import reporting
from leapp.actors import Actor
from leapp.models import FirewalldGlobalConfig, FirewallsFacts
from leapp.reporting import create_report, Report
from leapp.tags import ChecksPhaseTag, IPUWorkflowTag
class FirewalldCheckAllowZoneDrifting(Actor):
"""
This actor will check if AllowZone... | 44.538462 | 91 | 0.642055 | 2,087 | 0.901123 | 0 | 0 | 0 | 0 | 0 | 0 | 969 | 0.418394 |
0009620a33b624fda2004552df089e8ea26f0972 | 665 | py | Python | eeve/eeve actions/list_dir.py | vMarcelino/eeve | 7dcfa17d34480f5c120ce963680babffff8ab412 | [
"Apache-2.0"
] | 1 | 2019-10-11T18:42:48.000Z | 2019-10-11T18:42:48.000Z | eeve/eeve actions/list_dir.py | vMarcelino/eeve | 7dcfa17d34480f5c120ce963680babffff8ab412 | [
"Apache-2.0"
] | null | null | null | eeve/eeve actions/list_dir.py | vMarcelino/eeve | 7dcfa17d34480f5c120ce963680babffff8ab412 | [
"Apache-2.0"
] | 1 | 2019-10-11T18:42:49.000Z | 2019-10-11T18:42:49.000Z | import os
def run(path: str, return_full_path: bool = False):
"""Gets all files and folders from a path and stores them into $file_list
Arguments:
path {str} -- The path to get files and folders from
Keyword Arguments:
return_full_path {bool} -- True to return the full path of th... | 27.708333 | 124 | 0.627068 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 413 | 0.621053 |
0009cacc81bd5d1ceb8972e6ec2ff4235cfdb2ad | 11,938 | py | Python | tests/test_workspaces.py | jeokrohn/wxc_sdk | e28b7e0f870d17b7f9a79ad9a4b8af221e58f8e9 | [
"MIT"
] | null | null | null | tests/test_workspaces.py | jeokrohn/wxc_sdk | e28b7e0f870d17b7f9a79ad9a4b8af221e58f8e9 | [
"MIT"
] | null | null | null | tests/test_workspaces.py | jeokrohn/wxc_sdk | e28b7e0f870d17b7f9a79ad9a4b8af221e58f8e9 | [
"MIT"
] | 1 | 2022-03-29T18:56:59.000Z | 2022-03-29T18:56:59.000Z | """
Test for workspaces API
"""
# TODO: tests for authorization codes
import random
from collections.abc import Generator
from concurrent.futures import ThreadPoolExecutor
from contextlib import contextmanager
from wxc_sdk.rest import RestError
from wxc_sdk.all_types import *
from .base import TestCaseWithLog
TEST_WO... | 43.410909 | 116 | 0.627576 | 11,567 | 0.968923 | 2,431 | 0.203635 | 2,471 | 0.206986 | 0 | 0 | 2,499 | 0.209332 |
000aa2371b1616577368d0ba5de43105bfebe942 | 1,935 | py | Python | openpose/data/parse_tfrecord.py | calmisential/Pose_Estimation | f3546fcfdc81ef60708fbda5fc1eb499679fff2f | [
"MIT"
] | null | null | null | openpose/data/parse_tfrecord.py | calmisential/Pose_Estimation | f3546fcfdc81ef60708fbda5fc1eb499679fff2f | [
"MIT"
] | null | null | null | openpose/data/parse_tfrecord.py | calmisential/Pose_Estimation | f3546fcfdc81ef60708fbda5fc1eb499679fff2f | [
"MIT"
] | null | null | null | import tensorflow as tf
import glob
from configuration import OpenPoseCfg as cfg
from openpose.data.augmentation import Transformer
def get_tfrecord_filenames(path):
print("从"+path+"中提取TFRecords文件:")
tfrecord_files = glob.glob(path + "*")
tfrecord_files.sort()
if not tfrecord_files:
raise Va... | 34.553571 | 106 | 0.724548 | 1,140 | 0.58193 | 0 | 0 | 0 | 0 | 0 | 0 | 111 | 0.056662 |
000ac16fad7b0087c58e7dce0cb0032d35a1586a | 209 | py | Python | ex015a.py | emerfelippini/Curso_em_video-Aulas_Python | 5b1d78b259732bb9bbad27cd30ce91bba77c5ef0 | [
"MIT"
] | null | null | null | ex015a.py | emerfelippini/Curso_em_video-Aulas_Python | 5b1d78b259732bb9bbad27cd30ce91bba77c5ef0 | [
"MIT"
] | null | null | null | ex015a.py | emerfelippini/Curso_em_video-Aulas_Python | 5b1d78b259732bb9bbad27cd30ce91bba77c5ef0 | [
"MIT"
] | null | null | null | dia = int(input('Quantos dias alugados? '))
km = float(input('Quantos KM rodados? '))
print('Como você ficou {} dias com ele e rodou {:.2f}KM, sua conta ficou em {:.2f}R$'.format(dia, km, (60*dia)+(0.15*km)))
| 52.25 | 122 | 0.645933 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 127 | 0.604762 |
000bdce1c17e5a0d04aad4788cb96fae87e895ca | 775 | py | Python | xiaomirouter/client/ip.py | RiRomain/python-xiaomi-router | 36867d077349a70678db75cf261428cdd80a0c51 | [
"MIT"
] | null | null | null | xiaomirouter/client/ip.py | RiRomain/python-xiaomi-router | 36867d077349a70678db75cf261428cdd80a0c51 | [
"MIT"
] | null | null | null | xiaomirouter/client/ip.py | RiRomain/python-xiaomi-router | 36867d077349a70678db75cf261428cdd80a0c51 | [
"MIT"
] | null | null | null | """ Ip Info """
class Ip(object):
""" Ip Info """
def __init__(self, downspeed, online, upspeed, active, ip):
self._downspeed = downspeed
self._online = online
self._upspeed = upspeed
self._active = active
self._ip = ip
def get_downspeed(self):
return self... | 22.794118 | 76 | 0.624516 | 527 | 0.68 | 0 | 0 | 0 | 0 | 0 | 0 | 117 | 0.150968 |
000c601e3d23cebb7bc381bcb7e6d2611c317a74 | 1,608 | py | Python | medicine/users/views.py | walkeknow/medicine | b5f68ca0c820eb5d46852c3d72e926af59079745 | [
"MIT"
] | null | null | null | medicine/users/views.py | walkeknow/medicine | b5f68ca0c820eb5d46852c3d72e926af59079745 | [
"MIT"
] | null | null | null | medicine/users/views.py | walkeknow/medicine | b5f68ca0c820eb5d46852c3d72e926af59079745 | [
"MIT"
] | null | null | null | from django.shortcuts import render, redirect, HttpResponseRedirect
from django.contrib import messages
from django.contrib.auth import authenticate, login, logout
from django.contrib.auth.decorators import login_required
from django.contrib.auth.forms import UserCreationForm
from django.urls import reverse
def user_... | 34.212766 | 71 | 0.643657 | 0 | 0 | 0 | 0 | 113 | 0.070274 | 0 | 0 | 441 | 0.274254 |
000df0f38e45fa3a6986ef9af7fbf9e539d0a092 | 689 | py | Python | gbdxtools/images/quickbird.py | matthewhanson/gbdxtools | f07fed2ea2b8d62845f6cf83c3947d0c2a4c6daf | [
"MIT"
] | 81 | 2016-04-05T23:32:46.000Z | 2022-01-02T21:21:09.000Z | gbdxtools/images/quickbird.py | matthewhanson/gbdxtools | f07fed2ea2b8d62845f6cf83c3947d0c2a4c6daf | [
"MIT"
] | 624 | 2016-04-06T22:22:01.000Z | 2022-01-03T17:48:50.000Z | gbdxtools/images/quickbird.py | matthewhanson/gbdxtools | f07fed2ea2b8d62845f6cf83c3947d0c2a4c6daf | [
"MIT"
] | 66 | 2016-04-13T22:45:37.000Z | 2022-01-03T18:03:26.000Z | from gbdxtools.images.worldview import WorldViewImage
from gbdxtools.images.geoeye01 import GeoEyeDriver
from gbdxtools.images.util import vector_services_query
band_types = {
'MS': 'BGRN',
'Panchromatic': 'PAN',
'Pan': 'PAN',
'pan': 'PAN'
}
class QB02Driver(GeoEyeDriver):
pass
class QB02(WorldVi... | 25.518519 | 93 | 0.690856 | 426 | 0.618287 | 0 | 0 | 319 | 0.46299 | 0 | 0 | 139 | 0.201742 |
000efb3a697a68b72463aeb6cc6355689b2f13ed | 102 | py | Python | meld/plugins/move/main.py | dersal-dev/meld | bb746e8c5a2eec9f0aff5fbbfd698c6d43fa8e93 | [
"MIT"
] | null | null | null | meld/plugins/move/main.py | dersal-dev/meld | bb746e8c5a2eec9f0aff5fbbfd698c6d43fa8e93 | [
"MIT"
] | null | null | null | meld/plugins/move/main.py | dersal-dev/meld | bb746e8c5a2eec9f0aff5fbbfd698c6d43fa8e93 | [
"MIT"
] | null | null | null | from meld import logger
def main():
logger.info('Starting move operation')
logger.info('Finished') | 17 | 39 | 0.745098 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 35 | 0.343137 |
000f226aca878e3b01ee23b36d3e3744fe747d69 | 1,137 | py | Python | fastISM/models/bpnet.py | kundajelab/fastISM | 1573feccba1ad5d9f1cee508f5bb03c4aa09bb2b | [
"MIT"
] | 12 | 2020-09-20T17:03:48.000Z | 2022-03-16T06:51:52.000Z | fastISM/models/bpnet.py | kundajelab/fastISM | 1573feccba1ad5d9f1cee508f5bb03c4aa09bb2b | [
"MIT"
] | 5 | 2020-10-24T20:43:45.000Z | 2022-02-25T19:40:47.000Z | fastISM/models/bpnet.py | kundajelab/fastISM | 1573feccba1ad5d9f1cee508f5bb03c4aa09bb2b | [
"MIT"
] | 2 | 2020-10-14T05:18:55.000Z | 2022-02-21T07:34:14.000Z | import tensorflow as tf
def bpnet_model(seqlen=1000, numchars=4, num_dilated_convs=9, num_tasks=1,
name='bpnet_model'):
# original as per https://www.biorxiv.org/content/10.1101/737981v1.full.pdf
inp = tf.keras.layers.Input(shape=(seqlen, 4))
x = tf.keras.layers.Conv1D(
64, kernel_... | 34.454545 | 88 | 0.62533 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 164 | 0.144239 |
000fb685fc9f26f073890df0d180e999e12bb012 | 801 | py | Python | leetcode/108-Convert-Sorted-Array-To-Binary-Search-Tree/answer.py | vaishali-bariwal/Practice-Coding-Questions | 747bfcb1cb2be5340daa745f2b9938f0ee87c9ac | [
"Unlicense"
] | 25 | 2018-05-22T15:18:50.000Z | 2022-01-08T02:41:46.000Z | leetcode/108-Convert-Sorted-Array-To-Binary-Search-Tree/answer.py | vaishali-bariwal/Practice-Coding-Questions | 747bfcb1cb2be5340daa745f2b9938f0ee87c9ac | [
"Unlicense"
] | 1 | 2019-05-24T16:55:27.000Z | 2019-05-24T16:55:27.000Z | leetcode/108-Convert-Sorted-Array-To-Binary-Search-Tree/answer.py | vaishali-bariwal/Practice-Coding-Questions | 747bfcb1cb2be5340daa745f2b9938f0ee87c9ac | [
"Unlicense"
] | 18 | 2018-09-20T15:39:26.000Z | 2022-03-02T21:38:22.000Z | #!/usr/bin/env python3
#-------------------------------------------------------------------------------
# Definition for a binary tree node.
# class TreeNode:
# def __init__(self, x):
# self.val = x
# self.left = None
# self.right = None
class Solution:
def sortedArrayToBST(self, nums)... | 27.62069 | 80 | 0.400749 | 440 | 0.549313 | 0 | 0 | 0 | 0 | 0 | 0 | 417 | 0.520599 |
0011a0ed8ff671ab9d03956548a06f24d014ab20 | 600 | py | Python | src/collect/migrations/0006_alter_courseinfo_name.py | YanaPIIDXer/HorseRaceInfo | af5e8734d31da6e829371209366c0c58585ab373 | [
"MIT"
] | null | null | null | src/collect/migrations/0006_alter_courseinfo_name.py | YanaPIIDXer/HorseRaceInfo | af5e8734d31da6e829371209366c0c58585ab373 | [
"MIT"
] | null | null | null | src/collect/migrations/0006_alter_courseinfo_name.py | YanaPIIDXer/HorseRaceInfo | af5e8734d31da6e829371209366c0c58585ab373 | [
"MIT"
] | null | null | null | # Generated by Django 3.2.6 on 2021-08-14 19:48
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('collect', '0005_alter_courseinfo_name'),
]
operations = [
migrations.AlterField(
model_name='courseinfo',
name='name... | 31.578947 | 259 | 0.565 | 547 | 0.854688 | 0 | 0 | 0 | 0 | 0 | 0 | 268 | 0.41875 |
0011bad4390288b5a901919fe11d0ebf83273af9 | 596 | py | Python | tests/test_filter.py | rdemaria/xpart | 35fe06eeb508991dfe1dd23685331f8347d0b603 | [
"MIT"
] | 1 | 2021-09-07T14:34:10.000Z | 2021-09-07T14:34:10.000Z | tests/test_filter.py | rdemaria/xpart | 35fe06eeb508991dfe1dd23685331f8347d0b603 | [
"MIT"
] | null | null | null | tests/test_filter.py | rdemaria/xpart | 35fe06eeb508991dfe1dd23685331f8347d0b603 | [
"MIT"
] | 5 | 2021-11-04T08:23:43.000Z | 2022-03-16T10:34:23.000Z | import numpy as np
import xobjects as xo
import xpart as xp
def test_basics():
for context in xo.context.get_test_contexts():
print(f"Test {context.__class__}")
p1 = xp.Particles(x=[1,2,3], px=[10, 20, 30],
mass0=xp.ELECTRON_MASS_EV,
_context=co... | 25.913043 | 56 | 0.552013 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 38 | 0.063758 |
001513d4c6890aca681f0ade18ed556b34353f85 | 4,550 | py | Python | main.py | NimaVahdat/Image-Categorization | 4addce895b14c0c663e3ee317ffcd802b774452b | [
"MIT"
] | null | null | null | main.py | NimaVahdat/Image-Categorization | 4addce895b14c0c663e3ee317ffcd802b774452b | [
"MIT"
] | null | null | null | main.py | NimaVahdat/Image-Categorization | 4addce895b14c0c663e3ee317ffcd802b774452b | [
"MIT"
] | null | null | null | from utils.loader import Loader
from utils.model import DeepSNN
import torch
import os
def feature_extraction(prop):
name = prop["name"]
epochs_l1 = prop["epochs_l1"]
epochs_l2 = prop["epochs_l2"]
trainset, testset = Loader(name)
model = DeepSNN(prop)
# Training The First... | 28.980892 | 86 | 0.575824 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1,135 | 0.249451 |
0015c071b2b5e64af9f371ce3c6931d15a42c7e7 | 296 | py | Python | python-basic/set/set_comprehension.py | nkhn37/python-tech-sample-source | e8aea7ed3d810494682b3c2dde952ddd0f7acf84 | [
"MIT"
] | null | null | null | python-basic/set/set_comprehension.py | nkhn37/python-tech-sample-source | e8aea7ed3d810494682b3c2dde952ddd0f7acf84 | [
"MIT"
] | null | null | null | python-basic/set/set_comprehension.py | nkhn37/python-tech-sample-source | e8aea7ed3d810494682b3c2dde952ddd0f7acf84 | [
"MIT"
] | null | null | null | """集合基礎
集合内包表記の使い方
[説明ページ]
https://tech.nkhn37.net/python-set-comprehension/#i
[内包表記まとめページ]
https://tech.nkhn37.net/python-comprehension/
"""
data = [10, 15, 20, 25, 30, 35, 40, 45, 50, 10, 15, 20, 25, 30]
# 集合内包表記
data_set = {dt for dt in data if dt % 2 == 0}
print(f'data_set : {data_set}')
| 19.733333 | 63 | 0.655405 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 245 | 0.669399 |
001659507468ba211846a086bb3af6d259d15e23 | 409 | py | Python | 1704-determine-if-string-halves-are-alike/1704-determine-if-string-halves-are-alike.py | hyeseonko/LeetCode | 48dfc93f1638e13041d8ce1420517a886abbdc77 | [
"MIT"
] | 2 | 2021-12-05T14:29:06.000Z | 2022-01-01T05:46:13.000Z | 1704-determine-if-string-halves-are-alike/1704-determine-if-string-halves-are-alike.py | hyeseonko/LeetCode | 48dfc93f1638e13041d8ce1420517a886abbdc77 | [
"MIT"
] | null | null | null | 1704-determine-if-string-halves-are-alike/1704-determine-if-string-halves-are-alike.py | hyeseonko/LeetCode | 48dfc93f1638e13041d8ce1420517a886abbdc77 | [
"MIT"
] | null | null | null | class Solution:
def halvesAreAlike(self, s: str) -> bool:
vowel = {'a', 'e', 'i', 'o', 'u', 'A', 'E', 'I', 'O', 'U'}
first = s[:int(len(s)/2)]
second = s[int(len(s)/2):]
firstsum = sum([1 for f in first if f in vowel])
secondsum = sum([1 for s in second if s in vowel])
... | 37.181818 | 66 | 0.484108 | 409 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 30 | 0.07335 |
00198cc9e3c841bb01a56c333dd3c279b3334a56 | 9,789 | py | Python | honeycomb/worker_bee.py | agrc/honeycomb | a4227221759541b007c2d2a8dcfca5a40192eeff | [
"MIT"
] | 1 | 2018-06-07T13:17:40.000Z | 2018-06-07T13:17:40.000Z | honeycomb/worker_bee.py | agrc/honeycomb | a4227221759541b007c2d2a8dcfca5a40192eeff | [
"MIT"
] | 24 | 2017-08-28T19:53:15.000Z | 2022-03-28T21:36:37.000Z | honeycomb/worker_bee.py | agrc/honeycomb | a4227221759541b007c2d2a8dcfca5a40192eeff | [
"MIT"
] | null | null | null | #!/usr/bin/env python
# * coding: utf8 *
'''
worker_bee.py
A module that contains logic for building traditional image-based caches.
'''
import os
import socket
import time
from os.path import join, dirname, realpath
from shutil import rmtree
import pygsheets
from datetime import date
import arcpy
from . import con... | 42.934211 | 227 | 0.635611 | 8,759 | 0.89478 | 0 | 0 | 0 | 0 | 0 | 0 | 2,237 | 0.228522 |
001dcd97b7d4ca23335c414e226aaa113e8d7e20 | 4,418 | py | Python | src/smooth.py | DQSSSSS/FluidSimulation | 92ec2b45bc3ebaf39eeeec37f07fb7cc2988ce6d | [
"MIT"
] | null | null | null | src/smooth.py | DQSSSSS/FluidSimulation | 92ec2b45bc3ebaf39eeeec37f07fb7cc2988ce6d | [
"MIT"
] | 1 | 2021-11-12T03:16:59.000Z | 2021-11-12T04:47:50.000Z | src/smooth.py | DQSSSSS/FluidSimulation | 92ec2b45bc3ebaf39eeeec37f07fb7cc2988ce6d | [
"MIT"
] | null | null | null | import taichi as ti
PI = 3.1415926
# http://www.glowinggoo.com/sph/bin/kelager.06.pdf
@ti.data_oriented
class W_poly6:
@staticmethod
@ti.func
def W(r_vec, h):
r2 = r_vec.dot(r_vec)
r2 = ti.max(r2, 1e-10)
k = 0.0
if r2 <= h ** 2:
k = ((h ** 2) - r2) ** 3
... | 27.104294 | 125 | 0.4579 | 3,032 | 0.686283 | 0 | 0 | 4,235 | 0.958579 | 0 | 0 | 88 | 0.019919 |
0020df4e44bafa386b7d0a3f1bc4997c91a46d31 | 747 | py | Python | Ezan.py | Jandro46t/Python | 4f604215df085ad18dabfa52fe7863bad97863ab | [
"Apache-2.0"
] | 2 | 2021-04-16T11:58:39.000Z | 2021-04-16T11:58:39.000Z | Ezan.py | Jandro46t/Python | 4f604215df085ad18dabfa52fe7863bad97863ab | [
"Apache-2.0"
] | null | null | null | Ezan.py | Jandro46t/Python | 4f604215df085ad18dabfa52fe7863bad97863ab | [
"Apache-2.0"
] | null | null | null | import requests
import json
url_sehir = "https://ezanvakti.herokuapp.com/sehirler/2"
r = requests.get(url_sehir)
j = r.json()
sehir_adi = input("Şehir:")
ilce_adi = input("İlçe:")
for sehir in j:
if sehir_adi == sehir["SehirAdi"]:
ID = sehir["SehirID"]
print(ID)
url_ilce = "https://ezanva... | 29.88 | 69 | 0.634538 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 229 | 0.303714 |
00214dc954dea8b8ef76726b14c1872ccfd1e59a | 799 | py | Python | robotarm/armservice/app.py | AmidBidee/Robot-Arm | cfacfc779b2f025846e9748167bcfb15ce207923 | [
"MIT"
] | 1 | 2022-03-27T20:09:10.000Z | 2022-03-27T20:09:10.000Z | robotarm/armservice/app.py | AmidBidee/Robot-Arm | cfacfc779b2f025846e9748167bcfb15ce207923 | [
"MIT"
] | 4 | 2022-03-25T03:45:10.000Z | 2022-03-29T14:31:16.000Z | robotarm/armservice/app.py | AmidBidee/RobotArm | cfacfc779b2f025846e9748167bcfb15ce207923 | [
"MIT"
] | null | null | null | #!/usr/bin/python3
"""
RobotArm API service config file
"""
import pathlib
from robotarm.armservice.views import api_views
from flask import (
Flask,
make_response,
jsonify
)
from robotarm.armservice import getenv
# initialize flask app
app = Flask(__name__)
# register/mount blueprint
app.register_bluepri... | 17.755556 | 47 | 0.677096 | 0 | 0 | 0 | 0 | 252 | 0.315394 | 0 | 0 | 316 | 0.395494 |
0023e5b95c57b280f82e4d979d1eecb37cba4ae9 | 4,685 | py | Python | xbrr/edinet/reader/element_schema.py | 5laps2go/xbrr | 4c0824b53bfe971111d60e6c1ff4e36f4f4845a3 | [
"MIT"
] | null | null | null | xbrr/edinet/reader/element_schema.py | 5laps2go/xbrr | 4c0824b53bfe971111d60e6c1ff4e36f4f4845a3 | [
"MIT"
] | null | null | null | xbrr/edinet/reader/element_schema.py | 5laps2go/xbrr | 4c0824b53bfe971111d60e6c1ff4e36f4f4845a3 | [
"MIT"
] | null | null | null | from xbrr.base.reader.base_element_schema import BaseElementSchema
from bs4.element import NavigableString, Tag
import bs4
class ElementSchema(BaseElementSchema):
def __init__(self,
name="", reference="", label="", alias="",
abstract="", data_type="",
period_type... | 41.096491 | 229 | 0.56841 | 4,560 | 0.973319 | 0 | 0 | 3,151 | 0.672572 | 0 | 0 | 1,153 | 0.246105 |
0024cde788e4fc1c63bad501dddfdfc712994f43 | 817 | py | Python | app/models.py | james-muriithi/news-hub | 6f0fee2ab6be5bba86c4309050592e000859f8db | [
"Unlicense"
] | null | null | null | app/models.py | james-muriithi/news-hub | 6f0fee2ab6be5bba86c4309050592e000859f8db | [
"Unlicense"
] | null | null | null | app/models.py | james-muriithi/news-hub | 6f0fee2ab6be5bba86c4309050592e000859f8db | [
"Unlicense"
] | null | null | null | from datetime import datetime
class Sources:
"""
Sources class to define sources object
"""
def __init__(self, id, name, description, url, category, country):
self.id = id
self.name = name
self.description = description
self.url = url
self.category = category
... | 27.233333 | 103 | 0.623011 | 782 | 0.95716 | 0 | 0 | 0 | 0 | 0 | 0 | 141 | 0.172583 |
0024d2528361880227a045d4f7462059c46deebc | 661 | py | Python | post/migrations/0003_auto_20201018_1851.py | hieudmg/django_bloom | 1c244a2f753ed6babb710c83bfd7c3610fef9bb4 | [
"MIT"
] | null | null | null | post/migrations/0003_auto_20201018_1851.py | hieudmg/django_bloom | 1c244a2f753ed6babb710c83bfd7c3610fef9bb4 | [
"MIT"
] | null | null | null | post/migrations/0003_auto_20201018_1851.py | hieudmg/django_bloom | 1c244a2f753ed6babb710c83bfd7c3610fef9bb4 | [
"MIT"
] | null | null | null | # Generated by Django 3.1 on 2020-10-18 11:51
from django.conf import settings
from django.db import migrations
class Migration(migrations.Migration):
dependencies = [
migrations.swappable_dependency(settings.AUTH_USER_MODEL),
('post', '0002_auto_20200920_1217'),
]
operations = [
... | 23.607143 | 66 | 0.591528 | 545 | 0.824508 | 0 | 0 | 0 | 0 | 0 | 0 | 145 | 0.219365 |
002d0e1349cf357ca18a823230bd151a88d70277 | 70,946 | py | Python | stackchat/parse/html/transcript_day_test.py | jeremybanks/ChatExchange | e350de944d0f221a9b2afc545bf60ae309e402b6 | [
"Apache-2.0"
] | 3 | 2017-12-27T02:40:06.000Z | 2018-04-21T00:28:31.000Z | stackchat/parse/html/transcript_day_test.py | jeremybanks/ChatExchange | e350de944d0f221a9b2afc545bf60ae309e402b6 | [
"Apache-2.0"
] | 1 | 2017-12-11T22:45:13.000Z | 2020-09-04T17:49:41.000Z | stackchat/parse/html/transcript_day_test.py | jeremybanks/ChatExchange | e350de944d0f221a9b2afc545bf60ae309e402b6 | [
"Apache-2.0"
] | 1 | 2018-05-08T22:17:58.000Z | 2018-05-08T22:17:58.000Z | from .transcript_day import *
def test():
parsed = TranscriptDay(EXAMPLE_DATA)
print(parsed)
assert parsed.room_id == 11540
assert parsed.room_name == "Charcoal HQ"
assert parsed.first_day == datetime.date(2013, 11, 16)
assert parsed.previous_day == datetime.date(2017, 11, 16)
assert pa... | 43.956629 | 2,383 | 0.536746 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 70,274 | 0.990514 |
002d82da21503f07067ace5a4397c6b6011e7cc0 | 4,709 | py | Python | pybps/preprocess/trnsys.py | dtavan/PyBPS | 92bd063daed78a7fcff1af954d7d90d0cde8dcfc | [
"BSD-3-Clause"
] | 9 | 2015-03-12T15:23:42.000Z | 2021-12-21T13:01:42.000Z | pybps/preprocess/trnsys.py | dtavan/PyBPS | 92bd063daed78a7fcff1af954d7d90d0cde8dcfc | [
"BSD-3-Clause"
] | 3 | 2015-09-20T17:31:09.000Z | 2018-02-26T13:11:53.000Z | pybps/preprocess/trnsys.py | dtavan/PyBPS | 92bd063daed78a7fcff1af954d7d90d0cde8dcfc | [
"BSD-3-Clause"
] | 3 | 2019-02-14T08:13:03.000Z | 2020-12-10T07:04:41.000Z | """
A set of functions required to pre-process TRNSYS simulation input files
"""
# Common imports
import os
import sys
import shutil
import re
# Custom imports
from pybps import util
# Handle Python 2/3 compatibility
from six.moves import configparser
import six
if six.PY2:
ConfigParser = configparser.SafeConfigP... | 31.393333 | 86 | 0.601826 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 2,086 | 0.442982 |
002fac18e96ba58a8fc58e5945a2e85038de81e9 | 1,650 | py | Python | gof/console.py | jul/game_of_life | 0ffb798679f50dea27b55f8a630c437b6ee4d8f9 | [
"Python-2.0"
] | 1 | 2015-01-13T13:42:32.000Z | 2015-01-13T13:42:32.000Z | gof/console.py | jul/game_of_life | 0ffb798679f50dea27b55f8a630c437b6ee4d8f9 | [
"Python-2.0"
] | null | null | null | gof/console.py | jul/game_of_life | 0ffb798679f50dea27b55f8a630c437b6ee4d8f9 | [
"Python-2.0"
] | null | null | null | #!/usr/bin/env python
# -*- coding: utf-8 -*-
"""Game of Life console.
small play ground for leanning python, or just having fun.
To use the console with an empty grid:
python -i -mgof.console
or
bpython -i -mgof.console
To use the console with a pseudo animation:
python -i -mgof.demo
Avalailble varia... | 28.448276 | 79 | 0.693939 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1,290 | 0.781818 |