hexsha stringlengths 40 40 | size int64 7 1.04M | ext stringclasses 10
values | lang stringclasses 1
value | max_stars_repo_path stringlengths 4 247 | max_stars_repo_name stringlengths 4 125 | 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 125 | 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 125 | max_forks_repo_head_hexsha stringlengths 40 78 | max_forks_repo_licenses listlengths 1 10 | max_forks_count int64 1 105k ⌀ | max_forks_repo_forks_event_min_datetime stringlengths 24 24 ⌀ | max_forks_repo_forks_event_max_datetime stringlengths 24 24 ⌀ | content stringlengths 1 1.04M | avg_line_length float64 1.77 618k | max_line_length int64 1 1.02M | alphanum_fraction float64 0 1 | original_content stringlengths 7 1.04M | filtered:remove_function_no_docstring int64 -102 942k | filtered:remove_class_no_docstring int64 -354 977k | filtered:remove_delete_markers int64 0 60.1k |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
5998238c184af1feb9c75b285f1289f5b3c7cc33 | 3,421 | py | Python | problem/breadcrumb/explore.py | jhanley634/testing-tools | 3f3f8a34df53015347e1e1cc37d20c8d03652cad | [
"MIT"
] | null | null | null | problem/breadcrumb/explore.py | jhanley634/testing-tools | 3f3f8a34df53015347e1e1cc37d20c8d03652cad | [
"MIT"
] | 3 | 2020-09-07T17:24:36.000Z | 2020-09-08T17:37:33.000Z | problem/breadcrumb/explore.py | jhanley634/testing-tools | 3f3f8a34df53015347e1e1cc37d20c8d03652cad | [
"MIT"
] | null | null | null | #! /usr/bin/env python3
# Copyright 2017 John Hanley.
#
# Permission is hereby granted, free of charge, to any person obtaining a
# copy of this software and associated documentation files (the "Software"),
# to deal in the Software without restriction, including without limitation
# the rights to use, copy, modify, m... | 37.593407 | 79 | 0.657702 | #! /usr/bin/env python3
# Copyright 2017 John Hanley.
#
# Permission is hereby granted, free of charge, to any person obtaining a
# copy of this software and associated documentation files (the "Software"),
# to deal in the Software without restriction, including without limitation
# the rights to use, copy, modify, m... | 1,637 | 30 | 150 |
dcd5b25920453b5755e87df370f6ba5cff3e79df | 740 | py | Python | omniforms/migrations/0010_auto_20160614_1740.py | vixdigital/omni-forms | 1a21c4b7428e08ee148fc97662ed6b15c21cbe1c | [
"MIT"
] | 6 | 2016-09-02T22:07:32.000Z | 2019-12-16T08:52:37.000Z | omniforms/migrations/0010_auto_20160614_1740.py | vixdigital/omni-forms | 1a21c4b7428e08ee148fc97662ed6b15c21cbe1c | [
"MIT"
] | 32 | 2016-06-09T14:06:13.000Z | 2018-04-24T11:45:44.000Z | omniforms/migrations/0010_auto_20160614_1740.py | vixdigital/omni-forms | 1a21c4b7428e08ee148fc97662ed6b15c21cbe1c | [
"MIT"
] | 4 | 2016-08-08T17:49:38.000Z | 2019-11-19T15:32:03.000Z | # -*- coding: utf-8 -*-
# Generated by Django 1.9.7 on 2016-06-14 17:40
from __future__ import unicode_literals
from django.db import migrations, models
| 28.461538 | 141 | 0.609459 | # -*- coding: utf-8 -*-
# Generated by Django 1.9.7 on 2016-06-14 17:40
from __future__ import unicode_literals
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('omniforms', '0009_auto_20160614_1723'),
]
operations = [
migrations.AddField... | 0 | 562 | 23 |
c8ff067ce3db7d18af3284b32db0970a4b8cf0ef | 2,968 | py | Python | account/views.py | joshuariveramnltech/projectIE | 9f707f6f1a30ca728580ba738877c77785155ae5 | [
"MIT"
] | null | null | null | account/views.py | joshuariveramnltech/projectIE | 9f707f6f1a30ca728580ba738877c77785155ae5 | [
"MIT"
] | 5 | 2021-02-08T20:32:43.000Z | 2021-09-08T01:13:03.000Z | account/views.py | joshuariveramnltech/projectIE | 9f707f6f1a30ca728580ba738877c77785155ae5 | [
"MIT"
] | null | null | null | from django.shortcuts import render, reverse
from django.contrib.auth.decorators import login_required
from django.contrib.auth.views import PasswordChangeForm
from django.contrib import messages
from django.http import HttpResponseRedirect
from django.contrib.auth import update_session_auth_hash
from .forms import Per... | 43.647059 | 96 | 0.709906 | from django.shortcuts import render, reverse
from django.contrib.auth.decorators import login_required
from django.contrib.auth.views import PasswordChangeForm
from django.contrib import messages
from django.http import HttpResponseRedirect
from django.contrib.auth import update_session_auth_hash
from .forms import Per... | 2,426 | 0 | 66 |
0a65d09a0e5e971bd56113cdb87b92c737c49c7a | 699 | py | Python | checkers/constants.py | Kuu44/Checkers-AI | 279479e43df58bc5bca6a24503f05c6cde87b482 | [
"MIT"
] | null | null | null | checkers/constants.py | Kuu44/Checkers-AI | 279479e43df58bc5bca6a24503f05c6cde87b482 | [
"MIT"
] | null | null | null | checkers/constants.py | Kuu44/Checkers-AI | 279479e43df58bc5bca6a24503f05c6cde87b482 | [
"MIT"
] | null | null | null | import pygame
OFFSET = 80
WIDTH, HEIGHT = 640, 640
ROWS, COLS = 8, 8
#size of each square on the board
SQUARE_SIZE = WIDTH//COLS
# rgb
RED = (255, 0, 0)
WHITE = (255, 255, 255)
BLACK = (0, 0, 0)
BLUE = (0, 0, 255)
GREY = (128, 128, 128)
BROWN = (139, 69, 19)
PIECE_SIZE = 60
WHITE_PIECE = pygame.transform.scale(
... | 25.888889 | 73 | 0.686695 | import pygame
OFFSET = 80
WIDTH, HEIGHT = 640, 640
ROWS, COLS = 8, 8
#size of each square on the board
SQUARE_SIZE = WIDTH//COLS
# rgb
RED = (255, 0, 0)
WHITE = (255, 255, 255)
BLACK = (0, 0, 0)
BLUE = (0, 0, 255)
GREY = (128, 128, 128)
BROWN = (139, 69, 19)
PIECE_SIZE = 60
WHITE_PIECE = pygame.transform.scale(
... | 0 | 0 | 0 |
38cb69d65c4cafc55740bb822e1a8f003e3dc197 | 109 | py | Python | vmaig_blog/uwsgi-2.0.14/tests/werkzeug.py | StanYaha/Blog | 3cb38918e14ebe6ce2e2952ef272de116849910d | [
"BSD-3-Clause"
] | 1 | 2019-01-14T10:58:43.000Z | 2019-01-14T10:58:43.000Z | vmaig_blog/uwsgi-2.0.14/tests/werkzeug.py | StanYaha/Blog | 3cb38918e14ebe6ce2e2952ef272de116849910d | [
"BSD-3-Clause"
] | null | null | null | vmaig_blog/uwsgi-2.0.14/tests/werkzeug.py | StanYaha/Blog | 3cb38918e14ebe6ce2e2952ef272de116849910d | [
"BSD-3-Clause"
] | null | null | null | import uwsgi
print(uwsgi.opt)
print(uwsgi.magic_table)
from werkzeug.testapp import test_app as application
| 18.166667 | 52 | 0.834862 | import uwsgi
print(uwsgi.opt)
print(uwsgi.magic_table)
from werkzeug.testapp import test_app as application
| 0 | 0 | 0 |
439a3ecfe6918af29888899b777dcdee5ad3ed9f | 114 | py | Python | back/bookclub/db/queries/genres.py | wonesy/bookclub | 0b0368974ca5c9f25666efd556e5b514db44180f | [
"MIT"
] | null | null | null | back/bookclub/db/queries/genres.py | wonesy/bookclub | 0b0368974ca5c9f25666efd556e5b514db44180f | [
"MIT"
] | null | null | null | back/bookclub/db/queries/genres.py | wonesy/bookclub | 0b0368974ca5c9f25666efd556e5b514db44180f | [
"MIT"
] | null | null | null | GET_ALL_GENRES = """
SELECT name
FROM genres
"""
INSERT_GENRE = """
INSERT INTO genres (name) VALUES (:name)
"""
| 12.666667 | 40 | 0.666667 | GET_ALL_GENRES = """
SELECT name
FROM genres
"""
INSERT_GENRE = """
INSERT INTO genres (name) VALUES (:name)
"""
| 0 | 0 | 0 |
67d4b634f864f103a38fe9e4c50c37671ec9aac5 | 4,224 | py | Python | image_face_trimming/image_face_trim.py | scpepper69/ml-tools | 807d396c057be7c5038968226d82454888da2f11 | [
"MIT"
] | 2 | 2020-08-24T01:15:13.000Z | 2020-09-10T11:50:53.000Z | image_face_trimming/image_face_trim.py | scpepper69/ml-tools | 807d396c057be7c5038968226d82454888da2f11 | [
"MIT"
] | null | null | null | image_face_trimming/image_face_trim.py | scpepper69/ml-tools | 807d396c057be7c5038968226d82454888da2f11 | [
"MIT"
] | 1 | 2021-03-09T13:15:39.000Z | 2021-03-09T13:15:39.000Z | #------------------------------------------------------------------------------
# Image Face Triming Tool
# Copyright (c) 2019, scpepper All rights reserved.
#------------------------------------------------------------------------------
import numpy as np
import os
import sys
import cv2
import tensorflow as tf
import... | 36.413793 | 151 | 0.541903 | #------------------------------------------------------------------------------
# Image Face Triming Tool
# Copyright (c) 2019, scpepper All rights reserved.
#------------------------------------------------------------------------------
import numpy as np
import os
import sys
import cv2
import tensorflow as tf
import... | 3,339 | 0 | 46 |
6dff00eda6e7e13b33088c5ae46ed97a3a4cc3ce | 1,464 | py | Python | setup.py | hiradyazdan/nginx-amplify-agent-health-check | 7aa0fa2aba082491b1b47c2b6189a9266245f647 | [
"MIT"
] | 2 | 2018-05-23T17:34:28.000Z | 2018-07-09T21:55:53.000Z | setup.py | hiradyazdan/nginx-amplify-agent-health-check | 7aa0fa2aba082491b1b47c2b6189a9266245f647 | [
"MIT"
] | null | null | null | setup.py | hiradyazdan/nginx-amplify-agent-health-check | 7aa0fa2aba082491b1b47c2b6189a9266245f647 | [
"MIT"
] | null | null | null | from setuptools import setup
classifiers = [
'Intended Audience :: Developers',
'License :: OSI Approved :: MIT License',
'Operating System :: POSIX'
] + [
('Programming Language :: Python :: %s' % x)
for x in '2.7'.split()
]
test_requirements = [
'pytest',
'pytest-cov',
'coveralls',
... | 24 | 84 | 0.623634 | from setuptools import setup
classifiers = [
'Intended Audience :: Developers',
'License :: OSI Approved :: MIT License',
'Operating System :: POSIX'
] + [
('Programming Language :: Python :: %s' % x)
for x in '2.7'.split()
]
test_requirements = [
'pytest',
'pytest-cov',
'coveralls',
... | 0 | 0 | 0 |
06f8e0e30d4b9d99479c64991f6a1e545a136c87 | 1,744 | py | Python | GeneratorInterface/GenFilters/python/ModelpMSSMFilter_cfi.py | ckamtsikis/cmssw | ea19fe642bb7537cbf58451dcf73aa5fd1b66250 | [
"Apache-2.0"
] | 852 | 2015-01-11T21:03:51.000Z | 2022-03-25T21:14:00.000Z | GeneratorInterface/GenFilters/python/ModelpMSSMFilter_cfi.py | ckamtsikis/cmssw | ea19fe642bb7537cbf58451dcf73aa5fd1b66250 | [
"Apache-2.0"
] | 30,371 | 2015-01-02T00:14:40.000Z | 2022-03-31T23:26:05.000Z | GeneratorInterface/GenFilters/python/ModelpMSSMFilter_cfi.py | ckamtsikis/cmssw | ea19fe642bb7537cbf58451dcf73aa5fd1b66250 | [
"Apache-2.0"
] | 3,240 | 2015-01-02T05:53:18.000Z | 2022-03-31T17:24:21.000Z | #Configuration file fragment used for ModelpMSSMFilter module (GeneratorInterface/GenFilters/plugins/ModelpMSSMFilter.cc) initalisation
#ModelpMSSMFilter_cfi GeneratorInterface/GenFilters/python/ModelpMSSMFilter_cfi.py
import FWCore.ParameterSet.Config as cms
ModelpMSSMFilter = cms.EDFilter("ModelpMSSMFilter",
gpss... | 67.076923 | 135 | 0.659404 | #Configuration file fragment used for ModelpMSSMFilter module (GeneratorInterface/GenFilters/plugins/ModelpMSSMFilter.cc) initalisation
#ModelpMSSMFilter_cfi GeneratorInterface/GenFilters/python/ModelpMSSMFilter_cfi.py
import FWCore.ParameterSet.Config as cms
ModelpMSSMFilter = cms.EDFilter("ModelpMSSMFilter",
gpss... | 0 | 0 | 0 |
988e12b122ee5149b2c649d40b2f82e674b1cf8f | 158 | py | Python | tomako/tests/util.py | rcmachado/tomako | 1288e84d81e5bff7ce8040363b2a6891afd0c955 | [
"MIT"
] | 4 | 2015-04-19T15:14:44.000Z | 2018-11-26T13:07:12.000Z | tomako/tests/util.py | rcmachado/tomako | 1288e84d81e5bff7ce8040363b2a6891afd0c955 | [
"MIT"
] | 1 | 2016-06-30T07:38:51.000Z | 2016-06-30T17:24:52.000Z | tomako/tests/util.py | rcmachado/tomako | 1288e84d81e5bff7ce8040363b2a6891afd0c955 | [
"MIT"
] | 3 | 2016-02-01T03:49:21.000Z | 2018-11-26T13:07:14.000Z | # coding: utf-8
from tornado.web import UIModule
| 19.75 | 47 | 0.651899 | # coding: utf-8
from tornado.web import UIModule
class DummyUI(UIModule):
def render(self, arg1, arg2):
return 'arg1=%s|arg2=%s' % (arg1, arg2)
| 56 | 3 | 49 |
dc8461d642c05d4fcb8b721fc9917328c6136203 | 1,281 | py | Python | src/python/pants/backend/native/targets/native_artifact.py | StephanErb/pants | a368267b6b4cf50138ba567f582409ed31bf5db9 | [
"Apache-2.0"
] | null | null | null | src/python/pants/backend/native/targets/native_artifact.py | StephanErb/pants | a368267b6b4cf50138ba567f582409ed31bf5db9 | [
"Apache-2.0"
] | null | null | null | src/python/pants/backend/native/targets/native_artifact.py | StephanErb/pants | a368267b6b4cf50138ba567f582409ed31bf5db9 | [
"Apache-2.0"
] | null | null | null | # coding=utf-8
# Copyright 2018 Pants project contributors (see CONTRIBUTORS.md).
# Licensed under the Apache License, Version 2.0 (see LICENSE).
from __future__ import absolute_import, division, print_function, unicode_literals
from hashlib import sha1
from future.utils import PY3
from pants.base.payload_field imp... | 36.6 | 100 | 0.741608 | # coding=utf-8
# Copyright 2018 Pants project contributors (see CONTRIBUTORS.md).
# Licensed under the Apache License, Version 2.0 (see LICENSE).
from __future__ import absolute_import, division, print_function, unicode_literals
from hashlib import sha1
from future.utils import PY3
from pants.base.payload_field imp... | 573 | 0 | 74 |
aab41a86cb0a188fec109339b0748b74d28640ff | 6,662 | py | Python | trackstats/trackers.py | keranno/django-trackstats | b8c8f83c044c918378c1fd16d83d98cf534d112c | [
"MIT"
] | 369 | 2016-02-01T21:29:00.000Z | 2022-03-19T12:41:16.000Z | trackstats/trackers.py | kyl3mcw/django-trackstats | 4c36e769cb02017675a86de405afcd4e10ed3356 | [
"MIT"
] | 16 | 2016-08-15T09:26:47.000Z | 2021-07-22T23:26:30.000Z | trackstats/trackers.py | kyl3mcw/django-trackstats | 4c36e769cb02017675a86de405afcd4e10ed3356 | [
"MIT"
] | 39 | 2016-03-02T22:32:37.000Z | 2022-03-19T12:41:17.000Z | from datetime import date, timedelta, datetime, time
from django.contrib.contenttypes.models import ContentType
from django.conf import settings
from django.db import models
from django.db import connections
from django.utils import timezone
from .models import Period, StatisticByDate, StatisticByDateAndObject
| 35.43617 | 75 | 0.577004 | from datetime import date, timedelta, datetime, time
from django.contrib.contenttypes.models import ContentType
from django.conf import settings
from django.db import models
from django.db import connections
from django.utils import timezone
from .models import Period, StatisticByDate, StatisticByDateAndObject
clas... | 5,467 | 785 | 92 |
33f65d7c6ad32c8c9a596a0e59b774467c7e5294 | 2,625 | py | Python | backend/data/jimm/models/layers/mixed_conv2d.py | MikeOwino/JittorVis | d9568b72d684d167045121ea8ed22d694b2f9192 | [
"Apache-2.0"
] | 139 | 2021-06-24T10:32:02.000Z | 2021-06-26T10:22:07.000Z | backend/data/jimm/models/layers/mixed_conv2d.py | MikeOwino/JittorVis | d9568b72d684d167045121ea8ed22d694b2f9192 | [
"Apache-2.0"
] | 8 | 2021-06-29T07:29:06.000Z | 2022-02-28T02:16:48.000Z | backend/data/jimm/models/layers/mixed_conv2d.py | MikeOwino/JittorVis | d9568b72d684d167045121ea8ed22d694b2f9192 | [
"Apache-2.0"
] | 5 | 2021-06-27T21:04:03.000Z | 2021-08-14T03:26:17.000Z | """
Copyright VIP Group
Licensed under the Apache License, Version 2.0.
Modify from https://github.com/rwightman/pytorch-image-models
Original copyright of Ross Wightman below, modifications by VIP Group
Hacked together by / copyright Ross Wightman
"""
from typing import Optional
from collections import Order... | 32.8125 | 100 | 0.63581 | """
Copyright VIP Group
Licensed under the Apache License, Version 2.0.
Modify from https://github.com/rwightman/pytorch-image-models
Original copyright of Ross Wightman below, modifications by VIP Group
Hacked together by / copyright Ross Wightman
"""
from typing import Optional
from collections import Order... | 1,680 | 7 | 280 |
e6ae9fba447c7fc3341acd19538d1a66ef6a315a | 6,653 | py | Python | heat/engine/stack_lock.py | noironetworks/heat | 7cdadf1155f4d94cf8f967635b98e4012a7acfb7 | [
"Apache-2.0"
] | 265 | 2015-01-02T09:33:22.000Z | 2022-03-26T23:19:54.000Z | heat/engine/stack_lock.py | noironetworks/heat | 7cdadf1155f4d94cf8f967635b98e4012a7acfb7 | [
"Apache-2.0"
] | 8 | 2015-09-01T15:43:19.000Z | 2021-12-14T05:18:23.000Z | heat/engine/stack_lock.py | noironetworks/heat | 7cdadf1155f4d94cf8f967635b98e4012a7acfb7 | [
"Apache-2.0"
] | 295 | 2015-01-06T07:00:40.000Z | 2021-09-06T08:05:06.000Z | #
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# ... | 39.838323 | 78 | 0.530588 | #
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# ... | 267 | 5,487 | 23 |
cbdf95a510ad7cce8864a5194f86cb987307080a | 3,543 | py | Python | cosmo_tester/test_suites/snapshots/inplace_restore_test.py | Ilanad/cloudify-system-tests | acb31f28fade27f118c6a6c528a080376f24ca46 | [
"Apache-2.0"
] | null | null | null | cosmo_tester/test_suites/snapshots/inplace_restore_test.py | Ilanad/cloudify-system-tests | acb31f28fade27f118c6a6c528a080376f24ca46 | [
"Apache-2.0"
] | null | null | null | cosmo_tester/test_suites/snapshots/inplace_restore_test.py | Ilanad/cloudify-system-tests | acb31f28fade27f118c6a6c528a080376f24ca46 | [
"Apache-2.0"
] | null | null | null | from time import sleep
from os.path import join
import pytest
from cosmo_tester.framework.examples import get_example_deployment
from cosmo_tester.framework.test_hosts import Hosts, VM
from cosmo_tester.test_suites.snapshots import (
create_snapshot,
download_snapshot,
restore_snapshot,
upload_snapsho... | 34.398058 | 77 | 0.681908 | from time import sleep
from os.path import join
import pytest
from cosmo_tester.framework.examples import get_example_deployment
from cosmo_tester.framework.test_hosts import Hosts, VM
from cosmo_tester.test_suites.snapshots import (
create_snapshot,
download_snapshot,
restore_snapshot,
upload_snapsho... | 3,078 | 0 | 67 |
4a74ca0034e4212a3b0464c80ee0c203d48b99cc | 11,540 | py | Python | assistive_gym/learn.py | chstetco/assistive-gym | cc797c86051ed4d09688d60ce9f378b884547264 | [
"MIT"
] | 216 | 2019-10-11T01:33:50.000Z | 2022-03-28T23:24:58.000Z | assistive_gym/learn.py | chstetco/assistive-gym | cc797c86051ed4d09688d60ce9f378b884547264 | [
"MIT"
] | 19 | 2019-12-18T03:28:56.000Z | 2021-11-10T22:02:01.000Z | assistive_gym/learn.py | chstetco/assistive-gym | cc797c86051ed4d09688d60ce9f378b884547264 | [
"MIT"
] | 62 | 2019-10-12T00:42:43.000Z | 2022-03-28T01:26:05.000Z | import os, sys, multiprocessing, gym, ray, shutil, argparse, importlib, glob
import numpy as np
# from ray.rllib.agents.ppo import PPOTrainer, DEFAULT_CONFIG
from ray.rllib.agents import ppo, sac
from ray.tune.logger import pretty_print
from numpngw import write_apng
if __name__ == '__main__':
parser = argparse.... | 50.837004 | 345 | 0.640901 | import os, sys, multiprocessing, gym, ray, shutil, argparse, importlib, glob
import numpy as np
# from ray.rllib.agents.ppo import PPOTrainer, DEFAULT_CONFIG
from ray.rllib.agents import ppo, sac
from ray.tune.logger import pretty_print
from numpngw import write_apng
def setup_config(env, algo, coop=False, seed=0, ex... | 8,261 | 0 | 138 |
08d19efa2b2ad9268ec60a966f96b4b19dad289d | 1,554 | py | Python | src/inference/dnam.py | AaronBlare/dnam | 4d97c879cb24447eee0852eaf48fc5b3ef8e159b | [
"MIT"
] | null | null | null | src/inference/dnam.py | AaronBlare/dnam | 4d97c879cb24447eee0852eaf48fc5b3ef8e159b | [
"MIT"
] | null | null | null | src/inference/dnam.py | AaronBlare/dnam | 4d97c879cb24447eee0852eaf48fc5b3ef8e159b | [
"MIT"
] | null | null | null | from src.models.fcmlp_model import FCMLPModel
import pickle
from src.datamodules.to_delete.datasets.dnam_dataset import DNAmDataset
from torch.utils.data import DataLoader
from tqdm import tqdm
import pandas as pd
if __name__ == "__main__":
inference()
| 24.666667 | 133 | 0.66538 | from src.models.fcmlp_model import FCMLPModel
import pickle
from src.datamodules.to_delete.datasets.dnam_dataset import DNAmDataset
from torch.utils.data import DataLoader
from tqdm import tqdm
import pandas as pd
def inference():
model_type = "FCMLPModel"
model_path = "E:/YandexDisk/Work/dnamvae/models/fcm... | 1,271 | 0 | 23 |
59ece2a31140b7933f756ccfc395dff570d80296 | 4,346 | py | Python | Collection/data2spreadsheet.py | Big-Data-Analytics-Lab-USF/test | 8dbcc1bdf326ff0dc042fee54bc6f7975127cbd2 | [
"MIT"
] | null | null | null | Collection/data2spreadsheet.py | Big-Data-Analytics-Lab-USF/test | 8dbcc1bdf326ff0dc042fee54bc6f7975127cbd2 | [
"MIT"
] | null | null | null | Collection/data2spreadsheet.py | Big-Data-Analytics-Lab-USF/test | 8dbcc1bdf326ff0dc042fee54bc6f7975127cbd2 | [
"MIT"
] | null | null | null | try:
import json
except ImportError:
import simplejson as json
import codecs
import time
import datetime
import os
import random
import time
import sys
# Just used to highlight matches in tweets. This file does not query anything from Twitter!
queries = ["term1", "term2"]
outputDir = "output/" # Output direc... | 27.333333 | 113 | 0.553843 | try:
import json
except ImportError:
import simplejson as json
import codecs
import time
import datetime
import os
import random
import time
import sys
# Just used to highlight matches in tweets. This file does not query anything from Twitter!
queries = ["term1", "term2"]
outputDir = "output/" # Output direc... | 2,846 | 197 | 69 |
d9af9935e3199666e5da11fc7dc05184147b03cf | 10,359 | py | Python | iscc_bench/algos/cdc_fast_text.py | coblo/isccbench | daf22cdd740fa99c62c4a56233593159e398596b | [
"BSD-2-Clause"
] | 3 | 2019-07-07T19:30:26.000Z | 2020-09-17T10:17:36.000Z | iscc_bench/algos/cdc_fast_text.py | coblo/isccbench | daf22cdd740fa99c62c4a56233593159e398596b | [
"BSD-2-Clause"
] | 3 | 2019-04-15T13:00:48.000Z | 2021-12-13T19:44:12.000Z | iscc_bench/algos/cdc_fast_text.py | coblo/isccbench | daf22cdd740fa99c62c4a56233593159e398596b | [
"BSD-2-Clause"
] | 1 | 2021-02-25T16:13:14.000Z | 2021-02-25T16:13:14.000Z | # -*- coding: utf-8 -*-
"""Fast-CDC on Unicode Code Points"""
import logging
from io import StringIO
from os.path import basename
from statistics import mean
from typing import TextIO
from iscc_bench.algos.metrics import jaccard
from iscc_bench.algos.slide import sliding_window
from iscc_bench.readers.mltext import mlt... | 26.093199 | 88 | 0.713775 | # -*- coding: utf-8 -*-
"""Fast-CDC on Unicode Code Points"""
import logging
from io import StringIO
from os.path import basename
from statistics import mean
from typing import TextIO
from iscc_bench.algos.metrics import jaccard
from iscc_bench.algos.slide import sliding_window
from iscc_bench.readers.mltext import mlt... | 2,883 | 0 | 69 |
810a30af53923464d3f05031b3d9a710c2d1b016 | 25,303 | py | Python | src/external/coremltools_wrap/coremltools/coremltools/test/pipeline/test_model_updatable.py | cookingcodewithme/turicreate | a89e203d60529d2d72547c03ec9753ea979ee342 | [
"BSD-3-Clause"
] | 11,356 | 2017-12-08T19:42:32.000Z | 2022-03-31T16:55:25.000Z | src/external/coremltools_wrap/coremltools/coremltools/test/pipeline/test_model_updatable.py | cookingcodewithme/turicreate | a89e203d60529d2d72547c03ec9753ea979ee342 | [
"BSD-3-Clause"
] | 2,402 | 2017-12-08T22:31:01.000Z | 2022-03-28T19:25:52.000Z | src/external/coremltools_wrap/coremltools/coremltools/test/pipeline/test_model_updatable.py | cookingcodewithme/turicreate | a89e203d60529d2d72547c03ec9753ea979ee342 | [
"BSD-3-Clause"
] | 1,343 | 2017-12-08T19:47:19.000Z | 2022-03-26T11:31:36.000Z | # Copyright (c) 2017, Apple Inc. All rights reserved.
#
# Use of this source code is governed by a BSD-3-clause license that can be
# found in the LICENSE.txt file or at https://opensource.org/licenses/BSD-3-Clause
import os, shutil
import numpy as _np
import coremltools.models.datatypes as datatypes
import unittest
im... | 34.804677 | 99 | 0.616844 | # Copyright (c) 2017, Apple Inc. All rights reserved.
#
# Use of this source code is governed by a BSD-3-clause license that can be
# found in the LICENSE.txt file or at https://opensource.org/licenses/BSD-3-Clause
import os, shutil
import numpy as _np
import coremltools.models.datatypes as datatypes
import unittest
im... | 24,170 | 490 | 23 |
129ea823e2f3de932651c0d6d38d4b285ac49b1d | 443 | py | Python | django_geosource/migrations/0006_auto_20190612_1020.py | Terralego/django-geosource | 013afde33cfeb8a3f91b809a8f6df3ab3e4089bd | [
"MIT"
] | 3 | 2019-08-08T15:19:19.000Z | 2022-03-04T14:37:00.000Z | django_geosource/migrations/0006_auto_20190612_1020.py | Terralego/django-geosource | 013afde33cfeb8a3f91b809a8f6df3ab3e4089bd | [
"MIT"
] | 39 | 2019-05-22T12:03:06.000Z | 2022-03-04T15:09:56.000Z | django_geosource/migrations/0006_auto_20190612_1020.py | Terralego/django-geosource | 013afde33cfeb8a3f91b809a8f6df3ab3e4089bd | [
"MIT"
] | null | null | null | # Generated by Django 2.1.9 on 2019-06-12 08:20
import django.contrib.postgres.fields.jsonb
from django.db import migrations
| 24.611111 | 79 | 0.668172 | # Generated by Django 2.1.9 on 2019-06-12 08:20
import django.contrib.postgres.fields.jsonb
from django.db import migrations
class Migration(migrations.Migration):
dependencies = [("django_geosource", "0005_auto_20190603_1506")]
operations = [
migrations.AlterField(
model_name="field",
... | 0 | 293 | 23 |
236dd6f1c285719c335790c7a9a93fb33ba46dc4 | 27,792 | py | Python | metrics.py | kotikkonstantin/convasr | 3d4d7f3627269372ae1eb7ff7423b29838f47ac0 | [
"MIT"
] | 17 | 2019-08-01T07:45:46.000Z | 2022-03-25T05:15:13.000Z | metrics.py | kotikkonstantin/convasr | 3d4d7f3627269372ae1eb7ff7423b29838f47ac0 | [
"MIT"
] | 14 | 2020-05-30T16:18:28.000Z | 2021-06-24T08:08:19.000Z | metrics.py | kotikkonstantin/convasr | 3d4d7f3627269372ae1eb7ff7423b29838f47ac0 | [
"MIT"
] | 6 | 2020-07-10T14:43:02.000Z | 2021-04-08T19:28:53.000Z | import os
import math
import collections
import json
import functools
import typing
import text_processing
import Levenshtein
placeholder = '|'
space = ' '
silence = placeholder + space
replace_placeholder = lambda s, rep = '': s.replace(placeholder, rep)
def levenshtein(a, b):
"""Calculates the Levenshtei... | 36.713342 | 247 | 0.684478 | import os
import math
import collections
import json
import functools
import typing
import text_processing
import Levenshtein
placeholder = '|'
space = ' '
silence = placeholder + space
replace_placeholder = lambda s, rep = '': s.replace(placeholder, rep)
class ErrorTagger:
typo_easy = 'typo_easy'
typo_hard = 'ty... | 22,257 | 2,674 | 322 |
2ed0a7c54dbb318029e1a6cba75e30cf6af85207 | 895 | py | Python | field_calculator/string_defs.py | Dan-Patterson/Tools_for_ArcGIS_Pro | b5c253d59d57bd1abe7e2433a77aed7d3ea22567 | [
"Info-ZIP"
] | 23 | 2020-05-15T18:40:25.000Z | 2022-03-31T08:44:39.000Z | field_calculator/string_defs.py | Dan-Patterson/Tools_for_ArcGIS_Pro | b5c253d59d57bd1abe7e2433a77aed7d3ea22567 | [
"Info-ZIP"
] | 1 | 2021-12-14T16:47:00.000Z | 2021-12-15T03:06:26.000Z | field_calculator/string_defs.py | Dan-Patterson/Tools_for_ArcGIS_Pro | b5c253d59d57bd1abe7e2433a77aed7d3ea22567 | [
"Info-ZIP"
] | 3 | 2021-08-09T05:42:19.000Z | 2022-03-31T08:44:59.000Z | # -*- coding: UTF-8 -*-
"""
:Script: string_defs.py
:Author: Dan.Patterson@carleton.ca
:Modified: 2017-06-17
:Purpose: tools for working strings
:Useage:
: These are mini-onliners or so
:---------------------------------------------------------------------:
"""
# ---- imports, formats, constants ----
... | 25.571429 | 72 | 0.512849 | # -*- coding: UTF-8 -*-
"""
:Script: string_defs.py
:Author: Dan.Patterson@carleton.ca
:Modified: 2017-06-17
:Purpose: tools for working strings
:Useage:
: These are mini-onliners or so
:---------------------------------------------------------------------:
"""
# ---- imports, formats, constants ----
... | 0 | 0 | 0 |
057b7c55ac3f9c847ff7a8cdf2dff1038ce4617d | 4,092 | py | Python | volatility/volatility/plugins/linux/route_cache.py | williamclot/MemoryVisualizer | 2ff9f30f07519d6578bc36c12f8d08acc9cb4383 | [
"MIT"
] | 2 | 2018-07-16T13:30:40.000Z | 2018-07-17T12:02:05.000Z | volatility/volatility/plugins/linux/route_cache.py | williamclot/MemoryVisualizer | 2ff9f30f07519d6578bc36c12f8d08acc9cb4383 | [
"MIT"
] | null | null | null | volatility/volatility/plugins/linux/route_cache.py | williamclot/MemoryVisualizer | 2ff9f30f07519d6578bc36c12f8d08acc9cb4383 | [
"MIT"
] | null | null | null | # Volatility
# Copyright (C) 2007-2013 Volatility Foundation
#
# This file is part of Volatility.
#
# Volatility is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License Version 2 as
# published by the Free Software Foundation. You may not use, modify or
# distribu... | 37.2 | 236 | 0.572092 | # Volatility
# Copyright (C) 2007-2013 Volatility Foundation
#
# This file is part of Volatility.
#
# Volatility is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License Version 2 as
# published by the Free Software Foundation. You may not use, modify or
# distribu... | 2,855 | 0 | 81 |
2b701af730bb7ec94f2c298d7273b66b96b86b0a | 9,401 | py | Python | Fast_RCNN/fast_rcnn/utils.py | sumedhasingla/ExplainingBBSmoothly | 0873d7a3b1fa0e9d967d01647e0fa5fe136a7604 | [
"MIT"
] | null | null | null | Fast_RCNN/fast_rcnn/utils.py | sumedhasingla/ExplainingBBSmoothly | 0873d7a3b1fa0e9d967d01647e0fa5fe136a7604 | [
"MIT"
] | null | null | null | Fast_RCNN/fast_rcnn/utils.py | sumedhasingla/ExplainingBBSmoothly | 0873d7a3b1fa0e9d967d01647e0fa5fe136a7604 | [
"MIT"
] | null | null | null | import numpy as np
from PIL import Image
import xml.etree.ElementTree as ET
import scipy.misc as scm
| 45.858537 | 140 | 0.635145 | import numpy as np
from PIL import Image
import xml.etree.ElementTree as ET
import scipy.misc as scm
def crop_center(img, bboxes, cropx,cropy):
y,x = img.shape
startx = x//2-(cropx//2)
starty = y//2-(cropy//2)
new_img = img[starty:starty+cropy,startx:startx+cropx]
bboxes[:, 0]-=starty
bboxe... | 9,071 | 0 | 229 |
d45e6ec7c9526c6baab4ebeb0694999f61392a2e | 1,632 | py | Python | tests/test_cli.py | Vauxoo/cookiecutter | 422f7d75da11bcaa7f933959b62d0cda2de09545 | [
"BSD-3-Clause"
] | null | null | null | tests/test_cli.py | Vauxoo/cookiecutter | 422f7d75da11bcaa7f933959b62d0cda2de09545 | [
"BSD-3-Clause"
] | 1 | 2021-02-24T05:31:46.000Z | 2021-02-24T05:31:46.000Z | tests/test_cli.py | Vauxoo/cookiecutter | 422f7d75da11bcaa7f933959b62d0cda2de09545 | [
"BSD-3-Clause"
] | 1 | 2021-01-29T10:04:27.000Z | 2021-01-29T10:04:27.000Z | import os
import pytest
from click.testing import CliRunner
from cookiecutter.cli import main
from cookiecutter import utils
runner = CliRunner()
@pytest.fixture
def remove_fake_project_dir(request):
"""
Remove the fake project directory created during the tests.
"""
request.addfinalizer(fin_remove... | 28.137931 | 78 | 0.714461 | import os
import pytest
from click.testing import CliRunner
from cookiecutter.cli import main
from cookiecutter import utils
runner = CliRunner()
@pytest.fixture
def remove_fake_project_dir(request):
"""
Remove the fake project directory created during the tests.
"""
def fin_remove_fake_project_dir... | 778 | 0 | 115 |
252d36ca311bb1dc4d719065663f4df283089676 | 54,079 | py | Python | py3/utils/mbatch_generation.py | gulamungon/SEQUENS | 48321f437f637d6d31c0beb70e03477952ad7340 | [
"Apache-1.1"
] | 4 | 2019-07-26T09:11:28.000Z | 2020-09-27T13:31:40.000Z | py3/utils/mbatch_generation.py | gulamungon/SEQUENS | 48321f437f637d6d31c0beb70e03477952ad7340 | [
"Apache-1.1"
] | null | null | null | py3/utils/mbatch_generation.py | gulamungon/SEQUENS | 48321f437f637d6d31c0beb70e03477952ad7340 | [
"Apache-1.1"
] | 2 | 2019-07-27T06:34:37.000Z | 2019-07-29T09:21:52.000Z |
# Code for generating mini-batches. The outout can be any
# combination of:
# features/0-stats/1-stats/i-vectors/labels/scp-indices
#
# scp-indices means which position in the data had. This
# can for example be used for looking up a trial weight
# from a list or for accessing data that is already
# loaded to the... | 44.436319 | 232 | 0.534292 |
# Code for generating mini-batches. The outout can be any
# combination of:
# features/0-stats/1-stats/i-vectors/labels/scp-indices
#
# scp-indices means which position in the data had. This
# can for example be used for looking up a trial weight
# from a list or for accessing data that is already
# loaded to the... | 46,219 | 0 | 411 |
16c88947474dea348ddab218c67f9264f81814c7 | 5,661 | py | Python | gridpath/auxiliary/auxiliary.py | souissim/gridpath | 4eeca2be24b485edc56026e38cfda83f4a6b27ea | [
"Apache-2.0"
] | null | null | null | gridpath/auxiliary/auxiliary.py | souissim/gridpath | 4eeca2be24b485edc56026e38cfda83f4a6b27ea | [
"Apache-2.0"
] | null | null | null | gridpath/auxiliary/auxiliary.py | souissim/gridpath | 4eeca2be24b485edc56026e38cfda83f4a6b27ea | [
"Apache-2.0"
] | 1 | 2021-12-21T20:44:21.000Z | 2021-12-21T20:44:21.000Z | # Copyright 2016-2020 Blue Marble Analytics LLC.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or ag... | 27.75 | 87 | 0.63222 | # Copyright 2016-2020 Blue Marble Analytics LLC.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or ag... | 188 | 0 | 46 |
45d85f89246414723d2c62817da4e63306d9f59c | 9,067 | py | Python | idem_azurerm/exec/azurerm/web/app_service_plan.py | eitrtechnologies/idem_provider_azurerm | 7922ea1dbe3ca411754cdbf12cd9fda397be6681 | [
"Apache-2.0"
] | 6 | 2019-10-31T16:01:39.000Z | 2020-01-30T01:13:45.000Z | idem_azurerm/exec/azurerm/web/app_service_plan.py | tompscanlan/idem-azurerm | 7922ea1dbe3ca411754cdbf12cd9fda397be6681 | [
"Apache-2.0"
] | 69 | 2020-05-05T02:49:25.000Z | 2021-09-20T01:21:34.000Z | idem_azurerm/exec/azurerm/web/app_service_plan.py | tompscanlan/idem-azurerm | 7922ea1dbe3ca411754cdbf12cd9fda397be6681 | [
"Apache-2.0"
] | 3 | 2020-06-01T19:35:15.000Z | 2021-04-21T19:37:57.000Z | # -*- coding: utf-8 -*-
"""
Azure Resource Manager (ARM) Web App Service Plan Operations Execution Module
.. versionadded:: 3.0.0
:maintainer: <devops@eitr.tech>
:configuration: This module requires Azure Resource Manager credentials to be passed as keyword arguments
to every function or via acct in order to work... | 28.071207 | 115 | 0.644094 | # -*- coding: utf-8 -*-
"""
Azure Resource Manager (ARM) Web App Service Plan Operations Execution Module
.. versionadded:: 3.0.0
:maintainer: <devops@eitr.tech>
:configuration: This module requires Azure Resource Manager credentials to be passed as keyword arguments
to every function or via acct in order to work... | 0 | 0 | 0 |
9ef0754ae8a218f693c013d4ea0e1da0690436c9 | 645 | py | Python | documentation_multiprocessing/08_reference/02_pipes_and_queues/pipe_01.py | software-foundations/learning-distributed-systems | b09f60742a88acf466fcf724e1368b95363682fa | [
"MIT"
] | null | null | null | documentation_multiprocessing/08_reference/02_pipes_and_queues/pipe_01.py | software-foundations/learning-distributed-systems | b09f60742a88acf466fcf724e1368b95363682fa | [
"MIT"
] | null | null | null | documentation_multiprocessing/08_reference/02_pipes_and_queues/pipe_01.py | software-foundations/learning-distributed-systems | b09f60742a88acf466fcf724e1368b95363682fa | [
"MIT"
] | null | null | null | """
For passing messages one can use Pipe() (for a connection between two processes)
or a queue (which allows multiple producers and consumers).
Returns a pair (conn1, conn2) of Connection objects representing the ends of a
pipe.
If duplex is True (the default) then the pipe is bidirectional. If duplex is
False th... | 26.875 | 81 | 0.775194 | """
For passing messages one can use Pipe() (for a connection between two processes)
or a queue (which allows multiple producers and consumers).
Returns a pair (conn1, conn2) of Connection objects representing the ends of a
pipe.
If duplex is True (the default) then the pipe is bidirectional. If duplex is
False th... | 0 | 0 | 0 |
3db78c4dc327334895df0bdb9f6c1cb9faf77998 | 15,016 | py | Python | webinars/covid/scripts/text_encoder.py | jacobtomlinson/Welcome_to_BlazingSQL_Notebooks | 3f9eebff8a2d8edbc64b0da020340d287623a2c3 | [
"Apache-2.0"
] | 18 | 2020-03-17T21:15:35.000Z | 2021-09-27T11:15:17.000Z | webinars/covid/scripts/text_encoder.py | jacobtomlinson/Welcome_to_BlazingSQL_Notebooks | 3f9eebff8a2d8edbc64b0da020340d287623a2c3 | [
"Apache-2.0"
] | 9 | 2020-05-21T19:26:22.000Z | 2021-08-29T19:23:06.000Z | webinars/covid/scripts/text_encoder.py | jacobtomlinson/Welcome_to_BlazingSQL_Notebooks | 3f9eebff8a2d8edbc64b0da020340d287623a2c3 | [
"Apache-2.0"
] | 10 | 2020-04-21T10:01:24.000Z | 2021-12-04T09:00:09.000Z | # coding=utf-8
# Copyright 2018 The Tensor2Tensor 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... | 37.353234 | 105 | 0.687467 | # coding=utf-8
# Copyright 2018 The Tensor2Tensor 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... | 971 | 0 | 187 |
e21b70d5b678b3d6506f2dce9b08435278c76eb9 | 7,636 | py | Python | app/pru.py | HudsonWerks/visualpru | 5bbb44ebb0798a493ad33f4881fa7845e8aeff74 | [
"MIT"
] | 1 | 2020-07-15T18:55:07.000Z | 2020-07-15T18:55:07.000Z | app/pru.py | HudsonWerks/visualpru | 5bbb44ebb0798a493ad33f4881fa7845e8aeff74 | [
"MIT"
] | null | null | null | app/pru.py | HudsonWerks/visualpru | 5bbb44ebb0798a493ad33f4881fa7845e8aeff74 | [
"MIT"
] | null | null | null | from __future__ import print_function
from __future__ import division
import os
import mmap
import struct
import re
import pasm
#Pass in the range of addresses we want to cover, and size the mmap accordingly
#TODO: Also check to see if the PRU is asleep
#NOTE: This function returns a dictionary oject w... | 43.634286 | 144 | 0.675223 | from __future__ import print_function
from __future__ import division
import os
import mmap
import struct
import re
import pasm
class PRU:
def __init__(self, id, constants, shared_constants):
self.id = id
self.constants = constants
self.shared_constants = shared_constants
self.f ... | 6,722 | -11 | 533 |
90630a605b94b7b536cbc862348704d41df4cd63 | 23,438 | py | Python | Kanalhaltungen-anpassen.py | loudar/SubVision-py | 22c94076289adf519b73f1f691901f865637f913 | [
"MIT"
] | null | null | null | Kanalhaltungen-anpassen.py | loudar/SubVision-py | 22c94076289adf519b73f1f691901f865637f913 | [
"MIT"
] | null | null | null | Kanalhaltungen-anpassen.py | loudar/SubVision-py | 22c94076289adf519b73f1f691901f865637f913 | [
"MIT"
] | null | null | null | # ArcGIS Skript
#
# Zweck:
# Anpassen von Haltungs- und Hausanschlussdaten mithilfe von Schachtsohlen
#
# Anmerkungen:
# Kommentare sind in Englisch verfasst, nur die ausgegebenen Nachrichten sind auf Deutsch.
# Damit wird möglichst viel Arbeit vermieden, falls das Skript mal bei Bedarf auf Englisch ausgeführt werden s... | 43.646182 | 155 | 0.620403 | # ArcGIS Skript
#
# Zweck:
# Anpassen von Haltungs- und Hausanschlussdaten mithilfe von Schachtsohlen
#
# Anmerkungen:
# Kommentare sind in Englisch verfasst, nur die ausgegebenen Nachrichten sind auf Deutsch.
# Damit wird möglichst viel Arbeit vermieden, falls das Skript mal bei Bedarf auf Englisch ausgeführt werden s... | 240 | -9 | 103 |
a15f76e95072bfff13e9078ec5ba1f1292741480 | 707 | py | Python | task_08.py | aSkryabina/selenium-training | bdb95d840108b4c10b598ad7e9fc8e8478c7834d | [
"Apache-2.0"
] | null | null | null | task_08.py | aSkryabina/selenium-training | bdb95d840108b4c10b598ad7e9fc8e8478c7834d | [
"Apache-2.0"
] | null | null | null | task_08.py | aSkryabina/selenium-training | bdb95d840108b4c10b598ad7e9fc8e8478c7834d | [
"Apache-2.0"
] | null | null | null | import pytest
from selenium import webdriver
from selenium.webdriver.support.wait import WebDriverWait
@pytest.fixture
| 24.37931 | 84 | 0.653465 | import pytest
from selenium import webdriver
from selenium.webdriver.support.wait import WebDriverWait
@pytest.fixture
def driver(request):
wd = webdriver.Chrome()
wd.implicitly_wait(5)
request.addfinalizer(wd.quit)
return wd
def test_stickers(driver):
driver.get("http://localhost/litecart/")
... | 537 | 0 | 45 |
fabbcb3b32aaa9da3e428a4db06e84d39be17638 | 372 | py | Python | chatbots_training_eval/generative/evaluation/finetuned_empathy_cc.py | shashankvmaiya/Task-Oriented-Chatbot-With-Empathy | 7306349ade3c9a0b9e04f870178c3949ff1f1aa7 | [
"MIT"
] | 1 | 2021-01-18T05:19:07.000Z | 2021-01-18T05:19:07.000Z | chatbots_training_eval/generative/evaluation/finetuned_empathy_cc.py | shashankvmaiya/Task-Oriented-Chatbot-With-Empathy | 7306349ade3c9a0b9e04f870178c3949ff1f1aa7 | [
"MIT"
] | null | null | null | chatbots_training_eval/generative/evaluation/finetuned_empathy_cc.py | shashankvmaiya/Task-Oriented-Chatbot-With-Empathy | 7306349ade3c9a0b9e04f870178c3949ff1f1aa7 | [
"MIT"
] | 1 | 2021-02-02T12:57:14.000Z | 2021-02-02T12:57:14.000Z | from parlai.scripts.eval_model import EvalModel
EvalModel.main(
task='customer_Care',
model_file='/home/xcs224u/project/Task-Oriented-Chatbot-With-Empathy/data/test_models/pretrained_transformer__ed_cc/model',
metrics = ['ppl','f1','accuracy','hits@1'],
# model_file='zoo:bert/model',
# fp16 = False,... | 33.818182 | 127 | 0.706989 | from parlai.scripts.eval_model import EvalModel
EvalModel.main(
task='customer_Care',
model_file='/home/xcs224u/project/Task-Oriented-Chatbot-With-Empathy/data/test_models/pretrained_transformer__ed_cc/model',
metrics = ['ppl','f1','accuracy','hits@1'],
# model_file='zoo:bert/model',
# fp16 = False,... | 0 | 0 | 0 |
520ce8b18d66cbd77fd15c412a98f5ceeca74557 | 2,444 | py | Python | toneAnalyzer.py | czyoung/Emotion-Sentiment-Analysis | d39452f418efd30ce0ca20253aa7d64cbdfae73d | [
"MIT"
] | null | null | null | toneAnalyzer.py | czyoung/Emotion-Sentiment-Analysis | d39452f418efd30ce0ca20253aa7d64cbdfae73d | [
"MIT"
] | null | null | null | toneAnalyzer.py | czyoung/Emotion-Sentiment-Analysis | d39452f418efd30ce0ca20253aa7d64cbdfae73d | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
Created on Tue Jul 17 13:34:41 2018
"""
import requests
import json
| 31.74026 | 252 | 0.592062 | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
Created on Tue Jul 17 13:34:41 2018
"""
import requests
import json
def analyze_tone(text):
username = 'ENTER USERNAME HERE'
password = 'ENTER PASSWORD HERE'
watsonUrl = 'https://gateway.watsonplatform.net/tone-analyzer/api/v3/tone?version=2016-05-19'
... | 2,195 | 0 | 127 |
04e925dca9b16182561bb1f9663e551ae587cbb6 | 1,092 | py | Python | count_calls/count_calls_extension.py | chimicus/addons | 0fa1110df999fc9a8622a12e00453fc67b62fce1 | [
"BSD-3-Clause"
] | null | null | null | count_calls/count_calls_extension.py | chimicus/addons | 0fa1110df999fc9a8622a12e00453fc67b62fce1 | [
"BSD-3-Clause"
] | 6 | 2019-08-23T15:53:05.000Z | 2021-07-14T08:24:06.000Z | count_calls/count_calls_extension.py | chimicus/addons | 0fa1110df999fc9a8622a12e00453fc67b62fce1 | [
"BSD-3-Clause"
] | 3 | 2019-11-04T12:02:11.000Z | 2020-03-05T13:57:11.000Z | import gdb
from undodb.debugger_extensions import udb
def count_calls(func_name):
"""
Counts how many times func_name is hit during the replay of the currently
loaded recording and returns the hit count.
"""
# Set a breakpoint for the specified function.
bp = gdb.Breakpoint(func_name)
# ... | 31.2 | 80 | 0.72619 | import gdb
from undodb.debugger_extensions import udb
def count_calls(func_name):
"""
Counts how many times func_name is hit during the replay of the currently
loaded recording and returns the hit count.
"""
# Set a breakpoint for the specified function.
bp = gdb.Breakpoint(func_name)
# ... | 300 | 0 | 22 |
df311f41c9d37eb013e3bb4b9f029f1b1de96c37 | 509 | py | Python | nicos_mlz/pgaa/testscripts/scan.py | jkrueger1/nicos | 5f4ce66c312dedd78995f9d91e8a6e3c891b262b | [
"CC-BY-3.0",
"Apache-2.0",
"CC-BY-4.0"
] | 12 | 2019-11-06T15:40:36.000Z | 2022-01-01T16:23:00.000Z | nicos_mlz/pgaa/testscripts/scan.py | jkrueger1/nicos | 5f4ce66c312dedd78995f9d91e8a6e3c891b262b | [
"CC-BY-3.0",
"Apache-2.0",
"CC-BY-4.0"
] | 91 | 2020-08-18T09:20:26.000Z | 2022-02-01T11:07:14.000Z | nicos_mlz/pgaa/testscripts/scan.py | jkrueger1/nicos | 5f4ce66c312dedd78995f9d91e8a6e3c891b262b | [
"CC-BY-3.0",
"Apache-2.0",
"CC-BY-4.0"
] | 6 | 2020-01-11T10:52:30.000Z | 2022-02-25T12:35:23.000Z | # pylint: skip-file
# test: subdirs = frm2
# test: setups = pgaa
# test: setupcode = SetDetectors(det)
# typical PGAA application
from nicos import session
loaded_setups = session.loaded_setups
if 'pgaa' in loaded_setups:
printwarning('Execute PGAA specific tests')
sample_motor.status(0)
samplepos.stat... | 22.130435 | 51 | 0.675835 | # pylint: skip-file
# test: subdirs = frm2
# test: setups = pgaa
# test: setupcode = SetDetectors(det)
# typical PGAA application
from nicos import session
loaded_setups = session.loaded_setups
if 'pgaa' in loaded_setups:
printwarning('Execute PGAA specific tests')
sample_motor.status(0)
samplepos.stat... | 0 | 0 | 0 |
17e27f365b4a412a168334d5e75d332ee1dd3bb4 | 372 | py | Python | minikube/drivers/hyperkit.py | j-boivie/fiaas-deploy-daemon | 3bba04b3b329f4c9c1418d80a9a007e8ed22f804 | [
"Apache-2.0"
] | null | null | null | minikube/drivers/hyperkit.py | j-boivie/fiaas-deploy-daemon | 3bba04b3b329f4c9c1418d80a9a007e8ed22f804 | [
"Apache-2.0"
] | null | null | null | minikube/drivers/hyperkit.py | j-boivie/fiaas-deploy-daemon | 3bba04b3b329f4c9c1418d80a9a007e8ed22f804 | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/env python
# -*- coding: utf-8
from distutils.version import StrictVersion
from .common import has_utility, MacDriver
| 24.8 | 60 | 0.704301 | #!/usr/bin/env python
# -*- coding: utf-8
from distutils.version import StrictVersion
from .common import has_utility, MacDriver
class HyperKitDriver(MacDriver):
name = "hyperkit"
def supported(self, minikube_version):
if minikube_version < StrictVersion("0.22.0"):
return False
r... | 158 | 60 | 23 |
88f414f5dfb87ed6915f3632e429f5db096be2dc | 9,169 | py | Python | extra_foam/pipeline/f_worker.py | European-XFEL/EXtra-foam | f8d225db6b8923d0cce9db2b8c8a80613600b64c | [
"BSD-3-Clause"
] | 7 | 2019-11-27T09:31:37.000Z | 2022-02-12T21:28:49.000Z | extra_foam/pipeline/f_worker.py | European-XFEL/EXtra-foam | f8d225db6b8923d0cce9db2b8c8a80613600b64c | [
"BSD-3-Clause"
] | 172 | 2019-12-03T07:56:02.000Z | 2022-03-25T15:46:45.000Z | extra_foam/pipeline/f_worker.py | European-XFEL/EXtra-foam | f8d225db6b8923d0cce9db2b8c8a80613600b64c | [
"BSD-3-Clause"
] | 9 | 2019-11-27T09:32:38.000Z | 2022-01-05T09:56:10.000Z | """
Distributed under the terms of the BSD 3-Clause License.
The full license is in the file LICENSE, distributed with this software.
Author: Jun Zhu <jun.zhu@xfel.eu>
Copyright (C) European X-Ray Free-Electron Laser Facility GmbH.
All rights reserved.
"""
import multiprocessing as mp
from threading import Event
from... | 33.463504 | 80 | 0.550333 | """
Distributed under the terms of the BSD 3-Clause License.
The full license is in the file LICENSE, distributed with this software.
Author: Jun Zhu <jun.zhu@xfel.eu>
Copyright (C) European X-Ray Free-Electron Laser Facility GmbH.
All rights reserved.
"""
import multiprocessing as mp
from threading import Event
from... | 1,487 | 0 | 238 |
32606e926d34bcdec145a4d0848ce4631c9f6737 | 623 | py | Python | tests/utils/test_PCA_with_scaling.py | gagneurlab/gfeat | a5ddb081567253ee2d6046485f81941bebb1f0f9 | [
"MIT"
] | 2 | 2018-09-28T21:30:07.000Z | 2020-06-09T15:54:24.000Z | tests/utils/test_PCA_with_scaling.py | gagneurlab/gfeat | a5ddb081567253ee2d6046485f81941bebb1f0f9 | [
"MIT"
] | 1 | 2021-11-15T17:47:48.000Z | 2021-11-15T17:47:48.000Z | tests/utils/test_PCA_with_scaling.py | gagneurlab/gfeat | a5ddb081567253ee2d6046485f81941bebb1f0f9 | [
"MIT"
] | null | null | null | """
Test PCA_with_scaling
"""
from gfeat.utils import PCA_with_standard_sample_deviation_scaling
import numpy as np
import pandas as pd
import numpy.testing as npt
| 31.15 | 77 | 0.617978 | """
Test PCA_with_scaling
"""
from gfeat.utils import PCA_with_standard_sample_deviation_scaling
import numpy as np
import pandas as pd
import numpy.testing as npt
def test_get_codon_pairs_count():
matrix = np.array([[62, 68, 5], [24, 94, 93], [96, 223, 23], [5, 9, 44]])
df = pd.DataFrame(matrix)
res = P... | 434 | 0 | 23 |
860676afa0a8e663e2bfa9b3bd17c33089f8c56e | 1,340 | py | Python | tests/unit/murmur_hash_test.py | tonytheonlypony/hazelcast-python-client | 3aafeaf2ebc05aee4f2386c62c079db496a7c81f | [
"Apache-2.0"
] | 98 | 2015-12-08T14:26:27.000Z | 2022-03-23T17:44:11.000Z | tests/unit/murmur_hash_test.py | tonytheonlypony/hazelcast-python-client | 3aafeaf2ebc05aee4f2386c62c079db496a7c81f | [
"Apache-2.0"
] | 396 | 2016-02-23T11:07:55.000Z | 2022-03-31T14:26:34.000Z | tests/unit/murmur_hash_test.py | tonytheonlypony/hazelcast-python-client | 3aafeaf2ebc05aee4f2386c62c079db496a7c81f | [
"Apache-2.0"
] | 62 | 2015-12-09T11:20:53.000Z | 2022-01-28T01:30:54.000Z | import unittest
from hazelcast.hash import murmur_hash3_x86_32, hash_to_index
| 39.411765 | 88 | 0.573134 | import unittest
from hazelcast.hash import murmur_hash3_x86_32, hash_to_index
class HashTest(unittest.TestCase):
def test_hash(self):
expected = [ # Expected values are from the Java implementation
# 00000000 -> HEAP_DATA_OVERHEAD
(b"00000000key-1", 1228513025, 107),
... | 1,198 | 13 | 49 |
c965544761f5246eaa459ee8fcab07a64d643e37 | 150 | py | Python | web/apps/settings/index.py | sean-hayes/zoom | eda69c64ceb69dd87d2f7a5dfdaeea52ef65c581 | [
"MIT"
] | 1 | 2017-05-11T17:24:49.000Z | 2017-05-11T17:24:49.000Z | web/apps/settings/index.py | sean-hayes/zoom | eda69c64ceb69dd87d2f7a5dfdaeea52ef65c581 | [
"MIT"
] | null | null | null | web/apps/settings/index.py | sean-hayes/zoom | eda69c64ceb69dd87d2f7a5dfdaeea52ef65c581 | [
"MIT"
] | 1 | 2020-07-20T00:33:27.000Z | 2020-07-20T00:33:27.000Z | """
settings.index
"""
import zoom
| 15 | 47 | 0.64 | """
settings.index
"""
import zoom
def view(**_):
content = 'System settings will go here.'
return zoom.page(content, title='Settings')
| 87 | 0 | 23 |
0029a64919fb65d3dbc6116e6ea58b54af4347bc | 5,931 | py | Python | paddlehub/common/hub_server.py | Austendeng/PaddleHub | b363eaedaf77d21152920cce652c719278ec809d | [
"Apache-2.0"
] | null | null | null | paddlehub/common/hub_server.py | Austendeng/PaddleHub | b363eaedaf77d21152920cce652c719278ec809d | [
"Apache-2.0"
] | null | null | null | paddlehub/common/hub_server.py | Austendeng/PaddleHub | b363eaedaf77d21152920cce652c719278ec809d | [
"Apache-2.0"
] | null | null | null | # Copyright (c) 2019 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 applic... | 36.386503 | 93 | 0.629236 | # Copyright (c) 2019 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 applic... | 4,617 | 3 | 292 |
0e2619046312db618159b3dc7b62606764bfada6 | 639 | py | Python | cd.py | kenteroshima/fedora_cheatsheet | aa745db3067e0ea0ebb4523abf2a81c6af5ed384 | [
"MIT"
] | null | null | null | cd.py | kenteroshima/fedora_cheatsheet | aa745db3067e0ea0ebb4523abf2a81c6af5ed384 | [
"MIT"
] | null | null | null | cd.py | kenteroshima/fedora_cheatsheet | aa745db3067e0ea0ebb4523abf2a81c6af5ed384 | [
"MIT"
] | null | null | null | from tkinter import *
import time
root = Tk()
root.title("Tkinter 15min timer")
root.geometry("250x200")
count = 0
compliment = Label(root, text="")
compliment.grid(row=0, column=0)
totalLabel = Label(root, text=f'Total: {count} times')
totalLabel.grid(row=1, column=0)
Label(root, text="What good will I do from now... | 21.3 | 71 | 0.682316 | from tkinter import *
import time
root = Tk()
root.title("Tkinter 15min timer")
root.geometry("250x200")
count = 0
def start():
global count
root.withdraw()
time.sleep(900)
root.deiconify()
compliment.configure(text="Nice work! ^ ^")
count += 1
totalLabel.configure(text=f'Total: {count}... | 189 | 0 | 23 |
7aad572a3ecaf753d7d70bde4356a141b7f9ca12 | 27,320 | py | Python | descritor_de_rede.py | ViniciusFonsekaDeOliveira/complex-networks | 016f997b5929cdb9ac91775e4ed24cc442c60a65 | [
"CC0-1.0"
] | null | null | null | descritor_de_rede.py | ViniciusFonsekaDeOliveira/complex-networks | 016f997b5929cdb9ac91775e4ed24cc442c60a65 | [
"CC0-1.0"
] | null | null | null | descritor_de_rede.py | ViniciusFonsekaDeOliveira/complex-networks | 016f997b5929cdb9ac91775e4ed24cc442c60a65 | [
"CC0-1.0"
] | null | null | null | import math
import numpy as np
from random import randint
from random import sample
import matplotlib.pyplot as plt
import matplotlib.path as mpath
import igraph as ig
from matplotlib import pylab
import pandas as pd
from scipy.stats import ks_2samp as kolmogorov_smirnov_similarity
# Retorna um indice ger... | 36.426667 | 119 | 0.682577 | import math
import numpy as np
from random import randint
from random import sample
import matplotlib.pyplot as plt
import matplotlib.path as mpath
import igraph as ig
from matplotlib import pylab
import pandas as pd
from scipy.stats import ks_2samp as kolmogorov_smirnov_similarity
def numero_de_vertices(grafo):
... | 24,734 | 0 | 1,136 |
d3e6234bab8e0560102214d3160cbf13462720b8 | 4,046 | py | Python | altair_catplot/utils.py | justinbois/altair-catplot | b0afb8a62657ca7d97df7a8151f8347539db01d6 | [
"MIT"
] | 22 | 2018-09-10T16:21:12.000Z | 2021-12-15T09:49:13.000Z | altair_catplot/utils.py | justinbois/altair-catplot | b0afb8a62657ca7d97df7a8151f8347539db01d6 | [
"MIT"
] | 3 | 2018-10-14T17:45:08.000Z | 2021-11-11T19:32:38.000Z | altair_catplot/utils.py | justinbois/altair-catplot | b0afb8a62657ca7d97df7a8151f8347539db01d6 | [
"MIT"
] | null | null | null | import altair as alt
from altair.utils.schemapi import Undefined, UndefinedType
def _check_catplot_transform(transform, mark):
"""Check to make sure transform is valid for catplot.
Parameters
----------
transform : str or list of strings
Which transform to use. Valid entries are:
... | 31.364341 | 115 | 0.537321 | import altair as alt
from altair.utils.schemapi import Undefined, UndefinedType
def _check_catplot_transform(transform, mark):
"""Check to make sure transform is valid for catplot.
Parameters
----------
transform : str or list of strings
Which transform to use. Valid entries are:
... | 245 | 0 | 23 |
f3eb0a2b27ef10284f29404142ce87ba6b972374 | 622 | py | Python | submissions/joi2018yo/c.py | m-star18/atcoder | 08e475810516602fa088f87daf1eba590b4e07cc | [
"Unlicense"
] | 1 | 2021-05-10T01:16:28.000Z | 2021-05-10T01:16:28.000Z | submissions/joi2018yo/c.py | m-star18/atcoder | 08e475810516602fa088f87daf1eba590b4e07cc | [
"Unlicense"
] | 3 | 2021-05-11T06:14:15.000Z | 2021-06-19T08:18:36.000Z | submissions/joi2018yo/c.py | m-star18/atcoder | 08e475810516602fa088f87daf1eba590b4e07cc | [
"Unlicense"
] | null | null | null | import sys
read = sys.stdin.buffer.read
readline = sys.stdin.buffer.readline
readlines = sys.stdin.buffer.readlines
sys.setrecursionlimit(10 ** 7)
h, w = map(int, readline().split())
a = [list(map(int, readline().split())) for _ in range(h)]
ans = float('inf')
for i in range(h):
for j in range(w):
v = c... | 20.733333 | 58 | 0.5209 | import sys
read = sys.stdin.buffer.read
readline = sys.stdin.buffer.readline
readlines = sys.stdin.buffer.readlines
sys.setrecursionlimit(10 ** 7)
h, w = map(int, readline().split())
a = [list(map(int, readline().split())) for _ in range(h)]
def check(i, j):
cnt = 0
for y in range(h):
if i == y:
... | 217 | 0 | 23 |
a965fd45eccefc10554fe84de16a01fb73164ea2 | 1,514 | py | Python | gitgrid/pages/__init__.py | RocketScienceAbteilung/git-grid | c38c6d73089a51144899161b19356808ceb4d725 | [
"MIT"
] | 9 | 2015-05-10T11:07:15.000Z | 2020-12-26T16:43:19.000Z | gitgrid/pages/__init__.py | RocketScienceAbteilung/git-grid | c38c6d73089a51144899161b19356808ceb4d725 | [
"MIT"
] | null | null | null | gitgrid/pages/__init__.py | RocketScienceAbteilung/git-grid | c38c6d73089a51144899161b19356808ceb4d725 | [
"MIT"
] | null | null | null | import numpy
import time
| 25.233333 | 61 | 0.564729 | import numpy
import time
class Page(object):
def __init__(self, controller):
self.controller = controller
self.page = 0
def activate(self):
self.page = 0
self.controller.actions['up'] = self.pg_up
self.controller.actions['down'] = self.pg_down
self.controller.a... | 1,144 | -2 | 346 |
791c831685b5f2b634575445c8d3a1a4ef68c1b8 | 5,701 | py | Python | fp_pred_group/preprocessor/preprocess_feat.py | ndkgit339/filledpause_prediction_group | db511c081f155ec2c23afe82bc44c03c38618590 | [
"MIT"
] | 1 | 2022-02-25T01:03:40.000Z | 2022-02-25T01:03:40.000Z | fp_pred_group/preprocessor/preprocess_feat.py | ndkgit339/filledpause_prediction_group | db511c081f155ec2c23afe82bc44c03c38618590 | [
"MIT"
] | null | null | null | fp_pred_group/preprocessor/preprocess_feat.py | ndkgit339/filledpause_prediction_group | db511c081f155ec2c23afe82bc44c03c38618590 | [
"MIT"
] | null | null | null | import time
from pathlib import Path
from tqdm import tqdm
import hydra
from omegaconf import DictConfig
# 言語処理
# import fasttext
# import fasttext.util
from transformers import BertTokenizer, BertModel
# データ処理
import numpy as np
import torch
@hydra.main(config_path="conf/preprocess", config_name="config")
if _... | 38.52027 | 97 | 0.630591 | import time
from pathlib import Path
from tqdm import tqdm
import hydra
from omegaconf import DictConfig
# 言語処理
# import fasttext
# import fasttext.util
from transformers import BertTokenizer, BertModel
# データ処理
import numpy as np
import torch
def extract_feats(config):
start = time.time()
# FPs
with ope... | 5,282 | 0 | 68 |
66a490be6b07f8d2ac46551d1a939dcb2d7984a8 | 266 | py | Python | examples/test-read.py | benbaptist/packet-framer | fd6502531c05c4f0f005a180f0f7cca311c2f732 | [
"MIT"
] | null | null | null | examples/test-read.py | benbaptist/packet-framer | fd6502531c05c4f0f005a180f0f7cca311c2f732 | [
"MIT"
] | null | null | null | examples/test-read.py | benbaptist/packet-framer | fd6502531c05c4f0f005a180f0f7cca311c2f732 | [
"MIT"
] | null | null | null | from packetframer import PacketFramer
TEST_PATH = "/tmp/amazing_fifo"
framer = PacketFramer(
fh_read=open(TEST_PATH, "rb")
)
while True:
packet = framer.read_packet()
if not packet:
print("All done!")
break
print("Read", packet)
| 15.647059 | 37 | 0.650376 | from packetframer import PacketFramer
TEST_PATH = "/tmp/amazing_fifo"
framer = PacketFramer(
fh_read=open(TEST_PATH, "rb")
)
while True:
packet = framer.read_packet()
if not packet:
print("All done!")
break
print("Read", packet)
| 0 | 0 | 0 |
27fe495d9e4ec040bb2ef8f8dad464a2c709aeb9 | 1,230 | py | Python | old_version/blur_3.4.py | Anonymous160609/Agent_based_Model_GEOG5990 | 53dca09bd85403fb8a6e3b7b5d51fdd203e68f69 | [
"FSFAP"
] | null | null | null | old_version/blur_3.4.py | Anonymous160609/Agent_based_Model_GEOG5990 | 53dca09bd85403fb8a6e3b7b5d51fdd203e68f69 | [
"FSFAP"
] | null | null | null | old_version/blur_3.4.py | Anonymous160609/Agent_based_Model_GEOG5990 | 53dca09bd85403fb8a6e3b7b5d51fdd203e68f69 | [
"FSFAP"
] | null | null | null | '''
log:
IndexError: list index out of range
#WRONG agent number is 99**n
#for i = 0 j = 0 at the start of the run,
#the line sum += data[i-1][j] is trying to read into negative list space that doesn't exist
'''
# blur ---------------------------------------
import matplotlib.pyplot
import random
data = []
processe... | 22.363636 | 91 | 0.573984 | '''
log:
IndexError: list index out of range
#WRONG agent number is 99**n
#for i = 0 j = 0 at the start of the run,
#the line sum += data[i-1][j] is trying to read into negative list space that doesn't exist
'''
# blur ---------------------------------------
import matplotlib.pyplot
import random
data = []
processe... | 0 | 0 | 0 |
a21a795b8aeab1cf5fd7c438226534f34bc8ca41 | 1,310 | py | Python | parentopticon/gui.py | EliRibble/parentopticon | 8593d7f72fac9706f1bd8e8326ac932f5af95a32 | [
"MIT"
] | null | null | null | parentopticon/gui.py | EliRibble/parentopticon | 8593d7f72fac9706f1bd8e8326ac932f5af95a32 | [
"MIT"
] | null | null | null | parentopticon/gui.py | EliRibble/parentopticon | 8593d7f72fac9706f1bd8e8326ac932f5af95a32 | [
"MIT"
] | null | null | null | import os
import subprocess
ROOT = os.path.dirname(os.path.dirname(__file__))
class NoApplication(tk.Frame):
"""An application to tell the client 'no'"""
def show_alert(title: str, content: str) -> None:
"""Show an alert message using the desktop notifier."""
subprocess.call(["notify-send", title, content])
... | 27.87234 | 79 | 0.703053 | import os
import subprocess
ROOT = os.path.dirname(os.path.dirname(__file__))
class NoApplication(tk.Frame):
"""An application to tell the client 'no'"""
def __init__(self, program_name, reason, master=None):
super().__init__(master)
self.master = master
self.program_name = program_name
self.reason = reason... | 691 | 0 | 49 |
54ae6cb06b5a905a6ce2077f9e2e018c61f3c5c6 | 1,701 | py | Python | tests/endtoend/TestRealRandomXData.py | jun2tong/bnp-anomaly | c7fa106b5bb29ed6688a3d91e3f302a0a130b896 | [
"BSD-3-Clause"
] | 3 | 2018-07-02T03:50:23.000Z | 2019-05-16T03:23:55.000Z | tests/endtoend/TestRealRandomXData.py | jun2tong/bnp-anomaly | c7fa106b5bb29ed6688a3d91e3f302a0a130b896 | [
"BSD-3-Clause"
] | 1 | 2021-01-07T01:33:06.000Z | 2021-01-07T01:33:06.000Z | tests/endtoend/TestRealRandomXData.py | jun2tong/bnp-anomaly | c7fa106b5bb29ed6688a3d91e3f302a0a130b896 | [
"BSD-3-Clause"
] | 1 | 2020-09-01T13:21:18.000Z | 2020-09-01T13:21:18.000Z | import numpy as np
import unittest
from collections import OrderedDict
import bnpy
from AbstractEndToEndTest import AbstractEndToEndTest
| 32.711538 | 61 | 0.47619 | import numpy as np
import unittest
from collections import OrderedDict
import bnpy
from AbstractEndToEndTest import AbstractEndToEndTest
class TestEndToEnd(AbstractEndToEndTest):
__test__ = True
def setUp(self):
""" Create the dataset
"""
rng = np.random.RandomState(0)
X = rn... | 598 | 941 | 23 |
6102dd3a40815ea5c2953ce47241d5b615900eb9 | 2,250 | py | Python | Own/textEncryption.py | kmykoh97/Basic-Programming-SJTU | be3887c45b92e32427336ad4ff8252b63991d9f2 | [
"Apache-2.0"
] | null | null | null | Own/textEncryption.py | kmykoh97/Basic-Programming-SJTU | be3887c45b92e32427336ad4ff8252b63991d9f2 | [
"Apache-2.0"
] | null | null | null | Own/textEncryption.py | kmykoh97/Basic-Programming-SJTU | be3887c45b92e32427336ad4ff8252b63991d9f2 | [
"Apache-2.0"
] | null | null | null | #Text Encryption Project
#Created by MyKoh
#2017-09-24
words = raw_input("Please enter words in small letter you wish to encrypt")
#To encrypt to numbers in sequence ie: 'a' = 1
#To encrypt to ASCII codes
textToNumberConversion()
| 29.220779 | 75 | 0.520889 | #Text Encryption Project
#Created by MyKoh
#2017-09-24
words = raw_input("Please enter words in small letter you wish to encrypt")
#To encrypt to numbers in sequence ie: 'a' = 1
def textToNumberConversion():
result = []
for character in words:
if character == 'a':
result.append(1)
... | 1,972 | 0 | 44 |
ef7fbac39ba0bc3e4d4c1a11f3373667e3d70dd7 | 636 | py | Python | app/repositories/paste.py | CarsonTheCanuck/quickpaste | 1b641b3bafb0edc4487364e71a8319a0d7b417c6 | [
"MIT"
] | 16 | 2019-02-27T14:16:38.000Z | 2021-06-01T01:57:52.000Z | app/repositories/paste.py | CarsonTheCanuck/quickpaste | 1b641b3bafb0edc4487364e71a8319a0d7b417c6 | [
"MIT"
] | 22 | 2019-03-13T13:51:13.000Z | 2022-03-12T01:08:34.000Z | app/repositories/paste.py | CarsonTheCanuck/quickpaste | 1b641b3bafb0edc4487364e71a8319a0d7b417c6 | [
"MIT"
] | 1 | 2020-06-05T04:48:02.000Z | 2020-06-05T04:48:02.000Z | from datetime import datetime
from . import update_one, find_one, delete_one, make_id
| 19.875 | 62 | 0.558176 | from datetime import datetime
from . import update_one, find_one, delete_one, make_id
def upsert_paste(updates: dict):
created_at = updated_at = datetime.utcnow()
defaults = {
'_id': make_id(),
'created_at': created_at,
}
merged = {**defaults, **updates, 'updated_at': updated_at}
... | 478 | 0 | 69 |
53df32c1ef458b8d1511e9d4e14e3603e21534a5 | 525 | py | Python | Scripts/ip-calc.py | BeTheMike/Meandering-Python | 5c57597e292e7530739bf9f8b649a82e3f1ca0cf | [
"Apache-2.0"
] | null | null | null | Scripts/ip-calc.py | BeTheMike/Meandering-Python | 5c57597e292e7530739bf9f8b649a82e3f1ca0cf | [
"Apache-2.0"
] | null | null | null | Scripts/ip-calc.py | BeTheMike/Meandering-Python | 5c57597e292e7530739bf9f8b649a82e3f1ca0cf | [
"Apache-2.0"
] | 1 | 2018-06-16T22:41:02.000Z | 2018-06-16T22:41:02.000Z | import ipcalc
import sys
# Pull address from input
# addrString = raw_input("Address (x.x.x.x/x): ")
addrString = sys.argv[1]
#Pull netmask
subnet = ipcalc.Network(addrString)
# Generate empty list
AddrList = []
# Append items to the list
for x in ipcalc.Network(addrString):
AddrList.append(str(x))
# Print it out ... | 27.631579 | 60 | 0.699048 | import ipcalc
import sys
# Pull address from input
# addrString = raw_input("Address (x.x.x.x/x): ")
addrString = sys.argv[1]
#Pull netmask
subnet = ipcalc.Network(addrString)
# Generate empty list
AddrList = []
# Append items to the list
for x in ipcalc.Network(addrString):
AddrList.append(str(x))
# Print it out ... | 0 | 0 | 0 |
7cd4def60a21124a4a6b1088c01c15055df22af3 | 11,216 | py | Python | tensorflow_quantum/python/optimizers/spsa_minimizer.py | lockwo/quantum | de57af9330ac7f5bf8298d202081c29fb2a956b8 | [
"Apache-2.0"
] | null | null | null | tensorflow_quantum/python/optimizers/spsa_minimizer.py | lockwo/quantum | de57af9330ac7f5bf8298d202081c29fb2a956b8 | [
"Apache-2.0"
] | null | null | null | tensorflow_quantum/python/optimizers/spsa_minimizer.py | lockwo/quantum | de57af9330ac7f5bf8298d202081c29fb2a956b8 | [
"Apache-2.0"
] | null | null | null | # Copyright 2021 The TensorFlow Quantum 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... | 40.490975 | 80 | 0.592011 | # Copyright 2021 The TensorFlow Quantum 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... | 0 | 0 | 0 |
3561c43c0cac9474be7df05a1c159ffe9f53704b | 3,882 | py | Python | stonky/api.py | UnicornJoe42/stonky | 5e3445749bda371bc717364a2ab0370c4f4f5ec3 | [
"MIT"
] | 1 | 2021-01-04T10:50:20.000Z | 2021-01-04T10:50:20.000Z | stonky/api.py | UnicornJoe42/stonky | 5e3445749bda371bc717364a2ab0370c4f4f5ec3 | [
"MIT"
] | null | null | null | stonky/api.py | UnicornJoe42/stonky | 5e3445749bda371bc717364a2ab0370c4f4f5ec3 | [
"MIT"
] | null | null | null | import asyncio
from typing import Any, Dict, Optional, Set
from urllib.parse import urlencode
from aiohttp import ClientSession
from stonky.enums import CurrencyType
from stonky.exceptions import StonkyException
from stonky.stock import Stock
| 35.614679 | 85 | 0.579341 | import asyncio
from typing import Any, Dict, Optional, Set
from urllib.parse import urlencode
from aiohttp import ClientSession
from stonky.enums import CurrencyType
from stonky.exceptions import StonkyException
from stonky.stock import Stock
class Api:
def __init__(self) -> None:
self._session: Optiona... | 3,436 | -11 | 211 |
d4d3a34bdc534b68c881bc0fb552a9f617417548 | 5,662 | py | Python | src/client_libraries/python/microsoft/dynamics/customerinsights/api/models/data_source_metadata.py | microsoft/Dynamics365-CustomerInsights-Client-Libraries | e00632f7972717b03e0fb1a9e2667e8f9444a0fe | [
"MIT"
] | null | null | null | src/client_libraries/python/microsoft/dynamics/customerinsights/api/models/data_source_metadata.py | microsoft/Dynamics365-CustomerInsights-Client-Libraries | e00632f7972717b03e0fb1a9e2667e8f9444a0fe | [
"MIT"
] | null | null | null | src/client_libraries/python/microsoft/dynamics/customerinsights/api/models/data_source_metadata.py | microsoft/Dynamics365-CustomerInsights-Client-Libraries | e00632f7972717b03e0fb1a9e2667e8f9444a0fe | [
"MIT"
] | 7 | 2021-02-11T19:48:57.000Z | 2021-12-17T08:00:15.000Z | # coding=utf-8
# --------------------------------------------------------------------------
# Code generated by Microsoft (R) AutoRest Code Generator.
# Changes may cause incorrect behavior and will be lost if the code is
# regenerated.
# --------------------------------------------------------------------------
from ... | 45.296 | 124 | 0.64094 | # coding=utf-8
# --------------------------------------------------------------------------
# Code generated by Microsoft (R) AutoRest Code Generator.
# Changes may cause incorrect behavior and will be lost if the code is
# regenerated.
# --------------------------------------------------------------------------
from ... | 750 | 0 | 27 |
227d032e2fa5c4936e49fde43d51d0e488096b42 | 145 | py | Python | exercícios/EX_CursoEmVideo/ex003.py | jose-carlos-code/CursoEmvideo-python | 8c9b82db2c2b906f6d8f2359a680b9b3af25da43 | [
"MIT"
] | 1 | 2021-01-11T15:10:36.000Z | 2021-01-11T15:10:36.000Z | exercícios/EX_CursoEmVideo/ex003.py | jose-carlos-code/CursoEmvideo-python | 8c9b82db2c2b906f6d8f2359a680b9b3af25da43 | [
"MIT"
] | null | null | null | exercícios/EX_CursoEmVideo/ex003.py | jose-carlos-code/CursoEmvideo-python | 8c9b82db2c2b906f6d8f2359a680b9b3af25da43 | [
"MIT"
] | null | null | null | n1 = int(input('me diga um numero: '))
n2 = int(input('me diga outro numero: '))
s = n1 + n2
print('a soma entre {} {} é {}'.format(n1, n2, s))
| 29 | 51 | 0.572414 | n1 = int(input('me diga um numero: '))
n2 = int(input('me diga outro numero: '))
s = n1 + n2
print('a soma entre {} {} é {}'.format(n1, n2, s))
| 0 | 0 | 0 |
522f01e8517f31d9a245315dab7156df94c0cc2c | 5,976 | py | Python | LPC/Django/noticias/app_noticias/views.py | JottaF/ProjetosFacul | d9538e811fc5915692152af34c6939275f4abc27 | [
"MIT"
] | null | null | null | LPC/Django/noticias/app_noticias/views.py | JottaF/ProjetosFacul | d9538e811fc5915692152af34c6939275f4abc27 | [
"MIT"
] | null | null | null | LPC/Django/noticias/app_noticias/views.py | JottaF/ProjetosFacul | d9538e811fc5915692152af34c6939275f4abc27 | [
"MIT"
] | null | null | null | from django.shortcuts import render, redirect, reverse
from django.views.generic.edit import FormView
from django.http import HttpResponse, Http404, HttpResponseRedirect
from app_noticias.forms import ContatoForm, TagForm, AddNoticiaForm
from django.contrib.auth.models import User
from app_noticias.models import Tag
fr... | 33.573034 | 118 | 0.64508 | from django.shortcuts import render, redirect, reverse
from django.views.generic.edit import FormView
from django.http import HttpResponse, Http404, HttpResponseRedirect
from app_noticias.forms import ContatoForm, TagForm, AddNoticiaForm
from django.contrib.auth.models import User
from app_noticias.models import Tag
fr... | 5,201 | 0 | 368 |
7ff937fe7856c01791969e3d2ae4cb291a7822da | 4,064 | py | Python | aztk/client/base/helpers/get_application_log.py | atg-abhishek/aztk | e3d060e58373c316fddbc0907f08b1430e1b2691 | [
"MIT"
] | null | null | null | aztk/client/base/helpers/get_application_log.py | atg-abhishek/aztk | e3d060e58373c316fddbc0907f08b1430e1b2691 | [
"MIT"
] | null | null | null | aztk/client/base/helpers/get_application_log.py | atg-abhishek/aztk | e3d060e58373c316fddbc0907f08b1430e1b2691 | [
"MIT"
] | null | null | null | import time
import azure
import azure.batch.models as batch_models
import azure.batch.models.batch_error as batch_error
from aztk import error, models
from aztk.utils import constants, helpers
output_file = constants.TASK_WORKING_DIR + "/" + constants.SPARK_SUBMIT_LOGS_FILE
def __wait_for_app_to_be_running(batch_... | 36.285714 | 118 | 0.694636 | import time
import azure
import azure.batch.models as batch_models
import azure.batch.models.batch_error as batch_error
from aztk import error, models
from aztk.utils import constants, helpers
output_file = constants.TASK_WORKING_DIR + "/" + constants.SPARK_SUBMIT_LOGS_FILE
def __check_task_node_exist(batch_client... | 3,148 | 0 | 115 |
2ef3f1bb0151fdc9ab85b450461ab6c39b800ad7 | 882 | py | Python | Approximating_e/main.py | PeterConway314/MathsMiniProjects | 5d51bfe85dd238fa0aebb703ae322a6122716642 | [
"MIT"
] | null | null | null | Approximating_e/main.py | PeterConway314/MathsMiniProjects | 5d51bfe85dd238fa0aebb703ae322a6122716642 | [
"MIT"
] | null | null | null | Approximating_e/main.py | PeterConway314/MathsMiniProjects | 5d51bfe85dd238fa0aebb703ae322a6122716642 | [
"MIT"
] | null | null | null | '''
I heard that summing numbers in [0,1] until the total is >1 will
require an average of e numbers.
This code puts that to the test.
Hopefully pretty graphs, other visualisations, and optimisations
to be added later.
'''
import random
import math
# import matplotlib.pyplot as plt
# Generate a number in the range ... | 25.2 | 72 | 0.68254 | '''
I heard that summing numbers in [0,1] until the total is >1 will
require an average of e numbers.
This code puts that to the test.
Hopefully pretty graphs, other visualisations, and optimisations
to be added later.
'''
import random
import math
# import matplotlib.pyplot as plt
# Generate a number in the range ... | 146 | 0 | 44 |
9635c940c5ee576251586f67481b124490292e1e | 2,659 | py | Python | 20-fs-ias-lec/groups/01-dev2dev/Code/BTonly/lib/logMerge/logStore/transconn/database_connector.py | Kyrus1999/BACnet | 5be8e1377252166041bcd0b066cce5b92b077d06 | [
"MIT"
] | 8 | 2020-03-17T21:12:18.000Z | 2021-12-12T15:55:54.000Z | 20-fs-ias-lec/groups/01-dev2dev/Code/BTonly/lib/logMerge/logStore/transconn/database_connector.py | Kyrus1999/BACnet | 5be8e1377252166041bcd0b066cce5b92b077d06 | [
"MIT"
] | 2 | 2021-07-19T06:18:43.000Z | 2022-02-10T12:17:58.000Z | 20-fs-ias-lec/groups/01-dev2dev/Code/BTonly/lib/logMerge/logStore/transconn/database_connector.py | Kyrus1999/BACnet | 5be8e1377252166041bcd0b066cce5b92b077d06 | [
"MIT"
] | 25 | 2020-03-20T09:32:45.000Z | 2021-07-18T18:12:59.000Z | from ..database.database_handler import DatabaseHandler as dataBaseHandler
from ..funcs.log import create_logger
from ..verific.verify_insertion import Verification
logger = create_logger('DatabaseConnector')
"""The database connector allows the network layer to access database functionality.
It is meant to be used m... | 45.844828 | 119 | 0.71117 | from ..database.database_handler import DatabaseHandler as dataBaseHandler
from ..funcs.log import create_logger
from ..verific.verify_insertion import Verification
logger = create_logger('DatabaseConnector')
"""The database connector allows the network layer to access database functionality.
It is meant to be used m... | 82 | 0 | 27 |
73953a0b777e231168044c33bd1667eddada17fe | 152 | py | Python | src/holographer/__init__.py | xguse/holographer | d389655772afc5a5c4e458c763d59c25a8508f18 | [
"MIT"
] | null | null | null | src/holographer/__init__.py | xguse/holographer | d389655772afc5a5c4e458c763d59c25a8508f18 | [
"MIT"
] | null | null | null | src/holographer/__init__.py | xguse/holographer | d389655772afc5a5c4e458c763d59c25a8508f18 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
"""Top-level package for Holographer."""
__author__ = """Gus Dunn"""
__email__ = 'w.gus.dunn@gmail.com'
__version__ = '0.0.2'
| 19 | 40 | 0.625 | # -*- coding: utf-8 -*-
"""Top-level package for Holographer."""
__author__ = """Gus Dunn"""
__email__ = 'w.gus.dunn@gmail.com'
__version__ = '0.0.2'
| 0 | 0 | 0 |
8ea4ff60dbd45c87a48eac14c5b632ff27ce3332 | 15,415 | py | Python | tests/basic/sessions_client.py | billmcchesney1/sessionOffload | 816d1572bff5f2b60bd402c22b7973f0370e1c47 | [
"Apache-2.0"
] | null | null | null | tests/basic/sessions_client.py | billmcchesney1/sessionOffload | 816d1572bff5f2b60bd402c22b7973f0370e1c47 | [
"Apache-2.0"
] | null | null | null | tests/basic/sessions_client.py | billmcchesney1/sessionOffload | 816d1572bff5f2b60bd402c22b7973f0370e1c47 | [
"Apache-2.0"
] | null | null | null | #============LICENSE_START=============================================================================================================
# Copyright (C) 2020 AT&T Intellectual Property. All rights reserved.
#===================================================================
# Licensed under the Apache License, Version ... | 46.996951 | 135 | 0.684333 | #============LICENSE_START=============================================================================================================
# Copyright (C) 2020 AT&T Intellectual Property. All rights reserved.
#===================================================================
# Licensed under the Apache License, Version ... | 13,208 | 0 | 506 |
8f9df12b459d4354bc957b81b65f1cba0e85a2cc | 87 | py | Python | dlutils/models/gans/gan/__init__.py | justusschock/dl-utils | 1078f5030b8aac2bf022daf5fa14d66f74c3c893 | [
"MIT"
] | 13 | 2020-03-25T12:29:32.000Z | 2022-02-05T15:02:11.000Z | dlutils/models/gans/gan/__init__.py | Royzon/dl-utils | be95707da9cb812a5f25a11f1469055e0b7abcd2 | [
"MIT"
] | 1 | 2021-07-05T10:14:52.000Z | 2021-07-05T10:14:52.000Z | dlutils/models/gans/gan/__init__.py | Royzon/dl-utils | be95707da9cb812a5f25a11f1469055e0b7abcd2 | [
"MIT"
] | 5 | 2020-03-25T12:55:09.000Z | 2020-12-22T20:18:52.000Z | from dlutils.models.gans.gan.gan import GenerativeAdversarialNetworks, \
update_fn
| 29 | 72 | 0.816092 | from dlutils.models.gans.gan.gan import GenerativeAdversarialNetworks, \
update_fn
| 0 | 0 | 0 |
5e4940de5f22dbea769a2dfdcbca37a148eeef18 | 1,290 | py | Python | github_timeline_rss/util.py | narfman0/github_timeline_rss | af07d80a35da3fc993f4a18db4671f0b05a05970 | [
"MIT"
] | 1 | 2017-06-18T20:53:25.000Z | 2017-06-18T20:53:25.000Z | github_timeline_rss/util.py | narfman0/github_timeline_rss | af07d80a35da3fc993f4a18db4671f0b05a05970 | [
"MIT"
] | null | null | null | github_timeline_rss/util.py | narfman0/github_timeline_rss | af07d80a35da3fc993f4a18db4671f0b05a05970 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
from datetime import datetime
import requests
from werkzeug.contrib.atom import AtomFeed
ENDPOINT = "https://api.github.com/users/{username}/received_events"
TITLE = "{username}'s github timeline"
SUBTITLE = "Timeline as of {date}"
AUTHOR = "{}'s github"
FEED_TITLE = "{} {} {}"
URL = "https://... | 32.25 | 78 | 0.608527 | # -*- coding: utf-8 -*-
from datetime import datetime
import requests
from werkzeug.contrib.atom import AtomFeed
ENDPOINT = "https://api.github.com/users/{username}/received_events"
TITLE = "{username}'s github timeline"
SUBTITLE = "Timeline as of {date}"
AUTHOR = "{}'s github"
FEED_TITLE = "{} {} {}"
URL = "https://... | 931 | 0 | 23 |
40b02c371f00485094c3589c663dbab0df6e6447 | 11,760 | py | Python | src/test/tinc/tincrepo/mpp/models/optimizer_sql_performance_tc.py | lintzc/GPDB | b48c8b97da18f495c10065d0853db87960aebae2 | [
"PostgreSQL",
"Apache-2.0"
] | null | null | null | src/test/tinc/tincrepo/mpp/models/optimizer_sql_performance_tc.py | lintzc/GPDB | b48c8b97da18f495c10065d0853db87960aebae2 | [
"PostgreSQL",
"Apache-2.0"
] | null | null | null | src/test/tinc/tincrepo/mpp/models/optimizer_sql_performance_tc.py | lintzc/GPDB | b48c8b97da18f495c10065d0853db87960aebae2 | [
"PostgreSQL",
"Apache-2.0"
] | 1 | 2018-12-04T09:13:57.000Z | 2018-12-04T09:13:57.000Z | """
Copyright (C) 2004-2015 Pivotal Software, Inc. All rights reserved.
This program and the accompanying materials are made available under
the terms of the 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
... | 37.452229 | 158 | 0.616667 | """
Copyright (C) 2004-2015 Pivotal Software, Inc. All rights reserved.
This program and the accompanying materials are made available under
the terms of the 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
... | 2,313 | 0 | 214 |
b1204298f20c8174831bfbf82bba60dfd2d46b28 | 946 | py | Python | practice/findfile.py | JackyYuanjie/python-scripts | 490eb9668bda6db004ae87d204588fb6ffe56051 | [
"Apache-2.0"
] | 1 | 2021-07-08T05:09:38.000Z | 2021-07-08T05:09:38.000Z | practice/findfile.py | JackyYuanjie/python-scripts | 490eb9668bda6db004ae87d204588fb6ffe56051 | [
"Apache-2.0"
] | null | null | null | practice/findfile.py | JackyYuanjie/python-scripts | 490eb9668bda6db004ae87d204588fb6ffe56051 | [
"Apache-2.0"
] | 1 | 2020-01-09T07:29:17.000Z | 2020-01-09T07:29:17.000Z | # -*- coding:utf-8 -*-
import glob
# 获取指定目录下的内容
# yijian = glob.glob(r"F:\*\*\*.docx")
# print(yijian)
"""
在python中,glob模块是用来查找匹配的文件的
在查找的条件中,需要用到Unix shell中的匹配规则:
* : 匹配所有
? : 匹配一个字符
*.* : 匹配如:[hello.txt,cat.xls,xxx234s.doc]
?.* : 匹配如:[1.txt,h.py]
?.gif: ... | 20.12766 | 52 | 0.581395 | # -*- coding:utf-8 -*-
import glob
# 获取指定目录下的内容
# yijian = glob.glob(r"F:\*\*\*.docx")
# print(yijian)
"""
在python中,glob模块是用来查找匹配的文件的
在查找的条件中,需要用到Unix shell中的匹配规则:
* : 匹配所有
? : 匹配一个字符
*.* : 匹配如:[hello.txt,cat.xls,xxx234s.doc]
?.* : 匹配如:[1.txt,h.py]
?.gif: ... | 286 | 0 | 23 |
28472e4e49e3405700c37e2183c8e16721f120f1 | 3,393 | py | Python | os_classes/ocea257/chapter1.py | profxj/os_classes | 8435e985c8e33a3e736a5c330866054e8ffcbed7 | [
"BSD-3-Clause"
] | null | null | null | os_classes/ocea257/chapter1.py | profxj/os_classes | 8435e985c8e33a3e736a5c330866054e8ffcbed7 | [
"BSD-3-Clause"
] | 4 | 2020-04-04T18:28:36.000Z | 2020-05-07T17:26:15.000Z | os_classes/ocea257/chapter1.py | profxj/os_classes | 8435e985c8e33a3e736a5c330866054e8ffcbed7 | [
"BSD-3-Clause"
] | null | null | null | import numpy as np
'''
Problem 1.2
'''
'''
Problem 1.2
'''
'''
Problem 1.8
'''
| 24.410072 | 86 | 0.62069 | import numpy as np
'''
Problem 1.2
'''
def expo_func(omega, t):
return np.exp(-1*omega*(t + np.abs(t)))
def first_forward(t, wdt, omega=1.):
# For convenience, set omega = 1
dt = wdt / omega
# Evaluate
tdt = t + dt
expf = expo_func(omega, t)
expf_plus = expo_func(omega, tdt)
# Finite... | 3,010 | 0 | 299 |
f888892343cec2930131f72ab6eba3f87a76d84e | 4,107 | py | Python | instruction/field/entity.py | HansGR/WorldsCollide | af227be553e120ee004b130598360c61daf7df59 | [
"MIT"
] | 7 | 2022-01-15T02:53:53.000Z | 2022-02-17T00:51:32.000Z | instruction/field/entity.py | HansGR/WorldsCollide | af227be553e120ee004b130598360c61daf7df59 | [
"MIT"
] | 8 | 2022-01-16T02:45:24.000Z | 2022-03-21T02:08:27.000Z | instruction/field/entity.py | HansGR/WorldsCollide | af227be553e120ee004b130598360c61daf7df59 | [
"MIT"
] | 5 | 2022-01-15T02:53:38.000Z | 2022-01-19T17:42:10.000Z | from instruction.event import _Instruction
from instruction.entity import *
CAMERA, PARTY0, PARTY1, PARTY2, PARTY3 = range(0x30, 0x35)
| 28.72028 | 84 | 0.652301 | from instruction.event import _Instruction
from instruction.entity import *
CAMERA, PARTY0, PARTY1, PARTY2, PARTY3 = range(0x30, 0x35)
class MoveDiagonal(_Instruction):
def __init__(self, dir1, dist1, dir2, dist2):
import data.direction as direction
dir_letter = { direction.UP : "u", direction.RIG... | 2,125 | 437 | 1,409 |
3400d47b5a5611923c26089e0886364c9839b974 | 803 | py | Python | storage/local.py | sem-onyalo/dnn-training-model | f08d4aee4e87c3a72f9883e5232a628f0fe98cbc | [
"MIT"
] | null | null | null | storage/local.py | sem-onyalo/dnn-training-model | f08d4aee4e87c3a72f9883e5232a628f0fe98cbc | [
"MIT"
] | null | null | null | storage/local.py | sem-onyalo/dnn-training-model | f08d4aee4e87c3a72f9883e5232a628f0fe98cbc | [
"MIT"
] | null | null | null | import os
from .storage import Storage
| 27.689655 | 79 | 0.611457 | import os
from .storage import Storage
class StorageLocal(Storage):
def __init__(self, **kwargs) -> None:
super().__init__(**kwargs)
def getRootDirectory(self):
if self.rootDirectory != "" and not os.path.exists(self.rootDirectory):
os.makedirs(self.rootDirectory)
root = ... | 653 | 7 | 103 |
41b793722d1e6835be0600ae34316a5cd9589fab | 2,688 | py | Python | cloud_accounts/cld_sync.py | PaloAltoNetworks/pcs-migration-management | 766c8c861befa92e593b23ad6d248e33f62054bb | [
"ISC"
] | 1 | 2022-03-17T12:51:45.000Z | 2022-03-17T12:51:45.000Z | cloud_accounts/cld_sync.py | PaloAltoNetworks/pcs-migration-management | 766c8c861befa92e593b23ad6d248e33f62054bb | [
"ISC"
] | 2 | 2021-11-03T15:34:40.000Z | 2021-12-14T19:50:20.000Z | cloud_accounts/cld_sync.py | PaloAltoNetworks/pcs-migration-management | 766c8c861befa92e593b23ad6d248e33f62054bb | [
"ISC"
] | 4 | 2021-11-09T17:57:01.000Z | 2022-01-24T17:41:21.000Z | from sdk.color_print import c_print
from cloud_accounts import cld_migrate, cld_get, cld_compare, cld_update, cld_delete
def sync(tenant_sessions: list, addMode: bool, upMode: bool, delMode: bool, logger:object):
'''Update, add, or delete cloud accounts to normalize all tenants to be the same as the source tenant'... | 43.354839 | 194 | 0.684152 | from sdk.color_print import c_print
from cloud_accounts import cld_migrate, cld_get, cld_compare, cld_update, cld_delete
def sync(tenant_sessions: list, addMode: bool, upMode: bool, delMode: bool, logger:object):
'''Update, add, or delete cloud accounts to normalize all tenants to be the same as the source tenant'... | 0 | 0 | 0 |
728d2f7486a44e8d23a3215d652832c4f82f1212 | 3,516 | py | Python | tests/gene_sequence_tests/test_gene_sequence_functions.py | michaelhall28/darwinian_shift | 7554532379d1650e9174fdf3ab0a0f0074b4d2c5 | [
"MIT"
] | null | null | null | tests/gene_sequence_tests/test_gene_sequence_functions.py | michaelhall28/darwinian_shift | 7554532379d1650e9174fdf3ab0a0f0074b4d2c5 | [
"MIT"
] | null | null | null | tests/gene_sequence_tests/test_gene_sequence_functions.py | michaelhall28/darwinian_shift | 7554532379d1650e9174fdf3ab0a0f0074b4d2c5 | [
"MIT"
] | null | null | null | from darwinian_shift.utils.gene_sequence_functions import *
from tests.conftest import EXON_FILE, REFERENCE_FASTA_FILE
import pickle
import os
import numpy as np
from pandas.testing import assert_frame_equal
import pytest
FILE_DIR = os.path.dirname(os.path.realpath(__file__))
@pytest.mark.parametrize("gene,transcript... | 54.9375 | 120 | 0.655859 | from darwinian_shift.utils.gene_sequence_functions import *
from tests.conftest import EXON_FILE, REFERENCE_FASTA_FILE
import pickle
import os
import numpy as np
from pandas.testing import assert_frame_equal
import pytest
FILE_DIR = os.path.dirname(os.path.realpath(__file__))
@pytest.mark.parametrize("gene,transcript... | 3,055 | 0 | 91 |
15cc8a84c1e9641b63310af88809ae077958d882 | 917 | py | Python | Codeforces/C_Grandma_Capa_Knits_a_Scarf.py | anubhab-code/Competitive-Programming | de28cb7d44044b9e7d8bdb475da61e37c018ac35 | [
"MIT"
] | null | null | null | Codeforces/C_Grandma_Capa_Knits_a_Scarf.py | anubhab-code/Competitive-Programming | de28cb7d44044b9e7d8bdb475da61e37c018ac35 | [
"MIT"
] | null | null | null | Codeforces/C_Grandma_Capa_Knits_a_Scarf.py | anubhab-code/Competitive-Programming | de28cb7d44044b9e7d8bdb475da61e37c018ac35 | [
"MIT"
] | null | null | null | for _ in range(int(input())):
n = int(input())
s = input()
alpha = set(s)
ans = n
countImpossible = 0
for i in alpha:
curr = 0
lb, ub = 0, n - 1
while lb < ub:
if s[lb] == s[ub]:
lb += 1
ub -= 1
continue
... | 25.472222 | 37 | 0.309706 | for _ in range(int(input())):
n = int(input())
s = input()
alpha = set(s)
ans = n
countImpossible = 0
for i in alpha:
curr = 0
lb, ub = 0, n - 1
while lb < ub:
if s[lb] == s[ub]:
lb += 1
ub -= 1
continue
... | 0 | 0 | 0 |
06f3494061afc4d5cd05a9d35fee5503ab23679f | 1,227 | py | Python | src/promnesia/sources/hackernews.py | karlicoss/were-you-here | bc1a798386d3cd3b362b3c2d362498a2df2daae6 | [
"MIT"
] | 2 | 2018-06-04T05:59:02.000Z | 2019-08-25T21:45:07.000Z | src/promnesia/sources/hackernews.py | karlicoss/were-you-here | bc1a798386d3cd3b362b3c2d362498a2df2daae6 | [
"MIT"
] | 1 | 2019-07-14T13:23:45.000Z | 2019-07-14T13:23:45.000Z | src/promnesia/sources/hackernews.py | karlicoss/were-you-here | bc1a798386d3cd3b362b3c2d362498a2df2daae6 | [
"MIT"
] | null | null | null | '''
Uses [[https://github.com/karlicoss/HPI][HPI]] dogsheep module to import
Hacker News items.
'''
import textwrap
from promnesia.common import Visit, Loc, Results
| 29.214286 | 72 | 0.548492 | '''
Uses [[https://github.com/karlicoss/HPI][HPI]] dogsheep module to import
Hacker News items.
'''
import textwrap
from promnesia.common import Visit, Loc, Results
def index() -> Results:
from . import hpi
from my.hackernews import dogsheep
for item in dogsheep.items():
if isinstance(item, Exc... | 1,038 | 0 | 23 |
83056a92cb919e23d461c3f985f9bc13390d590c | 1,266 | py | Python | racecar_gym/bullet/configs.py | RuiqiZhang99/racecar_gym | 84cbfad84b282149400f7e944ae309084adaeab2 | [
"MIT"
] | 16 | 2020-11-27T02:55:24.000Z | 2022-03-24T01:27:29.000Z | racecar_gym/bullet/configs.py | RuiqiZhang99/racecar_gym | 84cbfad84b282149400f7e944ae309084adaeab2 | [
"MIT"
] | 5 | 2020-08-24T15:59:39.000Z | 2020-10-20T19:45:46.000Z | racecar_gym/bullet/configs.py | RuiqiZhang99/racecar_gym | 84cbfad84b282149400f7e944ae309084adaeab2 | [
"MIT"
] | 4 | 2020-10-08T16:14:19.000Z | 2021-12-26T18:19:53.000Z | from dataclasses import dataclass, field
from typing import List, Dict, Any, Tuple
from yamldataclassconfig.config import YamlDataClassConfig
@dataclass
@dataclass
@dataclass
@dataclass
@dataclass
@dataclass
@dataclass
| 21.827586 | 71 | 0.71643 | from dataclasses import dataclass, field
from typing import List, Dict, Any, Tuple
from yamldataclassconfig.config import YamlDataClassConfig
@dataclass
class SensorConfig(YamlDataClassConfig):
type: str = None
name: str = None
params: Dict[str, Any] = None
frequency: float = None
@dataclass
class ... | 0 | 878 | 154 |
3013d6318ebcca79568b59c329de03eb84f3b683 | 1,065 | py | Python | world_export/image.py | drewp/megasecond | 13cd93e356b426e093135bf8402efec513e2fa46 | [
"CC-BY-4.0"
] | 2 | 2021-01-02T19:38:05.000Z | 2021-04-06T07:51:27.000Z | world_export/image.py | jeremy-coleman/megasecond | 0ba6b453c1b35fcd7b33256ccd07ca7d0615dc39 | [
"CC-BY-4.0"
] | null | null | null | world_export/image.py | jeremy-coleman/megasecond | 0ba6b453c1b35fcd7b33256ccd07ca7d0615dc39 | [
"CC-BY-4.0"
] | 1 | 2021-04-06T07:51:35.000Z | 2021-04-06T07:51:35.000Z | import logging
import numpy
from PIL import Image
from dirs import dest
log = logging.getLogger()
| 34.354839 | 103 | 0.676995 | import logging
import numpy
from PIL import Image
from dirs import dest
log = logging.getLogger()
def save_builtin(img, path):
# having blender save was turning the image back to black!
path.parent.mkdir(parents=True, exist_ok=True)
img.filepath = str(path).replace('.png', '-builtinsave.png')
img.fi... | 918 | 0 | 46 |
e4cd9fd884597d98e86a72771dd5a334082ccccb | 480 | py | Python | app/routes/subjects.py | bhaktijkoli/attendance-system-flask | dbe6fff9576e95e19c5ca2881d9e95c1d09e6aab | [
"MIT"
] | null | null | null | app/routes/subjects.py | bhaktijkoli/attendance-system-flask | dbe6fff9576e95e19c5ca2881d9e95c1d09e6aab | [
"MIT"
] | null | null | null | app/routes/subjects.py | bhaktijkoli/attendance-system-flask | dbe6fff9576e95e19c5ca2881d9e95c1d09e6aab | [
"MIT"
] | null | null | null | from flask import request, jsonify
from app import app, db
from app.models import Subject, SubjectSchema, SubjectsSchema
@app.route('/subjects', methods=['get'])
@app.route('/subjects', methods=['post'])
| 28.235294 | 61 | 0.720833 | from flask import request, jsonify
from app import app, db
from app.models import Subject, SubjectSchema, SubjectsSchema
@app.route('/subjects', methods=['get'])
def subjects_get():
subjects = Subject.query.all()
return SubjectsSchema.jsonify(subjects)
@app.route('/subjects', methods=['post'])
def subjects_po... | 230 | 0 | 44 |
2c373032362281ea1ed86e8848b602e5f2deb7ef | 1,411 | py | Python | calculomedia.py | jeffersonklamas/calculo-media-python | 046ef9df93bc9fb4e4b3d8b4de72fb831eacf993 | [
"MIT"
] | null | null | null | calculomedia.py | jeffersonklamas/calculo-media-python | 046ef9df93bc9fb4e4b3d8b4de72fb831eacf993 | [
"MIT"
] | null | null | null | calculomedia.py | jeffersonklamas/calculo-media-python | 046ef9df93bc9fb4e4b3d8b4de72fb831eacf993 | [
"MIT"
] | null | null | null |
#----------------------------------------------
# Teste de cálculo e tomada de decisão
#
# Conceito A = nota >= 9 and < 10
# Conceito B = nota >= 8 and 8,99999
# Conceito C = nota >= 7 and 7,99999
# Conceito D = nota >= 6 and 6,99999
# Conceito R = nota < 5
#
#----------------------------------------------
import os
f... | 36.179487 | 97 | 0.571935 |
#----------------------------------------------
# Teste de cálculo e tomada de decisão
#
# Conceito A = nota >= 9 and < 10
# Conceito B = nota >= 8 and 8,99999
# Conceito C = nota >= 7 and 7,99999
# Conceito D = nota >= 6 and 6,99999
# Conceito R = nota < 5
#
#----------------------------------------------
import os
f... | 1,035 | 0 | 23 |
0c6b11038a1b82daffecc669bbcae9b87a2e5b56 | 689 | py | Python | tests/commands/new/conftest.py | paulproteus/briefcase | 9d00dc9300cb00ef5dcd766e3a625a94b0462e51 | [
"BSD-3-Clause"
] | null | null | null | tests/commands/new/conftest.py | paulproteus/briefcase | 9d00dc9300cb00ef5dcd766e3a625a94b0462e51 | [
"BSD-3-Clause"
] | null | null | null | tests/commands/new/conftest.py | paulproteus/briefcase | 9d00dc9300cb00ef5dcd766e3a625a94b0462e51 | [
"BSD-3-Clause"
] | null | null | null | import pytest
from briefcase.commands import NewCommand
from briefcase.commands.base import full_kwargs
class DummyNewCommand(NewCommand):
"""
A dummy new command that doesn't actually do anything.
It only serves to track which actions would be performend.
"""
description = 'Dummy new command'
... | 23.758621 | 62 | 0.66328 | import pytest
from briefcase.commands import NewCommand
from briefcase.commands.base import full_kwargs
class DummyNewCommand(NewCommand):
"""
A dummy new command that doesn't actually do anything.
It only serves to track which actions would be performend.
"""
description = 'Dummy new command'
... | 277 | 0 | 76 |
86679d83a70f450df538b378dde22ea6ab0cc8ca | 327 | py | Python | paneldata_dash/backend/schemas/category.py | clarencejlee/jdp | d3d31db0138ff06f2f5ec592d85317941af4f280 | [
"MIT"
] | null | null | null | paneldata_dash/backend/schemas/category.py | clarencejlee/jdp | d3d31db0138ff06f2f5ec592d85317941af4f280 | [
"MIT"
] | null | null | null | paneldata_dash/backend/schemas/category.py | clarencejlee/jdp | d3d31db0138ff06f2f5ec592d85317941af4f280 | [
"MIT"
] | null | null | null | from ma import ma
from models.category import CategoryModel
from schemas.market import MarketSchema
| 27.25 | 46 | 0.681957 | from ma import ma
from models.category import CategoryModel
from schemas.market import MarketSchema
class CategorySchema(ma.SQLAlchemyAutoSchema):
class Meta:
include_fk = True
model = CategoryModel
dump_only = ("id",)
fields = ("id", "name", "market")
market = ma.Nested(Market... | 0 | 204 | 23 |
f8a598e07e60a7d1d957086d98481c2021e695b3 | 13,391 | py | Python | scripts/shelf/locBaker.py | kohyuk91/hkTools | 0125c486b32375fb1dd30465f892e6bd23c07114 | [
"BSD-3-Clause"
] | 10 | 2020-04-30T21:48:07.000Z | 2022-03-07T04:02:50.000Z | scripts/shelf/locBaker.py | kohyuk91/hkTools | 0125c486b32375fb1dd30465f892e6bd23c07114 | [
"BSD-3-Clause"
] | 2 | 2020-04-27T01:55:31.000Z | 2021-01-28T06:30:29.000Z | scripts/shelf/locBaker.py | kohyuk91/mayaMatchmoveTools | 0125c486b32375fb1dd30465f892e6bd23c07114 | [
"BSD-3-Clause"
] | 1 | 2020-11-20T06:53:35.000Z | 2020-11-20T06:53:35.000Z | # BSD 3-Clause License
#
# Copyright (c) 2020, Hyuk Ko
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are met:
#
# 1. Redistributions of source code must retain the above copyright notice, this
# list ... | 41.586957 | 171 | 0.663207 | # BSD 3-Clause License
#
# Copyright (c) 2020, Hyuk Ko
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are met:
#
# 1. Redistributions of source code must retain the above copyright notice, this
# list ... | 10,899 | 239 | 45 |
69a12a987282352bc5e2033a8726243fe91694fe | 9,447 | py | Python | tmv/images.py | brettbeeson/tmv | 0771a88d1cb06bb938555fa967eb8c44f5f846d5 | [
"MIT"
] | 1 | 2021-11-09T19:38:33.000Z | 2021-11-09T19:38:33.000Z | tmv/images.py | brettbeeson/tmv | 0771a88d1cb06bb938555fa967eb8c44f5f846d5 | [
"MIT"
] | null | null | null | tmv/images.py | brettbeeson/tmv | 0771a88d1cb06bb938555fa967eb8c44f5f846d5 | [
"MIT"
] | null | null | null | """ Stuff to generate and modify images """
# pylint: disable=line-too-long, logging-fstring-interpolation, dangerous-default-value, logging-not-lazy
from datetime import timedelta, datetime as dt
import sys
import glob
import logging
import argparse
from pathlib import Path
import os
from dateutil.rrule import rrule, ... | 36.616279 | 163 | 0.610247 | """ Stuff to generate and modify images """
# pylint: disable=line-too-long, logging-fstring-interpolation, dangerous-default-value, logging-not-lazy
from datetime import timedelta, datetime as dt
import sys
import glob
import logging
import argparse
from pathlib import Path
import os
from dateutil.rrule import rrule, ... | 4,201 | 0 | 180 |
a67f514046bb4d5bb3a2494fca843238f7913af1 | 43 | py | Python | unigui/userset.py | Claus1/unigui | 972c0c98a61321d83df568f79a82cfaa2a472ebe | [
"MIT"
] | 47 | 2020-12-25T10:14:33.000Z | 2022-03-31T18:59:13.000Z | userset.py | stopinspb/unigui | 353b6c1708c9dd9176406cff1c861643ceeb43da | [
"MIT"
] | 1 | 2020-12-25T10:25:17.000Z | 2021-04-26T19:25:35.000Z | userset.py | stopinspb/unigui | 353b6c1708c9dd9176406cff1c861643ceeb43da | [
"MIT"
] | 4 | 2021-02-02T13:59:07.000Z | 2021-12-28T10:08:22.000Z | user = None | 14.333333 | 15 | 0.674419 | user = None
def get_user():
return user | 10 | 0 | 22 |
86021fcc4233e5f63324a6586a1724d74a385cd7 | 904 | py | Python | amberelectric/model/actual_interval.py | madpilot/amberelectric.py | ffb26389d8022e8cdfa803fd51365c586686bd21 | [
"Apache-2.0"
] | 3 | 2021-06-22T03:09:21.000Z | 2022-03-17T03:53:03.000Z | amberelectric/model/actual_interval.py | madpilot/amberelectric.py | ffb26389d8022e8cdfa803fd51365c586686bd21 | [
"Apache-2.0"
] | 4 | 2021-09-11T05:44:08.000Z | 2021-10-02T12:15:38.000Z | amberelectric/model/actual_interval.py | madpilot/amberelectric.py | ffb26389d8022e8cdfa803fd51365c586686bd21 | [
"Apache-2.0"
] | 3 | 2021-10-01T12:00:57.000Z | 2022-03-17T09:55:49.000Z | from .interval import Interval
from datetime import date, datetime
from .interval import Interval, SpikeStatus, ChannelType
| 22.6 | 56 | 0.519912 | from .interval import Interval
from datetime import date, datetime
from .interval import Interval, SpikeStatus, ChannelType
class ActualInterval(Interval):
def __init__(
self,
duration: float,
spot_per_kwh: float,
per_kwh: float,
date: date,
nem_time: datetime,
... | 693 | 10 | 76 |
2242df7f69650e46d7c0b5c82a10a6458e3f8629 | 30,560 | py | Python | swatches.py | bmduffy/pycasa | 0294811515ea8b0d9adbcce9ef36495de45842ec | [
"CC0-1.0"
] | 1 | 2022-01-13T16:14:44.000Z | 2022-01-13T16:14:44.000Z | swatches.py | bmduffy/pycasa | 0294811515ea8b0d9adbcce9ef36495de45842ec | [
"CC0-1.0"
] | null | null | null | swatches.py | bmduffy/pycasa | 0294811515ea8b0d9adbcce9ef36495de45842ec | [
"CC0-1.0"
] | null | null | null | import sys
from glyphview import ( GlyphView, GlyphScene, GlyphItem )
from PyQt4.QtGui import ( QApplication, QDialog, QPen, QBrush, QHBoxLayout,
QPushButton, QVBoxLayout, QGraphicsRectItem, QGraphicsSimpleTextItem,
QPixmap, QFileDialog, QPainter, QComboBox, QSpin... | 42.444444 | 120 | 0.52945 | import sys
from glyphview import ( GlyphView, GlyphScene, GlyphItem )
from PyQt4.QtGui import ( QApplication, QDialog, QPen, QBrush, QHBoxLayout,
QPushButton, QVBoxLayout, QGraphicsRectItem, QGraphicsSimpleTextItem,
QPixmap, QFileDialog, QPainter, QComboBox, QSpin... | 18,044 | 11,850 | 45 |
230c01c5bd6c1e972b9711281ff7465c1aa0ffcc | 338 | py | Python | tests/return/return04.py | ktok07b6/polyphony | 657c5c7440520db6b4985970bd50547407693ac4 | [
"MIT"
] | 83 | 2015-11-30T09:59:13.000Z | 2021-08-03T09:12:28.000Z | tests/return/return04.py | jesseclin/polyphony | 657c5c7440520db6b4985970bd50547407693ac4 | [
"MIT"
] | 4 | 2017-02-10T01:43:11.000Z | 2020-07-14T03:52:25.000Z | tests/return/return04.py | jesseclin/polyphony | 657c5c7440520db6b4985970bd50547407693ac4 | [
"MIT"
] | 11 | 2016-11-18T14:39:15.000Z | 2021-02-23T10:05:20.000Z | from polyphony import testbench
@testbench
test()
| 17.789474 | 37 | 0.497041 | from polyphony import testbench
def return04(x, y, z):
s = 1
for i in range(x):
for j in range(y):
if i == j == z:
return i
s = s * 2
return s
@testbench
def test():
assert 1 == return04(0, 0, 0)
assert 2 == return04(1, 1, 1)
assert 1024 == return04(... | 241 | 0 | 45 |
a520fdd2dcd36abd8953f2ec3cd9fd1764ed83f1 | 142 | py | Python | ex049.py | gabrielwai/exercicios_de_Python | 3767775748db7c501a6e0364edf7ba4f079e62f9 | [
"MIT"
] | null | null | null | ex049.py | gabrielwai/exercicios_de_Python | 3767775748db7c501a6e0364edf7ba4f079e62f9 | [
"MIT"
] | null | null | null | ex049.py | gabrielwai/exercicios_de_Python | 3767775748db7c501a6e0364edf7ba4f079e62f9 | [
"MIT"
] | null | null | null | tabuada = int(input('Qual tabuada queres saber?: '))
for cont in range(0, 11):
print('{} x {} = {}'.format(tabuada,cont,tabuada*cont))
| 35.5 | 60 | 0.619718 | tabuada = int(input('Qual tabuada queres saber?: '))
for cont in range(0, 11):
print('{} x {} = {}'.format(tabuada,cont,tabuada*cont))
| 0 | 0 | 0 |
4f011e62d4c223cb11883a64840a812fa6a214f6 | 1,286 | py | Python | imagesoup/colors.py | zendai/ImageSoup | cd4696c42ae7ae90dcba42d538cb33beaccad7be | [
"MIT"
] | 72 | 2017-09-08T04:47:31.000Z | 2021-12-21T13:18:39.000Z | imagesoup/colors.py | zendai/ImageSoup | cd4696c42ae7ae90dcba42d538cb33beaccad7be | [
"MIT"
] | 4 | 2017-09-08T04:56:04.000Z | 2021-11-17T14:22:04.000Z | imagesoup/colors.py | zendai/ImageSoup | cd4696c42ae7ae90dcba42d538cb33beaccad7be | [
"MIT"
] | 8 | 2017-09-09T14:36:49.000Z | 2021-08-05T21:13:48.000Z | from collections import Counter
import webcolors
CSS3_COLORS = webcolors.CSS3_NAMES_TO_HEX.keys()
| 29.227273 | 73 | 0.681182 | from collections import Counter
import webcolors
CSS3_COLORS = webcolors.CSS3_NAMES_TO_HEX.keys()
def color_analysis(image):
if image.mode != 'RGB':
image = image.convert('RGB')
# initialize a Counter starting from zero
color_counter = Counter({color: 0 for color in Counter(CSS3_COLORS)})
... | 1,113 | 0 | 69 |
fa93406ba792c7c6a457dfa550e6617f70e521af | 262 | py | Python | codes/proposal/proposal_config/configs/__init__.py | sarvai/proposals | 578c0094db52594cd85acb843df82fe3c19db46d | [
"Apache-2.0"
] | null | null | null | codes/proposal/proposal_config/configs/__init__.py | sarvai/proposals | 578c0094db52594cd85acb843df82fe3c19db46d | [
"Apache-2.0"
] | null | null | null | codes/proposal/proposal_config/configs/__init__.py | sarvai/proposals | 578c0094db52594cd85acb843df82fe3c19db46d | [
"Apache-2.0"
] | null | null | null | from . import base as baseline
from . import conf_proposal
from . import conf_proposal_patch
configurations = {}
configurations['baseline'] = baseline
configurations['conf_proposal'] = conf_proposal
configurations['conf_proposal_patch'] = conf_proposal_patch
| 23.818182 | 59 | 0.80916 | from . import base as baseline
from . import conf_proposal
from . import conf_proposal_patch
configurations = {}
configurations['baseline'] = baseline
configurations['conf_proposal'] = conf_proposal
configurations['conf_proposal_patch'] = conf_proposal_patch
| 0 | 0 | 0 |
e6f06c1c290eac49cb5859a6d4b66ef84beb0502 | 10,869 | py | Python | Scripts/Analyzer_102.py | ShepherdCode/Soars2021 | ab4f304eaa09e52d260152397a6c53d7a05457da | [
"MIT"
] | 1 | 2021-08-16T14:49:04.000Z | 2021-08-16T14:49:04.000Z | Scripts/Analyzer_102.py | ShepherdCode/Soars2021 | ab4f304eaa09e52d260152397a6c53d7a05457da | [
"MIT"
] | null | null | null | Scripts/Analyzer_102.py | ShepherdCode/Soars2021 | ab4f304eaa09e52d260152397a6c53d7a05457da | [
"MIT"
] | null | null | null | #!/usr/bin/env python
# coding: utf-8
# # Analyzer
#
# Statistically, visually, and through machine learning compare mRNA and lncRNA sequences from GENCODE v38.
#
# Assume the user downloaded files from GENCODE v38 [FTP](http://ftp.ebi.ac.uk/pub/databases/gencode/Gencode_human/release_38/)
# to a subdirectory called... | 30.445378 | 127 | 0.746987 | #!/usr/bin/env python
# coding: utf-8
# # Analyzer
#
# Statistically, visually, and through machine learning compare mRNA and lncRNA sequences from GENCODE v38.
#
# Assume the user downloaded files from GENCODE v38 [FTP](http://ftp.ebi.ac.uk/pub/databases/gencode/Gencode_human/release_38/)
# to a subdirectory called... | 123 | 0 | 23 |
d6fdd614120b04250fdc37b59c0e02e801c271dd | 12,449 | py | Python | uftpd_dirtrav.py | Arinerron/uftp_dirtrav | 5e32e684ae72bbbf0c54cabf44804c77deb8edc4 | [
"Unlicense"
] | 18 | 2019-08-31T22:26:25.000Z | 2021-10-17T00:25:04.000Z | uftpd_dirtrav.py | Arinerron/uftp_dirtrav | 5e32e684ae72bbbf0c54cabf44804c77deb8edc4 | [
"Unlicense"
] | null | null | null | uftpd_dirtrav.py | Arinerron/uftp_dirtrav | 5e32e684ae72bbbf0c54cabf44804c77deb8edc4 | [
"Unlicense"
] | 2 | 2020-03-15T22:16:19.000Z | 2020-04-22T22:05:57.000Z | #!/usr/bin/env python3
# Author: Aaron Esau (Arinerron) <security@aaronesau.com>
# Writeup: https://aaronesau.com/blog/posts/6
# Product: uftpd 2.6-2.10
# CVE ID: CVE-2020-5221
# This exploit uses a directory traversal vulnerability and escapes uftpd's
# crappy implementation of a chroot jail. It does not require au... | 29.570071 | 167 | 0.580047 | #!/usr/bin/env python3
# Author: Aaron Esau (Arinerron) <security@aaronesau.com>
# Writeup: https://aaronesau.com/blog/posts/6
# Product: uftpd 2.6-2.10
# CVE ID: CVE-2020-5221
# This exploit uses a directory traversal vulnerability and escapes uftpd's
# crappy implementation of a chroot jail. It does not require au... | 3,933 | 335 | 223 |
6b23020d9c54f5afe30e9e7a6d143c63771033c1 | 5,374 | py | Python | exstracs/exstracs_onlineenv.py | bnanita/trafficapi | ba22faa609ce0f79b3791dca2c403591a26ee2e2 | [
"MIT"
] | null | null | null | exstracs/exstracs_onlineenv.py | bnanita/trafficapi | ba22faa609ce0f79b3791dca2c403591a26ee2e2 | [
"MIT"
] | null | null | null | exstracs/exstracs_onlineenv.py | bnanita/trafficapi | ba22faa609ce0f79b3791dca2c403591a26ee2e2 | [
"MIT"
] | null | null | null | """
Name: ExSTraCS_Online_Environement.py
Authors: Ryan Urbanowicz - Written at Dartmouth College, Hanover, NH, USA
Contact: ryan.j.urbanowicz@darmouth.edu
Created: April 25, 2014
Modified: August 25,2014
Description: ExSTraCS is best suited to offline iterative learning, however this module has b... | 52.686275 | 160 | 0.652773 | """
Name: ExSTraCS_Online_Environement.py
Authors: Ryan Urbanowicz - Written at Dartmouth College, Hanover, NH, USA
Contact: ryan.j.urbanowicz@darmouth.edu
Created: April 25, 2014
Modified: August 25,2014
Description: ExSTraCS is best suited to offline iterative learning, however this module has b... | 0 | 2,585 | 23 |
ccbdc66770bafcb5caa8a1c2c46254496cc67c08 | 4,354 | py | Python | mpdb/sandbox/cP_EOS.py | stuart-nolan/mpdb | 79a8847b4763ac4c6a22ad2ec0ee18a148d8a785 | [
"BSD-2-Clause"
] | null | null | null | mpdb/sandbox/cP_EOS.py | stuart-nolan/mpdb | 79a8847b4763ac4c6a22ad2ec0ee18a148d8a785 | [
"BSD-2-Clause"
] | null | null | null | mpdb/sandbox/cP_EOS.py | stuart-nolan/mpdb | 79a8847b4763ac4c6a22ad2ec0ee18a148d8a785 | [
"BSD-2-Clause"
] | null | null | null | """
cP_EOS.py
SPDX-License-Identifier: BSD-2-Clause
Copyright (c) 2021 Stuart Nolan. All rights reserved.
"""
import pdb
import CoolProp.CoolProp as cP
from CoolProp import AbstractState as cPAS
from tabulate import tabulate
from scipy.optimize import minimize
"""
from CoolProp/include/DataStructures.h
0 iphase_liqu... | 34.015625 | 98 | 0.644924 | """
cP_EOS.py
SPDX-License-Identifier: BSD-2-Clause
Copyright (c) 2021 Stuart Nolan. All rights reserved.
"""
import pdb
import CoolProp.CoolProp as cP
from CoolProp import AbstractState as cPAS
from tabulate import tabulate
from scipy.optimize import minimize
def cEOS_fit_kij(kij, data, cPAS_EOS):
cPAS_EOS.set_b... | 1,201 | 0 | 46 |
2e1d63ddee144c3b2fa0f6cfbf6ed7acc87d8e70 | 1,801 | py | Python | train/analyze_weather.py | open-climate-tech/firecam | d0041332f3d8ba38b7db3b6426010bff0099f569 | [
"Apache-2.0"
] | 9 | 2020-11-25T03:51:50.000Z | 2022-02-13T19:19:51.000Z | train/analyze_weather.py | open-climate-tech/firecam | d0041332f3d8ba38b7db3b6426010bff0099f569 | [
"Apache-2.0"
] | 6 | 2020-03-27T01:35:10.000Z | 2022-03-26T16:20:31.000Z | train/analyze_weather.py | open-climate-tech/firecam | d0041332f3d8ba38b7db3b6426010bff0099f569 | [
"Apache-2.0"
] | 3 | 2020-06-08T15:49:40.000Z | 2022-01-24T11:18:40.000Z | # Copyright 2020 Open Climate Tech Contributors
#
# 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 agr... | 32.160714 | 113 | 0.702388 | # Copyright 2020 Open Climate Tech Contributors
#
# 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 agr... | 772 | 0 | 23 |
8c385fad9549c6e7137f9ebafc807f929188ff7b | 1,067 | py | Python | ipython_config.py | aws-samples/amazon-sagemaker-groundtruth-and-amazon-comprehend-ner-examples | ce15d76bc5550eab0e81606b3886e7635d594430 | [
"MIT-0"
] | 2 | 2020-09-22T16:49:02.000Z | 2020-10-29T08:43:35.000Z | ipython_config.py | aws-samples/amazon-sagemaker-groundtruth-and-amazon-comprehend-ner-examples | ce15d76bc5550eab0e81606b3886e7635d594430 | [
"MIT-0"
] | null | null | null | ipython_config.py | aws-samples/amazon-sagemaker-groundtruth-and-amazon-comprehend-ner-examples | ce15d76bc5550eab0e81606b3886e7635d594430 | [
"MIT-0"
] | 1 | 2020-09-02T14:07:33.000Z | 2020-09-02T14:07:33.000Z | import os
import subprocess
####################################################################################################
# Additional PYTHONPATH to allow notebooks to import custom modules at a few pre-defined places.
_cwd = os.getcwd()
_line = 'sys.path.append("{}")'
_pythonpath = [
"import sys, os",
... | 35.566667 | 114 | 0.525773 | import os
import subprocess
####################################################################################################
# Additional PYTHONPATH to allow notebooks to import custom modules at a few pre-defined places.
_cwd = os.getcwd()
_line = 'sys.path.append("{}")'
_pythonpath = [
"import sys, os",
... | 0 | 0 | 0 |
b407c2f1bab07f13e3d63109f63dceb0506e96cc | 1,155 | py | Python | scripts/logger_server.py | martmists-gh/BDSP | d6326c5d3ad9697ea65269ed47aa0b63abac2a0a | [
"MIT"
] | 1 | 2022-01-15T20:20:27.000Z | 2022-01-15T20:20:27.000Z | scripts/logger_server.py | martmists-gh/BDSP | d6326c5d3ad9697ea65269ed47aa0b63abac2a0a | [
"MIT"
] | null | null | null | scripts/logger_server.py | martmists-gh/BDSP | d6326c5d3ad9697ea65269ed47aa0b63abac2a0a | [
"MIT"
] | null | null | null | import asyncio
import logging
import sys
logging.basicConfig(format="{message}",
style='{',
datefmt="%H:%M:%S",
level=logging.DEBUG)
if __name__ == "__main__":
asyncio.run(main(*sys.argv[1:]))
| 26.860465 | 98 | 0.575758 | import asyncio
import logging
import sys
logging.basicConfig(format="{message}",
style='{',
datefmt="%H:%M:%S",
level=logging.DEBUG)
async def handle_connection(reader, writer):
addr = writer.get_extra_info('peername')[0]
logging.debug(f"[{addr}] C... | 847 | 0 | 46 |