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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
46dfd917eb878018fc51a6c20b6aa8a1cb2cdb61 | 4,271 | py | Python | Athos/ONNXCompiler/common.py | krantikiran68/EzPC | cacf10f31cddf55e4a06908fcfc64f8d7d0f85bd | [
"MIT"
] | null | null | null | Athos/ONNXCompiler/common.py | krantikiran68/EzPC | cacf10f31cddf55e4a06908fcfc64f8d7d0f85bd | [
"MIT"
] | null | null | null | Athos/ONNXCompiler/common.py | krantikiran68/EzPC | cacf10f31cddf55e4a06908fcfc64f8d7d0f85bd | [
"MIT"
] | null | null | null | """
Authors: Shubham Ugare.
Copyright:
Copyright (c) 2020 Microsoft Research
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
... | 33.896825 | 85 | 0.661672 | """
Authors: Shubham Ugare.
Copyright:
Copyright (c) 2020 Microsoft Research
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
... | 0 | 0 | 0 | 0 | 0 | 2,784 | 0 | -30 | 367 |
421808b1a98ac33f1e13b637bc02046770b90b3c | 2,573 | py | Python | tests/test_metrics_completeness.py | carlgogo/vip_exoplanets | 52bd0d7b1503a2b317b1187c429b8fe7fca545b6 | [
"MIT"
] | 1 | 2015-07-23T11:43:59.000Z | 2015-07-23T11:43:59.000Z | tests/test_metrics_completeness.py | carlgogo/vip_exoplanets | 52bd0d7b1503a2b317b1187c429b8fe7fca545b6 | [
"MIT"
] | null | null | null | tests/test_metrics_completeness.py | carlgogo/vip_exoplanets | 52bd0d7b1503a2b317b1187c429b8fe7fca545b6 | [
"MIT"
] | null | null | null | """
Tests for metrics/completeness.py
"""
| 30.270588 | 82 | 0.563933 | """
Tests for metrics/completeness.py
"""
import copy
from .helpers import fixture, np
from vip_hci.psfsub import pca
from vip_hci.metrics import completeness_curve, completeness_map
from vip_hci.preproc import frame_crop
from vip_hci.fm import cube_planet_free
@fixture(scope="module")
def get_cube_empty(example_dat... | 0 | 653 | 0 | 0 | 0 | 1,585 | 0 | 88 | 201 |
0d0c0327dad600a79686b9e4bf2e1e7360d4f311 | 764 | py | Python | scripts/fast_downward.py | nishadg246/stripstream-ivan-nishad | 9a275ae5836ee289cd09cbe6bc0ff6fd4a381135 | [
"MIT"
] | null | null | null | scripts/fast_downward.py | nishadg246/stripstream-ivan-nishad | 9a275ae5836ee289cd09cbe6bc0ff6fd4a381135 | [
"MIT"
] | null | null | null | scripts/fast_downward.py | nishadg246/stripstream-ivan-nishad | 9a275ae5836ee289cd09cbe6bc0ff6fd4a381135 | [
"MIT"
] | null | null | null |
COMMAND = '../../fast-downward.py'
MAX_TIME = 'infinity'
MAX_COST = 'infinity'
if __name__ == '__main__':
main() | 33.217391 | 96 | 0.729058 | from stripstream.algorithms.search.fast_downward import search_options, get_fd_root
from subprocess import call
import argparse
import os
COMMAND = '../../fast-downward.py'
MAX_TIME = 'infinity'
MAX_COST = 'infinity'
def main():
parser = argparse.ArgumentParser()
parser.add_argument('domain', help='Domain PDDL fi... | 0 | 0 | 0 | 0 | 0 | 487 | 0 | 50 | 111 |
e015fefd994484af01f6ba782adb2ad5a22df58c | 5,086 | py | Python | sdk/python/pulumi_azure_native/migrate/v20180202/_enums.py | pulumi-bot/pulumi-azure-native | f7b9490b5211544318e455e5cceafe47b628e12c | [
"Apache-2.0"
] | 31 | 2020-09-21T09:41:01.000Z | 2021-02-26T13:21:59.000Z | sdk/python/pulumi_azure_native/migrate/v20180202/_enums.py | pulumi-bot/pulumi-azure-native | f7b9490b5211544318e455e5cceafe47b628e12c | [
"Apache-2.0"
] | 231 | 2020-09-21T09:38:45.000Z | 2021-03-01T11:16:03.000Z | sdk/python/pulumi_azure_native/migrate/v20180202/_enums.py | pulumi-bot/pulumi-azure-native | f7b9490b5211544318e455e5cceafe47b628e12c | [
"Apache-2.0"
] | 4 | 2020-09-29T14:14:59.000Z | 2021-02-10T20:38:16.000Z | # coding=utf-8
# *** WARNING: this file was generated by the Pulumi SDK Generator. ***
# *** Do not edit by hand unless you're certain you know what you are doing! ***
__all__ = [
'AssessmentSizingCriterion',
'AssessmentStage',
'AzureHybridUseBenefit',
'AzureLocation',
'AzureOfferCode',
'AzureP... | 24.334928 | 117 | 0.645497 | # coding=utf-8
# *** WARNING: this file was generated by the Pulumi SDK Generator. ***
# *** Do not edit by hand unless you're certain you know what you are doing! ***
from enum import Enum
__all__ = [
'AssessmentSizingCriterion',
'AssessmentStage',
'AzureHybridUseBenefit',
'AzureLocation',
'Azure... | 0 | 0 | 0 | 4,358 | 0 | 0 | 0 | 0 | 276 |
c37cbfcacc391ccbecbdf08fbb55b91dd09c3f13 | 397 | py | Python | app/celery_app.py | morihladko/zsl_demo | 83904bbe7a59fb048484d996e1b7a377ae8beb63 | [
"MIT"
] | null | null | null | app/celery_app.py | morihladko/zsl_demo | 83904bbe7a59fb048484d996e1b7a377ae8beb63 | [
"MIT"
] | null | null | null | app/celery_app.py | morihladko/zsl_demo | 83904bbe7a59fb048484d996e1b7a377ae8beb63 | [
"MIT"
] | null | null | null | from celery import Celery
from zsl.interface.importer import initialize_web_application
initialize_web_application()
from zsl.application.service_application import service_application
from zsl.interface.celery.worker import CeleryTaskQueueOutsideWorkerModule
service_application.add_injector_module(CeleryTaskQueueO... | 30.538462 | 75 | 0.869018 | from celery import Celery
from zsl.interface.importer import initialize_web_application
initialize_web_application()
from zsl.application.service_application import service_application
from zsl.interface.celery.worker import CeleryTaskQueueOutsideWorkerModule
service_application.add_injector_module(CeleryTaskQueueO... | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
0ac829c991beaeca86f6e7c3d17f63bb40116a09 | 26,113 | py | Python | cfgov/cfgov/settings/base.py | cfpb/consumerfinance.gov | 562bb389128374fc89235ad23e4b1746a8329051 | [
"CC0-1.0"
] | 37 | 2020-08-18T19:52:39.000Z | 2022-03-23T08:08:41.000Z | cfgov/cfgov/settings/base.py | cfpb/consumerfinance.gov | 562bb389128374fc89235ad23e4b1746a8329051 | [
"CC0-1.0"
] | 338 | 2020-08-14T20:46:36.000Z | 2022-03-31T20:49:32.000Z | cfgov/cfgov/settings/base.py | cfpb/consumerfinance.gov | 562bb389128374fc89235ad23e4b1746a8329051 | [
"CC0-1.0"
] | 14 | 2020-10-21T15:27:03.000Z | 2022-03-17T03:16:36.000Z | import json
import os
from pathlib import Path
from django.conf import global_settings
from django.core.exceptions import ImproperlyConfigured
from django.utils.translation import ugettext_lazy as _
import dj_database_url
from elasticsearch import RequestsHttpConnection
from requests_aws4auth import AWS4Auth
from cf... | 32.119311 | 110 | 0.672807 | import json
import os
import secrets
from pathlib import Path
from django.conf import global_settings
from django.core.exceptions import ImproperlyConfigured
from django.utils.translation import ugettext_lazy as _
import dj_database_url
from elasticsearch import RequestsHttpConnection
from requests_aws4auth import AW... | 0 | 0 | 0 | 0 | 0 | 0 | 0 | -7 | 22 |
a17a9f8b455f364d8e5f278b164a88b543941184 | 966 | py | Python | tests/conftest.py | treyhunner/pysource | ae54b39cadd4fa108a42f01512fbb07c29585e48 | [
"MIT"
] | null | null | null | tests/conftest.py | treyhunner/pysource | ae54b39cadd4fa108a42f01512fbb07c29585e48 | [
"MIT"
] | null | null | null | tests/conftest.py | treyhunner/pysource | ae54b39cadd4fa108a42f01512fbb07c29585e48 | [
"MIT"
] | null | null | null |
choice = '''
def choice(self, seq):
"""Choose a random element from a non-empty sequence."""
# raises IndexError if seq is empty
return seq[self._randbelow(len(seq))]
'''
match = '''
def match(pattern, string, flags=0):
"""Try to apply the pattern at the start of the string, returning
a Match objec... | 27.6 | 76 | 0.684265 | import pytest
choice = '''
def choice(self, seq):
"""Choose a random element from a non-empty sequence."""
# raises IndexError if seq is empty
return seq[self._randbelow(len(seq))]
'''
match = '''
def match(pattern, string, flags=0):
"""Try to apply the pattern at the start of the string, returning
... | 0 | 52 | 0 | 0 | 0 | 0 | 0 | -8 | 45 |
b678531788ecb0bb961e8e0d95de1ccea758d037 | 7,538 | py | Python | CodeGenerator/codegenerator/argumentParser.py | annereinarz/ExaHyPE-Workshop-Engine | 714a6052a8accace0235fd2483566d7e9cbacb0a | [
"BSD-3-Clause"
] | 2 | 2019-08-14T22:41:26.000Z | 2020-02-04T19:30:24.000Z | CodeGenerator/codegenerator/argumentParser.py | annereinarz/ExaHyPE-Workshop-Engine | 714a6052a8accace0235fd2483566d7e9cbacb0a | [
"BSD-3-Clause"
] | null | null | null | CodeGenerator/codegenerator/argumentParser.py | annereinarz/ExaHyPE-Workshop-Engine | 714a6052a8accace0235fd2483566d7e9cbacb0a | [
"BSD-3-Clause"
] | 3 | 2019-07-22T10:27:36.000Z | 2020-05-11T12:25:29.000Z | #!/bin/env python
##
# @file This file is part of the ExaHyPE project.
# @author ExaHyPE Group (exahype@lists.lrz.de)
#
# @section LICENSE
#
# Copyright (c) 2016 http://exahype.eu
# All rights reserved.
#
# The project has received funding from the European Union's Horizon
# 2020 research and innovation programme unde... | 53.842857 | 171 | 0.635845 | #!/bin/env python
##
# @file This file is part of the ExaHyPE project.
# @author ExaHyPE Group (exahype@lists.lrz.de)
#
# @section LICENSE
#
# Copyright (c) 2016 http://exahype.eu
# All rights reserved.
#
# The project has received funding from the European Union's Horizon
# 2020 research and innovation programme unde... | 6 | 3,115 | 0 | 3,778 | 0 | 0 | 0 | -6 | 68 |
5be8b769dfa68963ca38392a093862eab52c4029 | 3,150 | py | Python | tests/test_webify.py | jperla/webify | 7ba03bfddaf7a9cddce38b04ac8187697ede71c9 | [
"MIT"
] | 2 | 2016-05-08T08:41:52.000Z | 2021-05-25T14:12:28.000Z | tests/test_webify.py | jperla/webify | 7ba03bfddaf7a9cddce38b04ac8187697ede71c9 | [
"MIT"
] | null | null | null | tests/test_webify.py | jperla/webify | 7ba03bfddaf7a9cddce38b04ac8187697ede71c9 | [
"MIT"
] | null | null | null | #!/usr/bin/env python
#<!-- coding=UTF-8 -->
from __future__ import absolute_import, with_statement
| 30.288462 | 72 | 0.633651 | #!/usr/bin/env python
#<!-- coding=UTF-8 -->
from __future__ import absolute_import, with_statement
import re
import datetime
from .apps import first_template
from .apps import send_email
from .apps import hello
from .apps import layouts
from .apps import simplest
from .apps import standard
import webify
from webify... | 12 | 0 | 0 | 0 | 0 | 2,480 | 0 | 33 | 526 |
d97885f3d86de10d869897b34ddda6da21bbccb3 | 9,835 | py | Python | src/hyperloop/Python/OldMagnePlaneCode/fun3D.py | jcchin/Hyperloop_v2 | 73861d2207af8738425c1d484909ed0433b9653f | [
"Apache-2.0"
] | 1 | 2018-10-16T02:18:39.000Z | 2018-10-16T02:18:39.000Z | src/hyperloop/Python/OldMagnePlaneCode/fun3D.py | jcchin/Hyperloop_v2 | 73861d2207af8738425c1d484909ed0433b9653f | [
"Apache-2.0"
] | 9 | 2016-11-23T09:10:34.000Z | 2016-12-06T01:10:09.000Z | src/hyperloop/Python/OldMagnePlaneCode/fun3D.py | jcchin/Hyperloop_v2 | 73861d2207af8738425c1d484909ed0433b9653f | [
"Apache-2.0"
] | 11 | 2016-01-19T20:26:35.000Z | 2021-02-13T11:16:20.000Z | ''' FUN3D Wrapper '''
# --- Python/system level imports
# --- OpenMDAO main and library imports
# --- Local Python imports
if __name__ == "__main__":
# -------------------------
# --- Default Test Case ---
# -------------------------
Fun3D_Comp = Fun3D()
Fun3D_Comp.run()
| 34.630282 | 82 | 0.451754 | ''' FUN3D Wrapper '''
# --- Python/system level imports
import numpy as np
from string import Template
from scipy.optimize import fsolve
# --- OpenMDAO main and library imports
from openmdao.main.api import Component
from openmdao.lib.datatypes.api import Float
# --- Local Python imports
from StdAtm import Atmospher... | 0 | 0 | 0 | 8,615 | 0 | 654 | 0 | 64 | 201 |
2ae19413269a8cd8fb34938b95a78cb26de5433f | 585 | py | Python | colossalai/builder/__init__.py | rahulgupta9202/ColossalAI | 993088d45eaa032e39cf5959df2a506f0663bc2e | [
"Apache-2.0"
] | 1 | 2022-03-12T04:49:19.000Z | 2022-03-12T04:49:19.000Z | colossalai/builder/__init__.py | rahulgupta9202/ColossalAI | 993088d45eaa032e39cf5959df2a506f0663bc2e | [
"Apache-2.0"
] | null | null | null | colossalai/builder/__init__.py | rahulgupta9202/ColossalAI | 993088d45eaa032e39cf5959df2a506f0663bc2e | [
"Apache-2.0"
] | null | null | null | from .builder import (build_schedule, build_lr_scheduler, build_model, build_optimizer, build_optimizer_wrapper, build_layer, build_loss, build_hooks, build_dataset, build_transform, build_data_sampler, build_gradient_handler)
from .pipeline import ModelInitializer
__all__ = [
'build_schedule', 'build_lr_scheduler... | 53.181818 | 112 | 0.745299 | from .builder import (build_schedule, build_lr_scheduler, build_model, build_optimizer, build_optimizer_wrapper,
build_layer, build_loss, build_hooks, build_dataset, build_transform, build_data_sampler,
build_gradient_handler)
from .pipeline import ModelInitializer
__all__ =... | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 44 | 0 |
1633e103b82a55d14884f1f36e22938e769f22a5 | 538 | py | Python | python-core/src/string.py | NSnietol/python-core-and-advanced | 85d03894d5430bcdd62b0ae35371356f26d9374a | [
"MIT"
] | 2 | 2019-04-13T14:10:38.000Z | 2021-01-17T00:57:51.000Z | python-core/src/string.py | NSnietol/python-core-and-advanced | 85d03894d5430bcdd62b0ae35371356f26d9374a | [
"MIT"
] | null | null | null | python-core/src/string.py | NSnietol/python-core-and-advanced | 85d03894d5430bcdd62b0ae35371356f26d9374a | [
"MIT"
] | 1 | 2020-02-20T15:44:36.000Z | 2020-02-20T15:44:36.000Z | '''
Created on Oct 28, 2018
@author: nilson.nieto
'''
cadena = "You are Awesome "
paraffin= """
You are the creator
of your destiny"""
print(cadena)
print(paraffin)
print(cadena*3)
print(cadena[1:])
print(cadena[2:6:1])
print("opposite")
print(cadena[::-1])
print("remove spaces")
print(cadena.strip())
print("Fi... | 14.540541 | 36 | 0.671004 | '''
Created on Oct 28, 2018
@author: nilson.nieto
'''
cadena = "You are Awesome "
paraffin= """
You are the creator
of your destiny"""
print(cadena)
print(paraffin)
print(cadena*3)
print(cadena[1:])
print(cadena[2:6:1])
print("opposite")
print(cadena[::-1])
print("remove spaces")
print(cadena.strip())
print("Fi... | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
db4dc6e0a2ac4b5b87ef8440fe2731f444efff68 | 6,016 | py | Python | tools/gallerytools.py | marcboeren/millionnl | 688cd401a7d3a12ceee046f3df1d403e18d89ed3 | [
"MIT"
] | null | null | null | tools/gallerytools.py | marcboeren/millionnl | 688cd401a7d3a12ceee046f3df1d403e18d89ed3 | [
"MIT"
] | null | null | null | tools/gallerytools.py | marcboeren/millionnl | 688cd401a7d3a12ceee046f3df1d403e18d89ed3 | [
"MIT"
] | null | null | null | """Million Galleries Tools
(c) 2012 Marc Boeren
"""
import os
import math
from PIL import Image
#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~#
def list_files(directory, extlist = None, depth = -1):
"""Return a list of files (including relative pathnames) found in
the given dir... | 44.235294 | 137 | 0.524435 | """Million Galleries Tools
(c) 2012 Marc Boeren
"""
import os
import sys
import math
from PIL import Image
from PIL import ImageFilter
#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~#
def rounddown(f):
return (int)(math.floor(f)+0.00001)
def list_files(directory, extlist = None, de... | 0 | 0 | 0 | 0 | 0 | 36 | 0 | -5 | 67 |
e302d0d24a9156e1746c13778e77605b68d1f862 | 7,509 | py | Python | Users/ListMembers.py | dropbox/DropboxBusinessScripts | 4f4c32ddd488b29e7fd16a40966761e70a758239 | [
"Apache-2.0"
] | 48 | 2015-11-09T20:05:14.000Z | 2021-12-17T23:35:12.000Z | Users/ListMembers.py | dropbox/DropboxBusinessScripts | 4f4c32ddd488b29e7fd16a40966761e70a758239 | [
"Apache-2.0"
] | null | null | null | Users/ListMembers.py | dropbox/DropboxBusinessScripts | 4f4c32ddd488b29e7fd16a40966761e70a758239 | [
"Apache-2.0"
] | 24 | 2015-11-18T16:15:18.000Z | 2022-03-04T10:35:22.000Z | import argparse
import csv
import sys
reload(sys)
sys.setdefaultencoding('UTF8')
parser = argparse.ArgumentParser(description='Lists members on a Dropbox for Business Team')
parser.add_argument( '-q', '--quota', action='store_const', const=True, default=False, dest='quota',
help='Include usage qu... | 37.733668 | 122 | 0.58623 | import urllib2
import json
import argparse
import csv
import sys
reload(sys)
sys.setdefaultencoding('UTF8')
parser = argparse.ArgumentParser(description='Lists members on a Dropbox for Business Team')
parser.add_argument( '-q', '--quota', action='store_const', const=True, default=False, dest='quota',
... | 0 | 0 | 0 | 0 | 0 | 3,882 | 0 | -17 | 177 |
34b95cc2372710adc694c3a1ce9d56cd7c6ba6db | 380 | py | Python | HITCON-Training/LAB/lab8/exp.py | kernweak/HITCON-Training-writeup | cb9c7ca3dbb8bc22ad41bd94bf5b9f929823aa7c | [
"MIT"
] | 30 | 2017-09-05T14:29:30.000Z | 2022-03-20T01:51:29.000Z | HITCON-Training/LAB/lab8/exp.py | kernweak/HITCON-Training-writeup | cb9c7ca3dbb8bc22ad41bd94bf5b9f929823aa7c | [
"MIT"
] | null | null | null | HITCON-Training/LAB/lab8/exp.py | kernweak/HITCON-Training-writeup | cb9c7ca3dbb8bc22ad41bd94bf5b9f929823aa7c | [
"MIT"
] | 7 | 2018-03-15T10:07:43.000Z | 2020-12-14T09:36:19.000Z | #!/usr/bin/env python
# -*- coding: utf-8 -*-
p = process("craxme")
magic_addr = 0x804a038
p.recvline()
p.recv()
payload = p32(magic_addr)
payload += p32(magic_addr+2)
payload += "%{}c".format(0xb00c-8)
payload += "%7$hn"
payload += "%{}c".format(0xface-0xb00c)
payload += "%8$hn"
payload += "A"
p.send(payload)
p.... | 15.2 | 39 | 0.636842 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
from pwn import *
p = process("craxme")
magic_addr = 0x804a038
p.recvline()
p.recv()
payload = p32(magic_addr)
payload += p32(magic_addr+2)
payload += "%{}c".format(0xb00c-8)
payload += "%7$hn"
payload += "%{}c".format(0xface-0xb00c)
payload += "%8$hn"
payload += "A"
... | 0 | 0 | 0 | 0 | 0 | 0 | 0 | -4 | 22 |
4be7e1490f2866eae5835599d76b9c130577e2cd | 46 | py | Python | fair/__init__.py | remyzane/fair-api | 83669d656f1559071ec9eed22d1304b951736eec | [
"Apache-2.0"
] | 7 | 2016-02-03T03:13:01.000Z | 2016-02-04T08:11:46.000Z | fair/__init__.py | remyzane/flask_http_api | 83669d656f1559071ec9eed22d1304b951736eec | [
"Apache-2.0"
] | null | null | null | fair/__init__.py | remyzane/flask_http_api | 83669d656f1559071ec9eed22d1304b951736eec | [
"Apache-2.0"
] | null | null | null |
__version__ = '0.2.0'
| 9.2 | 21 | 0.673913 |
from .app import Fair
__version__ = '0.2.0'
| 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 23 |
3c0338633b0d26a79818fb0a7d9946fb537421ee | 8,366 | py | Python | src/tabs/configuration_tab.py | LorenzoMonti/Calibrate-multifeed-receiver | 0eb0c3f584084998c72b54c4a8de986292d974aa | [
"MIT"
] | 1 | 2022-01-11T11:23:45.000Z | 2022-01-11T11:23:45.000Z | src/tabs/configuration_tab.py | LorenzoMonti/Calibrate-multifeed-receiver | 0eb0c3f584084998c72b54c4a8de986292d974aa | [
"MIT"
] | 4 | 2022-01-28T09:25:10.000Z | 2022-03-11T10:36:08.000Z | src/tabs/configuration_tab.py | LorenzoMonti/Calibrate-multifeed-receiver | 0eb0c3f584084998c72b54c4a8de986292d974aa | [
"MIT"
] | null | null | null |
try:
import Tkinter as tk
except ImportError:
try:
import ttk
py3 = False
except ImportError:
import tkinter.ttk as ttk
py3 = True | 43.123711 | 111 | 0.660172 | from logging import disable
from tkinter import Tk
from tkinter.constants import DISABLED
from tkinter.font import NORMAL
from tokenize import Double
from src import Anritsu_MS2830A as SPA
from src import Utils
import logging
try:
import Tkinter as tk
except ImportError:
import tkinter as tk
try:
import t... | 0 | 0 | 0 | 0 | 0 | 7,915 | 0 | 51 | 248 |
93a7259f6e8e9fef41dd1793c42e70bd1de99395 | 1,741 | py | Python | scanDirectory/scanDirectory.py | GuillermoMtzDibene/Utilities | 2ac1f8b1563de187f80d082e51eef562d9a74f47 | [
"BSD-3-Clause"
] | null | null | null | scanDirectory/scanDirectory.py | GuillermoMtzDibene/Utilities | 2ac1f8b1563de187f80d082e51eef562d9a74f47 | [
"BSD-3-Clause"
] | null | null | null | scanDirectory/scanDirectory.py | GuillermoMtzDibene/Utilities | 2ac1f8b1563de187f80d082e51eef562d9a74f47 | [
"BSD-3-Clause"
] | null | null | null | import sys, os
def normalise_path(path):
"""
Normalises the path with os.path.normpath and then normalise the case with os.path.normcase.
"""
return os.path.normcase(os.path.normpath(path))
def scanDirectory(directory = os.curdir, extension = '.py', in_here = True):
"""
Find the largest file w... | 44.641026 | 184 | 0.605974 | import sys, os, pprint
def normalise_path(path):
"""
Normalises the path with os.path.normpath and then normalise the case with os.path.normcase.
"""
return os.path.normcase(os.path.normpath(path))
def scanDirectory(directory = os.curdir, extension = '.py', in_here = True):
"""
Find the larges... | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 8 | 0 |
1a1303a2121f4c332e9274e609e89a52417f326c | 65 | py | Python | Phone/G3.py | MK-LinKnight/First-Training | b9111b06f2280c48823b4703cd9ac9422010acdd | [
"MIT"
] | null | null | null | Phone/G3.py | MK-LinKnight/First-Training | b9111b06f2280c48823b4703cd9ac9422010acdd | [
"MIT"
] | null | null | null | Phone/G3.py | MK-LinKnight/First-Training | b9111b06f2280c48823b4703cd9ac9422010acdd | [
"MIT"
] | null | null | null | #!/usr/bin/python3 | 16.25 | 25 | 0.584615 | #!/usr/bin/python3
def G3():
print("I'm G3 Phone")
return | 0 | 0 | 0 | 0 | 0 | 25 | 0 | 0 | 22 |
8327667be7834055bb86f4feb1e0e49b097cc82d | 235 | py | Python | Tag2/turtle eigene tests/penupdowncolors.py | atanassov-daniel/HPI-Digitalkolleg-2021 | 730dda71bcf4e982ba83ce40f87e229ffaf8ebe5 | [
"MIT"
] | null | null | null | Tag2/turtle eigene tests/penupdowncolors.py | atanassov-daniel/HPI-Digitalkolleg-2021 | 730dda71bcf4e982ba83ce40f87e229ffaf8ebe5 | [
"MIT"
] | null | null | null | Tag2/turtle eigene tests/penupdowncolors.py | atanassov-daniel/HPI-Digitalkolleg-2021 | 730dda71bcf4e982ba83ce40f87e229ffaf8ebe5 | [
"MIT"
] | null | null | null | # Creating more complex squares
import turtle as t
my_square()
t.penup()
t.setpos(-100,100)
t.pencolor("lightblue")
t.pendown()
my_square()
t.done() | 13.823529 | 31 | 0.646809 | # Creating more complex squares
import turtle as t
def my_square():
for x in range(4):
t.forward(100)
t.right(90)
my_square()
t.penup()
t.setpos(-100,100)
t.pencolor("lightblue")
t.pendown()
my_square()
t.done() | 0 | 0 | 0 | 0 | 0 | 61 | 0 | 0 | 23 |
08623c3d965dbb0451041b2c57c91eb0a3a1ee75 | 873 | py | Python | utilities/log.py | oleg-toporkov/python-bdd-selenium | a00f6f1f725d6e081d04455cfe98a2c82f304743 | [
"MIT"
] | 16 | 2015-09-21T16:07:56.000Z | 2020-12-16T13:20:04.000Z | utilities/log.py | mvoitko/python-bdd-selenium | a00f6f1f725d6e081d04455cfe98a2c82f304743 | [
"MIT"
] | 1 | 2019-12-18T01:31:50.000Z | 2019-12-18T01:31:50.000Z | utilities/log.py | mvoitko/python-bdd-selenium | a00f6f1f725d6e081d04455cfe98a2c82f304743 | [
"MIT"
] | 7 | 2016-07-25T08:20:25.000Z | 2020-07-05T14:49:36.000Z | """
Created on September 18, 2015
@author: oleg-toporkov
"""
| 26.454545 | 121 | 0.594502 | """
Created on September 18, 2015
@author: oleg-toporkov
"""
from datetime import datetime
import logging.config
import os
from utilities.config import Config
class Logger(object):
@staticmethod
def configure_logging():
"""
Perform logging configuration from file named log.ini in root folde... | 0 | 634 | 0 | 0 | 0 | 0 | 0 | 10 | 166 |
01471155dfa4bdf9ea6d611dba015d70215b011a | 3,762 | py | Python | osbot_utils/utils/Http.py | owasp-sbot/OSBot-Utils | 7269390b8fc42a38b8318a21cb824d63eca88bed | [
"Apache-2.0"
] | null | null | null | osbot_utils/utils/Http.py | owasp-sbot/OSBot-Utils | 7269390b8fc42a38b8318a21cb824d63eca88bed | [
"Apache-2.0"
] | 2 | 2021-01-23T22:04:30.000Z | 2021-02-10T03:30:32.000Z | osbot_utils/utils/Http.py | owasp-sbot/OSBot-Utils | 7269390b8fc42a38b8318a21cb824d63eca88bed | [
"Apache-2.0"
] | 2 | 2021-01-24T21:52:12.000Z | 2021-01-25T11:15:25.000Z | from osbot_utils.utils.Python_Logger import Python_Logger
logger = Python_Logger('OSBot-utils').setup()
| 34.833333 | 119 | 0.671983 | import json
import socket
import ssl
from urllib.request import Request, urlopen
from osbot_utils.utils.Files import save_bytes_as_file, file_size, file_bytes, file_open_bytes
from osbot_utils.utils.Python_Logger import Python_Logger
logger = Python_Logger('OSBot-utils').setup()
def current_host_online(url_to_use=... | 0 | 0 | 0 | 0 | 0 | 3,040 | 0 | 68 | 548 |
cb2e405e67b33255094d2f6146a1b4f37f679b84 | 6,585 | py | Python | iwr1443_uart.py | Valdiolus/IWR1443_uart | e5cfe762fb345425123c534c6cfc15cbaf0aa6e0 | [
"MIT"
] | 1 | 2019-11-13T08:33:26.000Z | 2019-11-13T08:33:26.000Z | iwr1443_uart.py | Valdiolus/IWR1443_uart | e5cfe762fb345425123c534c6cfc15cbaf0aa6e0 | [
"MIT"
] | null | null | null | iwr1443_uart.py | Valdiolus/IWR1443_uart | e5cfe762fb345425123c534c6cfc15cbaf0aa6e0 | [
"MIT"
] | 1 | 2021-06-13T10:11:25.000Z | 2021-06-13T10:11:25.000Z | import numpy as np
np.set_printoptions(linewidth=np.inf)
INIT_FILE = "iwr1443_init_log_only_range"
#RS232Tx/RX is for config port
#AR_mss_logger is for data port
RPI = 1
Main()
quit()
#add to the end of config file if only dynamic points needed
#mmwDemo:/>clutterRemoval 1
#Done
| 30.627907 | 103 | 0.513288 | import time
import serial
from time import sleep
import numpy as np
import cv2
from sys import argv
from array import array
import struct
np.set_printoptions(linewidth=np.inf)
INIT_FILE = "iwr1443_init_log_only_range"
#RS232Tx/RX is for config port
#AR_mss_logger is for data port
RPI = 1
def find_sublist(sub, bigge... | 0 | 0 | 0 | 0 | 0 | 5,952 | 0 | -35 | 384 |
5929fbd46f9f16987fdf9f192549647aea665387 | 747 | py | Python | sifter/tests/allof.py | manfred-kaiser/sifter | 897ea92d5fa2ec8ee5af359ea04a8d28aec6a568 | [
"BSD-2-Clause"
] | 1 | 2021-03-02T10:53:15.000Z | 2021-03-02T10:53:15.000Z | sifter/tests/allof.py | manfred-kaiser/sifter | 897ea92d5fa2ec8ee5af359ea04a8d28aec6a568 | [
"BSD-2-Clause"
] | 12 | 2020-10-10T16:36:22.000Z | 2020-10-10T16:48:56.000Z | sifter/tests/allof.py | manfred-kaiser/sifter | 897ea92d5fa2ec8ee5af359ea04a8d28aec6a568 | [
"BSD-2-Clause"
] | 2 | 2020-12-16T14:07:01.000Z | 2021-03-24T08:58:33.000Z |
# section 5.2
| 29.88 | 78 | 0.674699 | from email.message import Message
from typing import (
Text
)
from sifter.grammar.test import Test
from sifter.grammar.state import EvaluationState
# section 5.2
class TestAllOf(Test):
HANDLER_ID: Text = 'ALLOF'
HAS_TESTS = False
def evaluate(self, message: Message, state: EvaluationState) -> bool:... | 0 | 0 | 0 | 556 | 0 | 0 | 0 | 64 | 111 |
a2fbd23ef3a43129a5d3ecd416ed0f2a4c561373 | 2,014 | py | Python | mdcal.py | almas2019/mdcal | 3bc14928d0e47f6c03ce3bdafdd97895946e7559 | [
"MIT"
] | null | null | null | mdcal.py | almas2019/mdcal | 3bc14928d0e47f6c03ce3bdafdd97895946e7559 | [
"MIT"
] | null | null | null | mdcal.py | almas2019/mdcal | 3bc14928d0e47f6c03ce3bdafdd97895946e7559 | [
"MIT"
] | null | null | null | """Markdown Calendar Generator"""
from datetime import datetime
import sys
if __name__ == "__main__":
argv = sys.argv
if len(argv) == 1:
today = datetime.now()
print_calendar(today.year, today.month)
elif len(argv) == 2:
year = int(argv[1])
for month in range(1, 13):
... | 30.059701 | 85 | 0.555114 | """Markdown Calendar Generator"""
import calendar
from datetime import datetime
import sys
def create_calendar(year, month, with_isoweek=False, start_from_Sun=True, lang="en"):
firstweekday = 6 if start_from_Sun else 0
cal = calendar.Calendar(firstweekday=firstweekday)
mdstr = ""
dic = get_dict(lang... | 0 | 0 | 0 | 0 | 0 | 1,377 | 0 | -6 | 91 |
b36c7c92441edec47fea9f0b3423e898e45e332e | 2,345 | py | Python | snapshot-check.py | pascal22p/mqtt2graphite | 8cdf12e722983f4fd8488129ad7f310f5d95c140 | [
"Unlicense"
] | null | null | null | snapshot-check.py | pascal22p/mqtt2graphite | 8cdf12e722983f4fd8488129ad7f310f5d95c140 | [
"Unlicense"
] | null | null | null | snapshot-check.py | pascal22p/mqtt2graphite | 8cdf12e722983f4fd8488129ad7f310f5d95c140 | [
"Unlicense"
] | null | null | null | # -*- encoding: utf-8 -*-
import logging
import sys
import traceback
appName = "snapshot-check"
try:
from systemd.journal import JournalHandler
logger = logging.getLogger(appName)
logger.addHandler(JournalHandler(SYSLOG_IDENTIFIER=appName))
except ImportError:
logger = logging.getLogger(appName)
s... | 34.485294 | 99 | 0.651173 | # -*- encoding: utf-8 -*-
import json
import ovh
import time
from datetime import datetime, timezone
import logging
import sys
import traceback
import argparse
appName = "snapshot-check"
try:
from systemd.journal import JournalHandler
logger = logging.getLogger(appName)
logger.addHandler(JournalHandler(SY... | 0 | 0 | 0 | 0 | 0 | 1,543 | 0 | -19 | 133 |
02431d9b3937b2619cd0e4d689a07c4804716c50 | 834 | py | Python | canny/pontilhismo.py | fmndantas/procdimg | e90bbf1749f5c3b1b255740720d1d03b48fe25ec | [
"MIT"
] | null | null | null | canny/pontilhismo.py | fmndantas/procdimg | e90bbf1749f5c3b1b255740720d1d03b48fe25ec | [
"MIT"
] | null | null | null | canny/pontilhismo.py | fmndantas/procdimg | e90bbf1749f5c3b1b255740720d1d03b48fe25ec | [
"MIT"
] | null | null | null | import cv2
import numpy as np
import sys
if __name__ == '__main__':
title = "pontilhismo"
cv2.namedWindow(title, cv2.WINDOW_AUTOSIZE)
image = cv2.imread(sys.argv[1], cv2.IMREAD_GRAYSCALE)
cols, rows = image.shape
cv2.imshow(title, image)
cv2.waitKey(0)
points = np.copy(image)
points[...] = 220
step, jitter... | 26.0625 | 69 | 0.67506 | import cv2
import numpy as np
import sys
if __name__ == '__main__':
title = "pontilhismo"
cv2.namedWindow(title, cv2.WINDOW_AUTOSIZE)
image = cv2.imread(sys.argv[1], cv2.IMREAD_GRAYSCALE)
cols, rows = image.shape
cv2.imshow(title, image)
cv2.waitKey(0)
points = np.copy(image)
points[...] = 220
step, jitter... | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
421562da3e7d8b706620f4268d575161bb5e8cad | 558 | py | Python | 518_coin_change.py | xinming365/LeetCode | e56097a60ddd1b5ddba7f15a726661c2aa6633e7 | [
"Apache-2.0"
] | null | null | null | 518_coin_change.py | xinming365/LeetCode | e56097a60ddd1b5ddba7f15a726661c2aa6633e7 | [
"Apache-2.0"
] | null | null | null | 518_coin_change.py | xinming365/LeetCode | e56097a60ddd1b5ddba7f15a726661c2aa6633e7 | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/env python
# -*- coding: utf-8 -*-
# @Time : 2022/3/29 5:10
# @Author : xinming
# @File : 518_coin_change.py
if __name__=='__main__':
amount = 5
coins = [5, 2, 1]
out = Solution().change(amount, coins)
print(out) | 26.571429 | 59 | 0.535842 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
# @Time : 2022/3/29 5:10 下午
# @Author : xinming
# @File : 518_coin_change.py
from typing import List
class Solution:
def change(self, amount: int, coins: List[int]) -> int:
dp=[0]*(amount+1)
dp[0]=1
for coin in coins:
for j in... | 6 | 0 | 0 | 262 | 0 | 0 | 0 | 2 | 45 |
13deb4769c7efad4ba3ddc57ffa4ea76349f98f7 | 3,815 | py | Python | aptronics/hooks.py | hpema/aptronics | 2ae7aa7611662648c8517afb7e7abca27c024993 | [
"MIT"
] | null | null | null | aptronics/hooks.py | hpema/aptronics | 2ae7aa7611662648c8517afb7e7abca27c024993 | [
"MIT"
] | null | null | null | aptronics/hooks.py | hpema/aptronics | 2ae7aa7611662648c8517afb7e7abca27c024993 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
app_name = "aptronics"
app_title = "Aptronics Applications"
app_publisher = "Aptronics"
app_description = "All applications and modules used at Aptronics"
app_icon = "octicon octicon-file-directory"
app_color = "grey"
app_email = "hemant@aptronics.co.za"
... | 25.433333 | 90 | 0.700917 | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
from . import __version__ as app_version
app_name = "aptronics"
app_title = "Aptronics Applications"
app_publisher = "Aptronics"
app_description = "All applications and modules used at Aptronics"
app_icon = "octicon octicon-file-directory"
app_color = "gr... | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 19 | 22 |
40ab35e6d87bfe2ebcf41a62d982b6c2de16489a | 386 | py | Python | python/function.py | sivasant/python_project | d148a1be177a634b25e571b1fc1b710276f3ef3b | [
"Apache-2.0"
] | null | null | null | python/function.py | sivasant/python_project | d148a1be177a634b25e571b1fc1b710276f3ef3b | [
"Apache-2.0"
] | null | null | null | python/function.py | sivasant/python_project | d148a1be177a634b25e571b1fc1b710276f3ef3b | [
"Apache-2.0"
] | null | null | null |
#Function with parameter
add(5,3)
add(a=3,b=5)
#Function with default parameters
add_new(2)
basic_window(500,350,bgc='a')
| 15.44 | 65 | 0.647668 | def example():
print('basic function')
z=3+9
print(z)
#Function with parameter
def add(a,b):
c=a+b
print('the result is',c)
add(5,3)
add(a=3,b=5)
#Function with default parameters
def add_new(a,b=6):
print(a,b)
add_new(2)
def basic_window(width,height,font='TNR',bgc='w',scrollbar=True):... | 0 | 0 | 0 | 0 | 0 | 165 | 0 | 0 | 89 |
c0228c28c88405efeeb68898f45d4578ad230d41 | 1,292 | py | Python | game/relativeranks.py | mengyangbai/leetcode | e7a6906ecc5bce665dec5d0f057b302a64d50f40 | [
"MIT"
] | null | null | null | game/relativeranks.py | mengyangbai/leetcode | e7a6906ecc5bce665dec5d0f057b302a64d50f40 | [
"MIT"
] | null | null | null | game/relativeranks.py | mengyangbai/leetcode | e7a6906ecc5bce665dec5d0f057b302a64d50f40 | [
"MIT"
] | null | null | null |
'''
String[] base = {"Gold Medal","Silver Medal","Bronze Medal"};
String[] re = new String[nums.length];
int[] copy = Arrays.copyOf(nums,nums.length);
Map<Integer,Integer> map = new HashMap<>();
Arrays.sort(copy);
for (int i = 0; i < nums.length; i++) {
map.put(copy[i],nums.leng... | 28.711111 | 65 | 0.49613 | import heapq
class Solution(object):
def findRelativeRanks(self, nums):
"""
:type nums: List[int]
:rtype: List[str]
"""
if not nums: return None
# build a max heap O(n) time in place
rankHeap = [-x for x in nums]
heapq.heapify(rankHeap)
... | 0 | 0 | 0 | 730 | 0 | 0 | 0 | -9 | 45 |
3b26d8acecb5a0af867d49f0603028da1b20ea7e | 3,111 | py | Python | mqtt-camera/mqtt-cam.py | eric-erki/ai-smarthome | ca7316ebe72b0ad26f0b59e3186426633807cac8 | [
"BSD-2-Clause"
] | 28 | 2018-08-09T13:10:34.000Z | 2022-01-07T13:39:31.000Z | mqtt-camera/mqtt-cam.py | eric-erki/ai-smarthome | ca7316ebe72b0ad26f0b59e3186426633807cac8 | [
"BSD-2-Clause"
] | 4 | 2018-08-09T13:18:12.000Z | 2021-04-06T19:04:54.000Z | mqtt-camera/mqtt-cam.py | eric-erki/ai-smarthome | ca7316ebe72b0ad26f0b59e3186426633807cac8 | [
"BSD-2-Clause"
] | 15 | 2018-12-17T09:17:28.000Z | 2021-03-02T11:25:05.000Z | #
# This integration is towards MQTT in Home-Assistant and can easily
# be configured to provide both images streamed unfiltered or diff-filtered.
#
# Author: Joakim Eriksson, joakim.eriksson@ri.se
#
import time
import sys
import cv2
video = 0
if len(sys.argv) > 1:
video = sys.argv[1]
mqCam = MQTTCamera("localhos... | 31.11 | 93 | 0.582449 | #
# This integration is towards MQTT in Home-Assistant and can easily
# be configured to provide both images streamed unfiltered or diff-filtered.
#
# Author: Joakim Eriksson, joakim.eriksson@ri.se
#
import paho.mqtt.client as mqttClient
import threading, time, yaml
import numpy as np, sys, time
import cv2
import imag... | 0 | 0 | 0 | 2,533 | 0 | 0 | 0 | 48 | 68 |
76c6be14020ac0d76e3517df6cb4bdf9cd8e2856 | 605 | py | Python | orders/migrations/0007_auto_20210210_1046.py | mnemchinov/joint-expenses | 4a1380e21fbaa7debe86819f2f7350533a19231e | [
"MIT"
] | null | null | null | orders/migrations/0007_auto_20210210_1046.py | mnemchinov/joint-expenses | 4a1380e21fbaa7debe86819f2f7350533a19231e | [
"MIT"
] | null | null | null | orders/migrations/0007_auto_20210210_1046.py | mnemchinov/joint-expenses | 4a1380e21fbaa7debe86819f2f7350533a19231e | [
"MIT"
] | null | null | null | # Generated by Django 3.1.6 on 2021-02-10 07:46
| 26.304348 | 169 | 0.566942 | # Generated by Django 3.1.6 on 2021-02-10 07:46
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('orders', '0006_auto_20210209_1132'),
]
operations = [
migrations.RemoveField(
model_name='order',
name='credit',
... | 84 | 0 | 0 | 449 | 0 | 0 | 0 | 19 | 46 |
cd7bd58aa815976880abdd2a5a505189a8e6d4fb | 686 | py | Python | leetcode-algorithms/038. Count and Say/solution.py | hey-bruce/algorithms_and_oj | f71118e8e05d4bcdcfb2dfc42187c73961b8b926 | [
"MIT"
] | 44 | 2018-01-24T13:33:43.000Z | 2019-06-01T13:12:25.000Z | leetcode-algorithms/038. Count and Say/solution.py | ptx-c/algorithms-and-oj | f71118e8e05d4bcdcfb2dfc42187c73961b8b926 | [
"MIT"
] | 1 | 2019-07-15T18:13:11.000Z | 2019-07-16T17:11:44.000Z | leetcode-algorithms/038. Count and Say/solution.py | ptx-c/algorithms-and-oj | f71118e8e05d4bcdcfb2dfc42187c73961b8b926 | [
"MIT"
] | 28 | 2018-01-25T07:50:52.000Z | 2019-05-22T08:15:49.000Z | #!/usr/bin/env python
# Created by Bruce yuan on 18-1-25.
if __name__ == '__main__':
main() | 21.4375 | 47 | 0.412536 | #!/usr/bin/env python
# Created by Bruce yuan on 18-1-25.
class Solution:
def countAndSay(self, n):
"""
:type n: int
:rtype: str
"""
s = '1'
for _ in range(n - 1):
num, tmp_str, count = s[0], '', 0
for char in s:
if num == cha... | 0 | 0 | 0 | 485 | 0 | 57 | 0 | 0 | 46 |
42a31b413229537260d88a707c1d0c646c4e4995 | 2,529 | py | Python | opentelemetry-api/tests/trace/test_proxy.py | robertsben/opentelemetry-python | c9b18c66229da61065846ba9ace25a5f5c2106b8 | [
"Apache-2.0"
] | null | null | null | opentelemetry-api/tests/trace/test_proxy.py | robertsben/opentelemetry-python | c9b18c66229da61065846ba9ace25a5f5c2106b8 | [
"Apache-2.0"
] | null | null | null | opentelemetry-api/tests/trace/test_proxy.py | robertsben/opentelemetry-python | c9b18c66229da61065846ba9ace25a5f5c2106b8 | [
"Apache-2.0"
] | null | null | null | # Copyright The OpenTelemetry Authors
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in ... | 33.276316 | 78 | 0.720047 | # Copyright The OpenTelemetry Authors
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in ... | 0 | 0 | 0 | 1,673 | 0 | 0 | 0 | 50 | 181 |
a4b3b3499ba8040e0843958c16dad576ea87ee18 | 5,474 | py | Python | SourceCode/Final_Submission/office_scripts/sense_and_actuate/office_sense_and_actuate.py | SandeshKa07/SmartCitiesProject | a678c0d8287697c28fce6e659fb981e8ec581dd9 | [
"MIT"
] | 1 | 2022-01-30T09:54:55.000Z | 2022-01-30T09:54:55.000Z | SourceCode/Final_Submission/office_scripts/sense_and_actuate/office_sense_and_actuate.py | SandeshKa07/SmartCitiesProject | a678c0d8287697c28fce6e659fb981e8ec581dd9 | [
"MIT"
] | null | null | null | SourceCode/Final_Submission/office_scripts/sense_and_actuate/office_sense_and_actuate.py | SandeshKa07/SmartCitiesProject | a678c0d8287697c28fce6e659fb981e8ec581dd9 | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
from __future__ import print_function
import os.path
import grovepi
import sys
# Import MQTT client modules
import paho.mqtt.client as mqtt
sys.path.append('/home/pi/GrovePi/Software/Python/grove_rgb_lcd')
# Import Plugwise modules for both stick and circle
from plugwise import Stick
from plu... | 30.581006 | 107 | 0.677384 | #!/usr/bin/env python3
from __future__ import print_function
import argparse
import json
import os.path
import pathlib2 as pathlib
import grovepi
import sys
import os
import time
import ast
import socket
# Import MQTT client modules
import paho.mqtt.client as mqtt
sys.path.append('/home/pi/GrovePi/Software/Python/gr... | 0 | 0 | 0 | 0 | 0 | 3,253 | 0 | -46 | 359 |
aff23da6406e0157da8d1462aab778908cace10c | 4,327 | py | Python | scripts/train_adda.py | AdityaAS/cycada | 04e062201ec23829e405639c400ce433d8a6da6a | [
"BSD-2-Clause"
] | 1 | 2020-02-22T02:23:56.000Z | 2020-02-22T02:23:56.000Z | scripts/train_adda.py | AdityaAS/cycada | 04e062201ec23829e405639c400ce433d8a6da6a | [
"BSD-2-Clause"
] | null | null | null | scripts/train_adda.py | AdityaAS/cycada | 04e062201ec23829e405639c400ce433d8a6da6a | [
"BSD-2-Clause"
] | null | null | null | import os
from os.path import join
import sys
sys.path.append('.')
from cycada.tools.train_task_net import train as train_source
from cycada.tools.test_task_net import load_and_test_net
from cycada.tools.train_adda_net import train_adda
import numpy as np
import argparse
parser = argparse.ArgumentParser()
parser.add... | 33.030534 | 116 | 0.667668 | import os
from os.path import join
import sys
sys.path.append('.')
from cycada.data.adda_datasets import AddaDataLoader
from cycada.data.cyclegta5 import CycleGTA5
from cycada.data import *
from cycada.data.usps import USPS
from cycada.data.mnist import MNIST
from cycada.data.svhn import SVHN
from cycada.data.cyclega... | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 132 | 177 |
c8d951d2022316462fb294947ef121f44731077c | 3,919 | py | Python | pyrl/agents/noise.py | jponf/pyrl | 1353d59deee2731c509991a6cca90a7b991779bc | [
"Apache-2.0"
] | 2 | 2021-01-25T15:04:45.000Z | 2021-11-05T06:15:40.000Z | pyrl/agents/noise.py | jponf/pyrl | 1353d59deee2731c509991a6cca90a7b991779bc | [
"Apache-2.0"
] | null | null | null | pyrl/agents/noise.py | jponf/pyrl | 1353d59deee2731c509991a6cca90a7b991779bc | [
"Apache-2.0"
] | null | null | null | # -*- coding: utf-8 -*-
###############################################################################
| 29.246269 | 79 | 0.589436 | # -*- coding: utf-8 -*-
import abc
import six
import numpy as np
###############################################################################
@six.add_metaclass(abc.ABCMeta)
class ActionNoise(object):
@abc.abstractmethod
def reset(self):
"""Prepares the action noise strategy to run a new episod... | 0 | 293 | 0 | 3,358 | 0 | 0 | 0 | -25 | 183 |
1143cefe4b89bbab51ac09ecb8e60bf1e1d5c6ce | 2,508 | py | Python | api/v1/views/places_reviews.py | bdbaraban/HolbertonBnB | 70812bcef485e4d57ca0f7a1d0ddc59583f4122a | [
"MIT"
] | 1 | 2022-02-08T03:51:31.000Z | 2022-02-08T03:51:31.000Z | api/v1/views/places_reviews.py | bdbaraban/HolbertonBnB | 70812bcef485e4d57ca0f7a1d0ddc59583f4122a | [
"MIT"
] | null | null | null | api/v1/views/places_reviews.py | bdbaraban/HolbertonBnB | 70812bcef485e4d57ca0f7a1d0ddc59583f4122a | [
"MIT"
] | 8 | 2020-12-10T14:41:39.000Z | 2022-03-10T21:35:59.000Z | #!/usr/bin/env python3
"""HolbertonBnB Review view."""
| 32.571429 | 76 | 0.6563 | #!/usr/bin/env python3
"""HolbertonBnB Review view."""
from api.v1.views import app_views
from flask import abort, jsonify, request
from flasgger import swag_from
from models import storage
from models.review import Review
@app_views.route("/places/<place_id>/reviews", methods=["GET", "POST"])
@swag_from("../apidocs/... | 0 | 2,237 | 0 | 0 | 0 | 0 | 0 | 58 | 156 |
a79f3c7cceb3fd36faa6353544d001483833e4ef | 1,147 | py | Python | addons/website_sale_digital/models/account_invoice.py | SHIVJITH/Odoo_Machine_Test | 310497a9872db7844b521e6dab5f7a9f61d365a4 | [
"Apache-2.0"
] | null | null | null | addons/website_sale_digital/models/account_invoice.py | SHIVJITH/Odoo_Machine_Test | 310497a9872db7844b521e6dab5f7a9f61d365a4 | [
"Apache-2.0"
] | null | null | null | addons/website_sale_digital/models/account_invoice.py | SHIVJITH/Odoo_Machine_Test | 310497a9872db7844b521e6dab5f7a9f61d365a4 | [
"Apache-2.0"
] | null | null | null | # -*- coding: utf-8 -*-
# Part of Odoo. See LICENSE file for full copyright and licensing details.
| 34.757576 | 164 | 0.570183 | # -*- coding: utf-8 -*-
# Part of Odoo. See LICENSE file for full copyright and licensing details.
from odoo import models
class AccountInvoiceLine(models.Model):
_inherit = ['account.move.line']
def get_digital_purchases(self):
partner = self.env.user.partner_id
# Get paid invoices
... | 0 | 0 | 0 | 999 | 0 | 0 | 0 | 2 | 46 |
21e4f50f78239998b352dae996693dbe3718c62c | 2,681 | py | Python | yang19/train.py | ZhongxuanWu/ngym_usage | b29123888f423c32bdf8627951e173dbebdda216 | [
"MIT"
] | 5 | 2021-03-01T23:10:32.000Z | 2021-10-04T08:32:03.000Z | yang19/train.py | ZhongxuanWu/ngym_usage | b29123888f423c32bdf8627951e173dbebdda216 | [
"MIT"
] | 1 | 2021-11-29T15:49:19.000Z | 2021-11-29T15:49:19.000Z | yang19/train.py | ZhongxuanWu/ngym_usage | b29123888f423c32bdf8627951e173dbebdda216 | [
"MIT"
] | 6 | 2020-11-19T02:10:48.000Z | 2022-02-23T16:33:45.000Z | """Train networks for reproducing multi-cognitive-tasks from
Task representations in neural networks trained to perform many cognitive tasks
https://www.nature.com/articles/s41593-018-0310-2
"""
import os
import time
import torch
import torch.nn as nn
import gym
import neurogym as ngym
from neurogym.wrappers import ... | 31.916667 | 79 | 0.689295 | """Train networks for reproducing multi-cognitive-tasks from
Task representations in neural networks trained to perform many cognitive tasks
https://www.nature.com/articles/s41593-018-0310-2
"""
import os
import time
import numpy as np
import torch
import torch.nn as nn
import gym
import neurogym as ngym
from neurog... | 0 | 0 | 0 | 0 | 0 | 0 | 0 | -3 | 22 |
f512cd5466cba78efb4b269f5f33f325e7e1a3e3 | 3,317 | py | Python | main.py | mazarafa/Timsort-Search | b7c41e87af2d110645277583d6be7db5508dfb3e | [
"MIT"
] | 1 | 2021-05-13T06:00:00.000Z | 2021-05-13T06:00:00.000Z | main.py | mazarafa/Timsort-Search | b7c41e87af2d110645277583d6be7db5508dfb3e | [
"MIT"
] | null | null | null | main.py | mazarafa/Timsort-Search | b7c41e87af2d110645277583d6be7db5508dfb3e | [
"MIT"
] | null | null | null | # Python3 program to perform basic timSort
MIN_MERGE = 32 #O tamanho da execuo pode variar de 32 a 64, dependendo do tamanho da matriz
def calcMinRun(n):
"""Retorna o comprimento mnimo de um
correr de 23-64 para que
o len (array) / minrun menor que ou
igual a uma potncia de 2.
e.g. 1=>1, ..., 6... | 26.325397 | 93 | 0.529394 | # Python3 program to perform basic timSort
MIN_MERGE = 32 #O tamanho da execução pode variar de 32 a 64, dependendo do tamanho da matriz
def calcMinRun(n):
"""Retorna o comprimento mínimo de um
correr de 23-64 para que
o len (array) / minrun é menor que ou
igual a uma potência de 2.
e.g. 1=>1, .... | 54 | 0 | 0 | 0 | 0 | 2,135 | 0 | 0 | 66 |
d61020e2d68867630dc01803e8d2822621231870 | 5,013 | py | Python | odin/tests/test_models.py | trungnt13/odin_old | e5f44f9b6c483d6498767899315ae56e06fe36c4 | [
"MIT"
] | 2 | 2016-02-24T20:41:08.000Z | 2016-02-29T02:25:16.000Z | odin/tests/test_models.py | trungnt13/odin | e5f44f9b6c483d6498767899315ae56e06fe36c4 | [
"MIT"
] | null | null | null | odin/tests/test_models.py | trungnt13/odin | e5f44f9b6c483d6498767899315ae56e06fe36c4 | [
"MIT"
] | null | null | null | # ======================================================================
# Author: TrungNT
# ======================================================================
from __future__ import print_function, division
from .. import tensor
from .. import logger
# =============================================================... | 31.136646 | 77 | 0.54598 | # ======================================================================
# Author: TrungNT
# ======================================================================
from __future__ import print_function, division
from ..utils import function, frame
from ..model import model
from .. import tensor
from .. import logger
i... | 0 | 0 | 0 | 3,632 | 0 | 507 | 0 | 8 | 203 |
7f57bfafecd08b073b5cfbddc04af2d59f94f85c | 213 | py | Python | influxspeedtest/config/__init__.py | jamesjarvis/network-monitor | f8bba470d4ae537ef9f2634976fc42e8b1f39bc8 | [
"MIT"
] | 2 | 2020-07-02T10:57:52.000Z | 2022-03-28T09:45:21.000Z | influxspeedtest/config/__init__.py | jamesjarvis/network-monitor | f8bba470d4ae537ef9f2634976fc42e8b1f39bc8 | [
"MIT"
] | null | null | null | influxspeedtest/config/__init__.py | jamesjarvis/network-monitor | f8bba470d4ae537ef9f2634976fc42e8b1f39bc8 | [
"MIT"
] | null | null | null | import os
from influxspeedtest.config.configmanager import ConfigManager
if os.getenv('influxspeedtest'):
config = os.getenv('influxspeedtest')
else:
config = 'config.ini'
config = ConfigManager(config) | 21.3 | 62 | 0.765258 | import os
from influxspeedtest.config.configmanager import ConfigManager
if os.getenv('influxspeedtest'):
config = os.getenv('influxspeedtest')
else:
config = 'config.ini'
config = ConfigManager(config) | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
8a0a642b088f3458e85901672f981f7e025ac762 | 846 | py | Python | experiments/my_ping_pong.py | jpthor/digital-cash | e81887ef490b8cdf65d9f75d253717aa8ea6dad3 | [
"MIT"
] | null | null | null | experiments/my_ping_pong.py | jpthor/digital-cash | e81887ef490b8cdf65d9f75d253717aa8ea6dad3 | [
"MIT"
] | null | null | null | experiments/my_ping_pong.py | jpthor/digital-cash | e81887ef490b8cdf65d9f75d253717aa8ea6dad3 | [
"MIT"
] | null | null | null | import sys
host = "0.0.0.0"
port = 10000
address = (host, port)
if __name__ == "__main__":
command = sys.argv[1]
if command == "serve":
serve()
elif command == "ping":
ping()
else: print("invalid")
| 22.263158 | 60 | 0.634752 | import socketserver, socket, sys
host = "0.0.0.0"
port = 10000
address = (host, port)
class myTCPServer(socketserver.TCPServer):
allow_address_reuse = True
class TCPHandler(socketserver.BaseRequestHandler):
def handle(self):
message = self.request.recv(10).strip()
print(f"Got a message: {mes... | 0 | 0 | 0 | 271 | 0 | 228 | 0 | 22 | 92 |
fceb571f80ff8f53de68a3fc3ec3542a04454eed | 10,491 | py | Python | ludolph_ansible/playbook.py | erigones/ludolph-ansible | 014bbbdb6504f4cdcfaf08ea13145da4c864a354 | [
"MIT"
] | null | null | null | ludolph_ansible/playbook.py | erigones/ludolph-ansible | 014bbbdb6504f4cdcfaf08ea13145da4c864a354 | [
"MIT"
] | null | null | null | ludolph_ansible/playbook.py | erigones/ludolph-ansible | 014bbbdb6504f4cdcfaf08ea13145da4c864a354 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
"""
This file is part of Ludolph: Ansible plugin
Copyright (C) 2015 Erigones, s. r. o.
See the LICENSE file for copying permission.
"""
from __future__ import absolute_import
from __future__ import print_function
| 30.320809 | 110 | 0.552283 | # -*- coding: utf-8 -*-
"""
This file is part of Ludolph: Ansible plugin
Copyright (C) 2015 Erigones, s. r. o.
See the LICENSE file for copying permission.
"""
from __future__ import absolute_import
from __future__ import print_function
from os import path
from ludolph.command import CommandError, PermissionDenied, c... | 0 | 4,157 | 0 | 4,538 | 0 | 942 | 0 | 225 | 384 |
2d2d089fa97f09007e71d0f6995009d74cb0fb0f | 36,183 | py | Python | Data/MenuHUD.py | Kymed/The-Endless-Crypts | 145ef2c9a80047bc202713b5be1a1035e0382091 | [
"MIT"
] | 1 | 2017-10-19T18:37:35.000Z | 2017-10-19T18:37:35.000Z | Data/MenuHUD.py | Kymed/The-Endless-Crypts | 145ef2c9a80047bc202713b5be1a1035e0382091 | [
"MIT"
] | null | null | null | Data/MenuHUD.py | Kymed/The-Endless-Crypts | 145ef2c9a80047bc202713b5be1a1035e0382091 | [
"MIT"
] | null | null | null | from __future__ import division
| 60.004975 | 327 | 0.662438 | from __future__ import division
from MenuHUDPanel import MenuHUDPanel
import pygame
class MenuHUD(object):
# Call constructor
def __init__(self, screenWidth, screenHeight, gradient, icon_traits, icon_bullet, icon_star, icon_bullets):
# INITIALIZE SCALING PROPERTIES #
self.screenWidth = screenW... | 0 | 0 | 0 | 36,076 | 0 | 0 | 0 | 8 | 67 |
fe888313531e7ed51f2c432ea96274cb3943fd04 | 299,500 | py | Python | openmc/mgxs/mgxs.py | RyotaroOKabe/openmc | 9926294324cb80dd7ff0e4f1a9b361addfcfa8fc | [
"MIT"
] | null | null | null | openmc/mgxs/mgxs.py | RyotaroOKabe/openmc | 9926294324cb80dd7ff0e4f1a9b361addfcfa8fc | [
"MIT"
] | null | null | null | openmc/mgxs/mgxs.py | RyotaroOKabe/openmc | 9926294324cb80dd7ff0e4f1a9b361addfcfa8fc | [
"MIT"
] | null | null | null | import numpy as np
import openmc
from openmc.data import REACTION_MT, REACTION_NAME, FISSION_MTS
# Supported cross section types
MGXS_TYPES = (
'total',
'transport',
'nu-transport',
'absorption',
'capture',
'fission',
'nu-fission',
'kappa-fission',
'scatter',
'nu-scatter',
... | 42.896018 | 88 | 0.625122 | from collections import OrderedDict
import copy
from numbers import Integral
import os
import warnings
import h5py
import numpy as np
import openmc
from openmc.data import REACTION_MT, REACTION_NAME, FISSION_MTS
import openmc.checkvalue as cv
from ..tallies import ESTIMATOR_TYPES
from . import EnergyGroups
# Suppor... | 0 | 41,461 | 0 | 253,117 | 0 | 0 | 0 | 13 | 659 |
05c32268d63df8325aaab0a0da820cf974a292b6 | 4,346 | py | Python | standalone-local.py | strachowski/obj-detection-api | 3febdfe3b4ebb35e930189599eb3613c807a58e4 | [
"Apache-2.0"
] | null | null | null | standalone-local.py | strachowski/obj-detection-api | 3febdfe3b4ebb35e930189599eb3613c807a58e4 | [
"Apache-2.0"
] | 12 | 2020-01-28T22:14:33.000Z | 2022-02-09T23:30:59.000Z | standalone-local.py | strachowski/obj-detection-api | 3febdfe3b4ebb35e930189599eb3613c807a58e4 | [
"Apache-2.0"
] | null | null | null | import numpy as np
import os
import six.moves.urllib as urllib
import tarfile
import tensorflow as tf
import json
from PIL import Image
from watson_developer_cloud import VisualRecognitionV3
import matplotlib.pyplot as plt
import matplotlib.patches as patches
# Replace with your api key
visual_recognition = VisualRec... | 37.145299 | 134 | 0.669581 | import numpy as np
import os
import six.moves.urllib as urllib
import sys
import tarfile
import tensorflow as tf
import zipfile
import json
from io import StringIO
from PIL import Image
from watson_developer_cloud import VisualRecognitionV3
import matplotlib.pyplot as plt
import matplotlib.patches as patches
# Repla... | 0 | 0 | 0 | 0 | 0 | 150 | 0 | -16 | 90 |
8b7471290feb1c0ae048baaac3b5324e3cfc9983 | 15,377 | py | Python | Packs/ThreatExchange/Integrations/ThreatExchangeV2/ThreatExchangeV2_test.py | diCagri/content | c532c50b213e6dddb8ae6a378d6d09198e08fc9f | [
"MIT"
] | 799 | 2016-08-02T06:43:14.000Z | 2022-03-31T11:10:11.000Z | Packs/ThreatExchange/Integrations/ThreatExchangeV2/ThreatExchangeV2_test.py | diCagri/content | c532c50b213e6dddb8ae6a378d6d09198e08fc9f | [
"MIT"
] | 9,317 | 2016-08-07T19:00:51.000Z | 2022-03-31T21:56:04.000Z | Packs/ThreatExchange/Integrations/ThreatExchangeV2/ThreatExchangeV2_test.py | diCagri/content | c532c50b213e6dddb8ae6a378d6d09198e08fc9f | [
"MIT"
] | 1,297 | 2016-08-04T13:59:00.000Z | 2022-03-31T23:43:06.000Z | """
Tests module for ThreatExchangeV2 integration logic
"""
MALICIOUS_THRESHOLD = 50
SUSPICIOUS_THRESHOLD = 1
NON_MALICIOUS_THRESHOLD = 50
STATUS = 'status'
| 55.31295 | 120 | 0.588411 | """
Tests module for ThreatExchangeV2 integration logic
"""
from typing import Tuple, List, Dict, Optional
from ThreatExchangeV2 import ThreatExchangeV2Status, calculate_dbot_score, calculate_engines,\
get_reputation_data_statuses, convert_string_to_epoch_time, flatten_outputs_paging
import pytest
from CommonServe... | 0 | 7,161 | 0 | 7,752 | 0 | 0 | 0 | 193 | 112 |
41e8a9b00d5324c3001ebf7de521af9cd55db86a | 1,656 | py | Python | plugins/PY2.7/pinpoint/common/Common.py | EyelynSu/pinpoint-c-agent | 35cab594fe69c8de3ddb13625590d76a75bf8381 | [
"Apache-2.0"
] | 44 | 2020-10-27T07:15:50.000Z | 2022-03-26T13:37:23.000Z | plugins/PY2.7/pinpoint/common/Common.py | EyelynSu/pinpoint-c-agent | 35cab594fe69c8de3ddb13625590d76a75bf8381 | [
"Apache-2.0"
] | 120 | 2020-10-19T17:33:24.000Z | 2022-03-23T06:31:14.000Z | plugins/PY2.7/pinpoint/common/Common.py | EyelynSu/pinpoint-c-agent | 35cab594fe69c8de3ddb13625590d76a75bf8381 | [
"Apache-2.0"
] | 23 | 2020-10-22T06:47:40.000Z | 2022-03-17T08:15:09.000Z | # ******************************************************************************
# Copyright 2020. NAVER Corp.
#
# 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.ap... | 31.846154 | 81 | 0.574275 | # ******************************************************************************
# Copyright 2020. NAVER Corp.
#
# 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.a... | 3 | 0 | 0 | 771 | 0 | 0 | 0 | 14 | 112 |
2a800d42a8d231091a7abc2cbf529c4c9ecb3767 | 6,868 | py | Python | drop-boxes/register-omero-metadata/image_registration_process.py | qbicsoftware/etl-scripts | e1cea11b5f55fb218e7d4c8d49bdd3c5fe6c62c6 | [
"MIT"
] | 2 | 2018-04-20T15:48:02.000Z | 2021-11-30T17:39:28.000Z | drop-boxes/register-omero-metadata/image_registration_process.py | qbicsoftware/etl-scripts | e1cea11b5f55fb218e7d4c8d49bdd3c5fe6c62c6 | [
"MIT"
] | 41 | 2017-07-19T11:17:26.000Z | 2021-09-28T12:10:49.000Z | drop-boxes/register-omero-metadata/image_registration_process.py | qbicsoftware/etl-scripts | e1cea11b5f55fb218e7d4c8d49bdd3c5fe6c62c6 | [
"MIT"
] | 2 | 2017-04-27T10:32:33.000Z | 2018-02-20T09:26:12.000Z | import re
barcode_pattern = re.compile('Q[a-zA-Z0-9]{4}[0-9]{3}[A-Z][a-zA-Z0-9]')
conda_home_path = "/home/qeana10/miniconda2/"
omero_lib_path = "/home/qeana10/openbis/servers/core-plugins/QBIC/1/dss/drop-boxes/register-omero-metadata/OMERO.py-5.4.10-ice36-b105"
etl_home_path = "/home/qeana10/openbis/servers/core-plug... | 35.958115 | 142 | 0.651718 | import re
import checksum
import ch.systemsx.cisd.etlserver.registrator.api.v2
from ch.systemsx.cisd.openbis.generic.shared.api.v1.dto import SearchCriteria
from ch.systemsx.cisd.openbis.generic.shared.api.v1.dto import SearchSubCriteria
import csv
from subprocess import Popen, PIPE
barcode_pattern = re.compile('Q[a-z... | 0 | 0 | 0 | 6,151 | 0 | 0 | 0 | 142 | 201 |
5d947c9124d28af1ffe61ffb4466ae3632978ff2 | 563 | py | Python | examples/neighborhood-2.py | ysig/streamsvg | ee906fadacf0b016e519548cb2fea21c27748f51 | [
"MIT"
] | null | null | null | examples/neighborhood-2.py | ysig/streamsvg | ee906fadacf0b016e519548cb2fea21c27748f51 | [
"MIT"
] | null | null | null | examples/neighborhood-2.py | ysig/streamsvg | ee906fadacf0b016e519548cb2fea21c27748f51 | [
"MIT"
] | null | null | null | from streamsvg import Drawing
s = Drawing()
s.addNode("a")
s.addNode("b")
s.addNode("c")
s.addNode("d")
s.addLink("a", "b", 0, 4,color="#BBBBBB",width=2)
s.addLink("a", "b", 6, 9,color="#BBBBBB",width=2)
s.addLink("a", "c", 2, 5, height=0.4,width=3)
s.addLink("b", "c", 1, 8,width=3)
s.addLink("b", "d", 7, 10, height... | 24.478261 | 62 | 0.612789 | from streamsvg import Drawing
s = Drawing()
s.addNode("a")
s.addNode("b")
s.addNode("c")
s.addNode("d")
s.addLink("a", "b", 0, 4,color="#BBBBBB",width=2)
s.addLink("a", "b", 6, 9,color="#BBBBBB",width=2)
s.addLink("a", "c", 2, 5, height=0.4,width=3)
s.addLink("b", "c", 1, 8,width=3)
s.addLink("b", "d", 7, 10, height... | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
f68f50b72b9ca68d0cd985d583cbe5521fe99036 | 937 | py | Python | src/accounts/migrations/0006_auto_20220223_2319.py | IkramKhan-DevOps/pws-ewallet | 7c16a97d521d5eb91cc3bbda64f317c1c2f92658 | [
"MIT"
] | null | null | null | src/accounts/migrations/0006_auto_20220223_2319.py | IkramKhan-DevOps/pws-ewallet | 7c16a97d521d5eb91cc3bbda64f317c1c2f92658 | [
"MIT"
] | 3 | 2022-02-24T20:37:00.000Z | 2022-03-26T18:35:25.000Z | src/accounts/migrations/0006_auto_20220223_2319.py | IkramKhan-DevOps/pws-ewallet | 7c16a97d521d5eb91cc3bbda64f317c1c2f92658 | [
"MIT"
] | null | null | null | # Generated by Django 3.2.9 on 2022-02-23 18:19
| 27.558824 | 58 | 0.598719 | # Generated by Django 3.2.9 on 2022-02-23 18:19
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('accounts', '0005_auto_20220223_2059'),
]
operations = [
migrations.RenameField(
model_name='wallet',
old_name='total... | 0 | 0 | 0 | 823 | 0 | 0 | 0 | 19 | 46 |
13aae7fdc034132b91cbd00fb2a7465936fb09e8 | 211,999 | py | Python | scipy/ndimage/tests/test_ndimage.py | divenex/scipy | fe0e253165a73bdb922c4da6a107be0474ee60ac | [
"BSD-3-Clause"
] | 1 | 2021-06-30T14:42:40.000Z | 2021-06-30T14:42:40.000Z | scipy/ndimage/tests/test_ndimage.py | divenex/scipy | fe0e253165a73bdb922c4da6a107be0474ee60ac | [
"BSD-3-Clause"
] | 5 | 2020-09-01T01:19:07.000Z | 2021-10-11T01:06:05.000Z | scipy/ndimage/tests/test_ndimage.py | divenex/scipy | fe0e253165a73bdb922c4da6a107be0474ee60ac | [
"BSD-3-Clause"
] | 1 | 2018-04-21T11:45:55.000Z | 2018-04-21T11:45:55.000Z | # Copyright (C) 2003-2005 Peter J. Verveer
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions
# are met:
#
# 1. Redistributions of source code must retain the above copyright
# notice, this list of conditions and the following d... | 44.09297 | 94 | 0.408964 | # Copyright (C) 2003-2005 Peter J. Verveer
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions
# are met:
#
# 1. Redistributions of source code must retain the above copyright
# notice, this list of conditions and the following d... | 0 | 570 | 0 | 209,503 | 0 | 36 | 0 | 152 | 248 |
04071a4603954c561919940008f09862e33c5e7f | 12,073 | py | Python | venv/Lib/site-packages/psychopy/iohub/net.py | mintzer/pupillometry-rf-back | cfa86fa984a49dce0123798f8de5b838c02e10d5 | [
"CC-BY-4.0"
] | null | null | null | venv/Lib/site-packages/psychopy/iohub/net.py | mintzer/pupillometry-rf-back | cfa86fa984a49dce0123798f8de5b838c02e10d5 | [
"CC-BY-4.0"
] | null | null | null | venv/Lib/site-packages/psychopy/iohub/net.py | mintzer/pupillometry-rf-back | cfa86fa984a49dce0123798f8de5b838c02e10d5 | [
"CC-BY-4.0"
] | null | null | null | # -*- coding: utf-8 -*-
# Part of the PsychoPy library
# Copyright (C) 2012-2020 iSolver Software Solutions (C) 2021 Open Science Tools Ltd.
# Distributed under the terms of the GNU General Public License (GPL).
from __future__ import division, absolute_import
try:
import msgpack_numpy
msgpack_numpy.patch()
exc... | 35.404692 | 85 | 0.617079 | # -*- coding: utf-8 -*-
# Part of the PsychoPy library
# Copyright (C) 2012-2020 iSolver Software Solutions (C) 2021 Open Science Tools Ltd.
# Distributed under the terms of the GNU General Public License (GPL).
from __future__ import division, absolute_import
import struct
from weakref import proxy
from gevent impor... | 0 | 0 | 0 | 11,079 | 0 | 0 | 0 | 59 | 250 |
7c434607bcfe636070631d41fe52d806f6318291 | 1,710 | py | Python | setup.py | Blendify/sphinx-bootstrap-basic | a670d046d837c2be0d3601391dcec4e28f390712 | [
"Apache-2.0"
] | 4 | 2019-08-22T01:47:06.000Z | 2021-09-11T19:03:51.000Z | setup.py | Blendify/sphinx-bootstrap-basic | a670d046d837c2be0d3601391dcec4e28f390712 | [
"Apache-2.0"
] | 1 | 2018-03-01T16:05:00.000Z | 2018-03-01T16:05:00.000Z | setup.py | Blendify/sphinx-bootstrap-basic | a670d046d837c2be0d3601391dcec4e28f390712 | [
"Apache-2.0"
] | 1 | 2019-08-22T01:47:11.000Z | 2019-08-22T01:47:11.000Z | # -*- coding: utf-8 -*-
from io import open
from setuptools import setup
from sphinx-bootstrap-basic import __version__
setup(
name='sphinx-bootstrap-basic',
version=__version__,
url='https://github.com/Blendify/sphinx-bootstrap-basic/',
license='Apache License 2.0',
author='Aaron Carlisle',
au... | 34.897959 | 100 | 0.611696 | # -*- coding: utf-8 -*-
from io import open
from setuptools import setup
from sphinx-bootstrap-basic import __version__
setup(
name='sphinx-bootstrap-basic',
version=__version__,
url='https://github.com/Blendify/sphinx-bootstrap-basic/',
license='Apache License 2.0',
author='Aaron Carlisle',
au... | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
ba39e69bb770df0adb06ab364492857ccf1fd47b | 603 | py | Python | DEF FUNCTION.py | dblueblood/EXTRACTION | 310c5f6112eb793038730a67281c4143f1e319de | [
"MIT"
] | null | null | null | DEF FUNCTION.py | dblueblood/EXTRACTION | 310c5f6112eb793038730a67281c4143f1e319de | [
"MIT"
] | null | null | null | DEF FUNCTION.py | dblueblood/EXTRACTION | 310c5f6112eb793038730a67281c4143f1e319de | [
"MIT"
] | null | null | null | """
USING "DEF" FUNCTION TO APPLY PARAMETERS
TO CREATE..
A CALCULATOR
"""
print(SMCALC())
| 17.735294 | 62 | 0.487562 | """
USING "DEF" FUNCTION TO APPLY PARAMETERS
TO CREATE..
A CALCULATOR
"""
def SMCALC():
loc1 = float(input("Enter value one:"))
OP = input("Enter Operation: ")
loc2 = float(input("Enter value two:"))
"""
Using "if" loops, you have to make sure the loop ends,
with an "else" l... | 0 | 0 | 0 | 0 | 0 | 468 | 0 | 0 | 25 |
c79a50a4a70128bb65418eb2c7f53e7929cbcb3b | 59 | py | Python | src/features/__init__.py | TuomoKareoja/us-song-lyrics-sentiment | 3d73e1876800687e126442d44edfe4dcbd2bf983 | [
"MIT"
] | 1 | 2021-03-03T22:35:18.000Z | 2021-03-03T22:35:18.000Z | src/features/__init__.py | TuomoKareoja/us-song-lyrics-sentiment | 3d73e1876800687e126442d44edfe4dcbd2bf983 | [
"MIT"
] | null | null | null | src/features/__init__.py | TuomoKareoja/us-song-lyrics-sentiment | 3d73e1876800687e126442d44edfe4dcbd2bf983 | [
"MIT"
] | null | null | null | """Functions for creating features to the cleaned data
"""
| 19.666667 | 54 | 0.745763 | """Functions for creating features to the cleaned data
"""
| 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
dd909ce766ef84de6a962d7b34f4dbb38d80a8fd | 3,297 | py | Python | examples/optimal_burst/bursts_ttk_simulation.py | spascou/ps2-analysis | 00f99b009d15d4c401a3338ddd0408ac7eedcc0b | [
"MIT"
] | 2 | 2020-06-25T17:19:05.000Z | 2020-10-13T06:08:39.000Z | examples/optimal_burst/bursts_ttk_simulation.py | spascou/ps2-analysis | 00f99b009d15d4c401a3338ddd0408ac7eedcc0b | [
"MIT"
] | null | null | null | examples/optimal_burst/bursts_ttk_simulation.py | spascou/ps2-analysis | 00f99b009d15d4c401a3338ddd0408ac7eedcc0b | [
"MIT"
] | null | null | null | import logging
import os
from typing import List, Optional
import altair
from ps2_census.enums import PlayerState
from ps2_analysis.enums import DamageLocation
from ps2_analysis.fire_groups.cone_of_fire import ConeOfFire
from ps2_analysis.fire_groups.data_files import (update_data_files as update_fire_groups_data_fil... | 29.4375 | 88 | 0.677282 | import logging
import os
from typing import List, Optional
import altair
from ps2_census.enums import PlayerState
from ps2_analysis.enums import DamageLocation
from ps2_analysis.fire_groups.cone_of_fire import ConeOfFire
from ps2_analysis.fire_groups.data_files import (
update_data_files as update_fire_groups_dat... | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 14 | 0 |
0147bad3a46ec372749435555bedc05bdbf5b4cf | 9,067 | py | Python | src/old_draw_code.py | petercollingridge/markov-chain | 5f46b156a3ce22552ed14aefb00e4b040ec56be5 | [
"MIT"
] | null | null | null | src/old_draw_code.py | petercollingridge/markov-chain | 5f46b156a3ce22552ed14aefb00e4b040ec56be5 | [
"MIT"
] | null | null | null | src/old_draw_code.py | petercollingridge/markov-chain | 5f46b156a3ce22552ed14aefb00e4b040ec56be5 | [
"MIT"
] | null | null | null | import drawSVG
def draw_chains_for_4x2():
""" Markov chain for four sets of two card types, e.g. AAAABBBB """
r = 25
dx = 100
width = 2 * r + 20 + dx * 4
height = 200
y = 100
svg = drawSVG.SVG({ 'width': width, 'height': height })
chain = Chain()
chain.add_node(r + 10, ... | 30.023179 | 106 | 0.513731 | import drawSVG
import math
class Chain:
nodes = []
edges = []
def add_node(self, x, y, label=None):
n = len(self.nodes)
self.nodes.append(Node(n, x, y, label))
def add_edge(self, node_index1, node_index2, label=None):
node1 = self.nodes[node_index1]
node2 = self.nodes... | 0 | 0 | 0 | 1,019 | 0 | 6,864 | 0 | -10 | 252 |
db975793bb939e9831e111aa43e820352b0e4902 | 24,541 | py | Python | lambda_k_plotting.py | jensv/fluxtubestability | 743ec7c43de5371e0ac9d98cec7bcb235703b13d | [
"MIT"
] | null | null | null | lambda_k_plotting.py | jensv/fluxtubestability | 743ec7c43de5371e0ac9d98cec7bcb235703b13d | [
"MIT"
] | null | null | null | lambda_k_plotting.py | jensv/fluxtubestability | 743ec7c43de5371e0ac9d98cec7bcb235703b13d | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
"""
Created on Mon Feb 16 00:30:53 2015
@author: jensv
Module for examining stability spaces.
"""
from __future__ import print_function, unicode_literals, division
from __future__ import absolute_import
from future.builtins import (range, str)
import numpy as np
import analytic_condition as ... | 37.813559 | 94 | 0.542724 | # -*- coding: utf-8 -*-
"""
Created on Mon Feb 16 00:30:53 2015
@author: jensv
Module for examining stability spaces.
"""
from __future__ import print_function, unicode_literals, division
from __future__ import absolute_import
from future import standard_library, utils
from future.builtins import (ascii, bytes, chr,... | 0 | 0 | 0 | 0 | 0 | 206 | 0 | 187 | 70 |
bfa9e24d827bf601253c6f189a80f1274fe1feac | 695 | py | Python | test function.py | xiaoyuanyuanyuan/xlwings- | e384ae147c324b7b7dd4ef5adeaf7056048b3f9a | [
"MIT"
] | null | null | null | test function.py | xiaoyuanyuanyuan/xlwings- | e384ae147c324b7b7dd4ef5adeaf7056048b3f9a | [
"MIT"
] | null | null | null | test function.py | xiaoyuanyuanyuan/xlwings- | e384ae147c324b7b7dd4ef5adeaf7056048b3f9a | [
"MIT"
] | 1 | 2020-06-23T08:59:27.000Z | 2020-06-23T08:59:27.000Z | # -*- coding: utf-8 -*-
"""
Created on Thu Jun 11 09:33:07 2020
@author: HI
"""
| 23.166667 | 121 | 0.598561 | # -*- coding: utf-8 -*-
"""
Created on Thu Jun 11 09:33:07 2020
@author: HI
"""
import xlwings as xw
import math
from scipy.stats import norm
@xw.func
def GBlackScholesNGreeek(S,X,T,r,q,sigam,corp):
data=[S,X,T,r,q,sigam,corp]
d1=(math.log(data[0]/data[1])+(data[4]+data[5]**2/2)*data[2]/365)/((data[5])*math... | 0 | 519 | 0 | 0 | 0 | 0 | 0 | -4 | 90 |
f9cc824f3d2dc1df1118e7c4d57f460aba58f5c0 | 13,045 | py | Python | webhdfs/webhdfs.py | yamanCA/geoprocessing | 21675ae1d1c57aa899752bda5618396e487aceb9 | [
"Apache-2.0"
] | 38 | 2015-01-07T07:23:41.000Z | 2022-01-26T14:05:27.000Z | webhdfs/webhdfs.py | Pandinosaurus/geoprocessing-tools-for-hadoop | 90ece6cbbe60a82c948872b06ed3d2487e2e6894 | [
"Apache-2.0"
] | 18 | 2015-01-08T06:30:01.000Z | 2018-07-11T08:55:52.000Z | webhdfs/webhdfs.py | Pandinosaurus/geoprocessing-tools-for-hadoop | 90ece6cbbe60a82c948872b06ed3d2487e2e6894 | [
"Apache-2.0"
] | 34 | 2015-01-05T04:43:49.000Z | 2019-04-16T01:27:19.000Z | import sys, os
import stat
import httplib
import urlparse
import json
import logging
__all__ = [
"WebHDFS",
"WebHDFSError"
]
logging.basicConfig(level=logging.DEBUG, datefmt='%m/%d/%Y %I:%M:%S %p',
format='%(asctime)s - %(name)s - %(levelname)s - %(message)s')
logger = logging.getLogge... | 46.095406 | 156 | 0.537907 | import sys, os
import stat
import httplib
import urlparse
import json
import logging
__all__ = [
"WebHDFS",
"WebHDFSError"
]
logging.basicConfig(level=logging.DEBUG, datefmt='%m/%d/%Y %I:%M:%S %p',
format='%(asctime)s - %(name)s - %(levelname)s - %(message)s')
logger = logging.getLogge... | 0 | 0 | 0 | 11,065 | 0 | 164 | 0 | 0 | 66 |
54837adffc8440315591fa526d7f248966ef2237 | 5,977 | py | Python | gui.py | ua-snap/daily-precip-dash | 7a3f7851306a55a7459fa96dafabd139c2012210 | [
"MIT"
] | 1 | 2021-05-20T02:03:06.000Z | 2021-05-20T02:03:06.000Z | gui.py | ua-snap/daily-precip-dash | 7a3f7851306a55a7459fa96dafabd139c2012210 | [
"MIT"
] | null | null | null | gui.py | ua-snap/daily-precip-dash | 7a3f7851306a55a7459fa96dafabd139c2012210 | [
"MIT"
] | null | null | null | # pylint: disable=C0103,C0301
"""
GUI for app
"""
import os
import dash_core_components as dcc
import dash_html_components as html
import dash_dangerously_set_inner_html as ddsih
import luts
# For hosting
path_prefix = os.getenv("REQUESTS_PATHNAME_PREFIX") or "/"
# Used to make the chart exports nice
fig_download_co... | 29.589109 | 600 | 0.591267 | # pylint: disable=C0103,C0301
"""
GUI for app
"""
import os
from datetime import datetime
import dash_core_components as dcc
import dash_html_components as html
import dash_dangerously_set_inner_html as ddsih
import luts
import data
# For hosting
path_prefix = os.getenv("REQUESTS_PATHNAME_PREFIX") or "/"
# Used to m... | 0 | 0 | 0 | 0 | 0 | 0 | 0 | -2 | 44 |
466b04beb801e305db2d9f178555ef44b2c9e1c9 | 1,712 | py | Python | examples/alignment_test.py | edugonza/pm4py-source | b5ae5ea40799155d6540692f94be0444c16fd9d3 | [
"Apache-2.0"
] | null | null | null | examples/alignment_test.py | edugonza/pm4py-source | b5ae5ea40799155d6540692f94be0444c16fd9d3 | [
"Apache-2.0"
] | null | null | null | examples/alignment_test.py | edugonza/pm4py-source | b5ae5ea40799155d6540692f94be0444c16fd9d3 | [
"Apache-2.0"
] | null | null | null | import inspect
import os
import sys
sys.path.insert(0, os.path.dirname(os.path.dirname(os.path.abspath(inspect.getfile(inspect.currentframe())))))
from pm4py.models import petri as petri
from pm4py import log as log_lib
if __name__ == '__main__':
log = log_lib.importer.xes.import_from_file_xes('C:/Users/bas/Docu... | 41.756098 | 120 | 0.737734 | import inspect
import os
import sys
sys.path.insert(0, os.path.dirname(os.path.dirname(os.path.abspath(inspect.getfile(inspect.currentframe())))))
from pm4py.algo import alignments as ali
from pm4py.models import petri as petri
from pm4py import log as log_lib
from pm4py import util
def align(trace, net, im, fm, mode... | 0 | 0 | 0 | 0 | 0 | 610 | 0 | 20 | 67 |
9da93dcb376b0a2a6f902c7de89d8bd69cb442fc | 294 | py | Python | Contents/Libraries/Shared/tld/tests/__init__.py | tomerblecher/Sub-Zero.bundle | afc7614095fe6b0e1d15f40671f8cc1de37b4402 | [
"MIT"
] | 1,553 | 2015-11-09T02:17:06.000Z | 2022-03-31T20:24:52.000Z | Contents/Libraries/Shared/tld/tests/__init__.py | PlexIL/Sub-Zero.bundle | e74af913f13b390fc5271def4fdc55066358d3e3 | [
"MIT"
] | 691 | 2015-11-05T21:32:26.000Z | 2022-03-17T10:52:45.000Z | Contents/Libraries/Shared/tld/tests/__init__.py | PlexIL/Sub-Zero.bundle | e74af913f13b390fc5271def4fdc55066358d3e3 | [
"MIT"
] | 162 | 2015-11-06T19:38:55.000Z | 2022-03-16T02:42:41.000Z | # -*- coding: utf-8 -*-
from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
from __future__ import unicode_literals
import unittest
if (__name__ == u'__main__'):
unittest.main()
| 24.5 | 39 | 0.782313 | # -*- coding: utf-8 -*-
from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
from __future__ import unicode_literals
import unittest
from .test_core import *
from .test_commands import *
if (__name__ == u'__main__'):
unittest.main()
| 0 | 0 | 0 | 0 | 0 | 0 | 0 | 10 | 44 |
865b015f72c2751e63a843a928033f7d7538ec1d | 10,215 | py | Python | data_profiler/tests/labelers/test_regex_model.py | taylorfturner/data-profiler | da416d1ccaed4b04d2e5b93da41a508de58b642e | [
"Apache-2.0"
] | 1 | 2021-02-13T21:53:16.000Z | 2021-02-13T21:53:16.000Z | data_profiler/tests/labelers/test_regex_model.py | taylorfturner/data-profiler | da416d1ccaed4b04d2e5b93da41a508de58b642e | [
"Apache-2.0"
] | null | null | null | data_profiler/tests/labelers/test_regex_model.py | taylorfturner/data-profiler | da416d1ccaed4b04d2e5b93da41a508de58b642e | [
"Apache-2.0"
] | null | null | null | import os
import unittest
import pkg_resources
_file_dir = os.path.dirname(os.path.abspath(__file__))
_resource_labeler_dir = pkg_resources.resource_filename('resources', 'labelers')
mock_model_parameters = {
'regex_patterns': {
'PAD': [r'\W'],
'BACKGROUND': ['.*']
},
'encapsulators': {
... | 33.601974 | 80 | 0.505335 | import os
import unittest
from unittest import mock
import json
from io import StringIO
import pkg_resources
import numpy as np
from data_profiler.labelers.regex_model import RegexModel
_file_dir = os.path.dirname(os.path.abspath(__file__))
_resource_labeler_dir = pkg_resources.resource_filename('resources', 'label... | 0 | 5,473 | 0 | 3,483 | 0 | 368 | 0 | 29 | 181 |
27be09ce76e510bca02011ca5e0ddf7c93c3f75b | 294 | py | Python | agtuary/rainfall_enums.py | agtuary/agtuary-python | 6cc12776f6f395a91ce6f39a150dce41a01c2ab3 | [
"Apache-2.0"
] | null | null | null | agtuary/rainfall_enums.py | agtuary/agtuary-python | 6cc12776f6f395a91ce6f39a150dce41a01c2ab3 | [
"Apache-2.0"
] | 2 | 2021-11-24T14:58:19.000Z | 2022-01-25T15:10:37.000Z | agtuary/rainfall_enums.py | agtuary/agtuary-python | 6cc12776f6f395a91ce6f39a150dce41a01c2ab3 | [
"Apache-2.0"
] | null | null | null |
ANNUAL = "annual"
months = {
Seasons.SUMMER: [12, 1, 2],
Seasons.AUTUMN: [3, 4, 5],
Seasons.WINTER: [6, 7, 8],
Seasons.SPRING: [9, 10, 11],
}
| 15.473684 | 32 | 0.568027 | from enum import Enum
ANNUAL = "annual"
class Seasons(Enum):
SUMMER = "summer"
AUTUMN = "autumn"
WINTER = "winter"
SPRING = "spring"
months = {
Seasons.SUMMER: [12, 1, 2],
Seasons.AUTUMN: [3, 4, 5],
Seasons.WINTER: [6, 7, 8],
Seasons.SPRING: [9, 10, 11],
}
| 0 | 0 | 0 | 87 | 0 | 0 | 0 | 0 | 45 |
366ec847e0745c37255ab62cc00cc1b2609e5152 | 17,437 | py | Python | DigiroadPreDataAnalysis/digiroad/digiroadInit.py | DigitalGeographyLab/Car-Routing | 65550c6797132fdf4c520d4d74d9994f48f8febd | [
"MIT"
] | 2 | 2019-07-15T00:57:05.000Z | 2019-08-27T23:19:33.000Z | DigiroadPreDataAnalysis/digiroad/digiroadInit.py | DigitalGeographyLab/Car-Routing | 65550c6797132fdf4c520d4d74d9994f48f8febd | [
"MIT"
] | null | null | null | DigiroadPreDataAnalysis/digiroad/digiroadInit.py | DigitalGeographyLab/Car-Routing | 65550c6797132fdf4c520d4d74d9994f48f8febd | [
"MIT"
] | 1 | 2020-08-04T07:19:07.000Z | 2020-08-04T07:19:07.000Z | import getopt
import gc
import sys
import os
import time
import traceback
import psutil
from digiroad.carRoutingExceptions import ImpedanceAttributeNotDefinedException, NotParameterGivenException, TransportModeNotDefinedException
from digiroad.connection.PostgisServiceProvider import PostgisServiceProvider
from dig... | 47.903846 | 238 | 0.562941 | import getopt
import gc
import sys
import os
import time
import traceback
import psutil
from digiroad.carRoutingExceptions import ImpedanceAttributeNotDefinedException, NotParameterGivenException, \
TransportModeNotDefinedException
from digiroad.connection.PostgisServiceProvider import PostgisServiceProvider
fr... | 0 | 0 | 0 | 0 | 0 | 4,370 | 0 | 101 | 68 |
c742c1a2469f762e294475434315c8f78729d009 | 137 | py | Python | urls.py | gr1d99/blog | 27cf04a1b17065a618434187f9a8bf3330529495 | [
"MIT"
] | null | null | null | urls.py | gr1d99/blog | 27cf04a1b17065a618434187f9a8bf3330529495 | [
"MIT"
] | null | null | null | urls.py | gr1d99/blog | 27cf04a1b17065a618434187f9a8bf3330529495 | [
"MIT"
] | null | null | null | from django.conf.urls import url
from . import views
urlpatterns = [
url(r'^$', views.BlogIndexView.as_view(), name='blog_index'),
] | 22.833333 | 65 | 0.70073 | from django.conf.urls import url
from . import views
urlpatterns = [
url(r'^$', views.BlogIndexView.as_view(), name='blog_index'),
] | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
494a75c40d2bb483abf76f92dff33133be9cafb3 | 567 | py | Python | Manzhula_Oleg_dz_7/task_7_2.py | Zalotny/GB_Python_Basics_Course | 8597368661a74777955f0a7cdc8a24dc1bcae243 | [
"MIT"
] | null | null | null | Manzhula_Oleg_dz_7/task_7_2.py | Zalotny/GB_Python_Basics_Course | 8597368661a74777955f0a7cdc8a24dc1bcae243 | [
"MIT"
] | null | null | null | Manzhula_Oleg_dz_7/task_7_2.py | Zalotny/GB_Python_Basics_Course | 8597368661a74777955f0a7cdc8a24dc1bcae243 | [
"MIT"
] | null | null | null | import os
import task_7_1
BASE_DIR = os.path.dirname(os.path.abspath(__file__))
try:
with open(os.path.join(BASE_DIR, 'config.yaml'), 'r', encoding='utf-8') as config:
for name in config:
path = os.path.join(BASE_DIR, name.strip())
if not os.path.exists(path):
mk_... | 29.842105 | 86 | 0.590829 | import os
import task_7_1
BASE_DIR = os.path.dirname(os.path.abspath(__file__))
try:
with open(os.path.join(BASE_DIR, 'config.yaml'), 'r', encoding='utf-8') as config:
for name in config:
path = os.path.join(BASE_DIR, name.strip())
if not os.path.exists(path):
mk_... | 36 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
b1335a599f21cade68e8693ba2afa1017f7637a9 | 2,325 | py | Python | setup.py | Bhaskers-Blu-Org2/mu_pip_build | 7a42e81ef6f1a689dd7ac093e6a5db8e4aea95e2 | [
"BSD-2-Clause"
] | 5 | 2019-10-05T09:06:41.000Z | 2021-06-11T08:58:38.000Z | setup.py | Microsoft/mu_pip_build | 7a42e81ef6f1a689dd7ac093e6a5db8e4aea95e2 | [
"BSD-2-Clause"
] | null | null | null | setup.py | Microsoft/mu_pip_build | 7a42e81ef6f1a689dd7ac093e6a5db8e4aea95e2 | [
"BSD-2-Clause"
] | 3 | 2020-06-30T15:28:04.000Z | 2020-08-05T14:52:26.000Z | # @file setup.py
# This contains setup info for mu_build pip module
#
##
# Copyright (c) 2018, Microsoft Corporation
#
# All rights reserved.
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are met:
# 1. Redistributions of source ... | 39.40678 | 84 | 0.731183 | # @file setup.py
# This contains setup info for mu_build pip module
#
##
# Copyright (c) 2018, Microsoft Corporation
#
# All rights reserved.
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are met:
# 1. Redistributions of source ... | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
48116a0807b8e61c84f25bf15d79eed0243f4998 | 63 | py | Python | airbyte-integrations/connectors/source-recurly/source_recurly/__init__.py | rajatariya21/airbyte | 11e70a7a96e2682b479afbe6f709b9a5fe9c4a8d | [
"MIT"
] | 6,215 | 2020-09-21T13:45:56.000Z | 2022-03-31T21:21:45.000Z | airbyte-integrations/connectors/source-recurly/source_recurly/__init__.py | rajatariya21/airbyte | 11e70a7a96e2682b479afbe6f709b9a5fe9c4a8d | [
"MIT"
] | 8,448 | 2020-09-21T00:43:50.000Z | 2022-03-31T23:56:06.000Z | airbyte-integrations/connectors/source-recurly/source_recurly/__init__.py | rajatariya21/airbyte | 11e70a7a96e2682b479afbe6f709b9a5fe9c4a8d | [
"MIT"
] | 1,251 | 2020-09-20T05:48:47.000Z | 2022-03-31T10:41:29.000Z | from .source import SourceRecurly
__all__ = ["SourceRecurly"]
| 15.75 | 33 | 0.777778 | from .source import SourceRecurly
__all__ = ["SourceRecurly"]
| 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
241079a0a8e159d10135349ddb1730006187a001 | 359 | py | Python | src/hyper.py | csgarlock/Hyper-Stack | 8b80f6114b1c1d91599d3fb1ef0041ea3111daf3 | [
"MIT"
] | null | null | null | src/hyper.py | csgarlock/Hyper-Stack | 8b80f6114b1c1d91599d3fb1ef0041ea3111daf3 | [
"MIT"
] | null | null | null | src/hyper.py | csgarlock/Hyper-Stack | 8b80f6114b1c1d91599d3fb1ef0041ea3111daf3 | [
"MIT"
] | null | null | null |
if __name__ == '__main__':
main() | 17.95 | 43 | 0.635097 | import sys
def setup():
if(len(sys.argv) < 2):
raise "Invalid Argument"
return []
hyper_file = open(sys.argv[1], "r")
line_split = hyper_file.read().split("\n")
a_split = []
for l in line_split:
a_split.append(l.split(" "))
return a_split
def main():
args = setup()
arg_p = 0;
while(not arg_p == len(arg... | 0 | 0 | 0 | 0 | 0 | 267 | 0 | -11 | 68 |
a570ce2d652de391b63ed1ff09de2a544b447240 | 3,853 | py | Python | tests/test_autorotate.py | hbldh/autopil | 73841f05a88694761983519f042e64d94a191234 | [
"MIT"
] | 3 | 2016-08-30T09:35:18.000Z | 2019-02-26T13:36:28.000Z | tests/test_autorotate.py | hbldh/autopil | 73841f05a88694761983519f042e64d94a191234 | [
"MIT"
] | 7 | 2018-07-06T07:17:45.000Z | 2019-10-22T21:29:19.000Z | tests/test_autorotate.py | hbldh/autopil | 73841f05a88694761983519f042e64d94a191234 | [
"MIT"
] | 1 | 2020-04-24T10:16:56.000Z | 2020-04-24T10:16:56.000Z | #!/usr/bin/env python
# -*- coding: utf-8 -*-
"""
:mod:`test_monkey_patching`
=======================
.. moduleauthor:: hbldh <henrik.blidh@swedwise.com>
Created on 2016-08-31, 11:23
"""
from __future__ import division
from __future__ import print_function
from __future__ import unicode_literals
from __future__ impo... | 30.338583 | 66 | 0.712691 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
"""
:mod:`test_monkey_patching`
=======================
.. moduleauthor:: hbldh <henrik.blidh@swedwise.com>
Created on 2016-08-31, 11:23
"""
from __future__ import division
from __future__ import print_function
from __future__ import unicode_literals
from __future__ impo... | 0 | 0 | 0 | 0 | 0 | 800 | 0 | 0 | 46 |
5ddba60d65aaf536e1f7bcf0560e4c31a6008d9d | 693 | py | Python | ex5.py | Masibulele22/exerciseProjects | d47149cd17e581b179005e8251e852806e16d4de | [
"MIT"
] | null | null | null | ex5.py | Masibulele22/exerciseProjects | d47149cd17e581b179005e8251e852806e16d4de | [
"MIT"
] | null | null | null | ex5.py | Masibulele22/exerciseProjects | d47149cd17e581b179005e8251e852806e16d4de | [
"MIT"
] | null | null | null | #Number Checker:
#In this exercise I had to write a Python program to check if a user input number is positive, negative, or zero.
#Instantiated an input variable that takes in a float.
inputNumber = float(input("Please enter your number here: "))
#I created conditional statements to determine if the input variable i... | 38.5 | 113 | 0.738817 | #Number Checker:
#In this exercise I had to write a Python program to check if a user input number is positive, negative, or zero.
#Instantiated an input variable that takes in a float.
inputNumber = float(input("Please enter your number here: "))
#I created conditional statements to determine if the input variable i... | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
3534d0706ca46e7d5d006f1bc17c8be3929d8292 | 1,615 | py | Python | testLocal.py | daejong123/pySocket | 981ecf22f4b6c4fc8a93f0d430699ba7a571f352 | [
"MIT"
] | 1 | 2019-04-22T06:04:20.000Z | 2019-04-22T06:04:20.000Z | testLocal.py | daejong123/pySocket | 981ecf22f4b6c4fc8a93f0d430699ba7a571f352 | [
"MIT"
] | null | null | null | testLocal.py | daejong123/pySocket | 981ecf22f4b6c4fc8a93f0d430699ba7a571f352 | [
"MIT"
] | null | null | null |
from wonderbits import Display, Led, Control, Signal
import time
display1 = Display()
led = Led()
control1 = Control()
# lightBelt = LightBelt()
signal = Signal()
time.sleep(3)
# lightBelt.set_leds_rgb(1, 10, 255, 0, 0)
signal.set_rgb(255, 255, 0)
# content = 1
# while True:
# display1.print(1, 1, content)
# ... | 24.469697 | 89 | 0.596904 |
from wonderbits import Display, Led, Control, LightBelt, Signal
import random
import time
display1 = Display()
led = Led()
control1 = Control()
# lightBelt = LightBelt()
signal = Signal()
time.sleep(3)
# lightBelt.set_leds_rgb(1, 10, 255, 0, 0)
signal.set_rgb(255, 255, 0)
@control1.event.sw1_pressed()
def whenSw1... | 75 | 314 | 0 | 0 | 0 | 0 | 0 | 3 | 68 |
8f2f913b9572e6d6b7df702d52a39cef69f08c01 | 352 | py | Python | ontospy/extras/__init__.py | KGerring/Ontospy | 337718d4abec5b390e5ff3caa76ab307e8b3674e | [
"MIT"
] | null | null | null | ontospy/extras/__init__.py | KGerring/Ontospy | 337718d4abec5b390e5ff3caa76ab307e8b3674e | [
"MIT"
] | 1 | 2022-02-14T11:34:16.000Z | 2022-02-14T11:34:16.000Z | ontospy/extras/__init__.py | KGerring/Ontospy | 337718d4abec5b390e5ff3caa76ab307e8b3674e | [
"MIT"
] | null | null | null |
from rdflib.graph import Graph
from rdflib.term import URIRef
from rdflib import Namespace
NS = Namespace("https://w3id.org/ftm#") # type: ignore | 39.111111 | 73 | 0.775568 |
from rdflib.graph import Graph, ConjunctiveGraph, ReadOnlyGraphAggregate
from rdflib.term import BNode, Node, URIRef, IdentifiedNode
from rdflib import Graph, URIRef, Literal # type: ignore
from rdflib.namespace import OWL, DCTERMS, RDF, RDFS, XSD # type: ignore
from rdflib import Namespace
NS = Namespace("https:/... | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 127 | 76 |
e9b5fbcebdccf9bd9de9905241308e7cbd6c7859 | 1,263 | py | Python | display.py | Rajalo/TSP-Approximation-Algorithms-in-Python | f777c185390772042a46e3a909fe3159e03134d7 | [
"MIT"
] | null | null | null | display.py | Rajalo/TSP-Approximation-Algorithms-in-Python | f777c185390772042a46e3a909fe3159e03134d7 | [
"MIT"
] | null | null | null | display.py | Rajalo/TSP-Approximation-Algorithms-in-Python | f777c185390772042a46e3a909fe3159e03134d7 | [
"MIT"
] | null | null | null | #This file is used to display the results of various algorithms
import karpPartition
#Shows the various paths which each algorithm chose to approximate the optimal
#Works best when mapping one or two algorithms but extensible to any number
#Converts the method's string representation to something readable for display... | 34.135135 | 97 | 0.73555 | #This file is used to display the results of various algorithms
import matplotlib.pyplot as plt
import numpy
import christofedes
import nearestNeighbor
import insertion
import branchAndBound
import karpPartition
#Shows the various paths which each algorithm chose to approximate the optimal
#Works best when mapping one... | 0 | 0 | 0 | 0 | 0 | 612 | 0 | -5 | 198 |
c70cb97411e5e9f08f2cbdc2f7fc635d71ca8c5e | 2,817 | py | Python | examples/netCDF_test (2).py | wqshen/nowcast | 9c9a7054195b83071ac8ff5506be60c8f1fd9668 | [
"BSD-3-Clause"
] | 6 | 2019-01-06T07:42:55.000Z | 2021-02-03T13:59:50.000Z | examples/netCDF_test (2).py | wqshen/nowcast | 9c9a7054195b83071ac8ff5506be60c8f1fd9668 | [
"BSD-3-Clause"
] | 5 | 2018-12-23T15:10:27.000Z | 2021-01-06T15:03:03.000Z | examples/netCDF_test (2).py | savelov/nowcast | 9c1168b1ba642f15bc4ffb000bdbca6db27c29b1 | [
"BSD-3-Clause"
] | 2 | 2019-08-06T14:16:43.000Z | 2019-08-13T00:36:31.000Z |
ncf_time_format = "%Y-%m-%d %H:%M:%S"
#filename = "/home/mikhailsavelov/pysteps-data/out/probab_ensemble_nwc_201810271000.ncf"
#ncf = open_netcdf(filename, 'r')
#print(ncf.startdate_str)
#a = get_prob(ncf, "201810271030", 51.92, 53.44)
P = get_prob_dict("/home/ubuntu/pysteps-data/out", 50.9203, 31.1968)
print(P)
| 33.535714 | 116 | 0.663472 | import netCDF4 as cdf
import datetime as dt
from glob import glob
from collections import OrderedDict
import pyproj
ncf_time_format = "%Y-%m-%d %H:%M:%S"
def open_netcdf(filename, mode, format = "NETCDF4"):
ncf = cdf.Dataset(filename, mode, format)
return ncf
def get_data(ncf, timeformat = ncf_time_format):
... | 52 | 0 | 0 | 0 | 0 | 2,195 | 0 | 6 | 271 |
b2dc1bf944e73e49b3c14cee9b1fc3762ed937fc | 689 | py | Python | ch10_dash_cytoscape_basic/elements/edge_list_and_adj_matrix.py | Ethan0621/plotly-dash-dev | abe478824db1ee511a2d92f88e5dad49f5d6e27e | [
"MIT"
] | 21 | 2020-10-02T08:17:33.000Z | 2022-03-22T06:10:17.000Z | ch10_dash_cytoscape_basic/elements/edge_list_and_adj_matrix.py | Ethan0621/plotly-dash-dev | abe478824db1ee511a2d92f88e5dad49f5d6e27e | [
"MIT"
] | 4 | 2019-07-18T04:43:31.000Z | 2021-10-31T10:30:25.000Z | ch10_dash_cytoscape_basic/elements/edge_list_and_adj_matrix.py | Ethan0621/plotly-dash-dev | abe478824db1ee511a2d92f88e5dad49f5d6e27e | [
"MIT"
] | 12 | 2019-07-23T05:36:57.000Z | 2021-07-11T08:57:47.000Z | import pandas as pd
print("(1) ")
edge_list = [("A", "B"), ("A", "C"), ("C", "D")]
print(edge_list)
print("\n(2) pandas(sourcetarget")
pandas_edge_list = pd.DataFrame({"source": ["A", "B", "C"], "target": ["B", "C", "D"]})
print(pandas_edge_list)
#
print("\n(3) ")
adj_matrix = [[0, 1, 1, 0], [0, 0, 0, 0], [0, 0, 0,... | 28.708333 | 87 | 0.5791 | import numpy as np
import pandas as pd
print("(1) タプルのリストによるエッジリスト")
edge_list = [("A", "B"), ("A", "C"), ("C", "D")]
print(edge_list)
print("\n(2) pandasのデータフレームによるエッジリスト(sourceは始点ノード、targetは終点ノード)")
pandas_edge_list = pd.DataFrame({"source": ["A", "B", "C"], "target": ["B", "C", "D"]})
print(pandas_edge_list)
# 隣接... | 303 | 0 | 0 | 0 | 0 | 0 | 0 | -3 | 22 |
9c123eedb33e89a25a8a6074d12b65cab978bf1e | 705 | py | Python | ubuild.py | yunstanford/attrs-converter | 0b7ce86e6d67b0b28ce2fdcd0730d7abbeedbd97 | [
"MIT"
] | null | null | null | ubuild.py | yunstanford/attrs-converter | 0b7ce86e6d67b0b28ce2fdcd0730d7abbeedbd97 | [
"MIT"
] | null | null | null | ubuild.py | yunstanford/attrs-converter | 0b7ce86e6d67b0b28ce2fdcd0730d7abbeedbd97 | [
"MIT"
] | null | null | null |
def distribute(build):
""" distribute the uranium package """
build.packages.install("wheel")
build.executables.run([
"python", "setup.py",
"sdist", "bdist_wheel", "--universal", "upload"
])
| 23.5 | 55 | 0.635461 | import os
import subprocess
from uranium import task_requires
def main(build):
build.packages.install(".", develop=True)
@task_requires("main")
def test(build):
build.packages.install("pytest")
build.packages.install("pytest-cov")
build.packages.install("attrs")
build.packages.install("radon")
... | 0 | 329 | 0 | 0 | 0 | 41 | 0 | -4 | 112 |
b2037847d02d4f7816a500104d0b1d773f93cffe | 3,079 | py | Python | neuralsea/neuralsea.py | seqpipe/deepsea-experiments | 6b48f455a214ab3177009baeacd7778017501531 | [
"MIT"
] | 1 | 2020-07-07T09:44:54.000Z | 2020-07-07T09:44:54.000Z | neuralsea/neuralsea.py | seqpipe/deepsea-experiments | 6b48f455a214ab3177009baeacd7778017501531 | [
"MIT"
] | null | null | null | neuralsea/neuralsea.py | seqpipe/deepsea-experiments | 6b48f455a214ab3177009baeacd7778017501531 | [
"MIT"
] | null | null | null | ''' Implementation of NeuralSEA
'''
import torch.nn as nn
| 32.410526 | 75 | 0.580383 | ''' Implementation of NeuralSEA
'''
import torch.nn as nn
from neuralsea._se_block import _SEBlock
from neuralsea._time_distributed import _TimeDistributed
class NeuralSEA(nn.Module):
''' NeuralSEA
A Neural DNA SEquence Analyzer
'''
def __init__(self, num_motifs=320, num_labels=919):
super... | 0 | 0 | 0 | 2,897 | 0 | 0 | 0 | 54 | 68 |
d49f775fd823d74afff9fe89a9f4b7bc457d6fa5 | 3,675 | py | Python | app/landing/views.py | domdomegg/coronavirus-dashboard-frontend-server | f08a7928b1b87aeea701924e8e5d2687fa6e3fab | [
"MIT"
] | null | null | null | app/landing/views.py | domdomegg/coronavirus-dashboard-frontend-server | f08a7928b1b87aeea701924e8e5d2687fa6e3fab | [
"MIT"
] | null | null | null | app/landing/views.py | domdomegg/coronavirus-dashboard-frontend-server | f08a7928b1b87aeea701924e8e5d2687fa6e3fab | [
"MIT"
] | null | null | null | #!/usr/bin python3
"""
<Description of the programme>
Author: Pouria Hadjibagheri <pouria.hadjibagheri@phe.gov.uk>
Created: 25 Oct 2020
License: MIT
Contributors: Pouria Hadjibagheri
"""
# Imports
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# Python:... | 27.840909 | 91 | 0.689252 | #!/usr/bin python3
"""
<Description of the programme>
Author: Pouria Hadjibagheri <pouria.hadjibagheri@phe.gov.uk>
Created: 25 Oct 2020
License: MIT
Contributors: Pouria Hadjibagheri
"""
# Imports
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# Python:... | 0 | 0 | 1,187 | 0 | 0 | 172 | 0 | 170 | 268 |
49034917fe84b8aa9b2a95554134c75240c0e4ff | 9,088 | py | Python | makahiki/apps/managers/challenge_mgr/migrations/0002_auto__add_field_roundsetting_round_reset__add_field_roundsetting_displ.py | justinslee/Wai-Not-Makahiki | 4b7dd685012ec64758affe0ecee3103596d16aa7 | [
"MIT"
] | 1 | 2015-07-22T11:31:20.000Z | 2015-07-22T11:31:20.000Z | makahiki/apps/managers/challenge_mgr/migrations/0002_auto__add_field_roundsetting_round_reset__add_field_roundsetting_displ.py | justinslee/Wai-Not-Makahiki | 4b7dd685012ec64758affe0ecee3103596d16aa7 | [
"MIT"
] | null | null | null | makahiki/apps/managers/challenge_mgr/migrations/0002_auto__add_field_roundsetting_round_reset__add_field_roundsetting_displ.py | justinslee/Wai-Not-Makahiki | 4b7dd685012ec64758affe0ecee3103596d16aa7 | [
"MIT"
] | null | null | null | # encoding: utf-8
| 77.016949 | 176 | 0.577905 | # encoding: utf-8
import datetime
from south.db import db
from south.v2 import SchemaMigration
from django.db import models
class Migration(SchemaMigration):
def forwards(self, orm):
# Adding field 'RoundSetting.round_reset'
db.add_column('challenge_mgr_roundsetting', 'round_reset', self.... | 0 | 0 | 0 | 8,941 | 0 | 0 | 0 | 18 | 111 |
93188252e72e0834837c050d67a57e2aeae2c2c8 | 672 | py | Python | years/5/plusik-0.0.2.py | mshogin/go-teach-kids | 097af3cfb571fcb4fc97696c78dbb3dae93a3e3b | [
"MIT"
] | null | null | null | years/5/plusik-0.0.2.py | mshogin/go-teach-kids | 097af3cfb571fcb4fc97696c78dbb3dae93a3e3b | [
"MIT"
] | null | null | null | years/5/plusik-0.0.2.py | mshogin/go-teach-kids | 097af3cfb571fcb4fc97696c78dbb3dae93a3e3b | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
# shell:
# $ python plusik-0.0.2.py : uhti
# --
# First type:
print 1 + 1
# then open terminal and run the command
# and next iteration.
print 1 + 2
print 1 + 3
print 1 + 4
# The goal is to show to the kid that you can change something in one place
# and you will get change in another place.... | 32 | 100 | 0.702381 | # -*- coding: utf-8 -*-
# shell:
# $ python plusik-0.0.2.py : uhti
# --
# First type:
print 1 + 1
# then open terminal and run the command
# and next iteration.
print 1 + 2
print 1 + 3
print 1 + 4
# The goal is to show to the kid that you can change something in one place
# and you will get change in another place.... | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
51e6c0d691f6bfbf2513c2f929d7c6d9db4435e8 | 4,801 | py | Python | dryrun.py | hillsofeternity1/fesmoo_perdoliq | decd96fe5c8e04800b1fed872caa057cd4f0264e | [
"Apache-2.0"
] | 2 | 2018-12-28T22:57:01.000Z | 2019-12-26T20:26:29.000Z | dryrun.py | hillsofeternity1/fesmoo_perdoliq | decd96fe5c8e04800b1fed872caa057cd4f0264e | [
"Apache-2.0"
] | null | null | null | dryrun.py | hillsofeternity1/fesmoo_perdoliq | decd96fe5c8e04800b1fed872caa057cd4f0264e | [
"Apache-2.0"
] | null | null | null | import logging
logging.basicConfig(level=logging.INFO)
| 36.097744 | 94 | 0.56759 | import requests
import settings
import logging
import re
from bs4 import BeautifulSoup
from random import randint
import time
logging.basicConfig(level=logging.INFO)
class Perdoliq:
def __init__(self, username, password):
self.password = password
self.username = username
self.SessionId = ... | 2,844 | 0 | 0 | 3,188 | 0 | 0 | 0 | -21 | 155 |
8db9e19f0350be4e8c428d21837c22eadb13be07 | 3,984 | py | Python | mars/dataframe/sort/tests/test_sort.py | wjsi/mars | a69fb19edfe748d4393b90ff2c4941a76c084596 | [
"Apache-2.0"
] | 1 | 2022-02-02T03:03:48.000Z | 2022-02-02T03:03:48.000Z | mars/dataframe/sort/tests/test_sort.py | wjsi/mars | a69fb19edfe748d4393b90ff2c4941a76c084596 | [
"Apache-2.0"
] | null | null | null | mars/dataframe/sort/tests/test_sort.py | wjsi/mars | a69fb19edfe748d4393b90ff2c4941a76c084596 | [
"Apache-2.0"
] | null | null | null | # Copyright 1999-2021 Alibaba Group Holding Ltd.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or a... | 31.872 | 84 | 0.696536 | # Copyright 1999-2021 Alibaba Group Holding Ltd.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or a... | 0 | 0 | 0 | 0 | 0 | 3,022 | 0 | 140 | 224 |
44c61fb2c60dfd6501a48354f890147fbfa5245f | 4,860 | py | Python | src/pop3sf/adapters/ListAdapter.py | vitlabuda/pop3sf | 3792b98da329fa8091308f3363808a499af58ad7 | [
"BSD-3-Clause"
] | 1 | 2022-03-16T18:58:19.000Z | 2022-03-16T18:58:19.000Z | src/pop3sf/adapters/ListAdapter.py | vitlabuda/pop3sf | 3792b98da329fa8091308f3363808a499af58ad7 | [
"BSD-3-Clause"
] | null | null | null | src/pop3sf/adapters/ListAdapter.py | vitlabuda/pop3sf | 3792b98da329fa8091308f3363808a499af58ad7 | [
"BSD-3-Clause"
] | 1 | 2022-03-17T18:01:43.000Z | 2022-03-17T18:01:43.000Z | # SPDX-License-Identifier: BSD-3-Clause
#
# Copyright (c) 2021 Vt Labuda. All rights reserved.
#
# Redistribution and use in source and binary forms, with or without modification, are permitted provided that the
# following conditions are met:
# 1. Redistributions of source code must retain the above copyright notice,... | 51.702128 | 213 | 0.749794 | # SPDX-License-Identifier: BSD-3-Clause
#
# Copyright (c) 2021 Vít Labuda. All rights reserved.
#
# Redistribution and use in source and binary forms, with or without modification, are permitted provided that the
# following conditions are met:
# 1. Redistributions of source code must retain the above copyright notice... | 2 | 0 | 0 | 3,004 | 0 | 0 | 0 | 94 | 155 |
862b4a3a2bee9c77b2b7f7cd244076f059ee92fe | 9,226 | py | Python | packit/config/aliases.py | allisonkarlitskaya/packit | f9e5a01d8481804237f7bf4c1aeab6612d3c48b8 | [
"MIT"
] | 23 | 2020-09-03T01:21:57.000Z | 2022-03-16T17:06:28.000Z | packit/config/aliases.py | allisonkarlitskaya/packit | f9e5a01d8481804237f7bf4c1aeab6612d3c48b8 | [
"MIT"
] | 642 | 2020-08-03T06:52:35.000Z | 2022-03-31T19:35:38.000Z | packit/config/aliases.py | allisonkarlitskaya/packit | f9e5a01d8481804237f7bf4c1aeab6612d3c48b8 | [
"MIT"
] | 19 | 2020-08-13T09:55:42.000Z | 2022-01-19T20:53:53.000Z | # Copyright Contributors to the Packit project.
# SPDX-License-Identifier: MIT
import logging
from typing import Dict, List, Set
from packit.copr_helper import CoprHelper
from packit.exceptions import PackitException
ALIASES: Dict[str, List[str]] = {
"fedora-development": ["fedora-rawhide"],
"fedora-latest": ... | 35.484615 | 94 | 0.625298 | # Copyright Contributors to the Packit project.
# SPDX-License-Identifier: MIT
import functools
import logging
from collections import defaultdict
from typing import Dict, List, Set
from bodhi.client.bindings import BodhiClient
from packit.copr_helper import CoprHelper
from packit.exceptions import PackitException
f... | 0 | 1,769 | 0 | 0 | 0 | 1,157 | 0 | 93 | 181 |
7d8da3897e90f29b0860f30a43ce22a4f7a383ab | 105 | py | Python | slack_g_cal/wit/__init__.py | wfa207/slack_g_cal | 2acfb19d156e3b6f14c4ad0b079b9c3a5f79c9b0 | [
"Apache-2.0"
] | 1 | 2018-11-01T15:53:18.000Z | 2018-11-01T15:53:18.000Z | slack_g_cal/wit/__init__.py | wfa207/slack_g_cal | 2acfb19d156e3b6f14c4ad0b079b9c3a5f79c9b0 | [
"Apache-2.0"
] | null | null | null | slack_g_cal/wit/__init__.py | wfa207/slack_g_cal | 2acfb19d156e3b6f14c4ad0b079b9c3a5f79c9b0 | [
"Apache-2.0"
] | null | null | null | # -*- encoding: utf-8 -*-
from __future__ import unicode_literals
| 21 | 39 | 0.742857 | # -*- encoding: utf-8 -*-
from __future__ import unicode_literals
from client import wit_client # NOQA
| 0 | 0 | 0 | 0 | 0 | 0 | 0 | 8 | 31 |
714ca668a65de3fa5b565249a66d0b797977479e | 3,552 | py | Python | src/data/make_author_data.py | yanaiela/demog-text-removal | f11b243c3f2f24f2179348c468b2caf76e7a3b23 | [
"MIT"
] | 42 | 2018-08-22T21:06:02.000Z | 2022-03-29T06:34:16.000Z | src/data/make_author_data.py | yanaiela/demog-text-removal | f11b243c3f2f24f2179348c468b2caf76e7a3b23 | [
"MIT"
] | 1 | 2020-08-04T11:06:35.000Z | 2020-08-04T11:18:03.000Z | src/data/make_author_data.py | yanaiela/demog-text-removal | f11b243c3f2f24f2179348c468b2caf76e7a3b23 | [
"MIT"
] | 7 | 2018-09-17T19:38:08.000Z | 2022-03-15T04:36:10.000Z | import pandas as pd
import sklearn.utils
from sklearn.utils import shuffle
from data_utils import mention_split, to_file, SEED
project = 'PATH/TO/PROJECT'
MIN_SENTENCE_LEN = 3
df = pd.read_csv(project + 'data/interim/author-profiling.tsv', sep='\t',
names=['index', 'age', 'gender', 'id', 'text'], sk... | 41.302326 | 117 | 0.713401 | import pandas as pd
import sklearn.utils
from sklearn.utils import shuffle
from tqdm import tqdm
from data_utils import mention_split, normalize_text, MENTION, to_file, SEED
project = 'PATH/TO/PROJECT'
MIN_SENTENCE_LEN = 3
df = pd.read_csv(project + 'data/interim/author-profiling.tsv', sep='\t',
nam... | 0 | 0 | 0 | 0 | 0 | 380 | 0 | 25 | 45 |
ebc170f366702218f8a497d2349c916bd5dab2db | 5,934 | py | Python | locustfiles/python/common/fakefile.py | sreedarbabu/https-github.com-twosigma-locust-s3-l | 63f213016d589b77fefce112094cb5dfcf51e535 | [
"Apache-2.0"
] | 3 | 2020-03-29T17:06:02.000Z | 2021-04-29T18:34:00.000Z | locustfiles/python/common/fakefile.py | sreedarbabu/https-github.com-twosigma-locust-s3-l | 63f213016d589b77fefce112094cb5dfcf51e535 | [
"Apache-2.0"
] | 12 | 2019-03-14T17:07:49.000Z | 2019-07-08T15:45:02.000Z | locustfiles/python/common/fakefile.py | sreedarbabu/https-github.com-twosigma-locust-s3-l | 63f213016d589b77fefce112094cb5dfcf51e535 | [
"Apache-2.0"
] | 2 | 2019-06-20T02:30:27.000Z | 2020-05-30T01:27:18.000Z | # coding: utf-8
# Copyright 2019 TWO SIGMA OPEN SOURCE, LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by appli... | 29.969697 | 96 | 0.603977 | # coding: utf-8
# Copyright 2019 TWO SIGMA OPEN SOURCE, LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by appli... | 0 | 0 | 0 | 4,800 | 0 | 0 | 0 | -39 | 202 |
51e4310a18d2c4655a45e25987ce394e554d7071 | 2,480 | py | Python | application/auth/routes.py | h4k1m0u/flask-webapp | d095449a3d324c50de745f7ac5f84b6fa2cb08b4 | [
"MIT"
] | null | null | null | application/auth/routes.py | h4k1m0u/flask-webapp | d095449a3d324c50de745f7ac5f84b6fa2cb08b4 | [
"MIT"
] | null | null | null | application/auth/routes.py | h4k1m0u/flask-webapp | d095449a3d324c50de745f7ac5f84b6fa2cb08b4 | [
"MIT"
] | null | null | null | from flask import Blueprint
from flask_login import LoginManager
auth_bp = Blueprint('auth', __name__,
template_folder='templates', static_folder='static')
# view to redirect to for anonymous users
login_manager = LoginManager()
login_manager.login_view = '.login'
| 26.956522 | 79 | 0.663306 | from flask import Blueprint, render_template, url_for, redirect, flash, request
from flask import current_app as app
from flask_login import LoginManager, login_user, logout_user, login_required
from .forms import LoginForm, RegisterForm
from ..models import User, db
auth_bp = Blueprint('auth', __name__,
... | 0 | 1,844 | 0 | 0 | 0 | 0 | 0 | 137 | 204 |
6318855bd0c798edffac9ed982989fd171b66fa4 | 274 | py | Python | test.py | matteoferla/MichelaNGLo-app | 9916d8ebf3e6f9c50ca047a1345962d7a67c9f6b | [
"MIT"
] | 11 | 2020-03-23T03:41:36.000Z | 2022-03-11T18:53:26.000Z | test.py | thesgc/MichelaNGLo | ad8a2e5207638e82bb4163662af351b4864f39c1 | [
"MIT"
] | 1 | 2020-05-13T20:07:51.000Z | 2020-06-25T04:44:57.000Z | test.py | thesgc/MichelaNGLo | ad8a2e5207638e82bb4163662af351b4864f39c1 | [
"MIT"
] | 1 | 2021-04-13T08:01:33.000Z | 2021-04-13T08:01:33.000Z | from michelanglo_app.transplier import PyMolTranspiler
transpiler = PyMolTranspiler(file='michelanglo_app/demo/1gfl.pse')
#print(transpiler.get_view())
#print(transpiler.get_reps())
print(transpiler.get_loadfun_js(tag_wrapped=True, viewport='viewport', funname='loadfun'))
| 39.142857 | 90 | 0.821168 | from michelanglo_app.transplier import PyMolTranspiler
transpiler = PyMolTranspiler(file='michelanglo_app/demo/1gfl.pse')
#print(transpiler.get_view())
#print(transpiler.get_reps())
print(transpiler.get_loadfun_js(tag_wrapped=True, viewport='viewport', funname='loadfun'))
| 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
4ecd2644b6c122b1263f4a2eaa96ea895acf938c | 376 | py | Python | examples/app_stat.py | Aubtin/python-anticaptcha | f3d5dc20be0ac595afd639f974d6ccfb421d5a1c | [
"MIT"
] | 199 | 2017-07-20T05:15:14.000Z | 2022-03-31T03:31:42.000Z | examples/app_stat.py | Aubtin/python-anticaptcha | f3d5dc20be0ac595afd639f974d6ccfb421d5a1c | [
"MIT"
] | 69 | 2017-09-09T15:33:22.000Z | 2022-03-28T23:58:39.000Z | examples/app_stat.py | Aubtin/python-anticaptcha | f3d5dc20be0ac595afd639f974d6ccfb421d5a1c | [
"MIT"
] | 60 | 2017-08-12T10:09:11.000Z | 2022-03-16T11:54:03.000Z | from os import environ
from pprint import pprint
from sys import argv
api_key = environ["KEY"]
soft_id = argv[1]
mode = argv[2]
if __name__ == "__main__":
pprint(process(soft_id, mode))
| 19.789474 | 65 | 0.75266 | from os import environ
from pprint import pprint
from python_anticaptcha import AnticaptchaClient, ImageToTextTask
from sys import argv
api_key = environ["KEY"]
soft_id = argv[1]
mode = argv[2]
def process(soft_id, mode):
client = AnticaptchaClient(api_key)
pprint(client.getAppStats(soft_id, mode))
if __n... | 0 | 0 | 0 | 0 | 0 | 92 | 0 | 44 | 45 |
f864cee642a35c7f8a7c603aed0935583a4958c7 | 4,028 | py | Python | News/portal/admin.py | Renanrmx/NewsWithDjango | 2cf8ccf8cd8bcea78c2b08a89bfb2dbc023b2820 | [
"MIT"
] | null | null | null | News/portal/admin.py | Renanrmx/NewsWithDjango | 2cf8ccf8cd8bcea78c2b08a89bfb2dbc023b2820 | [
"MIT"
] | null | null | null | News/portal/admin.py | Renanrmx/NewsWithDjango | 2cf8ccf8cd8bcea78c2b08a89bfb2dbc023b2820 | [
"MIT"
] | null | null | null | from django.contrib import admin
admin.site.site_header = 'Notcias - Administrao'
admin.site.site_title = 'Admin'
admin.site.index_title = 'Gestor'
admin.site.unregister(User)
admin.site.register(User, ProfileAdmin)
| 31.968254 | 134 | 0.697865 | from django.contrib import admin
from django.contrib.auth.admin import UserAdmin
from django_summernote.admin import SummernoteModelAdmin
from lxml.html.clean import Cleaner
from django.core.exceptions import ObjectDoesNotExist
from .models import *
admin.site.site_header = 'Notícias - Administração'
admin.site.s... | 6 | 3,075 | 0 | 292 | 0 | 0 | 0 | 107 | 321 |
d50ca75d21b927ae3ffbec5019706f61a47336dc | 148 | py | Python | Python_URI/1097.py | matheus258/Python_URI | 2b9b393bab710e060fb4be953b0b9171c5dc89d4 | [
"MIT"
] | null | null | null | Python_URI/1097.py | matheus258/Python_URI | 2b9b393bab710e060fb4be953b0b9171c5dc89d4 | [
"MIT"
] | null | null | null | Python_URI/1097.py | matheus258/Python_URI | 2b9b393bab710e060fb4be953b0b9171c5dc89d4 | [
"MIT"
] | null | null | null | x = 1
y = 7
conta = y - 2
while x <= 9:
for w in range(1,4):
print("I=%i J=%i" % (x, y))
y = y - 1
x+= 2
y += 5
| 10.571429 | 35 | 0.331081 | x = 1
y = 7
conta = y - 2
while x <= 9:
for w in range(1,4):
print("I=%i J=%i" % (x, y))
y = y - 1
x+= 2
y += 5
| 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
406f9332315ef39a53a8c234bfae55a82c6510d1 | 5,938 | py | Python | me_biomass/load_model.py | coltonlloyd/me_biomass | 4226b7c68ce3815ee0f8910c26f2557c7bba6dac | [
"MIT"
] | null | null | null | me_biomass/load_model.py | coltonlloyd/me_biomass | 4226b7c68ce3815ee0f8910c26f2557c7bba6dac | [
"MIT"
] | null | null | null | me_biomass/load_model.py | coltonlloyd/me_biomass | 4226b7c68ce3815ee0f8910c26f2557c7bba6dac | [
"MIT"
] | 1 | 2020-04-16T11:06:31.000Z | 2020-04-16T11:06:31.000Z | from os.path import dirname, abspath
currency_met_to_synthesis_rxn = {'coa': 'DPCOAK',
'thf': 'DHFS',
# use this reaction because DHFR is coupled to dUMP synthesis
'nadp': 'NADK',
'nad': ... | 39.586667 | 119 | 0.594139 |
import pickle
from cobrame.io.json import load_json_me_model
import cobrame
from sympy import Basic
from os.path import dirname, abspath
currency_met_to_synthesis_rxn = {'coa': 'DPCOAK',
'thf': 'DHFS',
# use this reaction because DHFR is coupled to dUM... | 0 | 0 | 0 | 0 | 0 | 3,900 | 0 | 12 | 112 |