hexsha stringlengths 40 40 | size int64 6 1.04M | ext stringclasses 10
values | lang stringclasses 1
value | max_stars_repo_path stringlengths 4 247 | 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 368k ⌀ | max_stars_repo_stars_event_min_datetime stringlengths 24 24 ⌀ | max_stars_repo_stars_event_max_datetime stringlengths 24 24 ⌀ | max_issues_repo_path stringlengths 4 247 | 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 4 247 | 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.04M | avg_line_length float64 1.53 618k | max_line_length int64 1 1.02M | alphanum_fraction float64 0 1 | original_content stringlengths 6 1.04M | filtered:remove_non_ascii int64 0 538k | filtered:remove_decorators int64 0 917k | filtered:remove_async int64 0 722k | filtered:remove_classes int64 -45 1M | filtered:remove_generators int64 0 814k | filtered:remove_function_no_docstring int64 -102 850k | filtered:remove_class_no_docstring int64 -3 5.46k | filtered:remove_unused_imports int64 -1,350 52.4k | filtered:remove_delete_markers int64 0 59.6k |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
224dcff4a8776b85bffa29a4f113607da705754e | 1,261 | py | Python | setup.py | Krytic/Takahe | 6d6bdf234ae7e3cfe8ef40e48d4621dc9a9a2f6c | [
"MIT"
] | 1 | 2020-12-09T02:34:43.000Z | 2020-12-09T02:34:43.000Z | setup.py | Krytic/Takahe | 6d6bdf234ae7e3cfe8ef40e48d4621dc9a9a2f6c | [
"MIT"
] | 8 | 2020-03-02T06:22:43.000Z | 2020-11-10T03:20:46.000Z | setup.py | Krytic/Takahe | 6d6bdf234ae7e3cfe8ef40e48d4621dc9a9a2f6c | [
"MIT"
] | 1 | 2020-05-13T00:41:24.000Z | 2020-05-13T00:41:24.000Z | from setuptools import setup
import re
description = 'A python library to evolve binary star systems in time.'
try:
with open('README.md', 'r') as f:
long_description = f.read()
except FileNotFoundError:
long_description = description
metadata = {"version": "",
"author": "",
"... | 28.659091 | 71 | 0.508327 | from setuptools import setup, Extension
import re
description = 'A python library to evolve binary star systems in time.'
try:
with open('README.md', 'r') as f:
long_description = f.read()
except FileNotFoundError:
long_description = description
metadata = {"version": "",
"author": "",
... | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 11 | 0 |
5648e164a76184040f4b708a31904d787634afb6 | 4,260 | py | Python | Tensorflow.py | shashikale/Text-Classification | 46f4d15f4413819493c531401d396a4e9f8e9548 | [
"MIT"
] | 1 | 2019-05-11T02:13:27.000Z | 2019-05-11T02:13:27.000Z | Tensorflow.py | caopengau/Text-Classification | 46f4d15f4413819493c531401d396a4e9f8e9548 | [
"MIT"
] | null | null | null | Tensorflow.py | caopengau/Text-Classification | 46f4d15f4413819493c531401d396a4e9f8e9548 | [
"MIT"
] | null | null | null | from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
from sklearn.feature_extraction.text import TfidfVectorizer
from Tokenize import tokenize
import tensorflow as tf
tf.logging.set_verbosity(tf.logging.INFO)
vectorizer = TfidfVectorizer(tokenizer=tokenize, stop... | 29.583333 | 111 | 0.734977 | from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
from sklearn.preprocessing import Normalizer
from SharedFunctions import get_current_time, fmt, find_accuracy
from datetime import datetime
from sklearn.feature_extraction.text import TfidfVectorizer, CountVecto... | 0 | 0 | 0 | 0 | 0 | 3,559 | 0 | 117 | 201 |
0d236aa130451e041629624d62f19736b1ddf4e2 | 178 | py | Python | cctbx/covariance/__init__.py | dperl-sol/cctbx_project | b9e390221a2bc4fd00b9122e97c3b79c632c6664 | [
"BSD-3-Clause-LBNL"
] | 155 | 2016-11-23T12:52:16.000Z | 2022-03-31T15:35:44.000Z | cctbx/covariance/__init__.py | dperl-sol/cctbx_project | b9e390221a2bc4fd00b9122e97c3b79c632c6664 | [
"BSD-3-Clause-LBNL"
] | 590 | 2016-12-10T11:31:18.000Z | 2022-03-30T23:10:09.000Z | cctbx/covariance/__init__.py | dperl-sol/cctbx_project | b9e390221a2bc4fd00b9122e97c3b79c632c6664 | [
"BSD-3-Clause-LBNL"
] | 115 | 2016-11-15T08:17:28.000Z | 2022-02-09T15:30:14.000Z | from __future__ import absolute_import, division, print_function
import boost_adaptbx.boost.python as bp
bp.import_ext("cctbx_covariance_ext")
| 35.6 | 64 | 0.859551 | from __future__ import absolute_import, division, print_function
import boost_adaptbx.boost.python as bp
bp.import_ext("cctbx_covariance_ext")
from cctbx_covariance_ext import *
| 0 | 0 | 0 | 0 | 0 | 0 | 0 | 13 | 22 |
c300e48ec0d74a28b9e7480e71496ab43a47b5d9 | 1,805 | py | Python | araElectra/tf/electra/finetune/scorer.py | HydroxideX/SOQAL | 345ae5858f23f06c693148c2e2df8202d09cff6d | [
"MIT"
] | null | null | null | araElectra/tf/electra/finetune/scorer.py | HydroxideX/SOQAL | 345ae5858f23f06c693148c2e2df8202d09cff6d | [
"MIT"
] | null | null | null | araElectra/tf/electra/finetune/scorer.py | HydroxideX/SOQAL | 345ae5858f23f06c693148c2e2df8202d09cff6d | [
"MIT"
] | null | null | null | # coding=utf-8
# Copyright 2020 The Google Research Authors.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicab... | 29.590164 | 82 | 0.676454 | # coding=utf-8
# Copyright 2020 The Google Research Authors.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicab... | 0 | 137 | 0 | 873 | 0 | 0 | 0 | -11 | 46 |
dbab89ec2ea219918ed5a064cc7f7163e34ab3b8 | 284 | py | Python | src/pico_code/host/etch.py | romilly/pico-code | 57bbc14e0a5c3e874162fcfb1fcd7cca3a838cce | [
"MIT"
] | 15 | 2021-02-04T02:38:23.000Z | 2022-01-20T17:55:15.000Z | src/pico_code/host/etch.py | romilly/pico-code | 57bbc14e0a5c3e874162fcfb1fcd7cca3a838cce | [
"MIT"
] | 1 | 2021-05-06T10:09:51.000Z | 2021-05-06T10:09:51.000Z | src/pico_code/host/etch.py | romilly/pico-code | 57bbc14e0a5c3e874162fcfb1fcd7cca3a838cce | [
"MIT"
] | 2 | 2021-02-04T20:09:01.000Z | 2021-02-18T16:16:22.000Z | from pico_code.host.talker import Talker
import turtle
talker = Talker()
turtle = turtle.Turtle()
while True:
text = talker.receive()
x,y = [convert(text) for text in text.split()]
turtle.setx(x)
turtle.sety(y)
| 16.705882 | 51 | 0.665493 | from pico_code.host.talker import Talker
import turtle
talker = Talker()
turtle = turtle.Turtle()
def convert(text):
return (int(text)-200)//300
while True:
text = talker.receive()
x,y = [convert(text) for text in text.split()]
turtle.setx(x)
turtle.sety(y)
| 0 | 0 | 0 | 0 | 0 | 29 | 0 | 0 | 23 |
c21caccae34110fa96773fda97871f35b4e9bc09 | 1,661 | py | Python | django_airavata/apps/auth/migrations/0003_default_email_templates.py | sairohithA007/airavata-django-portal | fe18d65802f02c9faf805c8edfdee3341c66e93a | [
"Apache-2.0"
] | 19 | 2017-09-04T00:36:52.000Z | 2022-01-24T08:44:22.000Z | django_airavata/apps/auth/migrations/0003_default_email_templates.py | sairohithA007/airavata-django-portal | fe18d65802f02c9faf805c8edfdee3341c66e93a | [
"Apache-2.0"
] | 35 | 2017-10-17T02:36:01.000Z | 2022-03-09T04:46:57.000Z | django_airavata/apps/auth/migrations/0003_default_email_templates.py | sairohithA007/airavata-django-portal | fe18d65802f02c9faf805c8edfdee3341c66e93a | [
"Apache-2.0"
] | 38 | 2017-09-15T14:17:42.000Z | 2021-12-15T17:11:31.000Z | # -*- coding: utf-8 -*-
# Generated by Django 1.11.16 on 2018-10-29 18:33
from __future__ import unicode_literals
| 28.637931 | 75 | 0.622517 | # -*- coding: utf-8 -*-
# Generated by Django 1.11.16 on 2018-10-29 18:33
from __future__ import unicode_literals
from django.db import migrations
from django_airavata.apps.auth.models import (
NEW_USER_EMAIL_TEMPLATE,
VERIFY_EMAIL_TEMPLATE
)
def default_templates(apps, schema_editor):
EmailTemplate = ... | 0 | 0 | 0 | 175 | 0 | 1,185 | 0 | 93 | 92 |
f78825aedd027ea16fb66c8aee8dfe1b35c06ec7 | 314 | py | Python | sleekpromises/__init__.py | MeerkatLabs/sleekpromises | f31d2bf4ae57fa30d77e6aa0c91b146131d599e6 | [
"BSD-3-Clause"
] | null | null | null | sleekpromises/__init__.py | MeerkatLabs/sleekpromises | f31d2bf4ae57fa30d77e6aa0c91b146131d599e6 | [
"BSD-3-Clause"
] | 1 | 2020-04-10T22:02:55.000Z | 2020-04-10T22:02:55.000Z | sleekpromises/__init__.py | MeerkatLabs/sleekpromises | f31d2bf4ae57fa30d77e6aa0c91b146131d599e6 | [
"BSD-3-Clause"
] | null | null | null | from sleekxmpp.plugins.base import register_plugin as _register_plugin
from sleekpromises.scheduler import sleekpromises_scheduler as _scheduler
def register_sleek_promises():
"""
Register the sleek promises components for the sleek xmpp framework.
:return:
"""
_register_plugin(_scheduler)
| 26.166667 | 73 | 0.783439 | from sleekxmpp.plugins.base import register_plugin as _register_plugin
from sleekpromises.scheduler import sleekpromises_scheduler as _scheduler
def register_sleek_promises():
"""
Register the sleek promises components for the sleek xmpp framework.
:return:
"""
_register_plugin(_scheduler)
| 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
58136a3b68669ac63c8de2d87042f1e8150c06ea | 1,255 | py | Python | src/loadgenerator/sock shop locustfile.py | Ndjanda/microservices-demo-1 | 4eb84407dc2cc95b464a7d0f26fb7a6e960dbd70 | [
"Apache-2.0"
] | null | null | null | src/loadgenerator/sock shop locustfile.py | Ndjanda/microservices-demo-1 | 4eb84407dc2cc95b464a7d0f26fb7a6e960dbd70 | [
"Apache-2.0"
] | null | null | null | src/loadgenerator/sock shop locustfile.py | Ndjanda/microservices-demo-1 | 4eb84407dc2cc95b464a7d0f26fb7a6e960dbd70 | [
"Apache-2.0"
] | null | null | null | # git clone https://github.com/GoogleCloudPlatform/microservices-demo.git
# cd microservices-demo/src/loadgenerator
# export FRONTEND_ADDR=localhost
# rename : sock shop locustfile.py to locustfile.py
# ./loadgen.sh
# sock shop locustfile.py file
# loadgen.sh is using test steps in : locustfile.py for ... | 26.702128 | 80 | 0.658167 | # git clone https://github.com/GoogleCloudPlatform/microservices-demo.git
# cd microservices-demo/src/loadgenerator
# export FRONTEND_ADDR=localhost
# rename : sock shop locustfile.py to locustfile.py
# ./loadgen.sh
# sock shop locustfile.py file
# loadgen.sh is using test steps in : locustfile.py for ... | 0 | 0 | 0 | 148 | 0 | 587 | 0 | 29 | 150 |
247c96b2ca0d112c2a551abd8f41b7e1ebea1065 | 657 | py | Python | src/ansibilo/inventory/utils.py | Polyconseil/ansibilo | 444397ca8b8dfa64cf34eb0fe0b472fa89d2f7ac | [
"BSD-3-Clause"
] | 3 | 2017-10-28T00:04:17.000Z | 2018-01-27T16:12:42.000Z | src/ansibilo/inventory/utils.py | Polyconseil/ansibilo | 444397ca8b8dfa64cf34eb0fe0b472fa89d2f7ac | [
"BSD-3-Clause"
] | null | null | null | src/ansibilo/inventory/utils.py | Polyconseil/ansibilo | 444397ca8b8dfa64cf34eb0fe0b472fa89d2f7ac | [
"BSD-3-Clause"
] | null | null | null | import ansible.inventory.manager
import ansible.constants
| 27.375 | 69 | 0.701674 | import ansible.inventory.manager
import ansible.constants
import ansible.parsing.dataloader
def get_ansible_inventory(inventory_file=None):
data_loader = ansible.parsing.dataloader.DataLoader()
return ansible.inventory.manager.InventoryManager(
loader=data_loader,
sources=inventory_file or ans... | 0 | 0 | 0 | 0 | 0 | 517 | 0 | 12 | 68 |
5d6cfa581331301ac6ea0ce8cf044ec1f7e587c4 | 1,069 | py | Python | full/digit_downloader.py | PythonDayMX/MLaaS | 3a109f1e83edabb4044c47e1cfa2a39c6227685c | [
"MIT"
] | 8 | 2018-11-30T05:05:10.000Z | 2021-04-05T07:02:53.000Z | full/digit_downloader.py | PythonDayMX/MLaaS | 3a109f1e83edabb4044c47e1cfa2a39c6227685c | [
"MIT"
] | null | null | null | full/digit_downloader.py | PythonDayMX/MLaaS | 3a109f1e83edabb4044c47e1cfa2a39c6227685c | [
"MIT"
] | 2 | 2018-11-30T17:09:05.000Z | 2018-11-30T19:20:05.000Z | # ===============================================================
# Author: Rodolfo Ferro
# Email: ferro@cimat.mx
# Twitter: @FerroRodolfo
#
# ABOUT COPYING OR USING PARTIAL INFORMATION:
# This script was originally created by Rodolfo Ferro, for
# his workshop in PythonDay Mexico 2018 at CUCEA in Gdl, Mx.
# Any explici... | 26.725 | 66 | 0.610851 | # ===============================================================
# Author: Rodolfo Ferro
# Email: ferro@cimat.mx
# Twitter: @FerroRodolfo
#
# ABOUT COPYING OR USING PARTIAL INFORMATION:
# This script was originally created by Rodolfo Ferro, for
# his workshop in PythonDay Mexico 2018 at CUCEA in Gdl, Mx.
# Any explici... | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
4bdbc50050e1e73ba3391848aba9be8a3f02e1b2 | 12,527 | py | Python | scripts/constitutive_cassette_exons/constitutive_cassette_exon_gtf_filter.py | mikecormier/ConSplice-manuscript | 72c994e7b842c8dec79372617bae5482e6c9f9ec | [
"MIT"
] | 1 | 2022-02-28T18:09:47.000Z | 2022-02-28T18:09:47.000Z | scripts/constitutive_cassette_exons/constitutive_cassette_exon_gtf_filter.py | mikecormier/ConSplice-manuscript | 72c994e7b842c8dec79372617bae5482e6c9f9ec | [
"MIT"
] | null | null | null | scripts/constitutive_cassette_exons/constitutive_cassette_exon_gtf_filter.py | mikecormier/ConSplice-manuscript | 72c994e7b842c8dec79372617bae5482e6c9f9ec | [
"MIT"
] | null | null | null | from __future__ import print_function
import gzip
import io
import sys
from collections import defaultdict
from interlap import InterLap
# ------------------------------------------------------------------------------------------------------------------------------------------------------
## Argument Parser
# --------... | 34.040761 | 426 | 0.53684 | from __future__ import print_function
import argparse
import gzip
import io
import os
import sys
from collections import defaultdict
from consplice.constraint.utils import get_alternative_gene_symbols
from interlap import InterLap
# ------------------------------------------------------------------------------------... | 0 | 0 | 0 | 0 | 0 | 6,727 | 0 | 28 | 114 |
50431a291b3fa20ba4ea9660c7b85ff5b28d9dc2 | 109 | py | Python | S1/TP6/ex7.py | HerbeMalveillante/ecole | bebbc73cd678c58c9cd40389ea1cf229a0200308 | [
"MIT"
] | null | null | null | S1/TP6/ex7.py | HerbeMalveillante/ecole | bebbc73cd678c58c9cd40389ea1cf229a0200308 | [
"MIT"
] | null | null | null | S1/TP6/ex7.py | HerbeMalveillante/ecole | bebbc73cd678c58c9cd40389ea1cf229a0200308 | [
"MIT"
] | null | null | null |
print(interversion("Marc Barthet"))
| 18.166667 | 49 | 0.66055 | def interversion(s):
return " ".join(list(reversed(s.split(" "))))
print(interversion("Marc Barthet"))
| 0 | 0 | 0 | 0 | 0 | 49 | 0 | 0 | 22 |
60e525affc9aed8e00d0ff7c441bc75b29990131 | 1,781 | py | Python | setup.py | Id791/wagtail-2fa | 9ca77c660b783267958c78f4a0d222bd5d5aa360 | [
"MIT"
] | null | null | null | setup.py | Id791/wagtail-2fa | 9ca77c660b783267958c78f4a0d222bd5d5aa360 | [
"MIT"
] | null | null | null | setup.py | Id791/wagtail-2fa | 9ca77c660b783267958c78f4a0d222bd5d5aa360 | [
"MIT"
] | null | null | null | import re
from setuptools import find_packages, setup
install_requires = [
'Django>=1.11.28',
'Wagtail>=2.2',
'django-otp>=0.8.1',
'six>=1.14.0',
'qrcode>=6.1',
]
docs_require = [
'sphinx>=1.4.1',
'sphinx_rtd_theme>=0.4.3',
]
tests_require = [
'coverage==5.0.3',
'pytest==5.3.5',
... | 25.084507 | 79 | 0.581696 | import re
from setuptools import find_packages, setup
install_requires = [
'Django>=1.11.28',
'Wagtail>=2.2',
'django-otp>=0.8.1',
'six>=1.14.0',
'qrcode>=6.1',
]
docs_require = [
'sphinx>=1.4.1',
'sphinx_rtd_theme>=0.4.3',
]
tests_require = [
'coverage==5.0.3',
'pytest==5.3.5',
... | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
1f1c3e83bf952886047f8d35242e92f2f114e2f7 | 1,247 | py | Python | test_tool/update_count_show.py | YaoYinYing/HZAU_DDNS | 9fbf131b6b8e62184a855aa9635b81c08657e869 | [
"MIT"
] | null | null | null | test_tool/update_count_show.py | YaoYinYing/HZAU_DDNS | 9fbf131b6b8e62184a855aa9635b81c08657e869 | [
"MIT"
] | null | null | null | test_tool/update_count_show.py | YaoYinYing/HZAU_DDNS | 9fbf131b6b8e62184a855aa9635b81c08657e869 | [
"MIT"
] | null | null | null | #!python
hide_column = 1
print("content-type:text/html")
print("")
print("<meta http-equiv = 'refresh' content = 30 />")
ddns_count_show()
| 29 | 120 | 0.561347 | #!python
import sqlite3
import time,datetime
import traceback
import cgi
hide_column = 1
def ddns_count_show():
conn = sqlite3.connect("sqlite file")
c = conn.cursor()
sql = '''SELECT * FROM DDNS_UPDATE_COUNT;'''
print("<html><table border='2' cellspacing='0'> ")
print("<thead><tr>")
for x in... | 0 | 0 | 0 | 0 | 0 | 1,020 | 0 | -24 | 111 |
0dc64f8ae704ec237d0246c8e0752c0b10a0bb95 | 1,969 | py | Python | tensorflow/python/kernel_tests/array_ops_test.py | deepakmuralidharan/tensorflow | f40e41f9c71ef2865f96f3db3cea2909797fe2a3 | [
"Apache-2.0"
] | 23 | 2016-02-04T21:08:43.000Z | 2022-01-14T13:22:33.000Z | tensorflow/python/kernel_tests/array_ops_test.py | deepakmuralidharan/tensorflow | f40e41f9c71ef2865f96f3db3cea2909797fe2a3 | [
"Apache-2.0"
] | 2 | 2016-05-31T16:38:55.000Z | 2018-12-30T20:17:05.000Z | tensorflow/python/kernel_tests/array_ops_test.py | deepakmuralidharan/tensorflow | f40e41f9c71ef2865f96f3db3cea2909797fe2a3 | [
"Apache-2.0"
] | 20 | 2016-02-15T17:31:02.000Z | 2020-01-12T08:18:48.000Z | # Copyright 2015 Google Inc. 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 applicable law or a... | 30.292308 | 80 | 0.70645 | # Copyright 2015 Google Inc. 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 applicable law or a... | 0 | 0 | 0 | 845 | 0 | 0 | 0 | 49 | 160 |
8926fe6e7a12d8d148d34c4f86ab4d7e29194c4b | 6,692 | py | Python | tools/harness/tests/devif_test.py | summergirl21/Barrelfish | b224df87e9da52e9bf33e21eddf43a6a6e2f0efc | [
"MIT"
] | 1 | 2018-06-01T20:26:24.000Z | 2018-06-01T20:26:24.000Z | tools/harness/tests/devif_test.py | summergirl21/Barrelfish | b224df87e9da52e9bf33e21eddf43a6a6e2f0efc | [
"MIT"
] | null | null | null | tools/harness/tests/devif_test.py | summergirl21/Barrelfish | b224df87e9da52e9bf33e21eddf43a6a6e2f0efc | [
"MIT"
] | null | null | null | ##########################################################################
# Copyright (c) 2017, ETH Zurich.
# All rights reserved.
#
# This file is distributed under the terms in the attached LICENSE file.
# If you do not find this file, copies can be found by writing to:
# ETH Zurich D-INFK, Haldeneggsteig 4, CH-8092... | 30.280543 | 108 | 0.608338 | ##########################################################################
# Copyright (c) 2017, ETH Zurich.
# All rights reserved.
#
# This file is distributed under the terms in the attached LICENSE file.
# If you do not find this file, copies can be found by writing to:
# ETH Zurich D-INFK, Haldeneggsteig 4, CH-8092... | 0 | 2,860 | 0 | 2,406 | 0 | 0 | 0 | 32 | 338 |
62797df22dd100b812713477ca51cd2c107a8c73 | 2,018 | py | Python | src/models/blog.py | YukinoKoh/multiuser_blog_template | 8d42f0ea7a905d0ae1602e12c569d15e48aaa062 | [
"MIT"
] | 1 | 2019-04-18T23:36:14.000Z | 2019-04-18T23:36:14.000Z | src/models/blog.py | YukinoKoh/multiuser_blog_template | 8d42f0ea7a905d0ae1602e12c569d15e48aaa062 | [
"MIT"
] | null | null | null | src/models/blog.py | YukinoKoh/multiuser_blog_template | 8d42f0ea7a905d0ae1602e12c569d15e48aaa062 | [
"MIT"
] | null | null | null |
# Blog db
# check if blog exist, if so return blog
| 25.225 | 61 | 0.584737 | from google.appengine.ext import db
from models import User
# Blog db
def blog_key(name='default'):
return None
# return db.Key.from_path('posts', name)
# check if blog exist, if so return blog
def post_exists(blog_id):
return Blog.get_by_id(int(blog_id))
class Blog(db.Model):
user = db.ReferenceP... | 0 | 88 | 0 | 1,633 | 0 | 113 | 0 | 16 | 111 |
fa5f2aa7c77e9c856bf036a05613f1586141afb2 | 3,384 | py | Python | textanalyzerpy/urls.py | abindent/textanalyzer.py | 0d9c58adb491798d440d9fff33d2f1069d155014 | [
"BSD-3-Clause-Attribution"
] | 3 | 2022-02-13T08:15:39.000Z | 2022-02-13T08:33:04.000Z | textanalyzerpy/urls.py | abindent/textanalyzer.py | 0d9c58adb491798d440d9fff33d2f1069d155014 | [
"BSD-3-Clause-Attribution"
] | null | null | null | textanalyzerpy/urls.py | abindent/textanalyzer.py | 0d9c58adb491798d440d9fff33d2f1069d155014 | [
"BSD-3-Clause-Attribution"
] | null | null | null | """textanalyzerpy URL Configuration
The `urlpatterns` list routes URLs to views. For more information please see:
https://docs.djangoproject.com/en/3.2/topics/http/urls/
Examples:
Function views
1. Add an import: from my_app import views
2. Add a URL to urlpatterns: path('', views.home, name='home')
Clas... | 35.25 | 156 | 0.717494 | """textanalyzerpy URL Configuration
The `urlpatterns` list routes URLs to views. For more information please see:
https://docs.djangoproject.com/en/3.2/topics/http/urls/
Examples:
Function views
1. Add an import: from my_app import views
2. Add a URL to urlpatterns: path('', views.home, name='home')
Clas... | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 13 | 44 |
51dbf5e327a0d8ffecdd82ac094f31464e5e42cd | 2,485 | py | Python | Interactive-Python/project-2-guess-the-number.py | ugaliguy/Python-at-Rice | b145a4475bdd3e9250f88a01dff894945d9b3e4b | [
"MIT"
] | null | null | null | Interactive-Python/project-2-guess-the-number.py | ugaliguy/Python-at-Rice | b145a4475bdd3e9250f88a01dff894945d9b3e4b | [
"MIT"
] | null | null | null | Interactive-Python/project-2-guess-the-number.py | ugaliguy/Python-at-Rice | b145a4475bdd3e9250f88a01dff894945d9b3e4b | [
"MIT"
] | 2 | 2020-11-09T16:06:28.000Z | 2020-12-07T07:42:47.000Z | # template for "Guess the number" mini-project
# input will come from buttons and an input field
# all output for the game will be printed in the console
import simplegui
number_range = 100
player_guess = 0
secret_number = 0
number_of_guesses = 7
counter = 7
# helper function to start and restart the game
... | 30.679012 | 77 | 0.665594 | # template for "Guess the number" mini-project
# input will come from buttons and an input field
# all output for the game will be printed in the console
import simplegui
import random
import math
number_range = 100
player_guess = 0
secret_number = 0
number_of_guesses = 7
counter = 7
# helper function to... | 0 | 0 | 0 | 0 | 0 | 1,579 | 0 | -18 | 146 |
919aea3ba60810cf24f794032d2c52fd30917322 | 22,840 | py | Python | ostap/io/rootshelve.py | TatianaOvsiannikova/ostap | a005a78b4e2860ac8f4b618e94b4b563b2eddcf1 | [
"BSD-3-Clause"
] | null | null | null | ostap/io/rootshelve.py | TatianaOvsiannikova/ostap | a005a78b4e2860ac8f4b618e94b4b563b2eddcf1 | [
"BSD-3-Clause"
] | null | null | null | ostap/io/rootshelve.py | TatianaOvsiannikova/ostap | a005a78b4e2860ac8f4b618e94b4b563b2eddcf1 | [
"BSD-3-Clause"
] | null | null | null | #!/usr/bin/env python
# -*- coding: utf-8 -*-
# =============================================================================
# @file rootshelve.py
#
# This is shelve-like database with ROOT.TFile as internal storage
#
# @see zipshelve
# @see sqliteshelve
#
#
# Create new DB:
#
# @code
#
# >>> import rootshelve as DB... | 36.602564 | 136 | 0.462653 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
# =============================================================================
# @file rootshelve.py
#
# This is shelve-like database with ROOT.TFile as internal storage
#
# @see zipshelve
# @see sqliteshelve
#
#
# Create new DB:
#
# @code
#
# >>> import rootshelve as DB... | 0 | 332 | 0 | 13,051 | 51 | 280 | 0 | 91 | 247 |
0ff674b078af01d36e2acd0636fba0a3a5ce2be7 | 75 | py | Python | conftest.py | kevinyamauchi/model-runner | 77261bcd293de87533776291f44a09bf28a3c845 | [
"BSD-3-Clause"
] | null | null | null | conftest.py | kevinyamauchi/model-runner | 77261bcd293de87533776291f44a09bf28a3c845 | [
"BSD-3-Clause"
] | 5 | 2021-09-27T14:43:39.000Z | 2022-02-23T14:18:00.000Z | conftest.py | kevinyamauchi/model-runner | 77261bcd293de87533776291f44a09bf28a3c845 | [
"BSD-3-Clause"
] | null | null | null | pytest_plugins = ["model_runner.validator._tests.validator_test_fixtures"]
| 37.5 | 74 | 0.853333 | pytest_plugins = ["model_runner.validator._tests.validator_test_fixtures"]
| 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
90793aabb0491b9c123b0908c90a6985ab695e9a | 1,271 | py | Python | big-data-analytics/cache-camelot-final/gen_gif.py | robertwenquan/nyu-course-assignment | c03a4fb157d385b650c38feb861f283f2e1928fd | [
"Apache-2.0"
] | 1 | 2018-01-22T21:35:42.000Z | 2018-01-22T21:35:42.000Z | big-data-analytics/cache-camelot-final/gen_gif.py | robertwenquan/nyu-course-assignment | c03a4fb157d385b650c38feb861f283f2e1928fd | [
"Apache-2.0"
] | null | null | null | big-data-analytics/cache-camelot-final/gen_gif.py | robertwenquan/nyu-course-assignment | c03a4fb157d385b650c38feb861f283f2e1928fd | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/python
"""
INPUT: A file named specified from the command line
The file is a single line JSON format like this:
["424344455354X738492939495", "424344535463X738492939495"]
each element represents a game canvass map
INTERMEDIATE OUTPUT: a series of png files numbered from 0
... | 27.042553 | 87 | 0.656963 | #!/usr/bin/python
"""
INPUT: A file named specified from the command line
The file is a single line JSON format like this:
["424344455354X738492939495", "424344535463X738492939495"]
each element represents a game canvass map
INTERMEDIATE OUTPUT: a series of png files numbered from 0
... | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
f57465d9f041be181241cf38ddff4ee4c439fed6 | 1,312 | py | Python | runflight.py | feynfan13/transtory | 4dd48033fdcd95b4a0dbc19f5b26d15b4b533979 | [
"MIT"
] | 1 | 2018-12-20T08:05:11.000Z | 2018-12-20T08:05:11.000Z | runflight.py | feynfan13/transtory | 4dd48033fdcd95b4a0dbc19f5b26d15b4b533979 | [
"MIT"
] | null | null | null | runflight.py | feynfan13/transtory | 4dd48033fdcd95b4a0dbc19f5b26d15b4b533979 | [
"MIT"
] | null | null | null | import sys
import argparse
from transtory.flight import logger, switch_to_test_mode
from transtory.flight import get_public_data_app
from transtory.flight import FlightRecorder
parser = argparse.ArgumentParser(description="Flight database command.")
parser.add_argument("--testmode", action="store_const", const=True... | 30.511628 | 84 | 0.757622 | import sys
import argparse
from transtory.flight import logger, switch_to_test_mode
from transtory.flight import get_public_data_app
from transtory.flight import FlightRecorder, FlightTripStats, FlightPlaneStats
def save_all_stats():
stator = FlightTripStats()
stator.save_all_stats()
stator = FlightPlane... | 0 | 0 | 0 | 0 | 0 | 119 | 0 | 35 | 23 |
a3fcae735fe5684eb09fac3ada0fd2ebf49ca307 | 23,191 | py | Python | tests/selenium/pmtests/postman_tests_requests.py | cdaapi/POSTMan-Chrome-Extension | ec2dc635f588fd5145853c8b6f4fc881b4c12632 | [
"Apache-2.0"
] | 113 | 2015-07-10T10:00:42.000Z | 2022-01-28T05:21:30.000Z | tests/selenium/pmtests/postman_tests_requests.py | ingenioustechie/postman | 9207f4fa108e6afec50021806dc45597b2e340a8 | [
"Apache-2.0"
] | 11 | 2015-07-21T17:16:50.000Z | 2020-01-14T19:51:31.000Z | tests/selenium/pmtests/postman_tests_requests.py | ingenioustechie/postman | 9207f4fa108e6afec50021806dc45597b2e340a8 | [
"Apache-2.0"
] | 63 | 2015-06-23T03:58:58.000Z | 2022-01-07T06:38:07.000Z | import selenium.webdriver.chrome.service as service
PostmanTestsRequests().run()
| 39.915663 | 158 | 0.677073 | from selenium import webdriver
from selenium.webdriver.support.ui import WebDriverWait
from selenium.webdriver.support.select import Select
from selenium.webdriver.common.action_chains import ActionChains
from selenium.webdriver.common.keys import Keys
import selenium.webdriver.chrome.service as service
import tracebac... | 0 | 0 | 0 | 22,745 | 0 | 0 | 0 | 138 | 226 |
3f613b605a7e255057f88d1c855f93bd6a7561fe | 3,315 | py | Python | test/onnx_converter_test/train_scripts/gmf.py | rhdong/HugeCTR | b596bcc44e14bb0c62c4f7e9c0b55301d94f2154 | [
"Apache-2.0"
] | null | null | null | test/onnx_converter_test/train_scripts/gmf.py | rhdong/HugeCTR | b596bcc44e14bb0c62c4f7e9c0b55301d94f2154 | [
"Apache-2.0"
] | null | null | null | test/onnx_converter_test/train_scripts/gmf.py | rhdong/HugeCTR | b596bcc44e14bb0c62c4f7e9c0b55301d94f2154 | [
"Apache-2.0"
] | null | null | null | import hugectr
solver = hugectr.CreateSolver(max_eval_batches = 1000,
batchsize_eval = 2770,
batchsize = 17548,
lr = 0.0045,
vvgpu = [[0]],
metrics_spec = {hugectr.Metric... | 59.196429 | 137 | 0.500452 | import hugectr
from mpi4py import MPI
solver = hugectr.CreateSolver(max_eval_batches = 1000,
batchsize_eval = 2770,
batchsize = 17548,
lr = 0.0045,
vvgpu = [[0]],
metrics... | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 22 |
e728cce5f55db6b596193b599a33a241cf579dcc | 542 | py | Python | Brownian/urls.py | FuzzyWaffler/Brownian | f05a351728ff7bb753a179a6966e673fb096b53c | [
"BSD-2-Clause"
] | 52 | 2015-01-10T05:02:00.000Z | 2019-12-19T02:17:13.000Z | Brownian/urls.py | FuzzyWaffler/Brownian | f05a351728ff7bb753a179a6966e673fb096b53c | [
"BSD-2-Clause"
] | 9 | 2015-05-04T10:28:07.000Z | 2020-02-11T21:09:26.000Z | Brownian/urls.py | grigorescu/Brownian | f05a351728ff7bb753a179a6966e673fb096b53c | [
"BSD-2-Clause"
] | 15 | 2015-01-10T05:02:04.000Z | 2019-06-11T02:56:17.000Z | from django.conf.urls import patterns, url, include
from dajaxice.core import dajaxice_autodiscover, dajaxice_config
from django.contrib.staticfiles.urls import staticfiles_urlpatterns
dajaxice_autodiscover()
urlpatterns = patterns('',
url(dajaxice_config.dajaxice_url, include('dajaxice.urls')),
url(r'^$', 'B... | 38.714286 | 68 | 0.749077 | from django.conf.urls import patterns, url, include
from dajaxice.core import dajaxice_autodiscover, dajaxice_config
from django.contrib.staticfiles.urls import staticfiles_urlpatterns
dajaxice_autodiscover()
urlpatterns = patterns('',
url(dajaxice_config.dajaxice_url, include('dajaxice.urls')),
url(r'^$', 'B... | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
ac8997188cd3a74a5c084430fddbb04b71d440d2 | 5,579 | py | Python | app/script/parse.py | DanylZhang/Netflix-Genre | d68d5b01d8ba25e776edb5fca4f4295a7d3a55a1 | [
"MIT"
] | null | null | null | app/script/parse.py | DanylZhang/Netflix-Genre | d68d5b01d8ba25e776edb5fca4f4295a7d3a55a1 | [
"MIT"
] | 2 | 2021-05-09T17:55:15.000Z | 2021-12-13T19:58:57.000Z | app/script/parse.py | DanylZhang/Netflix-Genre | d68d5b01d8ba25e776edb5fca4f4295a7d3a55a1 | [
"MIT"
] | null | null | null | #!/usr/bin/env python
# coding:utf-8
from gevent import monkey
monkey.patch_all()
from gevent.pool import Pool
from app.libs.PyMysqlPool import PyMysqlPool
thread_number = 40
pool = Pool(size=thread_number)
netflix_pool = PyMysqlPool(netflix_config, initial_size=1, max_size=thread_number * 2)
if __name__ == '_... | 39.85 | 201 | 0.623051 | #!/usr/bin/env python
# coding:utf-8
from gevent import monkey
monkey.patch_all()
from gevent.pool import Pool
from app.libs.PyMysqlPool import PyMysqlPool
from app.script.config import *
import pymysql
import time
from bs4 import BeautifulSoup
import re
thread_number = 40
pool = Pool(size=thread_number)
netflix_po... | 87 | 0 | 0 | 0 | 0 | 5,035 | 0 | -11 | 179 |
13b9ea4a1890a47ed3a3bc1398db9cbdfe465c21 | 1,044 | py | Python | setup.py | panosz/alpha_shapes | b9c0b3c76993b3f267a01ed538ce47b2c5743542 | [
"MIT"
] | 5 | 2021-02-05T06:54:31.000Z | 2022-02-24T13:30:42.000Z | setup.py | panosz/alpha_shapes | b9c0b3c76993b3f267a01ed538ce47b2c5743542 | [
"MIT"
] | null | null | null | setup.py | panosz/alpha_shapes | b9c0b3c76993b3f267a01ed538ce47b2c5743542 | [
"MIT"
] | 2 | 2021-04-11T04:38:03.000Z | 2021-09-13T09:32:56.000Z | from setuptools import setup, find_packages
with open("README.md", "r") as fh:
long_description = fh.read()
description = "reconstruct the shape of a 2D point cloud."
setup(name="alpha_shapes",
description=description,
author="Panagiotis Zestanakis",
author_email="panosz@gmail.com",
packa... | 33.677419 | 68 | 0.606322 | from setuptools import setup, find_packages
with open("README.md", "r") as fh:
long_description = fh.read()
description = "reconstruct the shape of a 2D point cloud."
setup(name="alpha_shapes",
description=description,
author="Panagiotis Zestanakis",
author_email="panosz@gmail.com",
packa... | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
731c960361d8fe524f2ddfe58ac57aa4776bbfdb | 2,588 | py | Python | analyse_templates.py | evanmiltenburg/EvaluationRules | 91de64adf2a11a18ab871e025ddea528c73430f0 | [
"MIT"
] | null | null | null | analyse_templates.py | evanmiltenburg/EvaluationRules | 91de64adf2a11a18ab871e025ddea528c73430f0 | [
"MIT"
] | null | null | null | analyse_templates.py | evanmiltenburg/EvaluationRules | 91de64adf2a11a18ab871e025ddea528c73430f0 | [
"MIT"
] | null | null | null | from lxml import etree
import glob
from collections import defaultdict
def get_entries(xmlfile):
"Get entries from an XML file."
root = etree.parse(xmlfile)
return root.xpath('//entry')
def count_templates(filename):
"Count the templates for each predicate in a file."
template_counter = defaultd... | 30.809524 | 78 | 0.659196 | from lxml import etree
import glob
from collections import defaultdict, Counter
import json
def get_entries(xmlfile):
"Get entries from an XML file."
root = etree.parse(xmlfile)
return root.xpath('//entry')
def count_templates(filename):
"Count the templates for each predicate in a file."
templa... | 0 | 0 | 0 | 0 | 0 | 0 | 0 | -1 | 22 |
14f1148905679d9655b18c93956eb27fdcb86aab | 1,260 | py | Python | app/car/tests/test_rates_api.py | raszidzie/cars-api | f212d59722fe37f3b2fc7f7f9d064c2a614a9d20 | [
"MIT"
] | 1 | 2021-02-05T07:10:55.000Z | 2021-02-05T07:10:55.000Z | app/car/tests/test_rates_api.py | raszidzie/cars-api | f212d59722fe37f3b2fc7f7f9d064c2a614a9d20 | [
"MIT"
] | null | null | null | app/car/tests/test_rates_api.py | raszidzie/cars-api | f212d59722fe37f3b2fc7f7f9d064c2a614a9d20 | [
"MIT"
] | null | null | null | from django.urls import reverse
RATE_URL = reverse('car:rate-list')
| 26.25 | 70 | 0.653175 | from django.urls import reverse
from django.test import TestCase
from rest_framework import status
from rest_framework.test import APIClient
from core.models import Rate
from car.tests.test_cars_api import sample_car
RATE_URL = reverse('car:rate-list')
class PublicRateApiTests(TestCase):
"""Test the publicly ... | 0 | 0 | 0 | 980 | 0 | 0 | 0 | 75 | 136 |
d5764c60efbd4add5da535027a06d13885acb249 | 8,734 | py | Python | anvil/project.py | suraj-testing2/Crab_Floppy_Disk | 01f6f89426308904cc5eaf9f7ab64038f84ea191 | [
"ECL-2.0",
"Apache-2.0"
] | 27 | 2015-02-18T22:38:05.000Z | 2021-05-09T15:17:05.000Z | anvil/project.py | suraj-testing2/Crab_Floppy_Disk | 01f6f89426308904cc5eaf9f7ab64038f84ea191 | [
"ECL-2.0",
"Apache-2.0"
] | 2 | 2015-05-17T22:42:13.000Z | 2017-05-01T18:31:48.000Z | anvil/project.py | suraj-testing2/Crab_Floppy_Disk | 01f6f89426308904cc5eaf9f7ab64038f84ea191 | [
"ECL-2.0",
"Apache-2.0"
] | 16 | 2015-05-06T20:28:06.000Z | 2021-10-13T22:27:21.000Z | # Copyright 2012 Google Inc. All Rights Reserved.
"""Project representation.
A project is a module (or set of modules) that provides a namespace of rules.
Rules may refer to each other and will be resolved in the project namespace.
"""
__author__ = 'benvanik@google.com (Ben Vanik)'
| 31.192857 | 80 | 0.691207 | # Copyright 2012 Google Inc. All Rights Reserved.
"""Project representation.
A project is a module (or set of modules) that provides a namespace of rules.
Rules may refer to each other and will be resolved in the project namespace.
"""
__author__ = 'benvanik@google.com (Ben Vanik)'
import base64
import os
import p... | 0 | 0 | 0 | 8,182 | 0 | 0 | 0 | -31 | 292 |
2946e49d29c57fea07784d1b3df3e784a84f0b25 | 12,553 | py | Python | src/cheat_sheet.py | devnll/cursorless-talon | e84caa2548e5b4810ebedc401493da2d9777f82c | [
"MIT"
] | null | null | null | src/cheat_sheet.py | devnll/cursorless-talon | e84caa2548e5b4810ebedc401493da2d9777f82c | [
"MIT"
] | null | null | null | src/cheat_sheet.py | devnll/cursorless-talon | e84caa2548e5b4810ebedc401493da2d9777f82c | [
"MIT"
] | null | null | null | from talon import Module
mod = Module()
mod.mode("cursorless_cheat_sheet", "Mode for showing cursorless cheat sheet gui")
cheat_sheet = None
instructions_url = "https://github.com/pokey/cursorless-talon/tree/master/docs"
instructions_text = "Full docs"
line_height = 34
outer_padding = 27
text_size = 16
url_text_size ... | 31.071782 | 86 | 0.582092 | from talon import Module, ui, registry, skia, actions, cron
from talon.canvas import Canvas
import re
import webbrowser
import math
mod = Module()
mod.mode("cursorless_cheat_sheet", "Mode for showing cursorless cheat sheet gui")
cheat_sheet = None
instructions_url = "https://github.com/pokey/cursorless-talon/tree/mas... | 0 | 530 | 0 | 9,791 | 0 | 1,238 | 0 | 19 | 364 |
93718df43e20c5cc7da8bcf1a00e1eb886f84df0 | 10,304 | py | Python | service/doc_main.py | wisebobo/doc_ocr_by_template | 299601c9c5275cf6ad1bbdca071060df5ede0c7b | [
"MIT"
] | 6 | 2019-11-29T10:10:58.000Z | 2022-01-29T07:01:48.000Z | service/doc_main.py | wisebobo/doc_ocr_by_template | 299601c9c5275cf6ad1bbdca071060df5ede0c7b | [
"MIT"
] | 7 | 2019-12-17T05:14:17.000Z | 2022-02-10T01:08:50.000Z | service/doc_main.py | wisebobo/doc_ocr_by_template | 299601c9c5275cf6ad1bbdca071060df5ede0c7b | [
"MIT"
] | 3 | 2019-12-17T09:44:28.000Z | 2022-01-12T09:54:00.000Z | # -*- coding:utf-8 -*-
| 40.566929 | 193 | 0.533967 | # -*- coding:utf-8 -*-
import logging
from multiprocessing import Pool
from operator import itemgetter
from collections import OrderedDict
from service.doc_etl import doc_etl
from service.api.tencent_ai import tencent_ai
from service.api.baidu_ai import baidu_ai
from service.api.jd_ai import jd_ai
from service.api.face... | 9 | 0 | 0 | 9,704 | 0 | 0 | 0 | 243 | 331 |
8285e929480216de19cb0e5711f62bf7eb05a908 | 576 | py | Python | screen_recorder.py | Adarsh232001/Basic-python-scripts | 0fa559087ec3c5e1eec737ea029882b2edaffe1a | [
"MIT"
] | 1 | 2021-09-09T11:13:47.000Z | 2021-09-09T11:13:47.000Z | screen_recorder.py | Adarsh232001/Basic-python-scripts | 0fa559087ec3c5e1eec737ea029882b2edaffe1a | [
"MIT"
] | null | null | null | screen_recorder.py | Adarsh232001/Basic-python-scripts | 0fa559087ec3c5e1eec737ea029882b2edaffe1a | [
"MIT"
] | null | null | null | from PIL import ImageGrab
import numpy as np
import cv2
from win32api import GetSystemMetrics
width = GetSystemMetrics(0)
height = GetSystemMetrics(1)
forcecc = cv2.VideoWriter_fourcc('m','p','4','v')
captured_video = cv2.VideoWriter('output.mp4', forcecc, 20.0, (width, height))
while True:
img = ImageG... | 33.882353 | 79 | 0.690972 | from PIL import ImageGrab
import numpy as np
import cv2
from win32api import GetSystemMetrics
width = GetSystemMetrics(0)
height = GetSystemMetrics(1)
forcecc = cv2.VideoWriter_fourcc('m','p','4','v')
captured_video = cv2.VideoWriter('output.mp4', forcecc, 20.0, (width, height))
while True:
img = ImageG... | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
9731dd1457d015a568b3204de73cbf249d4ed962 | 1,051 | py | Python | home/Mastablasta/memo/startmemo.py | rv8flyboy/pyrobotlab | 4e04fb751614a5cb6044ea15dcfcf885db8be65a | [
"Apache-2.0"
] | 63 | 2015-02-03T18:49:43.000Z | 2022-03-29T03:52:24.000Z | home/Mastablasta/memo/startmemo.py | hirwaHenryChristian/pyrobotlab | 2debb381fc2db4be1e7ea6e5252a50ae0de6f4a9 | [
"Apache-2.0"
] | 16 | 2016-01-26T19:13:29.000Z | 2018-11-25T21:20:51.000Z | home/Mastablasta/memo/startmemo.py | hirwaHenryChristian/pyrobotlab | 2debb381fc2db4be1e7ea6e5252a50ae0de6f4a9 | [
"Apache-2.0"
] | 151 | 2015-01-03T18:55:54.000Z | 2022-03-04T07:04:23.000Z | holygrail = Runtime.createAndStart("holygrail", "WebGui")
wksr = Runtime.createAndStart("webkitspeechrecognition", "WebkitSpeechRecognition")
alice2 = Runtime.createAndStart("alice2", "ProgramAB")
alice2.startSession("C:/mrl2/myrobotlab/ProgramAB", "default", "alice2")
htmlfilter = Runtime.createAndStart("htmlfilter", ... | 27.657895 | 83 | 0.717412 | import random
from java.lang import String
from org.myrobotlab.net import BareBonesBrowserLaunch
holygrail = Runtime.createAndStart("holygrail", "WebGui")
wksr = Runtime.createAndStart("webkitspeechrecognition", "WebkitSpeechRecognition")
alice2 = Runtime.createAndStart("alice2", "ProgramAB")
alice2.startSession("C:/mr... | 0 | 0 | 0 | 0 | 0 | 341 | 0 | 31 | 158 |
1c008d0cd0ffa1cb210c4dca87ce41ce81547b15 | 3,340 | py | Python | learning_to_simulate/render_rollout.py | mitchchristow/deepmind-research | 49c7ebe6acc48dd276ca09eca6924ba6cb5ec3a3 | [
"Apache-2.0"
] | 10,110 | 2019-08-27T20:05:30.000Z | 2022-03-31T16:31:56.000Z | learning_to_simulate/render_rollout.py | ibex-training/deepmind-research | 6f8ae40b2626b30f5f80dfc92f5676689eff5599 | [
"Apache-2.0"
] | 317 | 2019-11-09T10:19:10.000Z | 2022-03-31T00:05:19.000Z | learning_to_simulate/render_rollout.py | ibex-training/deepmind-research | 6f8ae40b2626b30f5f80dfc92f5676689eff5599 | [
"Apache-2.0"
] | 2,170 | 2019-08-28T12:53:36.000Z | 2022-03-31T13:15:11.000Z | # Lint as: python3
# pylint: disable=g-bad-file-header
# Copyright 2020 DeepMind Technologies Limited. 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.a... | 32.115385 | 95 | 0.68024 | # Lint as: python3
# pylint: disable=g-bad-file-header
# Copyright 2020 DeepMind Technologies Limited. 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.a... | 0 | 0 | 0 | 0 | 0 | 1,559 | 0 | 10 | 113 |
2d5e8ede167d734734be2e1f3d345a788b768903 | 1,561 | py | Python | ckan/model/package_extra.py | iamarnavgarg/ckan | 59006ac45e0f2df48e22fe15e7a35a5f6b67a5d1 | [
"Apache-2.0"
] | 1 | 2019-11-16T05:13:21.000Z | 2019-11-16T05:13:21.000Z | ckan/model/package_extra.py | iamarnavgarg/ckan | 59006ac45e0f2df48e22fe15e7a35a5f6b67a5d1 | [
"Apache-2.0"
] | null | null | null | ckan/model/package_extra.py | iamarnavgarg/ckan | 59006ac45e0f2df48e22fe15e7a35a5f6b67a5d1 | [
"Apache-2.0"
] | null | null | null | # encoding: utf-8
from sqlalchemy import orm, types, Column, Table, ForeignKey
from sqlalchemy.ext.associationproxy import association_proxy
import meta
import core
import package as _package
import extension
import types as _types
__all__ = ['PackageExtra', 'package_extra_table']
package_extra_table = Table('packag... | 28.907407 | 81 | 0.730301 | # encoding: utf-8
from six import text_type
from sqlalchemy import orm, types, Column, Table, ForeignKey
from sqlalchemy.ext.associationproxy import association_proxy
import meta
import core
import package as _package
import extension
import domain_object
import types as _types
import ckan.lib.dictization
import acti... | 0 | 0 | 0 | 132 | 0 | 66 | 0 | 3 | 135 |
6a14ff455c5e51b66497423f74c90f56e9a11e5d | 12,704 | py | Python | src/rubrix/server/tasks/text_classification/api/model.py | king1rule/rubrix | 123b34f5aa0dbf55e7a91e696c2ac4f6460ea574 | [
"Apache-2.0"
] | null | null | null | src/rubrix/server/tasks/text_classification/api/model.py | king1rule/rubrix | 123b34f5aa0dbf55e7a91e696c2ac4f6460ea574 | [
"Apache-2.0"
] | null | null | null | src/rubrix/server/tasks/text_classification/api/model.py | king1rule/rubrix | 123b34f5aa0dbf55e7a91e696c2ac4f6460ea574 | [
"Apache-2.0"
] | null | null | null | # coding=utf-8
# Copyright 2021-present, the Recognai S.L. team.
#
# 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 ... | 28.484305 | 88 | 0.644836 | # coding=utf-8
# Copyright 2021-present, the Recognai S.L. team.
#
# 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 ... | 0 | 4,746 | 0 | 6,594 | 0 | 0 | 0 | 346 | 386 |
c5a187cdc2d6f528792233c3bb896cbd35087b22 | 3,643 | py | Python | paderbox/io/json_module.py | JanekEbb/paderbox | 7cd3bf92380e05ec856936d21a64d0a8a3ff0fca | [
"MIT"
] | 25 | 2019-12-21T21:10:08.000Z | 2022-02-04T10:40:19.000Z | paderbox/io/json_module.py | JanekEbb/paderbox | 7cd3bf92380e05ec856936d21a64d0a8a3ff0fca | [
"MIT"
] | 32 | 2019-12-21T21:48:24.000Z | 2022-03-31T08:20:39.000Z | paderbox/io/json_module.py | JanekEbb/paderbox | 7cd3bf92380e05ec856936d21a64d0a8a3ff0fca | [
"MIT"
] | 254 | 2019-12-16T08:15:08.000Z | 2021-11-26T12:41:12.000Z |
import io
import json
from pathlib import Path
# http://stackoverflow.com/a/27050186
def dump_json(
obj, path, *, indent=2, create_path=True, sort_keys=True, **kwargs):
"""
Numpy types will be converted to the equivalent Python type for dumping the
object.
:param obj: Arbitrary object th... | 28.912698 | 106 | 0.59978 |
import io
import numpy as np
import json
import datetime
from pathlib import Path
# http://stackoverflow.com/a/27050186
class Encoder(json.JSONEncoder):
def default(self, obj):
if isinstance(obj, np.integer):
return int(obj)
elif isinstance(obj, np.floating):
return float(... | 0 | 0 | 0 | 1,590 | 0 | 243 | 0 | -9 | 112 |
ed8f21a09d541f1f17af6da6dfe1fc743d860525 | 23,761 | py | Python | src/pyrad_proc/pyrad/graph/plots_timeseries.py | jfigui/pyrad | 7811d593bb09a7f8a621c0e8ae3f32c2b85a0254 | [
"BSD-3-Clause"
] | 41 | 2016-12-01T08:46:06.000Z | 2021-06-24T21:14:33.000Z | src/pyrad_proc/pyrad/graph/plots_timeseries.py | jfigui/pyrad | 7811d593bb09a7f8a621c0e8ae3f32c2b85a0254 | [
"BSD-3-Clause"
] | 42 | 2017-02-23T14:52:49.000Z | 2021-02-01T10:43:52.000Z | src/pyrad_proc/pyrad/graph/plots_timeseries.py | jfigui/pyrad | 7811d593bb09a7f8a621c0e8ae3f32c2b85a0254 | [
"BSD-3-Clause"
] | 21 | 2016-08-25T15:02:12.000Z | 2021-05-27T04:09:40.000Z | """
pyrad.graph.plot_timeseries
===========================
Functions to plot Pyrad datasets
.. autosummary::
:toctree: generated/
plot_timeseries
plot_timeseries_comp
plot_monitoring_ts
plot_intercomp_scores_ts
plot_ml_ts
plot_sun_retrieval_ts
"""
from warnings import warn
import nump... | 31.060131 | 78 | 0.610665 | """
pyrad.graph.plot_timeseries
===========================
Functions to plot Pyrad datasets
.. autosummary::
:toctree: generated/
plot_timeseries
plot_timeseries_comp
plot_monitoring_ts
plot_intercomp_scores_ts
plot_ml_ts
plot_sun_retrieval_ts
"""
from warnings import warn
import nump... | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
1ce4bff6959044eed3aa41259057c196a313c77b | 5,126 | py | Python | GPy/kern/_src/coregionalize.py | beckdaniel/GPy | 37e835aa36b18c32bc500684cc10dd2b74240e1f | [
"BSD-3-Clause"
] | null | null | null | GPy/kern/_src/coregionalize.py | beckdaniel/GPy | 37e835aa36b18c32bc500684cc10dd2b74240e1f | [
"BSD-3-Clause"
] | null | null | null | GPy/kern/_src/coregionalize.py | beckdaniel/GPy | 37e835aa36b18c32bc500684cc10dd2b74240e1f | [
"BSD-3-Clause"
] | 1 | 2020-02-21T02:40:18.000Z | 2020-02-21T02:40:18.000Z | # Copyright (c) 2012, James Hensman and Ricardo Andrade
# Licensed under the BSD 3-clause license (see LICENSE.txt)
from ...util.config import config # for assesing whether to use cython
try:
config.set('cython', 'working', 'True')
except ImportError:
config.set('cython', 'working', 'False')
| 38.541353 | 155 | 0.643582 | # Copyright (c) 2012, James Hensman and Ricardo Andrade
# Licensed under the BSD 3-clause license (see LICENSE.txt)
from .kern import Kern
import numpy as np
from ...core.parameterization import Param
from ...core.parameterization.transformations import Logexp
from ...util.config import config # for assesing whether t... | 0 | 0 | 0 | 4,617 | 0 | 0 | 0 | 70 | 138 |
13647ffc9e3bd7517d74d7bec885a1f5f15f8773 | 3,591 | py | Python | main-VG.py | HocRiser01/GEV-NN | a500106a33b75e78fa82b79ac2364668a3e35786 | [
"MIT"
] | null | null | null | main-VG.py | HocRiser01/GEV-NN | a500106a33b75e78fa82b79ac2364668a3e35786 | [
"MIT"
] | null | null | null | main-VG.py | HocRiser01/GEV-NN | a500106a33b75e78fa82b79ac2364668a3e35786 | [
"MIT"
] | null | null | null | import os
import pandas as pd
import torch
from torch.utils import data
import display
from config import config
from train import train
from construct import construct
from sklearn.svm import SVC
device = torch.device("cuda:0" if torch.cuda.is_available() else "cpu")
eps = 1e-8
FILE_LIST = os.listdir(config.DATA_PA... | 33.877358 | 93 | 0.683932 | import os
import numpy as np
import pandas as pd
import torch
from torch import nn
from torch import optim
from torch.utils import data
import matplotlib
import matplotlib.pyplot as plt
import GEV
import display
from config import config
import selection
from train import train
from construct import construct
from skle... | 0 | 0 | 0 | 1,008 | 0 | 0 | 0 | 84 | 265 |
742784c7e5819d752826b636c3ac8ea2f23a2f9e | 3,318 | py | Python | amp_build.py | AudiovisualMetadataPlatform/amp_mgms | 593d4f4d40b597a7753cd152cd233976e6b28c75 | [
"Apache-2.0"
] | null | null | null | amp_build.py | AudiovisualMetadataPlatform/amp_mgms | 593d4f4d40b597a7753cd152cd233976e6b28c75 | [
"Apache-2.0"
] | 1 | 2022-02-16T16:21:03.000Z | 2022-02-16T16:21:03.000Z | amp_build.py | AudiovisualMetadataPlatform/amp_mgms | 593d4f4d40b597a7753cd152cd233976e6b28c75 | [
"Apache-2.0"
] | null | null | null | #!/bin/env python3
#
# Build the amp-mgms tarball for distribution
#
if __name__ == "__main__":
main()
| 39.975904 | 118 | 0.644665 | #!/bin/env python3
#
# Build the amp-mgms tarball for distribution
#
import argparse
import logging
import tempfile
from pathlib import Path
import shutil
import sys
import yaml
from datetime import datetime
import os
import subprocess
from amp_bootstrap_utils import run_cmd, build_package
def main():
parser = ar... | 0 | 0 | 0 | 0 | 0 | 2,953 | 0 | -20 | 266 |
96d34719ef0770d0dc719cc1292e68093ca10fc8 | 2,486 | py | Python | server/CVFL_flask_streaming/camera_opencv.py | adeept/adeept_alter | 6adf00eb141405fc3abad44965f81ba7797dd962 | [
"MIT"
] | 1 | 2021-12-21T15:50:57.000Z | 2021-12-21T15:50:57.000Z | server/CVFL_flask_streaming/camera_opencv.py | adeept/adeept_alter | 6adf00eb141405fc3abad44965f81ba7797dd962 | [
"MIT"
] | 2 | 2021-03-14T22:05:42.000Z | 2021-07-19T22:13:37.000Z | server/CVFL_flask_streaming/camera_opencv.py | adeept/adeept_alter | 6adf00eb141405fc3abad44965f81ba7797dd962 | [
"MIT"
] | null | null | null |
'''
Set the color of the line, 255 is white line, 0 is black line
'''
lineColorSet = 255
'''
Set the reference horizontal position, the larger the value, the lower,
but it cannot be greater than the vertical resolution of the video (default 480)
'''
linePos = 380 | 32.285714 | 130 | 0.705953 | import os
import cv2
from base_camera import BaseCamera
import numpy as np
import time
import threading
import imutils
'''
Set the color of the line, 255 is white line, 0 is black line
'''
lineColorSet = 255
'''
Set the reference horizontal position, the larger the value, the lower,
but it cannot be greater than the ... | 3 | 1,841 | 0 | 237 | 0 | 0 | 0 | -35 | 177 |
62b3e7773e3203f6f2a28718fd101a02a1022969 | 1,210 | py | Python | Sports/NBA.py | fefelson/FelsonSports | bc0c16d63b19ffe4d468dcda5ab224013abe23fa | [
"MIT"
] | null | null | null | Sports/NBA.py | fefelson/FelsonSports | bc0c16d63b19ffe4d468dcda5ab224013abe23fa | [
"MIT"
] | null | null | null | Sports/NBA.py | fefelson/FelsonSports | bc0c16d63b19ffe4d468dcda5ab224013abe23fa | [
"MIT"
] | null | null | null |
################################################################################
################################################################################
currentSeason = 2021
################################################################################
##################################################... | 28.139535 | 83 | 0.402479 | from ..DB import NBADB
from ..Models import (DailyBoxScore, DailyFileManager, DailyMatchup, DailySchedule,
NBAPlayer, League, NBAReport)
################################################################################
##########################################################################... | 0 | 0 | 0 | 673 | 0 | 0 | 0 | 117 | 67 |
040fca9fddb067b14c56ab2bdecc86a33a521637 | 4,742 | py | Python | edlm/convert/_make_pdf.py | etcher-be/EDLM | 7b25c85252fd15c2c222b00271f7a32e335db704 | [
"MIT"
] | null | null | null | edlm/convert/_make_pdf.py | etcher-be/EDLM | 7b25c85252fd15c2c222b00271f7a32e335db704 | [
"MIT"
] | 4 | 2020-03-24T16:53:26.000Z | 2020-06-26T08:31:13.000Z | edlm/convert/_make_pdf.py | etcher-be/EDLM | 7b25c85252fd15c2c222b00271f7a32e335db704 | [
"MIT"
] | null | null | null | # coding=utf-8
"""
Makes a PDF document from a source folder
"""
from pathlib import Path
import elib
from edlm import LOGGER
from edlm.convert import Context
WIDTH_MODIFIER = 0.8
PAPER_FORMATS_WIDTH = {
'a0': 841 * WIDTH_MODIFIER,
'a1': 594 * WIDTH_MODIFIER,
'a2': 420 * WIDTH_MODIFIER,
'a3': 29 * W... | 27.894118 | 95 | 0.619992 | # coding=utf-8
"""
Makes a PDF document from a source folder
"""
import shutil
import urllib.parse
from pathlib import Path
import elib
from edlm import LOGGER
from edlm.convert import Context
from edlm.external_tools import PANDOC
from ._check_for_unused_images import check_for_unused_images
from ._get_includes im... | 0 | 0 | 0 | 0 | 0 | 2,990 | 0 | 227 | 381 |
30de931e7a17711ef72c79dc51935268bcb9af5a | 12,652 | py | Python | main.py | Harsh-0986/NoteWord | 492b7a17a18eeeaf05c912bacdeb4e9c6c461391 | [
"MIT"
] | 1 | 2021-04-29T09:18:26.000Z | 2021-04-29T09:18:26.000Z | main.py | Harsh-0986/NoteWord | 492b7a17a18eeeaf05c912bacdeb4e9c6c461391 | [
"MIT"
] | null | null | null | main.py | Harsh-0986/NoteWord | 492b7a17a18eeeaf05c912bacdeb4e9c6c461391 | [
"MIT"
] | null | null | null | import sys
app = QApplication(sys.argv)
window = MainApp()
window.show()
sys.exit(app.exec_())
| 34.663014 | 151 | 0.62662 | import sys
from PyQt5.QtGui import *
from PyQt5.QtWidgets import *
from PyQt5.QtCore import *
from PyQt5.QtPrintSupport import *
import urllib.request
class MainApp(QMainWindow):
""" the main class of our app """
def __init__(self):
""" init things here """
super().__init__() ... | 0 | 0 | 0 | 12,388 | 0 | 0 | 0 | 30 | 133 |
3d4ad1e746ec78e19316f6e016ac3f30a9158745 | 932 | py | Python | main.py | w0xter/virtuarrrml | 3e1616cf9179cb7009f048cf8914813e29cf382f | [
"Apache-2.0"
] | null | null | null | main.py | w0xter/virtuarrrml | 3e1616cf9179cb7009f048cf8914813e29cf382f | [
"Apache-2.0"
] | null | null | null | main.py | w0xter/virtuarrrml | 3e1616cf9179cb7009f048cf8914813e29cf382f | [
"Apache-2.0"
] | null | null | null | dataset = "./test/gtfs/"
queryDir = "query2/"
if __name__ == '__main__':
main() | 37.28 | 96 | 0.733906 | from YarrrmlUtils import Yarrrml
from SparqlUtils import Sparql
from SqlUtils import Sql
import json
import sys
dataset = "./test/gtfs/"
queryDir = "query2/"
def main():
query = Sparql( dataset + queryDir + 'query.rq')
mapping = Yarrrml(dataset + 'mapping.yaml')
writeResult(dataset + queryDir + "queryUris... | 0 | 0 | 0 | 0 | 0 | 691 | 0 | 2 | 155 |
2b5558f42369a7e2a14152b11ac1fcf3d075b5f2 | 59 | py | Python | django_rdkit/__init__.py | rustamzh/django-rdkit | 34e61a00f5f47a9f2d2f064c4a77aae46f8cd36f | [
"BSD-3-Clause"
] | 35 | 2015-07-30T13:35:37.000Z | 2021-12-17T01:00:26.000Z | django_rdkit/__init__.py | rvianello/django-rdkit | 9bbbebb45b8af15006e1e2ffec7744705de2a295 | [
"BSD-3-Clause"
] | 21 | 2016-03-10T16:06:03.000Z | 2022-01-20T14:11:46.000Z | django_rdkit/__init__.py | rvianello/django-rdkit | 9bbbebb45b8af15006e1e2ffec7744705de2a295 | [
"BSD-3-Clause"
] | 24 | 2015-07-11T22:10:27.000Z | 2021-12-10T20:55:19.000Z | default_app_config = 'django_rdkit.apps.DjangoRDKitConfig'
| 29.5 | 58 | 0.864407 | default_app_config = 'django_rdkit.apps.DjangoRDKitConfig'
| 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
cc33b7d598e664e7d4ed4e0e84affa1ce6fd1aa2 | 2,253 | py | Python | solutions/Special-Cryptagram.py | Reyansh14/leetcode-solutions | 288bc2708acb21678b9ab51b0d5a4b326b3f7328 | [
"MIT"
] | null | null | null | solutions/Special-Cryptagram.py | Reyansh14/leetcode-solutions | 288bc2708acb21678b9ab51b0d5a4b326b3f7328 | [
"MIT"
] | null | null | null | solutions/Special-Cryptagram.py | Reyansh14/leetcode-solutions | 288bc2708acb21678b9ab51b0d5a4b326b3f7328 | [
"MIT"
] | null | null | null | # A cryptarithm is a mathematical puzzle for which the goal is to find the correspondence between letters and digits, such that the given arithmetic equation consisting of letters holds true when the letters are converted to digits.
# You have an array of strings crypt, the cryptarithm, and an an array containing the m... | 45.06 | 299 | 0.586773 | # A cryptarithm is a mathematical puzzle for which the goal is to find the correspondence between letters and digits, such that the given arithmetic equation consisting of letters holds true when the letters are converted to digits.
# You have an array of strings crypt, the cryptarithm, and an an array containing the m... | 0 | 0 | 0 | 0 | 0 | 562 | 0 | 0 | 23 |
72441f002cfab9213c47e77f02b157d43378f7d4 | 125 | py | Python | tests/utils.py | adalekin/connexion-buzz | c96beebb26ef84858b5131ba2f3c1a0b9152b137 | [
"BSD-3-Clause"
] | null | null | null | tests/utils.py | adalekin/connexion-buzz | c96beebb26ef84858b5131ba2f3c1a0b9152b137 | [
"BSD-3-Clause"
] | null | null | null | tests/utils.py | adalekin/connexion-buzz | c96beebb26ef84858b5131ba2f3c1a0b9152b137 | [
"BSD-3-Clause"
] | null | null | null | import re
def stripped(text):
"""
Removes all whitespace from a string
"""
return re.sub(r'\s+', '', text)
| 13.888889 | 40 | 0.568 | import re
def stripped(text):
"""
Removes all whitespace from a string
"""
return re.sub(r'\s+', '', text)
| 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
f53ac81b7ecb44832ad31f68483f86e0835e7a72 | 347 | py | Python | commands/__init__.py | UnsignedByte/Coconut-Milk | 04a8f38693cb93fb45a25082e39e6de5544a9195 | [
"MIT"
] | 1 | 2019-10-10T06:08:46.000Z | 2019-10-10T06:08:46.000Z | commands/__init__.py | UnsignedByte/Coconut-Milk | 04a8f38693cb93fb45a25082e39e6de5544a9195 | [
"MIT"
] | null | null | null | commands/__init__.py | UnsignedByte/Coconut-Milk | 04a8f38693cb93fb45a25082e39e6de5544a9195 | [
"MIT"
] | null | null | null | # @Author: Edmund Lam <edl>
# @Date: 18:44:31, 17-Apr-2018
# @Filename: __init__.py
# @Last modified by: edl
# @Last modified time: 10:05:18, 13-Oct-2019
# __all__=['settings', 'utilities', 'fun', 'economy', 'help', 'quiz', 'trivia', 'wolframalpha', 'ascii_art', 'regex_commands']
__all__=['moderation', 'help', 'u... | 34.7 | 126 | 0.657061 | # @Author: Edmund Lam <edl>
# @Date: 18:44:31, 17-Apr-2018
# @Filename: __init__.py
# @Last modified by: edl
# @Last modified time: 10:05:18, 13-Oct-2019
# __all__=['settings', 'utilities', 'fun', 'economy', 'help', 'quiz', 'trivia', 'wolframalpha', 'ascii_art', 'regex_commands']
__all__=['moderation', 'help', 'u... | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
9c3e4c63c75f287c5109e38d3e40315dc8b12943 | 1,858 | py | Python | setup.py | 2320sharon/localtileserver | 2ed2f564b50a755e5528021fb200b157a16add8e | [
"MIT"
] | null | null | null | setup.py | 2320sharon/localtileserver | 2ed2f564b50a755e5528021fb200b157a16add8e | [
"MIT"
] | null | null | null | setup.py | 2320sharon/localtileserver | 2ed2f564b50a755e5528021fb200b157a16add8e | [
"MIT"
] | null | null | null | from io import open as io_open
import os
from setuptools import find_packages, setup
dirname = os.path.dirname(__file__)
readme_file = os.path.join(dirname, "README.md")
if os.path.exists(readme_file):
with io_open(readme_file, "r", encoding="utf-8") as f:
long_description = f.read()
else:
# When this... | 29.492063 | 84 | 0.632939 | from io import open as io_open
import os
from setuptools import find_packages, setup
dirname = os.path.dirname(__file__)
readme_file = os.path.join(dirname, "README.md")
if os.path.exists(readme_file):
with io_open(readme_file, "r", encoding="utf-8") as f:
long_description = f.read()
else:
# When this... | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
ad512b56f11b247129270d04bb6ea3c769e6ddeb | 272 | py | Python | gforce.py | exegol/raspi_sense | 8a5ce90c049db6d2ebfd6ae32a08c36d1621d98f | [
"MIT"
] | null | null | null | gforce.py | exegol/raspi_sense | 8a5ce90c049db6d2ebfd6ae32a08c36d1621d98f | [
"MIT"
] | null | null | null | gforce.py | exegol/raspi_sense | 8a5ce90c049db6d2ebfd6ae32a08c36d1621d98f | [
"MIT"
] | null | null | null | from sense_hat import SenseHat
sense = SenseHat()
while True:
acceleration = sense.get_accelerometer_raw()
x = acceleration['x']
y = acceleration['y']
z = acceleration['z']
x=round(x, 0)
y=round(y, 0)
z=round(z, 0)
print("x={0}, y={1}, z={2}".format(x, y, z))
| 17 | 45 | 0.636029 | from sense_hat import SenseHat
sense = SenseHat()
while True:
acceleration = sense.get_accelerometer_raw()
x = acceleration['x']
y = acceleration['y']
z = acceleration['z']
x=round(x, 0)
y=round(y, 0)
z=round(z, 0)
print("x={0}, y={1}, z={2}".format(x, y, z))
| 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
5e139d61a6c0acddfc09bdad0eedcfcf09f0c892 | 199 | py | Python | python/8kyu/is_it_a_number.py | Sigmanificient/codewars | b34df4bf55460d312b7ddf121b46a707b549387a | [
"MIT"
] | 3 | 2021-06-08T01:57:13.000Z | 2021-06-26T10:52:47.000Z | python/8kyu/is_it_a_number.py | Sigmanificient/codewars | b34df4bf55460d312b7ddf121b46a707b549387a | [
"MIT"
] | null | null | null | python/8kyu/is_it_a_number.py | Sigmanificient/codewars | b34df4bf55460d312b7ddf121b46a707b549387a | [
"MIT"
] | 2 | 2021-06-10T21:20:13.000Z | 2021-06-30T10:13:26.000Z | """Kata url: https://www.codewars.com/kata/57126304cdbf63c6770012bd."""
| 18.090909 | 71 | 0.603015 | """Kata url: https://www.codewars.com/kata/57126304cdbf63c6770012bd."""
def is_digit(x: str) -> bool:
try:
_ = float(x)
return True
except ValueError:
return False
| 0 | 0 | 0 | 0 | 0 | 103 | 0 | 0 | 23 |
3861591b861d4193451a0c3e1756de70f4bb3e9c | 355 | py | Python | bench/bench_aioredis_get.py | Gelbpunkt/zangy | abe2575b202c4bab9f33a20a8b6b267d6714a2ce | [
"MIT"
] | 4 | 2020-11-26T06:19:44.000Z | 2021-05-22T07:21:57.000Z | bench/bench_aioredis_get.py | Gelbpunkt/zangy | abe2575b202c4bab9f33a20a8b6b267d6714a2ce | [
"MIT"
] | 1 | 2021-05-12T13:59:06.000Z | 2021-05-12T16:59:00.000Z | bench/bench_aioredis_get.py | Gelbpunkt/zangy | abe2575b202c4bab9f33a20a8b6b267d6714a2ce | [
"MIT"
] | null | null | null | import asyncio
import uvloop
uvloop.install()
asyncio.run(main())
| 22.1875 | 88 | 0.698592 | import asyncio
import aioredis
import uvloop
from tqdm.asyncio import tqdm
uvloop.install()
async def main():
pool = await aioredis.create_redis_pool("redis://localhost", minsize=10, maxsize=10)
await pool.set("bench", "yes")
async for i in tqdm(range(1000000), desc="Getting keys..."):
await pool.... | 0 | 0 | 217 | 0 | 0 | 0 | 0 | 2 | 67 |
1386248393d70970898e9fecb8a88f08702d75f1 | 656 | py | Python | app/__init__.py | yogishah-9698/docusign | 96eb3e98a5e0cf432a821d02628c8a38ebdecbf8 | [
"MIT"
] | null | null | null | app/__init__.py | yogishah-9698/docusign | 96eb3e98a5e0cf432a821d02628c8a38ebdecbf8 | [
"MIT"
] | null | null | null | app/__init__.py | yogishah-9698/docusign | 96eb3e98a5e0cf432a821d02628c8a38ebdecbf8 | [
"MIT"
] | null | null | null | import os
from app import ds_config
from flask import Flask
from flask_wtf.csrf import CSRFProtect
session_path = "/tmp/python_recipe_sessions"
app = Flask(__name__)
app.config.from_pyfile("config.py")
app.secret_key = ds_config.DS_CONFIG["session_secret"]
csrf = CSRFProtect(app) # See https://flask-wtf.readthedocs.... | 28.521739 | 82 | 0.76372 | import os
from app import ds_config
from flask import Flask
from flask_wtf.csrf import CSRFProtect
session_path = "/tmp/python_recipe_sessions"
app = Flask(__name__)
app.config.from_pyfile("config.py")
app.secret_key = ds_config.DS_CONFIG["session_secret"]
csrf = CSRFProtect(app) # See https://flask-wtf.readthedocs.... | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 23 |
75bb762489e0e532fb7ce33d7f181053742e378e | 42 | py | Python | commands/data/FOOTER.py | EJ-Studio/EJ-DJ | ed794749216deb47bc93e432fdc7f024473f3236 | [
"Apache-2.0"
] | null | null | null | commands/data/FOOTER.py | EJ-Studio/EJ-DJ | ed794749216deb47bc93e432fdc7f024473f3236 | [
"Apache-2.0"
] | null | null | null | commands/data/FOOTER.py | EJ-Studio/EJ-DJ | ed794749216deb47bc93e432fdc7f024473f3236 | [
"Apache-2.0"
] | null | null | null | footer = "By: EJ Studios for>> EJ Studios" | 42 | 42 | 0.690476 | footer = "By: EJ Studios for>> EJ Studios" | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
09abaeccabc2bf38e667a62e0749a35e9bc0f5c7 | 14,977 | py | Python | app/controllers/employment.py | MTES-MCT/mobilic-api | b3754de2282262fd60a27dc90e40777df9c1e230 | [
"MIT"
] | null | null | null | app/controllers/employment.py | MTES-MCT/mobilic-api | b3754de2282262fd60a27dc90e40777df9c1e230 | [
"MIT"
] | 8 | 2021-04-19T17:47:55.000Z | 2022-02-16T17:40:18.000Z | app/controllers/employment.py | MTES-MCT/mobilic-api | b3754de2282262fd60a27dc90e40777df9c1e230 | [
"MIT"
] | null | null | null |
MAX_SIZE_OF_INVITATION_BATCH = 100
MAILJET_BATCH_SEND_LIMIT = 50
| 31.663848 | 251 | 0.611872 | from flask import after_this_request
from app.domain.permissions import company_admin
from app.helpers.authentication import (
current_user,
set_auth_cookies,
create_access_tokens_for,
AuthenticatedMutation,
require_auth_with_write_access,
)
import graphene
from datetime import datetime, date, time... | 76 | 8,163 | 0 | 4,761 | 0 | 745 | 0 | 608 | 585 |
c2d381d9abbc4843fbc9f5743dd6c0f7c8426838 | 14,533 | py | Python | zbackup/common.py | sandromello/zbackup | 86e1211363968fbee49abf9a430c2b201186b4ea | [
"Apache-2.0"
] | 6 | 2017-01-28T18:40:39.000Z | 2021-07-08T09:47:48.000Z | zbackup/common.py | sandromello/zbackup | 86e1211363968fbee49abf9a430c2b201186b4ea | [
"Apache-2.0"
] | 4 | 2015-07-02T22:52:11.000Z | 2017-10-23T02:20:19.000Z | zbackup/common.py | sandromello/zbackup | 86e1211363968fbee49abf9a430c2b201186b4ea | [
"Apache-2.0"
] | 5 | 2016-09-16T00:38:32.000Z | 2019-06-12T08:48:45.000Z | #!/usr/bin/python
import logging
CONFIG_FILE_INI = '/opt/zimbra/conf/zbackup.ini'
ZIMBRA_ACCOUNT_STATUS = ['active', 'locked', 'closed', 'lockout', 'pending']
CONTENT_TYPES = ['message', 'contact', 'appointment', 'task', 'document']
logging_levels = {
'DEBUG' : logging.DEBUG,
'INFO' : logging.INFO,
'WARNING' :... | 35.533007 | 121 | 0.654923 | #!/usr/bin/python
import ldap, logging, shelve
import subprocess as sb
import xml.etree.ElementTree as ET
import os, time, sys, urllib2, ConfigParser, pwd
from datetime import datetime, timedelta
from base64 import b64encode
CONFIG_FILE_INI = '/opt/zimbra/conf/zbackup.ini'
ZIMBRA_ACCOUNT_STATUS = ['active', 'locked', ... | 0 | 1,117 | 0 | 12,539 | 0 | 0 | 0 | 82 | 296 |
2ea7dee219622fcf515f2738fb83bcddcbb73f60 | 1,884 | py | Python | test/preprocessing_test.py | losedavidpb/kata_ialib | 8c7677be0fb6394d4a77402d65fb3485900f336f | [
"MIT"
] | 1 | 2021-11-08T10:07:39.000Z | 2021-11-08T10:07:39.000Z | test/preprocessing_test.py | losedavidpb/kata_ialib | 8c7677be0fb6394d4a77402d65fb3485900f336f | [
"MIT"
] | null | null | null | test/preprocessing_test.py | losedavidpb/kata_ialib | 8c7677be0fb6394d4a77402d65fb3485900f336f | [
"MIT"
] | null | null | null | import unittest
if __name__ == '__main__':
unittest.main()
| 36.230769 | 90 | 0.649682 | import unittest
import numpy as np
from preprocessing import split_data, principal_components
class PreprocessingTest(unittest.TestCase):
def test_split_data_when_no_shuffle(self):
test_data = np.random.random(size=(10, 10))
base_train_data = test_data[0:9, :]
base_test_data = test_data[9:... | 0 | 0 | 0 | 1,719 | 0 | 0 | 0 | 34 | 67 |
d2f1f0254810a2662a6eeedc65ab86a947dfc312 | 2,703 | py | Python | threepy/core/Base.py | district10/three.py | e46a41267d210b8daecc2a0cc81350493132c8da | [
"MIT"
] | 2 | 2019-04-09T15:57:17.000Z | 2019-04-10T04:15:53.000Z | threepy/core/Base.py | district10/three.py | e46a41267d210b8daecc2a0cc81350493132c8da | [
"MIT"
] | null | null | null | threepy/core/Base.py | district10/three.py | e46a41267d210b8daecc2a0cc81350493132c8da | [
"MIT"
] | null | null | null | import os
pwd = os.path.abspath(os.path.dirname(__file__))
| 28.452632 | 79 | 0.577876 | import pygame
import sys
import time
from threepy.core import *
import os
pwd = os.path.abspath(os.path.dirname(__file__))
class Base(object):
def __init__(self):
# initialize the pygame display and OpenGL context
pygame.display.init()
pygame.font.init()
# load a custom icon
... | 0 | 0 | 0 | 2,555 | 0 | 0 | 0 | -24 | 112 |
a2941e0e48351ce0154cdcae044ad2ff9fe3dea7 | 1,353 | py | Python | nmt/contrib/stat/parameter.py | Roxot/AEVNMT | 5ebc6ec76b2c891ab76a5584a15e735145fdc43b | [
"Apache-2.0"
] | 15 | 2018-07-30T13:19:58.000Z | 2019-10-20T13:58:10.000Z | nmt/contrib/stat/parameter.py | Roxot/AEVNMT | 5ebc6ec76b2c891ab76a5584a15e735145fdc43b | [
"Apache-2.0"
] | null | null | null | nmt/contrib/stat/parameter.py | Roxot/AEVNMT | 5ebc6ec76b2c891ab76a5584a15e735145fdc43b | [
"Apache-2.0"
] | null | null | null | """
Code to specify constraints on parameters of distributions.
:Authors: - Wilker Aziz
"""
| 21.47619 | 106 | 0.651885 | """
Code to specify constraints on parameters of distributions.
:Authors: - Wilker Aziz
"""
import tensorflow as tf
class Parameter:
"""
This class helps predict parameters by setting an appropriate activation to convert from the real line
to some subset of it.
"""
def __init__(self, activation_... | 0 | 0 | 0 | 1,092 | 0 | 0 | 0 | 2 | 160 |
cff3d0f7d9ee32251708111d01e0488ed57a3d55 | 1,426 | py | Python | venv/lib/python2.7/site-packages/pyowm/utils/stringutils.py | Shanka123/snips_assistant | 22603853f217008a7ebe68dd74c1f0651e3b7472 | [
"MIT"
] | null | null | null | venv/lib/python2.7/site-packages/pyowm/utils/stringutils.py | Shanka123/snips_assistant | 22603853f217008a7ebe68dd74c1f0651e3b7472 | [
"MIT"
] | null | null | null | venv/lib/python2.7/site-packages/pyowm/utils/stringutils.py | Shanka123/snips_assistant | 22603853f217008a7ebe68dd74c1f0651e3b7472 | [
"MIT"
] | null | null | null | def obfuscate_API_key(API_key):
"""
Return a mostly obfuscated version of the API Key
:param API_key: input string
:return: str
"""
if API_key is not None:
return (len(API_key)-8)*'*'+API_key[-8:]
def assert_is_string(value):
"""
Checks if the provided value is a valid string ... | 26.90566 | 81 | 0.643058 | def obfuscate_API_key(API_key):
"""
Return a mostly obfuscated version of the API Key
:param API_key: input string
:return: str
"""
if API_key is not None:
return (len(API_key)-8)*'*'+API_key[-8:]
def assert_is_string(value):
"""
Checks if the provided value is a valid string ... | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
adcc4e014d353f6d283392e6cf350802cc86b9dc | 8,245 | py | Python | avocado/query/oldparsers/dataview.py | rysdyk/avocado | 655c1a766be616cb1357ddff8bc345ab61ae9e8a | [
"BSD-2-Clause"
] | null | null | null | avocado/query/oldparsers/dataview.py | rysdyk/avocado | 655c1a766be616cb1357ddff8bc345ab61ae9e8a | [
"BSD-2-Clause"
] | null | null | null | avocado/query/oldparsers/dataview.py | rysdyk/avocado | 655c1a766be616cb1357ddff8bc345ab61ae9e8a | [
"BSD-2-Clause"
] | 2 | 2020-01-13T20:40:09.000Z | 2020-01-16T15:26:11.000Z | try:
from collections import OrderedDict
except ImportError:
SORT_DIRECTIONS = ('asc', 'desc')
| 28.728223 | 78 | 0.568587 | from warnings import warn
try:
from collections import OrderedDict
except ImportError:
from ordereddict import OrderedDict
from modeltree.tree import trees
SORT_DIRECTIONS = ('asc', 'desc')
class Node(object):
def __init__(self, facets=None, **context):
self.facets = facets or []
self.tr... | 0 | 914 | 0 | 4,412 | 0 | 2,623 | 0 | 29 | 162 |
976e3081ec9e3b6a1b324179a3f61e2e4ab7a961 | 1,125 | py | Python | q1.py | cs-fullstack-2019-fall/codeassessment2-rjrobins16 | 446f4b95ab35e7d93f14596424b12a318cb6023e | [
"Apache-2.0"
] | null | null | null | q1.py | cs-fullstack-2019-fall/codeassessment2-rjrobins16 | 446f4b95ab35e7d93f14596424b12a318cb6023e | [
"Apache-2.0"
] | null | null | null | q1.py | cs-fullstack-2019-fall/codeassessment2-rjrobins16 | 446f4b95ab35e7d93f14596424b12a318cb6023e | [
"Apache-2.0"
] | null | null | null | # ### Problem 1
# Ask the user to enter a number.
# Using the provided list of numbers, use a for loop to iterate
# the array and print out all the values that are smaller than the user input and print
# out all the values that are larger than the number entered by the user.
# ```
# # Start with this List
list_of_man... | 33.088235 | 121 | 0.721778 | # ### Problem 1
# Ask the user to enter a number.
# Using the provided list of numbers, use a for loop to iterate
# the array and print out all the values that are smaller than the user input and print
# out all the values that are larger than the number entered by the user.
# ```
# # Start with this List
list_of_man... | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
373115112003c34790c84aa0a64da3501e53d9f7 | 2,505 | py | Python | cping/protocols/tcp.py | hSaria/Pinger | 194ffe8bf4ab286d67803a78266a83bcb1208d45 | [
"MIT"
] | null | null | null | cping/protocols/tcp.py | hSaria/Pinger | 194ffe8bf4ab286d67803a78266a83bcb1208d45 | [
"MIT"
] | null | null | null | cping/protocols/tcp.py | hSaria/Pinger | 194ffe8bf4ab286d67803a78266a83bcb1208d45 | [
"MIT"
] | null | null | null | '''TCP ping.'''
| 31.3125 | 79 | 0.531737 | '''TCP ping.'''
import socket
import time
import cping.protocols
class Ping(cping.protocols.Ping):
'''TCP ping. The possible results:
* latency=x, error=False: successful TCP handshake
* latency=x, error=True: connection failure, like TCP-RST
* latency=-1, error=False: timeout
'''
... | 0 | 303 | 0 | 2,112 | 0 | 0 | 0 | -17 | 90 |
49216b9511d897ce7802fa8114cb589b0d073ab5 | 1,736 | py | Python | app/dashboard/admin.py | fxavier/sysgenesis | 5a405fd2c6cb35d7a335f233a1c667465499c381 | [
"MIT"
] | null | null | null | app/dashboard/admin.py | fxavier/sysgenesis | 5a405fd2c6cb35d7a335f233a1c667465499c381 | [
"MIT"
] | null | null | null | app/dashboard/admin.py | fxavier/sysgenesis | 5a405fd2c6cb35d7a335f233a1c667465499c381 | [
"MIT"
] | null | null | null | from django.contrib import admin
from dashboard.models import Inquerito, TipoSementeGerminou, TipoAreaGerminacao, VerificacaoSementes, Sementeira
admin.site.site_header = 'Genesis App Administration'
admin.site.register(Inquerito, InqueritoAdmin)
admin.site.register(TipoAreaGerminacao, TipoAreaGerminacaoAdmin)
ad... | 44.512821 | 124 | 0.769585 | from django.contrib import admin
from import_export.admin import ImportExportMixin
from dashboard.models import Inquerito, TipoSementeGerminou, TipoAreaGerminacao, VerificacaoSementes, RowControl, Sementeira
class InqueritoAdmin(ImportExportMixin, admin.ModelAdmin):
ordering = ["nome_agg_familiar", ]
list_d... | 0 | 0 | 0 | 1,046 | 0 | 0 | 0 | 40 | 149 |
81f9d87f0c8ce034264bba1b60fe9562531b7cd8 | 495 | py | Python | utils/custom_exception.py | xiaoxin1992/bind-pod | 30eda8f0fd5a374bee3548a103dcb0d99fa39630 | [
"MIT"
] | 12 | 2020-10-21T05:05:15.000Z | 2022-01-12T03:21:39.000Z | utils/custom_exception.py | xiaoxin1992/bind-pod | 30eda8f0fd5a374bee3548a103dcb0d99fa39630 | [
"MIT"
] | 2 | 2021-11-11T03:04:32.000Z | 2022-02-08T10:12:14.000Z | utils/custom_exception.py | xiaoxin1992/bind-pod | 30eda8f0fd5a374bee3548a103dcb0d99fa39630 | [
"MIT"
] | 5 | 2020-11-03T10:20:46.000Z | 2021-12-27T07:00:46.000Z | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
| 27.5 | 63 | 0.656566 | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
from rest_framework.views import exception_handler
def custom_exception_handler(exc, context):
if getattr(exc, "default_code", "") == "not_authenticated":
exc.status_code = 401
response = exception_handler(exc, context)
if response i... | 0 | 0 | 0 | 0 | 0 | 355 | 0 | 29 | 46 |
0ffe93f994b4b00feebe9a887cd16c2265e03664 | 153 | py | Python | twitter_data/urls.py | akshaylulla/stock_tweets | 6540b13b4ecf2e4d81af145286930dda09af0788 | [
"MIT"
] | 2 | 2021-01-13T00:33:03.000Z | 2021-06-27T06:44:56.000Z | twitter_data/urls.py | akshaylulla/stock_tweets | 6540b13b4ecf2e4d81af145286930dda09af0788 | [
"MIT"
] | null | null | null | twitter_data/urls.py | akshaylulla/stock_tweets | 6540b13b4ecf2e4d81af145286930dda09af0788 | [
"MIT"
] | null | null | null | from django.urls import path
from twitter_data.views import HomeView
urlpatterns = [
path('', HomeView.as_view(), name='home')
] | 21.857143 | 45 | 0.732026 | from django.urls import path
from twitter_data.views import HomeView
from . import views
urlpatterns = [
path('', HomeView.as_view(), name='home')
] | 0 | 0 | 0 | 0 | 0 | 0 | 0 | -2 | 22 |
d29245e8ae2ce48edb38e194ed770eceba29df5e | 1,670 | py | Python | nabu/neuralnetworks/loss_computers/deepattractornetnoise_soft_loss.py | Darleen2019/Nabu-MSSS | 5e862cbf846d45b8a317f87588533f3fde9f0726 | [
"MIT"
] | 18 | 2017-10-16T13:12:46.000Z | 2022-02-15T01:20:00.000Z | nabu/neuralnetworks/loss_computers/deepattractornetnoise_soft_loss.py | Darleen2019/Nabu-MSSS | 5e862cbf846d45b8a317f87588533f3fde9f0726 | [
"MIT"
] | null | null | null | nabu/neuralnetworks/loss_computers/deepattractornetnoise_soft_loss.py | Darleen2019/Nabu-MSSS | 5e862cbf846d45b8a317f87588533f3fde9f0726 | [
"MIT"
] | 9 | 2017-10-03T18:10:10.000Z | 2020-11-13T08:26:31.000Z | """@file deepattractornetnoise_soft_loss.py
contains the DeepattractornetnoisesoftLoss"""
| 35.531915 | 115 | 0.669461 | """@file deepattractornetnoise_soft_loss.py
contains the DeepattractornetnoisesoftLoss"""
import loss_computer
from nabu.neuralnetworks.components import ops
class DeepattractornetnoisesoftLoss(loss_computer.LossComputer):
"""A loss computer that calculates the loss"""
def __call__(self, targets, logits, se... | 0 | 0 | 0 | 1,487 | 0 | 0 | 0 | 24 | 68 |
4ef671806bd1627a2cc4a599914a121185433408 | 666 | py | Python | src/lib/decoders/__init__.py | sankhaMukherjee/scrapDrugs | d62e978cdd1b99616129c64b28eb4591f08cbdeb | [
"MIT"
] | null | null | null | src/lib/decoders/__init__.py | sankhaMukherjee/scrapDrugs | d62e978cdd1b99616129c64b28eb4591f08cbdeb | [
"MIT"
] | null | null | null | src/lib/decoders/__init__.py | sankhaMukherjee/scrapDrugs | d62e978cdd1b99616129c64b28eb4591f08cbdeb | [
"MIT"
] | null | null | null | '''Module containing decoders for different websited
This module contains decoders for decoding information from
various websites. Any new website that needs to be added
will contain information about how a particular website is to
be decoded over here. You should include modules here as they
become important.
The f... | 26.64 | 63 | 0.726727 | '''Module containing decoders for different websited
This module contains decoders for decoding information from
various websites. Any new website that needs to be added
will contain information about how a particular website is to
be decoded over here. You should include modules here as they
become important.
The f... | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
07ae5a235d0f19ace98631ac28736ed8e7fc43c9 | 591 | py | Python | Day5/Remove_nth_node_from_end_of_linked_list.py | DsaWithPython/Striver_SDE_SHEET_python | 1fe343a8d3388de91d289306284881ec2d2e5f26 | [
"MIT"
] | 1 | 2022-02-11T13:13:47.000Z | 2022-02-11T13:13:47.000Z | Day5/Remove_nth_node_from_end_of_linked_list.py | DsaWithPython/Striver_SDE_SHEET_python | 1fe343a8d3388de91d289306284881ec2d2e5f26 | [
"MIT"
] | null | null | null | Day5/Remove_nth_node_from_end_of_linked_list.py | DsaWithPython/Striver_SDE_SHEET_python | 1fe343a8d3388de91d289306284881ec2d2e5f26 | [
"MIT"
] | null | null | null | # Definition for singly-linked list.
# class ListNode:
# def __init__(self, val=0, next=None):
# self.val = val
# self.next = next
| 26.863636 | 87 | 0.538071 | # Definition for singly-linked list.
# class ListNode:
# def __init__(self, val=0, next=None):
# self.val = val
# self.next = next
class Solution:
def removeNthFromEnd(self, head: Optional[ListNode], n: int) -> Optional[ListNode]:
start = ListNode()
start.next = head
fast... | 0 | 0 | 0 | 409 | 0 | 0 | 0 | 0 | 22 |
122080cc117e09bd7a3e963c093135533439d9bb | 3,816 | py | Python | sysmpy/matrix_for_graph.py | pcyoung75/SysMPy | 2684e28eb8ad63c351e3327591bc2d988480e6a3 | [
"Apache-2.0"
] | null | null | null | sysmpy/matrix_for_graph.py | pcyoung75/SysMPy | 2684e28eb8ad63c351e3327591bc2d988480e6a3 | [
"Apache-2.0"
] | null | null | null | sysmpy/matrix_for_graph.py | pcyoung75/SysMPy | 2684e28eb8ad63c351e3327591bc2d988480e6a3 | [
"Apache-2.0"
] | null | null | null |
# Test ###############################################################
# mn = MatrixForGraph(np.matrix([[1, 2, 3], [3, 4, 5], [6, 7, 8]]))
# print(mn.sum_column())
| 31.02439 | 102 | 0.492925 | import numpy as np
from sysmpy.entity import *
from operator import add
class MatrixForGraph():
def __init__(self, m=None):
self.m = m
self.entity = None
def sum_upper_diagonal(self, m=None):
if m is None:
m = self.m
ret_matrix = np.zeros(m.shape)
for x in ... | 0 | 0 | 0 | 3,554 | 0 | 0 | 0 | 6 | 89 |
bdc1620eb52cc9e2d6cc7a6a615baa7d381aa6b8 | 28,939 | py | Python | lib/fast_rcnn/train_comb.py | yanxp/Weakly-object-detection | ffb3ac5f745bf6977b870b90c807b75e4d83cfb7 | [
"MIT"
] | 2 | 2018-02-14T15:58:04.000Z | 2019-12-05T07:38:39.000Z | lib/fast_rcnn/train_comb.py | yanxp/Weakly-object-detection | ffb3ac5f745bf6977b870b90c807b75e4d83cfb7 | [
"MIT"
] | null | null | null | lib/fast_rcnn/train_comb.py | yanxp/Weakly-object-detection | ffb3ac5f745bf6977b870b90c807b75e4d83cfb7 | [
"MIT"
] | 3 | 2018-03-24T09:06:23.000Z | 2020-07-03T01:07:57.000Z | # --------------------------------------------------------
# Fast R-CNN
# Copyright (c) 2015 Microsoft
# Licensed under The MIT License [see LICENSE for details]
# Written by Ross Girshick
# --------------------------------------------------------
"""Train a Fast R-CNN network."""
import caffe
from fast_rcnn... | 46.978896 | 231 | 0.530115 | # --------------------------------------------------------
# Fast R-CNN
# Copyright (c) 2015 Microsoft
# Licensed under The MIT License [see LICENSE for details]
# Written by Ross Girshick
# --------------------------------------------------------
"""Train a Fast R-CNN network."""
import caffe
from fast_rcnn... | 0 | 0 | 0 | 26,161 | 0 | 690 | 0 | 0 | 48 |
6251c1812efbf5e49d8f9ded518100c8ef6a2a0a | 680 | py | Python | minus80_main.py | nikki-t/minus80 | 4c3075c69cc00da2276695d2353f21e9be140f6e | [
"MIT"
] | null | null | null | minus80_main.py | nikki-t/minus80 | 4c3075c69cc00da2276695d2353f21e9be140f6e | [
"MIT"
] | null | null | null | minus80_main.py | nikki-t/minus80 | 4c3075c69cc00da2276695d2353f21e9be140f6e | [
"MIT"
] | null | null | null | """Program that monitors a Raspberry Pi attached to a minus 80 freezer.
Functions
---------
monitor(): Creates Board object to watch the state of an input pin.
"""
# Local application imports
from app.Board import Board
PIN = 11
def monitor():
"""Creates a Board object to monitor the state of an input pin."... | 21.935484 | 71 | 0.65 | """Program that monitors a Raspberry Pi attached to a minus 80 freezer.
Functions
---------
monitor(): Creates Board object to watch the state of an input pin.
"""
# Local application imports
from app.Board import Board
PIN = 11
def monitor():
"""Creates a Board object to monitor the state of an input pin."... | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
db1b947d4cd98708096ef8e54e90ee5cade83492 | 26 | py | Python | stop/__init__.py | iboraham/senior-project | 766fa2c9dd8b4beaa85d48ef71e3c70b525beef2 | [
"MIT"
] | 1 | 2021-01-28T07:55:26.000Z | 2021-01-28T07:55:26.000Z | stop/__init__.py | iboraham/senior-project | 766fa2c9dd8b4beaa85d48ef71e3c70b525beef2 | [
"MIT"
] | null | null | null | stop/__init__.py | iboraham/senior-project | 766fa2c9dd8b4beaa85d48ef71e3c70b525beef2 | [
"MIT"
] | 2 | 2020-02-03T11:30:44.000Z | 2020-02-03T11:58:06.000Z | import stop
stop.main()
| 5.2 | 11 | 0.692308 | import stop
stop.main()
| 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
edd0106fc9ccdbad9a7e40451021c5efbdc7d8c7 | 1,428 | py | Python | CompetitiveProgramming/CodeChef/P40_COINS.py | Sahil2rick/School-PythonProject | e7a8c283446bf773c4456930f77c8c85c40f593c | [
"MIT"
] | null | null | null | CompetitiveProgramming/CodeChef/P40_COINS.py | Sahil2rick/School-PythonProject | e7a8c283446bf773c4456930f77c8c85c40f593c | [
"MIT"
] | null | null | null | CompetitiveProgramming/CodeChef/P40_COINS.py | Sahil2rick/School-PythonProject | e7a8c283446bf773c4456930f77c8c85c40f593c | [
"MIT"
] | null | null | null | # In Byteland they have a very strange monetary system.
#
# Each Bytelandian gold coin has an integer number written on it. A coin n can be exchanged in a bank into
# three coins: n/2, n/3 and n/4. But these numbers are all rounded down (the banks have to make a profit).
#
# You can also sell Bytelandian coins for Amer... | 29.75 | 108 | 0.670868 | # In Byteland they have a very strange monetary system.
#
# Each Bytelandian gold coin has an integer number written on it. A coin n can be exchanged in a bank into
# three coins: n/2, n/3 and n/4. But these numbers are all rounded down (the banks have to make a profit).
#
# You can also sell Bytelandian coins for Amer... | 0 | 0 | 0 | 0 | 0 | 181 | 0 | 0 | 22 |
344fbec7af64b28bb0afae054b8d5a26e30c93e4 | 1,131 | py | Python | qcm/models/questionsset.py | thenchoz/Django_ERA_Lessons_training | e02d775526f76c7ab43ef5e8b1029802e5fa58db | [
"MIT"
] | null | null | null | qcm/models/questionsset.py | thenchoz/Django_ERA_Lessons_training | e02d775526f76c7ab43ef5e8b1029802e5fa58db | [
"MIT"
] | null | null | null | qcm/models/questionsset.py | thenchoz/Django_ERA_Lessons_training | e02d775526f76c7ab43ef5e8b1029802e5fa58db | [
"MIT"
] | null | null | null | """
QuestionsSet model
"""
| 26.302326 | 88 | 0.668435 | """
QuestionsSet model
"""
from random import random
from django.db import models
from polymorphic.models import PolymorphicModel
class QuestionsSet(PolymorphicModel):
"""Abstract class, another way of regrouping question"""
name = models.CharField(max_length=100)
def __str__(self):
return sel... | 0 | 0 | 0 | 975 | 0 | 0 | 0 | 37 | 91 |
6fa28a2b39b27960f4098ed7da8b5885555cadd7 | 556 | py | Python | sort/cocktail.py | Wind2esg/python3sort | ead213f75a54da7d476865e3cf0a551ab0970d7d | [
"MIT"
] | 1 | 2018-01-30T04:44:05.000Z | 2018-01-30T04:44:05.000Z | sort/cocktail.py | Wind2esg/python3sort | ead213f75a54da7d476865e3cf0a551ab0970d7d | [
"MIT"
] | null | null | null | sort/cocktail.py | Wind2esg/python3sort | ead213f75a54da7d476865e3cf0a551ab0970d7d | [
"MIT"
] | null | null | null | # python3 sort <http://github.com/Wind2esg/python3sort>
# Copyright 2018 Wind2esg
# Released under the MIT license <http://github.com/Wind2esg/python3sort/LICENSE>
| 29.263158 | 81 | 0.613309 | # python3 sort <http://github.com/Wind2esg/python3sort>
# Copyright 2018 Wind2esg
# Released under the MIT license <http://github.com/Wind2esg/python3sort/LICENSE>
from _comparer import int_comparer
def cocktail(array, compare=int_comparer):
left = 0
right = len(array) - 1
step = 1
while left != righ... | 0 | 0 | 0 | 0 | 0 | 332 | 0 | 13 | 46 |
c3540fb02e938bcb40744e281324939bc5d4fac3 | 844 | py | Python | httpx_scraper.py | msec1203/Scrape-With-Httpx | 161fb4597e867f87b511b2e4319c40858846667e | [
"MIT"
] | null | null | null | httpx_scraper.py | msec1203/Scrape-With-Httpx | 161fb4597e867f87b511b2e4319c40858846667e | [
"MIT"
] | null | null | null | httpx_scraper.py | msec1203/Scrape-With-Httpx | 161fb4597e867f87b511b2e4319c40858846667e | [
"MIT"
] | null | null | null | __author__ = "Michael Rippey @nahamike01"
__date__ = "2020/05/26"
"""
Author: Michael Rippey (c) 2020
Copyright 2020 Michael Rippey
See LICENSE.md for details
"""
scrape_news_articles('https://cybersecurity-jp.com') | 22.210526 | 65 | 0.675355 | __author__ = "Michael Rippey @nahamike01"
__date__ = "2020/05/26"
"""
Author: Michael Rippey (c) 2020
Copyright 2020 Michael Rippey
See LICENSE.md for details
"""
import httpx
from bs4 import BeautifulSoup
import urllib
import sys
def scrape_news_articles(site_name):
news_links = []
target_url = site_name
... | 0 | 0 | 0 | 0 | 0 | 514 | 0 | -20 | 113 |
ed722fe4a2c5e9f16687fb5ad595286c819816b5 | 2,511 | py | Python | utils/mailsender.py | myinxd/cavdet | 7a3eddfb9c94223ce35dc7133bfa7e2e7545df25 | [
"MIT"
] | null | null | null | utils/mailsender.py | myinxd/cavdet | 7a3eddfb9c94223ce35dc7133bfa7e2e7545df25 | [
"MIT"
] | null | null | null | utils/mailsender.py | myinxd/cavdet | 7a3eddfb9c94223ce35dc7133bfa7e2e7545df25 | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
"""
A simple tool to send email by python
References
----------
[1] http://jingyan.baidu.com/article/b24f6c822784b886bfe5dabe.html
[2] email https://docs.python.org/3.4/library/email.mime.html
"""
import smtplib
from email.mime.text import MIMEText
import argparse
def send_mail(from_user, from... | 27.593407 | 79 | 0.649144 | #!/usr/bin/env python3
"""
A simple tool to send email by python
References
----------
[1] http://jingyan.baidu.com/article/b24f6c822784b886bfe5dabe.html
[2] email https://docs.python.org/3.4/library/email.mime.html
"""
import smtplib
from email.mime.text import MIMEText
import argparse
def send_mail(from_user, from... | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
521fc50aa6050f22a5d3bb1014b1b057c4b2d02d | 1,810 | py | Python | pps/helper.py | SeungUkLee/preview-pipfile-script | d28d963f1feee9ed1621a04b25c02d34a0919829 | [
"MIT"
] | null | null | null | pps/helper.py | SeungUkLee/preview-pipfile-script | d28d963f1feee9ed1621a04b25c02d34a0919829 | [
"MIT"
] | null | null | null | pps/helper.py | SeungUkLee/preview-pipfile-script | d28d963f1feee9ed1621a04b25c02d34a0919829 | [
"MIT"
] | null | null | null | """
Functions that help the run 'pps' command
"""
import subprocess
import inquirer
import toml
from .message import (INQUIRER_MSG)
def exception(function):
"""
A decorator that wraps the passed in function and logs
exceptions should one occur
"""
return wrapper
def read_file(file_path):
... | 21.294118 | 76 | 0.650276 | """
Functions that help the run 'pps' command
"""
import functools
import subprocess
import inquirer
import toml
from .message import (
FILE_NOT_FOUND_MSG,
INQUIRER_MSG,
KEYBOARD_INTERRUPT_MSG,
KEYWORD_NOT_FOUND_MSG,
)
def exception(function):
"""
A decorator that wraps the passed in functio... | 0 | 368 | 0 | 0 | 0 | 0 | 0 | 81 | 49 |
766058f5d5e85857d99f526b2acc3c2e2ec9fca4 | 6,226 | py | Python | tests/cid_utbase.py | futoin/citool | 872ecca94fb637fa4e5e79cb62c240e774e3cd83 | [
"Apache-2.0"
] | 13 | 2017-04-05T22:19:15.000Z | 2017-11-23T21:02:26.000Z | tests/cid_utbase.py | futoin/cid-tool | 872ecca94fb637fa4e5e79cb62c240e774e3cd83 | [
"Apache-2.0"
] | 77 | 2017-04-01T07:47:15.000Z | 2019-06-04T14:23:16.000Z | tests/cid_utbase.py | futoin/citool | 872ecca94fb637fa4e5e79cb62c240e774e3cd83 | [
"Apache-2.0"
] | 3 | 2017-05-13T09:28:50.000Z | 2017-11-17T06:42:49.000Z | #
# Copyright 2015-2020 Andrey Galkin <andrey@futoin.org>
#
# 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 applicabl... | 29.367925 | 119 | 0.560553 | #
# Copyright 2015-2020 Andrey Galkin <andrey@futoin.org>
#
# 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 applicabl... | 0 | 3,530 | 0 | 1,595 | 0 | 0 | 0 | -26 | 252 |
b9753f0e9c40ce23710e1f55400dc44bda48b295 | 4,528 | py | Python | test/unittest/datafinder_test/core/configuration/icons/icon_test.py | schlauch/DataFinder | 958fda4f3064f9f6b2034da396a20ac9d9abd52f | [
"BSD-3-Clause"
] | 9 | 2016-05-25T06:12:52.000Z | 2021-04-30T07:22:48.000Z | test/unittest/datafinder_test/core/configuration/icons/icon_test.py | schlauch/DataFinder | 958fda4f3064f9f6b2034da396a20ac9d9abd52f | [
"BSD-3-Clause"
] | 6 | 2016-03-29T13:38:18.000Z | 2017-01-18T15:57:42.000Z | test/unittest/datafinder_test/core/configuration/icons/icon_test.py | schlauch/DataFinder | 958fda4f3064f9f6b2034da396a20ac9d9abd52f | [
"BSD-3-Clause"
] | 7 | 2016-06-15T12:01:22.000Z | 2022-03-05T08:50:25.000Z | # $Filename$
# $Authors$
# Last Changed: $Date$ $Committer$ $Revision-Id$
#
# Copyright (c) 2003-2011, German Aerospace Center (DLR)
# All rights reserved.
#
#
#Redistribution and use in source and binary forms, with or without
#modification, are permitted provided that the following conditions are
#met:
#
... | 43.961165 | 99 | 0.667403 | # $Filename$
# $Authors$
# Last Changed: $Date$ $Committer$ $Revision-Id$
#
# Copyright (c) 2003-2011, German Aerospace Center (DLR)
# All rights reserved.
#
#
#Redistribution and use in source and binary forms, with or without
#modification, are permitted provided that the following conditions are
#met:
#
... | 0 | 0 | 0 | 2,487 | 0 | 0 | 0 | 115 | 144 |
20d5c99c25391b1d8ad49c1cb5ac96c37b7d338b | 2,947 | py | Python | scripts/summit_scripts/test_namsa_mpi.py | nlaanait/namsa | 55f82ecf1c82601fcb81815d5e60705506c01e1e | [
"MIT"
] | null | null | null | scripts/summit_scripts/test_namsa_mpi.py | nlaanait/namsa | 55f82ecf1c82601fcb81815d5e60705506c01e1e | [
"MIT"
] | null | null | null | scripts/summit_scripts/test_namsa_mpi.py | nlaanait/namsa | 55f82ecf1c82601fcb81815d5e60705506c01e1e | [
"MIT"
] | null | null | null | import numpy as np
import sys
import h5py
from mpi4py import MPI
import os
comm = MPI.COMM_WORLD
comm_size = comm.Get_size()
comm_rank = comm.Get_rank()
#job_pid = os.environ.get('LS_JOBPID')
#job_id = os.environ.get('LSB_JOBID')
#hosts = np.array(os.environ.get('LSB_HOSTS').split(' '))
#job_hosts = np.unique(hosts)
... | 34.670588 | 104 | 0.628096 | from namsa import SupercellBuilder, MSAMPI
from namsa.utils import imageTile
import numpy as np
from time import time
import sys
import h5py
from mpi4py import MPI
import os
comm = MPI.COMM_WORLD
comm_size = comm.Get_size()
comm_rank = comm.Get_rank()
#job_pid = os.environ.get('LS_JOBPID')
#job_id = os.environ.get('L... | 0 | 0 | 0 | 0 | 0 | 1,514 | 0 | 33 | 89 |
e10612b06875ba9895be8483b88e3024aebc4dc2 | 268 | py | Python | ResortTemplate/views.py | jpriggs/resort-template | 857f992ff91c8246042f026d1f8942650d03c2aa | [
"MIT"
] | null | null | null | ResortTemplate/views.py | jpriggs/resort-template | 857f992ff91c8246042f026d1f8942650d03c2aa | [
"MIT"
] | null | null | null | ResortTemplate/views.py | jpriggs/resort-template | 857f992ff91c8246042f026d1f8942650d03c2aa | [
"MIT"
] | null | null | null | import os
from flask import Flask
basedir = os.path.abspath(os.path.dirname(__file__))
app = Flask(__name__)
# Views
if __name__ == "__main__":
app.run(debug=True)
| 17.866667 | 52 | 0.712687 | import os
from flask import Flask, render_template, url_for
basedir = os.path.abspath(os.path.dirname(__file__))
app = Flask(__name__)
# Views
@app.route('/')
def index():
return render_template("index.html")
if __name__ == "__main__":
app.run(debug=True)
| 0 | 48 | 0 | 0 | 0 | 0 | 0 | 26 | 22 |
f43afcad9e59c8e4b1be905496080f7d09321427 | 1,851 | py | Python | splinter/browser.py | kidosoft/splinter | 6d5052fd73c0a626299574cea76924e367c67faa | [
"BSD-3-Clause"
] | 2 | 2021-01-24T20:07:03.000Z | 2021-12-09T06:23:28.000Z | splinter/browser.py | kidosoft/splinter | 6d5052fd73c0a626299574cea76924e367c67faa | [
"BSD-3-Clause"
] | null | null | null | splinter/browser.py | kidosoft/splinter | 6d5052fd73c0a626299574cea76924e367c67faa | [
"BSD-3-Clause"
] | 1 | 2015-01-09T02:04:45.000Z | 2015-01-09T02:04:45.000Z | # -*- coding: utf-8 -*-
# Copyright 2012 splinter authors. All rights reserved.
# Use of this source code is governed by a BSD-style
# license that can be found in the LICENSE file.
import sys
from splinter.driver.webdriver.firefox import WebDriver as FirefoxWebDriver
from splinter.driver.webdriver.remote import Web... | 28.921875 | 79 | 0.729876 | # -*- coding: utf-8 -*-
# Copyright 2012 splinter authors. All rights reserved.
# Use of this source code is governed by a BSD-style
# license that can be found in the LICENSE file.
import sys
from splinter.driver.webdriver.firefox import WebDriver as FirefoxWebDriver
from splinter.driver.webdriver.remote import Web... | 0 | 0 | 0 | 0 | 0 | 0 | 0 | -17 | 68 |
bfacd85fe0047543d3ddeeb476baefaedc6a4674 | 18,330 | py | Python | scripts/find_subtypes.py | jefftc/changlab | 11da8c415afefcba0b0216238387c75aeb3a56ac | [
"MIT"
] | 9 | 2017-01-13T02:38:41.000Z | 2021-04-08T00:44:39.000Z | scripts/find_subtypes.py | jefftc/changlab | 11da8c415afefcba0b0216238387c75aeb3a56ac | [
"MIT"
] | null | null | null | scripts/find_subtypes.py | jefftc/changlab | 11da8c415afefcba0b0216238387c75aeb3a56ac | [
"MIT"
] | 4 | 2017-01-05T16:25:25.000Z | 2019-12-12T20:07:38.000Z | #!/usr/bin/env python
# make_file_layout
# init_paths
#
# align_dataset
# write_dataset
# write_selap_dataset
# write_model
# check_model
#
# make_model
# predict_subgroups
#
# summarize_predictions
# summarize_heatmap
# summarize_subgroups
# A SELAP model file contains:
# mu.txt SELAPver3 nvar x nclust
# s... | 34.914286 | 79 | 0.657883 | #!/usr/bin/env python
# make_file_layout
# init_paths
#
# align_dataset
# write_dataset
# write_selap_dataset
# write_model
# check_model
#
# make_model
# predict_subgroups
#
# summarize_predictions
# summarize_heatmap
# summarize_subgroups
# A SELAP model file contains:
# mu.txt SELAPver3 nvar x nclust
# s... | 0 | 0 | 0 | 0 | 0 | 17,436 | 0 | -7 | 326 |
897ecb2108508f4f90ff14647a4035357cb66b02 | 6,918 | py | Python | zfused_api/step.py | qinningfx/zfused_outsource | bfc5558f05e3d6005653794a47bd863b61b009b1 | [
"Apache-2.0"
] | 2 | 2019-02-22T03:33:26.000Z | 2019-02-23T03:29:26.000Z | zfused_api/step.py | qinningfx/zfused_outsource | bfc5558f05e3d6005653794a47bd863b61b009b1 | [
"Apache-2.0"
] | null | null | null | zfused_api/step.py | qinningfx/zfused_outsource | bfc5558f05e3d6005653794a47bd863b61b009b1 | [
"Apache-2.0"
] | null | null | null | # coding:utf-8
# --author-- lanhua.zhou
from __future__ import print_function
import os
import json
import logging
# read database
DATABASE_PATH = os.path.dirname(os.path.dirname(__file__))
STEP_DATABASE_FILE = "{}/database/step.json".format(DATABASE_PATH)
PROJECT_STEP_DATABASE_FILE = "{}/database/conn_project_step.j... | 30.342105 | 127 | 0.559121 | # coding:utf-8
# --author-- lanhua.zhou
from __future__ import print_function
import os
import json
import datetime
import logging
import zfused_api
# read database
DATABASE_PATH = os.path.dirname(os.path.dirname(__file__))
STEP_DATABASE_FILE = "{}/database/step.json".format(DATABASE_PATH)
PROJECT_STEP_DATABASE_FILE... | 195 | 0 | 0 | 5,471 | 0 | 0 | 0 | -10 | 91 |
3f6bfab67478a1f5ff21be0d9e63bf09ba8810b0 | 624 | py | Python | better_guessing_game.py | wdmwilcox/guessinggames | 07f51e33ab92e4e79e33411d03ba074066e42c10 | [
"MIT"
] | null | null | null | better_guessing_game.py | wdmwilcox/guessinggames | 07f51e33ab92e4e79e33411d03ba074066e42c10 | [
"MIT"
] | null | null | null | better_guessing_game.py | wdmwilcox/guessinggames | 07f51e33ab92e4e79e33411d03ba074066e42c10 | [
"MIT"
] | null | null | null | # import
# main
main()
| 21.517241 | 54 | 0.623397 | # import
import random
import time
# main
def main():
numbers = []
print('How many numbers do you want to guess from?')
amount_of_numbers = int(input(' > '))
print('What is your number?')
player_number = int(input(' > '))
print('Let me guess your number.')
for i in range(amount_of_numbers):
numbe... | 0 | 0 | 0 | 0 | 0 | 542 | 0 | -18 | 69 |
ffb0a2715eeb5765567bddb65d9f9ddcb64b67a9 | 320 | py | Python | acmicpc/4344/4344.py | love-adela/algorithm | 4ccd02173c96f8369962f1fd4e5166a221690fa2 | [
"MIT"
] | 3 | 2019-03-09T05:19:23.000Z | 2019-04-06T09:26:36.000Z | acmicpc/4344/4344.py | love-adela/algorithm | 4ccd02173c96f8369962f1fd4e5166a221690fa2 | [
"MIT"
] | 1 | 2020-02-23T10:38:04.000Z | 2020-02-23T10:38:04.000Z | acmicpc/4344/4344.py | love-adela/algorithm | 4ccd02173c96f8369962f1fd4e5166a221690fa2 | [
"MIT"
] | 1 | 2019-05-22T13:47:53.000Z | 2019-05-22T13:47:53.000Z | N = int(input())
for i in range(N):
serial = list(map(int, input().split()))
get_proportion(serial)
| 24.615385 | 62 | 0.6 | N = int(input())
def get_proportion(x):
number = x[0]
average = (sum(x[1:]) / number)
upper = len([score for score in x[1:] if score > average])
proportion = upper / number * 100
print(f'{proportion:.3f}%')
for i in range(N):
serial = list(map(int, input().split()))
get_proportion(serial)
| 0 | 0 | 0 | 0 | 0 | 188 | 0 | 0 | 23 |
7543559330e0ad0bed405e4c8abadd74915a1bae | 2,914 | py | Python | agent/kraken/agent/kraken_pytest.py | fossabot/kraken-3 | 7ac472de8ff6f44aac4dbd231f896f00e6f3b278 | [
"Apache-2.0"
] | 66 | 2020-08-14T12:52:39.000Z | 2022-03-31T13:56:25.000Z | agent/kraken/agent/kraken_pytest.py | kinsanras/kraken | 3938ee4e65ba8f67ec5ee0e912b43fad84548f2c | [
"Apache-2.0"
] | 110 | 2020-07-23T07:12:09.000Z | 2022-03-26T05:54:18.000Z | agent/kraken/agent/kraken_pytest.py | kinsanras/kraken | 3938ee4e65ba8f67ec5ee0e912b43fad84548f2c | [
"Apache-2.0"
] | 4 | 2021-03-10T05:25:03.000Z | 2022-01-24T10:12:33.000Z | # Copyright 2020 The Kraken Authors
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in wr... | 27.752381 | 113 | 0.586136 | # Copyright 2020 The Kraken Authors
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in wr... | 0 | 0 | 0 | 0 | 0 | 2,103 | 0 | -1 | 114 |
f3c9e8bc32964f64bb16234f3c7a882861b05962 | 6,093 | py | Python | Code/project/accounts/views.py | NSU-SU21-CSE299-SAS3/Group01 | 3d6bf6da87504d3532c92a8188bc2aee64b35373 | [
"MIT"
] | null | null | null | Code/project/accounts/views.py | NSU-SU21-CSE299-SAS3/Group01 | 3d6bf6da87504d3532c92a8188bc2aee64b35373 | [
"MIT"
] | null | null | null | Code/project/accounts/views.py | NSU-SU21-CSE299-SAS3/Group01 | 3d6bf6da87504d3532c92a8188bc2aee64b35373 | [
"MIT"
] | 1 | 2021-09-13T14:13:41.000Z | 2021-09-13T14:13:41.000Z |
# verification imports
# Create your views here.
| 30.61809 | 126 | 0.731167 | from django.shortcuts import render, redirect
from .forms import RegistrationForm
from .models import Account
from django.contrib import messages, auth
from django.contrib.auth.decorators import login_required
from django.http import HttpResponse
from carts.models import Cart, CartItem
from carts.views import _cart_id
... | 0 | 212 | 0 | 0 | 0 | 4,966 | 0 | 344 | 513 |
375657e1ff70527a6502d8ff3f3342674e4182ad | 2,097 | py | Python | nova/api/ec2/cloud.py | bopopescu/nova-token | ec98f69dea7b3e2b9013b27fd55a2c1a1ac6bfb2 | [
"Apache-2.0"
] | null | null | null | nova/api/ec2/cloud.py | bopopescu/nova-token | ec98f69dea7b3e2b9013b27fd55a2c1a1ac6bfb2 | [
"Apache-2.0"
] | null | null | null | nova/api/ec2/cloud.py | bopopescu/nova-token | ec98f69dea7b3e2b9013b27fd55a2c1a1ac6bfb2 | [
"Apache-2.0"
] | 2 | 2017-07-20T17:31:34.000Z | 2020-07-24T02:42:19.000Z | begin_unit
comment|'# Copyright 2010 United States Government as represented by the'
nl|'\n'
comment|'# Administrator of the National Aeronautics and Space Administration.'
nl|'\n'
comment|'# All Rights Reserved.'
nl|'\n'
comment|'#'
nl|'\n'
comment|'# Licensed under the Apache License, Version 2.0 (the "License"); ... | 19.238532 | 88 | 0.666667 | begin_unit
comment|'# Copyright 2010 United States Government as represented by the'
nl|'\n'
comment|'# Administrator of the National Aeronautics and Space Administration.'
nl|'\n'
comment|'# All Rights Reserved.'
nl|'\n'
comment|'#'
nl|'\n'
comment|'# Licensed under the Apache License, Version 2.0 (the "License"); ... | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
524dd71578c02543ff8cec0dc08d53ac970f7c5f | 4,432 | py | Python | app/rate/models.py | SadraMoghadam/software_engineering_undergraduate_project | 9fd638a6e2a06167fe6f893ab58322f5f3a5dbbf | [
"MIT"
] | 1 | 2019-12-30T16:49:02.000Z | 2019-12-30T16:49:02.000Z | app/rate/models.py | SadraMoghadam/software_engineering_undergraduate_project | 9fd638a6e2a06167fe6f893ab58322f5f3a5dbbf | [
"MIT"
] | null | null | null | app/rate/models.py | SadraMoghadam/software_engineering_undergraduate_project | 9fd638a6e2a06167fe6f893ab58322f5f3a5dbbf | [
"MIT"
] | null | null | null | from django.db.models.signals import pre_save
# Signals
pre_save.connect(caculate_university_overall_score, sender=UniversityRate)
pre_save.connect(caculate_professor_overall_score, sender=ProfessorRate)
| 28.779221 | 79 | 0.672383 | from django.db import models
from django.db.models.signals import pre_save
from user.models import CustomUser
class TagManager(models.Manager):
def get_or_create(self, name):
tag = None
try:
tag = self.get(name=name)
return tag
except Tag.DoesNotExist:
t... | 0 | 0 | 0 | 3,457 | 0 | 465 | 0 | 20 | 273 |
3b55af8729820b5b5a0f3c45e2bb3995831ee0dc | 5,312 | py | Python | knowit/__main__.py | labrys/knowit | eea9ac18e38c930230cf81b5dca4a9af9fb10d4e | [
"MIT"
] | null | null | null | knowit/__main__.py | labrys/knowit | eea9ac18e38c930230cf81b5dca4a9af9fb10d4e | [
"MIT"
] | null | null | null | knowit/__main__.py | labrys/knowit | eea9ac18e38c930230cf81b5dca4a9af9fb10d4e | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
import json
import logging
import sys
from argparse import ArgumentParser
from six import PY2
import yaml
from . import (__url__, __version__, api)
from .provider import ProviderError
from .serializer import (get_json_encoder, get_yaml_dumper)
from .uti... | 34.947368 | 115 | 0.6218 | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
import json
import logging
import sys
from argparse import ArgumentParser
from six import PY2
import yaml
from . import (
__url__,
__version__,
api,
)
from .provider import ProviderError
from .serializer import (
get_json_encoder,
ge... | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 26 | 0 |
5dbab7e909abcb25f55a021575aea3214a7bbc6f | 1,409 | py | Python | pyuppaal/pyuppaal/ulp/_build_tables.py | sen-uni-kn/tartar | 5148f8737ab39c09aa0ca4907b1af7c44cf8b8a0 | [
"MIT"
] | null | null | null | pyuppaal/pyuppaal/ulp/_build_tables.py | sen-uni-kn/tartar | 5148f8737ab39c09aa0ca4907b1af7c44cf8b8a0 | [
"MIT"
] | null | null | null | pyuppaal/pyuppaal/ulp/_build_tables.py | sen-uni-kn/tartar | 5148f8737ab39c09aa0ca4907b1af7c44cf8b8a0 | [
"MIT"
] | null | null | null | """
Copyright (C) 2011
Mads Chr. Olesen <mchro@cs.aau.dk>
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later versi... | 32.022727 | 78 | 0.672108 | """
Copyright (C) 2011
Mads Chr. Olesen <mchro@cs.aau.dk>
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later versi... | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 10 | 22 |
00488e2bc1817896a70432cf999d842c0f6e9e4b | 1,223 | py | Python | uninstrumented/lower/lower.py | timescale/promscale-tracing-demo | a71fce67369a5b222c8617ea2a4c96b873a90680 | [
"Apache-2.0"
] | 1 | 2022-01-25T14:41:47.000Z | 2022-01-25T14:41:47.000Z | uninstrumented/lower/lower.py | timescale/promscale-tracing-demo | a71fce67369a5b222c8617ea2a4c96b873a90680 | [
"Apache-2.0"
] | null | null | null | uninstrumented/lower/lower.py | timescale/promscale-tracing-demo | a71fce67369a5b222c8617ea2a4c96b873a90680 | [
"Apache-2.0"
] | null | null | null |
from flask import Flask
app = Flask(__name__)
if __name__ == '__main__':
app.run()
| 21.45614 | 57 | 0.603434 | import string
import random
import time
from flask import Flask, Response
from flask.json import jsonify
app = Flask(__name__)
def work(mu: float, sigma: float) -> None:
# simulate work being done
time.sleep(max(0.0, random.normalvariate(mu, sigma)))
def random_lower() -> str:
# gets progressively slow... | 0 | 82 | 0 | 0 | 0 | 842 | 0 | -7 | 203 |
9bdd2307e4acfef95d4bbe1e8033a47eee81b24f | 527 | py | Python | tests/test_api.py | hrgupta/dogapp | ea1c22293abc1c3f6e4b3bf2775cb7fa612f735a | [
"MIT"
] | null | null | null | tests/test_api.py | hrgupta/dogapp | ea1c22293abc1c3f6e4b3bf2775cb7fa612f735a | [
"MIT"
] | null | null | null | tests/test_api.py | hrgupta/dogapp | ea1c22293abc1c3f6e4b3bf2775cb7fa612f735a | [
"MIT"
] | null | null | null | from fastapi.testclient import TestClient
from dogapp.app import app
client = TestClient(app) | 37.642857 | 196 | 0.745731 | from fastapi.testclient import TestClient
from dogapp.app import app
client = TestClient(app)
def test_index():
response = client.get("/")
assert response.status_code == 200
def test_predict():
body = {"urls": ["https://www.thesprucepets.com/thmb/wpN_ZunUaRQAc_WRdAQRxeTbyoc=/4231x2820/filters:fill(auto,1... | 0 | 0 | 0 | 0 | 0 | 387 | 0 | 0 | 46 |