hexsha stringlengths 40 40 | size int64 4 1.02M | ext stringclasses 8
values | lang stringclasses 1
value | max_stars_repo_path stringlengths 4 209 | max_stars_repo_name stringlengths 5 121 | max_stars_repo_head_hexsha stringlengths 40 40 | 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 4 209 | max_issues_repo_name stringlengths 5 121 | max_issues_repo_head_hexsha stringlengths 40 40 | max_issues_repo_licenses listlengths 1 10 | max_issues_count int64 1 67k ⌀ | 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 209 | max_forks_repo_name stringlengths 5 121 | max_forks_repo_head_hexsha stringlengths 40 40 | 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 4 1.02M | avg_line_length float64 1.07 66.1k | max_line_length int64 4 266k | alphanum_fraction float64 0.01 1 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
d2d3bec014ead53c71cd9a9fbbdad9425fcc348f | 625 | py | Python | optuna/study/__init__.py | captain-pool/optuna | 2ae8c17afea54362460320870304c763e91c0596 | [
"MIT"
] | 4,950 | 2019-11-15T07:35:51.000Z | 2022-03-31T10:32:42.000Z | optuna/study/__init__.py | captain-pool/optuna | 2ae8c17afea54362460320870304c763e91c0596 | [
"MIT"
] | 2,490 | 2019-11-15T07:06:20.000Z | 2022-03-31T23:52:45.000Z | optuna/study/__init__.py | captain-pool/optuna | 2ae8c17afea54362460320870304c763e91c0596 | [
"MIT"
] | 621 | 2019-11-15T11:26:57.000Z | 2022-03-28T11:46:34.000Z | from optuna._callbacks import MaxTrialsCallback
from optuna.study._study_direction import StudyDirection
from optuna.study._study_summary import StudySummary
from optuna.study.study import copy_study
from optuna.study.study import create_study
from optuna.study.study import delete_study
from optuna.study.study import g... | 27.173913 | 56 | 0.7856 |
a1c43ccbc979b276c20bb0ca98864599f1424344 | 654 | py | Python | src/python/WMCore/JobSplitting/Generators/BasicCounter.py | khurtado/WMCore | f74e252412e49189a92962945a94f93bec81cd1e | [
"Apache-2.0"
] | 21 | 2015-11-19T16:18:45.000Z | 2021-12-02T18:20:39.000Z | src/python/WMCore/JobSplitting/Generators/BasicCounter.py | khurtado/WMCore | f74e252412e49189a92962945a94f93bec81cd1e | [
"Apache-2.0"
] | 5,671 | 2015-01-06T14:38:52.000Z | 2022-03-31T22:11:14.000Z | src/python/WMCore/JobSplitting/Generators/BasicCounter.py | khurtado/WMCore | f74e252412e49189a92962945a94f93bec81cd1e | [
"Apache-2.0"
] | 67 | 2015-01-21T15:55:38.000Z | 2022-02-03T19:53:13.000Z | #!/usr/bin/env python
"""
_BasicCounter_
Count jobs created so far for a task and insert the count into the job
"""
from WMCore.JobSplitting.Generators.GeneratorInterface import GeneratorInterface
class BasicCounter(GeneratorInterface):
"""
_BasicCounter_
Incremental job counter
TODO: Use WMAgent... | 21.096774 | 90 | 0.689602 |
2f59a25e7130034f57e4e2f820c375ea08f526b7 | 749 | py | Python | py/templatelib/examples.py | junkoda/templatelib | 77c6e7e4aa2bced0106e6c971c1405455cd9c451 | [
"MIT"
] | null | null | null | py/templatelib/examples.py | junkoda/templatelib | 77c6e7e4aa2bced0106e6c971c1405455cd9c451 | [
"MIT"
] | null | null | null | py/templatelib/examples.py | junkoda/templatelib | 77c6e7e4aa2bced0106e6c971c1405455cd9c451 | [
"MIT"
] | null | null | null | import templatelib._templatelib as c
def array(a, x):
"""
Add float x to all elements to a
Args:
a (np.array)
x (float)
"""
c._examples_array(a, x)
#
# Wrapping a C++ class
#
class Class:
"""
A C++ class that contains [1, 3, 5]
c = Class() # create an object
l... | 19.205128 | 56 | 0.560748 |
b30eb9d592dae95dc260c14431b89f29bb17e8e4 | 12,609 | py | Python | tools/ex13.py | JamesWang007/PointRCNN | ea0812c52e6767b976fc50fed61e6b72fa6cdf81 | [
"MIT"
] | null | null | null | tools/ex13.py | JamesWang007/PointRCNN | ea0812c52e6767b976fc50fed61e6b72fa6cdf81 | [
"MIT"
] | null | null | null | tools/ex13.py | JamesWang007/PointRCNN | ea0812c52e6767b976fc50fed61e6b72fa6cdf81 | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
Created on Tue Oct 29 14:21:30 2019
@author: james
"""
import lib.utils.kitti_utils as kitti_utils
import numpy as np
import os
sample_id = 4
fpnet_file = os.path.join('../data/KITTI/frustum_net/data/', '%06d.txt' % sample_id)
def is_input_data_in_box3d(obj_list, d)... | 50.842742 | 88 | 0.502736 |
1660ac3a81e7a3eff2f75642e5d8907b56b2e2fa | 1,221 | py | Python | Interview Cake/undirected_graph_coloring.py | rayvantsahni/Competitive-Programming-Codes | 39ba91b69ad8ce7dce554f7817c2f0d5545ef471 | [
"MIT"
] | 1 | 2021-07-05T14:01:36.000Z | 2021-07-05T14:01:36.000Z | Interview Cake/undirected_graph_coloring.py | rayvantsahni/Competitive-Programming-and-Interview-Prep | 39ba91b69ad8ce7dce554f7817c2f0d5545ef471 | [
"MIT"
] | null | null | null | Interview Cake/undirected_graph_coloring.py | rayvantsahni/Competitive-Programming-and-Interview-Prep | 39ba91b69ad8ce7dce554f7817c2f0d5545ef471 | [
"MIT"
] | null | null | null | # https://www.interviewcake.com/question/python3/graph-coloring?utm_source=weekly_email&utm_source=drip&utm_campaign=weekly_email&utm_campaign=Interview%20Cake%20Weekly%20Problem%20%23355:%20Graph%20Coloring&utm_medium=email&utm_medium=email
class GraphNode:
def __init__(self, label):
self.label = label
... | 42.103448 | 241 | 0.661753 |
ed355afb36fb06257bebaa534c7040a5ed622e41 | 69 | py | Python | core-python/Core_Python/stringpkg/StringSlicing.py | theumang100/tutorials-1 | 497f54c2adb022c316530319a168fca1c007d4b1 | [
"MIT"
] | 9 | 2020-04-23T05:24:19.000Z | 2022-02-17T16:37:51.000Z | core-python/Core_Python/stringpkg/StringSlicing.py | theumang100/tutorials-1 | 497f54c2adb022c316530319a168fca1c007d4b1 | [
"MIT"
] | 5 | 2020-10-01T05:08:37.000Z | 2020-10-12T03:18:10.000Z | core-python/Core_Python/stringpkg/StringSlicing.py | theumang100/tutorials-1 | 497f54c2adb022c316530319a168fca1c007d4b1 | [
"MIT"
] | 9 | 2020-04-28T14:06:41.000Z | 2021-10-19T18:32:28.000Z | w = "Rainfall"
print(w[:4])
print(w[1:4])
print(w[4:])
print(w[::-1]) | 13.8 | 14 | 0.550725 |
2654457424d80dc2d6ccfae0008a187251b4045f | 248 | py | Python | sortsearch/maxsubarraysum.py | ashutoshdumiyan/CSES-Solutions | 48ff04f0003c2a1f808412497a22c7c7841bb3db | [
"MIT"
] | null | null | null | sortsearch/maxsubarraysum.py | ashutoshdumiyan/CSES-Solutions | 48ff04f0003c2a1f808412497a22c7c7841bb3db | [
"MIT"
] | null | null | null | sortsearch/maxsubarraysum.py | ashutoshdumiyan/CSES-Solutions | 48ff04f0003c2a1f808412497a22c7c7841bb3db | [
"MIT"
] | null | null | null | from sys import stdin
# Kadane Algorithm
n = int(stdin.readline())
li = [int(c) for c in stdin.readline().split()]
msf = li[0]
meh = li[0]
for i in range(1, n):
meh = max(li[i], meh + li[i])
msf = max(meh, msf)
print(msf)
| 16.533333 | 48 | 0.564516 |
540f901b44bdacb387a4364c8a369c795f9f8fd1 | 2,749 | py | Python | fu/single/ShifterRTL.py | mfkiwl/OpenCGRA | bf4cc100191e63bea68c049e0eb562987434547e | [
"BSD-3-Clause"
] | 13 | 2020-09-01T16:55:42.000Z | 2021-09-01T16:39:44.000Z | fu/single/ShifterRTL.py | mfkiwl/OpenCGRA | bf4cc100191e63bea68c049e0eb562987434547e | [
"BSD-3-Clause"
] | 5 | 2020-08-19T05:40:01.000Z | 2021-07-15T22:05:03.000Z | fu/single/ShifterRTL.py | mfkiwl/OpenCGRA | bf4cc100191e63bea68c049e0eb562987434547e | [
"BSD-3-Clause"
] | 4 | 2020-09-01T16:44:02.000Z | 2021-07-11T04:40:05.000Z | """
==========================================================================
ShifterRTL.py
==========================================================================
Simple generic Shifter for CGRA tile.
Author : Cheng Tan
Date : November 28, 2019
"""
from pymtl3 import *
from pymtl3.stdlib.ifcs impo... | 38.180556 | 92 | 0.527101 |
4ea9c38de443087f3f176fbba2a7ae5f27b61816 | 1,743 | py | Python | Article_Publication/utils.py | kushal-h/Article_publication | 9aa7b1fdb84d5ef875697a376dba7a6fe5f93017 | [
"MIT"
] | null | null | null | Article_Publication/utils.py | kushal-h/Article_publication | 9aa7b1fdb84d5ef875697a376dba7a6fe5f93017 | [
"MIT"
] | null | null | null | Article_Publication/utils.py | kushal-h/Article_publication | 9aa7b1fdb84d5ef875697a376dba7a6fe5f93017 | [
"MIT"
] | null | null | null | import random
import string
from django.utils.text import slugify
"""
method: generates random strings for slug
"""
def random_string_generator(size = 10, chars=string.ascii_lowercase + string.digits):
return ''.join(random.choice(chars) for _ in range(size))
"""
method: generates random integers for slug
"""
d... | 31.125 | 111 | 0.658061 |
0a90fd7d555b0e5d81f26e206a69f3f123b6012c | 778 | py | Python | setup.py | symon-storozhenko/pomidor | 0ee93767a370ab039ca3e2708d539cb203b6d5ad | [
"Apache-2.0"
] | 1 | 2021-09-15T18:08:19.000Z | 2021-09-15T18:08:19.000Z | setup.py | symon-storozhenko/pomidor | 0ee93767a370ab039ca3e2708d539cb203b6d5ad | [
"Apache-2.0"
] | null | null | null | setup.py | symon-storozhenko/pomidor | 0ee93767a370ab039ca3e2708d539cb203b6d5ad | [
"Apache-2.0"
] | null | null | null | import setuptools
with open("README.md", "r") as fh:
long_description = fh.read()
setuptools.setup(
name="pomidor", # Replace with your own username
version="0.0.3",
author="Symon Storozhenko",
author_email="symon.storozhenko@gmail.com",
description="A BDD-style Selenium-driven browser automat... | 33.826087 | 75 | 0.68509 |
0d70b7309aae0c0d7a296ffd5b6619783df885ae | 3,840 | py | Python | common-python/bcctools/bcc_ansible/bcc_full_deploy.py | LaudateCorpus1/atg-commerce-iaas | f1ae31657fc0111a5c019d46a28a3c81aae1acb2 | [
"MIT"
] | 28 | 2016-11-07T14:03:25.000Z | 2022-02-01T08:46:52.000Z | common-python/bcctools/bcc_ansible/bcc_full_deploy.py | LaudateCorpus1/atg-commerce-iaas | f1ae31657fc0111a5c019d46a28a3c81aae1acb2 | [
"MIT"
] | 3 | 2016-11-09T13:23:03.000Z | 2018-04-05T15:49:22.000Z | common-python/bcctools/bcc_ansible/bcc_full_deploy.py | LaudateCorpus1/atg-commerce-iaas | f1ae31657fc0111a5c019d46a28a3c81aae1acb2 | [
"MIT"
] | 13 | 2016-10-27T17:59:38.000Z | 2022-02-18T04:38:38.000Z | #!/usr/bin/python
# The MIT License (MIT)
#
# Copyright (c) 2017 Oracle
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
# in the Software without restriction, including without limitation the rights
# to us... | 31.47541 | 91 | 0.607813 |
3ad8f851c33969cfda5aefa8bad6e93eb6c40b61 | 2,156 | py | Python | src/RPA/Outlook/Application.py | mdp/rpaframework | d427a3a4b9ea360780e449ece2674e275060310e | [
"Apache-2.0"
] | null | null | null | src/RPA/Outlook/Application.py | mdp/rpaframework | d427a3a4b9ea360780e449ece2674e275060310e | [
"Apache-2.0"
] | null | null | null | src/RPA/Outlook/Application.py | mdp/rpaframework | d427a3a4b9ea360780e449ece2674e275060310e | [
"Apache-2.0"
] | null | null | null | import logging
from pathlib import Path
import platform
from typing import Any
from RPA.core.msoffice import OfficeApplication
if platform.system() == "Windows":
import pywintypes
class Application(OfficeApplication):
"""Library for manipulating Outlook application."""
def __init__(self):
Offic... | 29.534247 | 85 | 0.581633 |
32ea171bfa96fcf2ced075e4237dda64faaa05bf | 55,222 | py | Python | app/connector/elFinder.py | ronak66/EEG-Worflow-System | 8ba95776a3191ab61d64244f8b8bde01b7113b23 | [
"Apache-2.0"
] | 4 | 2020-08-26T16:46:36.000Z | 2021-12-27T04:47:33.000Z | app/connector/elFinder.py | ronak66/EEG-Worflow-System | 8ba95776a3191ab61d64244f8b8bde01b7113b23 | [
"Apache-2.0"
] | 4 | 2020-11-13T19:05:34.000Z | 2022-03-12T00:47:34.000Z | app/connector/elFinder.py | ronak66/EEG-Workflow-System | 8ba95776a3191ab61d64244f8b8bde01b7113b23 | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/env python
#
# Connector for elFinder File Manager
# author Troex Nevelin <troex@fury.scancode.ru>
import os
import re
import sys
import time
import shutil
import hashlib
import mimetypes
import collections
from datetime import datetime
class connector():
"""Connector for elFinder"""
_options = {... | 34.492192 | 85 | 0.479827 |
00412ac42185afdd0301076d696e0347622e0103 | 98 | py | Python | src/app/models/cluster_payload.py | n-gibs/fast-api-clustering | bab0a567a40559a60ba0cd7b9234ff253b294012 | [
"Apache-2.0"
] | null | null | null | src/app/models/cluster_payload.py | n-gibs/fast-api-clustering | bab0a567a40559a60ba0cd7b9234ff253b294012 | [
"Apache-2.0"
] | null | null | null | src/app/models/cluster_payload.py | n-gibs/fast-api-clustering | bab0a567a40559a60ba0cd7b9234ff253b294012 | [
"Apache-2.0"
] | null | null | null | from pydantic import BaseModel
class CustomerSegmentationPayload(BaseModel):
table_name: str
| 19.6 | 45 | 0.826531 |
43ae68534a663d002e6a9ae7ee763fd57870599d | 7,291 | py | Python | src/python/ilp_pre_proc.py | hhelm10/distPURL | 735480bceff38b7a10ea618c13fe93a5b3d26910 | [
"MIT"
] | 2 | 2021-04-27T15:26:00.000Z | 2021-09-12T23:15:02.000Z | src/python/ilp_pre_proc.py | hhelm10/distPURL | 735480bceff38b7a10ea618c13fe93a5b3d26910 | [
"MIT"
] | null | null | null | src/python/ilp_pre_proc.py | hhelm10/distPURL | 735480bceff38b7a10ea618c13fe93a5b3d26910 | [
"MIT"
] | 2 | 2021-04-27T15:26:33.000Z | 2021-09-13T12:32:24.000Z | """
Copyright (c) Microsoft Corporation.
Licensed under the MIT license.
"""
import numpy as np
from tqdm import tqdm
import logging
from ilp_common import *
from ilp_metadata_proc import *
from ilp_common_classes import *
from typing import *
from typing import List, Dict
class ILPPreProcData:
'''
ILPPrePro... | 47.967105 | 248 | 0.651351 |
b26c900cffef6cee14c6ebf57ce71ffff8ffddef | 5,976 | py | Python | agentframework.py | nickaquilina/abm | f6306ed14e3bab197429a3fc00699b85969fd2ba | [
"MIT"
] | null | null | null | agentframework.py | nickaquilina/abm | f6306ed14e3bab197429a3fc00699b85969fd2ba | [
"MIT"
] | null | null | null | agentframework.py | nickaquilina/abm | f6306ed14e3bab197429a3fc00699b85969fd2ba | [
"MIT"
] | null | null | null | """ This is the main Agent Framework file (and Class). All operations related to the Agent
movement and related states are contained.
"""
import math
import random
class Agent():
def __init__(self, environment, xLim, yLim, allAgents, logger, x=None, y=None):
""" If the x & y variables are populated, t... | 39.576159 | 96 | 0.56342 |
85b9e85f6d52755cf714156563244392bb9ce786 | 150 | py | Python | ninja/nodes/__init__.py | alecperkins/py-ninja | 206de19180ff7b498404adb79c934e14a3edbefb | [
"Unlicense"
] | 2 | 2015-02-09T17:44:30.000Z | 2015-08-18T11:30:21.000Z | ninja/nodes/__init__.py | alecperkins/py-ninja | 206de19180ff7b498404adb79c934e14a3edbefb | [
"Unlicense"
] | null | null | null | ninja/nodes/__init__.py | alecperkins/py-ninja | 206de19180ff7b498404adb79c934e14a3edbefb | [
"Unlicense"
] | null | null | null | from .core import *
from .basic import *
from .devices import *
from .fileio import *
from .logic import *
from .network import *
| 21.428571 | 24 | 0.626667 |
5099527ee4acb3f9e9accb6b9fa94f334ca78f39 | 2,007 | py | Python | pastry/resources/search.py | stephenbm/pastry | bb92e615765cf1244617db2bf02891d18d3b5d65 | [
"MIT"
] | null | null | null | pastry/resources/search.py | stephenbm/pastry | bb92e615765cf1244617db2bf02891d18d3b5d65 | [
"MIT"
] | null | null | null | pastry/resources/search.py | stephenbm/pastry | bb92e615765cf1244617db2bf02891d18d3b5d65 | [
"MIT"
] | null | null | null | '''Search provides access to chef's search functionality'''
import urllib
from .base import Base
from pastry.pastry_client import PastryClient
class Search(Base):
'''
Provides access to chef `search`
'''
_base_url = '/organizations/%(org)s/search'
@classmethod
def index(cls):
'''
... | 30.876923 | 75 | 0.574988 |
aeb6204265b0060671f503959e34845f46b8882a | 2,715 | py | Python | homeassistant/components/xs1/__init__.py | itewk/home-assistant | 769cf19052f8c9ef374d8ba8ae7705ccc7bf4cf4 | [
"Apache-2.0"
] | 23 | 2017-11-15T21:03:53.000Z | 2021-03-29T21:33:48.000Z | homeassistant/components/xs1/__init__.py | itewk/home-assistant | 769cf19052f8c9ef374d8ba8ae7705ccc7bf4cf4 | [
"Apache-2.0"
] | 39 | 2016-12-16T12:40:34.000Z | 2017-02-13T17:53:42.000Z | homeassistant/components/xs1/__init__.py | itewk/home-assistant | 769cf19052f8c9ef374d8ba8ae7705ccc7bf4cf4 | [
"Apache-2.0"
] | 10 | 2018-01-01T00:12:51.000Z | 2021-12-21T23:08:05.000Z | """Support for the EZcontrol XS1 gateway."""
import asyncio
import logging
import voluptuous as vol
import xs1_api_client
from homeassistant.const import (
CONF_HOST,
CONF_PASSWORD,
CONF_PORT,
CONF_SSL,
CONF_USERNAME,
)
from homeassistant.helpers import discovery
import homeassistant.helpers.confi... | 27.15 | 83 | 0.665562 |
410a22b67e6fc3224a9e801d652deff545660daa | 24,294 | py | Python | src/streamlink/plugins/twitch.py | RomanKornev/streamlink | acdefee0822b9c10628b91a166f9abe084e44800 | [
"BSD-2-Clause"
] | 1 | 2021-08-11T14:03:15.000Z | 2021-08-11T14:03:15.000Z | src/streamlink/plugins/twitch.py | RomanKornev/streamlink | acdefee0822b9c10628b91a166f9abe084e44800 | [
"BSD-2-Clause"
] | 1 | 2020-06-02T02:36:30.000Z | 2020-06-02T02:36:30.000Z | src/streamlink/plugins/twitch.py | bumplzz69/streamlink | 34abc43875d7663ebafa241573dece272e93d88b | [
"BSD-2-Clause"
] | 1 | 2021-02-15T16:22:07.000Z | 2021-02-15T16:22:07.000Z | # coding=utf-8
import re
import warnings
from random import random
import requests
from streamlink.compat import urlparse
from streamlink.exceptions import NoStreamsError, PluginError, StreamError
from streamlink.plugin import Plugin, PluginArguments, PluginArgument
from streamlink.plugin.api import validate
from str... | 35.465693 | 120 | 0.557133 |
d5d3650e600ad773d99f21bdaa44355cc82d685a | 1,318 | py | Python | tensorflow/contrib/tfprof/__init__.py | tianyapiaozi/tensorflow | fb3ce0467766a8e91f1da0ad7ada7c24fde7a73a | [
"Apache-2.0"
] | 848 | 2019-12-03T00:16:17.000Z | 2022-03-31T22:53:17.000Z | tensorflow/contrib/tfprof/__init__.py | shrikunjsarda/tensorflow | 7e8927e7af0c51ac20a63bd4eab6ff83df1a39ae | [
"Apache-2.0"
] | 656 | 2019-12-03T00:48:46.000Z | 2022-03-31T18:41:54.000Z | tensorflow/contrib/tfprof/__init__.py | shrikunjsarda/tensorflow | 7e8927e7af0c51ac20a63bd4eab6ff83df1a39ae | [
"Apache-2.0"
] | 506 | 2019-12-03T00:46:26.000Z | 2022-03-30T10:34:56.000Z | # Copyright 2015 The TensorFlow Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applica... | 35.621622 | 80 | 0.754173 |
ce00465134f68e47e1c15f5035c5a4e01e8dd3f9 | 1,752 | py | Python | theano/tensor/nnet/tests/test_opt.py | JimmyRetza/Theano | 72d83bce0d547d54ab3513bcba35c166979f7a6f | [
"BSD-3-Clause"
] | 9 | 2018-10-29T20:25:25.000Z | 2021-11-17T11:03:17.000Z | theano/tensor/nnet/tests/test_opt.py | EnjoyLifeFund/Debian_py36_packages | 1985d4c73fabd5f08f54b922e73a9306e09c77a5 | [
"BSD-3-Clause",
"BSD-2-Clause",
"MIT"
] | null | null | null | theano/tensor/nnet/tests/test_opt.py | EnjoyLifeFund/Debian_py36_packages | 1985d4c73fabd5f08f54b922e73a9306e09c77a5 | [
"BSD-3-Clause",
"BSD-2-Clause",
"MIT"
] | 1 | 2020-01-06T20:28:42.000Z | 2020-01-06T20:28:42.000Z | from __future__ import absolute_import, print_function, division
import theano
from theano import tensor
from theano.tests.unittest_tools import assertFailure_fast
from theano.gof.opt import check_stack_trace
from theano.tensor.nnet.blocksparse import (
sparse_block_dot, sparse_block_gemv_inplace, sparse_block_oute... | 34.352941 | 93 | 0.708333 |
69c12b1077ed8bf03bb0b4e37db2a8b7eebaf08c | 1,186 | py | Python | geekshop/mainapp/models.py | Nazarik86/Django_GB | f0aa129e5700064928259448364e04b3c81eb28c | [
"MIT"
] | null | null | null | geekshop/mainapp/models.py | Nazarik86/Django_GB | f0aa129e5700064928259448364e04b3c81eb28c | [
"MIT"
] | null | null | null | geekshop/mainapp/models.py | Nazarik86/Django_GB | f0aa129e5700064928259448364e04b3c81eb28c | [
"MIT"
] | null | null | null | from django.db import models
class ProductCategory(models.Model):
name = models.CharField(verbose_name='название категории', max_length=64, unique=True)
description = models.TextField(verbose_name='описание категории', blank=True)
is_active = models.BooleanField(verbose_name='категория активна', default=T... | 47.44 | 104 | 0.745363 |
e43f1ad673351bfca100f93f4ddab4b3a982b0c1 | 111 | py | Python | addons/website_helpdesk_support_ticket/controllers/__init__.py | marionumza/vocal_v12 | 480990e919c9410903e06e7813ee92800bd6a569 | [
"Unlicense"
] | null | null | null | addons/website_helpdesk_support_ticket/controllers/__init__.py | marionumza/vocal_v12 | 480990e919c9410903e06e7813ee92800bd6a569 | [
"Unlicense"
] | null | null | null | addons/website_helpdesk_support_ticket/controllers/__init__.py | marionumza/vocal_v12 | 480990e919c9410903e06e7813ee92800bd6a569 | [
"Unlicense"
] | 1 | 2021-05-05T07:59:08.000Z | 2021-05-05T07:59:08.000Z | # -*- coding: utf-8 -*-
from . import main
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
| 18.5 | 65 | 0.702703 |
407e165aef8e0fa27cbae1a9192173856621f855 | 68,263 | py | Python | sympy/functions/combinatorial/numbers.py | diogo-cruz/sympy | 3b70a1caf6f902c3c57466c08ae2498bd3586a7a | [
"BSD-3-Clause"
] | null | null | null | sympy/functions/combinatorial/numbers.py | diogo-cruz/sympy | 3b70a1caf6f902c3c57466c08ae2498bd3586a7a | [
"BSD-3-Clause"
] | null | null | null | sympy/functions/combinatorial/numbers.py | diogo-cruz/sympy | 3b70a1caf6f902c3c57466c08ae2498bd3586a7a | [
"BSD-3-Clause"
] | null | null | null | """
This module implements some special functions that commonly appear in
combinatorial contexts (e.g. in power series); in particular,
sequences of rational numbers such as Bernoulli and Fibonacci numbers.
Factorials, binomial coefficients and related functions are located in
the separate 'factorials' module.
"""
fr... | 31.255952 | 126 | 0.507229 |
513c29ec3693f2fa419bc8c3ef6ff08b1fd9fbe4 | 18,536 | py | Python | riscv_axiomatic/virtual.py | cento/riscv_axiomatic | e7652b5957b7d596cf95e0697ad17356cb0bfb10 | [
"BSD-3-Clause"
] | 2 | 2021-02-05T01:36:42.000Z | 2021-03-18T20:45:44.000Z | riscv_axiomatic/virtual.py | cento/riscv_axiomatic | e7652b5957b7d596cf95e0697ad17356cb0bfb10 | [
"BSD-3-Clause"
] | 1 | 2021-03-25T10:18:58.000Z | 2021-03-26T15:53:31.000Z | riscv_axiomatic/virtual.py | cento/riscv_axiomatic | e7652b5957b7d596cf95e0697ad17356cb0bfb10 | [
"BSD-3-Clause"
] | 2 | 2021-02-05T01:36:46.000Z | 2021-03-25T09:27:39.000Z | #!/usr/bin/env python3
# Built-in modules
import unittest
# Standard modules
import z3 # pip install z3-solver
# Local modules
from .riscv import *
from .z3_wrapper import *
################################################################################
# RISC-V Virtual Memory Architecture
class PTE32:
def... | 31.470289 | 80 | 0.479068 |
e0feabb50612b6802a21b074c18c123b46bbf5aa | 311 | py | Python | day04/myapp/models.py | zhouqi007/flask1112 | 0300ec86102ca5bda5c716f66a844b7f9b805069 | [
"Apache-2.0"
] | null | null | null | day04/myapp/models.py | zhouqi007/flask1112 | 0300ec86102ca5bda5c716f66a844b7f9b805069 | [
"Apache-2.0"
] | null | null | null | day04/myapp/models.py | zhouqi007/flask1112 | 0300ec86102ca5bda5c716f66a844b7f9b805069 | [
"Apache-2.0"
] | null | null | null | from myapp.ext import db
class News(db.Model):
id = db.Column(
db.Integer,
primary_key=True,
autoincrement=True
)
title = db.Column(
db.String(30),
index=True
)
content = db.Column(
db.String(100),
nullable=True
) | 18.294118 | 27 | 0.504823 |
25c341ee3fb492d3076d48dc135220b0d4cdc7a4 | 695 | py | Python | Code/IteraçãoeListas/fibonacci.py | DaviNakamuraCardoso/Use-a-Cabeca-Aprenda-a-Programar | d5e83a2c48f184333d16cef9b4d64dce070d0cad | [
"MIT"
] | null | null | null | Code/IteraçãoeListas/fibonacci.py | DaviNakamuraCardoso/Use-a-Cabeca-Aprenda-a-Programar | d5e83a2c48f184333d16cef9b4d64dce070d0cad | [
"MIT"
] | null | null | null | Code/IteraçãoeListas/fibonacci.py | DaviNakamuraCardoso/Use-a-Cabeca-Aprenda-a-Programar | d5e83a2c48f184333d16cef9b4d64dce070d0cad | [
"MIT"
] | null | null | null | fibonaccis = {1: 1, 2: 1, 3: 2}
def get_fibonacci(q):
for q in range(4, 100001):
fibonaccis[q] = fibonaccis[q-1] + fibonaccis[q-2]
def fibonacci_det(q):
try:
global fibonaccis
q = int(q)
if q in fibonaccis:
return fibonaccis[q]
else:
fibonaccis... | 23.965517 | 88 | 0.594245 |
200c1ee44806e2126d515ff6f7cb13dbe2345117 | 1,738 | py | Python | cantileveroptimizer/topologies/topology_new_stepped.py | simoore/cantilever-designer | dfc3849b5c772708dc173054cc2da4b2b1f18e94 | [
"MIT"
] | 1 | 2020-03-31T02:11:28.000Z | 2020-03-31T02:11:28.000Z | cantileveroptimizer/topologies/topology_new_stepped.py | ccwanggl/cantilever-optimizer | e7447cbb227a3c04bdd2810c8f43bae6278ec7ee | [
"MIT"
] | null | null | null | cantileveroptimizer/topologies/topology_new_stepped.py | ccwanggl/cantilever-optimizer | e7447cbb227a3c04bdd2810c8f43bae6278ec7ee | [
"MIT"
] | 1 | 2019-06-03T13:15:41.000Z | 2019-06-03T13:15:41.000Z | import numpy as np
class NewSteppedTopology(object):
def __init__(self, params):
self._dim_elems = (params['nelx'], params['nely'])
self._a0 = params['a0']
self._b0 = params['b0']
# The topology is formulated on a normalised mesh where elements are
# 1x1 units. The aspec... | 31.035714 | 77 | 0.537975 |
7be8df6835b780d726ebceda0cf838754ef3744e | 15,227 | py | Python | var/spack/repos/builtin/packages/openjdk/package.py | jeanbez/spack | f4e51ce8f366c85bf5aa0eafe078677b42dae1ba | [
"ECL-2.0",
"Apache-2.0",
"MIT-0",
"MIT"
] | null | null | null | var/spack/repos/builtin/packages/openjdk/package.py | jeanbez/spack | f4e51ce8f366c85bf5aa0eafe078677b42dae1ba | [
"ECL-2.0",
"Apache-2.0",
"MIT-0",
"MIT"
] | null | null | null | var/spack/repos/builtin/packages/openjdk/package.py | jeanbez/spack | f4e51ce8f366c85bf5aa0eafe078677b42dae1ba | [
"ECL-2.0",
"Apache-2.0",
"MIT-0",
"MIT"
] | 2 | 2019-02-08T20:37:20.000Z | 2019-03-31T15:19:26.000Z | # Copyright 2013-2022 Lawrence Livermore National Security, LLC and other
# Spack Project Developers. See the top-level COPYRIGHT file for details.
#
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
import os
import platform
import re
from spack.package import *
from spack.util.prefix import Prefix
# If you need to ad... | 70.823256 | 253 | 0.739476 |
e964f9bfb4edc61370bc08628eeb60f082674af3 | 4,917 | py | Python | localstack/services/cloudformation/models/kms.py | roguesupport/localstack | 087abb05fcb360297431ad8e5790c8014e0a80d7 | [
"Apache-2.0"
] | null | null | null | localstack/services/cloudformation/models/kms.py | roguesupport/localstack | 087abb05fcb360297431ad8e5790c8014e0a80d7 | [
"Apache-2.0"
] | null | null | null | localstack/services/cloudformation/models/kms.py | roguesupport/localstack | 087abb05fcb360297431ad8e5790c8014e0a80d7 | [
"Apache-2.0"
] | null | null | null | import json
from localstack.services.cloudformation.service_models import REF_ID_ATTRS, GenericBaseModel
from localstack.utils.aws import aws_stack
from localstack.utils.common import short_uid
class KMSKey(GenericBaseModel):
@staticmethod
def cloudformation_type():
return "AWS::KMS::Key"
def fe... | 39.02381 | 104 | 0.57108 |
6e7d08114237a138b6d64282ea4c7623a44d95ab | 305 | py | Python | data/multilingual/Latn.SAG/Serif_16/pdf_to_json_test_Latn.SAG_Serif_16.py | antoinecarme/pdf_to_json_tests | d57a024fde862e698d916a1178f285883d7a3b2f | [
"BSD-3-Clause"
] | 1 | 2021-09-19T19:47:35.000Z | 2021-09-19T19:47:35.000Z | data/multilingual/Latn.SAG/Serif_16/pdf_to_json_test_Latn.SAG_Serif_16.py | antoinecarme/pdf_to_json_tests | d57a024fde862e698d916a1178f285883d7a3b2f | [
"BSD-3-Clause"
] | null | null | null | data/multilingual/Latn.SAG/Serif_16/pdf_to_json_test_Latn.SAG_Serif_16.py | antoinecarme/pdf_to_json_tests | d57a024fde862e698d916a1178f285883d7a3b2f | [
"BSD-3-Clause"
] | null | null | null | import pdf_to_json as p2j
import json
url = "file:data/multilingual/Latn.SAG/Serif_16/udhr_Latn.SAG_Serif_16.pdf"
lConverter = p2j.pdf_to_json.pdf_to_json_converter()
lConverter.mImageHashOnly = True
lDict = lConverter.convert(url)
print(json.dumps(lDict, indent=4, ensure_ascii=False, sort_keys=True))
| 30.5 | 75 | 0.813115 |
d3f2ccb5941749885811b1875facb1b11055cd2e | 2,231 | py | Python | {{ cookiecutter.repo_name }}/src/models/predict.py | crmne/cookiecutter-data-science | d550953740c7543152352d50136f40ff8ea3385d | [
"MIT"
] | null | null | null | {{ cookiecutter.repo_name }}/src/models/predict.py | crmne/cookiecutter-data-science | d550953740c7543152352d50136f40ff8ea3385d | [
"MIT"
] | null | null | null | {{ cookiecutter.repo_name }}/src/models/predict.py | crmne/cookiecutter-data-science | d550953740c7543152352d50136f40ff8ea3385d | [
"MIT"
] | 2 | 2018-04-11T09:11:00.000Z | 2019-08-02T05:12:29.000Z | # -*- coding: utf-8 -*-
import logging
import click
@click.command(short_help='Makes a prediction')
@click.argument('model_path', type=click.Path(exists=True))
@click.argument('feature_extractor_path', type=click.Path(exists=True))
@click.argument('data_to_predict_path', type=click.Path(exists=True))
@click.argument... | 42.09434 | 79 | 0.740923 |
c2c5dcf10512086405f301f79e81e676ab90cdae | 458 | py | Python | formlibrary/export.py | tanmayagarwal/Activity-CE | a49c47053b191ffa5aee9a06e66a7c9644804434 | [
"Apache-2.0"
] | 1 | 2021-07-07T07:31:53.000Z | 2021-07-07T07:31:53.000Z | formlibrary/export.py | AkshJain99/Activity-CE | cbd1aa94a115a5bdba5e69fa3030335fa58c695b | [
"Apache-2.0"
] | null | null | null | formlibrary/export.py | AkshJain99/Activity-CE | cbd1aa94a115a5bdba5e69fa3030335fa58c695b | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/python3
# -*- coding: utf-8 -*-
from import_export import resources
from .models import TrainingAttendance, Distribution, Beneficiary
class TrainingAttendanceResource(resources.ModelResource):
class Meta:
model = TrainingAttendance
class DistributionResource(resources.ModelResource):
c... | 19.913043 | 65 | 0.744541 |
a60c063783d0d1e4aff6d48f5b4ed10ad6c527ed | 11,128 | py | Python | demo1206-master/conf/default.py | GFH24/demo-master | cff5e94b955bd66a8075ce59ca44cb4b521c9924 | [
"Apache-2.0"
] | null | null | null | demo1206-master/conf/default.py | GFH24/demo-master | cff5e94b955bd66a8075ce59ca44cb4b521c9924 | [
"Apache-2.0"
] | null | null | null | demo1206-master/conf/default.py | GFH24/demo-master | cff5e94b955bd66a8075ce59ca44cb4b521c9924 | [
"Apache-2.0"
] | null | null | null | # -*- coding: utf-8 -*-
"""
Tencent is pleased to support the open source community by making 蓝鲸智云(BlueKing) available.
Copyright (C) 2017 THL A29 Limited, a Tencent company. All rights reserved.
Licensed under the MIT License (the "License"); you may not use this file except in compliance with the License.
You may obt... | 34.24 | 141 | 0.535047 |
64889294ffd1e1bd4455ad38eeb012a75fc2b2fe | 2,044 | py | Python | chap3_lnode.py | zxr931120/data-structure-and-algorithm | 76671cb82c701e17c6638d4e895c35ea2c2c18bf | [
"MIT"
] | 5 | 2017-03-03T09:18:03.000Z | 2018-07-02T08:35:58.000Z | chap3_lnode.py | zxr931120/data-structure-and-algorithm | 76671cb82c701e17c6638d4e895c35ea2c2c18bf | [
"MIT"
] | null | null | null | chap3_lnode.py | zxr931120/data-structure-and-algorithm | 76671cb82c701e17c6638d4e895c35ea2c2c18bf | [
"MIT"
] | 2 | 2018-08-22T06:49:23.000Z | 2018-10-10T08:47:53.000Z | # -*- coding: utf-8 -*-
"""
单链表的实现
"""
import sys
class LinkedListUnderflow(ValueError):
pass
class LNode(object):
def __init__(self, elem, next_=None):
"""one node"""
self.elem = elem
self.next = next_
class LList(object):
def __init__(self):
self._head = None
def... | 21.744681 | 52 | 0.499511 |
1f1ee1bc180879eb6cbea3a43af6bb84b4907135 | 2,266 | py | Python | DetectNewVideosAndTimestampThem/DetectNewVideoUpload.py | ferendo/Skipperino-Kripperino-Machine-Learino | 26c85592debf5c8f77d3fa1631091e010ecc7725 | [
"MIT"
] | null | null | null | DetectNewVideosAndTimestampThem/DetectNewVideoUpload.py | ferendo/Skipperino-Kripperino-Machine-Learino | 26c85592debf5c8f77d3fa1631091e010ecc7725 | [
"MIT"
] | null | null | null | DetectNewVideosAndTimestampThem/DetectNewVideoUpload.py | ferendo/Skipperino-Kripperino-Machine-Learino | 26c85592debf5c8f77d3fa1631091e010ecc7725 | [
"MIT"
] | null | null | null | import sched
import time
import logging
import DetectNewVideosAndTimestampThem.MakeTimestampOnNewVideo as MakeTimestamp
scheduler = None
delay = 0
def init_scheduler(api_client, scheduler_delay, channel_id, new_videos_location):
global scheduler, delay
scheduler = sched.scheduler(time.time, time.sleep)
d... | 35.40625 | 118 | 0.71271 |
953160472b5244c582c0dc8227f32e666922d8c7 | 55,334 | py | Python | sdk/python/pulumi_azure_native/containerservice/v20200401/outputs.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/containerservice/v20200401/outputs.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/containerservice/v20200401/outputs.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! ***
import warnings
import pulumi
import pulumi.runtime
from typing import Any, Mapping, Optional, Sequence, Union
from ... import _utilities, _tables
from... | 41.448689 | 537 | 0.660986 |
efac273c98d64bdeafda73df20eefc7362bb9c33 | 11,927 | py | Python | mpe/scenarios/simple_world_comm.py | andrewliao11/multiagent-particle-envs | 890efbc1b7ec25e78af7b1c12309355305edd1df | [
"MIT"
] | null | null | null | mpe/scenarios/simple_world_comm.py | andrewliao11/multiagent-particle-envs | 890efbc1b7ec25e78af7b1c12309355305edd1df | [
"MIT"
] | null | null | null | mpe/scenarios/simple_world_comm.py | andrewliao11/multiagent-particle-envs | 890efbc1b7ec25e78af7b1c12309355305edd1df | [
"MIT"
] | null | null | null | import numpy as np
from mpe.core import World, Agent, Landmark
from mpe.scenario import BaseScenario
class Scenario(BaseScenario):
def make_world(self, **kwargs):
self.before_make_world(**kwargs)
world = World()
world.np_random = self.np_random
# set any world properties first
... | 39.233553 | 148 | 0.574495 |
dc09aa52b3512a8ea982ac27c04541df81938041 | 235 | py | Python | virtual/lib/python3.6/site-packages/pylint/test/functional/protected_access_access_different_scopes.py | drewheathens/The-Moringa-Tribune | 98ee4d63c9df6f1f7497fc6876960a822d914500 | [
"MIT"
] | 463 | 2015-01-15T08:17:42.000Z | 2022-03-28T15:10:20.000Z | virtual/lib/python3.6/site-packages/pylint/test/functional/protected_access_access_different_scopes.py | drewheathens/The-Moringa-Tribune | 98ee4d63c9df6f1f7497fc6876960a822d914500 | [
"MIT"
] | 52 | 2015-01-06T02:43:59.000Z | 2022-03-14T11:15:21.000Z | virtual/lib/python3.6/site-packages/pylint/test/functional/protected_access_access_different_scopes.py | drewheathens/The-Moringa-Tribune | 98ee4d63c9df6f1f7497fc6876960a822d914500 | [
"MIT"
] | 249 | 2015-01-07T22:49:49.000Z | 2022-03-18T02:32:06.000Z | # pylint: disable=missing-docstring, too-few-public-methods
class MyClass:
async def method(self):
pass
def function():
assert self.attr # [undefined-variable]
def func():
self.attr += 2 # [undefined-variable]
| 16.785714 | 59 | 0.668085 |
19c58168382a5039ba4c04b7eaf287e70b754daf | 2,680 | py | Python | tests/riscv/exception_handlers/exception_handlers_test_utils.py | Wlgen/force-riscv | 9f09b86c5a21ca00f8e5ade8e5186d65bc3e26f8 | [
"Apache-2.0"
] | null | null | null | tests/riscv/exception_handlers/exception_handlers_test_utils.py | Wlgen/force-riscv | 9f09b86c5a21ca00f8e5ade8e5186d65bc3e26f8 | [
"Apache-2.0"
] | null | null | null | tests/riscv/exception_handlers/exception_handlers_test_utils.py | Wlgen/force-riscv | 9f09b86c5a21ca00f8e5ade8e5186d65bc3e26f8 | [
"Apache-2.0"
] | null | null | null | #
# Copyright (C) [2020] Futurewei Technologies, Inc.
#
# FORCE-RISCV is 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
#
# THIS SOFTWARE IS PR... | 37.222222 | 80 | 0.73694 |
7a847396c6a693659e4e7663fa0bbede386473c5 | 1,368 | py | Python | algorithms/backtrack/add_operators.py | vansh-tiwari/algorithms | ac1718e16d83203dec6d3214690c84117d50d022 | [
"MIT"
] | 22,426 | 2017-01-17T04:01:44.000Z | 2022-03-31T12:06:16.000Z | algorithms/backtrack/add_operators.py | khiemtran99/algorithms | e498d4e01619b85cd4db0b150e24508946ac32d7 | [
"MIT"
] | 523 | 2017-04-18T12:05:11.000Z | 2022-03-20T11:10:41.000Z | algorithms/backtrack/add_operators.py | khiemtran99/algorithms | e498d4e01619b85cd4db0b150e24508946ac32d7 | [
"MIT"
] | 4,900 | 2017-01-19T23:47:05.000Z | 2022-03-31T10:00:47.000Z | """
Given a string that contains only digits 0-9 and a target value,
return all possibilities to add binary operators (not unary) +, -, or *
between the digits so they prevuate to the target value.
Examples:
"123", 6 -> ["1+2+3", "1*2*3"]
"232", 8 -> ["2*3+2", "2+3*2"]
"105", 5 -> ["1*0+5","10-5"]
"00", 0 -> ["0+0", "... | 29.73913 | 74 | 0.469298 |
5ad38443011e8a5b69f81622224a851e4b1c544b | 659 | py | Python | app/main/views.py | phelisia/NEWSHIGHLIGHT | 24f639a5c99b01c7cbc3aadde7405fec1831b3ca | [
"MIT"
] | null | null | null | app/main/views.py | phelisia/NEWSHIGHLIGHT | 24f639a5c99b01c7cbc3aadde7405fec1831b3ca | [
"MIT"
] | null | null | null | app/main/views.py | phelisia/NEWSHIGHLIGHT | 24f639a5c99b01c7cbc3aadde7405fec1831b3ca | [
"MIT"
] | null | null | null | from flask import render_template
from . import main
from ..models import News, Articles
from ..request import get_news, get_articles
# Views
@main.route('/')
def index():
'''
View root page function that returns the index page and its data
'''
# Getting popular movie
news = get_news()
title ... | 25.346154 | 75 | 0.691958 |
5f12b268c20edd06306130f8fef3f6392dfaf9e7 | 1,050 | py | Python | AutoSklearn/src/algorithm/__init__.py | 9606/AutoParams | cb206b099186f827e9059c408d7fb003814900d7 | [
"Apache-2.0"
] | null | null | null | AutoSklearn/src/algorithm/__init__.py | 9606/AutoParams | cb206b099186f827e9059c408d7fb003814900d7 | [
"Apache-2.0"
] | null | null | null | AutoSklearn/src/algorithm/__init__.py | 9606/AutoParams | cb206b099186f827e9059c408d7fb003814900d7 | [
"Apache-2.0"
] | null | null | null | from util import convert_params
from classification import ClassifierEvaluate
from classification import DecisionTreeClassifierEvaluate
from classification import LogisticRegressionEvaluate
from classification import LogisticRegressionCVEvaluate
from classification import RandomForestClassifierEvaluate
from py_neural_n... | 38.888889 | 57 | 0.909524 |
403da153440819a99b8028d20f1d042a946279ed | 8,487 | py | Python | deployfish/config.py | acburdine/deployfish | b66cb3c4505d1bca497abc7bb18fda9802c49ca5 | [
"MIT"
] | null | null | null | deployfish/config.py | acburdine/deployfish | b66cb3c4505d1bca497abc7bb18fda9802c49ca5 | [
"MIT"
] | null | null | null | deployfish/config.py | acburdine/deployfish | b66cb3c4505d1bca497abc7bb18fda9802c49ca5 | [
"MIT"
] | null | null | null | from functools import wraps
import os
import os.path
import re
import yaml
import sys
import click
from deployfish.aws import build_boto3_session
from deployfish.terraform import (NoSuchStateFile, Terraform, TerraformE)
def needs_config(func):
"""
Add a fully configured Config() object to the ctx variable f... | 35.51046 | 139 | 0.56781 |
ddb70fc21991d423d69f4fe4f15e6efa2a6eab23 | 6,883 | py | Python | OCR_For_Car_License/train_all.py | qw85639229/Car_License_SVM | c5b0062e84e5000c7940b1d90cc7c63e52afed21 | [
"MIT"
] | 1 | 2020-04-20T07:56:07.000Z | 2020-04-20T07:56:07.000Z | OCR_For_Car_License/train_all.py | qw85639229/Car_License_SVM | c5b0062e84e5000c7940b1d90cc7c63e52afed21 | [
"MIT"
] | null | null | null | OCR_For_Car_License/train_all.py | qw85639229/Car_License_SVM | c5b0062e84e5000c7940b1d90cc7c63e52afed21 | [
"MIT"
] | null | null | null | import torch
import cv2
from dataset import Dataset_Car_License
from opts import parser
from cnn import ConvNet_Car_License
import shutil
import numpy as np
import time
best_prec1 = 0
def main():
global args, best_prec1
args = parser.parse_args()
# load mnist data from torchvision
train_dataset = Dat... | 32.314554 | 100 | 0.577655 |
9e34b64a0f319eba00eaf43faedd0346fb297310 | 393 | py | Python | labelous_ti/labelous/asgi.py | tpwrules/labelous | 9a87e60a34c41066413bd6e913a21aaeff5ed786 | [
"MIT"
] | null | null | null | labelous_ti/labelous/asgi.py | tpwrules/labelous | 9a87e60a34c41066413bd6e913a21aaeff5ed786 | [
"MIT"
] | null | null | null | labelous_ti/labelous/asgi.py | tpwrules/labelous | 9a87e60a34c41066413bd6e913a21aaeff5ed786 | [
"MIT"
] | null | null | null | """
ASGI config for labelous project.
It exposes the ASGI callable as a module-level variable named ``application``.
For more information on this file, see
https://docs.djangoproject.com/en/3.0/howto/deployment/asgi/
"""
import os
from django.core.asgi import get_asgi_application
os.environ.setdefault('DJANGO_SETT... | 23.117647 | 78 | 0.78626 |
091cf7c05b15edddfc7e2406cff34532a37b6605 | 2,722 | py | Python | egs/chime6/s5c_track2/local/get_hyp_perspeaker_perarray_file.py | LanceaKing/kaldi | eb205a83f08fb8056ba1deb03c505ec8b722d4d9 | [
"Apache-2.0"
] | 39 | 2021-06-16T11:38:57.000Z | 2022-03-24T01:33:56.000Z | egs/chime6/s5c_track2/local/get_hyp_perspeaker_perarray_file.py | LanceaKing/kaldi | eb205a83f08fb8056ba1deb03c505ec8b722d4d9 | [
"Apache-2.0"
] | 8 | 2017-09-06T00:12:00.000Z | 2019-03-22T08:03:19.000Z | egs/chime6/s5c_track2/local/get_hyp_perspeaker_perarray_file.py | LanceaKing/kaldi | eb205a83f08fb8056ba1deb03c505ec8b722d4d9 | [
"Apache-2.0"
] | 29 | 2020-01-03T22:28:27.000Z | 2022-03-30T23:00:27.000Z | #! /usr/bin/env python
# Copyright 2019 Ashish Arora
# Apache 2.0.
"""This script splits a kaldi (text) file
into per_array per_session per_speaker hypothesis (text) files"""
import argparse
def get_args():
parser = argparse.ArgumentParser(
description="""This script splits a kaldi text file
... | 42.53125 | 106 | 0.660544 |
2d585b5df654b209d1f5b8e59bdefd7d37704c0f | 987 | py | Python | nosferatu/__init__.py | DanCardin/nosferatu | 7a81cfb0871e5a50649cde1a9585140e8b88d442 | [
"Apache-2.0"
] | null | null | null | nosferatu/__init__.py | DanCardin/nosferatu | 7a81cfb0871e5a50649cde1a9585140e8b88d442 | [
"Apache-2.0"
] | null | null | null | nosferatu/__init__.py | DanCardin/nosferatu | 7a81cfb0871e5a50649cde1a9585140e8b88d442 | [
"Apache-2.0"
] | null | null | null | from apscheduler.schedulers.background import BackgroundScheduler
from flask import Flask
from flask.ext.cache import Cache
from flask.ext.sqlalchemy import SQLAlchemy
from flask_user import UserManager, SQLAlchemyAdapter
from werkzeug.contrib.fixers import ProxyFix
from .assets import environment
app = Flask(__name... | 27.416667 | 65 | 0.795339 |
2a7b71410d5bf56513cdd859cf71140c56671743 | 233 | py | Python | snippets/order-credit-marketplace.py | timgates42/balanced-python | 1df86b45c36a97ec2e214480c6806c4df3c79860 | [
"MIT"
] | 12 | 2015-04-12T06:18:33.000Z | 2021-03-03T23:54:19.000Z | snippets/order-credit-marketplace.py | takwas/balanced-python | 1df86b45c36a97ec2e214480c6806c4df3c79860 | [
"MIT"
] | 1 | 2021-11-24T20:10:19.000Z | 2021-11-24T20:10:19.000Z | snippets/order-credit-marketplace.py | takwas/balanced-python | 1df86b45c36a97ec2e214480c6806c4df3c79860 | [
"MIT"
] | 14 | 2015-03-23T17:52:06.000Z | 2021-11-24T11:04:15.000Z | marketplace_bank_account = balanced.Marketplace.mine.owner_customer.bank_accounts[0]
order.credit_to(
amount=2000,
description="Credit from order escrow to marketplace bank account",
destination=marketplace_bank_account
) | 38.833333 | 84 | 0.815451 |
a139c15833bf5e5b946e58b63b28f870e24ba85f | 527 | py | Python | Chapter6/Exercise10.py | NoahNacho/Python-project-tests | 38e43f011159232fab29d2bb1be969cb5000e635 | [
"MIT"
] | 2 | 2021-07-02T03:07:38.000Z | 2021-07-21T14:47:20.000Z | Chapter6/Exercise10.py | NoahNacho/python-solving-problems-examples | 38e43f011159232fab29d2bb1be969cb5000e635 | [
"MIT"
] | null | null | null | Chapter6/Exercise10.py | NoahNacho/python-solving-problems-examples | 38e43f011159232fab29d2bb1be969cb5000e635 | [
"MIT"
] | null | null | null | import sys
def test(did_pass):
""" Print the result of a test. """
linenum = sys._getframe(1).f_lineno # Get the caller's line number.
if did_pass:
msg = "Test at line {0} ok.".format(linenum)
else:
msg = ("Test at line {0} FAILED.".format(linenum))
print(msg)
test(3 % 4 == 0)
... | 23.954545 | 73 | 0.56926 |
c400fdf7e5ba77e22d576816b3be05a9944ada64 | 4,674 | py | Python | app/app/crud/crud_task.py | gooocho/fastapi_todo | b88177e651f1c6984a636262a4d686935b67ed6f | [
"MIT"
] | null | null | null | app/app/crud/crud_task.py | gooocho/fastapi_todo | b88177e651f1c6984a636262a4d686935b67ed6f | [
"MIT"
] | null | null | null | app/app/crud/crud_task.py | gooocho/fastapi_todo | b88177e651f1c6984a636262a4d686935b67ed6f | [
"MIT"
] | null | null | null | from typing import List
from sqlalchemy import desc
from sqlalchemy.orm import Session
from app.models.assignment import ModelAssignment
from app.models.task import ModelTask
from app.schemas.task import TaskCreate, TaskId, TaskStatus, TaskUpdate
from app.schemas.user import UserId
def find(db: Session, task_id: Ta... | 21.440367 | 88 | 0.590715 |
bde92bd9706b15301a6e621798612e1197dfb4fe | 4,936 | py | Python | app/user/tests/test_user_api.py | jtkp66/recipe-app-api | 1b65b0a79617a24d1266188f6b76dc1ad5a943e9 | [
"MIT"
] | null | null | null | app/user/tests/test_user_api.py | jtkp66/recipe-app-api | 1b65b0a79617a24d1266188f6b76dc1ad5a943e9 | [
"MIT"
] | null | null | null | app/user/tests/test_user_api.py | jtkp66/recipe-app-api | 1b65b0a79617a24d1266188f6b76dc1ad5a943e9 | [
"MIT"
] | null | null | null | from django.test import TestCase
from django.contrib.auth import get_user_model
from django.urls import reverse
from rest_framework.test import APIClient
from rest_framework import status
CREATE_USER_URL = reverse('user:create')
TOKEN_URL = reverse('user:token')
ME_URL = reverse('user:me')
def create_user(**params... | 36.562963 | 77 | 0.660454 |
e83af8b3d899a971781003d5f42b5b313408de4f | 1,757 | py | Python | tools/create_embedding.py | sarahESL/MICCAI19-MedVQA | aa751cb905f79cd356ad5746f8a0640f1d81b5d2 | [
"MIT"
] | 27 | 2019-10-04T05:25:07.000Z | 2022-02-07T11:10:07.000Z | tools/create_embedding.py | HabibMrad/MICCAI19-MedVQA | 2fd455a8e4e69e84bada0251c4a77e4ab4ec77a0 | [
"MIT"
] | 16 | 2019-11-15T12:08:03.000Z | 2022-03-29T02:04:44.000Z | tools/create_embedding.py | HabibMrad/MICCAI19-MedVQA | 2fd455a8e4e69e84bada0251c4a77e4ab4ec77a0 | [
"MIT"
] | 15 | 2019-09-27T03:56:40.000Z | 2021-11-19T04:56:33.000Z | """
This code is from Hengyuan Hu's repository.
https://github.com/hengyuan-hu/bottom-up-attention-vqa
"""
from __future__ import print_function
import os
import sys
import json
import functools
import operator
import numpy as np
sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
import _pickl... | 31.945455 | 108 | 0.624929 |
a0a6ce9dc331e64a2e3ffe1d08f441cb34c00567 | 3,335 | py | Python | website/settings.py | Alexmhack/django_blog | ffb08983ca0aff2fca15961c64168bbb8d55311b | [
"MIT"
] | null | null | null | website/settings.py | Alexmhack/django_blog | ffb08983ca0aff2fca15961c64168bbb8d55311b | [
"MIT"
] | null | null | null | website/settings.py | Alexmhack/django_blog | ffb08983ca0aff2fca15961c64168bbb8d55311b | [
"MIT"
] | null | null | null | """
Django settings for website project.
Generated by 'django-admin startproject' using Django 2.1.1.
For more information on this file, see
https://docs.djangoproject.com/en/2.1/topics/settings/
For the full list of settings and their values, see
https://docs.djangoproject.com/en/2.1/ref/settings/
"""
import os
#... | 25.852713 | 91 | 0.697451 |
1597873c0a07d65646e8c0b60907d9f09f15ff9b | 7,524 | py | Python | supersmoother/utils.py | bahia14/Python-supersmoother | c7fea9bba374160fc0d6ca6ba8926f4cb7b9980f | [
"BSD-2-Clause"
] | null | null | null | supersmoother/utils.py | bahia14/Python-supersmoother | c7fea9bba374160fc0d6ca6ba8926f4cb7b9980f | [
"BSD-2-Clause"
] | null | null | null | supersmoother/utils.py | bahia14/Python-supersmoother | c7fea9bba374160fc0d6ca6ba8926f4cb7b9980f | [
"BSD-2-Clause"
] | null | null | null | from __future__ import division, print_function
from contextlib import contextmanager
import numpy as np
from .windowed_sum import windowed_sum_slow
try:
# This is the code in the fast branch
from ._window_fast import windowed_sum
except ImportError:
from .windowed_sum import windowed_sum
@contextmanag... | 31.35 | 77 | 0.595827 |
ddb2981207738bc741420ca9bace7d3677973103 | 1,867 | py | Python | matroska/cues.py | shersonb/python-matroska | a026f4ac8a356021f8989c4851032d60d2d21c7e | [
"MIT"
] | 3 | 2020-05-17T12:36:13.000Z | 2022-03-20T11:51:53.000Z | matroska/cues.py | shersonb/python-matroska | a026f4ac8a356021f8989c4851032d60d2d21c7e | [
"MIT"
] | null | null | null | matroska/cues.py | shersonb/python-matroska | a026f4ac8a356021f8989c4851032d60d2d21c7e | [
"MIT"
] | null | null | null | from ebml.base import EBMLMasterElement, EBMLInteger, EBMLList, EBMLProperty, EBMLData
class CueRefTime(EBMLInteger):
ebmlID = b"\x96"
class CueReference(EBMLMasterElement):
ebmlID = b"\xdb"
__ebmlchildren__ = (
EBMLProperty("cueRefTime", CueRefTime),
)
class CueTrack(EBMLInteger):
... | 26.295775 | 86 | 0.681843 |
5ebf4faab390cbe4f7db84c20d5702bad5e877fb | 1,269 | py | Python | Modules/Filtering/MathematicalMorphology/wrapping/test/BoxGrayscaleDilateImageFilterTest.py | HongdaZ/ITK | f5d004fa3607b8e11edc30f1ba299df35af8aff8 | [
"Apache-2.0"
] | 1 | 2021-01-10T14:19:08.000Z | 2021-01-10T14:19:08.000Z | Modules/Filtering/MathematicalMorphology/wrapping/test/BoxGrayscaleDilateImageFilterTest.py | HongdaZ/ITK | f5d004fa3607b8e11edc30f1ba299df35af8aff8 | [
"Apache-2.0"
] | 1 | 2017-03-19T12:56:50.000Z | 2018-10-24T10:40:21.000Z | Modules/Filtering/MathematicalMorphology/wrapping/test/BoxGrayscaleDilateImageFilterTest.py | HongdaZ/ITK | f5d004fa3607b8e11edc30f1ba299df35af8aff8 | [
"Apache-2.0"
] | 1 | 2020-07-24T22:58:19.000Z | 2020-07-24T22:58:19.000Z | #==========================================================================
#
# Copyright NumFOCUS
#
# 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/l... | 33.394737 | 77 | 0.661939 |
fcd1f39239e7e7938563d804e6abbd28e3d79e4e | 8,418 | py | Python | anadroid/testing_framework/RERANFramework.py | greensoftwarelab/PyAnaDroid | c37a85a2c8e0206895f2e96d28c2baa045f6a211 | [
"MIT"
] | null | null | null | anadroid/testing_framework/RERANFramework.py | greensoftwarelab/PyAnaDroid | c37a85a2c8e0206895f2e96d28c2baa045f6a211 | [
"MIT"
] | 2 | 2022-03-31T17:33:48.000Z | 2022-03-31T17:38:22.000Z | anadroid/testing_framework/RERANFramework.py | greensoftwarelab/PyAnaDroid | c37a85a2c8e0206895f2e96d28c2baa045f6a211 | [
"MIT"
] | null | null | null | import os
import time
from anadroid.Types import TESTING_FRAMEWORK
from anadroid.testing_framework.AbstractTestingFramework import AbstractTestingFramework
from anadroid.testing_framework.work.RERANWorkUnit import RERANWorkUnit
from anadroid.testing_framework.work.WorkLoad import WorkLoad
from anadroid.utils.Utils imp... | 46 | 124 | 0.663578 |
e7ed86e3d3dbc113ef286ca457dba8dba74dfac9 | 6,044 | py | Python | lib/fbchat/_user.py | achen4824/keras-yolo3 | d2aa423d419046bd63aabe510fe39595951b5b14 | [
"MIT"
] | 62 | 2020-04-26T08:34:35.000Z | 2022-01-13T14:16:29.000Z | lib/fbchat/_user.py | achen4824/keras-yolo3 | d2aa423d419046bd63aabe510fe39595951b5b14 | [
"MIT"
] | 1 | 2020-04-27T17:20:23.000Z | 2020-04-27T17:20:23.000Z | lib/fbchat/_user.py | achen4824/keras-yolo3 | d2aa423d419046bd63aabe510fe39595951b5b14 | [
"MIT"
] | 84 | 2020-04-26T08:03:18.000Z | 2021-09-05T02:42:14.000Z | # -*- coding: UTF-8 -*-
from __future__ import unicode_literals
import attr
from ._core import Enum
from . import _plan
from ._thread import ThreadType, Thread
GENDERS = {
# For standard requests
0: "unknown",
1: "female_singular",
2: "male_singular",
3: "female_singular_guess",
4: "male_sing... | 30.525253 | 87 | 0.57859 |
ef9826f24e9e461fd9aba59e8cf3a6d2f45b4fea | 1,493 | py | Python | src_code/code03/requests_timeout.py | marcelopalin/dicas_uteis | ddd9328d695c76abdeec58d2200380f0a35f12ed | [
"MIT"
] | 1 | 2019-03-19T17:15:26.000Z | 2019-03-19T17:15:26.000Z | src_code/code03/requests_timeout.py | marcelopalin/dicas_uteis | ddd9328d695c76abdeec58d2200380f0a35f12ed | [
"MIT"
] | 1 | 2019-08-03T12:48:06.000Z | 2019-08-03T12:48:06.000Z | src_code/code03/requests_timeout.py | marcelopalin/dicas_uteis | ddd9328d695c76abdeec58d2200380f0a35f12ed | [
"MIT"
] | 1 | 2019-03-18T12:43:17.000Z | 2019-03-18T12:43:17.000Z | import requests
import json
"""
Vamos entender sobre o requests TIMEOUT utilizando
o auxílio do site https://httpbin.org/
"""
def main():
try:
# Quantos segundos esperar a resposta
# Radical - Força do ERRO de Timeout
# timeout = 0.001
# Se você coloca um del... | 28.169811 | 80 | 0.603483 |
2cccc1e47a1245fc7133d9c3c44818aeb26a737b | 709 | py | Python | web/blueprint/release.py | marrow/web.blueprint | b458e89003bbaa4ed07c975795d804592011ec13 | [
"MIT"
] | null | null | null | web/blueprint/release.py | marrow/web.blueprint | b458e89003bbaa4ed07c975795d804592011ec13 | [
"MIT"
] | 5 | 2016-04-18T03:21:29.000Z | 2016-04-18T03:22:31.000Z | web/blueprint/release.py | marrow/web.blueprint | b458e89003bbaa4ed07c975795d804592011ec13 | [
"MIT"
] | null | null | null | # encoding: utf-8
"""Release information about WebCore."""
from __future__ import unicode_literals
import sys
from collections import namedtuple
version_info = namedtuple('version_info', ('major', 'minor', 'micro', 'releaselevel', 'serial'))(2, 0, 0, 'alpha', 1)
version = ".".join([str(i) for i in version_info[:3]... | 39.388889 | 164 | 0.726375 |
216e1aa416075dd3cba8978a25294c68376bb122 | 30,979 | py | Python | horovod/spark/lightning/estimator.py | Infi-zc/horovod | 94cd8561a21d449fc8c80c8fef422025b84dfc22 | [
"Apache-2.0"
] | null | null | null | horovod/spark/lightning/estimator.py | Infi-zc/horovod | 94cd8561a21d449fc8c80c8fef422025b84dfc22 | [
"Apache-2.0"
] | null | null | null | horovod/spark/lightning/estimator.py | Infi-zc/horovod | 94cd8561a21d449fc8c80c8fef422025b84dfc22 | [
"Apache-2.0"
] | null | null | null | # Copyright 2019 Uber Technologies, Inc. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applica... | 44.192582 | 194 | 0.621098 |
43724d47affdf6f93fae9406471ced47798cb858 | 7,430 | py | Python | spaghettifs/tests/test_filesystem.py | mgax/SpaghettiFS | 7782ed1a30910330f0380b70edf110262743374e | [
"MIT"
] | 3 | 2016-03-16T08:22:47.000Z | 2019-09-30T09:35:27.000Z | spaghettifs/tests/test_filesystem.py | mgax/SpaghettiFS | 7782ed1a30910330f0380b70edf110262743374e | [
"MIT"
] | null | null | null | spaghettifs/tests/test_filesystem.py | mgax/SpaghettiFS | 7782ed1a30910330f0380b70edf110262743374e | [
"MIT"
] | 4 | 2015-09-18T12:45:14.000Z | 2020-09-22T13:01:58.000Z | import unittest
import os
from os import path
import sys
import subprocess
import time
from errno import EPERM
from support import SpaghettiTestCase, randomdata
def wait_for_mount(mount_path):
for c in xrange(20):
if path.ismount(mount_path):
return True
time.sleep(.1)
else:
... | 33.169643 | 81 | 0.60821 |
9d2b5bc917db44ba7a8eed2842f0b064cdc939fa | 31,601 | py | Python | google/ads/googleads/v7/googleads-py/tests/unit/gapic/googleads.v7/services/test_payments_account_service.py | googleapis/googleapis-gen | d84824c78563d59b0e58d5664bfaa430e9ad7e7a | [
"Apache-2.0"
] | 7 | 2021-02-21T10:39:41.000Z | 2021-12-07T07:31:28.000Z | google/ads/googleads/v7/googleads-py/tests/unit/gapic/googleads.v7/services/test_payments_account_service.py | googleapis/googleapis-gen | d84824c78563d59b0e58d5664bfaa430e9ad7e7a | [
"Apache-2.0"
] | 6 | 2021-02-02T23:46:11.000Z | 2021-11-15T01:46:02.000Z | google/ads/googleads/v7/googleads-py/tests/unit/gapic/googleads.v7/services/test_payments_account_service.py | googleapis/googleapis-gen | d84824c78563d59b0e58d5664bfaa430e9ad7e7a | [
"Apache-2.0"
] | 4 | 2021-01-28T23:25:45.000Z | 2021-08-30T01:55:16.000Z | # -*- coding: utf-8 -*-
# Copyright 2020 Google 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 applicable law or... | 43.467675 | 219 | 0.714566 |
df6f780ae8bb42dbe269f867722b0ad4ac7a8c87 | 8,163 | py | Python | v2ecore/emulator_utils.py | lizhihao6/v2e | c5c756cd61946caf86a47f90876900347508000d | [
"MIT"
] | null | null | null | v2ecore/emulator_utils.py | lizhihao6/v2e | c5c756cd61946caf86a47f90876900347508000d | [
"MIT"
] | null | null | null | v2ecore/emulator_utils.py | lizhihao6/v2e | c5c756cd61946caf86a47f90876900347508000d | [
"MIT"
] | null | null | null | """Collections of emulator utilities.
Author: Yuhuang Hu
Email : yuhuang.hu@ini.uzh.ch
"""
import math
import torch
import torch.nn.functional as F
def lin_log(x, threshold=20):
"""
linear mapping + logarithmic mapping.
:param x: float or ndarray
the input linear value in range 0-255
:param... | 31.517375 | 86 | 0.660664 |
ca3c62122f27c59758e4bdab405aad89bf0cb4a2 | 1,713 | py | Python | molvae/reconstruct.py | luis-sribeiro/icml18-jtnn | ac04061286debc6034e4650f552651b2ad6e9752 | [
"MIT"
] | 381 | 2018-02-26T20:59:16.000Z | 2022-03-28T17:02:24.000Z | molvae/reconstruct.py | peterbjorgensen/icml18-jtnn | 28ed03fcb3f0a79f44f73eefc0bcad613ea39167 | [
"MIT"
] | 54 | 2018-03-10T13:19:12.000Z | 2022-03-10T03:28:58.000Z | molvae/reconstruct.py | peterbjorgensen/icml18-jtnn | 28ed03fcb3f0a79f44f73eefc0bcad613ea39167 | [
"MIT"
] | 182 | 2018-02-26T14:56:16.000Z | 2022-03-29T05:34:20.000Z | import torch
import torch.nn as nn
from torch.autograd import Variable
import math, random, sys
from optparse import OptionParser
from collections import deque
import rdkit
import rdkit.Chem as Chem
from jtnn import *
lg = rdkit.RDLogger.logger()
lg.setLevel(rdkit.RDLogger.CRITICAL)
parser = OptionParser()
parser... | 26.353846 | 70 | 0.674256 |
11e7621c9cf3617a86eae0263e6ea684df43b029 | 50,775 | py | Python | statsmodels/sandbox/stats/diagnostic.py | yanzhenxiong/statsmodels | e56c4046ff8807c3c16d6a9293b5cb5dfe6f0cd0 | [
"BSD-3-Clause"
] | 1 | 2019-07-11T02:23:18.000Z | 2019-07-11T02:23:18.000Z | statsmodels/sandbox/stats/diagnostic.py | yanzhenxiong/statsmodels | e56c4046ff8807c3c16d6a9293b5cb5dfe6f0cd0 | [
"BSD-3-Clause"
] | null | null | null | statsmodels/sandbox/stats/diagnostic.py | yanzhenxiong/statsmodels | e56c4046ff8807c3c16d6a9293b5cb5dfe6f0cd0 | [
"BSD-3-Clause"
] | null | null | null | # -*- coding: utf-8 -*-
"""Various Statistical Tests
Author: josef-pktd
License: BSD-3
Notes
-----
Almost fully verified against R or Gretl, not all options are the same.
In many cases of Lagrange multiplier tests both the LM test and the F test is
returned. In some but not all cases, R has the option to choose the ... | 32.382015 | 149 | 0.627691 |
76d3c35b16b3c4ec8cbe9e957fa4153a52bf082c | 97 | py | Python | Input-Output/input and output.py | rlwheelwright/PY3_StandardLib | 0d9acc02f5ca934eab774bbdd5acc3c92eff7191 | [
"Apache-2.0"
] | null | null | null | Input-Output/input and output.py | rlwheelwright/PY3_StandardLib | 0d9acc02f5ca934eab774bbdd5acc3c92eff7191 | [
"Apache-2.0"
] | null | null | null | Input-Output/input and output.py | rlwheelwright/PY3_StandardLib | 0d9acc02f5ca934eab774bbdd5acc3c92eff7191 | [
"Apache-2.0"
] | null | null | null | # Output
print("Hello User")
# Input
color = input("What is your favorite color? ")
print(color) | 16.166667 | 46 | 0.701031 |
18689ae645a152f649b8fdcd0491494411466057 | 1,246 | py | Python | openstack/tests/unit/volume_backup/test_volume_backup_service.py | wangrui1121/huaweicloud-sdk-python | 240abe00288760115d1791012d4e3c4592d77ad1 | [
"Apache-2.0"
] | 43 | 2018-12-19T08:39:15.000Z | 2021-07-21T02:45:43.000Z | openstack/tests/unit/volume_backup/test_volume_backup_service.py | wangrui1121/huaweicloud-sdk-python | 240abe00288760115d1791012d4e3c4592d77ad1 | [
"Apache-2.0"
] | 11 | 2019-03-17T13:28:56.000Z | 2020-09-23T23:57:50.000Z | openstack/tests/unit/volume_backup/test_volume_backup_service.py | wangrui1121/huaweicloud-sdk-python | 240abe00288760115d1791012d4e3c4592d77ad1 | [
"Apache-2.0"
] | 47 | 2018-12-19T05:14:25.000Z | 2022-03-19T15:28:30.000Z | # Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under t... | 41.533333 | 75 | 0.736758 |
48acf134b63977f2058c5e4681fda6ccc9984ef6 | 2,051 | py | Python | postpost/api/migrations/0001_initial.py | PiterPy-Meetup/postpost | a0b7f3b8005015335953af5dba7ee4722dcfbfb9 | [
"MIT"
] | 6 | 2018-12-21T18:18:26.000Z | 2019-02-23T11:20:53.000Z | postpost/api/migrations/0001_initial.py | JaradC42/postpost | a0b7f3b8005015335953af5dba7ee4722dcfbfb9 | [
"MIT"
] | 78 | 2019-03-02T11:52:45.000Z | 2020-03-11T02:25:28.000Z | postpost/api/migrations/0001_initial.py | JaradC42/postpost | a0b7f3b8005015335953af5dba7ee4722dcfbfb9 | [
"MIT"
] | 2 | 2019-05-06T08:17:50.000Z | 2019-10-18T03:23:25.000Z | # Generated by Django 2.1.4 on 2019-01-20 19:56
import django.db.models.deletion
from django.db import migrations, models
class Migration(migrations.Migration):
initial = True
dependencies = [
]
operations = [
migrations.CreateModel(
name='PlatformPost',
fields=[
... | 46.613636 | 254 | 0.609459 |
f3715fe3c9be7fe3eedd6c1ab020980608f18507 | 2,801 | py | Python | modules/joomla_ex/joomla.py | attackgithub/arissploit | 27208adddaa523e10c4efc6e1ba62f7b4ccc041f | [
"BSD-3-Clause"
] | 1 | 2021-08-13T22:14:29.000Z | 2021-08-13T22:14:29.000Z | modules/joomla_ex/joomla.py | attackgithub/arissploit | 27208adddaa523e10c4efc6e1ba62f7b4ccc041f | [
"BSD-3-Clause"
] | null | null | null | modules/joomla_ex/joomla.py | attackgithub/arissploit | 27208adddaa523e10c4efc6e1ba62f7b4ccc041f | [
"BSD-3-Clause"
] | null | null | null | #!/usr/bin/env python
# joomla_shellup.py - small script to upload shell in Joomla
#
# 02.05.2017, rewrited: 27.05
# -- hint --
# To exploit this "feature" you will need valid credentials.'
# Based on latest (3.6.5-1) version.'
# Tested also on: 3.7.x
R = '\033[31m' # Red
B = '\033[1;34m' #Blue
N = '\033[1;37m' # Whi... | 31.122222 | 116 | 0.628704 |
9a3078c9f4dd1ec69ebac4e1517d208813177106 | 21,616 | py | Python | kuryr_kubernetes/tests/unit/controller/drivers/test_network_policy.py | dulek/kuryr-kubernetes | d76a9dad18320ecd57b7735aed34806aa07f4091 | [
"Apache-2.0"
] | null | null | null | kuryr_kubernetes/tests/unit/controller/drivers/test_network_policy.py | dulek/kuryr-kubernetes | d76a9dad18320ecd57b7735aed34806aa07f4091 | [
"Apache-2.0"
] | null | null | null | kuryr_kubernetes/tests/unit/controller/drivers/test_network_policy.py | dulek/kuryr-kubernetes | d76a9dad18320ecd57b7735aed34806aa07f4091 | [
"Apache-2.0"
] | null | null | null | # Copyright 2018 Red Hat, 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 writing, ... | 46.991304 | 79 | 0.606726 |
c04ebe16c6257f9bd2c1238bc1c27371b157ab2a | 498 | py | Python | IonDownloader/Python/imports.py | yenbekbay/ion-downloader | 11ab405bb9c4d7494abd5bf63c575e6cdf1ba7c8 | [
"MIT"
] | null | null | null | IonDownloader/Python/imports.py | yenbekbay/ion-downloader | 11ab405bb9c4d7494abd5bf63c575e6cdf1ba7c8 | [
"MIT"
] | null | null | null | IonDownloader/Python/imports.py | yenbekbay/ion-downloader | 11ab405bb9c4d7494abd5bf63c575e6cdf1ba7c8 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
from setuptools.command import easy_install
import importlib
import pkg_resources
# If pip is not installed, install it
try:
import pip
except ImportError:
easy_install.main(['-U','pip'])
finally:
pkg_resources.require('pip')
import pip
# Install external packages
packages = ['m... | 24.9 | 54 | 0.704819 |
1217cc46b818b304f7362e9d3c18f6e9bd8d4d9e | 30,257 | py | Python | shadowsocks/obfsplugin/auth.py | yangliu/docker-arch-ssr | 015468216d7584c155ce0ae1b5aca6d57d6f69ed | [
"MIT"
] | null | null | null | shadowsocks/obfsplugin/auth.py | yangliu/docker-arch-ssr | 015468216d7584c155ce0ae1b5aca6d57d6f69ed | [
"MIT"
] | null | null | null | shadowsocks/obfsplugin/auth.py | yangliu/docker-arch-ssr | 015468216d7584c155ce0ae1b5aca6d57d6f69ed | [
"MIT"
] | null | null | null | #!/usr/bin/env python
#
# Copyright 2015-2015 breakwa11
#
# 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 la... | 38.990979 | 137 | 0.567208 |
af3e62ddbce8da64df2454bbb3bc62961c7f8d2c | 2,639 | py | Python | nfv/nfv-vim/nfv_vim/instance_fsm/_instance_state_delete.py | SidneyAn/nfv | 5f0262a5b6ea4be59f977b9c587c483cbe0e373d | [
"Apache-2.0"
] | 2 | 2020-02-07T19:01:36.000Z | 2022-02-23T01:41:46.000Z | nfv/nfv-vim/nfv_vim/instance_fsm/_instance_state_delete.py | SidneyAn/nfv | 5f0262a5b6ea4be59f977b9c587c483cbe0e373d | [
"Apache-2.0"
] | 1 | 2021-01-14T12:02:25.000Z | 2021-01-14T12:02:25.000Z | nfv/nfv-vim/nfv_vim/instance_fsm/_instance_state_delete.py | SidneyAn/nfv | 5f0262a5b6ea4be59f977b9c587c483cbe0e373d | [
"Apache-2.0"
] | 2 | 2021-01-13T08:39:21.000Z | 2022-02-09T00:21:55.000Z | #
# Copyright (c) 2015-2016 Wind River Systems, Inc.
#
# SPDX-License-Identifier: Apache-2.0
#
from nfv_common import debug
from nfv_common import state_machine
from nfv_vim.instance_fsm._instance_defs import INSTANCE_EVENT
from nfv_vim.instance_fsm._instance_defs import INSTANCE_STATE
from nfv_vim.instance_fsm._insta... | 31.795181 | 78 | 0.626374 |
f35ca536a06df858edaaaa69cc1248b60aa57a98 | 7,252 | py | Python | tests/functional/test_report.py | PyBites-Open-Source/git-stats | fdf28b5c12e8db02b06a55634d199000ec32fd60 | [
"MIT"
] | 10 | 2021-06-10T18:06:39.000Z | 2021-12-07T16:41:09.000Z | tests/functional/test_report.py | PyBites-Open-Source/git-stats | fdf28b5c12e8db02b06a55634d199000ec32fd60 | [
"MIT"
] | null | null | null | tests/functional/test_report.py | PyBites-Open-Source/git-stats | fdf28b5c12e8db02b06a55634d199000ec32fd60 | [
"MIT"
] | 2 | 2021-06-20T10:04:20.000Z | 2021-09-29T00:57:12.000Z | from stats.report import show_report
def test_report_allchanges_karmabot(karmabot_dir, capfd):
show_report(karmabot_dir)
actual = capfd.readouterr()[0].splitlines()
expected = [
"--------------------------------------------------",
"< Git Repo Activity Report >",
"> Repo: karmabot"... | 43.951515 | 61 | 0.237314 |
da0e40efd73dd52fe16a36b2083a984168599ff8 | 13,737 | py | Python | yitu/resources/users/main.py | 1ibrary/1ibrary-gzhu | 768af1837d6caa185c101cc82ea67efc931865c1 | [
"Apache-2.0"
] | 4 | 2017-06-30T01:32:52.000Z | 2019-07-03T15:46:24.000Z | yitu/resources/users/main.py | 1ibrary/1ibrary-gzhu | 768af1837d6caa185c101cc82ea67efc931865c1 | [
"Apache-2.0"
] | 3 | 2021-03-22T17:13:51.000Z | 2021-12-13T19:40:20.000Z | yitu/resources/users/main.py | 1ibrary/1ibrary-gzhu | 768af1837d6caa185c101cc82ea67efc931865c1 | [
"Apache-2.0"
] | null | null | null | # -*- coding: utf-8 -*-
import json
import time
from datetime import datetime
from flask_restful import Resource
from yitu import db
from yitu.models.book import Book, Subscribe as SubModel
from yitu.models.book_list import BookList as BookListModel, BookList
from yitu.models.feedback import FeedBackModel
from yitu... | 26.165714 | 99 | 0.430807 |
0c1dcfc5abf4cd9e952e632722e6a6c640c7dd3b | 958 | py | Python | intro til.py | magnusgp/intro-excercises | 58b318dc2c7ca82bd3a2c755fa3e71a859873895 | [
"Apache-2.0"
] | 1 | 2021-10-06T02:15:30.000Z | 2021-10-06T02:15:30.000Z | intro til.py | magnusgp/intro-excercises | 58b318dc2c7ca82bd3a2c755fa3e71a859873895 | [
"Apache-2.0"
] | null | null | null | intro til.py | magnusgp/intro-excercises | 58b318dc2c7ca82bd3a2c755fa3e71a859873895 | [
"Apache-2.0"
] | 2 | 2021-10-06T02:15:32.000Z | 2021-10-06T02:58:36.000Z | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
Created on Tue Sep 29 18:55:59 2020
@author: magnus
"""
import numpy as np
#%%
grades = [10, 2, 7]
def grades_mean(grades):
return sum(grades)/len(grades)
exam_avg = grades_mean(grades)
print('My mean is ' + str(exam_avg))
dk_scale = [-3,0,2,4,7,10,12]
ects_s... | 20.382979 | 78 | 0.65762 |
c1220db115cc07dfec72741478cafdeb469f4da2 | 2,204 | py | Python | utils/csv_response_.py | baixuexue123/djmo | 838a05be4fdfe05484a010aa9915af0a740daf59 | [
"MIT"
] | 1 | 2019-06-06T11:01:37.000Z | 2019-06-06T11:01:37.000Z | utils/csv_response_.py | baixuexue123/djmo | 838a05be4fdfe05484a010aa9915af0a740daf59 | [
"MIT"
] | null | null | null | utils/csv_response_.py | baixuexue123/djmo | 838a05be4fdfe05484a010aa9915af0a740daf59 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
from __future__ import unicode_literals, absolute_import
import csv
import codecs
import cStringIO
from django.http import StreamingHttpResponse
from django.views.generic import View
"""
流式响应StreamingHttpResponse可以快速,节省内存地产生一个大型文件
"""
class Echo(object):
"""An object that implements jus... | 27.898734 | 85 | 0.606624 |
6d0a51a41ece380b4b7abe69d830a04a94c14e5b | 8,397 | py | Python | research/astronet/astrowavenet/data/base.py | kichiro09/object-detection | b7087955bb5f2689b0ef42ab5400931cd8f416b6 | [
"Apache-2.0"
] | 8 | 2019-04-03T09:42:27.000Z | 2020-08-30T16:19:20.000Z | research/astronet/astrowavenet/data/base.py | bhushan23/models | e498d28503fd4a12d1fa9ade41891f2f9601c674 | [
"Apache-2.0"
] | 1 | 2018-11-19T14:54:19.000Z | 2018-11-19T17:00:41.000Z | research/astronet/astrowavenet/data/base.py | bhushan23/models | e498d28503fd4a12d1fa9ade41891f2f9601c674 | [
"Apache-2.0"
] | 3 | 2019-08-19T08:24:55.000Z | 2020-09-27T06:26:05.000Z | # Copyright 2018 The TensorFlow 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 ... | 34.842324 | 79 | 0.695486 |
bba1c5c7bf8b2dae14c985929a901676c3a5a6b0 | 6,177 | py | Python | armada_command/docker_utils/compatibility.py | armadaplatform/armada | bb640bf8c8db2dcf6d7b1606377a2da72dd97f4d | [
"Apache-2.0"
] | 281 | 2015-07-08T12:52:19.000Z | 2022-01-14T22:56:25.000Z | armada_command/docker_utils/compatibility.py | armadaplatform/armada | bb640bf8c8db2dcf6d7b1606377a2da72dd97f4d | [
"Apache-2.0"
] | 15 | 2015-08-03T14:54:30.000Z | 2021-01-27T12:30:06.000Z | armada_command/docker_utils/compatibility.py | armadaplatform/armada | bb640bf8c8db2dcf6d7b1606377a2da72dd97f4d | [
"Apache-2.0"
] | 39 | 2015-07-13T14:43:44.000Z | 2022-01-12T15:41:32.000Z | import argparse
import os
import re
import shutil
import sys
from distutils.version import StrictVersion
from subprocess import check_call, check_output, CalledProcessError
from tempfile import mkdtemp
DOCKER_STATIC_CLIENT_DIR = '/opt/armada-docker-client/'
def get_docker_version():
output = check_output(['docke... | 35.5 | 110 | 0.681399 |
b645853cb84dd7be328f64b460a166ea95c9f2bb | 1,756 | py | Python | lexer.py | Sakuk3/compiler | e6317b6473bbeed6a8dd7d55b74cb2ee732d379b | [
"MIT"
] | null | null | null | lexer.py | Sakuk3/compiler | e6317b6473bbeed6a8dd7d55b74cb2ee732d379b | [
"MIT"
] | null | null | null | lexer.py | Sakuk3/compiler | e6317b6473bbeed6a8dd7d55b74cb2ee732d379b | [
"MIT"
] | null | null | null | import re
from models import Token
class LexerError(Exception):
""" Lexer error exception.
pos:
Position in the input line where the error occurred.
"""
def __init__(self, pos):
Exception.__init__(self,"Lexer error at position {}".format(pos))
rules = [
('\d+', ... | 27.4375 | 92 | 0.432802 |
2d08b2e9e757a7929b19fb22baaf16deb604cffb | 1,574 | py | Python | poop/hfdp/facade/home_theater/streaming_player.py | cassiobotaro/poop | fc218fbf638c50da8ea98dab7de26ad2a52e83f5 | [
"MIT"
] | 37 | 2020-12-27T00:13:07.000Z | 2022-01-31T19:30:18.000Z | poop/hfdp/facade/home_theater/streaming_player.py | cassiobotaro/poop | fc218fbf638c50da8ea98dab7de26ad2a52e83f5 | [
"MIT"
] | null | null | null | poop/hfdp/facade/home_theater/streaming_player.py | cassiobotaro/poop | fc218fbf638c50da8ea98dab7de26ad2a52e83f5 | [
"MIT"
] | 7 | 2020-12-26T22:33:47.000Z | 2021-11-07T01:29:59.000Z | import typing
if typing.TYPE_CHECKING:
from poop.hfdp.facade.home_theater.amplifier import Amplifier
class StreamingPlayer:
def __init__(self, description: str, amplifier: "Amplifier") -> None:
self._description = description
self._amplifier = amplifier
self._current_chapter: int | No... | 29.698113 | 73 | 0.598475 |
8094a40bb9004d5b6137a404bfedccd19a143de2 | 327 | py | Python | python/desafios/desafio10_porcenagem.py | JbRodrigues/Estudos | 734e6ca80296f7d97890a0d5ad885d89711e8c1c | [
"MIT"
] | null | null | null | python/desafios/desafio10_porcenagem.py | JbRodrigues/Estudos | 734e6ca80296f7d97890a0d5ad885d89711e8c1c | [
"MIT"
] | null | null | null | python/desafios/desafio10_porcenagem.py | JbRodrigues/Estudos | 734e6ca80296f7d97890a0d5ad885d89711e8c1c | [
"MIT"
] | null | null | null | preco = float(input('Digite o preço do produto '))
desc = preco-(0.05*preco)
print('O produto de preço R${:.2f}, na liquidaçao esta custando R${:.2f}'.format(preco, desc))
sal = float(input('Digite Seu Salario '))
aumento = sal+(sal*0.15)
print('O salario de R${:.2f} com aumento foi para R${:.2f} !'.format(sal, au... | 29.727273 | 94 | 0.663609 |
591586f8662fc88ad676d167be77ce5ee5a1b869 | 7,419 | py | Python | bikeshare.py | yusuf-madkour/exploring-us-bike-share-data | d89bb62e59ad9c90510e87d2df049b3aed0c9a79 | [
"MIT"
] | null | null | null | bikeshare.py | yusuf-madkour/exploring-us-bike-share-data | d89bb62e59ad9c90510e87d2df049b3aed0c9a79 | [
"MIT"
] | null | null | null | bikeshare.py | yusuf-madkour/exploring-us-bike-share-data | d89bb62e59ad9c90510e87d2df049b3aed0c9a79 | [
"MIT"
] | 1 | 2021-09-22T09:37:24.000Z | 2021-09-22T09:37:24.000Z | import time
import pandas as pd
import pprint
from os import system
import prompts
CITY_DATA = {
"Chicago": "data/chicago.csv",
"New York City": "data/new_york_city.csv",
"Washington": "data/washington.csv",
}
def get_filters():
"""
Asks user to specify a city, month, and day to analyze.
Ret... | 31.841202 | 100 | 0.635665 |
edae5f64ff14244d077b93f834b2400b87c28757 | 2,942 | py | Python | lib/modules/powershell/persistence/misc/memssp.py | jimshew/Empire | a7413869849b2c3c521eb50bed61e00ede107688 | [
"BSD-3-Clause"
] | 4 | 2019-03-11T02:40:13.000Z | 2021-01-29T06:45:21.000Z | lib/modules/powershell/persistence/misc/memssp.py | jimshew/Empire | a7413869849b2c3c521eb50bed61e00ede107688 | [
"BSD-3-Clause"
] | 20 | 2020-03-11T03:58:21.000Z | 2020-03-12T03:59:38.000Z | lib/modules/powershell/persistence/misc/memssp.py | jimshew/Empire | a7413869849b2c3c521eb50bed61e00ede107688 | [
"BSD-3-Clause"
] | 1 | 2020-01-15T06:46:16.000Z | 2020-01-15T06:46:16.000Z | from __future__ import print_function
from builtins import str
from builtins import object
from lib.common import helpers
class Module(object):
def __init__(self, mainMenu, params=[]):
self.info = {
'Name': 'Invoke-Mimikatz memssp',
'Author': ['@JosephBialek', '@gentilkiwi'],
... | 33.431818 | 127 | 0.564922 |
5fc76315c263efc5afde6150f2a4a72c8d2f0df0 | 6,884 | py | Python | samples/deepfm/deepfm.py | xjqbest/HugeCTR | 0b1c92d5e65891dfdd90d917bc6d520d0ca5d1e1 | [
"Apache-2.0"
] | 1 | 2021-12-23T07:31:32.000Z | 2021-12-23T07:31:32.000Z | samples/deepfm/deepfm.py | xjqbest/HugeCTR | 0b1c92d5e65891dfdd90d917bc6d520d0ca5d1e1 | [
"Apache-2.0"
] | null | null | null | samples/deepfm/deepfm.py | xjqbest/HugeCTR | 0b1c92d5e65891dfdd90d917bc6d520d0ca5d1e1 | [
"Apache-2.0"
] | null | null | null | import hugectr
from mpi4py import MPI
solver = hugectr.CreateSolver(max_eval_batches = 300,
batchsize_eval = 16384,
batchsize = 16384,
lr = 0.001,
vvgpu = [[0]],
repeat_d... | 57.848739 | 153 | 0.48344 |
75b30fee3e7b60b14203c22697b8aa6894846db0 | 7,663 | py | Python | contrib/devtools/update-translations.py | m42cx/dashfirst | 0789ccf17b8589a5884688df1f9a1340b48b5453 | [
"MIT"
] | null | null | null | contrib/devtools/update-translations.py | m42cx/dashfirst | 0789ccf17b8589a5884688df1f9a1340b48b5453 | [
"MIT"
] | null | null | null | contrib/devtools/update-translations.py | m42cx/dashfirst | 0789ccf17b8589a5884688df1f9a1340b48b5453 | [
"MIT"
] | 1 | 2021-02-12T10:50:24.000Z | 2021-02-12T10:50:24.000Z | #!/usr/bin/python
# Copyright (c) 2014 Wladimir J. van der Laan
# Distributed under the MIT software license, see the accompanying
# file COPYING or http://www.opensource.org/licenses/mit-license.php.
'''
Run this script from the root of the repository to update all translations from
transifex.
It will do the following... | 37.563725 | 124 | 0.629518 |
75ee79b10c16cfa24210abb828e101ced1d8d577 | 9,813 | py | Python | nssrc/com/citrix/netscaler/nitro/resource/config/ssl/sslpolicylabel.py | mahabs/nitro | be74e1e177f5c205c16126bc9b023f2348788409 | [
"Apache-2.0"
] | null | null | null | nssrc/com/citrix/netscaler/nitro/resource/config/ssl/sslpolicylabel.py | mahabs/nitro | be74e1e177f5c205c16126bc9b023f2348788409 | [
"Apache-2.0"
] | null | null | null | nssrc/com/citrix/netscaler/nitro/resource/config/ssl/sslpolicylabel.py | mahabs/nitro | be74e1e177f5c205c16126bc9b023f2348788409 | [
"Apache-2.0"
] | null | null | null | #
# Copyright (c) 2008-2015 Citrix Systems, 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 l... | 28.692982 | 297 | 0.692653 |
6b5d5e80268ba483cd5ebb4a9d2082128fbdfef0 | 1,161 | py | Python | queue/queue.py | tywmick/data-structures | 996451b470a118f3f27faab6e109f50716e399a5 | [
"Unlicense"
] | null | null | null | queue/queue.py | tywmick/data-structures | 996451b470a118f3f27faab6e109f50716e399a5 | [
"Unlicense"
] | null | null | null | queue/queue.py | tywmick/data-structures | 996451b470a118f3f27faab6e109f50716e399a5 | [
"Unlicense"
] | null | null | null | class Queue:
"""A queue data structure, with first-in-first-out functionality."""
def __init__(self):
self.collection = []
def enqueue(self, element):
"""Adds an element to the end of the queue."""
self.collection.append(element)
def front(self):
"""Returns the element... | 27.642857 | 86 | 0.595177 |
c33c94733a8d35cfff0303add27053bf47d15b56 | 10,060 | py | Python | python/checkout_dependencies.py | pcrama/scripting-experiment | d867e3a3206d8aaff3fd18b8fce248fa425a0780 | [
"Unlicense"
] | null | null | null | python/checkout_dependencies.py | pcrama/scripting-experiment | d867e3a3206d8aaff3fd18b8fce248fa425a0780 | [
"Unlicense"
] | null | null | null | python/checkout_dependencies.py | pcrama/scripting-experiment | d867e3a3206d8aaff3fd18b8fce248fa425a0780 | [
"Unlicense"
] | null | null | null | '''Clone/Checkout Dependencies listed in a file
The dependencies file must be located inside a Git working directory (usually
but not necessarily in the same directory as the .git directory). The script
automatically locates the project top-level (i.e. where the .git directory
is). This is the reference directory fo... | 41.570248 | 79 | 0.663618 |
8120e08a53ea440a253a5c702a452b0af57a5991 | 2,093 | py | Python | embeddings/task/flair_task/text_classification.py | CLARIN-PL/embeddings | 49fb59b796475ca92bc262ec2bc6def1d89a10e0 | [
"MIT"
] | 33 | 2021-06-15T12:09:29.000Z | 2022-03-26T14:34:16.000Z | embeddings/task/flair_task/text_classification.py | CLARIN-PL/embeddings | 49fb59b796475ca92bc262ec2bc6def1d89a10e0 | [
"MIT"
] | 201 | 2021-03-23T05:50:23.000Z | 2022-03-31T22:56:04.000Z | embeddings/task/flair_task/text_classification.py | CLARIN-PL/embeddings | 49fb59b796475ca92bc262ec2bc6def1d89a10e0 | [
"MIT"
] | null | null | null | from typing import Any, Dict, List, Optional
import numpy as np
from flair.data import Corpus, Dictionary, Sentence
from flair.models import TextClassifier
from numpy import typing as nptyping
from embeddings.data.io import T_path
from embeddings.embedding.flair_embedding import FlairEmbedding
from embeddings.task.fl... | 34.883333 | 100 | 0.688008 |
eb06a7f2a149ac5fe7fbccecef0305caa1e850ef | 1,048 | py | Python | blockchain/block.py | bajcmartinez/blockchainpy | 5acaf517a47b73e16be5ec2892390516fb78d029 | [
"MIT"
] | 17 | 2020-09-12T03:27:54.000Z | 2022-01-08T21:34:02.000Z | blockchain/block.py | livecodestream/blockchainpy | 5acaf517a47b73e16be5ec2892390516fb78d029 | [
"MIT"
] | 1 | 2020-09-10T15:19:48.000Z | 2020-09-11T09:18:17.000Z | blockchain/block.py | bajcmartinez/blockchainpy | 5acaf517a47b73e16be5ec2892390516fb78d029 | [
"MIT"
] | 7 | 2020-12-02T00:52:23.000Z | 2022-03-08T22:15:00.000Z | import hashlib
from api.schema.block import BlockSchema
from time import time
class Block:
def __init__(self, index, transactions, nonce, previous_hash):
"""
Constructs a new block
:param index:
:param transactions:
:param previous_hash:
"""
self.index = in... | 24.372093 | 86 | 0.578244 |
3565eecf4d4c9c6698dfcadf11e025970b8e88a7 | 320 | py | Python | tensor__cpu/SpaCy/try.py | Zhang-O/small | bfb41b2267159bd5e408dba524713d3bc0b28074 | [
"MIT"
] | 1 | 2017-09-25T03:16:00.000Z | 2017-09-25T03:16:00.000Z | tensor__cpu/SpaCy/try.py | Zhang-O/small | bfb41b2267159bd5e408dba524713d3bc0b28074 | [
"MIT"
] | null | null | null | tensor__cpu/SpaCy/try.py | Zhang-O/small | bfb41b2267159bd5e408dba524713d3bc0b28074 | [
"MIT"
] | null | null | null | import spacy
nlp = spacy.load('en_core_web_md')
from spacy.tokens import Doc
from spacy.vocab import Vocab
doc = nlp(u'I like coffee') # original Doc
# print(doc[0].vector)
# print(doc[1].vector)
# print(doc[2].vector)
# print(doc.vector * 3)
# print(doc[0].vector + doc[1].vector + doc[2].vector )
print(doc[1].i)
| 18.823529 | 55 | 0.6875 |
6982cab44af91ee73d1937de2ec5a95d429f8ca4 | 309 | py | Python | dajaxice/tests/urls.py | simanto604newscred/django-dajaxice | 50bcf20ab2dbd6ce7bc655494c8614c6262b88ed | [
"BSD-3-Clause"
] | 9 | 2016-05-25T20:58:02.000Z | 2020-11-18T00:09:46.000Z | dajaxice/tests/urls.py | simanto604newscred/django-dajaxice | 50bcf20ab2dbd6ce7bc655494c8614c6262b88ed | [
"BSD-3-Clause"
] | 5 | 2016-05-25T01:18:40.000Z | 2019-10-09T10:47:35.000Z | dajaxice/tests/urls.py | simanto604newscred/django-dajaxice | 50bcf20ab2dbd6ce7bc655494c8614c6262b88ed | [
"BSD-3-Clause"
] | 16 | 2015-07-16T10:59:42.000Z | 2019-08-06T13:38:03.000Z | try:
from django.conf.urls import *
except ImportError:
from django.conf.urls.defaults import *
from dajaxice.core import dajaxice_autodiscover, dajaxice_config
dajaxice_autodiscover()
urlpatterns = patterns('',
#Dajaxice URLS
url(dajaxice_config.dajaxice_url, include('dajaxice.urls')),
)
| 22.071429 | 64 | 0.760518 |
7a0d5f00e7f6346d4aa62e6b2f3c57716a95333b | 638 | py | Python | whereToGo/src/ui/display.py | k323r/whereToGo | 5ec94a49e818c6a2acfb08c66755100c26c42f22 | [
"MIT"
] | null | null | null | whereToGo/src/ui/display.py | k323r/whereToGo | 5ec94a49e818c6a2acfb08c66755100c26c42f22 | [
"MIT"
] | null | null | null | whereToGo/src/ui/display.py | k323r/whereToGo | 5ec94a49e818c6a2acfb08c66755100c26c42f22 | [
"MIT"
] | null | null | null | import sys
def display(
target_heading,
target_distance,
target_time_left,
target_velocity,
estimated_duration,
estimated_toa):
sys.stdout.write(
'''display:
%s %s
%s %s
%s %s
%s %s
%s %s
%s %s
''' % (
'target_heading ', ... | 23.62963 | 58 | 0.537618 |
b1b5539a466f02af83119f34a5064a4307dd2b02 | 820 | py | Python | pub_sub/python/sdk/order-processor/app.py | amulyavarote/quickstarts | c21a8f58d515b28eaa8a3680388fa06995c2331b | [
"Apache-2.0"
] | null | null | null | pub_sub/python/sdk/order-processor/app.py | amulyavarote/quickstarts | c21a8f58d515b28eaa8a3680388fa06995c2331b | [
"Apache-2.0"
] | null | null | null | pub_sub/python/sdk/order-processor/app.py | amulyavarote/quickstarts | c21a8f58d515b28eaa8a3680388fa06995c2331b | [
"Apache-2.0"
] | null | null | null | from flask import Flask, request, jsonify
from cloudevents.http import from_http
import json
app = Flask(__name__)
# Register Dapr pub/sub subscriptions
@app.route('/dapr/subscribe', methods=['GET'])
def subscribe():
subscriptions = [{
'pubsubname': 'order_pub_sub',
'topic': 'orders',
'ro... | 27.333333 | 73 | 0.676829 |
3c23bd8c6f10a89ccd12374e25d752b2ba6261ca | 2,394 | py | Python | preprocess.py | temilaj/computer-vision-network | c1fa83690172226d663d8e1be61f2282792db7c2 | [
"MIT"
] | null | null | null | preprocess.py | temilaj/computer-vision-network | c1fa83690172226d663d8e1be61f2282792db7c2 | [
"MIT"
] | null | null | null | preprocess.py | temilaj/computer-vision-network | c1fa83690172226d663d8e1be61f2282792db7c2 | [
"MIT"
] | null | null | null | import csv
import cv2
import numpy as np
import os
LABELS = ['positive', 'neutral', 'negative']
label_dict = {}
with open('local_preprocessing/labels.csv', 'r', newline='') as labels:
label_reader = csv.reader(labels, delimiter=' ', quotechar='|')
next(label_reader)
for row in label_reader:
entry =... | 38.612903 | 126 | 0.600251 |
1217e8660605f68f376b131ae39f3e464f533d41 | 38,097 | py | Python | lib/eval_util.py | zhangzhangzf/IntentionPrediction | 558a2c0487e23151624ff4b1f284f654860579cc | [
"MIT"
] | 1 | 2019-05-23T06:33:53.000Z | 2019-05-23T06:33:53.000Z | lib/eval_util.py | zhangzhangzf/IntentionPrediction | 558a2c0487e23151624ff4b1f284f654860579cc | [
"MIT"
] | null | null | null | lib/eval_util.py | zhangzhangzf/IntentionPrediction | 558a2c0487e23151624ff4b1f284f654860579cc | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
"""
Created on Fri Aug 12 15:53:05 2016
utilities to help with evaluating the SVM
@author: LordPhillips
"""
from sklearn import metrics
from lib import constants as c
from lib import data_util as du
import numpy as np
import os
import math
import matplotlib.pyplot as plt
from IPython import d... | 42.757576 | 135 | 0.612253 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.