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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
8c59b2dd47835bca459360518a0989ae72a6ca41 | 285 | py | Python | bot/errors.py | n3r0t/cryptonero | 2312aad41d8fc7037cf4f69a9d09478082b69e64 | [
"MIT"
] | null | null | null | bot/errors.py | n3r0t/cryptonero | 2312aad41d8fc7037cf4f69a9d09478082b69e64 | [
"MIT"
] | 1 | 2021-02-17T22:25:24.000Z | 2021-02-18T15:41:35.000Z | bot/errors.py | n3r0t/cryptonero | 2312aad41d8fc7037cf4f69a9d09478082b69e64 | [
"MIT"
] | null | null | null | class InvalidCoinID(Exception):
"""
Exception raised when search query requested by user doesn't return a coin.
""" | 35.625 | 79 | 0.677193 | class InvalidCoinID(Exception):
"""
Exception raised when search query requested by user doesn't return a coin.
"""
def __init__(self, reason: str = "Specified coin by user is invalid."):
self.reason = reason
super(InvalidCoinID, self).__init__(reason) | 132 | 0 | 26 |
aabc4177ee4839c1da040250611caeb7c9630b47 | 11,607 | py | Python | accounting/test/test_sie_export.py | jacob22/accounting | e2fceea880e3f056703ba97b6cf52b73cd7af93b | [
"Apache-2.0"
] | null | null | null | accounting/test/test_sie_export.py | jacob22/accounting | e2fceea880e3f056703ba97b6cf52b73cd7af93b | [
"Apache-2.0"
] | null | null | null | accounting/test/test_sie_export.py | jacob22/accounting | e2fceea880e3f056703ba97b6cf52b73cd7af93b | [
"Apache-2.0"
] | null | null | null | # -*- coding: utf-8 -*-
# Copyright 2019 Open End AB
#
# 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 o... | 40.583916 | 119 | 0.619109 | # -*- coding: utf-8 -*-
# Copyright 2019 Open End AB
#
# 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 o... | 9,182 | 9 | 1,021 |
e4919c8e6d3106722df5f348426fa641c5ca7582 | 9,434 | py | Python | HostedConfigFile.py | robdobsn/QtStockTicker | c9182b3c8c092da0739c9a2f788809a382a93c2a | [
"MIT"
] | 6 | 2016-11-20T22:37:24.000Z | 2020-09-13T02:19:16.000Z | HostedConfigFile.py | robdobsn/QtStockTicker | c9182b3c8c092da0739c9a2f788809a382a93c2a | [
"MIT"
] | null | null | null | HostedConfigFile.py | robdobsn/QtStockTicker | c9182b3c8c092da0739c9a2f788809a382a93c2a | [
"MIT"
] | 7 | 2015-11-12T13:16:40.000Z | 2021-02-19T05:52:37.000Z | import ftplib
import requests
import tempfile
import json
import os
import sys
'''
Created on 07 Sep 2013
@author: rob dobson
'''
| 41.196507 | 137 | 0.584694 | import ftplib
import requests
import tempfile
import json
import os
import sys
'''
Created on 07 Sep 2013
@author: rob dobson
'''
class HostedConfigFile():
hostedDataLocations = []
latestFileVersion = -1
def initFromFile(self, fName):
with open(fName, 'r') as jsonFile:
local... | 8,806 | 464 | 23 |
726771bce28f154fafe3081f10c79889e9b886df | 1,376 | py | Python | lecrad/radsort.py | SGBon/algo | 331b77cbd4c8c99916c50633e8dcbc9c6048dfb7 | [
"MIT"
] | null | null | null | lecrad/radsort.py | SGBon/algo | 331b77cbd4c8c99916c50633e8dcbc9c6048dfb7 | [
"MIT"
] | null | null | null | lecrad/radsort.py | SGBon/algo | 331b77cbd4c8c99916c50633e8dcbc9c6048dfb7 | [
"MIT"
] | null | null | null | # convert decimal to binary
# Get the i-th digit of binary string x
# sort A using binary digit i
from random import choice
from string import uppercase
if __name__ == "__main__":
strings = []
for i in range(27):
strings.append(genstring(5))
print strings
strings = RADIX_SORT(strings)
print strings
| 22.557377 | 84 | 0.574128 | # convert decimal to binary
def radix2(data):
if type(data) is int: # convert integer to bit string
return "{0:b}".format(data)
elif type(data) is str: # convert a character string to bit string
ret = ''.join('{0:08b}'.format(ord(x), 'b') for x in data) # need full bytes
return ret
# Ge... | 921 | 0 | 135 |
53130fd814711eb7c22483926750e6985e225ebb | 945 | py | Python | Gems/AtomLyIntegration/TechnicalArt/DccScriptingInterface/azpy/dcc/marmoset/stub.py | prophetl33t/o3de | eaeeb883eee1594b1b93327f6909eebd1a826caf | [
"Apache-2.0",
"MIT"
] | null | null | null | Gems/AtomLyIntegration/TechnicalArt/DccScriptingInterface/azpy/dcc/marmoset/stub.py | prophetl33t/o3de | eaeeb883eee1594b1b93327f6909eebd1a826caf | [
"Apache-2.0",
"MIT"
] | null | null | null | Gems/AtomLyIntegration/TechnicalArt/DccScriptingInterface/azpy/dcc/marmoset/stub.py | prophetl33t/o3de | eaeeb883eee1594b1b93327f6909eebd1a826caf | [
"Apache-2.0",
"MIT"
] | null | null | null | # coding:utf-8
#!/usr/bin/python
#
# Copyright (c) Contributors to the Open 3D Engine Project.
# For complete copyright and license terms please see the LICENSE at the root of this distribution.
#
# SPDX-License-Identifier: Apache-2.0 OR MIT
#
#
# ------------------------------------------------------------------------... | 31.5 | 99 | 0.511111 | # coding:utf-8
#!/usr/bin/python
#
# Copyright (c) Contributors to the Open 3D Engine Project.
# For complete copyright and license terms please see the LICENSE at the root of this distribution.
#
# SPDX-License-Identifier: Apache-2.0 OR MIT
#
#
# ------------------------------------------------------------------------... | 0 | 0 | 0 |
8a342b38a358bb688fbdb88d59333294dd729b20 | 336 | py | Python | Hackerrank_python/2.basic data types/10.Nested Lists.py | manish1822510059/Hackerrank | 7c6e4553f033f067e04dc6c756ef90cb43f3c4a8 | [
"MIT"
] | 39 | 2020-09-27T05:32:05.000Z | 2022-01-08T18:04:05.000Z | Hackerrank_python/2.basic data types/10.Nested Lists.py | manish1822510059/Hackerrank | 7c6e4553f033f067e04dc6c756ef90cb43f3c4a8 | [
"MIT"
] | 5 | 2020-10-02T13:33:00.000Z | 2021-03-01T14:06:08.000Z | Hackerrank_python/2.basic data types/10.Nested Lists.py | manish1822510059/Hackerrank | 7c6e4553f033f067e04dc6c756ef90cb43f3c4a8 | [
"MIT"
] | 6 | 2020-10-03T04:04:55.000Z | 2021-10-18T04:07:53.000Z | marksheet=[]
scoresheet=[]
if __name__ == '__main__':
for _ in range(int(input())):
name = input()
score = float(input())
marksheet=marksheet+[[name,score]]
scoresheet+=[score]
x=sorted(set(scoresheet))[1]
for n, s in sorted(marksheet):
if s==x:
print(n) ... | 22.4 | 42 | 0.520833 | marksheet=[]
scoresheet=[]
if __name__ == '__main__':
for _ in range(int(input())):
name = input()
score = float(input())
marksheet=marksheet+[[name,score]]
scoresheet+=[score]
x=sorted(set(scoresheet))[1]
for n, s in sorted(marksheet):
if s==x:
print(n) ... | 0 | 0 | 0 |
63d4e1ca33b5fd38661cbad39204f8b798ac64c9 | 446 | py | Python | tests/spider-integration/spiders/sina_news_parser.py | RuixiangS/feapder | e21098c9d4f4ba001275f4d4d57d6ea4687b93a8 | [
"MIT"
] | 876 | 2021-02-09T11:08:04.000Z | 2022-03-31T21:14:11.000Z | tests/spider-integration/spiders/sina_news_parser.py | lovebull/feapder | 1cee596380b6ce5e1615ef81d3e57a1b290129d9 | [
"MIT"
] | 94 | 2021-02-20T07:59:28.000Z | 2022-03-28T09:54:53.000Z | tests/spider-integration/spiders/sina_news_parser.py | lovebull/feapder | 1cee596380b6ce5e1615ef81d3e57a1b290129d9 | [
"MIT"
] | 172 | 2021-02-22T08:24:44.000Z | 2022-03-29T08:15:27.000Z | # -*- coding: utf-8 -*-
"""
Created on 2021-03-02 23:40:37
---------
@summary:
---------
@author: Boris
"""
import feapder
| 19.391304 | 64 | 0.587444 | # -*- coding: utf-8 -*-
"""
Created on 2021-03-02 23:40:37
---------
@summary:
---------
@author: Boris
"""
import feapder
class SinaNewsParser(feapder.BaseParser):
def start_requests(self):
"""
注意 这里继承的是BaseParser,而不是Spider
"""
yield feapder.Request("https://news.sina.com.cn/")
... | 100 | 222 | 23 |
ee954e9c11558fc576daa82ea8a397eda11154dc | 17,176 | py | Python | blue_st_examples/example_ble_4.py | Higgcz/BlueSTSDK_Python | fdd2de0e891b901d35e94901ae06023ee2ab65a3 | [
"BSD-3-Clause"
] | 1 | 2020-02-18T16:50:42.000Z | 2020-02-18T16:50:42.000Z | blue_st_examples/example_ble_4.py | Higgcz/BlueSTSDK_Python | fdd2de0e891b901d35e94901ae06023ee2ab65a3 | [
"BSD-3-Clause"
] | null | null | null | blue_st_examples/example_ble_4.py | Higgcz/BlueSTSDK_Python | fdd2de0e891b901d35e94901ae06023ee2ab65a3 | [
"BSD-3-Clause"
] | null | null | null | #!/usr/bin/env python
################################################################################
# COPYRIGHT(c) 2018 STMicroelectronics #
# #
# Redistribution and use in source and binary for... | 41.487923 | 117 | 0.496041 | #!/usr/bin/env python
################################################################################
# COPYRIGHT(c) 2018 STMicroelectronics #
# #
# Redistribution and use in source and binary for... | 10,664 | 78 | 273 |
cbe6081514aec93c00604671f18f0eec79a367f0 | 640 | py | Python | db_api/database.py | akorzunin/telegram_auction_bot | d4d5042614ea11f8085815d8f9fb8b6fbebcfab0 | [
"Apache-2.0"
] | null | null | null | db_api/database.py | akorzunin/telegram_auction_bot | d4d5042614ea11f8085815d8f9fb8b6fbebcfab0 | [
"Apache-2.0"
] | null | null | null | db_api/database.py | akorzunin/telegram_auction_bot | d4d5042614ea11f8085815d8f9fb8b6fbebcfab0 | [
"Apache-2.0"
] | null | null | null | from sqlalchemy import create_engine
from sqlalchemy.ext.declarative import declarative_base
from sqlalchemy.orm import sessionmaker
#load .env variables
import os
from dotenv import load_dotenv
load_dotenv()
PWD = os.getenv('PWD')
import sys
sys.path.insert(1, PWD)
SQLALCHEMY_DATABASE_URL = f"sqlite:///{PWD}/data_bas... | 30.47619 | 75 | 0.810938 | from sqlalchemy import create_engine
from sqlalchemy.ext.declarative import declarative_base
from sqlalchemy.orm import sessionmaker
#load .env variables
import os
from dotenv import load_dotenv
load_dotenv()
PWD = os.getenv('PWD')
import sys
sys.path.insert(1, PWD)
SQLALCHEMY_DATABASE_URL = f"sqlite:///{PWD}/data_bas... | 0 | 0 | 0 |
d3c7c30be04c8e11fb1790e39f258cb17c96675e | 82,999 | py | Python | pyNastran/op2/result_objects/table_object.py | fmamitrotta/pyNastran | 6f9592cf3a2ccb8c509918acb735282d6eef75aa | [
"BSD-3-Clause"
] | 293 | 2015-03-22T20:22:01.000Z | 2022-03-14T20:28:24.000Z | pyNastran/op2/result_objects/table_object.py | sean-engelstad/pyNastran | 90f957887a4f68f8e58b07c15e1ac69c66b9c6f4 | [
"BSD-3-Clause"
] | 512 | 2015-03-14T18:39:27.000Z | 2022-03-31T16:15:43.000Z | pyNastran/op2/result_objects/table_object.py | sean-engelstad/pyNastran | 90f957887a4f68f8e58b07c15e1ac69c66b9c6f4 | [
"BSD-3-Clause"
] | 136 | 2015-03-19T03:26:06.000Z | 2022-03-25T22:14:54.000Z | """
defines:
- TableObject
- RealTableArray
- ComplexTableArray
these are used by:
- RealDisplacementArray
- RealVelocityArray
- RealAccelerationArray
- RealEigenvaluesArray
- RealSPCForcesArray
- RealMPCForcesArray
- RealAppliedLoadsArray
- ComplexDisplacementArray
- ComplexVelocityArray
- ComplexAccele... | 42.629173 | 173 | 0.505271 | """
defines:
- TableObject
- RealTableArray
- ComplexTableArray
these are used by:
- RealDisplacementArray
- RealVelocityArray
- RealAccelerationArray
- RealEigenvaluesArray
- RealSPCForcesArray
- RealMPCForcesArray
- RealAppliedLoadsArray
- ComplexDisplacementArray
- ComplexVelocityArray
- ComplexAccele... | 35,618 | 0 | 983 |
4f5b4d95cdb787b00d8a2ead5fb57c49a2b208cd | 2,210 | py | Python | Datstructures&Algorithms/DataStructures/LinkedLists/__init__.py | MasherJames/Javascript-Algorithms | 5ea3e21dde34e513745ca84220ed6503c0bc0222 | [
"MIT"
] | 3 | 2019-01-16T10:06:51.000Z | 2019-07-04T17:07:29.000Z | Datstructures&Algorithms/DataStructures/LinkedLists/__init__.py | MasherJames/Javascript-Algorithms | 5ea3e21dde34e513745ca84220ed6503c0bc0222 | [
"MIT"
] | 6 | 2020-02-23T20:44:38.000Z | 2020-07-18T21:57:32.000Z | Datstructures&Algorithms/DataStructures/LinkedLists/__init__.py | MasherJames/Data-Structures-and-Algorithms | 5ea3e21dde34e513745ca84220ed6503c0bc0222 | [
"MIT"
] | null | null | null |
linkedList = LinkedList()
linkedList.insert(1)
linkedList.insert(4)
linkedList.insert(7)
linkedList.insert(8)
linkedList.printLinkedList()
print()
# linkedList.reverse_iteratively()
linkedList.reverse_recursively()
linkedList.printLinkedList()
| 27.625 | 81 | 0.634842 | class Node(object):
def __init__(self, data):
self.data = data
self.next = None
class LinkedList(object):
head = None
# def __init__(self):
# self.head = None
def insert(self, data):
new_node = Node(data)
if LinkedList.head is None:
LinkedList.head ... | 1,639 | 253 | 71 |
bcddff7a6e8f5161639e8a62328acfc56e8f0c0c | 10,254 | py | Python | python/zybo/test17_raw.py | DanielTisza/spectralcamera | 4fef93b3b4cd8f83e016070f1c0d68aa0cff5102 | [
"MIT"
] | null | null | null | python/zybo/test17_raw.py | DanielTisza/spectralcamera | 4fef93b3b4cd8f83e016070f1c0d68aa0cff5102 | [
"MIT"
] | null | null | null | python/zybo/test17_raw.py | DanielTisza/spectralcamera | 4fef93b3b4cd8f83e016070f1c0d68aa0cff5102 | [
"MIT"
] | null | null | null | # ----------------------------------------------------------------------------
# test17.py
#
# Copyright 2021 Daniel Tisza
# MIT License
#
# Taking raw image with Zybo and saving to NETCDF
#
# LED calibration set: C
# Wavelength: 584.577535
# Setpoint: 11127
#
# -------------------------------------------------... | 29.130682 | 143 | 0.672225 | # ----------------------------------------------------------------------------
# test17.py
#
# Copyright 2021 Daniel Tisza
# MIT License
#
# Taking raw image with Zybo and saving to NETCDF
#
# LED calibration set: C
# Wavelength: 584.577535
# Setpoint: 11127
#
# -------------------------------------------------... | 0 | 0 | 0 |
358da6fd4eaaa670b9f5cc40d8c2a27260258dd1 | 1,325 | py | Python | tests/rest/__init__.py | bontekasper/openeo-python-client | 3a3cfd4ce619dd648e7dec0684281f4fecf4c2e3 | [
"Apache-2.0"
] | 75 | 2017-11-17T11:49:15.000Z | 2022-02-15T14:21:42.000Z | tests/rest/__init__.py | jdries/openeo-python-client | 63e70bdb27749ba51553bb3fa46135125d8bc9d9 | [
"Apache-2.0"
] | 238 | 2017-12-05T14:48:30.000Z | 2022-03-31T15:42:38.000Z | tests/rest/__init__.py | jdries/openeo-python-client | 63e70bdb27749ba51553bb3fa46135125d8bc9d9 | [
"Apache-2.0"
] | 28 | 2018-01-24T08:42:54.000Z | 2022-01-27T09:16:26.000Z | import json
from typing import Union
import mock
from openeo.rest.datacube import DataCube
from openeo.rest.imagecollectionclient import ImageCollectionClient
def get_download_graph(cube: Union[DataCube, ImageCollectionClient]) -> dict:
"""
Do fake download of a cube and intercept the process graph
:par... | 30.813953 | 88 | 0.710189 | import json
from typing import Union
import mock
from openeo.rest.datacube import DataCube
from openeo.rest.imagecollectionclient import ImageCollectionClient
def get_download_graph(cube: Union[DataCube, ImageCollectionClient]) -> dict:
"""
Do fake download of a cube and intercept the process graph
:par... | 0 | 0 | 0 |
705de983d0da514bfb0f01d54db05374956338af | 4,631 | py | Python | Projects/project5/main.py | spacemanidol/CLSM473 | 67ff650c905f7a8799fc3c97bd4cfbeea5801995 | [
"MIT"
] | null | null | null | Projects/project5/main.py | spacemanidol/CLSM473 | 67ff650c905f7a8799fc3c97bd4cfbeea5801995 | [
"MIT"
] | null | null | null | Projects/project5/main.py | spacemanidol/CLSM473 | 67ff650c905f7a8799fc3c97bd4cfbeea5801995 | [
"MIT"
] | null | null | null | import os
import string
import sys
import math
languages = ['dan','deu','dut','eng','fin','fra','gla','ita','nob','pol','por','spa','swe','swh','tgl']
def smoothing(corpus):
'''
Addative Smoothing
args: corpus(dict): words to occourences based on langauge
returns: a modified corpus
increase the co... | 41.348214 | 216 | 0.641546 | import os
import string
import sys
import math
languages = ['dan','deu','dut','eng','fin','fra','gla','ita','nob','pol','por','spa','swe','swh','tgl']
def smoothing(corpus):
'''
Addative Smoothing
args: corpus(dict): words to occourences based on langauge
returns: a modified corpus
increase the co... | 0 | 0 | 0 |
50dee8caf3a68e7199f2089a3761c3ddf84dbc5e | 2,161 | py | Python | leetcode/implement_trie.py | Joes-BitGit/Leetcode | c117a475ceda915826294ce0cd2bc3280eafa592 | [
"MIT"
] | null | null | null | leetcode/implement_trie.py | Joes-BitGit/Leetcode | c117a475ceda915826294ce0cd2bc3280eafa592 | [
"MIT"
] | null | null | null | leetcode/implement_trie.py | Joes-BitGit/Leetcode | c117a475ceda915826294ce0cd2bc3280eafa592 | [
"MIT"
] | null | null | null | # DESCRIPTION
# Implement a trie with insert, search, and startsWith methods.
# EXAMPLE:
# Trie trie = new Trie();
# trie.insert("apple");
# trie.search("apple"); // returns true
# trie.search("app"); // returns false
# trie.startsWith("app"); // returns true
# trie.insert("app");
# trie.search("app"); // r... | 24.83908 | 83 | 0.554373 | # DESCRIPTION
# Implement a trie with insert, search, and startsWith methods.
# EXAMPLE:
# Trie trie = new Trie();
# trie.insert("apple");
# trie.search("apple"); // returns true
# trie.search("app"); // returns false
# trie.startsWith("app"); // returns true
# trie.insert("app");
# trie.search("app"); // r... | 78 | 1,389 | 72 |
09e2511b2e1ec0709ee599f31a84d3eadfc0c05f | 717 | py | Python | python/Client/Client.py | YushchenkoAndrew/template | 35c6bcd2121647015308f0cc110da71aa148d5fb | [
"MIT"
] | 5 | 2020-08-25T11:35:04.000Z | 2021-12-25T18:57:58.000Z | python/Client/Client.py | YushchenkoAndrew/template | 35c6bcd2121647015308f0cc110da71aa148d5fb | [
"MIT"
] | null | null | null | python/Client/Client.py | YushchenkoAndrew/template | 35c6bcd2121647015308f0cc110da71aa148d5fb | [
"MIT"
] | 3 | 2020-10-08T07:51:33.000Z | 2021-12-29T10:19:24.000Z | import socket
import time
import cv2
import pickle
import zlib
import datetime
HOST = '192.168.0.101'
PORT = 13327
video = cv2.VideoCapture(0)
video.set(3, 50)
video.set(4, 50)
s = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
s.connect((HOST, PORT))
for i in range(5800):
ret, frame = video.read()
... | 14.632653 | 57 | 0.617852 | import socket
import time
import cv2
import pickle
import zlib
import datetime
HOST = '192.168.0.101'
PORT = 13327
video = cv2.VideoCapture(0)
video.set(3, 50)
video.set(4, 50)
s = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
s.connect((HOST, PORT))
for i in range(5800):
ret, frame = video.read()
... | 0 | 0 | 0 |
d7df0e258342ed591ce8c4a4df10d95ed18dcd5d | 6,651 | py | Python | code/notes/utilities/naf_utilities.py | ktwaco/nlproject | 16f02158fecdfe55a73a2c5c1e78376da935b50d | [
"Apache-2.0"
] | null | null | null | code/notes/utilities/naf_utilities.py | ktwaco/nlproject | 16f02158fecdfe55a73a2c5c1e78376da935b50d | [
"Apache-2.0"
] | null | null | null | code/notes/utilities/naf_utilities.py | ktwaco/nlproject | 16f02158fecdfe55a73a2c5c1e78376da935b50d | [
"Apache-2.0"
] | null | null | null |
import xml_utilities
| 22.622449 | 88 | 0.551797 |
import xml_utilities
def _get_entities_element(naf_tagged_doc):
xml_root = xml_utilities.get_root_from_str(naf_tagged_doc)
terms_element = None
for e in xml_root:
if e.tag == "entities":
terms_element = e
break
return terms_element
def _get_deps_element(naf_tagged_doc):
... | 6,318 | 15 | 288 |
f6a38fbe57ac40cc177a252be0af783d377d0d2a | 60,988 | py | Python | bin/stringrnautils.py | JungeAlexander/rain | c0ee5983dacea53ee27b9849c04a0f80fd8280d1 | [
"MIT"
] | 1 | 2020-05-25T09:18:50.000Z | 2020-05-25T09:18:50.000Z | bin/stringrnautils.py | JungeAlexander/rain | c0ee5983dacea53ee27b9849c04a0f80fd8280d1 | [
"MIT"
] | null | null | null | bin/stringrnautils.py | JungeAlexander/rain | c0ee5983dacea53ee27b9849c04a0f80fd8280d1 | [
"MIT"
] | 2 | 2020-04-22T15:57:14.000Z | 2021-05-12T13:03:48.000Z | # normal libaries
import os
import gzip
import re
import collections
import zipfile
import operator
import logging
logger = logging.getLogger(os.path.basename(__file__))
logging.basicConfig(level=logging.INFO)
# 3rd party (all avalible trough pip!)
import numpy as np
import matplotlib as mp
mp.use("Agg")
from matpl... | 42.294036 | 160 | 0.610087 | # normal libaries
import os
import gzip
import re
import collections
import zipfile
import operator
import logging
logger = logging.getLogger(os.path.basename(__file__))
logging.basicConfig(level=logging.INFO)
# 3rd party (all avalible trough pip!)
import numpy as np
import matplotlib as mp
mp.use("Agg")
from matpl... | 33,501 | 0 | 727 |
979596b703c235ec5752e3e4d11521663f15087d | 7,226 | py | Python | src/Honeybee_Get Annual SQL Data.py | rdzeldenrust/Honeybee | e91e58badc1c9b082596d2cf97baeccdb6d7d0af | [
"CC-BY-3.0"
] | 1 | 2016-03-04T09:47:42.000Z | 2016-03-04T09:47:42.000Z | src/Honeybee_Get Annual SQL Data.py | rdzeldenrust/Honeybee | e91e58badc1c9b082596d2cf97baeccdb6d7d0af | [
"CC-BY-3.0"
] | null | null | null | src/Honeybee_Get Annual SQL Data.py | rdzeldenrust/Honeybee | e91e58badc1c9b082596d2cf97baeccdb6d7d0af | [
"CC-BY-3.0"
] | null | null | null | # By Mostapha Sadeghipour Roudsari
# Sadeghipour@gmail.com
# Ladybug started by Mostapha Sadeghipour Roudsari is licensed
# under a Creative Commons Attribution-ShareAlike 3.0 Unported License.
"""
Export Honeybee Objects to OpenStudio
-
Provided by Honeybee 0.0.53
Args:
openStudioLibFolder:
Retur... | 47.854305 | 136 | 0.745918 | # By Mostapha Sadeghipour Roudsari
# Sadeghipour@gmail.com
# Ladybug started by Mostapha Sadeghipour Roudsari is licensed
# under a Creative Commons Attribution-ShareAlike 3.0 Unported License.
"""
Export Honeybee Objects to OpenStudio
-
Provided by Honeybee 0.0.53
Args:
openStudioLibFolder:
Retur... | 374 | 5 | 72 |
9c102de787efda5a28f80cb814586d5e1785b611 | 10,689 | py | Python | gmsh_cad/emi_system_sz.py | MiroK/emi-cylinders | ccbbfa51003fc4fe8abc257dee916e229398c520 | [
"MIT"
] | null | null | null | gmsh_cad/emi_system_sz.py | MiroK/emi-cylinders | ccbbfa51003fc4fe8abc257dee916e229398c520 | [
"MIT"
] | null | null | null | gmsh_cad/emi_system_sz.py | MiroK/emi-cylinders | ccbbfa51003fc4fe8abc257dee916e229398c520 | [
"MIT"
] | 1 | 2018-05-30T14:26:59.000Z | 2018-05-30T14:26:59.000Z | import petsc4py, sys
# I like to be in control of the command line
petsc4py.init(sys.argv)
from dolfin import *
from petsc4py import PETSc
parameters['form_compiler']['representation'] = 'uflacs'
parameters['form_compiler']['cpp_optimize'] = True
parameters['form_compiler']['cpp_optimize_flags'] = '-O3 -ffast-math -... | 42.756 | 125 | 0.749181 | import petsc4py, sys
# I like to be in control of the command line
petsc4py.init(sys.argv)
from dolfin import *
from petsc4py import PETSc
parameters['form_compiler']['representation'] = 'uflacs'
parameters['form_compiler']['cpp_optimize'] = True
parameters['form_compiler']['cpp_optimize_flags'] = '-O3 -ffast-math -... | 0 | 0 | 0 |
d26fbe761179255597f81a1ca701975770d544cc | 1,410 | py | Python | _BACKUP/.gitbook/assets/tests (1).py | bgoonz/python-gitbook | d3b1321a42064e3cf46d1ac16ec1d7c67e4ae04f | [
"MIT"
] | 2 | 2021-10-01T22:14:38.000Z | 2021-11-29T00:32:52.000Z | _BACKUP/.gitbook/assets/tests (1).py | bgoonz/python-gitbook | d3b1321a42064e3cf46d1ac16ec1d7c67e4ae04f | [
"MIT"
] | 14 | 2021-09-04T13:28:28.000Z | 2021-09-22T04:06:35.000Z | _BACKUP/.gitbook/assets/tests.py | bgoonz/python-gitbook | d3b1321a42064e3cf46d1ac16ec1d7c67e4ae04f | [
"MIT"
] | 1 | 2021-11-27T20:28:11.000Z | 2021-11-27T20:28:11.000Z | from unittest import TestCase
from employees import Employee, Job, sort_employees_by_salary
| 34.390244 | 87 | 0.69078 | from unittest import TestCase
from employees import Employee, Job, sort_employees_by_salary
class TestEmployees(TestCase):
def setUp(self):
agent = Job("Agent", 40000)
manager = Job("Manager", 50000)
self.alice = Employee("Alice", "Anaheim", manager)
self.bob = Employee("Bob", "B... | 1,096 | 13 | 206 |
0f3b99d6006545048cfe87fd8703abe66af1f1a9 | 5,950 | py | Python | src/utils.py | pabloguarda/ProbabilisticGraphicalTransportationNetworks | d2b6a3f3d8f41e529a370acb540b9103370f7965 | [
"MIT"
] | 1 | 2022-03-11T00:48:08.000Z | 2022-03-11T00:48:08.000Z | src/utils.py | pabloguarda/pgtn | d2b6a3f3d8f41e529a370acb540b9103370f7965 | [
"MIT"
] | null | null | null | src/utils.py | pabloguarda/pgtn | d2b6a3f3d8f41e529a370acb540b9103370f7965 | [
"MIT"
] | null | null | null | import numpy as np
import matplotlib.pyplot as plt
# remove cv2 before you submit to autograder
import cv2
import os
from PIL import Image
def img_tile(imgs, path, filename, save, aspect_ratio=1.0, border=1, border_color=0):
"""
Visualize the WGAN result for each step
:param imgs: Numpy array of the ge... | 30.512821 | 86 | 0.596134 | import numpy as np
import matplotlib.pyplot as plt
# remove cv2 before you submit to autograder
import cv2
import os
from PIL import Image
class Activation:
def __call__(self, inp):
return self.forward(inp)
def forward(self, inp):
pass
def backward(self, inp):
pass
class Sigmoi... | 663 | 8 | 438 |
dfea8f2f791a2de5abc70a40de718e091bfb828a | 2,389 | py | Python | accounts/views.py | gootaa/event_manager | 21943568c8d2de1a841e9c61e8289ffebf14e183 | [
"BSD-2-Clause"
] | null | null | null | accounts/views.py | gootaa/event_manager | 21943568c8d2de1a841e9c61e8289ffebf14e183 | [
"BSD-2-Clause"
] | null | null | null | accounts/views.py | gootaa/event_manager | 21943568c8d2de1a841e9c61e8289ffebf14e183 | [
"BSD-2-Clause"
] | null | null | null | from django.contrib import messages
from django.contrib.auth import authenticate, login, update_session_auth_hash
from django.contrib.auth.decorators import login_required
from django.contrib.auth.forms import PasswordChangeForm
from django.shortcuts import redirect, render
from .forms import EmailForm, RegistrationFo... | 31.434211 | 80 | 0.660946 | from django.contrib import messages
from django.contrib.auth import authenticate, login, update_session_auth_hash
from django.contrib.auth.decorators import login_required
from django.contrib.auth.forms import PasswordChangeForm
from django.shortcuts import redirect, render
from .forms import EmailForm, RegistrationFo... | 0 | 0 | 0 |
a3b80176afc01bc4f3b7cc4c4cfdf0983e67ede8 | 2,696 | py | Python | flask_api_website2.py | rwzlock/ORM-Homework | e5743b3e7cb79afa759fab2d56ce59db3f39be38 | [
"ADSL"
] | null | null | null | flask_api_website2.py | rwzlock/ORM-Homework | e5743b3e7cb79afa759fab2d56ce59db3f39be38 | [
"ADSL"
] | null | null | null | flask_api_website2.py | rwzlock/ORM-Homework | e5743b3e7cb79afa759fab2d56ce59db3f39be38 | [
"ADSL"
] | null | null | null | #Dependencies
import datetime as dt
import numpy as np
import pandas as pd
import sqlalchemy
from sqlalchemy.ext.automap import automap_base
from sqlalchemy.orm import Session
from sqlalchemy import create_engine, func
from flask import Flask, jsonify
#Boilerplate
engine = create_engine("sqlite:///Resources/hawaii.... | 29.626374 | 116 | 0.722923 | #Dependencies
import datetime as dt
import numpy as np
import pandas as pd
import sqlalchemy
from sqlalchemy.ext.automap import automap_base
from sqlalchemy.orm import Session
from sqlalchemy import create_engine, func
from flask import Flask, jsonify
#Boilerplate
engine = create_engine("sqlite:///Resources/hawaii.... | 1,159 | 0 | 110 |
f7c28f37034864f08f96fc8e47ff7051aff066e5 | 3,247 | py | Python | qf_lib/analysis/rolling_analysis/rolling_analysis.py | webclinic017/qf-lib | 96463876719bba8a76c8269cef76addf3a2d836d | [
"Apache-2.0"
] | 198 | 2019-08-16T15:09:23.000Z | 2022-03-30T12:44:00.000Z | qf_lib/analysis/rolling_analysis/rolling_analysis.py | webclinic017/qf-lib | 96463876719bba8a76c8269cef76addf3a2d836d | [
"Apache-2.0"
] | 13 | 2021-01-07T10:15:19.000Z | 2022-03-29T13:01:47.000Z | qf_lib/analysis/rolling_analysis/rolling_analysis.py | webclinic017/qf-lib | 96463876719bba8a76c8269cef76addf3a2d836d | [
"Apache-2.0"
] | 29 | 2019-08-16T15:21:28.000Z | 2022-02-23T09:53:49.000Z | # Copyright 2016-present CERN – European Organization for Nuclear Research
#
# 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... | 42.168831 | 118 | 0.666769 | # Copyright 2016-present CERN – European Organization for Nuclear Research
#
# 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... | 515 | 1,867 | 72 |
f2dfd3c82910a87968402103b082965c591c0c11 | 11,667 | py | Python | RobotCode/HardwareModel.py | HeapArt/DarkPaw | 183c8943ed7bb3e771af019468566ff9d5ad6b2f | [
"MIT"
] | null | null | null | RobotCode/HardwareModel.py | HeapArt/DarkPaw | 183c8943ed7bb3e771af019468566ff9d5ad6b2f | [
"MIT"
] | null | null | null | RobotCode/HardwareModel.py | HeapArt/DarkPaw | 183c8943ed7bb3e771af019468566ff9d5ad6b2f | [
"MIT"
] | null | null | null | import json
from os import wait
import time
import math
import threading
from .HWIO.LEDController import LEDController
from .HWIO.SwitchController import SwitchController
from .HWIO.ServoController import ServoController
from .KinematicsDB import getKinematicsDB
eRobotState_VOID = 0
eRobotState_LOAD = 1
eRobotState_... | 27.844869 | 115 | 0.636839 | import json
from os import wait
import time
import math
import threading
from .HWIO.LEDController import LEDController
from .HWIO.SwitchController import SwitchController
from .HWIO.ServoController import ServoController
from .KinematicsDB import getKinematicsDB
eRobotState_VOID = 0
eRobotState_LOAD = 1
eRobotState_... | 10,335 | 889 | 23 |
a4d994a8705dd9d4dc6484a657927d6eb72bb88a | 975 | py | Python | src/trainers/AttSeq2SeqTrainer.py | stephen-v/gate-seq2seq-acd | 5f5e43bae82eb19c611ac46a6b217e8b386a4646 | [
"Apache-2.0"
] | null | null | null | src/trainers/AttSeq2SeqTrainer.py | stephen-v/gate-seq2seq-acd | 5f5e43bae82eb19c611ac46a6b217e8b386a4646 | [
"Apache-2.0"
] | null | null | null | src/trainers/AttSeq2SeqTrainer.py | stephen-v/gate-seq2seq-acd | 5f5e43bae82eb19c611ac46a6b217e8b386a4646 | [
"Apache-2.0"
] | null | null | null | import sys
from torch.optim import Adam
from tqdm import tqdm
from src.dataset.ReviewDataset import ReviewDataset
from src.models.AttSeq2Seq import AttSeq2Seq
from src.models.Seq2Seq import Seq2Seq
from src.trainers.BaseTrainer import BaseTrainer
from src.utils.const import MAX_PADDING, CATE_MAX_PADDING, EARLY_STOPPI... | 34.821429 | 86 | 0.782564 | import sys
from torch.optim import Adam
from tqdm import tqdm
from src.dataset.ReviewDataset import ReviewDataset
from src.models.AttSeq2Seq import AttSeq2Seq
from src.models.Seq2Seq import Seq2Seq
from src.trainers.BaseTrainer import BaseTrainer
from src.utils.const import MAX_PADDING, CATE_MAX_PADDING, EARLY_STOPPI... | 437 | 16 | 103 |
43db27afa66c58dabd9724581461c96351dbe403 | 1,552 | py | Python | example-client.py | electric-monk/pyflowater | 56a51ab3fdb044a3dc7ebe29d10f6e19f3af5337 | [
"Apache-2.0"
] | 12 | 2019-12-27T17:43:46.000Z | 2021-08-12T03:44:38.000Z | example-client.py | electric-monk/pyflowater | 56a51ab3fdb044a3dc7ebe29d10f6e19f3af5337 | [
"Apache-2.0"
] | 17 | 2020-01-22T20:43:06.000Z | 2021-11-10T20:10:30.000Z | example-client.py | electric-monk/pyflowater | 56a51ab3fdb044a3dc7ebe29d10f6e19f3af5337 | [
"Apache-2.0"
] | 6 | 2020-01-24T20:02:40.000Z | 2021-09-04T21:16:38.000Z | #!/usr/local/bin/python3
import os
import sys
import pprint
import logging
import json
from pyflowater import PyFlo
if __name__ == "__main__":
main()
| 23.164179 | 75 | 0.606959 | #!/usr/local/bin/python3
import os
import sys
import pprint
import logging
import json
from pyflowater import PyFlo
def setup_logger():
logger = logging.getLogger()
logger.setLevel(logging.DEBUG)
handler = logging.StreamHandler(sys.stdout)
handler.setLevel(logging.DEBUG)
formatter = logging.For... | 1,348 | 0 | 46 |
5c76945db5e79e53e6970986e77e8a3842696418 | 974 | py | Python | visualization/app.py | endridollani/sorting-algorithms-visualized | 0f3dc893f67298a00d315b5e1399bc822e4d9b67 | [
"MIT"
] | 1 | 2021-08-30T19:40:46.000Z | 2021-08-30T19:40:46.000Z | visualization/app.py | endridollani/sorting-algorithms-visualized | 0f3dc893f67298a00d315b5e1399bc822e4d9b67 | [
"MIT"
] | null | null | null | visualization/app.py | endridollani/sorting-algorithms-visualized | 0f3dc893f67298a00d315b5e1399bc822e4d9b67 | [
"MIT"
] | null | null | null | import pygame
import time
import draw
from window import Window
import event_handler
pygame.init()
ARRAY_SIZE,DELAY = event_handler.get_user_input()
if __name__ == "__main__":
running = True
clock = pygame.time.Clock()
FPS = 60
window = Window()
handler = event_handler.Handler(windo... | 27.828571 | 90 | 0.691992 | import pygame
import time
import draw
from window import Window
import event_handler
pygame.init()
ARRAY_SIZE,DELAY = event_handler.get_user_input()
if __name__ == "__main__":
running = True
clock = pygame.time.Clock()
FPS = 60
window = Window()
handler = event_handler.Handler(windo... | 0 | 0 | 0 |
43a1d6b37a7c28b41c80e4bc0b55828cd6a11d08 | 1,390 | py | Python | pyglobe3d/core/icosalogic/triangle.py | ka-tet19/pyglobelib | d62f7636f5f971b897eba8fcf787fabb5ed181f1 | [
"BSD-3-Clause"
] | null | null | null | pyglobe3d/core/icosalogic/triangle.py | ka-tet19/pyglobelib | d62f7636f5f971b897eba8fcf787fabb5ed181f1 | [
"BSD-3-Clause"
] | null | null | null | pyglobe3d/core/icosalogic/triangle.py | ka-tet19/pyglobelib | d62f7636f5f971b897eba8fcf787fabb5ed181f1 | [
"BSD-3-Clause"
] | null | null | null | from pyglobe3d.core.icosalogic.grid_consts import Grid
from pyglobe3d.core.icosalogic.elements import ElementWithIndexAndLocationObjects
from pyglobe3d.core.icosalogic.triangle_attrs import TriangleIndex, TriangleLocation
class Triangle(ElementWithIndexAndLocationObjects):
"""
Describes a logical triangle loc... | 30.217391 | 88 | 0.664748 | from pyglobe3d.core.icosalogic.grid_consts import Grid
from pyglobe3d.core.icosalogic.elements import ElementWithIndexAndLocationObjects
from pyglobe3d.core.icosalogic.triangle_attrs import TriangleIndex, TriangleLocation
class Triangle(ElementWithIndexAndLocationObjects):
"""
Describes a logical triangle loc... | 658 | 0 | 78 |
e0d7760a1648d455aace79b5b45f8f6e8d1020d8 | 690 | py | Python | project1-books/import.py | ish-u/cs50w-projects | 16b9ca280d0fe8bc6359d4091ef8153233f9b5eb | [
"MIT"
] | 5 | 2020-08-06T11:59:41.000Z | 2022-01-24T15:48:04.000Z | project1-books/import.py | ish-u/cs50w-projects | 16b9ca280d0fe8bc6359d4091ef8153233f9b5eb | [
"MIT"
] | 9 | 2021-06-04T23:54:35.000Z | 2022-02-10T12:39:01.000Z | project1-books/import.py | ish-u/cs50w-projects | 16b9ca280d0fe8bc6359d4091ef8153233f9b5eb | [
"MIT"
] | null | null | null | import csv
import os
from sqlalchemy import create_engine
from sqlalchemy.orm import scoped_session, sessionmaker
if not os.getenv("DATABASE_URL"):
raise RuntimeError("DATABASE_URL is not set")
# Set up database
engine = create_engine(os.getenv("DATABASE_URL"))
db = scoped_session(sessionmaker(bind=engine))
if... | 27.6 | 154 | 0.7 | import csv
import os
from sqlalchemy import create_engine
from sqlalchemy.orm import scoped_session, sessionmaker
if not os.getenv("DATABASE_URL"):
raise RuntimeError("DATABASE_URL is not set")
# Set up database
engine = create_engine(os.getenv("DATABASE_URL"))
db = scoped_session(sessionmaker(bind=engine))
de... | 311 | 0 | 23 |
11d1be4b96aafe05dc127f6d755f39d04a6050a1 | 2,276 | py | Python | purano/training/train_tfidf.py | IlyaGusev/purano | 07234a55e8c80d1e9d8aeb8197c58e36dd26da54 | [
"Apache-2.0"
] | 4 | 2019-12-12T20:44:16.000Z | 2021-01-19T14:39:22.000Z | purano/training/train_tfidf.py | IlyaGusev/purano | 07234a55e8c80d1e9d8aeb8197c58e36dd26da54 | [
"Apache-2.0"
] | null | null | null | purano/training/train_tfidf.py | IlyaGusev/purano | 07234a55e8c80d1e9d8aeb8197c58e36dd26da54 | [
"Apache-2.0"
] | null | null | null | import argparse
import json
from _jsonnet import evaluate_file as jsonnet_evaluate_file
from sklearn.decomposition import TruncatedSVD
from scipy.sparse import csr_matrix
import torch
from tqdm import tqdm
from purano.io import read_tg_jsonl
from purano.training.models.tfidf import build_idf_vocabulary, get_tfidf_vec... | 32.056338 | 92 | 0.689367 | import argparse
import json
from _jsonnet import evaluate_file as jsonnet_evaluate_file
from sklearn.decomposition import TruncatedSVD
from scipy.sparse import csr_matrix
import torch
from tqdm import tqdm
from purano.io import read_tg_jsonl
from purano.training.models.tfidf import build_idf_vocabulary, get_tfidf_vec... | 1,480 | 0 | 23 |
eb405231cae1a9571f0c0571f2df4f53ee5fc1df | 1,644 | py | Python | model/baseline.py | Silenthinker/LM-LSTM-CRF | c1d6321f0b405691211debf94f8e2b6a418914f6 | [
"Apache-2.0"
] | null | null | null | model/baseline.py | Silenthinker/LM-LSTM-CRF | c1d6321f0b405691211debf94f8e2b6a418914f6 | [
"Apache-2.0"
] | null | null | null | model/baseline.py | Silenthinker/LM-LSTM-CRF | c1d6321f0b405691211debf94f8e2b6a418914f6 | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
@author: jyao
Go over all n-grams up to length k (say 5) in a text, check which of these n-grams appear in the p(e|m) dictionary.
For each mention that appears, take the top scored entity e based on p(e|m) value,
and check its wikipedia page to see if it contains a D... | 36.533333 | 116 | 0.558394 | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
@author: jyao
Go over all n-grams up to length k (say 5) in a text, check which of these n-grams appear in the p(e|m) dictionary.
For each mention that appears, take the top scored entity e based on p(e|m) value,
and check its wikipedia page to see if it contains a D... | 0 | 1,163 | 23 |
ea6e039e891fcaa67d0d40b96a11a0e85be7239a | 615 | py | Python | tests/mowgli_etl_test/pipeline/usf/conftest.py | tetherless-world/mowgli | 28c19eba41e03e053ae4addff56a313d926e18d7 | [
"MIT"
] | 4 | 2021-01-15T15:36:23.000Z | 2021-09-01T06:52:05.000Z | tests/mowgli_etl_test/pipeline/usf/conftest.py | tetherless-world/mowgli | 28c19eba41e03e053ae4addff56a313d926e18d7 | [
"MIT"
] | 63 | 2020-05-04T13:48:04.000Z | 2020-06-06T02:32:58.000Z | tests/mowgli_etl_test/pipeline/usf/conftest.py | tetherless-world/mowgli-etl | 28c19eba41e03e053ae4addff56a313d926e18d7 | [
"MIT"
] | null | null | null | import bz2
import pytest
from io import TextIOWrapper
from pathlib import Path
from tests.mowgli_etl_test.http_client.mock_etl_http_client import MockEtlHttpClient
_sample_usf_file_path = Path(__file__).parent / "usf_test_data.xml"
_sample_usf_zip_file_path = Path(__file__).parent / "usf_test_data.zip"
@pytest.fix... | 21.964286 | 84 | 0.795122 | import bz2
import pytest
from io import TextIOWrapper
from pathlib import Path
from tests.mowgli_etl_test.http_client.mock_etl_http_client import MockEtlHttpClient
_sample_usf_file_path = Path(__file__).parent / "usf_test_data.xml"
_sample_usf_zip_file_path = Path(__file__).parent / "usf_test_data.zip"
@pytest.fix... | 188 | 0 | 66 |
15912ce0b7771f3c168a8db834753b23f477a154 | 3,995 | py | Python | software/source/trial_interpreter.py | jeremyparadie/CASPER | 315875bce612560b005003cc4ecf77c0df80097f | [
"MIT"
] | 1 | 2020-01-23T14:16:01.000Z | 2020-01-23T14:16:01.000Z | software/source/trial_interpreter.py | jeremyparadie/CASPER | 315875bce612560b005003cc4ecf77c0df80097f | [
"MIT"
] | 8 | 2020-01-23T07:03:26.000Z | 2020-04-09T20:14:09.000Z | software/source/trial_interpreter.py | jeremyparadie/CASPER | 315875bce612560b005003cc4ecf77c0df80097f | [
"MIT"
] | 4 | 2020-01-23T06:29:11.000Z | 2020-02-14T21:44:37.000Z | import os
import sys
import subprocess
import csv
# When instantiating a trial class both of the inputs, name and trial, should be included.
#Their current defaults are for demonstration/testing purposes only.
def loop(que):
"""
desc: the loop used to manage talking to the trial interpreter.
possible comm... | 38.413462 | 121 | 0.622528 | import os
import sys
import subprocess
import csv
# When instantiating a trial class both of the inputs, name and trial, should be included.
#Their current defaults are for demonstration/testing purposes only.
class Trial: # this will be an instance of a trial, re-instantiated for each new trial
def __init__(sel... | 744 | 1,660 | 23 |
1ccd350533617c5c85aa2dc689e4558446119dac | 9,417 | py | Python | pyvims/isis/isis.py | seignovert/pyvims | a70b5b9b8bc5c37fa43b7db4d15407f312a31849 | [
"BSD-3-Clause"
] | 4 | 2019-09-16T15:50:22.000Z | 2021-04-08T15:32:48.000Z | pyvims/isis/isis.py | seignovert/pyvims | a70b5b9b8bc5c37fa43b7db4d15407f312a31849 | [
"BSD-3-Clause"
] | 3 | 2018-05-04T09:28:24.000Z | 2018-12-03T09:00:31.000Z | pyvims/isis/isis.py | seignovert/pyvims | a70b5b9b8bc5c37fa43b7db4d15407f312a31849 | [
"BSD-3-Clause"
] | 1 | 2020-10-12T15:14:17.000Z | 2020-10-12T15:14:17.000Z | """VIMS ISIS header."""
import os
import numpy as np
import pvl
from .errors import ISISError
from .history import ISISHistory
from .labels import ISISLabels
from .tables import ISISTables
from .time import time as _dt
from .vars import BYTE_ORDERS, FIELD_TYPES
from ..misc import get_md5
class ISISCube:
"""VIM... | 25.8 | 79 | 0.561856 | """VIMS ISIS header."""
import os
import numpy as np
import pvl
from .errors import ISISError
from .history import ISISHistory
from .labels import ISISLabels
from .tables import ISISTables
from .time import time as _dt
from .vars import BYTE_ORDERS, FIELD_TYPES
from ..misc import get_md5
class ISISCube:
"""VIM... | 887 | 0 | 187 |
b59b170fa95c1980fd3206bf278367b39fc48abd | 317 | py | Python | fann_train.py | Apkawa/simple-captcha-ocr-opencv | b0c20c8cac75feac1d10b21b99629ac5d66cd744 | [
"MIT"
] | 1 | 2015-12-29T09:52:58.000Z | 2015-12-29T09:52:58.000Z | fann_train.py | Apkawa/simple-captcha-ocr-opencv | b0c20c8cac75feac1d10b21b99629ac5d66cd744 | [
"MIT"
] | null | null | null | fann_train.py | Apkawa/simple-captcha-ocr-opencv | b0c20c8cac75feac1d10b21b99629ac5d66cd744 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
import os
from pyfann import libfann
from test_opencv import PROJECT_ROOT
imgW = 83
imgH = 23
factor = 2
rimgW = imgW * factor
rimgH = imgH * factor
nSegs = 5
segW = 18
segH = 18
segSize = (segW, segH)
num_input = segW * segH
TRAIN_FILE = os.path.join(PROJECT_ROOT, "fann.train")
| 10.931034 | 53 | 0.675079 | # -*- coding: utf-8 -*-
import os
from pyfann import libfann
from test_opencv import PROJECT_ROOT
imgW = 83
imgH = 23
factor = 2
rimgW = imgW * factor
rimgH = imgH * factor
nSegs = 5
segW = 18
segH = 18
segSize = (segW, segH)
num_input = segW * segH
TRAIN_FILE = os.path.join(PROJECT_ROOT, "fann.train")
| 0 | 0 | 0 |
1ce173adace5669ce87261460f62b4304ea52578 | 835 | py | Python | Fund/FundVisualizer.py | 5cr009e/qianjinqiu | 68b5cd55440d0bebbd5a023b7dcce97a2bc86c75 | [
"MIT"
] | null | null | null | Fund/FundVisualizer.py | 5cr009e/qianjinqiu | 68b5cd55440d0bebbd5a023b7dcce97a2bc86c75 | [
"MIT"
] | null | null | null | Fund/FundVisualizer.py | 5cr009e/qianjinqiu | 68b5cd55440d0bebbd5a023b7dcce97a2bc86c75 | [
"MIT"
] | null | null | null | #coding:utf-8
import matplotlib.pyplot as plt
import matplotlib
import platform
| 27.833333 | 71 | 0.59521 | #coding:utf-8
import matplotlib.pyplot as plt
import matplotlib
import platform
def setup_mpl():
fonts_dict = {
"Linux": "WenQuanYi Zen Hei",
"Windows": "SimHei",
}
# print(platform.platform())
for system in ["Linux", "Windows"]:
if system in platform.platform():
m... | 669 | 0 | 100 |
58dfc970b88465bd9bd63232e1b8113cfa76ba8c | 823 | py | Python | ML/code/softmax_validator.py | DistributedML/TorML | f41a0378f5e46e578c6bd9c8bfd56037d1a228cf | [
"MIT"
] | 10 | 2018-07-02T01:48:58.000Z | 2021-09-01T09:27:18.000Z | ML/code/softmax_validator.py | DistributedML/TorML | f41a0378f5e46e578c6bd9c8bfd56037d1a228cf | [
"MIT"
] | null | null | null | ML/code/softmax_validator.py | DistributedML/TorML | f41a0378f5e46e578c6bd9c8bfd56037d1a228cf | [
"MIT"
] | 3 | 2017-10-19T21:20:59.000Z | 2022-02-23T21:39:01.000Z | from __future__ import division
import numpy as np
import utils
import pdb
data = utils.load_dataset("mnist/mnist_test", npy=True)
Xvalid, yvalid = data['X'], data['y']
if __name__ == "__main__":
pdb.set_trace()
| 18.288889 | 55 | 0.613609 | from __future__ import division
import numpy as np
import utils
import pdb
data = utils.load_dataset("mnist/mnist_test", npy=True)
Xvalid, yvalid = data['X'], data['y']
def kappa(ww, delta):
ww = np.array(ww)
yhat = np.sign(np.dot(Xvalid, ww))
ww2 = np.array(ww + delta)
yhat2 = np.sign(np.dot(Xvali... | 532 | 0 | 69 |
ce9c709d3be6b419c059d7e481d3cf31a6b44d80 | 8,106 | py | Python | sdk/python/pulumi_azure/compute/availability_set.py | kenny-wealth/pulumi-azure | e57e3a81f95bf622e7429c53f0bff93e33372aa1 | [
"ECL-2.0",
"Apache-2.0"
] | null | null | null | sdk/python/pulumi_azure/compute/availability_set.py | kenny-wealth/pulumi-azure | e57e3a81f95bf622e7429c53f0bff93e33372aa1 | [
"ECL-2.0",
"Apache-2.0"
] | null | null | null | sdk/python/pulumi_azure/compute/availability_set.py | kenny-wealth/pulumi-azure | e57e3a81f95bf622e7429c53f0bff93e33372aa1 | [
"ECL-2.0",
"Apache-2.0"
] | null | null | null | # coding=utf-8
# *** WARNING: this file was generated by the Pulumi Terraform Bridge (tfgen) Tool. ***
# *** Do not edit by hand unless you're certain you know what you are doing! ***
import json
import warnings
import pulumi
import pulumi.runtime
from typing import Union
from .. import utilities, tables
| 60.947368 | 280 | 0.717987 | # coding=utf-8
# *** WARNING: this file was generated by the Pulumi Terraform Bridge (tfgen) Tool. ***
# *** Do not edit by hand unless you're certain you know what you are doing! ***
import json
import warnings
import pulumi
import pulumi.runtime
from typing import Union
from .. import utilities, tables
class Availa... | 175 | 7,600 | 23 |
7930550813764e073706b6255ac40cdb8744cfb2 | 3,410 | py | Python | src/python2/request/calendar_request_builder.py | microsoftarchive/msgraph-sdk-python | 1320ba9116be0d00a1d7fce3484ea979e24ee82d | [
"MIT"
] | 7 | 2019-07-17T06:59:53.000Z | 2021-05-13T15:23:37.000Z | src/python2/request/calendar_request_builder.py | microsoftarchive/msgraph-sdk-python | 1320ba9116be0d00a1d7fce3484ea979e24ee82d | [
"MIT"
] | null | null | null | src/python2/request/calendar_request_builder.py | microsoftarchive/msgraph-sdk-python | 1320ba9116be0d00a1d7fce3484ea979e24ee82d | [
"MIT"
] | 2 | 2020-06-30T13:06:59.000Z | 2021-06-03T09:47:35.000Z | # -*- coding: utf-8 -*-
"""
# Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information.
#
# This file was generated and any changes will be overwritten.
"""
from __future__ import unicode_literals
from .calendar_request impo... | 36.666667 | 151 | 0.660997 | # -*- coding: utf-8 -*-
"""
# Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information.
#
# This file was generated and any changes will be overwritten.
"""
from __future__ import unicode_literals
from .calendar_request impo... | 0 | 2,953 | 23 |
68494f058cffe420454c82ee2d7f59f07781ffd2 | 3,719 | py | Python | rlpyt/ul/models/ul/encoders.py | traffic-lights/rlpyt | ec4689cddd55d98c037194685cfd6ca8e6785014 | [
"MIT"
] | 2,122 | 2019-07-02T13:19:10.000Z | 2022-03-22T09:59:42.000Z | rlpyt/ul/models/ul/encoders.py | traffic-lights/rlpyt | ec4689cddd55d98c037194685cfd6ca8e6785014 | [
"MIT"
] | 206 | 2019-07-02T14:19:42.000Z | 2022-02-15T02:34:28.000Z | rlpyt/ul/models/ul/encoders.py | traffic-lights/rlpyt | ec4689cddd55d98c037194685cfd6ca8e6785014 | [
"MIT"
] | 369 | 2019-07-02T13:38:28.000Z | 2022-03-28T11:16:39.000Z |
import torch
from rlpyt.models.conv2d import Conv2dModel
from rlpyt.models.mlp import MlpModel
from rlpyt.ul.models.dmlab_conv2d import DmlabConv2dModel
from rlpyt.utils.tensor import infer_leading_dims, restore_leading_dims
def weight_init(m):
"""Kaiming_normal is standard for relu networks, sometimes."""
... | 29.752 | 74 | 0.590481 |
import torch
from rlpyt.models.conv2d import Conv2dModel
from rlpyt.models.mlp import MlpModel
from rlpyt.ul.models.dmlab_conv2d import DmlabConv2dModel
from rlpyt.utils.tensor import infer_leading_dims, restore_leading_dims
def weight_init(m):
"""Kaiming_normal is standard for relu networks, sometimes."""
... | 2,856 | 307 | 46 |
f978e4912a5b8d7c0f53b031cdb139402fb90dc2 | 3,557 | py | Python | django/red_belt/job_manager/views.py | MiyaSteven/python_stack | c0f766d646b155efb4f6dd9df3eddfe72b14d91c | [
"MIT"
] | null | null | null | django/red_belt/job_manager/views.py | MiyaSteven/python_stack | c0f766d646b155efb4f6dd9df3eddfe72b14d91c | [
"MIT"
] | null | null | null | django/red_belt/job_manager/views.py | MiyaSteven/python_stack | c0f766d646b155efb4f6dd9df3eddfe72b14d91c | [
"MIT"
] | null | null | null | from django.shortcuts import render, redirect
from django.contrib import messages
from .models import User, Job
from datetime import datetime
import bcrypt
| 32.633028 | 93 | 0.649986 | from django.shortcuts import render, redirect
from django.contrib import messages
from .models import User, Job
from datetime import datetime
import bcrypt
def home(request):
return render(request, "home.html")
def register(request):
errors = User.objects.register_validator(request.POST)
hashed = bcrypt.h... | 3,148 | 0 | 253 |
16364fea52fdb66cb3d64e6653f970390c662062 | 42 | py | Python | pgw/__main__.py | wk1093/pgw | f3ba055dd685e0e3ca530ed0e8dd0d45dee2f9a0 | [
"MIT"
] | null | null | null | pgw/__main__.py | wk1093/pgw | f3ba055dd685e0e3ca530ed0e8dd0d45dee2f9a0 | [
"MIT"
] | null | null | null | pgw/__main__.py | wk1093/pgw | f3ba055dd685e0e3ca530ed0e8dd0d45dee2f9a0 | [
"MIT"
] | null | null | null | import __version
print(__version.version) | 21 | 24 | 0.857143 | import __version
print(__version.version) | 0 | 0 | 0 |
69f635fff38fc20ca93785457520bd047c422f5f | 1,580 | py | Python | src/dialogs/authenticate_mechanic.py | arthurljones/bikechurch-signin-python | 8d086ac508db0086d82b6d6c8864bfec6bd40b5e | [
"BSD-3-Clause"
] | 1 | 2017-10-26T22:22:31.000Z | 2017-10-26T22:22:31.000Z | src/dialogs/authenticate_mechanic.py | arthurljones/bikechurch-signin-python | 8d086ac508db0086d82b6d6c8864bfec6bd40b5e | [
"BSD-3-Clause"
] | null | null | null | src/dialogs/authenticate_mechanic.py | arthurljones/bikechurch-signin-python | 8d086ac508db0086d82b6d6c8864bfec6bd40b5e | [
"BSD-3-Clause"
] | null | null | null | # -*- coding: utf-8 -*-
import wx
from src.ui import MakeInfoEntrySizer, AddField, MedFont, winSizes
import hashlib
from strings import trans
| 30.980392 | 75 | 0.744304 | # -*- coding: utf-8 -*-
import wx
from src.ui import MakeInfoEntrySizer, AddField, MedFont, winSizes
import hashlib
from strings import trans
class AuthenticateMechanicDialog(wx.Dialog):
passHash = "e82b4263a7d8618a5b458dda8658f35bdef7e14b" #sha1
def __init__(self, parent, actionDescription = trans.authenticateGe... | 1,228 | 186 | 23 |
dab02c2cbb55b4a2a8cc2c8452bf3af69e78761c | 400 | py | Python | python-projects/uppercase_and_reverse.py | iamvalentin23/onemonth | a44a4eb131824d9224170b55264902e63354da6e | [
"MIT"
] | null | null | null | python-projects/uppercase_and_reverse.py | iamvalentin23/onemonth | a44a4eb131824d9224170b55264902e63354da6e | [
"MIT"
] | null | null | null | python-projects/uppercase_and_reverse.py | iamvalentin23/onemonth | a44a4eb131824d9224170b55264902e63354da6e | [
"MIT"
] | null | null | null | # Create a function called uppercase_and_reverse that takes a little bit of text,
# uppercases it all, and then reverses it (flips all the letters around)
text = uppercase_and_reverse("Do not go gentle into that good night.") #"THGIN DOOG TAHT OTNI ELTNEG OG TON OD"
print(text) | 36.363636 | 112 | 0.77 | # Create a function called uppercase_and_reverse that takes a little bit of text,
# uppercases it all, and then reverses it (flips all the letters around)
def uppercase_and_reverse(sentence):
return reverse(sentence.upper())
def reverse(sentence):
return sentence[::-1]
text = uppercase_and_reverse("Do not go gent... | 73 | 0 | 46 |
c6ce80e178644e1f29c20e47a8b2f1716a9fba84 | 1,108 | py | Python | contrib/hooks/mypy-after-commit.py | BD2KGenomics/slugflow | ec83920e1636fd24814688bf1569feebfae73620 | [
"Apache-2.0"
] | 516 | 2015-07-30T19:08:55.000Z | 2018-07-03T20:53:42.000Z | contrib/hooks/mypy-after-commit.py | BD2KGenomics/toil | 88d73fbfd42ec22fd692940fc1efdacaf53b1b76 | [
"Apache-2.0"
] | 1,949 | 2015-07-29T23:38:49.000Z | 2018-07-05T12:42:04.000Z | contrib/hooks/mypy-after-commit.py | BD2KGenomics/slugflow | ec83920e1636fd24814688bf1569feebfae73620 | [
"Apache-2.0"
] | 193 | 2015-07-31T18:52:57.000Z | 2018-07-05T08:54:11.000Z | #!/usr/bin/env python3
"""
mypy-after-commit.py: Git post-commit script to type-check commits in the background.
Install with:
ln -rs ./contrib/hooks/mypy-after-commit.py .git/hooks/post-commit
"""
import sys
import subprocess
import os
from lib import announce, complain, file_link, in_acceptable_environment, chec... | 30.777778 | 119 | 0.662455 | #!/usr/bin/env python3
"""
mypy-after-commit.py: Git post-commit script to type-check commits in the background.
Install with:
ln -rs ./contrib/hooks/mypy-after-commit.py .git/hooks/post-commit
"""
import sys
import subprocess
import os
from lib import announce, complain, file_link, in_acceptable_environment, chec... | 651 | 0 | 23 |
cf5b5fa65ec48875377f8b64f7f69b2b857ed940 | 3,681 | py | Python | benchmark.py | janmotl/iinc | 45c08b7aa341969e9cbcb8e4e8f757df8611c143 | [
"BSD-3-Clause"
] | null | null | null | benchmark.py | janmotl/iinc | 45c08b7aa341969e9cbcb8e4e8f757df8611c143 | [
"BSD-3-Clause"
] | null | null | null | benchmark.py | janmotl/iinc | 45c08b7aa341969e9cbcb8e4e8f757df8611c143 | [
"BSD-3-Clause"
] | null | null | null | import openml
import pandas as pd
import numpy as np
from sklearn import metrics
from sklearn.neighbors import KNeighborsClassifier
from sklearn.preprocessing import OneHotEncoder
from sklearn.model_selection import train_test_split
import iinc
# Measures
# Dataset list
openml_list = openml.datasets.list_datasets()
... | 49.743243 | 315 | 0.732681 | import openml
import pandas as pd
import numpy as np
from sklearn import metrics
from sklearn.neighbors import KNeighborsClassifier
from sklearn.preprocessing import OneHotEncoder
from sklearn.model_selection import train_test_split
import iinc
# Measures
def brier_multi(targets, probs):
enc = OneHotEncoder(handl... | 179 | 0 | 22 |
25349641f6de6d6a7781623e9b135442bcf04a8a | 234 | py | Python | src/config.py | takeruadelbert/epass-barrier-gate | 62af69bef52dddc6da74b74bd2fdaff1ee166988 | [
"Unlicense"
] | null | null | null | src/config.py | takeruadelbert/epass-barrier-gate | 62af69bef52dddc6da74b74bd2fdaff1ee166988 | [
"Unlicense"
] | null | null | null | src/config.py | takeruadelbert/epass-barrier-gate | 62af69bef52dddc6da74b74bd2fdaff1ee166988 | [
"Unlicense"
] | null | null | null | # Server Configuration
ip_address_server = "http://192.168.88.204"
url = "/epass2018/parking_outs/api_member_out"
timeout_connection = 30 # in second(s)
retry_connect = 3 # in second(s)
# HID Configuration
hid_name = "Sycreader RFID" | 29.25 | 46 | 0.760684 | # Server Configuration
ip_address_server = "http://192.168.88.204"
url = "/epass2018/parking_outs/api_member_out"
timeout_connection = 30 # in second(s)
retry_connect = 3 # in second(s)
# HID Configuration
hid_name = "Sycreader RFID" | 0 | 0 | 0 |
6fe86046db560d660afca7e32d8640d5918dda43 | 19,494 | py | Python | textworld/generator/text_grammar.py | zhaozj89/TextWorld | c6b626af9e5fbd3bc03e98cbf154f85bfc365373 | [
"MIT"
] | null | null | null | textworld/generator/text_grammar.py | zhaozj89/TextWorld | c6b626af9e5fbd3bc03e98cbf154f85bfc365373 | [
"MIT"
] | null | null | null | textworld/generator/text_grammar.py | zhaozj89/TextWorld | c6b626af9e5fbd3bc03e98cbf154f85bfc365373 | [
"MIT"
] | null | null | null | # Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT license.
import glob
import re
import warnings
from os.path import join as pjoin
from collections import OrderedDict, defaultdict
from typing import Any, Optional, Mapping, List, Tuple, Container, Union
from numpy.random import Rand... | 36.437383 | 120 | 0.579306 | # Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT license.
import glob
import re
import warnings
from os.path import join as pjoin
from collections import OrderedDict, defaultdict
from typing import Any, Optional, Mapping, List, Tuple, Container, Union
from numpy.random import Rand... | 4,570 | 1,600 | 179 |
5264a57f02fed651ceacadfeeeba02d14ca19210 | 9,877 | py | Python | WMemPy/wmem_process.py | fitancinpet/WMemPy | ed9b3bece2aca465635e09526060165b2704cfcc | [
"MIT"
] | null | null | null | WMemPy/wmem_process.py | fitancinpet/WMemPy | ed9b3bece2aca465635e09526060165b2704cfcc | [
"MIT"
] | 2 | 2021-11-11T18:05:04.000Z | 2022-03-14T05:58:01.000Z | WMemPy/wmem_process.py | fitancinpet/WMemPy | ed9b3bece2aca465635e09526060165b2704cfcc | [
"MIT"
] | null | null | null | # pylint: disable=unused-wildcard-import,c-extension-no-member,too-many-instance-attributes,no-self-use,raise-missing-from,no-member,wildcard-import
"""Provides a wrapper for Windows Process defined by PID"""
from ctypes import *
from ctypes.wintypes import *
from wmempy.wmem_system import WinSys as WSys
from wmempy.wm... | 45.100457 | 148 | 0.625899 | # pylint: disable=unused-wildcard-import,c-extension-no-member,too-many-instance-attributes,no-self-use,raise-missing-from,no-member,wildcard-import
"""Provides a wrapper for Windows Process defined by PID"""
from ctypes import *
from ctypes.wintypes import *
from wmempy.wmem_system import WinSys as WSys
from wmempy.wm... | 0 | 0 | 0 |
7d451f5323aa19b8599666accc236e26ee518fd2 | 229 | py | Python | setup.py | vankhoa21991/patho_toolbox | 11489e958500505d501bcd11ea5c944d7629ea0f | [
"MIT"
] | null | null | null | setup.py | vankhoa21991/patho_toolbox | 11489e958500505d501bcd11ea5c944d7629ea0f | [
"MIT"
] | null | null | null | setup.py | vankhoa21991/patho_toolbox | 11489e958500505d501bcd11ea5c944d7629ea0f | [
"MIT"
] | null | null | null | from setuptools import setup
setup(
name='patho_toolbox',
version='',
packages=[''],
url='',
license='',
author='vankhoa',
author_email='vankhoa21991@gmail.com',
description='pathology toolbox'
)
| 17.615385 | 42 | 0.628821 | from setuptools import setup
setup(
name='patho_toolbox',
version='',
packages=[''],
url='',
license='',
author='vankhoa',
author_email='vankhoa21991@gmail.com',
description='pathology toolbox'
)
| 0 | 0 | 0 |
47c2512a34ee31d766ae393446ae08da6bf325c4 | 5,982 | py | Python | KaSaAn/scripts/kappa_snapshot_largest_complex_time.py | hmedina/KaSaAn | 83e4e31ff0e0062762aacfbc65bbdd290808bb51 | [
"MIT"
] | 1 | 2020-05-11T14:31:54.000Z | 2020-05-11T14:31:54.000Z | KaSaAn/scripts/kappa_snapshot_largest_complex_time.py | hmedina/KaSaAn | 83e4e31ff0e0062762aacfbc65bbdd290808bb51 | [
"MIT"
] | 4 | 2017-08-31T11:16:08.000Z | 2020-07-10T22:31:45.000Z | KaSaAn/scripts/kappa_snapshot_largest_complex_time.py | hmedina/KaSaAn | 83e4e31ff0e0062762aacfbc65bbdd290808bb51 | [
"MIT"
] | 2 | 2018-02-06T20:53:26.000Z | 2019-05-11T18:05:38.000Z | #! /usr/bin/env python3
"""
Plot the compostion of the giant component in time from a set of snapshots located in a directory.
``` {.text}
usage: kappa_snapshot_largest_complex_time
[-h] Show detailed help.
[-d DIRECTORY] Directory where snapshots are stored, default is <.>
[-p PATTERN] ... | 62.3125 | 120 | 0.643765 | #! /usr/bin/env python3
"""
Plot the compostion of the giant component in time from a set of snapshots located in a directory.
``` {.text}
usage: kappa_snapshot_largest_complex_time
[-h] Show detailed help.
[-d DIRECTORY] Directory where snapshots are stored, default is <.>
[-p PATTERN] ... | 0 | 0 | 0 |
338d79644608d97295496fc4dd95f33db6d74aa4 | 13,806 | py | Python | tempest/api/orchestration/stacks/test_existing_stacks.py | BeenzSyed/tempest | 7a64ee1216d844f6b99928b53f5c665b84cb8719 | [
"Apache-2.0"
] | null | null | null | tempest/api/orchestration/stacks/test_existing_stacks.py | BeenzSyed/tempest | 7a64ee1216d844f6b99928b53f5c665b84cb8719 | [
"Apache-2.0"
] | null | null | null | tempest/api/orchestration/stacks/test_existing_stacks.py | BeenzSyed/tempest | 7a64ee1216d844f6b99928b53f5c665b84cb8719 | [
"Apache-2.0"
] | null | null | null | # vim: tabstop=4 shiftwidth=4 softtabstop=4
# 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... | 42.349693 | 118 | 0.582211 | # vim: tabstop=4 shiftwidth=4 softtabstop=4
# 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... | 11,932 | 915 | 23 |
16433fd0eaba504876fc441b4688280ba16568d0 | 3,413 | py | Python | mlcl/profiling/__main__.py | tmplxz/carelabels | 7e9b93ffa05d6f3e6a598ffb79cef3df7aecac68 | [
"MIT"
] | null | null | null | mlcl/profiling/__main__.py | tmplxz/carelabels | 7e9b93ffa05d6f3e6a598ffb79cef3df7aecac68 | [
"MIT"
] | null | null | null | mlcl/profiling/__main__.py | tmplxz/carelabels | 7e9b93ffa05d6f3e6a598ffb79cef3df7aecac68 | [
"MIT"
] | null | null | null | import json
import argparse
from mlcl.init_implementation import init_implementation
if __name__ == '__main__':
try:
parser = argparse.ArgumentParser()
parser.add_argument('--profiling-method', help='Type of profiling that shall be run.')
parser.add_argument('--implementation', help='Imp... | 39.229885 | 105 | 0.592148 | import json
import argparse
from mlcl.init_implementation import init_implementation
if __name__ == '__main__':
try:
parser = argparse.ArgumentParser()
parser.add_argument('--profiling-method', help='Type of profiling that shall be run.')
parser.add_argument('--implementation', help='Imp... | 0 | 0 | 0 |
46255fc0076b78ef7dea4769f2f2add194d3ad05 | 3,208 | py | Python | tests/bugs/core_4653_test.py | reevespaul/firebird-qa | 98f16f425aa9ab8ee63b86172f959d63a2d76f21 | [
"MIT"
] | null | null | null | tests/bugs/core_4653_test.py | reevespaul/firebird-qa | 98f16f425aa9ab8ee63b86172f959d63a2d76f21 | [
"MIT"
] | null | null | null | tests/bugs/core_4653_test.py | reevespaul/firebird-qa | 98f16f425aa9ab8ee63b86172f959d63a2d76f21 | [
"MIT"
] | null | null | null | #coding:utf-8
#
# id: bugs.core_4653
# title: Crash on infinite mutual SP calls (instead of "Too many concurrent executions of the same request.")
# decription: 20150108: crach every even run, WI-T3.0.0.31529, Win XP SP3
# tracker_id: CORE-4653
# min_versions: ['3.0']
# versions: 3.0
# qmid: ... | 28.900901 | 116 | 0.620012 | #coding:utf-8
#
# id: bugs.core_4653
# title: Crash on infinite mutual SP calls (instead of "Too many concurrent executions of the same request.")
# decription: 20150108: crach every even run, WI-T3.0.0.31529, Win XP SP3
# tracker_id: CORE-4653
# min_versions: ['3.0']
# versions: 3.0
# qmid: ... | 239 | 0 | 22 |
fe6fd95012a32e29c0720d68aab1f4f2e92a6982 | 3,003 | py | Python | day16/main.py | urosZoretic/adventofcode2021 | aa55b9ba9d07ef70ad2ecfd0b72b14329e7685ba | [
"Apache-2.0"
] | null | null | null | day16/main.py | urosZoretic/adventofcode2021 | aa55b9ba9d07ef70ad2ecfd0b72b14329e7685ba | [
"Apache-2.0"
] | null | null | null | day16/main.py | urosZoretic/adventofcode2021 | aa55b9ba9d07ef70ad2ecfd0b72b14329e7685ba | [
"Apache-2.0"
] | null | null | null | import functools
## these code solution is from: https://github.com/danielgaylord/coding-exercises/blob/main/Advent%20of%20Code/2021-Day16.py
# Read puzzle input and return as usable data structure
# Find value of a literal value subpacket
# Recursive function to decode packets and subpackets
if __name__ == "_... | 32.641304 | 124 | 0.594073 | import functools
## these code solution is from: https://github.com/danielgaylord/coding-exercises/blob/main/Advent%20of%20Code/2021-Day16.py
# Read puzzle input and return as usable data structure
def parse_input(file):
hex_vals = []
with open(file, 'r') as input:
for line in input:
hex_v... | 2,310 | 0 | 89 |
170d9421a56a71f1df8912ac209bb0aa9e5b3e00 | 2,278 | py | Python | simulations/old/player_model/get_parameters.py | hawkrobe/fish | 2000e46c397f7c95bba8ecb0c6afd26013929ff8 | [
"MIT"
] | 1 | 2015-12-11T16:51:08.000Z | 2015-12-11T16:51:08.000Z | simulations/old/player_model/get_parameters.py | hawkrobe/fish | 2000e46c397f7c95bba8ecb0c6afd26013929ff8 | [
"MIT"
] | 3 | 2020-02-11T21:36:11.000Z | 2020-11-01T21:25:17.000Z | simulations/old/player_model/get_parameters.py | hawkrobe/couzin_replication | ff491639954f0652d6b4b2a318477bb54c38fadf | [
"MIT"
] | null | null | null |
import os
import pandas as pd
from fit_simple import *
from social_heuristic import *
from baseline_model import *
from test_model import *
from sklearn import gaussian_process
data = []
in_dir = '../../new-processed/'
out_dir = '../../modeling/'
light_fields = ['0-1en01', '1-1en01', '2-1en01', '3-1en01']
pars ... | 24.494624 | 90 | 0.585162 |
import os
import pandas as pd
from fit_simple import *
from social_heuristic import *
from baseline_model import *
from test_model import *
from sklearn import gaussian_process
data = []
in_dir = '../../new-processed/'
out_dir = '../../modeling/'
light_fields = ['0-1en01', '1-1en01', '2-1en01', '3-1en01']
pars ... | 146 | 0 | 23 |
bcbeceac480554b5faf16ed262ff680290dfda1a | 3,123 | py | Python | misc/make_compare_red_crn_lvls.py | LBJ-Wade/correlated_noise_pta_2020 | 1990d3aa4f2d436f84fcfb19317b00b11590c230 | [
"MIT"
] | 1 | 2021-07-28T15:17:58.000Z | 2021-07-28T15:17:58.000Z | misc/make_compare_red_crn_lvls.py | LBJ-Wade/correlated_noise_pta_2020 | 1990d3aa4f2d436f84fcfb19317b00b11590c230 | [
"MIT"
] | null | null | null | misc/make_compare_red_crn_lvls.py | LBJ-Wade/correlated_noise_pta_2020 | 1990d3aa4f2d436f84fcfb19317b00b11590c230 | [
"MIT"
] | 2 | 2021-08-17T01:57:23.000Z | 2022-01-21T21:36:50.000Z | import os
import json
import glob
import numpy as np
from matplotlib import pyplot as plt
from enterprise_warp.results import suitable_estimator
crn_lvl_dir = '/fred/oz002/bgoncharov/correlated_noise_pta_2020_out/dr2_timing_20200607/20200908_20200917_cpl_vargam_x1psr/noisefiles/'
pe_lvl_dir = '/fred/oz002/bgoncharov/... | 32.873684 | 135 | 0.685239 | import os
import json
import glob
import numpy as np
from matplotlib import pyplot as plt
from enterprise_warp.results import suitable_estimator
crn_lvl_dir = '/fred/oz002/bgoncharov/correlated_noise_pta_2020_out/dr2_timing_20200607/20200908_20200917_cpl_vargam_x1psr/noisefiles/'
pe_lvl_dir = '/fred/oz002/bgoncharov/... | 0 | 0 | 0 |
b48a9b03108984d9c53cc37df35ae30bc5e8b2ac | 455 | py | Python | equipment/serializers/weapon.py | SamusChief/myth-caster-api | 76a43f48b70c6a4b509c90757d7906689799cc25 | [
"MIT"
] | null | null | null | equipment/serializers/weapon.py | SamusChief/myth-caster-api | 76a43f48b70c6a4b509c90757d7906689799cc25 | [
"MIT"
] | null | null | null | equipment/serializers/weapon.py | SamusChief/myth-caster-api | 76a43f48b70c6a4b509c90757d7906689799cc25 | [
"MIT"
] | 1 | 2021-08-14T18:46:52.000Z | 2021-08-14T18:46:52.000Z | """ Weapon serializers. """
from rest_framework import serializers
from common.serializers import OwnedModelSerializer
from equipment.models import Weapon, WeaponProperty
class WeaponSerializer(OwnedModelSerializer):
""" Serializer for Weapon model """
properties = serializers.PrimaryKeyRelatedField(
... | 28.4375 | 57 | 0.727473 | """ Weapon serializers. """
from rest_framework import serializers
from common.serializers import OwnedModelSerializer
from equipment.models import Weapon, WeaponProperty
class WeaponSerializer(OwnedModelSerializer):
""" Serializer for Weapon model """
properties = serializers.PrimaryKeyRelatedField(
... | 0 | 58 | 26 |
95ddb6071c386db85b8d25141121cc15bb2ee64a | 1,485 | py | Python | script/gen_on.py | tmattio/js-bindings | 109076fe682c84eb1cf01c7f38ee1f4163fb3a9a | [
"MIT"
] | 18 | 2021-04-14T02:52:09.000Z | 2021-11-14T17:08:09.000Z | script/gen_on.py | tmattio/ocaml-ecmascript | 109076fe682c84eb1cf01c7f38ee1f4163fb3a9a | [
"MIT"
] | 4 | 2021-04-14T16:23:13.000Z | 2021-05-22T00:00:55.000Z | script/gen_on.py | tmattio/ocaml-ecmascript | 109076fe682c84eb1cf01c7f38ee1f4163fb3a9a | [
"MIT"
] | 1 | 2021-04-14T15:29:24.000Z | 2021-04-14T15:29:24.000Z | l = []
for el in l:
print(
f"""
module {el.capitalize().replace(".", "_")}Listener : sig
type t = ???
val t_to_js : t -> Ojs.t
val t_of_js : Ojs.t -> t
end
"""
)
print(
"""
type listener =
([
"""
)
for el in l:
print(
f"""
| `{el.capitalize().replace(".", "_")} of ... | 16.875 | 87 | 0.587879 | l = []
for el in l:
print(
f"""
module {el.capitalize().replace(".", "_")}Listener : sig
type t = ???
val t_to_js : t -> Ojs.t
val t_of_js : Ojs.t -> t
end
"""
)
print(
"""
type listener =
([
"""
)
for el in l:
print(
f"""
| `{el.capitalize().replace(".", "_")} of ... | 0 | 0 | 0 |
255693d27895452ebb78b587fadbd7a5416d518a | 10,802 | py | Python | FIGURE5/figure5.py | adagj/ECS_SOconvection | d1bb935b37380f11e021a463c6a807d7527220a6 | [
"MIT"
] | 1 | 2021-11-26T00:29:28.000Z | 2021-11-26T00:29:28.000Z | FIGURE5/figure5.py | adagj/ECS_SOconvection | d1bb935b37380f11e021a463c6a807d7527220a6 | [
"MIT"
] | null | null | null | FIGURE5/figure5.py | adagj/ECS_SOconvection | d1bb935b37380f11e021a463c6a807d7527220a6 | [
"MIT"
] | null | null | null | i#!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
YEAR: 2019 - 2021
@author: ADA GJERMUNDSEN
This script will reproduce FIGURE 5 in Gjermundsen et. al 2021
The data used for plotting is generated by scripts
contained in the same folder as this (FIGURE5)
"""
import xarray as xr
import warnings
warnings.simplefilte... | 44.089796 | 116 | 0.583781 | i#!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
YEAR: 2019 - 2021
@author: ADA GJERMUNDSEN
This script will reproduce FIGURE 5 in Gjermundsen et. al 2021
The data used for plotting is generated by scripts
contained in the same folder as this (FIGURE5)
"""
import xarray as xr
import warnings
warnings.simplefilte... | 124 | 0 | 23 |
d95ddc6480d4533f071e64f4879e9316d5734897 | 15,513 | py | Python | test/test_5_export.py | meracan/s3-netcdf-api | 920d09ef7b1a205230ea2c76eabcb4853616992c | [
"MIT"
] | 1 | 2020-08-30T01:47:45.000Z | 2020-08-30T01:47:45.000Z | test/test_5_export.py | meracan/s3-netcdf-api | 920d09ef7b1a205230ea2c76eabcb4853616992c | [
"MIT"
] | null | null | null | test/test_5_export.py | meracan/s3-netcdf-api | 920d09ef7b1a205230ea2c76eabcb4853616992c | [
"MIT"
] | null | null | null | import os
import numpy as np
import pandas as pd
import json
import base64
# from netCDF4 import Dataset,chartostring
from netcdf import NetCDF
from s3netcdfapi import S3NetCDFAPI
# import binpy
import scipy.io as sio
from mbtilesapi import getTile,getVT,readVT,send,VT2Tile,Points2VT,getVTfromBinary
from s3netcdfapi.d... | 49.5623 | 169 | 0.666667 | import os
import numpy as np
import pandas as pd
import json
import base64
# from netCDF4 import Dataset,chartostring
from netcdf import NetCDF
from s3netcdfapi import S3NetCDFAPI
# import binpy
import scipy.io as sio
from mbtilesapi import getTile,getVT,readVT,send,VT2Tile,Points2VT,getVTfromBinary
from s3netcdfapi.d... | 11,064 | 0 | 171 |
c3684a987ec596068589973e3b2e6fe8dbed7fec | 3,003 | py | Python | Average.py | litrin/MACD | 0a289967a7f0079f34807b038613a5acb9013a0f | [
"MIT"
] | 13 | 2016-06-29T09:49:15.000Z | 2021-06-08T02:07:08.000Z | Average.py | litrin/MACD | 0a289967a7f0079f34807b038613a5acb9013a0f | [
"MIT"
] | null | null | null | Average.py | litrin/MACD | 0a289967a7f0079f34807b038613a5acb9013a0f | [
"MIT"
] | 8 | 2016-07-26T09:21:20.000Z | 2020-09-16T02:08:38.000Z | # The MIT License (MIT)
#
# Copyright (c) 2016 Litrin Jiang
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
# in the Software without restriction, including without limitation the rights
# to use, copy, modi... | 26.342105 | 80 | 0.663337 | # The MIT License (MIT)
#
# Copyright (c) 2016 Litrin Jiang
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
# in the Software without restriction, including without limitation the rights
# to use, copy, modi... | 1,154 | 494 | 141 |
936a9a1671608a9987d9267ad61b1927c3c7eb55 | 4,676 | py | Python | GlobalNetConfirmed.py | UtopiaXC/CovidVisualization | 157d7c5585086a04396141ff3fa6bf9c373f8c58 | [
"MIT"
] | 3 | 2020-09-21T15:12:29.000Z | 2021-02-19T08:17:51.000Z | GlobalNetConfirmed.py | UtopiaXC/CovidVisualization | 157d7c5585086a04396141ff3fa6bf9c373f8c58 | [
"MIT"
] | null | null | null | GlobalNetConfirmed.py | UtopiaXC/CovidVisualization | 157d7c5585086a04396141ff3fa6bf9c373f8c58 | [
"MIT"
] | null | null | null | # coding:utf-8
import numpy as np
import matplotlib.pyplot as plt
FileConfirmed=open('source/GlobalConfirm.csv', 'r')
lines_confirm=FileConfirmed.readlines()
lines_confirm.pop(0)
FileRecovered=open('source/GlobalRecovered.csv', 'r')
lines_recovered=FileRecovered.readlines()
lines_recovered.pop(0)
FileDeath=open('sou... | 27.186047 | 53 | 0.634731 | # coding:utf-8
import numpy as np
import matplotlib.pyplot as plt
FileConfirmed=open('source/GlobalConfirm.csv', 'r')
lines_confirm=FileConfirmed.readlines()
lines_confirm.pop(0)
FileRecovered=open('source/GlobalRecovered.csv', 'r')
lines_recovered=FileRecovered.readlines()
lines_recovered.pop(0)
FileDeath=open('sou... | 0 | 0 | 0 |
ec5c2456ac29075c683ca0c51c1b60da03a7b241 | 2,564 | py | Python | src/wavelet-FE/self_attention.py | Omekaago101/Intracranial-Hemorrhage-Classification | 4f53da3a3869be7b451edc558ef06c5c41083b4b | [
"MIT"
] | null | null | null | src/wavelet-FE/self_attention.py | Omekaago101/Intracranial-Hemorrhage-Classification | 4f53da3a3869be7b451edc558ef06c5c41083b4b | [
"MIT"
] | null | null | null | src/wavelet-FE/self_attention.py | Omekaago101/Intracranial-Hemorrhage-Classification | 4f53da3a3869be7b451edc558ef06c5c41083b4b | [
"MIT"
] | null | null | null | import torch
import torch.nn as nn
import numpy as np
from einops import rearrange
#from nystrom_attention import Nystromformer
import gc
import collections
import torch.nn.functional as F
class ConvBlock(nn.Module):
"""Some Information about ConvBlock"""
if __name__ == '__main__':
x = torch.rand((... | 30.52381 | 96 | 0.576443 | import torch
import torch.nn as nn
import numpy as np
from einops import rearrange
#from nystrom_attention import Nystromformer
import gc
import collections
import torch.nn.functional as F
class ConvBlock(nn.Module):
"""Some Information about ConvBlock"""
def __init__(self,channels,bn=False, activation=False,p... | 1,868 | 14 | 272 |
3cf160f7a77fc6b6dfd6144ab0fd462e658870c0 | 4,018 | py | Python | backend/commentapp/views.py | Lenend-KPU/LBS-Platform | 75ba24db8969248e74e9d974638977de1c0bc36a | [
"MIT"
] | 15 | 2020-12-23T13:56:49.000Z | 2021-12-10T11:04:23.000Z | backend/commentapp/views.py | Lenend-KPU/LBS-Platform | 75ba24db8969248e74e9d974638977de1c0bc36a | [
"MIT"
] | 41 | 2021-03-19T07:51:48.000Z | 2021-11-22T09:45:46.000Z | backend/commentapp/views.py | Lenend-KPU/LBS-Platform | 75ba24db8969248e74e9d974638977de1c0bc36a | [
"MIT"
] | 3 | 2021-03-24T15:18:24.000Z | 2021-09-11T14:51:35.000Z | import sys
sys.path.append("..")
from utils import utils, responses
from django.http import HttpResponse, HttpRequest
from django.views import View
from rest_framework.views import APIView # For swagger
from documentapp.models import Document
from profileapp.models import Profile
from .models import Comment
# Create... | 36.862385 | 87 | 0.669487 | import sys
sys.path.append("..")
from utils import utils, responses
from django.http import HttpResponse, HttpRequest
from django.views import View
from rest_framework.views import APIView # For swagger
from documentapp.models import Document
from profileapp.models import Profile
from .models import Comment
# Create... | 3,590 | 9 | 178 |
a8b405bcf60c4d988ab422df79d1c75c17c2bf66 | 7,766 | py | Python | kluctl/e2e/test_inclusion.py | AljoschaP/kluctl | 40007d2767b42c13ef9ed66de9322f374f35151e | [
"Apache-2.0"
] | 26 | 2021-08-18T11:18:46.000Z | 2022-03-16T09:28:43.000Z | kluctl/e2e/test_inclusion.py | AljoschaP/kluctl | 40007d2767b42c13ef9ed66de9322f374f35151e | [
"Apache-2.0"
] | 4 | 2021-09-07T09:55:29.000Z | 2022-03-03T09:05:01.000Z | kluctl/e2e/test_inclusion.py | AljoschaP/kluctl | 40007d2767b42c13ef9ed66de9322f374f35151e | [
"Apache-2.0"
] | 4 | 2021-09-04T11:52:33.000Z | 2022-03-16T09:18:20.000Z | from pytest_kind import KindCluster
from kluctl.e2e.conftest import recreate_namespace
from kluctl.e2e.kluctl_test_project import KluctlTestProject
from kluctl.e2e.kluctl_test_project_helpers import add_configmap_deployment
from kluctl.utils.dict_utils import get_dict_value
from kluctl.utils.yaml_utils import yaml_loa... | 41.308511 | 132 | 0.627994 | from pytest_kind import KindCluster
from kluctl.e2e.conftest import recreate_namespace
from kluctl.e2e.kluctl_test_project import KluctlTestProject
from kluctl.e2e.kluctl_test_project_helpers import add_configmap_deployment
from kluctl.utils.dict_utils import get_dict_value
from kluctl.utils.yaml_utils import yaml_loa... | 7,259 | 0 | 184 |
e01dfca3e82b099db8f27bf53ee082c79b861ce9 | 425 | py | Python | config/settings/dev.py | oleg45202/serverless-django-zeit-now-master | 2b5ba45835f272870c6812e70857dda3047a1347 | [
"MIT"
] | 3 | 2020-02-18T20:12:05.000Z | 2020-05-03T02:32:00.000Z | config/settings/dev.py | oleg45202/serverless-django-zeit-now-master | 2b5ba45835f272870c6812e70857dda3047a1347 | [
"MIT"
] | 4 | 2021-04-08T20:17:43.000Z | 2021-06-10T19:03:57.000Z | config/settings/dev.py | oleg45202/serverless-django-zeit-now-master | 2b5ba45835f272870c6812e70857dda3047a1347 | [
"MIT"
] | null | null | null | from .base import *
# SECURITY WARNING: don't run with debug turned on in production!
DEBUG = True
ALLOWED_HOSTS = ('*',)
CSRF_COOKIE_SECURE = False
SESSION_COOKIE_SECURE = False
INTERNAL_IPS = ('127.0.0.1',)
# Email settings for Mailhog.
# These need to match the settings in docker-compose.yml.
#
EMAIL_BACKEND =... | 20.238095 | 65 | 0.745882 | from .base import *
# SECURITY WARNING: don't run with debug turned on in production!
DEBUG = True
ALLOWED_HOSTS = ('*',)
CSRF_COOKIE_SECURE = False
SESSION_COOKIE_SECURE = False
INTERNAL_IPS = ('127.0.0.1',)
# Email settings for Mailhog.
# These need to match the settings in docker-compose.yml.
#
EMAIL_BACKEND =... | 0 | 0 | 0 |
15efe449f0f5e9d62a2db828a7eaba78409f172c | 665 | py | Python | examples/first/docxgen.py | ehki/WdBibTeX | f7c2e06dc920df9fe7d002310811c514b3c03848 | [
"MIT"
] | null | null | null | examples/first/docxgen.py | ehki/WdBibTeX | f7c2e06dc920df9fe7d002310811c514b3c03848 | [
"MIT"
] | null | null | null | examples/first/docxgen.py | ehki/WdBibTeX | f7c2e06dc920df9fe7d002310811c514b3c03848 | [
"MIT"
] | null | null | null | import os
import win32com.client as client
text = """
This sample document is generated by WdBibTeX.
Some text with dummy citation \\cite{enArticle1} will be converted \
to [1] by executing wdbibtex.
The list of bibliography is placed to the thebibliography command as follows:
\\thebibliography
"""
ap = client.Dis... | 19 | 77 | 0.712782 | import os
import win32com.client as client
text = """
This sample document is generated by WdBibTeX.
Some text with dummy citation \\cite{enArticle1} will be converted \
to [1] by executing wdbibtex.
The list of bibliography is placed to the thebibliography command as follows:
\\thebibliography
"""
ap = client.Dis... | 0 | 0 | 0 |
134979c651476ad581f1700b2b85aef18579d427 | 1,679 | py | Python | visitor_manage/src/migrations/0002_auto_20200616_1303.py | parth-27/Visitor-Management-System | 575b7ad1a4eecf65e764399ea53e836b8cf1768d | [
"MIT"
] | 3 | 2020-06-30T15:46:56.000Z | 2021-11-17T13:13:15.000Z | visitor_manage/src/migrations/0002_auto_20200616_1303.py | DipikaPawar12/Visitor-Management-System | 9585d8613daa4f5a0b0a81cce6850f79db768a64 | [
"MIT"
] | 1 | 2021-06-10T19:39:03.000Z | 2021-06-10T19:39:03.000Z | visitor_manage/src/migrations/0002_auto_20200616_1303.py | DipikaPawar12/Visitor-Management-System | 9585d8613daa4f5a0b0a81cce6850f79db768a64 | [
"MIT"
] | 1 | 2020-06-30T15:49:07.000Z | 2020-06-30T15:49:07.000Z | # Generated by Django 3.0.6 on 2020-06-16 13:03
from django.db import migrations, models
| 34.265306 | 130 | 0.536629 | # Generated by Django 3.0.6 on 2020-06-16 13:03
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('src', '0001_initial'),
]
operations = [
migrations.CreateModel(
name='Admin',
fields=[
('gate', mode... | 0 | 1,565 | 23 |
4497e8a1d85d7e8c85a5ca1f77d24d913b7cbfce | 924 | py | Python | fn_geocoding/fn_geocoding/util/selftest.py | rudimeyer/resilient-community-apps | 7a46841ba41fa7a1c421d4b392b0a3ca9e36bd00 | [
"MIT"
] | 1 | 2020-08-25T03:43:07.000Z | 2020-08-25T03:43:07.000Z | fn_geocoding/fn_geocoding/util/selftest.py | rudimeyer/resilient-community-apps | 7a46841ba41fa7a1c421d4b392b0a3ca9e36bd00 | [
"MIT"
] | 1 | 2019-07-08T16:57:48.000Z | 2019-07-08T16:57:48.000Z | fn_geocoding/fn_geocoding/util/selftest.py | rudimeyer/resilient-community-apps | 7a46841ba41fa7a1c421d4b392b0a3ca9e36bd00 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
# (c) Copyright IBM Corp. 2018. All Rights Reserved.
# pragma pylint: disable=unused-argument, no-self-use
"""Function implementation"""
import logging
from fn_geocoding.util.request_common import execute_call
log = logging.getLogger(__name__)
log.setLevel(logging.INFO)
log.addHandler(logging.... | 25.666667 | 83 | 0.600649 | # -*- coding: utf-8 -*-
# (c) Copyright IBM Corp. 2018. All Rights Reserved.
# pragma pylint: disable=unused-argument, no-self-use
"""Function implementation"""
import logging
from fn_geocoding.util.request_common import execute_call
log = logging.getLogger(__name__)
log.setLevel(logging.INFO)
log.addHandler(logging.... | 0 | 0 | 0 |
8d4efdf0f6c7a24aa8b5de2661f530961001f678 | 30 | py | Python | Python3/Tornado/apps/pg/PG_Wallet/src/__init__.py | youngqqcn/QBlockChainNotes | 85122049024dc5555705bf016312491a51966621 | [
"MIT"
] | 24 | 2018-11-01T03:36:43.000Z | 2022-03-28T08:20:30.000Z | Python3/Tornado/apps/pg/PG_Wallet/src/__init__.py | songning4/QBlockChainNotes | d65ede073f5a20f728f41cc6850409693820cdb1 | [
"MIT"
] | 57 | 2019-12-04T08:26:47.000Z | 2022-03-08T07:35:15.000Z | Python3/Tornado/apps/pg/PG_Wallet/src/__init__.py | youngqqcn/QBlockChainNotes | 85122049024dc5555705bf016312491a51966621 | [
"MIT"
] | 11 | 2019-01-04T08:41:57.000Z | 2022-03-16T03:51:36.000Z | from .lib import eth_wallet
| 15 | 29 | 0.766667 | from .lib import eth_wallet
| 0 | 0 | 0 |
37ea1c0d0887663f1225e51a7f63312d2bf8d531 | 17,560 | py | Python | feder/monitorings/tests.py | efefre/feder | fdfe2f213266548fc40cea68ac72f739c8394b8e | [
"MIT"
] | null | null | null | feder/monitorings/tests.py | efefre/feder | fdfe2f213266548fc40cea68ac72f739c8394b8e | [
"MIT"
] | null | null | null | feder/monitorings/tests.py | efefre/feder | fdfe2f213266548fc40cea68ac72f739c8394b8e | [
"MIT"
] | null | null | null | from unittest import skip
from unittest.mock import Mock, patch
from django.core import mail
from django.urls import reverse
from django.test import TestCase
from guardian.shortcuts import assign_perm, get_user_perms
from django.db.models import Count
from feder.cases.factories import CaseFactory
from feder.cases.mode... | 38.091106 | 88 | 0.684624 | from unittest import skip
from unittest.mock import Mock, patch
from django.core import mail
from django.urls import reverse
from django.test import TestCase
from guardian.shortcuts import assign_perm, get_user_perms
from django.db.models import Count
from feder.cases.factories import CaseFactory
from feder.cases.mode... | 13,007 | 2,705 | 527 |
5f0ebb88d0e03b8224cbf45a4c015795bca9ef33 | 341 | py | Python | helperstuff.py | Neitsch/pytest | de03f5cd014bf490709698e76cce3a21f46a006e | [
"MIT"
] | null | null | null | helperstuff.py | Neitsch/pytest | de03f5cd014bf490709698e76cce3a21f46a006e | [
"MIT"
] | 7 | 2018-04-04T19:02:43.000Z | 2018-04-11T19:03:58.000Z | helperstuff.py | Neitsch/pytest | de03f5cd014bf490709698e76cce3a21f46a006e | [
"MIT"
] | null | null | null | from test_in_prod import track_class
@track_class(thorough=True)
class HelperClass(object):
'''
def another_func(self, str_val):
return str_val
'''
| 20.058824 | 36 | 0.624633 | from test_in_prod import track_class
@track_class(thorough=True)
class HelperClass(object):
def __init__(self, number=6):
self.hello = []
self.hello.append(number)
def my_func(self, lst):
lst.extend(self.hello)
return lst
'''
def another_func(self, str_val):
re... | 118 | 0 | 53 |
a569e6f7db2f9416cbb7b04dfb43953fd8372e18 | 5,596 | py | Python | noiseceiling/utils.py | lukassnoek/noiseceiling | b61beef7fc53ea931c6ad01a615cf17fa49e9569 | [
"BSD-3-Clause"
] | 1 | 2022-01-05T06:54:08.000Z | 2022-01-05T06:54:08.000Z | noiseceiling/utils.py | lukassnoek/noiseceiling | b61beef7fc53ea931c6ad01a615cf17fa49e9569 | [
"BSD-3-Clause"
] | null | null | null | noiseceiling/utils.py | lukassnoek/noiseceiling | b61beef7fc53ea931c6ad01a615cf17fa49e9569 | [
"BSD-3-Clause"
] | null | null | null | import numpy as np
import pandas as pd
from tqdm import tqdm
def get_percentiles(x, n_percentiles=5):
""" Utility function to divide a particular variable up into
percentiles. """
return pd.qcut(x, q=n_percentiles, retbins=False, labels=False)
def reduce_repeats(X, y, categorical=False, use_index=Fa... | 32.16092 | 78 | 0.619371 | import numpy as np
import pandas as pd
from tqdm import tqdm
def get_percentiles(x, n_percentiles=5):
""" Utility function to divide a particular variable up into
percentiles. """
return pd.qcut(x, q=n_percentiles, retbins=False, labels=False)
def reduce_repeats(X, y, categorical=False, use_index=Fa... | 626 | 0 | 46 |
6bcb2c4bcb30f7c35923a1623f8b43a52b2f8b8a | 386 | py | Python | src/trusted/python_bindings/test_prog.py | MicrohexHQ/nacl_contracts | 3efab5eecb3cf7ba43f2d61000e65918aa4ba77a | [
"BSD-3-Clause"
] | 6 | 2015-02-06T23:41:01.000Z | 2015-10-21T03:08:51.000Z | src/trusted/python_bindings/test_prog.py | MicrohexHQ/nacl_contracts | 3efab5eecb3cf7ba43f2d61000e65918aa4ba77a | [
"BSD-3-Clause"
] | null | null | null | src/trusted/python_bindings/test_prog.py | MicrohexHQ/nacl_contracts | 3efab5eecb3cf7ba43f2d61000e65918aa4ba77a | [
"BSD-3-Clause"
] | 1 | 2019-10-02T08:41:50.000Z | 2019-10-02T08:41:50.000Z | # Copyright (c) 2010 The Native Client Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
import sys
import naclimc
if __name__ == "__main__":
Main(sys.argv[1:])
| 21.444444 | 72 | 0.722798 | # Copyright (c) 2010 The Native Client Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
import sys
import naclimc
def Main(args):
sock_fd = int(args[0])
socket = naclimc.from_os_socket(sock_fd)
socket.imc_sendmsg("message from ... | 113 | 0 | 23 |
c281419785cad72978270652cfc1fc5ae7498622 | 1,272 | py | Python | redbrick/cli/input/uuid.py | dereklukacs/redbrick-sdk | 4cf93444c1d808694c1601334f9e039e616dfd3d | [
"MIT"
] | 1 | 2020-11-26T04:25:15.000Z | 2020-11-26T04:25:15.000Z | redbrick/cli/input/uuid.py | redbrick-ai/redbrick-sdk | 4cf93444c1d808694c1601334f9e039e616dfd3d | [
"MIT"
] | 33 | 2021-02-04T17:51:53.000Z | 2022-03-17T07:28:36.000Z | redbrick/cli/input/uuid.py | dereklukacs/redbrick-sdk | 4cf93444c1d808694c1601334f9e039e616dfd3d | [
"MIT"
] | 1 | 2021-06-09T10:06:35.000Z | 2021-06-09T10:06:35.000Z | """Input uuid handler."""
import re
from typing import Optional
from InquirerPy import inquirer # type: ignore
from redbrick.cli.cli_base import CLIInputParams
class CLIInputUUID(CLIInputParams):
"""Input uuid handler."""
def __init__(self, entity: Optional[str], name: str) -> None:
"""Init handle... | 30.285714 | 86 | 0.566038 | """Input uuid handler."""
import re
from typing import Optional
from InquirerPy import inquirer # type: ignore
from redbrick.cli.cli_base import CLIInputParams
class CLIInputUUID(CLIInputParams):
"""Input uuid handler."""
def __init__(self, entity: Optional[str], name: str) -> None:
"""Init handle... | 0 | 0 | 0 |
33c5e9480b93ef4989ecf1b8a8fb313a5cff3eb2 | 1,503 | py | Python | jinahub/rankers/SimpleRanker/tests/integration/test_ranker.py | albertocarpentieri/executors | 3b025b6106fca9dba3c2569b0e60da050273fa6e | [
"Apache-2.0"
] | 29 | 2021-07-26T07:16:38.000Z | 2022-03-27T15:10:34.000Z | jinahub/rankers/SimpleRanker/tests/integration/test_ranker.py | albertocarpentieri/executors | 3b025b6106fca9dba3c2569b0e60da050273fa6e | [
"Apache-2.0"
] | 176 | 2021-07-23T08:30:21.000Z | 2022-03-14T12:29:06.000Z | jinahub/rankers/SimpleRanker/tests/integration/test_ranker.py | albertocarpentieri/executors | 3b025b6106fca9dba3c2569b0e60da050273fa6e | [
"Apache-2.0"
] | 16 | 2021-07-26T20:55:40.000Z | 2022-03-18T15:32:17.000Z | __copyright__ = "Copyright (c) 2021 Jina AI Limited. All rights reserved."
__license__ = "Apache-2.0"
import subprocess
import numpy as np
import pytest
from jina import Document, DocumentArray, Flow
from simpleranker import SimpleRanker
@pytest.mark.docker
| 28.358491 | 86 | 0.590153 | __copyright__ = "Copyright (c) 2021 Jina AI Limited. All rights reserved."
__license__ = "Apache-2.0"
import subprocess
import numpy as np
import pytest
from jina import Document, DocumentArray, Flow
from simpleranker import SimpleRanker
def test_integration():
query = Document()
chunks = [Document(), Docum... | 1,195 | 0 | 45 |
68cafc3facaaf4c703925689eae9c1ac69c3d990 | 4,540 | py | Python | recsim/agents/cluster_bandit_agent_test.py | kittipatv/recsim | 63fcacb177a029196abe57910bde88f737d5cca0 | [
"Apache-2.0"
] | 1 | 2020-07-07T07:41:44.000Z | 2020-07-07T07:41:44.000Z | recsim/agents/cluster_bandit_agent_test.py | kittipatv/recsim | 63fcacb177a029196abe57910bde88f737d5cca0 | [
"Apache-2.0"
] | null | null | null | recsim/agents/cluster_bandit_agent_test.py | kittipatv/recsim | 63fcacb177a029196abe57910bde88f737d5cca0 | [
"Apache-2.0"
] | 1 | 2020-04-03T14:21:02.000Z | 2020-04-03T14:21:02.000Z | # coding=utf-8
# coding=utf-8
# Copyright 2019 The RecSim Authors.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by ap... | 35.46875 | 80 | 0.680176 | # coding=utf-8
# coding=utf-8
# Copyright 2019 The RecSim Authors.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by ap... | 3,456 | 28 | 148 |
0e2982b42679826389fae24fb2b70356f90c6791 | 1,045 | py | Python | setup.py | aaronlyy/steamprofile | 43002e62f4924a2a2040a240ed1362c28ad7a8f5 | [
"MIT"
] | null | null | null | setup.py | aaronlyy/steamprofile | 43002e62f4924a2a2040a240ed1362c28ad7a8f5 | [
"MIT"
] | null | null | null | setup.py | aaronlyy/steamprofile | 43002e62f4924a2a2040a240ed1362c28ad7a8f5 | [
"MIT"
] | null | null | null |
from distutils.core import setup
setup(
name = 'steamprofile',
packages = ['steamprofile'],
version = '0.1.2',
license='MIT',
description = 'Gather Information about Profiles on Steam.',
author = 'Aaron Levi Can (aaronlyy)',
author_email = 'aaronlevican@gmail.com',
url = 'https://github.com/aaronlyy/... | 38.703704 | 146 | 0.650718 |
from distutils.core import setup
setup(
name = 'steamprofile',
packages = ['steamprofile'],
version = '0.1.2',
license='MIT',
description = 'Gather Information about Profiles on Steam.',
author = 'Aaron Levi Can (aaronlyy)',
author_email = 'aaronlevican@gmail.com',
url = 'https://github.com/aaronlyy/... | 0 | 0 | 0 |
84b160cc341ab8df8be05b1c91068e2a5a7d3596 | 5,517 | py | Python | series_tiempo_ar_api/libs/indexing/report/report_generator.py | datosgobar/series-tiempo-ar-api | 6b553c573f6e8104f8f3919efe79089b7884280c | [
"MIT"
] | 28 | 2017-12-16T20:30:52.000Z | 2021-08-11T17:35:04.000Z | series_tiempo_ar_api/libs/indexing/report/report_generator.py | datosgobar/series-tiempo-ar-api | 6b553c573f6e8104f8f3919efe79089b7884280c | [
"MIT"
] | 446 | 2017-11-16T15:21:40.000Z | 2021-06-10T20:14:21.000Z | series_tiempo_ar_api/libs/indexing/report/report_generator.py | datosgobar/series-tiempo-ar-api | 6b553c573f6e8104f8f3919efe79089b7884280c | [
"MIT"
] | 12 | 2018-08-23T16:13:32.000Z | 2022-03-01T23:12:28.000Z | #!coding=utf8
from __future__ import unicode_literals
import datetime
from dateutil.relativedelta import relativedelta
from django.conf import settings
from django.template.loader import render_to_string
from django.utils import timezone
from django_datajsonar.models import Catalog, Node, Distribution
from series_tie... | 41.795455 | 111 | 0.686424 | #!coding=utf8
from __future__ import unicode_literals
import datetime
from dateutil.relativedelta import relativedelta
from django.conf import settings
from django.template.loader import render_to_string
from django.utils import timezone
from django_datajsonar.models import Catalog, Node, Distribution
from series_tie... | 3,270 | 1,348 | 23 |
815f1e1abbc78fc9ddd8eca39275fd9d16addef8 | 816 | py | Python | tonic/torch/models/__init__.py | smallguoan/tonic | 245bf781952d418d39dda300e92afc2c47b661a3 | [
"MIT"
] | 1 | 2020-09-08T03:38:23.000Z | 2020-09-08T03:38:23.000Z | tonic/torch/models/__init__.py | smallguoan/tonic | 245bf781952d418d39dda300e92afc2c47b661a3 | [
"MIT"
] | null | null | null | tonic/torch/models/__init__.py | smallguoan/tonic | 245bf781952d418d39dda300e92afc2c47b661a3 | [
"MIT"
] | null | null | null | from .actor_critics import ActorCritic
from .actor_critics import ActorCriticWithTargets
from .actor_critics import ActorTwinCriticWithTargets
from .actors import Actor
from .actors import DetachedScaleGaussianPolicyHead
from .actors import DeterministicPolicyHead
from .actors import GaussianPolicyHead
from .actors im... | 34 | 67 | 0.852941 | from .actor_critics import ActorCritic
from .actor_critics import ActorCriticWithTargets
from .actor_critics import ActorTwinCriticWithTargets
from .actors import Actor
from .actors import DetachedScaleGaussianPolicyHead
from .actors import DeterministicPolicyHead
from .actors import GaussianPolicyHead
from .actors im... | 0 | 0 | 0 |
258d1e80ddda45c7467bbff9fa201635f907f6a3 | 104 | py | Python | {{cookiecutter.project_slug}}/tests/smoke_tests/__init__.py | Steamboat/cookiecutter-devops | 6f07329c9e54b76e671a0308d343d2d9ebff5343 | [
"BSD-3-Clause"
] | null | null | null | {{cookiecutter.project_slug}}/tests/smoke_tests/__init__.py | Steamboat/cookiecutter-devops | 6f07329c9e54b76e671a0308d343d2d9ebff5343 | [
"BSD-3-Clause"
] | null | null | null | {{cookiecutter.project_slug}}/tests/smoke_tests/__init__.py | Steamboat/cookiecutter-devops | 6f07329c9e54b76e671a0308d343d2d9ebff5343 | [
"BSD-3-Clause"
] | null | null | null | """
Tests to be run against production servers and APIs to make sure nothing broke in production.
"""
| 17.333333 | 93 | 0.740385 | """
Tests to be run against production servers and APIs to make sure nothing broke in production.
"""
| 0 | 0 | 0 |
2bacc438a602edda92c3b4335b5c80c6ffff2cb0 | 5,018 | py | Python | scripts/knn.py | mhw32/temperature-as-uncertainty-public | d6c6f05dc217b6169f31ba25385cb4bcdd28ab6a | [
"MIT"
] | 3 | 2021-10-24T01:26:14.000Z | 2021-11-15T12:04:47.000Z | scripts/knn.py | mhw32/temperature-as-uncertainty-public | d6c6f05dc217b6169f31ba25385cb4bcdd28ab6a | [
"MIT"
] | 1 | 2022-03-23T11:39:39.000Z | 2022-03-23T11:39:39.000Z | scripts/knn.py | mhw32/temperature-as-uncertainty-public | d6c6f05dc217b6169f31ba25385cb4bcdd28ab6a | [
"MIT"
] | null | null | null | """
Nearest neighbor accuracy.
"""
import os
import torch
import numpy as np
from tqdm import tqdm
from copy import deepcopy
from dotmap import DotMap
from src.utils import utils
from torchvision import transforms
import torch.nn.functional as F
from torch.utils.data import DataLoader
from src.systems.simclr import Sim... | 35.338028 | 85 | 0.63053 | """
Nearest neighbor accuracy.
"""
import os
import torch
import numpy as np
from tqdm import tqdm
from copy import deepcopy
from dotmap import DotMap
from src.utils import utils
from torchvision import transforms
import torch.nn.functional as F
from torch.utils.data import DataLoader
from src.systems.simclr import Sim... | 3,844 | 0 | 45 |
145411ac7f91ebe1b7c00970c5327aed0f5cf542 | 1,259 | py | Python | skrobot/models/panda.py | t141/scikit-robot | 464df1269a305625a49bad1387b5d0032d2e3eb7 | [
"MIT"
] | 68 | 2020-01-15T15:21:14.000Z | 2022-03-16T12:05:05.000Z | skrobot/models/panda.py | t141/scikit-robot | 464df1269a305625a49bad1387b5d0032d2e3eb7 | [
"MIT"
] | 41 | 2020-01-28T16:57:32.000Z | 2021-09-03T07:25:10.000Z | skrobot/models/panda.py | t141/scikit-robot | 464df1269a305625a49bad1387b5d0032d2e3eb7 | [
"MIT"
] | 11 | 2020-01-21T08:19:54.000Z | 2021-11-22T19:01:53.000Z | from cached_property import cached_property
from ..data import panda_urdfpath
from ..model import RobotModel
from .urdf import RobotModelFromURDF
class Panda(RobotModelFromURDF):
"""Panda Robot Model.
https://frankaemika.github.io/docs/control_parameters.html
"""
@cached_property
@cached_prop... | 27.977778 | 68 | 0.633042 | from cached_property import cached_property
from ..data import panda_urdfpath
from ..model import RobotModel
from .urdf import RobotModelFromURDF
class Panda(RobotModelFromURDF):
"""Panda Robot Model.
https://frankaemika.github.io/docs/control_parameters.html
"""
def __init__(self, *args, **kwargs... | 828 | 0 | 106 |
7900766802225ae53d0725336087e8a594ca609e | 2,870 | py | Python | imcsdk/mometa/chassis/ChassisPowerMonitor.py | ecoen66/imcsdk | b10eaa926a5ee57cea7182ae0adc8dd1c818b0ab | [
"Apache-2.0"
] | 31 | 2016-06-14T07:23:59.000Z | 2021-09-12T17:17:26.000Z | imcsdk/mometa/chassis/ChassisPowerMonitor.py | sthagen/imcsdk | 1831eaecb5960ca03a8624b1579521749762b932 | [
"Apache-2.0"
] | 109 | 2016-05-25T03:56:56.000Z | 2021-10-18T02:58:12.000Z | imcsdk/mometa/chassis/ChassisPowerMonitor.py | sthagen/imcsdk | 1831eaecb5960ca03a8624b1579521749762b932 | [
"Apache-2.0"
] | 67 | 2016-05-17T05:53:56.000Z | 2022-03-24T15:52:53.000Z | """This module contains the general information for ChassisPowerMonitor ManagedObject."""
from ...imcmo import ManagedObject
from ...imccoremeta import MoPropertyMeta, MoMeta
from ...imcmeta import VersionMeta
class ChassisPowerMonitor(ManagedObject):
"""This is ChassisPowerMonitor class."""
consts = Chass... | 42.835821 | 234 | 0.619164 | """This module contains the general information for ChassisPowerMonitor ManagedObject."""
from ...imcmo import ManagedObject
from ...imccoremeta import MoPropertyMeta, MoMeta
from ...imcmeta import VersionMeta
class ChassisPowerMonitorConsts:
pass
class ChassisPowerMonitor(ManagedObject):
"""This is Chassi... | 341 | 20 | 50 |
5fc4b0bd36b5d0e62e37982374c8b2782c3ea8b9 | 2,628 | py | Python | 2021/01/09.py | frankpiva/leetcode | 85540af1fd72ad9e92c5a6ad253b1aaeec5065d9 | [
"MIT"
] | null | null | null | 2021/01/09.py | frankpiva/leetcode | 85540af1fd72ad9e92c5a6ad253b1aaeec5065d9 | [
"MIT"
] | null | null | null | 2021/01/09.py | frankpiva/leetcode | 85540af1fd72ad9e92c5a6ad253b1aaeec5065d9 | [
"MIT"
] | null | null | null | """
Word Ladder
Given two words beginWord and endWord, and a dictionary wordList, return the length of the shortest transformation sequence from beginWord to endWord, such that:
Only one letter can be changed at a time.
Each transformed word must exist in the word list.
Return 0 if there is no such transform... | 32.444444 | 161 | 0.554795 | """
Word Ladder
Given two words beginWord and endWord, and a dictionary wordList, return the length of the shortest transformation sequence from beginWord to endWord, such that:
Only one letter can be changed at a time.
Each transformed word must exist in the word list.
Return 0 if there is no such transform... | 1,400 | -6 | 48 |
53a80c32182b4998b99ee4ddf1047e50efb124b9 | 838 | py | Python | zero_week/regular_strings/disemvowel_trolls.py | myusernameisuseless/rolling_scopes_ml | b29b6cdf0b4b0878fa2de7772e03885e61a86207 | [
"Apache-2.0"
] | null | null | null | zero_week/regular_strings/disemvowel_trolls.py | myusernameisuseless/rolling_scopes_ml | b29b6cdf0b4b0878fa2de7772e03885e61a86207 | [
"Apache-2.0"
] | null | null | null | zero_week/regular_strings/disemvowel_trolls.py | myusernameisuseless/rolling_scopes_ml | b29b6cdf0b4b0878fa2de7772e03885e61a86207 | [
"Apache-2.0"
] | null | null | null | """
Trolls are attacking your comment section!
A common way to deal with this situation is to remove all of the vowels from the trolls' comments,
neutralizing the threat.
Your task is to write a function that takes a string and return a new string with all vowels removed.
For example, the string "This website is for... | 29.928571 | 101 | 0.700477 | """
Trolls are attacking your comment section!
A common way to deal with this situation is to remove all of the vowels from the trolls' comments,
neutralizing the threat.
Your task is to write a function that takes a string and return a new string with all vowels removed.
For example, the string "This website is for... | 348 | 0 | 23 |
1a1008b893fec986a2c4d451a5a22a5023e07d2b | 254 | py | Python | series_tiempo_ar_api/apps/management/migrations/py3_empty_failed_queue.py | datosgobar/series-tiempo-ar-api | 6b553c573f6e8104f8f3919efe79089b7884280c | [
"MIT"
] | 28 | 2017-12-16T20:30:52.000Z | 2021-08-11T17:35:04.000Z | series_tiempo_ar_api/apps/management/migrations/py3_empty_failed_queue.py | datosgobar/series-tiempo-ar-api | 6b553c573f6e8104f8f3919efe79089b7884280c | [
"MIT"
] | 446 | 2017-11-16T15:21:40.000Z | 2021-06-10T20:14:21.000Z | series_tiempo_ar_api/apps/management/migrations/py3_empty_failed_queue.py | datosgobar/series-tiempo-ar-api | 6b553c573f6e8104f8f3919efe79089b7884280c | [
"MIT"
] | 12 | 2018-08-23T16:13:32.000Z | 2022-03-01T23:12:28.000Z | #! coding: utf-8
from django.db import migrations
| 16.933333 | 50 | 0.633858 | #! coding: utf-8
from django.db import migrations
def noop(*_):
pass
class Migration(migrations.Migration):
dependencies = [
('management', '0016_auto_20180406_0916'),
]
operations = [
migrations.RunPython(noop),
]
| 1 | 156 | 46 |
43a115235a1f5873c5e2660ad85160ea6d83cfcd | 4,246 | py | Python | apollo/embeds/event_embed.py | rpetti/apollo | 1304d8623e6dfe8c9b269b7e90611b3688c0c61e | [
"MIT"
] | null | null | null | apollo/embeds/event_embed.py | rpetti/apollo | 1304d8623e6dfe8c9b269b7e90611b3688c0c61e | [
"MIT"
] | null | null | null | apollo/embeds/event_embed.py | rpetti/apollo | 1304d8623e6dfe8c9b269b7e90611b3688c0c61e | [
"MIT"
] | null | null | null | import arrow
import discord
from apollo import emojis as emoji
from apollo.constants import EMBED_COLOR
from apollo.translate import t
| 35.090909 | 87 | 0.657325 | import arrow
import discord
from apollo import emojis as emoji
from apollo.constants import EMBED_COLOR
from apollo.translate import t
class EventEmbed:
ACCEPTED_HEADER = t("event.accepted")
TENTATIVE_HEADER = t("event.tentative")
DECLINED_HEADER = t("event.declined")
STANDBY_HEADER = t("event.stand... | 1,563 | 2,523 | 23 |
523dbadf332a914724e35df3ab6697633b05a85a | 3,501 | py | Python | nrf5_mesh/tools/deviceutil/deviceutil.py | aberke/city-science-bike-swarm | 797e803014fc0c3878016309a62460a736140958 | [
"MIT"
] | 15 | 2019-02-25T20:25:29.000Z | 2021-02-27T17:57:38.000Z | nrf5_mesh/tools/deviceutil/deviceutil.py | aberke/city-science-bike-swarm | 797e803014fc0c3878016309a62460a736140958 | [
"MIT"
] | 3 | 2020-02-21T22:35:38.000Z | 2020-10-05T02:25:30.000Z | nrf5_mesh/tools/deviceutil/deviceutil.py | aberke/city-science-bike-swarm | 797e803014fc0c3878016309a62460a736140958 | [
"MIT"
] | 5 | 2019-06-29T21:03:57.000Z | 2021-06-15T06:16:20.000Z | # Copyright (c) 2010 - 2020, Nordic Semiconductor ASA
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are met:
#
# 1. Redistributions of source code must retain the above copyright notice, this
# list o... | 38.472527 | 80 | 0.676949 | # Copyright (c) 2010 - 2020, Nordic Semiconductor ASA
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are met:
#
# 1. Redistributions of source code must retain the above copyright notice, this
# list o... | 1,633 | 0 | 161 |
af4b523e4ed6e32ecd5ebfd3296d1d705a18543a | 6,586 | py | Python | Lib/site-packages/client/database.py | fochoao/cpython | 3dc84b260e5bced65ebc2c45c40c8fa65f9b5aa9 | [
"bzip2-1.0.6",
"0BSD"
] | null | null | null | Lib/site-packages/client/database.py | fochoao/cpython | 3dc84b260e5bced65ebc2c45c40c8fa65f9b5aa9 | [
"bzip2-1.0.6",
"0BSD"
] | 20 | 2021-05-03T18:02:23.000Z | 2022-03-12T12:01:04.000Z | Lib/site-packages/client/database.py | fochoao/cpython | 3dc84b260e5bced65ebc2c45c40c8fa65f9b5aa9 | [
"bzip2-1.0.6",
"0BSD"
] | null | null | null | import datetime
from common.variables import *
from sqlalchemy import create_engine, Table, Column, Integer, String, Text, MetaData, DateTime
from sqlalchemy.orm import mapper, sessionmaker
import os
class ClientDatabase:
'''
Класс - оболочка для работы с базой данных клиента.
Использует SQLite базу данн... | 35.989071 | 112 | 0.601275 | import datetime
from common.variables import *
from sqlalchemy import create_engine, Table, Column, Integer, String, Text, MetaData, DateTime
from sqlalchemy.orm import mapper, sessionmaker
import os
class ClientDatabase:
'''
Класс - оболочка для работы с базой данных клиента.
Использует SQLite базу данн... | 2,841 | 0 | 116 |
f84a8397ef3e851abd2a53fbd8a1a9f8d9f8e337 | 1,348 | py | Python | functions/speed_final_mean.py | Hilvcha/PINGAN | 0eb1435750c2ce3dc5de3a50d390aae044360fd5 | [
"MIT"
] | 7 | 2018-04-01T17:24:56.000Z | 2021-06-07T09:39:52.000Z | functions/speed_final_mean.py | Hilvcha/PINGAN | 0eb1435750c2ce3dc5de3a50d390aae044360fd5 | [
"MIT"
] | 5 | 2018-03-31T18:24:52.000Z | 2019-10-09T16:27:49.000Z | functions/speed_final_mean.py | Hilvcha/PINGAN | 0eb1435750c2ce3dc5de3a50d390aae044360fd5 | [
"MIT"
] | 2 | 2020-03-04T08:48:54.000Z | 2021-06-07T09:39:51.000Z | # coding : utf-8
# created by wyj
import pandas as pd
# TERMINALNO, TIME, TRIP_ID, LONGITUDE, LATITUDE, DIRECTION, HEIGHT, SPEED, CALLSTATE, Y
| 49.925926 | 116 | 0.716617 | # coding : utf-8
# created by wyj
import pandas as pd
# TERMINALNO, TIME, TRIP_ID, LONGITUDE, LATITUDE, DIRECTION, HEIGHT, SPEED, CALLSTATE, Y
def speed_final_mean(train, test):
train_data = train[['TERMINALNO', 'TRIP_ID', 'SPEED']].groupby(['TERMINALNO', 'TRIP_ID'], as_index=False).mean()
train_final_data =... | 1,180 | 0 | 23 |
073eaa28b720cb3f5411d11770184747fee26b0a | 3,719 | py | Python | cryptopals/Set2/c16.py | arvinddoraiswamy/blahblah | 1b88a04d5fa479a49ee83464ff69ba49f22c1bd0 | [
"MIT"
] | 7 | 2015-01-30T04:38:42.000Z | 2017-09-05T13:22:48.000Z | cryptopals/Set2/c16.py | arvinddoraiswamy/blahblah | 1b88a04d5fa479a49ee83464ff69ba49f22c1bd0 | [
"MIT"
] | 1 | 2017-03-12T15:48:42.000Z | 2017-03-12T15:48:42.000Z | cryptopals/Set2/c16.py | arvinddoraiswamy/blahblah | 1b88a04d5fa479a49ee83464ff69ba49f22c1bd0 | [
"MIT"
] | 5 | 2016-03-28T17:32:14.000Z | 2021-12-15T16:35:12.000Z | import sys
import os
import re
import binascii
#Adding directory to the path where Python searches for modules
cmd_folder = os.path.dirname('/home/arvind/Documents/Me/My_Projects/Git/Crypto/modules/')
sys.path.insert(0, cmd_folder)
#Importing common crypto module
import block
if __name__ == "__main__":
userdata= ... | 36.821782 | 141 | 0.658241 | import sys
import os
import re
import binascii
#Adding directory to the path where Python searches for modules
cmd_folder = os.path.dirname('/home/arvind/Documents/Me/My_Projects/Git/Crypto/modules/')
sys.path.insert(0, cmd_folder)
#Importing common crypto module
import block
def process_and_decrypt_string(encrypted_... | 1,603 | 0 | 46 |
c8ddc217c109ee906b4b254b7f9aeec0652e9fd0 | 1,434 | py | Python | lib/CliPrinter.py | cynay/CynCrypto | 4ba920532588c9164f62b28f3f198c67b2ca374b | [
"WTFPL"
] | null | null | null | lib/CliPrinter.py | cynay/CynCrypto | 4ba920532588c9164f62b28f3f198c67b2ca374b | [
"WTFPL"
] | null | null | null | lib/CliPrinter.py | cynay/CynCrypto | 4ba920532588c9164f62b28f3f198c67b2ca374b | [
"WTFPL"
] | null | null | null | """
Module Docstring
Docstrings: http://www.python.org/dev/peps/pep-0257/
"""
__author__ = 'Yannic Schneider (v@vendetta.ch)'
__copyright__ = 'Copyright (c) 20xx Yannic Schneider'
__license__ = 'WTFPL'
__vcs_id__ = '$Id$'
__version__ = '0.1' #Versioning: http://www.python.org/dev/peps/pep-0386/
#
## Code goes here.
#... | 28.117647 | 86 | 0.569038 | """
Module Docstring
Docstrings: http://www.python.org/dev/peps/pep-0257/
"""
__author__ = 'Yannic Schneider (v@vendetta.ch)'
__copyright__ = 'Copyright (c) 20xx Yannic Schneider'
__license__ = 'WTFPL'
__vcs_id__ = '$Id$'
__version__ = '0.1' #Versioning: http://www.python.org/dev/peps/pep-0386/
#
## Code goes here.
#... | 0 | 0 | 0 |
130af6253c40f5dbc7c8534cd07943a516825302 | 1,371 | py | Python | LeetCode/Python/725.split-linked-list-in-parts.py | Alfonsxh/LeetCode-Challenge-python | e93f93fd58d1945708d6aa300dcbcd17d0708274 | [
"MIT"
] | null | null | null | LeetCode/Python/725.split-linked-list-in-parts.py | Alfonsxh/LeetCode-Challenge-python | e93f93fd58d1945708d6aa300dcbcd17d0708274 | [
"MIT"
] | null | null | null | LeetCode/Python/725.split-linked-list-in-parts.py | Alfonsxh/LeetCode-Challenge-python | e93f93fd58d1945708d6aa300dcbcd17d0708274 | [
"MIT"
] | null | null | null | #
# @lc app=leetcode id=725 lang=python3
#
# [725] Split Linked List in Parts
#
# Definition for singly-linked list.
# class ListNode:
# def __init__(self, x):
# self.val = x
# self.next = None
from typing import List
from LeetCode.Python.BaseListNode import MakeListNodes, PrintListNode, ListNode
... | 24.927273 | 99 | 0.553611 | #
# @lc app=leetcode id=725 lang=python3
#
# [725] Split Linked List in Parts
#
# Definition for singly-linked list.
# class ListNode:
# def __init__(self, x):
# self.val = x
# self.next = None
from typing import List
from LeetCode.Python.BaseListNode import MakeListNodes, PrintListNode, ListNode
... | 998 | -6 | 49 |
ae0b905de1a5aff9d5290e5c6fdc49770f3b4275 | 775 | py | Python | digsby/src/gui/helpdigsby.py | ifwe/digsby | f5fe00244744aa131e07f09348d10563f3d8fa99 | [
"Python-2.0"
] | 35 | 2015-08-15T14:32:38.000Z | 2021-12-09T16:21:26.000Z | digsby/src/gui/helpdigsby.py | niterain/digsby | 16a62c7df1018a49eaa8151c0f8b881c7e252949 | [
"Python-2.0"
] | 4 | 2015-09-12T10:42:57.000Z | 2017-02-27T04:05:51.000Z | digsby/src/gui/helpdigsby.py | niterain/digsby | 16a62c7df1018a49eaa8151c0f8b881c7e252949 | [
"Python-2.0"
] | 15 | 2015-07-10T23:58:07.000Z | 2022-01-23T22:16:33.000Z | __all__ = ['show_research_popup',
'show_research_popup_once']
HEADER = _('Keep Digsby Free')
MINOR = _("Digsby will use your computer's free time using it to conduct both free and paid research.")
| 25.833333 | 103 | 0.669677 | __all__ = ['show_research_popup',
'show_research_popup_once']
HEADER = _('Keep Digsby Free')
MINOR = _("Digsby will use your computer's free time using it to conduct both free and paid research.")
def _on_options():
from gui.pref import prefsdialog
prefsdialog.show('helpdigsby')
def show_research_... | 496 | 0 | 69 |
1d4a72c9d443a73d6b3fc942791c34ab8a38e932 | 8,838 | py | Python | src/gridlock.py | uxai/gridlock | e91f82b5580d2a38f36225ec1c1c427bbda9b2a0 | [
"MIT"
] | 2 | 2022-02-17T15:14:53.000Z | 2022-03-23T14:58:16.000Z | src/gridlock.py | uxai/gridlock | e91f82b5580d2a38f36225ec1c1c427bbda9b2a0 | [
"MIT"
] | 1 | 2022-02-17T23:46:54.000Z | 2022-02-17T23:46:54.000Z | src/gridlock.py | uxai/gridlock | e91f82b5580d2a38f36225ec1c1c427bbda9b2a0 | [
"MIT"
] | 1 | 2022-02-17T18:22:38.000Z | 2022-02-17T18:22:38.000Z | '''
github.com/uxai/gridlock
Thanks for your interest in GRIDLOCK
I plan to do slow improvements here and there on methods, or enabling files in the near future.
If you have suggestions or improvements, let me know! I'm new to Python so I'm still learning ^^;
TABLE OF CONTENTS
----------------------------------------... | 39.106195 | 496 | 0.540959 | '''
github.com/uxai/gridlock
Thanks for your interest in GRIDLOCK
I plan to do slow improvements here and there on methods, or enabling files in the near future.
If you have suggestions or improvements, let me know! I'm new to Python so I'm still learning ^^;
TABLE OF CONTENTS
----------------------------------------... | 6,841 | 0 | 179 |
53ea1da97333c44e90a79c42f1383a29edf00c00 | 2,300 | py | Python | keystoneclient/v2_0/tokens.py | jamielennox/python-keystoneclient | a1bc48c0fc475db6bca761a9023c35adab740dab | [
"Apache-1.1"
] | 1 | 2020-12-18T01:07:30.000Z | 2020-12-18T01:07:30.000Z | keystoneclient/v2_0/tokens.py | jamielennox/python-keystoneclient | a1bc48c0fc475db6bca761a9023c35adab740dab | [
"Apache-1.1"
] | null | null | null | keystoneclient/v2_0/tokens.py | jamielennox/python-keystoneclient | a1bc48c0fc475db6bca761a9023c35adab740dab | [
"Apache-1.1"
] | null | null | null | # Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# d... | 34.848485 | 78 | 0.616087 | # Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# d... | 1,282 | 332 | 46 |