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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
c844107f1e9b574f3b1f4787fa3a5c2bb99714ce | 887 | py | Python | layout_cms/__init__.py | markspolakovs/coronavirus-dashboard-api-v1 | 5f9a7a62f5b361f7d2805bcd35ea0ccc5aa0bd4c | [
"MIT"
] | 7 | 2021-02-14T12:42:56.000Z | 2022-03-02T09:14:22.000Z | layout_cms/__init__.py | markspolakovs/coronavirus-dashboard-api-v1 | 5f9a7a62f5b361f7d2805bcd35ea0ccc5aa0bd4c | [
"MIT"
] | 65 | 2020-12-03T20:15:58.000Z | 2022-03-17T09:06:52.000Z | layout_cms/__init__.py | markspolakovs/coronavirus-dashboard-api-v1 | 5f9a7a62f5b361f7d2805bcd35ea0ccc5aa0bd4c | [
"MIT"
] | 2 | 2021-03-03T16:52:51.000Z | 2022-02-28T16:22:33.000Z | #!/usr/bin python3
"""
Layout Handler
==============
Processes layout YAML files (website CMS) and deploys them to the
relevant storage as JSON. The process is triggered via GitHub Actions.
Author: Pouria Hadjibagheri <pouria.hadjibagheri@phe.gov.uk>
Created: 14 Jun 2020
License: MIT
Contributors:... | 24.638889 | 90 | 0.488162 |
09eece07f6d71e668db3061659af0f4610a6983f | 465 | py | Python | __init__.py | HarshCasper/CIFAR | da33624ccd05e5d009f23b550396f777a3bf10be | [
"MIT"
] | null | null | null | __init__.py | HarshCasper/CIFAR | da33624ccd05e5d009f23b550396f777a3bf10be | [
"MIT"
] | null | null | null | __init__.py | HarshCasper/CIFAR | da33624ccd05e5d009f23b550396f777a3bf10be | [
"MIT"
] | null | null | null | from flask import Flask, jsonify, redirect, url_for
from app.views import cifar_browser
import os
def create_app():
app = Flask(__name__, static_folder='static')
app.config['UPLOADED_PATH'] = os.path.join(os.path.dirname(os.path.abspath(__file__)), 'uploaded')
app.config['models'] = os.path.join(os.path.d... | 31 | 102 | 0.731183 |
eb45f00170d528c9bd3b12b543b3e4d605e4eb68 | 2,183 | py | Python | lifemonitor/commands/db.py | ilveroluca/life_monitor | 61752952cff6be8daea1d87b8f395ccb4dbe424c | [
"MIT"
] | null | null | null | lifemonitor/commands/db.py | ilveroluca/life_monitor | 61752952cff6be8daea1d87b8f395ccb4dbe424c | [
"MIT"
] | 1 | 2021-04-16T09:08:26.000Z | 2021-04-16T09:08:26.000Z | lifemonitor/commands/db.py | ilveroluca/life_monitor | 61752952cff6be8daea1d87b8f395ccb4dbe424c | [
"MIT"
] | null | null | null | # Copyright (c) 2020-2021 CRS4
#
# 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, publish, distribut... | 34.109375 | 80 | 0.735227 |
b7eae58bcb6f127b4a69c70664874c0be3f86122 | 87,762 | py | Python | tr/vendor/pyinotify.py | DentonGentry/gfiber-catawampus | b01e4444f3c7f12b1af7837203b37060fd443bb7 | [
"Apache-2.0"
] | 2 | 2017-10-03T16:06:29.000Z | 2020-09-08T13:03:13.000Z | tr/vendor/pyinotify.py | DentonGentry/gfiber-catawampus | b01e4444f3c7f12b1af7837203b37060fd443bb7 | [
"Apache-2.0"
] | null | null | null | tr/vendor/pyinotify.py | DentonGentry/gfiber-catawampus | b01e4444f3c7f12b1af7837203b37060fd443bb7 | [
"Apache-2.0"
] | 1 | 2017-05-07T17:39:02.000Z | 2017-05-07T17:39:02.000Z | #!/usr/bin/env python
# pyinotify.py - python interface to inotify
# Copyright (c) 2005-2011 Sebastien Martini <seb@dbzteam.org>
#
# 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 res... | 37.4731 | 83 | 0.582633 |
bc4c0d17d5a50732f9ab3b4888be555842ab0bdb | 3,537 | py | Python | app/controllers/main.py | akotlerman/flask-website | 1e1e659a2fcab522c4179089d370b5783aff1eb1 | [
"BSD-2-Clause"
] | null | null | null | app/controllers/main.py | akotlerman/flask-website | 1e1e659a2fcab522c4179089d370b5783aff1eb1 | [
"BSD-2-Clause"
] | null | null | null | app/controllers/main.py | akotlerman/flask-website | 1e1e659a2fcab522c4179089d370b5783aff1eb1 | [
"BSD-2-Clause"
] | null | null | null | from flask import Blueprint, render_template, flash, request, redirect, url_for, jsonify, abort
from app.extensions import cache, pages
from app.tasks import long_task
import flam3, io, base64, struct
from PIL import Image
main = Blueprint('main', __name__)
@main.route('/')
@cache.cached(timeout=1000)
def home():
... | 29.722689 | 108 | 0.648007 |
30fd543518caa46ee56f86affedac3fd0420982d | 20,677 | py | Python | commands/football_stats.py | refekt/Husker-Bot | eb9a75afddf64890738f1194c088a097bd0d3777 | [
"Unlicense"
] | 4 | 2019-07-10T00:28:43.000Z | 2019-10-18T14:27:45.000Z | commands/football_stats.py | refekt/Husker-Bot | eb9a75afddf64890738f1194c088a097bd0d3777 | [
"Unlicense"
] | 1 | 2019-07-11T10:21:06.000Z | 2019-07-11T10:21:06.000Z | commands/football_stats.py | refekt/Husker-Bot | eb9a75afddf64890738f1194c088a097bd0d3777 | [
"Unlicense"
] | null | null | null | import calendar
from datetime import datetime
from cfbd import ApiClient, BettingApi, Configuration, GamesApi, StatsApi
from cfbd.rest import ApiException
from dinteractions_Paginator import Paginator
from discord.ext import commands
from discord_slash import cog_ext, SlashContext
from discord_slash.model import Butto... | 35.65 | 123 | 0.513276 |
196b47e67191baed9a097494dc642f8d72b1c746 | 3,762 | py | Python | lib/policy/producers/__init__.py | kpark1/dynamo | cb713fac5438b125b6bd05cbe38316fde5868a18 | [
"MIT"
] | 1 | 2018-08-02T03:06:27.000Z | 2018-08-02T03:06:27.000Z | lib/policy/producers/__init__.py | kpark1/dynamo | cb713fac5438b125b6bd05cbe38316fde5868a18 | [
"MIT"
] | 16 | 2017-11-24T21:09:26.000Z | 2019-05-14T15:13:57.000Z | lib/policy/producers/__init__.py | kpark1/dynamo | cb713fac5438b125b6bd05cbe38316fde5868a18 | [
"MIT"
] | 11 | 2016-08-03T10:37:31.000Z | 2018-08-21T14:32:25.000Z | """
Classes in this package produce dataset attributes (Dataset.attr).
The classes must provide two methods with the following signature:
__init__(self, config)
load(self, inventory)
and a list of strings
produces
which indicates the names of the dataset attributes the load() function provides.
"""
import os
imp... | 36.882353 | 133 | 0.665603 |
5f02ac20defce777b0acccda1a168698b254b8b9 | 25,655 | py | Python | tests/test_updater_top_level_update.py | lyuheng13/python-tuf | 059bfda391893a7e502ed3da5a185ab174e977dc | [
"Apache-2.0",
"MIT"
] | null | null | null | tests/test_updater_top_level_update.py | lyuheng13/python-tuf | 059bfda391893a7e502ed3da5a185ab174e977dc | [
"Apache-2.0",
"MIT"
] | null | null | null | tests/test_updater_top_level_update.py | lyuheng13/python-tuf | 059bfda391893a7e502ed3da5a185ab174e977dc | [
"Apache-2.0",
"MIT"
] | null | null | null | #!/usr/bin/env python
# Copyright 2021, New York University and the TUF contributors
# SPDX-License-Identifier: MIT OR Apache-2.0
"""Test ngclient Updater top-level metadata update workflow"""
import builtins
import os
import sys
import tempfile
import unittest
from datetime import datetime, timedelta
from typing im... | 37.073699 | 80 | 0.661158 |
9a892cf27c42409faa95ffcd8fab3dd5be0034f7 | 7,099 | py | Python | bourbaki/introspection/simple_repr.py | bourbaki-py/introspection | f7e3d4e85188c9725f906b11eb59c3d2487c6f9d | [
"Apache-2.0"
] | null | null | null | bourbaki/introspection/simple_repr.py | bourbaki-py/introspection | f7e3d4e85188c9725f906b11eb59c3d2487c6f9d | [
"Apache-2.0"
] | null | null | null | bourbaki/introspection/simple_repr.py | bourbaki-py/introspection | f7e3d4e85188c9725f906b11eb59c3d2487c6f9d | [
"Apache-2.0"
] | null | null | null | # coding:utf-8
from typing import Tuple, Union
from types import MethodType
from functools import partial, wraps
from warnings import warn
from inspect import signature, Parameter
from .callables import (
bind,
call_repr,
params_of_kind,
has_varargs,
varkwargs_name,
varargs_name,
)
# this is se... | 31.977477 | 119 | 0.659952 |
48ba9ddcf9c5dddfadb06ef4c23b817909f1f25c | 918 | py | Python | web/core/views.py | GuillaumeCaillou/carbure | 92b31e83dbbf53dd0b482ad0a25960713a4a4490 | [
"MIT"
] | null | null | null | web/core/views.py | GuillaumeCaillou/carbure | 92b31e83dbbf53dd0b482ad0a25960713a4a4490 | [
"MIT"
] | null | null | null | web/core/views.py | GuillaumeCaillou/carbure | 92b31e83dbbf53dd0b482ad0a25960713a4a4490 | [
"MIT"
] | null | null | null | from django.contrib.auth.decorators import login_required
from core.decorators import enrich_with_user_details, restrict_to_producers
from django.shortcuts import render
from django.shortcuts import redirect
from django.core.exceptions import PermissionDenied
from core.models import UserRights, UserPreferences, Entity... | 35.307692 | 101 | 0.782135 |
acc0f6b12c791b989d617fc8b7b824dadb0d32d0 | 1,513 | py | Python | OOP/Exams/Exam_22_august_2020/01. Structure_Skeleton (3)/project/everland.py | petel3/Softuni_education | 4fd80f8c6ce6c3d6a838edecdb091dda2ed1084c | [
"MIT"
] | 2 | 2022-03-05T13:17:12.000Z | 2022-03-05T13:17:16.000Z | OOP/Exams/Exam_22_august_2020/01. Structure_Skeleton (3)/project/everland.py | petel3/Softuni_education | 4fd80f8c6ce6c3d6a838edecdb091dda2ed1084c | [
"MIT"
] | null | null | null | OOP/Exams/Exam_22_august_2020/01. Structure_Skeleton (3)/project/everland.py | petel3/Softuni_education | 4fd80f8c6ce6c3d6a838edecdb091dda2ed1084c | [
"MIT"
] | null | null | null | from project.rooms.room import Room
class Everland:
def __init__(self):
self.rooms = []
def add_room(self, room: Room):
self.rooms.append(room)
def get_monthly_consumptions(self):
result = 0
for room in self.rooms:
result += room.expenses + room.room_cost
... | 34.386364 | 140 | 0.573034 |
0af4a260641cc0d1d06b2086f8cd3203dd4e78d7 | 776 | py | Python | flex/parser.py | venmo/flex | 7a3f6ad7d2c5907055149dc81fa3e1bb2f72d2f7 | [
"MIT"
] | 1 | 2018-12-19T14:43:23.000Z | 2018-12-19T14:43:23.000Z | flex/parser.py | venmo/flex | 7a3f6ad7d2c5907055149dc81fa3e1bb2f72d2f7 | [
"MIT"
] | null | null | null | flex/parser.py | venmo/flex | 7a3f6ad7d2c5907055149dc81fa3e1bb2f72d2f7 | [
"MIT"
] | 2 | 2016-10-19T12:06:16.000Z | 2020-11-07T10:30:43.000Z | from __future__ import unicode_literals
import yaml
from flex.serializers.core import SwaggerSerializer
from flex.serializers.definitions import SwaggerDefinitionsSerializer
def generate(path='flex/schema.yaml'):
with open(path) as stream:
schema = yaml.load(stream)
swagger_definitions_serializer =... | 26.758621 | 91 | 0.762887 |
9f81ec093a6bfc8848cd1caaff54ee92b59051e9 | 2,345 | py | Python | Medium/332.py | Hellofafar/Leetcode | 7a459e9742958e63be8886874904e5ab2489411a | [
"CNRI-Python"
] | 6 | 2017-09-25T18:05:50.000Z | 2019-03-27T00:23:15.000Z | Medium/332.py | Hellofafar/Leetcode | 7a459e9742958e63be8886874904e5ab2489411a | [
"CNRI-Python"
] | 1 | 2017-10-29T12:04:41.000Z | 2018-08-16T18:00:37.000Z | Medium/332.py | Hellofafar/Leetcode | 7a459e9742958e63be8886874904e5ab2489411a | [
"CNRI-Python"
] | null | null | null | # ------------------------------
# 332. Reconstruct Itinerary
#
# Description:
# Given a list of airline tickets represented by pairs of departure and arrival airports [from, to], reconstruct the itinerary in order. All of the tickets belong to a man who departs from JFK. Thus, the itinerary must begin with JFK.
# No... | 47.857143 | 471 | 0.636247 |
12db685b4cdc2a2d0eb1a8d66c35ddcf072ceab8 | 23,416 | py | Python | salt/modules/useradd.py | yosnoop/salt | e0ab000ffa3dd197408f08e0b37bf54a87d04090 | [
"Apache-2.0"
] | 1 | 2016-08-21T21:19:12.000Z | 2016-08-21T21:19:12.000Z | salt/modules/useradd.py | yosnoop/salt | e0ab000ffa3dd197408f08e0b37bf54a87d04090 | [
"Apache-2.0"
] | 2 | 2019-03-06T20:43:44.000Z | 2019-04-10T23:56:02.000Z | salt/modules/useradd.py | yosnoop/salt | e0ab000ffa3dd197408f08e0b37bf54a87d04090 | [
"Apache-2.0"
] | null | null | null | # -*- coding: utf-8 -*-
'''
Manage users with the useradd command
.. important::
If you feel that Salt should be using this module to manage users on a
minion, and it is using a different module (or gives an error similar to
*'user.info' is not available*), see :ref:`here
<module-provider-override>`.
'... | 25.178495 | 149 | 0.586266 |
45d33b25fd18683f3ee4bb99dc5467bdfc5adcf9 | 975 | py | Python | B-CNA-410-LYN-4-1-groundhog/src/weirdest.py | Neotoxic-off/Epitech2024 | 8b3dd04fa9ac2b7019c0b5b1651975a7252d929b | [
"Apache-2.0"
] | 2 | 2022-02-07T12:44:51.000Z | 2022-02-08T12:04:08.000Z | B-CNA-410-LYN-4-1-groundhog/src/weirdest.py | Neotoxic-off/Epitech2024 | 8b3dd04fa9ac2b7019c0b5b1651975a7252d929b | [
"Apache-2.0"
] | null | null | null | B-CNA-410-LYN-4-1-groundhog/src/weirdest.py | Neotoxic-off/Epitech2024 | 8b3dd04fa9ac2b7019c0b5b1651975a7252d929b | [
"Apache-2.0"
] | 1 | 2022-01-23T21:26:06.000Z | 2022-01-23T21:26:06.000Z | #!/usr/bin/env python
from math import sqrt
def calcul_position(position):
result = []
for i in range(0, len(position)):
result.append(abs(position[i] - .5))
return (result)
def calcul_sorted(period, inputs, position):
data = []
values = sorted(position)[-5:]
for i in... | 27.083333 | 113 | 0.584615 |
b24e05f2720544466fc063a4aa0fbd2bb02ebed5 | 6,305 | py | Python | homeassistant/components/ipp/sensor.py | CantankerousBullMoose/core | 2178e27fb4c62271d4872e16838331defed82226 | [
"Apache-2.0"
] | 1 | 2021-03-12T20:46:40.000Z | 2021-03-12T20:46:40.000Z | homeassistant/components/ipp/sensor.py | CantankerousBullMoose/core | 2178e27fb4c62271d4872e16838331defed82226 | [
"Apache-2.0"
] | 46 | 2020-12-18T07:15:15.000Z | 2022-03-31T06:04:00.000Z | homeassistant/components/ipp/sensor.py | CantankerousBullMoose/core | 2178e27fb4c62271d4872e16838331defed82226 | [
"Apache-2.0"
] | 2 | 2021-03-22T21:42:48.000Z | 2021-04-12T12:26:39.000Z | """Support for IPP sensors."""
from datetime import timedelta
from typing import Any, Callable, Dict, List, Optional
from homeassistant.config_entries import ConfigEntry
from homeassistant.const import ATTR_LOCATION, DEVICE_CLASS_TIMESTAMP, PERCENTAGE
from homeassistant.helpers.entity import Entity
from homeassistant.... | 30.3125 | 95 | 0.632355 |
9b86289fe4390d000ff3f0fd1198b5102ea72d4b | 3,706 | py | Python | tests/integration/indent.py | wilzbach/storyscript-sls | d71d74a53852ebae54bdaab341678b04f2775411 | [
"Apache-2.0"
] | null | null | null | tests/integration/indent.py | wilzbach/storyscript-sls | d71d74a53852ebae54bdaab341678b04f2775411 | [
"Apache-2.0"
] | null | null | null | tests/integration/indent.py | wilzbach/storyscript-sls | d71d74a53852ebae54bdaab341678b04f2775411 | [
"Apache-2.0"
] | null | null | null | from pytest import fixture, mark
from sls.document import Document, Position
from sls.indent.indent import Indentation
from sls.services.hub import ServiceHub
from tests.e2e.utils.fixtures import hub
indent_unit = " "
@fixture
def ws(magic):
return magic()
@fixture
def indentor():
return Indentation(ser... | 30.377049 | 79 | 0.510793 |
c6daa57a9a9c3c7a73d4be74a334db213186eaa3 | 10,732 | py | Python | ipapi/database/sqlite_wrapper.py | tpmp-inra/ipso_cli | 6de4097dcb1536b546d9e2cdeb61057e5f931537 | [
"MIT"
] | null | null | null | ipapi/database/sqlite_wrapper.py | tpmp-inra/ipso_cli | 6de4097dcb1536b546d9e2cdeb61057e5f931537 | [
"MIT"
] | 1 | 2020-11-10T15:23:41.000Z | 2020-11-10T15:23:41.000Z | ipapi/database/sqlite_wrapper.py | tpmp-inra/ipso_cli | 6de4097dcb1536b546d9e2cdeb61057e5f931537 | [
"MIT"
] | null | null | null | import os
import logging
import datetime as dt
import pandas as pd
import sqlite3
from sqlalchemy import exc
from ipapi.database.base import DbInfo, QueryHandler, DbWrapper
from ipapi.tools.common_functions import force_directories
from ipapi.tools.image_list import ImageList
from ipapi.file_handlers.fh_ba... | 37.788732 | 148 | 0.471208 |
09363a08529cd895b322b2ef858e150f1021bf89 | 214 | py | Python | BOJ/17000~17999/17200~17299/17288.py | shinkeonkim/today-ps | f3e5e38c5215f19579bb0422f303a9c18c626afa | [
"Apache-2.0"
] | 2 | 2020-01-29T06:54:41.000Z | 2021-11-07T13:23:27.000Z | BOJ/17000~17999/17200~17299/17288.py | shinkeonkim/Today_PS | bb0cda0ee1b9c57e1cfa38355e29d0f1c6167a44 | [
"Apache-2.0"
] | null | null | null | BOJ/17000~17999/17200~17299/17288.py | shinkeonkim/Today_PS | bb0cda0ee1b9c57e1cfa38355e29d0f1c6167a44 | [
"Apache-2.0"
] | null | null | null | a=list(map(int,list(input())))
total=0
cnt=1
for i in range(1,len(a)):
if a[i]-a[i-1] ==1:
cnt+=1
else:
if cnt == 3:
total+=1
cnt=1
if cnt == 3:
total+=1
print(total) | 16.461538 | 30 | 0.46729 |
2e254b78d36bd2539c8352704c118a67b7d473a4 | 5,163 | py | Python | connect4/play_multiple_games.py | mnguy3n/cs238_final_project | 1fc39eb0192e7ffe99ce6f8dc9acbbfae7a1031a | [
"MIT"
] | null | null | null | connect4/play_multiple_games.py | mnguy3n/cs238_final_project | 1fc39eb0192e7ffe99ce6f8dc9acbbfae7a1031a | [
"MIT"
] | null | null | null | connect4/play_multiple_games.py | mnguy3n/cs238_final_project | 1fc39eb0192e7ffe99ce6f8dc9acbbfae7a1031a | [
"MIT"
] | null | null | null | from connect4 import Connect4Board
from connect4 import GameState
from connect4 import Player
from human_agent import HumanAgent
from minimax_agent import MinimaxAgent
import sys
def instantiate_agents():
agent_1 = MinimaxAgent("MinimaxAgent1")
agent_2 = MinimaxAgent("MinimaxAgent2")
agent_3 = MinimaxAgent("Min... | 43.025 | 194 | 0.649429 |
cde68e93eda3b18b54518047008b3d118db7221c | 1,492 | py | Python | test/test_002_Extended_DataType.py | OpenInformix/InformixAlchemy | 736ffc850fbb168a60104df647ed825e16e957b9 | [
"Apache-2.0"
] | 2 | 2021-06-30T18:38:03.000Z | 2022-01-07T17:17:46.000Z | test/test_002_Extended_DataType.py | OpenInformix/InformixAlchemy | 736ffc850fbb168a60104df647ed825e16e957b9 | [
"Apache-2.0"
] | null | null | null | test/test_002_Extended_DataType.py | OpenInformix/InformixAlchemy | 736ffc850fbb168a60104df647ed825e16e957b9 | [
"Apache-2.0"
] | 2 | 2020-07-08T17:17:34.000Z | 2022-01-14T21:21:57.000Z |
from sqlalchemy import create_engine
from sqlalchemy.dialects import registry
# import IfxPyDbi as dbapi2
registry.register("informix", "IfxAlchemy.IfxPy", "IfxDialect_IfxPy")
registry.register("informix.IfxPy", "IfxAlchemy.IfxPy", "IfxDialect_IfxPy")
registry.register("informix.pyodbc", "IfxAlchemy.pyodbc",... | 39.263158 | 173 | 0.703083 |
4b74d386589b5fd9058321b2e51c2d0d382f5dea | 6,869 | py | Python | 03_prova_N2_crud_postgress/menu.py | kazenski-dev/prova_N2_LP_II | 215221432057840024f0ddb83410b48834ba0dec | [
"MIT"
] | null | null | null | 03_prova_N2_crud_postgress/menu.py | kazenski-dev/prova_N2_LP_II | 215221432057840024f0ddb83410b48834ba0dec | [
"MIT"
] | null | null | null | 03_prova_N2_crud_postgress/menu.py | kazenski-dev/prova_N2_LP_II | 215221432057840024f0ddb83410b48834ba0dec | [
"MIT"
] | null | null | null | import psycopg2
from connection import Connection
#---------------------------------------------------
#Menu de print
def print_menu():
option = int(input("Choose the option:\n1- INSERT\n2- SELECT\n3- UPDATE\n4- DELETE\n0- EXIT\n>> "))
executa_operacao(option)
#-------------------------------------... | 27.586345 | 108 | 0.438201 |
9d909cba59da1286a13066696eedb21e1bd054d3 | 8,485 | py | Python | plaid/model/asset_report.py | Aky87/plaid-python | af56d445a9e0178b33fb0443f8399dd51c024fe1 | [
"MIT"
] | null | null | null | plaid/model/asset_report.py | Aky87/plaid-python | af56d445a9e0178b33fb0443f8399dd51c024fe1 | [
"MIT"
] | null | null | null | plaid/model/asset_report.py | Aky87/plaid-python | af56d445a9e0178b33fb0443f8399dd51c024fe1 | [
"MIT"
] | null | null | null | """
The Plaid API
The Plaid REST API. Please see https://plaid.com/docs/api for more details. # noqa: E501
Generated by: https://openapi-generator.tech
"""
import re # noqa: F401
import sys # noqa: F401
from plaid.model_utils import ( # noqa: F401
ApiTypeError,
ModelComposed,
ModelNormal... | 42.00495 | 182 | 0.599646 |
ca04f6def464b64983b3f71c109e01a709156012 | 7,445 | py | Python | frappe/utils/response.py | ssuda777/frappe | d3f3df2ce15154aecc1d9d6d07d947e72c2e8c6e | [
"MIT"
] | 1 | 2021-06-11T10:28:07.000Z | 2021-06-11T10:28:07.000Z | frappe/utils/response.py | JMBodz/frappe | eb218a06d1cbfc3a8f1cc00ba8dac2c927d2f71d | [
"MIT"
] | 3 | 2021-02-27T11:50:14.000Z | 2021-05-03T06:48:49.000Z | frappe/utils/response.py | JMBodz/frappe | eb218a06d1cbfc3a8f1cc00ba8dac2c927d2f71d | [
"MIT"
] | 2 | 2021-09-02T09:51:55.000Z | 2021-09-07T04:55:42.000Z | # Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors
# MIT License. See license.txt
import json
import datetime
import decimal
import mimetypes
import os
import frappe
from frappe import _
import frappe.model.document
import frappe.utils
import frappe.sessions
import werkzeug.utils
from werkzeug.local ... | 33.38565 | 180 | 0.743049 |
842e15020d0864e4e2b2554f0b92b1f4edd369c8 | 2,218 | py | Python | CarND-Capstone/ros/src/twist_controller/twist_controller.py | rune2002/Udacity-self-driving-projects | 2f3c46fddb52a8539720ec9f3021e85b249cfa39 | [
"MIT"
] | null | null | null | CarND-Capstone/ros/src/twist_controller/twist_controller.py | rune2002/Udacity-self-driving-projects | 2f3c46fddb52a8539720ec9f3021e85b249cfa39 | [
"MIT"
] | null | null | null | CarND-Capstone/ros/src/twist_controller/twist_controller.py | rune2002/Udacity-self-driving-projects | 2f3c46fddb52a8539720ec9f3021e85b249cfa39 | [
"MIT"
] | null | null | null | from pid import PID
from lowpass import LowPassFilter
from yaw_controller import YawController
import rospy
GAS_DENSITY = 2.858
ONE_MPH = 0.44704
class Controller(object):
def __init__(self, vehicle_mass, fuel_capacity, brake_deadband, decel_limit,
accel_limit, wheel_radius, wheel_base, steer_ratio, ... | 32.144928 | 105 | 0.645176 |
5b637ea10cb603b2c7c1322bef3ba38b3775f225 | 9,755 | py | Python | ixnetwork_restpy/testplatform/sessions/ixnetwork/topology/trillmcastipv6grouplist_18b118137ec4704f682253ecb0f4797b.py | OpenIxia/ixnetwork_restpy | f628db450573a104f327cf3c737ca25586e067ae | [
"MIT"
] | 20 | 2019-05-07T01:59:14.000Z | 2022-02-11T05:24:47.000Z | ixnetwork_restpy/testplatform/sessions/ixnetwork/topology/trillmcastipv6grouplist_18b118137ec4704f682253ecb0f4797b.py | OpenIxia/ixnetwork_restpy | f628db450573a104f327cf3c737ca25586e067ae | [
"MIT"
] | 60 | 2019-04-03T18:59:35.000Z | 2022-02-22T12:05:05.000Z | ixnetwork_restpy/testplatform/sessions/ixnetwork/topology/trillmcastipv6grouplist_18b118137ec4704f682253ecb0f4797b.py | OpenIxia/ixnetwork_restpy | f628db450573a104f327cf3c737ca25586e067ae | [
"MIT"
] | 13 | 2019-05-20T10:48:31.000Z | 2021-10-06T07:45:44.000Z | # MIT LICENSE
#
# Copyright 1997 - 2020 by IXIA Keysight
#
# 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,... | 36.399254 | 255 | 0.644695 |
da85d8ca6f79e1ceeeb65c36b84899f5a032bd30 | 1,922 | py | Python | polymer-globe/polymer/polymer-all/web-animations-js/test/update-testcases.py | GiVD2017-18/webgl-globe | 2d24ba30b41090bb008017b2e89623ccc285f3ea | [
"Apache-2.0"
] | 2,897 | 2015-01-02T01:41:53.000Z | 2022-03-31T05:35:59.000Z | polymer-globe/polymer/polymer-all/web-animations-js/test/update-testcases.py | GiVD2017-18/webgl-globe | 2d24ba30b41090bb008017b2e89623ccc285f3ea | [
"Apache-2.0"
] | 55 | 2015-01-04T18:10:29.000Z | 2021-04-10T23:04:25.000Z | polymer-globe/polymer/polymer-all/web-animations-js/test/update-testcases.py | GiVD2017-18/webgl-globe | 2d24ba30b41090bb008017b2e89623ccc285f3ea | [
"Apache-2.0"
] | 1,145 | 2015-01-03T11:39:03.000Z | 2022-03-31T05:36:02.000Z | #!/usr/bin/python
import cStringIO as StringIO
from fnmatch import fnmatch
import difflib
import os
import sys
def get_name(filename):
return os.path.splitext(filename)[0]
def list_dir(dir_path, filter_func):
return sorted(filter(filter_func, os.listdir(dir_path)), key=get_name)
def main():
test_dir ... | 28.264706 | 78 | 0.670656 |
6f43f9ef1c9b7dcf7bf31616e31c4b485997cc97 | 4,582 | py | Python | packages/w3af/w3af/core/data/parsers/doc/tests/test_http_request_parser.py | ZooAtmosphereGroup/HelloPackages | 0ccffd33bf927b13d28c8f715ed35004c33465d9 | [
"Apache-2.0"
] | 3 | 2019-04-09T22:59:33.000Z | 2019-06-14T09:23:24.000Z | tools/w3af/w3af/core/data/parsers/doc/tests/test_http_request_parser.py | sravani-m/Web-Application-Security-Framework | d9f71538f5cba6fe1d8eabcb26c557565472f6a6 | [
"MIT"
] | null | null | null | tools/w3af/w3af/core/data/parsers/doc/tests/test_http_request_parser.py | sravani-m/Web-Application-Security-Framework | d9f71538f5cba6fe1d8eabcb26c557565472f6a6 | [
"MIT"
] | null | null | null | """
test_http_request_parser.py
Copyright 2012 Andres Riancho
This file is part of w3af, http://w3af.org/ .
w3af is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation version 2 of the License.
w3af is distributed in ... | 39.843478 | 96 | 0.613488 |
d22aa7964ac7eaf6829f3391f281339346a1b2b7 | 1,867 | py | Python | python-52-weeks/m10_messaging_mongodb/host_portscan.py | erictapia/devstacklab | 2997a620c3f4d29c3a526d561ec0cfb4ba0cd6b4 | [
"MIT"
] | null | null | null | python-52-weeks/m10_messaging_mongodb/host_portscan.py | erictapia/devstacklab | 2997a620c3f4d29c3a526d561ec0cfb4ba0cd6b4 | [
"MIT"
] | null | null | null | python-52-weeks/m10_messaging_mongodb/host_portscan.py | erictapia/devstacklab | 2997a620c3f4d29c3a526d561ec0cfb4ba0cd6b4 | [
"MIT"
] | null | null | null | from datetime import datetime
from time import sleep
import nmap
import requests
MONITOR_INTERVAL = 60
BASEURL = "http://127.0.0.1:5000"
def get_hosts():
print("\n\n----> Retrieving hosts ...", end="")
response = requests.get(f"{BASEURL}/hosts")
if response.status_code != 200:
print(f" !!! Fai... | 25.22973 | 110 | 0.587038 |
785ad66df6f655a6d539f05d421df28ba9f4f91b | 14,901 | py | Python | userbot/modules/pmpermit.py | Puutraaa/Ultramens-Userbot | 47b68e88a9f7ba77554f1e9c4e6f695f5f63d376 | [
"CNRI-Python",
"Naumen",
"Condor-1.1",
"MS-PL"
] | null | null | null | userbot/modules/pmpermit.py | Puutraaa/Ultramens-Userbot | 47b68e88a9f7ba77554f1e9c4e6f695f5f63d376 | [
"CNRI-Python",
"Naumen",
"Condor-1.1",
"MS-PL"
] | null | null | null | userbot/modules/pmpermit.py | Puutraaa/Ultramens-Userbot | 47b68e88a9f7ba77554f1e9c4e6f695f5f63d376 | [
"CNRI-Python",
"Naumen",
"Condor-1.1",
"MS-PL"
] | null | null | null | # Copyright (C) 2019 The Raphielscape Company LLC.
#
# Licensed under the Raphielscape Public License, Version 1.c (the "License");
# you may not use this file except in compliance with the License.
#
"""Userbot module for keeping control who PM you."""
from sqlalchemy.exc import IntegrityError
from telethon.tl.functi... | 35.819712 | 118 | 0.590363 |
163e33a2cf3912e60472b497e5d4e7456f43ceb3 | 3,260 | py | Python | All in one ( RandomForest,Dec Tree, naive Bayes, MNB, Support Vector Machine).py | DevisPatel/Python-Programs | 9c975e35b4d2b89bc9e9d206830e7ad60e38c34a | [
"MIT"
] | 1 | 2020-05-16T13:10:23.000Z | 2020-05-16T13:10:23.000Z | All in one ( RandomForest,Dec Tree, naive Bayes, MNB, Support Vector Machine).py | DevisPatel/Python-Programs | 9c975e35b4d2b89bc9e9d206830e7ad60e38c34a | [
"MIT"
] | null | null | null | All in one ( RandomForest,Dec Tree, naive Bayes, MNB, Support Vector Machine).py | DevisPatel/Python-Programs | 9c975e35b4d2b89bc9e9d206830e7ad60e38c34a | [
"MIT"
] | null | null | null | import pandas as pd
import matplotlib.pyplot
import random
import seaborn as sns
from sklearn.model_selection import train_test_split
from sklearn import metrics
from sklearn import tree
from sklearn.ensemble import RandomForestClassifier
from sklearn.naive_bayes import GaussianNB
from sklearn.naive_ba... | 28.849558 | 163 | 0.702147 |
3108e243bcf985beb7cd78d173e475c8d9f6e8ff | 4,109 | py | Python | metadrive/tests/vis_block/vis_block_base.py | liuzuxin/metadrive | 850c207536531bc85179084acd7c30ab14a66111 | [
"Apache-2.0"
] | 125 | 2021-08-30T06:33:57.000Z | 2022-03-31T09:02:44.000Z | metadrive/tests/vis_block/vis_block_base.py | liuzuxin/metadrive | 850c207536531bc85179084acd7c30ab14a66111 | [
"Apache-2.0"
] | 72 | 2021-08-30T16:23:41.000Z | 2022-03-31T19:17:16.000Z | metadrive/tests/vis_block/vis_block_base.py | liuzuxin/metadrive | 850c207536531bc85179084acd7c30ab14a66111 | [
"Apache-2.0"
] | 20 | 2021-09-09T08:20:25.000Z | 2022-03-24T13:24:07.000Z | from typing import Union, Tuple
from direct.showbase import ShowBase
from panda3d.bullet import BulletPlaneShape, BulletRigidBodyNode, BulletDebugNode
from panda3d.core import Vec3, NodePath, LineSegs
from metadrive.component.algorithm.BIG import NextStep
from metadrive.component.map.base_map import BaseMap
from meta... | 33.958678 | 104 | 0.632514 |
2706ab78b8c37c24144c5f364d3ae99a4b5a61d3 | 17,605 | py | Python | stable_baselines/pposgd_simple.py | hzm2016/stable-baselines-option-critic | 02935592d7bceb77b49bd6deef836c67a23e408b | [
"MIT"
] | 2 | 2019-12-02T08:59:50.000Z | 2021-08-20T12:38:25.000Z | stable_baselines/pposgd_simple.py | hzm2016/stable-baselines-option-critic | 02935592d7bceb77b49bd6deef836c67a23e408b | [
"MIT"
] | null | null | null | stable_baselines/pposgd_simple.py | hzm2016/stable-baselines-option-critic | 02935592d7bceb77b49bd6deef836c67a23e408b | [
"MIT"
] | null | null | null | from stable_baselines.common import Dataset, explained_variance, fmt_row, zipsame
from stable_baselines import logger
import stable_baselines.common.tf_util as U
import tensorflow as tf, numpy as np
import time
from stable_baselines.common.mpi_adam import MpiAdam
from stable_baselines.common.mpi_moments import mpi_mome... | 40.37844 | 162 | 0.597217 |
f2d026917009060e2500222c7cfc5cc94f5d6034 | 1,433 | py | Python | capriqorn/postproc/filter/dummy.py | bio-phys/capriqorn | 8f514deaf301643a38a4d101e3ada1ae10a1abc6 | [
"CC-BY-4.0"
] | 8 | 2018-03-29T09:48:20.000Z | 2021-04-14T10:12:49.000Z | capriqorn/postproc/filter/dummy.py | bio-phys/capriqorn | 8f514deaf301643a38a4d101e3ada1ae10a1abc6 | [
"CC-BY-4.0"
] | 5 | 2018-05-28T11:29:17.000Z | 2018-06-15T04:54:10.000Z | capriqorn/postproc/filter/dummy.py | bio-phys/capriqorn | 8f514deaf301643a38a4d101e3ada1ae10a1abc6 | [
"CC-BY-4.0"
] | 1 | 2021-03-10T12:25:31.000Z | 2021-03-10T12:25:31.000Z | # -*- Mode: python; tab-width: 4; indent-tabs-mode:nil; coding: utf-8 -*-
# vim: tabstop=4 expandtab shiftwidth=4 softtabstop=4 fileencoding=utf-8
#
# Capriqorn --- CAlculation of P(R) and I(Q) Of macRomolcules in solutioN
#
# Copyright (c) Juergen Koefinger, Klaus Reuter, and contributors.
# See the file AUTHORS.rst f... | 27.557692 | 92 | 0.600837 |
ed985c73e834c5592dff86f293b971c6c59a67ed | 2,587 | py | Python | module2-sql-for-analysis/insert_titanic.py | henryspg/DS-Unit-3-Sprint-2-SQL-and-Databases | cde748a863baf40d22cdee68965ae4bbb8680ad3 | [
"MIT"
] | 1 | 2020-08-15T17:44:45.000Z | 2020-08-15T17:44:45.000Z | module2-sql-for-analysis/insert_titanic.py | henryspg/DS-Unit-3-Sprint-2-SQL-and-Databases | cde748a863baf40d22cdee68965ae4bbb8680ad3 | [
"MIT"
] | null | null | null | module2-sql-for-analysis/insert_titanic.py | henryspg/DS-Unit-3-Sprint-2-SQL-and-Databases | cde748a863baf40d22cdee68965ae4bbb8680ad3 | [
"MIT"
] | null | null | null | import psycopg2
import psycopg2.extras
import pandas as pd
import numpy as np
# import sql
# Error on the titanic from github
# url = 'https://github.com/henryspg/DS-Unit-3-Sprint-2-SQL-and-Databases/blob/master/module2-sql-for-analysis/titanic2.csv'
# titanic = pd.read_csv(url)
# I use titanic downloade... | 24.17757 | 147 | 0.613838 |
0341618bbb1d80aca9961ac0ee0e9a25d35df49a | 8,256 | py | Python | matrix.py | ezzakri-anas/basic-matrix-library | 79efb2b4dc0751b06f6e242aabbb7e7c0d6cd403 | [
"MIT"
] | 1 | 2021-10-05T08:17:59.000Z | 2021-10-05T08:17:59.000Z | matrix.py | ezzakri-anas/basic-matrix-library | 79efb2b4dc0751b06f6e242aabbb7e7c0d6cd403 | [
"MIT"
] | null | null | null | matrix.py | ezzakri-anas/basic-matrix-library | 79efb2b4dc0751b06f6e242aabbb7e7c0d6cd403 | [
"MIT"
] | null | null | null | class Interrupt(Exception):
pass
class InvalidOperation(Exception):
pass
class InvalidExpression(Exception):
pass
class NonInvertableMatrix(Exception):
pass
class Matrix:
def __init__(self, num_rows, num_cols, content=None):
self.row_num = int(num_rows)
sel... | 32.632411 | 121 | 0.572069 |
647bbbf35be9ca2ce7919599b3508a6355f90042 | 7,777 | py | Python | sdk/network/azure-mgmt-network/azure/mgmt/network/v2019_09_01/operations/_vpn_server_configurations_associated_with_virtual_wan_operations.py | vbarbaresi/azure-sdk-for-python | 397ba46c51d001ff89c66b170f5576cf8f49c05f | [
"MIT"
] | 8 | 2021-01-13T23:44:08.000Z | 2021-03-17T10:13:36.000Z | sdk/network/azure-mgmt-network/azure/mgmt/network/v2019_09_01/operations/_vpn_server_configurations_associated_with_virtual_wan_operations.py | vbarbaresi/azure-sdk-for-python | 397ba46c51d001ff89c66b170f5576cf8f49c05f | [
"MIT"
] | null | null | null | sdk/network/azure-mgmt-network/azure/mgmt/network/v2019_09_01/operations/_vpn_server_configurations_associated_with_virtual_wan_operations.py | vbarbaresi/azure-sdk-for-python | 397ba46c51d001ff89c66b170f5576cf8f49c05f | [
"MIT"
] | null | null | null | # coding=utf-8
# --------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for license information.
# Code generated by Microsoft (R) AutoRest Code Generator.
# Changes may ... | 48.304348 | 203 | 0.684326 |
5e2b984f4425343bd3b965c23c84da8389e90179 | 26,318 | py | Python | cde-root/usr/lib64/python2.4/codecs.py | NirBenTalLab/proorigami-cde-package | 273379075830a9b94d3f2884661a54f853777ff6 | [
"MIT"
] | 33 | 2015-02-16T02:52:08.000Z | 2022-02-18T08:46:32.000Z | cde-root/usr/lib64/python2.4/codecs.py | NirBenTalLab/proorigami-cde-package | 273379075830a9b94d3f2884661a54f853777ff6 | [
"MIT"
] | 1 | 2017-09-09T18:50:23.000Z | 2020-12-29T18:13:56.000Z | cde-root/usr/lib64/python2.4/codecs.py | NirBenTalLab/proorigami-cde-package | 273379075830a9b94d3f2884661a54f853777ff6 | [
"MIT"
] | 31 | 2015-02-07T16:20:24.000Z | 2022-02-23T15:02:43.000Z | """ codecs -- Python Codec Registry, API and helpers.
Written by Marc-Andre Lemburg (mal@lemburg.com).
(c) Copyright CNRI, All Rights Reserved. NO WARRANTY.
"""#"
import __builtin__, sys
### Registry and builtin stateless codec functions
try:
from _codecs import *
except ImportError, why:
raise SystemErr... | 32.056029 | 87 | 0.609469 |
848cea5376aa377c329e14971ffaba3c7e30377a | 1,247 | py | Python | Software/Estadística/MCMC/Paper/HS/CC+SN+BAO/4params/analisis_cadenas_4params_burnin.py | matiasleize/tesis_licenciatura | 5df6e341314583702b466b8ed7977d410f0ee457 | [
"MIT"
] | null | null | null | Software/Estadística/MCMC/Paper/HS/CC+SN+BAO/4params/analisis_cadenas_4params_burnin.py | matiasleize/tesis_licenciatura | 5df6e341314583702b466b8ed7977d410f0ee457 | [
"MIT"
] | null | null | null | Software/Estadística/MCMC/Paper/HS/CC+SN+BAO/4params/analisis_cadenas_4params_burnin.py | matiasleize/tesis_licenciatura | 5df6e341314583702b466b8ed7977d410f0ee457 | [
"MIT"
] | null | null | null | import numpy as np
from matplotlib import pyplot as plt
import emcee
import sys
import os
from pc_path import definir_path
path_git, path_datos_global = definir_path()
os.chdir(path_git)
sys.path.append('./Software/Funcionales/Clases')
from funciones_graficador import Graficador
#%% Importo las cadenas
os.chdir(path... | 29.690476 | 102 | 0.727346 |
3a40945230a848b3bcd3d65be9bb75542b9d3404 | 552 | py | Python | leonardo/module/leonardo_auth/__init__.py | timgates42/django-leonardo | c155f97fee9e2be1e0f508d47a1c205028253ecc | [
"BSD-3-Clause"
] | 102 | 2015-04-30T12:27:14.000Z | 2021-10-31T18:21:16.000Z | leonardo/module/leonardo_auth/__init__.py | timgates42/django-leonardo | c155f97fee9e2be1e0f508d47a1c205028253ecc | [
"BSD-3-Clause"
] | 158 | 2015-04-30T22:42:34.000Z | 2019-09-07T15:37:22.000Z | leonardo/module/leonardo_auth/__init__.py | timgates42/django-leonardo | c155f97fee9e2be1e0f508d47a1c205028253ecc | [
"BSD-3-Clause"
] | 64 | 2015-05-10T12:00:39.000Z | 2021-07-29T19:47:27.000Z |
from django.apps import AppConfig
from django.utils.translation import ugettext_lazy as _
LEONARDO_WIDGETS = [
'leonardo.module.leonardo_auth.models.UserLoginWidget',
'leonardo.module.leonardo_auth.models.UserRegistrationWidget'
]
LEONARDO_APPS = ['leonardo.module.leonardo_auth']
default_app_config = 'leona... | 25.090909 | 65 | 0.788043 |
e5bb3c33c025905364a49e7acbcfe72b9117f95c | 1,404 | py | Python | src/advattack/attacks/white_box/run_fgsm_on_ff_net.py | le1nux/advattack | c3671fc11b74019fb20b7507e09f7b8425f9bb81 | [
"MIT"
] | 2 | 2020-10-26T18:56:48.000Z | 2020-11-02T03:20:05.000Z | src/advattack/attacks/white_box/run_fgsm_on_ff_net.py | le1nux/pandattack | c3671fc11b74019fb20b7507e09f7b8425f9bb81 | [
"MIT"
] | null | null | null | src/advattack/attacks/white_box/run_fgsm_on_ff_net.py | le1nux/pandattack | c3671fc11b74019fb20b7507e09f7b8425f9bb81 | [
"MIT"
] | null | null | null | import torch
from advattack.error_handling.exception import AttackError, AdversarialNotFoundError
from advattack.models.nn.ff_net import FFNet
import torch.nn as nn
from advattack.data_handling.mnist.mnist_dataset import MNISTDataset
from advattack.data_handling.dataset_repository import DatasetRepository
from torchvis... | 36.947368 | 99 | 0.798433 |
105d5a2b3bba2a331e70257e22b4310d8eba504f | 7,051 | py | Python | exercises/tmclass_exercises/tests/test_language_detector.py | kmbrou/text-mining-class | 06160dfed64c5d2485d18c0c9dc719efe74a5521 | [
"MIT"
] | 43 | 2018-10-22T05:14:32.000Z | 2020-11-19T19:05:08.000Z | exercises/tmclass_exercises/tests/test_language_detector.py | kmbrou/text-mining-class | 06160dfed64c5d2485d18c0c9dc719efe74a5521 | [
"MIT"
] | 1 | 2018-11-27T18:01:30.000Z | 2018-11-27T18:01:30.000Z | exercises/tmclass_exercises/tests/test_language_detector.py | kmbrou/text-mining-class | 06160dfed64c5d2485d18c0c9dc719efe74a5521 | [
"MIT"
] | 25 | 2018-11-27T17:09:19.000Z | 2020-11-19T19:05:29.000Z | from collections import Counter
import json
import pytest
from numpy.testing import assert_array_equal
import pandas as pd
from sklearn.model_selection import train_test_split
from tmclass_exercises.language_detector import wikipedia_language
from tmclass_exercises.language_detector import split_paragraphs
from tmclas... | 38.955801 | 78 | 0.727698 |
410edb6ee6f26f3e574f105790d02b23a4408569 | 418 | py | Python | config.py | devzone777/skywire-xns | dea50f53a5936c9bd3a28f28b1da38f3f5c70220 | [
"BSD-3-Clause"
] | null | null | null | config.py | devzone777/skywire-xns | dea50f53a5936c9bd3a28f28b1da38f3f5c70220 | [
"BSD-3-Clause"
] | null | null | null | config.py | devzone777/skywire-xns | dea50f53a5936c9bd3a28f28b1da38f3f5c70220 | [
"BSD-3-Clause"
] | null | null | null | #! /usr/bin/env python
# -*- coding: utf-8 -*-
import socket
default_port = 8003 # default port when adding a new server
listen_port = 8003 # server listens on this port
my_address = [ip for ip in socket.gethostbyname_ex(socket.gethostname())[2]
if not ip.startswith("1.")][0]
dns_module_listen_port = 800... | 34.833333 | 75 | 0.705742 |
62c4d471eb7b60565672cf1a2dd93dcee7ca3230 | 505 | py | Python | chords_imp.py | himank99/Dino-game-live-guitar-control | 7c40a7ceba4dbec56191245afa55db05f145a940 | [
"MIT"
] | null | null | null | chords_imp.py | himank99/Dino-game-live-guitar-control | 7c40a7ceba4dbec56191245afa55db05f145a940 | [
"MIT"
] | null | null | null | chords_imp.py | himank99/Dino-game-live-guitar-control | 7c40a7ceba4dbec56191245afa55db05f145a940 | [
"MIT"
] | null | null | null | import os
chords_dir = 'Desktop/dino/Guitar_Only'
if os.path.isdir(chords_dir):
chords = []
for c in os.listdir(chords_dir):
if not os.path.isfile(c):
chords.append(c)
chords.sort()
#print(chords)
else:
chords = ['a', 'am', 'bm', 'c', 'd', 'dm', 'e', 'em', 'f', 'g']
semi_tones =... | 28.055556 | 78 | 0.542574 |
9988d8cf8141f21d1f0441e36125de854daaf931 | 6,692 | py | Python | backend/tests/test_participants_list.py | Gasimli/codeforpoznan.pl_v3 | 2d51a7c12e9121dbb01f1544364a6ccd3ec51509 | [
"MIT"
] | null | null | null | backend/tests/test_participants_list.py | Gasimli/codeforpoznan.pl_v3 | 2d51a7c12e9121dbb01f1544364a6ccd3ec51509 | [
"MIT"
] | null | null | null | backend/tests/test_participants_list.py | Gasimli/codeforpoznan.pl_v3 | 2d51a7c12e9121dbb01f1544364a6ccd3ec51509 | [
"MIT"
] | null | null | null | from http import HTTPStatus
from backend.models import Participant
from backend.serializers.participant_serializer import ParticipantSchema
def test_get_participants_when_logged_in(auth_client, add_participants):
"""Test get participants list for logged in user."""
rv = auth_client.get("/api/participants/")
... | 34.854167 | 88 | 0.696354 |
4aa9e368d253656b1425a4ca841e799bc8d7dd2a | 68,666 | py | Python | pytests/rebalance/rebalance_high_ops_pillowfight.py | sumedhpb/testrunner | 9ff887231c75571624abc31a3fb5248110e01203 | [
"Apache-2.0"
] | 14 | 2015-02-06T02:47:57.000Z | 2020-03-14T15:06:05.000Z | pytests/rebalance/rebalance_high_ops_pillowfight.py | sumedhpb/testrunner | 9ff887231c75571624abc31a3fb5248110e01203 | [
"Apache-2.0"
] | 3 | 2019-02-27T19:29:11.000Z | 2021-06-02T02:14:27.000Z | pytests/rebalance/rebalance_high_ops_pillowfight.py | sumedhpb/testrunner | 9ff887231c75571624abc31a3fb5248110e01203 | [
"Apache-2.0"
] | 108 | 2015-03-26T08:58:49.000Z | 2022-03-21T05:21:39.000Z | import random
import subprocess
from threading import Thread
from basetestcase import BaseTestCase
from membase.api.rest_client import RestConnection, RestHelper
from membase.helper.cluster_helper import ClusterOperationHelper
from couchbase.bucket import Bucket
from couchbase.cluster import Cluster
try:
from couc... | 50.011653 | 149 | 0.540617 |
6d707dff05ea88a590fbd9db31c29609614d3233 | 2,850 | py | Python | tests/platforms/test_other.py | george0st/mlrun | 6467d3a5ceadf6cd35512b84b3ddc3da611cf39a | [
"Apache-2.0"
] | null | null | null | tests/platforms/test_other.py | george0st/mlrun | 6467d3a5ceadf6cd35512b84b3ddc3da611cf39a | [
"Apache-2.0"
] | null | null | null | tests/platforms/test_other.py | george0st/mlrun | 6467d3a5ceadf6cd35512b84b3ddc3da611cf39a | [
"Apache-2.0"
] | null | null | null | import deepdiff
import mlrun
import mlrun.errors
def test_mount_configmap():
expected_volume = {"configMap": {"name": "my-config-map"}, "name": "my-volume"}
expected_volume_mount = {"mountPath": "/myConfMapPath", "name": "my-volume"}
function = mlrun.new_function(
"function-name", "function-proj... | 27.669903 | 88 | 0.571228 |
b14c7d29b1da5bf923fc5bf7249ecd7118c14c75 | 195 | py | Python | blog/urls.py | alexandrepires5/Personal-Porffolio-Dummy-Django | 1658b75740601eadf80062102f6b028b8954e10e | [
"MIT"
] | null | null | null | blog/urls.py | alexandrepires5/Personal-Porffolio-Dummy-Django | 1658b75740601eadf80062102f6b028b8954e10e | [
"MIT"
] | null | null | null | blog/urls.py | alexandrepires5/Personal-Porffolio-Dummy-Django | 1658b75740601eadf80062102f6b028b8954e10e | [
"MIT"
] | null | null | null | from django.urls import path
from . import views
app_name = 'blog'
urlpatterns = [
path('', views.all_blogs, name="all_blogs"),
path('<int:blog_id>/', views.detail, name="detail"),
]
| 16.25 | 56 | 0.65641 |
c869ceb9ee38d7aeca0279240e519e5ce2adb9e6 | 178 | py | Python | core/services/urls.py | parthz/buku | 3217e1d0392299fe1b63703be102808b1188ca02 | [
"MIT"
] | null | null | null | core/services/urls.py | parthz/buku | 3217e1d0392299fe1b63703be102808b1188ca02 | [
"MIT"
] | null | null | null | core/services/urls.py | parthz/buku | 3217e1d0392299fe1b63703be102808b1188ca02 | [
"MIT"
] | null | null | null | from django.conf.urls import patterns, include, url
from django.contrib import admin
urlpatterns = patterns('',
url(r'^get_feed_url/$', 'core.services.views.getFeedUrl'),
)
| 25.428571 | 62 | 0.741573 |
8046db6d2e39be551f9a13d6de5dc3a23bea8e24 | 6,184 | py | Python | python/ray/tune/tests/test_searchers.py | lssr/ray | e285fed19ac182269cf01b36914677ee6bfce181 | [
"Apache-2.0"
] | 1 | 2021-02-21T05:53:14.000Z | 2021-02-21T05:53:14.000Z | python/ray/tune/tests/test_searchers.py | h453693821/ray | 9eb79727aa6ad94b01f8b660b83e1182555a89f6 | [
"Apache-2.0"
] | 42 | 2021-01-30T08:04:56.000Z | 2022-03-12T08:03:11.000Z | python/ray/tune/tests/test_searchers.py | h453693821/ray | 9eb79727aa6ad94b01f8b660b83e1182555a89f6 | [
"Apache-2.0"
] | null | null | null | import unittest
import numpy as np
import ray
from ray import tune
def _invalid_objective(config):
# DragonFly uses `point`
metric = "point" if "point" in config else "report"
if config[metric] > 4:
tune.report(float("inf"))
elif config[metric] > 3:
tune.report(float("-inf"))
el... | 28.897196 | 79 | 0.601391 |
8406518bcbc7caa772ffb7cfd81bf0689e62f390 | 7,179 | py | Python | docs/source/conf.py | abhisheksgumadi/aabbtree_modified | 4a43534e8bbba59b08c3943d22783c14d9742799 | [
"MIT"
] | null | null | null | docs/source/conf.py | abhisheksgumadi/aabbtree_modified | 4a43534e8bbba59b08c3943d22783c14d9742799 | [
"MIT"
] | null | null | null | docs/source/conf.py | abhisheksgumadi/aabbtree_modified | 4a43534e8bbba59b08c3943d22783c14d9742799 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
#
# Configuration file for the Sphinx documentation builder.
#
# This file does only contain a selection of the most common options. For a
# full list see the documentation:
# http://www.sphinx-doc.org/en/stable/config
# -- Path setup ------------------------------------------------------------... | 30.419492 | 79 | 0.668617 |
35cacac45a1e50377db04b99ea5876063dd3f6cd | 17,096 | py | Python | frappe/email/doctype/email_account/test_email_account.py | monroy95/frappe | a9411e845634174a7f8c8b11aa0f3dbdbaa4ac7c | [
"MIT"
] | 1 | 2021-12-18T18:37:29.000Z | 2021-12-18T18:37:29.000Z | frappe/email/doctype/email_account/test_email_account.py | JMBodz/frappe | eb218a06d1cbfc3a8f1cc00ba8dac2c927d2f71d | [
"MIT"
] | 3 | 2021-02-27T11:50:14.000Z | 2021-05-03T06:48:49.000Z | frappe/email/doctype/email_account/test_email_account.py | JMBodz/frappe | eb218a06d1cbfc3a8f1cc00ba8dac2c927d2f71d | [
"MIT"
] | 2 | 2021-09-02T09:51:55.000Z | 2021-09-07T04:55:42.000Z | # Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors
# See license.txt
import os
import email
import unittest
from datetime import datetime, timedelta
from frappe.email.receive import InboundMail, SentEmailInInboxError, Email
from frappe.email.email_body import get_message_id
import frappe
from frappe... | 39.75814 | 122 | 0.751111 |
daca9b87faf0f31d307c6111a37b4b1d74d02d72 | 5,916 | py | Python | conferences/music-generation-with-magenta/code/model.py | dubreuia/alexandredubreuil.com | 58e6001a59a8f89b7c47a1db136db5d2deecff8f | [
"MIT"
] | 5 | 2018-10-21T14:46:41.000Z | 2021-06-09T07:44:57.000Z | conferences/music-generation-with-magenta/code/model.py | dubreuia/alexandredubreuil.com | 58e6001a59a8f89b7c47a1db136db5d2deecff8f | [
"MIT"
] | 25 | 2018-12-23T14:39:53.000Z | 2019-01-09T18:18:06.000Z | conferences/music-generation-with-magenta/code/model.py | dubreuia/alexandredubreuil.com | 58e6001a59a8f89b7c47a1db136db5d2deecff8f | [
"MIT"
] | 4 | 2019-11-18T15:14:42.000Z | 2021-05-30T15:34:36.000Z | import os
import threading
import time
import magenta.music as mm
import pretty_midi as pm
import tensorflow as tf
from magenta.interfaces.midi.midi_interaction import adjust_sequence_times
from magenta.protobuf import music_pb2
from visual_midi import Plotter, Preset
import sequences
from timing import Timing
from t... | 39.44 | 79 | 0.617478 |
f25d0dc95b87a810bf7fcae6461177620b28208f | 379 | bzl | Python | sample_app/custom_rules.bzl | ali5h/pazel | c861a358f577c81d6d8298b478bfe4449889be59 | [
"MIT"
] | 41 | 2018-04-30T14:09:29.000Z | 2022-03-09T10:19:46.000Z | sample_app/custom_rules.bzl | ali5h/pazel | c861a358f577c81d6d8298b478bfe4449889be59 | [
"MIT"
] | 3 | 2018-08-09T07:47:21.000Z | 2019-07-25T01:06:56.000Z | sample_app/custom_rules.bzl | ali5h/pazel | c861a358f577c81d6d8298b478bfe4449889be59 | [
"MIT"
] | 9 | 2018-09-14T21:32:27.000Z | 2021-07-06T11:17:14.000Z | def custom_rule(filename, src):
native.py_library(
name = filename,
srcs = [src]
)
def py_doctest(filename, src, deps=None, data=None):
if deps == None:
deps = []
if data == None:
data = []
native.py_binary(
name = filename,
srcs = [src],
de... | 18.95 | 52 | 0.48285 |
d3012874e310672482717fe88a5cb81ac08ea18e | 1,672 | py | Python | async_command.py | CodeBishop/beholder | ca25d961c534c0a8ccc1ce2c9cec11b791ed2976 | [
"MIT"
] | null | null | null | async_command.py | CodeBishop/beholder | ca25d961c534c0a8ccc1ce2c9cec11b791ed2976 | [
"MIT"
] | null | null | null | async_command.py | CodeBishop/beholder | ca25d961c534c0a8ccc1ce2c9cec11b791ed2976 | [
"MIT"
] | null | null | null | '''
EXAMPLE USAGE:
slowCommand = AsyncCommand("ping -c 2 python.org")
while not slowCommand.isFinished():
print(".", end = "", flush = True)
sleep(0.1)
print("\nstdout\n" + slowCommand.out + "\n")
print("stderr\n" + slowCommand.err + "\n")
print("returnCode: " + str(slowCommand.retur... | 34.833333 | 101 | 0.611842 |
0b2bd6e8292a81471eac8a2b1156e694f1a60544 | 1,356 | py | Python | virtool/files/api.py | jinxuchen/virtool | 5a6e48fab986d77ad76d5583fa560798babe3f25 | [
"MIT"
] | null | null | null | virtool/files/api.py | jinxuchen/virtool | 5a6e48fab986d77ad76d5583fa560798babe3f25 | [
"MIT"
] | null | null | null | virtool/files/api.py | jinxuchen/virtool | 5a6e48fab986d77ad76d5583fa560798babe3f25 | [
"MIT"
] | null | null | null | """
Provides request handlers for managing and viewing files.
"""
import pymongo
import virtool.files.db
import virtool.http.routes
import virtool.utils
from virtool.api import json_response, not_found, paginate
routes = virtool.http.routes.Routes()
@routes.get("/api/files")
async def find(req):
"""
Find f... | 20.545455 | 115 | 0.627581 |
76f400ed5042b7f9305b10c46eac1f252e398886 | 25,584 | py | Python | demo/runners/support/agent.py | gryan12/anonymous_ecommerce | 9c46589f6005fd0f7433e024e0d705fdd6038e53 | [
"Apache-2.0"
] | null | null | null | demo/runners/support/agent.py | gryan12/anonymous_ecommerce | 9c46589f6005fd0f7433e024e0d705fdd6038e53 | [
"Apache-2.0"
] | null | null | null | demo/runners/support/agent.py | gryan12/anonymous_ecommerce | 9c46589f6005fd0f7433e024e0d705fdd6038e53 | [
"Apache-2.0"
] | null | null | null | import asyncio
import asyncpg
import functools
import json
import logging
import os
import random
import subprocess
import hashlib
import base58
from timeit import default_timer
from aiohttp import (
web,
ClientSession,
ClientRequest,
ClientResponse,
ClientError,
ClientTimeout,
)
from .utils i... | 35.932584 | 88 | 0.559803 |
b59fc5ad25f4e1517d30d3b5e873e2cd25c95c36 | 113,726 | py | Python | sympy/core/function.py | alexmalins/sympy | 6acf7eadb39677fa728ac6437339f4d90c33d961 | [
"BSD-3-Clause"
] | null | null | null | sympy/core/function.py | alexmalins/sympy | 6acf7eadb39677fa728ac6437339f4d90c33d961 | [
"BSD-3-Clause"
] | null | null | null | sympy/core/function.py | alexmalins/sympy | 6acf7eadb39677fa728ac6437339f4d90c33d961 | [
"BSD-3-Clause"
] | null | null | null | """
There are three types of functions implemented in SymPy:
1) defined functions (in the sense that they can be evaluated) like
exp or sin; they have a name and a body:
f = exp
2) undefined function which have a name but no body. Undefined
functions can be defined using a Function cla... | 34.347931 | 165 | 0.56149 |
47e928bb22e28e82665b3df96bc8ee931f52dd47 | 649 | py | Python | cli/plank.py | 0x726561647079/plank | 835ec8ee03bb5a46afca8ed1d7d78c44b332e33c | [
"Apache-2.0"
] | null | null | null | cli/plank.py | 0x726561647079/plank | 835ec8ee03bb5a46afca8ed1d7d78c44b332e33c | [
"Apache-2.0"
] | null | null | null | cli/plank.py | 0x726561647079/plank | 835ec8ee03bb5a46afca8ed1d7d78c44b332e33c | [
"Apache-2.0"
] | null | null | null | from requests import post
import argparse
parser = argparse.ArgumentParser()
def show_help():
return """
Plank v0.1 - model testing (c) readpy 2018
------------------------------------------
"""
def upload_model(filename):
payload = {"filename": open(filename, "rb")}
res = post(... | 23.178571 | 85 | 0.6302 |
217ccb21b308f93ef738e96106721982f8a37edb | 108 | py | Python | tsplibtest.py | fayazazam/acovrp | a950dc3abc470cb3d145040e9f3f20df6c713f1b | [
"MIT"
] | 2 | 2019-07-16T12:09:56.000Z | 2020-12-09T10:48:05.000Z | tsplibtest.py | fayazazam/acovrp | a950dc3abc470cb3d145040e9f3f20df6c713f1b | [
"MIT"
] | null | null | null | tsplibtest.py | fayazazam/acovrp | a950dc3abc470cb3d145040e9f3f20df6c713f1b | [
"MIT"
] | 1 | 2021-01-24T03:13:17.000Z | 2021-01-24T03:13:17.000Z | #!python2
from tsplibparser import TSPLIBParser
print TSPLIBParser('instances/A/A-n32-k5.vrp').parse() | 21.6 | 54 | 0.759259 |
9a6545e05a49d35173e3fc2a2e41380ebb54f600 | 623 | py | Python | bitbox/crypto.py | lightswarm124/bitbox-py | 67ee0d216e2630fd44dba83b5233f33c315dd30b | [
"MIT"
] | null | null | null | bitbox/crypto.py | lightswarm124/bitbox-py | 67ee0d216e2630fd44dba83b5233f33c315dd30b | [
"MIT"
] | null | null | null | bitbox/crypto.py | lightswarm124/bitbox-py | 67ee0d216e2630fd44dba83b5233f33c315dd30b | [
"MIT"
] | null | null | null | import hashlib
import secrets
class Crypto:
def sha1(_str):
data = hashlib.sha1(_str.encode()).digest()
return data
def sha256(_str):
data = hashlib.sha256(_str.encode()).digest()
return data
def ripemd160(_str):
data = hashlib.new('ripemd160', _str.encode()).diges... | 22.25 | 63 | 0.597111 |
8380d0cbb6838b53f43562b1c214e8f53236c3e8 | 12,208 | py | Python | ORCA1/orca_plotting_commands.py | julianmak/NEMO-related | c8af7d020b18fa3ae28740d8e603018e2401b5b0 | [
"MIT"
] | 3 | 2019-10-14T09:44:33.000Z | 2022-02-28T05:43:13.000Z | ORCA1/orca_plotting_commands.py | julianmak/NEMO-related | c8af7d020b18fa3ae28740d8e603018e2401b5b0 | [
"MIT"
] | null | null | null | ORCA1/orca_plotting_commands.py | julianmak/NEMO-related | c8af7d020b18fa3ae28740d8e603018e2401b5b0 | [
"MIT"
] | 3 | 2019-03-05T19:57:46.000Z | 2022-02-28T05:43:14.000Z | #!/usr/bin/env python3
#
# JM, 28 Dec 2017
# some default commands for plotting ORCA data
# feel free to adapt as appropriate
#### load modules
import matplotlib
import matplotlib.pyplot as plt
import numpy as np
import netCDF4
from matplotlib_colorbar import *
# needed for adding colorbar in certain transforms
fro... | 33.264305 | 104 | 0.605423 |
bfe4ec9784ac6c32a3b6b767af9a7a94ee40e7b6 | 24,791 | py | Python | run_classifier.py | SebiSebi/xlnet | 7959e12507e28008d5924220dd341e684ceea7fe | [
"Apache-2.0"
] | null | null | null | run_classifier.py | SebiSebi/xlnet | 7959e12507e28008d5924220dd341e684ceea7fe | [
"Apache-2.0"
] | null | null | null | run_classifier.py | SebiSebi/xlnet | 7959e12507e28008d5924220dd341e684ceea7fe | [
"Apache-2.0"
] | null | null | null | from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
from os.path import join
from absl import flags
import os
import sys
import csv
import collections
import numpy as np
import time
import math
import json
import random
from copy import copy
from collections imp... | 33.231903 | 80 | 0.672018 |
e7c39076092c8721d031763ab0089d88801fde15 | 121 | py | Python | mabe/config.py | nebw/mabe | 2f8d4c4ad82202f614147791a9d1b5ab799fd86f | [
"MIT"
] | 4 | 2022-01-29T21:09:48.000Z | 2022-02-27T20:17:20.000Z | mabe/config.py | nebw/mabe | 2f8d4c4ad82202f614147791a9d1b5ab799fd86f | [
"MIT"
] | null | null | null | mabe/config.py | nebw/mabe | 2f8d4c4ad82202f614147791a9d1b5ab799fd86f | [
"MIT"
] | null | null | null | import os
import pathlib
API_KEY = None
ROOT_PATH = pathlib.Path(os.getenv("MABE_ROOT_PATH", "/srv/data/benwild/mabe"))
| 20.166667 | 79 | 0.760331 |
574db71e41f9e9028c8a7916d54a7b0dcfe9023b | 3,055 | py | Python | Hand Pose Detection/Dataset/handPoseVideo.py | VishnuBhaarath/ML-Crate | dd6dee148476188b3290c4ded87b60ffdd55861c | [
"MIT"
] | 41 | 2021-12-01T11:37:49.000Z | 2022-03-11T14:39:23.000Z | Hand Pose Detection/Dataset/handPoseVideo.py | VishnuBhaarath/ML-Crate | dd6dee148476188b3290c4ded87b60ffdd55861c | [
"MIT"
] | 233 | 2021-12-07T04:06:05.000Z | 2022-03-23T03:10:14.000Z | Hand Pose Detection/Dataset/handPoseVideo.py | VishnuBhaarath/ML-Crate | dd6dee148476188b3290c4ded87b60ffdd55861c | [
"MIT"
] | 64 | 2021-12-02T12:24:20.000Z | 2022-03-22T07:20:55.000Z | import cv2
import time
import numpy as np
protoFile = "hand/pose_deploy.prototxt"
weightsFile = "hand/pose_iter_102000.caffemodel"
nPoints = 22
POSE_PAIRS = [ [0,1],[1,2],[2,3],[3,4],[0,5],[5,6],[6,7],[7,8],[0,9],[9,10],[10,11],[11,12],[0,13],[13,14],[14,15],[15,16],[0,17],[17,18],[18,19],[19,20] ]
threshold = 0.2
... | 32.5 | 155 | 0.612111 |
d460c4834f1e3800d864898167477808cbc7a2bc | 5,003 | py | Python | src/tic/concert/views.py | gunduzhuseyn/Tic-SPLE | d6321be0a3824c6b071e558df47f372bcf855e07 | [
"MIT"
] | null | null | null | src/tic/concert/views.py | gunduzhuseyn/Tic-SPLE | d6321be0a3824c6b071e558df47f372bcf855e07 | [
"MIT"
] | null | null | null | src/tic/concert/views.py | gunduzhuseyn/Tic-SPLE | d6321be0a3824c6b071e558df47f372bcf855e07 | [
"MIT"
] | null | null | null | from datetime import datetime, timedelta
from django.contrib.auth.models import Group, User
from django.urls import reverse_lazy
from django.shortcuts import redirect
from django.utils.decorators import method_decorator
from django.contrib.auth.decorators import user_passes_test, login_required
from django.views.g... | 34.034014 | 101 | 0.78373 |
4bb506df1783fe25b3a615328d7a9d98fa9b6ad7 | 243 | py | Python | tests/legacy_pytests/proc_maps_test/testme.py | depaul-dice/provenance-to-use | e16e2824fbbe0b4e09cc50f0d2bcec3400bf4b87 | [
"BSD-3-Clause"
] | null | null | null | tests/legacy_pytests/proc_maps_test/testme.py | depaul-dice/provenance-to-use | e16e2824fbbe0b4e09cc50f0d2bcec3400bf4b87 | [
"BSD-3-Clause"
] | null | null | null | tests/legacy_pytests/proc_maps_test/testme.py | depaul-dice/provenance-to-use | e16e2824fbbe0b4e09cc50f0d2bcec3400bf4b87 | [
"BSD-3-Clause"
] | null | null | null | #!/usr/bin/env python2
import sys
sys.path.insert(0, '..')
from cde_test_common import *
def checker_func():
pass
# do NOT clear cde.options file
generic_test_runner(["python", "proc_maps_test.py"], checker_func, clear_cde_options=False)
| 20.25 | 91 | 0.748971 |
b22e2e8d16c6f0a9a80cf4edef7fddef4a9a35aa | 2,321 | py | Python | setup.py | cfeenstra67/statey | 6d127ed48265e2e072fbb26486458a4b28a333ec | [
"MIT"
] | 4 | 2021-02-16T19:34:38.000Z | 2022-01-31T16:44:14.000Z | setup.py | cfeenstra67/statey | 6d127ed48265e2e072fbb26486458a4b28a333ec | [
"MIT"
] | null | null | null | setup.py | cfeenstra67/statey | 6d127ed48265e2e072fbb26486458a4b28a333ec | [
"MIT"
] | null | null | null | #!/usr/bin/env python
from setuptools import setup, find_packages
with open('requirements.txt') as f:
# Load one dependency per line, ignoring comments
requirements = [
line.strip()
for line in f.read().strip().split('\n')
if not line.strip().startswith('#')
]
with open('requirements-tests.txt') as f:
# ... | 24.691489 | 69 | 0.638518 |
36660272d67014cecf345ce895d0bd91bd251acb | 54,258 | py | Python | apps/api/views.py | TaiBIF/portal20 | 48ed276f12647cba44a1d121c5909e4ee3217f4c | [
"MIT"
] | 7 | 2020-12-31T13:57:58.000Z | 2022-02-07T08:05:15.000Z | apps/api/views.py | TaiBIF/portal20 | 48ed276f12647cba44a1d121c5909e4ee3217f4c | [
"MIT"
] | 75 | 2020-03-16T07:18:28.000Z | 2022-03-31T09:55:15.000Z | apps/api/views.py | TaiBIF/portal20 | 48ed276f12647cba44a1d121c5909e4ee3217f4c | [
"MIT"
] | 9 | 2020-01-06T14:08:51.000Z | 2022-01-03T05:19:54.000Z | import time
import json
import datetime
import re
import random
import csv
import os
import subprocess
import requests
from django.shortcuts import render, get_object_or_404
from django.db.models import Count, Q, Sum
from django.http import HttpResponse, JsonResponse
from django.core.cache import cache
from django.cor... | 35.005161 | 312 | 0.515611 |
74b12a6cf75341dd93e20feeb2a655e88644fead | 776 | py | Python | CryptMeme/apps/sam/python/src/examples/dos.py | NoYouShutup/CryptMeme | 95d766a222e8ef9310337a7f568a83e462df057c | [
"MIT"
] | 4 | 2016-07-17T22:29:28.000Z | 2021-01-16T02:35:00.000Z | CryptMeme/apps/sam/python/src/examples/dos.py | NoYouShutup/CryptMeme | 95d766a222e8ef9310337a7f568a83e462df057c | [
"MIT"
] | null | null | null | CryptMeme/apps/sam/python/src/examples/dos.py | NoYouShutup/CryptMeme | 95d766a222e8ef9310337a7f568a83e462df057c | [
"MIT"
] | null | null | null | #! /usr/bin/env python
# -----------------------------------------------
# dos.py: Noneffective denial of service tool
# -----------------------------------------------
from i2p import socket
import threading, sys
def dos_stream(dest):
"""Perform a DOS attack on a stream server."""
dest = socket.resolve(dest)
... | 22.171429 | 49 | 0.554124 |
06de7b7504e5ad92f46ed380f26a9c1f1ba096c3 | 352 | py | Python | src/products/migrations/0007_remove_product_slug.py | LABETE/digitalmarket | fc5e81781cbd92535dfe7ecbcc5924058d475a5f | [
"MIT"
] | null | null | null | src/products/migrations/0007_remove_product_slug.py | LABETE/digitalmarket | fc5e81781cbd92535dfe7ecbcc5924058d475a5f | [
"MIT"
] | null | null | null | src/products/migrations/0007_remove_product_slug.py | LABETE/digitalmarket | fc5e81781cbd92535dfe7ecbcc5924058d475a5f | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('products', '0006_auto_20151211_1608'),
]
operations = [
migrations.RemoveField(
model_name='product',
... | 18.526316 | 48 | 0.602273 |
fc0f6f5da79d3bc9bb7df57b0d4e28d1f573ffea | 1,426 | py | Python | api/user_event_log/models.py | cad106uk/market-access-api | a357c33bbec93408b193e598a5628634126e9e99 | [
"MIT"
] | null | null | null | api/user_event_log/models.py | cad106uk/market-access-api | a357c33bbec93408b193e598a5628634126e9e99 | [
"MIT"
] | null | null | null | api/user_event_log/models.py | cad106uk/market-access-api | a357c33bbec93408b193e598a5628634126e9e99 | [
"MIT"
] | null | null | null | from django.conf import settings
from django.core.serializers.json import DjangoJSONEncoder
from django.db import models
from api.user_event_log.constants import USER_EVENT_TYPES
class UserEvent(models.Model):
"""
User event.
Used to keep a record of specific events that have occurred while the user was... | 34.780488 | 96 | 0.698457 |
00d728e57a911fa5ac3d3bcf3ccaccbc3562e243 | 83 | py | Python | pymarketapi/__init__.py | ninjaotoko/pymarketapi | be6fb5c56689d5635edeef1c13737c715faef83e | [
"BSD-3-Clause"
] | 1 | 2019-02-07T23:36:46.000Z | 2019-02-07T23:36:46.000Z | pymarketapi/__init__.py | xavierlesa/pymarketapi | be6fb5c56689d5635edeef1c13737c715faef83e | [
"BSD-3-Clause"
] | 1 | 2015-04-28T17:57:43.000Z | 2015-04-29T16:58:09.000Z | pymarketapi/__init__.py | xavierlesa/pymarketapi | be6fb5c56689d5635edeef1c13737c715faef83e | [
"BSD-3-Clause"
] | null | null | null | # -*- coding:utf-8 -*-
version = '0.1'
author = 'Xavier Lesa <xavier@link-b.com>'
| 16.6 | 42 | 0.590361 |
2f2c29bba55b0604d5fdcb1af2cdd82845647b9f | 1,304 | py | Python | google/cloud/aiplatform/v1beta1/schema/predict/params_v1beta1/types/__init__.py | nachocano/python-aiplatform | 1c6b998d9145309d79712f494a2b00b50a9a9bf4 | [
"Apache-2.0"
] | null | null | null | google/cloud/aiplatform/v1beta1/schema/predict/params_v1beta1/types/__init__.py | nachocano/python-aiplatform | 1c6b998d9145309d79712f494a2b00b50a9a9bf4 | [
"Apache-2.0"
] | 1 | 2021-02-12T23:56:38.000Z | 2021-02-12T23:56:38.000Z | google/cloud/aiplatform/v1beta1/schema/predict/params_v1beta1/types/__init__.py | nachocano/python-aiplatform | 1c6b998d9145309d79712f494a2b00b50a9a9bf4 | [
"Apache-2.0"
] | null | null | null | # -*- 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 o... | 39.515152 | 76 | 0.815951 |
046b4be9ff22e4ab0fdbc2b8635272f7b7ae1739 | 19,744 | py | Python | bsp/imxrt/imxrt1064-seekfree-art/board/make-pins.py | FredBill1/OpenART | 1e8ed02dbe5e109aafb65d39e7ee18f8875300c9 | [
"Apache-2.0"
] | 18 | 2021-09-15T08:22:36.000Z | 2022-03-24T08:54:13.000Z | bsp/imxrt/imxrt1064-seekfree-art/board/make-pins.py | FredBill1/OpenART | 1e8ed02dbe5e109aafb65d39e7ee18f8875300c9 | [
"Apache-2.0"
] | 3 | 2022-01-27T06:41:43.000Z | 2022-03-23T09:37:01.000Z | bsp/imxrt/imxrt1064-seekfree-art/board/make-pins.py | FredBill1/OpenART | 1e8ed02dbe5e109aafb65d39e7ee18f8875300c9 | [
"Apache-2.0"
] | 5 | 2022-01-05T10:23:45.000Z | 2022-02-24T02:09:53.000Z | #!/usr/bin/env python
"""Creates the pin file for LPC54xxx."""
from __future__ import print_function
import argparse
import sys
import csv
SUPPORTED_FN = {
#'GPIO' : ['PIN'],
'TMR': ['TIMER0', 'TIMER1', 'TIMER2', 'TIMER3'],
'GPT' : ['CLK', 'CAPTURE1', 'CAPTURE2', 'COMPARE1', 'COMPARE2', 'COMPARE3'],... | 37.182674 | 356 | 0.542595 |
1ce452e511939a6910135f5d251a721136184d59 | 87,043 | py | Python | dbReports/iondb/rundb/migrations/0158_auto__del_field_libmetrics_duplicate_read_percentage__add_field_libmet.py | konradotto/TS | bf088bd8432b1e3f4b8c8c083650a30d9ef2ae2e | [
"Apache-2.0"
] | 125 | 2015-01-22T05:43:23.000Z | 2022-03-22T17:15:59.000Z | dbReports/iondb/rundb/migrations/0158_auto__del_field_libmetrics_duplicate_read_percentage__add_field_libmet.py | konradotto/TS | bf088bd8432b1e3f4b8c8c083650a30d9ef2ae2e | [
"Apache-2.0"
] | 59 | 2015-02-10T09:13:06.000Z | 2021-11-11T02:32:38.000Z | dbReports/iondb/rundb/migrations/0158_auto__del_field_libmetrics_duplicate_read_percentage__add_field_libmet.py | konradotto/TS | bf088bd8432b1e3f4b8c8c083650a30d9ef2ae2e | [
"Apache-2.0"
] | 98 | 2015-01-17T01:25:10.000Z | 2022-03-18T17:29:42.000Z | # Copyright (C) 2013 Ion Torrent Systems, Inc. All Rights Reserved
# -*- coding: utf-8 -*-
import datetime
from south.db import db
from south.v2 import SchemaMigration
from django.db import models
class Migration(SchemaMigration):
def forwards(self, orm):
# Deleting field 'LibMetrics.duplicate_read_perce... | 86.437934 | 199 | 0.567145 |
fc25447dfdcd57b857930dbbadef6e44e9c5014a | 7,193 | py | Python | BaseTools/Source/Python/GenFds/Section.py | JayLeeCompal/EDKII_Git | de4800d50e1f357002bf77235d3bebabd0c00007 | [
"MIT"
] | 1 | 2022-01-20T04:51:29.000Z | 2022-01-20T04:51:29.000Z | BaseTools/Source/Python/GenFds/Section.py | JayLeeCompal/EDKII_Git | de4800d50e1f357002bf77235d3bebabd0c00007 | [
"MIT"
] | 1 | 2022-01-21T06:19:02.000Z | 2022-01-21T06:19:02.000Z | BaseTools/Source/Python/GenFds/Section.py | JayLeeCompal/EDKII_Git | de4800d50e1f357002bf77235d3bebabd0c00007 | [
"MIT"
] | null | null | null | ## @file
# section base class
#
# Copyright (c) 2007-2015, Intel Corporation. All rights reserved.<BR>
#
# This program and the accompanying materials
# are licensed and made available under the terms and conditions of the BSD License
# which accompanies this distribution. The full text of the license may b... | 41.819767 | 222 | 0.540943 |
77488a98f12f94d4dfef9bc96d8c4c1359f8eb1f | 639 | py | Python | openprescribing/common/generate_measure_sql.py | annapowellsmith/openpresc | cfa9fb07d6fc2ee304159c04fcc132cefcf78745 | [
"MIT"
] | 91 | 2015-10-14T09:10:32.000Z | 2022-03-10T22:09:21.000Z | openprescribing/common/generate_measure_sql.py | annapowellsmith/openpresc | cfa9fb07d6fc2ee304159c04fcc132cefcf78745 | [
"MIT"
] | 1,828 | 2015-12-04T14:52:27.000Z | 2022-03-31T08:51:14.000Z | openprescribing/common/generate_measure_sql.py | HDRUK/openprescribing | 510e8c07e841cd42284c109774d1730b6463f376 | [
"MIT"
] | 27 | 2015-12-03T18:26:56.000Z | 2021-01-09T21:58:53.000Z | import csv
reader = csv.DictReader(open("statins.csv", "rU"))
high_cost_codes = []
all_codes = []
for row in reader:
if row["HighCost"] == "1":
high_cost_codes.append(row["BNFcode"])
all_codes.append(row["BNFcode"])
code_list = "', '".join(high_cost_codes)
str = '"SELECT SUM(total_items) AS items, ",\... | 30.428571 | 64 | 0.629108 |
6c92138a435796abf629506314db0233d4028865 | 1,609 | py | Python | shellstreaming/operator/sort.py | laysakura/shellstreaming | a1e34af507b94d51ba588ad4a039ce0115b46475 | [
"Apache-2.0"
] | 1 | 2015-10-04T10:03:27.000Z | 2015-10-04T10:03:27.000Z | shellstreaming/operator/sort.py | laysakura/shellstreaming | a1e34af507b94d51ba588ad4a039ce0115b46475 | [
"Apache-2.0"
] | null | null | null | shellstreaming/operator/sort.py | laysakura/shellstreaming | a1e34af507b94d51ba588ad4a039ce0115b46475 | [
"Apache-2.0"
] | null | null | null | # -*- coding: utf-8 -*-
"""
shellstreaming.operator.sort
~~~~~~~~~~~~~~~~~~~~~~~~~~~~
:synopsis: Provides sort operators
"""
from shellstreaming.core.batch import Batch
from shellstreaming.operator.base import Base
# [todo] - top-k algorithm?
class Sort(Base):
"""Sort operator"""
def __init__(se... | 27.741379 | 75 | 0.555003 |
6333aad46e52d14a9296b3d0f443f5d8145931a4 | 99,063 | py | Python | tests/test_messaging.py | therefromhere/firebase-admin-python | f43e6876684d2c7e9acf5b0b013642b44883c63a | [
"Apache-2.0"
] | 1 | 2020-05-21T07:56:22.000Z | 2020-05-21T07:56:22.000Z | tests/test_messaging.py | therefromhere/firebase-admin-python | f43e6876684d2c7e9acf5b0b013642b44883c63a | [
"Apache-2.0"
] | null | null | null | tests/test_messaging.py | therefromhere/firebase-admin-python | f43e6876684d2c7e9acf5b0b013642b44883c63a | [
"Apache-2.0"
] | 1 | 2020-11-06T10:51:37.000Z | 2020-11-06T10:51:37.000Z | # Copyright 2017 Google Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, ... | 42.28041 | 99 | 0.592996 |
18885b67b6d4b57c3baf8ec075147d2b98392de9 | 1,332 | py | Python | admin/migrations/0004_auto_20180416_1037.py | adelsonllima/djangoplus | a4ce50bf8231a0d9a4a40751f0d076c2e9931f44 | [
"BSD-3-Clause"
] | 21 | 2017-10-08T23:19:47.000Z | 2020-01-16T20:02:08.000Z | admin/migrations/0004_auto_20180416_1037.py | adelsonllima/djangoplus | a4ce50bf8231a0d9a4a40751f0d076c2e9931f44 | [
"BSD-3-Clause"
] | 6 | 2020-06-03T05:30:52.000Z | 2022-01-13T00:44:26.000Z | admin/migrations/0004_auto_20180416_1037.py | adelsonllima/djangoplus | a4ce50bf8231a0d9a4a40751f0d076c2e9931f44 | [
"BSD-3-Clause"
] | 9 | 2017-10-09T22:58:31.000Z | 2021-11-20T15:20:18.000Z | # Generated by Django 2.0.3 on 2018-04-16 10:37
from django.db import migrations, models
import django.db.models.deletion
class Migration(migrations.Migration):
atomic = False
dependencies = [
('admin', '0003_auto_20180416_1034'),
]
operations = [
migrations.RemoveField(
... | 30.976744 | 174 | 0.591592 |
66ba9324cee0e40f12e5b3aaed21b3fd9b3e86b0 | 71,683 | py | Python | pacu/models/awsapi/es.py | RyanJarv/Pacu2 | 27df4bcf296fc8f467d3dc671a47bf9519ce7a24 | [
"MIT"
] | 1 | 2022-03-09T14:51:54.000Z | 2022-03-09T14:51:54.000Z | pacu/models/awsapi/es.py | RyanJarv/Pacu2 | 27df4bcf296fc8f467d3dc671a47bf9519ce7a24 | [
"MIT"
] | null | null | null | pacu/models/awsapi/es.py | RyanJarv/Pacu2 | 27df4bcf296fc8f467d3dc671a47bf9519ce7a24 | [
"MIT"
] | null | null | null | # generated by datamodel-codegen:
# filename: openapi.yaml
# timestamp: 2021-12-31T02:49:20+00:00
from __future__ import annotations
from datetime import datetime
from enum import Enum
from typing import Annotated, Any, List, Optional
from pydantic import BaseModel, Extra, Field, SecretStr
class ResourceNotFo... | 30.857942 | 945 | 0.736772 |
5b4290e24f84a0e91c788ce1017d325bf63f68d9 | 1,926 | py | Python | config/wsgi.py | tjzango/fcsit-portal | dc3c01c138b6de2c2333fa0ace11105ef38801c1 | [
"MIT"
] | null | null | null | config/wsgi.py | tjzango/fcsit-portal | dc3c01c138b6de2c2333fa0ace11105ef38801c1 | [
"MIT"
] | null | null | null | config/wsgi.py | tjzango/fcsit-portal | dc3c01c138b6de2c2333fa0ace11105ef38801c1 | [
"MIT"
] | null | null | null | """
WSGI config for OpenHMS project.
This module contains the WSGI application used by Django's development server
and any production WSGI deployments. It should expose a module-level variable
named ``application``. Django's ``runserver`` and ``runfcgi`` commands discover
this application via the ``WSGI_APPLICATION`` ... | 43.772727 | 79 | 0.795431 |
6d81bda12b8174e1ba822ffedb135795f7fccc81 | 1,568 | py | Python | interlayer_energies_demo/generate_geometry.py | qmc-hamm/interlayer_energies_demo | a0d6a8ab112fcaa136f10ade684339e206908fde | [
"MIT"
] | null | null | null | interlayer_energies_demo/generate_geometry.py | qmc-hamm/interlayer_energies_demo | a0d6a8ab112fcaa136f10ade684339e206908fde | [
"MIT"
] | null | null | null | interlayer_energies_demo/generate_geometry.py | qmc-hamm/interlayer_energies_demo | a0d6a8ab112fcaa136f10ade684339e206908fde | [
"MIT"
] | null | null | null | import ase
import numpy as np
def get_basis(a, d, c, disregistry, zshift='CM'):
'''
`disregistry` is defined such that the distance to disregister from AB to AB again is 1.0,
which corresponds to 3*bond_length = 3/sqrt(3)*lattice_constant = sqrt(3)*lattice_constant
so we convert the given `disregistry`... | 30.745098 | 94 | 0.594388 |
a5ff7fbba02578ca54e77072c8963f011a41062e | 550 | py | Python | Algorithms/LC/Python/0001 Two Sum/Two_Sum.py | tjzhym/LeetCode-solution | 06bd35bae619caaf8153b81849dae9dcc7bc9491 | [
"MIT"
] | null | null | null | Algorithms/LC/Python/0001 Two Sum/Two_Sum.py | tjzhym/LeetCode-solution | 06bd35bae619caaf8153b81849dae9dcc7bc9491 | [
"MIT"
] | null | null | null | Algorithms/LC/Python/0001 Two Sum/Two_Sum.py | tjzhym/LeetCode-solution | 06bd35bae619caaf8153b81849dae9dcc7bc9491 | [
"MIT"
] | null | null | null | # Problem : https://leetcode.com/problems/two-sum/
# Solution: https://github.com/tjzhym/LeetCode-solution
# Author : zhym (tjzhym)
# Date : 2021-5-28
class Solution(object):
def twoSum(self, nums, target):
"""
:type nums: List[int]
:type target: int
:rtype: List[... | 26.190476 | 58 | 0.501818 |
420613b50c3e661505303460173204a7e4694cb4 | 593 | py | Python | src/services/project_manager/lib/lab_keeper/__init__.py | melkyah/gcp_lab_keeper | 98c2ac32269e25710f9f2c1938c17d3a86127189 | [
"Apache-2.0"
] | null | null | null | src/services/project_manager/lib/lab_keeper/__init__.py | melkyah/gcp_lab_keeper | 98c2ac32269e25710f9f2c1938c17d3a86127189 | [
"Apache-2.0"
] | null | null | null | src/services/project_manager/lib/lab_keeper/__init__.py | melkyah/gcp_lab_keeper | 98c2ac32269e25710f9f2c1938c17d3a86127189 | [
"Apache-2.0"
] | null | null | null | # Copyright 2018 GCP Instance Watcher 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 agre... | 42.357143 | 74 | 0.765599 |
c06fbd826dfd39a1bc96ef74593ffeba01b77e2d | 1,844 | py | Python | superset/db_engine_specs/exasol.py | delorenzosoftware/superset | 5403f1ec163a52623f34f459d89f20e4e190371d | [
"Apache-2.0"
] | 18,621 | 2017-06-19T09:57:44.000Z | 2021-01-05T06:28:21.000Z | superset/db_engine_specs/exasol.py | changeiot/superset | 299b5dc64448d04abe6b35ee85fbd2b938c781bc | [
"Apache-2.0"
] | 9,043 | 2017-07-05T16:10:48.000Z | 2021-01-05T17:58:01.000Z | superset/db_engine_specs/exasol.py | changeiot/superset | 299b5dc64448d04abe6b35ee85fbd2b938c781bc | [
"Apache-2.0"
] | 5,527 | 2017-07-06T01:39:43.000Z | 2021-01-05T06:01:11.000Z | # Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The ASF licenses this file
# to you under the Apache License, Version 2.0 (the
# "License"); you may not u... | 37.632653 | 74 | 0.675163 |
514a5f142be8a6a2302ab78e366b6d0ef5594046 | 6,984 | py | Python | backend/settings_console/tests.py | jnyborg/nospammail | 1b9c41c85a9a0b3d1a0a56f50ad69b01b0cb386b | [
"Apache-2.0"
] | null | null | null | backend/settings_console/tests.py | jnyborg/nospammail | 1b9c41c85a9a0b3d1a0a56f50ad69b01b0cb386b | [
"Apache-2.0"
] | null | null | null | backend/settings_console/tests.py | jnyborg/nospammail | 1b9c41c85a9a0b3d1a0a56f50ad69b01b0cb386b | [
"Apache-2.0"
] | null | null | null | from settings_console.models import GeneratedEmail
from login.tests import *
from settings_console.views import get_user_emails, EmailVisiblity
def addEmail(self, description=None):
_email = description if description is not None else validEmailDescription
return self.client.get("/ajax/add_email/", data={'de... | 28.390244 | 149 | 0.661369 |
487149a90c0093cf02e404f41a0ff06e0445d19e | 15,399 | py | Python | qqc_report.py | barneydesmond/qqc | 8fb89892a600931c5b93d9e78420b9676ffb6b28 | [
"MIT"
] | null | null | null | qqc_report.py | barneydesmond/qqc | 8fb89892a600931c5b93d9e78420b9676ffb6b28 | [
"MIT"
] | null | null | null | qqc_report.py | barneydesmond/qqc | 8fb89892a600931c5b93d9e78420b9676ffb6b28 | [
"MIT"
] | null | null | null | import cgi
import os
import os.path
import sys
import sha
import pgdb
import cStringIO
class http_response(object):
def __init__(self, environ, start_response):
self.buffer = cStringIO.StringIO()
self.environ = environ
self.start_response = start_response
self.status = '200 OK'
self.headers = [('Content-Ty... | 35.811628 | 516 | 0.676018 |
7ab3fc810efd56c645d3dab2531a9db63f97128c | 6,171 | py | Python | coco/core/signals/backend_users.py | ipynbsrv/ipynbsrv | 6cd99719c2a9b3814ee37d87a38adcbf30172141 | [
"BSD-3-Clause"
] | null | null | null | coco/core/signals/backend_users.py | ipynbsrv/ipynbsrv | 6cd99719c2a9b3814ee37d87a38adcbf30172141 | [
"BSD-3-Clause"
] | null | null | null | coco/core/signals/backend_users.py | ipynbsrv/ipynbsrv | 6cd99719c2a9b3814ee37d87a38adcbf30172141 | [
"BSD-3-Clause"
] | null | null | null | from coco.contract.backends import UserBackend
from coco.contract.errors import DirectoryNotFoundError, StorageBackendError, \
UserBackendError, UserNotFoundError
from coco.core import settings
from coco.core.helpers import get_internal_ldap_connected, get_storage_backend
from coco.core.models import BackendUser
fr... | 33.721311 | 90 | 0.661319 |
d96ecd3aa728c8c94ee1b4b80013f4c990dc578e | 8,132 | py | Python | Geometry/CMSCommonData/python/cmsExtendedGeometry2026D71XML_cfi.py | m-sedghi/cmssw | 859df8affee372c53be79cdd2d8a5ff001eae841 | [
"Apache-2.0"
] | 1 | 2021-01-25T16:39:35.000Z | 2021-01-25T16:39:35.000Z | Geometry/CMSCommonData/python/cmsExtendedGeometry2026D71XML_cfi.py | m-sedghi/cmssw | 859df8affee372c53be79cdd2d8a5ff001eae841 | [
"Apache-2.0"
] | 28 | 2019-08-15T15:21:11.000Z | 2021-12-29T14:13:18.000Z | Geometry/CMSCommonData/python/cmsExtendedGeometry2026D71XML_cfi.py | m-sedghi/cmssw | 859df8affee372c53be79cdd2d8a5ff001eae841 | [
"Apache-2.0"
] | 1 | 2020-08-18T10:29:49.000Z | 2020-08-18T10:29:49.000Z | import FWCore.ParameterSet.Config as cms
# This config was generated automatically using generate2026Geometry.py
# If you notice a mistake, please update the generating script, not just this config
XMLIdealGeometryESSource = cms.ESSource("XMLIdealGeometryESSource",
geomXMLFiles = cms.vstring(
'Geometry/CM... | 62.076336 | 96 | 0.735489 |
a7ab1cce666533e2d76147404481b12c5aaf2b93 | 9,699 | py | Python | doc/helper_scripts/show_fields.py | kastalpes/yt | b1e197ca84433fbd61eaf44b28ff5cdb37981d4c | [
"BSD-3-Clause-Clear"
] | 2 | 2021-03-02T18:59:49.000Z | 2021-03-02T18:59:50.000Z | doc/helper_scripts/show_fields.py | kastalpes/yt | b1e197ca84433fbd61eaf44b28ff5cdb37981d4c | [
"BSD-3-Clause-Clear"
] | 4 | 2018-04-13T23:03:42.000Z | 2018-05-08T17:50:43.000Z | doc/helper_scripts/show_fields.py | kastalpes/yt | b1e197ca84433fbd61eaf44b28ff5cdb37981d4c | [
"BSD-3-Clause-Clear"
] | 2 | 2020-05-16T15:29:37.000Z | 2020-06-22T10:17:08.000Z | import inspect
from yt.testing import fake_random_ds
import numpy as np
from yt.utilities.cosmology import \
Cosmology
from yt.frontends.stream.fields import \
StreamFieldInfo
from yt.frontends.api import _frontends
from yt.fields.derived_field import NullFunc
import yt.frontends as frontends_module
from yt.un... | 34.516014 | 82 | 0.58274 |
f3d284811df9d1a88bf55ff1bb2199cde6991087 | 241 | py | Python | sandbox/apps/olora_frontend/urls.py | aiegoo/django-blog | f1c1de7435336825c97d6d1d030c53df400af73c | [
"BSD-3-Clause"
] | null | null | null | sandbox/apps/olora_frontend/urls.py | aiegoo/django-blog | f1c1de7435336825c97d6d1d030c53df400af73c | [
"BSD-3-Clause"
] | null | null | null | sandbox/apps/olora_frontend/urls.py | aiegoo/django-blog | f1c1de7435336825c97d6d1d030c53df400af73c | [
"BSD-3-Clause"
] | null | null | null | from django.conf.urls import url
from .views import Home, home_en, home_kn
urlpatterns = [
url('^en/$', home_en, name='homeen'),
url('^kn/$', home_kn, name='homekn'),
url('^$', Home, name='home'),
]
app_name = 'olora_frontend'
| 21.909091 | 41 | 0.630705 |
e9f4943474d145469faaadcd977db17122ecf89b | 4,709 | py | Python | reconstruction/main.py | KathaRies/spiralnet_plus | c6464eabec31626828c3ff91ba077cdfa7952727 | [
"MIT"
] | null | null | null | reconstruction/main.py | KathaRies/spiralnet_plus | c6464eabec31626828c3ff91ba077cdfa7952727 | [
"MIT"
] | null | null | null | reconstruction/main.py | KathaRies/spiralnet_plus | c6464eabec31626828c3ff91ba077cdfa7952727 | [
"MIT"
] | null | null | null | import pickle
import argparse
import os
import os.path as osp
import numpy as np
import torch
import torch.backends.cudnn as cudnn
import torch_geometric.transforms as T
from psbody.mesh import Mesh
from reconstruction import AE, run, eval_error
from datasets import MeshData
from utils import utils, writer, DataLoader... | 35.141791 | 78 | 0.677426 |
f4aa35073a3f49dec40e6a20cd0844685f00ac77 | 11,701 | py | Python | sdk/python/pulumi_azure_native/cache/v20210201preview/private_endpoint_connection.py | sebtelko/pulumi-azure-native | 711ec021b5c73da05611c56c8a35adb0ce3244e4 | [
"Apache-2.0"
] | null | null | null | sdk/python/pulumi_azure_native/cache/v20210201preview/private_endpoint_connection.py | sebtelko/pulumi-azure-native | 711ec021b5c73da05611c56c8a35adb0ce3244e4 | [
"Apache-2.0"
] | null | null | null | sdk/python/pulumi_azure_native/cache/v20210201preview/private_endpoint_connection.py | sebtelko/pulumi-azure-native | 711ec021b5c73da05611c56c8a35adb0ce3244e4 | [
"Apache-2.0"
] | null | null | null | # 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, overload
from ... import _utilities
fro... | 50.873913 | 604 | 0.701735 |
bf43ae9272d923e66e7325fd017635bcc48d5c5b | 2,034 | py | Python | python-sdk/workflows/train/tensorflow/mnist-distributed-horovod/job.py | Ali-ry/azureml-examples | 817ae89d2766dcafd70937a22cb3a80f100a2906 | [
"MIT"
] | null | null | null | python-sdk/workflows/train/tensorflow/mnist-distributed-horovod/job.py | Ali-ry/azureml-examples | 817ae89d2766dcafd70937a22cb3a80f100a2906 | [
"MIT"
] | null | null | null | python-sdk/workflows/train/tensorflow/mnist-distributed-horovod/job.py | Ali-ry/azureml-examples | 817ae89d2766dcafd70937a22cb3a80f100a2906 | [
"MIT"
] | null | null | null | # description: train tensorflow CNN model on mnist data distributed via horovod
# For more information on using Horovod with TensorFlow, refer to Horovod documentation:
#
# * [Horovod with TensorFlow](https://github.com/horovod/horovod/blob/master/docs/tensorflow.rst)
# * [Horovod with Keras](https://github.com/h... | 30.358209 | 109 | 0.754671 |
21b83f8eea6113c7642cb5fd38a8e5e9f681a64e | 3,706 | py | Python | main.py | RamadanIbrahem98/statistics-cc-hypothesis-testing | 87ae6444435994c8dbfeabd8bf5008d77777ba17 | [
"MIT"
] | null | null | null | main.py | RamadanIbrahem98/statistics-cc-hypothesis-testing | 87ae6444435994c8dbfeabd8bf5008d77777ba17 | [
"MIT"
] | null | null | null | main.py | RamadanIbrahem98/statistics-cc-hypothesis-testing | 87ae6444435994c8dbfeabd8bf5008d77777ba17 | [
"MIT"
] | null | null | null | # ----------------------------------------------------------------------Imports------------------------------------------------------------------------------
import pandas as pd
from helpers import (clean_data, get_pearson, get_max, get_min, scatter_plot,
p_values_paired, p_values_ind, compar... | 97.526316 | 158 | 0.211279 |
c6ad5466cb2743565052ffc6e5cef1d3f9c12062 | 1,572 | py | Python | share/rpcauth/rpcauth.py | EBOU-Project/ebou-source | 2e5c9bc3ff693cfeb06d4d3d838846edd204b808 | [
"MIT"
] | null | null | null | share/rpcauth/rpcauth.py | EBOU-Project/ebou-source | 2e5c9bc3ff693cfeb06d4d3d838846edd204b808 | [
"MIT"
] | 1 | 2021-12-23T23:39:16.000Z | 2021-12-28T00:27:44.000Z | share/rpcauth/rpcauth.py | EBOU-Project/ebou-source | 2e5c9bc3ff693cfeb06d4d3d838846edd204b808 | [
"MIT"
] | 1 | 2022-01-22T03:33:47.000Z | 2022-01-22T03:33:47.000Z | #!/usr/bin/env python3
# Copyright (c) 2015-2017 The Bitcoin Core developers
# Distributed under the MIT software license, see the accompanying
# file COPYING or http://www.opensource.org/licenses/mit-license.php.
from argparse import ArgumentParser
from base64 import urlsafe_b64encode
from binascii import hexlify
fro... | 33.446809 | 134 | 0.71374 |
fd59a7aef537b69055173d11badb7a305dd3983e | 1,039 | py | Python | imagelist/models.py | guoqingbao/Patholabelling | b70175ea2255bccd37e5af6649709e3e16fd6596 | [
"Apache-2.0"
] | 1 | 2021-02-25T16:20:50.000Z | 2021-02-25T16:20:50.000Z | imagelist/models.py | guoqingbao/Patholabelling | b70175ea2255bccd37e5af6649709e3e16fd6596 | [
"Apache-2.0"
] | null | null | null | imagelist/models.py | guoqingbao/Patholabelling | b70175ea2255bccd37e5af6649709e3e16fd6596 | [
"Apache-2.0"
] | null | null | null | from django.db import models
# Create your models here.
class imagelist(models.Model):
pid = models.IntegerField(primary_key=True)
thumb_image = models.TextField()
image = models.TextField()
labels = models.TextField()
def __str__(self):
return str(self.pid)
class Meta:
verbose_... | 29.685714 | 52 | 0.6718 |
465674107860f35f0e8a3c2836a7d7022a191c69 | 1,228 | py | Python | WaveBlocksND/SparsityOracleTrue.py | raoulbq/WaveBlocksND | 225b5dd9b1af1998bd40b5f6467ee959292b6a83 | [
"BSD-3-Clause"
] | 3 | 2016-09-01T21:13:54.000Z | 2020-03-23T15:45:32.000Z | WaveBlocksND/SparsityOracleTrue.py | raoulbq/WaveBlocksND | 225b5dd9b1af1998bd40b5f6467ee959292b6a83 | [
"BSD-3-Clause"
] | null | null | null | WaveBlocksND/SparsityOracleTrue.py | raoulbq/WaveBlocksND | 225b5dd9b1af1998bd40b5f6467ee959292b6a83 | [
"BSD-3-Clause"
] | 6 | 2016-03-16T15:22:01.000Z | 2021-03-13T14:06:54.000Z | """The WaveBlocks Project
This file contains the code for a sparsity oracle
always saying the integrals are non-zero.
@author: R. Bourquin
@copyright: Copyright (C) 2013, 2014 R. Bourquin
@license: Modified BSD License
"""
from WaveBlocksND.SparsityOracle import SparsityOracle
__all__ = ["SparsityOracleTrue"]
cla... | 31.487179 | 91 | 0.677524 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.