hexsha stringlengths 40 40 | size int64 7 1.04M | ext stringclasses 10
values | lang stringclasses 1
value | max_stars_repo_path stringlengths 4 247 | max_stars_repo_name stringlengths 4 125 | max_stars_repo_head_hexsha stringlengths 40 78 | max_stars_repo_licenses listlengths 1 10 | max_stars_count int64 1 368k ⌀ | max_stars_repo_stars_event_min_datetime stringlengths 24 24 ⌀ | max_stars_repo_stars_event_max_datetime stringlengths 24 24 ⌀ | max_issues_repo_path stringlengths 4 247 | max_issues_repo_name stringlengths 4 125 | max_issues_repo_head_hexsha stringlengths 40 78 | max_issues_repo_licenses listlengths 1 10 | max_issues_count int64 1 116k ⌀ | max_issues_repo_issues_event_min_datetime stringlengths 24 24 ⌀ | max_issues_repo_issues_event_max_datetime stringlengths 24 24 ⌀ | max_forks_repo_path stringlengths 4 247 | max_forks_repo_name stringlengths 4 125 | max_forks_repo_head_hexsha stringlengths 40 78 | max_forks_repo_licenses listlengths 1 10 | max_forks_count int64 1 105k ⌀ | max_forks_repo_forks_event_min_datetime stringlengths 24 24 ⌀ | max_forks_repo_forks_event_max_datetime stringlengths 24 24 ⌀ | content stringlengths 1 1.04M | avg_line_length float64 1.77 618k | max_line_length int64 1 1.02M | alphanum_fraction float64 0 1 | original_content stringlengths 7 1.04M | filtered:remove_function_no_docstring int64 -102 942k | filtered:remove_class_no_docstring int64 -354 977k | filtered:remove_delete_markers int64 0 60.1k |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
4f50725f3c31d176be58c5bde9bb440a69602f34 | 11,325 | py | Python | IPython/terminal/tests/test_interactivshell.py | pyarnold/ipython | c4797f7f069d0a974ddfa1e4251c7550c809dba0 | [
"BSD-3-Clause-Clear"
] | 1 | 2020-12-18T01:07:55.000Z | 2020-12-18T01:07:55.000Z | IPython/terminal/tests/test_interactivshell.py | pyarnold/ipython | c4797f7f069d0a974ddfa1e4251c7550c809dba0 | [
"BSD-3-Clause-Clear"
] | null | null | null | IPython/terminal/tests/test_interactivshell.py | pyarnold/ipython | c4797f7f069d0a974ddfa1e4251c7550c809dba0 | [
"BSD-3-Clause-Clear"
] | null | null | null | # -*- coding: utf-8 -*-
"""Tests for the key interactiveshell module.
Authors
-------
* Julian Taylor
"""
#-----------------------------------------------------------------------------
# Copyright (C) 2011 The IPython Development Team
#
# Distributed under the terms of the BSD License. The full license is in
# th... | 37.131148 | 82 | 0.604768 | # -*- coding: utf-8 -*-
"""Tests for the key interactiveshell module.
Authors
-------
* Julian Taylor
"""
#-----------------------------------------------------------------------------
# Copyright (C) 2011 The IPython Development Team
#
# Distributed under the terms of the BSD License. The full license is in
# th... | 1,971 | 7,735 | 258 |
54c05dacc36e2a160c7bf7dd66ce48a4d7ce3753 | 5,704 | py | Python | research/lstm_object_detection/models/mobilenet_defs.py | vincentcheny/models | afb1a59fc1bc792ac72d1a3e22e2469020529788 | [
"Apache-2.0"
] | 1 | 2019-09-11T09:41:11.000Z | 2019-09-11T09:41:11.000Z | research/lstm_object_detection/models/mobilenet_defs.py | vincentcheny/models | afb1a59fc1bc792ac72d1a3e22e2469020529788 | [
"Apache-2.0"
] | null | null | null | research/lstm_object_detection/models/mobilenet_defs.py | vincentcheny/models | afb1a59fc1bc792ac72d1a3e22e2469020529788 | [
"Apache-2.0"
] | null | null | null | # Copyright 2019 The TensorFlow 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... | 39.337931 | 81 | 0.610975 | # Copyright 2019 The TensorFlow 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... | 445 | 0 | 27 |
3b0f676854ce6949e3f8f80ac4c42b4708ce1fb3 | 8,842 | py | Python | annotation/anotherDocActiveThing.py | jakelever/corona-ml | 8ceb22af50d7277ebf05f2fd21bbbf68c080ed76 | [
"MIT"
] | 7 | 2021-02-01T22:39:23.000Z | 2021-08-09T16:28:38.000Z | annotation/anotherDocActiveThing.py | jakelever/corona-ml | 8ceb22af50d7277ebf05f2fd21bbbf68c080ed76 | [
"MIT"
] | 1 | 2021-05-17T13:14:40.000Z | 2021-05-20T10:26:09.000Z | annotation/anotherDocActiveThing.py | jakelever/corona-ml | 8ceb22af50d7277ebf05f2fd21bbbf68c080ed76 | [
"MIT"
] | 1 | 2021-01-04T14:11:18.000Z | 2021-01-04T14:11:18.000Z | import sys
sys.path.append("../pipeline")
import mysql.connector
import pickle
import argparse
import json
import itertools
from collections import defaultdict,Counter
from collections.abc import Iterable
import numpy as np
import time
import os
from scipy import stats
from sklearn.multiclass import OneVsRestClassifi... | 36.841667 | 159 | 0.755598 | import sys
sys.path.append("../pipeline")
import mysql.connector
import pickle
import argparse
import json
import itertools
from collections import defaultdict,Counter
from collections.abc import Iterable
import numpy as np
import time
import os
from scipy import stats
from sklearn.multiclass import OneVsRestClassifi... | 4,087 | 0 | 143 |
459fa3f4bf59ee2dc26b184c1108b9c9de325588 | 4,134 | py | Python | zebra_zpl/image.py | Children-With-Diabetes/py-zebra-zpl | 1ba99976a4322e7856d2c01aad7a9370d9f6c560 | [
"MIT"
] | null | null | null | zebra_zpl/image.py | Children-With-Diabetes/py-zebra-zpl | 1ba99976a4322e7856d2c01aad7a9370d9f6c560 | [
"MIT"
] | null | null | null | zebra_zpl/image.py | Children-With-Diabetes/py-zebra-zpl | 1ba99976a4322e7856d2c01aad7a9370d9f6c560 | [
"MIT"
] | null | null | null | import string
import PIL.Image
from .printable import Printable
class _ImageHandler:
"""Convert PIL images to ZPL
Based on Java example from:
http://www.jcgonzalez.com/java-image-to-zpl-example
"""
@staticmethod
@staticmethod
@property
@property
| 31.082707 | 83 | 0.495162 | import string
import PIL.Image
from .printable import Printable
class _ImageHandler:
"""Convert PIL images to ZPL
Based on Java example from:
http://www.jcgonzalez.com/java-image-to-zpl-example
"""
def __init__(self, image: PIL.Image):
self._i = image.convert('L')
@staticmethod
... | 3,516 | 96 | 235 |
6c6c9cb1343a02d111ad40ddac0947dad0d82727 | 426 | py | Python | tests/test_advanced.py | eldavojohn/uspto-pymongo-interface | 8bc6e71ed4e450cd491dbcd7498e93ea848aa88e | [
"MIT"
] | 1 | 2018-10-08T00:45:10.000Z | 2018-10-08T00:45:10.000Z | tests/test_advanced.py | eldavojohn/uspto-pymongo-interface | 8bc6e71ed4e450cd491dbcd7498e93ea848aa88e | [
"MIT"
] | null | null | null | tests/test_advanced.py | eldavojohn/uspto-pymongo-interface | 8bc6e71ed4e450cd491dbcd7498e93ea848aa88e | [
"MIT"
] | null | null | null | from .context import uspto
import unittest
class AdvancedTestSuite(unittest.TestCase):
"""Advanced test cases."""
print "here we go"
if __name__ == '__main__':
unittest.main()
| 21.3 | 45 | 0.711268 | from .context import uspto
import unittest
class AdvancedTestSuite(unittest.TestCase):
"""Advanced test cases."""
print "here we go"
def test_first_patent(self):
uspto.print_first_patent()
def test_patent_crawl(self):
uspto.crawl_patents_with_aggregate()
def test_map_reduce_to_s... | 154 | 0 | 81 |
fdf96a349d16ab90fa2755f1d68c9b95d03c626e | 591 | py | Python | src/bot.py | NNNMM12345/Discord_Sandbot1 | 76ed7a97efd1d6d0eb7efd9aff78985e63cfb6c6 | [
"MIT"
] | 4 | 2019-01-02T20:31:17.000Z | 2020-09-06T09:43:22.000Z | src/bot.py | NNNMM12345/Discord_Sandbot1 | 76ed7a97efd1d6d0eb7efd9aff78985e63cfb6c6 | [
"MIT"
] | 2 | 2018-03-23T00:45:17.000Z | 2018-03-27T15:44:13.000Z | src/bot.py | NNNMM12345/Discord_Sandbot1 | 76ed7a97efd1d6d0eb7efd9aff78985e63cfb6c6 | [
"MIT"
] | 2 | 2018-03-24T22:48:33.000Z | 2018-03-24T22:49:09.000Z | import discord
from discord.ext import commands
| 31.105263 | 80 | 0.588832 | import discord
from discord.ext import commands
class Bot(commands.Bot):
def __init__(self, extensions):
super().__init__(command_prefix='!', case_insensitive=True)
# Load extension
for extension in extensions:
try:
self.load_extension(extension)
... | 458 | 3 | 81 |
7c463d2d5d527f1ff779006b05efd417309a680e | 1,336 | py | Python | migrations.py | jerryrwu/alcazard | 1403da83cd1986e298db4266f1d1d9d63dc8ab89 | [
"Apache-2.0"
] | 2 | 2019-03-26T14:51:23.000Z | 2020-11-06T13:11:30.000Z | migrations.py | jerryrwu/alcazard | 1403da83cd1986e298db4266f1d1d9d63dc8ab89 | [
"Apache-2.0"
] | null | null | null | migrations.py | jerryrwu/alcazard | 1403da83cd1986e298db4266f1d1d9d63dc8ab89 | [
"Apache-2.0"
] | 1 | 2020-10-30T18:24:40.000Z | 2020-10-30T18:24:40.000Z | import logging
from playhouse import migrate
from alcazar_logging import BraceAdapter
logger = BraceAdapter(logging.getLogger(__name__))
| 33.4 | 96 | 0.717066 | import logging
from playhouse import migrate
from alcazar_logging import BraceAdapter
logger = BraceAdapter(logging.getLogger(__name__))
def _record_migration(db, name):
db.execute_sql('INSERT INTO migration (name) VALUES (?001)', (name,))
def _handle_table_creation(db, migrations):
with db.atomic():
... | 1,100 | 0 | 92 |
127add1ede6fc7e323acde12acceb115ae953001 | 463 | py | Python | tentacruel/heos_watcher/__init__.py | paulhoule/tentacruel | 600f39157598b762226a1c07d78966981da5f7f9 | [
"MIT"
] | null | null | null | tentacruel/heos_watcher/__init__.py | paulhoule/tentacruel | 600f39157598b762226a1c07d78966981da5f7f9 | [
"MIT"
] | 39 | 2019-01-12T00:00:48.000Z | 2019-05-08T02:06:36.000Z | tentacruel/heos_watcher/__init__.py | paulhoule/tentacruel | 600f39157598b762226a1c07d78966981da5f7f9 | [
"MIT"
] | null | null | null | from uuid import UUID
from aio_pika import Exchange
from tentacruel import HeosClientProtocol
HEOS_NS = UUID('003df636-ad90-11e9-aca1-9eb6d06a70c5')
attributes = {
"/player_volume_changed": {
"device_id": "pid",
"name": "heos.volume",
"subattributes": ["level", "mute"]
},
"/player_... | 24.368421 | 54 | 0.61987 | from uuid import UUID
from aio_pika import Exchange
from tentacruel import HeosClientProtocol
HEOS_NS = UUID('003df636-ad90-11e9-aca1-9eb6d06a70c5')
attributes = {
"/player_volume_changed": {
"device_id": "pid",
"name": "heos.volume",
"subattributes": ["level", "mute"]
},
"/player_... | 0 | 0 | 0 |
0af00527171f4fdb332cc8b7ff7cfbe536057074 | 1,257 | py | Python | demo/amrparsing/create_span_concept_dict.py | raosudha89/vowpal_wabbit | 03e973838e022149d802ec3f5e2817dcbc9019d5 | [
"BSD-3-Clause"
] | 2 | 2016-05-20T16:27:07.000Z | 2021-10-01T16:35:53.000Z | demo/amrparsing/create_span_concept_dict.py | Sandy4321/vowpal_wabbit-1 | 03e973838e022149d802ec3f5e2817dcbc9019d5 | [
"BSD-3-Clause"
] | null | null | null | demo/amrparsing/create_span_concept_dict.py | Sandy4321/vowpal_wabbit-1 | 03e973838e022149d802ec3f5e2817dcbc9019d5 | [
"BSD-3-Clause"
] | 1 | 2021-10-01T16:35:54.000Z | 2021-10-01T16:35:54.000Z | import sys
import cPickle as pickle
from collections import OrderedDict
argv = sys.argv[1:]
if len(argv) < 1:
print "usage: create_span_concept_dict.py <span_concept_dataset.p> <output_filename>"
sys.exit()
span_concept_dataset = pickle.load(open(argv[0], "rb"))
output_filename = argv[1]
output_file = open(output_f... | 34.916667 | 112 | 0.739857 | import sys
import cPickle as pickle
from collections import OrderedDict
argv = sys.argv[1:]
if len(argv) < 1:
print "usage: create_span_concept_dict.py <span_concept_dataset.p> <output_filename>"
sys.exit()
span_concept_dataset = pickle.load(open(argv[0], "rb"))
output_filename = argv[1]
output_file = open(output_f... | 0 | 0 | 0 |
8642c823acca4db3ebf91ee66a8a446df6a868a9 | 55,071 | py | Python | coverage_test_proxy.py | urbas/CoAPthon3 | f6a3c25cde5371fb003a18b94a8f8e8bee5c534a | [
"MIT"
] | 51 | 2018-01-26T16:47:38.000Z | 2022-01-18T08:44:20.000Z | coverage_test_proxy.py | urbas/CoAPthon3 | f6a3c25cde5371fb003a18b94a8f8e8bee5c534a | [
"MIT"
] | 28 | 2018-02-21T12:24:21.000Z | 2021-08-03T15:50:06.000Z | coverage_test_proxy.py | urbas/CoAPthon3 | f6a3c25cde5371fb003a18b94a8f8e8bee5c534a | [
"MIT"
] | 48 | 2018-01-29T08:55:53.000Z | 2021-10-17T00:38:19.000Z | # -*- coding: utf-8 -*-
from queue import Queue
import random
import socket
import threading
import unittest
from coapclient import HelperClient
from coapforwardproxy import CoAPForwardProxy
from coapserver import CoAPServer
from coapthon import defines
from coapthon.messages.option import Option
from coapthon.messag... | 38.727848 | 123 | 0.603348 | # -*- coding: utf-8 -*-
from queue import Queue
import random
import socket
import threading
import unittest
from coapclient import HelperClient
from coapforwardproxy import CoAPForwardProxy
from coapserver import CoAPServer
from coapthon import defines
from coapthon.messages.option import Option
from coapthon.messag... | 53,875 | 10 | 644 |
460b7bbb44e83bb656c795546fd27222fb6d006d | 1,948 | py | Python | tests/run_trading_bot_test.py | Ricky294/cryptodata | da9cbcfdfa155830b3e877e9d5736dace17ced88 | [
"MIT"
] | null | null | null | tests/run_trading_bot_test.py | Ricky294/cryptodata | da9cbcfdfa155830b3e877e9d5736dace17ced88 | [
"MIT"
] | null | null | null | tests/run_trading_bot_test.py | Ricky294/cryptodata | da9cbcfdfa155830b3e877e9d5736dace17ced88 | [
"MIT"
] | null | null | null | from datetime import datetime
import pandas as pd
import websocket
from tests import tests_path
from crypto_data.shared.utils import exclude_values
from crypto_data.binance.extract import get_candles, get_latest_candle_timestamp
from crypto_data.binance.schema import (
OPEN_TIME,
OPEN_PRICE,
CLOSE_PRICE,
... | 23.190476 | 87 | 0.676078 | from datetime import datetime
import pandas as pd
import websocket
from tests import tests_path
from crypto_data.shared.utils import exclude_values
from crypto_data.binance.extract import get_candles, get_latest_candle_timestamp
from crypto_data.binance.schema import (
OPEN_TIME,
OPEN_PRICE,
CLOSE_PRICE,
... | 1,168 | 0 | 115 |
218af6b1259c77c1d048dfd3081572f8d15aeaa6 | 627 | py | Python | NiLBS/body/human_body.py | joemarch010/NILBS | c6568818ec8acdb0fe4bd8d197278f0abb361d0b | [
"MIT"
] | 2 | 2021-04-01T07:55:11.000Z | 2021-12-10T02:57:59.000Z | NiLBS/body/human_body.py | joemarch010/NILBS | c6568818ec8acdb0fe4bd8d197278f0abb361d0b | [
"MIT"
] | null | null | null | NiLBS/body/human_body.py | joemarch010/NILBS | c6568818ec8acdb0fe4bd8d197278f0abb361d0b | [
"MIT"
] | null | null | null |
import numpy as np
from NiLBS.skinning.util import redistribute_weights
| 28.5 | 96 | 0.6874 |
import numpy as np
from NiLBS.skinning.util import redistribute_weights
class HumanBody:
def __init__(self, body_dict=None, body_dict_path=None, active_bones=None):
if body_dict_path is not None:
body_dict = np.load(body_dict_path)
self.vertex_template = body_dict['v_template']
... | 508 | -5 | 50 |
d022948a48bb25e619e60df0d1f33e7b1a71f499 | 2,689 | py | Python | server/video_process.py | brycecorbitt/FlashGuard | e018595fa7474065b6359c95b6ee78d2dfee24d5 | [
"MIT"
] | null | null | null | server/video_process.py | brycecorbitt/FlashGuard | e018595fa7474065b6359c95b6ee78d2dfee24d5 | [
"MIT"
] | null | null | null | server/video_process.py | brycecorbitt/FlashGuard | e018595fa7474065b6359c95b6ee78d2dfee24d5 | [
"MIT"
] | 2 | 2019-05-29T15:18:16.000Z | 2020-06-02T16:08:44.000Z | import cv2
import youtube_dl
import numpy as np
import os
import time
FLASH_MINIMUM = 3
tmp_dir = 'temp/'
ex = {'format': 'worstvideo[vcodec^=avc1][fps=30]/worst[vcodec^=avc1][fps=30]/worstvideo[vcodec=vp9][fps=30]/worst[vcodec=vp9][fps=30]', 'outtmpl': 'temp/temp.%(ext)s', 'recode_video': 'webm'}
ytdl = youtube_dl.... | 24.225225 | 192 | 0.605058 | import cv2
import youtube_dl
import numpy as np
import os
import time
FLASH_MINIMUM = 3
tmp_dir = 'temp/'
ex = {'format': 'worstvideo[vcodec^=avc1][fps=30]/worst[vcodec^=avc1][fps=30]/worstvideo[vcodec=vp9][fps=30]/worst[vcodec=vp9][fps=30]', 'outtmpl': 'temp/temp.%(ext)s', 'recode_video': 'webm'}
ytdl = youtube_dl.... | 1,848 | 0 | 161 |
8a02077158eed84ba37ce6ea33e5f141cd7a9c06 | 15,524 | py | Python | slim/nets/inception_v4.py | svedi/tensorflow_models | 0d58acf27841c5591b7caad8fc7e3498c219f382 | [
"Apache-2.0"
] | null | null | null | slim/nets/inception_v4.py | svedi/tensorflow_models | 0d58acf27841c5591b7caad8fc7e3498c219f382 | [
"Apache-2.0"
] | null | null | null | slim/nets/inception_v4.py | svedi/tensorflow_models | 0d58acf27841c5591b7caad8fc7e3498c219f382 | [
"Apache-2.0"
] | null | null | null | # Copyright 2016 The TensorFlow 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 applicable ... | 47.91358 | 80 | 0.622327 | # Copyright 2016 The TensorFlow 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 applicable ... | 75 | 0 | 25 |
c7d0a67ce9575c64567f250d546dfe7a3a82b6d0 | 6,625 | py | Python | pyopentsdb/query.py | mikecokina/pyopentsdb | b8d78e8f42aed4ebbd6ac3aff925071de41d6b52 | [
"MIT"
] | 2 | 2018-05-09T08:34:30.000Z | 2018-09-25T22:42:09.000Z | pyopentsdb/query.py | mikecokina/pyopentsdb | b8d78e8f42aed4ebbd6ac3aff925071de41d6b52 | [
"MIT"
] | 2 | 2018-12-24T10:51:30.000Z | 2019-01-21T13:55:11.000Z | pyopentsdb/query.py | mikecokina/pyopentsdb | b8d78e8f42aed4ebbd6ac3aff925071de41d6b52 | [
"MIT"
] | null | null | null | from queue import Queue
from queue import Empty
from threading import Thread
from pyopentsdb import errors
from pyopentsdb.utils import request_post
from pyopentsdb.conf import QueryPointer
class IterableQueue(object):
""" Transform standard python Queue instance to iterable one"""
def __init__(self, source... | 34.505208 | 115 | 0.637736 | from queue import Queue
from queue import Empty
from threading import Thread
from pyopentsdb import errors
from pyopentsdb.utils import request_post
from pyopentsdb.conf import QueryPointer
class IterableQueue(object):
""" Transform standard python Queue instance to iterable one"""
def __init__(self, source... | 863 | 0 | 76 |
68fe1bd2aeb26294f3009435d3e3d763b7b7ffa7 | 10,564 | py | Python | old_versions/sgnn_pl_pure/loss.py | goodok/sgnn | a1ea5023c5b7e4f1a66afd1daed10a60786e6ac1 | [
"MIT"
] | 2 | 2020-08-10T13:55:01.000Z | 2020-08-13T16:06:25.000Z | old_versions/sgnn_pl_pure/loss.py | goodok/sgnn | a1ea5023c5b7e4f1a66afd1daed10a60786e6ac1 | [
"MIT"
] | null | null | null | old_versions/sgnn_pl_pure/loss.py | goodok/sgnn | a1ea5023c5b7e4f1a66afd1daed10a60786e6ac1 | [
"MIT"
] | 2 | 2020-11-13T17:48:13.000Z | 2020-11-13T17:50:35.000Z |
import numpy as np
import torch
import torch.nn.functional as F
import sparseconvnet as scn
import data_util
UNK_THRESH = 2
#UNK_THRESH = 3
UNK_ID = -1
# note: weight_missing_geo must be > 1
# hierarchical loss
| 45.339056 | 230 | 0.648429 |
import numpy as np
import torch
import torch.nn.functional as F
import sparseconvnet as scn
import data_util
UNK_THRESH = 2
#UNK_THRESH = 3
UNK_ID = -1
def compute_targets(target, hierarchy, num_hierarchy_levels, truncation, use_loss_masking, known):
assert(len(target.shape) == 5)
target_for_occs = [None]... | 10,160 | 0 | 182 |
8673e63a5911ec7d23cefb57c9ad17a81189a8e3 | 5,978 | py | Python | geomstats/integrator.py | YannCabanes/geomstats | ce3f4bab6cd59c2f071371a46e336086771d0493 | [
"MIT"
] | 2 | 2022-03-30T00:47:45.000Z | 2022-03-31T18:22:16.000Z | geomstats/integrator.py | YannCabanes/geomstats | ce3f4bab6cd59c2f071371a46e336086771d0493 | [
"MIT"
] | null | null | null | geomstats/integrator.py | YannCabanes/geomstats | ce3f4bab6cd59c2f071371a46e336086771d0493 | [
"MIT"
] | null | null | null | r"""Integrator functions used when no closed forms are available.
Lead author: Nicolas Guigui.
These are designed for first order ODE written of a variable x and a time
variable t:
.. math::
\frac{dx}{dt} = force(x, t)
where :math: `x` is called the state variable. It may represent many
variable... | 28.065728 | 79 | 0.607059 | r"""Integrator functions used when no closed forms are available.
Lead author: Nicolas Guigui.
These are designed for first order ODE written of a variable x and a time
variable t:
.. math::
\frac{dx}{dt} = force(x, t)
where :math: `x` is called the state variable. It may represent many
variable... | 0 | 0 | 0 |
4bcfe6f5e75c6f352c785ad65e7375a9edd97d19 | 3,524 | py | Python | haipproxy/scheduler.py | searchlyf/haipproxy | 33be5298c2dc11372b6faa8ec7f4c10d3bcb7ec1 | [
"MIT"
] | null | null | null | haipproxy/scheduler.py | searchlyf/haipproxy | 33be5298c2dc11372b6faa8ec7f4c10d3bcb7ec1 | [
"MIT"
] | null | null | null | haipproxy/scheduler.py | searchlyf/haipproxy | 33be5298c2dc11372b6faa8ec7f4c10d3bcb7ec1 | [
"MIT"
] | null | null | null | """
This module schedules all the tasks according to config.rules.
"""
import click
import logging
import multiprocessing
import schedule
import time
from scrapy.crawler import CrawlerRunner
from scrapy.utils.project import get_project_settings
from twisted.internet import reactor
from haipproxy.client import SquidCl... | 30.119658 | 85 | 0.648978 | """
This module schedules all the tasks according to config.rules.
"""
import click
import logging
import multiprocessing
import schedule
import time
from scrapy.crawler import CrawlerRunner
from scrapy.utils.project import get_project_settings
from twisted.internet import reactor
from haipproxy.client import SquidCl... | 863 | 1,594 | 69 |
fa8bbb4c41cefeb292ed9b5182148e5383987b33 | 2,107 | py | Python | medipack/lib/meditor.py | hritikgupta/medipack | 86407dbfe2f79ee8ebc9b1aa697ca41c2857e914 | [
"MIT"
] | 7 | 2018-10-01T17:46:37.000Z | 2021-11-13T00:07:57.000Z | medipack/lib/meditor.py | hritikgupta/medipack | 86407dbfe2f79ee8ebc9b1aa697ca41c2857e914 | [
"MIT"
] | 7 | 2018-10-01T13:11:46.000Z | 2020-05-15T22:26:50.000Z | medipack/lib/meditor.py | hritikgupta/medipack | 86407dbfe2f79ee8ebc9b1aa697ca41c2857e914 | [
"MIT"
] | 7 | 2018-09-29T18:44:29.000Z | 2019-09-06T00:51:44.000Z | import os
import subprocess as sp
from .srbColour import Colour
| 37.625 | 100 | 0.613194 | import os
import subprocess as sp
from .srbColour import Colour
class Meditor:
def getLength(filename):
result = sp.Popen(["ffprobe", filename],
stdout = sp.PIPE, stderr = sp.STDOUT)
arr = [x for x in result.stdout.readlines() if "Duration".encode('utf-8') in x]
x = arr[0].deco... | 1,837 | -7 | 211 |
a343dd3be46b0b1c71ff80808ad25d2733b56f65 | 1,176 | py | Python | NLP/libs/NLP/classification/train_data.py | YarosJ/prestige-of-districts | 56ef437bff3f55e843a0602e0d33467582a50e5d | [
"MIT"
] | 6 | 2019-04-30T11:01:10.000Z | 2021-02-17T17:58:24.000Z | NLP/libs/NLP/classification/train_data.py | YarosJ/prestige-of-districts | 56ef437bff3f55e843a0602e0d33467582a50e5d | [
"MIT"
] | null | null | null | NLP/libs/NLP/classification/train_data.py | YarosJ/prestige-of-districts | 56ef437bff3f55e843a0602e0d33467582a50e5d | [
"MIT"
] | 1 | 2019-09-25T03:19:52.000Z | 2019-09-25T03:19:52.000Z | #!/usr/bin/env python
# coding: utf8
from __future__ import unicode_literals
import random
import operator
from typing import Dict
categories = {'FAULT': 0, 'INFO': 0, 'TOXIC': 0, 'REPAIR': 0}
| 30.947368 | 123 | 0.647109 | #!/usr/bin/env python
# coding: utf8
from __future__ import unicode_literals
import random
import operator
from typing import Dict
categories = {'FAULT': 0, 'INFO': 0, 'TOXIC': 0, 'REPAIR': 0}
def train_data(*args, coefficient: float = 20):
categories_counts: Dict[str, float] = categories.copy()
result = []... | 957 | 0 | 23 |
30efe457e2cdfa8b5a921c646458acb2e2e64f67 | 279 | py | Python | Code/stacks-and-queues/reverse.py | lukeaparker/CS1.3-Data-Struct | 2b09fa95ddb1fd3e21c42ccacdc9e19fc53382a8 | [
"MIT"
] | null | null | null | Code/stacks-and-queues/reverse.py | lukeaparker/CS1.3-Data-Struct | 2b09fa95ddb1fd3e21c42ccacdc9e19fc53382a8 | [
"MIT"
] | null | null | null | Code/stacks-and-queues/reverse.py | lukeaparker/CS1.3-Data-Struct | 2b09fa95ddb1fd3e21c42ccacdc9e19fc53382a8 | [
"MIT"
] | null | null | null |
input_num = '22235253534090'
reverse(input_num)
| 14.684211 | 28 | 0.569892 |
input_num = '22235253534090'
def reverse(input_num):
stack1 = []
stack2 = []
for i in input_num:
stack1.append(i)
for i in stack1:
pop = stack1.pop()
stack2.insert(0, i)
print(stack2)
return stack2
reverse(input_num)
| 195 | 0 | 23 |
d506975b831bb63cb8084904c0509b92d0510073 | 12,478 | py | Python | research/cv/cct/src/models/cct/cct.py | mindspore-ai/models | 9127b128e2961fd698977e918861dadfad00a44c | [
"Apache-2.0"
] | 77 | 2021-10-15T08:32:37.000Z | 2022-03-30T13:09:11.000Z | research/cv/cct/src/models/cct/cct.py | mindspore-ai/models | 9127b128e2961fd698977e918861dadfad00a44c | [
"Apache-2.0"
] | 3 | 2021-10-30T14:44:57.000Z | 2022-02-14T06:57:57.000Z | research/cv/cct/src/models/cct/cct.py | mindspore-ai/models | 9127b128e2961fd698977e918861dadfad00a44c | [
"Apache-2.0"
] | 24 | 2021-10-15T08:32:45.000Z | 2022-03-24T18:45:20.000Z | # Copyright 2021 Huawei Technologies Co., Ltd
#
# 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... | 25.780992 | 79 | 0.578699 | # Copyright 2021 Huawei Technologies Co., Ltd
#
# 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... | 1,712 | 0 | 54 |
b7bbadbd5e3fea86210ad485005e52358c20ba8f | 2,769 | py | Python | pyproj/utils.py | matthew-brett/pyproj | 5749ae3448041fa2a9e1444ef9d569ae6c2b9976 | [
"MIT"
] | null | null | null | pyproj/utils.py | matthew-brett/pyproj | 5749ae3448041fa2a9e1444ef9d569ae6c2b9976 | [
"MIT"
] | null | null | null | pyproj/utils.py | matthew-brett/pyproj | 5749ae3448041fa2a9e1444ef9d569ae6c2b9976 | [
"MIT"
] | null | null | null | from array import array
def _copytobuffer(x):
"""
return a copy of x as an object that supports the python Buffer
API (python array if input is float, list or tuple, numpy array
if input is a numpy array). returns copyofx, isfloat, islist,
istuple (islist is True if input is a list, istuple is tr... | 34.185185 | 84 | 0.548935 | from array import array
def _copytobuffer_return_scalar(x):
try:
# inx,isfloat,islist,istuple
return array("d", (float(x),)), True, False, False
except:
raise TypeError("input must be an array, list, tuple or scalar")
def _copytobuffer(x):
"""
return a copy of x as an object ... | 464 | 0 | 46 |
b86241b35ed456fca8e62338d08ae2fe58b443e5 | 514 | py | Python | aao/spiders/__init__.py | rkenny2/aao | 57ccba1b833bfbb030616d1c1f69015b7ac65af2 | [
"MIT"
] | 27 | 2018-08-20T09:31:07.000Z | 2022-03-31T06:12:50.000Z | aao/spiders/__init__.py | rkenny2/aao | 57ccba1b833bfbb030616d1c1f69015b7ac65af2 | [
"MIT"
] | null | null | null | aao/spiders/__init__.py | rkenny2/aao | 57ccba1b833bfbb030616d1c1f69015b7ac65af2 | [
"MIT"
] | 4 | 2018-07-15T23:34:02.000Z | 2021-05-28T15:39:47.000Z | import importlib
package = 'aao.spiders.bookmakers'
SpiderBet365 = importlib.import_module(
'.bet365', package).SpiderBet365
SpiderBwin = importlib.import_module(
'.bwin', package).SpiderBwin
Spider888sport = importlib.import_module(
'.888sport', package).Spider888sport
SpiderWilliamhill = importlib.impor... | 25.7 | 46 | 0.743191 | import importlib
package = 'aao.spiders.bookmakers'
SpiderBet365 = importlib.import_module(
'.bet365', package).SpiderBet365
SpiderBwin = importlib.import_module(
'.bwin', package).SpiderBwin
Spider888sport = importlib.import_module(
'.888sport', package).Spider888sport
SpiderWilliamhill = importlib.impor... | 0 | 0 | 0 |
0b23dcf2a889f6d295e096ffba1f1642692453de | 2,279 | py | Python | statsSend/jenkins/jenkinsJob.py | luigiberrettini/build-deploy-stats | 52a0bf5aeb8d2f8ef62e4e836eb0b9874dea500d | [
"MIT"
] | 2 | 2017-07-04T14:30:35.000Z | 2017-07-04T16:04:53.000Z | statsSend/jenkins/jenkinsJob.py | luigiberrettini/build-deploy-stats | 52a0bf5aeb8d2f8ef62e4e836eb0b9874dea500d | [
"MIT"
] | null | null | null | statsSend/jenkins/jenkinsJob.py | luigiberrettini/build-deploy-stats | 52a0bf5aeb8d2f8ef62e4e836eb0b9874dea500d | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
from reporting.category import Category
from statsSend.jenkins.jenkinsBuild import JenkinsBuild | 36.758065 | 107 | 0.584906 | #!/usr/bin/env python3
from reporting.category import Category
from statsSend.jenkins.jenkinsBuild import JenkinsBuild
class JenkinsJob:
def __init__(self, session, url):
self.session = session
self.url = url
self.builds = []
@property
def id(self):
return '/'.join(self.ur... | 1,048 | 1,089 | 23 |
a7bd2c4211c196da6104a551e21f6df02b968760 | 6,004 | py | Python | setupsrc/pl_setup/update_pdfium.py | pypdfium2-team/pypdfium2 | 9a1796ba9f058102997652086a48e28af9cd3579 | [
"Apache-2.0",
"BSD-3-Clause"
] | 17 | 2021-12-13T05:36:20.000Z | 2022-03-13T22:56:16.000Z | setupsrc/pl_setup/update_pdfium.py | pypdfium2-team/pypdfium2 | 9a1796ba9f058102997652086a48e28af9cd3579 | [
"Apache-2.0",
"BSD-3-Clause"
] | 51 | 2021-12-04T13:21:35.000Z | 2022-03-28T13:33:29.000Z | setupsrc/pl_setup/update_pdfium.py | pypdfium2-team/pypdfium2 | 9a1796ba9f058102997652086a48e28af9cd3579 | [
"Apache-2.0",
"BSD-3-Clause"
] | 2 | 2022-02-01T22:56:47.000Z | 2022-03-16T13:26:35.000Z | #! /usr/bin/env python3
# SPDX-FileCopyrightText: 2022 geisserml <geisserml@gmail.com>
# SPDX-License-Identifier: Apache-2.0 OR BSD-3-Clause
# Download the PDFium binaries and generate ctypes bindings
import os
import sys
import shutil
import tarfile
import argparse
import traceback
from urllib import request
from os... | 29.004831 | 106 | 0.650067 | #! /usr/bin/env python3
# SPDX-FileCopyrightText: 2022 geisserml <geisserml@gmail.com>
# SPDX-License-Identifier: Apache-2.0 OR BSD-3-Clause
# Download the PDFium binaries and generate ctypes bindings
import os
import sys
import shutil
import tarfile
import argparse
import traceback
from urllib import request
from os... | 4,326 | 0 | 253 |
55f548e6457977df06ca2f504c649c7bb491fcb8 | 217 | py | Python | gin/i_o/test/test_create_dataset_from_smiles.py | choderalab/gin | 9082431d8b664699a898c1e2fa490a18737d6e2d | [
"MIT"
] | 24 | 2019-07-20T22:37:09.000Z | 2021-07-07T07:13:56.000Z | gin/i_o/test/test_create_dataset_from_smiles.py | choderalab/gin | 9082431d8b664699a898c1e2fa490a18737d6e2d | [
"MIT"
] | 3 | 2021-05-10T05:29:59.000Z | 2022-02-10T00:15:05.000Z | gin/i_o/test/test_create_dataset_from_smiles.py | kuano-ai/gimlet | 9082431d8b664699a898c1e2fa490a18737d6e2d | [
"MIT"
] | 8 | 2019-08-09T17:30:20.000Z | 2021-12-01T13:27:46.000Z | from gin.i_o.from_smiles import to_mols
import pandas as pd
df = pd.read_csv('data/delaney-processed.csv')
smiles_array = df[['smiles']].values.flatten()
mols = to_mols(smiles_array)
for mol in mols:
print(mol)
| 21.7 | 46 | 0.741935 | from gin.i_o.from_smiles import to_mols
import pandas as pd
df = pd.read_csv('data/delaney-processed.csv')
smiles_array = df[['smiles']].values.flatten()
mols = to_mols(smiles_array)
for mol in mols:
print(mol)
| 0 | 0 | 0 |
20c79a53cae917612c347763df25a19850ccdcfb | 981 | py | Python | web/helpdesk/migrations/0008_auto_20170116_1712.py | stesla/arxcode | a0ebf7c4d310de8c1980a8ba2a48948a68bb5a0a | [
"MIT"
] | 5 | 2019-03-16T08:26:53.000Z | 2019-11-27T15:42:16.000Z | web/helpdesk/migrations/0008_auto_20170116_1712.py | stesla/arxcode | a0ebf7c4d310de8c1980a8ba2a48948a68bb5a0a | [
"MIT"
] | 7 | 2018-09-29T05:08:15.000Z | 2021-06-10T21:35:32.000Z | web/helpdesk/migrations/0008_auto_20170116_1712.py | stesla/arxcode | a0ebf7c4d310de8c1980a8ba2a48948a68bb5a0a | [
"MIT"
] | 7 | 2018-09-19T21:11:29.000Z | 2019-11-19T12:46:14.000Z | # -*- coding: utf-8 -*-
# Generated by Django 1.9.9 on 2017-01-16 17:12
from __future__ import unicode_literals
from django.db import migrations, models
import django.db.models.deletion
| 36.333333 | 255 | 0.626911 | # -*- coding: utf-8 -*-
# Generated by Django 1.9.9 on 2017-01-16 17:12
from __future__ import unicode_literals
from django.db import migrations, models
import django.db.models.deletion
class Migration(migrations.Migration):
dependencies = [
('helpdesk', '0007_ticket_submitting_room'),
]
operat... | 0 | 770 | 23 |
4cc04dddb430b232152853948a3923ccef6094d7 | 157 | py | Python | StringCompare.py | shakaka/ExcelReading | 25e26cdd98ee1bc5c9fda24b4b3645b23f0de46e | [
"Apache-2.0"
] | 1 | 2020-08-20T12:44:46.000Z | 2020-08-20T12:44:46.000Z | StringCompare.py | shakaka/ExcelReading | 25e26cdd98ee1bc5c9fda24b4b3645b23f0de46e | [
"Apache-2.0"
] | null | null | null | StringCompare.py | shakaka/ExcelReading | 25e26cdd98ee1bc5c9fda24b4b3645b23f0de46e | [
"Apache-2.0"
] | null | null | null | PhoneDirectory = ['John:009878788677' , 'Jefrey:67654654645' , 'Maria:8787677766']
for entry in PhoneDirectory:
if '7' in entry:
print('yeah')
| 22.428571 | 82 | 0.66879 | PhoneDirectory = ['John:009878788677' , 'Jefrey:67654654645' , 'Maria:8787677766']
for entry in PhoneDirectory:
if '7' in entry:
print('yeah')
| 0 | 0 | 0 |
b71edf427ff507754fa7cb3b8c604e5c6c67b139 | 2,055 | py | Python | puzzle15/part_two.py | Tomer23/advent-of-code-2021 | 6781616807c9e5910cd4fe512aa9a3a9ec6738e2 | [
"Apache-2.0"
] | null | null | null | puzzle15/part_two.py | Tomer23/advent-of-code-2021 | 6781616807c9e5910cd4fe512aa9a3a9ec6738e2 | [
"Apache-2.0"
] | null | null | null | puzzle15/part_two.py | Tomer23/advent-of-code-2021 | 6781616807c9e5910cd4fe512aa9a3a9ec6738e2 | [
"Apache-2.0"
] | null | null | null | FILENAME = './puzzle15/data/input'
small_cave = []
with open(FILENAME) as file:
for line in file:
small_cave.append([int(x) for x in list(line.strip())])
small_n = len(small_cave)
large_n = small_n * 5
cave = [[ 0 for _ in range(large_n)] for _ in range(large_n)]
for i in range(large_n):
... | 33.145161 | 82 | 0.491971 | FILENAME = './puzzle15/data/input'
small_cave = []
with open(FILENAME) as file:
for line in file:
small_cave.append([int(x) for x in list(line.strip())])
small_n = len(small_cave)
large_n = small_n * 5
cave = [[ 0 for _ in range(large_n)] for _ in range(large_n)]
for i in range(large_n):
... | 0 | 0 | 0 |
5d5ff45542bf2d1b577667a9265c1f9131176d2e | 38 | py | Python | Python/Introduction/Say ''Hello, World!'' With Python/solution.py | TanishqBhargava/HackerRank | a9fd69a19b7cfca864460c1bec63525f4d023e13 | [
"Apache-2.0"
] | 7 | 2020-04-02T16:18:46.000Z | 2021-02-12T14:06:44.000Z | Python/Introduction/Say ''Hello, World!'' With Python/solution.py | hamzaV2000/HackerRank-1 | a9fd69a19b7cfca864460c1bec63525f4d023e13 | [
"Apache-2.0"
] | null | null | null | Python/Introduction/Say ''Hello, World!'' With Python/solution.py | hamzaV2000/HackerRank-1 | a9fd69a19b7cfca864460c1bec63525f4d023e13 | [
"Apache-2.0"
] | 11 | 2020-05-06T08:28:43.000Z | 2021-12-08T17:25:45.000Z | #!/bin/python3
print("Hello, World!") | 12.666667 | 22 | 0.657895 | #!/bin/python3
print("Hello, World!") | 0 | 0 | 0 |
3865ef09a643d534599f12dec74093133848f10f | 4,675 | py | Python | freerouting-1-4-4-pm/3-build-distribution-with-jdk-14.py | pierremolinaro/ElCanari | fd9d87cee18ad484da263959a1c08424c7264eaf | [
"MIT"
] | 3 | 2019-12-18T12:47:51.000Z | 2020-12-21T14:07:43.000Z | freerouting-1-4-4-pm/3-build-distribution-with-jdk-14.py | pierremolinaro/ElCanari | fd9d87cee18ad484da263959a1c08424c7264eaf | [
"MIT"
] | 1 | 2018-09-11T09:11:45.000Z | 2018-09-12T12:13:10.000Z | freerouting-1-4-4-pm/3-build-distribution-with-jdk-14.py | pierremolinaro/ElCanari | fd9d87cee18ad484da263959a1c08424c7264eaf | [
"MIT"
] | null | null | null | #! /usr/bin/env python
# -*- coding: UTF-8 -*-
#------------------------------------------------------------------------------
# https://developer.apple.com/library/archive/documentation/Security/Conceptual/CodeSigningGuide/Procedures/Procedures.html
#-------------------------------------------------------------------... | 30.555556 | 147 | 0.543316 | #! /usr/bin/env python
# -*- coding: UTF-8 -*-
#------------------------------------------------------------------------------
# https://developer.apple.com/library/archive/documentation/Security/Conceptual/CodeSigningGuide/Procedures/Procedures.html
#-------------------------------------------------------------------... | 293 | 0 | 23 |
0bf8e8edc7e5afc247166fdd4df07eace630c1df | 21,091 | py | Python | train_bboxnet.py | alvari1997/cluster_classifier | 36a40631704a4e47fb84cc3f162b7867ef600fbf | [
"MIT"
] | null | null | null | train_bboxnet.py | alvari1997/cluster_classifier | 36a40631704a4e47fb84cc3f162b7867ef600fbf | [
"MIT"
] | null | null | null | train_bboxnet.py | alvari1997/cluster_classifier | 36a40631704a4e47fb84cc3f162b7867ef600fbf | [
"MIT"
] | null | null | null | from __future__ import print_function
import argparse
from cProfile import label
from dis import dis
import os
import random
from socket import MSG_DONTROUTE
from sklearn import cluster
import torch
import torch.nn.parallel
import torch.optim as optim
import torch.utils.data
from pointnet.dataset import LidarDataset, B... | 39.79434 | 210 | 0.555261 | from __future__ import print_function
import argparse
from cProfile import label
from dis import dis
import os
import random
from socket import MSG_DONTROUTE
from sklearn import cluster
import torch
import torch.nn.parallel
import torch.optim as optim
import torch.utils.data
from pointnet.dataset import LidarDataset, B... | 0 | 0 | 0 |
c890e90a3e98b6bea29fc02df9a08e7506ee1738 | 855 | py | Python | questions/permutations/Solution.py | marcus-aurelianus/leetcode-solutions | 8b43e72fe1f51c84abc3e89b181ca51f09dc7ca6 | [
"MIT"
] | 141 | 2017-12-12T21:45:53.000Z | 2022-03-25T07:03:39.000Z | questions/permutations/Solution.py | marcus-aurelianus/leetcode-solutions | 8b43e72fe1f51c84abc3e89b181ca51f09dc7ca6 | [
"MIT"
] | 32 | 2015-10-05T14:09:52.000Z | 2021-05-30T10:28:41.000Z | questions/permutations/Solution.py | marcus-aurelianus/leetcode-solutions | 8b43e72fe1f51c84abc3e89b181ca51f09dc7ca6 | [
"MIT"
] | 56 | 2015-09-30T05:23:28.000Z | 2022-03-08T07:57:11.000Z | '''
Given a collection of distinct integers, return all possible permutations.
Example:
Input: [1,2,3]
Output:
[
[1,2,3],
[1,3,2],
[2,1,3],
[2,3,1],
[3,1,2],
[3,2,1]
]
'''
| 21.923077 | 74 | 0.48655 | '''
Given a collection of distinct integers, return all possible permutations.
Example:
Input: [1,2,3]
Output:
[
[1,2,3],
[1,3,2],
[2,1,3],
[2,3,1],
[3,1,2],
[3,2,1]
]
'''
class Solution:
def permute(self, nums: List[int]) -> List[List[int]]:
def generate_permutation(nums, ret, curr, visited... | 625 | -6 | 49 |
2a67c24d6509b5402887a363e7b1d2d6392f873a | 3,211 | py | Python | src/nn-mnist.py | NormalReedus/cds-visual-analytics | 4c71251dd71f1850fd9b09c494f766bc6125e747 | [
"MIT"
] | null | null | null | src/nn-mnist.py | NormalReedus/cds-visual-analytics | 4c71251dd71f1850fd9b09c494f766bc6125e747 | [
"MIT"
] | null | null | null | src/nn-mnist.py | NormalReedus/cds-visual-analytics | 4c71251dd71f1850fd9b09c494f766bc6125e747 | [
"MIT"
] | null | null | null | import os
import sys
sys.path.append("..")
import argparse
from pathlib import Path
# Import teaching utils
import pandas as pd
import numpy as np
from utils.neuralnetwork import NeuralNetwork
# Import sklearn metrics
from sklearn import metrics
from sklearn.datasets import fetch_openml
from sklearn.model_selection i... | 38.22619 | 166 | 0.721893 | import os
import sys
sys.path.append("..")
import argparse
from pathlib import Path
# Import teaching utils
import pandas as pd
import numpy as np
from utils.neuralnetwork import NeuralNetwork
# Import sklearn metrics
from sklearn import metrics
from sklearn.datasets import fetch_openml
from sklearn.model_selection i... | 2,241 | 0 | 46 |
223cc87943392828b955528f3c1b7ea45f818aeb | 903 | py | Python | oelint_adv/rule_base/rule_vars_multiinherit.py | gstroz/oelint-adv | 089b43492df0b2ca78e17df26c215e5e19ed90cc | [
"BSD-2-Clause"
] | null | null | null | oelint_adv/rule_base/rule_vars_multiinherit.py | gstroz/oelint-adv | 089b43492df0b2ca78e17df26c215e5e19ed90cc | [
"BSD-2-Clause"
] | null | null | null | oelint_adv/rule_base/rule_vars_multiinherit.py | gstroz/oelint-adv | 089b43492df0b2ca78e17df26c215e5e19ed90cc | [
"BSD-2-Clause"
] | null | null | null | import re
from oelint_adv.cls_item import Variable
from oelint_adv.cls_rule import Rule
| 34.730769 | 88 | 0.522702 | import re
from oelint_adv.cls_item import Variable
from oelint_adv.cls_rule import Rule
class VarMultiInherit(Rule):
def __init__(self):
super().__init__(id="oelint.var.multiinherit",
severity="warning",
message="'{INH}' is included multiple times")
... | 730 | 7 | 76 |
44d8a84ea755c05320437dbed3d21ac22210b698 | 631 | py | Python | bigdataProxy.py | 4evernaive/YOLOv3Tiny_Face_Mask | 4053aac90d6eaece71662b1fcc96b3d974663bc2 | [
"MIT"
] | null | null | null | bigdataProxy.py | 4evernaive/YOLOv3Tiny_Face_Mask | 4053aac90d6eaece71662b1fcc96b3d974663bc2 | [
"MIT"
] | null | null | null | bigdataProxy.py | 4evernaive/YOLOv3Tiny_Face_Mask | 4053aac90d6eaece71662b1fcc96b3d974663bc2 | [
"MIT"
] | 2 | 2021-01-06T14:19:22.000Z | 2021-01-06T15:35:04.000Z | from google.oauth2 import service_account
from google.cloud import bigquery
from datetime import datetime
| 37.117647 | 171 | 0.770206 | from google.oauth2 import service_account
from google.cloud import bigquery
from datetime import datetime
def injectNotificationDataSet(device,image_url,time,area,stream_url,nomask,allp):
client = bigquery.Client(project='chatbot-108aea001-296006',credentials=service_account.Credentials.from_service_account_file... | 499 | 0 | 24 |
8e07f6d0a40c30c1ae062554ab83d36a008a77cc | 1,451 | py | Python | flexneuart/ir_datasets/base.py | gitter-badger/FlexNeuART | f69e5421bdebe9db0d993b5470dace61872f90df | [
"Apache-2.0"
] | 101 | 2020-08-06T07:06:00.000Z | 2022-03-02T15:25:59.000Z | flexneuart/ir_datasets/base.py | gitter-badger/FlexNeuART | f69e5421bdebe9db0d993b5470dace61872f90df | [
"Apache-2.0"
] | 9 | 2020-11-05T23:17:06.000Z | 2021-08-21T06:07:30.000Z | flexneuart/ir_datasets/base.py | gitter-badger/FlexNeuART | f69e5421bdebe9db0d993b5470dace61872f90df | [
"Apache-2.0"
] | 17 | 2020-09-09T22:08:03.000Z | 2022-03-25T09:50:30.000Z | #
# Copyright 2014+ Carnegie Mellon University
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or ag... | 38.184211 | 92 | 0.680221 | #
# Copyright 2014+ Carnegie Mellon University
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or ag... | 0 | 707 | 23 |
3e208f6701e2557c8499a4694562c2b1b0ec266b | 1,289 | py | Python | yamlip.py | jjmurre/yamlip | 479c4c7a476a922354191eb3bb2601550784fdbd | [
"MIT"
] | null | null | null | yamlip.py | jjmurre/yamlip | 479c4c7a476a922354191eb3bb2601550784fdbd | [
"MIT"
] | null | null | null | yamlip.py | jjmurre/yamlip | 479c4c7a476a922354191eb3bb2601550784fdbd | [
"MIT"
] | null | null | null | """yamlip - A yaml interpolation tool"""
__version__ = '0.0.1'
__author__ = 'Jan Murre <jan.murre@catalyz.nl>'
__all__ = []
import functools
from string import Template
from attrdict import AttrDict
import yaml
import click
@click.command()
@click.argument("source_yaml_file")
@click.option("-o", "--output")
| 26.306122 | 90 | 0.679597 | """yamlip - A yaml interpolation tool"""
__version__ = '0.0.1'
__author__ = 'Jan Murre <jan.murre@catalyz.nl>'
__all__ = []
import functools
from string import Template
from attrdict import AttrDict
import yaml
import click
class DotTemplate(Template):
idpattern = r"[a-z][\.\-_a-z0-9]*"
def rgetattr(obj, init... | 836 | 46 | 91 |
afe5f5cbf718b4ce6119b99515def79331c8a71c | 1,084 | py | Python | datastructure/practice/c7/c_7_39.py | stoneyangxu/python-kata | 979af91c74718a525dcd2a83fe53ec6342af9741 | [
"MIT"
] | null | null | null | datastructure/practice/c7/c_7_39.py | stoneyangxu/python-kata | 979af91c74718a525dcd2a83fe53ec6342af9741 | [
"MIT"
] | null | null | null | datastructure/practice/c7/c_7_39.py | stoneyangxu/python-kata | 979af91c74718a525dcd2a83fe53ec6342af9741 | [
"MIT"
] | null | null | null | import unittest
from datastructure.links.PositionList import PositionList
if __name__ == '__main__':
unittest.main()
| 21.68 | 57 | 0.640221 | import unittest
from datastructure.links.PositionList import PositionList
class PositionalQueue:
def __init__(self):
self._position_list = PositionList()
def __len__(self):
return len(self._position_list)
def is_empty(self):
return self._position_list.is_empty()
def enqueue(... | 709 | 16 | 233 |
d2bbec169cf1fbb94e5c0ece719624ec9804f905 | 2,166 | py | Python | mergify_engine/tests/unit/rules/test_parser.py | Madhu-1/mergify-engine | 9ca4f4697cc825230b1584f5587f10393cabc971 | [
"Apache-2.0"
] | null | null | null | mergify_engine/tests/unit/rules/test_parser.py | Madhu-1/mergify-engine | 9ca4f4697cc825230b1584f5587f10393cabc971 | [
"Apache-2.0"
] | null | null | null | mergify_engine/tests/unit/rules/test_parser.py | Madhu-1/mergify-engine | 9ca4f4697cc825230b1584f5587f10393cabc971 | [
"Apache-2.0"
] | null | null | null | # -*- encoding: utf-8 -*-
#
# Copyright © 2018 Julien Danjou <jd@mergify.io>
#
# 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 req... | 39.381818 | 85 | 0.545706 | # -*- encoding: utf-8 -*-
#
# Copyright © 2018 Julien Danjou <jd@mergify.io>
#
# 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 req... | 1,423 | 0 | 46 |
9fb8e676a9ceb154af1c8c119fa1f77cd42228d6 | 740 | py | Python | melodb/loggers/CompositeLogger.py | omarboukhris/melodb | 043907857cd7a73857d8d9b06be0a2282f740253 | [
"BSL-1.0"
] | null | null | null | melodb/loggers/CompositeLogger.py | omarboukhris/melodb | 043907857cd7a73857d8d9b06be0a2282f740253 | [
"BSL-1.0"
] | null | null | null | melodb/loggers/CompositeLogger.py | omarboukhris/melodb | 043907857cd7a73857d8d9b06be0a2282f740253 | [
"BSL-1.0"
] | null | null | null |
from melodb.loggers import ILogger, ConsoleLogger, MongoLogger
from typing import List
| 22.424242 | 62 | 0.744595 |
from melodb.loggers import ILogger, ConsoleLogger, MongoLogger
from typing import List
class CompositeLogger(ILogger):
def __init__(self, loggers: List[ILogger]):
super(CompositeLogger, self).__init__("")
self.loggers = loggers
@staticmethod
def build_composite_logger(
component_name: str,
dburl: str = "... | 483 | 145 | 23 |
fd3666ee0fab2cd9c640657bd1edaac0f3682818 | 10,562 | py | Python | marsyas-vamp/marsyas/scripts/large-evaluators/tempo-reference-implementation/beat_histogram.py | jaouahbi/VampPlugins | 27c2248d1c717417fe4d448cdfb4cb882a8a336a | [
"Apache-2.0"
] | null | null | null | marsyas-vamp/marsyas/scripts/large-evaluators/tempo-reference-implementation/beat_histogram.py | jaouahbi/VampPlugins | 27c2248d1c717417fe4d448cdfb4cb882a8a336a | [
"Apache-2.0"
] | null | null | null | marsyas-vamp/marsyas/scripts/large-evaluators/tempo-reference-implementation/beat_histogram.py | jaouahbi/VampPlugins | 27c2248d1c717417fe4d448cdfb4cb882a8a336a | [
"Apache-2.0"
] | null | null | null | import math
import itertools
import operator
import numpy
import pylab
import scipy.fftpack
import overlap
def autocorrelation(signal):
""" this matches Marsyas exactly. """
N = signal.shape[1]
ffts = scipy.fftpack.fft(signal, 2*N, axis=1) / (2*N)
ffts_abs = abs(ffts)
ffts_abs_scaled = ffts_abs**... | 30.703488 | 83 | 0.506249 | import math
import itertools
import operator
import numpy
import pylab
import scipy.fftpack
import overlap
def autocorrelation(signal):
""" this matches Marsyas exactly. """
N = signal.shape[1]
ffts = scipy.fftpack.fft(signal, 2*N, axis=1) / (2*N)
ffts_abs = abs(ffts)
ffts_abs_scaled = ffts_abs**... | 9,846 | 0 | 211 |
6f8a5b379f68a2e3171d1a9f70029cb8a66e0056 | 7,359 | py | Python | brain-bert/utils/utils.py | MrDoghead/brain-commonsense | 8af7ab25d9113c623660e6eb928de0f4a43abd20 | [
"MIT"
] | null | null | null | brain-bert/utils/utils.py | MrDoghead/brain-commonsense | 8af7ab25d9113c623660e6eb928de0f4a43abd20 | [
"MIT"
] | null | null | null | brain-bert/utils/utils.py | MrDoghead/brain-commonsense | 8af7ab25d9113c623660e6eb928de0f4a43abd20 | [
"MIT"
] | null | null | null | import numpy as np
from sklearn.decomposition import PCA
from scipy.stats import zscore
import time
import csv
import os
import nibabel
from sklearn.metrics.pairwise import euclidean_distances
from scipy.ndimage.filters import gaussian_filter
from utils.ridge_tools import cross_val_ridge, corr
import time as tm
import... | 38.528796 | 176 | 0.646963 | import numpy as np
from sklearn.decomposition import PCA
from scipy.stats import zscore
import time
import csv
import os
import nibabel
from sklearn.metrics.pairwise import euclidean_distances
from scipy.ndimage.filters import gaussian_filter
from utils.ridge_tools import cross_val_ridge, corr
import time as tm
import... | 6,538 | 0 | 169 |
6887058b47e712db78ed24dea8c1377cfe14d302 | 5,122 | py | Python | Code/loader.py | MLPA-DKU/Gait-Analysis | 2c288561be65e76bebd894df8293d856c4078e2c | [
"MIT"
] | 5 | 2020-07-23T05:55:54.000Z | 2021-07-09T22:15:33.000Z | Code/loader.py | MLPA-DKU/Gait-Analysis | 2c288561be65e76bebd894df8293d856c4078e2c | [
"MIT"
] | null | null | null | Code/loader.py | MLPA-DKU/Gait-Analysis | 2c288561be65e76bebd894df8293d856c4078e2c | [
"MIT"
] | 2 | 2020-07-23T06:05:54.000Z | 2021-04-13T05:55:24.000Z | import pandas as pd
import os
import numpy as np
import datetime
import csv
from Code.create_collector import vti_init
from Code.preprocessing import vector_merge
| 33.477124 | 110 | 0.618118 | import pandas as pd
import os
import numpy as np
import datetime
import csv
from Code.create_collector import vti_init
from Code.preprocessing import vector_merge
def path_loader(target):
path_collector = dict()
directories = sorted([folder for folder in os.listdir(target)
if os.path... | 4,813 | 0 | 138 |
5bab5badf9683279c88080d58b0c2344b2ed1d22 | 1,344 | py | Python | main.py | GustavoHdezH/Website-Blocker | df6e2bee470399404653274f906e3463afee5f0a | [
"MIT"
] | null | null | null | main.py | GustavoHdezH/Website-Blocker | df6e2bee470399404653274f906e3463afee5f0a | [
"MIT"
] | null | null | null | main.py | GustavoHdezH/Website-Blocker | df6e2bee470399404653274f906e3463afee5f0a | [
"MIT"
] | null | null | null | import time
from datetime import datetime as dt
"""
host files for windows windows c:\windows\system32\drivers\etc
host files for linux & Mac /ect/hosts
"""
# list paths
hosts_path_system = r"C:\Windows\System32\drivers\etc\hosts"
host_dir = hosts_path_system
#host_dir = "hosts" local
redir = "127.0.0.1"
# ... | 31.255814 | 136 | 0.58631 | import time
from datetime import datetime as dt
"""
host files for windows windows c:\windows\system32\drivers\etc
host files for linux & Mac /ect/hosts
"""
# list paths
hosts_path_system = r"C:\Windows\System32\drivers\etc\hosts"
host_dir = hosts_path_system
#host_dir = "hosts" local
redir = "127.0.0.1"
# ... | 0 | 0 | 0 |
05a1dfdbc5346ff59ea827502b83908fd5ea228d | 1,124 | py | Python | aurora/drivers/util.py | andykee/aurora | 927385b5d8243ecd1c2e6eaab246e4d457510212 | [
"MIT"
] | null | null | null | aurora/drivers/util.py | andykee/aurora | 927385b5d8243ecd1c2e6eaab246e4d457510212 | [
"MIT"
] | 1 | 2021-06-02T23:11:23.000Z | 2021-06-22T22:14:12.000Z | aurora/drivers/util.py | andykee/aurora | 927385b5d8243ecd1c2e6eaab246e4d457510212 | [
"MIT"
] | null | null | null | import importlib
import pkgutil
import aurora.drivers
| 27.414634 | 107 | 0.696619 | import importlib
import pkgutil
import aurora.drivers
def iter_namespace(ns_pkg):
# Specifying the second argument (prefix) to iter_modules makes the
# returned name an absolute name instead of a relative one. This allows
# import_module to work without having to do additional modification to
# the ... | 972 | 0 | 92 |
d9cd1da08e71c31b14ac37edb655f6ce2477eb27 | 2,731 | py | Python | cifar10.py | moskomule/sam.pytorch | 766a038e9ece49fcf74283b309a377bc95054197 | [
"MIT"
] | 101 | 2020-12-30T07:31:33.000Z | 2022-03-30T08:22:39.000Z | cifar10.py | moskomule/sam.pytorch | 766a038e9ece49fcf74283b309a377bc95054197 | [
"MIT"
] | 1 | 2021-04-05T19:57:14.000Z | 2021-04-15T01:40:01.000Z | cifar10.py | moskomule/sam.pytorch | 766a038e9ece49fcf74283b309a377bc95054197 | [
"MIT"
] | 10 | 2020-12-31T02:43:10.000Z | 2022-03-27T10:02:34.000Z | from functools import partial
from typing import Tuple
import chika
import homura
import torch
import torch.nn.functional as F
from homura import lr_scheduler, reporters, trainers
from homura.vision import DATASET_REGISTRY, MODEL_REGISTRY
from sam import SAMSGD as _SAMSGD
@chika.config
@chika.config
@chika.m... | 29.365591 | 107 | 0.633834 | from functools import partial
from typing import Tuple
import chika
import homura
import torch
import torch.nn.functional as F
from homura import lr_scheduler, reporters, trainers
from homura.vision import DATASET_REGISTRY, MODEL_REGISTRY
from sam import SAMSGD as _SAMSGD
def SAM(lr=1e-1, momentum=0.0, dampening=0.... | 1,757 | 420 | 161 |
076ca4822407724857fe3e31d79539177654a693 | 16,470 | py | Python | app/admin/views.py | RagtagOpen/carpools | 56b8f6491a2d347b637b345fbad7bc744130ec7f | [
"Apache-2.0"
] | 11 | 2017-08-23T17:41:43.000Z | 2018-10-24T03:00:38.000Z | app/admin/views.py | RagtagOpen/carpools | 56b8f6491a2d347b637b345fbad7bc744130ec7f | [
"Apache-2.0"
] | 480 | 2017-07-14T00:29:11.000Z | 2020-01-06T19:04:51.000Z | app/admin/views.py | RagtagOpen/carpools | 56b8f6491a2d347b637b345fbad7bc744130ec7f | [
"Apache-2.0"
] | 22 | 2017-07-07T00:07:32.000Z | 2020-02-27T19:43:14.000Z | import csv
import io
from flask import (
current_app,
flash,
redirect,
render_template,
request,
Response,
url_for,
)
from flask_login import current_user
from . import admin_bp
from .forms import (
CancelCarpoolAdminForm,
DeleteDestinationForm,
DestinationForm,
ProfilePurgeF... | 33.47561 | 109 | 0.613236 | import csv
import io
from flask import (
current_app,
flash,
redirect,
render_template,
request,
Response,
url_for,
)
from flask_login import current_user
from . import admin_bp
from .forms import (
CancelCarpoolAdminForm,
DeleteDestinationForm,
DestinationForm,
ProfilePurgeF... | 14,544 | 0 | 397 |
e8764ac8179743789cb0b11839a0841f88bd1b2f | 3,914 | py | Python | experiments/tune_plot.py | trangnv/geb-simulations-h20 | df86e1ad1ff8e98cf2c3f6025d1626d260a3b125 | [
"MIT"
] | 7 | 2021-08-31T13:11:51.000Z | 2022-02-10T09:05:16.000Z | experiments/tune_plot.py | trangnv/geb-simulations-h20 | df86e1ad1ff8e98cf2c3f6025d1626d260a3b125 | [
"MIT"
] | null | null | null | experiments/tune_plot.py | trangnv/geb-simulations-h20 | df86e1ad1ff8e98cf2c3f6025d1626d260a3b125 | [
"MIT"
] | 8 | 2021-09-03T08:29:09.000Z | 2021-12-04T04:20:49.000Z | import sys
import os
import json
import glob
import pandas as pd
import plotly
import plotly.graph_objs as go
if len(sys.argv) != 2:
print("Usage: python tune_plot.py <result_dir>")
print("Example: python tune_pot.py ~/ray_results/objective_mean_2021-04-08_00-07-44/")
result_dir = sys.argv[1]
tune_run = os.p... | 36.240741 | 120 | 0.468574 | import sys
import os
import json
import glob
import pandas as pd
import plotly
import plotly.graph_objs as go
if len(sys.argv) != 2:
print("Usage: python tune_plot.py <result_dir>")
print("Example: python tune_pot.py ~/ray_results/objective_mean_2021-04-08_00-07-44/")
result_dir = sys.argv[1]
tune_run = os.p... | 0 | 0 | 0 |
017188de41467f7e7a397c25e24bc966ad998367 | 3,052 | py | Python | Pytorch/softmaxMnist.py | AutuanLiu/Machine-Learning-on-docker | 00eb7211a3a40a9da02114923647dfd6ac24f138 | [
"Apache-2.0"
] | 11 | 2018-03-18T11:06:59.000Z | 2020-02-23T03:24:43.000Z | Pytorch/softmaxMnist.py | AutuanLiu/Machine-Learning-on-docker | 00eb7211a3a40a9da02114923647dfd6ac24f138 | [
"Apache-2.0"
] | null | null | null | Pytorch/softmaxMnist.py | AutuanLiu/Machine-Learning-on-docker | 00eb7211a3a40a9da02114923647dfd6ac24f138 | [
"Apache-2.0"
] | 4 | 2018-03-28T13:04:26.000Z | 2019-05-29T05:49:52.000Z | #!/usr/bin/env python
# -*- coding: utf-8 -*-
"""
-------------------------------------------------
File Name:softmaxMnist
Description : mnist data sets, softmax model
pytorch 不需要进行 one-hot 编码, 使用类别即可
Email : autuanliu@163.com
Date:18-1-16
"""
import torch.nn as nn
import torch.optim as optim
from torch... | 33.538462 | 130 | 0.6173 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
"""
-------------------------------------------------
File Name:softmaxMnist
Description : mnist data sets, softmax model
pytorch 不需要进行 one-hot 编码, 使用类别即可
Email : autuanliu@163.com
Date:18-1-16
"""
import torch.nn as nn
import torch.optim as optim
from torch... | 1,887 | 1 | 144 |
ec134e9600b59b28012e9fd74a0fe7281e79c18f | 477 | py | Python | 01-basics/04-singlebyte-xor-detect.py | DavidBuchanan314/cryptopals-python3 | fe53fb1d324639193451e11d2d93cb251bce3021 | [
"MIT"
] | null | null | null | 01-basics/04-singlebyte-xor-detect.py | DavidBuchanan314/cryptopals-python3 | fe53fb1d324639193451e11d2d93cb251bce3021 | [
"MIT"
] | null | null | null | 01-basics/04-singlebyte-xor-detect.py | DavidBuchanan314/cryptopals-python3 | fe53fb1d324639193451e11d2d93cb251bce3021 | [
"MIT"
] | null | null | null | from sys import path; path += [".", ".."] # hacky...
from utils import *
if __name__ == "__main__":
ciphertexts = map(dehex, load_data("4.txt").split("\n"))
keyspace = list(range(0x100))
plaintexts = reduce(op.add, [
[xor(ct, [key]) for key in keyspace]
for ct in ciphertexts
])
best_plaintext = min(plaint... | 26.5 | 69 | 0.666667 | from sys import path; path += [".", ".."] # hacky...
from utils import *
if __name__ == "__main__":
ciphertexts = map(dehex, load_data("4.txt").split("\n"))
keyspace = list(range(0x100))
plaintexts = reduce(op.add, [
[xor(ct, [key]) for key in keyspace]
for ct in ciphertexts
])
best_plaintext = min(plaint... | 0 | 0 | 0 |
2f7f32685db80a3f2be2e3f54150ebbe5f582daf | 3,211 | py | Python | packages/sdk/tests/local/test_local_packaging.py | odahu/odahuflow | 58c3220a266a61bb893cf79c4b994569e3445097 | [
"ECL-2.0",
"Apache-2.0"
] | 12 | 2020-10-13T15:39:52.000Z | 2021-10-11T17:13:42.000Z | packages/sdk/tests/local/test_local_packaging.py | odahu/odahuflow | 58c3220a266a61bb893cf79c4b994569e3445097 | [
"ECL-2.0",
"Apache-2.0"
] | 475 | 2019-11-18T12:40:47.000Z | 2022-03-29T21:17:38.000Z | packages/sdk/tests/local/test_local_packaging.py | odahu/odahuflow | 58c3220a266a61bb893cf79c4b994569e3445097 | [
"ECL-2.0",
"Apache-2.0"
] | 4 | 2020-02-25T11:26:10.000Z | 2021-03-10T12:01:00.000Z | # Copyright 2020 EPAM Systems
#
# 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 wri... | 40.1375 | 113 | 0.730925 | # Copyright 2020 EPAM Systems
#
# 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 wri... | 1,659 | 0 | 22 |
7b37bde3bf4c1a3743a3ed4fb7e54c5990ae1044 | 9,597 | py | Python | properties/migrations/0007_auto_20200629_2225.py | Zayanto/Protocol-CRM | c81489d69de581d8216e20f7dd80089116f85c7b | [
"MIT"
] | null | null | null | properties/migrations/0007_auto_20200629_2225.py | Zayanto/Protocol-CRM | c81489d69de581d8216e20f7dd80089116f85c7b | [
"MIT"
] | null | null | null | properties/migrations/0007_auto_20200629_2225.py | Zayanto/Protocol-CRM | c81489d69de581d8216e20f7dd80089116f85c7b | [
"MIT"
] | null | null | null | # Generated by Django 3.0.7 on 2020-06-29 22:25
from django.db import migrations, models
| 40.838298 | 263 | 0.550068 | # Generated by Django 3.0.7 on 2020-06-29 22:25
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('properties', '0006_remove_property_location'),
]
operations = [
migrations.CreateModel(
name='StageBuying',
fields=[... | 0 | 9,483 | 23 |
228a1835d7d8c0c4561e9b598ae0cb4c389c7e67 | 2,749 | py | Python | ros/src/twist_controller/twist_controller.py | Benson516/CarND-Capstone | 6f54bb59e81ce69f1ad1c011ecb73509b8f04c61 | [
"MIT"
] | null | null | null | ros/src/twist_controller/twist_controller.py | Benson516/CarND-Capstone | 6f54bb59e81ce69f1ad1c011ecb73509b8f04c61 | [
"MIT"
] | null | null | null | ros/src/twist_controller/twist_controller.py | Benson516/CarND-Capstone | 6f54bb59e81ce69f1ad1c011ecb73509b8f04c61 | [
"MIT"
] | null | null | null | import rospy
from yaw_controller import YawController
from lowpass import LowPassFilter
from pid import PID
GAS_DENSITY = 2.858
ONE_MPH = 0.44704
| 31.965116 | 89 | 0.548927 | import rospy
from yaw_controller import YawController
from lowpass import LowPassFilter
from pid import PID
GAS_DENSITY = 2.858
ONE_MPH = 0.44704
class Controller(object):
def __init__(self, param_dict):
# TODO: Implement
self.yaw_controller = YawController(param_dict["wheel_base"],
... | 2,517 | 4 | 76 |
a3ae640f8a79b4b5a07050634a3c386363a3bf3c | 1,011 | py | Python | tests/unit/test_api.py | staticdev/github3.py | b9af598dcf1771c083dcc512a2aa8e5008bf4ea8 | [
"MIT"
] | null | null | null | tests/unit/test_api.py | staticdev/github3.py | b9af598dcf1771c083dcc512a2aa8e5008bf4ea8 | [
"MIT"
] | 32 | 2021-02-17T19:46:21.000Z | 2021-05-12T05:56:03.000Z | tests/unit/test_api.py | staticdev/github3.py | b9af598dcf1771c083dcc512a2aa8e5008bf4ea8 | [
"MIT"
] | null | null | null | """Unit tests for github4.api."""
import unittest.mock
import github4
class TestAPI(unittest.TestCase):
"""All tests for the github4.api module."""
def test_enterprise_login(self):
"""Show that github4.enterprise_login returns GitHubEnterprise."""
args = ("login", "password", None, "https:/... | 37.444444 | 84 | 0.65183 | """Unit tests for github4.api."""
import unittest.mock
import github4
class TestAPI(unittest.TestCase):
"""All tests for the github4.api module."""
def test_enterprise_login(self):
"""Show that github4.enterprise_login returns GitHubEnterprise."""
args = ("login", "password", None, "https:/... | 0 | 0 | 0 |
fa64022251c523bf266eb1aed5874bafa1bed4a3 | 4,880 | py | Python | tests/test_api.py | filepreviews/filepreviews-python | eb50d527a8f1a2942f1be2c2bc057b5da4879ecd | [
"MIT"
] | 4 | 2017-01-24T17:03:34.000Z | 2021-09-05T15:08:27.000Z | tests/test_api.py | filepreviews/filepreviews-python | eb50d527a8f1a2942f1be2c2bc057b5da4879ecd | [
"MIT"
] | 1 | 2021-05-15T22:10:20.000Z | 2021-05-15T22:10:20.000Z | tests/test_api.py | filepreviews/filepreviews-python | eb50d527a8f1a2942f1be2c2bc057b5da4879ecd | [
"MIT"
] | 2 | 2017-02-14T08:02:55.000Z | 2020-12-05T13:17:25.000Z | import json
import pytest
import responses
from filepreviews import API_URL, FilePreviews, exceptions
file_previews = FilePreviews(api_key="DUMMY_API_KEY", api_secret="DUMMY_SECRET_KEY")
@responses.activate
@responses.activate
@responses.activate
@responses.activate
@responses.activate
| 27.727273 | 88 | 0.545697 | import json
import pytest
import responses
from filepreviews import API_URL, FilePreviews, exceptions
file_previews = FilePreviews(api_key="DUMMY_API_KEY", api_secret="DUMMY_SECRET_KEY")
@responses.activate
def test_api_generate():
def request_callback(request):
body = {
"id": "1",
... | 4,470 | 0 | 110 |
10f9f5f2bc5a39c36c0807c9975bf5bc17848bc0 | 23,845 | py | Python | ai.py | mandaw2014/Rally | cafc12aff75bf1a158753d08ae36eb4056dcb1e0 | [
"MIT"
] | 1 | 2022-03-28T01:18:31.000Z | 2022-03-28T01:18:31.000Z | ai.py | mandaw2014/Rally | cafc12aff75bf1a158753d08ae36eb4056dcb1e0 | [
"MIT"
] | null | null | null | ai.py | mandaw2014/Rally | cafc12aff75bf1a158753d08ae36eb4056dcb1e0 | [
"MIT"
] | 1 | 2022-03-17T22:26:20.000Z | 2022-03-17T22:26:20.000Z | from ursina import *
from ursina import curve
from particles import ParticleSystem
sign = lambda x: -1 if x < 0 else (1 if x > 0 else 0) | 71.392216 | 1,156 | 0.625708 | from ursina import *
from ursina import curve
from particles import ParticleSystem
sign = lambda x: -1 if x < 0 else (1 if x > 0 else 0)
class AICar(Entity):
def __init__(self, car, sand_track, grass_track, snow_track, plains_track):
super().__init__(
model = "car.obj",
position = ... | 23,526 | 3 | 179 |
c2d338e18b66c01319cc8393b1f86d815804b2e7 | 2,791 | py | Python | parlai/agents/programr/robot/sentimentdata.py | roholazandie/ParlAI | 32352cab81ecb666aefd596232c5ed9f33cbaeb9 | [
"MIT"
] | null | null | null | parlai/agents/programr/robot/sentimentdata.py | roholazandie/ParlAI | 32352cab81ecb666aefd596232c5ed9f33cbaeb9 | [
"MIT"
] | null | null | null | parlai/agents/programr/robot/sentimentdata.py | roholazandie/ParlAI | 32352cab81ecb666aefd596232c5ed9f33cbaeb9 | [
"MIT"
] | null | null | null | import numpy as np
DISTRIBUTION_SIZE = 10
NEGATIVE_THRESHOLD = -2.5
| 32.453488 | 95 | 0.60301 | import numpy as np
DISTRIBUTION_SIZE = 10
NEGATIVE_THRESHOLD = -2.5
class SentimentData():
def __init__(self):
self._sentiment_values = np.zeros(DISTRIBUTION_SIZE)
self._rolling_sentiment = 0
self._neg_thresh = NEGATIVE_THRESHOLD
self._threshold_reached = False
self.init_... | 2,292 | 407 | 23 |
9fb8bf70fcac7fc0e1d816b67d336fa1321bc8ed | 18,032 | py | Python | rlkit/torch/irl/disc_models/other_v1p0_disc_models.py | yifan-you-37/rl_swiss | 8b0ee7caa5c1fa93860916004cf4fd970667764f | [
"MIT"
] | 56 | 2019-10-20T03:09:02.000Z | 2022-03-25T09:21:40.000Z | rlkit/torch/irl/disc_models/other_v1p0_disc_models.py | yifan-you-37/rl_swiss | 8b0ee7caa5c1fa93860916004cf4fd970667764f | [
"MIT"
] | 3 | 2020-10-01T07:33:51.000Z | 2021-05-12T03:40:57.000Z | rlkit/torch/irl/disc_models/other_v1p0_disc_models.py | yifan-you-37/rl_swiss | 8b0ee7caa5c1fa93860916004cf4fd970667764f | [
"MIT"
] | 10 | 2019-11-04T16:56:09.000Z | 2022-03-25T09:21:41.000Z | import torch
import torch.nn as nn
import torch.nn.functional as F
from torch.autograd import Variable
from rlkit.torch.core import PyTorchModule
from rlkit.torch.networks import Mlp, identity
from rlkit.torch import pytorch_util as ptu
from copy import deepcopy
... | 34.281369 | 113 | 0.609306 | import torch
import torch.nn as nn
import torch.nn.functional as F
from torch.autograd import Variable
from rlkit.torch.core import PyTorchModule
from rlkit.torch.networks import Mlp, identity
from rlkit.torch import pytorch_util as ptu
from copy import deepcopy
class ThreeWayResNetAIRLDisc(ResNetAIRLDisc):
def... | 15,587 | 230 | 768 |
3f4e80a85e1b0df0823521f49e0f3c23eaa69849 | 1,461 | py | Python | bin/Archive/read.json.py | rubenchazarra/AS_Function_Evaluator | 5942d074fb03726fe539f8ecf37db09f8132922e | [
"MIT"
] | null | null | null | bin/Archive/read.json.py | rubenchazarra/AS_Function_Evaluator | 5942d074fb03726fe539f8ecf37db09f8132922e | [
"MIT"
] | null | null | null | bin/Archive/read.json.py | rubenchazarra/AS_Function_Evaluator | 5942d074fb03726fe539f8ecf37db09f8132922e | [
"MIT"
] | null | null | null |
import argparse
import sys
import json
if __name__ == "__main__":
main()
| 20.871429 | 117 | 0.499658 |
import argparse
import sys
import json
def main():
global args
global json_file
parser = argparse.ArgumentParser()
parser.add_argument('-json_file', metavar='<json_file>', dest="json_file", help="JSON file output by PFAM database")
args = parser.parse_args()
## Prep global objects
json_file = str(args.... | 1,357 | 0 | 23 |
cc9098ccaf76a651fffae1eccde9e2b362f7b70a | 433 | py | Python | passing_numpy_array/setup.py | JFeaux/cython_demo | 5be2db83fb2c4c948d8c0f26dee578798202e94f | [
"MIT"
] | 1 | 2019-04-23T03:09:39.000Z | 2019-04-23T03:09:39.000Z | passing_numpy_array/setup.py | JFeaux/cython_demo | 5be2db83fb2c4c948d8c0f26dee578798202e94f | [
"MIT"
] | null | null | null | passing_numpy_array/setup.py | JFeaux/cython_demo | 5be2db83fb2c4c948d8c0f26dee578798202e94f | [
"MIT"
] | null | null | null | from distutils.core import setup
from Cython.Build import cythonize
from distutils.extension import Extension
import numpy as np
sourcefiles = ['array_tools.pyx', '_sum.cpp']
extra_compile_args = []
libraries = []
ext = [Extension('*',
sourcefiles,
extra_compile_args=extra_compile_args,
libr... | 22.789474 | 66 | 0.690531 | from distutils.core import setup
from Cython.Build import cythonize
from distutils.extension import Extension
import numpy as np
sourcefiles = ['array_tools.pyx', '_sum.cpp']
extra_compile_args = []
libraries = []
ext = [Extension('*',
sourcefiles,
extra_compile_args=extra_compile_args,
libr... | 0 | 0 | 0 |
e2b51acb6cb17ac32a52f8de649020de26bc5c20 | 9,128 | py | Python | primehub/models.py | InfuseAI/primehub-python-sdk | edbdbcb3e41f0c99e4542245de1345a64f509fb4 | [
"Apache-2.0"
] | 10 | 2021-09-13T23:14:22.000Z | 2022-02-06T06:07:40.000Z | primehub/models.py | KellenJohn/primehub-python-sdk | edbdbcb3e41f0c99e4542245de1345a64f509fb4 | [
"Apache-2.0"
] | 4 | 2021-08-10T03:10:27.000Z | 2021-12-16T02:11:50.000Z | primehub/models.py | KellenJohn/primehub-python-sdk | edbdbcb3e41f0c99e4542245de1345a64f509fb4 | [
"Apache-2.0"
] | 1 | 2021-12-21T11:59:51.000Z | 2021-12-21T11:59:51.000Z | import textwrap
from typing import Iterator, Any
from primehub import Helpful, cmd, Module
from primehub.utils.display import display_tree_like_format
| 33.807407 | 115 | 0.567704 | import textwrap
from typing import Iterator, Any
from primehub import Helpful, cmd, Module
from primehub.utils.display import display_tree_like_format
def timestamp_to_isoformat(timestamp):
unix_timestamp = int(int(timestamp) / 1000)
from datetime import datetime
return datetime.fromtimestamp(unix_timest... | 3,050 | 5,878 | 46 |
bd5ab117d585128256e9f43687b2f40ea381e07b | 1,691 | py | Python | omc_python_app/views.py | Hooker41/Exchange-Trading-Order-Management-Tool | d7f6878655f0fe08c15b6d2b0b5b0db487b97430 | [
"MIT"
] | null | null | null | omc_python_app/views.py | Hooker41/Exchange-Trading-Order-Management-Tool | d7f6878655f0fe08c15b6d2b0b5b0db487b97430 | [
"MIT"
] | null | null | null | omc_python_app/views.py | Hooker41/Exchange-Trading-Order-Management-Tool | d7f6878655f0fe08c15b6d2b0b5b0db487b97430 | [
"MIT"
] | null | null | null | from django.shortcuts import render
from django.views.generic import TemplateView
from django.http import HttpResponse, JsonResponse, HttpResponseForbidden, HttpResponseBadRequest
import ccxt
# Create your views here.
exchangeIns = {}
| 27.721311 | 99 | 0.691307 | from django.shortcuts import render
from django.views.generic import TemplateView
from django.http import HttpResponse, JsonResponse, HttpResponseForbidden, HttpResponseBadRequest
import ccxt
# Create your views here.
def getExchanges(request):
exchangeName = request.GET["exchange"]
print(exchangeName)
... | 1,361 | 0 | 91 |
b5da938235e6816cfd761ec8546d351be3bd180e | 30 | py | Python | lib/python3.4/tokenize.py | caiocsalvador/whats_the_craic | c49ef62f1acd7379f6fd90c2b93aa1fa00c8661d | [
"MIT"
] | 7 | 2017-04-26T12:28:22.000Z | 2021-02-09T18:59:50.000Z | django-ng/lib/python3.4/tokenize.py | Arsalen/BusinessStrategies | 209e57340359af3ea063c064982198848dc36c5f | [
"MIT"
] | 13 | 2015-12-04T03:38:37.000Z | 2015-12-12T00:15:46.000Z | django-ng/lib/python3.4/tokenize.py | Arsalen/BusinessStrategies | 209e57340359af3ea063c064982198848dc36c5f | [
"MIT"
] | 8 | 2017-06-01T08:42:16.000Z | 2020-07-23T12:30:19.000Z | /usr/lib/python3.4/tokenize.py | 30 | 30 | 0.8 | /usr/lib/python3.4/tokenize.py | 0 | 0 | 0 |
683aaa70f4e21185ee6a7cdb4a48ac989e06ef19 | 1,954 | py | Python | core/polyaxon/polypod/compiler/resolver/resolver.py | erexer/polyaxon | be14dae1ed56d568983388736bcdaf27a7baa4a4 | [
"Apache-2.0"
] | null | null | null | core/polyaxon/polypod/compiler/resolver/resolver.py | erexer/polyaxon | be14dae1ed56d568983388736bcdaf27a7baa4a4 | [
"Apache-2.0"
] | null | null | null | core/polyaxon/polypod/compiler/resolver/resolver.py | erexer/polyaxon | be14dae1ed56d568983388736bcdaf27a7baa4a4 | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/python
#
# Copyright 2018-2020 Polyaxon, 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 ... | 31.015873 | 98 | 0.701126 | #!/usr/bin/python
#
# Copyright 2018-2020 Polyaxon, 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 ... | 1,092 | 0 | 23 |
37832db13561a35be24cf2bec836422c123e4278 | 7,192 | py | Python | fuzzers/030-iob/process_rdb.py | rw1nkler/prjxray | aff076b47dcf6d653eb3ce791b41fd6cf4343edd | [
"ISC"
] | 1 | 2021-12-16T03:09:59.000Z | 2021-12-16T03:09:59.000Z | fuzzers/030-iob/process_rdb.py | rw1nkler/prjxray | aff076b47dcf6d653eb3ce791b41fd6cf4343edd | [
"ISC"
] | null | null | null | fuzzers/030-iob/process_rdb.py | rw1nkler/prjxray | aff076b47dcf6d653eb3ce791b41fd6cf4343edd | [
"ISC"
] | 1 | 2020-11-10T01:57:12.000Z | 2020-11-10T01:57:12.000Z | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
#
# Copyright (C) 2017-2020 The Project X-Ray Authors.
#
# Use of this source code is governed by a ISC-style
# license that can be found in the LICENSE file or at
# https://opensource.org/licenses/ISC
#
# SPDX-License-Identifier: ISC
""" IOB bits are more complicated tha... | 32.107143 | 82 | 0.525028 | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
#
# Copyright (C) 2017-2020 The Project X-Ray Authors.
#
# Use of this source code is governed by a ISC-style
# license that can be found in the LICENSE file or at
# https://opensource.org/licenses/ISC
#
# SPDX-License-Identifier: ISC
""" IOB bits are more complicated tha... | 5,816 | 0 | 119 |
26b0f3e5bae776ac1dad54c81206538a9984b7fb | 2,175 | py | Python | pset8/mashup/helpers.py | Star1111/cs50 | 0ef91b4558e4e080512045cb5035ecf9f9294047 | [
"Unlicense"
] | 2 | 2020-11-03T08:31:31.000Z | 2021-03-20T16:40:34.000Z | pset8/mashup/helpers.py | Star1111/cs50 | 0ef91b4558e4e080512045cb5035ecf9f9294047 | [
"Unlicense"
] | null | null | null | pset8/mashup/helpers.py | Star1111/cs50 | 0ef91b4558e4e080512045cb5035ecf9f9294047 | [
"Unlicense"
] | null | null | null | import feedparser
import urllib.parse
from random import shuffle, seed
UKR_NEWS = ["https://news.yandex.ua/index.rss", "http://www.ukr-portal.com/php/rss_1.xml", "http://news.finance.ua/ru/rss", "http://www.ua.rian.ru/export/rss2/index.xml", "http://feeds.feedburner.com/zaxid/rss_ua", "http://www.dt.ua/export.rss", "h... | 35.655738 | 302 | 0.581149 | import feedparser
import urllib.parse
from random import shuffle, seed
UKR_NEWS = ["https://news.yandex.ua/index.rss", "http://www.ukr-portal.com/php/rss_1.xml", "http://news.finance.ua/ru/rss", "http://www.ua.rian.ru/export/rss2/index.xml", "http://feeds.feedburner.com/zaxid/rss_ua", "http://www.dt.ua/export.rss", "h... | 0 | 0 | 0 |
51d1b802f5cf738b16c5ae33596de8b712c69625 | 12,438 | py | Python | md.py | dormrod/molecular_dynamics_300_lines | 4c0993436af0d048fb0ccf56416156a3ff9575dc | [
"MIT"
] | 1 | 2021-11-28T03:50:43.000Z | 2021-11-28T03:50:43.000Z | md.py | dormrod/molecular_dynamics_300_lines | 4c0993436af0d048fb0ccf56416156a3ff9575dc | [
"MIT"
] | null | null | null | md.py | dormrod/molecular_dynamics_300_lines | 4c0993436af0d048fb0ccf56416156a3ff9575dc | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
"""
Single Molecule Molecular Dynamics Code
Created 2018 by David of Theoretically Speaking
Please Modify!
"""
from __future__ import print_function
import os
import sys
import numpy as np
# Global variables for unit conversions
hartree = 4.35974465e-18 # J, atomic unit of energy
emass = 5.... | 41.46 | 136 | 0.659752 | # -*- coding: utf-8 -*-
"""
Single Molecule Molecular Dynamics Code
Created 2018 by David of Theoretically Speaking
Please Modify!
"""
from __future__ import print_function
import os
import sys
import numpy as np
# Global variables for unit conversions
hartree = 4.35974465e-18 # J, atomic unit of energy
emass = 5.... | 0 | 0 | 0 |
8c6bf3b641e19bfc1b8c5b7ba9cc7a8c661082f1 | 385 | py | Python | arcade_solutions/the_core/minimal_number_of_coins.py | nickaigi/automatic-dollop | eb8222475c7871c1d5710242c5aed8c70ea0d2c8 | [
"Unlicense"
] | null | null | null | arcade_solutions/the_core/minimal_number_of_coins.py | nickaigi/automatic-dollop | eb8222475c7871c1d5710242c5aed8c70ea0d2c8 | [
"Unlicense"
] | null | null | null | arcade_solutions/the_core/minimal_number_of_coins.py | nickaigi/automatic-dollop | eb8222475c7871c1d5710242c5aed8c70ea0d2c8 | [
"Unlicense"
] | null | null | null |
if __name__ == '__main__':
coins = [1, 2, 10]
price = 28
print(minimal_number_of_coins(coins, price))
| 20.263158 | 48 | 0.532468 | def minimal_number_of_coins(coins, price):
bal = price
index = len(coins)
count = 0
while bal > 0:
if bal >= max(coins[:index]):
bal -= max(coins[:index])
count += 1
else:
index -= 1
return count
if __name__ == '__main__':
coins = [1, 2, 10]... | 246 | 0 | 22 |
5f1d561e0888224c7a27c412dd415c7268cd26e8 | 1,284 | py | Python | extensions/.stubs/clrclasses/System/Security/Principal/__init__.py | vicwjb/Pycad | 7391cd694b7a91ad9f9964ec95833c1081bc1f84 | [
"MIT"
] | 1 | 2020-03-25T03:27:24.000Z | 2020-03-25T03:27:24.000Z | extensions/.stubs/clrclasses/System/Security/Principal/__init__.py | vicwjb/Pycad | 7391cd694b7a91ad9f9964ec95833c1081bc1f84 | [
"MIT"
] | null | null | null | extensions/.stubs/clrclasses/System/Security/Principal/__init__.py | vicwjb/Pycad | 7391cd694b7a91ad9f9964ec95833c1081bc1f84 | [
"MIT"
] | null | null | null | from __clrclasses__.System.Security.Principal import GenericIdentity
from __clrclasses__.System.Security.Principal import GenericPrincipal
from __clrclasses__.System.Security.Principal import IdentityNotMappedException
from __clrclasses__.System.Security.Principal import IdentityReference
from __clrclasses__.System.Sec... | 67.578947 | 80 | 0.901869 | from __clrclasses__.System.Security.Principal import GenericIdentity
from __clrclasses__.System.Security.Principal import GenericPrincipal
from __clrclasses__.System.Security.Principal import IdentityNotMappedException
from __clrclasses__.System.Security.Principal import IdentityReference
from __clrclasses__.System.Sec... | 0 | 0 | 0 |
b833ad917e8e62666c705ef6a8024619ade36972 | 9,830 | py | Python | Python/Library/externalIndices.py | williamegomez/Clustering-Validation-Indices | dda99f115a34acaef513e7ac589f602eddf4c217 | [
"MIT"
] | 1 | 2019-10-11T11:28:47.000Z | 2019-10-11T11:28:47.000Z | Python/Library/externalIndices.py | williamegomez/Clustering-Validation-Indices | dda99f115a34acaef513e7ac589f602eddf4c217 | [
"MIT"
] | null | null | null | Python/Library/externalIndices.py | williamegomez/Clustering-Validation-Indices | dda99f115a34acaef513e7ac589f602eddf4c217 | [
"MIT"
] | 1 | 2019-10-11T11:32:42.000Z | 2019-10-11T11:32:42.000Z | import math
import numpy as np
from nltk.metrics.association import TOTAL
from sklearn import metrics
from matplotlib.mlab import entropy
| 41.476793 | 113 | 0.525025 | import math
import numpy as np
from nltk.metrics.association import TOTAL
from sklearn import metrics
from matplotlib.mlab import entropy
class ExternalIndices:
def __init__(self, true_labels, clust_labels):
self.true_labels = true_labels - 1
self.clust_labels = clust_labels - 1
se... | 8,930 | 1 | 724 |
383ce389bab3cf0aa4ba4071205d243982ebb53c | 466 | py | Python | project/RealEstateMarketPlace/forms/RegisterForm.py | Mihaaai/RealEstateMarketplace | 9b9fa1376436801303e1ed0207ef09845a7d827e | [
"Apache-2.0"
] | null | null | null | project/RealEstateMarketPlace/forms/RegisterForm.py | Mihaaai/RealEstateMarketplace | 9b9fa1376436801303e1ed0207ef09845a7d827e | [
"Apache-2.0"
] | null | null | null | project/RealEstateMarketPlace/forms/RegisterForm.py | Mihaaai/RealEstateMarketplace | 9b9fa1376436801303e1ed0207ef09845a7d827e | [
"Apache-2.0"
] | null | null | null | from django import forms
from ..models import User
from django.contrib.auth.forms import UserCreationForm
| 27.411765 | 63 | 0.693133 | from django import forms
from ..models import User
from django.contrib.auth.forms import UserCreationForm
class RegisterForm(UserCreationForm):
class Meta:
model = User
fields = (
'email', 'first_name', 'last_name', 'phone_number',
)
email = forms.EmailField(required=True)... | 0 | 336 | 23 |
da55e0f85c135dc0582e1cec208f874daa211773 | 129 | py | Python | pokemon/001bulbasaur.py | julio177/ascii-pokedex | 2727d3f3257abd746300248ae75e11cae2c40ea3 | [
"MIT"
] | null | null | null | pokemon/001bulbasaur.py | julio177/ascii-pokedex | 2727d3f3257abd746300248ae75e11cae2c40ea3 | [
"MIT"
] | null | null | null | pokemon/001bulbasaur.py | julio177/ascii-pokedex | 2727d3f3257abd746300248ae75e11cae2c40ea3 | [
"MIT"
] | null | null | null | '''Bulbasaur, Ivysaur and Venusaur'''
from __init__ import Pokemon
Bulbasaur = Pokemon('generation_1/001.txt')
print(Bulbasaur)
| 21.5 | 43 | 0.775194 | '''Bulbasaur, Ivysaur and Venusaur'''
from __init__ import Pokemon
Bulbasaur = Pokemon('generation_1/001.txt')
print(Bulbasaur)
| 0 | 0 | 0 |
eb09fc0a7afbff14bdc368e14c389265dedd069e | 138 | py | Python | tests/conftest.py | andreyfedoseev/django-media-definitions | a96c6d66cb4ea89e9521e419f9ecbea8b4ffe9af | [
"MIT"
] | 2 | 2017-05-15T07:59:00.000Z | 2017-07-29T08:58:26.000Z | tests/conftest.py | andreyfedoseev/django-media-definitions | a96c6d66cb4ea89e9521e419f9ecbea8b4ffe9af | [
"MIT"
] | null | null | null | tests/conftest.py | andreyfedoseev/django-media-definitions | a96c6d66cb4ea89e9521e419f9ecbea8b4ffe9af | [
"MIT"
] | 1 | 2018-02-16T05:02:12.000Z | 2018-02-16T05:02:12.000Z | import django
from django.conf import settings
| 17.25 | 45 | 0.746377 | import django
from django.conf import settings
def pytest_configure():
settings.configure(STATIC_URL="/static/")
django.setup()
| 67 | 0 | 23 |
4d5ea548eddd8bc8ca4e3717d9cb16eda6b1c591 | 951 | py | Python | leetcode/207.course-schedule.py | schio/algorithm_test | c240faca428a9adb2970591338d4792b2f4fb7f3 | [
"MIT"
] | null | null | null | leetcode/207.course-schedule.py | schio/algorithm_test | c240faca428a9adb2970591338d4792b2f4fb7f3 | [
"MIT"
] | null | null | null | leetcode/207.course-schedule.py | schio/algorithm_test | c240faca428a9adb2970591338d4792b2f4fb7f3 | [
"MIT"
] | null | null | null | #
# @lc app=leetcode id=207 lang=python3
#
# [207] Course Schedule
#
# @lc code=start
# @lc code=end
| 19.8125 | 81 | 0.466877 | #
# @lc app=leetcode id=207 lang=python3
#
# [207] Course Schedule
#
# @lc code=start
class Solution:
def canFinish(self, numCourses: int, prerequisites: List[List[int]]) -> bool:
graph = collections.defaultdict(list)
# make graph
for x, y in prerequisites:
graph[x].append(y)
... | 875 | -6 | 48 |
6a1b221b40ffc1a9f30f8e3c2ffc4fc69bcecad8 | 9,313 | py | Python | tests/test_security.py | Jimvin/nipyapi | 826beac376d4321bd2d69491f09086474c7e7bfb | [
"Apache-2.0"
] | 199 | 2017-08-24T12:19:41.000Z | 2022-03-20T14:50:17.000Z | tests/test_security.py | Jimvin/nipyapi | 826beac376d4321bd2d69491f09086474c7e7bfb | [
"Apache-2.0"
] | 275 | 2017-08-28T21:21:49.000Z | 2022-03-29T17:57:26.000Z | tests/test_security.py | Jimvin/nipyapi | 826beac376d4321bd2d69491f09086474c7e7bfb | [
"Apache-2.0"
] | 73 | 2017-09-07T10:13:56.000Z | 2022-02-28T10:37:21.000Z | #!/usr/bin/env python
# -*- coding: utf-8 -*-
"""Tests for nipyapi security module."""
from __future__ import absolute_import
import pytest
from tests import conftest
import nipyapi
# Tells pytest to skip this module of security testing is not enabled.
pytestmark = pytest.mark.skipif(not conftest.test_security, reas... | 35.681992 | 104 | 0.719747 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
"""Tests for nipyapi security module."""
from __future__ import absolute_import
import pytest
from tests import conftest
import nipyapi
# Tells pytest to skip this module of security testing is not enabled.
pytestmark = pytest.mark.skipif(not conftest.test_security, reas... | 8,130 | 0 | 437 |
1a733cf776ecb3c6b1ac3142642e6e5092c63616 | 3,038 | py | Python | gettingstarted/urls.py | TomWerner/AlumniMentoring | d4bac09fc768232f0795a0672eb041a2225118ae | [
"MIT"
] | 2 | 2016-10-19T17:04:53.000Z | 2017-07-23T21:49:34.000Z | gettingstarted/urls.py | TomWerner/AlumniMentoring | d4bac09fc768232f0795a0672eb041a2225118ae | [
"MIT"
] | null | null | null | gettingstarted/urls.py | TomWerner/AlumniMentoring | d4bac09fc768232f0795a0672eb041a2225118ae | [
"MIT"
] | null | null | null | from django.conf.urls import include, url
from django.contrib import admin
from django.contrib.auth.forms import UserCreationForm
from django.views.generic import CreateView
from django.views.generic import RedirectView
admin.autodiscover()
from django.conf import settings
from django.conf.urls.static import static
... | 46.738462 | 106 | 0.705069 | from django.conf.urls import include, url
from django.contrib import admin
from django.contrib.auth.forms import UserCreationForm
from django.views.generic import CreateView
from django.views.generic import RedirectView
admin.autodiscover()
from django.conf import settings
from django.conf.urls.static import static
... | 0 | 0 | 0 |
3afe37cef1db69cd3def4683c3a30bcaf890a308 | 3,207 | py | Python | test/integration/config_service_test.py | stelligent/potemkin-decorator | 2d30cf07a580f5aad67d7d595e3bcd622bc0e232 | [
"MIT"
] | 9 | 2020-03-25T02:20:54.000Z | 2021-12-29T08:09:17.000Z | test/integration/config_service_test.py | stelligent/potemkin-decorator | 2d30cf07a580f5aad67d7d595e3bcd622bc0e232 | [
"MIT"
] | 12 | 2020-03-24T17:42:45.000Z | 2020-05-08T21:46:59.000Z | test/integration/config_service_test.py | stelligent/potemkin-decorator | 2d30cf07a580f5aad67d7d595e3bcd622bc0e232 | [
"MIT"
] | 1 | 2020-08-25T13:47:30.000Z | 2020-08-25T13:47:30.000Z | import pytest
import potemkin
import boto3
from potemkin.configservice import evaluate_config_rule_and_wait_for_resource, config_rule_wait_for_resource, config_rule_wait_for_absent_resources, config_rule_wait_for_compliance_results
@potemkin.CloudFormationStack('test/integration/test_templates/eip.yml',
... | 34.858696 | 188 | 0.751169 | import pytest
import potemkin
import boto3
from potemkin.configservice import evaluate_config_rule_and_wait_for_resource, config_rule_wait_for_resource, config_rule_wait_for_absent_resources, config_rule_wait_for_compliance_results
@potemkin.CloudFormationStack('test/integration/test_templates/eip.yml',
... | 2,287 | 0 | 134 |
d565975d5c6295b512c456ab9bae2b597eba5e6d | 260 | py | Python | partner_ngos/programs_management/doctype/programs/programs.py | AkramMutaher/partner_ngos | 4a345fb6989ff5a21db7fca07aa4e5174dca8f59 | [
"MIT"
] | 1 | 2021-06-03T17:14:08.000Z | 2021-06-03T17:14:08.000Z | partner_ngos/programs_management/doctype/programs/programs.py | AkramMutaher/partner_ngos | 4a345fb6989ff5a21db7fca07aa4e5174dca8f59 | [
"MIT"
] | null | null | null | partner_ngos/programs_management/doctype/programs/programs.py | AkramMutaher/partner_ngos | 4a345fb6989ff5a21db7fca07aa4e5174dca8f59 | [
"MIT"
] | 1 | 2021-10-09T16:20:09.000Z | 2021-10-09T16:20:09.000Z | # -*- coding: utf-8 -*-
# Copyright (c) 2020, Akram Mutaher and contributors
# For license information, please see license.txt
from __future__ import unicode_literals
# import frappe
from frappe.model.document import Document
| 23.636364 | 52 | 0.773077 | # -*- coding: utf-8 -*-
# Copyright (c) 2020, Akram Mutaher and contributors
# For license information, please see license.txt
from __future__ import unicode_literals
# import frappe
from frappe.model.document import Document
class Programs(Document):
pass
| 0 | 10 | 23 |
37e220aa191b5c091355a0d9f206340516811513 | 1,035 | py | Python | minerals/context_processors.py | mhunterak/TD_Mineral_Catalog | dc76289274b83d44fd76dafb2e734843d11675a0 | [
"MIT"
] | null | null | null | minerals/context_processors.py | mhunterak/TD_Mineral_Catalog | dc76289274b83d44fd76dafb2e734843d11675a0 | [
"MIT"
] | null | null | null | minerals/context_processors.py | mhunterak/TD_Mineral_Catalog | dc76289274b83d44fd76dafb2e734843d11675a0 | [
"MIT"
] | null | null | null | '''
Context Processors do some pretty great work, like default arguments supplied
to templates when they're rendered. kind of like Macros in Flask, but even more
powerful.
'''
import string
from django.utils.datastructures import MultiValueDictKeyError
from .forms import SearchForm
from .static_vars import COLORS, GR... | 24.069767 | 79 | 0.687923 | '''
Context Processors do some pretty great work, like default arguments supplied
to templates when they're rendered. kind of like Macros in Flask, but even more
powerful.
'''
import string
from django.utils.datastructures import MultiValueDictKeyError
from .forms import SearchForm
from .static_vars import COLORS, GR... | 0 | 0 | 0 |
fa8f707b07aac17427883b74e5ed9efe4487c86a | 143 | py | Python | pushover/__init__.py | ccoder64/pushover-python | 6be770ecb7d269169718c02c14d9ba35fa0c8715 | [
"MIT"
] | null | null | null | pushover/__init__.py | ccoder64/pushover-python | 6be770ecb7d269169718c02c14d9ba35fa0c8715 | [
"MIT"
] | null | null | null | pushover/__init__.py | ccoder64/pushover-python | 6be770ecb7d269169718c02c14d9ba35fa0c8715 | [
"MIT"
] | null | null | null | """
pushover simple api
~~~~~~~~~~~~~~~~~~~
"""
__author__ = "toloy"
from .pushover import Pushover, PushoverException
| 13 | 50 | 0.524476 | """
pushover simple api
~~~~~~~~~~~~~~~~~~~
"""
__author__ = "toloy"
from .pushover import Pushover, PushoverException
| 0 | 0 | 0 |
a7f943ad32a943a1947fc358318e58687aeadc3a | 420 | py | Python | kubernetes_typed/client/models/v1beta1_certificate_signing_request_condition.py | sobolevn/kubernetes-typed | 5f0a770631c73a9831fbeaeebac188e8f4a52c54 | [
"Apache-2.0"
] | 22 | 2020-12-10T13:06:02.000Z | 2022-02-13T21:58:15.000Z | kubernetes_typed/client/models/v1beta1_certificate_signing_request_condition.py | sobolevn/kubernetes-typed | 5f0a770631c73a9831fbeaeebac188e8f4a52c54 | [
"Apache-2.0"
] | 4 | 2021-03-08T07:06:12.000Z | 2022-03-29T23:41:45.000Z | kubernetes_typed/client/models/v1beta1_certificate_signing_request_condition.py | sobolevn/kubernetes-typed | 5f0a770631c73a9831fbeaeebac188e8f4a52c54 | [
"Apache-2.0"
] | 2 | 2021-09-05T19:18:28.000Z | 2022-03-14T02:56:17.000Z | # Code generated by `typeddictgen`. DO NOT EDIT.
"""V1beta1CertificateSigningRequestConditionDict generated type."""
import datetime
from typing import TypedDict
V1beta1CertificateSigningRequestConditionDict = TypedDict(
"V1beta1CertificateSigningRequestConditionDict",
{
"lastUpdateTime": datetime.date... | 26.25 | 67 | 0.709524 | # Code generated by `typeddictgen`. DO NOT EDIT.
"""V1beta1CertificateSigningRequestConditionDict generated type."""
import datetime
from typing import TypedDict
V1beta1CertificateSigningRequestConditionDict = TypedDict(
"V1beta1CertificateSigningRequestConditionDict",
{
"lastUpdateTime": datetime.date... | 0 | 0 | 0 |
f0ac79bf020ed55f8efbaf8848de6863288c059a | 5,900 | py | Python | sdk/servicebus/azure-servicebus/tests/perf_tests/_test_base.py | rsdoherty/azure-sdk-for-python | 6bba5326677468e6660845a703686327178bb7b1 | [
"MIT"
] | 2,728 | 2015-01-09T10:19:32.000Z | 2022-03-31T14:50:33.000Z | sdk/servicebus/azure-servicebus/tests/perf_tests/_test_base.py | rsdoherty/azure-sdk-for-python | 6bba5326677468e6660845a703686327178bb7b1 | [
"MIT"
] | 17,773 | 2015-01-05T15:57:17.000Z | 2022-03-31T23:50:25.000Z | sdk/servicebus/azure-servicebus/tests/perf_tests/_test_base.py | rsdoherty/azure-sdk-for-python | 6bba5326677468e6660845a703686327178bb7b1 | [
"MIT"
] | 1,916 | 2015-01-19T05:05:41.000Z | 2022-03-31T19:36:44.000Z | # --------------------------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for license information.
# --------------------------------------------------------------------... | 45.736434 | 181 | 0.685932 | # --------------------------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for license information.
# --------------------------------------------------------------------... | 4,534 | 514 | 149 |
9c6c38e7013c1655dd41c7d2f0d93f4df08fa931 | 1,652 | py | Python | mandel.py | SalahKouhen/Mandel_surf | 3c2c49085efa190213d782ceba05d40a1dd3e155 | [
"MIT"
] | null | null | null | mandel.py | SalahKouhen/Mandel_surf | 3c2c49085efa190213d782ceba05d40a1dd3e155 | [
"MIT"
] | null | null | null | mandel.py | SalahKouhen/Mandel_surf | 3c2c49085efa190213d782ceba05d40a1dd3e155 | [
"MIT"
] | null | null | null | import numpy as np
import matplotlib.pyplot as plt
from matplotlib import cm
nx, ny = (1000,1000)
x = np.linspace(-2,1,nx)
y = np.linspace(-1.5,1.5,ny)
X, Y = np.meshgrid(x,y)
cgrid = X + 1j*Y
# For some numbers c doing z^2 + c again and again from 0 will diverge, not for others, plot it to get the mandelbrot set
Z... | 20.146341 | 121 | 0.62046 | import numpy as np
import matplotlib.pyplot as plt
from matplotlib import cm
nx, ny = (1000,1000)
x = np.linspace(-2,1,nx)
y = np.linspace(-1.5,1.5,ny)
X, Y = np.meshgrid(x,y)
cgrid = X + 1j*Y
# For some numbers c doing z^2 + c again and again from 0 will diverge, not for others, plot it to get the mandelbrot set
Z... | 538 | 0 | 23 |
d2a28cf08377e6534f06c4530d85b60c48e5b7d9 | 43 | py | Python | examples/DecryptLoginExamples/crawlers/moocdl/__init__.py | hedou/DecryptLogin | ff86a5d378c8a42d1caebbb7482658a95053f716 | [
"Apache-2.0"
] | null | null | null | examples/DecryptLoginExamples/crawlers/moocdl/__init__.py | hedou/DecryptLogin | ff86a5d378c8a42d1caebbb7482658a95053f716 | [
"Apache-2.0"
] | null | null | null | examples/DecryptLoginExamples/crawlers/moocdl/__init__.py | hedou/DecryptLogin | ff86a5d378c8a42d1caebbb7482658a95053f716 | [
"Apache-2.0"
] | null | null | null | '''initialize'''
from .moocdl import MOOCDL | 21.5 | 26 | 0.744186 | '''initialize'''
from .moocdl import MOOCDL | 0 | 0 | 0 |
83611bbfe1bc34d84dab3f4540c560a0d14a5ef5 | 231 | py | Python | chainerchem/links/__init__.py | corochann/chainerchem | 8e918e557fe9bce865d9d543ea2864d027827941 | [
"MIT"
] | 2 | 2018-03-05T18:23:47.000Z | 2018-04-12T05:00:40.000Z | chainerchem/links/__init__.py | corochann/chainerchem | 8e918e557fe9bce865d9d543ea2864d027827941 | [
"MIT"
] | null | null | null | chainerchem/links/__init__.py | corochann/chainerchem | 8e918e557fe9bce865d9d543ea2864d027827941 | [
"MIT"
] | null | null | null | from chainerchem.links import embed_atom_id # NOQA
from chainerchem.links import graph_linear # NOQA
from chainerchem.links.embed_atom_id import EmbedAtomID # NOQA
from chainerchem.links.graph_linear import GraphLinear # NOQA
| 38.5 | 63 | 0.831169 | from chainerchem.links import embed_atom_id # NOQA
from chainerchem.links import graph_linear # NOQA
from chainerchem.links.embed_atom_id import EmbedAtomID # NOQA
from chainerchem.links.graph_linear import GraphLinear # NOQA
| 0 | 0 | 0 |
eb6f8632414e8d89757d926482f8c1b445c62661 | 2,637 | py | Python | ichnaea/async/task.py | JaredKerim-Mozilla/ichnaea | cfaef2b903960374050be3ea2e4c1520687de56b | [
"Apache-1.1"
] | null | null | null | ichnaea/async/task.py | JaredKerim-Mozilla/ichnaea | cfaef2b903960374050be3ea2e4c1520687de56b | [
"Apache-1.1"
] | null | null | null | ichnaea/async/task.py | JaredKerim-Mozilla/ichnaea | cfaef2b903960374050be3ea2e4c1520687de56b | [
"Apache-1.1"
] | null | null | null | from celery import Task
from kombu.serialization import (
dumps as kombu_dumps,
loads as kombu_loads,
)
from ichnaea.cache import redis_pipeline
from ichnaea.db import db_worker_session
| 32.158537 | 78 | 0.633675 | from celery import Task
from kombu.serialization import (
dumps as kombu_dumps,
loads as kombu_loads,
)
from ichnaea.cache import redis_pipeline
from ichnaea.db import db_worker_session
class BaseTask(Task):
abstract = True
acks_late = False
ignore_result = True
max_retries = 3
_auto_ret... | 1,972 | 446 | 23 |
fd072394fc780b200faf589c14c8b1f92d7586d1 | 1,494 | py | Python | cogs/utilities.py | PhilipMottershead/Dicebot | 8b282d3dd77be82c1f990c35385f11f3b8bd0371 | [
"MIT"
] | null | null | null | cogs/utilities.py | PhilipMottershead/Dicebot | 8b282d3dd77be82c1f990c35385f11f3b8bd0371 | [
"MIT"
] | null | null | null | cogs/utilities.py | PhilipMottershead/Dicebot | 8b282d3dd77be82c1f990c35385f11f3b8bd0371 | [
"MIT"
] | null | null | null | from discord.ext import commands
from discord.ext.commands import Context
from diceBot import roller
class Utilities(commands.Cog):
"""
General Utilities
"""
@commands.command()
async def ping(self, ctx: Context):
"""
Status check
"""
import time
start_time =... | 33.954545 | 118 | 0.576305 | from discord.ext import commands
from discord.ext.commands import Context
from diceBot import roller
class Utilities(commands.Cog):
"""
General Utilities
"""
@commands.command()
async def ping(self, ctx: Context):
"""
Status check
"""
import time
start_time =... | 0 | 0 | 0 |
cc103e6ed023370d51229ecddca11aaa38ef4a7e | 2,301 | py | Python | RSSReader.py | patel347/Yorazuya-Bot | 4ae77ca08c4f72ea84706b40ff551b5e2cb08dfb | [
"MIT"
] | null | null | null | RSSReader.py | patel347/Yorazuya-Bot | 4ae77ca08c4f72ea84706b40ff551b5e2cb08dfb | [
"MIT"
] | 1 | 2021-03-31T19:12:31.000Z | 2021-03-31T19:12:31.000Z | RSSReader.py | Kyutel/Yorazuya-Bot | 4ae77ca08c4f72ea84706b40ff551b5e2cb08dfb | [
"MIT"
] | null | null | null | import feedparser
import time
class RSSReader:
"""Class built upon feedparser to get new items from an rss feed"""
DATA_FILE = 'RSSData.txt'
DATA_FILE = 'RSSData.txt'
| 31.520548 | 92 | 0.614081 | import feedparser
import time
class RSSReader:
"""Class built upon feedparser to get new items from an rss feed"""
DATA_FILE = 'RSSData.txt'
def __init__(self, rssLink):
self.rssLink = rssLink
DATA_FILE = 'RSSData.txt'
def getDateOfLatestRead(self):
dateOfLatestRead = None
... | 1,983 | 0 | 135 |
bc91e141bb675209d3ac6e0bc451b35ae04e5206 | 150 | py | Python | module2.py | arajajyothibabu/PythonLearning | 53658ba3591e284733ef8a66551dadd515ab8edc | [
"MIT"
] | null | null | null | module2.py | arajajyothibabu/PythonLearning | 53658ba3591e284733ef8a66551dadd515ab8edc | [
"MIT"
] | null | null | null | module2.py | arajajyothibabu/PythonLearning | 53658ba3591e284733ef8a66551dadd515ab8edc | [
"MIT"
] | null | null | null | __author__ = 'Kalyan'
# this is a sample module for the understanding_modules assignment.
| 18.75 | 67 | 0.726667 | __author__ = 'Kalyan'
# this is a sample module for the understanding_modules assignment.
def greet(name):
return "module2 says hi to " + name
| 35 | 0 | 23 |
6e7925f4490b60b4578119586daf14599947939b | 176 | py | Python | src/blendvis/primitives/__init__.py | benjimaclellan/blendvis | f8e1b9a88d2d732a02b8c537f4b507a0b4a1684d | [
"MIT"
] | null | null | null | src/blendvis/primitives/__init__.py | benjimaclellan/blendvis | f8e1b9a88d2d732a02b8c537f4b507a0b4a1684d | [
"MIT"
] | null | null | null | src/blendvis/primitives/__init__.py | benjimaclellan/blendvis | f8e1b9a88d2d732a02b8c537f4b507a0b4a1684d | [
"MIT"
] | null | null | null | from blendvis.primitives.primitives import FontPrimitive, LinePrimitive, CubePrimitive, \
CameraPrimitive, SpherePrimitive, CurvePrimitive, GreasePencilPrimitive, Primitive | 88 | 89 | 0.857955 | from blendvis.primitives.primitives import FontPrimitive, LinePrimitive, CubePrimitive, \
CameraPrimitive, SpherePrimitive, CurvePrimitive, GreasePencilPrimitive, Primitive | 0 | 0 | 0 |
73f42c1536b7cbae9884bce03cfe3067637e0ad1 | 3,681 | py | Python | get_stock_data.py | jeremychonggg/Alpaca-Trading-Bot | 82df00e327e2e55f5a0cdf85cd950c49c59bf669 | [
"MIT"
] | null | null | null | get_stock_data.py | jeremychonggg/Alpaca-Trading-Bot | 82df00e327e2e55f5a0cdf85cd950c49c59bf669 | [
"MIT"
] | null | null | null | get_stock_data.py | jeremychonggg/Alpaca-Trading-Bot | 82df00e327e2e55f5a0cdf85cd950c49c59bf669 | [
"MIT"
] | null | null | null | import json
import requests
import pandas as pd
import websocket
# Get Alpaca API Credential
endpoint = "https://data.alpaca.markets/v2"
headers = json.loads(open("key.txt", 'r').read())
def hist_data(symbols, start="2021-01-01", timeframe="1Hour", limit=50, end=""):
"""
returns historical b... | 39.159574 | 115 | 0.551481 | import json
import requests
import pandas as pd
import websocket
# Get Alpaca API Credential
endpoint = "https://data.alpaca.markets/v2"
headers = json.loads(open("key.txt", 'r').read())
def hist_data(symbols, start="2021-01-01", timeframe="1Hour", limit=50, end=""):
"""
returns historical b... | 0 | 0 | 0 |
0d2ec34acd2b78a28677252958e616fde99ac3d1 | 597 | py | Python | stl_path.py | theodorsm/trex-scripts | 5d12e913c8c725f692d62f7458c1a49fb93d4c5b | [
"MIT"
] | 1 | 2022-02-07T22:02:44.000Z | 2022-02-07T22:02:44.000Z | stl_path.py | theodorsm/trex-scripts | 5d12e913c8c725f692d62f7458c1a49fb93d4c5b | [
"MIT"
] | null | null | null | stl_path.py | theodorsm/trex-scripts | 5d12e913c8c725f692d62f7458c1a49fb93d4c5b | [
"MIT"
] | 2 | 2022-02-07T22:02:45.000Z | 2022-03-11T23:10:33.000Z | import sys, os
from dotenv import dotenv_values
config = dotenv_values(".env")
cur_dir = os.path.dirname(__file__)
trex_path = f"{config['TREX_LOCATION']}/{config['TREX_VERSION']}"
interactive = os.path.abspath(f"{trex_path}/automation/trex_control_plane/interactive")
sys.path.insert(0, os.path.abspath(interactive)... | 35.117647 | 87 | 0.782245 | import sys, os
from dotenv import dotenv_values
config = dotenv_values(".env")
cur_dir = os.path.dirname(__file__)
trex_path = f"{config['TREX_LOCATION']}/{config['TREX_VERSION']}"
interactive = os.path.abspath(f"{trex_path}/automation/trex_control_plane/interactive")
sys.path.insert(0, os.path.abspath(interactive)... | 0 | 0 | 0 |
98da454bb8184e678d9da3b5c4db075b9b0f7815 | 3,237 | py | Python | Examples/PDFTool/DealPdf1_cmd.py | wxh0000mm/TKinterDesigner | 01878e78746082413a09444283edbd52118d15ef | [
"Apache-2.0"
] | 1 | 2022-03-09T08:43:41.000Z | 2022-03-09T08:43:41.000Z | Examples/PDFTool/DealPdf1_cmd.py | wxh0000mm/TKinterDesigner | 01878e78746082413a09444283edbd52118d15ef | [
"Apache-2.0"
] | null | null | null | Examples/PDFTool/DealPdf1_cmd.py | wxh0000mm/TKinterDesigner | 01878e78746082413a09444283edbd52118d15ef | [
"Apache-2.0"
] | null | null | null | #coding=utf-8
import sys
import os
from os.path import abspath, dirname
sys.path.append(abspath(dirname(__file__)))
import tkinter
import tkinter.filedialog
from tkinter import *
import Fun
ElementBGArray={}
ElementBGArray_Resize={}
ElementBGArray_IM={}
from PyPDF2 import PdfFileReader, PdfFileWriter
| 34.073684 | 94 | 0.621563 | #coding=utf-8
import sys
import os
from os.path import abspath, dirname
sys.path.append(abspath(dirname(__file__)))
import tkinter
import tkinter.filedialog
from tkinter import *
import Fun
ElementBGArray={}
ElementBGArray_Resize={}
ElementBGArray_IM={}
from PyPDF2 import PdfFileReader, PdfFileWriter
def getRan... | 3,006 | 0 | 110 |
536a6c5606d8009dfaf5fcd980a4c892a1731649 | 1,292 | py | Python | cart/tests.py | Zadigo/mycommerce | 145031ebb359389e680a820577a4b6b2d382646d | [
"MIT"
] | null | null | null | cart/tests.py | Zadigo/mycommerce | 145031ebb359389e680a820577a4b6b2d382646d | [
"MIT"
] | null | null | null | cart/tests.py | Zadigo/mycommerce | 145031ebb359389e680a820577a4b6b2d382646d | [
"MIT"
] | null | null | null | from django.test import Client
from django.test import RequestFactory, TestCase
from django.contrib.auth import get_user_model
from cart import views
| 35.888889 | 126 | 0.650155 | from django.test import Client
from django.test import RequestFactory, TestCase
from django.contrib.auth import get_user_model
from cart import views
def create_user():
USER_MODEL = get_user_model()
user = USER_MODEL.objects.create_user(
email='lucile@gmail.com',
password='touparette',
... | 615 | 476 | 46 |
a6887c47659cb1c368114491263022c8dfb6eef1 | 1,677 | py | Python | iceworm/trees/nodes/func.py | wrmsr0/iceworm | 09431bb3cdc4f6796aafca41e37d42ebe0ddfeef | [
"BSD-3-Clause"
] | null | null | null | iceworm/trees/nodes/func.py | wrmsr0/iceworm | 09431bb3cdc4f6796aafca41e37d42ebe0ddfeef | [
"BSD-3-Clause"
] | 1 | 2021-01-19T14:29:19.000Z | 2021-01-19T14:34:27.000Z | iceworm/trees/nodes/func.py | wrmsr0/iceworm | 09431bb3cdc4f6796aafca41e37d42ebe0ddfeef | [
"BSD-3-Clause"
] | 1 | 2020-12-31T22:29:52.000Z | 2020-12-31T22:29:52.000Z | import enum
import typing as ta
from omnibus import collections as col
from omnibus import dataclasses as dc
from .base import Expr
from .base import Identifier
from .base import Node
from .base import QualifiedNameNode
from .base import SetQuantifier
from .base import SortItem
| 19.729412 | 70 | 0.714967 | import enum
import typing as ta
from omnibus import collections as col
from omnibus import dataclasses as dc
from .base import Expr
from .base import Identifier
from .base import Node
from .base import QualifiedNameNode
from .base import SetQuantifier
from .base import SortItem
class Precedence(enum.Enum):
PREC... | 0 | 1,060 | 322 |
5daa7c7b545e3d2dadc43b6d602c383c8384eb54 | 329 | py | Python | game/exceptions.py | ikacikac/mtrix | 9d65ce4f9fb08bf302f3322039eb882e8116890e | [
"MIT"
] | null | null | null | game/exceptions.py | ikacikac/mtrix | 9d65ce4f9fb08bf302f3322039eb882e8116890e | [
"MIT"
] | null | null | null | game/exceptions.py | ikacikac/mtrix | 9d65ce4f9fb08bf302f3322039eb882e8116890e | [
"MIT"
] | null | null | null | # -*- coding: utf8 -*-
| 11.75 | 41 | 0.735562 | # -*- coding: utf8 -*-
class MovementException(Exception):
pass
class RightException(MovementException):
pass
class LeftException(MovementException):
pass
class RotateException(MovementException):
pass
class ColException(MovementException):
pass
class DownException(MovementException):
... | 0 | 160 | 138 |
94a825233662f1870149a97c9267cd1f71508949 | 651 | py | Python | 001_IntroCS/PS2/ps2c.py | PDmatrix/OSSU | dd482b6e4cdbdef5a8897c1b6ef135751681423a | [
"MIT"
] | null | null | null | 001_IntroCS/PS2/ps2c.py | PDmatrix/OSSU | dd482b6e4cdbdef5a8897c1b6ef135751681423a | [
"MIT"
] | null | null | null | 001_IntroCS/PS2/ps2c.py | PDmatrix/OSSU | dd482b6e4cdbdef5a8897c1b6ef135751681423a | [
"MIT"
] | null | null | null | balance = 999999
annualInterestRate = 0.18
monthlyInterestRate = annualInterestRate/12.0
monthlyLower = balance/12
monthlyUpper = (balance * (1+monthlyInterestRate)**12)/12.0
while True:
updatedBalance = balance
for i in range(12):
payment = (monthlyUpper + monthlyLower)/2.0
monthlyUnp... | 31 | 90 | 0.691244 | balance = 999999
annualInterestRate = 0.18
monthlyInterestRate = annualInterestRate/12.0
monthlyLower = balance/12
monthlyUpper = (balance * (1+monthlyInterestRate)**12)/12.0
while True:
updatedBalance = balance
for i in range(12):
payment = (monthlyUpper + monthlyLower)/2.0
monthlyUnp... | 0 | 0 | 0 |
b41050b80a9cc015d3baca79949feec94791e99c | 3,959 | py | Python | tests/integration/commands/deploy.py | wilzbach/cli | bac7edb42618f3aeecd81ec80d5bec144fa893c2 | [
"Apache-2.0"
] | null | null | null | tests/integration/commands/deploy.py | wilzbach/cli | bac7edb42618f3aeecd81ec80d5bec144fa893c2 | [
"Apache-2.0"
] | null | null | null | tests/integration/commands/deploy.py | wilzbach/cli | bac7edb42618f3aeecd81ec80d5bec144fa893c2 | [
"Apache-2.0"
] | null | null | null | # -*- coding: utf-8 -*-
import time
from pytest import mark
@mark.parametrize('with_message', [True, False])
@mark.parametrize('hard_deployment', [True, False])
@mark.parametrize('final_release_state', [
'DEPLOYED', 'FAILED', 'UNKNOWN', 'TEMP_DEPLOYMENT_FAILURE'
])
@mark.parametrize('maintenance', [True, False])... | 37 | 79 | 0.621369 | # -*- coding: utf-8 -*-
import time
from pytest import mark
@mark.parametrize('with_message', [True, False])
@mark.parametrize('hard_deployment', [True, False])
@mark.parametrize('final_release_state', [
'DEPLOYED', 'FAILED', 'UNKNOWN', 'TEMP_DEPLOYMENT_FAILURE'
])
@mark.parametrize('maintenance', [True, False])... | 3,499 | 0 | 45 |