hexsha stringlengths 40 40 | size int64 6 1.04M | ext stringclasses 10
values | lang stringclasses 1
value | max_stars_repo_path stringlengths 4 247 | max_stars_repo_name stringlengths 4 130 | max_stars_repo_head_hexsha stringlengths 40 78 | max_stars_repo_licenses listlengths 1 10 | max_stars_count int64 1 368k ⌀ | max_stars_repo_stars_event_min_datetime stringlengths 24 24 ⌀ | max_stars_repo_stars_event_max_datetime stringlengths 24 24 ⌀ | max_issues_repo_path stringlengths 4 247 | max_issues_repo_name stringlengths 4 130 | max_issues_repo_head_hexsha stringlengths 40 78 | max_issues_repo_licenses listlengths 1 10 | max_issues_count int64 1 116k ⌀ | max_issues_repo_issues_event_min_datetime stringlengths 24 24 ⌀ | max_issues_repo_issues_event_max_datetime stringlengths 24 24 ⌀ | max_forks_repo_path stringlengths 4 247 | max_forks_repo_name stringlengths 4 130 | max_forks_repo_head_hexsha stringlengths 40 78 | max_forks_repo_licenses listlengths 1 10 | max_forks_count int64 1 105k ⌀ | max_forks_repo_forks_event_min_datetime stringlengths 24 24 ⌀ | max_forks_repo_forks_event_max_datetime stringlengths 24 24 ⌀ | content stringlengths 1 1.04M | avg_line_length float64 1.53 618k | max_line_length int64 1 1.02M | alphanum_fraction float64 0 1 | original_content stringlengths 6 1.04M | filtered:remove_non_ascii int64 0 538k | filtered:remove_decorators int64 0 917k | filtered:remove_async int64 0 722k | filtered:remove_classes int64 -45 1M | filtered:remove_generators int64 0 814k | filtered:remove_function_no_docstring int64 -102 850k | filtered:remove_class_no_docstring int64 -3 5.46k | filtered:remove_unused_imports int64 -1,350 52.4k | filtered:remove_delete_markers int64 0 59.6k |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
8ec17677a09da10d2e29124c3d63a04b022b71ba | 6,946 | py | Python | app/candidates/import_candidates.py | ACTtaiwan/CongressionalGuide | 36067ee16973a2adaf8450b827012c148ee65376 | [
"MIT"
] | 8 | 2016-05-19T03:19:02.000Z | 2019-03-12T18:53:58.000Z | app/candidates/import_candidates.py | ACTtaiwan/CongressionalGuide | 36067ee16973a2adaf8450b827012c148ee65376 | [
"MIT"
] | 49 | 2016-05-14T06:50:28.000Z | 2016-09-30T23:57:01.000Z | app/candidates/import_candidates.py | ACTtaiwan/CongressionalGuide | 36067ee16973a2adaf8450b827012c148ee65376 | [
"MIT"
] | 6 | 2016-07-23T19:20:58.000Z | 2019-08-13T22:12:10.000Z | #!/usr/bin/python
import sqlite3, json, os
import logging, sys
from collections import defaultdict
from nameparser import HumanName
#
# This script moves candidate information from filename.json into the sqlite3 database
#
# !!! UPDATE HERE WHENEVER THE DATABASE TABLE SCHEMA CHANGE !!!
#
# The order matter when we wa... | 34.216749 | 457 | 0.613591 | #!/usr/bin/python
import sqlite3, json, os
import logging, sys
from collections import defaultdict
from nameparser import HumanName
#
# This script moves candidate information from filename.json into the sqlite3 database
#
# !!! UPDATE HERE WHENEVER THE DATABASE TABLE SCHEMA CHANGE !!!
#
# The order matter when we wa... | 0 | 0 | 0 | 0 | 0 | 1,386 | 0 | 0 | 23 |
14c8d4b4b416904d5134728fa537b9d0cee1c26c | 1,078 | py | Python | Python/seven_kyu/all_non_consecutive.py | Brokenshire/codewars-projects | db9cd09618b8a7085b0d53ad76f73f9e249b9396 | [
"Apache-2.0"
] | 1 | 2019-12-20T04:09:56.000Z | 2019-12-20T04:09:56.000Z | Python/seven_kyu/all_non_consecutive.py | Brokenshire/codewars-projects | db9cd09618b8a7085b0d53ad76f73f9e249b9396 | [
"Apache-2.0"
] | null | null | null | Python/seven_kyu/all_non_consecutive.py | Brokenshire/codewars-projects | db9cd09618b8a7085b0d53ad76f73f9e249b9396 | [
"Apache-2.0"
] | null | null | null | # Python solution for 'Find all non-consecutive numbers' codewars question.
# Level: 7 kyu
# Tags: FUNDAMENTALS AND ARRAYS.
# Author: Jack Brokenshire
# Date: 05/08/2020
import unittest
def all_non_consecutive(arr):
"""
Find all the elements of an array that are non consecutive. A number is non consecutive i... | 35.933333 | 121 | 0.671614 | # Python solution for 'Find all non-consecutive numbers' codewars question.
# Level: 7 kyu
# Tags: FUNDAMENTALS AND ARRAYS.
# Author: Jack Brokenshire
# Date: 05/08/2020
import unittest
def all_non_consecutive(arr):
"""
Find all the elements of an array that are non consecutive. A number is non consecutive i... | 0 | 0 | 0 | 234 | 0 | 0 | 0 | 0 | 23 |
4a3fcf726ba789d5e6951d4c26522134096eb07d | 10,931 | py | Python | neutron/tests/unit/agent/linux/test_tc_lib.py | ISCAS-VDI/neutron-base | 687f03d7131839ae8bc324d5823194d1245bb050 | [
"Apache-2.0"
] | 1 | 2017-09-10T09:57:35.000Z | 2017-09-10T09:57:35.000Z | neutron/tests/unit/agent/linux/test_tc_lib.py | ISCAS-VDI/neutron-base | 687f03d7131839ae8bc324d5823194d1245bb050 | [
"Apache-2.0"
] | 3 | 2015-02-27T00:48:55.000Z | 2015-04-21T05:29:37.000Z | neutron/tests/unit/agent/linux/test_tc_lib.py | ISCAS-VDI/neutron-base | 687f03d7131839ae8bc324d5823194d1245bb050 | [
"Apache-2.0"
] | 3 | 2015-02-26T00:55:17.000Z | 2020-03-01T17:05:40.000Z | # Copyright 2016 OVH SAS
# All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by appli... | 35.839344 | 79 | 0.620986 | # Copyright 2016 OVH SAS
# All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by appli... | 0 | 0 | 0 | 9,422 | 0 | 0 | 0 | 38 | 182 |
3813dda62f9c23200cb306784d23d1c106fcdddf | 3,299 | py | Python | nas4candle/nasapi/search/nas/ppo_a3c_sync.py | scrlnas2019/nas4candle | 318959424cc66819c816054a87bd1cb5d426e2e7 | [
"BSD-3-Clause"
] | 1 | 2021-01-22T04:03:00.000Z | 2021-01-22T04:03:00.000Z | nas4candle/nasapi/search/nas/ppo_a3c_sync.py | scrlnas2019/nas4candle | 318959424cc66819c816054a87bd1cb5d426e2e7 | [
"BSD-3-Clause"
] | 1 | 2021-01-23T00:14:17.000Z | 2021-01-23T00:14:17.000Z | nas4candle/nasapi/search/nas/ppo_a3c_sync.py | scrlnas2019/nas4candle | 318959424cc66819c816054a87bd1cb5d426e2e7 | [
"BSD-3-Clause"
] | 2 | 2019-11-27T04:42:00.000Z | 2021-01-22T04:06:59.000Z | import os
from nas4candle.nasapi.search import util
logger = util.conf_logger('nas4candle.nasapi.search.nas.ppo_a3c_sync')
LAUNCHER_NODES = int(os.environ.get('BALSAM_LAUNCHER_NODES', 1))
WORKERS_PER_NODE = int(os.environ.get('nas4candle.nasapi_WORKERS_PER_NODE', 1))
if __name__ == "__main__":
args = NasPPOSyncA... | 35.473118 | 126 | 0.656259 | import os
import json
from pprint import pprint, pformat
from mpi4py import MPI
import math
from nas4candle.nasapi.evaluator import Evaluator
from nas4candle.nasapi.search import util, Search
from nas4candle.nasapi.search.nas.agent import nas_ppo_sync_a3c
logger = util.conf_logger('nas4candle.nasapi.search.nas.ppo_a... | 0 | 535 | 0 | 1,925 | 0 | 169 | 0 | 72 | 203 |
a0ab1f198b124e98f2a002b281b03ad14a7212be | 2,591 | py | Python | lxmltest.py | kendalled/PythonScripts | 9c2747fa27066e5f02c98e3cb7aca578e9e51ff1 | [
"MIT"
] | null | null | null | lxmltest.py | kendalled/PythonScripts | 9c2747fa27066e5f02c98e3cb7aca578e9e51ff1 | [
"MIT"
] | null | null | null | lxmltest.py | kendalled/PythonScripts | 9c2747fa27066e5f02c98e3cb7aca578e9e51ff1 | [
"MIT"
] | null | null | null | # GetScraped V2.5.1
# github.com/kendalled
### possible regexp: [^\s@<>]+@[^\s@<>]+\.[^\s@<>]+
### Backup regexp: '[\w.]+@[\w.]+'
import unicodecsv as csv
import pandas as pd
# Negative Email Endings
#TODO: remove %20 from beginning
negatives = ['domain.net','group.calendar.google','youremail.com','sample.com','yours... | 28.163043 | 260 | 0.580471 | # GetScraped V2.5.1
# github.com/kendalled
### possible regexp: [^\s@<>]+@[^\s@<>]+\.[^\s@<>]+
### Backup regexp: '[\w.]+@[\w.]+'
import requests
import re
import unicodecsv as csv
import pandas as pd
# Negative Email Endings
#TODO: remove %20 from beginning
negatives = ['domain.net','group.calendar.google','yourema... | 0 | 0 | 0 | 0 | 0 | 837 | 0 | -18 | 68 |
ab44b5ddf439c1e25658c0a5aa2ce5774c0a05ad | 480 | py | Python | tests/common/test_code_status.py | trickeydan/astoria | ef08ed4be4d5997751846b0cadce9aa8261ae151 | [
"MIT"
] | null | null | null | tests/common/test_code_status.py | trickeydan/astoria | ef08ed4be4d5997751846b0cadce9aa8261ae151 | [
"MIT"
] | 7 | 2020-11-29T13:03:10.000Z | 2020-12-09T17:20:25.000Z | tests/common/test_code_status.py | trickeydan/astoria | ef08ed4be4d5997751846b0cadce9aa8261ae151 | [
"MIT"
] | null | null | null | """Test the code status enum."""
from astoria.common.code_status import CodeStatus
def test_code_status_enum() -> None:
"""Test that CodeStatus has the right values."""
assert CodeStatus.STARTING.value == "code_starting"
assert CodeStatus.RUNNING.value == "code_running"
assert CodeStatus.KILLED.value... | 34.285714 | 55 | 0.729167 | """Test the code status enum."""
from astoria.common.code_status import CodeStatus
def test_code_status_enum() -> None:
"""Test that CodeStatus has the right values."""
assert CodeStatus.STARTING.value == "code_starting"
assert CodeStatus.RUNNING.value == "code_running"
assert CodeStatus.KILLED.value... | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
5b165f5b9cea0c1e043ac7c55b5a57059b7fe758 | 496 | py | Python | tests/cpp/tests/arv/service_status/test.py | VVCAS-Sean/OpenUxAS | dcd7be29d182d278a5387908f568d6f8a06b79ee | [
"NASA-1.3"
] | 88 | 2017-08-24T07:02:01.000Z | 2022-03-18T04:34:17.000Z | tests/cpp/tests/arv/service_status/test.py | VVCAS-Sean/OpenUxAS | dcd7be29d182d278a5387908f568d6f8a06b79ee | [
"NASA-1.3"
] | 46 | 2017-06-08T18:18:08.000Z | 2022-03-15T18:24:43.000Z | tests/cpp/tests/arv/service_status/test.py | VVCAS-Sean/OpenUxAS | dcd7be29d182d278a5387908f568d6f8a06b79ee | [
"NASA-1.3"
] | 53 | 2017-06-22T14:48:05.000Z | 2022-02-15T16:59:38.000Z | import time
from pylmcp import Object
from pylmcp.server import Server
from pylmcp.uxas import AutomationRequestValidator, UxASConfig
# Create bridge configuration
bridge_cfg = UxASConfig()
bridge_cfg += AutomationRequestValidator()
with Server(bridge_cfg=bridge_cfg) as server:
try:
obj = Object(class_nam... | 26.105263 | 62 | 0.693548 | import time
from pylmcp import Object
from pylmcp.server import Server
from pylmcp.uxas import AutomationRequestValidator, UxASConfig
# Create bridge configuration
bridge_cfg = UxASConfig()
bridge_cfg += AutomationRequestValidator()
with Server(bridge_cfg=bridge_cfg) as server:
try:
obj = Object(class_nam... | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
bdd867bc0a3d4b8646695f6c27b0957d0c83b2a2 | 3,666 | py | Python | test/test_Likelihood/test_LensLikelihood/test_td_mag_magnitude_likelihood.py | LBJ-Wade/hierarc_SGL | 1dc2be90f44f99e82ab7014f2027fbb077b14f98 | [
"BSD-3-Clause"
] | 5 | 2020-07-08T00:53:04.000Z | 2021-08-03T08:20:31.000Z | test/test_Likelihood/test_LensLikelihood/test_td_mag_magnitude_likelihood.py | LBJ-Wade/hierarc_SGL | 1dc2be90f44f99e82ab7014f2027fbb077b14f98 | [
"BSD-3-Clause"
] | 4 | 2020-03-30T22:12:57.000Z | 2021-04-03T06:20:52.000Z | test/test_Likelihood/test_LensLikelihood/test_td_mag_magnitude_likelihood.py | LBJ-Wade/hierarc_SGL | 1dc2be90f44f99e82ab7014f2027fbb077b14f98 | [
"BSD-3-Clause"
] | 5 | 2020-03-30T21:20:08.000Z | 2021-03-03T17:08:42.000Z | import pytest
if __name__ == '__main__':
pytest.main()
| 49.540541 | 155 | 0.694217 | import pytest
import numpy as np
import numpy.testing as npt
from lenstronomy.Util import constants as const
from hierarc.Likelihood.LensLikelihood.td_mag_likelihood import TDMagLikelihood
from hierarc.Likelihood.LensLikelihood.td_mag_magnitude_likelihood import TDMagMagnitudeLikelihood
from lenstronomy.Util.data_util ... | 0 | 0 | 0 | 3,254 | 0 | 0 | 0 | 195 | 155 |
9bd0e9754dc7f44d7a73a64df56bfd6fb5b82968 | 436 | py | Python | util.py | drgrhm/alg_conf | 7e10033366e50e0c58e6b014672fc995e69e8c46 | [
"Apache-2.0"
] | 1 | 2021-01-17T20:48:08.000Z | 2021-01-17T20:48:08.000Z | util.py | drgrhm/alg_config | 7e10033366e50e0c58e6b014672fc995e69e8c46 | [
"Apache-2.0"
] | null | null | null | util.py | drgrhm/alg_config | 7e10033366e50e0c58e6b014672fc995e69e8c46 | [
"Apache-2.0"
] | null | null | null | import numpy as np
day_in_seconds = 24. * 60. * 60.
def ecdf(vals, x, eps=1e-12):
"""
Compute empirical cdf: P(X <= x) over the values vals
"""
return np.sum(vals <= x, dtype=np.float32) / (np.shape(vals)[0] + eps)
def format_runtime(runtime):
""" """
return '{}s = {}m = {}h = {}d'.format(... | 21.8 | 103 | 0.582569 | import numpy as np
from math import log
day_in_seconds = 24. * 60. * 60.
def log2(x):
return log(x,2)
def ecdf(vals, x, eps=1e-12):
"""
Compute empirical cdf: P(X <= x) over the values vals
"""
return np.sum(vals <= x, dtype=np.float32) / (np.shape(vals)[0] + eps)
def format_runtime(runtime):... | 0 | 0 | 0 | 0 | 0 | 11 | 0 | -1 | 45 |
d431da3386890b3dbc9d0d5c42793aff8a2e51f9 | 20,280 | py | Python | main.py | leonhofmann/StatsToPopulation | a2ed60eaf89fe61dc31abfaf6bb30fd7cbfeb8bb | [
"Apache-2.0"
] | null | null | null | main.py | leonhofmann/StatsToPopulation | a2ed60eaf89fe61dc31abfaf6bb30fd7cbfeb8bb | [
"Apache-2.0"
] | null | null | null | main.py | leonhofmann/StatsToPopulation | a2ed60eaf89fe61dc31abfaf6bb30fd7cbfeb8bb | [
"Apache-2.0"
] | null | null | null |
if __name__ == "__main__":
main() | 68.282828 | 168 | 0.63856 | import collections
import pandas
import numpy
import itertools
def main():
def TestingOfSheets():
# Check if at least two columns
assert len(currentDataframe.columns) >= 2, "The sheet %s has not two but %s columns" % (
currentDataframe, len(currentDataframe.columns))
... | 4 | 0 | 0 | 0 | 0 | 20,146 | 0 | -25 | 117 |
1acb6e2efb2c12fe594d45893e469809f93f6d6a | 73 | py | Python | DownloadRunner/__main__.py | StanSwanborn/research_runner | d9573f6623c72f30d3525fb671394d3bb00d9911 | [
"MIT"
] | null | null | null | DownloadRunner/__main__.py | StanSwanborn/research_runner | d9573f6623c72f30d3525fb671394d3bb00d9911 | [
"MIT"
] | null | null | null | DownloadRunner/__main__.py | StanSwanborn/research_runner | d9573f6623c72f30d3525fb671394d3bb00d9911 | [
"MIT"
] | null | null | null | # This part will be responsible for downloading the zotero collected PDFs | 73 | 73 | 0.835616 | # This part will be responsible for downloading the zotero collected PDFs | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
216808ea84e18ffe15a88d3fbbf74ccda2d7b6d4 | 7,358 | py | Python | app.py | muhammadwaqasmbd/bot-scrape-python | e6c0a411838ddb097a75f4810b557a245628a2d2 | [
"Apache-2.0"
] | null | null | null | app.py | muhammadwaqasmbd/bot-scrape-python | e6c0a411838ddb097a75f4810b557a245628a2d2 | [
"Apache-2.0"
] | null | null | null | app.py | muhammadwaqasmbd/bot-scrape-python | e6c0a411838ddb097a75f4810b557a245628a2d2 | [
"Apache-2.0"
] | null | null | null | from flask import Flask
from flask_socketio import SocketIO
from gevent import monkey as curious_george
import redis
r1 = redis.StrictRedis(host='localhost', port=6379, db=1, charset="utf-8", decode_responses=True)
r2 = redis.StrictRedis(host='localhost', port=6379, db=2, charset="utf-8", decode_responses=True)
r3 = r... | 40.651934 | 161 | 0.638625 | from flask import Flask
import requests, json
from flask import render_template
from RepeatedTimer import RepeatedTimer
from flask_socketio import SocketIO, emit
from threading import Thread
from gevent import monkey as curious_george
import redis
import datetime as dt
from rejson import Client, Path
from SetEncoder im... | 0 | 326 | 0 | 0 | 0 | 5,692 | 0 | 95 | 499 |
148c10f070ecea9d40ab90099bfceb42aca290c6 | 241 | py | Python | pysif/__init__.py | houkensjtu/pysif | f5abb3e308394c97d5ace0b90e27fd044a4f77d6 | [
"MIT"
] | 4 | 2019-07-08T18:04:27.000Z | 2021-09-29T14:39:20.000Z | pysif/__init__.py | houkensjtu/pysif | f5abb3e308394c97d5ace0b90e27fd044a4f77d6 | [
"MIT"
] | 1 | 2020-03-28T03:41:01.000Z | 2020-03-28T17:28:33.000Z | pysif/__init__.py | houkensjtu/pysif | f5abb3e308394c97d5ace0b90e27fd044a4f77d6 | [
"MIT"
] | 2 | 2019-07-08T18:04:28.000Z | 2020-02-17T20:19:40.000Z | '''Navier-Stokes and Euler equations solver implemented in Python
Triple periodic spectral method in space
4th order RungeKutta method in time
Auther: Jia Cheng Hu (University of Waterloo, Canada)
'''
| 24.1 | 65 | 0.792531 | '''Navier-Stokes and Euler equations solver implemented in Python
Triple periodic spectral method in space
4th order Runge–Kutta method in time
Auther: Jia Cheng Hu (University of Waterloo, Canada)
'''
from pysif.spectral_method import *
| 3 | 0 | 0 | 0 | 0 | 0 | 0 | 14 | 23 |
a581f46abd7ca6c7bbab42c2036ec74a1cb77d69 | 543 | wsgi | Python | flaskapp.wsgi | Anonymous78/Registration-System | 967c8a1c28f5c344663c5b27e0087a70c6e9f193 | [
"MIT"
] | null | null | null | flaskapp.wsgi | Anonymous78/Registration-System | 967c8a1c28f5c344663c5b27e0087a70c6e9f193 | [
"MIT"
] | null | null | null | flaskapp.wsgi | Anonymous78/Registration-System | 967c8a1c28f5c344663c5b27e0087a70c6e9f193 | [
"MIT"
] | null | null | null | import os
import sys
import site
# Add virtualenv site packages
site.addsitedir('/home/attendance/.virtualenvs/attendance/lib/python3.5/site-packages')
sys.path.insert(0, '/var/www/html/class-list')
# Fired up virtualenv before include application
activate_this = '/home/attendance/.virtualenvs/attendance/bin/activat... | 24.681818 | 87 | 0.799263 | import os
import sys
import site
# Add virtualenv site packages
site.addsitedir('/home/attendance/.virtualenvs/attendance/lib/python3.5/site-packages')
sys.path.insert(0, '/var/www/html/class-list')
# Fired up virtualenv before include application
activate_this = '/home/attendance/.virtualenvs/attendance/bin/activat... | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
823d0480ca28ef6abef98534fd95dead95023179 | 19,024 | py | Python | mediaMicroservices/gen-py/media_service/ReviewStorageService.py | rodrigo-bruno/DeathStarBench | c9ce09aaf7c1298a7c88efacd1010a71db0fa59d | [
"Apache-2.0"
] | 364 | 2019-04-28T01:45:37.000Z | 2022-03-31T15:08:03.000Z | mediaMicroservices/gen-py/media_service/ReviewStorageService.py | rodrigo-bruno/DeathStarBench | c9ce09aaf7c1298a7c88efacd1010a71db0fa59d | [
"Apache-2.0"
] | 111 | 2019-04-15T11:08:49.000Z | 2022-03-31T17:39:16.000Z | mediaMicroservices/gen-py/media_service/ReviewStorageService.py | rodrigo-bruno/DeathStarBench | c9ce09aaf7c1298a7c88efacd1010a71db0fa59d | [
"Apache-2.0"
] | 229 | 2019-05-14T08:55:57.000Z | 2022-03-31T03:14:55.000Z | #
# Autogenerated by Thrift Compiler (0.12.0)
#
# DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
#
# options string: py
#
from thrift.Thrift import TType
from thrift.TRecursive import fix_spec
all_structs = []
# HELPER FUNCTIONS AND STRUCTURES
all_structs.append(StoreReview_args)
StoreReview_ar... | 34.589091 | 134 | 0.576693 | #
# Autogenerated by Thrift Compiler (0.12.0)
#
# DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
#
# options string: py
#
from thrift.Thrift import TType, TMessageType, TFrozenDict, TException, TApplicationException
from thrift.protocol.TProtocol import TProtocolException
from thrift.TRecursive impo... | 0 | 0 | 0 | 17,318 | 0 | 0 | 0 | 112 | 294 |
27b627105390986b0814b395a31ddd3fd665191f | 16,245 | py | Python | Project 3 - Neural Network and Tensor Flow/main.py | JruvikaBhimani/CSE-547---Introduction-to-Machine-Learning | 3a8196cf9372cfbecbb043fc7ea94bcce665b097 | [
"Apache-2.0"
] | null | null | null | Project 3 - Neural Network and Tensor Flow/main.py | JruvikaBhimani/CSE-547---Introduction-to-Machine-Learning | 3a8196cf9372cfbecbb043fc7ea94bcce665b097 | [
"Apache-2.0"
] | null | null | null | Project 3 - Neural Network and Tensor Flow/main.py | JruvikaBhimani/CSE-547---Introduction-to-Machine-Learning | 3a8196cf9372cfbecbb043fc7ea94bcce665b097 | [
"Apache-2.0"
] | null | null | null | from __future__ import division
import cPickle
import numpy as np
import os as os
from scipy import misc
from skimage import color
#import matplotlib.pyplot as plot1
#def graph_plot(x, y, xlab, ylab):
#plot1.figure(num = 1, figsize =(15,10), dpi = 72)
#plot1.subplot(321)
#plot1.scatter(CS_Score,Res_OH)
# ... | 29.323105 | 157 | 0.566205 | from __future__ import division
import cPickle
import numpy as np
import math
import random
import os as os
from scipy import misc
from skimage import color
from tensorflow.examples.tutorials.mnist import input_data
import tensorflow as tf
#import matplotlib.pyplot as plot1
#def graph_plot(x, y, xlab, ylab):
#plot... | 0 | 0 | 0 | 0 | 0 | 10,197 | 0 | 21 | 631 |
beb50e5f1326b0f528a82c90ee9a7f29e090eb04 | 3,602 | py | Python | pyspark/pysparkTJ/pyspark08_df.py | mayi140611/mayiexamples | 221cf9e8916d81198df7355894ec59dc334ae0af | [
"Apache-2.0"
] | null | null | null | pyspark/pysparkTJ/pyspark08_df.py | mayi140611/mayiexamples | 221cf9e8916d81198df7355894ec59dc334ae0af | [
"Apache-2.0"
] | null | null | null | pyspark/pysparkTJ/pyspark08_df.py | mayi140611/mayiexamples | 221cf9e8916d81198df7355894ec59dc334ae0af | [
"Apache-2.0"
] | 2 | 2020-03-09T12:48:07.000Z | 2020-04-19T11:43:22.000Z | #!/usr/bin/env python
# encoding: utf-8
"""
@author: 'Administrator'
@contact:
@time:
"""
#!/usr/bin/python
# encoding: utf-8
# ================ DataFrame
from pyspark.sql import SparkSession
from pyspark.sql import Row
spark = SparkSession.builder.appName('test').getOrCreate()
sc = spark.sparkContext
# spark.c... | 25.728571 | 116 | 0.616047 | #!/usr/bin/env python
# encoding: utf-8
"""
@author: 'Administrator'
@contact:
@time:
"""
#!/usr/bin/python
# encoding: utf-8
# ================ 直接创建DataFrame
from pyspark.sql import SparkSession
from pyspark.sql import Row
spark = SparkSession.builder.appName('test').getOrCreate()
sc = spark.sparkContext
# spa... | 546 | 0 | 0 | 0 | 0 | 74 | 0 | 0 | 23 |
9f0709244ffaa202439950676c6a42f9bf286dfd | 29,567 | py | Python | src/analyze.py | quanxianwang/wr-graph | ef6d705161b41f85f5ea8102e653e14b66b77d7c | [
"Intel"
] | 1 | 2016-02-14T06:04:44.000Z | 2016-02-14T06:04:44.000Z | src/analyze.py | quanxianwang/wr-graph | ef6d705161b41f85f5ea8102e653e14b66b77d7c | [
"Intel"
] | null | null | null | src/analyze.py | quanxianwang/wr-graph | ef6d705161b41f85f5ea8102e653e14b66b77d7c | [
"Intel"
] | null | null | null | #!/usr/bin/python2.7
# -*- coding: utf-8 -*-
# analyze.py
#
# Copyright 214 Intel Corporation
#
# Author: Quanxian Wang <quanxian.wang@intel.com>
# Zhang Xiaoyan <zhang.xiaoyanx@intel.com>
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU Lesser General P... | 36.278528 | 124 | 0.509893 | #!/usr/bin/python2.7
# -*- coding: utf-8 -*-
# analyze.py
#
# Copyright © 214 Intel Corporation
#
# Author: Quanxian Wang <quanxian.wang@intel.com>
# Zhang Xiaoyan <zhang.xiaoyanx@intel.com>
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU Lesser General ... | 2 | 0 | 0 | 28,350 | 0 | 0 | 0 | -34 | 223 |
88c70644ec5578d95f592c82f4959f388a8fe2ee | 7,600 | py | Python | shopping_cart.py | richiebubbs/shopping-cart | 0b0054b2179c39d6a0f6cf011c52023f90aee2c5 | [
"MIT"
] | 1 | 2019-06-17T21:03:35.000Z | 2019-06-17T21:03:35.000Z | shopping_cart.py | richiebubbs/shopping-cart | 0b0054b2179c39d6a0f6cf011c52023f90aee2c5 | [
"MIT"
] | null | null | null | shopping_cart.py | richiebubbs/shopping-cart | 0b0054b2179c39d6a0f6cf011c52023f90aee2c5 | [
"MIT"
] | null | null | null | # shopping_cart.py
#from pprint import pprint
import pandas as pd
import datetime
import time
products = [
{"id":1, "name": "Chocolate Sandwich Cookies", "department": "snacks", "aisle": "cookies cakes", "price": 3.50},
{"id":2, "name": "All-Seasons Salt", "department": "pantry", "aisle": "spices seasonings... | 44.186047 | 158 | 0.586579 | # shopping_cart.py
#from pprint import pprint
import pandas as pd
import datetime
import time
products = [
{"id":1, "name": "Chocolate Sandwich Cookies", "department": "snacks", "aisle": "cookies cakes", "price": 3.50},
{"id":2, "name": "All-Seasons Salt", "department": "pantry", "aisle": "spices seasonings... | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
cff5ac77360e298988b3ae7a3c20502f8a1aeb34 | 6,168 | py | Python | setup.py | ptrbortolotti/WEIS | 1e4dbf6728050f75cee08cd483fe57c5614488fe | [
"Apache-2.0"
] | 26 | 2020-08-25T16:16:21.000Z | 2022-03-10T08:23:57.000Z | setup.py | ptrbortolotti/WEIS | 1e4dbf6728050f75cee08cd483fe57c5614488fe | [
"Apache-2.0"
] | 90 | 2020-08-24T23:02:47.000Z | 2022-03-29T13:48:15.000Z | setup.py | ptrbortolotti/WEIS | 1e4dbf6728050f75cee08cd483fe57c5614488fe | [
"Apache-2.0"
] | 25 | 2020-08-24T19:28:24.000Z | 2022-01-27T21:17:37.000Z | import os
import sys
import platform
import multiprocessing
from distutils.core import run_setup
from setuptools import find_packages
from numpy.distutils.core import setup
from io import open
# Global constants
ncpus = multiprocessing.cpu_count()
this_directory = os.path.abspath(os.path.dirname(__file__))
# Eagle en... | 38.074074 | 135 | 0.577335 | import os
import sys
import platform
import multiprocessing
from distutils.core import run_setup
from setuptools import find_packages
from numpy.distutils.command.build_ext import build_ext
from numpy.distutils.core import setup, Extension
from io import open
# Global constants
ncpus = multiprocessing.cpu_count()
this... | 0 | 0 | 0 | 3,077 | 0 | 0 | 0 | 45 | 67 |
b4053b7777cfbdc0dd4b8bc93525c9b79ceb4853 | 8,987 | py | Python | player.py | czatom/raspberry-pi-rfid-jukebox | d89b8438c50c1efa079ed9953259e665ee0e8c6f | [
"MIT"
] | null | null | null | player.py | czatom/raspberry-pi-rfid-jukebox | d89b8438c50c1efa079ed9953259e665ee0e8c6f | [
"MIT"
] | null | null | null | player.py | czatom/raspberry-pi-rfid-jukebox | d89b8438c50c1efa079ed9953259e665ee0e8c6f | [
"MIT"
] | null | null | null | #!/usr/bin/env python
# -*- coding: utf-8 -*-
__author__ = 'Tomasz Czaja'
__version__ = '0.0.1'
import sys
import time
import RPi.GPIO as GPIO
# Press the green button in the gutter to run the script.
if __name__ == '__main__':
jukebox = RfidJukebox()
while True:
try:
value = input("Ent... | 36.237903 | 108 | 0.586291 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
__author__ = 'Tomasz Czaja'
__version__ = '0.0.1'
import sys
import time
from pathlib import Path
import signal
import RPi.GPIO as GPIO
from PIL import Image, ImageDraw, ImageFont
from ST7789 import ST7789
from audioplayer import AudioPlayer
class RfidJukebox(object):
... | 0 | 222 | 0 | 8,008 | 0 | 0 | 0 | 35 | 133 |
80bacaf4db0e0536c9ceb0109bd8d31aa08769f4 | 2,558 | py | Python | StreamPy/StreamPy-UI/src/root/nested/run.py | AnomalyInc/StreamPy | 94abca276b2857de48259f4f42ef95efbdf5f6d1 | [
"Apache-2.0"
] | 2 | 2017-04-27T11:04:27.000Z | 2019-02-07T21:03:32.000Z | StreamPy/StreamPy-UI/src/root/nested/run.py | StreamPy/StreamPy | 94abca276b2857de48259f4f42ef95efbdf5f6d1 | [
"Apache-2.0"
] | null | null | null | StreamPy/StreamPy-UI/src/root/nested/run.py | StreamPy/StreamPy | 94abca276b2857de48259f4f42ef95efbdf5f6d1 | [
"Apache-2.0"
] | null | null | null | '''
This module parses the input arguments and extracts the necessary
data structures from it, then calls the appropriate functions to
process it.
'''
import sys
import getpass
def dispatch(json_file_name):
'''
Looks at input JSON file and determines
which functions should be called to
process it.
... | 24.361905 | 65 | 0.661454 | '''
This module parses the input arguments and extracts the necessary
data structures from it, then calls the appropriate functions to
process it.
'''
import sys
import getpass
from Subgraph import *
from Multiprocessing import *
def dispatch(json_file_name):
'''
Looks at input JSON file and determines
... | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 9 | 45 |
83e8fd1f77501df7be5bc7b460716f859e343762 | 65,111 | py | Python | dbReports/iondb/rundb/data/views.py | sequencer2014/TS | 465804570349d46b47c1bdf131bdafea5c582dee | [
"Apache-2.0"
] | null | null | null | dbReports/iondb/rundb/data/views.py | sequencer2014/TS | 465804570349d46b47c1bdf131bdafea5c582dee | [
"Apache-2.0"
] | null | null | null | dbReports/iondb/rundb/data/views.py | sequencer2014/TS | 465804570349d46b47c1bdf131bdafea5c582dee | [
"Apache-2.0"
] | null | null | null | # Copyright (C) 2012 Ion Torrent Systems, Inc. All Rights Reserved
import json
import os
from iondb.rundb.models import (EventLog, DMFileStat)
from iondb.rundb.data import tasks as dmtasks
from iondb.rundb.data import dmactions
from iondb.rundb.data.data_management import update_files_in_use
from iondb.rundb.data impo... | 42.225032 | 336 | 0.641059 | # Copyright (C) 2012 Ion Torrent Systems, Inc. All Rights Reserved
from django import http, template
from django.core import urlresolvers
from django.conf import settings
from django.contrib.auth.models import User
from django.contrib.auth.decorators import login_required, permission_required
from django.core.cache imp... | 0 | 16,235 | 0 | 1,897 | 0 | 38,686 | 0 | 1,061 | 1,964 |
5a668b2ae45d6e68e24efd310be550e8ab5a16b7 | 821 | py | Python | backend/nezbank/migrations/0003_auto_20211231_1638.py | romanselivanov/djangobank | adf08b1e80043d4b8199f89f4570580a73b61504 | [
"MIT"
] | null | null | null | backend/nezbank/migrations/0003_auto_20211231_1638.py | romanselivanov/djangobank | adf08b1e80043d4b8199f89f4570580a73b61504 | [
"MIT"
] | null | null | null | backend/nezbank/migrations/0003_auto_20211231_1638.py | romanselivanov/djangobank | adf08b1e80043d4b8199f89f4570580a73b61504 | [
"MIT"
] | null | null | null | # Generated by Django 3.2.9 on 2021-12-31 13:38
| 28.310345 | 104 | 0.600487 | # Generated by Django 3.2.9 on 2021-12-31 13:38
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('nezbank', '0002_auto_20211228_1743'),
]
operations = [
migrations.AlterField(
model_name='account',
name='rate',
... | 48 | 0 | 0 | 683 | 0 | 0 | 0 | 19 | 46 |
3fa4a50263395c37bf24777fe66ffb3c12d5884e | 16,918 | py | Python | python/services/recaptchaenterprise/key.py | GoogleCloudPlatform/declarative-resource-client-library | ef28ca390518a8266cfe5a5e0d5abb8f45f5c7d2 | [
"Apache-2.0"
] | 16 | 2021-01-08T19:35:22.000Z | 2022-03-23T16:23:49.000Z | python/services/recaptchaenterprise/key.py | GoogleCloudPlatform/declarative-resource-client-library | ef28ca390518a8266cfe5a5e0d5abb8f45f5c7d2 | [
"Apache-2.0"
] | 1 | 2021-01-13T04:59:56.000Z | 2021-01-13T04:59:56.000Z | python/services/recaptchaenterprise/key.py | GoogleCloudPlatform/declarative-resource-client-library | ef28ca390518a8266cfe5a5e0d5abb8f45f5c7d2 | [
"Apache-2.0"
] | 11 | 2021-03-18T11:27:28.000Z | 2022-03-12T06:49:14.000Z | # Copyright 2021 Google LLC. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law o... | 37.182418 | 103 | 0.68235 | # Copyright 2021 Google LLC. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law o... | 0 | 7,273 | 0 | 8,082 | 0 | 0 | 0 | 139 | 812 |
45ef67b53de68d0622d120dac4f8fe6e7a75efc7 | 597 | py | Python | examples/starting_template_simple.py | jgrigonis/arcade | 9b624da7da52e3909f6e82c552446b90249041f1 | [
"MIT"
] | 1 | 2021-05-23T20:30:46.000Z | 2021-05-23T20:30:46.000Z | examples/starting_template_simple.py | jgrigonis/arcade | 9b624da7da52e3909f6e82c552446b90249041f1 | [
"MIT"
] | null | null | null | examples/starting_template_simple.py | jgrigonis/arcade | 9b624da7da52e3909f6e82c552446b90249041f1 | [
"MIT"
] | null | null | null | import arcade
SCREEN_WIDTH = 500
SCREEN_HEIGHT = 600
window = MyApplication(SCREEN_WIDTH, SCREEN_HEIGHT)
arcade.run()
| 17.558824 | 58 | 0.61474 | import arcade
SCREEN_WIDTH = 500
SCREEN_HEIGHT = 600
class MyApplication(arcade.Window):
"""
Main application class.
"""
def __init__(self, width, height):
super().__init__(width, height)
arcade.set_background_color(arcade.color.WHITE)
def on_draw(self):
"""
Re... | 0 | 0 | 0 | 452 | 0 | 0 | 0 | 0 | 23 |
1b3e0b5f449b4f057a00a91cbde0336dfb73c591 | 4,976 | py | Python | src/cli.py | VFRAMEio/vframe | 0dbc991697a6de47ccf3b65ced5b1201a45156b6 | [
"MIT"
] | 43 | 2018-11-21T10:22:17.000Z | 2022-03-28T22:21:26.000Z | src/cli.py | VFRAMEio/vframe | 0dbc991697a6de47ccf3b65ced5b1201a45156b6 | [
"MIT"
] | null | null | null | src/cli.py | VFRAMEio/vframe | 0dbc991697a6de47ccf3b65ced5b1201a45156b6 | [
"MIT"
] | 7 | 2018-11-22T11:41:01.000Z | 2021-08-05T13:55:09.000Z | #!/usr/bin/env python
#############################################################################
#
# VFRAME
# MIT License
# Copyright (c) 2020 Adam Harvey and VFRAME
# https://vframe.io
#
#############################################################################
from os.path import join
import sys
from pathlib ... | 29.270588 | 94 | 0.581994 | #!/usr/bin/env python
#############################################################################
#
# VFRAME
# MIT License
# Copyright (c) 2020 Adam Harvey and VFRAME
# https://vframe.io
#
#############################################################################
import os
from os.path import join
import sys
fr... | 0 | 1,172 | 0 | 0 | 0 | 0 | 0 | -11 | 155 |
5b3106918eb0668c2e901ae8fcf1934e63af6763 | 1,842 | py | Python | OCR/ColOCR.py | EdJeeOnGitHub/PR1956 | fc904a00272041c886db72759b6e0e576a29f744 | [
"MIT"
] | null | null | null | OCR/ColOCR.py | EdJeeOnGitHub/PR1956 | fc904a00272041c886db72759b6e0e576a29f744 | [
"MIT"
] | null | null | null | OCR/ColOCR.py | EdJeeOnGitHub/PR1956 | fc904a00272041c886db72759b6e0e576a29f744 | [
"MIT"
] | null | null | null | import os
from google.cloud import vision
from joblib import Parallel, delayed
import argparse
os.environ["GOOGLE_APPLICATION_CREDENTIALS"] = ""
client = vision.ImageAnnotatorClient()
if __name__ == '__main__':
# construct the argument parse and parse the arguments
parser = argparse.ArgumentParser(descriptio... | 35.423077 | 88 | 0.68241 | import os
import io
import json
from google.cloud import vision
from google.protobuf.json_format import MessageToJson
from joblib import Parallel, delayed
import argparse
os.environ["GOOGLE_APPLICATION_CREDENTIALS"] = ""
client = vision.ImageAnnotatorClient()
def main(imgdir, outputdir):
print("processing "+imgdi... | 0 | 0 | 0 | 0 | 0 | 789 | 0 | 10 | 89 |
98902a2578836780e5d099b3a881ff34ebf06812 | 370 | py | Python | project_2/Tool.py | BFreitas16/SSof | c6963b76c1c033324593a40139e5918ad6386380 | [
"MIT"
] | null | null | null | project_2/Tool.py | BFreitas16/SSof | c6963b76c1c033324593a40139e5918ad6386380 | [
"MIT"
] | null | null | null | project_2/Tool.py | BFreitas16/SSof | c6963b76c1c033324593a40139e5918ad6386380 | [
"MIT"
] | null | null | null |
if __name__ == '__main__':
main()
| 19.473684 | 51 | 0.721622 | import sys
from Util import write_list_to_file
from ProgramParser import ProgramParser
def main():
program = sys.argv[1]
pattern = sys.argv[2]
parser = ProgramParser(program, pattern)
parser.build_graph()
vulnerability_list = parser.evaluate_flows()
write_list_to_file(program, vulnerabil... | 0 | 0 | 0 | 0 | 0 | 219 | 0 | 21 | 89 |
04349bcacdf78132aeef750e0ad5a40b2317d8c5 | 3,355 | py | Python | src/q_play.py | msHujindou/Tetris-DQN | 8d8f83b151262dd2c392f8d247b1cee76c0bf0fd | [
"MIT"
] | null | null | null | src/q_play.py | msHujindou/Tetris-DQN | 8d8f83b151262dd2c392f8d247b1cee76c0bf0fd | [
"MIT"
] | null | null | null | src/q_play.py | msHujindou/Tetris-DQN | 8d8f83b151262dd2c392f8d247b1cee76c0bf0fd | [
"MIT"
] | null | null | null | """
- AI
"""
import sys
if __name__ == "__main__":
# human_play()
ai_play("outputs/q_3600000.json")
sys.exit(0)
| 37.277778 | 78 | 0.558271 | """
此脚本负责 - 手工运行游戏或者用AI运行游戏
"""
import sys
import cv2
from utils.util import create_image_from_state
from game.confs import Action_Type, Block_Type, Confs
from game.tetris_engine import tetris_engine
import json
import numpy as np
def ai_play(model_file):
with open(model_file, "r") as fr:
mo... | 54 | 0 | 0 | 0 | 0 | 2,979 | 0 | 56 | 163 |
ade1cbdefc111b4b06b7ab346b2328ce27bad434 | 6,522 | py | Python | examples/reconstruct_simul_data_medium.py | s-matrix/smpr3d | f11c36c37bba749fe8aeb43f6cfbf303ab817064 | [
"Apache-2.0"
] | 2 | 2021-04-26T18:35:57.000Z | 2021-08-05T17:49:35.000Z | examples/reconstruct_simul_data_medium.py | s-matrix/smpr3d | f11c36c37bba749fe8aeb43f6cfbf303ab817064 | [
"Apache-2.0"
] | null | null | null | examples/reconstruct_simul_data_medium.py | s-matrix/smpr3d | f11c36c37bba749fe8aeb43f6cfbf303ab817064 | [
"Apache-2.0"
] | null | null | null | import torch as th
import os
import numpy as np
# salloc -C gpu -N 2 -t 30 -c 10 --gres=gpu:8 -A m1759 --ntasks-per-node=8
# srun -N 2 python ./admm_smatrix_dist_pytorch.py
# module purge
# module load pytorch/v1.4.0-gpu
# module list
# Currently Loaded Modulefiles:
# 1) esslurm 2) modules/3.2.11.1 ... | 36.233333 | 124 | 0.693959 | from smpr3d.util import *
from smpr3d.algorithm import *
from smpr3d.setup import *
import torch as th
import os
import numpy as np
# salloc -C gpu -N 2 -t 30 -c 10 --gres=gpu:8 -A m1759 --ntasks-per-node=8
# srun -N 2 python ./admm_smatrix_dist_pytorch.py
# module purge
# module load pytorch/v1.4.0-gpu
# module list
... | 0 | 0 | 0 | 0 | 0 | 155 | 0 | 48 | 134 |
ac3dfc4c8ee69f742973412c2b602528b8b42497 | 1,860 | py | Python | neural_algorithm_of_artistic_style/utils.py | pyCERN/neural_style_transfer | 0eb70be4f686cec3bc88855765fd5fc60e695ad9 | [
"MIT"
] | null | null | null | neural_algorithm_of_artistic_style/utils.py | pyCERN/neural_style_transfer | 0eb70be4f686cec3bc88855765fd5fc60e695ad9 | [
"MIT"
] | null | null | null | neural_algorithm_of_artistic_style/utils.py | pyCERN/neural_style_transfer | 0eb70be4f686cec3bc88855765fd5fc60e695ad9 | [
"MIT"
] | null | null | null | import tensorflow as tf
import cv2
from imageio import mimsave
from IPython.display import display as display_fn
from IPython.display import Image
def load_img(path_to_img):
'''
Loads an image and convert it to a tensor with longer side to 512
:param path_to_img (str): directory path to image
... | 26.956522 | 91 | 0.667204 | import tensorflow as tf
import cv2
from imageio import mimsave
from IPython.display import display as display_fn
from IPython.display import Image
def load_img(path_to_img):
'''
Loads an image and convert it to a tensor with longer side to 512
:param path_to_img (str): directory path to image
... | 0 | 0 | 0 | 0 | 0 | 268 | 0 | 0 | 50 |
b05b820e91b639366561e7b90fd9769f0b854d8a | 211 | py | Python | lib/conf.py | roopkeed/oscar | 65d4c4bd8816c3b0b19c05eb80d2bbedc73034c9 | [
"MIT"
] | 138 | 2015-01-10T14:23:52.000Z | 2022-03-06T01:23:41.000Z | lib/conf.py | CloCkWeRX/oscar | e0916ebd976d70fbd7bfff7f94f7386019419305 | [
"MIT"
] | 29 | 2015-01-05T21:12:51.000Z | 2020-06-11T04:24:29.000Z | lib/conf.py | CloCkWeRX/oscar | e0916ebd976d70fbd7bfff7f94f7386019419305 | [
"MIT"
] | 33 | 2015-02-17T13:38:57.000Z | 2021-05-18T10:13:08.000Z |
c = Conf()
| 15.071429 | 67 | 0.601896 | import yaml
class Conf:
def __init__(self):
self._conf_dict = yaml.load(open('/etc/oscar.yaml').read())
def get(self):
return self._conf_dict
c = Conf()
def get():
return c.get()
| 0 | 0 | 0 | 133 | 0 | 8 | 0 | -10 | 67 |
2efc63ddd6190a56449f766f3fc2404e3272e0b1 | 5,271 | py | Python | neuralnets/models.py | opentrack/neuralnet-tracker-traincode | 688ada0f46cb407d1809b50c11a136a239290123 | [
"ISC",
"CC0-1.0",
"Unlicense"
] | null | null | null | neuralnets/models.py | opentrack/neuralnet-tracker-traincode | 688ada0f46cb407d1809b50c11a136a239290123 | [
"ISC",
"CC0-1.0",
"Unlicense"
] | null | null | null | neuralnets/models.py | opentrack/neuralnet-tracker-traincode | 688ada0f46cb407d1809b50c11a136a239290123 | [
"ISC",
"CC0-1.0",
"Unlicense"
] | null | null | null | import torch.nn as nn
# can use the below import should you choose to initialize the weights of your Net
| 37.920863 | 123 | 0.593815 | import numpy as np
import torch
import torch.nn as nn
import torch.nn.functional as F
# can use the below import should you choose to initialize the weights of your Net
import torch.nn.init as I
import torchvision.models
from neuralnets.mobilenet_v1 import MobileNet
from neuralnets.modelcomponents import *
class Loc... | 0 | 0 | 0 | 4,915 | 0 | 0 | 0 | 49 | 201 |
ee18daf6898aa470f98e2c0341ce11cd0e43fda0 | 1,031 | py | Python | vmb/datasets/loader.py | MohsenFayyaz89/VideoModelBenchmark | 71edad107e948d308fba3f5e3f0edd3b2eb6ec25 | [
"Apache-2.0"
] | null | null | null | vmb/datasets/loader.py | MohsenFayyaz89/VideoModelBenchmark | 71edad107e948d308fba3f5e3f0edd3b2eb6ec25 | [
"Apache-2.0"
] | null | null | null | vmb/datasets/loader.py | MohsenFayyaz89/VideoModelBenchmark | 71edad107e948d308fba3f5e3f0edd3b2eb6ec25 | [
"Apache-2.0"
] | 1 | 2022-03-02T12:25:34.000Z | 2022-03-02T12:25:34.000Z | """Data loader."""
import torch
from .kinetics import Kinetics
_DATASETS = {
"kinetics": Kinetics,
}
def construct_loader(cfg, split):
"""
Constructs the data loader for the given dataset.
Args:
cfg (CfgNode): configs. Details can be found in
vml/config/defaults.py
split... | 21.479167 | 75 | 0.625606 | """Data loader."""
import torch
from torch.utils.data.sampler import RandomSampler
from .kinetics import Kinetics
_DATASETS = {
"kinetics": Kinetics,
}
def construct_loader(cfg, split):
"""
Constructs the data loader for the given dataset.
Args:
cfg (CfgNode): configs. Details can be found... | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 29 | 23 |
8b15d42fa790505b5b41cf297a18a9c49ddf5408 | 582 | py | Python | code/01_in_out/014_ingest_tips_ratings.py | LadyMiss88/recommendation-engine-using-social-graph | 4ae9978b6251bffdde6793ba394dfa77a7d4a6f4 | [
"MIT"
] | null | null | null | code/01_in_out/014_ingest_tips_ratings.py | LadyMiss88/recommendation-engine-using-social-graph | 4ae9978b6251bffdde6793ba394dfa77a7d4a6f4 | [
"MIT"
] | null | null | null | code/01_in_out/014_ingest_tips_ratings.py | LadyMiss88/recommendation-engine-using-social-graph | 4ae9978b6251bffdde6793ba394dfa77a7d4a6f4 | [
"MIT"
] | null | null | null | import sqlite3
from nltk.sentiment.vader import SentimentIntensityAnalyzer
# Set the file paths
db_path ='D:/Workspace-Github/saproject/data/foursquare.db'
# connect and write to database
conn = sqlite3.connect(db_path)
c = conn.cursor()
c.execute('SELECT tid, tip FROM tips;')
results = c.fetchall()
for ... | 29.1 | 85 | 0.690722 | import sqlite3
from nltk.sentiment.vader import SentimentIntensityAnalyzer
# Set the file paths
db_path ='D:/Workspace-Github/saproject/data/foursquare.db'
# connect and write to database
conn = sqlite3.connect(db_path)
c = conn.cursor()
c.execute('SELECT tid, tip FROM tips;')
results = c.fetchall()
for ... | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
9dcdd58e1b986b842d795c2d8517b2cd2331e9bf | 7,664 | py | Python | speed/client.py | neo4j-field/neo4j-arrow | 94a0468ac57c409fbe9694bd7d939d3192353464 | [
"Apache-2.0"
] | 16 | 2021-09-11T11:16:05.000Z | 2022-03-14T23:09:17.000Z | speed/client.py | neo4j-field/neo4j-arrow | 94a0468ac57c409fbe9694bd7d939d3192353464 | [
"Apache-2.0"
] | 6 | 2021-09-24T23:17:28.000Z | 2022-02-15T21:18:31.000Z | speed/client.py | neo4j-field/neo4j-arrow | 94a0468ac57c409fbe9694bd7d939d3192353464 | [
"Apache-2.0"
] | 1 | 2022-02-22T14:44:21.000Z | 2022-02-22T14:44:21.000Z | import pyarrow as pa
import pyarrow.flight as flight
import base64
import json
import struct
import sys
from time import sleep, time
pa.enable_signal_handlers(True)
def wait_for_connection(client):
"""Perform a blocking check that a connection can be made to the server"""
try:
client.wait_for_availab... | 33.614035 | 98 | 0.619128 | import pyarrow as pa
import pyarrow.flight as flight
import base64
import cmd
import json
import struct
import sys
from time import sleep, time
pa.enable_signal_handlers(True)
def build_location(inputs=sys.argv[1:]):
it = iter(inputs)
host = next(it, "localhost")
port = int(next(it, 9999))
return (hos... | 23 | 0 | 0 | 0 | 0 | 129 | 0 | -11 | 45 |
5b1cf232bfe8fd96f8b17b4ccef40c350f02007e | 564 | py | Python | apps/funcionarios/migrations/0004_funcionario_unidade.py | emilioeiji/gestao_gbareru | 2f3d196c2f511910cba2857062725b817547896a | [
"CC0-1.0"
] | null | null | null | apps/funcionarios/migrations/0004_funcionario_unidade.py | emilioeiji/gestao_gbareru | 2f3d196c2f511910cba2857062725b817547896a | [
"CC0-1.0"
] | null | null | null | apps/funcionarios/migrations/0004_funcionario_unidade.py | emilioeiji/gestao_gbareru | 2f3d196c2f511910cba2857062725b817547896a | [
"CC0-1.0"
] | null | null | null | # Generated by Django 4.0.3 on 2022-03-11 21:29
| 25.636364 | 114 | 0.634752 | # Generated by Django 4.0.3 on 2022-03-11 21:29
from django.db import migrations, models
import django.db.models.deletion
class Migration(migrations.Migration):
dependencies = [
('unidade', '0001_initial'),
('funcionarios', '0003_funcionario_skill'),
]
operations = [
migrations.... | 0 | 0 | 0 | 417 | 0 | 0 | 0 | 30 | 68 |
7f1035cd6cef8a5d5e2571cdf2fc422d3d6c3f98 | 1,024 | py | Python | sympy_version/test.py | mazenbesher/simplex | 5cc3013f20f87891658fe64bf73c7c4cc2843240 | [
"MIT"
] | null | null | null | sympy_version/test.py | mazenbesher/simplex | 5cc3013f20f87891658fe64bf73c7c4cc2843240 | [
"MIT"
] | null | null | null | sympy_version/test.py | mazenbesher/simplex | 5cc3013f20f87891658fe64bf73c7c4cc2843240 | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
import unittest
import numpy as np
from main import LP
aufgabe1 = LP( # Blatt 2
np.matrix('2 0 6; -2 8 4; 3 6 5'),
np.matrix('10; 12; 20'),
np.matrix('2; 1; 3; 0; 0; 0'),
[4, 5, 6])
kreise_example = LP( # Book Page 31
np.matrix('-0.5 -5.5 -2.5 9; 0.5 -1.5 -0.5 1; 1 0 0 0')... | 27.675676 | 87 | 0.591797 | #!/usr/bin/env python3
import unittest
import numpy as np
from sympy import Eq, symbols
from main import sympy_simplex, LP
aufgabe1 = LP( # Blatt 2
np.matrix('2 0 6; -2 8 4; 3 6 5'),
np.matrix('10; 12; 20'),
np.matrix('2; 1; 3; 0; 0; 0'),
[4, 5, 6])
kreise_example = LP( # Book Page 31
np.matrix(... | 0 | 0 | 0 | 484 | 0 | 0 | 0 | 23 | 45 |
2c3b17e6816541aeaf37b9841330e147dccadd0e | 3,107 | py | Python | src/xia2/Wrappers/Dials/RefineBravaisSettings.py | graeme-winter/xia2 | e00d688137d4ddb4b125be9a3f37ae00265886c2 | [
"BSD-3-Clause"
] | 10 | 2015-10-30T06:36:55.000Z | 2021-12-10T20:06:22.000Z | src/xia2/Wrappers/Dials/RefineBravaisSettings.py | graeme-winter/xia2 | e00d688137d4ddb4b125be9a3f37ae00265886c2 | [
"BSD-3-Clause"
] | 528 | 2015-11-24T08:20:12.000Z | 2022-03-21T21:47:29.000Z | src/xia2/Wrappers/Dials/RefineBravaisSettings.py | graeme-winter/xia2 | e00d688137d4ddb4b125be9a3f37ae00265886c2 | [
"BSD-3-Clause"
] | 14 | 2016-03-15T22:07:03.000Z | 2020-12-14T07:13:35.000Z | import logging
from xia2.Driver.DriverFactory import DriverFactory
logger = logging.getLogger("xia2.Wrappers.Dials.RefineBravaisSettings")
def RefineBravaisSettings(DriverType=None):
"""A factory for RefineBravaisSettingsWrapper classes."""
DriverInstance = DriverFactory.Driver(DriverType)
return Refi... | 36.988095 | 84 | 0.650467 | import copy
import json
import logging
import os
from xia2.Driver.DriverFactory import DriverFactory
from xia2.Handlers.Phil import PhilIndex
logger = logging.getLogger("xia2.Wrappers.Dials.RefineBravaisSettings")
def RefineBravaisSettings(DriverType=None):
"""A factory for RefineBravaisSettingsWrapper classes.... | 0 | 0 | 0 | 2,658 | 0 | 0 | 0 | -13 | 115 |
d90e114a5d65201c0b8a47c1c02ca6db7d1a479e | 62,256 | py | Python | win32comext/mapi/emsabtags.py | zhanqxun/cv_fish | f78f4f5bdafb070c179efee8b9276719dfaef1d7 | [
"Apache-2.0"
] | 1 | 2017-08-07T14:52:02.000Z | 2017-08-07T14:52:02.000Z | Lib/site-packages/win32comext/mapi/emsabtags.py | adzhou/Python27 | a7113b69d54a04cc780143241c2f1fe81939ad3a | [
"bzip2-1.0.6"
] | null | null | null | Lib/site-packages/win32comext/mapi/emsabtags.py | adzhou/Python27 | a7113b69d54a04cc780143241c2f1fe81939ad3a | [
"bzip2-1.0.6"
] | 4 | 2021-02-11T03:51:39.000Z | 2021-02-12T05:10:43.000Z | # Converted "manually" from EMSABTAG.H
from mapitags import PT_LONG, PT_BOOLEAN, PT_OBJECT, PT_STRING8, PT_UNICODE, PT_SYSTIME, PT_BINARY, PT_TSTRING, PT_MV_LONG, PT_MV_STRING8, PT_MV_BINARY, PT_MV_UNICODE, PT_MV_TSTRING, PROP_TAG
AB_SHOW_PHANTOMS = 2
AB_SHOW_OTHERS = ... | 73.588652 | 81 | 0.682697 | # Converted "manually" from EMSABTAG.H
from mapitags import PT_UNSPECIFIED, PT_NULL, PT_I2, PT_LONG, PT_R4, \
PT_DOUBLE, PT_CURRENCY, PT_APPTIME, PT_ERROR, \
PT_BOOLEAN, PT_OBJECT, PT_I8, PT_STRING8, PT_UNICODE, \
PT_SYSTIME, PT_CLSID, PT_BINARY, PT_SHO... | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 558 | 0 |
e4abc59af409a75acee164061f7554cbffdbca77 | 6,975 | py | Python | skills/alexa-prize-news/src/topic_modeling/utils.py | stefanrer/commonbsecret | bb527f9b3e460124ccc307c0d39baba9a2490fcd | [
"Apache-2.0"
] | null | null | null | skills/alexa-prize-news/src/topic_modeling/utils.py | stefanrer/commonbsecret | bb527f9b3e460124ccc307c0d39baba9a2490fcd | [
"Apache-2.0"
] | null | null | null | skills/alexa-prize-news/src/topic_modeling/utils.py | stefanrer/commonbsecret | bb527f9b3e460124ccc307c0d39baba9a2490fcd | [
"Apache-2.0"
] | null | null | null | from nltk.stem import SnowballStemmer
stemmer = SnowballStemmer("english")
topic2original_topic = {
"Arts & Entertainment": [
"Arts & Entertainment",
"Multimedia",
"Arts and Living",
"Entertainment",
"Arts and Living_Books",
"Arts and Living_Food and Dining",
... | 28.125 | 120 | 0.594982 | import os
import gensim
from gensim.utils import simple_preprocess
from nltk.stem import WordNetLemmatizer, SnowballStemmer
from src.consts import (
SubtopicSummaryType,
LDA_SUBTOPIC_KEY_WORDS_PATH,
LDA_SUBTOPIC_KEY_PHRASES_PATH,
LDA_SUBTOPIC_N_WORDS_PATH,
LDA_SUBTOPIC_SENTENCE_PATH,
SUBTOPIC_... | 2 | 0 | 0 | 0 | 0 | 1,434 | 0 | 274 | 296 |
43d1223f1a74a2aa5e5e638344493b7690b598af | 810 | py | Python | prediction/models/NERMicroservice/config.py | UMass-Rescue/CombinedTechStack | b3447b174d9798f3baf9bf6509b4cc14a5bd225a | [
"MIT"
] | null | null | null | prediction/models/NERMicroservice/config.py | UMass-Rescue/CombinedTechStack | b3447b174d9798f3baf9bf6509b4cc14a5bd225a | [
"MIT"
] | 32 | 2021-03-17T13:17:22.000Z | 2021-05-04T14:25:31.000Z | prediction/models/NERMicroservice/config.py | UMass-Rescue/CombinedTechStack | b3447b174d9798f3baf9bf6509b4cc14a5bd225a | [
"MIT"
] | 1 | 2021-03-24T13:47:44.000Z | 2021-03-24T13:47:44.000Z | # Give a name to describe this model. The name should conform to python variable naming conventions, and should be
# only a single word.
model_name = 'ner_text'
# Tags are used to describe the performance of a model. These simple keywords can help people decide whether your model
# is appropriate to use for their situ... | 57.857143 | 119 | 0.759259 | # Give a name to describe this model. The name should conform to python variable naming conventions, and should be
# only a single word.
model_name = 'ner_text'
# Tags are used to describe the performance of a model. These simple keywords can help people decide whether your model
# is appropriate to use for their situ... | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
657edb8efd3ce356dba16837de7a86adaf1c99a4 | 1,661 | py | Python | seed/seed.py | mattkantor/basic-flask-app | ec893ca44b1c9c4772c24b81394b58644fefd29a | [
"MIT"
] | null | null | null | seed/seed.py | mattkantor/basic-flask-app | ec893ca44b1c9c4772c24b81394b58644fefd29a | [
"MIT"
] | null | null | null | seed/seed.py | mattkantor/basic-flask-app | ec893ca44b1c9c4772c24b81394b58644fefd29a | [
"MIT"
] | null | null | null |
from app import create_app
from faker import Faker
faker = Faker()
valid_email = "matthewkantor@gmail.com"
valid_password = "password"
valid_user = "mattkantor"
app = create_app()
seed()
| 23.069444 | 123 | 0.562914 | import random
import requests
import json
from flask import Flask
from app import create_app, init_app
from app.models import *
from faker import Faker
faker = Faker()
valid_email = "matthewkantor@gmail.com"
valid_password = "password"
valid_user = "mattkantor"
app = create_app()
def seed():
with app.app_con... | 0 | 0 | 0 | 0 | 0 | 1,334 | 0 | -9 | 135 |
890ca65bde6475505e40106fce6464f436c86a5d | 1,124 | py | Python | sitrep.py | wjegbert/SitRep | e718bd2a7502ac8302fcf301b84bc23bcf4b9768 | [
"MIT"
] | 3 | 2019-11-07T04:18:56.000Z | 2019-11-15T17:52:20.000Z | sitrep.py | wjegbert/SitRep | e718bd2a7502ac8302fcf301b84bc23bcf4b9768 | [
"MIT"
] | 1 | 2019-11-09T17:34:12.000Z | 2019-11-09T17:34:12.000Z | sitrep.py | wjegbert/SitRep | e718bd2a7502ac8302fcf301b84bc23bcf4b9768 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
"""
Created on Mon Nov 4 19:56:24 2019
@author: William
"""
import cv2
import winsound
import time
goal = 25
n = 0
cv2.VideoCapture(0).release
HAARPATH = "haarcascade/haarcascade_frontalface_default.xml"
cap=cv2.VideoCapture(0)
face_detect=cv2.CascadeClassifier(HAARPATH)
f... | 23.416667 | 61 | 0.590747 | # -*- coding: utf-8 -*-
"""
Created on Mon Nov 4 19:56:24 2019
@author: William
"""
import cv2
import winsound
import time
goal = 25
n = 0
cv2.VideoCapture(0).release
HAARPATH = "haarcascade/haarcascade_frontalface_default.xml"
cap=cv2.VideoCapture(0)
face_detect=cv2.CascadeClassifier(HAARPATH)
f... | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
d7c3b23dce5ccf76f3434a372f1c6f86b868906f | 559 | py | Python | mliot/mliot/status_messages.py | BrMorrison/EVT_Brickhack18 | e31035187f85ad18e9a71ebf62acd3b5ca40d3e4 | [
"MIT"
] | null | null | null | mliot/mliot/status_messages.py | BrMorrison/EVT_Brickhack18 | e31035187f85ad18e9a71ebf62acd3b5ca40d3e4 | [
"MIT"
] | null | null | null | mliot/mliot/status_messages.py | BrMorrison/EVT_Brickhack18 | e31035187f85ad18e9a71ebf62acd3b5ca40d3e4 | [
"MIT"
] | null | null | null | MESSAGE_DICT = {
'17':"Feed me!",
'33':"Things could be going better. :-(",
'65':"Do I want to do work: NOP. :-/",
'18':"This isn't the largest program I have every stored.",
'34':"I am happy!",
'66':"My processor is idling! :p",
'20':"Instructions! OM, NOP, NOP, NOP!",
'36':"I am very h... | 37.266667 | 63 | 0.581395 | MESSAGE_DICT = {
'17':"Feed me!",
'33':"Things could be going better. :-(",
'65':"Do I want to do work: NOP. :-/",
'18':"This isn't the largest program I have every stored.",
'34':"I am happy!",
'66':"My processor is idling! :p",
'20':"Instructions! OM, NOP, NOP, NOP!",
'36':"I am very h... | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
2380a187690c8d48e3cde402f44c488638a00fc8 | 26,135 | py | Python | flightdeck/jetpack/models.py | majacQ/FlightDeck | 4ed2e630024374e1ac9f4a8ced8acd0ed7883d76 | [
"MIT"
] | 1 | 2019-12-29T05:58:53.000Z | 2019-12-29T05:58:53.000Z | flightdeck/jetpack/models.py | majacQ/FlightDeck | 4ed2e630024374e1ac9f4a8ced8acd0ed7883d76 | [
"MIT"
] | null | null | null | flightdeck/jetpack/models.py | majacQ/FlightDeck | 4ed2e630024374e1ac9f4a8ced8acd0ed7883d76 | [
"MIT"
] | 2 | 2016-01-16T13:59:52.000Z | 2021-04-25T15:38:26.000Z |
from django.db.models.signals import pre_save, post_save
PERMISSION_CHOICES = (
(0, 'private'),
(1, 'view'),
(2, 'do not copy'),
(3, 'edit')
)
TYPE_CHOICES = (
('l', 'Library'),
('a', 'Add-on')
)
#################################################################################
## Catching Signals... | 30.603044 | 150 | 0.723666 | import os
import csv
import shutil
from copy import deepcopy
from exceptions import TypeError
from django.db.models.signals import pre_save, post_save
from django.db import models
from django.utils import simplejson
from django.contrib.auth.models import User
from django.core.urlresolvers import reverse
from django.t... | 0 | 0 | 0 | 23,863 | 0 | 367 | 0 | 278 | 472 |
6fc8c42ea911cd5193b0a9fdd5f775a823869a3f | 700 | py | Python | setup.py | KedoKudo/finddata | 215ca88285108316f89e0b19ba723e070df7358f | [
"MIT"
] | null | null | null | setup.py | KedoKudo/finddata | 215ca88285108316f89e0b19ba723e070df7358f | [
"MIT"
] | 2 | 2019-03-06T20:57:13.000Z | 2019-12-12T14:34:29.000Z | setup.py | KedoKudo/finddata | 215ca88285108316f89e0b19ba723e070df7358f | [
"MIT"
] | 5 | 2016-11-17T18:54:28.000Z | 2022-01-03T18:54:49.000Z | import versioneer # https://github.com/warner/python-versioneer
from setuptools import setup
setup(name="finddata",
version=versioneer.get_version(), #"0.2.2",
cmdclass=versioneer.get_cmdclass(),
description = "Find data files using ONCat",
author = "Pete Peterson",
author_email = "peters... | 38.888889 | 83 | 0.657143 | import versioneer # https://github.com/warner/python-versioneer
from setuptools import setup
setup(name="finddata",
version=versioneer.get_version(), #"0.2.2",
cmdclass=versioneer.get_cmdclass(),
description = "Find data files using ONCat",
author = "Pete Peterson",
author_email = "peters... | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
3bc88d4611a3e607e32422d3e25324d2297935dc | 1,839 | py | Python | zobs/nmbgmr_manual_etl.py | NMWDI/airflow-dags | dbbd90bbd4fe890396b6f27cfbc560c042d3b2b8 | [
"Apache-2.0"
] | null | null | null | zobs/nmbgmr_manual_etl.py | NMWDI/airflow-dags | dbbd90bbd4fe890396b6f27cfbc560c042d3b2b8 | [
"Apache-2.0"
] | null | null | null | zobs/nmbgmr_manual_etl.py | NMWDI/airflow-dags | dbbd90bbd4fe890396b6f27cfbc560c042d3b2b8 | [
"Apache-2.0"
] | null | null | null | # ===============================================================================
# Copyright 2021 ross
#
# 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/LICE... | 42.767442 | 102 | 0.600326 | # ===============================================================================
# Copyright 2021 ross
#
# 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/LICE... | 0 | 0 | 0 | 0 | 0 | 147 | 0 | 9 | 26 |
a8769746ce0a6de9fca01a73707a04481ae09326 | 32,917 | py | Python | third_party/saltedge/swagger_client/models/attempt.py | ltowarek/budget-supervisor | 862a2d720aecd4ad2fded9c63bc839190ebbc77e | [
"MIT"
] | 1 | 2022-03-01T10:28:31.000Z | 2022-03-01T10:28:31.000Z | third_party/saltedge/swagger_client/models/attempt.py | ltowarek/budget-supervisor | 862a2d720aecd4ad2fded9c63bc839190ebbc77e | [
"MIT"
] | 75 | 2020-11-07T20:14:55.000Z | 2021-10-05T15:08:22.000Z | third_party/saltedge/swagger_client/models/attempt.py | ltowarek/budget-supervisor | 862a2d720aecd4ad2fded9c63bc839190ebbc77e | [
"MIT"
] | null | null | null | # coding: utf-8
"""
Salt Edge Account Information API
API Reference for services # noqa: E501
OpenAPI spec version: 5.0.0
Contact: support@saltedge.com
Generated by: https://github.com/swagger-api/swagger-codegen.git
"""
| 33.588776 | 603 | 0.614971 | # coding: utf-8
"""
Salt Edge Account Information API
API Reference for services # noqa: E501
OpenAPI spec version: 5.0.0
Contact: support@saltedge.com
Generated by: https://github.com/swagger-api/swagger-codegen.git
"""
import pprint
import re # noqa: F401
import six
class Attempt(object):
... | 0 | 23,947 | 0 | 8,651 | 0 | 0 | 0 | -31 | 105 |
432fc3ff6d1726b9f47fc1106e5472077b10a5ec | 137 | py | Python | oteapi/plugins/__init__.py | TorgeirUstad/oteapi-core | 60432a5e8a511cca8a9c52197a247de50e808096 | [
"MIT"
] | 3 | 2022-01-24T15:18:08.000Z | 2022-03-16T14:01:51.000Z | oteapi/plugins/__init__.py | EMMC-ASBL/oteapi-core | 5a034c7610c300b21e585f563debb43383375af0 | [
"MIT"
] | 117 | 2022-01-13T17:26:38.000Z | 2022-03-30T16:12:06.000Z | oteapi/plugins/__init__.py | TorgeirUstad/oteapi-core | 60432a5e8a511cca8a9c52197a247de50e808096 | [
"MIT"
] | 3 | 2022-01-17T20:57:57.000Z | 2022-01-25T08:16:14.000Z | """`oteapi.plugins` module."""
from .factories import create_strategy, load_strategies
__all__ = ("create_strategy", "load_strategies")
| 27.4 | 55 | 0.766423 | """`oteapi.plugins` module."""
from .factories import create_strategy, load_strategies
__all__ = ("create_strategy", "load_strategies")
| 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
1cf13468ac305c0b8a287bc9c7f12d5b9c3ea341 | 5,736 | py | Python | main.py | MinistrBob/MikrotikBackup | 9c37b5cd2d06c077dd374f4e3e56c844cc4a5084 | [
"MIT"
] | null | null | null | main.py | MinistrBob/MikrotikBackup | 9c37b5cd2d06c077dd374f4e3e56c844cc4a5084 | [
"MIT"
] | null | null | null | main.py | MinistrBob/MikrotikBackup | 9c37b5cd2d06c077dd374f4e3e56c844cc4a5084 | [
"MIT"
] | null | null | null | import datetime
import os
import sys
import argparse
def compare_files(f1, f2):
"""
Compare two text files. Ignore lines with '#'.
:param f1: current_file
:param f2: previous_file
:return: True - if files identical, otherwise - False. If previous_file doesn't exist return False.
"""
if not... | 35.190184 | 106 | 0.586646 | import csv
import datetime
import os
import shutil
import sys
import argparse
from mikrotik import Mikrotik
def compare_files(f1, f2):
"""
Compare two text files. Ignore lines with '#'.
:param f1: current_file
:param f2: previous_file
:return: True - if files identical, otherwise - False. If prev... | 0 | 0 | 0 | 0 | 0 | 3,976 | 0 | -11 | 159 |
6a7ab3f40a7b450d06dfc9fd213a66241c2616ba | 23,685 | py | Python | scope/tfutils.py | guygurari/scope | 0bb10f27ff9f98579873247694fe41f54d0a16df | [
"BSD-3-Clause"
] | 9 | 2018-10-27T00:59:11.000Z | 2021-03-18T22:22:17.000Z | scope/tfutils.py | guygurari/scope | 0bb10f27ff9f98579873247694fe41f54d0a16df | [
"BSD-3-Clause"
] | 1 | 2019-11-11T08:20:18.000Z | 2019-11-14T06:38:41.000Z | scope/tfutils.py | guygurari/scope | 0bb10f27ff9f98579873247694fe41f54d0a16df | [
"BSD-3-Clause"
] | 4 | 2018-12-29T15:08:44.000Z | 2020-06-24T01:11:33.000Z | """TensorFlow utilities."""
from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
import numpy as np
import tensorflow as tf
import tensorflow.keras as keras
import tensorflow.keras.backend as K
import scope.lanczos as lanczos
KERAS_LEARNING_PHASE_TEST = 0
KERAS_... | 29.168719 | 80 | 0.672535 | """TensorFlow utilities."""
from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
import sys
import numpy as np
import tensorflow as tf
import tensorflow.keras as keras
import tensorflow.keras.backend as K
from time import time
import scope.lanczos as lanczos
KE... | 0 | 1,414 | 0 | 6,546 | 1,020 | 46 | 0 | -11 | 252 |
beb3bdc9c2a1fb99b293a9ab70d6ff50bc7e3d3a | 43 | py | Python | papel/tipo_papel.py | dusannemec/stocktracker | fd83862ce47dae1615c445a1bed1a39d3a769e80 | [
"MIT"
] | null | null | null | papel/tipo_papel.py | dusannemec/stocktracker | fd83862ce47dae1615c445a1bed1a39d3a769e80 | [
"MIT"
] | null | null | null | papel/tipo_papel.py | dusannemec/stocktracker | fd83862ce47dae1615c445a1bed1a39d3a769e80 | [
"MIT"
] | null | null | null | tipo = [
'Ao',
'FII',
'ETF'
] | 8.6 | 11 | 0.325581 | tipo = [
'Ação',
'FII',
'ETF'
] | 4 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
ea0427ce42e1c22f4f5ed27b3041b6617662f463 | 795 | py | Python | anmEasy6-test-env.py | anushaihalapathirana/RL-Gym-ANM-tool | 2dee2da9be26f512179d313c985832718a34042b | [
"MIT"
] | null | null | null | anmEasy6-test-env.py | anushaihalapathirana/RL-Gym-ANM-tool | 2dee2da9be26f512179d313c985832718a34042b | [
"MIT"
] | null | null | null | anmEasy6-test-env.py | anushaihalapathirana/RL-Gym-ANM-tool | 2dee2da9be26f512179d313c985832718a34042b | [
"MIT"
] | null | null | null |
if __name__ == '__main__':
run()
| 30.576923 | 136 | 0.641509 |
import gym
import time
def run():
env = gym.make('gym_anm:ANM6Easy-v0')
o = env.reset() # create innitial observation space
for i in range(10):
a = env.action_space.sample() # the agent samples random actions from the action space of the ANM6Easy-v0 task for 10 timesteps.
o, r, done, info... | 0 | 0 | 0 | 0 | 0 | 708 | 0 | -21 | 68 |
f1822bd63d1f41f4af248bb046dc7db2672e62a6 | 917 | py | Python | jiminy/gym/envs/mujoco/__init__.py | sibeshkar/jiminy | 7754f86fb0f246e7d039ea0cbfd9950fcae4adfb | [
"MIT"
] | 3 | 2020-03-16T13:50:40.000Z | 2021-06-09T05:26:13.000Z | jiminy/gym/envs/mujoco/__init__.py | sibeshkar/jiminy | 7754f86fb0f246e7d039ea0cbfd9950fcae4adfb | [
"MIT"
] | null | null | null | jiminy/gym/envs/mujoco/__init__.py | sibeshkar/jiminy | 7754f86fb0f246e7d039ea0cbfd9950fcae4adfb | [
"MIT"
] | null | null | null | # ^^^^^ so that user gets the correct error
# message if mujoco is not installed correctly
| 53.941176 | 85 | 0.85169 | from jiminy.gym.envs.mujoco.mujoco_env import MujocoEnv
# ^^^^^ so that user gets the correct error
# message if mujoco is not installed correctly
from jiminy.gym.envs.mujoco.ant import AntEnv
from jiminy.gym.envs.mujoco.half_cheetah import HalfCheetahEnv
from jiminy.gym.envs.mujoco.hopper import HopperEnv
from jiminy.... | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 518 | 308 |
4a22fe3dc836ded77f9e576984da0d11042601e3 | 2,420 | py | Python | crypto/xnuca-2020/imposter/task.py | BadMonkey7/funny-ctf-challenge | 827caed5ab54f1da9217dfa25b034b9b398b11ef | [
"MIT"
] | 2 | 2020-10-22T08:13:52.000Z | 2021-01-16T06:56:24.000Z | crypto/xnuca-2020/imposter/task.py | BadMonkey7/funny-ctf-challenge | 827caed5ab54f1da9217dfa25b034b9b398b11ef | [
"MIT"
] | null | null | null | crypto/xnuca-2020/imposter/task.py | BadMonkey7/funny-ctf-challenge | 827caed5ab54f1da9217dfa25b034b9b398b11ef | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
from Toy_AE import Toy_AE
if __name__ == "__main__":
ae = Toy_AE()
if not proof_of_work():
exit(-1)
for _ in range(4):
try:
menu()
except:
exit(-1) | 28.470588 | 103 | 0.572314 | #!/usr/bin/env python3
import os
import random
import string
from hashlib import sha256
from Toy_AE import Toy_AE
from secret import FLAG
def proof_of_work():
random.seed(os.urandom(8))
proof = b''.join([random.choice(string.ascii_letters + string.digits).encode() for _ in range(20)])
digest = sha256(proo... | 0 | 0 | 0 | 0 | 0 | 1,961 | 0 | -21 | 248 |
0640274aa1b43080f82d46e3bd92f4ec37445449 | 2,296 | py | Python | adjutant_moc/actions/users.py | CCI-MOC/adjutant-moc | 015de325dced135f56867c2ca8e07814cc950e36 | [
"Apache-2.0"
] | 1 | 2021-01-22T18:21:42.000Z | 2021-01-22T18:21:42.000Z | adjutant_moc/actions/users.py | CCI-MOC/adjutant-moc | 015de325dced135f56867c2ca8e07814cc950e36 | [
"Apache-2.0"
] | 14 | 2020-05-06T13:39:21.000Z | 2022-02-22T16:27:01.000Z | adjutant_moc/actions/users.py | CCI-MOC/adjutant-moc | 015de325dced135f56867c2ca8e07814cc950e36 | [
"Apache-2.0"
] | 3 | 2019-01-26T20:10:10.000Z | 2019-11-04T16:39:46.000Z | # Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the... | 33.764706 | 74 | 0.682491 | # Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the... | 0 | 0 | 0 | 1,534 | 0 | 0 | 0 | 105 | 113 |
02ad1aadd9a0594ba1cc584f230b170611e9c889 | 6,773 | py | Python | modules/sfp_tool_onesixtyone.py | khiemtq-cyber/spiderfoot | 66e671918853b0334931fd2fbabad0096d506726 | [
"MIT"
] | null | null | null | modules/sfp_tool_onesixtyone.py | khiemtq-cyber/spiderfoot | 66e671918853b0334931fd2fbabad0096d506726 | [
"MIT"
] | null | null | null | modules/sfp_tool_onesixtyone.py | khiemtq-cyber/spiderfoot | 66e671918853b0334931fd2fbabad0096d506726 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
# -------------------------------------------------------------------------------
# Name: sfp_tool_onesixtyone
# Purpose: SpiderFoot plug-in for using the onesixtyone tool.
# Tool: https://github.com/trailofbits/onesixtyone
#
# Author: <steve@binarypool.com>
#
# Crea... | 35.835979 | 351 | 0.565776 | # -*- coding: utf-8 -*-
# -------------------------------------------------------------------------------
# Name: sfp_tool_onesixtyone
# Purpose: SpiderFoot plug-in for using the onesixtyone tool.
# Tool: https://github.com/trailofbits/onesixtyone
#
# Author: <steve@binarypool.com>
#
# Crea... | 0 | 0 | 0 | 6,047 | 0 | 0 | 0 | 51 | 157 |
1b8e3c325a97cccaf1c8c5f4654e6b07c027e9f1 | 626 | py | Python | pvw-dependencies/pv-flow/flow/plugins/__init__.py | psavery/HPCCloud | ffc18ab662b7ff0562cde84cefa0cc8312ab3993 | [
"Apache-2.0"
] | 45 | 2015-12-09T05:00:48.000Z | 2022-01-25T20:51:30.000Z | pvw-dependencies/pv-flow/flow/plugins/__init__.py | psavery/HPCCloud | ffc18ab662b7ff0562cde84cefa0cc8312ab3993 | [
"Apache-2.0"
] | 501 | 2015-09-09T15:41:29.000Z | 2022-03-01T23:38:34.000Z | pvw-dependencies/pv-flow/flow/plugins/__init__.py | dealenx/hpccloud-kemsu | 42fc44b06385c6eb25a979477dcea53fe66cfbfa | [
"Apache-2.0"
] | 27 | 2016-05-05T06:45:56.000Z | 2022-03-09T16:42:54.000Z | import os
from paraview import simple
# -----------------------------------------------------------------------------
MODULE_PATH = os.path.dirname(os.path.abspath(__file__))
PLUGINS = [
'parflow.py'
]
FULL_PATHS = [
'/Applications/ParaView-5.6.0-1626-g52acf2f741.app/Contents/Plugins/ParFlow.so',
]
# -----... | 25.04 | 84 | 0.456869 | import os
from paraview import simple
# -----------------------------------------------------------------------------
MODULE_PATH = os.path.dirname(os.path.abspath(__file__))
PLUGINS = [
'parflow.py'
]
FULL_PATHS = [
'/Applications/ParaView-5.6.0-1626-g52acf2f741.app/Contents/Plugins/ParFlow.so',
]
# -----... | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
fb51e76c32c581e7839960230756b8338e546393 | 418 | py | Python | InventorySystem/skin/migrations/0003_skinmodel_factory.py | guyueming/PythonWeb | e8a38fc26c06ec78e1de61d65055dcfc480ef8f1 | [
"MIT"
] | null | null | null | InventorySystem/skin/migrations/0003_skinmodel_factory.py | guyueming/PythonWeb | e8a38fc26c06ec78e1de61d65055dcfc480ef8f1 | [
"MIT"
] | null | null | null | InventorySystem/skin/migrations/0003_skinmodel_factory.py | guyueming/PythonWeb | e8a38fc26c06ec78e1de61d65055dcfc480ef8f1 | [
"MIT"
] | null | null | null | # Generated by Django 3.2.3 on 2021-06-17 23:09
| 22 | 81 | 0.605263 | # Generated by Django 3.2.3 on 2021-06-17 23:09
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('skin', '0002_alter_skinmodel_name'),
]
operations = [
migrations.AddField(
model_name='skinmodel',
name='factory',
... | 6 | 0 | 0 | 302 | 0 | 0 | 0 | 19 | 46 |
49918cf0e012844bbc237dbf805743d7bcf91358 | 2,054 | py | Python | libraries/stc-1.2.9/Selected_Track_Control/MIDI.py | lushfuture/Liveduino | c55a44a397996d77bbf14d4f883595668520690a | [
"MIT"
] | 2 | 2016-06-30T04:31:58.000Z | 2017-10-11T15:59:35.000Z | libraries/stc-1.2.9/Selected_Track_Control/MIDI.py | lushfuture/Liveduino | c55a44a397996d77bbf14d4f883595668520690a | [
"MIT"
] | null | null | null | libraries/stc-1.2.9/Selected_Track_Control/MIDI.py | lushfuture/Liveduino | c55a44a397996d77bbf14d4f883595668520690a | [
"MIT"
] | null | null | null | # this file stores some constants regarding MIDI-handling, etc.
# for settings which MIDI-notes trigger what functionality see settings.py
import Live
#from Live import MidiMap
#from Live.MidiMap import MapMode
DEFAULT_CHANNEL = 0
STATUS_MASK = 0xF0
CHAN_MASK = 0x0F
CC_STATUS = 0xb0
NOTEON_STATUS = 0x90
NOTEOFF_S... | 30.205882 | 93 | 0.790166 | # this file stores some constants regarding MIDI-handling, etc.
# for settings which MIDI-notes trigger what functionality see settings.py
import Live
#from Live import MidiMap
#from Live.MidiMap import MapMode
DEFAULT_CHANNEL = 0
STATUS_MASK = 0xF0
CHAN_MASK = 0x0F
CC_STATUS = 0xb0
NOTEON_STATUS = 0x90
NOTEOFF_S... | 0 | 0 | 0 | 447 | 0 | 267 | 0 | 0 | 156 |
1c411633507834ebf441912e41c4aa9c0df844f1 | 311 | py | Python | ocpmodels/datasets/embeddings/__init__.py | Irlirion/ocp | 6fb3e794eef31559db990300198eca20f41d8f37 | [
"MIT",
"BSD-3-Clause"
] | 242 | 2020-10-14T11:10:43.000Z | 2022-03-29T07:50:18.000Z | ocpmodels/datasets/embeddings/__init__.py | Irlirion/ocp | 6fb3e794eef31559db990300198eca20f41d8f37 | [
"MIT",
"BSD-3-Clause"
] | 100 | 2020-10-13T23:27:04.000Z | 2022-03-23T16:50:26.000Z | ocpmodels/datasets/embeddings/__init__.py | Irlirion/ocp | 6fb3e794eef31559db990300198eca20f41d8f37 | [
"MIT",
"BSD-3-Clause"
] | 86 | 2020-10-15T05:56:28.000Z | 2022-03-16T16:11:45.000Z | __all__ = [
"ATOMIC_RADII",
"KHOT_EMBEDDINGS",
"CONTINUOUS_EMBEDDINGS",
"QMOF_KHOT_EMBEDDINGS",
]
from .atomic_radii import ATOMIC_RADII
from .continuous_embeddings import CONTINUOUS_EMBEDDINGS
from .khot_embeddings import KHOT_EMBEDDINGS
from .qmof_khot_embeddings import QMOF_KHOT_EMBEDDINGS
| 25.916667 | 56 | 0.807074 | __all__ = [
"ATOMIC_RADII",
"KHOT_EMBEDDINGS",
"CONTINUOUS_EMBEDDINGS",
"QMOF_KHOT_EMBEDDINGS",
]
from .atomic_radii import ATOMIC_RADII
from .continuous_embeddings import CONTINUOUS_EMBEDDINGS
from .khot_embeddings import KHOT_EMBEDDINGS
from .qmof_khot_embeddings import QMOF_KHOT_EMBEDDINGS
| 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
08ebeb940dc3243e6c6b8623fbee91b4d294e8e1 | 1,818 | py | Python | lines/libs/facades.py | betfund/betfund-lines | 9fe3e2aa69bb493df3efc2a3923889f444f2c66d | [
"MIT"
] | null | null | null | lines/libs/facades.py | betfund/betfund-lines | 9fe3e2aa69bb493df3efc2a3923889f444f2c66d | [
"MIT"
] | 1 | 2020-04-01T00:35:21.000Z | 2020-04-01T00:35:21.000Z | lines/libs/facades.py | betfund/betfund-lines | 9fe3e2aa69bb493df3efc2a3923889f444f2c66d | [
"MIT"
] | null | null | null | """Rundown API Response Facades."""
| 25.971429 | 57 | 0.60341 | """Rundown API Response Facades."""
from typing import Union
class LinesResponseFacade(dict):
"""TheRundown `GET events` response accessor."""
def __init__(self, data: dict):
super(LinesResponseFacade, self).__init__(data)
@property
def meta(self) -> dict:
"""Fetch `meta` key from Li... | 0 | 1,151 | 0 | 558 | 0 | 0 | 0 | 3 | 68 |
d2e3854d927ea8e3cbb2c9bb0e4b4dc7ed8d6347 | 4,085 | py | Python | beam_nuggets/io/test/test_base.py | shashanksen/beam-nuggets | accc738801d89329ff55e1716cd42b068e1f5237 | [
"MIT"
] | 60 | 2019-02-11T11:22:26.000Z | 2022-03-14T20:30:44.000Z | beam_nuggets/io/test/test_base.py | shashanksen/beam-nuggets | accc738801d89329ff55e1716cd42b068e1f5237 | [
"MIT"
] | 28 | 2019-01-18T21:43:51.000Z | 2021-09-14T08:22:36.000Z | beam_nuggets/io/test/test_base.py | shashanksen/beam-nuggets | accc738801d89329ff55e1716cd42b068e1f5237 | [
"MIT"
] | 29 | 2019-01-16T15:41:13.000Z | 2022-03-16T11:08:12.000Z | from __future__ import division, print_function
import testing.mysqld
| 31.183206 | 94 | 0.589474 | from __future__ import division, print_function
import unittest
import testing.mysqld
import testing.postgresql
from beam_nuggets.io.relational_db import SourceConfiguration
from .database import TestDatabase
class TransformBaseTest(unittest.TestCase):
postgres_instance = None
mysql_instance = None
po... | 0 | 3,248 | 0 | 601 | 0 | 0 | 0 | 51 | 113 |
ce85073f7b2fe24ba568646bfd956ffe91d1ac82 | 2,956 | py | Python | cm_modules/inference.py | SergejVolkov/SR_base | 285b40c0bbe9dc46f2bd660dc80ff255b4dc65a0 | [
"MIT"
] | 2 | 2021-06-10T16:29:30.000Z | 2021-06-14T16:59:29.000Z | cm_modules/inference.py | SergejVolkov/SR_base | 285b40c0bbe9dc46f2bd660dc80ff255b4dc65a0 | [
"MIT"
] | null | null | null | cm_modules/inference.py | SergejVolkov/SR_base | 285b40c0bbe9dc46f2bd660dc80ff255b4dc65a0 | [
"MIT"
] | null | null | null | import cm_modules.utils as utils
| 32.483516 | 98 | 0.530108 | import cv2
import sys
import pyprind
import torch
import numpy as np
import dl_modules.dataset as ds
import dl_modules.transforms as trf
import cm_modules.utils as utils
import skvideo.io as vio
from cm_modules.enhance import correct_colors
from cm_modules.utils import convert_to_cv_8bit
def inference(name: str, net:... | 0 | 0 | 0 | 0 | 0 | 2,643 | 0 | 36 | 243 |
93db70d21a4cc525bbe64c89e40a25836016478f | 35 | py | Python | melior_transformers/version.py | MeliorAI/meliorTransformers | b2936e1aac23e63e0b737d03975124c31a960812 | [
"Apache-2.0"
] | 1 | 2020-08-06T10:48:49.000Z | 2020-08-06T10:48:49.000Z | melior_transformers/version.py | MeliorAI/meliorTransformers | b2936e1aac23e63e0b737d03975124c31a960812 | [
"Apache-2.0"
] | 2 | 2020-02-13T12:45:57.000Z | 2020-04-14T11:30:33.000Z | melior_transformers/version.py | MeliorAI/meliorTransformers | b2936e1aac23e63e0b737d03975124c31a960812 | [
"Apache-2.0"
] | 2 | 2020-07-21T12:43:51.000Z | 2021-08-13T15:21:22.000Z | __version__ = "0.18.2+melior1.1.6"
| 17.5 | 34 | 0.685714 | __version__ = "0.18.2+melior1.1.6"
| 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
e98da541cdab2e7468b7676608a99d1391d48b0c | 337 | py | Python | src/com/python/io/StringIO_Demo.py | Leeo1124/pythonDemo | 72e2209c095301a3f1f61edfe03ea69c3c05be40 | [
"Apache-2.0"
] | null | null | null | src/com/python/io/StringIO_Demo.py | Leeo1124/pythonDemo | 72e2209c095301a3f1f61edfe03ea69c3c05be40 | [
"Apache-2.0"
] | null | null | null | src/com/python/io/StringIO_Demo.py | Leeo1124/pythonDemo | 72e2209c095301a3f1f61edfe03ea69c3c05be40 | [
"Apache-2.0"
] | null | null | null | '''
Created on 201684
@author: Administrator
'''
from io import StringIO
# write to StringIO:
f = StringIO()
f.write('hello')
f.write(' ')
f.write('world!')
print(f.getvalue())
# read from StringIO:
f = StringIO('\n\n\n')
while True:
s = f.readline()
if s == '':
break
print(s.strip())
| 14.652174 | 46 | 0.620178 | '''
Created on 2016年8月4日
@author: Administrator
'''
from io import StringIO
# write to StringIO:
f = StringIO()
f.write('hello')
f.write(' ')
f.write('world!')
print(f.getvalue())
# read from StringIO:
f = StringIO('水面细风生,\n菱歌慢慢声。\n客亭临小市,\n灯火夜妆明。')
while True:
s = f.readline()
if s == '':
break
... | 81 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
a945437d7d6aae26b12be28155368cc0254fe281 | 4,024 | py | Python | tests/unit/test_remote_runner.py | pyl1b/enhterm | b4eacc25ef1bdfecab9a662b5269d016070d4e6b | [
"MIT"
] | null | null | null | tests/unit/test_remote_runner.py | pyl1b/enhterm | b4eacc25ef1bdfecab9a662b5269d016070d4e6b | [
"MIT"
] | null | null | null | tests/unit/test_remote_runner.py | pyl1b/enhterm | b4eacc25ef1bdfecab9a662b5269d016070d4e6b | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
"""
"""
from __future__ import unicode_literals
from __future__ import print_function
import logging
logger = logging.getLogger('')
| 35.298246 | 77 | 0.686382 | # -*- coding: utf-8 -*-
"""
"""
from __future__ import unicode_literals
from __future__ import print_function
import logging
from unittest import TestCase
from unittest.mock import MagicMock
from mock import call
from p2p0mq.app.local_peer import LocalPeer
from p2p0mq.peer import Peer
from enhterm import EnhTerm
fro... | 0 | 0 | 0 | 3,426 | 0 | 0 | 0 | 172 | 267 |
8968aa977cf258c4f59799a1b589d142566eb0f7 | 1,350 | py | Python | portal/urls.py | SlapBass/nx-portal | ee262079db1e5230a24ebbc205e44926f11f8da9 | [
"Apache-2.0"
] | 5 | 2019-10-04T04:46:44.000Z | 2019-10-09T10:02:01.000Z | portal/urls.py | SlapBass/nx-portal | ee262079db1e5230a24ebbc205e44926f11f8da9 | [
"Apache-2.0"
] | 9 | 2019-10-06T07:15:09.000Z | 2020-09-24T02:19:40.000Z | portal/urls.py | SlapBass/nx-portal | ee262079db1e5230a24ebbc205e44926f11f8da9 | [
"Apache-2.0"
] | 1 | 2020-06-19T13:26:08.000Z | 2020-06-19T13:26:08.000Z | """portal URL Configuration
The `urlpatterns` list routes URLs to views. For more information please see:
https://docs.djangoproject.com/en/2.2/topics/http/urls/
Examples:
Function views
1. Add an import: from my_app import views
2. Add a URL to urlpatterns: path('', views.home, name='home')
Class-based ... | 30 | 77 | 0.675556 | """portal URL Configuration
The `urlpatterns` list routes URLs to views. For more information please see:
https://docs.djangoproject.com/en/2.2/topics/http/urls/
Examples:
Function views
1. Add an import: from my_app import views
2. Add a URL to urlpatterns: path('', views.home, name='home')
Class-based ... | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 7 | 0 |
46a440c9cda585a39f13d22ac47a7b77f98ad2a4 | 4,054 | py | Python | python/fedml/core/mlops/mlops_configs.py | ray-ruisun/FedML | 24ff30d636bb70f64e94e9ca205375033597d3dd | [
"Apache-2.0"
] | null | null | null | python/fedml/core/mlops/mlops_configs.py | ray-ruisun/FedML | 24ff30d636bb70f64e94e9ca205375033597d3dd | [
"Apache-2.0"
] | null | null | null | python/fedml/core/mlops/mlops_configs.py | ray-ruisun/FedML | 24ff30d636bb70f64e94e9ca205375033597d3dd | [
"Apache-2.0"
] | null | null | null |
if __name__ == "__main__":
pass
| 37.88785 | 102 | 0.593488 | import logging
import os
import requests
class Singleton(object):
def __new__(cls):
if not hasattr(cls, "_instance"):
orig = super(Singleton, cls)
cls._instance = orig.__new__(cls)
return cls._instance
class MLOpsConfigs(Singleton):
_config_instance = None
def _... | 0 | 229 | 0 | 3,697 | 0 | 0 | 0 | -25 | 113 |
d4a9c553c6e34514fe4c244fea127998e69ae7c6 | 388 | py | Python | apps/shop/migrations/0005_remove_shop_stock.py | lirixiang123/recipe | e78deb5e67c2a4faf140fd183c1a716a23b8a508 | [
"Apache-2.0"
] | null | null | null | apps/shop/migrations/0005_remove_shop_stock.py | lirixiang123/recipe | e78deb5e67c2a4faf140fd183c1a716a23b8a508 | [
"Apache-2.0"
] | null | null | null | apps/shop/migrations/0005_remove_shop_stock.py | lirixiang123/recipe | e78deb5e67c2a4faf140fd183c1a716a23b8a508 | [
"Apache-2.0"
] | 1 | 2021-07-10T16:46:25.000Z | 2021-07-10T16:46:25.000Z | # -*- coding: utf-8 -*-
# Generated by Django 1.11.20 on 2020-04-19 07:57
from __future__ import unicode_literals
| 19.4 | 49 | 0.608247 | # -*- coding: utf-8 -*-
# Generated by Django 1.11.20 on 2020-04-19 07:57
from __future__ import unicode_literals
from django.db import migrations
class Migration(migrations.Migration):
dependencies = [
('shop', '0004_auto_20200419_1551'),
]
operations = [
migrations.RemoveField(
... | 0 | 0 | 0 | 216 | 0 | 0 | 0 | 11 | 46 |
16e4cad44a1ed9a73f7ef3bad62ac39980aa6c7c | 502 | py | Python | sponge-jython/examples/script/py/processor_inheritance.py | mnpas/sponge | 7190f23ae888bbef49d0fbb85157444d6ea48bcd | [
"Apache-2.0"
] | 9 | 2017-12-16T21:48:57.000Z | 2022-01-06T12:22:24.000Z | sponge-jython/examples/script/py/processor_inheritance.py | mnpas/sponge | 7190f23ae888bbef49d0fbb85157444d6ea48bcd | [
"Apache-2.0"
] | 3 | 2020-12-18T11:56:46.000Z | 2022-03-31T18:37:10.000Z | sponge-jython/examples/script/py/processor_inheritance.py | mnpas/sponge | 7190f23ae888bbef49d0fbb85157444d6ea48bcd | [
"Apache-2.0"
] | 2 | 2019-12-29T16:08:32.000Z | 2020-06-15T14:05:34.000Z | """
Sponge Knowledge Base
Processor inheritance
"""
| 22.818182 | 55 | 0.667331 | """
Sponge Knowledge Base
Processor inheritance
"""
def onInit():
# Variables for assertions only
sponge.setVariable("result", None)
class AbstractEchoAction(Action):
def calculateResult(self):
return 1
class EchoAction(AbstractEchoAction):
def onCall(self):
return self... | 0 | 0 | 0 | 144 | 0 | 202 | 0 | 0 | 100 |
67e421e5593e25e525a9cd5688eeb2dc838c4133 | 1,449 | py | Python | source/example.py | momokchung/HIPPO | 7367981eb1b6004f975ab21e594f220c78aa55bc | [
"CC0-1.0"
] | null | null | null | source/example.py | momokchung/HIPPO | 7367981eb1b6004f975ab21e594f220c78aa55bc | [
"CC0-1.0"
] | null | null | null | source/example.py | momokchung/HIPPO | 7367981eb1b6004f975ab21e594f220c78aa55bc | [
"CC0-1.0"
] | 1 | 2021-06-29T19:08:27.000Z | 2021-06-29T19:08:27.000Z | # import os
# import numpy as np
# import readprm
# import readxyz
# import katom
# # I use examples.py to play with code.
# path = '/Users/moseschung/Documents/Ponder/HIPPO/test/testitems'
# atom_dict, bond_dict, angle_dict, repel_dict, disp_dict, mpole_dict, chgpen_dict, polarize_dict, chgtrn_dict = readprm.readk... | 27.865385 | 207 | 0.73568 | # import os
# import numpy as np
# import readprm
# import readxyz
# import katom
# # I use examples.py to play with code.
# path = '/Users/moseschung/Documents/Ponder/HIPPO/test/testitems'
# atom_dict, bond_dict, angle_dict, repel_dict, disp_dict, mpole_dict, chgpen_dict, polarize_dict, chgtrn_dict = readprm.readk... | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
8ecdf074a386d21d74e99703c37cbeba36e8c3dc | 1,057 | py | Python | test/test_silhouette.py | apblair/project5 | 9ca266596895fe2bcef50ec7c3ef2ef4d8e8655e | [
"MIT"
] | null | null | null | test/test_silhouette.py | apblair/project5 | 9ca266596895fe2bcef50ec7c3ef2ef4d8e8655e | [
"MIT"
] | null | null | null | test/test_silhouette.py | apblair/project5 | 9ca266596895fe2bcef50ec7c3ef2ef4d8e8655e | [
"MIT"
] | null | null | null | # write your silhouette score unit tests here
import numpy as np
import cluster
from sklearn.metrics import silhouette_samples
def test_silhouette():
"""
Unit test of silhouette scores for each of the observations.
NOTE: Using sklearn.metrics.silhouette_samples as ground truth. (NOT sklearn.metrics.... | 34.096774 | 106 | 0.762535 | # write your silhouette score unit tests here
import numpy as np
from scipy.spatial.distance import cdist
import cluster
import pytest
from sklearn.metrics import silhouette_samples, silhouette_score
def test_silhouette():
"""
Unit test of silhouette scores for each of the observations.
NOTE: Using ... | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 29 | 44 |
5831af5b51f9a063116d94b4702b2af91a6cc4b6 | 2,722 | py | Python | setup.py | westurner/MyST-NB | 2bc0c11cedbad6206f70546819fad85d779ce449 | [
"BSD-3-Clause"
] | null | null | null | setup.py | westurner/MyST-NB | 2bc0c11cedbad6206f70546819fad85d779ce449 | [
"BSD-3-Clause"
] | null | null | null | setup.py | westurner/MyST-NB | 2bc0c11cedbad6206f70546819fad85d779ce449 | [
"BSD-3-Clause"
] | null | null | null | """MyST-NB package setup."""
from setuptools import find_packages, setup
# Manually finding the version so we don't need to import our module
text = open("./myst_nb/__init__.py").read()
for line in text.split("\n"):
if "__version__" in line:
break
version = line.split("= ")[-1].strip('"')
setup(
name=... | 31.651163 | 84 | 0.539677 | """MyST-NB package setup."""
from setuptools import find_packages, setup
# Manually finding the version so we don't need to import our module
text = open("./myst_nb/__init__.py").read()
for line in text.split("\n"):
if "__version__" in line:
break
version = line.split("= ")[-1].strip('"')
setup(
name=... | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
3aedbd4190eca1c860d28695d2fa278fe8070791 | 1,152 | py | Python | solutions/solution30.py | ag-ds-bubble/projEuler | eac7fc0159f1324065c471ef814c88f38284934a | [
"MIT"
] | null | null | null | solutions/solution30.py | ag-ds-bubble/projEuler | eac7fc0159f1324065c471ef814c88f38284934a | [
"MIT"
] | null | null | null | solutions/solution30.py | ag-ds-bubble/projEuler | eac7fc0159f1324065c471ef814c88f38284934a | [
"MIT"
] | null | null | null | """
Author : Achintya Gupta
Date Created : 22-09-2020
"""
"""
Problem Statement
------------------------------------------------
Q) Surprisingly there are only three numbers that can be written as the sum of fourth powers of their digits:
1634 = 14 + 64 + 34 + 44
8208 = 84 + 24 + 04 + ... | 28.097561 | 109 | 0.55816 | """
Author : Achintya Gupta
Date Created : 22-09-2020
"""
"""
Problem Statement
------------------------------------------------
Q) Surprisingly there are only three numbers that can be written as the sum of fourth powers of their digits:
1634 = 14 + 64 + 34 + 44
8208 = 84 + 24 + 04 + ... | 0 | 469 | 0 | 0 | 0 | 0 | 0 | 10 | 67 |
366546df064984b3051a9703a0f17c0d0ee7bb3f | 10,264 | py | Python | AadhaarAuth/command.py | SugumaranPoornima/Sample1 | b5c60e68caac608ff394ec10d5c4d7139fec55d3 | [
"MIT"
] | 42 | 2015-01-03T18:00:55.000Z | 2021-09-04T05:04:24.000Z | AadhaarAuth/command.py | SugumaranPoornima/Sample1 | b5c60e68caac608ff394ec10d5c4d7139fec55d3 | [
"MIT"
] | 6 | 2016-07-07T09:33:03.000Z | 2017-07-20T10:50:18.000Z | AadhaarAuth/command.py | SugumaranPoornima/Sample1 | b5c60e68caac608ff394ec10d5c4d7139fec55d3 | [
"MIT"
] | 27 | 2015-01-05T11:01:21.000Z | 2020-11-04T04:27:42.000Z | #!/usr/bin/env python
#
#Copyright (C) 2011 by Venkata Pingali (pingali@gmail.com) & TCS
#
#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... | 39.937743 | 118 | 0.564984 | #!/usr/bin/env python
#
#Copyright (C) 2011 by Venkata Pingali (pingali@gmail.com) & TCS
#
#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... | 0 | 0 | 0 | 8,352 | 0 | 0 | 0 | 38 | 116 |
dcd5529ef811350b2281f9ccd6e0fe4401edc16a | 1,630 | py | Python | tests/example_project/adam/adam_2.py | XD-DENG/cosmic-ray | d265dd0c7bf65484ee2ff1503129b2b16d0c7f55 | [
"MIT"
] | 1 | 2020-10-18T11:29:03.000Z | 2020-10-18T11:29:03.000Z | tests/example_project/adam/adam_2.py | XD-DENG/cosmic-ray | d265dd0c7bf65484ee2ff1503129b2b16d0c7f55 | [
"MIT"
] | 4 | 2020-11-21T07:36:24.000Z | 2020-11-22T03:09:39.000Z | tests/example_project/adam/adam_2.py | XD-DENG/cosmic-ray | d265dd0c7bf65484ee2ff1503129b2b16d0c7f55 | [
"MIT"
] | 1 | 2021-11-10T10:42:57.000Z | 2021-11-10T10:42:57.000Z | """adam.adam_2
"""
# pylint: disable=C0111
| 22.027027 | 79 | 0.660123 | """adam.adam_2
"""
# pylint: disable=C0111
import ctypes
import functools
import operator
def trigger_infinite_loop():
result = None
# When `break` becomes `continue`, this should enter an infinite loop. This
# helps us test timeouts.
# Any object which isn't None passes the truth value testing so h... | 0 | 104 | 0 | 0 | 0 | 1,290 | 0 | -19 | 205 |
0203a5e3f6313034f06f197a6b5da04a3671f705 | 3,940 | py | Python | convert_video.py | tlalexander/rover_video_scripts | ba930a943585c7b571c8eb63e0a9a97b4213f4ba | [
"Apache-2.0"
] | 3 | 2021-04-12T20:08:05.000Z | 2022-02-23T18:37:18.000Z | convert_video.py | tlalexander/rover_video_scripts | ba930a943585c7b571c8eb63e0a9a97b4213f4ba | [
"Apache-2.0"
] | null | null | null | convert_video.py | tlalexander/rover_video_scripts | ba930a943585c7b571c8eb63e0a9a97b4213f4ba | [
"Apache-2.0"
] | null | null | null | import os
import subprocess as sp
"""batch convert videos to a 4x4 720p version"""
#VIDEO_DIRECTORY = '/media/taylor/external/robot/Rover/trail'
#VIDEO_DIRECTORY = '/media/taylor/feynman/rover_videos/trail_scan/Videos'
VIDEO_DIRECTORY = '/media/taylor/external/robot/Rover/trail/unprocessed'
video_groups = []
... | 54.722222 | 268 | 0.670558 | import os
import subprocess as sp
"""batch convert videos to a 4x4 720p version"""
#VIDEO_DIRECTORY = '/media/taylor/external/robot/Rover/trail'
#VIDEO_DIRECTORY = '/media/taylor/feynman/rover_videos/trail_scan/Videos'
VIDEO_DIRECTORY = '/media/taylor/external/robot/Rover/trail/unprocessed'
video_groups = []
... | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
a2daa5db42366859b5b2ed437252897f3257d420 | 5,583 | py | Python | amazon_kclpy/v3/processor.py | rconroy293/amazon-kinesis-client-python | 66659655e31cec25ca0cc76c397478bdd5bcfcc8 | [
"Apache-2.0"
] | 338 | 2015-01-08T00:39:31.000Z | 2022-03-28T07:17:27.000Z | amazon_kclpy/v3/processor.py | rconroy293/amazon-kinesis-client-python | 66659655e31cec25ca0cc76c397478bdd5bcfcc8 | [
"Apache-2.0"
] | 110 | 2015-01-06T01:22:16.000Z | 2022-03-28T07:26:07.000Z | amazon_kclpy/v3/processor.py | rconroy293/amazon-kinesis-client-python | 66659655e31cec25ca0cc76c397478bdd5bcfcc8 | [
"Apache-2.0"
] | 221 | 2015-01-05T10:56:45.000Z | 2022-02-23T15:40:21.000Z | # Copyright 2018 Amazon.com, Inc. or its affiliates. All Rights Reserved.
# SPDX-License-Identifier: Apache-2.0
| 39.595745 | 133 | 0.713057 | # Copyright 2018 Amazon.com, Inc. or its affiliates. All Rights Reserved.
# SPDX-License-Identifier: Apache-2.0
import abc
from amazon_kclpy.messages import ShutdownInput
class RecordProcessorBase(object):
"""
Base class for implementing a record processor. Each RecordProcessor processes a single shard in a ... | 0 | 2,280 | 0 | 3,083 | 0 | 0 | 0 | 15 | 91 |
b7164864904264ede69eac75cce43c9e8b2f5c2e | 15,534 | py | Python | switch_mod/trans_build.py | mseaborn/switch_py | a1cbf924209268e0397ae457227b24fac3f29779 | [
"ECL-2.0",
"Apache-2.0"
] | null | null | null | switch_mod/trans_build.py | mseaborn/switch_py | a1cbf924209268e0397ae457227b24fac3f29779 | [
"ECL-2.0",
"Apache-2.0"
] | null | null | null | switch_mod/trans_build.py | mseaborn/switch_py | a1cbf924209268e0397ae457227b24fac3f29779 | [
"ECL-2.0",
"Apache-2.0"
] | null | null | null | # Copyright 2015 The Switch Authors. All rights reserved.
# Licensed under the Apache License, Version 2, which is in the LICENSE file.
"""
Defines model components to describe transmission build-outs for the
SWITCH-Pyomo model.
SYNOPSIS
>>> from switch_mod.utilities import define_AbstractModel
>>> model = define_Ab... | 45.026087 | 79 | 0.723574 | # Copyright 2015 The Switch Authors. All rights reserved.
# Licensed under the Apache License, Version 2, which is in the LICENSE file.
"""
Defines model components to describe transmission build-outs for the
SWITCH-Pyomo model.
SYNOPSIS
>>> from switch_mod.utilities import define_AbstractModel
>>> model = define_Ab... | 0 | 0 | 0 | 0 | 0 | 694 | 0 | 6 | 103 |
dfea48865d3a2ee9dcce9adeaac49ca447c94ea2 | 2,241 | py | Python | apt/tags/releasefile.py | javajawa/debian-repo-remux | b6626b268acd1743208d8a399f8c975316cfbc80 | [
"BSD-2-Clause"
] | 1 | 2019-10-31T08:36:29.000Z | 2019-10-31T08:36:29.000Z | apt/tags/releasefile.py | javajawa/debian-repo-remux | b6626b268acd1743208d8a399f8c975316cfbc80 | [
"BSD-2-Clause"
] | null | null | null | apt/tags/releasefile.py | javajawa/debian-repo-remux | b6626b268acd1743208d8a399f8c975316cfbc80 | [
"BSD-2-Clause"
] | null | null | null | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
Release File wrapper.
The ReleaseFile is the overall meta data file of a :class:apt.repo.Distribution
"""
| 26.678571 | 99 | 0.586345 | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
Release File wrapper.
The ReleaseFile is the overall meta data file of a :class:apt.repo.Distribution
"""
from typing import Dict, Optional, List
from .tagblock import TagBlock
from .filehash import FileHash
class ReleaseFile(TagBlock):
"""
Release File w... | 0 | 0 | 0 | 1,954 | 0 | 0 | 0 | 36 | 91 |
6f702f2b39955f36a87608d00daaf7bead43074c | 2,357 | py | Python | examples/offboard_velocity_ned.py | thomas-watters-skydio/MAVSDK-Python | e0f9db072e802a06a792a4ed6c64ce75f900167f | [
"BSD-3-Clause"
] | null | null | null | examples/offboard_velocity_ned.py | thomas-watters-skydio/MAVSDK-Python | e0f9db072e802a06a792a4ed6c64ce75f900167f | [
"BSD-3-Clause"
] | null | null | null | examples/offboard_velocity_ned.py | thomas-watters-skydio/MAVSDK-Python | e0f9db072e802a06a792a4ed6c64ce75f900167f | [
"BSD-3-Clause"
] | null | null | null | #!/usr/bin/env python3
import asyncio
if __name__ == "__main__":
loop = asyncio.get_event_loop()
loop.run_until_complete(run())
| 29.098765 | 80 | 0.637675 | #!/usr/bin/env python3
import asyncio
from mavsdk import System
from mavsdk.offboard import OffboardError, VelocityNedYaw
async def run():
""" Does Offboard control using velocity NED coordinates. """
drone = System()
await drone.connect(system_address="udp://:14540")
print("Waiting for drone to ... | 0 | 0 | 2,108 | 0 | 0 | 0 | 0 | 40 | 68 |
e58aabb445f12ba0189a44e8748879f37afd7e73 | 908 | py | Python | task021.py | lessunc/python-guanabara | 5c4c41eb46cc1742fdf36e3dc3c830a189344fad | [
"MIT"
] | 32 | 2018-12-09T00:44:20.000Z | 2022-03-11T19:28:53.000Z | task021.py | lessunc/python-guanabara | 5c4c41eb46cc1742fdf36e3dc3c830a189344fad | [
"MIT"
] | null | null | null | task021.py | lessunc/python-guanabara | 5c4c41eb46cc1742fdf36e3dc3c830a189344fad | [
"MIT"
] | 4 | 2019-01-21T08:04:29.000Z | 2020-06-01T14:27:15.000Z | #coding: utf-8
#----------------------------------------------------------------
# Um programa que abre e reproduz o udio de um arquivo MP3.
#----------------------------------------------------------------
# Tocando um MP3 - Exerccio #021
#----------------------------------------------------------------
import pygam... | 32.428571 | 93 | 0.552863 | #coding: utf-8
#----------------------------------------------------------------
# Um programa que abre e reproduz o áudio de um arquivo MP3.
#----------------------------------------------------------------
# Tocando um MP3 - Exercício #021
#----------------------------------------------------------------
import pyg... | 12 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
ef9536dd514639f1215577b8b7f3ad663346be72 | 330 | py | Python | examples/effects/lens/barrel.py | SimLeek/displayarray | 64fe1e2094448d86d743536eedae0039ca339063 | [
"MIT"
] | 8 | 2019-11-01T19:14:36.000Z | 2021-08-18T17:55:43.000Z | examples/effects/lens/barrel.py | SimLeek/displayarray | 64fe1e2094448d86d743536eedae0039ca339063 | [
"MIT"
] | 12 | 2019-10-01T06:06:48.000Z | 2020-04-29T23:05:58.000Z | examples/effects/lens/barrel.py | SimLeek/displayarray | 64fe1e2094448d86d743536eedae0039ca339063 | [
"MIT"
] | 3 | 2018-04-03T01:29:21.000Z | 2019-06-27T02:52:34.000Z | from displayarray.effects import lens
from displayarray import display
from examples.videos import test_video
# Move the mouse to center the image, scroll to increase/decrease barrel, ctrl+scroll to increase/decrease zoom
m = lens.Barrel(use_bleed=False)
m.enable_mouse_control()
display(test_video, callbacks=m, block... | 33 | 111 | 0.821212 | from displayarray.effects import lens
from displayarray import display
from examples.videos import test_video
# Move the mouse to center the image, scroll to increase/decrease barrel, ctrl+scroll to increase/decrease zoom
m = lens.Barrel(use_bleed=False)
m.enable_mouse_control()
display(test_video, callbacks=m, block... | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
4523ae03626671b16b64a7377c63efa8848ee712 | 4,164 | py | Python | pipda/expression.py | pwwang/dpipe | 4efafbb1b13f8a70cc692943473d716b66e9e947 | [
"MIT"
] | null | null | null | pipda/expression.py | pwwang/dpipe | 4efafbb1b13f8a70cc692943473d716b66e9e947 | [
"MIT"
] | null | null | null | pipda/expression.py | pwwang/dpipe | 4efafbb1b13f8a70cc692943473d716b66e9e947 | [
"MIT"
] | null | null | null | """Provides the abstract class Expression"""
| 36.208696 | 80 | 0.662104 | """Provides the abstract class Expression"""
from abc import ABC, abstractmethod
from functools import partialmethod
from typing import Any
from .context import ContextBase
class Expression(ABC):
"""The abstract Expression class"""
def __hash__(self) -> int:
"""Make it hashable"""
return ha... | 0 | 154 | 0 | 3,811 | 0 | 0 | 0 | 40 | 113 |
69dff3a5f30dcf9c6e9ef143818675faacfafe6b | 179,701 | py | Python | ioflo/base/building.py | BradyHammond/ioflo | 177ac656d7c4ff801aebb0d8b401db365a5248ce | [
"ECL-2.0",
"Apache-2.0",
"MIT"
] | 128 | 2015-01-14T12:26:56.000Z | 2021-11-06T07:09:29.000Z | ioflo/base/building.py | BradyHammond/ioflo | 177ac656d7c4ff801aebb0d8b401db365a5248ce | [
"ECL-2.0",
"Apache-2.0",
"MIT"
] | 17 | 2015-01-28T18:26:50.000Z | 2020-11-19T22:08:06.000Z | ioflo/base/building.py | BradyHammond/ioflo | 177ac656d7c4ff801aebb0d8b401db365a5248ce | [
"ECL-2.0",
"Apache-2.0",
"MIT"
] | 29 | 2015-01-27T23:28:31.000Z | 2021-05-04T16:37:30.000Z | """building.py build frameworks from mission files
"""
from __future__ import division
#print("module {0}".format(__name__))
try:
from itertools import izip
except ImportError: #python 3 zip is same as izip
izip = zip
from . import serving
from .. import trim
from ..aid.consoling import getConsole
console =... | 36.171699 | 111 | 0.526152 | """building.py build frameworks from mission files
"""
from __future__ import division
#print("module {0}".format(__name__))
import time
import re
import importlib
import os
from collections import deque
try:
from itertools import izip
except ImportError: #python 3 zip is same as izip
izip = zip
from ..aid... | 0 | 0 | 0 | 167,944 | 0 | 0 | 0 | 0 | 582 |
6dfd4825fe2253911d71db94c4f5370df9abe10e | 599 | py | Python | registrations/migrations/0003_auto_20200206_0926.py | IFRCGo/ifrcgo-api | c1c3e0cf1076ab48d03db6aaf7a00f8485ca9e1a | [
"MIT"
] | 11 | 2018-06-11T06:05:12.000Z | 2022-03-25T09:31:44.000Z | registrations/migrations/0003_auto_20200206_0926.py | IFRCGo/ifrcgo-api | c1c3e0cf1076ab48d03db6aaf7a00f8485ca9e1a | [
"MIT"
] | 498 | 2017-11-07T21:20:13.000Z | 2022-03-31T14:37:18.000Z | registrations/migrations/0003_auto_20200206_0926.py | IFRCGo/ifrcgo-api | c1c3e0cf1076ab48d03db6aaf7a00f8485ca9e1a | [
"MIT"
] | 6 | 2018-04-11T13:29:50.000Z | 2020-07-16T16:52:11.000Z | # Generated by Django 2.2.9 on 2020-02-06 09:26
| 24.958333 | 62 | 0.60601 | # Generated by Django 2.2.9 on 2020-02-06 09:26
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('registrations', '0002_auto_20180626_1808'),
]
operations = [
migrations.AddField(
model_name='pending',
name='admin_... | 0 | 0 | 0 | 485 | 0 | 0 | 0 | 19 | 46 |
3b3e9ad48fbbc5de739f4d602118cafcc599a65e | 5,549 | py | Python | paddles/paddle_0402/whiteboard/from_scratch/nmist/simple_ann.py | dkeefe3773/pong-rl | e0d548267d7e0ca1b8690224cfd827af8ff571ab | [
"MIT"
] | null | null | null | paddles/paddle_0402/whiteboard/from_scratch/nmist/simple_ann.py | dkeefe3773/pong-rl | e0d548267d7e0ca1b8690224cfd827af8ff571ab | [
"MIT"
] | null | null | null | paddles/paddle_0402/whiteboard/from_scratch/nmist/simple_ann.py | dkeefe3773/pong-rl | e0d548267d7e0ca1b8690224cfd827af8ff571ab | [
"MIT"
] | null | null | null |
from config import logging_configurator
from paddles.paddle_0402.whiteboard.from_scratch.nmist import plot_cost_function
logger = logging_configurator.get_logger(__name__)
if __name__ == "__main__":
neural_network = SimpleNeuralNetwork()
neural_network.train()
neural_network.evalulate_network()
plo... | 58.410526 | 141 | 0.649667 | from typing import Dict
import numpy
from config import logging_configurator
from paddles.paddle_0402.config.paddle_configurator import nmist_raw_ann_config
from paddles.paddle_0402.whiteboard.from_scratch.nmist import Ann, output_training, \
initialize_gradient_weight_accumulation_matrices, initialize_bias_accum... | 0 | 0 | 0 | 4,801 | 0 | 0 | 0 | 282 | 90 |
3ec9171172f97212f0af77549383a8c76fb44a73 | 1,291 | py | Python | logger.py | tex0l/JukeBox | f6a811ddb1ee98983e7ec42cfbde1f0d11b04d2d | [
"Apache-2.0"
] | null | null | null | logger.py | tex0l/JukeBox | f6a811ddb1ee98983e7ec42cfbde1f0d11b04d2d | [
"Apache-2.0"
] | null | null | null | logger.py | tex0l/JukeBox | f6a811ddb1ee98983e7ec42cfbde1f0d11b04d2d | [
"Apache-2.0"
] | null | null | null | from __future__ import unicode_literals
# !/usr/bin/env python
# -*- coding: utf-8 -*-
| 33.973684 | 104 | 0.675445 | from __future__ import unicode_literals
# !/usr/bin/env python
# -*- coding: utf-8 -*-
import logging
import os
class Logger:
"""
This class is very simple and is of no use in the rest of the program except in main.py,
when it's initialized.
To log you must first import logging in the file.
Then yo... | 0 | 0 | 0 | 1,156 | 0 | 0 | 0 | -19 | 67 |
d3b92a5606413c2aa6ad4c84bb904572fdc7d826 | 4,853 | py | Python | terraform-modules/lambda-slack/code/notify/notify.py | ovotech/domain-protect | 56e255912852ea624d710307a0d3fa5e962df195 | [
"Apache-2.0"
] | 185 | 2021-06-22T08:55:37.000Z | 2022-03-31T10:13:28.000Z | terraform-modules/lambda-slack/code/notify/notify.py | ovotech/domain-protect | 56e255912852ea624d710307a0d3fa5e962df195 | [
"Apache-2.0"
] | 7 | 2021-07-05T16:02:03.000Z | 2021-12-21T11:38:17.000Z | terraform-modules/lambda-slack/code/notify/notify.py | ovotech/domain-protect | 56e255912852ea624d710307a0d3fa5e962df195 | [
"Apache-2.0"
] | 27 | 2021-06-28T16:17:23.000Z | 2022-03-28T08:45:19.000Z | from __future__ import print_function
| 29.95679 | 154 | 0.561508 | from __future__ import print_function
import json
import os
from urllib import request, parse
def findings_message(json_data):
try:
findings = json_data["Findings"]
slack_message = {"fallback": "A new message", "fields": [{"title": "Vulnerable domains"}]}
for finding in findings:
... | 0 | 0 | 0 | 0 | 0 | 4,663 | 0 | -10 | 158 |
55e2e13c4d813fa7a677490779ed341922d896c4 | 6,116 | py | Python | heuteinma.py | s1lvester/heuteinmannheim | c60ec7ff8f453dd8d3cb3446a99f7d82901c0c3c | [
"MIT"
] | null | null | null | heuteinma.py | s1lvester/heuteinmannheim | c60ec7ff8f453dd8d3cb3446a99f7d82901c0c3c | [
"MIT"
] | null | null | null | heuteinma.py | s1lvester/heuteinmannheim | c60ec7ff8f453dd8d3cb3446a99f7d82901c0c3c | [
"MIT"
] | null | null | null | import os
import sys
sys.path.append(os.path.join(os.path.dirname(__file__), "lib"))
#import beachstatus
import logging
import locale
locale.setlocale(locale.LC_TIME, '') # locale for date, time an the infamous german "Umalaute"
LOG_FILENAME = os.path.join(os.path.dirname(__file__), 'log.log')
logging.basicConfig(fi... | 43.375887 | 204 | 0.493296 | import os
import sys
sys.path.append(os.path.join(os.path.dirname(__file__), "lib"))
import facebook
import websites
import feeds
#import beachstatus
from event import EventVault
import logging
import datetime
import time
import locale
locale.setlocale(locale.LC_TIME, '') # locale for date, time an the infamous germ... | 10 | 0 | 0 | 5,571 | 0 | 0 | 0 | -30 | 156 |
86715c2149b581cb79e32e65aaacbdc77c87cee0 | 7,986 | py | Python | example/examplechecker.py | DanielHabenicht/enochecker | a771c0bdbcfc4be9cc948d80d7105d8c5303922b | [
"MIT"
] | null | null | null | example/examplechecker.py | DanielHabenicht/enochecker | a771c0bdbcfc4be9cc948d80d7105d8c5303922b | [
"MIT"
] | null | null | null | example/examplechecker.py | DanielHabenicht/enochecker | a771c0bdbcfc4be9cc948d80d7105d8c5303922b | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
# from src.enochecker import *
from enochecker import run
app = ExampleChecker.service # This can be used for gunicorn/uswgi.
if __name__ == "__main__":
run(ExampleChecker)
| 38.210526 | 122 | 0.617205 | #!/usr/bin/env python3
# from src.enochecker import *
import json
import secrets
from typing import Dict
from enochecker import BaseChecker, BrokenServiceException, assert_equals, run
class ExampleChecker(BaseChecker):
"""
Change the methods given here, then simply create the class and .run() it.
A few ... | 0 | 0 | 0 | 7,655 | 0 | 0 | 0 | 37 | 89 |
7c5fbe3e9c6275b73daa73348993fc8d188895e3 | 1,109 | py | Python | frameworks/Java/curacao/setup.py | idlewan/FrameworkBenchmarks | f187ec69752f369d84ef5a262efaef85c3a6a5ab | [
"BSD-3-Clause"
] | 4 | 2015-01-22T02:13:03.000Z | 2018-06-13T12:02:46.000Z | frameworks/Java/curacao/setup.py | ratpack/FrameworkBenchmarks | 81604309e46e382fe2ffb7970a87d728f20c8be6 | [
"BSD-3-Clause"
] | null | null | null | frameworks/Java/curacao/setup.py | ratpack/FrameworkBenchmarks | 81604309e46e382fe2ffb7970a87d728f20c8be6 | [
"BSD-3-Clause"
] | null | null | null |
##start([], open('log.out','a'), open('error.out','a'))
##stop(open('log.out','a'), open('error.out','a'))
| 30.805556 | 138 | 0.651037 |
import subprocess
import sys
import time
import os
def start(args, logfile, errfile):
if os.name == 'nt':
subprocess.check_call('"..\\sbt\\sbt.bat" assembly', shell=True, cwd="curacao", stderr=errfile, stdout=logfile)
else:
subprocess.check_call("$FWROOT/sbt/sbt assembly", shell=True, cwd="curacao", stder... | 0 | 0 | 0 | 0 | 0 | 903 | 0 | -37 | 135 |
2f56ab33ec78758402c86dd59fad3dcc377f14ee | 1,226 | py | Python | django_json_ld/settings.py | denisroldan/django-json-ld | 651fdd43f912dbc869503fb23f5ee9c910608cb7 | [
"MIT"
] | 25 | 2019-01-17T03:30:36.000Z | 2022-03-11T11:30:18.000Z | django_json_ld/settings.py | denisroldan/django-json-ld | 651fdd43f912dbc869503fb23f5ee9c910608cb7 | [
"MIT"
] | 24 | 2019-03-08T11:47:43.000Z | 2022-02-01T15:15:31.000Z | django_json_ld/settings.py | denisroldan/django-json-ld | 651fdd43f912dbc869503fb23f5ee9c910608cb7 | [
"MIT"
] | 6 | 2019-03-06T15:56:58.000Z | 2022-02-01T12:36:01.000Z | from django.conf import settings
from django.core.exceptions import ImproperlyConfigured
CONTEXT_ATTRIBUTE = getattr(settings, 'JSON_LD_CONTEXT_ATTRIBUTE', 'sd')
MODEL_ATTRIBUTE = getattr(settings, 'JSON_LD_MODEL_ATTRIBUTE', 'sd')
DEFAULT_CONTEXT = getattr(settings, 'JSON_LD_DEFAULT_CONTEXT', 'https://schema.org/'... | 37.151515 | 85 | 0.751223 | from django.conf import settings
from django.core.exceptions import ImproperlyConfigured
CONTEXT_ATTRIBUTE = getattr(settings, 'JSON_LD_CONTEXT_ATTRIBUTE', 'sd')
MODEL_ATTRIBUTE = getattr(settings, 'JSON_LD_MODEL_ATTRIBUTE', 'sd')
DEFAULT_CONTEXT = getattr(settings, 'JSON_LD_DEFAULT_CONTEXT', 'https://schema.org/'... | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
67218de130aabcee82d4268b9857f3ae44cdae89 | 596 | py | Python | NKUCodingCat/0019/0019.py | saurabh896/python-1 | f8d3aedf4c0fe6e24dfa3269ea7e642c9f7dd9b7 | [
"MIT"
] | 3,976 | 2015-01-01T15:49:39.000Z | 2022-03-31T03:47:56.000Z | NKUCodingCat/0019/0019.py | dwh65416396/python | 1a7e3edd1cd3422cc0eaa55471a0b42e004a9a1a | [
"MIT"
] | 97 | 2015-01-11T02:59:46.000Z | 2022-03-16T14:01:56.000Z | NKUCodingCat/0019/0019.py | dwh65416396/python | 1a7e3edd1cd3422cc0eaa55471a0b42e004a9a1a | [
"MIT"
] | 3,533 | 2015-01-01T06:19:30.000Z | 2022-03-28T13:14:54.000Z | #coding=utf-8
import xlrd, json, os
from lxml import etree
path = os.path.split(os.path.realpath(__file__))[0]+"/"
data = xlrd.open_workbook(path+"numbers.xls")
table = data.sheets()[0]
nrows = table.nrows
Dict = []
for i in range(nrows ):
Arr = table.row_values(i)
Dict.append(Arr)
root = etree.Element("root")
child1... | 31.368421 | 94 | 0.711409 | #coding=utf-8
import xlrd, json, os
from lxml import etree
path = os.path.split(os.path.realpath(__file__))[0]+"/"
data = xlrd.open_workbook(path+"numbers.xls")
table = data.sheets()[0]
nrows = table.nrows
Dict = []
for i in range(nrows ):
Arr = table.row_values(i)
Dict.append(Arr)
root = etree.Element("root")
child1... | 12 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
f0027c0975f7f4d7959a1a5711f73c1539d05796 | 25 | py | Python | C45Tree/__init__.py | ManuelFreytag/Algorithm_implementation | 380453c2bd4a66e8d604ecdf91c68cb1e14f6bb8 | [
"MIT"
] | 1 | 2018-07-31T08:29:11.000Z | 2018-07-31T08:29:11.000Z | C45Tree/__init__.py | ManuelFreytag/Algorithm_implementation | 380453c2bd4a66e8d604ecdf91c68cb1e14f6bb8 | [
"MIT"
] | null | null | null | C45Tree/__init__.py | ManuelFreytag/Algorithm_implementation | 380453c2bd4a66e8d604ecdf91c68cb1e14f6bb8 | [
"MIT"
] | null | null | null | __all__ = ["apply","fit"] | 25 | 25 | 0.6 | __all__ = ["apply","fit"] | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
fcbb95f8d8cc7e26f00e0fbdea6a2d92f34d2388 | 69 | py | Python | tests/__init__.py | nitesh201/xaitk-saliency | ee86cd3c63bd3b25cad3dc06e5e124ba825190d4 | [
"BSD-3-Clause"
] | null | null | null | tests/__init__.py | nitesh201/xaitk-saliency | ee86cd3c63bd3b25cad3dc06e5e124ba825190d4 | [
"BSD-3-Clause"
] | null | null | null | tests/__init__.py | nitesh201/xaitk-saliency | ee86cd3c63bd3b25cad3dc06e5e124ba825190d4 | [
"BSD-3-Clause"
] | null | null | null | from pathlib import Path
DATA_DIR = Path(__file__).parent / "data"
| 13.8 | 41 | 0.73913 | from pathlib import Path
DATA_DIR = Path(__file__).parent / "data"
| 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
b4d282088f0c58f6f9bcfce3af81c5a23ea4fdda | 10,617 | py | Python | models/Densenet.py | HotaekHan/FCOS | 8e3a0438cf1a53f8916d21ea81d892b260c100a9 | [
"Apache-2.0"
] | null | null | null | models/Densenet.py | HotaekHan/FCOS | 8e3a0438cf1a53f8916d21ea81d892b260c100a9 | [
"Apache-2.0"
] | null | null | null | models/Densenet.py | HotaekHan/FCOS | 8e3a0438cf1a53f8916d21ea81d892b260c100a9 | [
"Apache-2.0"
] | null | null | null | import torch.nn as nn
if __name__ == '__main__':
test() | 40.678161 | 128 | 0.638222 | import torch
import torch.nn as nn
import torch.nn.functional as F
import torch.utils.checkpoint as cp
from models.SEBlock import SELayer
def _bn_function_factory(norm, conv, relu):
def bn_function(inputs):
output = conv(relu(norm(inputs)))
return output
return bn_function
class DenseBlock... | 0 | 0 | 0 | 8,153 | 0 | 2,074 | 0 | 28 | 296 |