hexsha stringlengths 40 40 | size int64 1 1.03M | ext stringclasses 10
values | lang stringclasses 1
value | max_stars_repo_path stringlengths 3 239 | max_stars_repo_name stringlengths 5 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 239 | max_issues_repo_name stringlengths 5 130 | max_issues_repo_head_hexsha stringlengths 40 78 | 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 3 239 | max_forks_repo_name stringlengths 5 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.03M | avg_line_length float64 1 958k | max_line_length int64 1 1.03M | alphanum_fraction float64 0 1 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
797673b5e7c4f6f7f6175a0ec77a1974150efb1f | 5,222 | py | Python | masp/shoebox_room_sim/quantise.py | andresperezlopez/masp | c6385b6635b5e86233152ccfea2df15caee6acc7 | [
"BSD-3-Clause"
] | 19 | 2020-06-07T10:58:11.000Z | 2022-02-10T08:48:15.000Z | masp/shoebox_room_sim/quantise.py | andresperezlopez/masp | c6385b6635b5e86233152ccfea2df15caee6acc7 | [
"BSD-3-Clause"
] | null | null | null | masp/shoebox_room_sim/quantise.py | andresperezlopez/masp | c6385b6635b5e86233152ccfea2df15caee6acc7 | [
"BSD-3-Clause"
] | 5 | 2020-06-29T07:12:03.000Z | 2021-11-06T12:25:47.000Z | # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #
#
# Copyright (c) 2019, Eurecat / UPF
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are met:
# * Redistributions of... | 39.560606 | 114 | 0.681157 |
797673c5798870203c0cf0d8d2f1b44f417704b9 | 8,035 | py | Python | annofabcli/task/put_tasks.py | kurusugawa-computer/annofab-cli | 8edad492d439bc8fe64e9471464f545d07aba8b7 | [
"MIT"
] | 9 | 2019-07-22T23:54:05.000Z | 2020-11-05T06:26:04.000Z | annofabcli/task/put_tasks.py | kurusugawa-computer/annofab-cli | 8edad492d439bc8fe64e9471464f545d07aba8b7 | [
"MIT"
] | 389 | 2019-07-03T04:39:11.000Z | 2022-03-28T14:06:11.000Z | annofabcli/task/put_tasks.py | kurusugawa-computer/annofab-cli | 8edad492d439bc8fe64e9471464f545d07aba8b7 | [
"MIT"
] | 1 | 2021-08-30T14:22:04.000Z | 2021-08-30T14:22:04.000Z | import argparse
import copy
import json
import logging
import tempfile
from pathlib import Path
from typing import Any, Dict, List, Optional
import pandas
from annofabapi.models import ProjectJobType, ProjectMemberRole
import annofabcli
from annofabcli import AnnofabApiFacade
from annofabcli.common.cli import (
A... | 35.241228 | 119 | 0.634225 |
797673fd06dd83e4e65c4ae1ccbdc9451f22f695 | 17,188 | py | Python | Tests/test_codonalign.py | fredricj/biopython | 922063e5fec0b3c0c975f030b36eeea962e51091 | [
"BSD-3-Clause"
] | 2 | 2019-10-25T18:20:34.000Z | 2019-10-28T15:26:40.000Z | Tests/test_codonalign.py | fredricj/biopython | 922063e5fec0b3c0c975f030b36eeea962e51091 | [
"BSD-3-Clause"
] | null | null | null | Tests/test_codonalign.py | fredricj/biopython | 922063e5fec0b3c0c975f030b36eeea962e51091 | [
"BSD-3-Clause"
] | 1 | 2021-01-07T07:55:09.000Z | 2021-01-07T07:55:09.000Z | # Copyright (C) 2013 by Zheng Ruan (zruan1991@gmail.com)
# This code is part of the Biopython distribution and governed by its
# license. Please see the LICENSE file that should have been included
# as part of this package.
"""Unit tests for the Bio.codonalign modules."""
import warnings
import tempfile
import unitte... | 55.445161 | 348 | 0.686584 |
797674a96a73a184a73b50c49744233a6eacf435 | 25,572 | py | Python | opentiva/pump.py | opentiva/opentiva | ba969d7fb651cf5961620dea571911ccd7dbe365 | [
"MIT"
] | null | null | null | opentiva/pump.py | opentiva/opentiva | ba969d7fb651cf5961620dea571911ccd7dbe365 | [
"MIT"
] | null | null | null | opentiva/pump.py | opentiva/opentiva | ba969d7fb651cf5961620dea571911ccd7dbe365 | [
"MIT"
] | null | null | null |
"""
opentiva.pump
=============
This module contains the class for simulating the pump.
"""
import warnings
import numpy as np
import scipy.optimize as optimize
import opentiva.pkpd as pkpd
class Pump:
"""Pump class simulates a target controlled infusion pump for a drug's
pharmacokinetic/ pharmacodynamic ... | 36.794245 | 97 | 0.548217 |
797674c6e006ac386d055faac44c9ec66527dc76 | 282 | py | Python | webdev/tarefas/forms.py | armarcm/django-pro | 96b5ee9bc812026c587df194e7e7a33f7628251f | [
"MIT"
] | 3 | 2021-02-15T18:27:28.000Z | 2022-01-31T21:31:07.000Z | webdev/tarefas/forms.py | armarcm/django-pro | 96b5ee9bc812026c587df194e7e7a33f7628251f | [
"MIT"
] | 13 | 2020-06-29T12:29:00.000Z | 2022-03-28T16:07:18.000Z | webdev/tarefas/forms.py | emanuelfilipes/django-pro | b05b49aa9d1b8aaea0e7b9815d03c4e59a154265 | [
"MIT"
] | 9 | 2020-06-26T15:17:52.000Z | 2022-03-28T15:39:41.000Z | from django.forms import ModelForm
from webdev.tarefas.models import Tarefa
class TarefaNovaForm(ModelForm):
class Meta:
model = Tarefa
fields = ['nome']
class TarefaForm(ModelForm):
class Meta:
model = Tarefa
fields = ['nome', 'feita']
| 17.625 | 40 | 0.64539 |
797674df093015b64a66ca862c24e4bc71f97dc4 | 92 | py | Python | framework/__init__.py | CRafa97/MapReduce | cbe001f2a50620aea732b207b01d9ffde6d404ef | [
"MIT"
] | 1 | 2021-03-11T22:09:56.000Z | 2021-03-11T22:09:56.000Z | framework/__init__.py | CRafa97/MapReduce | cbe001f2a50620aea732b207b01d9ffde6d404ef | [
"MIT"
] | null | null | null | framework/__init__.py | CRafa97/MapReduce | cbe001f2a50620aea732b207b01d9ffde6d404ef | [
"MIT"
] | null | null | null | from .master import MasterNode
from .worker import WorkerNode
from .backup import BackupNode | 30.666667 | 30 | 0.847826 |
7976750dfbd5ae1dbad24a4613214ace8e184616 | 11,517 | py | Python | test/test_nl.py | huihui7987/pattern | d25511f9ca7ed9356b801d8663b8b5168464e68f | [
"BSD-3-Clause"
] | 6,201 | 2015-01-01T17:40:43.000Z | 2022-03-30T21:28:15.000Z | test/test_nl.py | WZBSocialScienceCenter/patternlite | 99271c8f20afdc3ae3f05246c43100dc00604e3f | [
"BSD-3-Clause"
] | 199 | 2015-01-03T10:24:13.000Z | 2022-03-14T12:53:34.000Z | test/test_nl.py | WZBSocialScienceCenter/patternlite | 99271c8f20afdc3ae3f05246c43100dc00604e3f | [
"BSD-3-Clause"
] | 1,537 | 2015-01-07T06:45:24.000Z | 2022-03-31T07:30:03.000Z | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
from __future__ import print_function
from __future__ import division
from builtins import str, bytes, dict, int
from builtins import map, zip, filter
from builtins import object, range
import os
import sys
sys.path.insert(0, os.path.join(os.path.dirnam... | 39.307167 | 106 | 0.516193 |
797675209a2484461920ca8ec8fb31ccf0f7c718 | 729 | py | Python | numba/pairwise_distance/GPU/pairwise_distance_kernel.py | PokhodenkoSA/dpbench | b22970237a7d550f7b0514481797247edcb4f190 | [
"BSD-2-Clause"
] | null | null | null | numba/pairwise_distance/GPU/pairwise_distance_kernel.py | PokhodenkoSA/dpbench | b22970237a7d550f7b0514481797247edcb4f190 | [
"BSD-2-Clause"
] | null | null | null | numba/pairwise_distance/GPU/pairwise_distance_kernel.py | PokhodenkoSA/dpbench | b22970237a7d550f7b0514481797247edcb4f190 | [
"BSD-2-Clause"
] | null | null | null | # Copyright (C) 2017-2018 Intel Corporation
#
# SPDX-License-Identifier: MIT
import dpctl
import base_pair_wise
import numpy as np
import numba_dppy
@numba_dppy.kernel
def pairwise_python(X1, X2, D):
i = numba_dppy.get_global_id(0)
N = X2.shape[0]
O = X1.shape[1]
for j in range(N):
d = 0.... | 25.137931 | 78 | 0.640604 |
797675f7fe0f84f075d79693f440fae0ae77fcc8 | 8,222 | py | Python | SalishSeaTools/salishsea_tools/timeseries_tools.py | remanevy/Package | b8c394c5b886b2a85063f8da3957ea3ca4bbec3f | [
"ECL-2.0",
"Apache-2.0"
] | null | null | null | SalishSeaTools/salishsea_tools/timeseries_tools.py | remanevy/Package | b8c394c5b886b2a85063f8da3957ea3ca4bbec3f | [
"ECL-2.0",
"Apache-2.0"
] | null | null | null | SalishSeaTools/salishsea_tools/timeseries_tools.py | remanevy/Package | b8c394c5b886b2a85063f8da3957ea3ca4bbec3f | [
"ECL-2.0",
"Apache-2.0"
] | null | null | null | # Copyright 2013-2017 The Salish Sea MEOPAR contributors
# and The University of British Columbia
# 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... | 32.498024 | 228 | 0.632693 |
797676f63ff5252839e460a781e8bb42c1f6fa95 | 7,149 | py | Python | code_dev/Peak-Analysis/syntheticdata_2gauss_shiftpast_20180426.py | liud16/capstone18 | f40092ec6513621910fcfd4665bc349301bae9b0 | [
"MIT"
] | null | null | null | code_dev/Peak-Analysis/syntheticdata_2gauss_shiftpast_20180426.py | liud16/capstone18 | f40092ec6513621910fcfd4665bc349301bae9b0 | [
"MIT"
] | 3 | 2018-06-20T23:44:58.000Z | 2018-06-28T20:57:47.000Z | code_dev/Peak-Analysis/syntheticdata_2gauss_shiftpast_20180426.py | liud16/peakaboo | f40092ec6513621910fcfd4665bc349301bae9b0 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
"""
Created on Tue Apr 18 15:33:37 2017
@author: lyundemi
"""
import numpy as np
import matplotlib.pyplot as plt
def find_nearest(array,value):
"""
find the nearest value to a given value
Returns:
the index of the nearest value in the array
"""
idx = (np.abs(array... | 26.775281 | 136 | 0.705273 |
797677a098a7bf3bd70a066f17d4f99c312333fa | 8,129 | py | Python | games/turns/reversi/reversiboard.py | jleete97/python-graphics | c6460b68cf8b04b5699af50520320b0225ab825a | [
"MIT"
] | null | null | null | games/turns/reversi/reversiboard.py | jleete97/python-graphics | c6460b68cf8b04b5699af50520320b0225ab825a | [
"MIT"
] | null | null | null | games/turns/reversi/reversiboard.py | jleete97/python-graphics | c6460b68cf8b04b5699af50520320b0225ab825a | [
"MIT"
] | null | null | null | import pygame
from pygame import Rect
# Directions to try from current square.
def buildDirections():
offsets = [-1, 0, 1]
directions = []
for i in offsets:
for j in offsets:
if i != 0 or j != 0:
directions.append((i, j))
return directions
DIRECTIONS = buildDirect... | 35.038793 | 92 | 0.569443 |
797677bc70ad23e721903e6513cbb1521e9f7f49 | 6,686 | py | Python | purity_fb/purity_fb_1dot9/models/snmp_manager_post.py | tlewis-ps/purity_fb_python_client | 652835cbd485c95a86da27f8b661679727ec6ea0 | [
"Apache-2.0"
] | 5 | 2017-09-08T20:47:22.000Z | 2021-06-29T02:11:05.000Z | purity_fb/purity_fb_1dot9/models/snmp_manager_post.py | tlewis-ps/purity_fb_python_client | 652835cbd485c95a86da27f8b661679727ec6ea0 | [
"Apache-2.0"
] | 16 | 2017-11-27T20:57:48.000Z | 2021-11-23T18:46:43.000Z | purity_fb/purity_fb_1dot9/models/snmp_manager_post.py | tlewis-ps/purity_fb_python_client | 652835cbd485c95a86da27f8b661679727ec6ea0 | [
"Apache-2.0"
] | 22 | 2017-10-13T15:33:05.000Z | 2021-11-08T19:56:21.000Z | # coding: utf-8
"""
Pure Storage FlashBlade REST 1.9 Python SDK
Pure Storage FlashBlade REST 1.9 Python SDK, developed by [Pure Storage, Inc](http://www.purestorage.com/). Documentations can be found at [purity-fb.readthedocs.io](http://purity-fb.readthedocs.io/).
OpenAPI spec version: 1.9
Contact: i... | 28.943723 | 204 | 0.582261 |
797679e7e569785c1c155d89274f5d72cb6bbd72 | 14,033 | py | Python | gui/my_tkinter/overlay/overlay_manager.py | GGelatin/TekkenBot | 33e9a319a085aa17f355dc6f470dfb15e15020cd | [
"MIT"
] | null | null | null | gui/my_tkinter/overlay/overlay_manager.py | GGelatin/TekkenBot | 33e9a319a085aa17f355dc6f470dfb15e15020cd | [
"MIT"
] | null | null | null | gui/my_tkinter/overlay/overlay_manager.py | GGelatin/TekkenBot | 33e9a319a085aa17f355dc6f470dfb15e15020cd | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
# Copyright (c) 2019, Alchemy Meister
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are met:
#
# * Redistributions of source code must retain the above copyright notice,
# ... | 37.321809 | 80 | 0.59809 |
797679f30097d0773c0ea783feea4c2ae7b5eca3 | 4,314 | py | Python | class_testing_food_meal_dailyintake.py | brian3814/oop_final_project | 5fb34f0dee5d940785d2099397c392cbd09e6da0 | [
"MIT"
] | null | null | null | class_testing_food_meal_dailyintake.py | brian3814/oop_final_project | 5fb34f0dee5d940785d2099397c392cbd09e6da0 | [
"MIT"
] | null | null | null | class_testing_food_meal_dailyintake.py | brian3814/oop_final_project | 5fb34f0dee5d940785d2099397c392cbd09e6da0 | [
"MIT"
] | null | null | null |
from datetime import datetime
from ._class.person import *
from _class.Intake import *
from _class.Genre import *
from _class.Event import *
datetime_string_type = '%Y-%m-%d-%H:%M:%S'
date_string_type = '-'.join(datetime_string_type.split('-')[0:3])
if __name__ == '__main__':
#===============
print("\n[[Food... | 39.218182 | 209 | 0.673157 |
79767a759778239c9197a7e98e9938e06e095390 | 484 | py | Python | easy_maps/admin.py | morris-tech/django-easy-maps | 03f9d12af0ffd388ed3e64977d22516572870146 | [
"MIT"
] | null | null | null | easy_maps/admin.py | morris-tech/django-easy-maps | 03f9d12af0ffd388ed3e64977d22516572870146 | [
"MIT"
] | null | null | null | easy_maps/admin.py | morris-tech/django-easy-maps | 03f9d12af0ffd388ed3e64977d22516572870146 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
from django import forms
from django.contrib import admin
from .widgets import AddressWithMapWidget
class AddressAdmin(admin.ModelAdmin):
list_display = [
'address', 'computed_address', 'latitude', 'longitude']
list_filter = ['geocode_error']
search_fields = ['address']
... | 24.2 | 72 | 0.630165 |
79767b43f63696366aa509b8c6069244831e1259 | 21,469 | py | Python | tables/nra/tests/test_nestedrecords.py | joshmoore/PyTables | 5065497fdc04f07c551c56b8b0280892fcffad03 | [
"BSD-3-Clause"
] | 3 | 2016-03-14T07:49:32.000Z | 2019-08-26T03:10:21.000Z | tables/nra/tests/test_nestedrecords.py | joshmoore/PyTables | 5065497fdc04f07c551c56b8b0280892fcffad03 | [
"BSD-3-Clause"
] | null | null | null | tables/nra/tests/test_nestedrecords.py | joshmoore/PyTables | 5065497fdc04f07c551c56b8b0280892fcffad03 | [
"BSD-3-Clause"
] | 4 | 2020-06-19T00:11:13.000Z | 2021-02-23T09:25:35.000Z | # This test suite is still necessary in case the user still wants a
# nested RecArray which is based in numarray instead of NumPy.
import unittest
import numarray
import numarray.records
from tables.tests import common
from tables import nra
class NestedRecordTests(common.PyTablesTestCase):
"""Define a set of u... | 35.781667 | 78 | 0.54064 |
79767bee51f78ea8c378ad24b6130396ef30bf43 | 126 | py | Python | t/urls.py | wickeym/django-fastsettings | a1a14248b04415aeb24fc8ece2b12a82b05c0e37 | [
"Apache-2.0"
] | 2 | 2019-09-26T16:34:01.000Z | 2019-11-28T00:39:39.000Z | t/urls.py | wickeym/django-fastsettings | a1a14248b04415aeb24fc8ece2b12a82b05c0e37 | [
"Apache-2.0"
] | 2 | 2021-06-04T21:37:26.000Z | 2021-06-09T17:25:32.000Z | t/urls.py | wickeym/django-fastsettings | a1a14248b04415aeb24fc8ece2b12a82b05c0e37 | [
"Apache-2.0"
] | null | null | null | from django.urls import include, path
from django.contrib import admin
urlpatterns = [
path('admin/', admin.site.urls)
]
| 18 | 37 | 0.730159 |
79767d54536ec9cadc574fe201619c985646b7a8 | 8,693 | py | Python | Support/bin/compare_glb.py | twitchplayskh/open-brush | 2094339be6851731d293f2574c1fc706ee388d84 | [
"Apache-2.0"
] | null | null | null | Support/bin/compare_glb.py | twitchplayskh/open-brush | 2094339be6851731d293f2574c1fc706ee388d84 | [
"Apache-2.0"
] | null | null | null | Support/bin/compare_glb.py | twitchplayskh/open-brush | 2094339be6851731d293f2574c1fc706ee388d84 | [
"Apache-2.0"
] | 1 | 2021-02-04T21:45:45.000Z | 2021-02-04T21:45:45.000Z | #!/usr/bin/env python
# Copyright 2020 The Tilt Brush 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 appli... | 34.359684 | 98 | 0.665018 |
79767e26b9ff1ad50365599027bd734d46e1ed0d | 27 | py | Python | src/euler_python_package/euler_python/medium/p184.py | wilsonify/euler | 5214b776175e6d76a7c6d8915d0e062d189d9b79 | [
"MIT"
] | null | null | null | src/euler_python_package/euler_python/medium/p184.py | wilsonify/euler | 5214b776175e6d76a7c6d8915d0e062d189d9b79 | [
"MIT"
] | null | null | null | src/euler_python_package/euler_python/medium/p184.py | wilsonify/euler | 5214b776175e6d76a7c6d8915d0e062d189d9b79 | [
"MIT"
] | null | null | null | def problem184():
pass
| 9 | 17 | 0.62963 |
79767f68eab7c4636012d6f92766d25b7e50dd9a | 1,932 | py | Python | third_party/blink/web_tests/http/tests/websocket/workers/resources/protocol-test_wsh.py | zealoussnow/chromium | fd8a8914ca0183f0add65ae55f04e287543c7d4a | [
"BSD-3-Clause-No-Nuclear-License-2014",
"BSD-3-Clause"
] | 14,668 | 2015-01-01T01:57:10.000Z | 2022-03-31T23:33:32.000Z | third_party/blink/web_tests/http/tests/websocket/workers/resources/protocol-test_wsh.py | zealoussnow/chromium | fd8a8914ca0183f0add65ae55f04e287543c7d4a | [
"BSD-3-Clause-No-Nuclear-License-2014",
"BSD-3-Clause"
] | 113 | 2015-05-04T09:58:14.000Z | 2022-01-31T19:35:03.000Z | third_party/blink/web_tests/http/tests/websocket/workers/resources/protocol-test_wsh.py | zealoussnow/chromium | fd8a8914ca0183f0add65ae55f04e287543c7d4a | [
"BSD-3-Clause-No-Nuclear-License-2014",
"BSD-3-Clause"
] | 5,941 | 2015-01-02T11:32:21.000Z | 2022-03-31T16:35:46.000Z | # Copyright (C) 2009 Google Inc. All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are
# met:
#
# * Redistributions of source code must retain the above copyright
# notice, this list of conditions and the ... | 43.909091 | 72 | 0.767081 |
7976802045192199fd807a50e27c15988e76a91f | 1,412 | py | Python | setup.py | Liamdoult/pigeon-cli | fff80e9eac18374e01f41aad8eb9a57b27ee7188 | [
"MIT"
] | null | null | null | setup.py | Liamdoult/pigeon-cli | fff80e9eac18374e01f41aad8eb9a57b27ee7188 | [
"MIT"
] | null | null | null | setup.py | Liamdoult/pigeon-cli | fff80e9eac18374e01f41aad8eb9a57b27ee7188 | [
"MIT"
] | null | null | null | from setuptools import setup, find_packages
from os import path
setup_file_location = path.abspath(path.dirname(__file__))
with open(path.join(setup_file_location, 'README.md'), encoding='utf-8') as f:
long_description = f.read()
setup(
name='pigeon-cli',
version='0.0.3',
description='',
long_desc... | 32.090909 | 78 | 0.620397 |
7976808ed94a4fc66f2e5e94d9ee2e65c79633d2 | 195 | py | Python | greet2.py | darkless456/Python | 1ba37d028e4a818ccfffc18682c1bac15554e3ac | [
"MIT"
] | null | null | null | greet2.py | darkless456/Python | 1ba37d028e4a818ccfffc18682c1bac15554e3ac | [
"MIT"
] | null | null | null | greet2.py | darkless456/Python | 1ba37d028e4a818ccfffc18682c1bac15554e3ac | [
"MIT"
] | null | null | null | # greet2.py
name = 'Peter'
def greet():
print("Hello", name)
return
def greet_again():
name = 'Sue'
print('Hello', name)
return
greet()
greet_again()
print('Hello', name)
| 11.470588 | 24 | 0.594872 |
79768144068bc079c2ca45ba160cfe28261ba779 | 2,472 | py | Python | setup.py | projectshift/shift-memory | 538519186cd3bd3f46fe35a9cb0fda95c3698a76 | [
"MIT"
] | null | null | null | setup.py | projectshift/shift-memory | 538519186cd3bd3f46fe35a9cb0fda95c3698a76 | [
"MIT"
] | null | null | null | setup.py | projectshift/shift-memory | 538519186cd3bd3f46fe35a9cb0fda95c3698a76 | [
"MIT"
] | null | null | null | #!/usr/bin/env python
import os
from setuptools import setup, find_packages
# ----------------------------------------------------------------------------
# Building
#
# Create source distribution:
# ./setup.py sdist
#
#
# Create binary distribution (non-univeral, python 3 only):
# ./setup.py bdist_wheel --python-tag=... | 22.27027 | 78 | 0.574434 |
797681752cefa1a137c2e289e0c00907a360a4bb | 8,490 | py | Python | io_scene_webaverse/blender/exp/gltf2_blender_gather_primitives.py | chrislatorres/blender-plugin | b0cd2dc6af8652a3ab841a8b620dbcf1a5a281e7 | [
"Apache-2.0"
] | 3 | 2021-02-01T09:09:30.000Z | 2021-11-12T14:39:28.000Z | io_scene_webaverse/blender/exp/gltf2_blender_gather_primitives.py | chrislatorres/blender-plugin | b0cd2dc6af8652a3ab841a8b620dbcf1a5a281e7 | [
"Apache-2.0"
] | 4 | 2021-04-01T10:58:30.000Z | 2021-08-23T12:27:42.000Z | io_scene_webaverse/blender/exp/gltf2_blender_gather_primitives.py | chrislatorres/blender-plugin | b0cd2dc6af8652a3ab841a8b620dbcf1a5a281e7 | [
"Apache-2.0"
] | 3 | 2021-02-22T21:39:41.000Z | 2021-11-22T15:12:47.000Z | # Copyright 2018-2019 The glTF-Blender-IO 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 ... | 42.878788 | 129 | 0.670789 |
797681f32ef3792db951b96ef88ae410fad83c97 | 48,924 | py | Python | XICRA_pip/XICRA/scripts/mapReads.py | MartaLoBalastegui/XICRA | 74a7e74379c7e1b3fc1360d2c609994e884ee37a | [
"MIT"
] | null | null | null | XICRA_pip/XICRA/scripts/mapReads.py | MartaLoBalastegui/XICRA | 74a7e74379c7e1b3fc1360d2c609994e884ee37a | [
"MIT"
] | null | null | null | XICRA_pip/XICRA/scripts/mapReads.py | MartaLoBalastegui/XICRA | 74a7e74379c7e1b3fc1360d2c609994e884ee37a | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
############################################################
## Jose F. Sanchez ##
## Copyright (C) 2019-2020 Lauro Sumoy Lab, IGTP, Spain ##
############################################################
## useful imports
import time
import io
import os
imp... | 53.236126 | 309 | 0.601075 |
7976825f2f76c66ebfeea855742ffaba335d10f8 | 128 | py | Python | src/apps/blog/forms/comment_form.py | dieisabel/proggy | 9e1428e5d1d5ba0217e34f86800a7d783a3673cd | [
"MIT"
] | 1 | 2021-03-13T20:59:25.000Z | 2021-03-13T20:59:25.000Z | src/apps/blog/forms/comment_form.py | dieisabel/proggy | 9e1428e5d1d5ba0217e34f86800a7d783a3673cd | [
"MIT"
] | 69 | 2021-03-09T11:17:26.000Z | 2021-07-22T15:05:34.000Z | src/apps/blog/forms/comment_form.py | dieisabel/proggy | 9e1428e5d1d5ba0217e34f86800a7d783a3673cd | [
"MIT"
] | null | null | null | """Module for Comment form"""
from django import forms
class CommentForm(forms.Form):
comment_content = forms.CharField()
| 18.285714 | 39 | 0.742188 |
7976826cc3a142f7a177399852e075c304aa07d4 | 7,275 | py | Python | test/functional/wallet_labels.py | alexander3636/btcbam-core-1 | 2565b3b110d049e8f188b57ea42e84466f307f35 | [
"MIT"
] | 6 | 2021-08-02T21:35:10.000Z | 2022-01-18T05:41:49.000Z | test/functional/wallet_labels.py | alexander3636/btcbam-core-1 | 2565b3b110d049e8f188b57ea42e84466f307f35 | [
"MIT"
] | null | null | null | test/functional/wallet_labels.py | alexander3636/btcbam-core-1 | 2565b3b110d049e8f188b57ea42e84466f307f35 | [
"MIT"
] | 4 | 2021-08-14T13:12:43.000Z | 2021-11-26T21:19:35.000Z | #!/usr/bin/env python3
# Copyright (c) 2016-2018 The Bitcoin Core developers
# Distributed under the MIT software license, see the accompanying
# file COPYING or http://www.opensource.org/licenses/mit-license.php.
"""Test label RPCs.
RPCs tested are:
- getaddressesbylabel
- listaddressgroupings
- setlabel
... | 39.972527 | 105 | 0.658007 |
797684c3533ae674ab67e1fd3522f4258e8fd9db | 4,686 | py | Python | train.py | taodav/GANs | 402a6b4d38c202969b6494161e9a038890c14a5d | [
"MIT"
] | null | null | null | train.py | taodav/GANs | 402a6b4d38c202969b6494161e9a038890c14a5d | [
"MIT"
] | null | null | null | train.py | taodav/GANs | 402a6b4d38c202969b6494161e9a038890c14a5d | [
"MIT"
] | null | null | null | import torch
import datetime
from torch import nn, optim
from torch.utils.data import DataLoader
from torchvision.utils import save_image
from tqdm import tqdm
from tensorboard_logger import configure, log_value
from utils.helpers import save_checkpoint
from constants import ROOT_DIR
class MNISTTrainer:
def __in... | 37.190476 | 108 | 0.578105 |
7976863c5dc23e1cb24376e8c1bed88a55ea300c | 1,147 | py | Python | totalgood/envs/keys_and_passwords.py | hobson/totalgood | 5aae617beb08c21cbd262f091d69793abb17c5b0 | [
"MIT"
] | null | null | null | totalgood/envs/keys_and_passwords.py | hobson/totalgood | 5aae617beb08c21cbd262f091d69793abb17c5b0 | [
"MIT"
] | 9 | 2020-03-24T15:56:06.000Z | 2022-03-11T23:26:02.000Z | totalgood/envs/keys_and_passwords.py | hobson/totalgood | 5aae617beb08c21cbd262f091d69793abb17c5b0 | [
"MIT"
] | 1 | 2016-04-24T15:10:20.000Z | 2016-04-24T15:10:20.000Z | AWS_ACCESS_KEY_ID = None
AWS_SECRET_ACCESS_KEY = None
AWS_STORAGE_BUCKET_NAME = None
DB_PASSWORD = None
GAUGES_SITE_ID = None
GOOGLE_ANALYTICS_PROPERTY_ID = None
INTERCOM_APP_ID = None
DROPBOX_APP_KEY = None
DROPBOX_APP_SECRET = None
TWITTER_APP_KEY = None
TWITTER_APP_SECRET = None
FACEBOOK_APP_KEY = None
FACEBOOK_APP_... | 27.97561 | 99 | 0.814298 |
7976868c9d3ab210400019312be75e010d395282 | 4,468 | py | Python | sqlalchemy_scheduler_models.py | ocervell/celery_sqlalchemy_scheduler | 967c8d887029e48ef2834c2cbe9903ec972a52b9 | [
"MIT"
] | 58 | 2015-10-23T17:19:42.000Z | 2022-03-05T19:43:23.000Z | sqlalchemy_scheduler_models.py | ocervell/celery_sqlalchemy_scheduler | 967c8d887029e48ef2834c2cbe9903ec972a52b9 | [
"MIT"
] | 3 | 2015-11-13T11:30:54.000Z | 2016-05-11T07:07:30.000Z | sqlalchemy_scheduler_models.py | ocervell/celery_sqlalchemy_scheduler | 967c8d887029e48ef2834c2cbe9903ec972a52b9 | [
"MIT"
] | 13 | 2015-11-20T14:08:25.000Z | 2019-05-16T17:40:58.000Z | # -*- coding: utf-8 -*-
import datetime
import json
import sqlalchemy
from sqlalchemy import Column, String, Integer, DateTime, Boolean, ForeignKey
from sqlalchemy.orm import relationship
from sqlalchemy.orm.exc import MultipleResultsFound, NoResultFound
from sqlalchemy.ext.declarative import declarative_base
import ... | 32.852941 | 82 | 0.649955 |
797688566923c5ebf272340cc05b6cc7ca415b15 | 11,488 | py | Python | segmentation/get_data_downsample.py | kamperh/bucktsong_eskmeans | fe1e19aa77bb47e0c71f22f75edff87a25edca94 | [
"MIT"
] | 1 | 2021-02-18T14:44:17.000Z | 2021-02-18T14:44:17.000Z | segmentation/get_data_downsample.py | kamperh/bucktsong_eskmeans | fe1e19aa77bb47e0c71f22f75edff87a25edca94 | [
"MIT"
] | null | null | null | segmentation/get_data_downsample.py | kamperh/bucktsong_eskmeans | fe1e19aa77bb47e0c71f22f75edff87a25edca94 | [
"MIT"
] | null | null | null | #!/usr/bin/env python
"""
Get the Buckeye English and NCHLT Xitsonga data.
Author: Herman Kamper
Contact: kamperh@gmail.com
Date: 2015, 2021
"""
from os import path
from tqdm import tqdm
import argparse
import pickle
import glob
import numpy as np
import re
import sys
import os
wordembeds_dir = "../../../../downsam... | 38.680135 | 105 | 0.580519 |
7976887cf05fd9d58bf2a62c0845f787c3493497 | 10,147 | py | Python | spyder/widgets/sourcecode/tests/test_autoindent.py | maraigue/spyder | ea9797eb24854eca085aa90a5d7ae682ceef1f7a | [
"MIT"
] | 1 | 2022-01-19T05:57:29.000Z | 2022-01-19T05:57:29.000Z | spyder/widgets/sourcecode/tests/test_autoindent.py | Mazmatig/spyder | 60680b21327cd886ab6c2b1c26ee658bfe3c99b7 | [
"MIT"
] | 1 | 2020-10-29T19:53:11.000Z | 2020-10-29T19:53:11.000Z | spyder/widgets/sourcecode/tests/test_autoindent.py | Mazmatig/spyder | 60680b21327cd886ab6c2b1c26ee658bfe3c99b7 | [
"MIT"
] | 1 | 2019-01-16T06:51:50.000Z | 2019-01-16T06:51:50.000Z | # -*- coding: utf-8 -*-
#
# Copyright © Spyder Project Contributors
# Licensed under the terms of the MIT License
#
"""
Tests for the autoindent features
"""
# Third party imports
from qtpy.QtGui import QTextCursor
import pytest
# Local imports
from spyder.utils.qthelpers import qapplication
from spyder.py3compat im... | 38.290566 | 102 | 0.565684 |
797689536f9e0b87ef582d06ec25ae1388815406 | 3,268 | py | Python | dbhelp/settings.py | AsjadIftikhar/dbhelp | e6e5526c1a7dc748081ede41bc2d0cca7f3379ca | [
"MIT"
] | 1 | 2022-02-03T07:45:04.000Z | 2022-02-03T07:45:04.000Z | dbhelp/settings.py | AsjadIftikhar/dbhelp | e6e5526c1a7dc748081ede41bc2d0cca7f3379ca | [
"MIT"
] | null | null | null | dbhelp/settings.py | AsjadIftikhar/dbhelp | e6e5526c1a7dc748081ede41bc2d0cca7f3379ca | [
"MIT"
] | null | null | null | """
Django settings for dbhelp project.
Generated by 'django-admin startproject' using Django 4.0.1.
For more information on this file, see
https://docs.djangoproject.com/en/4.0/topics/settings/
For the full list of settings and their values, see
https://docs.djangoproject.com/en/4.0/ref/settings/
"""
from pathlib ... | 27.233333 | 91 | 0.700734 |
79768a69cb5a456fff0f8a63a7ec682bce2ced06 | 391 | py | Python | Code/Python8Code/com/Learn/module/privateattributes/vip_user.py | Rajpratik71/Python | 8369a304cee0e6ea5755c23a62f19e8167b6cdb1 | [
"MIT"
] | null | null | null | Code/Python8Code/com/Learn/module/privateattributes/vip_user.py | Rajpratik71/Python | 8369a304cee0e6ea5755c23a62f19e8167b6cdb1 | [
"MIT"
] | null | null | null | Code/Python8Code/com/Learn/module/privateattributes/vip_user.py | Rajpratik71/Python | 8369a304cee0e6ea5755c23a62f19e8167b6cdb1 | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
# -*- coding: UTF-8 -*-
def _diamond_vip(lv):
print('尊敬的钻石会员用户,您好')
vip_name = 'DiamondVIP' + str(lv)
return vip_name
def _gold_vip(lv):
print('尊敬的黄金会员用户,您好')
vip_name = 'GoldVIP' + str(lv)
return vip_name
def vip_lv_name(lv):
if lv == 1:
print(_gold_vip(l... | 16.291667 | 37 | 0.601023 |
79768a70383964758af819397d75fc3c25d423ad | 548 | py | Python | src/resource_inventory/apps.py | opnfv/laas | 35b9f39178cc502a5283a1b37a65f7dd0838ae05 | [
"Apache-2.0"
] | 2 | 2020-10-31T15:03:20.000Z | 2021-03-22T16:29:15.000Z | src/resource_inventory/apps.py | opnfv/laas | 35b9f39178cc502a5283a1b37a65f7dd0838ae05 | [
"Apache-2.0"
] | 13 | 2019-12-04T23:29:42.000Z | 2022-03-02T04:53:53.000Z | src/resource_inventory/apps.py | opnfv/laas | 35b9f39178cc502a5283a1b37a65f7dd0838ae05 | [
"Apache-2.0"
] | null | null | null | ##############################################################################
# Copyright (c) 2016 Max Breitenfeldt and others.
#
# All rights reserved. This program and the accompanying materials
# are made available under the terms of the Apache License, Version 2.0
# which accompanies this distribution, and is avai... | 36.533333 | 78 | 0.551095 |
79768aedce63216e0b361ac106e613d7225502a7 | 2,663 | py | Python | tests/main/test_specify_output_dir.py | insight-infrastructure/cookiecutter | 5e77a6f59786759cf1b469e7bd827b6d340a31c6 | [
"BSD-3-Clause"
] | 8 | 2020-06-15T18:49:24.000Z | 2021-04-15T10:34:24.000Z | tests/main/test_specify_output_dir.py | insight-infrastructure/cookiecutter | 5e77a6f59786759cf1b469e7bd827b6d340a31c6 | [
"BSD-3-Clause"
] | 19 | 2020-06-28T16:03:56.000Z | 2020-10-07T15:52:06.000Z | tests/main/test_specify_output_dir.py | insight-infrastructure/nukikata | 5e77a6f59786759cf1b469e7bd827b6d340a31c6 | [
"BSD-3-Clause"
] | null | null | null | """Tests for cookiecutter's output directory customization feature."""
import pytest
from cookiecutter import main
@pytest.fixture
def context():
"""Fixture to return a valid context as known from a cookiecutter.json."""
return {
'cookiecutter': {
'email': 'raphael@hackebrot.de',
... | 28.945652 | 83 | 0.704469 |
79768bb37fa86865ab13adc701e541e6fc35de8c | 13,099 | py | Python | po_pattern/Lib/site-packages/behave/formatter/sphinx_steps.py | tomekwszelaki/page-object-pattern-python | eb0ff7a1329b88149d743f2bc4a827c984e72dc3 | [
"MIT"
] | 1 | 2017-03-22T04:25:35.000Z | 2017-03-22T04:25:35.000Z | po_pattern/Lib/site-packages/behave/formatter/sphinx_steps.py | tomekwszelaki/page-object-pattern-python | eb0ff7a1329b88149d743f2bc4a827c984e72dc3 | [
"MIT"
] | null | null | null | po_pattern/Lib/site-packages/behave/formatter/sphinx_steps.py | tomekwszelaki/page-object-pattern-python | eb0ff7a1329b88149d743f2bc4a827c984e72dc3 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
"""
Provides a formatter that generates Sphinx-based documentation
of available step definitions (step implementations).
TODO:
* Post-processor for step docstrings.
* Solution for requires: table, text
* i18n keywords
.. seealso::
http://sphinx-doc.org/
"""
from __future__ import ab... | 37.002825 | 80 | 0.614627 |
79768c62ac4b33c2b16585540cbc95a65bc00b87 | 1,056 | py | Python | rancher1.6/installer.py | rudimk/fabfiles | 67a8faf1953a43f9d66d3e141e7211a70a800397 | [
"MIT"
] | null | null | null | rancher1.6/installer.py | rudimk/fabfiles | 67a8faf1953a43f9d66d3e141e7211a70a800397 | [
"MIT"
] | null | null | null | rancher1.6/installer.py | rudimk/fabfiles | 67a8faf1953a43f9d66d3e141e7211a70a800397 | [
"MIT"
] | null | null | null | from fabric import Connection
import os
def connectSSH():
return Connection(host=os.getenv('FAB_HOST'), user=os.getenv('FAB_USER'))
def updatePackages(conn):
updateResult = conn.run('sudo apt-get update')
def installHelperPackages(conn):
helperPackagesResult = conn.run('sudo apt-get install -y apt-transp... | 37.714286 | 141 | 0.732955 |
79768cadaf3d79e92b60bee8c4857bcf1bc75516 | 12,090 | py | Python | virtual/lib/python3.8/site-packages/pip/_internal/commands/list.py | Barrack-coder/News | 1bfb1b441cb2abb3d5edeebfefafc3b624a01e6c | [
"MIT"
] | 32 | 2021-05-03T09:03:57.000Z | 2022-03-17T09:18:59.000Z | virtual/lib/python3.8/site-packages/pip/_internal/commands/list.py | Barrack-coder/News | 1bfb1b441cb2abb3d5edeebfefafc3b624a01e6c | [
"MIT"
] | 4 | 2021-05-29T20:42:52.000Z | 2022-03-16T03:01:12.000Z | virtual/lib/python3.8/site-packages/pip/_internal/commands/list.py | Barrack-coder/News | 1bfb1b441cb2abb3d5edeebfefafc3b624a01e6c | [
"MIT"
] | 27 | 2021-11-10T08:44:10.000Z | 2022-03-30T08:19:46.000Z | import json
import logging
from optparse import Values
from typing import TYPE_CHECKING, Iterator, List, Optional, Sequence, Tuple, cast
from pip._vendor.packaging.utils import canonicalize_name
from pip._internal.cli import cmdoptions
from pip._internal.cli.req_command import IndexGroupCommand
from pip._int... | 35.769231 | 85 | 0.586352 |
79768d41db835533323ffb2203bcd7695511209d | 1,802 | py | Python | python/v2.2/download_file.py | falbassini/Samples | f7112c07fc8cbe583648f47f07dda54f769ca019 | [
"Apache-2.0"
] | null | null | null | python/v2.2/download_file.py | falbassini/Samples | f7112c07fc8cbe583648f47f07dda54f769ca019 | [
"Apache-2.0"
] | null | null | null | python/v2.2/download_file.py | falbassini/Samples | f7112c07fc8cbe583648f47f07dda54f769ca019 | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/python
#
# Copyright 2015 Google 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 b... | 30.542373 | 77 | 0.72919 |
79768e9609bdfbd2a8f7c59368d2f68200fbf60f | 12,445 | py | Python | zvt/factors/factor.py | fakegit/zvt | d7d7d592ba870944e9cb967a8d1e46d12c24d02a | [
"MIT"
] | null | null | null | zvt/factors/factor.py | fakegit/zvt | d7d7d592ba870944e9cb967a8d1e46d12c24d02a | [
"MIT"
] | null | null | null | zvt/factors/factor.py | fakegit/zvt | d7d7d592ba870944e9cb967a8d1e46d12c24d02a | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
import enum
import logging
import time
from typing import List, Union
import pandas as pd
from zvdata import IntervalLevel
from zvdata.api import get_data, df_to_db
from zvdata.normal_data import NormalData
from zvdata.reader import DataReader, DataListener
from zvdata.utils.pd_utils import pd... | 35.968208 | 120 | 0.584331 |
79768f68f4d441e61c7d577a88b676afe27b084e | 184 | py | Python | land_use/__init__.py | tyler-romero/LandUseClassification | 753b5afa9e8d5b7702df2f15818d27b003871693 | [
"Apache-2.0"
] | null | null | null | land_use/__init__.py | tyler-romero/LandUseClassification | 753b5afa9e8d5b7702df2f15818d27b003871693 | [
"Apache-2.0"
] | null | null | null | land_use/__init__.py | tyler-romero/LandUseClassification | 753b5afa9e8d5b7702df2f15818d27b003871693 | [
"Apache-2.0"
] | null | null | null | __title__ = 'SQL Python for Land Use Classification'
__version__ = '0.1'
__author__ = 'Tyler Romero'
__license__ = 'MIT license'
# Synonym
VERSION = __version__
LICENSE = __license__
| 20.444444 | 52 | 0.76087 |
79768f92a1207da808adef898a263496885b22e0 | 216 | py | Python | 01_Python by Example Learning to Program in 150 Challenges by Nichola Lacey/05_chapter five for loops/problem37.py | Magdyedwar1996/python-level-one-codes | 066086672f43488bc8b32c620b5e2f94cedfe3da | [
"MIT"
] | 1 | 2021-11-16T14:14:38.000Z | 2021-11-16T14:14:38.000Z | 01_Python by Example Learning to Program in 150 Challenges by Nichola Lacey/05_chapter five for loops/problem37.py | Magdyedwar1996/python-level-one-codes | 066086672f43488bc8b32c620b5e2f94cedfe3da | [
"MIT"
] | null | null | null | 01_Python by Example Learning to Program in 150 Challenges by Nichola Lacey/05_chapter five for loops/problem37.py | Magdyedwar1996/python-level-one-codes | 066086672f43488bc8b32c620b5e2f94cedfe3da | [
"MIT"
] | null | null | null | """
037
Ask the user to enter their name and display each letter in
their name on a separate line.
"""
i = "0"
name = input("Enter your name please : ")
name = list(name)
#print(name)
for i in list(name):
print(i) | 19.636364 | 59 | 0.675926 |
7976903af3928554d928b54e80113462258bcfbc | 3,276 | py | Python | tests/test_vectors.py | seignovert/pyvims | a70b5b9b8bc5c37fa43b7db4d15407f312a31849 | [
"BSD-3-Clause"
] | 4 | 2019-09-16T15:50:22.000Z | 2021-04-08T15:32:48.000Z | tests/test_vectors.py | seignovert/pyvims | a70b5b9b8bc5c37fa43b7db4d15407f312a31849 | [
"BSD-3-Clause"
] | 3 | 2018-05-04T09:28:24.000Z | 2018-12-03T09:00:31.000Z | tests/test_vectors.py | seignovert/pyvims | a70b5b9b8bc5c37fa43b7db4d15407f312a31849 | [
"BSD-3-Clause"
] | 1 | 2020-10-12T15:14:17.000Z | 2020-10-12T15:14:17.000Z | """Test vector module."""
import numpy as np
from numpy.testing import assert_array_almost_equal as assert_array
from pyvims.vectors import angle, azimuth, areaquad, vdot
from pytest import approx, raises
def test_areaquad():
"""Test spherical quadrangle area."""
assert areaquad(0, -90, 360, 90) == approx(... | 28.486957 | 86 | 0.492674 |
79769067d2a35421ca3a99b88cff86585695b3f3 | 3,879 | py | Python | art/__main__.py | kamouzougan/https-github.com-sepandhaghighi-art | 2d2593f2f4f7e4e9202af3d1d9f79f7bb5b8f41b | [
"MIT"
] | null | null | null | art/__main__.py | kamouzougan/https-github.com-sepandhaghighi-art | 2d2593f2f4f7e4e9202af3d1d9f79f7bb5b8f41b | [
"MIT"
] | null | null | null | art/__main__.py | kamouzougan/https-github.com-sepandhaghighi-art | 2d2593f2f4f7e4e9202af3d1d9f79f7bb5b8f41b | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
"""Art main."""
from .art import *
from .art_param import FONT_MAP, ART_ENVIRONMENT_WARNING, FONT_ENVIRONMENT_WARNING, PACKAGE_LOAD_WARNING
import sys
import doctest
import os
import zipfile
try:
import coverage
except ImportError:
print(PACKAGE_LOAD_WARNING)
def select_test(test_name=... | 32.596639 | 106 | 0.458623 |
7976907c00e792d90b21eff993164bf35fc78ce7 | 30,046 | py | Python | src/pretix/control/forms/orders.py | NicsTr/pretix | e6d2380d9ed1836cc64a688b2be20d00a8500eab | [
"ECL-2.0",
"Apache-2.0"
] | null | null | null | src/pretix/control/forms/orders.py | NicsTr/pretix | e6d2380d9ed1836cc64a688b2be20d00a8500eab | [
"ECL-2.0",
"Apache-2.0"
] | null | null | null | src/pretix/control/forms/orders.py | NicsTr/pretix | e6d2380d9ed1836cc64a688b2be20d00a8500eab | [
"ECL-2.0",
"Apache-2.0"
] | null | null | null | from datetime import date, datetime, time
from decimal import Decimal
from django import forms
from django.conf import settings
from django.core.exceptions import ValidationError
from django.db import models
from django.template.defaultfilters import floatformat
from django.urls import reverse
from django.utils.timezo... | 38.569961 | 127 | 0.59379 |
797690860087d99fb285b4bd7c1fdd47fd7038a0 | 6,811 | py | Python | server/djangoapp/views.py | sLevasseur/agfzb-CloudAppDevelopment_Capstone | 8fc0a56f67ee199addf7b97885cbfdae664dd5fd | [
"Apache-2.0"
] | null | null | null | server/djangoapp/views.py | sLevasseur/agfzb-CloudAppDevelopment_Capstone | 8fc0a56f67ee199addf7b97885cbfdae664dd5fd | [
"Apache-2.0"
] | null | null | null | server/djangoapp/views.py | sLevasseur/agfzb-CloudAppDevelopment_Capstone | 8fc0a56f67ee199addf7b97885cbfdae664dd5fd | [
"Apache-2.0"
] | null | null | null | from django.shortcuts import render
from django.http import HttpResponseRedirect, HttpResponse
from django.contrib.auth.models import User
from django.shortcuts import get_object_or_404, render, redirect
from .models import CarDealer, DealerReview, CarModel
from .restapis import get_dealers_from_cf, get_dealer_reviews_... | 41.278788 | 118 | 0.64528 |
797690c63f241bfdda981f6b040f1d1e35983903 | 1,380 | py | Python | samples/generated_samples/retail_v2_generated_product_service_delete_product_sync.py | tetiana-karasova/python-retail | b834c1fb16212e59241267e18d38b490e962af7f | [
"Apache-2.0"
] | 1 | 2022-02-11T14:00:31.000Z | 2022-02-11T14:00:31.000Z | samples/generated_samples/retail_v2_generated_product_service_delete_product_sync.py | tetiana-karasova/python-retail | b834c1fb16212e59241267e18d38b490e962af7f | [
"Apache-2.0"
] | null | null | null | samples/generated_samples/retail_v2_generated_product_service_delete_product_sync.py | tetiana-karasova/python-retail | b834c1fb16212e59241267e18d38b490e962af7f | [
"Apache-2.0"
] | 2 | 2022-01-28T09:53:16.000Z | 2022-02-07T14:27:38.000Z | # -*- coding: utf-8 -*-
# Copyright 2022 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... | 31.363636 | 85 | 0.76087 |
7976925621ad48436e5d965394eb0594f28d0972 | 203 | py | Python | Py98/main.py | xhexe/Py8R | 44238c5403e7f76988760a040bf5c292824c22e7 | [
"WTFPL"
] | null | null | null | Py98/main.py | xhexe/Py8R | 44238c5403e7f76988760a040bf5c292824c22e7 | [
"WTFPL"
] | null | null | null | Py98/main.py | xhexe/Py8R | 44238c5403e7f76988760a040bf5c292824c22e7 | [
"WTFPL"
] | null | null | null | vowels = ["a", "e", "i", "o", "u"]
msg = input("Enter string: ")
msg_without_vowels = ""
for letter in msg:
if letter not in vowels:
msg_without_vowels += letter
print(msg_without_vowels)
| 18.454545 | 36 | 0.630542 |
797692bf32c1e0b59a8bf9396fa48aad46db3b6d | 4,769 | py | Python | homeassistant/components/tado/device_tracker.py | petewill/home-assistant | 5859dba4344f05fb8774aa1207e47ac28f627a67 | [
"Apache-2.0"
] | 3 | 2020-05-18T10:18:16.000Z | 2020-12-08T11:27:55.000Z | homeassistant/components/tado/device_tracker.py | petewill/home-assistant | 5859dba4344f05fb8774aa1207e47ac28f627a67 | [
"Apache-2.0"
] | 39 | 2016-12-16T12:40:34.000Z | 2017-02-13T17:53:42.000Z | homeassistant/components/tado/device_tracker.py | petewill/home-assistant | 5859dba4344f05fb8774aa1207e47ac28f627a67 | [
"Apache-2.0"
] | 6 | 2020-04-10T06:21:11.000Z | 2021-07-01T08:53:38.000Z | """Support for Tado Smart device trackers."""
import logging
from datetime import timedelta
from collections import namedtuple
import asyncio
import aiohttp
import async_timeout
import voluptuous as vol
import homeassistant.helpers.config_validation as cv
from homeassistant.const import CONF_USERNAME, CONF_PASSWORD
f... | 31.793333 | 88 | 0.638289 |
79769310e5f807a9a55f83f48e0004404e6e6cb9 | 245 | py | Python | npbench/benchmarks/polybench/gemver/gemver_numba_n.py | frahlg/npbench | 1bc4d9e2e22f3ca67fa2bc7f40e2e751a9c8dd26 | [
"BSD-3-Clause"
] | 27 | 2021-05-10T11:49:13.000Z | 2022-03-22T18:07:19.000Z | npbench/benchmarks/polybench/gemver/gemver_numba_n.py | frahlg/npbench | 1bc4d9e2e22f3ca67fa2bc7f40e2e751a9c8dd26 | [
"BSD-3-Clause"
] | 3 | 2021-12-01T13:03:17.000Z | 2022-03-17T10:53:00.000Z | npbench/benchmarks/polybench/gemver/gemver_numba_n.py | frahlg/npbench | 1bc4d9e2e22f3ca67fa2bc7f40e2e751a9c8dd26 | [
"BSD-3-Clause"
] | 7 | 2021-06-24T03:40:25.000Z | 2022-01-26T09:04:33.000Z | import numpy as np
import numba as nb
@nb.jit(nopython=True, parallel=False, fastmath=True)
def kernel(alpha, beta, A, u1, v1, u2, v2, w, x, y, z):
A += np.outer(u1, v1) + np.outer(u2, v2)
x += beta * y @ A + z
w += alpha * A @ x
| 22.272727 | 55 | 0.579592 |
797694f6d9b87e76d0fab854a6823f270d761b27 | 607 | py | Python | cleanup.py | gndctrl2mjrtm/dkeras | 97bcf176dbc96bd52cc6e19283159a6e73f0a4dc | [
"MIT"
] | 195 | 2019-09-05T08:41:53.000Z | 2022-03-09T14:04:07.000Z | cleanup.py | gndctrl2mjrtm/dkeras | 97bcf176dbc96bd52cc6e19283159a6e73f0a4dc | [
"MIT"
] | 4 | 2019-11-27T00:45:31.000Z | 2020-03-11T14:12:44.000Z | cleanup.py | gndctrl2mjrtm/dkeras | 97bcf176dbc96bd52cc6e19283159a6e73f0a4dc | [
"MIT"
] | 14 | 2019-11-27T17:32:36.000Z | 2022-02-12T03:55:15.000Z | #!/bin/env/python
#-*- encoding: utf-8 -*-
"""
"""
from __future__ import print_function, division
import os
def main():
# OSX Cleanup
dirpath = os.path.dirname(os.path.abspath(__file__))
for root, dirs, files in os.walk(dirpath):
for d in dirs:
if d in ['__pycache__']:
... | 24.28 | 74 | 0.574959 |
7976959f17ccf18bf881628b8ae5579e2eecd234 | 370 | py | Python | message_getter/message_getter/items.py | AlexPivnenko/python_lab2 | 7a3340995ec408bca4bca42bf454cfde5505cf90 | [
"MIT"
] | null | null | null | message_getter/message_getter/items.py | AlexPivnenko/python_lab2 | 7a3340995ec408bca4bca42bf454cfde5505cf90 | [
"MIT"
] | null | null | null | message_getter/message_getter/items.py | AlexPivnenko/python_lab2 | 7a3340995ec408bca4bca42bf454cfde5505cf90 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
# Define here the models for your scraped items
#
# See documentation in:
# https://doc.scrapy.org/en/latest/topics/items.html
from scrapy import Field, Item
class ForumTopicItem(Item):
name = Field()
url = Field()
class ForumMessageItem(Item):
text = Field()
author = Field(... | 18.5 | 52 | 0.659459 |
79769623fb28640a85c0cb4e5d974eb939f418b2 | 9,299 | py | Python | tensorflow_probability/python/experimental/nn/variational_base.py | bourov/probability | 1e4053a0938b4773c3425bcbb07b3f1e5d50c7e2 | [
"Apache-2.0"
] | 2 | 2020-12-17T20:43:24.000Z | 2021-06-11T22:09:16.000Z | tensorflow_probability/python/experimental/nn/variational_base.py | bourov/probability | 1e4053a0938b4773c3425bcbb07b3f1e5d50c7e2 | [
"Apache-2.0"
] | 2 | 2021-08-25T16:14:51.000Z | 2022-02-10T04:47:11.000Z | tensorflow_probability/python/experimental/nn/variational_base.py | bourov/probability | 1e4053a0938b4773c3425bcbb07b3f1e5d50c7e2 | [
"Apache-2.0"
] | 1 | 2020-12-19T13:05:15.000Z | 2020-12-19T13:05:15.000Z | # Copyright 2019 The TensorFlow Probability 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 o... | 32.62807 | 104 | 0.693838 |
79769642adba9bfc41396ddb04d307fd79d77a7a | 37,349 | py | Python | fairseq/models/skip_transformer.py | dayangxiaosong/MTProject | 0943758731dc6969e58644412dba2c8af2130555 | [
"BSD-3-Clause"
] | null | null | null | fairseq/models/skip_transformer.py | dayangxiaosong/MTProject | 0943758731dc6969e58644412dba2c8af2130555 | [
"BSD-3-Clause"
] | null | null | null | fairseq/models/skip_transformer.py | dayangxiaosong/MTProject | 0943758731dc6969e58644412dba2c8af2130555 | [
"BSD-3-Clause"
] | null | null | null | # Copyright (c) 2017-present, Facebook, Inc.
# All rights reserved.
#
# This source code is licensed under the license found in the LICENSE file in
# the root directory of this source tree. An additional grant of patent rights
# can be found in the PATENTS file in the same directory.
import math
import torch
import t... | 43.785463 | 141 | 0.648451 |
7976966085902c113674fee961cc08018c00c7f3 | 6,459 | py | Python | alipay/aop/api/domain/ApprovedInfo.py | articuly/alipay-sdk-python-all | 0259cd28eca0f219b97dac7f41c2458441d5e7a6 | [
"Apache-2.0"
] | null | null | null | alipay/aop/api/domain/ApprovedInfo.py | articuly/alipay-sdk-python-all | 0259cd28eca0f219b97dac7f41c2458441d5e7a6 | [
"Apache-2.0"
] | null | null | null | alipay/aop/api/domain/ApprovedInfo.py | articuly/alipay-sdk-python-all | 0259cd28eca0f219b97dac7f41c2458441d5e7a6 | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/env python
# -*- coding: utf-8 -*-
import simplejson as json
from alipay.aop.api.constant.ParamConstants import *
class ApprovedInfo(object):
def __init__(self):
self._application_no = None
self._approval_letter_url = None
self._imm_code = None
self._imm_fullname = Non... | 31.354369 | 89 | 0.58941 |
797697451286b3ba615cc1aa27494ddec7d61c5a | 3,997 | py | Python | gateapi-python/gate_api/models/futures_order_book_item.py | jarenmt/IEOPUMP | 220f7f612d299f7305e82fe6c33661e6871f2d86 | [
"MIT"
] | null | null | null | gateapi-python/gate_api/models/futures_order_book_item.py | jarenmt/IEOPUMP | 220f7f612d299f7305e82fe6c33661e6871f2d86 | [
"MIT"
] | null | null | null | gateapi-python/gate_api/models/futures_order_book_item.py | jarenmt/IEOPUMP | 220f7f612d299f7305e82fe6c33661e6871f2d86 | [
"MIT"
] | null | null | null | # coding: utf-8
"""
Gate API v4
Welcome to Gate.io API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501
Contact: support@mail.gate.io
Gen... | 27.756944 | 239 | 0.568677 |
7976978b4c3d9b9209d829c4c0d2964eeef715b4 | 46,083 | py | Python | mycroft/util/lang/parse_it.py | PFischbeck/mycroft-core | 6aa1d2d86ce802d3bfd659c2e89966d9c51da92f | [
"Apache-2.0"
] | null | null | null | mycroft/util/lang/parse_it.py | PFischbeck/mycroft-core | 6aa1d2d86ce802d3bfd659c2e89966d9c51da92f | [
"Apache-2.0"
] | null | null | null | mycroft/util/lang/parse_it.py | PFischbeck/mycroft-core | 6aa1d2d86ce802d3bfd659c2e89966d9c51da92f | [
"Apache-2.0"
] | null | null | null | #
# Copyright 2017 Mycroft AI 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 writ... | 34.779623 | 79 | 0.502593 |
797698d188796c267d0058db3859488e360a3fa6 | 289 | py | Python | src/greenery/urls.py | troublsum03/RP_CapStone1 | b8d911c4cb531041330f4f5a99d7795b47bf4e4d | [
"bzip2-1.0.6"
] | null | null | null | src/greenery/urls.py | troublsum03/RP_CapStone1 | b8d911c4cb531041330f4f5a99d7795b47bf4e4d | [
"bzip2-1.0.6"
] | null | null | null | src/greenery/urls.py | troublsum03/RP_CapStone1 | b8d911c4cb531041330f4f5a99d7795b47bf4e4d | [
"bzip2-1.0.6"
] | null | null | null | from django.conf.urls import url
from .views import (
GreeneryListView,
GreeneryDetailSlugView,
)
app_name = "greenery"
urlpatterns = [
url(r'^$', GreeneryListView.as_view(), name='list'),
url(r'^(?P<slug>[\w-]+)/$', GreeneryDetailSlugView.as_view(), name='detail'),
]
| 19.266667 | 81 | 0.6609 |
797698d7e411c597f05d54f3672115eea71568f6 | 997 | py | Python | demo/test_bg2.py | yosukefk/plotter | 16127ee7fc3105c717e92875ee3d61477bd41533 | [
"MIT"
] | null | null | null | demo/test_bg2.py | yosukefk/plotter | 16127ee7fc3105c717e92875ee3d61477bd41533 | [
"MIT"
] | 6 | 2021-05-25T15:51:27.000Z | 2021-08-18T20:39:41.000Z | demo/test_bg2.py | yosukefk/plotter | 16127ee7fc3105c717e92875ee3d61477bd41533 | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
import sys
sys.path.append('..')
from plotter import plotter_solo as psolo, calpost_reader as reader
import matplotlib as mpl
from importlib import reload
from plotter import plotter_util as pu
reload(psolo)
reload(pu)
# save better resolution image
mpl.rcParams['savefig.dpi'] = 300
fname =... | 24.925 | 74 | 0.633902 |
7976990cec2021d614ed98313b56e4beb2b1c10f | 2,886 | py | Python | test/test_sql3load_p1.py | carlosm3011/cm2c-commons | 0527edd870aa1b23bc8131740b2add7013cfcd0c | [
"BSD-2-Clause"
] | 1 | 2019-04-28T22:51:51.000Z | 2019-04-28T22:51:51.000Z | test/test_sql3load_p1.py | carlosm3011/cm2c-python-commons | 0527edd870aa1b23bc8131740b2add7013cfcd0c | [
"BSD-2-Clause"
] | 1 | 2016-05-25T13:35:44.000Z | 2016-05-25T13:35:44.000Z | test/test_sql3load_p1.py | carlosm3011/cm2c-python-commons | 0527edd870aa1b23bc8131740b2add7013cfcd0c | [
"BSD-2-Clause"
] | null | null | null | '''
Test Battery for the SQL3 CSV Import
Created on Sep 18, 2013
@author: marcelo, carlos@xt6.us
@changelog:
'''
import unittest
import sys
import uuid
from cm2c.commons.gen.utils import get_tmp_fn
from cm2c.csvimport.sql3load import sql3load
#--
class Test(unittest.TestCase):
def setUp(self):
#sys.std... | 35.62963 | 97 | 0.608455 |
79769931d2fed0322b1f5823c9e459777d6c123b | 6,034 | py | Python | wakeful/preprocessing.py | robOcity/wakeful | e3a50649e6208da28feea2fe402f119b0223293d | [
"MIT"
] | null | null | null | wakeful/preprocessing.py | robOcity/wakeful | e3a50649e6208da28feea2fe402f119b0223293d | [
"MIT"
] | null | null | null | wakeful/preprocessing.py | robOcity/wakeful | e3a50649e6208da28feea2fe402f119b0223293d | [
"MIT"
] | null | null | null | """
Get set of normal and attack Bro logs and create a balanced dataset.
"""
#TODO fix doc strings
import os
from sklearn.utils import resample
from sklearn.model_selection import train_test_split
from . import log_munger, metrics
CONN_LOG_DROP_COLS = cols_to_drop = ['conn_state', 'history', 'id.orig_h',
... | 39.437908 | 105 | 0.632913 |
797699431d4300818bbca2b988050a9104db6c94 | 658 | py | Python | recursion_dynamic/steps/test_steps.py | rubenparedes0796/interactive-coding-challenges | 4a942ff7a8b4a78052eae7e2b33d129683796570 | [
"Apache-2.0"
] | 27,173 | 2015-07-06T12:36:05.000Z | 2022-03-31T23:56:41.000Z | recursion_dynamic/steps/test_steps.py | govind527/interactive-coding-challenges | 358f2cc60426d5c4c3d7d580910eec9a7b393fa9 | [
"Apache-2.0"
] | 143 | 2015-07-07T05:13:11.000Z | 2021-12-07T17:05:54.000Z | recursion_dynamic/steps/test_steps.py | govind527/interactive-coding-challenges | 358f2cc60426d5c4c3d7d580910eec9a7b393fa9 | [
"Apache-2.0"
] | 4,657 | 2015-07-06T13:28:02.000Z | 2022-03-31T10:11:28.000Z | import unittest
class TestSteps(unittest.TestCase):
def test_steps(self):
steps = Steps()
self.assertRaises(TypeError, steps.count_ways, None)
self.assertRaises(TypeError, steps.count_ways, -1)
self.assertEqual(steps.count_ways(0), 1)
self.assertEqual(steps.count_ways(1), ... | 25.307692 | 60 | 0.651976 |
79769977a823615a36484c820c6a6d72ec9c5209 | 782 | py | Python | Docking_OE_FRED_template/split_pdb.py | bctaylor/bccgc4 | 2f0d970f35a5345ae1bf0755fbeb0b2a8f2d1f5a | [
"Apache-2.0"
] | 1 | 2022-03-31T07:53:46.000Z | 2022-03-31T07:53:46.000Z | Docking_OE_FRED_template/split_pdb.py | bctaylor/bccgc4 | 2f0d970f35a5345ae1bf0755fbeb0b2a8f2d1f5a | [
"Apache-2.0"
] | null | null | null | Docking_OE_FRED_template/split_pdb.py | bctaylor/bccgc4 | 2f0d970f35a5345ae1bf0755fbeb0b2a8f2d1f5a | [
"Apache-2.0"
] | 5 | 2018-10-13T23:35:16.000Z | 2022-03-31T12:11:12.000Z | import glob
import sys
def main(argv=[__name__]):
path="ligand_poses_pdbs/*.pdb" #10 pdbs, 1 per docked receptor--> split each pdb into 459 pdbs (1 per ligand)
files=glob.glob(path)
for i in files:
centroid_number=i[-5:-4]
fread=open(i,"r")
Lines=fread.readlines()
count=0
... | 26.965517 | 114 | 0.547315 |
79769a6d0cff550cdec25e92a26ec9f89f608730 | 1,588 | py | Python | liftcord/mixins.py | ZoRiiii/liftcord | a08031ad0a283e75f63f064cb99965a8e2a3cd06 | [
"MIT"
] | 1 | 2021-09-01T19:58:37.000Z | 2021-09-01T19:58:37.000Z | liftcord/mixins.py | ZoRiiii/liftcord | a08031ad0a283e75f63f064cb99965a8e2a3cd06 | [
"MIT"
] | null | null | null | liftcord/mixins.py | ZoRiiii/liftcord | a08031ad0a283e75f63f064cb99965a8e2a3cd06 | [
"MIT"
] | null | null | null | """
The MIT License (MIT)
Copyright (c) 2021 xXSergeyXx
Permission is hereby granted, free of charge, to any person obtaining a
copy of this software and associated documentation files (the "Software"),
to deal in the Software without restriction, including without limitation
the rights to use, copy, modify, merge, p... | 33.083333 | 75 | 0.738665 |
79769ac6e1dd65a3178d1fda38272881f90eee91 | 7,817 | py | Python | optimal_dimensionality/glove/noise_est_log_count.py | DAVIDDAIJUNCHEN/PIP-experiments | e5787f7dc09c5138e830fc5f8d9b515e7d7a457e | [
"MIT"
] | 5 | 2018-11-29T14:49:54.000Z | 2019-04-07T13:40:17.000Z | optimal_dimensionality/glove/noise_est_log_count.py | DAVIDDAIJUNCHEN/PIP-experiments | e5787f7dc09c5138e830fc5f8d9b515e7d7a457e | [
"MIT"
] | 3 | 2019-04-04T13:13:20.000Z | 2019-04-07T14:25:29.000Z | optimal_dimensionality/glove/noise_est_log_count.py | DAVIDDAIJUNCHEN/PIP-experiments | e5787f7dc09c5138e830fc5f8d9b515e7d7a457e | [
"MIT"
] | 1 | 2019-02-20T02:08:54.000Z | 2019-02-20T02:08:54.000Z | from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
import collections
import math
import os
import random
import zipfile
import cPickle as pickle
import numpy as np
from six.moves import urllib
from six.moves import xrange # pylint: disable
from scipy.sparse i... | 35.053812 | 94 | 0.675451 |
79769b8ebb9b1577c2674032553703b0e2e275bf | 1,492 | py | Python | tests/conftest.py | gi0baro/emmett-mongorest | 814658b3d8051ad649f1bc7cffb32354b3b7a97c | [
"BSD-3-Clause"
] | null | null | null | tests/conftest.py | gi0baro/emmett-mongorest | 814658b3d8051ad649f1bc7cffb32354b3b7a97c | [
"BSD-3-Clause"
] | 3 | 2020-12-27T12:29:12.000Z | 2022-02-27T10:34:33.000Z | tests/conftest.py | gi0baro/emmett-mongorest | 814658b3d8051ad649f1bc7cffb32354b3b7a97c | [
"BSD-3-Clause"
] | null | null | null | # -*- coding: utf-8 -*-
import os
import pytest
from emmett import App, sdict
from emmett.asgi.loops import loops
from emmett.parsers import Parsers
from emmett.serializers import Serializers
from emmett_mongo import Database
from emmett_mongorest import MongoREST
@pytest.fixture(scope='session')
def json_dump():
... | 22.606061 | 60 | 0.673592 |
79769bee1a4fe2d55fcbea16bc08c20b03c73147 | 1,449 | py | Python | dietbox/data/wrangling/json.py | emptymalei/statistical-tests | 8b5d4d4965c431be458271b25cca56fa8e2bf01f | [
"MIT"
] | null | null | null | dietbox/data/wrangling/json.py | emptymalei/statistical-tests | 8b5d4d4965c431be458271b25cca56fa8e2bf01f | [
"MIT"
] | null | null | null | dietbox/data/wrangling/json.py | emptymalei/statistical-tests | 8b5d4d4965c431be458271b25cca56fa8e2bf01f | [
"MIT"
] | null | null | null | import datetime
import dateutil
import numpy as np
import simplejson as json
######################
# JSON
######################
class JSONEncoder(json.JSONEncoder):
"""
data serializer for json
"""
def default(self, obj):
"""
default serializer
"""
if isinstance(o... | 21.954545 | 76 | 0.599724 |
79769e72efa968d0ed27249e2db01785266b86f1 | 3,150 | py | Python | scripts/merge_vistrails.py | celiafish/VisTrails | d8cb575b8b121941de190fe608003ad1427ef9f6 | [
"BSD-3-Clause"
] | 1 | 2020-03-13T20:56:21.000Z | 2020-03-13T20:56:21.000Z | scripts/merge_vistrails.py | celiafish/VisTrails | d8cb575b8b121941de190fe608003ad1427ef9f6 | [
"BSD-3-Clause"
] | null | null | null | scripts/merge_vistrails.py | celiafish/VisTrails | d8cb575b8b121941de190fe608003ad1427ef9f6 | [
"BSD-3-Clause"
] | null | null | null | #!/usr/bin/env python
###############################################################################
##
## Copyright (C) 2011-2014, NYU-Poly.
## Copyright (C) 2006-2011, University of Utah.
## All rights reserved.
## Contact: contact@vistrails.org
##
## This file is part of VisTrails.
##
## "Redistribution and use in... | 47.014925 | 111 | 0.696508 |
79769f888ddc1b95ba98920b386f074367f13749 | 4,430 | py | Python | lib/ansible/modules/utilities/logic/include_vars.py | Container-Projects/ansible-provider-docs | 100b695b0b0c4d8d08af362069557ffc735d0d7e | [
"PSF-2.0",
"BSD-2-Clause",
"MIT"
] | 37 | 2017-08-15T15:02:43.000Z | 2021-07-23T03:44:31.000Z | lib/ansible/modules/utilities/logic/include_vars.py | Container-Projects/ansible-provider-docs | 100b695b0b0c4d8d08af362069557ffc735d0d7e | [
"PSF-2.0",
"BSD-2-Clause",
"MIT"
] | 12 | 2018-01-10T05:25:25.000Z | 2021-11-28T06:55:48.000Z | lib/ansible/modules/utilities/logic/include_vars.py | Container-Projects/ansible-provider-docs | 100b695b0b0c4d8d08af362069557ffc735d0d7e | [
"PSF-2.0",
"BSD-2-Clause",
"MIT"
] | 49 | 2017-08-15T09:52:13.000Z | 2022-03-21T17:11:54.000Z | # -*- coding: utf-8 -*-
# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
from __future__ import absolute_import, division, print_function
__metaclass__ = type
ANSIBLE_METADATA = {
'metadata_version': '1.1',
'status': ['stableinterface'],
'supported_by': 'core'
... | 32.335766 | 127 | 0.70316 |
7976a090a48ebbde19c1f783db2fb3842d8f90c9 | 1,563 | py | Python | logging_course/lesson4/task1/rotating_log_files.py | behzod/pycharm-courses | 0ba74ff0ff87e7747173c60cd139c25b8d7f3b0e | [
"Apache-2.0"
] | 213 | 2015-01-03T19:25:02.000Z | 2020-02-06T03:08:43.000Z | logging_course/lesson4/task1/rotating_log_files.py | behzod/pycharm-courses | 0ba74ff0ff87e7747173c60cd139c25b8d7f3b0e | [
"Apache-2.0"
] | 24 | 2015-01-01T17:03:09.000Z | 2019-12-22T10:28:22.000Z | logging_course/lesson4/task1/rotating_log_files.py | behzod/pycharm-courses | 0ba74ff0ff87e7747173c60cd139c25b8d7f3b0e | [
"Apache-2.0"
] | 139 | 2015-01-03T19:24:22.000Z | 2020-01-24T18:05:51.000Z | from __future__ import print_function
import math
import logging
import logging.handlers
logger = logging.getLogger('mortgage')
def get_current_rate(years):
logger.debug('Fetching current interest rate for %d years', years)
rate = 5.3 # Stub external service call
logger.debug('Service returned interest ... | 33.255319 | 79 | 0.642994 |
7976a1295e4cdbc0fdfd3f4100a230effd647a38 | 3,894 | py | Python | bindings/python/iree/runtime/system_api_test.py | KareemErgawy-TomTom/iree | 1a88333d43ab1d564cc9412c04815f7eaa20f6ee | [
"Apache-2.0"
] | null | null | null | bindings/python/iree/runtime/system_api_test.py | KareemErgawy-TomTom/iree | 1a88333d43ab1d564cc9412c04815f7eaa20f6ee | [
"Apache-2.0"
] | null | null | null | bindings/python/iree/runtime/system_api_test.py | KareemErgawy-TomTom/iree | 1a88333d43ab1d564cc9412c04815f7eaa20f6ee | [
"Apache-2.0"
] | null | null | null | # Lint as: python3
# Copyright 2019 The IREE Authors
#
# Licensed under the Apache License v2.0 with LLVM Exceptions.
# See https://llvm.org/LICENSE.txt for license information.
# SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
# pylint: disable=unused-variable
import re
from absl import logging
from absl.te... | 34.460177 | 113 | 0.679764 |
7976a13a04ecaf643a72a92c1f4decfe66aecc8f | 348 | py | Python | zhangqi/20180326/h4.py | python20180319howmework/homework | c826d7aa4c52f8d22f739feb134d20f0b2c217cd | [
"Apache-2.0"
] | null | null | null | zhangqi/20180326/h4.py | python20180319howmework/homework | c826d7aa4c52f8d22f739feb134d20f0b2c217cd | [
"Apache-2.0"
] | null | null | null | zhangqi/20180326/h4.py | python20180319howmework/homework | c826d7aa4c52f8d22f739feb134d20f0b2c217cd | [
"Apache-2.0"
] | null | null | null | #读入用户输入的一个字符串,普安段字符串中有多少各大写字母,多少各数字
#多少个小写字母
mystr = input("请输入一个字符串")
n = 0
N = 0
num = 0
for s in range(len(mystr)):
if 97<= ord(mystr[s]) <= 122:
n = n + 1
elif 65 <= ord(mystr[s]) <= 90:
N = N + 1
elif mystr[s].isdigit():
num = num + 1
print ("大写字母有%s个" % N)
print ("小写字母有%s个" % n)
print ("数字有%s个" % num)
... | 7.404255 | 35 | 0.534483 |
7976a2022a01b63191072ab6e17cca137a573d8c | 26,594 | py | Python | subshell.py | n07hin9/subshell | baa51d988713bce2307ee160a022bf144edff601 | [
"RSA-MD"
] | 58 | 2018-02-06T22:11:23.000Z | 2022-02-04T14:54:49.000Z | subshell.py | FDlucifer/subshell | baa51d988713bce2307ee160a022bf144edff601 | [
"RSA-MD"
] | 6 | 2020-12-29T21:20:40.000Z | 2020-12-30T04:55:43.000Z | subshell.py | admdev8/subshell | baa51d988713bce2307ee160a022bf144edff601 | [
"RSA-MD"
] | 12 | 2018-02-26T09:47:16.000Z | 2021-05-24T03:40:28.000Z | ## Title: subshell.py
## Author: Joe Vest
## Description: Command console framework that control webshells
"""
_________ ___ _________ __ __ __
/ _____/__ _\ |__ / _____/| |__ ____ | | | |
\_____ \| | \ __ \ \_____ \ | | \_/ __ \| | | |
/ \ | / \_... | 35.038208 | 164 | 0.530909 |
7976a42f7090f6ac08f428a9ee1ef20573ec20c1 | 751 | py | Python | setup.py | ArijitAcharjee411/project-startup-boilerplate | ad79a13a89663cb28f8ac12a0205ff99b0979cca | [
"MIT"
] | null | null | null | setup.py | ArijitAcharjee411/project-startup-boilerplate | ad79a13a89663cb28f8ac12a0205ff99b0979cca | [
"MIT"
] | null | null | null | setup.py | ArijitAcharjee411/project-startup-boilerplate | ad79a13a89663cb28f8ac12a0205ff99b0979cca | [
"MIT"
] | null | null | null | #! /usr/bin/env python
# -*- coding: utf-8 -*-
# vim:fenc=utf-8
#
# Copyright © 2021 arijit <arijit@linux-inspiron-5567>
#
# Distributed under terms of the MIT license.
from setuptools import setup, find_packages
VERSION = '1.0'
DESCRIPTION = 'Helps every developer with automated project workspace setup.'
# settin... | 23.46875 | 77 | 0.58988 |
7976a499d82db219c78e4a3e8eb6f17a4c9528b6 | 549 | py | Python | mmdet/core/bbox/samplers/combined_sampler.py | deepakksingh/mmdetection | b0d845f1fecf8064db30ef6b456b6ef5f36fa40f | [
"Apache-2.0"
] | 232 | 2021-05-25T12:55:24.000Z | 2022-03-25T07:58:49.000Z | mmdet/core/bbox/samplers/combined_sampler.py | deepakksingh/mmdetection | b0d845f1fecf8064db30ef6b456b6ef5f36fa40f | [
"Apache-2.0"
] | 51 | 2021-05-29T06:36:54.000Z | 2022-03-27T09:24:39.000Z | mmdet/core/bbox/samplers/combined_sampler.py | deepakksingh/mmdetection | b0d845f1fecf8064db30ef6b456b6ef5f36fa40f | [
"Apache-2.0"
] | 66 | 2021-06-01T03:40:08.000Z | 2022-03-30T16:51:21.000Z | from ..builder import BBOX_SAMPLERS, build_sampler
from .base_sampler import BaseSampler
@BBOX_SAMPLERS.register_module()
class CombinedSampler(BaseSampler):
def __init__(self, pos_sampler, neg_sampler, **kwargs):
super(CombinedSampler, self).__init__(**kwargs)
self.pos_sampler = build_sampler(po... | 30.5 | 63 | 0.73224 |
7976a65c446d802f567b6dbe208641c0d1ff26f6 | 17,589 | py | Python | haystack/backends/solr_backend.py | dcramer/django-haystack | f581c6a20d09dea67969884cd916da48d6681f5c | [
"BSD-3-Clause"
] | 2 | 2015-09-24T19:53:25.000Z | 2015-11-06T10:46:39.000Z | haystack/backends/solr_backend.py | dcramer/django-haystack | f581c6a20d09dea67969884cd916da48d6681f5c | [
"BSD-3-Clause"
] | null | null | null | haystack/backends/solr_backend.py | dcramer/django-haystack | f581c6a20d09dea67969884cd916da48d6681f5c | [
"BSD-3-Clause"
] | null | null | null | import logging
import sys
from django.conf import settings
from django.core.exceptions import ImproperlyConfigured
from django.db.models.loading import get_model
from django.utils.encoding import force_unicode
from haystack.backends import BaseSearchBackend, BaseSearchQuery, log_query
from haystack.exceptions import Mi... | 38.40393 | 127 | 0.546648 |
7976a8624d5faf0e0925cb18cea93fcfac27c89f | 6,189 | py | Python | appsrc/tests/test_recurringslotstemplates.py | arieunier/covid19-bookable-slot | 5869edebf3dbd84bb493ceefd5008e3d7b2307c7 | [
"MIT"
] | null | null | null | appsrc/tests/test_recurringslotstemplates.py | arieunier/covid19-bookable-slot | 5869edebf3dbd84bb493ceefd5008e3d7b2307c7 | [
"MIT"
] | null | null | null | appsrc/tests/test_recurringslotstemplates.py | arieunier/covid19-bookable-slot | 5869edebf3dbd84bb493ceefd5008e3d7b2307c7 | [
"MIT"
] | 1 | 2020-06-02T23:35:39.000Z | 2020-06-02T23:35:39.000Z | import os
import unittest
from appsrc import app
from libs import variables
import appsrc.tests.utils
import ujson
class TestCases(unittest.TestCase):
def setUp(self):
appsrc.tests.utils.fillDb()
appsrc.tests.utils.purgeCookies()
pass
def tearDown(self):
pass
def test_... | 47.607692 | 223 | 0.636775 |
7976aa0ae430d77d68162dc6f20a5ec67278532d | 43 | py | Python | server/routes/__init__.py | HarshalRathore/journal-policy-tracker-backend | 4dd1930aa3de55d17a357c6e1fdc984fcd2e0f7e | [
"MIT"
] | 2 | 2022-03-27T07:19:27.000Z | 2022-03-31T22:19:28.000Z | server/routes/__init__.py | HarshalRathore/journal-policy-tracker-backend | 4dd1930aa3de55d17a357c6e1fdc984fcd2e0f7e | [
"MIT"
] | 19 | 2021-05-25T15:40:48.000Z | 2022-03-31T04:19:08.000Z | server/routes/__init__.py | HarshalRathore/journal-policy-tracker-backend | 4dd1930aa3de55d17a357c6e1fdc984fcd2e0f7e | [
"MIT"
] | 6 | 2021-05-25T15:44:11.000Z | 2022-03-29T20:55:09.000Z | from .user import *
from .journal import *
| 14.333333 | 22 | 0.72093 |
7976aa2be559492257f6f2edf9ad4d03ddc06b54 | 978 | py | Python | api/users/enums.py | django-doctor/lite-api | 1ba278ba22ebcbb977dd7c31dd3701151cd036bf | [
"MIT"
] | 3 | 2019-05-15T09:30:39.000Z | 2020-04-22T16:14:23.000Z | api/users/enums.py | django-doctor/lite-api | 1ba278ba22ebcbb977dd7c31dd3701151cd036bf | [
"MIT"
] | 85 | 2019-04-24T10:39:35.000Z | 2022-03-21T14:52:12.000Z | api/users/enums.py | django-doctor/lite-api | 1ba278ba22ebcbb977dd7c31dd3701151cd036bf | [
"MIT"
] | 1 | 2021-01-17T11:12:19.000Z | 2021-01-17T11:12:19.000Z | from uuid import UUID
from api.common.enums import LiteEnum, autostr
class UserStatuses:
ACTIVE = "Active"
DEACTIVATED = "Deactivated"
choices = [
(ACTIVE, "Active"),
(DEACTIVATED, "Deactivated"),
]
@classmethod
def from_string(cls, s):
return {
UserStatu... | 22.227273 | 71 | 0.632924 |
7976aa4df2687424686ccb6c97512356895639e3 | 4,136 | py | Python | memfunctions/mem.py | AndersBarth/MEMtoolbox | 27d3c3c489f0744d052435841622e5f0eafa074a | [
"MIT"
] | null | null | null | memfunctions/mem.py | AndersBarth/MEMtoolbox | 27d3c3c489f0744d052435841622e5f0eafa074a | [
"MIT"
] | null | null | null | memfunctions/mem.py | AndersBarth/MEMtoolbox | 27d3c3c489f0744d052435841622e5f0eafa074a | [
"MIT"
] | null | null | null | from numpy import log, log10, linalg, gradient, logspace, zeros, array, \
identity, arange, linspace, asarray, diag, sqrt, ndarray, sum
from cvxopt import matrix, solvers
from numba import jit
solvers.options['show_progress'] = False
solvers.options['maxiters'] = 200
# convert amplitude to probabily density func... | 29.755396 | 76 | 0.54618 |
7976aa5740344dc38bec1744be1c5bd078183b65 | 1,535 | py | Python | xbox-music-controller/xbox_music_controller.py | brajenful/small-projects | 6c47d876637462c3a5085a645088fc409cbbd80f | [
"MIT"
] | 2 | 2020-10-13T01:31:17.000Z | 2021-12-14T18:35:40.000Z | xbox-music-controller/xbox_music_controller.py | brajenful/small-projects | 6c47d876637462c3a5085a645088fc409cbbd80f | [
"MIT"
] | null | null | null | xbox-music-controller/xbox_music_controller.py | brajenful/small-projects | 6c47d876637462c3a5085a645088fc409cbbd80f | [
"MIT"
] | null | null | null | import inputs
import keyboard
import asyncio
class ControllerListener:
def __init__(self):
self.events = None
self.event = None
self.buttons = {'BTN_START': None,
'BTN_SELECT': 'play/pause',
'BTN_SOUTH': 'volume down',
'BTN_NORTH': 'volume up',
'BTN_WEST': 'previous track',
'BTN... | 21.319444 | 48 | 0.689902 |
7976aa6c80fc56161e7e18cc8771e4de1c92a9ea | 242 | py | Python | venv/lib/python3.7/site-packages/tests/test_escpos.py | Spam-Slayers/Newsify | bdf0d633663d289a6cb9ed10c1529afb086d410f | [
"MIT"
] | 1 | 2020-10-21T18:11:10.000Z | 2020-10-21T18:11:10.000Z | venv/lib/python3.7/site-packages/tests/test_escpos.py | VedantKhairnar/Newsify | bdf0d633663d289a6cb9ed10c1529afb086d410f | [
"MIT"
] | null | null | null | venv/lib/python3.7/site-packages/tests/test_escpos.py | VedantKhairnar/Newsify | bdf0d633663d289a6cb9ed10c1529afb086d410f | [
"MIT"
] | 2 | 2020-04-16T10:14:57.000Z | 2020-05-12T09:28:34.000Z | # the inclusion of the tests module is not meant to offer best practices for
# testing in general, but rather to support the `find_packages` example in
# setup.py that excludes installing the "tests" package
def test_success():
assert True
| 30.25 | 76 | 0.780992 |
7976ab2adcb7b122ee9cb243738d426df7f9333e | 1,185 | py | Python | build/setup.py | alexdavies/jax | 812df27a2d8f61bfac95ff2867d1284cac81837f | [
"ECL-2.0",
"Apache-2.0"
] | 4 | 2021-04-02T03:46:28.000Z | 2021-12-04T22:52:50.000Z | build/setup.py | alexdavies/jax | 812df27a2d8f61bfac95ff2867d1284cac81837f | [
"ECL-2.0",
"Apache-2.0"
] | 2 | 2019-08-15T18:22:52.000Z | 2019-08-20T18:19:42.000Z | build/setup.py | alexdavies/jax | 812df27a2d8f61bfac95ff2867d1284cac81837f | [
"ECL-2.0",
"Apache-2.0"
] | 1 | 2020-11-22T17:50:23.000Z | 2020-11-22T17:50:23.000Z | # Copyright 2018 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
#
# https://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, ... | 29.625 | 74 | 0.712236 |
7976ab945b2add0476698889c9796ff0d98fb3d7 | 8,751 | py | Python | scripts/DL_final_InceptionTime_regressor.py | svenvanderburg/EEG_age_prediction | 6ce32d0776f4f0cf6287d8b7b215c20cef5d9926 | [
"Apache-2.0"
] | 2 | 2021-09-23T07:45:29.000Z | 2022-03-18T13:21:57.000Z | scripts/DL_final_InceptionTime_regressor.py | NadineUU/EEG_age_prediction | 958e8d6445bf277a445608e05d779315dbd9b376 | [
"Apache-2.0"
] | 8 | 2021-09-21T08:08:53.000Z | 2022-03-16T18:19:55.000Z | scripts/DL_final_InceptionTime_regressor.py | NadineUU/EEG_age_prediction | 958e8d6445bf277a445608e05d779315dbd9b376 | [
"Apache-2.0"
] | 2 | 2022-03-16T10:50:52.000Z | 2022-03-17T15:41:53.000Z | #!/usr/bin/env python
# ================ IMPORT LIBRARIES ================ #
import sys, os, fnmatch, time
import numpy as np
import pandas as pd
from sklearn.model_selection import train_test_split
sys.path.insert(0, os.path.dirname(os.getcwd()))
from dataset_generator import DataGenerator
import tensorflow as tf... | 41.084507 | 160 | 0.613073 |
7976ac2eaabed4d1cf4797d80969be89147d0eec | 19,194 | py | Python | flexget/plugins/metainfo/imdb_lookup.py | BrainDamage/Flexget | 50f75bdad64ce023daaff334df8478319ddb9f64 | [
"MIT"
] | null | null | null | flexget/plugins/metainfo/imdb_lookup.py | BrainDamage/Flexget | 50f75bdad64ce023daaff334df8478319ddb9f64 | [
"MIT"
] | null | null | null | flexget/plugins/metainfo/imdb_lookup.py | BrainDamage/Flexget | 50f75bdad64ce023daaff334df8478319ddb9f64 | [
"MIT"
] | null | null | null | from __future__ import unicode_literals, division, absolute_import
import logging
from datetime import datetime, timedelta
from sqlalchemy import Table, Column, Integer, Float, String, Unicode, Boolean, DateTime, delete
from sqlalchemy.schema import ForeignKey, Index
from sqlalchemy.orm import relation, joinedload
fr... | 38.933063 | 120 | 0.606544 |
7976ad3f3bc6375987421aef48b0cc05a367365e | 6,592 | py | Python | kaa/openapi.py | elpeix/kaa | b840613cb5eba876d937faf32031651332e5b5f6 | [
"MIT"
] | null | null | null | kaa/openapi.py | elpeix/kaa | b840613cb5eba876d937faf32031651332e5b5f6 | [
"MIT"
] | null | null | null | kaa/openapi.py | elpeix/kaa | b840613cb5eba876d937faf32031651332e5b5f6 | [
"MIT"
] | null | null | null |
import ast
import importlib
import inspect
import definitions
class OpenApi:
OPEN_API_VERSION = '3.0.3'
def generate(self, kaa):
elements = self.__get_elements(kaa)
return {
'openapi': self.OPEN_API_VERSION,
'info': {
'title': definitions.NAME,
... | 31.692308 | 96 | 0.480886 |
7976ae014fdfbe2f7aa404aaaab17d8fdf0ac48f | 704 | py | Python | nobos_commons/feature_preparations/feature_vec_producers/from_skeleton_joints/potion/heatmap_colorizer.py | noboevbo/nobos_commons | 471e52e10fd2228c106777c72d8439e58b047003 | [
"MIT"
] | 2 | 2020-06-03T16:28:44.000Z | 2020-10-10T03:07:23.000Z | nobos_commons/feature_preparations/feature_vec_producers/from_skeleton_joints/potion/heatmap_colorizer.py | noboevbo/nobos_commons | 471e52e10fd2228c106777c72d8439e58b047003 | [
"MIT"
] | null | null | null | nobos_commons/feature_preparations/feature_vec_producers/from_skeleton_joints/potion/heatmap_colorizer.py | noboevbo/nobos_commons | 471e52e10fd2228c106777c72d8439e58b047003 | [
"MIT"
] | 4 | 2020-10-10T03:07:25.000Z | 2021-09-30T01:11:02.000Z | from typing import List
import numpy as np
def colorize_heatmaps(heatmaps: np.ndarray, color: List[int], channels: int = 3):
color_array = np.array([[[color]]])
clipped = np.clip(heatmaps, 0, 1)
clipped = np.squeeze(clipped, axis=0)
clipped = clipped[:, :, :, None] * np.ones(channels, dtype=int)[None... | 35.2 | 99 | 0.673295 |
7976ae0db06936ddaaf7b4c2b276b86d1b705898 | 1,341 | py | Python | backend/src/exercise/migrations/0001_initial.py | Rdani2005/helping-you2 | 772367ca6046ca578a6a951558f55fae2c974024 | [
"MIT"
] | null | null | null | backend/src/exercise/migrations/0001_initial.py | Rdani2005/helping-you2 | 772367ca6046ca578a6a951558f55fae2c974024 | [
"MIT"
] | null | null | null | backend/src/exercise/migrations/0001_initial.py | Rdani2005/helping-you2 | 772367ca6046ca578a6a951558f55fae2c974024 | [
"MIT"
] | null | null | null | # Generated by Django 4.0.2 on 2022-02-04 19:58
from django.db import migrations, models
class Migration(migrations.Migration):
initial = True
dependencies = [
]
operations = [
migrations.CreateModel(
name='Mental',
fields=[
('id', models.BigAutoFiel... | 36.243243 | 117 | 0.563758 |
7976afbc4ca0429f9212897b883e046377ee5b07 | 78,279 | py | Python | module_utils/antlr3/tree.py | ibre5041/ansible-oracle-modules | ecd2642a6b2c8f1bbb9fe2beff30476e4e39789a | [
"MIT"
] | null | null | null | module_utils/antlr3/tree.py | ibre5041/ansible-oracle-modules | ecd2642a6b2c8f1bbb9fe2beff30476e4e39789a | [
"MIT"
] | null | null | null | module_utils/antlr3/tree.py | ibre5041/ansible-oracle-modules | ecd2642a6b2c8f1bbb9fe2beff30476e4e39789a | [
"MIT"
] | null | null | null | """ @package antlr3.tree
@brief ANTLR3 runtime package, tree module
This module contains all support classes for AST construction and tree parsers.
"""
# begin[licence]
#
# [The "BSD licence"]
# Copyright (c) 2005-2008 Terence Parr
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or... | 28.960044 | 82 | 0.587258 |
7976b0141e73ed9295f68460cce1f8ce59ff155f | 1,731 | py | Python | test/package/modify/remove/test_package_remover.py | core-get/core-get | 8fb960e4e51d0d46b5e3b2f4832eb4a39e0e60f7 | [
"MIT"
] | null | null | null | test/package/modify/remove/test_package_remover.py | core-get/core-get | 8fb960e4e51d0d46b5e3b2f4832eb4a39e0e60f7 | [
"MIT"
] | null | null | null | test/package/modify/remove/test_package_remover.py | core-get/core-get | 8fb960e4e51d0d46b5e3b2f4832eb4a39e0e60f7 | [
"MIT"
] | null | null | null | from pathlib import PurePath
from unittest import TestCase
from unittest.mock import Mock
from core_get.configuration.installed_packages import InstalledPackages, InstalledPackage, InstalledFile
from core_get.package.manifest import Manifest
from core_get.package.modify.remove.package_remover import PackageRemover
fro... | 55.83871 | 118 | 0.724437 |
7976b1126b9c88d6948e4ed37106e2d771a3fe28 | 5,537 | py | Python | tocoli/enc.py | tocoli/tocolib | 1ff7080077021a444bb14e3386e579eb1f018d53 | [
"MIT"
] | null | null | null | tocoli/enc.py | tocoli/tocolib | 1ff7080077021a444bb14e3386e579eb1f018d53 | [
"MIT"
] | null | null | null | tocoli/enc.py | tocoli/tocolib | 1ff7080077021a444bb14e3386e579eb1f018d53 | [
"MIT"
] | null | null | null | #!/usr/bin/env python
# -*- coding: utf-8 -*-
from tocoli import Py, PY2
import tocoli.py2.enc as py2enc
import tocoli.py3.enc as py3enc
def encode(input, encoding='utf-8', errors='strict', input_encoding='utf-8'):
"""Encode any string. Returns a byte string otherwise the input.
Use this funtion to encode st... | 40.123188 | 80 | 0.603937 |
7976b1414c64920b3bb10a508afdcbca1973afda | 23,590 | py | Python | bokeh/embed.py | QuLogic/bokeh | 60824573db0199433c2be31fac4b1ab3d40d7c51 | [
"BSD-3-Clause"
] | 2 | 2019-05-24T14:07:33.000Z | 2019-05-24T14:36:19.000Z | bokeh/embed.py | enterstudio/bokeh | 60824573db0199433c2be31fac4b1ab3d40d7c51 | [
"BSD-3-Clause"
] | null | null | null | bokeh/embed.py | enterstudio/bokeh | 60824573db0199433c2be31fac4b1ab3d40d7c51 | [
"BSD-3-Clause"
] | null | null | null | ''' Provide functions to embed Bokeh models (e.g., plots, widget, layouts)
in various different ways.
There are a number of different combinations of options when embedding
Bokeh plots. The data for the plot can be contained in the document,
or on a Bokeh server, or in a sidecar JavaScript file. Likewise, BokehJS
may ... | 35.104167 | 137 | 0.654091 |
7976b39d6842a03bfcad83454f542d2f567eb783 | 3,244 | py | Python | randvar/distributions.py | birdperson-lives/python-randvar | bbc07f78b2c3173299e2cac2caf73cf59165b69b | [
"MIT"
] | null | null | null | randvar/distributions.py | birdperson-lives/python-randvar | bbc07f78b2c3173299e2cac2caf73cf59165b69b | [
"MIT"
] | null | null | null | randvar/distributions.py | birdperson-lives/python-randvar | bbc07f78b2c3173299e2cac2caf73cf59165b69b | [
"MIT"
] | null | null | null | import math
from randvar import RandomVariable
def _binom(n, k):
return math.exp(math.lgamma(n) - math.lgamma(k) - math.lgamma(n - k))
def _beta(x, y):
return math.exp(math.lgamma(x) + math.lgamma(y) - math.lgamma(x + y))
def const(val):
"""
Returns a random variable that takes the value `val` wi... | 26.590164 | 78 | 0.576141 |
7976b4ea420ac50ee24a4961b7297f95f2b9351e | 4,109 | py | Python | api_yamdb/users/views.py | firepanda70/api_yamdb | b713072030d7edf67e7ae002c1d8adc9916f27d4 | [
"MIT"
] | null | null | null | api_yamdb/users/views.py | firepanda70/api_yamdb | b713072030d7edf67e7ae002c1d8adc9916f27d4 | [
"MIT"
] | null | null | null | api_yamdb/users/views.py | firepanda70/api_yamdb | b713072030d7edf67e7ae002c1d8adc9916f27d4 | [
"MIT"
] | null | null | null | from api.permissions import IsAdmin
from django.contrib.auth import get_user_model
from django.contrib.auth.tokens import default_token_generator
from django.core.mail import send_mail
from django.shortcuts import get_object_or_404
from rest_framework import status
from rest_framework.decorators import action, api_view... | 38.401869 | 79 | 0.678267 |
7976b4f7c5209ee6c8a8839f3e86a77958333d08 | 29,107 | py | Python | sphinx/builders/_epub_base.py | shimizukawa/sphinx | 359fc3c7998e057bdb7884f20f5745efd53da49a | [
"BSD-2-Clause"
] | null | null | null | sphinx/builders/_epub_base.py | shimizukawa/sphinx | 359fc3c7998e057bdb7884f20f5745efd53da49a | [
"BSD-2-Clause"
] | null | null | null | sphinx/builders/_epub_base.py | shimizukawa/sphinx | 359fc3c7998e057bdb7884f20f5745efd53da49a | [
"BSD-2-Clause"
] | null | null | null | """
sphinx.builders._epub_base
~~~~~~~~~~~~~~~~~~~~~~~~~~
Base class of epub2/epub3 builders.
:copyright: Copyright 2007-2020 by the Sphinx team, see AUTHORS.
:license: BSD, see LICENSE for details.
"""
import html
import os
import re
from os import path
from typing import Any, Dict, List, NamedT... | 41.228045 | 106 | 0.567114 |
7976b6bb75de8773c3d0950f4ecfb0dc7cc65358 | 618 | py | Python | tests/celery.py | milleruk/allianceauth-blacklist | cd58520f8362b5dd22f6249a89a829a6b79da61b | [
"MIT"
] | 1 | 2021-05-04T20:55:27.000Z | 2021-05-04T20:55:27.000Z | tests/celery.py | milleruk/allianceauth-blacklist | cd58520f8362b5dd22f6249a89a829a6b79da61b | [
"MIT"
] | 3 | 2021-02-01T13:26:15.000Z | 2021-09-09T19:41:01.000Z | tests/celery.py | milleruk/allianceauth-blacklist | cd58520f8362b5dd22f6249a89a829a6b79da61b | [
"MIT"
] | 4 | 2021-02-08T21:22:55.000Z | 2021-08-12T04:28:55.000Z | import os
from celery import Celery
# set the default Django settings module for the 'celery' program.
os.environ.setdefault("DJANGO_SETTINGS_MODULE", "settings")
from django.conf import settings # noqa
app = Celery("devauth")
# Using a string here means the worker don't have to serialize
# the configur... | 32.526316 | 76 | 0.754045 |
7976b714629dc38527dea34aa6bda270e6c2b7e1 | 28,307 | py | Python | nssrc/com/citrix/netscaler/nitro/resource/config/cache/cacheobject.py | guardicore/nitro-python | 5346a5086134aead80968f15a41ff527adaa0ec1 | [
"Apache-2.0"
] | null | null | null | nssrc/com/citrix/netscaler/nitro/resource/config/cache/cacheobject.py | guardicore/nitro-python | 5346a5086134aead80968f15a41ff527adaa0ec1 | [
"Apache-2.0"
] | null | null | null | nssrc/com/citrix/netscaler/nitro/resource/config/cache/cacheobject.py | guardicore/nitro-python | 5346a5086134aead80968f15a41ff527adaa0ec1 | [
"Apache-2.0"
] | null | null | null | #
# Copyright (c) 2021 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 law or... | 24.550737 | 477 | 0.704137 |
7976b7be4c15b9b9e6fc8ea07ce064fb5c7a3d95 | 8,175 | py | Python | tests/generated_fun_test.py | VolodyaCO/jax | 4d148999404a572ebac6dd1b58f2d93f73245360 | [
"Apache-2.0"
] | 17,375 | 2018-11-18T02:15:55.000Z | 2022-03-31T23:49:46.000Z | tests/generated_fun_test.py | VolodyaCO/jax | 4d148999404a572ebac6dd1b58f2d93f73245360 | [
"Apache-2.0"
] | 5,018 | 2018-11-22T17:04:07.000Z | 2022-03-31T23:36:25.000Z | tests/generated_fun_test.py | abattery/jax | 62c7744e68c66fae9faf9d8d00fea8aad4418cf3 | [
"Apache-2.0"
] | 1,805 | 2018-11-21T10:13:53.000Z | 2022-03-31T23:49:19.000Z | # Copyright 2018 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
#
# https://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, ... | 28.583916 | 80 | 0.688318 |
7976b8ca49a9ddb59a25dab461fabad3df396d74 | 1,142 | py | Python | setup.py | ordicker/gym-control-env | 37f23e43e500d4c0827fb35593570dd929b7dbf7 | [
"MIT"
] | null | null | null | setup.py | ordicker/gym-control-env | 37f23e43e500d4c0827fb35593570dd929b7dbf7 | [
"MIT"
] | null | null | null | setup.py | ordicker/gym-control-env | 37f23e43e500d4c0827fb35593570dd929b7dbf7 | [
"MIT"
] | null | null | null | import io
import os
import re
from setuptools import find_packages
from setuptools import setup
def read(filename):
filename = os.path.join(os.path.dirname(__file__), filename)
text_type = type(u"")
with io.open(filename, mode="r", encoding='utf-8') as fd:
return re.sub(text_type(r':[a-z]+:`~?(.*... | 25.954545 | 87 | 0.613835 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.