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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
5806d30fd2b6d03c8ac3171dca9e6d05c41861b2 | 18,037 | py | Python | t5x/contrib/moe/partitioning.py | google-research/t5x | dba95aee8ab7b9e3dba8be80e0e6a11beb9284f5 | [
"Apache-2.0"
] | 278 | 2021-11-03T20:24:32.000Z | 2022-03-29T23:44:06.000Z | t5x/contrib/moe/partitioning.py | google-research/t5x | dba95aee8ab7b9e3dba8be80e0e6a11beb9284f5 | [
"Apache-2.0"
] | 31 | 2021-11-04T02:10:31.000Z | 2022-03-29T19:03:49.000Z | t5x/contrib/moe/partitioning.py | google-research/t5x | dba95aee8ab7b9e3dba8be80e0e6a11beb9284f5 | [
"Apache-2.0"
] | 26 | 2021-11-03T23:26:19.000Z | 2022-03-29T00:18:51.000Z | # Copyright 2022 The T5X 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 writ... | 41.2746 | 80 | 0.71625 | # Copyright 2022 The T5X 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 writ... | 0 | 0 | 0 | 8,740 | 0 | 0 | 0 | 23 | 68 |
5f263ea0d8ba1ce17d66473241a2b2c0e954a1c9 | 2,132 | py | Python | main.py | Catherinesjkim/fullstack-app | 263bacd8b17255e86e132131e4ffacf9faea3a2a | [
"MIT"
] | null | null | null | main.py | Catherinesjkim/fullstack-app | 263bacd8b17255e86e132131e4ffacf9faea3a2a | [
"MIT"
] | null | null | null | main.py | Catherinesjkim/fullstack-app | 263bacd8b17255e86e132131e4ffacf9faea3a2a | [
"MIT"
] | null | null | null | # Web app UI
from fastapi import FastAPI
from fastapi.templating import Jinja2Templates
app = FastAPI()
templates = Jinja2Templates(directory="templates") # configuring HTML templates dirctory - display logic
| 37.403509 | 117 | 0.67167 | # Web app UI
import sqlite3, config
from fastapi import FastAPI, Request
from fastapi.templating import Jinja2Templates
from datetime import date
app = FastAPI()
templates = Jinja2Templates(directory="templates") # configuring HTML templates dirctory - display logic
@app.get("/") # all get request will be routed to t... | 0 | 1,818 | 0 | 0 | 0 | 0 | 0 | 14 | 90 |
42351bd0f0c5e45f0f986eb7942722982355a200 | 14,985 | py | Python | deepposekit/io/utils.py | rwarren2163/DeepPoseKit | e85c99254e58ff56aa8624d377b7911254d9a09e | [
"Apache-2.0"
] | null | null | null | deepposekit/io/utils.py | rwarren2163/DeepPoseKit | e85c99254e58ff56aa8624d377b7911254d9a09e | [
"Apache-2.0"
] | null | null | null | deepposekit/io/utils.py | rwarren2163/DeepPoseKit | e85c99254e58ff56aa8624d377b7911254d9a09e | [
"Apache-2.0"
] | null | null | null | # -*- coding: utf-8 -*-
# Copyright 2018-2019 Jacob M. Graving <jgraving@gmail.com>
#
# 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 ... | 36.283293 | 107 | 0.602536 | # -*- coding: utf-8 -*-
# Copyright 2018-2019 Jacob M. Graving <jgraving@gmail.com>
#
# 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 ... | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
a4872f8e00fd8b82e89d6c769ba4239846e48e30 | 11,826 | py | Python | brick_data/sparql/brick_endpoint.py | jbkoh/brick_data | bab392b8b0b83c7a0c5427c08f3d9f2b22a8ab06 | [
"Apache-2.0"
] | 3 | 2020-09-24T18:53:55.000Z | 2021-02-22T07:30:04.000Z | brick_data/sparql/brick_endpoint.py | jbkoh/brick-federation | bab392b8b0b83c7a0c5427c08f3d9f2b22a8ab06 | [
"Apache-2.0"
] | 2 | 2019-03-31T01:22:13.000Z | 2019-05-28T00:49:36.000Z | brick_data/sparql/brick_endpoint.py | jbkoh/brick-federation | bab392b8b0b83c7a0c5427c08f3d9f2b22a8ab06 | [
"Apache-2.0"
] | 1 | 2019-05-28T18:58:51.000Z | 2019-05-28T18:58:51.000Z | LOAD = 'LOAD'
if __name__ == '__main__':
endpoint = BrickEndpoint('http://localhost:8890/sparql', '1.0.3')
endpoint._load_schema()
test_qstr = """
select ?s where {
?s rdfs:subClassOf+ brick:Temperature_Sensor .
}
"""
res = endpoint.query(test_qstr)
print(res)
| 33.596591 | 97 | 0.568831 | from shutil import copyfile
import pdb
from copy import deepcopy
import os
import arrow
from io import StringIO
import re
import semver
import rdflib
from rdflib import RDFS, RDF, OWL, Namespace
from rdflib.namespace import FOAF
from SPARQLWrapper import SPARQLWrapper
from SPARQLWrapper import JSON, SELECT, INSERT, DI... | 0 | 0 | 0 | 10,893 | 128 | 0 | 0 | 89 | 401 |
1cad09bab6b9c12bf5368062bff420e86dc6fd75 | 1,240 | py | Python | src/sashimi/__init__.py | solstag/isgc-congress | c1ea92cec81f14d8cdc355730d3d85cd248b75b6 | [
"CC0-1.0"
] | null | null | null | src/sashimi/__init__.py | solstag/isgc-congress | c1ea92cec81f14d8cdc355730d3d85cd248b75b6 | [
"CC0-1.0"
] | null | null | null | src/sashimi/__init__.py | solstag/isgc-congress | c1ea92cec81f14d8cdc355730d3d85cd248b75b6 | [
"CC0-1.0"
] | null | null | null | #! /usr/bin/env python
""" NOTES
- Data columns:
['abstract_text',
'abstract_title',
'bibliography',
'cancelled',
'code',
'figure_legend_1',
'figure_legend_2',
'figure_title_1',
'figure_title_2',
'final_status',
'id',
'is_complete',
'keyword_1',
'ke... | 20.327869 | 61 | 0.558871 | #! /usr/bin/env python
import pandas as pd
from .clean import clean_text
""" NOTES
- Data columns:
['abstract_text',
'abstract_title',
'bibliography',
'cancelled',
'code',
'figure_legend_1',
'figure_legend_2',
'figure_title_1',
'figure_title_2',
'final_status',
'... | 0 | 0 | 0 | 0 | 0 | 536 | 0 | 6 | 68 |
392f7023698f021b1f8b4ef2767a8e2105050867 | 6,974 | py | Python | portfoliotool/herolab/models/pathfinder.py | cniemira/portfoliotool | 5a8d33c108a8816e21b89076b9342a93f7595317 | [
"BSD-3-Clause"
] | null | null | null | portfoliotool/herolab/models/pathfinder.py | cniemira/portfoliotool | 5a8d33c108a8816e21b89076b9342a93f7595317 | [
"BSD-3-Clause"
] | null | null | null | portfoliotool/herolab/models/pathfinder.py | cniemira/portfoliotool | 5a8d33c108a8816e21b89076b9342a93f7595317 | [
"BSD-3-Clause"
] | null | null | null | import logging
log = logging.getLogger(__name__)
| 37.494624 | 80 | 0.569257 | import importlib
import logging
from collections import OrderedDict, defaultdict
from portfoliotool.utils.xmlutils import (
get_attribute, get_attributes, get_subnode, get_subnode_subnodes,
get_textnode
)
log = logging.getLogger(__name__)
class HeroLabPathfinderCharacter(object):
_writers = {
... | 0 | 0 | 0 | 6,695 | 0 | 0 | 0 | 136 | 91 |
8fedcb9d74e82ae88ebbe9d6e9671fab199490cf | 7,953 | py | Python | test_server/app.py | faryabimm/webelopers-2018-tests | ef22ada2cf104f41566f84e558ad7a56387b933b | [
"MIT"
] | 1 | 2019-01-19T16:05:36.000Z | 2019-01-19T16:05:36.000Z | test_server/app.py | faryabimm/webelopers-2018-tests | ef22ada2cf104f41566f84e558ad7a56387b933b | [
"MIT"
] | null | null | null | test_server/app.py | faryabimm/webelopers-2018-tests | ef22ada2cf104f41566f84e558ad7a56387b933b | [
"MIT"
] | null | null | null | import pickle as pk
import sys
import logger
import utils
from flask import Flask
from selenium import webdriver
app = Flask(__name__)
driver_options = webdriver.ChromeOptions()
driver_options.add_argument('headless')
driver_options.add_argument('window-size=1980,1080')
# driver_options = Options()
# driver_options.... | 36.15 | 120 | 0.641519 | import pickle as pk
import sys
from ast import literal_eval
from datetime import datetime, timedelta
from threading import Thread
from urllib.error import URLError
from urllib.request import urlopen
import configuration as config
import logger
import requests
import tests
import utils
from flask import Flask, request
... | 0 | 2,215 | 0 | 0 | 0 | 4,262 | 0 | 91 | 452 |
9117575a31f8b2bf616ecfb41f4c63d436081496 | 310 | py | Python | src/models/__init__.py | laurosn/flask-api-starter-kit | 09a5b67bf48abeb427beae9bccae323aea16d9ae | [
"MIT"
] | null | null | null | src/models/__init__.py | laurosn/flask-api-starter-kit | 09a5b67bf48abeb427beae9bccae323aea16d9ae | [
"MIT"
] | null | null | null | src/models/__init__.py | laurosn/flask-api-starter-kit | 09a5b67bf48abeb427beae9bccae323aea16d9ae | [
"MIT"
] | null | null | null | from flask_sqlalchemy import SQLAlchemy
from flask_marshmallow import Marshmallow
db = SQLAlchemy()
ma = Marshmallow()
| 28.181818 | 65 | 0.83871 | from flask_sqlalchemy import SQLAlchemy
from flask_marshmallow import Marshmallow
db = SQLAlchemy()
ma = Marshmallow()
from .user import User, UserSchema
from .sistema import Sistema, SistemaSchema
from .comando import Comando, ComandoSchema
from .blacklist_token import BlacklistToken, BlacklistTokenSchema | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 101 | 89 |
4a17e99cf3c67b0f93d5b18058cd3ddb05e35423 | 14,427 | py | Python | query_clu.py | tahumada/kowalski-searches | 824cd0e8cfb5b21441903fc18bdbd4e83b729b91 | [
"MIT"
] | null | null | null | query_clu.py | tahumada/kowalski-searches | 824cd0e8cfb5b21441903fc18bdbd4e83b729b91 | [
"MIT"
] | null | null | null | query_clu.py | tahumada/kowalski-searches | 824cd0e8cfb5b21441903fc18bdbd4e83b729b91 | [
"MIT"
] | 1 | 2020-11-30T19:02:24.000Z | 2020-11-30T19:02:24.000Z | '''
Query Kowalski with cone searches centred
on CLU galaxies, searching for transients
given a set of constraints.
'''
def print_query_params(args):
'''Print a summary of the query parameters'''
print("#-----")
print("Cone search parameters:")
print(f"Search radius {args.radius} arcmin")
print(f... | 38.065963 | 186 | 0.56117 | '''
Query Kowalski with cone searches centred
on CLU galaxies, searching for transients
given a set of constraints.
'''
def print_query_params(args):
'''Print a summary of the query parameters'''
print("#-----")
print("Cone search parameters:")
print(f"Search radius {args.radius} arcmin")
print(f... | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 30 | 78 |
71091d71a3ed35da9847a67d991f4be5369c4fbf | 16,425 | py | Python | src/datasets.py | mondrasovic/context_rcnn | b3f6b4fdd63fc76f33becae0fba1363f9e873f50 | [
"MIT"
] | null | null | null | src/datasets.py | mondrasovic/context_rcnn | b3f6b4fdd63fc76f33becae0fba1363f9e873f50 | [
"MIT"
] | null | null | null | src/datasets.py | mondrasovic/context_rcnn | b3f6b4fdd63fc76f33becae0fba1363f9e873f50 | [
"MIT"
] | null | null | null | #!/usr/bin/env python
# -*- coding: utf-8 -*-
#
# Copyright (c) 2021 Milan Ondraovi <milan.ondrasovic@gmail.com>
#
# MIT License
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
# in the Software wit... | 34.147609 | 81 | 0.605297 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
#
# Copyright (c) 2021 Milan Ondrašovič <milan.ondrasovic@gmail.com>
#
# MIT License
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
# in the Software w... | 4 | 2,999 | 0 | 8,514 | 0 | 2,605 | 0 | 15 | 629 |
bff960ff949edbafc108252ba5f7729074658b58 | 9,792 | py | Python | appengine/findit/model/flake/test/master_flake_analysis_test.py | mcgreevy/chromium-infra | 09064105713603f7bf75c772e8354800a1bfa256 | [
"BSD-3-Clause"
] | 1 | 2018-01-02T05:47:07.000Z | 2018-01-02T05:47:07.000Z | appengine/findit/model/flake/test/master_flake_analysis_test.py | mcgreevy/chromium-infra | 09064105713603f7bf75c772e8354800a1bfa256 | [
"BSD-3-Clause"
] | null | null | null | appengine/findit/model/flake/test/master_flake_analysis_test.py | mcgreevy/chromium-infra | 09064105713603f7bf75c772e8354800a1bfa256 | [
"BSD-3-Clause"
] | null | null | null | # Copyright 2016 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
| 40.970711 | 78 | 0.735805 | # Copyright 2016 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
from datetime import datetime
from gae_libs.testcase import TestCase
from libs import analysis_status
from model import result_status
from model import tri... | 0 | 0 | 0 | 9,264 | 0 | 0 | 0 | 163 | 202 |
8789075af8bb924a26507e7aab7918315c76489c | 2,602 | py | Python | ansible-devel/test/support/network-integration/collections/ansible_collections/ansible/netcommon/plugins/doc_fragments/netconf.py | satishcarya/ansible | ed091e174c26316f621ac16344a95c99f56bdc43 | [
"MIT"
] | null | null | null | ansible-devel/test/support/network-integration/collections/ansible_collections/ansible/netcommon/plugins/doc_fragments/netconf.py | satishcarya/ansible | ed091e174c26316f621ac16344a95c99f56bdc43 | [
"MIT"
] | null | null | null | ansible-devel/test/support/network-integration/collections/ansible_collections/ansible/netcommon/plugins/doc_fragments/netconf.py | satishcarya/ansible | ed091e174c26316f621ac16344a95c99f56bdc43 | [
"MIT"
] | 2 | 2021-03-30T14:26:02.000Z | 2021-04-01T18:17:29.000Z | # -*- coding: utf-8 -*-
# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
| 38.835821 | 120 | 0.715219 | # -*- coding: utf-8 -*-
# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
class ModuleDocFragment(object):
# Standard files documentation fragment
DOCUMENTATION = r"""options:
host:
description:
- Specifies the DNS host name or address for connecting to t... | 0 | 0 | 0 | 2,460 | 0 | 0 | 0 | 0 | 23 |
6643bef84c48660f45936daaf6e56d42d071a292 | 2,973 | py | Python | python/source/classical/AveragedPeriodogram.py | e71828/spectral-estimation | 9e4c3f4ed867e97ec764f85d577a7fcaac6a8a7c | [
"MIT"
] | 6 | 2020-02-10T01:07:22.000Z | 2021-06-18T23:44:40.000Z | python/source/classical/AveragedPeriodogram.py | e71828/spectral-estimation | 9e4c3f4ed867e97ec764f85d577a7fcaac6a8a7c | [
"MIT"
] | null | null | null | python/source/classical/AveragedPeriodogram.py | e71828/spectral-estimation | 9e4c3f4ed867e97ec764f85d577a7fcaac6a8a7c | [
"MIT"
] | 2 | 2020-12-08T14:00:01.000Z | 2021-11-28T06:06:49.000Z | import seaborn as sns
import scipy.signal as signal
sns.set() | 29.147059 | 109 | 0.52405 | import cmath
import numpy as np
import seaborn as sns
import matplotlib.pyplot as plt
import scipy.signal as signal
import csv
from .Periodogram import Periodogram
sns.set()
class AveragedPeriodogram():
def __init__(self):
self.f = None
self.default_f = np.linspace(0, 0.5, 500)
self.x = N... | 0 | 0 | 0 | 2,776 | 0 | 0 | 0 | 2 | 133 |
2cc5824dc0357e9119f881c43dd51522893f2aff | 2,405 | py | Python | api/posts/migrations/0001_initial.py | ankkamies/mfwgallery-api | c03d20b24fd4ef5d3e9be173b917eea493a5c3d6 | [
"MIT"
] | null | null | null | api/posts/migrations/0001_initial.py | ankkamies/mfwgallery-api | c03d20b24fd4ef5d3e9be173b917eea493a5c3d6 | [
"MIT"
] | null | null | null | api/posts/migrations/0001_initial.py | ankkamies/mfwgallery-api | c03d20b24fd4ef5d3e9be173b917eea493a5c3d6 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
| 35.895522 | 114 | 0.562578 | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import models, migrations
from django.conf import settings
class Migration(migrations.Migration):
dependencies = [
migrations.swappable_dependency(settings.AUTH_USER_MODEL),
]
operations = [
migrations.Create... | 0 | 0 | 0 | 2,242 | 0 | 0 | 0 | 30 | 68 |
81a126d504fcb6720c8a0e7657cb6b43edfdcfe9 | 368 | py | Python | lec3.py | Sbenso2002/ia-241-github | 7d030be8c1b05d98c101cfe8b1d713197cefe4d1 | [
"MIT"
] | null | null | null | lec3.py | Sbenso2002/ia-241-github | 7d030be8c1b05d98c101cfe8b1d713197cefe4d1 | [
"MIT"
] | null | null | null | lec3.py | Sbenso2002/ia-241-github | 7d030be8c1b05d98c101cfe8b1d713197cefe4d1 | [
"MIT"
] | null | null | null | print('hello\tworld')
print('hello\nworld')
print( len('hello world' ) )
print('hello world' [2])
my_letter_list = ['a', 'a', 'b','b', 'c']
print(my_letter_list)
print( set(my_letter_list) )
my_unique_letters = set(my_letter_list)
print(my_unique_letters)
print( len(my_unique_letters ) )
print('d' in my_uniq... | 17.52381 | 41 | 0.703804 | print('hello\tworld')
print('hello\nworld')
print( len('hello world' ) )
print('hello world' [2])
my_letter_list = ['a', 'a', 'b','b', 'c']
print(my_letter_list)
print( set(my_letter_list) )
my_unique_letters = set(my_letter_list)
print(my_unique_letters)
print( len(my_unique_letters ) )
print('d' in my_uniq... | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
6a250710393d6cc1a5bc9494270d35c03b7609bd | 73,047 | py | Python | pypy/objspace/std/listobject.py | Qointum/pypy | c0ed88efbc135a75a535f4534ca1f3baf0bf39d8 | [
"Apache-2.0",
"OpenSSL"
] | null | null | null | pypy/objspace/std/listobject.py | Qointum/pypy | c0ed88efbc135a75a535f4534ca1f3baf0bf39d8 | [
"Apache-2.0",
"OpenSSL"
] | null | null | null | pypy/objspace/std/listobject.py | Qointum/pypy | c0ed88efbc135a75a535f4534ca1f3baf0bf39d8 | [
"Apache-2.0",
"OpenSSL"
] | null | null | null | """The builtin list implementation
Lists optimize their storage by holding certain primitive datatypes in
unwrapped form. For more information:
http://morepypy.blogspot.com/2011/10/more-compact-lists-with-list-strategies.html
"""
from rpython.rlib import jit
from rpython.rlib.listsort import make_timsort_class
from... | 34.570279 | 81 | 0.626213 | """The builtin list implementation
Lists optimize their storage by holding certain primitive datatypes in
unwrapped form. For more information:
http://morepypy.blogspot.com/2011/10/more-compact-lists-with-list-strategies.html
"""
import operator
import sys
from rpython.rlib import debug, jit, rerased
from rpython.... | 0 | 11,405 | 0 | 54,228 | 0 | 1,831 | 0 | 620 | 1,043 |
9af5d1ce7149896e681c0e989bd4b1e49ea6e52e | 4,130 | py | Python | mithril/controls/textfield.py | martimdev/mithril | 9b8388b1f297ae4b92a436897aa539320fbc3bf7 | [
"MIT"
] | 2 | 2018-12-21T23:08:32.000Z | 2018-12-22T23:39:01.000Z | mithril/controls/textfield.py | martimdev/mithril | 9b8388b1f297ae4b92a436897aa539320fbc3bf7 | [
"MIT"
] | null | null | null | mithril/controls/textfield.py | martimdev/mithril | 9b8388b1f297ae4b92a436897aa539320fbc3bf7 | [
"MIT"
] | 1 | 2018-12-21T22:46:20.000Z | 2018-12-21T22:46:20.000Z |
DEFAULT_COLOR = (255, 255, 255)
DEFAULT_BORDER_COLOR = (181, 181, 181)
DEFAULT_HOVER_BORDER_COLOR = (3, 158, 211)
| 40.097087 | 110 | 0.617676 | import datetime
import pygame
from mithril.controls.label import Label
from mithril.graphics.base_shapes import VerticalLine
from mithril.graphics.util_shapes import RoundedRectangle
DEFAULT_COLOR = (255, 255, 255)
DEFAULT_BORDER_COLOR = (181, 181, 181)
DEFAULT_HOVER_BORDER_COLOR = (3, 158, 211)
class TextField(Ro... | 0 | 0 | 0 | 3,806 | 0 | 0 | 0 | 73 | 135 |
bd7b5f324dcc309bfac02e6551c8f770ab994ea9 | 3,231 | py | Python | python/ParseAndSerializeSpotbugs.py | GunpreetAhuja/StaticBugCheckers | 7d0e05afa28682c11a54ea022fd6bfabd64c5dc8 | [
"MIT"
] | 12 | 2018-09-06T08:04:06.000Z | 2021-12-14T02:56:02.000Z | python/ParseAndSerializeSpotbugs.py | GunpreetAhuja/StaticBugCheckers | 7d0e05afa28682c11a54ea022fd6bfabd64c5dc8 | [
"MIT"
] | 1 | 2018-11-06T20:37:33.000Z | 2018-11-14T08:29:35.000Z | python/ParseAndSerializeSpotbugs.py | GunpreetAhuja/StaticBugCheckers | 7d0e05afa28682c11a54ea022fd6bfabd64c5dc8 | [
"MIT"
] | 3 | 2018-11-11T22:15:07.000Z | 2020-03-29T04:08:06.000Z | '''
Created on Nov. 23, 2017
@author Andrew Habib
'''
'''
Currently, the spotbugs output files may contain
analysis results of more than one .java file.
This happens in cases where analyzed bug involves
more than one .java file.
'''
import json
import os
import sys
from Util import XmlReader, CustomEncoder
'... | 31.676471 | 144 | 0.535747 | '''
Created on Nov. 23, 2017
@author Andrew Habib
'''
'''
Currently, the spotbugs output files may contain
analysis results of more than one .java file.
This happens in cases where analyzed bug involves
more than one .java file.
'''
import json
import os
import sys
from xml.etree import cElementTree as ET
from... | 0 | 0 | 0 | 0 | 0 | 2,079 | 0 | 44 | 46 |
7a6411f585212855ef4c0ee91263023bab1e7ab0 | 307 | py | Python | Python/Arquivos/Victor_Brabo_Hugo.py | lucsap/APC | 344011552dccdf8210d65cee0531460a1a2d6fae | [
"MIT"
] | null | null | null | Python/Arquivos/Victor_Brabo_Hugo.py | lucsap/APC | 344011552dccdf8210d65cee0531460a1a2d6fae | [
"MIT"
] | null | null | null | Python/Arquivos/Victor_Brabo_Hugo.py | lucsap/APC | 344011552dccdf8210d65cee0531460a1a2d6fae | [
"MIT"
] | null | null | null | import os
nome_arq = input()
arq = open(nome_arq, 'r')
for i in arq.readlines():
file_name = i.strip('\n').split(' ')
for j in file_name:
if os.path.exists(j):
print(j)
arq.close()
# print(file_name)
# file = open(file, 'r')
# if
# print(arq.readlines()) | 18.058824 | 40 | 0.540717 | import os
nome_arq = input()
arq = open(nome_arq, 'r')
for i in arq.readlines():
file_name = i.strip('\n').split(' ')
for j in file_name:
if os.path.exists(j):
print(j)
arq.close()
# print(file_name)
# file = open(file, 'r')
# if
# print(arq.readlines()) | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
d60053e6c50ddc627ff257933e88b581cd111003 | 1,295 | py | Python | divulga.py | colaboradados/colabora_bot | 513cece3cc3cb87d16a568274212c4428ca83332 | [
"MIT"
] | 75 | 2019-04-28T13:14:18.000Z | 2021-06-04T06:03:48.000Z | divulga.py | colaboradados/Colaboradabot | 513cece3cc3cb87d16a568274212c4428ca83332 | [
"MIT"
] | 26 | 2019-05-06T16:32:59.000Z | 2020-11-28T23:28:46.000Z | divulga.py | colaboradados/Colaboradabot | 513cece3cc3cb87d16a568274212c4428ca83332 | [
"MIT"
] | 34 | 2019-05-15T03:51:46.000Z | 2022-03-17T02:26:18.000Z | import tweepy
from autenticadores import google_api_auth
import gspread
# TODO remover (?)
def google_sshet():
"""
Funo simples para retornar um objeto capaz de manipular as planilhas do Google Sheets.
"""
session = google_api_auth()
ggle_cred = gspread.Client(None, session)
return ggle_cred
... | 33.205128 | 114 | 0.694208 | import tweepy
from autenticadores import google_api_auth
from random import choice
import gspread
# TODO remover (?)
def google_sshet():
"""
Função simples para retornar um objeto capaz de manipular as planilhas do Google Sheets.
"""
session = google_api_auth()
ggle_cred = gspread.Client(None, sess... | 18 | 0 | 0 | 0 | 0 | 0 | 0 | 4 | 22 |
77488903c64b01339ed21c0a9394e2e5da5e6e4b | 919 | py | Python | server/models.py | seevee/deltakaggle | 27be22242ce4c0271cf512211d0843f3cfedc79b | [
"MIT"
] | null | null | null | server/models.py | seevee/deltakaggle | 27be22242ce4c0271cf512211d0843f3cfedc79b | [
"MIT"
] | null | null | null | server/models.py | seevee/deltakaggle | 27be22242ce4c0271cf512211d0843f3cfedc79b | [
"MIT"
] | null | null | null | import pandas as pd
| 29.645161 | 65 | 0.768226 | from sql_alchemy_db_instance import db
import pandas as pd
import sqlite3
from sqlalchemy import Column, Integer, Float
import pandas as pd
import numpy as np
from pandas import DataFrame
from flask_sqlalchemy import SQLAlchemy
class Variables(db.Model):
__tablename__ = 'APPLICANTS'
id = db.Column(db.Intege... | 0 | 0 | 0 | 655 | 0 | 0 | 0 | 54 | 177 |
d71e028c8847e86bb0af784e5a8b72ba7c9b15ef | 2,376 | py | Python | docs/conf.py | wangenau/eminus | 57b6876093e52a14fc044cac94d1963b94b4ce8a | [
"Apache-2.0"
] | null | null | null | docs/conf.py | wangenau/eminus | 57b6876093e52a14fc044cac94d1963b94b4ce8a | [
"Apache-2.0"
] | null | null | null | docs/conf.py | wangenau/eminus | 57b6876093e52a14fc044cac94d1963b94b4ce8a | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/env python3
'''Sphinx documentation builder configuration file.
For a full list of options see the documentation:
https://www.sphinx-doc.org/en/master/usage/configuration.html
'''
import eminus
project = 'eminus'
author = 'Wanja Timm Schulze'
copyright = '2021-2022, Wanja Timm Schulze'
version = eminus.__v... | 32.547945 | 578 | 0.660354 | #!/usr/bin/env python3
'''Sphinx documentation builder configuration file.
For a full list of options see the documentation:
https://www.sphinx-doc.org/en/master/usage/configuration.html
'''
import eminus
project = 'eminus'
author = 'Wanja Timm Schulze'
copyright = '2021-2022, Wanja Timm Schulze'
version = eminus.__v... | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
17384b5419699cea78015d11a85a1ad1bce6df12 | 130 | py | Python | salario.py | biatomie/python | 433d6e0d8a3306ff8ff3dbd298dbe6cd23d15fe4 | [
"MIT"
] | null | null | null | salario.py | biatomie/python | 433d6e0d8a3306ff8ff3dbd298dbe6cd23d15fe4 | [
"MIT"
] | null | null | null | salario.py | biatomie/python | 433d6e0d8a3306ff8ff3dbd298dbe6cd23d15fe4 | [
"MIT"
] | null | null | null | n = int(input())
nh = int(input())
vh = float(input())
sal = nh * vh
print(f'NUMBER = {n}')
print(f'SALARY = U$ {sal:.2f}')
| 18.571429 | 32 | 0.530769 | n = int(input())
nh = int(input())
vh = float(input())
sal = nh * vh
print(f'NUMBER = {n}')
print(f'SALARY = U$ {sal:.2f}')
| 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
165289d1624e0a1fe55b8d1e2aca93f5666eaeff | 978 | py | Python | eclcli/storage/storageclient/v2/volume_types.py | hanasuke/eclcli | a72191799986a02596d0d467253fd9f5ee03c5c8 | [
"Apache-2.0"
] | 32 | 2016-08-31T04:12:40.000Z | 2020-12-11T04:49:57.000Z | eclcli/storage/storageclient/v2/volume_types.py | hanasuke/eclcli | a72191799986a02596d0d467253fd9f5ee03c5c8 | [
"Apache-2.0"
] | 27 | 2016-09-06T07:50:36.000Z | 2021-09-14T09:46:03.000Z | eclcli/storage/storageclient/v2/volume_types.py | hanasuke/eclcli | a72191799986a02596d0d467253fd9f5ee03c5c8 | [
"Apache-2.0"
] | 24 | 2016-09-02T01:09:09.000Z | 2021-01-19T09:14:16.000Z | from .. import base
| 28.764706 | 85 | 0.618609 | from .. import base
class VolumeType(base.Resource):
"""A Volume Type is the type of volume to be created."""
def __repr__(self):
return "<VolumeType: %s>" % self.name
class VolumeTypeManager(base.ManagerWithFind):
"""Manage :class:`VolumeType` resources."""
resource_class = VolumeType
... | 0 | 0 | 0 | 909 | 0 | 0 | 0 | 0 | 46 |
0b74c7a2fa53705be660c273e74d96c72b0c5c7b | 3,291 | py | Python | Designing_RESTful_APIs/Exercices/L3/Quiz4/endpoints2_tester.py | NaPiZip/Online-course-notes | 36f01fd9cbdaa0ec5030d4f34203d8980ed66c22 | [
"MIT"
] | null | null | null | Designing_RESTful_APIs/Exercices/L3/Quiz4/endpoints2_tester.py | NaPiZip/Online-course-notes | 36f01fd9cbdaa0ec5030d4f34203d8980ed66c22 | [
"MIT"
] | null | null | null | Designing_RESTful_APIs/Exercices/L3/Quiz4/endpoints2_tester.py | NaPiZip/Online-course-notes | 36f01fd9cbdaa0ec5030d4f34203d8980ed66c22 | [
"MIT"
] | null | null | null | import httplib2
import sys
if __name__== '__main__':
print("Running Endpoint Tester....\n")
address = input("Please enter the address of the server ou want to access!")
if address == '':
address = 'http://localhost:5000'
print("Making the GET Request for /puppies...")
try:
... | 35.010638 | 98 | 0.553327 | import httplib2
import json
import sys
if __name__== '__main__':
print("Running Endpoint Tester....\n")
address = input("Please enter the address of the server ou want to access!")
if address == '':
address = 'http://localhost:5000'
print("Making the GET Request for /puppies...")... | 0 | 0 | 0 | 0 | 0 | 0 | 0 | -10 | 23 |
2909030c7b2994a557cd975ef36150d55885690c | 10,235 | py | Python | trustai/interpretation/example_level/method/representer_point.py | PaddlePaddle/trustAI | 4ca7cf81b044156b011f5b8972ca7a5f5680917b | [
"Apache-2.0"
] | 2 | 2022-03-14T02:21:05.000Z | 2022-03-14T02:42:59.000Z | trustai/interpretation/example_level/method/representer_point.py | PaddlePaddle/trustAI | 4ca7cf81b044156b011f5b8972ca7a5f5680917b | [
"Apache-2.0"
] | null | null | null | trustai/interpretation/example_level/method/representer_point.py | PaddlePaddle/trustAI | 4ca7cf81b044156b011f5b8972ca7a5f5680917b | [
"Apache-2.0"
] | null | null | null | # Copyright (c) 2022 PaddlePaddle Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by app... | 41.104418 | 207 | 0.63957 | # Copyright (c) 2022 PaddlePaddle Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by app... | 0 | 543 | 0 | 8,689 | 0 | 0 | 0 | 115 | 226 |
02408ba08ec83af7c146dd081e9c790fd47cad07 | 432 | py | Python | python/numpy/min_and_max.py | kcc3/hackerrank-solutions | f862b44b840bd447d99dc148f6bb5e2f5bfb8a86 | [
"MIT"
] | null | null | null | python/numpy/min_and_max.py | kcc3/hackerrank-solutions | f862b44b840bd447d99dc148f6bb5e2f5bfb8a86 | [
"MIT"
] | null | null | null | python/numpy/min_and_max.py | kcc3/hackerrank-solutions | f862b44b840bd447d99dc148f6bb5e2f5bfb8a86 | [
"MIT"
] | 1 | 2020-06-04T09:23:19.000Z | 2020-06-04T09:23:19.000Z | """Hackerrank Problem: https://www.hackerrank.com/challenges/np-min-and-max/problem
Task
You are given a 2-D array with dimensions N x M.
Your task is to perform the min function over axis 1 and then find the max of that.
"""
import numpy
n, m = map(int, input().split(' '))
array = []
for _ in range(n):
a = lis... | 22.736842 | 83 | 0.680556 | """Hackerrank Problem: https://www.hackerrank.com/challenges/np-min-and-max/problem
Task
You are given a 2-D array with dimensions N x M.
Your task is to perform the min function over axis 1 and then find the max of that.
"""
import numpy
n, m = map(int, input().split(' '))
array = []
for _ in range(n):
a = lis... | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
a2301441254cde8f549a8e5d06123c37d9a85436 | 454 | py | Python | core/migrations/0011_auto_20181002_2016.py | CobwebOrg/cobweb-django | 14241326860620dbaa64f7eefc6d4b393f80d23c | [
"MIT"
] | 7 | 2017-09-14T18:52:58.000Z | 2020-05-18T21:01:20.000Z | core/migrations/0011_auto_20181002_2016.py | CobwebOrg/cobweb-django | 14241326860620dbaa64f7eefc6d4b393f80d23c | [
"MIT"
] | 151 | 2017-09-14T18:46:02.000Z | 2022-02-10T09:18:44.000Z | core/migrations/0011_auto_20181002_2016.py | CobwebOrg/cobweb-django | 14241326860620dbaa64f7eefc6d4b393f80d23c | [
"MIT"
] | 1 | 2017-10-29T19:37:29.000Z | 2017-10-29T19:37:29.000Z | # Generated by Django 2.1.1 on 2018-10-03 03:16
| 23.894737 | 117 | 0.625551 | # Generated by Django 2.1.1 on 2018-10-03 03:16
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('core', '0010_auto_20180928_1104'),
]
operations = [
migrations.AlterField(
model_name='organization',
name='slug',
... | 0 | 0 | 0 | 340 | 0 | 0 | 0 | 19 | 46 |
b583af1303995b97989eef8cda5b0b7f48f90fd2 | 1,800 | py | Python | aixplot/plotter.py | lukas-koschmieder/aixplot | 7d1faf4e3578898f603661d9a67646acee0338dc | [
"MIT"
] | 1 | 2019-08-16T10:58:01.000Z | 2019-08-16T10:58:01.000Z | aixplot/plotter.py | lukas-koschmieder/aixplot | 7d1faf4e3578898f603661d9a67646acee0338dc | [
"MIT"
] | null | null | null | aixplot/plotter.py | lukas-koschmieder/aixplot | 7d1faf4e3578898f603661d9a67646acee0338dc | [
"MIT"
] | null | null | null | # Copyright (c) 2019 Lukas Koschmieder
import logging
module_logger = logging.getLogger(__name__)
module_logger.setLevel(logging.INFO)
module_logger.addHandler(logging.StreamHandler())
| 33.962264 | 73 | 0.557778 | # Copyright (c) 2019 Lukas Koschmieder
import asyncio
from bqplot import Axis, Figure, LinearScale, Lines, Toolbar
from ipywidgets import Label, HBox, VBox
import logging
module_logger = logging.getLogger(__name__)
module_logger.setLevel(logging.INFO)
module_logger.addHandler(logging.StreamHandler())
class Plot(VBox... | 0 | 0 | 0 | 1,450 | 0 | 0 | 0 | 51 | 113 |
98f88c0ad40b660b7f7ef48c3c686ac01ea7645c | 1,093 | py | Python | nodes/H.3.1c/challenge_code.py | ankit27kh/Xanadu-Quantum-Codebook | 9ba7bbf86c04d53e80c9a2cf5a412f534a3d5756 | [
"Apache-2.0"
] | 31 | 2021-11-16T15:03:18.000Z | 2022-03-04T14:18:25.000Z | nodes/H.3.1c/challenge_code.py | ankit27kh/Xanadu-Quantum-Codebook | 9ba7bbf86c04d53e80c9a2cf5a412f534a3d5756 | [
"Apache-2.0"
] | 26 | 2021-11-16T02:20:17.000Z | 2022-03-07T15:44:28.000Z | nodes/H.3.1c/challenge_code.py | ankit27kh/Xanadu-Quantum-Codebook | 9ba7bbf86c04d53e80c9a2cf5a412f534a3d5756 | [
"Apache-2.0"
] | 17 | 2021-11-17T02:13:58.000Z | 2022-02-20T21:42:48.000Z | """The code template to supply to the front end. This is what the user will
be asked to complete and submit for grading.
Do not include any imports.
This is not a REPL environment so include explicit 'print' statements
for any outputs you want to be displayed back to the user.
Use triple single q... | 28.763158 | 82 | 0.630375 | """The code template to supply to the front end. This is what the user will
be asked to complete and submit for grading.
Do not include any imports.
This is not a REPL environment so include explicit 'print' statements
for any outputs you want to be displayed back to the user.
Use triple single q... | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
83f9b6225f9a9bdaff17fe1a7a9a3b0dc3292653 | 172 | py | Python | python/GtBurst/aplpy/__init__.py | fermi-lat/pyBurstAnalysisGUI | add53fe77ef71cb64a27751f024fb914f7cc0863 | [
"BSD-3-Clause"
] | 2 | 2019-03-06T15:48:20.000Z | 2020-05-02T15:02:57.000Z | python/GtBurst/aplpy/__init__.py | fermi-lat/pyBurstAnalysisGUI | add53fe77ef71cb64a27751f024fb914f7cc0863 | [
"BSD-3-Clause"
] | 5 | 2019-01-23T11:35:41.000Z | 2019-03-29T17:36:19.000Z | python/GtBurst/aplpy/__init__.py | fermi-lat/pyBurstAnalysisGUI | add53fe77ef71cb64a27751f024fb914f7cc0863 | [
"BSD-3-Clause"
] | null | null | null | try:
# Use internal aplpy
except ImportError:
# Try and load the aplpy from the environment
| 15.636364 | 49 | 0.610465 | try:
# Use internal aplpy
from .my_aplpy import *
except ImportError:
# Try and load the aplpy from the environment
from aplpy import *
| 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 57 |
13346126f72929640103965ec24f2f3547882ab9 | 981 | py | Python | solutions/200.py | pacokwon/leetcode | 37c943d371c106d1e6f24e065700e5edd1c3f9f9 | [
"MIT"
] | 2 | 2022-01-18T08:57:13.000Z | 2022-01-18T15:49:06.000Z | solutions/200.py | pacokwon/leetcode | 37c943d371c106d1e6f24e065700e5edd1c3f9f9 | [
"MIT"
] | null | null | null | solutions/200.py | pacokwon/leetcode | 37c943d371c106d1e6f24e065700e5edd1c3f9f9 | [
"MIT"
] | null | null | null | # Number Of Islands
if __name__ == "__main__":
sol = Solution()
grid = [
["1","1","0","0","0"],
["1","1","0","0","0"],
["0","0","1","0","0"],
["0","0","0","1","1"]
]
print(sol.numIslands(grid))
| 21.8 | 63 | 0.343527 | # Number Of Islands
class Solution:
def numIslands(self, grid):
dx = [0, 1, 0, -1]
dy = [1, 0, -1, 0]
rows = len(grid)
cols = len(grid[0])
def dfs(x, y):
grid[x][y] = '0'
for _dx, _dy in zip(dx, dy):
newX = x + _dx
n... | 0 | 0 | 0 | 690 | 0 | 0 | 0 | 0 | 23 |
5e241b19b7a44b4055e346b949a90739d547c87e | 7,158 | py | Python | FIVE/Code/module_evt.py | sk-yaho/carpe | 077ef7ba1582b3de9f5c08d63431e744b77a9e09 | [
"Apache-2.0"
] | 2 | 2020-07-09T02:01:50.000Z | 2020-11-21T15:19:32.000Z | FIVE/Code/module_evt.py | sk-yaho/carpe | 077ef7ba1582b3de9f5c08d63431e744b77a9e09 | [
"Apache-2.0"
] | null | null | null | FIVE/Code/module_evt.py | sk-yaho/carpe | 077ef7ba1582b3de9f5c08d63431e744b77a9e09 | [
"Apache-2.0"
] | null | null | null | #-*- coding: utf-8 -*-
#!/usr/bin/python3
#!/Author : Gibartes
#from defines import *
#from interface import ModuleComponentInterface
#from structureReader import StructureReader as parser
#from structureReader import _WindowsEventLogStructure as structure
import sys
# carving module for evt/evtx
... | 37.47644 | 117 | 0.601146 | #-*- coding: utf-8 -*-
#!/usr/bin/python3
#!/Author : Gibartes
from moduleInterface.defines import *
from moduleInterface.interface import ModuleComponentInterface
#from defines import *
#from interface import ModuleComponentInterface
from structureReader import structureReader as sr
#from structure... | 129 | 0 | 0 | 5,840 | 0 | 0 | 0 | 93 | 112 |
50a618537910e6824f529152413123581d9a2a80 | 554 | py | Python | sentinelScripts/rm_unCompleted_task.py | XingyuXu-cuhk/Landuse_DL | a993988727387be22e7a88f6f5790de8a88dccd6 | [
"Apache-2.0"
] | null | null | null | sentinelScripts/rm_unCompleted_task.py | XingyuXu-cuhk/Landuse_DL | a993988727387be22e7a88f6f5790de8a88dccd6 | [
"Apache-2.0"
] | null | null | null | sentinelScripts/rm_unCompleted_task.py | XingyuXu-cuhk/Landuse_DL | a993988727387be22e7a88f6f5790de8a88dccd6 | [
"Apache-2.0"
] | 1 | 2020-06-22T08:52:58.000Z | 2020-06-22T08:52:58.000Z | #!/usr/bin/env python
# Filename: rm_unCompleted_task
"""
introduction:
authors: Huang Lingcao
email:huanglingcao@gmail.com
add time: 16 October, 2019
"""
import os
dir = 'multi_inf_results'
for i in range(0,78):
if os.path.isfile(os.path.join(dir,str(i)+'.txt')):
if os.path.isfile(os.path.join(dir,str(i... | 25.181818 | 68 | 0.611913 | #!/usr/bin/env python
# Filename: rm_unCompleted_task
"""
introduction:
authors: Huang Lingcao
email:huanglingcao@gmail.com
add time: 16 October, 2019
"""
import os
dir = 'multi_inf_results'
for i in range(0,78):
if os.path.isfile(os.path.join(dir,str(i)+'.txt')):
if os.path.isfile(os.path.join(dir,str(i... | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
afe433f5ee3f32462791a595512468da25469cbc | 2,524 | py | Python | pastebin_crawler/services/paste_bin_post_service.py | mikeler216/pastebin_crawler | 9a5712fc139cf4f02b8f81398b458f75fe0f8e86 | [
"Apache-2.0"
] | null | null | null | pastebin_crawler/services/paste_bin_post_service.py | mikeler216/pastebin_crawler | 9a5712fc139cf4f02b8f81398b458f75fe0f8e86 | [
"Apache-2.0"
] | 3 | 2021-01-30T17:57:37.000Z | 2021-01-31T17:59:08.000Z | pastebin_crawler/services/paste_bin_post_service.py | mikeler216/pastebin_crawler | 9a5712fc139cf4f02b8f81398b458f75fe0f8e86 | [
"Apache-2.0"
] | null | null | null | """
"""
| 29.348837 | 68 | 0.581616 | """
"""
from datetime import datetime
from typing import Optional
from bs4 import BeautifulSoup
import dateutil.parser
from pastebin_crawler.helpers import remove_beginning_slash_from_str
from pastebin_crawler.helpers.constants import Urls, PostDivName
from pastebin_crawler.services import BaseCrawlerService
class... | 0 | 1,537 | 0 | 650 | 0 | 0 | 0 | 148 | 179 |
98bf3fdf49a4b16c92b743818f5f6011e8553005 | 1,963 | py | Python | Library/Python/Capture/libs/libSimCom.py | BleuLlama/LlamaLlaser | 0784635fc6209755462c44972990d8f8deec2cec | [
"MIT"
] | null | null | null | Library/Python/Capture/libs/libSimCom.py | BleuLlama/LlamaLlaser | 0784635fc6209755462c44972990d8f8deec2cec | [
"MIT"
] | null | null | null | Library/Python/Capture/libs/libSimCom.py | BleuLlama/LlamaLlaser | 0784635fc6209755462c44972990d8f8deec2cec | [
"MIT"
] | null | null | null | #!/usr/bin/python
################################################################################
# Fake Comport + Arduino simulation
| 18.345794 | 80 | 0.558329 | #!/usr/bin/python
import sys
import glob
################################################################################
# Fake Comport + Arduino simulation
class SimCom:
SimDevice = "/fake/SIMUDUINO"
device = SimDevice
description = "Arduino Serial Simulation"
isConnected = False
accumulator = ""
def __ini... | 0 | 0 | 0 | 1,780 | 0 | 0 | 0 | -21 | 67 |
3343a177dd550e97960c5184101c45e46564aa9b | 875 | bzl | Python | deps.bzl | gramic/bazel_esp32 | fd4c6aa44d626489b6663216c3f978d28b603de6 | [
"MIT"
] | 6 | 2021-06-16T13:07:22.000Z | 2022-03-23T17:53:24.000Z | deps.bzl | gramic/bazel_esp32 | fd4c6aa44d626489b6663216c3f978d28b603de6 | [
"MIT"
] | 2 | 2021-08-22T05:11:55.000Z | 2021-10-12T06:47:46.000Z | deps.bzl | gramic/bazel_esp32 | fd4c6aa44d626489b6663216c3f978d28b603de6 | [
"MIT"
] | 1 | 2021-12-20T13:40:19.000Z | 2021-12-20T13:40:19.000Z | load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive")
| 41.666667 | 104 | 0.682286 | load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive")
def bazel_esp32_dependencies():
# The cross compiler, tools and headers.
http_archive(
name = "xtensa_esp32_elf_linux64",
build_file = "@bazel_esp32//:BUILD.esp32toolchain",
sha256 = "96f5f6e7611a0ed1dc47048c54c3113fc5... | 0 | 0 | 0 | 0 | 0 | 783 | 0 | 0 | 23 |
b376e178412710571f54e60309c38ae1445eacb9 | 1,282 | py | Python | curso-em-video/ex089.1.py | joseluizbrits/sobre-python | 316143c341e5a44070a3b13877419082774bd730 | [
"MIT"
] | null | null | null | curso-em-video/ex089.1.py | joseluizbrits/sobre-python | 316143c341e5a44070a3b13877419082774bd730 | [
"MIT"
] | null | null | null | curso-em-video/ex089.1.py | joseluizbrits/sobre-python | 316143c341e5a44070a3b13877419082774bd730 | [
"MIT"
] | null | null | null | # Boletim com listas compostas
'''Crie um programa que leia NOME e DUAS
NOTAS de vrios alunos e guarde tudo em
uma LISTA COMPOSTA. No final, mostre um
BOLETIM contendo a MDIA de cada um e
permita que o usurio possa mostrar as
NOTAS de cada aluno individualmente'''
lista = []
while True:
alunos = []
notas = []
... | 32.05 | 91 | 0.587363 | # Boletim com listas compostas
'''Crie um programa que leia NOME e DUAS
NOTAS de vários alunos e guarde tudo em
uma LISTA COMPOSTA. No final, mostre um
BOLETIM contendo a MÉDIA de cada um e
permita que o usuário possa mostrar as
NOTAS de cada aluno individualmente'''
lista = []
while True:
alunos = []
notas = ... | 14 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
7d562a5fad27debabe476c59268f7e28857a599b | 3,923 | py | Python | salt/utils/json.py | amaclean199/salt | 8aaac011b4616e3c9e74a1daafb4a2146a5a430f | [
"Apache-2.0"
] | null | null | null | salt/utils/json.py | amaclean199/salt | 8aaac011b4616e3c9e74a1daafb4a2146a5a430f | [
"Apache-2.0"
] | null | null | null | salt/utils/json.py | amaclean199/salt | 8aaac011b4616e3c9e74a1daafb4a2146a5a430f | [
"Apache-2.0"
] | 1 | 2019-06-10T17:42:31.000Z | 2019-06-10T17:42:31.000Z | # -*- coding: utf-8 -*-
'''
Functions to work with JSON
'''
from __future__ import absolute_import, unicode_literals
# Import Python libs
import json # future lint: blacklisted-module
import logging
# Import Salt libs
import salt.utils.data
import salt.utils.stringutils
# Import 3rd-party libs
from salt.ext import... | 29.719697 | 115 | 0.663523 | # -*- coding: utf-8 -*-
'''
Functions to work with JSON
'''
from __future__ import absolute_import, unicode_literals
# Import Python libs
import json # future lint: blacklisted-module
import logging
# Import Salt libs
import salt.utils.data
import salt.utils.stringutils
# Import 3rd-party libs
from salt.ext import... | 0 | 0 | 0 | 0 | 0 | 0 | 0 | -11 | 26 |
e1888a1e90e3d5dc86489919123ff8078d127bcc | 784 | py | Python | src/models/users/decorators.py | ibininja/takaramOS | 801ed4479cd64a97b92bf118927c7d72f3f89f11 | [
"MIT"
] | 1 | 2016-02-20T16:31:23.000Z | 2016-02-20T16:31:23.000Z | src/models/users/decorators.py | ibininja/takaramOS | 801ed4479cd64a97b92bf118927c7d72f3f89f11 | [
"MIT"
] | 1 | 2016-02-24T16:54:47.000Z | 2016-02-25T06:25:07.000Z | src/models/users/decorators.py | ibininja/takaramOS | 801ed4479cd64a97b92bf118927c7d72f3f89f11 | [
"MIT"
] | null | null | null |
__author__ = 'ibininja'
| 35.636364 | 108 | 0.683673 | from functools import wraps
from flask import session, url_for, redirect, request
__author__ = 'ibininja'
def requires_login(func):
@wraps(func)
def decorated_function(*args, **kwargs):
if 'email' not in session.keys() or session['email'] is None:
return redirect(url_for('login', next=req... | 0 | 504 | 0 | 0 | 0 | 126 | 0 | 38 | 91 |
53806c09db3baefa06b4b6b784956d5071dda36a | 6,991 | py | Python | project_files/robot_drivers/posedata_leg.py | aronjschwartz/Angel_Devil | 921436aba7db260564c7926385417b2e7a17ea6d | [
"MIT"
] | null | null | null | project_files/robot_drivers/posedata_leg.py | aronjschwartz/Angel_Devil | 921436aba7db260564c7926385417b2e7a17ea6d | [
"MIT"
] | null | null | null | project_files/robot_drivers/posedata_leg.py | aronjschwartz/Angel_Devil | 921436aba7db260564c7926385417b2e7a17ea6d | [
"MIT"
] | null | null | null |
# NOTE: these values are ANGLES not raw pwms
# thing.rot_servo and thing.list[ROT_SERVO] are synonymous/aliases that point to the same underlying data, for both read/write
# TODO: remove normal/crouch version and make them derived from tall version
# NOTE: table naming convention is: (standing height)_(gait)_(what ... | 30.797357 | 126 | 0.680303 | import copy
from hex_walker_constants import TIP_SERVO, MID_SERVO, ROT_SERVO, WAIST_SERVO
# NOTE: these values are ANGLES not raw pwms
# thing.rot_servo and thing.list[ROT_SERVO] are synonymous/aliases that point to the same underlying data, for both read/write
class Leg_Position(object):
def __init__(self, rot_servo... | 0 | 0 | 0 | 1,027 | 0 | 0 | 0 | 46 | 66 |
69b15336a36ab1cd11ff4f86180f53d9e1a8eda4 | 556 | py | Python | examples/simple/script.py | gijswobben/pyfiguration | e33f3a8f20bbf7ca05a9d928f68895c8c727120c | [
"MIT"
] | 1 | 2020-06-28T20:58:39.000Z | 2020-06-28T20:58:39.000Z | examples/simple/script.py | gijswobben/pyfiguration | e33f3a8f20bbf7ca05a9d928f68895c8c727120c | [
"MIT"
] | null | null | null | examples/simple/script.py | gijswobben/pyfiguration | e33f3a8f20bbf7ca05a9d928f68895c8c727120c | [
"MIT"
] | null | null | null | """ script.py
"""
import http.server
# Create a request handler
Handler = http.server.SimpleHTTPRequestHandler
if __name__ == "__main__":
startServer()
| 19.172414 | 62 | 0.68705 | """ script.py
"""
import http.server
import socketserver
from pyfiguration import conf
# Create a request handler
Handler = http.server.SimpleHTTPRequestHandler
@conf.addIntField(
field="server.port",
description="The port on which the server will start",
default=8000,
minValue=80,
maxValue=999... | 0 | 321 | 0 | 0 | 0 | 0 | 0 | 6 | 68 |
3d1e731caa34aa90f4e6cb2d35057d7b60cc453f | 3,032 | py | Python | app/request.py | mercy-shii/News-atricles | b7d589a2c418ae588f446009c95d13ebb3fc74fc | [
"Unlicense"
] | null | null | null | app/request.py | mercy-shii/News-atricles | b7d589a2c418ae588f446009c95d13ebb3fc74fc | [
"Unlicense"
] | 5 | 2020-04-28T15:22:42.000Z | 2020-04-28T15:22:47.000Z | app/request.py | mercy-shii/News-atricles | b7d589a2c418ae588f446009c95d13ebb3fc74fc | [
"Unlicense"
] | null | null | null | import urllib.request
import json
from .models import Source
#getting api key
api_key = None
#getting news base url
base_url = None
articles_url = None
def get_source(category):
'''
Function that gets json response to our url request
'''
get_source_url = base_url.format(category,api_key)
prin... | 28.603774 | 92 | 0.684697 | import urllib.request
import json
from .models import Source,Article
#getting api key
api_key = None
#getting news base url
base_url = None
articles_url = None
def configure_request(app):
global api_key,base_url,articles_url
api_key=app.config['NEWS_API_KEY']
base_url=app.config['SOURCE_API_BASE_URL... | 0 | 0 | 0 | 0 | 0 | 838 | 0 | 8 | 46 |
205e2899ecf3255623bb4f84573a657b29b50370 | 957 | py | Python | 32xcoverage.py | Jan-Wignall/Homework | 48ec6bc58bd1facf7199ed8b66bcf8fbe67315eb | [
"MIT"
] | null | null | null | 32xcoverage.py | Jan-Wignall/Homework | 48ec6bc58bd1facf7199ed8b66bcf8fbe67315eb | [
"MIT"
] | null | null | null | 32xcoverage.py | Jan-Wignall/Homework | 48ec6bc58bd1facf7199ed8b66bcf8fbe67315eb | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
# Write a program that simulates random read coverage over a chromosome
# Report min, max, and average coverage
# Make variables for genome size, read number, read length
# Input values from the command line
# Note that you will not sample the ends of a chromosome very well
# So don't count the ... | 22.785714 | 71 | 0.698015 | #!/usr/bin/env python3
# Write a program that simulates random read coverage over a chromosome
# Report min, max, and average coverage
# Make variables for genome size, read number, read length
# Input values from the command line
# Note that you will not sample the ends of a chromosome very well
# So don't count the ... | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
f09c31dafea5b18da11a2131cf977bcb2e1fc027 | 1,686 | py | Python | 450/Nagendra/greedy/Job Sequencing Problem .py | Nagendracse1/Competitive-Programming | 325e151b9259dbc31d331c8932def42e3ab09913 | [
"MIT"
] | 3 | 2020-12-20T10:23:11.000Z | 2021-06-16T10:34:18.000Z | 450/Nagendra/greedy/Job Sequencing Problem .py | Spring-dot/Competitive-Programming | 98add277a8b029710c749d1082de25c524e12408 | [
"MIT"
] | null | null | null | 450/Nagendra/greedy/Job Sequencing Problem .py | Spring-dot/Competitive-Programming | 98add277a8b029710c749d1082de25c524e12408 | [
"MIT"
] | null | null | null | #link https://practice.geeksforgeeks.org/problems/job-sequencing-problem-1587115620/1#
def JobScheduling(Jobs,n):
'''
:param Jobs: list of "Job" class defined in driver code, with "profit" and "deadline".
:param n: total number of jobs
:return: A list of size 2 having list[0] = count of jobs and list[1... | 25.938462 | 90 | 0.543298 | #link https://practice.geeksforgeeks.org/problems/job-sequencing-problem-1587115620/1#
def JobScheduling(Jobs,n):
'''
:param Jobs: list of "Job" class defined in driver code, with "profit" and "deadline".
:param n: total number of jobs
:return: A list of size 2 having list[0] = count of jobs and list[1... | 0 | 0 | 0 | 179 | 0 | 0 | 0 | -31 | 88 |
81c5dd89afcb9bd4d36f1eb3321094952f9089ac | 452 | py | Python | code/make_net.py | statisticszhang/Image-classification-caffe-model | 33084ca0841e768dae84db582e15bb29ffeeaaec | [
"MIT"
] | 1 | 2020-06-03T12:53:43.000Z | 2020-06-03T12:53:43.000Z | code/make_net.py | statisticszhang/Image-classification-caffe-model | 33084ca0841e768dae84db582e15bb29ffeeaaec | [
"MIT"
] | null | null | null | code/make_net.py | statisticszhang/Image-classification-caffe-model | 33084ca0841e768dae84db582e15bb29ffeeaaec | [
"MIT"
] | null | null | null | import inception_v3
if __name__ == '__main__':
model = inception_v3.InceptionV3('imagenet_test_lmdb', 'imagenet_train_lmdb', 1000)
train_proto = model.inception_v3_proto(64)
test_proto = model.inception_v3_proto(64, phase='TEST')
save_proto(train_proto, 'imagenet_train.prototxt')
save_proto(tes... | 26.588235 | 87 | 0.727876 | import inception_v3
def save_proto(proto, prototxt):
with open(prototxt, 'w') as f:
f.write(str(proto))
if __name__ == '__main__':
model = inception_v3.InceptionV3('imagenet_test_lmdb', 'imagenet_train_lmdb', 1000)
train_proto = model.inception_v3_proto(64)
test_proto = model.inception_v3_p... | 0 | 0 | 0 | 0 | 0 | 74 | 0 | 0 | 23 |
9b8f07e157c6588a775d6619b9a559fea0c384f1 | 1,750 | py | Python | src/nn/train.py | bahorn/BrumHack7 | cffa2484f63728e73d6dd2bbe6b24fbd12e1cd93 | [
"Unlicense"
] | null | null | null | src/nn/train.py | bahorn/BrumHack7 | cffa2484f63728e73d6dd2bbe6b24fbd12e1cd93 | [
"Unlicense"
] | null | null | null | src/nn/train.py | bahorn/BrumHack7 | cffa2484f63728e73d6dd2bbe6b24fbd12e1cd93 | [
"Unlicense"
] | null | null | null |
# based on the keras documentation
#
import numpy as np
from keras.models import Sequential
from keras.layers import Dense, Conv1D, Activation
from keras import losses, optimizers
import keras.utils as keras_utils
import json
f = open('data_for_everything')
j = json.load(f)
# our parameters
nn_input_size = len(j[0]... | 26.923077 | 69 | 0.726857 |
# based on the keras documentation
#
import numpy as np
from keras.models import Sequential
from keras.layers import Dense, Conv1D,Activation
from keras import losses, optimizers
import keras.utils as keras_utils
import json
f = open('data_for_everything')
j = json.load(f)
# our parameters
nn_input_size = len(j[0][... | 0 | 0 | 0 | 0 | 0 | 0 | 0 | -1 | 0 |
5f4d3ac4d5f1f55e81a6e2d8f4472443466c8220 | 2,430 | py | Python | models/fault/optimization/fseg_keras2tf.py | vkb1/openseismic | 51f91e658a74e2c38910b686b2e96b73e77f5eb5 | [
"Apache-2.0"
] | 7 | 2021-05-13T05:53:09.000Z | 2022-03-03T21:44:10.000Z | models/fault/optimization/fseg_keras2tf.py | manaspathak89/openseismic | 034de2abf00feddab6ae8151b46abc2fa7153091 | [
"Apache-2.0"
] | null | null | null | models/fault/optimization/fseg_keras2tf.py | manaspathak89/openseismic | 034de2abf00feddab6ae8151b46abc2fa7153091 | [
"Apache-2.0"
] | 4 | 2021-04-23T20:45:12.000Z | 2021-07-03T23:58:08.000Z | #
# Copyright (C) 2021 Intel Corporation
# SPDX-License-Identifier: Apache-2.0
#
#
import argparse
import tensorflow as tf
import warnings
from tensorflow.python.util import deprecation
import os
os.environ['TF_CPP_MIN_LOG_LEVEL'] = '3'
deprecation._PRINT_DEPRECATION_WARNINGS = False
warnings.filterwarnings("ignore")
... | 32.4 | 91 | 0.671605 | #
# Copyright (C) 2021 Intel Corporation
# SPDX-License-Identifier: Apache-2.0
#
#
import argparse
from unet3 import cross_entropy_balanced
import tensorflow.keras.backend as K
from keras.models import load_model
from keras.layers import *
from tensorflow.python.framework import graph_io
from tensorflow.python.framewor... | 0 | 0 | 0 | 0 | 0 | 898 | 0 | 106 | 177 |
33193c2a64207c1183330c27a42bd80b4a8def1f | 35,027 | py | Python | crosshair/condition_parser.py | Rik-de-Kort/CrossHair | e0a06969d571aebcc582359afdedf25f38630c0d | [
"MIT"
] | null | null | null | crosshair/condition_parser.py | Rik-de-Kort/CrossHair | e0a06969d571aebcc582359afdedf25f38630c0d | [
"MIT"
] | null | null | null | crosshair/condition_parser.py | Rik-de-Kort/CrossHair | e0a06969d571aebcc582359afdedf25f38630c0d | [
"MIT"
] | null | null | null | import re
try:
import icontract
except ModuleNotFoundError:
icontract = None # type: ignore
try:
import hypothesis
except ModuleNotFoundError:
hypothesis = None # type: ignore
from crosshair.options import AnalysisKind
from crosshair.util import sourcelines
from crosshair.util import DynamicScopeVa... | 34.006796 | 101 | 0.589374 | import ast
import collections
import contextlib
import enum
from functools import partial
from functools import wraps
import inspect
from inspect import BoundArguments
import re
import sys
import textwrap
import traceback
import types
from dataclasses import dataclass
from dataclasses import replace
from typing import ... | 0 | 5,580 | 0 | 18,555 | 536 | 7,133 | 0 | 240 | 1,203 |
7728396fa6ae2ee6bce161c0ee02704806a006c0 | 427 | py | Python | garambubot.py | MaelC001/SPI2022 | ddcbb0b1e480fe0ba43e1dc90826a157a5f58828 | [
"MIT"
] | null | null | null | garambubot.py | MaelC001/SPI2022 | ddcbb0b1e480fe0ba43e1dc90826a157a5f58828 | [
"MIT"
] | null | null | null | garambubot.py | MaelC001/SPI2022 | ddcbb0b1e480fe0ba43e1dc90826a157a5f58828 | [
"MIT"
] | 1 | 2022-03-22T17:21:05.000Z | 2022-03-22T17:21:05.000Z |
if __name__=="__main__":
pass | 21.35 | 42 | 0.709602 | import botutils
import intutils
import sbotutils
def Ask(string,doublecheck=False):
final=""
l1=botutils.processTweet(string)
l2=[] #Recuperador Zeltzyn y Darío
l3=[]
if doublecheck:
l2=sbotutils.processTweet2(string)
final=botutils.Interact(l1,l2,l3)
#print(final)
return final
... | 2 | 0 | 0 | 0 | 0 | 297 | 0 | -17 | 112 |
39f36ae4936152662e344884ef131faba41464cd | 197 | py | Python | config.py | prstrive/CondConv-tensorflow | 1a626e454d341eb892f428ac0ac9a549aff35cbf | [
"MIT"
] | 16 | 2020-09-25T08:55:37.000Z | 2022-03-31T05:10:44.000Z | config.py | prstrive/CondConv-tensorflow | 1a626e454d341eb892f428ac0ac9a549aff35cbf | [
"MIT"
] | 2 | 2021-01-14T01:37:58.000Z | 2021-06-16T02:43:05.000Z | config.py | prstrive/CondConv-tensorflow | 1a626e454d341eb892f428ac0ac9a549aff35cbf | [
"MIT"
] | 4 | 2021-10-15T23:47:35.000Z | 2022-02-18T08:33:44.000Z | MEAN = {"imagenet": [0.485, 0.456, 0.406], "cifar": [0.4914, 0.4822, 0.4465]}
STD = {"imagenet": [0.229, 0.224, 0.225], "cifar": [0.2023, 0.1994, 0.2010]}
WEIGHT_DECAY = 2e-4
LABEL_SMOOTH = 2e-1
| 28.142857 | 77 | 0.593909 | MEAN = {"imagenet": [0.485, 0.456, 0.406], "cifar": [0.4914, 0.4822, 0.4465]}
STD = {"imagenet": [0.229, 0.224, 0.225], "cifar": [0.2023, 0.1994, 0.2010]}
WEIGHT_DECAY = 2e-4
LABEL_SMOOTH = 2e-1
| 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
28c896444d8782bdea5304d4d960c923e548df5f | 2,739 | py | Python | energy_py/common/experiments/runner.py | liudaizong/energy_py | 7b6a3f52d3ea067061e95b931a7b864d1247e123 | [
"MIT"
] | 1 | 2020-12-03T01:22:27.000Z | 2020-12-03T01:22:27.000Z | energy_py/common/experiments/runner.py | liudaizong/energy_py | 7b6a3f52d3ea067061e95b931a7b864d1247e123 | [
"MIT"
] | null | null | null | energy_py/common/experiments/runner.py | liudaizong/energy_py | 7b6a3f52d3ea067061e95b931a7b864d1247e123 | [
"MIT"
] | null | null | null | """
the Runner class has two main functions
1 - keeping track of episode rewards
2 - logging reward info to tensorboard
3 - saving reward history to csv
"""
import logging
logger = logging.getLogger(__name__)
| 27.94898 | 77 | 0.585615 | """
the Runner class has two main functions
1 - keeping track of episode rewards
2 - logging reward info to tensorboard
3 - saving reward history to csv
"""
import csv
import logging
import numpy as np
import tensorflow as tf
logger = logging.getLogger(__name__)
class Runner(object):
"""
Giving the runner... | 0 | 0 | 0 | 2,448 | 0 | 0 | 0 | -12 | 91 |
86c2b8cb820ced4796bf2591fa44dd00ca8adfe6 | 4,608 | py | Python | lottery.v2.py | lybing/LotteryAnalysis | 285228de2247fa361ead46590ef9ed4b65c25b4f | [
"MIT"
] | null | null | null | lottery.v2.py | lybing/LotteryAnalysis | 285228de2247fa361ead46590ef9ed4b65c25b4f | [
"MIT"
] | null | null | null | lottery.v2.py | lybing/LotteryAnalysis | 285228de2247fa361ead46590ef9ed4b65c25b4f | [
"MIT"
] | null | null | null |
# Html
# parsePage()
# Pie
analysisFrequency_Pie3D() | 43.065421 | 333 | 0.603733 | import requests
import re
import pymysql
from pyecharts import Bar, Pie, Bar3D
from lotterymodel import PeriodModel,WinningNumberModel,SalesInfoModel
def getContent():
url = 'https://datachart.500.com/ssq/history/newinc/outball.php?start=01001&end=18100'
return requests.get(url).text
def parsePage():
try... | 210 | 0 | 0 | 0 | 0 | 4,194 | 0 | 40 | 250 |
8b872fea8e90d06ddd003885d709ef5bfd933682 | 853 | py | Python | backbone/drn/from_drn.py | lartpang/OpticalFlowBasedVOS | cd4856644b77dd963133797c543aeafb4f402217 | [
"MIT"
] | 6 | 2020-11-19T04:20:52.000Z | 2021-09-24T02:40:11.000Z | backbone/drn/from_drn.py | lartpang/OpticalFlowBasedVOS | cd4856644b77dd963133797c543aeafb4f402217 | [
"MIT"
] | null | null | null | backbone/drn/from_drn.py | lartpang/OpticalFlowBasedVOS | cd4856644b77dd963133797c543aeafb4f402217 | [
"MIT"
] | 2 | 2020-11-22T02:02:18.000Z | 2021-11-14T08:56:15.000Z | import torch
if __name__ == "__main__":
conv_list = Backbone_DRNA50_in3(in_C=3)
x = torch.randn((1, 3, 320, 320))
# torch.Size([1, 3, 320, 320])
# torch.Size([1, 64, 160, 160])
# torch.Size([1, 256, 80, 80])
# torch.Size([1, 512, 40, 40])
# torch.Size([1, 1024, 40, 40])
for conv in co... | 26.65625 | 87 | 0.610785 | import torch
from torch import nn
from backbone.drn.drn import drn_a_50
def Backbone_DRNA50_in3(in_C):
net = drn_a_50(pretrained=True)
if in_C != 3:
net.conv1 = nn.Conv2d(in_C, 64, kernel_size=7, stride=2, padding=3, bias=False)
div_2 = nn.Sequential(*list(net.children())[:3])
div_4 = nn.Sequ... | 0 | 0 | 0 | 0 | 0 | 377 | 0 | 15 | 68 |
37b8ba02ae29570de854afb8165999971707912e | 243 | py | Python | platform/core/polyaxon/api/build_jobs/queries.py | hackerwins/polyaxon | ff56a098283ca872abfbaae6ba8abba479ffa394 | [
"Apache-2.0"
] | null | null | null | platform/core/polyaxon/api/build_jobs/queries.py | hackerwins/polyaxon | ff56a098283ca872abfbaae6ba8abba479ffa394 | [
"Apache-2.0"
] | null | null | null | platform/core/polyaxon/api/build_jobs/queries.py | hackerwins/polyaxon | ff56a098283ca872abfbaae6ba8abba479ffa394 | [
"Apache-2.0"
] | null | null | null | from db.models.build_jobs import BuildJob
builds = BuildJob.objects.select_related(
'status',
)
builds = builds.prefetch_related(
'user',
'project',
'project__user',
)
builds_details = builds.select_related('code_reference')
| 18.692308 | 56 | 0.728395 | from db.models.build_jobs import BuildJob
builds = BuildJob.objects.select_related(
'status',
)
builds = builds.prefetch_related(
'user',
'project',
'project__user',
)
builds_details = builds.select_related('code_reference')
| 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
88dfdfa427cfd5fd1939a962c6595eda307b4052 | 9,106 | py | Python | ceph_cfg/service.py | x22x22/python-ceph-cfg | eb23a70056dd8ef8bebe3b29882e24fe519d44a4 | [
"Apache-2.0"
] | 9 | 2016-04-20T12:34:41.000Z | 2018-04-13T03:09:55.000Z | ceph_cfg/service.py | x22x22/python-ceph-cfg | eb23a70056dd8ef8bebe3b29882e24fe519d44a4 | [
"Apache-2.0"
] | 31 | 2016-04-25T13:51:16.000Z | 2016-11-11T22:09:07.000Z | ceph_cfg/service.py | x22x22/python-ceph-cfg | eb23a70056dd8ef8bebe3b29882e24fe519d44a4 | [
"Apache-2.0"
] | 12 | 2016-04-20T12:34:49.000Z | 2018-10-16T10:46:17.000Z | # Import Python Libs
from __future__ import absolute_import
import logging
# Local imports
log = logging.getLogger(__name__)
init_types_available = set([ "systemd" , "sysV"])
| 30.557047 | 111 | 0.552273 | # Import Python Libs
from __future__ import absolute_import
import logging
# Local imports
from . import utils
from . import util_which
log = logging.getLogger(__name__)
init_types_available = set([ "systemd" , "sysV"])
def Property(func):
return property(**func())
class init_exception(Exception):
"""Ba... | 0 | 922 | 0 | 7,768 | 0 | 28 | 0 | 1 | 205 |
5eecc24d45e96b3ed3e415fb8a09112716b03f53 | 3,879 | py | Python | homeassistant/components/hangouts/config_flow.py | shanbs/home-assistant | 818776d2b4f11e4f51992dc88bc0a6f9055833b2 | [
"Apache-2.0"
] | 2 | 2017-10-26T19:43:55.000Z | 2017-12-30T23:29:00.000Z | homeassistant/components/hangouts/config_flow.py | shanbs/home-assistant | 818776d2b4f11e4f51992dc88bc0a6f9055833b2 | [
"Apache-2.0"
] | 3 | 2021-09-08T03:34:57.000Z | 2022-03-12T00:59:48.000Z | homeassistant/components/hangouts/config_flow.py | shanbs/home-assistant | 818776d2b4f11e4f51992dc88bc0a6f9055833b2 | [
"Apache-2.0"
] | 1 | 2019-09-28T07:06:08.000Z | 2019-09-28T07:06:08.000Z | """Config flow to configure Google Hangouts."""
| 35.916667 | 78 | 0.572055 | """Config flow to configure Google Hangouts."""
import voluptuous as vol
from homeassistant import config_entries
from homeassistant.const import CONF_EMAIL, CONF_PASSWORD
from homeassistant.core import callback
from .const import CONF_2FA, CONF_REFRESH_TOKEN, DOMAIN as HANGOUTS_DOMAIN
@callback
def configured_hang... | 0 | 3,542 | 0 | 0 | 0 | 0 | 0 | 129 | 158 |
5ab759d518cc1a610f90476530247b11e46d422f | 1,584 | py | Python | applications/_ah/controllers/xmpp.py | murray3/augmi-a | 9f8cff457fa3966d67d3752ccd86876b08bb19b1 | [
"BSD-3-Clause"
] | 1 | 2017-03-28T21:31:51.000Z | 2017-03-28T21:31:51.000Z | applications/_ah/controllers/xmpp.py | murray3/augmi-a | 9f8cff457fa3966d67d3752ccd86876b08bb19b1 | [
"BSD-3-Clause"
] | null | null | null | applications/_ah/controllers/xmpp.py | murray3/augmi-a | 9f8cff457fa3966d67d3752ccd86876b08bb19b1 | [
"BSD-3-Clause"
] | null | null | null |
PONDER_MSG = "Hmm. Let me think on that a bit."
TELLME_MSG = "While I'm thinking, perhaps you can answer me this: %s"
SOMEONE_ANSWERED_MSG = ("We seek those who are wise and fast. One out of two "
"is not enough. Another has answered my question.")
ANSWER_INTRO_MSG = "You asked me: %s"
ANSWER_M... | 44 | 80 | 0.640783 | from google.appengine.api import xmpp
from google.appengine.api import users
PONDER_MSG = "Hmm. Let me think on that a bit."
TELLME_MSG = "While I'm thinking, perhaps you can answer me this: %s"
SOMEONE_ANSWERED_MSG = ("We seek those who are wise and fast. One out of two "
"is not enough. Anoth... | 0 | 0 | 0 | 0 | 0 | 534 | 0 | 33 | 67 |
7d68a712fe6f09d27e17f30e9d12789853fe22e5 | 2,381 | py | Python | predict.py | CMACH508/RecSleepNet | 08571e85a8330e41b4f124baad5a33fbd3207e32 | [
"Apache-1.1"
] | 5 | 2022-02-08T23:58:32.000Z | 2022-03-01T14:46:04.000Z | predict.py | CMACH508/RecSleepNet | 08571e85a8330e41b4f124baad5a33fbd3207e32 | [
"Apache-1.1"
] | null | null | null | predict.py | CMACH508/RecSleepNet | 08571e85a8330e41b4f124baad5a33fbd3207e32 | [
"Apache-1.1"
] | null | null | null | import argparse
import os
import numpy as np
def compute_performance(cm):
"""Computer performance metrics from confusion matrix.
It computers performance metrics from confusion matrix.
It returns:
- Total number of samples
- Number of samples in each class
- Accuracy
- Macro... | 30.922078 | 92 | 0.627467 | import argparse
import os
import numpy as np
import tensorflow as tf
from data import get_split
from model import TinySleepNet
from minibatching import batch_generator
from config import config
def compute_performance(cm):
"""Computer performance metrics from confusion matrix.
It computers performance metrics ... | 0 | 0 | 0 | 0 | 0 | 969 | 0 | 39 | 133 |
9a1a04d6c5a43933025680e6c35cf944cab4dfa2 | 11,426 | py | Python | SimModel_Python_API/simmodel_swig/Release/SimFlowEnergyTransfer_ConvectiveHeater_Radiant_Water.py | EnEff-BIM/EnEffBIM-Framework | 6328d39b498dc4065a60b5cc9370b8c2a9a1cddf | [
"MIT"
] | 3 | 2016-05-30T15:12:16.000Z | 2022-03-22T08:11:13.000Z | SimModel_Python_API/simmodel_swig/Release/SimFlowEnergyTransfer_ConvectiveHeater_Radiant_Water.py | EnEff-BIM/EnEffBIM-Framework | 6328d39b498dc4065a60b5cc9370b8c2a9a1cddf | [
"MIT"
] | 21 | 2016-06-13T11:33:45.000Z | 2017-05-23T09:46:52.000Z | SimModel_Python_API/simmodel_swig/Release/SimFlowEnergyTransfer_ConvectiveHeater_Radiant_Water.py | EnEff-BIM/EnEffBIM-Framework | 6328d39b498dc4065a60b5cc9370b8c2a9a1cddf | [
"MIT"
] | null | null | null | # This file was automatically generated by SWIG (http://www.swig.org).
# Version 3.0.7
#
# Do not make changes to this file unless you know what you are doing--modify
# the SWIG interface file instead.
from sys import version_info
if version_info >= (2, 6, 0):
_SimFlowEnergyTransfer_ConvectiveHeater_Radiant_Wa... | 49.678261 | 205 | 0.801505 | # This file was automatically generated by SWIG (http://www.swig.org).
# Version 3.0.7
#
# Do not make changes to this file unless you know what you are doing--modify
# the SWIG interface file instead.
from sys import version_info
if version_info >= (2, 6, 0):
def swig_import_helper():
from os.path imp... | 0 | 0 | 0 | 7,764 | 0 | 1,907 | 0 | 20 | 257 |
9c47e070e4e9b838255fab89f25b0c3ff2c542ca | 212 | py | Python | {{cookiecutter.project_folder}}/code/{{cookiecutter.python_libname}}/data/__init__.py | gaulinmp/cookiecutter-research-project-template | 7d5feff90d2303d8bfd8a2916c8dac9fa1ba185c | [
"MIT"
] | null | null | null | {{cookiecutter.project_folder}}/code/{{cookiecutter.python_libname}}/data/__init__.py | gaulinmp/cookiecutter-research-project-template | 7d5feff90d2303d8bfd8a2916c8dac9fa1ba185c | [
"MIT"
] | null | null | null | {{cookiecutter.project_folder}}/code/{{cookiecutter.python_libname}}/data/__init__.py | gaulinmp/cookiecutter-research-project-template | 7d5feff90d2303d8bfd8a2916c8dac9fa1ba185c | [
"MIT"
] | 2 | 2021-07-01T14:44:06.000Z | 2022-02-05T22:57:39.000Z | #!/usr/bin/env python
# -*- coding: utf-8 -*-
"""
Data module for importing and cleaning data sets.
Import / download / cache datasets in `download` module.
Get and filter sample in `sample` module.
"""
| 23.555556 | 57 | 0.665094 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
"""
Data module for importing and cleaning data sets.
Import / download / cache datasets in `download` module.
Get and filter sample in `sample` module.
"""
| 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
423b4a78a6fc89f01fe25f2a4e27bb8b262709f4 | 3,042 | py | Python | libraries/scripts/updater/update_vendor_deps.py | pjreiniger/GirlsOfSteelFRC | 03ab0fb699dfc14985ce3c95b1eacb145288fc7e | [
"BSD-3-Clause"
] | null | null | null | libraries/scripts/updater/update_vendor_deps.py | pjreiniger/GirlsOfSteelFRC | 03ab0fb699dfc14985ce3c95b1eacb145288fc7e | [
"BSD-3-Clause"
] | 44 | 2021-11-09T23:23:48.000Z | 2022-03-22T23:44:15.000Z | libraries/scripts/updater/update_vendor_deps.py | pjreiniger/GirlsOfSteelFRC | 03ab0fb699dfc14985ce3c95b1eacb145288fc7e | [
"BSD-3-Clause"
] | 1 | 2021-11-19T03:45:21.000Z | 2021-11-19T03:45:21.000Z | """
Downloads the latest version of the vendor dependences, and replaces all copies of them in the repository
"""
import os
import tempfile
CACHE_DIRECTORY = os.path.join(tempfile.gettempdir(), "gos_vendor_cache")
if __name__ == "__main__":
main()
| 35.372093 | 129 | 0.667324 | """
Downloads the latest version of the vendor dependences, and replaces all copies of them in the repository
"""
import os
import shutil
import tempfile
from urllib.request import urlopen, Request
from libraries.scripts.updater.utils import walk_with_blacklist
from libraries.scripts.git.git_python_wrappers import comm... | 0 | 0 | 0 | 0 | 0 | 2,520 | 0 | 107 | 157 |
48994d838b36c0a4b7a0dce2031a68774d2ae381 | 3,545 | py | Python | async/001_async_threads_processes/03_multiprocessing/03_unsync/1_examples.py | AleksNeStu/projects | 1a4c68dfbdcb77228f0f3617e58fd18fcb1f5dbb | [
"Apache-2.0"
] | 2 | 2022-01-19T18:01:35.000Z | 2022-02-06T06:54:38.000Z | async/001_async_threads_processes/03_multiprocessing/03_unsync/1_examples.py | AleksNeStu/projects | 1a4c68dfbdcb77228f0f3617e58fd18fcb1f5dbb | [
"Apache-2.0"
] | null | null | null | async/001_async_threads_processes/03_multiprocessing/03_unsync/1_examples.py | AleksNeStu/projects | 1a4c68dfbdcb77228f0f3617e58fd18fcb1f5dbb | [
"Apache-2.0"
] | null | null | null | import asyncio
from unsync import unsync
from codetiming import Timer
# unsync
# Unsynchronize asyncio by using an ambient event loop, or executing in separate threads or processes.
#
# Quick Overview
# Functions marked with the @unsync decorator will behave in one of the following ways:
#
# async functions will run ... | 31.936937 | 177 | 0.736812 | import asyncio
from unsync import unsync
from codetiming import Timer
import time
# unsync
# Unsynchronize asyncio by using an ambient event loop, or executing in separate threads or processes.
#
# Quick Overview
# Functions marked with the @unsync decorator will behave in one of the following ways:
#
# async functio... | 0 | 392 | 229 | 0 | 0 | 0 | 0 | -18 | 223 |
2432cd8c8e059ae2f2a89ffe68c1cc3e49ea87aa | 607 | py | Python | game/Player.py | thisHermit/chain-reaction-ai | f8f597afee813452b6fed4d6a090b21682aee4eb | [
"Apache-2.0"
] | 1 | 2019-02-08T18:39:22.000Z | 2019-02-08T18:39:22.000Z | game/Player.py | thisHermit/chain-reaction-ai | f8f597afee813452b6fed4d6a090b21682aee4eb | [
"Apache-2.0"
] | null | null | null | game/Player.py | thisHermit/chain-reaction-ai | f8f597afee813452b6fed4d6a090b21682aee4eb | [
"Apache-2.0"
] | null | null | null | """The Player class stores all the functions and data related to the Player."""
| 22.481481 | 79 | 0.497529 | """The Player class stores all the functions and data related to the Player."""
from pygame import Rect
class Player:
COLORS = [
(255, 0, 0), # Tomato
(0, 0, 255), # Blue
(60, 179, 113), # Green
(238, 130, 238), # Pink
(255, 165, 0), # Orange
... | 0 | 0 | 0 | 454 | 0 | 0 | 0 | 2 | 69 |
224074df75f78dcfca0040ed97f1e411c08ad25e | 23,710 | py | Python | cornflow-dags/DAG/rostering/core/instance.py | ggsdc/corn | 4c17c46a70f95b8882bcb6a55ef7daa1f69e0456 | [
"MIT"
] | 2 | 2020-07-09T20:58:47.000Z | 2020-07-20T20:40:46.000Z | cornflow-dags/DAG/rostering/core/instance.py | baobabsoluciones/cornflow | bd7cae22107e5fe148704d5f41d4f58f9c410b40 | [
"Apache-2.0"
] | 2 | 2022-03-31T08:42:10.000Z | 2022-03-31T12:05:23.000Z | cornflow-dags/DAG/rostering/core/instance.py | ggsdc/corn | 4c17c46a70f95b8882bcb6a55ef7daa1f69e0456 | [
"MIT"
] | null | null | null | """
"""
# Imports from libraries
# Imports from cornflow libraries
# Imports from internal modules
| 38.932677 | 114 | 0.59186 | """
"""
# Imports from libraries
from datetime import datetime
import os
import pickle
from pytups import SuperDict, TupList
from typing import Dict, Tuple
# Imports from cornflow libraries
from cornflow_client import InstanceCore
from cornflow_client.core.tools import load_json
# Imports from internal modules
from ... | 0 | 1,062 | 0 | 22,113 | 0 | 0 | 0 | 233 | 199 |
93adcce6dad3adb52f0381fed1a175f1c5ef1f73 | 1,455 | py | Python | Python/login.py | zSucrilhos/programming | aa0076a4a7084a6064e1e5df258ba0c90cf8ceeb | [
"MIT"
] | null | null | null | Python/login.py | zSucrilhos/programming | aa0076a4a7084a6064e1e5df258ba0c90cf8ceeb | [
"MIT"
] | 4 | 2020-07-18T03:27:03.000Z | 2020-07-18T03:28:37.000Z | Python/login.py | zSucrilhos/programming | aa0076a4a7084a6064e1e5df258ba0c90cf8ceeb | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
a = 'Formulrio de Login, "LogForm v0.3"'
print(f'{a:^59}')
print('#'*59)
usuarios = []
senhas = []
while True:
if not usuarios:
print('No h usurios registrados anteriormente.\nRegistre um novo usurio!\n')
print('Registrar novo usurio?\n\t1 - SIM\n\t2 - NO\n\t')
se = str(input('>>> '))
... | 26.454545 | 82 | 0.67354 | # -*- coding: utf-8 -*-
a = 'Formulário de Login, "LogForm v0.3"'
print(f'{a:^59}')
print('#'*59)
usuarios = []
senhas = []
def new_usr():
usr_name = str(input('Novo nome de usuário: '))
usuarios.append(usr_name)
usr_psw = str(input('Nova senha: '))
senhas.append(usr_psw)
def login():
print('Digite o seu nome... | 40 | 0 | 0 | 0 | 0 | 800 | 0 | 0 | 46 |
ca6b1ee760dac02315106bd155a233ac24b165b6 | 115,936 | py | Python | ghostdr/ghost/primitives_ghost_spect.py | GeminiDRSoftware/GHOSTDR | 79cd1ac81a7458e06668d6dac51fc6f9c9c61b31 | [
"BSD-3-Clause"
] | 1 | 2019-09-05T15:29:25.000Z | 2019-09-05T15:29:25.000Z | ghostdr/ghost/primitives_ghost_spect.py | GeminiDRSoftware/GHOSTDR | 79cd1ac81a7458e06668d6dac51fc6f9c9c61b31 | [
"BSD-3-Clause"
] | null | null | null | ghostdr/ghost/primitives_ghost_spect.py | GeminiDRSoftware/GHOSTDR | 79cd1ac81a7458e06668d6dac51fc6f9c9c61b31 | [
"BSD-3-Clause"
] | 2 | 2017-10-10T23:23:53.000Z | 2022-02-15T23:28:22.000Z | #
# gemini_python
#
# primitives_ghost_spect.py
# ------------------------------------------------------------------------------
import numpy as np
import scipy.signal as signal
import astropy.coordinat... | 46.152866 | 97 | 0.534002 | #
# gemini_python
#
# primitives_ghost_spect.py
# ------------------------------------------------------------------------------
import os
import numpy as np
import math
from copy import deepcopy
import... | 0 | 113,121 | 0 | 0 | 0 | 0 | 0 | 327 | 558 |
d576252de412a2afd8fc308136087e909b325fd1 | 6,368 | py | Python | test/functional/bsv-p2sh-wallet.py | Trackerming/bitcoin-sv | fb50a64e3ea0334a86b2c80daf5147c5bc2693c4 | [
"MIT"
] | 8 | 2019-08-02T02:49:42.000Z | 2022-01-17T15:51:48.000Z | test/functional/bsv-p2sh-wallet.py | Trackerming/bitcoin-sv | fb50a64e3ea0334a86b2c80daf5147c5bc2693c4 | [
"MIT"
] | null | null | null | test/functional/bsv-p2sh-wallet.py | Trackerming/bitcoin-sv | fb50a64e3ea0334a86b2c80daf5147c5bc2693c4 | [
"MIT"
] | 4 | 2019-08-02T02:50:44.000Z | 2021-05-28T03:21:38.000Z | #!/usr/bin/env python3
# Copyright (c) 2017 The Bitcoin developers
# Copyright (c) 2019 Bitcoin Association
# Distributed under the Open BSV software license, see the accompanying file LICENSE.
"""
This test checks the behaviour of P2SH before and after genesis.
"""
# a little handier version of create_transaction
... | 40.820513 | 153 | 0.681062 | #!/usr/bin/env python3
# Copyright (c) 2017 The Bitcoin developers
# Copyright (c) 2019 Bitcoin Association
# Distributed under the Open BSV software license, see the accompanying file LICENSE.
"""
This test checks the behaviour of P2SH before and after genesis.
"""
from test_framework.test_framework import Compariso... | 0 | 0 | 0 | 4,276 | 0 | 764 | 0 | 178 | 224 |
499cd9a76cac4a60772cf71947ac166d58747cce | 14,982 | py | Python | poor_trader/indicators.py | johndpope/poor-trader-py | 097fbb10c217abe0db5a2cd55d73e0ad2990acd9 | [
"MIT"
] | 1 | 2020-03-30T19:04:39.000Z | 2020-03-30T19:04:39.000Z | poor_trader/indicators.py | johndpope/poor-trader-py | 097fbb10c217abe0db5a2cd55d73e0ad2990acd9 | [
"MIT"
] | null | null | null | poor_trader/indicators.py | johndpope/poor-trader-py | 097fbb10c217abe0db5a2cd55d73e0ad2990acd9 | [
"MIT"
] | null | null | null | import os
import pandas as pd
from poor_trader.utils import quotes_range
from poor_trader.config import INDICATORS_OUTPUT_PATH
def SMMA(series, window=14):
""" get smoothed moving average.
:param df: data
:param windows: range
:return: result series
"""
smma = series.ewm(
... | 35.41844 | 154 | 0.630023 | import os
from os import listdir
from os.path import isfile, join
import re
from path import Path
import numpy as np
import pandas as pd
from poor_trader import utils
from poor_trader.utils import quotes_range
from poor_trader.config import INDICATORS_OUTPUT_PATH
def _true_range(df_quotes, indices):
cur = df_qu... | 0 | 0 | 0 | 0 | 0 | 13,226 | 0 | 5 | 571 |
2e1638de5d06c7e67de2514d2d21c01650ab39f6 | 3,629 | py | Python | versions.py | flrt/ref-ameli | e8e6bb82b8cec999f19355ccf8b6adb15c080ec2 | [
"MIT"
] | 6 | 2018-05-25T09:54:03.000Z | 2020-01-28T10:49:28.000Z | versions.py | flrt/ref-ameli | e8e6bb82b8cec999f19355ccf8b6adb15c080ec2 | [
"MIT"
] | null | null | null | versions.py | flrt/ref-ameli | e8e6bb82b8cec999f19355ccf8b6adb15c080ec2 | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
Programme de vrification des rfrentiels AMELi
"""
__author__ = 'Frederic Laurent'
__version__ = "1.1"
__copyright__ = 'Copyright 2017, Frederic Laurent'
__license__ = "MIT"
| 34.235849 | 111 | 0.638468 | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
Programme de vérification des référentiels AMELi
"""
__author__ = 'Frederic Laurent'
__version__ = "1.1"
__copyright__ = 'Copyright 2017, Frederic Laurent'
__license__ = "MIT"
import json
import logging
import os.path
from easy_atom import helpers
class Versio... | 40 | 0 | 0 | 3,282 | 0 | 0 | 0 | -16 | 113 |
bda00df42abd5cd82b0e37df557e2e08b492d4c8 | 7,600 | py | Python | pytiff/test/test_write.py | ch-schiffer/pytiff | 99f8a7eb6e41e974fab1d49b2979670c8346d0ae | [
"BSD-3-Clause"
] | 9 | 2017-01-04T12:43:42.000Z | 2022-03-21T11:38:14.000Z | pytiff/test/test_write.py | ch-schiffer/pytiff | 99f8a7eb6e41e974fab1d49b2979670c8346d0ae | [
"BSD-3-Clause"
] | 19 | 2016-06-06T07:49:33.000Z | 2020-11-27T13:25:51.000Z | pytiff/test/test_write.py | ch-schiffer/pytiff | 99f8a7eb6e41e974fab1d49b2979670c8346d0ae | [
"BSD-3-Clause"
] | 19 | 2017-02-21T12:49:39.000Z | 2022-03-21T11:39:21.000Z |
# scanline integer tests
# tile integer tests
| 40.860215 | 120 | 0.67 | from hypothesis import HealthCheck
from hypothesis import given, settings
from hypothesis.extra import numpy as hnp
from pytiff import *
import hypothesis.strategies as st
import numpy as np
import pytest
import subprocess
import tifffile
from skimage.data import coffee
def test_write_rgb(tmpdir_factory):
img = co... | 0 | 4,287 | 0 | 0 | 0 | 2,763 | 0 | 51 | 450 |
852607e278475163f99ced2f37995abec5023153 | 16,330 | py | Python | src/grafimo/motif.py | pinellolab/GRAFIMO | 4fe13421ab4200e624276ea39fb37e307c311cbf | [
"MIT"
] | 21 | 2019-11-19T12:49:12.000Z | 2022-01-28T09:25:05.000Z | src/grafimo/motif.py | pinellolab/GRAFIMO | 4fe13421ab4200e624276ea39fb37e307c311cbf | [
"MIT"
] | 2 | 2021-09-21T10:24:15.000Z | 2022-02-07T15:58:15.000Z | src/grafimo/motif.py | InfOmics/GRAFIMO | 5f7684ef0b5c804cffbb7335e74f319230d7b3c1 | [
"MIT"
] | 3 | 2020-01-30T15:47:20.000Z | 2021-01-07T17:04:07.000Z | """Motif object definition.
A single Motif object stores important values, used during the following steps of
GRAFIMO's analysis, such as motif PSSM, p-value matrix, scaling factor, offset,
motif information, etc.
"""
# end of Motif
| 32.145669 | 83 | 0.607532 | """Motif object definition.
A single Motif object stores important values, used during the following steps of
GRAFIMO's analysis, such as motif PSSM, p-value matrix, scaling factor, offset,
motif information, etc.
"""
from grafimo.GRAFIMOException import NotValidMotifMatrixException, \
NoDataFrameException, Wro... | 0 | 657 | 0 | 15,051 | 0 | 0 | 0 | 238 | 141 |
53735060a44421f6599286e1ee690d79eff0b6dd | 1,544 | py | Python | 0_python/06_while.py | ProGabe/teals | 7ebf0b6e6f81d8a4c44baa7b5d3a9d95267ec1e3 | [
"MIT"
] | null | null | null | 0_python/06_while.py | ProGabe/teals | 7ebf0b6e6f81d8a4c44baa7b5d3a9d95267ec1e3 | [
"MIT"
] | 9 | 2019-11-21T13:12:47.000Z | 2021-02-02T14:52:52.000Z | 0_python/06_while.py | ProGabe/teals | 7ebf0b6e6f81d8a4c44baa7b5d3a9d95267ec1e3 | [
"MIT"
] | 2 | 2021-01-25T03:38:30.000Z | 2021-03-07T23:54:53.000Z | '''
Comparisons and boolean are important, and they will continue to be throughout all your
programming tasks.
The while loop allows you to continue to execute statements 'while' some condition is true.
while <expr> :
<statements>
<expr> here is just like in the if statement. It needs ... | 31.510204 | 100 | 0.693653 | '''
Comparisons and boolean are important, and they will continue to be throughout all your
programming tasks.
The while loop allows you to continue to execute statements 'while' some condition is true.
while <expr> :
<statements>
<expr> here is just like in the if statement. It needs ... | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
2ef7830e6a0ad2802cf80b19922ebd149f65ef83 | 8,443 | py | Python | practical_exam/exam_scheduling/migrations/0001_initial.py | SanchithHegde/university-practical-exam | 3633a92ea7fd9d74c84d3ff9603aca22e351df56 | [
"Apache-2.0",
"MIT"
] | null | null | null | practical_exam/exam_scheduling/migrations/0001_initial.py | SanchithHegde/university-practical-exam | 3633a92ea7fd9d74c84d3ff9603aca22e351df56 | [
"Apache-2.0",
"MIT"
] | 7 | 2020-12-28T08:42:33.000Z | 2022-03-28T07:57:29.000Z | practical_exam/exam_scheduling/migrations/0001_initial.py | SanchithHegde/university-practical-exam | 3633a92ea7fd9d74c84d3ff9603aca22e351df56 | [
"Apache-2.0",
"MIT"
] | 1 | 2020-12-29T13:34:29.000Z | 2020-12-29T13:34:29.000Z | # Generated by Django 3.1.3 on 2020-11-28 17:56
| 54.121795 | 202 | 0.618145 | # Generated by Django 3.1.3 on 2020-11-28 17:56
from django.db import migrations, models
import django.db.models.deletion
class Migration(migrations.Migration):
initial = True
dependencies = [
]
operations = [
migrations.CreateModel(
name='College',
fields=[
... | 0 | 0 | 0 | 8,296 | 0 | 0 | 0 | 30 | 68 |
4f24df8bfd2d16486964c8f19407870f55b665c5 | 282 | py | Python | examples/basics/ex_color_image.py | indigits/indigits-vision | 317fbf70c558e8f9563c3d0ba3bebbc5f84af622 | [
"Apache-2.0"
] | 2 | 2021-11-02T10:09:47.000Z | 2021-12-10T04:23:14.000Z | examples/basics/ex_color_image.py | indigits/indigits-vision | 317fbf70c558e8f9563c3d0ba3bebbc5f84af622 | [
"Apache-2.0"
] | null | null | null | examples/basics/ex_color_image.py | indigits/indigits-vision | 317fbf70c558e8f9563c3d0ba3bebbc5f84af622 | [
"Apache-2.0"
] | null | null | null | '''
Shows how to create single color images
'''
import cv2
from cr import vision as vision
image = vision.single_color_image(500, 500, vision.GOLD)
cv2.imshow('image', image)
cv2.waitKey()
image = vision.single_color_image(500, 500, 128)
cv2.imshow('image', image)
cv2.waitKey()
| 18.8 | 56 | 0.741135 | '''
Shows how to create single color images
'''
import cv2
from cr import vision as vision
image = vision.single_color_image(500, 500, vision.GOLD)
cv2.imshow('image', image)
cv2.waitKey()
image = vision.single_color_image(500, 500, 128)
cv2.imshow('image', image)
cv2.waitKey()
| 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
d41d9957cc7391d82ab7d8df423136d9fff41011 | 187 | py | Python | check_fib.py | chidanandpujar/python_pyez_scripts | 55beba4528c41b747508a0187c0438081ebde5b0 | [
"Unlicense"
] | null | null | null | check_fib.py | chidanandpujar/python_pyez_scripts | 55beba4528c41b747508a0187c0438081ebde5b0 | [
"Unlicense"
] | null | null | null | check_fib.py | chidanandpujar/python_pyez_scripts | 55beba4528c41b747508a0187c0438081ebde5b0 | [
"Unlicense"
] | null | null | null |
if __name__ == "__main__":
n = int(input("Entert the Fibonacci range:"))
check_fib(n) | 18.7 | 50 | 0.508021 | def check_fib(n):
a,b=0,1
while(b<=n):
print(b);
a,b=b,a+b
if __name__ == "__main__":
n = int(input("Entert the Fibonacci range:"))
check_fib(n) | 0 | 0 | 0 | 0 | 0 | 65 | 0 | 0 | 23 |
ec22886012b390072d7ced81894b2097f0da2eb0 | 8,813 | py | Python | src/evensampling/sampler.py | theosanderson/evensampling | baf0722093f44b5b8fbca7a27cec27c01fb9fb28 | [
"MIT"
] | null | null | null | src/evensampling/sampler.py | theosanderson/evensampling | baf0722093f44b5b8fbca7a27cec27c01fb9fb28 | [
"MIT"
] | null | null | null | src/evensampling/sampler.py | theosanderson/evensampling | baf0722093f44b5b8fbca7a27cec27c01fb9fb28 | [
"MIT"
] | null | null | null |
log = ""
| 47.38172 | 155 | 0.702598 | from ortools.sat.python import cp_model
import pandas as pd
from collections import defaultdict
import sys
log = ""
def eprint(*args, **kwargs):
print(*args, file=sys.stderr, **kwargs)
global log
log = log +"\n" + " ".join(args)
class Variables(object):
pass
class Input(object):
pass
class Opt... | 0 | 0 | 0 | 8,477 | 0 | 103 | 0 | 19 | 202 |
44e017fef8f4110d495a6279d3eb601c90e7185e | 1,332 | py | Python | tests/hypotests/test_parameters.py | scikit-hep/statutils | 636d305c1e9d76dea2613ac0ce085789821ee9ad | [
"BSD-3-Clause"
] | 36 | 2019-11-28T10:28:17.000Z | 2022-03-12T02:12:26.000Z | tests/hypotests/test_parameters.py | scikit-hep/hepstats | 76361cabbf3810ea9a951bb90dc45e17ff464406 | [
"BSD-2-Clause",
"BSD-3-Clause"
] | 31 | 2019-11-21T13:35:10.000Z | 2022-01-05T16:17:33.000Z | tests/hypotests/test_parameters.py | scikit-hep/hepstats | 76361cabbf3810ea9a951bb90dc45e17ff464406 | [
"BSD-2-Clause",
"BSD-3-Clause"
] | 3 | 2020-03-22T13:28:01.000Z | 2021-08-29T05:13:28.000Z | #!/usr/bin/python
# -*- coding: utf-8 -*-
| 21.142857 | 55 | 0.566817 | #!/usr/bin/python
# -*- coding: utf-8 -*-
import pytest
import numpy as np
import zfit
from hepstats.hypotests.parameters import POI, POIarray
def test_pois():
mean = zfit.Parameter("mu", 1.2, 0.1, 2)
p0 = POI(mean, 0)
p1 = POI(mean, 1.0)
values = np.linspace(0.0, 1.0, 10)
pn = POIarray(mean, v... | 0 | 0 | 0 | 0 | 0 | 1,164 | 0 | 13 | 112 |
f626b1e2c602b892540f6932da70649ff2dad5bd | 176 | py | Python | transformer_2/layers/__init__.py | mingruimingrui/Transformer2 | 2b44289ee7c7312d699f2261c1e4ebccce0f21e2 | [
"MIT"
] | null | null | null | transformer_2/layers/__init__.py | mingruimingrui/Transformer2 | 2b44289ee7c7312d699f2261c1e4ebccce0f21e2 | [
"MIT"
] | 1 | 2020-06-01T02:13:10.000Z | 2020-06-01T02:13:10.000Z | transformer_2/layers/__init__.py | mingruimingrui/Transformer2 | 2b44289ee7c7312d699f2261c1e4ebccce0f21e2 | [
"MIT"
] | null | null | null | from transformer_2.layers.multihead_attention import MultiheadAttention
from transformer_2.layers.transistor import Transistor
__all__ = ['MultiheadAttention', 'Transistor']
| 29.333333 | 71 | 0.852273 | from transformer_2.layers.multihead_attention import MultiheadAttention
from transformer_2.layers.transistor import Transistor
__all__ = ['MultiheadAttention', 'Transistor']
| 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
af6c70822c84b21709be983f75787f7f4d18d3e6 | 650 | py | Python | solutions/python/2017/compareIntegers.py | lucifer1198/Codesignal | 07d6d6457b8b3a9f1c51118b0e8e44cce66ee039 | [
"MIT"
] | 2 | 2020-12-21T22:09:26.000Z | 2021-01-01T15:40:01.000Z | solutions/python/2017/compareIntegers.py | nsu1210/Codesignal | 07d6d6457b8b3a9f1c51118b0e8e44cce66ee039 | [
"MIT"
] | null | null | null | solutions/python/2017/compareIntegers.py | nsu1210/Codesignal | 07d6d6457b8b3a9f1c51118b0e8e44cce66ee039 | [
"MIT"
] | 1 | 2021-01-28T18:15:02.000Z | 2021-01-28T18:15:02.000Z | """
Compare two integers given as strings.
Example
For a = "12" and b = "13", the output should be
compareIntegers(a, b) = "less";
For a = "875" and b = "799", the output should be
compareIntegers(a, b) = "greater";
For a = "1000" and b = "1000", the output should be
compareIntegers(a, b) = "equal".
"""
| 20.3125 | 64 | 0.572308 | """
Compare two integers given as strings.
Example
For a = "12" and b = "13", the output should be
compareIntegers(a, b) = "less";
For a = "875" and b = "799", the output should be
compareIntegers(a, b) = "greater";
For a = "1000" and b = "1000", the output should be
compareIntegers(a, b) = "equal".
"""
def compare... | 0 | 0 | 0 | 0 | 0 | 295 | 0 | 0 | 46 |
ab255686cadd6df0238a81a0ddc3afea306d18f0 | 6,927 | py | Python | back/flaskProject/src/nytimes_api.py | johnymarin/finance-news | 79aa805247196a37ad202465d212254c147d30f3 | [
"MIT"
] | null | null | null | back/flaskProject/src/nytimes_api.py | johnymarin/finance-news | 79aa805247196a37ad202465d212254c147d30f3 | [
"MIT"
] | null | null | null | back/flaskProject/src/nytimes_api.py | johnymarin/finance-news | 79aa805247196a37ad202465d212254c147d30f3 | [
"MIT"
] | null | null | null | # This code parses date/times, so please
#
# pip install python-dateutil
#
# To use this code, make sure you
#
# import json
#
# and then, to convert JSON from a string, do
#
# result = article_model_from_dict(json.loads(json_string))
from enum import Enum
from typing import TypeVar
T = TypeVar("T")
Enum... | 31.921659 | 228 | 0.654107 | # This code parses date/times, so please
#
# pip install python-dateutil
#
# To use this code, make sure you
#
# import json
#
# and then, to convert JSON from a string, do
#
# result = article_model_from_dict(json.loads(json_string))
from enum import Enum
from dataclasses import dataclass
from typing impo... | 0 | 5,289 | 0 | 242 | 0 | 563 | 0 | 54 | 411 |
d7c79e6dae51cb0161b8b1bc1e2b55fb03db60de | 21 | py | Python | src/geocurrency/core/settings.py | OpenPrunus/geocurrency | 23cc075377d47ac631634cd71fd0e7d6b0a57bad | [
"MIT"
] | 5 | 2021-01-28T16:45:49.000Z | 2021-08-15T06:47:17.000Z | src/geocurrency/core/settings.py | OpenPrunus/geocurrency | 23cc075377d47ac631634cd71fd0e7d6b0a57bad | [
"MIT"
] | 8 | 2020-10-01T15:12:45.000Z | 2021-10-05T14:45:33.000Z | src/geocurrency/core/settings.py | OpenPrunus/geocurrency | 23cc075377d47ac631634cd71fd0e7d6b0a57bad | [
"MIT"
] | 2 | 2021-01-28T16:43:16.000Z | 2021-10-05T14:25:25.000Z | MAX_PAGE_SIZE = 1000
| 10.5 | 20 | 0.809524 | MAX_PAGE_SIZE = 1000
| 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
f397c395f7d81787db1aff5190abe273b30f066d | 9,185 | py | Python | python/subactivity_lstm.py | atul107/grammar-activity-prediction | 983f973717884a60ef4b4ecb7bf56e671aefb332 | [
"MIT"
] | 20 | 2018-02-23T02:51:00.000Z | 2021-05-25T20:32:43.000Z | python/subactivity_lstm.py | atul107/grammar-activity-prediction | 983f973717884a60ef4b4ecb7bf56e671aefb332 | [
"MIT"
] | 3 | 2019-01-21T07:40:46.000Z | 2019-10-19T18:47:09.000Z | python/subactivity_lstm.py | RomeroBarata/grammar-activity-prediction | 983f973717884a60ef4b4ecb7bf56e671aefb332 | [
"MIT"
] | 7 | 2018-02-23T16:08:46.000Z | 2021-01-25T04:48:19.000Z | """
Created on Feb 27, 2017
@author: Siyuan Huang
Training and Testing Code for Subactivity LSTM
"""
from __future__ import print_function
if __name__ == '__main__':
main()
| 40.10917 | 125 | 0.67534 | """
Created on Feb 27, 2017
@author: Siyuan Huang
Training and Testing Code for Subactivity LSTM
"""
from __future__ import print_function
import numpy as np
import json
import h5py
import glob
import scipy.io
import os
from keras.preprocessing import sequence
from keras.preprocessing.image import ImageDataGenerato... | 0 | 0 | 0 | 0 | 0 | 8,332 | 0 | 169 | 492 |
ac9be42efa50a2b269ab3e80ffad7871b5abea1c | 2,936 | py | Python | sdk/python/pulumi_azure/apimanagement/api.py | Frassle/pulumi-azure | 593dd1020b09b83422928913d06bf91538926155 | [
"ECL-2.0",
"Apache-2.0"
] | null | null | null | sdk/python/pulumi_azure/apimanagement/api.py | Frassle/pulumi-azure | 593dd1020b09b83422928913d06bf91538926155 | [
"ECL-2.0",
"Apache-2.0"
] | null | null | null | sdk/python/pulumi_azure/apimanagement/api.py | Frassle/pulumi-azure | 593dd1020b09b83422928913d06bf91538926155 | [
"ECL-2.0",
"Apache-2.0"
] | null | null | null | # coding=utf-8
# *** WARNING: this file was generated by the Pulumi Terraform Bridge (tfgen) Tool. ***
# *** Do not edit by hand unless you're certain you know what you are doing! ***
import pulumi
from .. import utilities, tables
| 36.7 | 304 | 0.679496 | # coding=utf-8
# *** WARNING: this file was generated by the Pulumi Terraform Bridge (tfgen) Tool. ***
# *** Do not edit by hand unless you're certain you know what you are doing! ***
import pulumi
import pulumi.runtime
from .. import utilities, tables
class API(pulumi.CustomResource):
"""
Manages an API Mana... | 0 | 0 | 0 | 2,658 | 0 | 0 | 0 | 0 | 45 |
c5266d4250e9b5166a7a6adfe81befd18b722ba0 | 795 | py | Python | backend/migrations/versions/123ewrwerwe.py | Sean1572/audino | d234ba9027ce86d62156234aa925cc698e9f949a | [
"MIT"
] | null | null | null | backend/migrations/versions/123ewrwerwe.py | Sean1572/audino | d234ba9027ce86d62156234aa925cc698e9f949a | [
"MIT"
] | 35 | 2020-12-21T23:42:01.000Z | 2021-02-07T10:28:52.000Z | backend/migrations/versions/123ewrwerwe.py | Sean1572/audino | d234ba9027ce86d62156234aa925cc698e9f949a | [
"MIT"
] | null | null | null | """empty message
Revision ID: 611965970ba7
Revises: fbf389ef5017
Create Date: 2020-12-01 11:01:05.140699
"""
# revision identifiers, used by Alembic.
revision = '123ewrwerwe'
down_revision = '611965970ba7'
branch_labels = None
depends_on = None
| 24.84375 | 83 | 0.695597 | """empty message
Revision ID: 611965970ba7
Revises: fbf389ef5017
Create Date: 2020-12-01 11:01:05.140699
"""
from alembic import op
import sqlalchemy as sa
# revision identifiers, used by Alembic.
revision = '123ewrwerwe'
down_revision = '611965970ba7'
branch_labels = None
depends_on = None
def upgrade():
# #... | 0 | 0 | 0 | 0 | 0 | 451 | 0 | 3 | 90 |
d64458a23d19d3bc1590b839d00d22a2602f40d0 | 929 | py | Python | pycaret/tests/test_nlp.py | fanugroho/pycaret | ea79606035488aa9b4f3978b9446630094be52f1 | [
"MIT"
] | null | null | null | pycaret/tests/test_nlp.py | fanugroho/pycaret | ea79606035488aa9b4f3978b9446630094be52f1 | [
"MIT"
] | null | null | null | pycaret/tests/test_nlp.py | fanugroho/pycaret | ea79606035488aa9b4f3978b9446630094be52f1 | [
"MIT"
] | null | null | null | import os, sys
sys.path.insert(0, os.path.abspath(".."))
import pycaret.nlp
if __name__ == "__main__":
test()
| 21.113636 | 74 | 0.638321 | import os, sys
sys.path.insert(0, os.path.abspath(".."))
import pytest
import pycaret.nlp
import pycaret.datasets
def test():
# loading dataset
data = pycaret.datasets.get_data('kiva')
data = data.head(1000)
# init setup
nlp1 = pycaret.nlp.setup(data = data, target = 'en', session_id = 123)
... | 0 | 0 | 0 | 0 | 0 | 748 | 0 | -6 | 68 |
907c52573da4b45cb640fcfb3ddb635f7c4c26cd | 46,031 | py | Python | tests/integration/roster/test_mlb_roster.py | atklaus/sportsreference | 22a45ea83ce1608c3176f00d4f414d5b9463605c | [
"MIT"
] | null | null | null | tests/integration/roster/test_mlb_roster.py | atklaus/sportsreference | 22a45ea83ce1608c3176f00d4f414d5b9463605c | [
"MIT"
] | null | null | null | tests/integration/roster/test_mlb_roster.py | atklaus/sportsreference | 22a45ea83ce1608c3176f00d4f414d5b9463605c | [
"MIT"
] | null | null | null | # coding=utf-8
YEAR = 2017
| 36.61973 | 78 | 0.509027 | # coding=utf-8
import mock
import os
import pandas as pd
import pytest
from flexmock import flexmock
from sportsreference import utils
from sportsreference.mlb.roster import Player, Roster
from sportsreference.mlb.teams import Team
YEAR = 2017
def read_file(filename):
filepath = os.path.join(os.path.dirname(__f... | 22 | 16,277 | 0 | 28,802 | 0 | 551 | 0 | 41 | 314 |
b2a326780aa13035ef8756c3c4f4672a9ff5edbb | 1,489 | py | Python | instruments/hp_4395A.py | Vrekrer/magdynlab | f5149d3213a37c7c18f39876c3e2367fc7deb9e8 | [
"MIT"
] | 6 | 2015-08-02T03:02:55.000Z | 2022-01-30T18:32:49.000Z | instruments/hp_4395A.py | Vrekrer/magdynlab | f5149d3213a37c7c18f39876c3e2367fc7deb9e8 | [
"MIT"
] | null | null | null | instruments/hp_4395A.py | Vrekrer/magdynlab | f5149d3213a37c7c18f39876c3e2367fc7deb9e8 | [
"MIT"
] | 4 | 2017-07-06T16:29:53.000Z | 2020-09-13T00:09:54.000Z | # coding=utf-8
# Author: Diego Gonzlez Chvez
# email : diegogch@cbpf.br / diego.gonzalez.chavez@gmail.com
#
# This class controls the:
# Network/Spectrum/Impedance Analyzer
# HP / Agilent : 4395A
#
# TODO:
# Clean code
# Make documentation
__all__ = ['HP_4395A']
| 28.634615 | 76 | 0.64137 | # coding=utf-8
# Author: Diego González Chávez
# email : diegogch@cbpf.br / diego.gonzalez.chavez@gmail.com
#
# This class controls the:
# Network/Spectrum/Impedance Analyzer
# HP / Agilent : 4395A
#
# TODO:
# Clean code
# Make documentation
import time as _time
import numpy as _np
from .instruments_base import Instr... | 4 | 0 | 0 | 1,025 | 0 | 0 | 0 | 83 | 112 |
881d4d17d563fd5580d8b1a2bfc7c58b30a69ea7 | 5,708 | py | Python | source/astroNS/nodes/core/network/processor.py | pyastroNS/astroNS | 35687267179467e4cb7ea59ac119c5f0f182107f | [
"MIT"
] | null | null | null | source/astroNS/nodes/core/network/processor.py | pyastroNS/astroNS | 35687267179467e4cb7ea59ac119c5f0f182107f | [
"MIT"
] | null | null | null | source/astroNS/nodes/core/network/processor.py | pyastroNS/astroNS | 35687267179467e4cb7ea59ac119c5f0f182107f | [
"MIT"
] | null | null | null | """
Processor is a node that calculates how long it takes to process a message.
"""
| 39.638889 | 137 | 0.557288 | """
Processor is a node that calculates how long it takes to process a message.
"""
import pandas as pd
import uuid
from heapq import heappush, heappop
from numpy import random
from simpy.core import Environment
from nodes.core.base import BaseNode
from typing import Dict, List, Tuple, Any, Callable, Optional, Union... | 0 | 112 | 0 | 5,238 | 0 | 0 | 0 | 93 | 180 |
e26133561a6a1fbea9a0c907133569d903786fa4 | 749 | py | Python | ex102.py | ezequielwish/Python3 | a4489d49e6919649437cb9e682614240701e2b68 | [
"MIT"
] | 1 | 2022-01-24T02:01:32.000Z | 2022-01-24T02:01:32.000Z | ex102.py | ezequielwish/Python3 | a4489d49e6919649437cb9e682614240701e2b68 | [
"MIT"
] | null | null | null | ex102.py | ezequielwish/Python3 | a4489d49e6919649437cb9e682614240701e2b68 | [
"MIT"
] | null | null | null | # Crie um programa que tenha uma funo fatorial() que receba dois parmetros: o primeiro que indique
# o nmero a calcular e outro chamado show, que ser um valor lgico (opcional) indicando se ser
# mostrado ou no na tela o processo de clculo do fatorial.
def factorial(number, show=False):
"""
Calcula o fatorial d... | 29.96 | 101 | 0.600801 | # Crie um programa que tenha uma função fatorial() que receba dois parâmetros: o primeiro que indique
# o número a calcular e outro chamado show, que será um valor lógico (opcional) indicando se será
# mostrado ou não na tela o processo de cálculo do fatorial.
def factorial(number, show=False):
"""
Calcula o f... | 24 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
19b856dca041dce8c861ac05d622a4a776ae4abb | 4,466 | py | Python | Python for kids a playfull introduction to programming.py | eldiego77cp/Proyectos-Python | 0c7458da77ad6ff4927b1a64af32a2b7579dab08 | [
"MIT"
] | null | null | null | Python for kids a playfull introduction to programming.py | eldiego77cp/Proyectos-Python | 0c7458da77ad6ff4927b1a64af32a2b7579dab08 | [
"MIT"
] | null | null | null | Python for kids a playfull introduction to programming.py | eldiego77cp/Proyectos-Python | 0c7458da77ad6ff4927b1a64af32a2b7579dab08 | [
"MIT"
] | null | null | null | '''
Programming Puzzles
The following are a few experiments you can try yourself. The
answers can be found at http://python-for-kids.com/.
#1: Favorites
Make a list of your favorite hobbies and give the list the variable
name games. Now make a list of your favorite foods and name the
variable foods. Join the two lists... | 23.260417 | 69 | 0.71451 | '''
Programming Puzzles
The following are a few experiments you can try yourself. The
answers can be found at http://python-for-kids.com/.
#1: Favorites
Make a list of your favorite hobbies and give the list the variable
name games. Now make a list of your favorite foods and name the
variable foods. Join the two lists... | 60 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
9474527efac6e81672b5752560074b095631b530 | 152 | py | Python | sdmxthon/__init__.py | Meaningful-Data/sdmxthon | d6c187bab1ddecf49a12bccb6bf737bc3f08ac72 | [
"Apache-2.0"
] | 1 | 2021-05-25T17:04:49.000Z | 2021-05-25T17:04:49.000Z | sdmxthon/__init__.py | Meaningful-Data/sdmxthon | d6c187bab1ddecf49a12bccb6bf737bc3f08ac72 | [
"Apache-2.0"
] | 2 | 2021-06-23T11:32:40.000Z | 2021-12-01T17:44:19.000Z | sdmxthon/__init__.py | Meaningful-Data/sdmxthon | d6c187bab1ddecf49a12bccb6bf737bc3f08ac72 | [
"Apache-2.0"
] | null | null | null | from sdmxthon.api.api import read_sdmx, get_datasets, get_pandas_df, xml_to_csv
__all__ = ['read_sdmx', 'get_datasets', 'get_pandas_df', 'xml_to_csv']
| 38 | 79 | 0.782895 | from sdmxthon.api.api import read_sdmx, get_datasets, get_pandas_df, xml_to_csv
__all__ = ['read_sdmx', 'get_datasets', 'get_pandas_df', 'xml_to_csv']
| 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
bb7e2900eb01ada6e415649fe237535fe71c3e2b | 1,287 | py | Python | backend/migrations/0001_initial.py | arunikayadav42/Backend | 5364884f178e2a338b321b4a63a19fbc55212fe2 | [
"MIT"
] | 2 | 2018-11-22T21:09:56.000Z | 2018-11-26T07:41:14.000Z | backend/migrations/0001_initial.py | arunikayadav42/Backend | 5364884f178e2a338b321b4a63a19fbc55212fe2 | [
"MIT"
] | 11 | 2018-10-21T03:18:55.000Z | 2022-02-10T09:34:44.000Z | backend/migrations/0001_initial.py | arunikayadav42/Backend | 5364884f178e2a338b321b4a63a19fbc55212fe2 | [
"MIT"
] | 4 | 2018-11-30T19:14:05.000Z | 2018-12-22T07:10:16.000Z | # -*- coding: utf-8 -*-
# Generated by Django 1.11 on 2018-10-19 20:33
from __future__ import unicode_literals
| 37.852941 | 137 | 0.618493 | # -*- coding: utf-8 -*-
# Generated by Django 1.11 on 2018-10-19 20:33
from __future__ import unicode_literals
from django.conf import settings
from django.db import migrations, models
import django.db.models.deletion
class Migration(migrations.Migration):
initial = True
dependencies = [
migrations... | 0 | 0 | 0 | 1,044 | 0 | 0 | 0 | 41 | 90 |
17e9da9e47849dae3b304051cc092e4923a5cc81 | 3,803 | py | Python | pypy/module/__builtin__/compiling.py | woodrow/pyoac | b5dc59e6a38e7912db47f26fb23ffa4764a3c0e7 | [
"MIT"
] | 1 | 2019-05-27T00:58:46.000Z | 2019-05-27T00:58:46.000Z | pypy/module/__builtin__/compiling.py | woodrow/pyoac | b5dc59e6a38e7912db47f26fb23ffa4764a3c0e7 | [
"MIT"
] | null | null | null | pypy/module/__builtin__/compiling.py | woodrow/pyoac | b5dc59e6a38e7912db47f26fb23ffa4764a3c0e7 | [
"MIT"
] | null | null | null | """
Implementation of the interpreter-level compile/eval builtins.
"""
from pypy.interpreter.pycode import PyCode
from pypy.interpreter.baseobjspace import W_Root, ObjSpace
from pypy.interpreter.error import OperationError
from pypy.interpreter.gateway import NoneNotWrapped
def compile(space, w_source, filename, mod... | 39.206186 | 77 | 0.666053 | """
Implementation of the interpreter-level compile/eval builtins.
"""
from pypy.interpreter.pycode import PyCode
from pypy.interpreter.baseobjspace import W_Root, ObjSpace
from pypy.interpreter.error import OperationError
from pypy.interpreter.gateway import NoneNotWrapped
def compile(space, w_source, filename, mod... | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
05588e659c3bf8642adeb90c73dd6bf68ac4beaf | 772 | py | Python | mozdns/view/views.py | jlin/inventory | c098c98e570c3bf9fadfd811eb75e1213f6ea428 | [
"BSD-3-Clause"
] | 22 | 2015-01-16T01:36:32.000Z | 2020-06-08T00:46:18.000Z | mozdns/view/views.py | jlin/inventory | c098c98e570c3bf9fadfd811eb75e1213f6ea428 | [
"BSD-3-Clause"
] | 8 | 2015-12-28T18:56:19.000Z | 2019-04-01T17:33:48.000Z | mozdns/view/views.py | jlin/inventory | c098c98e570c3bf9fadfd811eb75e1213f6ea428 | [
"BSD-3-Clause"
] | 13 | 2015-01-13T20:56:22.000Z | 2022-02-23T06:01:17.000Z | # Create your views here.
| 21.444444 | 49 | 0.746114 | # Create your views here.
from mozdns.views import MozdnsDeleteView
from mozdns.views import MozdnsCreateView
from mozdns.views import MozdnsDetailView
from mozdns.views import MozdnsUpdateView
from mozdns.views import MozdnsListView
from mozdns.view.models import View
from mozdns.view.forms import ViewForm
class Vie... | 0 | 0 | 0 | 319 | 0 | 0 | 0 | 129 | 292 |
27572eaea555c50a9ce8333aca8a01965587bb7c | 295 | py | Python | dataTools/dataRedditRepo.py | maximkha/nlpStat | 6549dc118cbb77008769efcf6d4754a3f3cd0f60 | [
"MIT"
] | 1 | 2020-03-26T01:08:09.000Z | 2020-03-26T01:08:09.000Z | dataTools/dataRedditRepo.py | maximkha/nlpStat | 6549dc118cbb77008769efcf6d4754a3f3cd0f60 | [
"MIT"
] | null | null | null | dataTools/dataRedditRepo.py | maximkha/nlpStat | 6549dc118cbb77008769efcf6d4754a3f3cd0f60 | [
"MIT"
] | null | null | null |
#DEPRECATED
# data from: https://github.com/linanqiu/reddit-dataset | 24.583333 | 55 | 0.630508 | import csv
#DEPRECATED
# data from: https://github.com/linanqiu/reddit-dataset
def get(name):
print("Getting: " + name)
lines = [l.rstrip() for l in open(name)]
reader = csv.reader(lines, skipinitialspace=True)
text = ""
for r in reader:
text += r[1]
return text | 0 | 0 | 0 | 0 | 0 | 194 | 0 | -11 | 44 |
e354330042bb894f6a890e7031e0eb7ccc53d8d9 | 1,397 | py | Python | tests/make_test_stubs.py | yoelcortes/fluids | bf0400d00ab72da52d051335be2664db3771cb11 | [
"MIT"
] | 218 | 2016-01-04T07:44:46.000Z | 2022-03-30T08:06:36.000Z | tests/make_test_stubs.py | yoelcortes/fluids | bf0400d00ab72da52d051335be2664db3771cb11 | [
"MIT"
] | 47 | 2016-04-20T06:06:10.000Z | 2022-03-04T14:45:39.000Z | tests/make_test_stubs.py | yoelcortes/fluids | bf0400d00ab72da52d051335be2664db3771cb11 | [
"MIT"
] | 65 | 2016-01-29T03:28:01.000Z | 2022-01-26T16:17:05.000Z | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
import os
tests = ['test_drag', 'test_control_valve', 'test_two_phase', 'test_two_phase_voidage', 'test_separator', 'test_piping', 'test_packed_bed', 'test_compressible', 'test_core', 'test_safety_valve', 'test_open_flow', 'test_filters', 'test_flow_meter', 'test_atmosphe... | 39.914286 | 436 | 0.685039 | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
import os
import sys
tests = ['test_drag', 'test_control_valve', 'test_two_phase', 'test_two_phase_voidage', 'test_separator', 'test_piping', 'test_packed_bed', 'test_compressible', 'test_core', 'test_safety_valve', 'test_open_flow', 'test_filters', 'test_flow_meter', 'te... | 0 | 0 | 0 | 0 | 0 | 0 | 0 | -11 | 22 |
771af2fe0282930c4667fd9094eab037eaadcad4 | 3,221 | py | Python | admin/test_bioreflib.py | eli-cipriano/BioRefine | aeb427e8f42b74cd36a38937a8e1408ba1ae872c | [
"MIT"
] | null | null | null | admin/test_bioreflib.py | eli-cipriano/BioRefine | aeb427e8f42b74cd36a38937a8e1408ba1ae872c | [
"MIT"
] | 5 | 2020-11-13T01:14:49.000Z | 2020-11-30T22:10:05.000Z | admin/test_bioreflib.py | eli-cipriano/BioRefine | aeb427e8f42b74cd36a38937a8e1408ba1ae872c | [
"MIT"
] | null | null | null | import unittest
# os.system('clear')
if __name__ == '__main__':
unittest.main()
| 35.01087 | 72 | 0.573424 | import unittest
import bioreflib as brf
import os
# os.system('clear')
class TestBioRefine(unittest.TestCase):
def test_dicts(self):
brf.write_json() # sometimes germ comes out as a biogas side...
dicts = brf.call_json()
# print(dicts['MATERIALS']['biogas']['sides'])
# print(dic... | 0 | 0 | 0 | 3,076 | 0 | 0 | 0 | -10 | 67 |
3cfe8d7655d8d60887d4510515eb041c68435cf8 | 9,240 | py | Python | app/routes.py | joyliao07/stock_portfolio | 65a0a27e204340427e54ce5a88440bea28bede5d | [
"MIT"
] | 1 | 2019-02-27T01:51:35.000Z | 2019-02-27T01:51:35.000Z | app/routes.py | joyliao07/stock_portfolio | 65a0a27e204340427e54ce5a88440bea28bede5d | [
"MIT"
] | 10 | 2018-12-06T03:30:30.000Z | 2021-09-08T00:51:06.000Z | app/routes.py | joyliao07/stock_portfolio | 65a0a27e204340427e54ce5a88440bea28bede5d | [
"MIT"
] | null | null | null | """This module defines the routes of stocks app."""
# 3rd Party Requirements
# Models
# Forms
# API Requests & Other
import requests as req
# Numpy & Charts
# import matplotlib
# import matplotlib.pyplot as plt
# helpers
def fetch_stock_portfolio(company):
"""To fetch the return from IEX website."""
ret... | 30.394737 | 128 | 0.6171 | """This module defines the routes of stocks app."""
from . import app
from .auth import login_required
# 3rd Party Requirements
from flask import render_template, abort, redirect, url_for, session, g, request, flash
from sqlalchemy.exc import IntegrityError, DBAPIError
# Models
from .models import Company, db, Portfo... | 0 | 7,898 | 0 | 0 | 0 | 0 | 0 | 334 | 557 |
0c4961697df1d5ec49886b392ef9163275d6a931 | 449 | py | Python | old_code/plt_font.py | yuguiyang/python_demo | 1be2406bfc920e22a0f92bf10d9a3665984067ba | [
"Apache-2.0"
] | null | null | null | old_code/plt_font.py | yuguiyang/python_demo | 1be2406bfc920e22a0f92bf10d9a3665984067ba | [
"Apache-2.0"
] | null | null | null | old_code/plt_font.py | yuguiyang/python_demo | 1be2406bfc920e22a0f92bf10d9a3665984067ba | [
"Apache-2.0"
] | null | null | null | # -*- coding: utf-8 -*-
"""
Created on Thu Aug 10 16:24:02 2017
@author: hexo
"""
import matplotlib.pyplot as plt
from matplotlib.font_manager import FontProperties
#Windows
font_set = FontProperties(fname=r'C:\Windows\Fonts\simsun.ttc', size=15)
plt.figure(u'')
plt.plot([1,2,3,4],[-2,-1,0,1])
plt.title(u'',fon... | 18.708333 | 72 | 0.721604 | # -*- coding: utf-8 -*-
"""
Created on Thu Aug 10 16:24:02 2017
@author: hexo
"""
import matplotlib.pyplot as plt
from matplotlib.font_manager import FontProperties
#引用Windows中的字体
font_set = FontProperties(fname=r'C:\Windows\Fonts\simsun.ttc', size=15)
plt.figure(u'中文')
plt.plot([1,2,3,4],[-2,-1,0,1])
plt.title... | 42 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |