hexsha stringlengths 40 40 | size int64 5 2.06M | ext stringclasses 11
values | lang stringclasses 1
value | max_stars_repo_path stringlengths 3 251 | 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 191k ⌀ | 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 3 251 | 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 3 251 | 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.05M | avg_line_length float64 1 1.02M | max_line_length int64 3 1.04M | alphanum_fraction float64 0 1 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
1b057e16eef03b8e12ad5db657ab5807f753c9c8 | 4,772 | py | Python | lightshow.py | Antidisestablishmentarianism/lightshow | 13d248698e0e47ed5b19fb662959c359db7dca03 | [
"MIT"
] | null | null | null | lightshow.py | Antidisestablishmentarianism/lightshow | 13d248698e0e47ed5b19fb662959c359db7dca03 | [
"MIT"
] | null | null | null | lightshow.py | Antidisestablishmentarianism/lightshow | 13d248698e0e47ed5b19fb662959c359db7dca03 | [
"MIT"
] | null | null | null | #!/usr/bin/sudo / usr/bin/python
import RPi.GPIO as GPIO
import random
from time import sleep
# Use board pin numbering
GPIO.setmode(GPIO.BOARD)
GPIO.setwarnings(False)
# Start a new dictionary with desired LED names
leds = {'floor':[], 'top-left':[]}
# Take name of led and list of pins for RGB
setupled('1', [3, 5... | 25.794595 | 98 | 0.551341 |
1b08b94f653176a7bb3c4eeecbcb0204092d0a1b | 2,711 | py | Python | configboy/build_config.py | aaronhua123/configboy | ac0a0d65cd6b8a9b7b0cbb9679ed7b5e551d547c | [
"MIT"
] | 1 | 2019-12-06T06:44:39.000Z | 2019-12-06T06:44:39.000Z | configboy/build_config.py | aaronhua123/configboy | ac0a0d65cd6b8a9b7b0cbb9679ed7b5e551d547c | [
"MIT"
] | null | null | null | configboy/build_config.py | aaronhua123/configboy | ac0a0d65cd6b8a9b7b0cbb9679ed7b5e551d547c | [
"MIT"
] | null | null | null | import configparser
from jinja2 import Template
conf = configparser.ConfigParser()
# config
conf.read("base.config.ini")
sections = conf.sections()
dit = {}
def analyze_ini():
'''
inidit
:return:
'''
for classname in sections:
print(classname, conf.items(classname))
classnamelist ... | 25.575472 | 69 | 0.520472 |
1b08dc9a93ae5d847eaf7656765d8790a54f1236 | 9,833 | py | Python | dynts/dsl/ast/base.py | quantmind/dynts | 21ac57c648bfec402fa6b1fe569496cf098fb5e8 | [
"BSD-3-Clause"
] | 57 | 2015-02-10T13:42:06.000Z | 2022-03-28T14:48:36.000Z | dynts/dsl/ast/base.py | quantmind/dynts | 21ac57c648bfec402fa6b1fe569496cf098fb5e8 | [
"BSD-3-Clause"
] | 1 | 2016-11-01T07:43:05.000Z | 2016-11-01T07:43:05.000Z | dynts/dsl/ast/base.py | quantmind/dynts | 21ac57c648bfec402fa6b1fe569496cf098fb5e8 | [
"BSD-3-Clause"
] | 17 | 2015-05-08T04:09:19.000Z | 2021-08-02T19:24:52.000Z | from functools import reduce
from dynts.conf import settings
from ...api import timeseries, is_timeseries
| 27.855524 | 89 | 0.548866 |
1b0944c79f8a702fe2867a9d3d9ea2355da44f81 | 5,633 | py | Python | utils/codes_distance.py | wemozj/Image-Compression-based-GMM-and-Attention-Module | 93f804dbcea8ffc1621456f3d104d0342c75373b | [
"Apache-2.0"
] | null | null | null | utils/codes_distance.py | wemozj/Image-Compression-based-GMM-and-Attention-Module | 93f804dbcea8ffc1621456f3d104d0342c75373b | [
"Apache-2.0"
] | null | null | null | utils/codes_distance.py | wemozj/Image-Compression-based-GMM-and-Attention-Module | 93f804dbcea8ffc1621456f3d104d0342c75373b | [
"Apache-2.0"
] | null | null | null | """
Calculates distance of some (bpp, metric) point (for some metric) to some codec on some dataset.
"""
import os
import numpy as np
import scipy.interpolate
from utils import other_codecs
import constants
from utils import logdir_helpers
from collections import defaultdict
from fjcommon import functools_ext as ft
f... | 37.304636 | 118 | 0.650985 |
1b09c96060e99d69a41efe3615e2a630b16fe7b1 | 18,056 | py | Python | guestbook.py | Wangchl2016/Music-Library | 0351d36b98a45e689ce2ec1c014e9f7ac88ff6ce | [
"Apache-2.0"
] | null | null | null | guestbook.py | Wangchl2016/Music-Library | 0351d36b98a45e689ce2ec1c014e9f7ac88ff6ce | [
"Apache-2.0"
] | null | null | null | guestbook.py | Wangchl2016/Music-Library | 0351d36b98a45e689ce2ec1c014e9f7ac88ff6ce | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/env python
from __future__ import unicode_literals
# Copyright 2016 Google Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICEN... | 32.829091 | 79 | 0.562528 |
1b0a112beb6f9b817075fb1f13f1e51e8667d3a1 | 2,245 | py | Python | tests/e2e_test.py | david-wirelab/tf-localstack | b92f1e3ddbaf1f643ffd8b30aa9dd7969c350969 | [
"MIT"
] | null | null | null | tests/e2e_test.py | david-wirelab/tf-localstack | b92f1e3ddbaf1f643ffd8b30aa9dd7969c350969 | [
"MIT"
] | null | null | null | tests/e2e_test.py | david-wirelab/tf-localstack | b92f1e3ddbaf1f643ffd8b30aa9dd7969c350969 | [
"MIT"
] | null | null | null | import os
import unittest
from runner import Runner
MODULE_NAME = "e2e"
RESOURCE_TYPE = "aws_vpc.this"
if __name__ == '__main__':
unittest.main()
| 37.416667 | 117 | 0.460579 |
1b0a363108dd0c38113cdb177788d3d39fa06984 | 854 | py | Python | statistics/phoneNumber.py | SLIPO-EU/poi-data-exploration | 4d11a14423a5b68c56da4131e67ff36e11dabe16 | [
"Apache-2.0"
] | 1 | 2019-02-25T09:36:36.000Z | 2019-02-25T09:36:36.000Z | statistics/phoneNumber.py | SLIPO-EU/poi-data-exploration | 4d11a14423a5b68c56da4131e67ff36e11dabe16 | [
"Apache-2.0"
] | null | null | null | statistics/phoneNumber.py | SLIPO-EU/poi-data-exploration | 4d11a14423a5b68c56da4131e67ff36e11dabe16 | [
"Apache-2.0"
] | null | null | null | import pandas as pd
import numpy as np
from collections import OrderedDict
from .statistics import Statistics
| 35.583333 | 67 | 0.569087 |
1b0a78407a818985d4fb61e0d744f1663cbde1b1 | 2,256 | py | Python | tests/e2e/test_service.py | bleckfisk/audio-transcoder | e66e8c0038c594c12b84dd12fdcbc30d28b2263b | [
"MIT"
] | null | null | null | tests/e2e/test_service.py | bleckfisk/audio-transcoder | e66e8c0038c594c12b84dd12fdcbc30d28b2263b | [
"MIT"
] | 1 | 2022-01-12T21:06:30.000Z | 2022-01-12T21:06:30.000Z | tests/e2e/test_service.py | bleckfisk/audio-transcoder | e66e8c0038c594c12b84dd12fdcbc30d28b2263b | [
"MIT"
] | 1 | 2020-02-20T07:40:57.000Z | 2020-02-20T07:40:57.000Z | from pydub import AudioSegment
import os
from pydub.utils import mediainfo
from unittest import mock
from service.core import process_message
from service.aws_boto3 import (
listen_sqs_queue,
create_s3_resource,
create_sqs_resource,
)
from service.settings import (
REQUEST_QUEUE_NAME
)
"""
These two f... | 27.512195 | 78 | 0.698582 |
1b0cffde6a4bdaa088def23eae68fff02a1bde5e | 3,156 | py | Python | src/vccs/server/password.py | SUNET/VCCS2 | e5645bf19b92c1420559355b2bb1592792a6777b | [
"BSD-2-Clause"
] | null | null | null | src/vccs/server/password.py | SUNET/VCCS2 | e5645bf19b92c1420559355b2bb1592792a6777b | [
"BSD-2-Clause"
] | null | null | null | src/vccs/server/password.py | SUNET/VCCS2 | e5645bf19b92c1420559355b2bb1592792a6777b | [
"BSD-2-Clause"
] | null | null | null | from typing import List, Union
from binascii import unhexlify
from ndnkdf import NDNKDF
from vccs.server.db import PasswordCredential
from vccs.server.factors import RequestFactor
from vccs.server.hasher import VCCSYHSMHasher
from vccs.server.log import audit_log
| 41.526316 | 123 | 0.676806 |
1b0d0f7270ae5a49b20324d6bac9fd80de40cf21 | 1,226 | py | Python | src/magplan/xmd/tests/test_utils.py | f1nnix/magplan | 1bda6b53c6e96129e6634bff786b3052d04b0cef | [
"Unlicense"
] | 21 | 2018-12-14T09:08:11.000Z | 2022-01-28T14:33:24.000Z | src/magplan/xmd/tests/test_utils.py | f1nnix/magplan | 1bda6b53c6e96129e6634bff786b3052d04b0cef | [
"Unlicense"
] | 20 | 2019-01-11T20:40:01.000Z | 2022-01-30T16:01:38.000Z | src/magplan/xmd/tests/test_utils.py | f1nnix/magplan | 1bda6b53c6e96129e6634bff786b3052d04b0cef | [
"Unlicense"
] | 5 | 2019-02-08T01:21:51.000Z | 2021-11-25T17:43:04.000Z | import io
from unittest import TestCase
import pytest
from django.core.files import File
from django_dynamic_fixture import G
from magplan.models import Attachment
from magplan.xmd.utils import get_attachment_original_filename
| 33.135135 | 100 | 0.707993 |
1b0ed233a468637761bc287409daba800a6b9ca3 | 17,877 | py | Python | topnum/utils.py | machine-intelligence-laboratory/OptimalNumberOfTopics | 87267223987a4cb54b3f0ec431e87ee684044c7b | [
"MIT"
] | 5 | 2020-05-06T14:13:54.000Z | 2020-09-06T15:54:01.000Z | topnum/utils.py | machine-intelligence-laboratory/OptimalNumberOfTopics | 87267223987a4cb54b3f0ec431e87ee684044c7b | [
"MIT"
] | 54 | 2020-02-10T07:08:31.000Z | 2020-09-08T21:45:39.000Z | topnum/utils.py | machine-intelligence-laboratory/OptimalNumberOfTopics | 87267223987a4cb54b3f0ec431e87ee684044c7b | [
"MIT"
] | 2 | 2021-01-16T08:40:25.000Z | 2021-06-04T05:35:36.000Z | import glob
import numpy as np
import os
import pandas as pd
import strictyaml
import tempfile
import shutil
import warnings
from collections import defaultdict
from inspect import signature
from strictyaml import Map, Str, Optional, Int, CommaSeparated
import topicnet
from topicnet.cooking_machine.dataset import Da... | 31.753108 | 100 | 0.654976 |
1b11280aec2954ad2cb925dd13d21f509185c325 | 4,757 | py | Python | approaches/networkx-graph/pac_naive_regexp_checker.py | athityakumar/btp | a1bdad0ed6162faa482673347707c09228d6cd9c | [
"MIT"
] | 1 | 2022-01-26T15:51:30.000Z | 2022-01-26T15:51:30.000Z | approaches/networkx-graph/pac_naive_regexp_checker.py | athityakumar/btp | a1bdad0ed6162faa482673347707c09228d6cd9c | [
"MIT"
] | 7 | 2017-08-25T12:36:20.000Z | 2018-04-23T04:08:38.000Z | approaches/networkx-graph/pac_naive_regexp_checker.py | athityakumar/btp | a1bdad0ed6162faa482673347707c09228d6cd9c | [
"MIT"
] | null | null | null | from pac_library import *
from regexp_naive import *
language = 'polish'
testing_words = fetch_testing_words(language)
concept = init_dataset(language)
print('Initialized concept')
start1 = time.clock()
pac = concept.pac_basis(concept.is_member, 0.3, 0.4)
end1 = time.clock() - start1
exact_word_match = 0
n_words = ... | 36.037879 | 145 | 0.741644 |
1b11d7196c949a260576fffad7c4fd1f42930580 | 454 | py | Python | product/urls.py | Gandabh/E-commerce-Site | 8bc4ca85c9cd6f3ed1435e5767aef4ab315df559 | [
"MIT"
] | 1 | 2022-01-01T21:46:48.000Z | 2022-01-01T21:46:48.000Z | product/urls.py | Gandabh/E-commerce-Site | 8bc4ca85c9cd6f3ed1435e5767aef4ab315df559 | [
"MIT"
] | null | null | null | product/urls.py | Gandabh/E-commerce-Site | 8bc4ca85c9cd6f3ed1435e5767aef4ab315df559 | [
"MIT"
] | null | null | null | from django.urls import path,include
from product.views import (
ProductDetailView,
ProductView,
shopping_cart,
wishlist
)
app_name='product'
urlpatterns = [
path('product-detail/<int:pk>/', ProductDetailView.as_view(),name='product_detail'),
path('product-list/', ProductView.as_view(),name=... | 21.619048 | 88 | 0.702643 |
1b11dd7f020db59bea173f520097d51262b0c2fe | 66 | py | Python | Problems/A complex expression/task.py | gabrielizalo/jetbrains-academy-zookeeper | 467b43da3cb81f82987daf6b063eb2078d476d4f | [
"MIT"
] | null | null | null | Problems/A complex expression/task.py | gabrielizalo/jetbrains-academy-zookeeper | 467b43da3cb81f82987daf6b063eb2078d476d4f | [
"MIT"
] | null | null | null | Problems/A complex expression/task.py | gabrielizalo/jetbrains-academy-zookeeper | 467b43da3cb81f82987daf6b063eb2078d476d4f | [
"MIT"
] | null | null | null | n = int(input())
new_n = ((((n * 2) * n) - n) // n)
print(new_n)
| 13.2 | 34 | 0.439394 |
1b11ee2a8c6b97121d035177bf542ec2e234d162 | 1,346 | py | Python | GestureAgentsDemo/Utils.py | chaosct/GestureAgents | 9ec0adb1e59bf995d5808431edd4cb8bf8907728 | [
"MIT"
] | 1 | 2015-01-22T10:42:09.000Z | 2015-01-22T10:42:09.000Z | GestureAgentsDemo/Utils.py | chaosct/GestureAgents | 9ec0adb1e59bf995d5808431edd4cb8bf8907728 | [
"MIT"
] | null | null | null | GestureAgentsDemo/Utils.py | chaosct/GestureAgents | 9ec0adb1e59bf995d5808431edd4cb8bf8907728 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
from GestureAgentsDemo.Render import Update, drawBatch
from pyglet.text import Label
from pyglet.clock import schedule_once
| 28.638298 | 67 | 0.559435 |
1b134054808512cec966fe38a018749a27aa30c8 | 1,437 | py | Python | jiant/tasks/lib/mbe.py | zlucia/jiant | 24aa148b6c617c82a635cd2a526dc4be5129e330 | [
"MIT"
] | null | null | null | jiant/tasks/lib/mbe.py | zlucia/jiant | 24aa148b6c617c82a635cd2a526dc4be5129e330 | [
"MIT"
] | null | null | null | jiant/tasks/lib/mbe.py | zlucia/jiant | 24aa148b6c617c82a635cd2a526dc4be5129e330 | [
"MIT"
] | null | null | null | from dataclasses import dataclass
from jiant.tasks.lib.templates.shared import labels_to_bimap
from jiant.tasks.lib.templates import multiple_choice as mc_template
from jiant.utils.python.io import read_jsonl
class MbeTask(mc_template.AbstractMultipleChoiceTask):
Example = Example
TokenizedExample = TokenizedExampl... | 24.775862 | 83 | 0.727905 |
1b14ba6dfc104cd29d8728d7b3da4a46ddc37365 | 1,590 | py | Python | tcfcli/cmds/native/common/runtime/python3.6/pstool/winps.py | alfredhuang211/scfcli | f5e086ff4fcee8d645682e85cd1486b28a224d08 | [
"Apache-2.0"
] | 103 | 2019-06-11T06:09:56.000Z | 2021-12-18T22:48:59.000Z | tcfcli/cmds/native/common/runtime/python3.6/pstool/winps.py | TencentCloud/Serverless-cli | 57f98b24cfd10712770a4806212cfb69d981a11a | [
"Apache-2.0"
] | 8 | 2019-07-12T12:08:40.000Z | 2020-10-20T07:18:17.000Z | tcfcli/cmds/native/common/runtime/python3.6/pstool/winps.py | TencentCloud/Serverless-cli | 57f98b24cfd10712770a4806212cfb69d981a11a | [
"Apache-2.0"
] | 49 | 2019-06-11T06:26:05.000Z | 2020-02-19T08:13:36.000Z | __all__ = ['win_peak_memory']
import ctypes
from ctypes import wintypes
GetCurrentProcess = ctypes.windll.kernel32.GetCurrentProcess
GetCurrentProcess.argtypes = []
GetCurrentProcess.restype = wintypes.HANDLE
SIZE_T = ctypes.c_size_t
GetProcessMemoryInfo = ctypes.windll.psapi.GetProcessMemoryInfo
GetProcessMemoryIn... | 32.44898 | 81 | 0.692453 |
1b1629216fd1f26d4a22e42ef8c1b7d156606871 | 3,120 | py | Python | trojai/test/modelgen/test_modelgen_config.py | C0ldstudy/trojai | 10ac6c719f367a569a48b19e7ef18cf90df3a310 | [
"Apache-2.0"
] | 59 | 2019-07-11T02:33:38.000Z | 2022-02-02T01:51:29.000Z | trojai/test/modelgen/test_modelgen_config.py | C0ldstudy/trojai | 10ac6c719f367a569a48b19e7ef18cf90df3a310 | [
"Apache-2.0"
] | 4 | 2020-04-13T03:48:32.000Z | 2021-09-11T05:13:57.000Z | trojai/test/modelgen/test_modelgen_config.py | C0ldstudy/trojai | 10ac6c719f367a569a48b19e7ef18cf90df3a310 | [
"Apache-2.0"
] | 19 | 2019-09-17T21:09:06.000Z | 2022-03-31T17:55:18.000Z | import unittest
from unittest.mock import Mock
import os
import shutil
import tempfile
import torchvision.models as models
from trojai.modelgen.architecture_factory import ArchitectureFactory
from trojai.modelgen.data_manager import DataManager
from trojai.modelgen.config import ModelGeneratorConfig
def tearD... | 35.454545 | 109 | 0.707692 |
1b18622eafedd5518564e3002df72bcc43626932 | 1,006 | py | Python | geolucidate/links/yahoo.py | kurtraschke/geolucidate | 827195a90d972fa5efce5a03bdbe53d8395d94ba | [
"MIT"
] | 3 | 2015-09-17T01:01:53.000Z | 2019-09-10T14:30:43.000Z | geolucidate/links/yahoo.py | kurtraschke/geolucidate | 827195a90d972fa5efce5a03bdbe53d8395d94ba | [
"MIT"
] | null | null | null | geolucidate/links/yahoo.py | kurtraschke/geolucidate | 827195a90d972fa5efce5a03bdbe53d8395d94ba | [
"MIT"
] | 5 | 2018-09-11T21:54:36.000Z | 2020-06-25T19:05:45.000Z | from geolucidate.links.tools import default_link
def yahoo_maps_link(type='hybrid', link=default_link):
'''
Returns a function for generating links to Yahoo Maps.
:param type: map type, one of 'map', 'satellite', or 'hybrid'
:param link: Link-generating function; defaults to :func:`~.default_link`
... | 37.259259 | 149 | 0.593439 |
1b1be0edc4e55b6e8f3880be837ef0d3a77f96c8 | 4,056 | py | Python | config/settings/common.py | cni-iisc/campus-rakshak-simulator-app | ef30a1fb57b72d25534945526fdb77d158ad16c1 | [
"Apache-2.0"
] | 1 | 2021-07-29T10:33:26.000Z | 2021-07-29T10:33:26.000Z | config/settings/common.py | cni-iisc/campus-rakshak-simulator-app | ef30a1fb57b72d25534945526fdb77d158ad16c1 | [
"Apache-2.0"
] | null | null | null | config/settings/common.py | cni-iisc/campus-rakshak-simulator-app | ef30a1fb57b72d25534945526fdb77d158ad16c1 | [
"Apache-2.0"
] | null | null | null | """
Common Django settings for campussim project.
"""
from pathlib import Path
# Build paths inside the project like this: BASE_DIR / 'subdir'.
BASE_DIR = Path(__file__).resolve().parent.parent.parent
# Application definition
INSTALLED_APPS = [
### Django apps for core functionalitites and packages for static fi... | 27.221477 | 99 | 0.664201 |
1b1be2d213dcec1a57e7aabc55b73fed9c642944 | 4,784 | py | Python | Scenarii/S_Bargaining.py | lesyk/Evolife | 8e3dd1aab84061f7ce082f3a4b1bac0b2e31bc4a | [
"MIT"
] | null | null | null | Scenarii/S_Bargaining.py | lesyk/Evolife | 8e3dd1aab84061f7ce082f3a4b1bac0b2e31bc4a | [
"MIT"
] | null | null | null | Scenarii/S_Bargaining.py | lesyk/Evolife | 8e3dd1aab84061f7ce082f3a4b1bac0b2e31bc4a | [
"MIT"
] | null | null | null | ##############################################################################
# EVOLIFE www.dessalles.fr/Evolife Jean-Louis Dessalles #
# Telecom ParisTech 2014 www.dessalles.fr #
##############################################################################
... | 36.8 | 129 | 0.569607 |
1b1c2c85a3b57a89a03330a9170df389c8a29620 | 5,562 | py | Python | Mp3Processing.py | yNeshy/voice-change | 2535351bcd8a9f2d58fcbff81a2051c4f6ac6ab4 | [
"MIT"
] | null | null | null | Mp3Processing.py | yNeshy/voice-change | 2535351bcd8a9f2d58fcbff81a2051c4f6ac6ab4 | [
"MIT"
] | null | null | null | Mp3Processing.py | yNeshy/voice-change | 2535351bcd8a9f2d58fcbff81a2051c4f6ac6ab4 | [
"MIT"
] | null | null | null | # Aziz Nechi
# If you have any trouble with submitting to S3, please contact me. This part is on me.
# As for the conversion, the fetching from url and the sound editing, I have made sure
# of its veracity.
# Please make sure the url you provide is correct, and doesn't block downloads from
# unknown sources.
# Your ... | 29.903226 | 102 | 0.613448 |
1b1c52e5ecdb923c41a018a6b3a02d0c6487f70d | 16,783 | py | Python | pysnmp-with-texts/GUDEADS-EPC2X6-MIB.py | agustinhenze/mibs.snmplabs.com | 1fc5c07860542b89212f4c8ab807057d9a9206c7 | [
"Apache-2.0"
] | 8 | 2019-05-09T17:04:00.000Z | 2021-06-09T06:50:51.000Z | pysnmp-with-texts/GUDEADS-EPC2X6-MIB.py | agustinhenze/mibs.snmplabs.com | 1fc5c07860542b89212f4c8ab807057d9a9206c7 | [
"Apache-2.0"
] | 4 | 2019-05-31T16:42:59.000Z | 2020-01-31T21:57:17.000Z | pysnmp-with-texts/GUDEADS-EPC2X6-MIB.py | agustinhenze/mibs.snmplabs.com | 1fc5c07860542b89212f4c8ab807057d9a9206c7 | [
"Apache-2.0"
] | 10 | 2019-04-30T05:51:36.000Z | 2022-02-16T03:33:41.000Z | #
# PySNMP MIB module GUDEADS-EPC2X6-MIB (http://snmplabs.com/pysmi)
# ASN.1 source file:///Users/davwang4/Dev/mibs.snmplabs.com/asn1/GUDEADS-EPC2X6-MIB
# Produced by pysmi-0.3.4 at Wed May 1 13:20:33 2019
# On host DAVWANG4-M-1475 platform Darwin version 18.5.0 by user davwang4
# Using Python version 3.7.3 (default, ... | 123.404412 | 1,509 | 0.771018 |
1b1ea6c3e05799e453822258bb77692c266ee6a2 | 5,343 | py | Python | jsonwspclient/jsonwspresponse.py | ellethee/jsonwspclient | cafd6d5ee27d686329338bd861ae85a69eeaeb4b | [
"MIT"
] | 2 | 2018-03-22T10:29:46.000Z | 2019-09-26T16:58:20.000Z | jsonwspclient/jsonwspresponse.py | ellethee/jsonwspclient | cafd6d5ee27d686329338bd861ae85a69eeaeb4b | [
"MIT"
] | null | null | null | jsonwspclient/jsonwspresponse.py | ellethee/jsonwspclient | cafd6d5ee27d686329338bd861ae85a69eeaeb4b | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
"""
====================================================
Jsonwspresponse :mod:`jsonwspclient.jsonwspresponse`
====================================================
"""
import logging
from . import jsonwspexceptions as excs
from . import jsonwsputils as utils
from .jsonwspmultipart import MultiPa... | 33.186335 | 84 | 0.588059 |
1b1ea87d3f6b885e2e8969541f99adfc341e78c0 | 503 | py | Python | src/ResNeXt/filterPath.py | willyspinner/High-Performance-Face-Recognition | c5caad61be97fd20f9c47a727278ff938dc5cc8f | [
"MIT"
] | 300 | 2019-01-28T07:37:53.000Z | 2022-03-09T02:17:28.000Z | src/ResNeXt/filterPath.py | willyspinner/High-Performance-Face-Recognition | c5caad61be97fd20f9c47a727278ff938dc5cc8f | [
"MIT"
] | 15 | 2019-04-22T14:23:01.000Z | 2021-11-24T09:52:32.000Z | src/ResNeXt/filterPath.py | willyspinner/High-Performance-Face-Recognition | c5caad61be97fd20f9c47a727278ff938dc5cc8f | [
"MIT"
] | 67 | 2019-01-29T05:42:09.000Z | 2021-12-28T11:09:44.000Z | # /Volumes/usb1/ms2/
#
# /media/usbstick/MS_challenge1_train_data
#
#
with open('MStrainFloat.lst', 'r') as f:
lines = f.readlines()
counter = 0
content = ""
for line in lines:
line = line.replace("/Volumes/usb1/ms2/", "/media/usbstick/MS_challenge1_train_data/")
line = line.replace('.jpg', '.png')
content += li... | 20.12 | 87 | 0.675944 |
1b26031be43a4955c5bab323a43414cfbaa1a9e0 | 8,986 | py | Python | onir/pipelines/catfog.py | tgeral68/OpenNIR | 225b26185bd67fdc00f24de3ef70d35768e22243 | [
"MIT"
] | 3 | 2021-01-07T15:44:38.000Z | 2021-08-23T03:44:47.000Z | onir/pipelines/catfog.py | tgeral68/OpenNIR | 225b26185bd67fdc00f24de3ef70d35768e22243 | [
"MIT"
] | null | null | null | onir/pipelines/catfog.py | tgeral68/OpenNIR | 225b26185bd67fdc00f24de3ef70d35768e22243 | [
"MIT"
] | 1 | 2021-11-16T09:10:47.000Z | 2021-11-16T09:10:47.000Z | import os
import json
from onir import util, pipelines
import onir
import pickle
| 41.795349 | 130 | 0.565546 |
1b2697174f5d2dc5ca43b4d1d3656b250a65909a | 6,514 | py | Python | web/libraries/StoryMapJS/s3analysis/s3analysis.py | cainaru/d8-digital-stlawu | ad60dae2b9ce2bd51a6b7a96173c7139149dad2f | [
"MIT"
] | null | null | null | web/libraries/StoryMapJS/s3analysis/s3analysis.py | cainaru/d8-digital-stlawu | ad60dae2b9ce2bd51a6b7a96173c7139149dad2f | [
"MIT"
] | 4 | 2020-03-31T18:38:08.000Z | 2021-04-30T21:08:46.000Z | web/libraries/StoryMapJS/s3analysis/s3analysis.py | cainaru/d8-digital-stlawu | ad60dae2b9ce2bd51a6b7a96173c7139149dad2f | [
"MIT"
] | null | null | null | import importlib
import os
import sys
try:
import unicodecsv as csv
except ImportError:
print "warning: unicodecsv not found. Please install it"
import csv
from urlparse import urlparse
import json
settings_module = os.environ.setdefault('FLASK_SETTINGS_MODULE', 'core.settings.loc') # other StoryMap code ex... | 37.011364 | 136 | 0.610071 |
1b27721ad20a6f967e898161ac04a023ab310d6a | 339 | py | Python | Part 1/Chapter 3/exercise_3.9.py | kg55555/pypractice | 1867f001b3d2a7174ea00d7b9e2fa22e9f1877ef | [
"MIT"
] | null | null | null | Part 1/Chapter 3/exercise_3.9.py | kg55555/pypractice | 1867f001b3d2a7174ea00d7b9e2fa22e9f1877ef | [
"MIT"
] | null | null | null | Part 1/Chapter 3/exercise_3.9.py | kg55555/pypractice | 1867f001b3d2a7174ea00d7b9e2fa22e9f1877ef | [
"MIT"
] | null | null | null | famous = ['steve jobs','bill gates', 'gandhi']
print(f"Hello {famous[0].title()}, I'd like to invite you to dinner with me!")
print(f"Hello {famous[1].title()}, I'd like to invite you to dinner with me!")
print(f"Hello {famous[2].title()}, I'd like to invite you to dinner with me!")
print("I'm inviting",len(famous), "p... | 56.5 | 78 | 0.678466 |
1b2813992eae1e2879e14dffe5915bc48353325b | 291 | py | Python | measure_mate/tests/docs/test_docs.py | niche-tester/measure-mate | c3acba57747bcb89fe0c6b9509ec90f04a581506 | [
"MIT"
] | 15 | 2015-12-14T02:20:31.000Z | 2022-01-30T04:36:39.000Z | measure_mate/tests/docs/test_docs.py | rloomans/measure-mate | e89f9c8e1faa1920496f1c997f6d87ec0f9bd7c2 | [
"MIT"
] | 1,403 | 2017-02-16T01:00:04.000Z | 2022-03-15T21:12:13.000Z | measure_mate/tests/docs/test_docs.py | rloomans/measure-mate | e89f9c8e1faa1920496f1c997f6d87ec0f9bd7c2 | [
"MIT"
] | 10 | 2015-12-18T01:30:46.000Z | 2022-01-30T04:36:41.000Z | from django.test import TestCase
from django.urls import reverse
from rest_framework import status
| 29.1 | 66 | 0.773196 |
1b286add96d725a4355a582d1095f8902eb24f33 | 1,425 | py | Python | launch/no_roof_small_warehouse.launch.py | ros2-gbp/aws_robomaker_small_warehouse_world-release | 6c3f0c113772b0148e1b50dcdd45269869622d5d | [
"MIT-0"
] | 1 | 2022-02-24T21:33:26.000Z | 2022-02-24T21:33:26.000Z | launch/no_roof_small_warehouse.launch.py | ros2-gbp/aws_robomaker_small_warehouse_world-release | 6c3f0c113772b0148e1b50dcdd45269869622d5d | [
"MIT-0"
] | 1 | 2022-03-31T00:36:19.000Z | 2022-03-31T00:36:19.000Z | launch/no_roof_small_warehouse.launch.py | ros2-gbp/aws_robomaker_small_warehouse_world-release | 6c3f0c113772b0148e1b50dcdd45269869622d5d | [
"MIT-0"
] | 1 | 2022-03-11T05:24:38.000Z | 2022-03-11T05:24:38.000Z | # Copyright (c) 2018 Intel Corporation
#
# 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... | 38.513514 | 175 | 0.739649 |
1b28b59d6ecded6cdbfbf6ca62928fab85bd51f4 | 2,028 | py | Python | analysis/att_weights.py | sagarika1101/twitter_abusive_behavior_detection | edf90364d10f44aa6ace4d54ef9ed1f9bf495c0c | [
"Apache-2.0"
] | 1 | 2021-09-24T08:51:38.000Z | 2021-09-24T08:51:38.000Z | analysis/att_weights.py | sagarika1101/twitter_abusive_behavior_detection | edf90364d10f44aa6ace4d54ef9ed1f9bf495c0c | [
"Apache-2.0"
] | null | null | null | analysis/att_weights.py | sagarika1101/twitter_abusive_behavior_detection | edf90364d10f44aa6ace4d54ef9ed1f9bf495c0c | [
"Apache-2.0"
] | null | null | null | from keras.models import model_from_json
from sklearn.metrics import classification_report
from load_data import read_file, preprocess_doc, \
pad_sequences, build_input_data_rnn, build_vocab
from model import AttentionWithContext, dot_product
# load json and create model
json_file = open('model.json', 'r')
loaded... | 28.971429 | 74 | 0.727811 |
1b2c3495062849e7ab61a70eaff4509c4559a318 | 879 | py | Python | examples/examples.py | benjaminkrenn/perpetual | b8925636391baf5a96daa20adf8741f4fd965f30 | [
"MIT"
] | null | null | null | examples/examples.py | benjaminkrenn/perpetual | b8925636391baf5a96daa20adf8741f4fd965f30 | [
"MIT"
] | null | null | null | examples/examples.py | benjaminkrenn/perpetual | b8925636391baf5a96daa20adf8741f4fd965f30 | [
"MIT"
] | 1 | 2019-12-20T08:33:54.000Z | 2019-12-20T08:33:54.000Z | # A simple example
# Author: Martin Lackner
from __future__ import print_function
import sys
sys.path.insert(0, '..')
import profiles
import perpetual_rules as perpetual
apprsets1 = {1: [1], 2: [1], 3: [2], 4: [3]}
apprsets2 = {1: [1], 2: [2], 3: [2], 4: [3]}
apprsets3 = {1: [1], 2: [1], 3: [2], 4: [3]}
voters = [1... | 28.354839 | 72 | 0.709898 |
1b2c403fc778412b306d10be87e5d0448be413c4 | 424 | py | Python | database.py | dwang/discord-logger | db476659265ee24fa97c5ba3d6cde65192214ab7 | [
"MIT"
] | null | null | null | database.py | dwang/discord-logger | db476659265ee24fa97c5ba3d6cde65192214ab7 | [
"MIT"
] | null | null | null | database.py | dwang/discord-logger | db476659265ee24fa97c5ba3d6cde65192214ab7 | [
"MIT"
] | null | null | null | import os
from pymongo import MongoClient
client = MongoClient(os.getenv("MONGODB_IP", "127.0.0.1"), 27017)
db = client.discord_logger
| 23.555556 | 67 | 0.632075 |
1b2c5562aee4802c9392f1d199a158fa1f1ff402 | 1,337 | py | Python | azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/sql_data_directory.py | JonathanGailliez/azure-sdk-for-python | f0f051bfd27f8ea512aea6fc0c3212ee9ee0029b | [
"MIT"
] | 1 | 2021-09-07T18:36:04.000Z | 2021-09-07T18:36:04.000Z | azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/sql_data_directory.py | JonathanGailliez/azure-sdk-for-python | f0f051bfd27f8ea512aea6fc0c3212ee9ee0029b | [
"MIT"
] | 2 | 2019-10-02T23:37:38.000Z | 2020-10-02T01:17:31.000Z | azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/sql_data_directory.py | JonathanGailliez/azure-sdk-for-python | f0f051bfd27f8ea512aea6fc0c3212ee9ee0029b | [
"MIT"
] | 1 | 2019-06-17T22:18:23.000Z | 2019-06-17T22:18:23.000Z | # coding=utf-8
# --------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for
# license information.
#
# Code generated by Microsoft (R) AutoRest Code Generator.
# Changes ... | 34.282051 | 76 | 0.586387 |
1b2d742a0714e44102b52b79bd7b5c21748364f9 | 182 | py | Python | iostream/__init__.py | revival0728/py-iostream | 5fe441e13f7054d091a4215ab23655a9b7d5eeac | [
"MIT"
] | null | null | null | iostream/__init__.py | revival0728/py-iostream | 5fe441e13f7054d091a4215ab23655a9b7d5eeac | [
"MIT"
] | null | null | null | iostream/__init__.py | revival0728/py-iostream | 5fe441e13f7054d091a4215ab23655a9b7d5eeac | [
"MIT"
] | null | null | null | import sys
from .istream import istream
from .ostream import ostream
from .io import pin
from .io import pout
from .io import perr
sys.settrace(io.__iostream_checker__) # need fix | 20.222222 | 49 | 0.791209 |
1b30e9bcb03004d191594b655b0f016407530407 | 5,278 | py | Python | functions_ordered.py | mpleung/equil_compute | 13c5d6488f894c1b2e7b539780dfa1c69e6e8133 | [
"MIT"
] | null | null | null | functions_ordered.py | mpleung/equil_compute | 13c5d6488f894c1b2e7b539780dfa1c69e6e8133 | [
"MIT"
] | null | null | null | functions_ordered.py | mpleung/equil_compute | 13c5d6488f894c1b2e7b539780dfa1c69e6e8133 | [
"MIT"
] | null | null | null | import numpy as np, pandas as pd, networkx as nx, itertools, sys, traceback
def assemble_data(data_folder):
"""
We don't include a dummy for missings for data.church because Card and Guiliano do not report its coefficient. We don't include a dummy for missings for data.parent_HS, data.parent_college because Ca... | 49.327103 | 359 | 0.650057 |
1b31b9d96e061908cd3c5890a8759f6fcf9c8be8 | 14,428 | py | Python | cottonformation/res/sso.py | MacHu-GWU/cottonformation-project | 23e28c08cfb5a7cc0db6dbfdb1d7e1585c773f3b | [
"BSD-2-Clause"
] | 5 | 2021-07-22T03:45:59.000Z | 2021-12-17T21:07:14.000Z | cottonformation/res/sso.py | MacHu-GWU/cottonformation-project | 23e28c08cfb5a7cc0db6dbfdb1d7e1585c773f3b | [
"BSD-2-Clause"
] | 1 | 2021-06-25T18:01:31.000Z | 2021-06-25T18:01:31.000Z | cottonformation/res/sso.py | MacHu-GWU/cottonformation-project | 23e28c08cfb5a7cc0db6dbfdb1d7e1585c773f3b | [
"BSD-2-Clause"
] | 2 | 2021-06-27T03:08:21.000Z | 2021-06-28T22:15:51.000Z | # -*- coding: utf-8 -*-
"""
This module
"""
import attr
import typing
from ..core.model import (
Property, Resource, Tag, GetAtt, TypeHint, TypeCheck,
)
from ..core.constant import AttrMeta
#--- Property declaration ---
#--- Resource declaration ---
| 61.65812 | 265 | 0.7771 |
1b3291fd4770bd69c2af0fd2c1b2340f6739c8dc | 1,184 | py | Python | ee/models/dashboard_privilege.py | msnitish/posthog | cb86113f568e72eedcb64b5fd00c313d21e72f90 | [
"MIT"
] | null | null | null | ee/models/dashboard_privilege.py | msnitish/posthog | cb86113f568e72eedcb64b5fd00c313d21e72f90 | [
"MIT"
] | null | null | null | ee/models/dashboard_privilege.py | msnitish/posthog | cb86113f568e72eedcb64b5fd00c313d21e72f90 | [
"MIT"
] | null | null | null | from django.db import models
from posthog.models.dashboard import Dashboard
from posthog.models.utils import UUIDModel, sane_repr
# We call models that grant a user access to some resource (which isn't a grouping of users) a "privilege"
| 39.466667 | 113 | 0.735642 |
1b33c63a9914002051440cf798e5f124574105d1 | 3,496 | py | Python | niphlem/report/html_report.py | CoAxLab/brainhack-physio-project | b87cd6c6db486639f271b786ca1cf4aa27a70fad | [
"BSD-3-Clause"
] | 1 | 2022-03-13T14:33:44.000Z | 2022-03-13T14:33:44.000Z | niphlem/report/html_report.py | CoAxLab/niphlem | a275cfe0b6286fcb8a60a2d999354453804dd5d2 | [
"BSD-3-Clause"
] | 11 | 2021-12-07T03:33:13.000Z | 2022-02-28T20:41:12.000Z | niphlem/report/html_report.py | CoAxLab/brainhack-physio-project | b87cd6c6db486639f271b786ca1cf4aa27a70fad | [
"BSD-3-Clause"
] | null | null | null | import weakref
from html import escape
import warnings
MAX_IMG_VIEWS_BEFORE_WARNING = 10
| 32.672897 | 78 | 0.606407 |
1b33d7ab4bd7f7cef81cb68e4a2eedff151354aa | 1,244 | py | Python | onegram/utils/validation.py | pauloromeira/onegram | 8294e237e8b8aa70c783347e42ea03d24098c48e | [
"MIT"
] | 150 | 2018-03-17T20:38:43.000Z | 2020-11-18T14:08:06.000Z | onegram/utils/validation.py | pauloromeira/onegram | 8294e237e8b8aa70c783347e42ea03d24098c48e | [
"MIT"
] | 14 | 2018-04-08T11:39:59.000Z | 2019-08-10T14:16:23.000Z | onegram/utils/validation.py | pauloromeira/onegram | 8294e237e8b8aa70c783347e42ea03d24098c48e | [
"MIT"
] | 11 | 2018-03-22T04:34:29.000Z | 2021-06-10T10:55:35.000Z | import json
from ..exceptions import AuthFailed, AuthUserError
from ..exceptions import RequestFailed, RateLimitedError
| 26.468085 | 57 | 0.611736 |
1b33e3d9d852feb57054b91aa6e7e0dcf90b25fb | 4,640 | py | Python | evil-dir/actual_sploit.py | nxkennedy/shakedown | 280a466582bb8009d96dda5a69cbf296a11709c5 | [
"MIT"
] | null | null | null | evil-dir/actual_sploit.py | nxkennedy/shakedown | 280a466582bb8009d96dda5a69cbf296a11709c5 | [
"MIT"
] | null | null | null | evil-dir/actual_sploit.py | nxkennedy/shakedown | 280a466582bb8009d96dda5a69cbf296a11709c5 | [
"MIT"
] | null | null | null | !/usr/bin/python
# Exploit Title: FTPGetter 5.89.0.85 Remote SEH Buffer Overflow
# Date: 07/14/2017
# Exploit Author: Paul Purcell
# Contact: ptpxploit at gmail
# Vendor Homepage: https://www.ftpgetter.com/
# Vulnerable Version Download: Available for 30 days here: (https://ufile.io/2celn) I can upload again upon requ... | 46.4 | 147 | 0.694397 |
1b34f890df60f44c950ca436484410e7cfce1929 | 882 | py | Python | models/convnet.py | nitesh4146/bumblebee | 808261c44c0a5470fc0e969c2fda7c2a3fd2088e | [
"MIT"
] | null | null | null | models/convnet.py | nitesh4146/bumblebee | 808261c44c0a5470fc0e969c2fda7c2a3fd2088e | [
"MIT"
] | null | null | null | models/convnet.py | nitesh4146/bumblebee | 808261c44c0a5470fc0e969c2fda7c2a3fd2088e | [
"MIT"
] | null | null | null | from keras import models, optimizers
from keras.layers import Input, Dense, Activation, Flatten, Conv2D, Lambda, MaxPooling2D, Dropout
| 33.923077 | 98 | 0.6678 |
1b352ccb19fe75f43dea62f1c3041514829e96c3 | 5,233 | py | Python | sdk/python/tests/unit/test_proto_json.py | achals/feast | ce3ad0332edd6507e63fb80310c13d24952100d4 | [
"Apache-2.0"
] | 2,258 | 2020-05-17T02:41:07.000Z | 2022-03-31T22:30:57.000Z | sdk/python/tests/unit/test_proto_json.py | achals/feast | ce3ad0332edd6507e63fb80310c13d24952100d4 | [
"Apache-2.0"
] | 1,768 | 2020-05-16T05:37:28.000Z | 2022-03-31T23:30:05.000Z | sdk/python/tests/unit/test_proto_json.py | achals/feast | ce3ad0332edd6507e63fb80310c13d24952100d4 | [
"Apache-2.0"
] | 415 | 2020-05-16T18:21:27.000Z | 2022-03-31T09:59:10.000Z | import assertpy
import pytest
from google.protobuf.json_format import MessageToDict, Parse
from feast import proto_json
from feast.protos.feast.serving.ServingService_pb2 import (
FeatureList,
GetOnlineFeaturesResponse,
)
from feast.protos.feast.types.Value_pb2 import RepeatedValue
FieldValues = GetOnlineFeat... | 45.112069 | 106 | 0.68928 |
1b38ff047687aae355024d77f7e305c5f8f0b8c3 | 1,584 | py | Python | tests/test_models.py | andleb/rule-vetting | 57330c4e59affc89d6ae0ab5e619adb88e17c51e | [
"MIT"
] | null | null | null | tests/test_models.py | andleb/rule-vetting | 57330c4e59affc89d6ae0ab5e619adb88e17c51e | [
"MIT"
] | null | null | null | tests/test_models.py | andleb/rule-vetting | 57330c4e59affc89d6ae0ab5e619adb88e17c51e | [
"MIT"
] | 1 | 2021-11-16T22:03:58.000Z | 2021-11-16T22:03:58.000Z | from os.path import join as oj
import importlib
import numpy as np
import os
import rulevetting
import rulevetting.api.util
DATA_PATH = oj(os.path.dirname(os.path.abspath(__file__)), '..', 'data')
def test_models(project):
"""Check that each baseline is implemented properly
"""
if not project == 'None'... | 36.837209 | 93 | 0.688131 |
1b39de458bf4415b36a9987b04619b2b42b5117d | 634 | py | Python | ut_engine/start.py | justpic/ut_ali | 5173011c735cdbd4b1cb9becad3b69675993225a | [
"MIT"
] | 1 | 2021-07-08T01:30:07.000Z | 2021-07-08T01:30:07.000Z | ut_engine/start.py | justpic/ut_ali | 5173011c735cdbd4b1cb9becad3b69675993225a | [
"MIT"
] | null | null | null | ut_engine/start.py | justpic/ut_ali | 5173011c735cdbd4b1cb9becad3b69675993225a | [
"MIT"
] | null | null | null | #/usr/bin/python
#-*- coding: utf-8 -*-
#system modules
import sys
#add root path into the sys.path
# sys.path.append('./')
#custom modules
from Model.model import Model
if __name__ == "__main__":
if len(sys.argv)>1:
cmd=sys.argv[1]
if cmd=='score':
from evaluate import score
... | 21.133333 | 59 | 0.536278 |
1b3a078d3c031de0b5f904e504751cabdb4ea3b8 | 3,295 | py | Python | backend/core/tests.py | fabiomsrs/vinta_teste | c05ab993ae20f4c7a8df9e1fce2ac1ba5ce1f150 | [
"MIT"
] | null | null | null | backend/core/tests.py | fabiomsrs/vinta_teste | c05ab993ae20f4c7a8df9e1fce2ac1ba5ce1f150 | [
"MIT"
] | 3 | 2021-04-08T21:57:14.000Z | 2021-06-10T20:30:28.000Z | backend/core/tests.py | fabiomsrs/vinta_teste | c05ab993ae20f4c7a8df9e1fce2ac1ba5ce1f150 | [
"MIT"
] | null | null | null | from django.test import Client, RequestFactory, TestCase
from django.contrib.sessions.middleware import SessionMiddleware
from core.serializers import RepoSerializer
from core.models import Repo
from .views import *
import datetime
# Create your tests here.
| 33.622449 | 118 | 0.630046 |
1b3b3a87bbd82bb7b65edd23db6d4c072bb7d617 | 1,910 | py | Python | examples/sunflower_callback.py | neurophysik/jitcdde | 44d7ed6ad187d3591407155b6eeb063f73e462cd | [
"BSD-3-Clause"
] | 49 | 2016-10-24T10:00:33.000Z | 2022-03-27T11:03:51.000Z | examples/sunflower_callback.py | neurophysik/jitcdde | 44d7ed6ad187d3591407155b6eeb063f73e462cd | [
"BSD-3-Clause"
] | 45 | 2016-11-20T22:05:07.000Z | 2022-03-29T07:13:25.000Z | examples/sunflower_callback.py | neurophysik/jitcdde | 44d7ed6ad187d3591407155b6eeb063f73e462cd | [
"BSD-3-Clause"
] | 11 | 2016-11-14T07:19:16.000Z | 2022-03-16T14:27:06.000Z | # In this example, we implement the sunflower equation. First, we do it regularly, then we repeat the process using callbacks.
from jitcdde import jitcdde, y, t
import numpy as np
a = 4.8
b = 0.186
tau = 40
# Regular implementation
# ----------------------
# To implement the sine function, we use SymEngines sine. Th... | 33.508772 | 274 | 0.727749 |
1b3bea91a0d8eade96c2b7f6b821f5c913db2dcb | 3,249 | py | Python | examples/correct_nlg.py | drahnr/nlprule | ae208aa911cf46c96731ed4012aba9b03fa6242e | [
"Apache-2.0",
"MIT"
] | 412 | 2020-12-28T19:00:53.000Z | 2022-03-29T18:11:15.000Z | examples/correct_nlg.py | drahnr/nlprule | ae208aa911cf46c96731ed4012aba9b03fa6242e | [
"Apache-2.0",
"MIT"
] | 65 | 2021-01-01T19:24:39.000Z | 2022-02-04T11:05:42.000Z | examples/correct_nlg.py | drahnr/nlprule | ae208aa911cf46c96731ed4012aba9b03fa6242e | [
"Apache-2.0",
"MIT"
] | 35 | 2021-01-18T17:51:43.000Z | 2022-02-16T04:58:31.000Z | from collections import Counter
from datasets import load_dataset
from transformers import AutoModelForCausalLM, AutoTokenizer, pipeline
from nlprule import Rules, Tokenizer, SplitOn
from argparse import ArgumentParser
# gets a window from start - offset to end + offset or until a newline character is reached
if _... | 30.942857 | 91 | 0.615266 |
1b3ce1736d1cfa9705fe8c6171cbc3a878c29378 | 3,541 | py | Python | __main__.py | TatianaPorras/MNIG_to_FMMSP | 1a62884237a4133f1417982d88f8a1421a972a08 | [
"MIT"
] | null | null | null | __main__.py | TatianaPorras/MNIG_to_FMMSP | 1a62884237a4133f1417982d88f8a1421a972a08 | [
"MIT"
] | null | null | null | __main__.py | TatianaPorras/MNIG_to_FMMSP | 1a62884237a4133f1417982d88f8a1421a972a08 | [
"MIT"
] | 2 | 2021-05-24T03:25:26.000Z | 2022-01-27T23:59:03.000Z | from algorithms import DNEH_SMR, destruction_reconstruction, local_search
from API.functions import PT, c_range, makespan
import numpy as np
import random
import math
# Soluciones probadas:
# Makespan: (36, 44, 52)
# Secuencias:
# [7, 8, 6, 10, 1, 9, 5, 4, 2, 3]
# [7, 8, 6, 10, 5, 9, 1, 4, 2, 3]
# [6, 1, 9, 7, 8, 10,... | 24.253425 | 214 | 0.558882 |
1b3ce8d134ce6dee1a002a8a874aee781ed519d6 | 12,614 | py | Python | venv/lib/python3.6/site-packages/ansible_collections/community/fortios/plugins/modules/fmgr_secprof_proxy.py | usegalaxy-no/usegalaxy | 75dad095769fe918eb39677f2c887e681a747f3a | [
"MIT"
] | 1 | 2020-01-22T13:11:23.000Z | 2020-01-22T13:11:23.000Z | venv/lib/python3.6/site-packages/ansible_collections/community/fortios/plugins/modules/fmgr_secprof_proxy.py | usegalaxy-no/usegalaxy | 75dad095769fe918eb39677f2c887e681a747f3a | [
"MIT"
] | 12 | 2020-02-21T07:24:52.000Z | 2020-04-14T09:54:32.000Z | venv/lib/python3.6/site-packages/ansible_collections/community/fortios/plugins/modules/fmgr_secprof_proxy.py | usegalaxy-no/usegalaxy | 75dad095769fe918eb39677f2c887e681a747f3a | [
"MIT"
] | null | null | null | #!/usr/bin/python
#
# This file is part of Ansible
#
# Ansible is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# Ansible is distribut... | 37.87988 | 118 | 0.679483 |
1b4132a4baf2057e36f2ecc28e51f495bb745ea5 | 904 | py | Python | test.py | pibara-utopian/pycarvpath | 0c6f11888e1ee945714caf9a8c0d58759790b241 | [
"BSD-2-Clause"
] | null | null | null | test.py | pibara-utopian/pycarvpath | 0c6f11888e1ee945714caf9a8c0d58759790b241 | [
"BSD-2-Clause"
] | null | null | null | test.py | pibara-utopian/pycarvpath | 0c6f11888e1ee945714caf9a8c0d58759790b241 | [
"BSD-2-Clause"
] | null | null | null | #!/usr/bin/env python3
from carvpath import CarvPath,SparseFragment,BaseFragment
import unittest
if __name__ == "__main__":
unittest.main()
| 31.172414 | 71 | 0.641593 |
1b42e7aeafd8cdab87dd69ce4daa80913528aad1 | 250 | py | Python | docs/manual/gears/examples/serialize_array_active.py | bogdanvuk/pygears | a0b21d445e1d5c89ad66751447b8253536b835ee | [
"MIT"
] | 120 | 2018-04-23T08:29:04.000Z | 2022-03-30T14:41:52.000Z | docs/manual/gears/examples/serialize_array_active.py | FZP1607152286/pygears | a0b21d445e1d5c89ad66751447b8253536b835ee | [
"MIT"
] | 12 | 2019-07-09T17:12:58.000Z | 2022-03-18T09:05:10.000Z | docs/manual/gears/examples/serialize_array_active.py | FZP1607152286/pygears | a0b21d445e1d5c89ad66751447b8253536b835ee | [
"MIT"
] | 12 | 2019-05-10T19:42:08.000Z | 2022-03-28T18:26:44.000Z | from pygears.lib import check, drv, serialize
from pygears.typing import Uint, Array
din = drv(t=Array[Uint[8], 4], seq=[(1, 2, 3, 4), (5, 6, 7, 8)])
active = drv(t=Uint[2], seq=[2, 3])
serialize(din, active) \
| check(ref=[[1, 2], [5, 6, 7]])
| 27.777778 | 64 | 0.596 |
1b443c2b930af2451df3f82a9a3ab6cc53195965 | 10,087 | py | Python | Prescient.py | mpolatcan/prescient | b9fbee679e6c370d14deda5e88cd4f1cc5965d78 | [
"Apache-2.0"
] | 1 | 2018-09-08T15:07:52.000Z | 2018-09-08T15:07:52.000Z | Prescient.py | mpolatcan/prescient | b9fbee679e6c370d14deda5e88cd4f1cc5965d78 | [
"Apache-2.0"
] | null | null | null | Prescient.py | mpolatcan/prescient | b9fbee679e6c370d14deda5e88cd4f1cc5965d78 | [
"Apache-2.0"
] | 1 | 2018-12-10T16:51:30.000Z | 2018-12-10T16:51:30.000Z | '''
_______ _______ _______ _______ ________ ___ _______ __ __ ___________
/ __ / / ___ \ / ____/ / _____/ / ______\ / / / ____/ / \ / / /____ _____/
/ /__/ / / |__| | / /___ / /____ / / / / / /___ / \ / / / /
/ ______/ / __ ___/ / ____/ /___... | 47.805687 | 166 | 0.603747 |
1b458cdaf161556fb4cbf9570138d9627368aeef | 184 | py | Python | HW8/SoKKoS/CW_8_1.py | kolyasalubov/Lv-677.PythonCore | c9f9107c734a61e398154a90b8a3e249276c2704 | [
"MIT"
] | null | null | null | HW8/SoKKoS/CW_8_1.py | kolyasalubov/Lv-677.PythonCore | c9f9107c734a61e398154a90b8a3e249276c2704 | [
"MIT"
] | null | null | null | HW8/SoKKoS/CW_8_1.py | kolyasalubov/Lv-677.PythonCore | c9f9107c734a61e398154a90b8a3e249276c2704 | [
"MIT"
] | 6 | 2022-02-22T22:30:49.000Z | 2022-03-28T12:51:19.000Z |
number = int(input('The number will always be a positive integer greater than 0.'))
print(f'summation = {summation(number)}')
| 20.444444 | 83 | 0.679348 |
1b4b9a8046d58983325c38030899fb910322ffb2 | 552 | py | Python | tagset/__init__.py | gxrzangdan/pyci | ece985a9d4d8c10e4aac079a2ff85bd5144523f1 | [
"BSD-3-Clause"
] | null | null | null | tagset/__init__.py | gxrzangdan/pyci | ece985a9d4d8c10e4aac079a2ff85bd5144523f1 | [
"BSD-3-Clause"
] | null | null | null | tagset/__init__.py | gxrzangdan/pyci | ece985a9d4d8c10e4aac079a2ff85bd5144523f1 | [
"BSD-3-Clause"
] | null | null | null | # -*- coding: utf-8 -*-
# PyCi
#
# Copyright (c) 2009, The PyCi Project
# Authors: Wu Ke <ngu.kho@gmail.com>
# Chen Xing <cxcxcxcx@gmail.com>
# URL: <http://code.google.com/p/pyci>
# For license information, see COPYING
"""TagSet package.
Contains several tag set used for tagging segmentation like CRF.
"""... | 17.806452 | 64 | 0.653986 |
1b4d2979efd4bf450ecdffaf76ebf2999530bf76 | 4,281 | py | Python | elasticdl/python/tests/checkpoint_test.py | chunyang-wen/elasticdl | 7b16b44f5314507494a552c11caaf3b2bce6d209 | [
"MIT"
] | null | null | null | elasticdl/python/tests/checkpoint_test.py | chunyang-wen/elasticdl | 7b16b44f5314507494a552c11caaf3b2bce6d209 | [
"MIT"
] | null | null | null | elasticdl/python/tests/checkpoint_test.py | chunyang-wen/elasticdl | 7b16b44f5314507494a552c11caaf3b2bce6d209 | [
"MIT"
] | null | null | null | import os
import tempfile
import unittest
from elasticdl.proto import elasticdl_pb2
from elasticdl.python.common.model_utils import (
get_module_file_path,
load_module,
)
from elasticdl.python.master.checkpoint_service import CheckpointService
from elasticdl.python.master.servicer import MasterServicer
_model... | 37.226087 | 79 | 0.6057 |
1b4d3c8d19bc7d13fb4f64e67ea67e871925032b | 534 | py | Python | web/app.py | matesmajda/smart-home | 4cb23b3be1609f2d424931aa9add8466c08514cd | [
"Apache-2.0"
] | null | null | null | web/app.py | matesmajda/smart-home | 4cb23b3be1609f2d424931aa9add8466c08514cd | [
"Apache-2.0"
] | null | null | null | web/app.py | matesmajda/smart-home | 4cb23b3be1609f2d424931aa9add8466c08514cd | [
"Apache-2.0"
] | null | null | null | from flask import Flask
from service import light_controller as light_service
app = Flask('Smart Home')
RESPONSE_OK = ("", 200)
if __name__ == '__main__':
app.run(host="0.0.0.0", port=int("1337"), debug=True, use_reloader=True)
| 25.428571 | 77 | 0.670412 |
1b4d531c59a83982bb5c89cb4e755707e96fcd9f | 3,525 | py | Python | geometry/d2/circle.py | TheBiggerFish/fishpy | 632a7c603a33ad694650aa2bed058931775a4259 | [
"MIT"
] | null | null | null | geometry/d2/circle.py | TheBiggerFish/fishpy | 632a7c603a33ad694650aa2bed058931775a4259 | [
"MIT"
] | null | null | null | geometry/d2/circle.py | TheBiggerFish/fishpy | 632a7c603a33ad694650aa2bed058931775a4259 | [
"MIT"
] | null | null | null | """This module provides a class for storing and evaluating circles"""
from functools import cached_property
from math import pi
from typing import Optional, Tuple
from .point2d import Point2D
from .vector2d import Vector2D
def intersects(self, other: 'Circle') -> bool:
"""Predicate function which return... | 31.473214 | 94 | 0.604539 |
1b4db3051a9f498462a0d0231b6db704dbce3464 | 3,742 | py | Python | base/db.py | stockminer/storm | cda77e4525a39381c590a7d7e828bb3cb2b923f1 | [
"Apache-2.0"
] | 2 | 2015-09-18T04:48:20.000Z | 2015-10-26T07:38:27.000Z | base/db.py | stockminer/storm | cda77e4525a39381c590a7d7e828bb3cb2b923f1 | [
"Apache-2.0"
] | null | null | null | base/db.py | stockminer/storm | cda77e4525a39381c590a7d7e828bb3cb2b923f1 | [
"Apache-2.0"
] | null | null | null | #!encoding=utf-8
'''
Created on 20151012
@author: Yafei
'''
import MySQLdb
import sys
'''
import MySQLdb
try:
conn=MySQLdb.connect(host='localhost',user='root',passwd='root',db='test',port=3306)
cur=conn.cursor()
cur.execute('select * from user')
cur.close()
conn.close()
except MySQL... | 24.618421 | 121 | 0.62667 |
1b4e05d442af93fd1b1c73d6a850c32f7feea2c9 | 565 | py | Python | raspberry-pi/fabfile.py | xnnyygn/auto-camera | 5f183832ce2559ed992a1c55daa5f6939b47d381 | [
"MIT"
] | null | null | null | raspberry-pi/fabfile.py | xnnyygn/auto-camera | 5f183832ce2559ed992a1c55daa5f6939b47d381 | [
"MIT"
] | null | null | null | raspberry-pi/fabfile.py | xnnyygn/auto-camera | 5f183832ce2559ed992a1c55daa5f6939b47d381 | [
"MIT"
] | null | null | null | from fabric.api import run, cd
from fabric.operations import put, prompt
CODE_DIR = '~/camera-agent'
PHOTO_DIR = '~/photos'
CONFIG_PATH = '~/settings.ini' | 24.565217 | 61 | 0.647788 |
1b4e18ba3244b9b98d1cb28cf0261abcf12e670b | 3,464 | py | Python | stamps/config.py | ignacionf/stamps | 2d1e37f5acb5b4be62e815e640248c8a7fe71ca6 | [
"BSD-3-Clause"
] | null | null | null | stamps/config.py | ignacionf/stamps | 2d1e37f5acb5b4be62e815e640248c8a7fe71ca6 | [
"BSD-3-Clause"
] | null | null | null | stamps/config.py | ignacionf/stamps | 2d1e37f5acb5b4be62e815e640248c8a7fe71ca6 | [
"BSD-3-Clause"
] | null | null | null | # -*- coding: utf-8 -*-
"""
stamps.config
~~~~~~~~~~~~~
Stamps.com configuration.
:copyright: 2014 by Jonathan Zempel.
:license: BSD, see LICENSE for more details.
"""
from configparser import NoOptionError, NoSectionError, SafeConfigParser
from urllib.request import pathname2url
from urllib.pars... | 34.989899 | 79 | 0.635104 |
1b4f6ccef0c1d6b2b1fa0a7bb0b5e40174688ca4 | 108 | py | Python | flaim/product_search/apps.py | bfssi-forest-dussault/flaime | 7c898f07e0d7c16b63a59d2c0c56290e32a2df47 | [
"MIT"
] | null | null | null | flaim/product_search/apps.py | bfssi-forest-dussault/flaime | 7c898f07e0d7c16b63a59d2c0c56290e32a2df47 | [
"MIT"
] | 11 | 2020-11-09T19:55:58.000Z | 2022-02-13T19:43:03.000Z | flaim/product_search/apps.py | BFSSI-Bioinformatics-Lab/flaime | 1feedf3974114c16724bfbd235ce4637983a3f5e | [
"MIT"
] | null | null | null | from django.apps import AppConfig
| 18 | 37 | 0.787037 |
1b519a77db4799ab628dbd803d76bfec3ce31a64 | 9,134 | py | Python | analyze_model_results.py | awwong1/topic-traceability | 60d6fd8b52855d1e5faeaec3c160f2541e3ec0ca | [
"MIT"
] | 2 | 2019-04-28T09:13:14.000Z | 2019-11-19T02:49:30.000Z | analyze_model_results.py | awwong1/topic-traceability | 60d6fd8b52855d1e5faeaec3c160f2541e3ec0ca | [
"MIT"
] | 1 | 2021-06-01T23:40:18.000Z | 2021-06-01T23:40:18.000Z | analyze_model_results.py | awwong1/topic-traceability | 60d6fd8b52855d1e5faeaec3c160f2541e3ec0ca | [
"MIT"
] | 1 | 2019-04-28T09:13:25.000Z | 2019-04-28T09:13:25.000Z | #!/usr/bin/env python3
"""Calculate distances using the topic models on the course material/discussion
posts feature vectors.
"""
import os
import numpy as np
from datetime import datetime
from numpy import ravel
from pickle import load
from json import dump
from scipy.spatial.distance import cosine, euclidean
from gen... | 36.979757 | 101 | 0.639041 |
1b55c6de90397835acdc52e5f1e0da9fa1f29285 | 7,555 | py | Python | TCCDjango/app/views.py | hkirschke/App-Web-TCC | 7cb8eecff6f5afe4c996c8a424358de099faefd0 | [
"MIT"
] | null | null | null | TCCDjango/app/views.py | hkirschke/App-Web-TCC | 7cb8eecff6f5afe4c996c8a424358de099faefd0 | [
"MIT"
] | null | null | null | TCCDjango/app/views.py | hkirschke/App-Web-TCC | 7cb8eecff6f5afe4c996c8a424358de099faefd0 | [
"MIT"
] | null | null | null | """
Definition of views.
"""
from datetime import datetime
from django.shortcuts import render
from django.http import HttpRequest
from .graficoLinhaTempo import GraficoLT as graphLT
from .graficoBarra import GraficoBarra as graphBar
from .graficoScatter import GraficoScatter as grapScatter
import plotly as pl
def ... | 26.232639 | 73 | 0.611383 |
1b57f40012ee74179621d2d5c1a27c6037745bba | 862 | py | Python | setup.py | yacchin1205/Jupyter-LC_nblineage | 1b105540c5ff2b0dfd749fb73f2f6c896d6c422e | [
"BSD-3-Clause"
] | 3 | 2017-06-11T11:07:08.000Z | 2019-03-25T03:21:56.000Z | setup.py | yacchin1205/Jupyter-LC_nblineage | 1b105540c5ff2b0dfd749fb73f2f6c896d6c422e | [
"BSD-3-Clause"
] | 11 | 2017-05-27T09:51:51.000Z | 2020-07-20T04:41:49.000Z | setup.py | yacchin1205/Jupyter-LC_nblineage | 1b105540c5ff2b0dfd749fb73f2f6c896d6c422e | [
"BSD-3-Clause"
] | 3 | 2017-05-27T07:00:18.000Z | 2019-12-22T14:57:20.000Z | #!/usr/bin/env python
from setuptools import setup
import os
import sys
HERE = os.path.abspath(os.path.dirname(__file__))
VERSION_NS = {}
with open(os.path.join(HERE, 'nblineage', '_version.py')) as f:
exec(f.read(), {}, VERSION_NS)
setup_args = dict (name='lc-nblineage',
version=VERSION_NS['__version__'],... | 26.121212 | 63 | 0.62645 |
1b5832d9eb1333c10d47499797f086c5fa200f38 | 1,868 | py | Python | projects/vdk-control-cli/tests/vdk/internal/control/utils/cli_utils_test.py | alod83/versatile-data-kit | 9ca672d3929eb3dc6fe5c677e8c8a75e2a0d2be8 | [
"Apache-2.0"
] | 100 | 2021-10-04T09:32:04.000Z | 2022-03-30T11:23:53.000Z | projects/vdk-control-cli/tests/vdk/internal/control/utils/cli_utils_test.py | alod83/versatile-data-kit | 9ca672d3929eb3dc6fe5c677e8c8a75e2a0d2be8 | [
"Apache-2.0"
] | 208 | 2021-10-04T16:56:40.000Z | 2022-03-31T10:41:44.000Z | projects/vdk-control-cli/tests/vdk/internal/control/utils/cli_utils_test.py | alod83/versatile-data-kit | 9ca672d3929eb3dc6fe5c677e8c8a75e2a0d2be8 | [
"Apache-2.0"
] | 14 | 2021-10-11T14:15:13.000Z | 2022-03-11T13:39:17.000Z | # Copyright 2021 VMware, Inc.
# SPDX-License-Identifier: Apache-2.0
from vdk.internal.control.utils.cli_utils import GqlQueryBuilder
from vdk.internal.control.utils.cli_utils import QueryField
| 35.923077 | 88 | 0.667024 |
1b5897b0cc420dcb769d89ae266c357d767d113c | 955 | py | Python | src/routers/homeworks.py | er5bus/apollo-back | 0a50a07917d08b176ee94c33419f10cb2a7d6fb0 | [
"MIT"
] | null | null | null | src/routers/homeworks.py | er5bus/apollo-back | 0a50a07917d08b176ee94c33419f10cb2a7d6fb0 | [
"MIT"
] | null | null | null | src/routers/homeworks.py | er5bus/apollo-back | 0a50a07917d08b176ee94c33419f10cb2a7d6fb0 | [
"MIT"
] | null | null | null | from fastapi import APIRouter, Depends
from typing import List
from src.utils.crud_router import include_generic_collection_document_router
from src.dependencies import current_active_user
from src.services.homeworks import HomeworkService, HomeworkCompletedService
dependencies: List[Depends] = [Depends(current_activ... | 43.409091 | 97 | 0.810471 |
1b5bb0fda021f40d200c9ae75d3e1552f6c0651f | 1,357 | py | Python | accounts/migrations/0004_auto_20210121_2059.py | itsmegarvi/Inscribe | 8f0dcec4aced953bfc0e222dbe4fa1c88a9e60f1 | [
"Apache-2.0"
] | 1 | 2021-02-17T16:00:32.000Z | 2021-02-17T16:00:32.000Z | accounts/migrations/0004_auto_20210121_2059.py | itsmegarvi/Inscribe | 8f0dcec4aced953bfc0e222dbe4fa1c88a9e60f1 | [
"Apache-2.0"
] | 1 | 2021-02-15T09:46:11.000Z | 2021-02-15T09:46:11.000Z | accounts/migrations/0004_auto_20210121_2059.py | itsmegarvi/Inscribe | 8f0dcec4aced953bfc0e222dbe4fa1c88a9e60f1 | [
"Apache-2.0"
] | null | null | null | # Generated by Django 3.1.5 on 2021-01-21 15:29
from django.conf import settings
from django.db import migrations, models
import django.db.models.deletion
| 38.771429 | 198 | 0.632277 |
1b5eace6e429e47060d59111f3679d7cdade0999 | 573 | py | Python | exps/grid.py | jeromedockes/cogspaces | 43ec3bc8daaa6b5d825527c0665bd12cb5e46618 | [
"BSD-2-Clause"
] | null | null | null | exps/grid.py | jeromedockes/cogspaces | 43ec3bc8daaa6b5d825527c0665bd12cb5e46618 | [
"BSD-2-Clause"
] | null | null | null | exps/grid.py | jeromedockes/cogspaces | 43ec3bc8daaa6b5d825527c0665bd12cb5e46618 | [
"BSD-2-Clause"
] | null | null | null | from joblib import Parallel, delayed
from sklearn.utils import check_random_state
from exps.train import run
seeds = check_random_state(42).randint(0, 100000, size=20).tolist()
# Takes 15 minutes on a 40 CPU computer
Parallel(n_jobs=40, verbose=10)(delayed(run)(estimator, seed)
for es... | 35.8125 | 78 | 0.671902 |
1b5f0887853abb3afaca7a9088409bbdada5a133 | 742 | py | Python | src/scripts/copy_bug_classes.py | ucd-plse/eesi | aacbcecbb8c1f1d2e152ee4a0aa417ac92ae74bb | [
"BSD-3-Clause"
] | 5 | 2019-07-01T09:05:32.000Z | 2019-09-03T17:36:26.000Z | src/scripts/copy_bug_classes.py | defreez-ucd/eesi-doi | 49b51f9a01b8c1dbbe110898c27ec714034132aa | [
"CC-BY-4.0"
] | 3 | 2019-08-01T03:14:48.000Z | 2019-09-03T20:40:52.000Z | src/scripts/copy_bug_classes.py | defreez-ucd/eesi-doi | 49b51f9a01b8c1dbbe110898c27ec714034132aa | [
"CC-BY-4.0"
] | 2 | 2019-06-10T23:08:27.000Z | 2020-09-29T01:20:49.000Z | import argparse
parser = argparse.ArgumentParser()
parser.add_argument('fromcsv', help="Path to classified bug csv")
parser.add_argument('tocsv', help="Path to new csv")
args = parser.parse_args()
fromcsv = open(args.fromcsv)
tocsv = open(args.tocsv)
from_lines = [x.strip() for x in fromcsv.readlines()]
to_lines = [... | 27.481481 | 66 | 0.650943 |
1b5f7954aad61486e350eecf97b6bdff9243ba31 | 3,053 | py | Python | src/dcm/agent/plugins/builtin/add_user.py | JPWKU/unix-agent | 8f1278fc8c2768a8d4d54af642a881bace43652f | [
"Apache-2.0"
] | null | null | null | src/dcm/agent/plugins/builtin/add_user.py | JPWKU/unix-agent | 8f1278fc8c2768a8d4d54af642a881bace43652f | [
"Apache-2.0"
] | 22 | 2015-09-15T20:52:34.000Z | 2016-03-11T22:44:24.000Z | src/dcm/agent/plugins/builtin/add_user.py | JPWKU/unix-agent | 8f1278fc8c2768a8d4d54af642a881bace43652f | [
"Apache-2.0"
] | 3 | 2015-09-11T20:21:33.000Z | 2016-09-30T08:30:19.000Z | #
# Copyright (C) 2014 Dell, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in wri... | 38.64557 | 76 | 0.613167 |
1b5fd3a5f2909fd769f16c7c3cdc54935db82b2c | 1,980 | py | Python | src/gui/dev/pkg1/faceDetectionImageTest2.py | chaitanyasanoriya/Unified-Machine-Learning-Tool | d88b60ee11a9a0bd203fa52d344263d64cfeaff4 | [
"Apache-2.0"
] | null | null | null | src/gui/dev/pkg1/faceDetectionImageTest2.py | chaitanyasanoriya/Unified-Machine-Learning-Tool | d88b60ee11a9a0bd203fa52d344263d64cfeaff4 | [
"Apache-2.0"
] | null | null | null | src/gui/dev/pkg1/faceDetectionImageTest2.py | chaitanyasanoriya/Unified-Machine-Learning-Tool | d88b60ee11a9a0bd203fa52d344263d64cfeaff4 | [
"Apache-2.0"
] | null | null | null | import cv2
import os
import sys
import shutil
import subprocess
face_cascade = cv2.CascadeClassifier('Face_cascade.xml')
original_path = sys.argv
#original_path = "D:\College Stuff\Machine Learning\Tests\Minor Project\Test 1 - without ED\data\Anne"
#new_path = original_path + "1"
#os.rename(original_path,new_path)
i=0
... | 34.137931 | 137 | 0.621717 |
1b6165f24d43dbdd11df9d5296ecf6c542bdc293 | 3,763 | py | Python | hangman.py | Telluu/hangman-game | 994e930244c90cf18c0f0eba4afafb0af21081a1 | [
"MIT"
] | null | null | null | hangman.py | Telluu/hangman-game | 994e930244c90cf18c0f0eba4afafb0af21081a1 | [
"MIT"
] | null | null | null | hangman.py | Telluu/hangman-game | 994e930244c90cf18c0f0eba4afafb0af21081a1 | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
import string
import random
import os
import sys
import time
import json
if __name__ == '__main__':
main()
| 30.346774 | 78 | 0.495615 |
1b61c820e0f0f7acfbc1fcc581af507b2141814b | 421 | py | Python | reverse.py | Estheryu991/CodinGamez | e653a891792278d7d6961194aa831cf447d3aba7 | [
"MIT"
] | null | null | null | reverse.py | Estheryu991/CodinGamez | e653a891792278d7d6961194aa831cf447d3aba7 | [
"MIT"
] | null | null | null | reverse.py | Estheryu991/CodinGamez | e653a891792278d7d6961194aa831cf447d3aba7 | [
"MIT"
] | null | null | null | # The game mode is REVERSE: You do not have access to the statement. You have to guess what to do by observing the following set of tests:
# 01 Test 1
# Input
# Expected output
# +-+--+-+++--+
# 1
# 02 Test 2
# Input
# Expected output
# +++++++---
# 4
# 03 Test 3
# Input
# Expected output
# -+-+-+-+-+-+
# 0
# 04 Test 4... | 16.84 | 138 | 0.567696 |
1b65190211132ca843abf01b535bda46f144ac3f | 6,593 | py | Python | libraries/mosek/9.3/tools/examples/python/concurrent1.py | TimDSF/SBSOS_ShapeSegmentation | e30495dcf71dc63d1d54f3b73132fcfa75d7647e | [
"MIT"
] | null | null | null | libraries/mosek/9.3/tools/examples/python/concurrent1.py | TimDSF/SBSOS_ShapeSegmentation | e30495dcf71dc63d1d54f3b73132fcfa75d7647e | [
"MIT"
] | null | null | null | libraries/mosek/9.3/tools/examples/python/concurrent1.py | TimDSF/SBSOS_ShapeSegmentation | e30495dcf71dc63d1d54f3b73132fcfa75d7647e | [
"MIT"
] | null | null | null | #
# Copyright: Copyright (c) MOSEK ApS, Denmark. All rights reserved.
#
# File: concurrent1.py
#
# Purpose: Demonstrates a simple implementation of a concurrent optimizer.
#
# The concurrent optimizer starts a few parallel optimizations
# of the same problem using different algori... | 32.160976 | 94 | 0.66965 |
1b65f8081e606fde6bf7b481f98d9364e284f66a | 243 | py | Python | lino_xl/lib/statbel/countries/fixtures/__init__.py | khchine5/xl | b1634937a9ce87af1e948eb712b934b11f221d9d | [
"BSD-2-Clause"
] | 1 | 2018-01-12T14:09:48.000Z | 2018-01-12T14:09:48.000Z | lino_xl/lib/statbel/countries/fixtures/__init__.py | khchine5/xl | b1634937a9ce87af1e948eb712b934b11f221d9d | [
"BSD-2-Clause"
] | 1 | 2019-09-10T05:03:47.000Z | 2019-09-10T05:03:47.000Z | lino_xl/lib/statbel/countries/fixtures/__init__.py | khchine5/xl | b1634937a9ce87af1e948eb712b934b11f221d9d | [
"BSD-2-Clause"
] | null | null | null | """The fixtures for `lino_xl.lib.statbel.countries`.
These are just wrappers to those in :mod:`lino_xl.lib.countries.fixtures`.
.. autosummary::
:toctree:
all_countries
be
demo
eesti
few_cities
few_countries
"""
| 15.1875 | 74 | 0.674897 |
1b667310870a44c3110e0f14c6b16c80d33dbbc0 | 640 | py | Python | routeutils/Utils/utils.py | techlabklabin/route-utils | 4c34eb955e8a06b6fe4177803e8ea87ea76e6318 | [
"MIT"
] | null | null | null | routeutils/Utils/utils.py | techlabklabin/route-utils | 4c34eb955e8a06b6fe4177803e8ea87ea76e6318 | [
"MIT"
] | null | null | null | routeutils/Utils/utils.py | techlabklabin/route-utils | 4c34eb955e8a06b6fe4177803e8ea87ea76e6318 | [
"MIT"
] | null | null | null | import geopy.distance
from math import degrees
import numpy as np
| 29.090909 | 60 | 0.734375 |
1b68acd893556c56e8228f18fad448a6adc7cbed | 2,886 | py | Python | build/util/lastchange.py | zachlatta/chromium | c4625eefca763df86471d798ee5a4a054b4716ae | [
"BSD-3-Clause"
] | 1 | 2021-09-24T22:49:10.000Z | 2021-09-24T22:49:10.000Z | build/util/lastchange.py | changbai1980/chromium | c4625eefca763df86471d798ee5a4a054b4716ae | [
"BSD-3-Clause"
] | null | null | null | build/util/lastchange.py | changbai1980/chromium | c4625eefca763df86471d798ee5a4a054b4716ae | [
"BSD-3-Clause"
] | null | null | null | #!/usr/bin/env python
# Copyright (c) 2009 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
"""
lastchange.py -- Chromium revision fetching utility.
"""
import optparse
import os
import re
import subprocess
import sys
de... | 23.274194 | 73 | 0.626126 |
1b68b03021b7cfc25678f107534b55b999e11055 | 657 | py | Python | ansible_self_service/l3_services/app.py | ansible-self-service/ansible-self-service | 80840f02b68c6ba5fe6c55ab9a317b310c185b4d | [
"MIT"
] | null | null | null | ansible_self_service/l3_services/app.py | ansible-self-service/ansible-self-service | 80840f02b68c6ba5fe6c55ab9a317b310c185b4d | [
"MIT"
] | null | null | null | ansible_self_service/l3_services/app.py | ansible-self-service/ansible-self-service | 80840f02b68c6ba5fe6c55ab9a317b310c185b4d | [
"MIT"
] | null | null | null | from typing import List
from ansible_self_service.l3_services.dto import AppCollection, App
from ansible_self_service.l4_core.models import AppCatalog
| 38.647059 | 110 | 0.765601 |
1b6944b1fc84ae87425e1a8c5cd765d370388f83 | 9,111 | py | Python | InjectionTools.py | yuliang419/TransitInject | 4eab006e70cbbfcb6202f5534f1b2c29ec142434 | [
"MIT"
] | 1 | 2020-10-20T03:29:14.000Z | 2020-10-20T03:29:14.000Z | InjectionTools.py | yuliang419/TransitInject | 4eab006e70cbbfcb6202f5534f1b2c29ec142434 | [
"MIT"
] | null | null | null | InjectionTools.py | yuliang419/TransitInject | 4eab006e70cbbfcb6202f5534f1b2c29ec142434 | [
"MIT"
] | null | null | null | import numpy as np
import urllib
from lxml import etree
import batman
import ldtk
from scipy.interpolate import interp1d
# from joblib import Parallel, delayed
import random
import matplotlib.pyplot as plt
from scipy.spatial.qhull import QhullError
import multiprocessing
import logging
import sys
if __name__ == ... | 35.313953 | 120 | 0.555921 |
1b694d29d5beb77bb842578947bb57ed09e40e87 | 3,015 | py | Python | polls/core/tests.py | K0Te/django-polls | f9743eb6fbd26c2cea860ee3b175f63c5f090076 | [
"MIT"
] | null | null | null | polls/core/tests.py | K0Te/django-polls | f9743eb6fbd26c2cea860ee3b175f63c5f090076 | [
"MIT"
] | null | null | null | polls/core/tests.py | K0Te/django-polls | f9743eb6fbd26c2cea860ee3b175f63c5f090076 | [
"MIT"
] | null | null | null | from datetime import date
from django.shortcuts import resolve_url as r
from django.test import TestCase
from django.utils import timezone
from .models import Choice, Question
| 29.558824 | 89 | 0.600332 |
1b69e845f97b7f14408d34a9867f0bf7022045e4 | 748 | py | Python | tests/mdp/test_mdp.py | DavidSlayback/rl-parsers | df33cd1814aaeac05b057330ccf742b3310f36df | [
"MIT"
] | null | null | null | tests/mdp/test_mdp.py | DavidSlayback/rl-parsers | df33cd1814aaeac05b057330ccf742b3310f36df | [
"MIT"
] | null | null | null | tests/mdp/test_mdp.py | DavidSlayback/rl-parsers | df33cd1814aaeac05b057330ccf742b3310f36df | [
"MIT"
] | 2 | 2020-09-27T15:02:32.000Z | 2021-08-24T22:43:21.000Z | import unittest
import numpy as np
from rl_parsers import MDP_Parser
| 27.703704 | 77 | 0.648396 |
1b6c2f674f5f13eb386f7e948241adeb8392fa33 | 1,235 | py | Python | setup.py | jeffmahler/visualization | 9844dd0e58b4635967cad332268bdc9aec93bc25 | [
"Apache-2.0"
] | 8 | 2017-12-21T02:25:00.000Z | 2020-10-27T19:45:07.000Z | setup.py | jeffmahler/visualization | 9844dd0e58b4635967cad332268bdc9aec93bc25 | [
"Apache-2.0"
] | 11 | 2017-11-10T03:01:55.000Z | 2022-01-10T22:37:25.000Z | setup.py | jeffmahler/visualization | 9844dd0e58b4635967cad332268bdc9aec93bc25 | [
"Apache-2.0"
] | 18 | 2017-10-04T23:35:12.000Z | 2021-08-27T23:34:33.000Z | """
Visualization setup file.
"""
from setuptools import setup
requirements = ["imageio", "numpy", "matplotlib", "trimesh[easy]", "autolab_core", "pyrender"]
exec(open("visualization/version.py").read())
setup(
name="visualization",
version=__version__,
description="Visualization toolkit for the Berkele... | 34.305556 | 94 | 0.666397 |
1b6c315db32834647331ebec872b7a205cd925ba | 18,024 | py | Python | model_optimizer_pkg/model_optimizer_pkg/model_optimizer_node.py | jsspric/aws-deepracer-model-optimizer-pkg | 5593c02dfa311b4178a77eeebf78fb224616fc5e | [
"Apache-2.0"
] | 4 | 2021-04-28T07:53:17.000Z | 2021-10-30T02:41:54.000Z | deepracer_follow_the_leader_ws/install/model_optimizer_pkg/lib/python3.8/site-packages/model_optimizer_pkg/model_optimizer_node.py | amitjain-3/working_add | ddd3b10d854477e86bf7a8558b3d447ec03a8a5f | [
"Apache-2.0"
] | null | null | null | deepracer_follow_the_leader_ws/install/model_optimizer_pkg/lib/python3.8/site-packages/model_optimizer_pkg/model_optimizer_node.py | amitjain-3/working_add | ddd3b10d854477e86bf7a8558b3d447ec03a8a5f | [
"Apache-2.0"
] | 3 | 2021-04-30T06:30:28.000Z | 2021-10-30T02:41:38.000Z | #!/usr/bin/env python
#################################################################################
# Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. #
# #
# Licensed under the Apache License, Version 2.0 ... | 51.05949 | 114 | 0.568409 |
1b6c55c884ad7f589153505ac695e852bd17eaad | 1,208 | py | Python | py-server/server.py | aidevnet/ztp | 147a1cdd548650e26e266c2a5a9f72bbe62bc607 | [
"BSD-2-Clause"
] | null | null | null | py-server/server.py | aidevnet/ztp | 147a1cdd548650e26e266c2a5a9f72bbe62bc607 | [
"BSD-2-Clause"
] | null | null | null | py-server/server.py | aidevnet/ztp | 147a1cdd548650e26e266c2a5a9f72bbe62bc607 | [
"BSD-2-Clause"
] | null | null | null | #!/usr/bin/env python
from __future__ import print_function
import csv
from flask import Flask
from flask import request, jsonify, make_response
app = Flask(__name__)
FILE ="serial-ip.csv"
if __name__ == '__main__':
global db
db = {}
with open(FILE,"r")as f:
try:
reader = csv.Dict... | 24.16 | 95 | 0.550497 |
1b6d09dfc4f1b4dc68d58889456369a59b9e4ee0 | 92 | py | Python | parameters_8000.py | rchen33/Web2py_memo | 71387aaef5b2220e4442514944a39266e44a8871 | [
"BSD-3-Clause"
] | null | null | null | parameters_8000.py | rchen33/Web2py_memo | 71387aaef5b2220e4442514944a39266e44a8871 | [
"BSD-3-Clause"
] | null | null | null | parameters_8000.py | rchen33/Web2py_memo | 71387aaef5b2220e4442514944a39266e44a8871 | [
"BSD-3-Clause"
] | null | null | null | password="pbkdf2(1000,20,sha512)$b38a05727410f589$82dc4c62c2132fdc53b2e69c6a362f5369ad31dd"
| 46 | 91 | 0.891304 |
1b6fa0d06ddf808de323e30136b2cb3ba0e36dbf | 1,217 | py | Python | filter_plugins/in_loop_list.py | jtyr/ansible-lvm_disk_extend | f7aca8c2cb752f233216666c7a820e8d6a9ffa1e | [
"MIT"
] | 7 | 2016-08-31T13:00:29.000Z | 2021-10-01T08:46:25.000Z | filter_plugins/in_loop_list.py | jtyr/ansible-lvm_disk_extend | f7aca8c2cb752f233216666c7a820e8d6a9ffa1e | [
"MIT"
] | null | null | null | filter_plugins/in_loop_list.py | jtyr/ansible-lvm_disk_extend | f7aca8c2cb752f233216666c7a820e8d6a9ffa1e | [
"MIT"
] | 8 | 2017-01-31T19:08:27.000Z | 2021-11-05T05:42:17.000Z | from ansible.module_utils.six import string_types
def in_loop_list(
val, loop_var, path=[], module='stat', param='exists', param_val=True):
"""Verifies if any of the loop results have the desired value"""
ret = False
for result in loop_var['results']:
item = result['item']
for f... | 25.893617 | 79 | 0.457683 |
1b71400982dc54036bfed93c9d3caf4be2635a78 | 2,883 | py | Python | .tools/parser.py | Balnian/vcpkg-explorer | b67adfabd39dcf63e8f8e59f8a70ba162d6b9699 | [
"MIT"
] | null | null | null | .tools/parser.py | Balnian/vcpkg-explorer | b67adfabd39dcf63e8f8e59f8a70ba162d6b9699 | [
"MIT"
] | null | null | null | .tools/parser.py | Balnian/vcpkg-explorer | b67adfabd39dcf63e8f8e59f8a70ba162d6b9699 | [
"MIT"
] | null | null | null |
import argparse, os, json, io
# Parse CONTROL File
controlSpecialParser = {
"Source" : simpleInsert,
"Version": simpleInsert,
"Build-Depends": simpleInsertList,
"Default-Features": simpleInsertList,
"Description": simpleInsert
}
parser = argparse.ArgumentParser()
parser.add_argument('Sour... | 27.990291 | 109 | 0.645855 |
1b71f876de9ee2d94ff532262f4887f78fd8c289 | 300 | py | Python | wdict/__init__.py | shinaji/wdict | dc3c6cb354342e21bfa2ff875c1a34cc1900593b | [
"MIT"
] | null | null | null | wdict/__init__.py | shinaji/wdict | dc3c6cb354342e21bfa2ff875c1a34cc1900593b | [
"MIT"
] | null | null | null | wdict/__init__.py | shinaji/wdict | dc3c6cb354342e21bfa2ff875c1a34cc1900593b | [
"MIT"
] | null | null | null | #-*- coding:utf-8 -*-
"""
__init__
Copyright (c) 2018 Tetsuya Shinaji
This software is released under the MIT License.
http://opensource.org/licenses/mit-license.php
Date: 2018/03/01
"""
from __future__ import absolute_import
from .core import Dict
__version__ = "0.3.1"
| 17.647059 | 52 | 0.676667 |
1b740de940b94786b8dade107ab2abfb4ca34794 | 859 | py | Python | calendars/urls/calendar.py | mouradmourafiq/django-calendar | 5cec7f8ac49637a02e331064d470255d1cbaf096 | [
"BSD-2-Clause"
] | 7 | 2015-02-23T11:59:02.000Z | 2021-03-01T18:09:35.000Z | calendars/urls/calendar.py | mouradmourafiq/django-calendar | 5cec7f8ac49637a02e331064d470255d1cbaf096 | [
"BSD-2-Clause"
] | null | null | null | calendars/urls/calendar.py | mouradmourafiq/django-calendar | 5cec7f8ac49637a02e331064d470255d1cbaf096 | [
"BSD-2-Clause"
] | 1 | 2016-09-15T11:37:08.000Z | 2016-09-15T11:37:08.000Z | # -*- coding: utf-8 -*-
'''
Created on Mar 20, 2011
@author: Mourad Mourafiq
@copyright: Copyright 2011
other contributers:
'''
from django.conf.urls import patterns, include, url
from calendars.views import calendar_tables as calendar_tables
from calendars.views import events as events
urlpatterns = patterns('',... | 40.904762 | 163 | 0.706636 |
1b751be946e14f92ef6596264ea0fe477e367ac0 | 3,724 | py | Python | sdk/identity/azure-identity/tests/test_chained_token_credential_async.py | rsdoherty/azure-sdk-for-python | 6bba5326677468e6660845a703686327178bb7b1 | [
"MIT"
] | 2,728 | 2015-01-09T10:19:32.000Z | 2022-03-31T14:50:33.000Z | sdk/identity/azure-identity/tests/test_chained_token_credential_async.py | rsdoherty/azure-sdk-for-python | 6bba5326677468e6660845a703686327178bb7b1 | [
"MIT"
] | 17,773 | 2015-01-05T15:57:17.000Z | 2022-03-31T23:50:25.000Z | sdk/identity/azure-identity/tests/test_chained_token_credential_async.py | rsdoherty/azure-sdk-for-python | 6bba5326677468e6660845a703686327178bb7b1 | [
"MIT"
] | 1,916 | 2015-01-19T05:05:41.000Z | 2022-03-31T19:36:44.000Z | # ------------------------------------
# Copyright (c) Microsoft Corporation.
# Licensed under the MIT License.
# ------------------------------------
from azure.core.credentials import AccessToken
from azure.core.exceptions import ClientAuthenticationError
from azure.identity import CredentialUnavailableError, ClientS... | 34.165138 | 112 | 0.741407 |
1b752507440aeed9f54d65f404fbb19a93263529 | 2,538 | py | Python | needy/generators/xcconfig.py | carlbrown/needy | 5a70726c9846f86a88be896ec39740296d503835 | [
"MIT"
] | 65 | 2015-07-21T01:40:17.000Z | 2019-06-10T10:46:28.000Z | needy/generators/xcconfig.py | bittorrent/needy | 31e57ad09d5fc22126e10b735c586262a50139d7 | [
"MIT"
] | 110 | 2015-07-21T01:41:40.000Z | 2017-01-18T23:13:30.000Z | needy/generators/xcconfig.py | bittorrent/needy | 31e57ad09d5fc22126e10b735c586262a50139d7 | [
"MIT"
] | 4 | 2015-07-20T02:45:43.000Z | 2016-07-31T21:48:39.000Z | from ..generator import Generator
from ..platforms import available_platforms
from ..target import Target
import os
| 47.886792 | 128 | 0.64342 |
1b76adaddb30b4707fdd00416547e9d932d96277 | 864 | py | Python | recipes/Python/496885_String_InterpolatiEvaluatiEmbedded/recipe-496885.py | tdiprima/code | 61a74f5f93da087d27c70b2efe779ac6bd2a3b4f | [
"MIT"
] | 2,023 | 2017-07-29T09:34:46.000Z | 2022-03-24T08:00:45.000Z | recipes/Python/496885_String_InterpolatiEvaluatiEmbedded/recipe-496885.py | unhacker/code | 73b09edc1b9850c557a79296655f140ce5e853db | [
"MIT"
] | 32 | 2017-09-02T17:20:08.000Z | 2022-02-11T17:49:37.000Z | recipes/Python/496885_String_InterpolatiEvaluatiEmbedded/recipe-496885.py | unhacker/code | 73b09edc1b9850c557a79296655f140ce5e853db | [
"MIT"
] | 780 | 2017-07-28T19:23:28.000Z | 2022-03-25T20:39:41.000Z |
# ---------- Usage ---------------
# Evaluate expressions in the context of a dictionary...
>>> my_dict = {'x': 1, 'y': 2}
>>> print "The sum of %(x)s and %(y)s is %(x+y)s" % expression_dictionary(my_dict)
The sum of 1 and 2 is 3
# or use in conjunction with locals() or globals() to evaluate in a namespace.
>>> f... | 32 | 82 | 0.611111 |
1b770811d02f4fdde6f9b0fafb36764cd7c74385 | 6,166 | py | Python | NLPEngine/app.py | hmi-digital/bot_platform | 91a26e566b07fa309774d0333a6bccf3d64cccc5 | [
"MIT"
] | null | null | null | NLPEngine/app.py | hmi-digital/bot_platform | 91a26e566b07fa309774d0333a6bccf3d64cccc5 | [
"MIT"
] | null | null | null | NLPEngine/app.py | hmi-digital/bot_platform | 91a26e566b07fa309774d0333a6bccf3d64cccc5 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
import json
import os
import re
import sys, getopt
import threading
from warnings import simplefilter
import flask
from flask import request, abort, make_response, jsonify
from utils import nlp_config
from utils import log_util
from core import train_model, predict_model
from pubsub import cons... | 33.879121 | 114 | 0.641421 |
1b775b82a0dc44534647e77cf8aa3514bf4dd4f3 | 1,587 | py | Python | tests/models/status/test_remained.py | vikian050194/forty | 7ef68fb06bb22a3008351c5a651eaa46b635d433 | [
"MIT"
] | null | null | null | tests/models/status/test_remained.py | vikian050194/forty | 7ef68fb06bb22a3008351c5a651eaa46b635d433 | [
"MIT"
] | 7 | 2021-03-15T17:18:36.000Z | 2021-04-26T09:40:53.000Z | tests/models/status/test_remained.py | vikian050194/forty | 7ef68fb06bb22a3008351c5a651eaa46b635d433 | [
"MIT"
] | null | null | null | from datetime import timedelta, date
from forty.managers.project_manager import Config
from forty.views import RemainedStatusView
from forty.models import StatusModel
from forty.tools import ActionsBuilder as A
from ..model_test_case import ModelTestCase
| 32.387755 | 68 | 0.696912 |
1b78337de42b9f4ba15ccfccf01de442b6dca476 | 1,215 | py | Python | pdf_bot/__init__.py | Joy-nath/telegram-pdf-bot | ca04cb6dd816eeea9b223e788f22bb1b16244977 | [
"MIT"
] | null | null | null | pdf_bot/__init__.py | Joy-nath/telegram-pdf-bot | ca04cb6dd816eeea9b223e788f22bb1b16244977 | [
"MIT"
] | null | null | null | pdf_bot/__init__.py | Joy-nath/telegram-pdf-bot | ca04cb6dd816eeea9b223e788f22bb1b16244977 | [
"MIT"
] | null | null | null | import os
from http import HTTPStatus
from dotenv import load_dotenv
from flask import Flask, Response, request
from telegram import Update
from telegram.ext import messagequeue as mq
from telegram.ext.dispatcher import Dispatcher
from telegram.utils.request import Request
import pdf_bot.dispatcher as dp
import pdf_b... | 27 | 84 | 0.742387 |
1b7b8c103d8d9616e435f7c21cd9decd8e6f142c | 2,650 | py | Python | tests/pconv_rfr.py | DesignStripe/torch_pconv | 49e781bef96c511660ec35fcba68cf734710b10b | [
"BSD-3-Clause"
] | 1 | 2021-08-13T18:22:07.000Z | 2021-08-13T18:22:07.000Z | tests/pconv_rfr.py | DesignStripe/torch_pconv | 49e781bef96c511660ec35fcba68cf734710b10b | [
"BSD-3-Clause"
] | null | null | null | tests/pconv_rfr.py | DesignStripe/torch_pconv | 49e781bef96c511660ec35fcba68cf734710b10b | [
"BSD-3-Clause"
] | null | null | null | ###############################################################################
# BSD 3-Clause License
#
# Copyright (c) 2018, NVIDIA CORPORATION. All rights reserved.
#
# Author & Contact: Guilin Liu (guilinl@nvidia.com)
###############################################################################
"""
Code by Guilin... | 33.974359 | 118 | 0.569057 |
1b7c9765a8a3c6eb3b11ae701c1e55797770abd3 | 7,543 | py | Python | rs.py | rozium/rs-backend | 9a5f81daf5b87a960436a95c91896b01860e3636 | [
"MIT"
] | null | null | null | rs.py | rozium/rs-backend | 9a5f81daf5b87a960436a95c91896b01860e3636 | [
"MIT"
] | 1 | 2019-04-05T13:23:13.000Z | 2019-04-05T13:23:13.000Z | rs.py | rozium/rs-backend | 9a5f81daf5b87a960436a95c91896b01860e3636 | [
"MIT"
] | null | null | null | #!/usr/bin/env python
# Rumah Sahaja backend
import jwt
import hashlib
import datetime
from functools import wraps
from flask_sqlalchemy import SQLAlchemy
from flask import Flask, request, jsonify, make_response
from flask_cors import CORS
app = Flask(__name__)
app.config.from_pyfile('rs.cfg')
__DEBUG__ = True
__Fr... | 31.560669 | 136 | 0.580141 |
1b8188290776827e953663a7cb5361a2f3ad9d66 | 524 | py | Python | util/misc.py | arturb90/nl2pl | 2cd37bdd7c6f9f99349f1235001a1755ba169f4a | [
"MIT"
] | null | null | null | util/misc.py | arturb90/nl2pl | 2cd37bdd7c6f9f99349f1235001a1755ba169f4a | [
"MIT"
] | null | null | null | util/misc.py | arturb90/nl2pl | 2cd37bdd7c6f9f99349f1235001a1755ba169f4a | [
"MIT"
] | 1 | 2021-07-16T09:21:15.000Z | 2021-07-16T09:21:15.000Z | import time
from model.parser import LALR
def elapsed(since):
'''
Returns elapsed time since 'since'.
'''
now = time.time()
elapsed = now - since
return elapsed
| 16.903226 | 54 | 0.603053 |
1b826e8ff98cc01f8b74d6759239a1116b02fa42 | 245 | py | Python | modules/gdscript_transpiler/config.py | ppiecuch/gd_goost | 93a3a28b8555310c6fbe44c009b905a57046290b | [
"Apache-2.0",
"CC-BY-4.0",
"MIT"
] | null | null | null | modules/gdscript_transpiler/config.py | ppiecuch/gd_goost | 93a3a28b8555310c6fbe44c009b905a57046290b | [
"Apache-2.0",
"CC-BY-4.0",
"MIT"
] | null | null | null | modules/gdscript_transpiler/config.py | ppiecuch/gd_goost | 93a3a28b8555310c6fbe44c009b905a57046290b | [
"Apache-2.0",
"CC-BY-4.0",
"MIT"
] | null | null | null | #!/usr/bin/env python
| 16.333333 | 75 | 0.697959 |