hexsha stringlengths 40 40 | size int64 6 1.04M | ext stringclasses 10
values | lang stringclasses 1
value | max_stars_repo_path stringlengths 4 247 | max_stars_repo_name stringlengths 4 130 | max_stars_repo_head_hexsha stringlengths 40 78 | max_stars_repo_licenses listlengths 1 10 | max_stars_count int64 1 368k ⌀ | max_stars_repo_stars_event_min_datetime stringlengths 24 24 ⌀ | max_stars_repo_stars_event_max_datetime stringlengths 24 24 ⌀ | max_issues_repo_path stringlengths 4 247 | max_issues_repo_name stringlengths 4 130 | max_issues_repo_head_hexsha stringlengths 40 78 | max_issues_repo_licenses listlengths 1 10 | max_issues_count int64 1 116k ⌀ | max_issues_repo_issues_event_min_datetime stringlengths 24 24 ⌀ | max_issues_repo_issues_event_max_datetime stringlengths 24 24 ⌀ | max_forks_repo_path stringlengths 4 247 | max_forks_repo_name stringlengths 4 130 | max_forks_repo_head_hexsha stringlengths 40 78 | max_forks_repo_licenses listlengths 1 10 | max_forks_count int64 1 105k ⌀ | max_forks_repo_forks_event_min_datetime stringlengths 24 24 ⌀ | max_forks_repo_forks_event_max_datetime stringlengths 24 24 ⌀ | content stringlengths 1 1.04M | avg_line_length float64 1.53 618k | max_line_length int64 1 1.02M | alphanum_fraction float64 0 1 | original_content stringlengths 6 1.04M | filtered:remove_non_ascii int64 0 538k | filtered:remove_decorators int64 0 917k | filtered:remove_async int64 0 722k | filtered:remove_classes int64 -45 1M | filtered:remove_generators int64 0 814k | filtered:remove_function_no_docstring int64 -102 850k | filtered:remove_class_no_docstring int64 -3 5.46k | filtered:remove_unused_imports int64 -1,350 52.4k | filtered:remove_delete_markers int64 0 59.6k |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
7acfc08fadc93b69b6501043db89181dfb9a03ea | 22,541 | py | Python | LLC_Membranes/setup/solvation_equilibration.py | shirtsgroup/LLC_Membranes | e94694f298909352d7e9d912625314a1e46aa5b6 | [
"MIT"
] | 4 | 2019-06-18T15:26:49.000Z | 2021-08-11T18:57:39.000Z | LLC_Membranes/setup/solvation_equilibration.py | shirtsgroup/LLC_Membranes | e94694f298909352d7e9d912625314a1e46aa5b6 | [
"MIT"
] | 2 | 2019-08-22T20:11:46.000Z | 2019-08-22T22:35:17.000Z | LLC_Membranes/setup/solvation_equilibration.py | shirtsgroup/LLC_Membranes | e94694f298909352d7e9d912625314a1e46aa5b6 | [
"MIT"
] | 4 | 2019-07-06T15:41:53.000Z | 2021-01-27T17:59:13.000Z | #!/usr/bin/env python
import os
if __name__ == "__main__":
os.environ["GMX_MAXBACKUP"] = "-1" # stop GROMACS from making backups
args = initialize().parse_args()
sys = System(args.build_monomer, args.weight_percent, args.ratio, solute='HOH', nopores=args.nopores,
ncolumns=args.ncolu... | 50.540359 | 121 | 0.626458 | #!/usr/bin/env python
import argparse
import subprocess
import sqlite3 as sql
from LLC_Membranes.llclib import topology, file_rw
from LLC_Membranes.analysis import solute_partitioning
from LLC_Membranes.setup import lc_class, equil, solvate_tails
import mdtraj as md
import numpy as np
import os
def initialize():
... | 0 | 0 | 0 | 16,260 | 0 | 4,514 | 0 | 88 | 223 |
46c897109e481f3c93beaf9b400390c02e0a8b97 | 739 | py | Python | python/Interval-List-Intersections/two_pointers.py | yutong-xie/Leetcode-with-python | 6578f288a757bf76213030b73ec3319a7baa2661 | [
"MIT"
] | null | null | null | python/Interval-List-Intersections/two_pointers.py | yutong-xie/Leetcode-with-python | 6578f288a757bf76213030b73ec3319a7baa2661 | [
"MIT"
] | null | null | null | python/Interval-List-Intersections/two_pointers.py | yutong-xie/Leetcode-with-python | 6578f288a757bf76213030b73ec3319a7baa2661 | [
"MIT"
] | null | null | null | #!/usr/bin/env python
# -*- coding: utf-8 -*-
'''
Copyright 2020, Yutong Xie, UIUC.
Using Two Pointers to find the interval intersection.
'''
| 21.114286 | 57 | 0.419486 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
'''
Copyright 2020, Yutong Xie, UIUC.
Using Two Pointers to find the interval intersection.
'''
class Solution(object):
def intervalIntersection(self, A, B):
"""
:type A: List[List[int]]
:type B: List[List[int]]
:rtype: List[Li... | 0 | 0 | 0 | 564 | 0 | 0 | 0 | 0 | 23 |
e26c1de61513b9dd04386c2769fcd9c9212d69dd | 19,754 | py | Python | src/plugin.py | saitho/galaxy_blizzard_plugin | 9716c44e9db261d85baddc019d3f9e5eb1f28cf7 | [
"MIT"
] | null | null | null | src/plugin.py | saitho/galaxy_blizzard_plugin | 9716c44e9db261d85baddc019d3f9e5eb1f28cf7 | [
"MIT"
] | null | null | null | src/plugin.py | saitho/galaxy_blizzard_plugin | 9716c44e9db261d85baddc019d3f9e5eb1f28cf7 | [
"MIT"
] | null | null | null | import requests
if __name__ == "__main__":
main()
| 42.665227 | 136 | 0.621849 | import asyncio
import json
import os
import sys
import multiprocessing
import webbrowser
import requests
import requests.cookies
import logging as log
import subprocess
import time
from galaxy.api.consts import LocalGameState, Platform
from galaxy.api.plugin import Plugin, create_and_run_plugin
from galaxy.api.types ... | 0 | 0 | 15,033 | 3,615 | 0 | 75 | 0 | 418 | 554 |
4377c782264c94cece405287180a0c40430af740 | 2,055 | py | Python | delta/layers/ops/kernels/synthfiltbank_op_test.py | headhunterChris/delta | a916e06f55213dcd1fea39a5950927dfed1483c7 | [
"Apache-2.0"
] | 1 | 2021-01-11T13:25:19.000Z | 2021-01-11T13:25:19.000Z | delta/layers/ops/kernels/synthfiltbank_op_test.py | lhhriver/delta | a916e06f55213dcd1fea39a5950927dfed1483c7 | [
"Apache-2.0"
] | null | null | null | delta/layers/ops/kernels/synthfiltbank_op_test.py | lhhriver/delta | a916e06f55213dcd1fea39a5950927dfed1483c7 | [
"Apache-2.0"
] | null | null | null | # Copyright (C) 2017 Beijing Didi Infinity Technology and Development Co.,Ltd.
# 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/LI... | 31.136364 | 80 | 0.655961 | # Copyright (C) 2017 Beijing Didi Infinity Technology and Development Co.,Ltd.
# 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/LI... | 0 | 0 | 0 | 1,010 | 0 | 0 | 0 | 25 | 113 |
419729da0eec2d3259b159ccea87b89282cddc66 | 267 | py | Python | request_to_pay/userapi/urls.py | alex-kozin/request-to-pay | 30cb5526eff0c35b9e6508d45832fd00d93d403c | [
"MIT"
] | 1 | 2020-05-07T23:39:41.000Z | 2020-05-07T23:39:41.000Z | request_to_pay/userapi/urls.py | Mystery3051/request-to-pay | 30cb5526eff0c35b9e6508d45832fd00d93d403c | [
"MIT"
] | null | null | null | request_to_pay/userapi/urls.py | Mystery3051/request-to-pay | 30cb5526eff0c35b9e6508d45832fd00d93d403c | [
"MIT"
] | 1 | 2020-03-09T04:12:45.000Z | 2020-03-09T04:12:45.000Z | from django.urls import path
from . import api_views
urlpatterns = [
path('users/', api_views.UserList.as_view()),
path('users/<int:id>/', api_views.UserRetrieveUpdate.as_view()),
]
| 26.7 | 68 | 0.745318 | from django.urls import path
from rest_framework.authtoken import views as drf_views
from . import views
from . import api_views
urlpatterns = [
path('users/', api_views.UserList.as_view()),
path('users/<int:id>/', api_views.UserRetrieveUpdate.as_view()),
]
| 0 | 0 | 0 | 0 | 0 | 0 | 0 | 32 | 44 |
ef2fe4cbb2c804d35ac7b2dfc28c686831c8090d | 2,059 | py | Python | pastepwn/analyzers/tests/googleapikeyanalyzer_test.py | palaparthi/pastepwn | 62b8b4e0100a55aa0db6f3441a272770e9b9d23b | [
"MIT"
] | null | null | null | pastepwn/analyzers/tests/googleapikeyanalyzer_test.py | palaparthi/pastepwn | 62b8b4e0100a55aa0db6f3441a272770e9b9d23b | [
"MIT"
] | null | null | null | pastepwn/analyzers/tests/googleapikeyanalyzer_test.py | palaparthi/pastepwn | 62b8b4e0100a55aa0db6f3441a272770e9b9d23b | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
import unittest
if __name__ == '__main__':
unittest.main()
| 33.209677 | 76 | 0.687227 | # -*- coding: utf-8 -*-
import unittest
from unittest import mock
from pastepwn.analyzers.googleapikeyanalyzer import GoogleApiKeyAnalyzer
class TestGoogleApiKeyAnalyzer(unittest.TestCase):
def setUp(self):
self.analyzer = GoogleApiKeyAnalyzer(None)
self.paste = mock.Mock()
def test_match_p... | 0 | 0 | 0 | 1,847 | 0 | 0 | 0 | 55 | 68 |
530ce985f0f9a000385d2e117083af25e10d22fd | 122 | py | Python | learning_logs/admin.py | kevinbowen777/learning_log | ec81918ae92d4859591f840274dd88a37afa4998 | [
"MIT"
] | null | null | null | learning_logs/admin.py | kevinbowen777/learning_log | ec81918ae92d4859591f840274dd88a37afa4998 | [
"MIT"
] | null | null | null | learning_logs/admin.py | kevinbowen777/learning_log | ec81918ae92d4859591f840274dd88a37afa4998 | [
"MIT"
] | null | null | null | from django.contrib import admin
from .models import Entry, Topic
admin.site.register(Topic)
admin.site.register(Entry)
| 17.428571 | 32 | 0.803279 | from django.contrib import admin
from .models import Entry, Topic
admin.site.register(Topic)
admin.site.register(Entry)
| 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
0de32e1f3cb80e4c22764e4a88bea375a2cf3b59 | 1,009 | py | Python | matterbabble/images.py | DeclanHoare/matterbabble | cbca58faa26e9df09eabf0f6730ad241c74d0ae9 | [
"Apache-2.0"
] | 11 | 2019-03-02T22:45:44.000Z | 2021-07-09T14:46:02.000Z | matterbabble/images.py | DeclanHoare/matterbabble | cbca58faa26e9df09eabf0f6730ad241c74d0ae9 | [
"Apache-2.0"
] | 3 | 2019-09-18T20:00:57.000Z | 2020-12-17T21:12:18.000Z | matterbabble/images.py | DeclanHoare/matterbabble | cbca58faa26e9df09eabf0f6730ad241c74d0ae9 | [
"Apache-2.0"
] | null | null | null | # uploads.py - Discourse only sends the real addresses of some embedded
# images in the 'cooked' HTML. This module helps to extract them from
# there and turn them into real links in the Markdown.
| 28.828571 | 76 | 0.718533 | # uploads.py - Discourse only sends the real addresses of some embedded
# images in the 'cooked' HTML. This module helps to extract them from
# there and turn them into real links in the Markdown.
import html.parser
import io
import commonmark
import commonmark_extensions.plaintext
class html_image_ripper(html.pars... | 0 | 0 | 0 | 227 | 0 | 449 | 0 | -2 | 136 |
ba6b7797b88ddb185bff4fc2a5b1692f0c59ef03 | 190 | py | Python | pksampler/prof.py | patrickkidd/pksampler-0.3 | ffe5f1fde1d86052da34d9ee9c44934461c441e2 | [
"MIT"
] | null | null | null | pksampler/prof.py | patrickkidd/pksampler-0.3 | ffe5f1fde1d86052da34d9ee9c44934461c441e2 | [
"MIT"
] | null | null | null | pksampler/prof.py | patrickkidd/pksampler-0.3 | ffe5f1fde1d86052da34d9ee9c44934461c441e2 | [
"MIT"
] | null | null | null | #!/bin/env python
import profile
from pstats import Stats
s = profile.run('main()', 'pksampler.profile')
Stats('pksampler.profile').sort_stats('calls').print_stats()
| 21.111111 | 60 | 0.747368 | #!/bin/env python
import profile
from pstats import Stats
from Main import main
s = profile.run('main()', 'pksampler.profile')
Stats('pksampler.profile').sort_stats('calls').print_stats()
| 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 22 |
d4655db5fcec6fbc5e892216a03ce89b59c68c73 | 303 | py | Python | test/test_tokenizer.py | zhupengjia/nlptools | a0afc4873ee1b3adb383d38075ad5ae5e0293055 | [
"MIT"
] | 1 | 2020-10-26T02:32:25.000Z | 2020-10-26T02:32:25.000Z | test/test_tokenizer.py | zhupengjia/nlptools | a0afc4873ee1b3adb383d38075ad5ae5e0293055 | [
"MIT"
] | null | null | null | test/test_tokenizer.py | zhupengjia/nlptools | a0afc4873ee1b3adb383d38075ad5ae5e0293055 | [
"MIT"
] | 1 | 2020-10-26T02:34:05.000Z | 2020-10-26T02:34:05.000Z | #!/usr/bin/env python3
from nlptools.text.tokenizer import Tokenizer_BERT
s = Tokenizer_BERT(bert_model_name='/home/pzhu/.pytorch_pretrained_bert/bert-base-uncased')
txt = 'Who was Jim Henson ? Jim Henson was a puppeteer'
print(s.seg(txt))
print(s.vocab)
| 23.307692 | 91 | 0.782178 | #!/usr/bin/env python3
from nlptools.text.tokenizer import Tokenizer_BERT
from nlptools.utils import zload
import sys
s = Tokenizer_BERT(bert_model_name='/home/pzhu/.pytorch_pretrained_bert/bert-base-uncased')
txt = 'Who was Jim Henson ? Jim Henson was a puppeteer'
print(s.seg(txt))
print(s.vocab)
| 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 44 |
b3faaa0d7ca9f9489c2a9ef4da2ab108da3ff7ac | 1,165 | py | Python | pyfibot/modules/available/module_urlsafety.py | aapa/pyfibot | a8a4330d060b05f0ce63cbcfc6915afb8141955f | [
"BSD-3-Clause"
] | null | null | null | pyfibot/modules/available/module_urlsafety.py | aapa/pyfibot | a8a4330d060b05f0ce63cbcfc6915afb8141955f | [
"BSD-3-Clause"
] | null | null | null | pyfibot/modules/available/module_urlsafety.py | aapa/pyfibot | a8a4330d060b05f0ce63cbcfc6915afb8141955f | [
"BSD-3-Clause"
] | null | null | null | from __future__ import unicode_literals, print_function, division
| 37.580645 | 93 | 0.611159 | from __future__ import unicode_literals, print_function, division
import requests
from datetime import datetime
from bs4 import BeautifulSoup
import re
def handle_url(bot, user, channel, url, msg):
s = requests.Session()
s.get('http://www.unmaskparasites.com/token/')
dt = datetime.utcnow()
dt_str = '%... | 0 | 0 | 0 | 0 | 0 | 989 | 0 | -2 | 111 |
07b2ac58471b95575cdf5f1ec218e92687d496dc | 5,429 | py | Python | kivymd/stackfloatingbuttons.py | Bitmessage/KivyMD | 035ddf62208be143f35f82d5228a292eb083c757 | [
"MIT"
] | 1 | 2020-03-31T21:33:15.000Z | 2020-03-31T21:33:15.000Z | kivymd/stackfloatingbuttons.py | Bitmessage/KivyMD | 035ddf62208be143f35f82d5228a292eb083c757 | [
"MIT"
] | null | null | null | kivymd/stackfloatingbuttons.py | Bitmessage/KivyMD | 035ddf62208be143f35f82d5228a292eb083c757 | [
"MIT"
] | 1 | 2020-07-12T03:03:08.000Z | 2020-07-12T03:03:08.000Z | # -*- coding: utf-8 -*-
"""
Stack Floating Buttons
======================
Copyright 2010-2018 HeaTTheatR
For suggestions and questions:
<kivydevelopment@gmail.com>
This file is distributed under the terms of the same license,
as the Kivy framework.
Example
-------
from kivy.app import App
from kivy.lang import B... | 26.876238 | 78 | 0.638055 | # -*- coding: utf-8 -*-
"""
Stack Floating Buttons
======================
Copyright © 2010-2018 HeaTTheatR
For suggestions and questions:
<kivydevelopment@gmail.com>
This file is distributed under the terms of the same license,
as the Kivy framework.
Example
-------
from kivy.app import App
from kivy.lang import ... | 2 | 0 | 0 | 1,712 | 0 | 0 | 0 | 119 | 180 |
07ac001b79bc7e3de70e03db5d82008ecdb963cf | 4,450 | py | Python | src/main/python/apache/aurora/client/api/instance_watcher.py | jeremyvdw/aurora | fa9d83a7ef3a96c522884089a471bbb0bef74c48 | [
"Apache-2.0"
] | 479 | 2015-03-27T22:59:49.000Z | 2022-03-09T08:40:49.000Z | src/main/python/apache/aurora/client/api/instance_watcher.py | jeremyvdw/aurora | fa9d83a7ef3a96c522884089a471bbb0bef74c48 | [
"Apache-2.0"
] | 69 | 2015-05-26T20:06:29.000Z | 2020-01-13T19:18:59.000Z | src/main/python/apache/aurora/client/api/instance_watcher.py | jeremyvdw/aurora | fa9d83a7ef3a96c522884089a471bbb0bef74c48 | [
"Apache-2.0"
] | 226 | 2015-03-27T20:02:59.000Z | 2022-03-09T08:40:53.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
# distributed under ... | 35.887097 | 100 | 0.702472 | #
# 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
# distributed under ... | 0 | 0 | 0 | 3,632 | 0 | 0 | 0 | 86 | 182 |
d4e10b56dfc10e33e596ebc0f85e97ca8ab2b554 | 9,044 | py | Python | hydrushelper.py | rousvit/velky_rybnik | c6f4b9273baf7fb0e634e938bd4cbef94073009f | [
"MIT"
] | null | null | null | hydrushelper.py | rousvit/velky_rybnik | c6f4b9273baf7fb0e634e938bd4cbef94073009f | [
"MIT"
] | null | null | null | hydrushelper.py | rousvit/velky_rybnik | c6f4b9273baf7fb0e634e938bd4cbef94073009f | [
"MIT"
] | 1 | 2020-08-07T15:34:03.000Z | 2020-08-07T15:34:03.000Z | """
Hydrus helper is module containing various functions for working with Hydrus
output files and processing them in Jupyter Notebooks
For now the functions are:
- copy_output():
It will copy the selected files from temporary working directory of a
Hydrus project to a Hydrus/project_name subdirectory.... | 33.372694 | 79 | 0.525321 | """
Hydrus helper is module containing various functions for working with Hydrus
output files and processing them in Jupyter Notebooks
For now the functions are:
- copy_output():
It will copy the selected files from temporary working directory of a
Hydrus project to a Hydrus/project_name subdirectory.... | 0 | 0 | 0 | 0 | 0 | 0 | 0 | -11 | 46 |
e7e86c8ef5cb6885489c37dea948c68b596a961e | 969 | py | Python | iahr/commands/chat/chat.py | B1Z0N/iahr | 0f198a47406726c08018afb17f13ff8c31244eff | [
"MIT"
] | 8 | 2020-07-10T08:09:21.000Z | 2021-06-01T23:47:29.000Z | iahr/commands/chat/chat.py | B1Z0N/iahr | 0f198a47406726c08018afb17f13ff8c31244eff | [
"MIT"
] | 1 | 2022-03-12T00:40:59.000Z | 2022-03-12T00:40:59.000Z | iahr/commands/chat/chat.py | B1Z0N/iahr | 0f198a47406726c08018afb17f13ff8c31244eff | [
"MIT"
] | null | null | null |
##################################################
# Routines themselves
##################################################
| 34.607143 | 75 | 0.585139 | from telethon import events
from iahr.reg import TextSender, VoidSender, MultiArgs, any_send
from iahr.config import IahrConfig
from iahr.utils import AccessList, EventService
from .utils import mention, local, CHAT_TAG
##################################################
# Routines themselves
########################... | 0 | 598 | 0 | 0 | 0 | 0 | 0 | 110 | 135 |
94791b784d3c42061301b27e1c8fbf6772fe6f5c | 4,410 | py | Python | vmm/ext/postconf.py | kmohrf/vmm | 5e0dc8c9502d07681bfaca8634ed5b083deae77b | [
"BSD-3-Clause"
] | 4 | 2020-03-08T08:45:35.000Z | 2021-10-17T11:05:17.000Z | vmm/ext/postconf.py | kmohrf/vmm | 5e0dc8c9502d07681bfaca8634ed5b083deae77b | [
"BSD-3-Clause"
] | null | null | null | vmm/ext/postconf.py | kmohrf/vmm | 5e0dc8c9502d07681bfaca8634ed5b083deae77b | [
"BSD-3-Clause"
] | null | null | null | # -*- coding: UTF-8 -*-
# Copyright (c) 2008 - 2014, Pascal Volk
# See COPYING for distribution information.
"""
vmm.ext.postconf
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Wrapper class for Postfix's postconf.
Postconf instances can be used to read actual values of configuration
parameters or edit the value ... | 33.157895 | 78 | 0.592971 | # -*- coding: UTF-8 -*-
# Copyright (c) 2008 - 2014, Pascal Volk
# See COPYING for distribution information.
"""
vmm.ext.postconf
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Wrapper class for Postfix's postconf.
Postconf instances can be used to read actual values of configuration
parameters or edit the value ... | 0 | 0 | 0 | 3,809 | 0 | 0 | 0 | 36 | 135 |
b66c0b88e0def2798a3fd1381205daae2963cfa4 | 11,174 | py | Python | journal_paper/sys_id_arx_jan.py | Eramismus/CommunityDRSims | 63d2fc77a53ea17800834f8000013616d7eab9c9 | [
"MIT"
] | 5 | 2019-10-24T12:49:22.000Z | 2022-01-06T10:50:16.000Z | journal_paper/sys_id_arx_jan.py | Eramismus/CommunityDRSims | 63d2fc77a53ea17800834f8000013616d7eab9c9 | [
"MIT"
] | 1 | 2021-05-18T10:25:54.000Z | 2021-05-18T10:26:52.000Z | journal_paper/sys_id_arx_jan.py | Eramismus/CommunityDRSims | 63d2fc77a53ea17800834f8000013616d7eab9c9 | [
"MIT"
] | 4 | 2018-11-16T08:41:34.000Z | 2021-11-01T12:39:30.000Z | """ Sixth version, make the code easier and more modifiable """
# Define the main programme
from funcs import store_namespace
from funcs import load_namespace
from funcs import emulate_jmod
import os
import datetime
import pandas as pd
#from multiprocessing import Pool
from sklearn.metrics import mean_squared_error, r... | 40.050179 | 168 | 0.553786 | """ Sixth version, make the code easier and more modifiable """
# Define the main programme
from funcs import store_namespace
from funcs import load_namespace
from funcs import emulate_jmod
import os
import datetime
import time
import pandas as pd
import numpy as np
import matplotlib.pyplot as plt
#from multiprocessin... | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 111 | 244 |
d965f57e81d16ba37cdd89e8f34eab2538372a01 | 1,006 | py | Python | src/chains/migrations/0001_initial.py | tharsis/safe-config-service | 5335fd006d05fba5b13b477daca9f6ef6d64b818 | [
"MIT"
] | 8 | 2021-07-27T13:21:27.000Z | 2022-02-12T22:46:26.000Z | src/chains/migrations/0001_initial.py | tharsis/safe-config-service | 5335fd006d05fba5b13b477daca9f6ef6d64b818 | [
"MIT"
] | 203 | 2021-04-28T08:23:29.000Z | 2022-03-29T15:50:27.000Z | src/chains/migrations/0001_initial.py | tharsis/safe-config-service | 5335fd006d05fba5b13b477daca9f6ef6d64b818 | [
"MIT"
] | 23 | 2021-06-25T07:22:31.000Z | 2022-03-29T02:24:46.000Z | # Generated by Django 3.2.3 on 2021-06-02 14:44
| 31.4375 | 86 | 0.535785 | # Generated by Django 3.2.3 on 2021-06-02 14:44
from typing import List, Tuple
from django.db import migrations, models
class Migration(migrations.Migration):
initial = True
dependencies: List[Tuple[str, str]] = []
operations = [
migrations.CreateModel(
name="Chain",
fi... | 0 | 0 | 0 | 861 | 0 | 0 | 0 | 28 | 68 |
b25958053b88bd12e08c6de8d2b4247d1ac2d567 | 9,224 | py | Python | ask-smapi-model/ask_smapi_model/v1/skill/manifest/skill_manifest_publishing_information.py | Signal-Kinetics/alexa-apis-for-python | abb8d3dce18a5510c48b215406ed36c024f01495 | [
"Apache-2.0"
] | null | null | null | ask-smapi-model/ask_smapi_model/v1/skill/manifest/skill_manifest_publishing_information.py | Signal-Kinetics/alexa-apis-for-python | abb8d3dce18a5510c48b215406ed36c024f01495 | [
"Apache-2.0"
] | null | null | null | ask-smapi-model/ask_smapi_model/v1/skill/manifest/skill_manifest_publishing_information.py | Signal-Kinetics/alexa-apis-for-python | abb8d3dce18a5510c48b215406ed36c024f01495 | [
"Apache-2.0"
] | null | null | null | # coding: utf-8
#
# Copyright 2019 Amazon.com, Inc. or its affiliates. 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. A copy of the License is located at
#
# http://aws.amazon.com/apache2.0/
#
# or in the "lice... | 54.579882 | 431 | 0.714983 | # coding: utf-8
#
# Copyright 2019 Amazon.com, Inc. or its affiliates. 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. A copy of the License is located at
#
# http://aws.amazon.com/apache2.0/
#
# or in the "lice... | 0 | 0 | 0 | 7,998 | 0 | 0 | 0 | 324 | 282 |
eeffbf129aecabf37617744f43a2c93210836eb0 | 6,882 | py | Python | xquantum/qiskit/qiskit.py | caccio/CrossQuantumClassifier | eede8a2d46220d9a9f2fbe8977abd98801c11d5a | [
"Apache-2.0"
] | null | null | null | xquantum/qiskit/qiskit.py | caccio/CrossQuantumClassifier | eede8a2d46220d9a9f2fbe8977abd98801c11d5a | [
"Apache-2.0"
] | null | null | null | xquantum/qiskit/qiskit.py | caccio/CrossQuantumClassifier | eede8a2d46220d9a9f2fbe8977abd98801c11d5a | [
"Apache-2.0"
] | null | null | null |
# https://algassert.com/quirk#circuit={%22cols%22:[[1,{%22id%22:%22Ryft%22,%22arg%22:%221.982313%22}],[],[{%22id%22:%22Ryft%22,%22arg%22:%221.714144%22},%22%E2%80%A2%22],[],[{%22id%22:%22Ryft%22,%22arg%22:%221.910633%22},%22%E2%97%A6%22],[],[%22Amps2%22],[],[1,1,%22H%22],[%22%E2%80%A2%22,%22X%22,%22%E2%80%A2%22],[{%22... | 68.138614 | 1,126 | 0.684685 | import xquantum as xq
import math
from qiskit.circuit.library.standard_gates import RYGate
from qiskit import QuantumCircuit, execute, Aer, IBMQ
def getQiskitBackend(engine):
if 'providerGroup' in engine.config.keys():
if engine.config['providerGroup'] == 'open' and engine.config['providerProject'] == 'mai... | 0 | 0 | 0 | 0 | 0 | 4,865 | 0 | 57 | 316 |
995f8ac5d23b650899de03512a6648e3a140ecd8 | 644 | py | Python | Webapp/bot/ChangeJS.py | Agulaa/Brovie_test | 1a3de8d370cdfd73108ddbbe99a4130027f86e7f | [
"MIT"
] | 2 | 2018-05-15T19:45:56.000Z | 2019-09-18T11:34:05.000Z | Webapp/bot/ChangeJS.py | Agulaa/Brovie_test | 1a3de8d370cdfd73108ddbbe99a4130027f86e7f | [
"MIT"
] | null | null | null | Webapp/bot/ChangeJS.py | Agulaa/Brovie_test | 1a3de8d370cdfd73108ddbbe99a4130027f86e7f | [
"MIT"
] | 3 | 2018-05-15T19:46:05.000Z | 2021-04-28T20:14:57.000Z |
# change = Change()
# jso = {
#
# "respond": "Bye"
# }
# result = change.respond(jso)
# print(result)
| 18.941176 | 66 | 0.582298 | from bot.Bot import Bot
from bot.api_ai import find_respond
import json
class Change(object):
def __init__(self):
self.Bot = Bot()
def respond(self, jso):
js = json.loads(jso)
action, film, respond = find_respond(js['respond'])
if action == 'film':
result = self.... | 0 | 0 | 0 | 440 | 0 | 0 | 0 | 6 | 89 |
cafa0355b3e04304900b30d3d763236c9d27dfea | 1,447 | py | Python | WideDTA/train_w.py | Sunitach10/MolPro | 7e550b8a73103cff34fdf976a19722e967b08ab2 | [
"MIT"
] | 4 | 2019-09-10T09:53:01.000Z | 2021-04-01T10:54:11.000Z | WideDTA/train_w.py | Sunitach10/MolPro | 7e550b8a73103cff34fdf976a19722e967b08ab2 | [
"MIT"
] | 1 | 2021-03-13T18:08:43.000Z | 2021-03-13T18:08:43.000Z | WideDTA/train_w.py | Sunitach10/MolPro | 7e550b8a73103cff34fdf976a19722e967b08ab2 | [
"MIT"
] | 1 | 2020-09-24T06:08:54.000Z | 2020-09-24T06:08:54.000Z | from data_w import widedata
from model_w import WideCNN
#datset=widedata(ligand_path, protein_path,keys,motif_path,affinity_path)
dataset = widedata(ligand_path, protein_path,keys,motif_path,affinity_path)
train_loader, test_loader = load_splitset(dataset, .2)
modelw=WideCNN()
trainwide=train_w(modelw,train_l... | 23.721311 | 76 | 0.563234 | import data_w
from data_w import widedata
from data_w import*
import model_w
from model_w import*
from model_w import WideCNN
#datset=widedata(ligand_path, protein_path,keys,motif_path,affinity_path)
dataset = widedata(ligand_path, protein_path,keys,motif_path,affinity_path)
train_loader, test_loader = load... | 0 | 0 | 0 | 163 | 0 | 708 | 0 | -18 | 142 |
5f01b33d377458285c562958fdab8080b868ffa2 | 973 | py | Python | example/example.py | pbvarga1/example-pytest-bdd-qt | 985a0f90bc2723711c74821d778b766a79ecbe83 | [
"MIT"
] | null | null | null | example/example.py | pbvarga1/example-pytest-bdd-qt | 985a0f90bc2723711c74821d778b766a79ecbe83 | [
"MIT"
] | null | null | null | example/example.py | pbvarga1/example-pytest-bdd-qt | 985a0f90bc2723711c74821d778b766a79ecbe83 | [
"MIT"
] | null | null | null | import sys
# from qtpy import QtWidgets, QtCore
from PyQt5 import QtWidgets
if __name__ == "__main__":
app = QtWidgets.QApplication(sys.argv)
ex = ExampleWindow()
ex.show()
sys.exit(app.exec_())
| 27.027778 | 52 | 0.633094 | from itertools import cycle
import sys
# from qtpy import QtWidgets, QtCore
from PyQt5 import QtWidgets, QtCore
class ExampleWindow(QtWidgets.QMainWindow):
def __init__(self, *args, **kwargs):
super().__init__(*args, **kwargs)
self._central_widget = QtWidgets.QWidget()
self._words = cycl... | 0 | 0 | 0 | 695 | 0 | 0 | 0 | 14 | 45 |
ed71ff4de8c59ae554116c478eac57cdf5539922 | 2,628 | py | Python | IPython/nbconvert/filters/tests/test_highlight.py | chebee7i/ipython | 85b169fa3afc3d374973295c7f1409ededddbaca | [
"BSD-3-Clause-Clear"
] | 2 | 2015-02-10T18:00:31.000Z | 2015-05-01T02:53:46.000Z | IPython/nbconvert/filters/tests/test_highlight.py | chebee7i/ipython | 85b169fa3afc3d374973295c7f1409ededddbaca | [
"BSD-3-Clause-Clear"
] | null | null | null | IPython/nbconvert/filters/tests/test_highlight.py | chebee7i/ipython | 85b169fa3afc3d374973295c7f1409ededddbaca | [
"BSD-3-Clause-Clear"
] | 1 | 2021-05-22T13:52:12.000Z | 2021-05-22T13:52:12.000Z | """
Module with tests for Highlight
"""
#-----------------------------------------------------------------------------
# Copyright (c) 2013, the IPython Development Team.
#
# Distributed under the terms of the Modified BSD License.
#
# The full license is in the file COPYING.txt, distributed with this software.
#-----... | 29.52809 | 79 | 0.497717 | """
Module with tests for Highlight
"""
#-----------------------------------------------------------------------------
# Copyright (c) 2013, the IPython Development Team.
#
# Distributed under the terms of the Modified BSD License.
#
# The full license is in the file COPYING.txt, distributed with this software.
#-----... | 0 | 0 | 0 | 1,566 | 0 | 0 | 0 | 3 | 68 |
d98bef884724a2bb1c2ec7e92ad1c1b1590c4e7d | 1,165 | py | Python | figpptx/win32com_misc.py | Sillte/figpptx | bf5539b09eeef4e6a17bb4483f62f29d286138b2 | [
"MIT"
] | null | null | null | figpptx/win32com_misc.py | Sillte/figpptx | bf5539b09eeef4e6a17bb4483f62f29d286138b2 | [
"MIT"
] | null | null | null | figpptx/win32com_misc.py | Sillte/figpptx | bf5539b09eeef4e6a17bb4483f62f29d286138b2 | [
"MIT"
] | null | null | null | """Here, I'd like to gather utility function / classes related to `pywin32com`.
Notice that this library is not library, but recipes for reading codes of `pywin32com`.
"""
# print(__gen_path__) # In this folder, the generated object resides.
def assure_generation():
"""We would like to `generated` pywin32 P... | 32.361111 | 89 | 0.678112 | """Here, I'd like to gather utility function / classes related to `pywin32com`.
Notice that this library is not library, but recipes for reading codes of `pywin32com`.
"""
from win32com.client import DispatchEx, CDispatch
from win32com.client.selecttlb import EnumTlbs
from win32com.client.makepy import GenerateFro... | 0 | 0 | 0 | 0 | 0 | 507 | 0 | 102 | 141 |
322cde676c50164bb63a1effd28fc6734a881e28 | 469 | py | Python | ui_show.py | Amplil/Image_Genetic_algorithm | dbf3c5610df257fe2ae851cf1fb871c6027eb594 | [
"Apache-2.0"
] | 24 | 2021-04-05T13:44:29.000Z | 2022-02-15T11:04:31.000Z | ui_show.py | Amplil/Image_Genetic_algorithm | dbf3c5610df257fe2ae851cf1fb871c6027eb594 | [
"Apache-2.0"
] | 1 | 2022-01-19T01:26:48.000Z | 2022-01-19T01:26:48.000Z | ui_show.py | Amplil/Image_Genetic_algorithm | dbf3c5610df257fe2ae851cf1fb871c6027eb594 | [
"Apache-2.0"
] | 1 | 2022-01-20T08:15:54.000Z | 2022-01-20T08:15:54.000Z | from selenium import webdriver
from time import sleep
import os
options = webdriver.ChromeOptions()
options.add_experimental_option("excludeSwitches", ['enable-automation'])
# Chrome
driver = webdriver.Chrome(r'chromedriver.exe', chrome_options=options) # chromedriver.exe
# URL
print('file:///{}/tmp.png'.... | 27.588235 | 93 | 0.720682 | from selenium import webdriver
from time import sleep
import os
options = webdriver.ChromeOptions()
options.add_experimental_option("excludeSwitches", ['enable-automation'])
# プラウザ起動(Chrome)
driver = webdriver.Chrome(r'chromedriver.exe', chrome_options=options) # chromedriver.exeを使う
# リストからURLをひとつづつ処理
pri... | 72 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
bd877e5952285f3ac1c5fc1b2383d1e022163a73 | 9,349 | py | Python | gcode-runner.py | hgroover/smoothie-gcode | 17afa5d7f48c9470ca71dc7f8b1842083df72627 | [
"MIT"
] | null | null | null | gcode-runner.py | hgroover/smoothie-gcode | 17afa5d7f48c9470ca71dc7f8b1842083df72627 | [
"MIT"
] | null | null | null | gcode-runner.py | hgroover/smoothie-gcode | 17afa5d7f48c9470ca71dc7f8b1842083df72627 | [
"MIT"
] | null | null | null | # gcode runner
import sys
import socket
import time
ADDR="192.168.1.18"
PORT=23
LAST_SENT=""
# Should be ok, error, etc.
LAST_RESPONSE=""
# Optional [Caution: Unlocked] in response to $X
LAST_RESPONSE_MSG=""
# Global values set by get_status()
STATUS=""
MPOS=[0.0, 0.0, 0.0]
WPOS=[0.0, 0.0, 0.0]
FEEDS=[0.0, 0.0]
TIMEO... | 33.996364 | 172 | 0.597925 | # gcode runner
import io, sys
import socket
import time
import re
import argparse
ADDR="192.168.1.18"
PORT=23
LAST_SENT=""
# Should be ok, error, etc.
LAST_RESPONSE=""
# Optional [Caution: Unlocked] in response to $X
LAST_RESPONSE_MSG=""
# Global values set by get_status()
STATUS=""
MPOS=[0.0, 0.0, 0.0]
WPOS=[0.0, 0.... | 0 | 0 | 0 | 0 | 0 | 3,002 | 0 | -14 | 111 |
2af8f5241b6f0258789c577a88e64485638d253e | 294 | py | Python | zhangqi/20180328/h4.py | python20180319howmework/homework | c826d7aa4c52f8d22f739feb134d20f0b2c217cd | [
"Apache-2.0"
] | null | null | null | zhangqi/20180328/h4.py | python20180319howmework/homework | c826d7aa4c52f8d22f739feb134d20f0b2c217cd | [
"Apache-2.0"
] | null | null | null | zhangqi/20180328/h4.py | python20180319howmework/homework | c826d7aa4c52f8d22f739feb134d20f0b2c217cd | [
"Apache-2.0"
] | null | null | null | #4. :
# 1) ,3, 5
# 2) 3 + 33 + 333 + 3333 + 33333(5)
a, b = eval(input(""))
print(sum1(a, b))
| 10.5 | 49 | 0.578231 | #4. 定义一个函数,完成以下功能:
# 1) 输入两个整型数,例如输入的是3, 5
# 2) 此函数要计算的是3 + 33 + 333 + 3333 + 33333(到5个为止)
def sum1(m, n):
sumnum = 0
for i in range(1,n+1):
sumnum = sumnum + int(str(m)*i)
return sumnum
print("结果是{}".format(sumnum))
a, b = eval(input("请输入两个整型数"))
print(sum1(a, b))
| 147 | 0 | 0 | 0 | 0 | 109 | 0 | 0 | 23 |
7ae39ed6e0121a015b6be97a129e1fdb8ea0c637 | 1,882 | py | Python | urlcatcher/bot_plugin.py | kiwiheretic/logos-v2 | 22739221a6d431322c809b7e17aba54f37eb9617 | [
"Apache-2.0"
] | 4 | 2015-02-20T08:11:59.000Z | 2019-05-15T23:48:11.000Z | urlcatcher/bot_plugin.py | kiwiheretic/logos-v2 | 22739221a6d431322c809b7e17aba54f37eb9617 | [
"Apache-2.0"
] | 58 | 2015-01-11T02:10:09.000Z | 2022-03-20T01:20:15.000Z | urlcatcher/bot_plugin.py | kiwiheretic/logos-v2 | 22739221a6d431322c809b7e17aba54f37eb9617 | [
"Apache-2.0"
] | 1 | 2016-06-15T00:49:44.000Z | 2016-06-15T00:49:44.000Z | # test plugin
import logging
from logos.settings import LOGGING
logger = logging.getLogger(__name__)
logging.config.dictConfig(LOGGING)
| 33.017544 | 117 | 0.566419 | # test plugin
from bot.pluginDespatch import Plugin
import re
import datetime
import logging
from models import CapturedUrls
from logos.settings import LOGGING
logger = logging.getLogger(__name__)
logging.config.dictConfig(LOGGING)
class UrlCatcherPlugin(Plugin):
plugin = ("url_catcher", "Url Catcher Module")
... | 0 | 0 | 0 | 1,574 | 0 | 0 | 0 | 8 | 111 |
424f4e27ebed3a8fc74e05408caaaa98bec9923f | 9,244 | py | Python | Ensembl.dat-to-topGO.db.py | evodify/calls-files-manipulations | ba861fbc052e6a13b34fe744fb47cb229572b7ef | [
"MIT"
] | 8 | 2018-01-31T09:55:30.000Z | 2021-12-17T04:49:53.000Z | Ensembl.dat-to-topGO.db.py | evodify/calls-files-manipulations | ba861fbc052e6a13b34fe744fb47cb229572b7ef | [
"MIT"
] | 3 | 2021-12-08T16:38:53.000Z | 2021-12-17T08:36:22.000Z | Ensembl.dat-to-topGO.db.py | evodify/calls-files-manipulations | ba861fbc052e6a13b34fe744fb47cb229572b7ef | [
"MIT"
] | 2 | 2020-05-22T08:24:11.000Z | 2020-06-04T13:24:11.000Z | #! /usr/bin/env python2
'''
This script converts the Ensembl.dat file to the GO reference file used in the topGO R program.
#Example input:
ID 1 standard; DNA; HTG; 122678785 BP.
XX
AC chromosome:CanFam3.1:1:1:122678785:1
XX
SV 1.CanFam3.1
XX
DT 4-SEP-2018
XX
DE Canis lupus familiaris chromosome 1 CanFam... | 43.810427 | 137 | 0.594331 | #! /usr/bin/env python2
'''
This script converts the Ensembl.dat file to the GO reference file used in the topGO R program.
#Example input:
ID 1 standard; DNA; HTG; 122678785 BP.
XX
AC chromosome:CanFam3.1:1:1:122678785:1
XX
SV 1.CanFam3.1
XX
DT 4-SEP-2018
XX
DE Canis lupus familiaris chromosome 1 CanFam... | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
9866d3e5988ebcb70269f110e95af9cf52aaa3e1 | 4,800 | py | Python | fuel_plugin/testing/tests/unit/base.py | dnikishov/fuel-ostf | 4dcd99cc4bfa19f52d4b87ed321eb84ff03844da | [
"Apache-2.0"
] | null | null | null | fuel_plugin/testing/tests/unit/base.py | dnikishov/fuel-ostf | 4dcd99cc4bfa19f52d4b87ed321eb84ff03844da | [
"Apache-2.0"
] | null | null | null | fuel_plugin/testing/tests/unit/base.py | dnikishov/fuel-ostf | 4dcd99cc4bfa19f52d4b87ed321eb84ff03844da | [
"Apache-2.0"
] | null | null | null | # Copyright 2013 Mirantis, Inc.
#
# 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 ... | 35.820896 | 78 | 0.632917 | # Copyright 2013 Mirantis, Inc.
#
# 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 ... | 0 | 2,490 | 0 | 1,277 | 0 | 0 | 0 | 166 | 201 |
5938c7cf6b91510f77334e09942060690083290c | 1,876 | py | Python | sstcam_sandbox/d191003_compress/check_pedestal_tcal.py | watsonjj/CHECLabPySB | 91330d3a6f510a392f635bd7f4abd2f77871322c | [
"BSD-3-Clause"
] | null | null | null | sstcam_sandbox/d191003_compress/check_pedestal_tcal.py | watsonjj/CHECLabPySB | 91330d3a6f510a392f635bd7f4abd2f77871322c | [
"BSD-3-Clause"
] | null | null | null | sstcam_sandbox/d191003_compress/check_pedestal_tcal.py | watsonjj/CHECLabPySB | 91330d3a6f510a392f635bd7f4abd2f77871322c | [
"BSD-3-Clause"
] | 1 | 2021-03-30T09:46:56.000Z | 2021-03-30T09:46:56.000Z |
if __name__ == '__main__':
main()
| 31.266667 | 80 | 0.692964 | from CHECLabPy.core.io import TIOReader
from TargetCalibSB.pedestal import PedestalTargetCalib
import fitsio
from tqdm import tqdm
from matplotlib import pyplot as plt
import numpy as np
def main():
r0_path = "/Users/Jason/Downloads/tempdata/Pedestal_23deg_r0.tio"
r1_int_path = "/Users/Jason/Downloads/tempdat... | 0 | 0 | 0 | 0 | 0 | 1,625 | 0 | 55 | 155 |
67a94b4b3f1dac14bbe7faad1d2c29e676a6739b | 3,213 | py | Python | yuki/avito/src/oof_elasticnet.py | RandLive/Avito-Demand-Prediction-Challenge | eb2955c6cb799907071d8bbf7b31b73b163c604f | [
"MIT"
] | null | null | null | yuki/avito/src/oof_elasticnet.py | RandLive/Avito-Demand-Prediction-Challenge | eb2955c6cb799907071d8bbf7b31b73b163c604f | [
"MIT"
] | null | null | null | yuki/avito/src/oof_elasticnet.py | RandLive/Avito-Demand-Prediction-Challenge | eb2955c6cb799907071d8bbf7b31b73b163c604f | [
"MIT"
] | null | null | null | import pandas as pd
import numpy as np
from scipy.sparse import csr_matrix
from sklearn.preprocessing import StandardScaler
X, X_test, _ = read_train_test_data()
# drop label encoding
lbl_cols = [col for col in X.columns if "_labelencod" in col]
X.drop(lbl_cols, axis=1, inplace=True)
X_test.drop(lbl_cols, axis=1, inp... | 33.123711 | 95 | 0.729225 | import pandas as pd
import numpy as np
import xgboost as xgb
import lightgbm as lgb
import pyarrow as pa
import pyarrow.parquet as pq
from sklearn.model_selection import train_test_split
import argparse
from scipy.special import erfinv
from scipy.sparse import csr_matrix
from sklearn.preprocessing import StandardScaler... | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 41 | 176 |
aac94c469cb1b80c80c88bda8fea8c141c4875cb | 42 | py | Python | notebooks/_solutions/case-argo-sea-floats6.py | jorisvandenbossche/DS-python-geospatial | 893a12edc5c203a75815f6dcb5f1e18c577c8cd5 | [
"BSD-3-Clause"
] | 58 | 2020-10-09T10:10:59.000Z | 2022-03-07T14:58:07.000Z | notebooks/_solutions/13-xarray6.py | amitkb3/DS-python-geospatial | 5f156ebff67e06d59b2a7ef446d1fed746ce0650 | [
"BSD-3-Clause"
] | 24 | 2020-09-30T19:57:14.000Z | 2021-10-05T07:21:09.000Z | notebooks/_solutions/13-xarray6.py | amitkb3/DS-python-geospatial | 5f156ebff67e06d59b2a7ef446d1fed746ce0650 | [
"BSD-3-Clause"
] | 19 | 2020-10-05T09:32:18.000Z | 2022-03-20T00:09:14.000Z | argo["salinity"].sel(level=10).plot.line() | 42 | 42 | 0.714286 | argo["salinity"].sel(level=10).plot.line() | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
85422467599040ba9797e0b437b58fb79132e2a8 | 1,243 | py | Python | answers/question4.py | Yamahitsuji/Gasyori100knock | 62b3f776124c25dfb36e45a647d573b36b45d2b1 | [
"MIT"
] | null | null | null | answers/question4.py | Yamahitsuji/Gasyori100knock | 62b3f776124c25dfb36e45a647d573b36b45d2b1 | [
"MIT"
] | null | null | null | answers/question4.py | Yamahitsuji/Gasyori100knock | 62b3f776124c25dfb36e45a647d573b36b45d2b1 | [
"MIT"
] | null | null | null | import matplotlib.pyplot as plt
from skimage import io
import cv2
# https://qiita.com/haru1843/items/00de955790d3a22a217b
img = io.imread("./dataset/images/imori_256x256.png")
gray_img = cv2.cvtColor(img, cv2.COLOR_RGB2GRAY)
th = getThreshold(gray_img)
binary_img = gray2binary(gray_img, th)
plt.figure(figsize=(12... | 23.45283 | 60 | 0.612228 | import numpy as np
import matplotlib.pyplot as plt
from skimage import io
import cv2
# 参考記事:https://qiita.com/haru1843/items/00de955790d3a22a217b
def getThreshold(img):
max_variance = 0
max_th = 0
for th in range(1, 254):
# thを閾値としたクラス1,2の画素配列
c0 = img[img <= th]
c1 = img[img > th]... | 78 | 0 | 0 | 0 | 0 | 610 | 0 | -3 | 67 |
631c1c55253f5587db7e1f0120050b0460363810 | 1,806 | py | Python | training/linear_regression.py | vanshc98/CE4032 | c57c0f84254484c4fcc91ae817c9d650d26ec64b | [
"CNRI-Python"
] | null | null | null | training/linear_regression.py | vanshc98/CE4032 | c57c0f84254484c4fcc91ae817c9d650d26ec64b | [
"CNRI-Python"
] | 7 | 2019-11-14T15:06:11.000Z | 2022-02-10T01:27:41.000Z | training/linear_regression.py | vanshc98/CE4032 | c57c0f84254484c4fcc91ae817c9d650d26ec64b | [
"CNRI-Python"
] | null | null | null | import os
import time
import numpy as np
import pandas as pd
from sklearn.linear_model import LinearRegression
import sys
sys.path.append('..')
DATA_DIR = '../datasets'
for filename in ['modified_train.csv']:
print('reading training data from %s ...' % filename)
df = pd.read_csv(os.path.join(DATA_D... | 35.411765 | 148 | 0.637874 | import os
import time
import numpy as np
import pandas as pd
from sklearn.linear_model import LinearRegression
from sklearn.model_selection import cross_val_score
import sys
sys.path.append('..')
from utils import calHarDist
DATA_DIR = '../datasets'
for filename in ['modified_train.csv']:
print('readin... | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 37 | 44 |
5563251a885ab49a498ca1cf6b5ef95de6493110 | 1,213 | py | Python | Rec_Server/personalize_predict.py | mishidemudong/deep_recommendation | 6100cfd4037b45b167227ed76acbc536500bc119 | [
"Apache-2.0"
] | null | null | null | Rec_Server/personalize_predict.py | mishidemudong/deep_recommendation | 6100cfd4037b45b167227ed76acbc536500bc119 | [
"Apache-2.0"
] | null | null | null | Rec_Server/personalize_predict.py | mishidemudong/deep_recommendation | 6100cfd4037b45b167227ed76acbc536500bc119 | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
Created on Tue Jun 15 14:01:24 2021
@author: liang
"""
'''
AWS personalize model
''' | 26.955556 | 131 | 0.600989 | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
Created on Tue Jun 15 14:01:24 2021
@author: liang
"""
'''
AWS personalize model
'''
import boto3
import json
import os
class PersonalizePredictHandler():
"""
"""
def __init__(self, config_path):
if os.path.exists(config_path):
self.... | 0 | 0 | 0 | 1,018 | 0 | 0 | 0 | -31 | 89 |
f6bcca11ddf785c31107de65837bbb705eae7a8a | 1,461 | py | Python | security_monkey/alerters/custom_alerter.py | boladmin/security_monkey | c28592ffd518fa399527d26262683fc860c30eef | [
"Apache-2.0"
] | 4,258 | 2015-01-04T22:06:10.000Z | 2022-03-31T23:40:27.000Z | security_monkey/alerters/custom_alerter.py | boladmin/security_monkey | c28592ffd518fa399527d26262683fc860c30eef | [
"Apache-2.0"
] | 1,013 | 2015-01-12T02:31:03.000Z | 2021-09-16T19:09:03.000Z | security_monkey/alerters/custom_alerter.py | boladmin/security_monkey | c28592ffd518fa399527d26262683fc860c30eef | [
"Apache-2.0"
] | 965 | 2015-01-11T21:06:07.000Z | 2022-03-17T16:53:57.000Z | # Copyright 2016 Bridgewater Associates
#
# 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 appli... | 31.76087 | 105 | 0.715948 | # Copyright 2016 Bridgewater Associates
#
# 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 appli... | 0 | 0 | 0 | 263 | 0 | 280 | 0 | 10 | 91 |
3b387205d9aa446a4fbbf921b448e8f29def0a5d | 68 | py | Python | yhirose_cloudmesh_ex1.py | futuresystems/465-yujinhirose | 75e7400282af2a34141480c34501c4aecd3a8ac6 | [
"Apache-2.0"
] | null | null | null | yhirose_cloudmesh_ex1.py | futuresystems/465-yujinhirose | 75e7400282af2a34141480c34501c4aecd3a8ac6 | [
"Apache-2.0"
] | null | null | null | yhirose_cloudmesh_ex1.py | futuresystems/465-yujinhirose | 75e7400282af2a34141480c34501c4aecd3a8ac6 | [
"Apache-2.0"
] | null | null | null | import cloudmesh
cloudmesh.shell("help")
print cloudmesh.version()
| 13.6 | 25 | 0.794118 | import cloudmesh
cloudmesh.shell("help")
print cloudmesh.version()
| 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
c44f47bb27e67ba7814900202569dea6d29752f4 | 25,790 | py | Python | pysnmp/Juniper-IKE-MIB.py | agustinhenze/mibs.snmplabs.com | 1fc5c07860542b89212f4c8ab807057d9a9206c7 | [
"Apache-2.0"
] | 11 | 2021-02-02T16:27:16.000Z | 2021-08-31T06:22:49.000Z | pysnmp/Juniper-IKE-MIB.py | agustinhenze/mibs.snmplabs.com | 1fc5c07860542b89212f4c8ab807057d9a9206c7 | [
"Apache-2.0"
] | 75 | 2021-02-24T17:30:31.000Z | 2021-12-08T00:01:18.000Z | pysnmp/Juniper-IKE-MIB.py | agustinhenze/mibs.snmplabs.com | 1fc5c07860542b89212f4c8ab807057d9a9206c7 | [
"Apache-2.0"
] | 10 | 2019-04-30T05:51:36.000Z | 2022-02-16T03:33:41.000Z | #
# PySNMP MIB module Juniper-IKE-MIB (http://snmplabs.com/pysmi)
# ASN.1 source file:///Users/davwang4/Dev/mibs.snmplabs.com/asn1/Juniper-IKE-MIB
# Produced by pysmi-0.3.4 at Mon Apr 29 19:52:12 2019
# On host DAVWANG4-M-1475 platform Darwin version 18.5.0 by user davwang4
# Using Python version 3.7.3 (default, Mar 27... | 123.397129 | 3,980 | 0.762815 | #
# PySNMP MIB module Juniper-IKE-MIB (http://snmplabs.com/pysmi)
# ASN.1 source file:///Users/davwang4/Dev/mibs.snmplabs.com/asn1/Juniper-IKE-MIB
# Produced by pysmi-0.3.4 at Mon Apr 29 19:52:12 2019
# On host DAVWANG4-M-1475 platform Darwin version 18.5.0 by user davwang4
# Using Python version 3.7.3 (default, Mar 27... | 0 | 0 | 0 | 2,332 | 0 | 0 | 0 | 0 | 183 |
05afe74a9edff3bb79d4147c7b62c775c037193f | 2,034 | py | Python | Wrapping/Python/Testing/Create_Quad_Geometry.py | mhitzem/SIMPL | cd8a58f8d955d232ea039121cc5286cc9545c7a6 | [
"NRL"
] | 3 | 2018-01-18T18:27:02.000Z | 2021-06-13T06:10:52.000Z | Wrapping/Python/Testing/Create_Quad_Geometry.py | mhitzem/SIMPL | cd8a58f8d955d232ea039121cc5286cc9545c7a6 | [
"NRL"
] | 211 | 2016-07-27T12:18:16.000Z | 2021-11-02T13:42:11.000Z | Wrapping/Python/Testing/Create_Quad_Geometry.py | mhitzem/SIMPL | cd8a58f8d955d232ea039121cc5286cc9545c7a6 | [
"NRL"
] | 23 | 2016-02-15T21:23:47.000Z | 2021-08-11T15:35:24.000Z | # Based on CreateQuadGeometry example
if __name__ == '__main__':
CreateQuadGeometryTest()
| 47.302326 | 196 | 0.748279 | # Based on CreateQuadGeometry example
import simpl
import simplpy as d3d
import simpl_helpers as sh
import simpl_test_dirs as sd
def CreateQuadGeometryTest():
# Create Data Container Array
dca = simpl.DataContainerArray()
# Create the Data Container
err = d3d.create_data_container(dca, 'DataContainer')
ass... | 0 | 0 | 0 | 0 | 0 | 1,826 | 0 | 3 | 112 |
577a1fe1ddbd642935fc1a15b38681f3628284de | 439 | py | Python | pdf_enlarge.py | meklenbpo/pdf_enlarge | 412cef12e479560ddf28a987acfc0094a8ec41e7 | [
"MIT"
] | null | null | null | pdf_enlarge.py | meklenbpo/pdf_enlarge | 412cef12e479560ddf28a987acfc0094a8ec41e7 | [
"MIT"
] | 2 | 2021-01-13T10:02:51.000Z | 2021-01-13T10:03:05.000Z | pdf_enlarge.py | meklenbpo/pdf_enlarge | 412cef12e479560ddf28a987acfc0094a8ec41e7 | [
"MIT"
] | null | null | null | """
PDF Enlarge
===========
Scale the contents of a PDF document 2x.
- Split each page into two parts along the perpendicular axis (e.g. one
A4 page into two A5 pages).
- Scale each split part 2 times (e.g. A5 -> A4)
- Merge scaled parts into a new PDF document.
"""
import sys
def main() -> int:
"""Console s... | 18.291667 | 71 | 0.644647 | """
PDF Enlarge
===========
Scale the contents of a PDF document 2x.
- Split each page into two parts along the perpendicular axis (e.g. one
A4 page into two A5 pages).
- Scale each split part 2 times (e.g. A5 -> A4)
- Merge scaled parts into a new PDF document.
"""
import sys
def main() -> int:
"""Console s... | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
f76bf215b059f317c9ad61f90d151ac3137850cc | 3,349 | py | Python | txstatsd/server/protocol.py | drawks/txstatsd | da674d7a86e0e5ec40eaa53fe81310ef19d1ed9e | [
"MIT"
] | null | null | null | txstatsd/server/protocol.py | drawks/txstatsd | da674d7a86e0e5ec40eaa53fe81310ef19d1ed9e | [
"MIT"
] | 1 | 2020-07-10T23:35:49.000Z | 2020-07-10T23:35:49.000Z | txstatsd/server/protocol.py | drawks/txstatsd | da674d7a86e0e5ec40eaa53fe81310ef19d1ed9e | [
"MIT"
] | 1 | 2020-07-13T05:31:58.000Z | 2020-07-13T05:31:58.000Z | # Copyright (C) 2011-2012 Canonical Services Ltd
#
# 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, merge, ... | 38.94186 | 78 | 0.707973 | # Copyright (C) 2011-2012 Canonical Services Ltd
#
# 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, merge, ... | 0 | 0 | 0 | 2,048 | 0 | 0 | 0 | 76 | 114 |
17c615cbc1defe72246e6cb25c6b08f1f512c901 | 4,641 | py | Python | acq4/analysis/modules/Photostim/ScatterPlotter.py | pbmanis/acq4-2019 | 2a7d66eb4f1258d2dbdce27637d8a66de518c312 | [
"MIT"
] | null | null | null | acq4/analysis/modules/Photostim/ScatterPlotter.py | pbmanis/acq4-2019 | 2a7d66eb4f1258d2dbdce27637d8a66de518c312 | [
"MIT"
] | null | null | null | acq4/analysis/modules/Photostim/ScatterPlotter.py | pbmanis/acq4-2019 | 2a7d66eb4f1258d2dbdce27637d8a66de518c312 | [
"MIT"
] | null | null | null | from __future__ import print_function
# -*- coding: utf-8 -*-
#import acq4.pyqtgraph.TreeWidget as TreeWidget
import acq4.util.debug as debug
| 35.427481 | 188 | 0.579401 | from __future__ import print_function
# -*- coding: utf-8 -*-
from six.moves import range
from acq4.util import Qt
import acq4.pyqtgraph as pg
#import acq4.pyqtgraph.TreeWidget as TreeWidget
import acq4.util.flowchart.EventDetection as FCEventDetection
import acq4.util.debug as debug
class ScatterPlotter(Qt.QSplitte... | 0 | 0 | 0 | 4,331 | 0 | 0 | 0 | 55 | 113 |
cb0e788d33dbe9e1c1e90d718f368e794a35e6be | 1,156 | py | Python | quizzes/migrations/0005_auto_20150813_0645.py | ikedumancas/ikequizgen | 86cb4c183ef927be063eb9ad0e7855a0c23ba0d2 | [
"MIT"
] | null | null | null | quizzes/migrations/0005_auto_20150813_0645.py | ikedumancas/ikequizgen | 86cb4c183ef927be063eb9ad0e7855a0c23ba0d2 | [
"MIT"
] | null | null | null | quizzes/migrations/0005_auto_20150813_0645.py | ikedumancas/ikequizgen | 86cb4c183ef927be063eb9ad0e7855a0c23ba0d2 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
| 27.52381 | 107 | 0.547578 | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import models, migrations
class Migration(migrations.Migration):
dependencies = [
('quizzes', '0004_auto_20150811_1354'),
]
operations = [
migrations.AlterModelOptions(
name='choice',
... | 0 | 0 | 0 | 1,026 | 0 | 0 | 0 | 19 | 46 |
c54f76638dceb534a31b87621c4b854ace380526 | 1,695 | py | Python | lib/surface/apigee/deployments/__init__.py | google-cloud-sdk-unofficial/google-cloud-sdk | 2a48a04df14be46c8745050f98768e30474a1aac | [
"Apache-2.0"
] | 2 | 2019-11-10T09:17:07.000Z | 2019-12-18T13:44:08.000Z | lib/surface/apigee/deployments/__init__.py | google-cloud-sdk-unofficial/google-cloud-sdk | 2a48a04df14be46c8745050f98768e30474a1aac | [
"Apache-2.0"
] | null | null | null | lib/surface/apigee/deployments/__init__.py | google-cloud-sdk-unofficial/google-cloud-sdk | 2a48a04df14be46c8745050f98768e30474a1aac | [
"Apache-2.0"
] | 1 | 2020-07-25T01:40:19.000Z | 2020-07-25T01:40:19.000Z | # -*- coding: utf-8 -*- # Lint as: python3
# Copyright 2020 Google Inc. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
... | 33.9 | 89 | 0.698525 | # -*- coding: utf-8 -*- # Lint as: python3
# Copyright 2020 Google Inc. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
... | 0 | 0 | 0 | 822 | 0 | 0 | 0 | 19 | 46 |
ba212c198138bfba78a51a27c08670c39088122e | 498 | py | Python | src/pygcode_modules/regular_polygon.py | kazetkazet/cnc | 8e207a71616a9a13bac57df85631714235589891 | [
"MIT"
] | null | null | null | src/pygcode_modules/regular_polygon.py | kazetkazet/cnc | 8e207a71616a9a13bac57df85631714235589891 | [
"MIT"
] | null | null | null | src/pygcode_modules/regular_polygon.py | kazetkazet/cnc | 8e207a71616a9a13bac57df85631714235589891 | [
"MIT"
] | null | null | null | import math
def code(radius: int = 15, num_sides: int = 7) -> str:
"""
Example G-code module, regular polygon.
Please simulate first, before milling.
"""
result = ["G90"]
for i in range(num_sides):
x = radius - radius * math.cos(2 * math.pi * i / num_sides)
y = radius * math.... | 22.636364 | 67 | 0.53012 | import math
def code(radius: int = 15, num_sides: int = 7) -> str:
"""
Example G-code module, regular polygon.
Please simulate first, before milling.
"""
result = ["G90"]
for i in range(num_sides):
x = radius - radius * math.cos(2 * math.pi * i / num_sides)
y = radius * math.... | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
eb046dcade542f39b272b58c7cd33de1809e7456 | 2,148 | py | Python | mihaelanistor/data/sihks.py | s-shailja/challenge-iclr-2021 | 28ad9d126597166bc41715f77c8cf366b8fba975 | [
"MIT"
] | 39 | 2021-03-12T07:30:14.000Z | 2022-03-24T06:37:02.000Z | mihaelanistor/data/sihks.py | s-shailja/challenge-iclr-2021 | 28ad9d126597166bc41715f77c8cf366b8fba975 | [
"MIT"
] | 34 | 2021-03-09T03:19:55.000Z | 2021-09-07T18:30:59.000Z | mihaelanistor/data/sihks.py | s-shailja/challenge-iclr-2021 | 28ad9d126597166bc41715f77c8cf366b8fba975 | [
"MIT"
] | 29 | 2021-03-13T21:21:14.000Z | 2022-02-02T05:52:44.000Z | import numpy as np
def make_point_clouds(vertices, temperature):
"""[summary]
Parameters
----------
vertices : ndarray of shape (n_vertices, 3)
Vertices of the mesh as 3D points.
temperature : ndarray of shape (n_vertices, n_functions)
A collection of functions defined on the ver... | 33.046154 | 125 | 0.633613 | import numpy as np
from scipy.io import loadmat
from scipy.fft import fft
def SIHKS(evecs, evals, t0=0.01, time_scale=15, alpha1=2, n_functions=17):
n_vertices = evecs.shape[0]
tau = np.linspace(start=0, stop=time_scale, num=int(time_scale/(1/16)+1))
t = t0 * alpha1 ** tau
hks = np.zeros((n_vertice... | 0 | 0 | 0 | 0 | 0 | 928 | 0 | 11 | 68 |
dbd4a11a4f56abf62c7b56880621f5da540c055c | 445 | py | Python | jsonargparse/__init__.py | carmocca/jsonargparse | dde80fb00f48e3a922001542c47f16c986df7fd2 | [
"MIT"
] | null | null | null | jsonargparse/__init__.py | carmocca/jsonargparse | dde80fb00f48e3a922001542c47f16c986df7fd2 | [
"MIT"
] | null | null | null | jsonargparse/__init__.py | carmocca/jsonargparse | dde80fb00f48e3a922001542c47f16c986df7fd2 | [
"MIT"
] | null | null | null |
__version__ = '3.19.2'
| 17.115385 | 25 | 0.692135 | from argparse import (
Action,
Namespace,
HelpFormatter,
OPTIONAL,
REMAINDER,
SUPPRESS,
PARSER,
ONE_OR_MORE,
ZERO_OR_MORE,
)
from .actions import *
from .cli import *
from .core import *
from .deprecated import *
from .formatters import *
from .jsonnet import *
from .jsonschema impor... | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 156 | 264 |
3bc7dca6af68bed2eb5dd91180da70f783fdec45 | 9,476 | py | Python | sprokit/tests/bindings/python/sprokit/pipeline/test-config.py | dstoup/kwiver | a3a36317b446baf0feb6274235ab1ac6b4329ead | [
"BSD-3-Clause"
] | 14 | 2015-05-02T17:06:34.000Z | 2019-06-20T10:10:20.000Z | sprokit/tests/bindings/python/sprokit/pipeline/test-config.py | dstoup/kwiver | a3a36317b446baf0feb6274235ab1ac6b4329ead | [
"BSD-3-Clause"
] | 3 | 2021-03-19T15:39:43.000Z | 2021-09-08T02:47:15.000Z | sprokit/tests/bindings/python/sprokit/pipeline/test-config.py | acidburn0zzz/kwiver | 6e4205f1c46df04759c57c040f01cc804b27e00d | [
"BSD-3-Clause"
] | 9 | 2015-08-19T04:48:16.000Z | 2021-02-15T14:28:06.000Z | #!@PYTHON_EXECUTABLE@
#ckwg +28
# Copyright 2011-2013 by Kitware, Inc.
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are met:
#
# * Redistributions of source code must retain the above copyright notice,... | 22.669856 | 85 | 0.657873 | #!@PYTHON_EXECUTABLE@
#ckwg +28
# Copyright 2011-2013 by Kitware, Inc.
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are met:
#
# * Redistributions of source code must retain the above copyright notice,... | 0 | 0 | 0 | 0 | 0 | 7,222 | 0 | 10 | 372 |
7171a7dd253f1b36af369cd08354fa4ed94e53f5 | 484 | py | Python | manage.py | lsloan/myla | f288ad3c77c3911f1831bf484a2ff275194e768b | [
"Apache-2.0"
] | 2 | 2019-01-28T17:56:45.000Z | 2019-10-23T17:35:54.000Z | manage.py | lsloan/myla | f288ad3c77c3911f1831bf484a2ff275194e768b | [
"Apache-2.0"
] | 1 | 2020-01-23T18:18:49.000Z | 2020-01-23T18:18:49.000Z | manage.py | lsloan/myla | f288ad3c77c3911f1831bf484a2ff275194e768b | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/env python
import os, sys, warnings, logging
logger = logging.getLogger(__name__)
if __name__ == "__main__":
os.environ.setdefault("DJANGO_SETTINGS_MODULE", "dashboard.settings")
from django.core.management import execute_from_command_line
# Regex for which modules to ignore warnings from
... | 28.470588 | 89 | 0.770661 | #!/usr/bin/env python
import os, sys, warnings, logging
logger = logging.getLogger(__name__)
if __name__ == "__main__":
os.environ.setdefault("DJANGO_SETTINGS_MODULE", "dashboard.settings")
from django.core.management import execute_from_command_line
# Regex for which modules to ignore warnings from
... | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
5a40381b43a7fa949e47343d5c7edae0bf2e3a78 | 2,017 | py | Python | code/layers.py | forest-snow/adan | 8e954f228c38191fccc06827f19b686aad34852d | [
"MIT"
] | 54 | 2018-07-17T04:16:28.000Z | 2022-02-10T04:25:22.000Z | code/layers.py | forest-snow/adan | 8e954f228c38191fccc06827f19b686aad34852d | [
"MIT"
] | 3 | 2019-01-02T02:15:13.000Z | 2020-10-09T22:49:35.000Z | code/layers.py | forest-snow/adan | 8e954f228c38191fccc06827f19b686aad34852d | [
"MIT"
] | 12 | 2018-10-23T18:43:37.000Z | 2022-01-22T07:30:44.000Z | import torch.nn.functional as functional
| 31.030769 | 102 | 0.622707 | import torch
from torch import autograd, nn
import torch.nn.functional as functional
import utils
class AveragingLayer(nn.Module):
def __init__(self, word_emb):
super(AveragingLayer, self).__init__()
self.word_emb = word_emb
def forward(self, input):
"""
input: (data, lengths)... | 0 | 0 | 0 | 1,837 | 0 | 0 | 0 | -9 | 136 |
40eb99acbc7e96a316af0c3e934f5b0ee1191eac | 499 | py | Python | manager/config.py | ofurman/feedbot | c88e86bb3cccd16393639b1868268aea0b4ca677 | [
"MIT"
] | null | null | null | manager/config.py | ofurman/feedbot | c88e86bb3cccd16393639b1868268aea0b4ca677 | [
"MIT"
] | null | null | null | manager/config.py | ofurman/feedbot | c88e86bb3cccd16393639b1868268aea0b4ca677 | [
"MIT"
] | null | null | null | import os
basedir = os.path.abspath(os.path.dirname(__file__)) | 35.642857 | 114 | 0.711423 | import os
basedir = os.path.abspath(os.path.dirname(__file__))
class Config(object):
POSTGRESQL_DATABASE_URI="postgresql://{POSTGRES_USER}:{POSTGRES_PASSWORD}@postgres:5432/{POSTGRES_DB}".format(
POSTGRES_USER=os.environ.get('POSTGRES_USER'),
POSTGRES_PASSWORD=os.environ.get('POSTGRES_PASSWORD'),
... | 0 | 0 | 0 | 414 | 0 | 0 | 0 | 0 | 23 |
b2a752fe495a2c7d923532741bb3916f84407372 | 418 | py | Python | jingtai/transformers/util.py | feihong/jingtai | 637ed42dcc20ed011ff93993fddc6d187b084c1d | [
"Apache-2.0"
] | null | null | null | jingtai/transformers/util.py | feihong/jingtai | 637ed42dcc20ed011ff93993fddc6d187b084c1d | [
"Apache-2.0"
] | null | null | null | jingtai/transformers/util.py | feihong/jingtai | 637ed42dcc20ed011ff93993fddc6d187b084c1d | [
"Apache-2.0"
] | null | null | null | import re
import yaml
def split_markup(markup):
"""
Given some markup, return a tuple containing the decoded data and the
template code.
"""
match = re.search(r'\n={3,}\n', markup)
if match:
start, end = match.span()
ctx = yaml.load(markup[:start])
template_code = mark... | 19.904762 | 73 | 0.590909 | import re
import yaml
def split_markup(markup):
"""
Given some markup, return a tuple containing the decoded data and the
template code.
"""
match = re.search(r'\n={3,}\n', markup)
if match:
start, end = match.span()
ctx = yaml.load(markup[:start])
template_code = mark... | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
35f4f70ace5b6bc3f2793839fc7d7f3801a7594a | 1,134 | py | Python | Filtro/search_by_id.py | jolivaresc/AyPIdeT-Proyecto-Sismo | f9ace8292e662f926f9f53007cf57b3b79b76fd7 | [
"MIT"
] | 1 | 2017-10-18T14:40:40.000Z | 2017-10-18T14:40:40.000Z | Filtro/search_by_id.py | jolivaresc/AyPIdeT-Proyecto-Sismo | f9ace8292e662f926f9f53007cf57b3b79b76fd7 | [
"MIT"
] | null | null | null | Filtro/search_by_id.py | jolivaresc/AyPIdeT-Proyecto-Sismo | f9ace8292e662f926f9f53007cf57b3b79b76fd7 | [
"MIT"
] | 1 | 2017-10-23T14:12:47.000Z | 2017-10-23T14:12:47.000Z | # CDIGO DE PRUEBA
#!/usr/bin/env python
# -*- coding: utf-8 -*-
from pymongo import MongoClient
from bson.objectid import ObjectId
from nltk.tokenize import TweetTokenizer
from datetime import datetime as dt
try:
client = MongoClient()
print("Connected to MongoDB\n")
except pymongo.errors.ConnectionFailure as e:
... | 30.648649 | 118 | 0.689594 | # CÓDIGO DE PRUEBA
#!/usr/bin/env python
# -*- coding: utf-8 -*-
from pymongo import MongoClient
from bson.objectid import ObjectId
from nltk.tokenize import TweetTokenizer
from datetime import datetime as dt
try:
client = MongoClient()
print("Connected to MongoDB\n")
except pymongo.errors.ConnectionFailure as e:
... | 4 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
b47435aa6518eae61a73ba675399b74e273ec70c | 2,822 | py | Python | Acquire/Accounting/_pairednote.py | openghg/acquire | 8af8701b092f7304c02fea1ee6360e53502dfd64 | [
"Apache-2.0"
] | 1 | 2021-10-18T17:11:47.000Z | 2021-10-18T17:11:47.000Z | Acquire/Accounting/_pairednote.py | openghg/acquire | 8af8701b092f7304c02fea1ee6360e53502dfd64 | [
"Apache-2.0"
] | null | null | null | Acquire/Accounting/_pairednote.py | openghg/acquire | 8af8701b092f7304c02fea1ee6360e53502dfd64 | [
"Apache-2.0"
] | null | null | null | __all__ = ["PairedNote"]
| 32.068182 | 108 | 0.601701 | __all__ = ["PairedNote"]
class PairedNote:
"""This class holds a DebitNote together with its matching
CreditNote(s)
"""
def __init__(self, debit_note, credit_note):
"""Construct from the matching pair of notes"""
from Acquire.Accounting import CreditNote as _CreditNote
from Ac... | 0 | 1,226 | 0 | 1,547 | 0 | 0 | 0 | 0 | 23 |
d0d41a9bfe70b530497ec5247845294a52a9f15d | 782 | py | Python | python project.py | 1-kane/Internship-Project | 72405d55713037c7882c4ed6511dc747f85bc1cb | [
"MIT"
] | null | null | null | python project.py | 1-kane/Internship-Project | 72405d55713037c7882c4ed6511dc747f85bc1cb | [
"MIT"
] | null | null | null | python project.py | 1-kane/Internship-Project | 72405d55713037c7882c4ed6511dc747f85bc1cb | [
"MIT"
] | null | null | null | ans = 'Y'
while((ans=='y')|(ans=='Y')):
input1 = input("Write a scentence")
lang = detect_language(input1)
print(input1+"\t Langauge: "+ lang)
ans = input("to do this again enter (y/Y)")
| 31.28 | 64 | 0.644501 | from nltk import *
from nltk.corpus import *
def lang_ratio(input):
lang_ratio={}
tokens = wordpunct_tokenize(input)
words = [word.lower() for word in tokens]
for language in stopwords.fileids():
stopwords_set = set(stopwords.words(language))
words_set = set(words)
com... | 0 | 0 | 0 | 0 | 0 | 475 | 0 | 1 | 97 |
1c79fccc7802262dd9cd397daf2da80899d6d7ea | 8,310 | py | Python | minibenchmarks/pyxl_bench.py | lameiro/pyston | 838e0ac98d5926ba942224951cd1e8bad5483b5e | [
"BSD-2-Clause",
"Apache-2.0"
] | null | null | null | minibenchmarks/pyxl_bench.py | lameiro/pyston | 838e0ac98d5926ba942224951cd1e8bad5483b5e | [
"BSD-2-Clause",
"Apache-2.0"
] | null | null | null | minibenchmarks/pyxl_bench.py | lameiro/pyston | 838e0ac98d5926ba942224951cd1e8bad5483b5e | [
"BSD-2-Clause",
"Apache-2.0"
] | null | null | null | import os
import sys
sys.path.append(os.path.join(os.path.dirname(__file__), "../test/integration/pyxl/"))
from pyxl.codec.register import pyxl_transform_string
for i in xrange(100):
# pyxl/tests/test_if_1.py
pyxl_transform_string(
'''
from pyxl import html
def test():
assert str(<frag><if cond="{True}"... | 36.130435 | 100 | 0.514561 | import os
import sys
sys.path.append(os.path.join(os.path.dirname(__file__), "../test/integration/pyxl/"))
from pyxl.codec.register import pyxl_transform_string
for i in xrange(100):
# pyxl/tests/test_if_1.py
pyxl_transform_string(
'''
from pyxl import html
def test():
assert str(<frag><if cond="{True}"... | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
18cb76eea749b02096a7baf7a16afb18bf50e409 | 695 | py | Python | chainerrl/env.py | takeratta/chainerrl | 51a2762246db2964fe97e596fd98a1a1cbfea19a | [
"MIT"
] | 4 | 2019-05-05T21:37:09.000Z | 2020-06-04T11:40:51.000Z | chainerrl/env.py | takeratta/chainerrl | 51a2762246db2964fe97e596fd98a1a1cbfea19a | [
"MIT"
] | 1 | 2018-05-29T06:38:22.000Z | 2018-05-29T06:38:22.000Z | chainerrl/env.py | takeratta/chainerrl | 51a2762246db2964fe97e596fd98a1a1cbfea19a | [
"MIT"
] | null | null | null | from __future__ import unicode_literals
from __future__ import print_function
from __future__ import division
from __future__ import absolute_import
from future import standard_library
standard_library.install_aliases()
| 23.166667 | 50 | 0.758273 | from __future__ import unicode_literals
from __future__ import print_function
from __future__ import division
from __future__ import absolute_import
from future import standard_library
from future.utils import with_metaclass
standard_library.install_aliases()
from abc import ABCMeta
from abc import abstractmethod
cl... | 0 | 160 | 0 | 195 | 0 | 0 | 0 | 29 | 90 |
9d82cea7f4206e305827c34264fa931545630061 | 6,392 | py | Python | download_bars2.py | rolangom/rx_ibapi_fetch | e1259fe1105ef7b152b3db25ea13c7232d0acdab | [
"MIT"
] | null | null | null | download_bars2.py | rolangom/rx_ibapi_fetch | e1259fe1105ef7b152b3db25ea13c7232d0acdab | [
"MIT"
] | null | null | null | download_bars2.py | rolangom/rx_ibapi_fetch | e1259fe1105ef7b152b3db25ea13c7232d0acdab | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
import os
import argparse
from typing import List, Optional
from datetime import datetime
from typing import List, Optional
from ibapi.common import BarData
from ibapi.contract import Contract
ContractList = List[Contract]
BarDataList = List[BarData]
OptionalDate = Optional[datetime]
def mak... | 32.779487 | 105 | 0.635638 | #!/usr/bin/env python3
import os
import sys
import argparse
import logging
from typing import List, Optional, Union, Dict, Tuple
from datetime import datetime, timedelta
from sqlalchemy import create_engine
import rx
import rx.operators as ops
from rx.subject import AsyncSubject, Subject, BehaviorSubject, ReplaySubje... | 0 | 1,754 | 0 | 2,332 | 0 | 782 | 0 | 164 | 403 |
a94311eed972e6d1cea65423c9ac00e2d6a91fc3 | 1,533 | py | Python | tweet.py | LineG/ADA_472_P2 | 5a72ed0ae0894f910e8d72e2bf7caf7fbe92a0f3 | [
"MIT"
] | null | null | null | tweet.py | LineG/ADA_472_P2 | 5a72ed0ae0894f910e8d72e2bf7caf7fbe92a0f3 | [
"MIT"
] | null | null | null | tweet.py | LineG/ADA_472_P2 | 5a72ed0ae0894f910e8d72e2bf7caf7fbe92a0f3 | [
"MIT"
] | null | null | null | # Line Ghanem 27280076
# Anthony Iatropoulos 40028246
# Mikael Samvelian 40003178
| 25.131148 | 64 | 0.500326 | # Line Ghanem 27280076
# Anthony Iatropoulos 40028246
# Mikael Samvelian 40003178
import re
class Tweet:
def __init__(self, tweet_id, user_name, language, text):
self.tweet_id = tweet_id
self.user_name = user_name
self.language = language
self.strip_text = ''
self.text = te... | 0 | 0 | 0 | 1,417 | 0 | 0 | 0 | -12 | 46 |
4dd5daf97104f73025eaad10909f2f63ea7c003d | 2,804 | py | Python | tests/test_policy_measures.py | davidpetra/covid19-sir | 3ee3e3c3fe35acfd90781d82c259a9d3a1cb5ac0 | [
"Apache-2.0"
] | null | null | null | tests/test_policy_measures.py | davidpetra/covid19-sir | 3ee3e3c3fe35acfd90781d82c259a9d3a1cb5ac0 | [
"Apache-2.0"
] | 100 | 2021-02-06T17:50:15.000Z | 2022-03-31T20:30:49.000Z | tests/test_policy_measures.py | ardhani31/Covid19-SIRV | 813bc66f668a3d2945dc97474ea1149bbc6e40c2 | [
"Apache-2.0"
] | 1 | 2021-09-22T14:27:02.000Z | 2021-09-22T14:27:02.000Z | #!/usr/bin/env python
# -*- coding: utf-8 -*-
| 38.944444 | 82 | 0.656205 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
import warnings
import pandas as pd
import pytest
from covsirphy import PolicyMeasures
from covsirphy import SIRF, Scenario
class UnTestPolicyMeasures(object):
# Skip this test at this time
def test_start(self, jhu_data, population_data, oxcgrt_data):
war... | 0 | 0 | 0 | 2,609 | 0 | 0 | 0 | 14 | 134 |
f85836d16da99b8333a921b39c91ccaab484bc93 | 263 | py | Python | DjangoNationalGeographic/Animal/admin.py | JGabriel-AbreuM/DjangoNationalGeograph | 0b095e61a1793d84f21b41bb3c4f77653e6ca19b | [
"MIT"
] | null | null | null | DjangoNationalGeographic/Animal/admin.py | JGabriel-AbreuM/DjangoNationalGeograph | 0b095e61a1793d84f21b41bb3c4f77653e6ca19b | [
"MIT"
] | null | null | null | DjangoNationalGeographic/Animal/admin.py | JGabriel-AbreuM/DjangoNationalGeograph | 0b095e61a1793d84f21b41bb3c4f77653e6ca19b | [
"MIT"
] | null | null | null | from django.contrib import admin
from .models import Animal, Raca, NomeCientifico, Origem, NomePopular
admin.site.register(Animal)
admin.site.register(Raca)
admin.site.register(Origem)
admin.site.register(NomeCientifico)
admin.site.register(NomePopular)
| 29.222222 | 70 | 0.802281 | from django.contrib import admin
from .models import Animal, Raca, NomeCientifico, Origem, NomePopular
admin.site.register(Animal)
admin.site.register(Raca)
admin.site.register(Origem)
admin.site.register(NomeCientifico)
admin.site.register(NomePopular)
| 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
d985847b11148b37ebd1f0e1449a7bb915bd77c4 | 92 | py | Python | parameters_80.py | brenosora/tortuguita | 1f954dc307e6ebac070dbe7e2d8fe8d02b3ddf23 | [
"BSD-3-Clause"
] | null | null | null | parameters_80.py | brenosora/tortuguita | 1f954dc307e6ebac070dbe7e2d8fe8d02b3ddf23 | [
"BSD-3-Clause"
] | null | null | null | parameters_80.py | brenosora/tortuguita | 1f954dc307e6ebac070dbe7e2d8fe8d02b3ddf23 | [
"BSD-3-Clause"
] | null | null | null | password="pbkdf2(1000,20,sha512)$a4e3c0f67fc691f5$70638e315cc3ad9d7aed2f01edba2f36a5cbe486"
| 46 | 91 | 0.891304 | password="pbkdf2(1000,20,sha512)$a4e3c0f67fc691f5$70638e315cc3ad9d7aed2f01edba2f36a5cbe486"
| 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
8d815f0166dca1d847bcc835a11ca2d6a8cc2e5b | 12,518 | py | Python | pysnmp-with-texts/Wellfleet-GRE-MIB.py | agustinhenze/mibs.snmplabs.com | 1fc5c07860542b89212f4c8ab807057d9a9206c7 | [
"Apache-2.0"
] | 8 | 2019-05-09T17:04:00.000Z | 2021-06-09T06:50:51.000Z | pysnmp-with-texts/Wellfleet-GRE-MIB.py | agustinhenze/mibs.snmplabs.com | 1fc5c07860542b89212f4c8ab807057d9a9206c7 | [
"Apache-2.0"
] | 4 | 2019-05-31T16:42:59.000Z | 2020-01-31T21:57:17.000Z | pysnmp-with-texts/Wellfleet-GRE-MIB.py | agustinhenze/mibs.snmplabs.com | 1fc5c07860542b89212f4c8ab807057d9a9206c7 | [
"Apache-2.0"
] | 10 | 2019-04-30T05:51:36.000Z | 2022-02-16T03:33:41.000Z | #
# PySNMP MIB module Wellfleet-GRE-MIB (http://snmplabs.com/pysmi)
# ASN.1 source file:///Users/davwang4/Dev/mibs.snmplabs.com/asn1/Wellfleet-GRE-MIB
# Produced by pysmi-0.3.4 at Wed May 1 15:40:19 2019
# On host DAVWANG4-M-1475 platform Darwin version 18.5.0 by user davwang4
# Using Python version 3.7.3 (default, Ma... | 121.533981 | 1,146 | 0.778319 | #
# PySNMP MIB module Wellfleet-GRE-MIB (http://snmplabs.com/pysmi)
# ASN.1 source file:///Users/davwang4/Dev/mibs.snmplabs.com/asn1/Wellfleet-GRE-MIB
# Produced by pysmi-0.3.4 at Wed May 1 15:40:19 2019
# On host DAVWANG4-M-1475 platform Darwin version 18.5.0 by user davwang4
# Using Python version 3.7.3 (default, Ma... | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
e9165bdc89fd749b3ea93ba6c4a1ac473de7bcab | 2,116 | py | Python | learning/paramInfo.py | patras91/rae_release | 0e5faffb7eb732fdb8e3bbf2c6d2f2cbd520aa30 | [
"BSD-3-Clause"
] | 1 | 2021-09-28T12:56:56.000Z | 2021-09-28T12:56:56.000Z | learning/paramInfo.py | patras91/rae_release | 0e5faffb7eb732fdb8e3bbf2c6d2f2cbd520aa30 | [
"BSD-3-Clause"
] | null | null | null | learning/paramInfo.py | patras91/rae_release | 0e5faffb7eb732fdb8e3bbf2c6d2f2cbd520aa30 | [
"BSD-3-Clause"
] | 1 | 2022-03-31T16:30:39.000Z | 2022-03-31T16:30:39.000Z |
nFeatures = {
"EE": 182, #22,
"SD": 126, #24,
"SR": 330, #23,
"OF": 0,
"CR": 97, #22, #91
}
params = {
'SD': {
'MoveThroughDoorway_Method2':
{'r2': {'nOutputs': 4, 'nInputs': 150, 'pos': -1, 'decoder': DecodeRobot_SD}},
'Recover_Method1':
{'r2': {'nO... | 25.493976 | 97 | 0.414934 | def DecodeRobot_SD(r):
return {
0: "r1",
1: "r2",
2: "r3",
3: "r4",
}[r]
def DecodeRobot_OF(r):
return {
0: "r0",
1: "r1",
2: "r2",
3: "r3",
4: "r4",
5: "r5",
6: "r6",
}[r]
def DecodeMachine_OF(m):
return {
... | 0 | 0 | 0 | 0 | 0 | 660 | 0 | 0 | 114 |
180eceb9c234223bdd4873839b6ba7d2999aefa2 | 35 | py | Python | pandas_scripts/script1.py | gustavofsantos/PandasPresentation | 457745d2be737891d439f1b6deb9bfddbf20baed | [
"MIT"
] | null | null | null | pandas_scripts/script1.py | gustavofsantos/PandasPresentation | 457745d2be737891d439f1b6deb9bfddbf20baed | [
"MIT"
] | null | null | null | pandas_scripts/script1.py | gustavofsantos/PandasPresentation | 457745d2be737891d439f1b6deb9bfddbf20baed | [
"MIT"
] | null | null | null | #!/usr/bin/python3
| 7 | 18 | 0.714286 | #!/usr/bin/python3
import pandas
| 0 | 0 | 0 | 0 | 0 | 0 | 0 | -8 | 23 |
849a311f39e26d846b879d9b57b4943e1da7e878 | 2,251 | py | Python | scripts/1507834892/pythonsv_icx_handler.py | ZSslience/MKTME-Auto | faaea6a1a23a0c6b2672427e7ab1a09fc844d722 | [
"Apache-2.0"
] | null | null | null | scripts/1507834892/pythonsv_icx_handler.py | ZSslience/MKTME-Auto | faaea6a1a23a0c6b2672427e7ab1a09fc844d722 | [
"Apache-2.0"
] | null | null | null | scripts/1507834892/pythonsv_icx_handler.py | ZSslience/MKTME-Auto | faaea6a1a23a0c6b2672427e7ab1a09fc844d722 | [
"Apache-2.0"
] | 1 | 2020-12-11T09:07:19.000Z | 2020-12-11T09:07:19.000Z | import sys
print("----------------------- pythonsv project init -----------------------")
sys.path.append(".")
sys.path.append(r'C:\PythonSV\icelakex')
if __name__ == '__main__':
itp, sv = pythonsv_init()
# x = cpuid(0x7,0)
# print(x)
# print("ECX data: %s" % (hex(x['ecx'])))
# ECX_BIN = "{0:08b}... | 26.482353 | 78 | 0.500666 | import sys
print("----------------------- pythonsv project init -----------------------")
sys.path.append(".")
sys.path.append(r'C:\PythonSV\icelakex')
from icelakex.starticx import *
from icelakex.toolext import pysv_config
from svtools.common.pysv_config import CFG
def pythonsv_init(try_times=5):
for i in rang... | 0 | 0 | 0 | 0 | 0 | 1,259 | 0 | 50 | 136 |
859bce5d0bf17d2e9e437775716e886e5c77cf78 | 466 | py | Python | pydebug.py | innovationgarage/pydebug | eb087e0d18d825f6ea8c966a287d287d31969512 | [
"MIT"
] | null | null | null | pydebug.py | innovationgarage/pydebug | eb087e0d18d825f6ea8c966a287d287d31969512 | [
"MIT"
] | null | null | null | pydebug.py | innovationgarage/pydebug | eb087e0d18d825f6ea8c966a287d287d31969512 | [
"MIT"
] | null | null | null | import code
import socket
import debugthread
import io
foo="xxx"
s = socket.socket(socket.AF_INET)
s.setsockopt(socket.SOL_SOCKET, socket.SO_REUSEADDR, 1)
s.bind(('127.0.0.1', 4711))
s.listen(0)
while True:
ss, addr = s.accept()
stdin =io.TextIOWrapper(ss.makefile('rb', 0), encoding='utf8')
stdout = io.Te... | 23.3 | 68 | 0.716738 | import sys
import threading
import code
import socket
import code
import debugthread
import io
foo="xxx"
s = socket.socket(socket.AF_INET)
s.setsockopt(socket.SOL_SOCKET, socket.SO_REUSEADDR, 1)
s.bind(('127.0.0.1', 4711))
s.listen(0)
while True:
ss, addr = s.accept()
stdin =io.TextIOWrapper(ss.makefile('rb',... | 0 | 0 | 0 | 0 | 0 | 0 | 0 | -26 | 66 |
2c4d38bcb02b28a838bd5916b8131ef4b36201b8 | 137,768 | py | Python | src/gofra.py | GofraLang/core | 397c02f48a1484713c663d2abbb582641e195078 | [
"MIT"
] | 5 | 2022-02-20T21:00:11.000Z | 2022-02-23T11:01:31.000Z | src/gofra.py | GofraLang/core | 397c02f48a1484713c663d2abbb582641e195078 | [
"MIT"
] | 4 | 2021-11-02T18:32:26.000Z | 2021-12-01T19:36:27.000Z | src/gofra.py | gofra-lang/core | 397c02f48a1484713c663d2abbb582641e195078 | [
"MIT"
] | 1 | 2022-02-23T12:41:31.000Z | 2022-02-23T12:41:31.000Z | """
Main Gofra programming language source code.
"""
__author__ = "Kirill Zhosul @kirillzhosul"
__license__ = "MIT"
from os.path import basename
from sys import argv
import gofra
from gofra.core.stack import Stack
# MAJOR WARNING FOR ALL READERS.
# This code is not refactored,
# currently I am working on refac... | 44.570689 | 174 | 0.548081 | """
Main Gofra programming language source code.
"""
__author__ = "Kirill Zhosul @kirillzhosul"
__license__ = "MIT"
from typing import Generator
from os.path import basename
from sys import argv
import gofra
from gofra.core.danger import *
from gofra.core.stack import Stack
# MAJOR WARNING FOR ALL READERS.
# ... | 0 | 0 | 0 | 0 | 9,399 | 0 | 0 | 17 | 68 |
fbcbbf8b1de343666b5bd53e849fab28452d2cb1 | 2,907 | py | Python | example_project/example_project/settings.py | TAMUArch/django-photologue | e153dd84715b1dd0bea3ac869cd9fcd9bf01e057 | [
"BSD-3-Clause"
] | null | null | null | example_project/example_project/settings.py | TAMUArch/django-photologue | e153dd84715b1dd0bea3ac869cd9fcd9bf01e057 | [
"BSD-3-Clause"
] | null | null | null | example_project/example_project/settings.py | TAMUArch/django-photologue | e153dd84715b1dd0bea3ac869cd9fcd9bf01e057 | [
"BSD-3-Clause"
] | null | null | null | # Global settings for photologue example project.
import os
DEBUG = TEMPLATE_DEBUG = True
# Top level folder - the one created by the startproject command.
TOP_FOLDER = os.path.abspath(os.path.join(os.path.dirname(__file__), '..'))
ADMINS = ()
MANAGERS = ADMINS
# Default dev database is Sqlite. In production I us... | 26.916667 | 76 | 0.735466 | # Global settings for photologue example project.
import os
DEBUG = TEMPLATE_DEBUG = True
# Top level folder - the one created by the startproject command.
TOP_FOLDER = os.path.abspath(os.path.join(os.path.dirname(__file__), '..'))
ADMINS = ()
MANAGERS = ADMINS
# Default dev database is Sqlite. In production I us... | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
4396b65d0afeba59d9fd6311235008de268a0946 | 712 | py | Python | openks/models/pytorch/mmd_modules/spcan/utils/lr_scheduler.py | vivym/OpenKS | ea380782162de2e4c1a413f37ad12b85ccb7048a | [
"Apache-2.0"
] | null | null | null | openks/models/pytorch/mmd_modules/spcan/utils/lr_scheduler.py | vivym/OpenKS | ea380782162de2e4c1a413f37ad12b85ccb7048a | [
"Apache-2.0"
] | null | null | null | openks/models/pytorch/mmd_modules/spcan/utils/lr_scheduler.py | vivym/OpenKS | ea380782162de2e4c1a413f37ad12b85ccb7048a | [
"Apache-2.0"
] | 2 | 2021-11-18T06:55:55.000Z | 2021-12-29T15:21:07.000Z | # Learning rate scheduler
| 32.363636 | 89 | 0.632022 | # Learning rate scheduler
def lr_scheduler(optimizer, lr_mult, args, weight_mult=1, ):
counter = 0
for param_group in optimizer.param_groups:
if counter == 0:
optimizer.param_groups[counter]['lr'] = args.base_lr * lr_mult / 10.0
else:
optimizer.param_groups[counter... | 0 | 0 | 0 | 0 | 0 | 635 | 0 | 0 | 48 |
c11db3f4c3251d40b4093ee2755915bafc3e86d4 | 21,229 | py | Python | computation_graph/run.py | hyroai/computation-graph | 357ea2cfd98c3ea1162b3f373c38738f8ae08b6b | [
"MIT"
] | 23 | 2020-04-19T14:30:40.000Z | 2021-12-03T14:45:44.000Z | computation_graph/run.py | hyroai/computation-graph | 357ea2cfd98c3ea1162b3f373c38738f8ae08b6b | [
"MIT"
] | 7 | 2020-07-20T20:21:27.000Z | 2021-12-30T17:24:28.000Z | computation_graph/run.py | hyroai/computation-graph | 357ea2cfd98c3ea1162b3f373c38738f8ae08b6b | [
"MIT"
] | null | null | null | import asyncio
import itertools
from typing import Any, Callable, Dict, FrozenSet, Tuple
import gamla
import immutables
import toposort
from gamla.optimized import sync as opt_gamla
from computation_graph import base_types, graph
_toposort_nodes: Callable[
[base_types.GraphType], Tuple[FrozenSet[base_types.C... | 31.971386 | 196 | 0.63955 | import asyncio
import dataclasses
import itertools
import logging
import pathlib
import sys
import traceback
import typing
from typing import Any, Callable, Dict, FrozenSet, Iterable, Set, Text, Tuple, Type
import gamla
import immutables
import toposort
import typeguard
from gamla.optimized import async_functions as o... | 0 | 3,417 | 357 | 170 | 0 | 12,241 | 0 | 22 | 889 |
4b2723499c63e7ea94e15a4f2b6a0192b66dde7b | 787 | py | Python | eventos/models.py | aromero45/proyecto0 | e5f5744bd073a4a82b584d1953e8204516ae8193 | [
"bzip2-1.0.6"
] | null | null | null | eventos/models.py | aromero45/proyecto0 | e5f5744bd073a4a82b584d1953e8204516ae8193 | [
"bzip2-1.0.6"
] | 2 | 2021-03-19T23:01:39.000Z | 2021-06-10T22:32:11.000Z | eventos/models.py | aromero45/proyecto0 | e5f5744bd073a4a82b584d1953e8204516ae8193 | [
"bzip2-1.0.6"
] | null | null | null |
# Create your models here. | 35.772727 | 83 | 0.777637 | from django.db import models
from django.contrib.auth.models import User
from django.utils import timezone
# Create your models here.
class Category(models.Model):
name=models.CharField(max_length=300)
class Type(models.Model):
name= models.CharField(max_length=200)
class Event(models.Model):
person = m... | 0 | 0 | 0 | 584 | 0 | 0 | 0 | 41 | 134 |
0d7673ac0332f7616662b2423a0f2d136b010877 | 1,028 | py | Python | experiments/expression/st/plot_gsea_results.py | andrewcharlesjones/spatial-alignment | 70aecf800c5efea6a92990ccf87a1950752a268b | [
"MIT"
] | 14 | 2022-01-11T14:51:17.000Z | 2022-02-26T20:46:58.000Z | experiments/expression/st/plot_gsea_results.py | andrewcharlesjones/spatial-alignment | 70aecf800c5efea6a92990ccf87a1950752a268b | [
"MIT"
] | 3 | 2022-01-26T17:16:24.000Z | 2022-02-24T13:22:39.000Z | experiments/expression/st/plot_gsea_results.py | andrewcharlesjones/spatial-alignment | 70aecf800c5efea6a92990ccf87a1950752a268b | [
"MIT"
] | 1 | 2022-02-23T09:54:37.000Z | 2022-02-23T09:54:37.000Z | import numpy as np
import matplotlib.pyplot as plt
import pandas as pd
import seaborn as sns
import matplotlib
font = {"size": 30}
matplotlib.rc("font", **font)
matplotlib.rcParams["text.usetex"] = True
n_gene_sets_to_name = 2
results_df = pd.read_csv("./out/st_avg_gene_variance_gsea_results.csv", index_col=0)
res... | 25.073171 | 85 | 0.717899 | import torch
import numpy as np
import matplotlib.pyplot as plt
import pandas as pd
import seaborn as sns
import sys
import matplotlib
font = {"size": 30}
matplotlib.rc("font", **font)
matplotlib.rcParams["text.usetex"] = True
n_gene_sets_to_name = 2
results_df = pd.read_csv("./out/st_avg_gene_variance_gsea_result... | 0 | 0 | 0 | 0 | 0 | 0 | 0 | -20 | 44 |
da78212870006cf43395ab04a85fb39d62441a05 | 541 | py | Python | src/translation/viff_templates/MainTemplate.py | n1v0lg/Musketeer | 27baa102b63dd4e49c06a519c2021b984a2cd4c5 | [
"Apache-2.0"
] | 3 | 2017-07-21T16:29:18.000Z | 2020-03-14T21:51:00.000Z | src/translation/viff_templates/MainTemplate.py | n1v0lg/Musketeer | 27baa102b63dd4e49c06a519c2021b984a2cd4c5 | [
"Apache-2.0"
] | null | null | null | src/translation/viff_templates/MainTemplate.py | n1v0lg/Musketeer | 27baa102b63dd4e49c06a519c2021b984a2cd4c5 | [
"Apache-2.0"
] | 2 | 2021-02-02T17:13:11.000Z | 2022-02-14T03:49:29.000Z |
if __name__ == "__main__":
parser = OptionParser()
Runtime.add_options(parser)
options, args = parser.parse_args()
pid, players = load_config("{{VIFF_CONFIG_LOC}}")
Zp = GF(find_prime(2**65, blum=True))
runtime_class = make_runtime_class(
mixins=[ProbabilisticEqualityMixin, Compari... | 30.055556 | 66 | 0.695009 |
if __name__ == "__main__":
parser = OptionParser()
Runtime.add_options(parser)
options, args = parser.parse_args()
pid, players = load_config("{{VIFF_CONFIG_LOC}}")
Zp = GF(find_prime(2**65, blum=True))
runtime_class = make_runtime_class(
mixins=[ProbabilisticEqualityMixin, Compari... | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
76c95753c1e15bf6f8028d7e3a72421f60d31e6b | 291 | py | Python | server/project/urls.py | istommao/fakedataset | 365ef0c68d1ecac30ab2c9908e6a5efa1da5d81e | [
"MIT"
] | null | null | null | server/project/urls.py | istommao/fakedataset | 365ef0c68d1ecac30ab2c9908e6a5efa1da5d81e | [
"MIT"
] | null | null | null | server/project/urls.py | istommao/fakedataset | 365ef0c68d1ecac30ab2c9908e6a5efa1da5d81e | [
"MIT"
] | null | null | null | """project urls."""
from django.urls import path, re_path
from project.views import ProjectListView, ProjectDetailView
app_name = 'project'
urlpatterns = [
path('', ProjectListView.as_view(), name='index'),
re_path(r'(?P<uid>\w+)/', ProjectDetailView.as_view(), name='detail'),
]
| 24.25 | 74 | 0.701031 | """project urls."""
from django.urls import path, re_path
from project.views import ProjectListView, ProjectDetailView
app_name = 'project'
urlpatterns = [
path('', ProjectListView.as_view(), name='index'),
re_path(r'(?P<uid>\w+)/', ProjectDetailView.as_view(), name='detail'),
]
| 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
0b818088c56f02351c73371f2b80d35f2f738a6e | 1,444 | py | Python | main.py | anhtpn/app_flask | ba1509a9bffdec8c4e6c5c98d211d75e3d87541f | [
"MIT"
] | null | null | null | main.py | anhtpn/app_flask | ba1509a9bffdec8c4e6c5c98d211d75e3d87541f | [
"MIT"
] | null | null | null | main.py | anhtpn/app_flask | ba1509a9bffdec8c4e6c5c98d211d75e3d87541f | [
"MIT"
] | null | null | null | from flask import Flask
from flask_restful import Api
from connect import config
from routes.routes import initialize_routes
app = Flask(__name__)
api = Api(app)
config()
initialize_routes(api)
if __name__ == "__main__":
app.secret_key = b'_5#y2L"F4Q8z\n\xec]/'
app.run(debug=True)
# app.run()
| 23.672131 | 79 | 0.664127 | from flask import Flask, render_template, redirect, url_for, request, session
from flask_restful import Api
from connect import config
from routes.routes import initialize_routes
from my_code.Process import RecommendMovie
from read_file import get_user_id
from read_file import get_rating
app = Flask(__name__)
api =... | 0 | 872 | 0 | 0 | 0 | 0 | 0 | 98 | 160 |
c8c57f593b9593d2eb3eb638ed4eeec1fc1f396d | 382 | py | Python | utils/draw_utils.py | DdeGeus/single-network-panoptic-segmentation | 891f13b8bca0f41e298900fe1c73bc3035caef5d | [
"Apache-2.0"
] | 32 | 2019-06-17T06:28:15.000Z | 2021-12-20T15:40:56.000Z | utils/draw_utils.py | DdeGeus/single-network-panoptic-segmentation | 891f13b8bca0f41e298900fe1c73bc3035caef5d | [
"Apache-2.0"
] | 14 | 2019-07-11T10:04:37.000Z | 2022-03-11T23:49:52.000Z | utils/draw_utils.py | DdeGeus/single-network-panoptic-segmentation | 891f13b8bca0f41e298900fe1c73bc3035caef5d | [
"Apache-2.0"
] | 4 | 2019-06-17T06:28:17.000Z | 2022-03-18T19:06:25.000Z | from PIL import ImageFont
FONT = ImageFont.load_default() | 27.285714 | 61 | 0.549738 | from PIL import Image, ImageDraw, ImageFont
FONT = ImageFont.load_default()
def draw_labels_and_probs(draw_obj, box, label, prob, color):
x, y = box[0], box[1]
draw_obj.rectangle([x, y, x+100, y+10],
fill=color)
txt = label + ": " + str(prob)
draw_obj.text(xy=(x, y),
text... | 0 | 0 | 0 | 0 | 0 | 283 | 0 | 18 | 23 |
3d06b4ab911ac4dcdf7380ebba49a7d481ddeffe | 1,813 | py | Python | python/paddle/framework/__init__.py | Ray2020BD/Paddle | 994087188816575d456c2f9c2a6c90aad83b4e71 | [
"Apache-2.0"
] | 2 | 2020-12-09T16:09:59.000Z | 2020-12-09T16:10:02.000Z | python/paddle/framework/__init__.py | Ray2020BD/Paddle | 994087188816575d456c2f9c2a6c90aad83b4e71 | [
"Apache-2.0"
] | null | null | null | python/paddle/framework/__init__.py | Ray2020BD/Paddle | 994087188816575d456c2f9c2a6c90aad83b4e71 | [
"Apache-2.0"
] | null | null | null | # Copyright (c) 2020 PaddlePaddle Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by app... | 38.574468 | 80 | 0.772201 | # Copyright (c) 2020 PaddlePaddle Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by app... | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 45 | 158 |
5c7b170332c963d2c748af8230525d7348d1ce37 | 1,851 | py | Python | Toolkits/Discovery/meta/searx/searx/engines/translated.py | roscopecoltran/SniperKit-Core | 4600dffe1cddff438b948b6c22f586d052971e04 | [
"MIT"
] | 4 | 2018-09-07T15:35:24.000Z | 2019-03-27T09:48:12.000Z | Toolkits/Discovery/meta/searx/searx/engines/translated.py | roscopecoltran/SniperKit-Core | 4600dffe1cddff438b948b6c22f586d052971e04 | [
"MIT"
] | 371 | 2020-03-04T21:51:56.000Z | 2022-03-31T20:59:11.000Z | searx/engines/translated.py | xu1991/open | 5398dab4ba669b3ca87d9fe26eb24431c45f153e | [
"CC0-1.0"
] | 3 | 2019-06-18T19:57:17.000Z | 2020-11-06T03:55:08.000Z | """
MyMemory Translated
@website https://mymemory.translated.net/
@provide-api yes (https://mymemory.translated.net/doc/spec.php)
@using-api yes
@results JSON
@stable yes
@parse url, title, content
"""
import re
from sys import version_info
if version_info[0] == 3:
unicode = str
categ... | 26.826087 | 93 | 0.590492 | """
MyMemory Translated
@website https://mymemory.translated.net/
@provide-api yes (https://mymemory.translated.net/doc/spec.php)
@using-api yes
@results JSON
@stable yes
@parse url, title, content
"""
import re
from sys import version_info
from searx.utils import is_valid_lang
if version_... | 0 | 0 | 0 | 0 | 0 | 1,164 | 0 | 16 | 68 |
a3ad10fbcabe9ffec09099e0d17108ec8407f036 | 10,854 | py | Python | trainers/saver.py | DorTsur/dine_ndt | 3a07064b1d37da12c36e679a9b1de6a32ae42689 | [
"MIT"
] | 1 | 2022-03-29T03:09:52.000Z | 2022-03-29T03:09:52.000Z | trainers/saver.py | DorTsur/dine_ndt | 3a07064b1d37da12c36e679a9b1de6a32ae42689 | [
"MIT"
] | null | null | null | trainers/saver.py | DorTsur/dine_ndt | 3a07064b1d37da12c36e679a9b1de6a32ae42689 | [
"MIT"
] | null | null | null | import numpy as np
np.set_printoptions(formatter={'float': lambda x: "{0:0.3f}".format(x)})
import logging
logger = logging.getLogger("logger")
###################################
####### HISTOGRAM OBJECTS #########
###################################
| 31.46087 | 129 | 0.550028 | import numpy as np
np.set_printoptions(formatter={'float': lambda x: "{0:0.3f}".format(x)})
import matplotlib.pyplot as plt
import tensorflow as tf
import logging
import os
from scipy.io import savemat
from scipy.stats import norm
logger = logging.getLogger("logger")
class Visualizer(object):
def __init__(self,... | 0 | 0 | 0 | 10,304 | 0 | 0 | 0 | 14 | 271 |
64bb519d49f3762d4ca019caf415129bc32a8609 | 1,539 | py | Python | src/spaceone/inventory/info/resource_group_info.py | xellos00/inventory | e2831f2f09b5b72623f735a186264987d41954ab | [
"Apache-2.0"
] | 9 | 2020-06-04T23:01:38.000Z | 2021-06-03T03:38:59.000Z | src/spaceone/inventory/info/resource_group_info.py | xellos00/inventory | e2831f2f09b5b72623f735a186264987d41954ab | [
"Apache-2.0"
] | 10 | 2020-08-20T01:34:30.000Z | 2022-03-14T04:59:48.000Z | src/spaceone/inventory/info/resource_group_info.py | xellos00/inventory | e2831f2f09b5b72623f735a186264987d41954ab | [
"Apache-2.0"
] | 9 | 2020-06-08T22:03:02.000Z | 2021-12-06T06:12:30.000Z | import logging
__all__ = ['ResourceGroupInfo', 'ResourceGroupsInfo']
_LOGGER = logging.getLogger(__name__)
| 34.2 | 113 | 0.665367 | import functools
import logging
from spaceone.api.inventory.v1 import resource_group_pb2
from spaceone.core.pygrpc.message_type import *
from spaceone.core import utils
from spaceone.inventory.model.resource_group_model import ResourceGroup, Resource
__all__ = ['ResourceGroupInfo', 'ResourceGroupsInfo']
_LOGGER = log... | 0 | 0 | 0 | 0 | 0 | 1,122 | 0 | 126 | 179 |
6cce9677a9e96b4643f4b6f0a83e95d7bfdc56ba | 6,825 | py | Python | train.py | WANNA959/TrafficPrediction | 33d350f2d2ccbb9481d453d204e8c087aa493887 | [
"MIT"
] | null | null | null | train.py | WANNA959/TrafficPrediction | 33d350f2d2ccbb9481d453d204e8c087aa493887 | [
"MIT"
] | null | null | null | train.py | WANNA959/TrafficPrediction | 33d350f2d2ccbb9481d453d204e8c087aa493887 | [
"MIT"
] | 1 | 2021-01-06T18:28:01.000Z | 2021-01-06T18:28:01.000Z | """
Train the NN model.
"""
import warnings
from tkinter import filedialog
import os
import tkinter
import tkinter.messagebox
warnings.filterwarnings("ignore")
file_path1=""
file_path2=""
modelName = None
def train_model(model, X_train, y_train, name, config,lag,callBack):
"""train
train a single model.
... | 32.655502 | 134 | 0.651868 | """
Train the NN model.
"""
import sys
import _thread
import keras
import warnings
import argparse
import numpy as np
import pandas as pd
from data.data import process_data
from model import model
from keras.models import Model
from keras.callbacks import EarlyStopping
from tkinter import ttk, filedialog, dialog
import... | 315 | 0 | 0 | 0 | 0 | 4,353 | 0 | 20 | 288 |
7b3254d16854448bd39eb2e66be0671a02da0391 | 181 | py | Python | alg/ganite/ganite/utils/random.py | DaraOrange/mlforhealthlabpub | 9db861c850c94c6cf1f8bf75ed2ad8dcbd648aa3 | [
"BSD-3-Clause"
] | 171 | 2021-02-12T10:23:19.000Z | 2022-03-29T01:58:52.000Z | alg/ganite/ganite/utils/random.py | DaraOrange/mlforhealthlabpub | 9db861c850c94c6cf1f8bf75ed2ad8dcbd648aa3 | [
"BSD-3-Clause"
] | 4 | 2021-06-01T08:18:33.000Z | 2022-02-20T13:37:30.000Z | alg/ganite/ganite/utils/random.py | DaraOrange/mlforhealthlabpub | 9db861c850c94c6cf1f8bf75ed2ad8dcbd648aa3 | [
"BSD-3-Clause"
] | 93 | 2021-02-10T03:21:59.000Z | 2022-03-30T19:10:37.000Z | # stdlib
# third party
| 13.923077 | 42 | 0.712707 | # stdlib
import random
# third party
import numpy as np
import torch
def enable_reproducible_results() -> None:
np.random.seed(0)
torch.manual_seed(0)
random.seed(0)
| 0 | 0 | 0 | 0 | 0 | 87 | 0 | -20 | 89 |
bb5c3f9685695758521bbfa22ed771d05a96abe2 | 925 | py | Python | tests/test_utils.py | awoods/fcrepo-import-export-verify | 40126e69542d039bd52f338ec24bb6975c4939dd | [
"Apache-2.0"
] | 5 | 2017-12-05T17:57:00.000Z | 2018-08-22T18:11:24.000Z | tests/test_utils.py | awoods/fcrepo-import-export-verify | 40126e69542d039bd52f338ec24bb6975c4939dd | [
"Apache-2.0"
] | 31 | 2016-11-09T14:52:16.000Z | 2017-09-07T15:10:53.000Z | tests/test_utils.py | awoods/fcrepo-import-export-verify | 40126e69542d039bd52f338ec24bb6975c4939dd | [
"Apache-2.0"
] | 4 | 2016-11-08T18:54:47.000Z | 2017-05-17T12:47:15.000Z |
config = MockConfig({})
config.dir = "/tmp"
| 23.717949 | 69 | 0.687568 | from fcrepo_verify.utils import get_data_dir, replace_strings_in_file
from fcrepo_verify.constants import BAG_DATA_DIR
import os
import tempfile
class MockConfig(dict):
pass
config = MockConfig({})
config.dir = "/tmp"
def test_get_data_dir():
config.bag = False
data_dir = get_data_dir(config)
asse... | 0 | 0 | 0 | 11 | 0 | 627 | 0 | 57 | 180 |
3bccb8316bd9339d883fc7862dee4e461aeb65f2 | 7,813 | py | Python | phi/vis/_dash/board.py | marc-gav/PhiFlow | b6186fd1503d040997b52d49aa18cd875267c27e | [
"MIT"
] | 556 | 2019-12-04T16:48:54.000Z | 2022-03-31T16:31:59.000Z | phi/vis/_dash/board.py | marc-gav/PhiFlow | b6186fd1503d040997b52d49aa18cd875267c27e | [
"MIT"
] | 26 | 2019-12-12T16:54:06.000Z | 2022-03-14T19:44:36.000Z | phi/vis/_dash/board.py | marc-gav/PhiFlow | b6186fd1503d040997b52d49aa18cd875267c27e | [
"MIT"
] | 93 | 2019-12-08T14:38:27.000Z | 2022-03-29T16:38:37.000Z | from dash.dependencies import Input
BENCHMARK_BUTTON = Input('benchmark-button', 'n_clicks')
PROFILE_BUTTON = Input('profile-button', 'n_clicks')
NO_BENCHMARK_TEXT = '*No benchmarks available.*'
NO_PROFILES_TEXT = '*No profiles available.*'
REFRESH_GRAPHS_BUTTON = Input('refresh-graphs-button', 'n_clicks')
TENSO... | 42.461957 | 230 | 0.644823 | import logging
import os
import traceback
import dash_core_components as dcc
import dash_html_components as html
from dash.dependencies import Output, Input
from dash.exceptions import PreventUpdate
from plotly import graph_objects
from .dash_app import DashApp
from ._plotly_plots import plot_scalars
from .player_con... | 0 | 4,297 | 0 | 0 | 0 | 2,634 | 0 | 145 | 359 |
0d2754b160457013efda332fcce1032bc1173de1 | 3,570 | py | Python | bootstrap.py | Jselvam/Unique-files-generator | d4a5a58d89e3fd121b75e2b928c3aea81ed123b3 | [
"MIT"
] | null | null | null | bootstrap.py | Jselvam/Unique-files-generator | d4a5a58d89e3fd121b75e2b928c3aea81ed123b3 | [
"MIT"
] | null | null | null | bootstrap.py | Jselvam/Unique-files-generator | d4a5a58d89e3fd121b75e2b928c3aea81ed123b3 | [
"MIT"
] | null | null | null |
#writeExcelFile
if __name__ == '__main__':
App = Bootstrap()
App.run() | 42 | 109 | 0.606723 | from flask import Flask
from filesbuilder import FilesBuilder
from inputoutput import IO
class Bootstrap:
def __init__(self, request, response):
self.request = request
self.response = response
self.response['logs_messages'].append('File builder initiated...\n')
self.file_builder =... | 0 | 0 | 0 | 3,376 | 0 | 0 | 0 | 23 | 89 |
3ec370bafd4b644cefa70981a0e9399f121e7a3a | 6,874 | py | Python | tests/test_emfetch.py | axonchisel/ax_metrics | a2db75c9ef9a9752997ccb112e8db68c1c8584a0 | [
"MIT"
] | 10 | 2016-08-26T18:57:28.000Z | 2021-09-19T19:21:16.000Z | tests/test_emfetch.py | axonchisel/ax_metrics | a2db75c9ef9a9752997ccb112e8db68c1c8584a0 | [
"MIT"
] | 1 | 2015-01-08T19:54:54.000Z | 2015-01-09T01:24:17.000Z | tests/test_emfetch.py | axonchisel/ax_metrics | a2db75c9ef9a9752997ccb112e8db68c1c8584a0 | [
"MIT"
] | 3 | 2015-01-08T23:32:58.000Z | 2016-09-23T02:38:26.000Z | """
Ax_Metrics - Test io.emfetch package
------------------------------------------------------------------------------
Author: Dan Kamins <dos at axonchisel dot net>
Copyright (c) 2014 Dan Kamins, AxonChisel.net
"""
# ----------------------------------------------------------------------------
import axonchisel.m... | 39.056818 | 94 | 0.610852 | """
Ax_Metrics - Test io.emfetch package
------------------------------------------------------------------------------
Author: Dan Kamins <dos at axonchisel dot net>
Copyright (c) 2014 Dan Kamins, AxonChisel.net
"""
# ----------------------------------------------------------------------------
import pytest
impo... | 0 | 0 | 0 | 6,115 | 0 | 0 | 0 | 123 | 112 |
6b2eda2f899d72071839a00f76cb956aa9624cbe | 269 | py | Python | ex28.py | FernandaMakiHirose/programas-jupyter | 40ebfc820fefceb14293715104641ef184acfff4 | [
"MIT"
] | null | null | null | ex28.py | FernandaMakiHirose/programas-jupyter | 40ebfc820fefceb14293715104641ef184acfff4 | [
"MIT"
] | null | null | null | ex28.py | FernandaMakiHirose/programas-jupyter | 40ebfc820fefceb14293715104641ef184acfff4 | [
"MIT"
] | 1 | 2021-06-09T22:33:11.000Z | 2021-06-09T22:33:11.000Z | # Importando apenas uma funcionalidade da biblioteca - pea a raiz quadrada de um nmero e arredonde ele para cima.
from math import sqrt
n = float(input('Digite um nmero para ver a sua raiz quadrada: '))
print('A raiz quadrada de {} {}' .format(n, sqrt(n)))
| 44.833333 | 115 | 0.728625 | # Importando apenas uma funcionalidade da biblioteca - peça a raiz quadrada de um número e arredonde ele para cima.
from math import sqrt, ceil
n = float(input('Digite um número para ver a sua raiz quadrada: '))
print('A raiz quadrada de {} é {}' .format(n, sqrt(n)))
| 8 | 0 | 0 | 0 | 0 | 0 | 0 | 6 | 0 |
4edcff1838d61f9aaf382ed08fc5c25c6cbf4f93 | 1,154 | py | Python | tests/test_string_operations.py | nathfroech/flake8_pylint_comparison | 1f6d5063b3055687e880b5b436346ce4b5ae95da | [
"MIT"
] | null | null | null | tests/test_string_operations.py | nathfroech/flake8_pylint_comparison | 1f6d5063b3055687e880b5b436346ce4b5ae95da | [
"MIT"
] | null | null | null | tests/test_string_operations.py | nathfroech/flake8_pylint_comparison | 1f6d5063b3055687e880b5b436346ce4b5ae95da | [
"MIT"
] | null | null | null |
from tests.testing_utils import param_wrapper
strip_params = [
# code, flake8 rules, pylint rules
param_wrapper("s.strip('abca')", {'B005'}, set(), id='strip_string'),
param_wrapper(r"s.strip(r'\n\t ')", {'B005'}, set(), id='strip_raw_string'),
param_wrapper("s.lstrip('abca')", {'B005'}, set(), id='ls... | 44.384615 | 103 | 0.730503 | import pytest
from hamcrest import assert_that, contains_inanyorder
from tests.testing_utils import param_wrapper, run_flake8, run_pylint
strip_params = [
# code, flake8 rules, pylint rules
param_wrapper("s.strip('abca')", {'B005'}, set(), id='strip_string'),
param_wrapper(r"s.strip(r'\n\t ')", {'B005'}, ... | 0 | 459 | 0 | 0 | 0 | 0 | 0 | 48 | 67 |
640dcfd22c816c6be0a699e8918f42f1b1b5baa7 | 1,096 | py | Python | tapis_cli/commands/taccapis/v2/profiles/show.py | bpachev/tapis-cli | c3128fb5b63ef74e06b737bbd95ef28fb24f0d32 | [
"BSD-3-Clause"
] | 8 | 2020-10-18T22:48:23.000Z | 2022-01-10T09:16:14.000Z | tapis_cli/commands/taccapis/v2/profiles/show.py | bpachev/tapis-cli | c3128fb5b63ef74e06b737bbd95ef28fb24f0d32 | [
"BSD-3-Clause"
] | 238 | 2019-09-04T14:37:54.000Z | 2020-04-15T16:24:24.000Z | tapis_cli/commands/taccapis/v2/profiles/show.py | bpachev/tapis-cli | c3128fb5b63ef74e06b737bbd95ef28fb24f0d32 | [
"BSD-3-Clause"
] | 5 | 2019-09-20T04:23:49.000Z | 2020-01-16T17:45:14.000Z |
__all__ = ['ProfilesShow']
| 31.314286 | 64 | 0.708029 | from tapis_cli.display import Verbosity
from tapis_cli.clients.services.mixins import Username
from . import API_NAME, SERVICE_VERSION
from .models import Profile
from .formatters import ProfilesFormatOne
__all__ = ['ProfilesShow']
class ProfilesShow(ProfilesFormatOne, Username):
HELP_STRING = 'Show details fo... | 0 | 0 | 0 | 838 | 0 | 0 | 0 | 95 | 134 |
f29230d1f98fa0a6b8a41d157909690cafaca5d2 | 1,546 | py | Python | tests/apps/aspect_rendering.py | T4rk1n/dazzler | 69c49422dc19c910445ab265b1d3481041de8f43 | [
"MIT"
] | 15 | 2019-12-19T11:57:30.000Z | 2021-11-15T23:34:41.000Z | tests/apps/aspect_rendering.py | T4rk1n/dazzler | 69c49422dc19c910445ab265b1d3481041de8f43 | [
"MIT"
] | 196 | 2019-09-21T15:10:14.000Z | 2022-03-31T11:07:48.000Z | tests/apps/aspect_rendering.py | jbampton/dazzler | 4018f6cbcb55a9f482cb5c5cbf6a06b063c15e21 | [
"MIT"
] | 7 | 2019-10-30T19:38:15.000Z | 2021-12-01T04:54:16.000Z | from dazzler import Dazzler
from dazzler.components import core
from dazzler.system import Page, Trigger
from tests.components import spec_components as spec
app = Dazzler(__name__)
aspect_types = {
'array': {
'value': [1, 2, 3],
'json': True,
},
'bool': {
'value': True,
},
... | 20.891892 | 69 | 0.556921 | from dazzler import Dazzler
from dazzler.components import core
from dazzler.system import Page, BindingContext, Trigger
from tests.components import spec_components as spec
app = Dazzler(__name__)
aspect_types = {
'array': {
'value': [1, 2, 3],
'json': True,
},
'bool': {
'value':... | 0 | 0 | 218 | 0 | 0 | 0 | 0 | 16 | 23 |
2b879ac647f07fe391553bcd79a30bc6e3c48f35 | 313 | py | Python | Snippets/segment_access.py | derwind/GlyphsScripts | 37934072b02850b2b84654ed312d75834729f78e | [
"Apache-2.0"
] | null | null | null | Snippets/segment_access.py | derwind/GlyphsScripts | 37934072b02850b2b84654ed312d75834729f78e | [
"Apache-2.0"
] | null | null | null | Snippets/segment_access.py | derwind/GlyphsScripts | 37934072b02850b2b84654ed312d75834729f78e | [
"Apache-2.0"
] | null | null | null | #MenuTitle: Access to segments
# -*- coding: utf-8 -*-
g = Glyphs.font.selectedLayers[0].parent
paths = Glyphs.font.selectedLayers[0].paths
for path in paths:
segments = path.segments
for segment in segments:
print type(segment.points[0]), dir(segment.points[0])
| 26.083333 | 61 | 0.709265 | #MenuTitle: Access to segments
# -*- coding: utf-8 -*-
from GlyphsApp.plugins import *
g = Glyphs.font.selectedLayers[0].parent
paths = Glyphs.font.selectedLayers[0].paths
for path in paths:
segments = path.segments
for segment in segments:
print type(segment.points[0]), dir(segment.points[0])
| 0 | 0 | 0 | 0 | 0 | 0 | 0 | 10 | 23 |
7b50dca36fc41d2437703a4e15155b9083cd3728 | 3,280 | py | Python | Backend/grades_lambda.py | klmahesh/PennGrader | 58cd3ccd6dcd85df0e5438ccf8aad6640033100b | [
"MIT"
] | null | null | null | Backend/grades_lambda.py | klmahesh/PennGrader | 58cd3ccd6dcd85df0e5438ccf8aad6640033100b | [
"MIT"
] | null | null | null | Backend/grades_lambda.py | klmahesh/PennGrader | 58cd3ccd6dcd85df0e5438ccf8aad6640033100b | [
"MIT"
] | null | null | null | import sys
sys.path.append('/opt')
import boto3
from boto3 import resource
# Dynamo Config
dynamo_resource = resource('dynamodb')
dynamo = boto3.client('dynamodb')
METADATA_TABLE = 'HomeworksMetadata'
TEST_CASES_TABLE = 'HomeworksTestCases'
GRADEBOOK_TABLE = 'Gradebook'
# Return Codes
SUCCESS = 200
ERROR = 400... | 31.238095 | 114 | 0.674085 | import sys
sys.path.append('/opt')
import os
import boto3
import json
import dill
import ast
import base64
import shutil
import time
import pandas as pd
from boto3 import resource
from boto3.dynamodb.conditions import Key, Attr
# Dynamo Config
dynamo_resource = resource('dynamodb')
dynamo = boto3.client('dynamodb')... | 0 | 0 | 0 | 0 | 0 | 2,498 | 0 | -45 | 381 |
4c1e149556d19e3e9a842ee6ad6ef634ab661f77 | 4,900 | py | Python | src/clusterfuzz/_internal/tests/appengine/libs/crash_access_test.py | mspectorgoogle/clusterfuzz | 44df69cbcb94efc212f27758d45d6ff0f36061e5 | [
"Apache-2.0"
] | 5,023 | 2019-02-07T16:57:56.000Z | 2022-03-31T01:08:05.000Z | src/clusterfuzz/_internal/tests/appengine/libs/crash_access_test.py | mspectorgoogle/clusterfuzz | 44df69cbcb94efc212f27758d45d6ff0f36061e5 | [
"Apache-2.0"
] | 2,303 | 2019-02-07T17:36:36.000Z | 2022-03-31T15:44:38.000Z | src/clusterfuzz/_internal/tests/appengine/libs/crash_access_test.py | mspectorgoogle/clusterfuzz | 44df69cbcb94efc212f27758d45d6ff0f36061e5 | [
"Apache-2.0"
] | 564 | 2019-02-07T17:34:24.000Z | 2022-03-26T09:25:44.000Z | # Copyright 2019 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, ... | 37.40458 | 80 | 0.706122 | # Copyright 2019 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, ... | 0 | 0 | 0 | 3,951 | 0 | 61 | 0 | 53 | 181 |
b79b812df3f82ca1f88577abb43ebbecffe4a810 | 25,526 | py | Python | ics/services/dataset_collection_service.py | aesuli/ics | ae6753f721f88d6f30ad9a3450feedbd9a7e20c4 | [
"BSD-3-Clause"
] | 1 | 2022-03-31T14:32:54.000Z | 2022-03-31T14:32:54.000Z | ics/services/dataset_collection_service.py | aesuli/ics | ae6753f721f88d6f30ad9a3450feedbd9a7e20c4 | [
"BSD-3-Clause"
] | null | null | null | ics/services/dataset_collection_service.py | aesuli/ics | ae6753f721f88d6f30ad9a3450feedbd9a7e20c4 | [
"BSD-3-Clause"
] | null | null | null |
__author__ = 'Andrea Esuli'
MAX_BATCH_SIZE = 1000
CSV_LARGE_FIELD = 1024 * 1024 * 10
QUICK_CLASSIFICATION_BATCH_SIZE = 100
| 43.337861 | 201 | 0.595706 | import csv
import os
import shutil
from random import randint
from uuid import uuid4
import cherrypy
import numpy as np
from cherrypy.lib.static import serve_file
from ics.classifier.classifier import NO_LABEL, YES_LABEL
from ics.db.sqlalchemydb import SQLAlchemyDB, Job, ClassificationMode, LabelSource
from ics.util.... | 0 | 18,293 | 0 | 1,492 | 0 | 5,142 | 0 | 133 | 336 |
8c924cabffc4ee5cc8c89951f0d76a62a643767a | 7,828 | py | Python | custom_one_gallery/custom_one_gallery/report/supplier_backlog_report/supplier_backlog_report.py | AGtechnologies/custom_one_gallery | af081a8e8d81101281a54b20117c43a83e486b69 | [
"MIT"
] | null | null | null | custom_one_gallery/custom_one_gallery/report/supplier_backlog_report/supplier_backlog_report.py | AGtechnologies/custom_one_gallery | af081a8e8d81101281a54b20117c43a83e486b69 | [
"MIT"
] | null | null | null | custom_one_gallery/custom_one_gallery/report/supplier_backlog_report/supplier_backlog_report.py | AGtechnologies/custom_one_gallery | af081a8e8d81101281a54b20117c43a83e486b69 | [
"MIT"
] | null | null | null | # Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors and contributors
# For license information, please see license.txt
from __future__ import unicode_literals
| 35.420814 | 470 | 0.711037 | # Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors and contributors
# For license information, please see license.txt
from __future__ import unicode_literals
import frappe
from frappe import _
from datetime import datetime,timedelta
from dateutil.relativedelta import relativedelta
from frappe.utils ... | 0 | 0 | 0 | 0 | 0 | 7,297 | 0 | 59 | 295 |
839af60c763401f583944e34ff504a964a34c2ce | 1,055 | py | Python | tool/offline_job_info_generator.py | yamanalab/DAMCREM | 8064613b799efee1a4896b1e60488312368183ab | [
"Apache-2.0"
] | null | null | null | tool/offline_job_info_generator.py | yamanalab/DAMCREM | 8064613b799efee1a4896b1e60488312368183ab | [
"Apache-2.0"
] | null | null | null | tool/offline_job_info_generator.py | yamanalab/DAMCREM | 8064613b799efee1a4896b1e60488312368183ab | [
"Apache-2.0"
] | null | null | null | # coding: UTF-8
import sys
# unit is [us].
if __name__ == "__main__":
argc = len(sys.argv)
# us
dirname = sys.argv[1]
mu = int(sys.argv[2])
M = int(sys.argv[3])
N = int(sys.argv[4])
for trial in range(N):
print(run(dirname, mu, M, trial))
pass
| 23.444444 | 90 | 0.566825 | # coding: UTF-8
import sys
import os
import numpy as np
# unit is [us].
def generate_dt(mu, M):
return -mu * np.log(1-np.random.random(M))
def generate(mu, M):
dt = generate_dt(mu, M)
result = np.zeros([M], dtype=np.float)
result[0] = dt[0] + 1000000
for i in range(1, M):
result[i] = res... | 9 | 0 | 0 | 0 | 0 | 657 | 0 | -15 | 113 |
be70bdf5c7d2fda78c2ae2cf24b3e324863dde56 | 174 | py | Python | encuestas/encuesta/apps.py | davidbmx/encuestas | 3a80a970fecd477e61ea0a51e4b3787226cbea19 | [
"MIT"
] | null | null | null | encuestas/encuesta/apps.py | davidbmx/encuestas | 3a80a970fecd477e61ea0a51e4b3787226cbea19 | [
"MIT"
] | null | null | null | encuestas/encuesta/apps.py | davidbmx/encuestas | 3a80a970fecd477e61ea0a51e4b3787226cbea19 | [
"MIT"
] | null | null | null | #Django | 21.75 | 36 | 0.729885 | #Django
from django.apps import AppConfig
class EncuestasAppConfig(AppConfig):
"""Encuestas app config"""
name = 'encuestas.encuesta'
verbose_name = 'Encuestas' | 0 | 0 | 0 | 110 | 0 | 0 | 0 | 12 | 45 |