blob_id stringlengths 40 40 | directory_id stringlengths 40 40 | path stringlengths 2 283 | content_id stringlengths 40 40 | detected_licenses listlengths 0 91 | license_type stringclasses 2
values | repo_name stringlengths 3 135 | snapshot_id stringlengths 40 40 | revision_id stringlengths 40 40 | branch_name stringlengths 4 68 | visit_date timestamp[ns]date 2015-07-25 20:53:29 2023-09-06 10:46:05 | revision_date timestamp[ns]date 1970-01-01 00:00:00 2037-05-03 13:00:00 | committer_date timestamp[ns]date 1970-01-01 00:00:00 2036-02-09 17:40:36 | github_id int64 1.61k 691M ⌀ | star_events_count int64 0 209k | fork_events_count int64 0 110k | gha_license_id stringclasses 24
values | gha_event_created_at timestamp[ns]date 2012-06-03 10:21:33 2023-09-14 21:59:50 ⌀ | gha_created_at timestamp[ns]date 2008-03-27 23:40:48 2023-09-13 22:40:33 ⌀ | gha_language stringclasses 250
values | src_encoding stringclasses 27
values | language stringclasses 1
value | is_vendor bool 2
classes | is_generated bool 2
classes | length_bytes int64 6 10M | extension stringclasses 289
values | filename stringlengths 1 218 | content stringlengths 6 10M |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
040942e2e09b5c2df5c08207b9c033471b117608 | ff833d3caaebfc4585605855b53f31a1be6a613d | /iBeaconUI.py | 9503b8d8e71942fcee525f0c758401f1d2a720a8 | [] | no_license | UMTti/stop-2.0 | 459c806983ce8cef6c303d278e65ec2d67526200 | fe7c255ad0021c94dad9c286805009461574f6fd | refs/heads/master | 2021-01-21T03:25:42.308738 | 2016-05-31T09:06:56 | 2016-05-31T09:06:56 | 58,224,506 | 0 | 1 | null | null | null | null | UTF-8 | Python | false | false | 3,038 | py | iBeaconUI.py |
from flask import Flask, url_for, render_template, request
import os
import blescan
import sys
import requests
import logging
from logging.handlers import RotatingFileHandler
import json
from datetime import datetime
import bluetooth._bluetooth as bluez
app = Flask(__name__)
@app.route('/sivut/')
def default_... |
9ab3dd87f17ac75a3831e9ec1f0746ad81fad70d | b87fa02071ef9f64572b79156eddb733b3602301 | /Duck_typing.py | bdcc94a8d6e3e5c9063dcaeea2f7b9f4aeab02e9 | [] | no_license | DipeshBisen/Python_Demo | 6bf83425a6c7d521f391456ff5c232a2a2a53771 | 0591ed162176df139ac0d1a35e3348112286d99f | refs/heads/master | 2020-09-13T18:27:34.180220 | 2019-12-01T09:14:21 | 2019-12-01T09:14:21 | 222,868,021 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 373 | py | Duck_typing.py |
# Any object containing execute(self) method is considered to be IDE App
# this is Duck typing concept
class PyCharm:
def execute(self):
print("pycharm ide runnig")
class MyIde:
def execute(self):
print("MyIde running")
class Laptop:
def code(self,ide):
ide.execut... |
6d61df9ac072100d01a1ce3cf7b4c056f66a163c | 9a1b9c393bd06d66edd83bb9b007084475046941 | /snake_gym/envs/snake.py | d1768d4a9c462325e1b9b9883e64078fb89ee6e6 | [
"MIT"
] | permissive | Akozlo-cdv/snake-gym | a42586c615ef5b8aac77cc9d0e2d2c0919e81059 | c11aeecb9e0a09149792294c7c37fd26d56dfb41 | refs/heads/master | 2023-03-23T04:23:11.793203 | 2020-03-30T22:14:36 | 2020-03-30T22:14:36 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,238 | py | snake.py | import pygame
import sys
import time
import random
from snake_gym.envs.modules import *
from pygame.locals import *
import numpy as np
class SnakeGame(object):
def __init__(self):
self.screen = pygame.display.set_mode((SCREEN_WIDTH, SCREEN_HEIGHT), 0, 32)
self.surface = pygame.Surface(self.screen.... |
d69bffb85d81ab3969bfe7dfe2759fa809890208 | dd7690f1869d5b453d95725f93eaf25424c16cb3 | /articals/migrations/0002_artical_thumb.py | ac4a651b482b508ad99e5a90d16f281aabaaa4dc | [] | no_license | ZadeAbhishek/DjangoNautic | d1909287133d02e0315ba67cb5de48dc1955c02d | 2099450770954f6d9b9932a7a3fe86f34625815f | refs/heads/main | 2022-12-25T21:33:44.627176 | 2020-10-08T14:41:21 | 2020-10-08T14:41:21 | 302,292,548 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 415 | py | 0002_artical_thumb.py | # Generated by Django 3.1.1 on 2020-10-07 04:04
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('articals', '0001_initial'),
]
operations = [
migrations.AddField(
model_name='artical',
name='thumb',
fi... |
2ff85ac059f160fcc6b39b4298e8216cbad77ab3 | 9b4364704b4b97dbd4e4a7bee94f4b00e4fef144 | /xnoppo_web.py | b14d9c05db99a614fd60c7e0c305ea7923354545 | [] | no_license | siberian-git/Xnoppo | 118ea930eaf8100525d5bdd5aeb017fec71d5eab | a99085376c144b7c7b64a92430326731d0fcb5e1 | refs/heads/main | 2023-06-08T11:26:47.951674 | 2023-05-25T12:03:10 | 2023-05-25T12:03:10 | 327,866,300 | 7 | 5 | null | 2021-04-06T16:58:22 | 2021-01-08T10:07:42 | Python | UTF-8 | Python | false | false | 47,708 | py | xnoppo_web.py | import http.server
import socketserver
from http.server import BaseHTTPRequestHandler, HTTPServer
import time
import json
import io
import urllib
import requests
from lib.Emby_ws import xnoppo_ws
from lib.Emby_http import *
from lib.Xnoppo import *
from lib.Xnoppo_TV import *
import lib.Xnoppo_AVR
import shutil
import ... |
33cc8814d9397bcb0041728407efef80a136f151 | e586dfa9aed52a075c4938b27376c97f281f11dd | /cli.py | 0234a77f2ff69850e66dfdbe34b51da8cc81278a | [] | no_license | jmuyskens/Calvin-Papercut | 706285f9440d7b0a089eba3e792cf28dd61131b3 | 509e2137b2993a5cf9cbdc95fe8ebde365d0623a | refs/heads/master | 2021-01-19T13:56:41.133748 | 2014-02-25T21:02:57 | 2014-02-25T21:02:57 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 3,131 | py | cli.py | #!/usr/bin/env python
import argparse
import keyring
import papercut
import ConfigParser
import getpass
import time
import os
config = ConfigParser.ConfigParser()
config.read([os.path.expanduser('~/.papercut')])
try:
username = config.get('papercut','username')
except ConfigParser.NoSectionError:
username = No... |
5dc8f420e16ee14ecfdc61413f10a783e819ec32 | 81e6391b9db249296ec84f6524093cf41b581f31 | /단계별로 풀어보기/11. 브루트 포스/[7568] 덩치.py | c5f8b12879e10bae498cf452b7f3adbe643947cd | [] | no_license | jaeehooon/baekjoon_python | e991be4b510d642f72f625b898d20451dc920d7c | 295776309a883338bfbf51c33caf6dc6629493ca | refs/heads/master | 2023-04-15T14:22:21.281930 | 2021-04-26T02:15:09 | 2021-04-26T02:15:09 | 294,137,750 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 534 | py | [7568] 덩치.py | import sys
def is_huge(A, B):
return (A[0] > B[0]) and (A[1] > B[1])
if __name__ == '__main__':
bulks = []
num = int(sys.stdin.readline())
for i in range(num):
bulks.append(list(map(int, sys.stdin.readline().split())))
for i in range(len(bulks)):
count = 0
for j in range... |
d6a677ed537f6493bb43bd893f3096dc058e27da | 70c81d551c5662b7f4ea284be2a6ea942cfd01a8 | /google-cloud-sdk/lib/surface/compute/os_config/guest_policies/describe.py | 40d22d30d515a19671e65f959d0257f3ca659308 | [
"LicenseRef-scancode-unknown-license-reference",
"Apache-2.0"
] | permissive | racreitien/Coding-Challenges | a1574faa67b1582e792be63bcf26c22361ab4eda | 031ebe4f29fe5fb69b5805703d935cc6c1e63446 | refs/heads/master | 2023-05-10T14:14:21.935063 | 2022-04-23T19:41:45 | 2022-04-23T19:41:45 | 193,982,615 | 0 | 1 | null | 2023-05-01T20:35:29 | 2019-06-26T21:53:34 | Python | UTF-8 | Python | false | false | 2,481 | py | describe.py | # -*- coding: utf-8 -*- #
# Copyright 2019 Google LLC. 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 requir... |
e6acc7b022001d8419095ad6364a6ae9504ec7aa | 00b405a49ac6108d24986243c4b52fa53fb58acc | /0526_beautiful_arrangement.py | 624b1d7846e56f90dd8aceae3284ac36a4537f49 | [] | no_license | Shin-jay7/LeetCode | 0325983fff95bfbc43a528812582cbf9b7c0c2f2 | 953b0b19764744753f01c661da969bdab6521504 | refs/heads/master | 2023-07-19T07:17:21.513531 | 2023-07-15T06:05:06 | 2023-07-15T06:05:06 | 231,285,199 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 3,548 | py | 0526_beautiful_arrangement.py | from __future__ import annotations
from functools import cache
class Solution:
def countArrangement(self, n: int) -> int:
cache = {}
def helper(perm):
digits = len(perm)
if digits == 1:
return 1
if perm in cache:
return cache[per... |
fd5fca0e9abbb669ddff4d676147acc4344cdd1c | 7c94cc492fadd14c2dfab60da0e2fc0f5d9481a8 | /carrinho/forms.py | e7b8418047bd2118f055f355d2f37e3f7f21b00e | [] | no_license | junglejf/django_ecommerce | f915d4e59c1a2ed31f85bb71dd09140ba3a31ad1 | b32df24136f79cc957aaf3e43aeb6f8a3b8acc3d | refs/heads/master | 2020-08-28T08:10:57.789881 | 2019-12-18T02:30:59 | 2019-12-18T02:30:59 | 217,642,343 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 843 | py | forms.py | from django import forms
class RemoveProdutoDoCarrinhoForm(forms.Form):
class Meta:
fields = ('produto_id')
produto_id = forms.CharField(widget=forms.HiddenInput())
class QuantidadeForm(forms.Form):
class Meta:
fields = ('quantidade', 'produto_id')
# <input type="hidden" name="produt... |
2481857a4d21f8d67c978d717bf29f813330a060 | cf862577b08aaa31588a6e27cbd68b578880550c | /Algorithm/Sangjun/18352.py | e4a1820bdbe845833305cb3581cf41d743da0add | [] | no_license | raki-1203/Boostcamp_2st_Hot6 | 505a820c0060adab515b9fde41b916ef13a1b9b0 | b71e28b4d5f40cf2268c93ac64570473bdb25049 | refs/heads/main | 2023-07-24T12:44:00.737622 | 2021-09-06T15:53:19 | 2021-09-06T15:53:19 | 392,248,466 | 0 | 0 | null | 2021-08-03T08:39:20 | 2021-08-03T08:39:20 | null | UTF-8 | Python | false | false | 921 | py | 18352.py | from sys import stdin
import heapq
input = stdin.readline
def _18352(N, M, K, X):
INF = 300001
city = [[] for _ in range(N + 1)]
distance = [INF] * (N + 1)
for _ in range(M):
srt, end = map(int, input().split())
city[srt].append((end, 1))
q = []
heapq.heappush(q, (0, X))
... |
c35631a73e766a3eb84d7ecfefb0e54c1dad4131 | b1328a50214150a85b4d7a6b149fbe8554a7dcf3 | /ExpenseApp/ExpenseApp/urls.py | 0195258b584cd5f4be457133eea246043236536c | [] | no_license | Athul8raj/Expense_App_Django | 2d051c958fffc22b190da8111bcd0d734a56b533 | e97e4c56116d2a0dd22a57d9f8801947d0fbb448 | refs/heads/feature | 2022-12-13T05:09:30.759448 | 2019-01-30T17:48:41 | 2019-01-30T17:48:41 | 168,366,332 | 0 | 0 | null | 2022-12-08T01:36:37 | 2019-01-30T15:31:19 | HTML | UTF-8 | Python | false | false | 1,203 | py | urls.py | from django.contrib import admin
from django.contrib.auth import views as auth_views
from django.urls import path,include
from users import views as user_views
from django.conf import settings
from django.conf.urls.static import static
from Expense_App import views as app_views
urlpatterns = [
path('admin/', admi... |
5c524383518241b41d598dab58b1cad1e1c4b55a | 6bad1044ee09e8dcd4c36c1cba760882a46fdc9b | /class/problem_solving/ps1.py | 3dfbdc7d6a37c5754be756bef51211c7d0420483 | [] | no_license | harshjohar/unacademy_a | 2d55eeb1264845ad69f9326583d6d66ee6d60ff6 | 5974753087bcba3ac723f137450e00cf7d17e192 | refs/heads/master | 2023-04-05T03:39:26.294377 | 2021-03-25T16:42:12 | 2021-03-25T16:42:12 | 326,606,393 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,282 | py | ps1.py | # print all natural numbers till n <by recursion>
def natural_recursive(n):
if n==1:
print(1)
return
# recursive assumption
natural_recursive(n-1)
print(n)
return
# print all natural numbers till n in decreasing order < by recursion >
def ulta_rec(n):
if n == 1:
print(1)... |
9d062c5b3442ad3c2d4df5245c41c1fec741b389 | f3ff8ac2a881c880f8218d6d177c9b162ba399ba | /bot/bot.py | 8d1ddec4ada5af29b09fd51ca6623c75ae56f349 | [
"MIT"
] | permissive | MarzaElise/TechStruck-Bot | 3e3d651b8032d90ff4e25a2463e98d75ae2663b3 | ea455035a269a689764cdc75674dff920f2bc73d | refs/heads/main | 2023-08-18T05:27:13.918845 | 2021-10-02T15:10:16 | 2021-10-02T15:10:16 | 412,825,769 | 1 | 0 | MIT | 2021-10-02T14:51:30 | 2021-10-02T14:51:30 | null | UTF-8 | Python | false | false | 7,080 | py | bot.py | import asyncio
import contextlib
import math
import re
import traceback
from typing import Iterable
from aiohttp import ClientSession
from discord import (
AllowedMentions,
AsyncWebhookAdapter,
Color,
Embed,
Forbidden,
Intents,
Message,
NotFound,
TextChannel,
Webhook,
utils,... |
9dcab9f563f30a21cf09879d8903aacadc2e7500 | e6cf61ba03e0e457de40b4ec1202307127965f63 | /keyboards/callbacks.py | ac1f8ba1c83ec2be702b674bd47ae478a2303f36 | [] | no_license | turqcacke/BirthDayBot | 5fcd159a2afb7b2cf22d201dfca5d92524d23987 | a0750d43b8b7a5cc238a005a7a0d26ccc020d6b5 | refs/heads/main | 2023-06-18T05:59:50.613980 | 2021-07-16T08:00:52 | 2021-07-16T08:00:52 | 385,720,044 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 419 | py | callbacks.py | from aiogram.utils.callback_data import CallbackData
delete_user_callback = CallbackData('delete_user', 'db_info_id', 'last_start_id')
detail_user_callback = CallbackData('detail_user', 'db_info_id', 'last_start_id')
edit_user_callback = CallbackData('edit_user', 'field_name', 'db_info_id', 'last_start_id')
pagination... |
0eb4650fd724864d54387be6207007993a3a8862 | 3de2a746243ad1cb000994a06a0f9699db9a901f | /aising2020c.py | 789bd6832dbd75210b4c5531b12a06c0f88a828e | [] | no_license | takumi152/atcoder | 71d726ffdf2542d8abac0d9817afaff911db7c6c | ebac94f1227974aa2e6bf372e18605518de46441 | refs/heads/master | 2022-10-30T12:14:41.742596 | 2022-09-29T19:49:32 | 2022-09-29T19:49:32 | 181,502,518 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 540 | py | aising2020c.py | def main():
n = int(input())
ans = [0 for _ in range(n+1)]
x = 1
y = 1
z = 1
while True:
f = x * x + y * y + z * z + x * y + y * z + z * x
if f > n:
if z > 1:
y += 1
z = 1
elif y > 1:
x += 1
... |
7b0b30fa1955ae340b62b59570ea69f5f9dedea9 | f10b97434b6313863140d7149af73362be96d66b | /call_history_addr_alter/address_book_test.py | 00ea40a0c9fde6de237843f042f3182fd0fc2956 | [] | no_license | YangJian1992/python_demo | aba1280a04239bfd9eb29d47477d308216fd1569 | c8ececba89efb7812fd16dddfa9255cbdabb6ca6 | refs/heads/master | 2021-09-15T01:03:44.706760 | 2018-05-23T10:33:10 | 2018-05-23T10:33:10 | 109,202,628 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 6,439 | py | address_book_test.py | #coding:utf-8
import os
import sys
import gc
import re
import smtplib
from pandas import Series, DataFrame
from email.mime.text import MIMEText
from email.header import Header
import pandas as pd
import time
import datetime
import threading
import webbrowser
from collections import Iterator
import copy
from urllib impo... |
68d910eb5384ac2ebed252fa3e4d7ed98b093847 | ddd2ac45bd20be93869132ef4df63edb9a655c69 | /allergies/allergies.py | 60498bd894f9adb9690f50560da83406190a5338 | [] | no_license | michal-stoma/exercism-python | 67f50f37676f1b21eb5786a0535b874bbe834f20 | 4fd5810b366d59a2598a12ac3a46f53111edfa6d | refs/heads/master | 2020-04-14T06:44:20.741928 | 2019-08-02T09:06:19 | 2019-08-02T09:06:19 | 163,694,383 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 534 | py | allergies.py | class Allergies(object):
ALLERGENS = {
1: 'eggs',
2: 'peanuts',
4: 'shellfish',
8: 'strawberries',
16: 'tomatoes',
32: 'chocolate',
64: 'pollen',
128: 'cats',
}
def __init__(self, score):
self._score = score
self.lst = [self.A... |
02a7dda58606d8712f2e18cc204e3fa8f04539a9 | 83b4036a274729fbf86925a9443d0b3cd20cb471 | /process/realTimeProgram.py | a3e23a50da4e6bebb1cdd92fa384e4f27704c3bc | [] | no_license | yeyeyechan/indipyproject | f7e73f3779f90cec0980851ee94ebbed6086347e | 037c23edcaf7c6f09562deb130f8dbe0eee2b3f4 | refs/heads/master | 2022-04-08T15:41:34.452411 | 2020-03-19T08:19:19 | 2020-03-19T08:19:19 | 241,471,427 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 4,643 | py | realTimeProgram.py | import sys
from datetime import timedelta
from PyQt5.QtGui import *
from PyQt5.QtCore import *
from PyQt5.QAxContainer import *
from PyQt5.QtWidgets import *
from PyQt5.QtWidgets import QApplication
from PyQt5.QtWidgets import QMainWindow
from PyQt5.QtWidgets import QPushButton
from PyQt5.QtWidgets import QLineEdit
fr... |
a749e4af6557bbdac9a7d7af4f743b5cc854dbc8 | 380e43bbfd223f0bd733d0a53cf32b7637d663f6 | /洛谷自行练习/p1007_独木桥.py | bab5d9876e637d1d2a4c0247a95c45cbf5ab5ee2 | [] | no_license | Xfan0225/python-BasicPrograming | 4554c4fe985daa469032d3b8adec556fa72c274c | 2023a3a4f87d1f1628c2eb57a341450abcf09d5f | refs/heads/main | 2023-02-07T22:54:22.727215 | 2020-12-30T07:35:33 | 2020-12-30T07:35:33 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 331 | py | p1007_独木桥.py | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
Created on Sat May 4 21:31:10 2019
@author: xie
"""
l = int(input())
n = int(input())
ls = list(map(int, input().split()))
maxium = max(l+1-min(ls), max(ls)+1)
ls1 = []
for i in ls:
ls1.append(abs((l+1)//2-i))
minium = min(ls1)
print((l+1)//2-minium, end=' ')
pri... |
e77687c2fa725089514a3e5634949cd0e2555a21 | 8b6bd4180436f57c27f17d58d8c6592b7fcee00a | /turtle绘图库/盾牌.py | 3f590a8b00bc10a5ff1c07392a8e9c093e5a97b2 | [] | no_license | tanlinxin/turtle | 421eb542353dc7754ede080ddbc3cb0c5f014060 | b8927f2a046c4167f47180beeea4450f02d1f03c | refs/heads/master | 2020-05-30T15:58:07.765090 | 2019-06-02T10:44:36 | 2019-06-02T10:44:36 | 189,835,001 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,585 | py | 盾牌.py | # import turtle
#顺时针旋转角度right
#goto 设置开始位置
#画笔提起放下 penup pendown
# t = turtle.Turtle()
# t.penup()
# t.goto(50,50) #x,y轴移动的距离
# t.pendown()
# t.forward(50)
# t.right(90)
# t.forward(100)
# t.right(90)
#画布,宽,高,背景颜色
# turtle.screensize(500,500,'yellow')
#画笔,宽,颜色,移动速度
#粗细
# turtle.pensize(1)
#颜色
# turtle.pencolor('black... |
b78db9b6144043f6352588278cbcd63e9fbb335f | 2bb90b620f86d0d49f19f01593e1a4cc3c2e7ba8 | /pardus/tags/2008/system/base/python/comar/pakhandler.py | f4800ca53199fb206f9feb1e697a10493e907524 | [] | no_license | aligulle1/kuller | bda0d59ce8400aa3c7ba9c7e19589f27313492f7 | 7f98de19be27d7a517fe19a37c814748f7e18ba6 | refs/heads/master | 2021-01-20T02:22:09.451356 | 2013-07-23T17:57:58 | 2013-07-23T17:57:58 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,007 | py | pakhandler.py | # -*- coding: utf-8 -*-
import piksemel
import os
from subprocess import *
pythonPath="/usr/lib/python2.5"
def byteCompile(filepath):
doc = piksemel.parse(filepath)
for item in doc.tags("File"):
path = item.getTagData("Path")
if path.endswith(".py"):
call(["/usr/bin/python", "%s/p... |
69557a4ba6665a426c9c090cc23cbad4006469b8 | f28c2f71908a34332b9f4e93b912dd06a8640bb9 | /functions.py | 83f6da315699c4ff032b7789768ef47cbd3909c0 | [] | no_license | Cyrusb01/Streamlit-bt | 1365f7c64e9abbeb15f402ec91610776e1af505f | 4dd257352f9c4024f42e98ce48287f0fa85417e9 | refs/heads/master | 2023-04-16T18:28:38.876019 | 2021-03-25T20:23:13 | 2021-03-25T20:23:13 | 344,951,405 | 2 | 1 | null | null | null | null | UTF-8 | Python | false | false | 20,747 | py | functions.py | from pandas._config.config import reset_option
import streamlit as st
import pandas as pd
import plotly.express as px
import matplotlib.pyplot as plt
import bt
from tabulate import tabulate
import plotly.graph_objects as go
strategy_color = '#A90BFE'
P6040_color = '#FF7052'
spy_color = '#66F3EC'
agg_color = '#67F9AF'... |
87515c2096626371bba08479bff2c3cd2ae1e0c4 | 6ceacb264a0c5544ae57aba8d465b53180367827 | /autotuner/kfold_ann.py | 753cc57b8a17054a19613b50050fd7fb1eb5c4cf | [] | no_license | acelster/ML-autotuning | 7b2f90becea84e4a8addbb30bc573af168f0647a | 14b7debfe7dc7d2e0096228190a2de027947fd91 | refs/heads/master | 2021-05-01T00:08:57.760296 | 2017-01-09T08:46:55 | 2017-01-09T08:46:55 | 41,720,102 | 6 | 5 | null | null | null | null | UTF-8 | Python | false | false | 5,301 | py | kfold_ann.py | # Copyright (c) 2015, Thomas L. Falch
# For conditions of distribution and use, see the accompanying LICENSE and README files
# This file is part of the AUMA machine learning based auto tuning application
# developed at the Norwegian University of Science and technology
loadError = 0
try:
from fann2 import libfa... |
92ab7a8fbdfb1d5a703f499175b8f7d260064a50 | 1301d6d9752d1e7ff087070f7d570decf9462e7d | /src/python/petprofile_data_extraction.py | 30d3e571b4777ad7e0ef0ab954fae159829c32a8 | [] | no_license | awinecoff-chwy/pet-profile | adabdad22603e687e0acbc4dd2cfee7b65bcfd0e | ab44faa43b0d81a854246db6217a8e1221cd8cb2 | refs/heads/master | 2020-12-29T21:03:15.271003 | 2020-02-10T15:43:15 | 2020-02-10T15:43:15 | 238,727,820 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 5,066 | py | petprofile_data_extraction.py |
# %%Vertica Connetion Test
import os
import database_conn
import pandas as pd
import vertica_python
import geopandas as gpd
from shapely.geometry import Point, Polygon
import matplotlib.pyplot as plt
from mpl_toolkits.basemap import Basemap as Basemap
from matplotlib.colors import rgb2hex
from matplotlib.patches impor... |
20cb8af1db1fdad031cb2647e04e6a42999aa34c | 4700c322be8b029bbfa14dd023714835f4bfb8b6 | /server/legacy.py | 874270b8a8ce8da3348d69876dcd5c58e03263b5 | [
"Apache-2.0"
] | permissive | HTTPArchive/httparchive.org | b6664b47d8ed3024d1669b395e82ce199e079b41 | fd6e668a8af3478f0a41c254c717982ee1ab72f9 | refs/heads/main | 2023-08-24T13:55:08.873670 | 2023-08-23T20:46:49 | 2023-08-23T20:46:49 | 88,894,044 | 313 | 52 | Apache-2.0 | 2023-09-08T16:05:22 | 2017-04-20T17:45:53 | JavaScript | UTF-8 | Python | false | false | 799 | py | legacy.py | class Page:
def __init__(self, name, **kwargs):
self.name = name
self.kwargs = kwargs
def set_kwargs(self, **kwargs): # pragma: no cover
self.kwargs = kwargs
class Legacy:
def __init__(self, faq):
self.LEGACY_PATH_MAP = {
"/index.php": Page("index"),
... |
dc4fc0d0c4f9ec615427fc6e0135684993a54630 | bf06fa892006cb5bcb7631cd3631dcd0014a98df | /setupscripts/populate_users.py | 101c7b5118c0e0862595e2e969a5e4c61ce73753 | [] | no_license | PrentisApp/Prentis | 2151a8342f2e128c7921c3d6a1fff306816abf28 | ddbca5853ac58ded52213e4f9234ddce57759c2d | refs/heads/master | 2020-03-27T20:00:28.748114 | 2018-12-24T23:44:25 | 2018-12-24T23:44:25 | 147,030,381 | 0 | 0 | null | 2018-12-24T23:44:26 | 2018-09-01T20:26:10 | Python | UTF-8 | Python | false | false | 841 | py | populate_users.py | import firebase_admin
from firebase_admin import credentials
from firebase_admin import auth
from google.cloud import firestore
from users import users
cred = credentials.Certificate("prentisapp-50e4e-firebase-adminsdk-vvo4f-67dfbe422e.json")
firebase_admin.initialize_app(cred)
db = firestore.Client()
users_ref = db.... |
52eec9f7db710b156c0917a55cea180166cbfb6c | 24932b5e4e5c2125c2301abffa952946430e2fc4 | /Drawing/drawing.py | 46d6466a0f49ab441e4ca67266ddd720acab9dcf | [] | no_license | doulemint/LearningOpencv-1 | 05c045e61355f28a126a1b8fa6dbf2d527009d6e | 5951aea4d7c0b92fd2128d2e264be0a69367cb88 | refs/heads/master | 2020-03-14T22:36:42.504712 | 2017-05-30T14:41:47 | 2017-05-30T14:41:47 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 629 | py | drawing.py | import cv2
import numpy as np
img=cv2.imread("../hello_opencv/frank.jpg",cv2.IMREAD_COLOR)
cv2.line(img,(0,0),(150,150),(255,255,255),15)
cv2.rectangle(img,(15,25),(200,150),(0,0,255),5)
cv2.circle(img,(100,63), 55, (0,255,0), -1)
pts = np.array([[10,5],[20,30],[70,20],[50,10]], np.int32)
#pts=pts.reshape((-1,1,2))
c... |
da4cebc9f9f2ba559861bb964e55c2b496e2a4e1 | d1d627fe756885fa723e994260a529faded20ce2 | /DP/LongestPalindromicSubstring.py | e7dda039a48d54ce01e40803eb26b2a3d8e168bc | [] | no_license | wangjcStrive/PYLeetCode | 01bf596595d487c0cff8ca59f35869afe059d241 | b94cd3769f36331b90fe0022f402fc618e17e2f3 | refs/heads/master | 2021-07-04T09:00:07.784541 | 2020-09-02T07:18:57 | 2020-09-02T07:18:57 | 129,353,504 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,166 | py | LongestPalindromicSubstring.py | # -*- coding: utf-8 -*-
# @Time : 8/3/2018 9:40 AM
# @FileName: LongestPalindromicSubstring.py
# Info: 5. Longest Palindromic Substring
# DP: p[i][j]表示以i开始到j结束的范围内是否是回文,则:
# p[i][j] = (s[i]==s[j]) && p[i+1][j-1]==true?
class Solution:
# DP. O(n^2)
# 两层循环 + 状态存储
def longestPalindrome(self, s):
... |
a473657196d2947d859c3ff450af0cccb591e308 | 351ad84952502794f5acf55344c4ea230b5c6327 | /guessers/citty_pester.py | 65b905e91e6f42e6fc5dc87d625745e89c8f93b9 | [] | no_license | Artemis21/guessers-and-liars | 0d44a65f2a81c867009813d858842e301cda7fe0 | b07e01839f15c9ecb89c206bb1378c73f5fad500 | refs/heads/main | 2023-03-22T00:10:33.571719 | 2021-03-20T12:26:57 | 2021-03-20T12:26:57 | 346,054,126 | 1 | 2 | null | 2021-03-12T19:28:33 | 2021-03-09T15:32:10 | Python | UTF-8 | Python | false | false | 546 | py | citty_pester.py | import random
from typing import Callable
def guess_lies(liar, guess, lies):
tries = [liar(guess) for _ in range(9-lies)]
return tries[-1], lies + min((tries.count(-1),tries.count(1)))
def Main(rng: random.Random, liar: Callable[[int], int]):
while True:
low = 0
high = 255
lies = 0... |
ca65a34cfc169209ac06ef23d3dad750d6d933d8 | c40fc2d5497748b5882b1e4cb4346e929c907844 | /netcal/client/lamport.py | 69ea71064bf11a66059a50d446827a5b25452751 | [] | no_license | gosom/netcal | 8f7ae5987dffa7252c6475474e33dd4639888bf0 | 8a6f765f41d1c6a9bd79a2bffc2d6acc04b1f87f | refs/heads/master | 2016-09-09T20:39:12.543445 | 2014-01-28T01:03:31 | 2014-01-28T01:03:31 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,483 | py | lamport.py | #!/usr/bin/env python
# -*- coding: utf-8 -*-
import logging
class LamportClock(object):
def __init__(self, clock, own_id):
self.log = logging.getLogger(self.__class__.__name__)
self.clock = clock
self.own_id = own_id
def __cmp__(self, other):
if self.clock < other.clock:
... |
bfcaaa2cf4759e6998b1d2dff006c8ddffd4747c | ea9726ecc39ef2048fdeaefb498d15377cf82049 | /Hangman.py | 68e09f16918f87ffe81565dc847493d93d37f716 | [] | no_license | Ignac1oHA/Hangman1 | 8892bd911715aba1a6f6e28c7e53970870499b97 | cbd034b7a4ad3859e3e8712ae683a065e08a8036 | refs/heads/master | 2023-08-22T13:55:52.060825 | 2021-10-06T13:52:59 | 2021-10-06T13:52:59 | 414,232,560 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 3,170 | py | Hangman.py | from tkinter import *
import sys
def test():
# won is a boolean that indicates whether the participant saves William Wallace or not
# lost when you did not save William Wallace
# stage is the number of mistakes the participant committed
# canvas is the GUI element on which we need to put the picture
... |
e1f2428a631d1bb6e79c1b1125a52324a84591a5 | a927ce7b47daf8657768bf9935847e315e5fa972 | /scripts/grid_scripts/crossValStatGRIDAnalysis.py | 6e50b9bb7891109c325cc32c7847adef96a9b501 | [] | no_license | kaducovas/TuningTools | c34b7b459fc4688b75575f28bd0ba9dcfe82cf62 | a8ef8b58a2c04885632a6590d02d2000d94bb7f9 | refs/heads/master | 2021-05-15T09:40:20.131057 | 2017-12-19T19:16:21 | 2017-12-19T19:16:21 | 108,166,520 | 0 | 0 | null | 2017-10-24T18:21:47 | 2017-10-24T18:21:47 | null | UTF-8 | Python | false | false | 8,267 | py | crossValStatGRIDAnalysis.py | #!/usr/bin/env python
from TuningTools.parsers import ( ArgumentParser, ioGridParser, loggerParser
, createDataParser, TuningToolGridNamespace, crossValStatsJobParser
)
from RingerCore import ( printArgs, NotSet, conditionalOption
... |
db375ed72a1f1908ec1507a72ce4517aea6d8f1c | be27857c5e817d50c840c47942ea4ff4290b79c6 | /13-bus-schedule.py | 7e6f98c18b79d76853ed7d5ad819f1407bb22d6f | [] | no_license | NoelTautges/advent-of-code-2020 | 8b2d588057a9ba29b6b077553147f9af96b1ff11 | ffab793ca86f72e10060b95832939c1287245dc0 | refs/heads/main | 2023-02-01T20:28:47.764018 | 2020-12-16T22:56:57 | 2020-12-16T22:56:57 | 317,969,679 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,520 | py | 13-bus-schedule.py | #!/usr/bin/env python3
from functools import reduce
from math import ceil, gcd
def multiply(nums):
return reduce(lambda a, b: a * b, nums)
def main():
with open("13.txt") as bus_file:
timestamp = int(bus_file.readline())
buses = [(i, int(num)) for i, num in enumerate(bus_file.readline().split... |
d68ffefb3b6a841753b57116522c1871ed2332be | 1c6ff75884cb39cbb38707aa443931ac3739dca1 | /canvastools/views/misc.py | a3179a2411adcae8b1938a75470fd29af4e4427d | [] | no_license | wjchen01/clti | d279d8a0f46555c5c9c31e820e243c64c2cbf9a8 | ac0f08e055b9f59c14d6207c952459fa06954ad7 | refs/heads/master | 2021-01-12T07:58:23.034927 | 2016-12-21T15:37:07 | 2016-12-21T15:37:07 | 77,064,007 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,055 | py | misc.py | """
Flask module for miscellaneous server routes
"""
import logging
from flask import Blueprint, Response
from flask import abort, session, request, redirect, render_template
from oauthlib.oauth2.rfc6749.errors import MissingCodeError
from ..common import util, auth
MISC = Blueprint('misc', __name__)
LOG = logging.g... |
43b7dc554f77376000903e97955404458c4ddd79 | 4f499e0f5f9dab877a6c7ffd96a47d0f76d8d85f | /orbital2016/mugspot/migrations/0012_auto_20160702_1959.py | 81641cb760d9912d839d037b3585f65b8d85ed03 | [] | no_license | le-minhphuc/orbital2016 | ef0ded42b52530f392fe6c86339bf67ef65d269e | 5a0b0756baadd77335347fdb1587b895dee8bc27 | refs/heads/master | 2021-01-20T22:28:20.111395 | 2016-07-23T11:34:09 | 2016-07-23T11:34:09 | 59,830,103 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 690 | py | 0012_auto_20160702_1959.py | # -*- coding: utf-8 -*-
# Generated by Django 1.9.6 on 2016-07-02 11:59
from __future__ import unicode_literals
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('mugspot', '0011_auto_20160702_1717'),
]
operations = [
migrations.AddField(
... |
bc1dd888faff67c272b6ef1a984255803c0e5e3b | 11615212f5312608caebe95e141b894c0c8a42a0 | /main-tkinter.py | c6b69af686329aa815e90f64ea8f39f5474ed055 | [
"MIT"
] | permissive | mzlogin/android-controller | ddd6fc1d8a5da5d6ef2b422e7a8d835ac55b1640 | fe3e3ec732bac4f63659d42fae16593b461ed31f | refs/heads/master | 2021-01-13T09:10:21.555818 | 2018-07-14T03:06:31 | 2018-07-14T03:06:31 | 72,499,127 | 2 | 0 | null | null | null | null | UTF-8 | Python | false | false | 4,810 | py | main-tkinter.py | # -*- encoding: utf-8 -*-
import tkinter as tk
from tkinter import ttk
from PIL import Image, ImageTk
from adb_util import *
class CWnd(ttk.Frame):
def __init__(self, master=None):
super().__init__(master, width=400, height=300)
self.pack()
self.adb = AdbUtil()
self.screen_image... |
06f898f1910732657a078f4a68472eed29b60363 | e8a7d60dde3daf09860df8070681ba25e1aa9acc | /src/etm/_old/compute_kl.py | aec91415fd977514118cf5db97e1dc788c4e29cf | [
"MIT"
] | permissive | wph21cen/FOMCTextAnalysis | 2ab44ed90b76df4df2fc727b2ce4c1b0ba2a10ec | 0a039d9b197f487d8ba8c5d230b587c48cf865f6 | refs/heads/master | 2023-04-18T19:06:28.844272 | 2021-05-04T14:25:03 | 2021-05-04T14:25:03 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,745 | py | compute_kl.py | import numpy as np
for data in ["mindf_10_30_all_2_google_emb",
"mindf_10_10_google_embed",
"mindf_10_30_all_google_emb",
"30_all_google_emb",
"all_large_embeddings",
"30_all",
"bluebooks",
"bluebooks_train_embeddings",
... |
dcdb3071dd363785502f14e5c8e03a95f8710093 | 3d0b0ebe7c609490b2764ad7522c89b554bfb793 | /active_projects/relativistic_mass.py | 066015cb8eb134a0f10288050d4043660be3c973 | [
"MIT"
] | permissive | bhbr/manim | edad1f5d22beb032bcd6b2967f600f7ca336d02d | 1bda4bc6efba84c2da55c05f6bead8c6e8f33bee | refs/heads/master | 2020-03-20T19:39:33.596695 | 2018-12-02T16:44:06 | 2018-12-02T16:44:06 | 137,647,557 | 1 | 0 | null | 2018-06-17T10:45:40 | 2018-06-17T10:45:40 | null | UTF-8 | Python | false | false | 14,836 | py | relativistic_mass.py | from big_ol_pile_of_manim_imports import *
from active_projects.lorentz import *
import math
TIME_SCALE = 0.5
TIME_CLOCK_SCALE = 0.166666
FORCE_SCALE = 1.0
TRAIN_ONE_COLOR = RED_E
TRAIN_TWO_COLOR = BLUE_E
FORCE_COLOR = GREEN
FORCE_FUNCTION = lambda t: 0.5 * np.exp(-t**2 * 1)/np.exp(-0.25)
class Train(VGroup):
C... |
3e079a879325868facc3302b99272bff759b9ca7 | c4c7241d9ea013d54c559e058c68eac208c8f38a | /sec2/nlp19.py | 7d0c095d8ac47c4424bbbe656a0069b82aa2a9bc | [] | no_license | cook-cookie/nlp100knock | 52659a7a7e99a0af512cc186ade5865af945d285 | f23d2b8dc3b7f7595440623e1756ec3abb71d6fa | refs/heads/master | 2020-06-29T06:35:08.562429 | 2017-06-14T06:34:38 | 2017-06-14T06:34:38 | 74,443,682 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 318 | py | nlp19.py | import sys
from collections import Counter
with open(sys.argv[1]) as f:
lines = f.readlines()
col = []
for line in lines:
col.append(line.split()[0])
counter = Counter(col)
for line in sorted(counter, key=lambda pref: Counter(pref.split()[0]).most_common(), reverse=False):
print(counter, line.rstrip()) |
6ada3c4a54c9114445bfff47754b5f78c719c1bf | 0e95682e6766e88ba2ff34d6c69ce6b7f8a4b64e | /Persistence/DatabaseServer.py | 283befab2adf188474a6c41c426734dd1cefd86a | [
"MIT"
] | permissive | mvkumar14/Practice | 19748921f5bf76a3680d451affc1316bb98f3763 | c3c7142da6098d950aac528d2def77ef65b3132d | refs/heads/master | 2022-12-08T08:51:41.200252 | 2020-08-28T04:12:06 | 2020-08-28T04:12:06 | 267,161,863 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 175 | py | DatabaseServer.py | import psycopg2
# I think the DATABASE API in this particular case
# is actually postgres. So I don't need a seperate
# layer (personally written object) for the DatabaseAPI
|
ec356e5b8d7596606a9efa598873e5a9a0d1040f | e8fdac06b26be752bbb0ca6324b58e0096729f84 | /revision_app/urls.py | 5a8cbaa6ef3b51acb080c1a6a3a300ac8aef9079 | [] | no_license | jmishev/django__inventory | 9e94f169418c0923eb45b71f872208207e9a6331 | b6b699741531e5e4a258b6cf511b15b9ec333df7 | refs/heads/master | 2022-12-11T20:40:56.560038 | 2020-03-03T08:33:18 | 2020-03-03T08:33:18 | 216,548,138 | 0 | 0 | null | 2022-12-08T06:45:11 | 2019-10-21T11:10:51 | JavaScript | UTF-8 | Python | false | false | 323 | py | urls.py | from django.urls import path
from . import views
urlpatterns = [
path('about/', views.about, name='about'),
path('', views.GoodCreateView.as_view(), name="main"),
path('end/', views.end, name='end'),
path('download/', views.download, name='download'),
path('delete/', views.delete, name='delete'),
... |
377a82f01b60b7aca5914cb2b0d71f982cf5d9a7 | ff7219a3d5f19ee80cc846afb0c5abe8a0bf6801 | /tests/test_utils.py | a65a9314b458e8b17049dec5b9a81231975398d9 | [] | no_license | bobjansen/Prycing | 19021e2ecaa7c3d2d25550cd19cb869d63c677f7 | 36d81a859a32a149fbcf9ff1c8208b9d6f312d7b | refs/heads/master | 2023-08-18T08:06:35.706103 | 2023-05-26T05:28:43 | 2023-05-26T05:28:43 | 178,446,622 | 0 | 1 | null | 2023-08-14T23:34:34 | 2019-03-29T17:10:13 | Python | UTF-8 | Python | false | false | 1,497 | py | test_utils.py | """Test the failure modes of the utils functions."""
import unittest
from Prycing.options.utils import Tree
class TestTree(unittest.TestCase):
"""Test failure modes of the tree class."""
def test_empty_tree(self):
"""Test that creating a tree of negative height raises."""
self.assertRaises(
... |
f4e8cd183ec2702707e7eedf9cdc1ce77ef157f0 | 1e263d605d4eaf0fd20f90dd2aa4174574e3ebce | /plugins/distribution/distribution/container/_impl/_app.py | d20f7aed470d7a640d86bc6c885982822edd57cc | [] | no_license | galiminus/my_liveblog | 698f67174753ff30f8c9590935d6562a79ad2cbf | 550aa1d0a58fc30aa9faccbfd24c79a0ceb83352 | refs/heads/master | 2021-05-26T20:03:13.506295 | 2013-04-23T09:57:53 | 2013-04-23T09:57:53 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 8,334 | py | _app.py | '''
Created on Jan 10, 2013
@package: distribution manager
@copyright: 2011 Sourcefabric o.p.s.
@license: http://www.gnu.org/licenses/gpl-3.0.txt
@author: Gabriel Nistor
Provides the setup implementations for the IoC distribution module.
'''
from ally.container._impl._assembly import Assembly, Setup
from ally.contai... |
411bbd0232507078d19afb3e2dcc1c92dce90b63 | 5ca6730fa1178582d5f5875155f340ec0f406294 | /file_IO_basics.py | 9fbbaafead17e899cc02bb234980b0cd8f70aae0 | [] | no_license | MahadiRahman262523/Python_Code_Part-1 | 9740d5ead27209d69af4497eea410f2faef50ff3 | e2f08e3d0564a003400743ae6050fd687c280639 | refs/heads/main | 2023-07-25T09:10:53.649082 | 2021-09-05T19:39:14 | 2021-09-05T19:39:14 | 403,396,706 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 239 | py | file_IO_basics.py | # File IO Basics
"""
"r" -> open file for reading (default)
"w" -> open file for writing
"x" -> creates file if not exits
"a" -> add more content in a file
"t" -> text mode (default)
"b" -> binary mode
"+" -> read and write
""" |
af76957e5273763a5689ed564495716b9c48295d | bbdbdcdd5ee4a75daa19246f5734ee969855995f | /models.py | 66892995a1ef473e9355702efc98911a14cd50c3 | [] | no_license | prengifo/r2c2usb | 1ce395307b0371eccd31eb9e9f3762a0b31ee877 | 1b54ce0eb8cd08d14b22eb6318e1c66d4429c178 | refs/heads/master | 2021-01-10T04:42:31.310633 | 2015-10-30T13:07:42 | 2015-10-30T13:07:42 | 45,251,165 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 5,130 | py | models.py | # -*- coding: utf-8 -*-
import datetime
from sqlalchemy import Column, Integer, String, ForeignKey, DateTime, Boolean, BigInteger
from sqlalchemy.dialects.postgresql import JSON
from sqlalchemy.orm import relationship, backref
from .db import Base, session
from .utils import parse_datetime
class User(Base):
"""Mo... |
b92ec7f721d4e06e68301a7468a169c6d3fbde69 | 14ba8129283844b27ffe5ea7cc2cbb7409b8e157 | /docky/libs/prepares.py | 97c1b627cce76fd8eb8564b15dd383b2cc89941f | [] | no_license | reorx/Docky | d513b3de5dcc97b7dc3cbcf8192c7de4f28a47ae | cc54502d960ae399cb5229120a3937aca5db0fca | refs/heads/master | 2021-01-15T16:10:47.043692 | 2011-11-30T08:46:34 | 2011-11-30T08:46:34 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,931 | py | prepares.py | import datetime
from tornado.options import options
from utils import SDict
def debug(hdr, full=False):
"""
in sequence 1
"""
print 'Request'
print ' header:'
if full:
for k, v in hdr.request.headers.iteritems():
print ' %s%s%s' % (k, (22-len(k))*' ', v[:100])
... |
d98479da0c41db834fc22553b52e6305a496dada | ae284f8d1da3cb64c5400b7c4111ec689d13c3ae | /page_generator/migrations/0025_auto_20210317_0014.py | 0c4d23d811917b329342f12c9c1048ed99844818 | [] | no_license | martinahanakova/page-generator | 6c1078da7cabfe107d7bf2cbc7178df6ee6909c2 | 9fed35ca765261863623b36f62cb60a598c5d3de | refs/heads/master | 2022-07-15T15:06:26.261623 | 2021-03-15T21:01:55 | 2021-03-16T23:22:12 | 250,757,548 | 0 | 0 | null | 2022-06-22T04:10:50 | 2020-03-28T09:35:23 | Python | UTF-8 | Python | false | false | 735 | py | 0025_auto_20210317_0014.py | # Generated by Django 3.1.4 on 2021-03-16 23:14
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('page_generator', '0024_auto_20210316_2137'),
]
operations = [
migrations.AlterField(
model_name='pagerating',
name='... |
1c68f4b2cdf5412be4b61d3e31f2cc77a57fd353 | 7d97daf9b9f46d68bbe29441d8db554918dfcdc4 | /leetcode/DivideTwoIntegers29_1.py | 6c61aa193f32b52985ac9f32cea381013b8c8fa1 | [] | no_license | hundyoung/LeetCode | 9a56c4f078dcb4e875a6178c14665b7784c1a0a2 | 803e164d3a21b593cb89206b3a362c1ab1eb9abf | refs/heads/master | 2020-09-23T02:51:13.657444 | 2020-05-06T12:53:07 | 2020-05-06T12:53:07 | 225,383,854 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 917 | py | DivideTwoIntegers29_1.py | class Solution:
def divide(self, dividend: int, divisor: int) -> int:
negativeFlag = False
if dividend>0 and divisor<0:
divisor = 0 - divisor
negativeFlag = True
elif dividend<0 and divisor>0:
dividend = 0 - dividend
negativeFlag=True
e... |
71fbc018807b5b287ae730ea6ebd0c8e43d3d633 | fab51223f1534d0466104259f57dbee8d8be183a | /HPC_executions/generate_structure.py | 29523d85cf32847987d53b52bf50fcdc59660107 | [] | no_license | Proyecto-Iris-4-0/OPTIMIZACION-POR-TSP | b212deda2c9c3e05e7bde0a65602ec73fd5a1878 | c3ae111349985fa445d9967ab3c257ee4d14776a | refs/heads/main | 2023-01-01T01:10:49.234646 | 2020-10-16T08:29:30 | 2020-10-16T08:29:30 | 304,302,911 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,897 | py | generate_structure.py | #imports necesarios
import json
import os
import shutil
from PERSISTENCIA.db_rutas_connect import *
'''
Dada el id de una ruta, este método devuelve un objeto
con la información necesaria para realizar la optimización.
1. ID de la ruta.
2. Lista de contenedores de la ruta.
3. Matriz de distancias con los contene... |
b17902087114a4d66acf95d83dd0909642ccb8d4 | 579af4e4611f808599847b9bc12fa1f84f0deb96 | /LEQEX/test_gen1.py | 223d49495e3e272f4b2f38baba6b441e25e9b803 | [] | no_license | yadav-sachin/D-Code2019 | 954b3ac84e6439788fde3fde443eb07197e977d5 | 843e3be00ac3b9d6599c8cf28a2b4f14d2ae2b75 | refs/heads/master | 2022-11-18T02:33:15.470676 | 2020-07-16T18:21:18 | 2020-07-16T18:21:18 | 280,227,097 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 466 | py | test_gen1.py | from random import *
seed(2804602860800033)
T=randint(80,100)
print(T)
for t in range(T):
if t<=10:
N=randint(1,10)
if 11<=t<=20:
N=randint(10,100)
if 21<=t<=30:
N=randint(10**2,10**3)
if 31<=t<=40:
N=randint(10**3,5000)
if 41<=t<=50:
N=randint(1... |
0b244123946e15094d82ba5a6eef183671352c4d | 0d271cd14400bbfd809be7327f83a246753b44d1 | /util/rw.py | 7d10369946d44be189bc34f9f6939296dc6fbe3f | [
"MIT"
] | permissive | ewwaller/irrigation | a952f6701257791229e3a7d77c5a957deb83fa1f | 58990fadb66233e12a87f038a6f0df35a45d30b7 | refs/heads/master | 2020-03-21T19:21:20.253178 | 2018-07-04T23:45:21 | 2018-07-04T23:45:21 | 138,944,500 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 740 | py | rw.py | import json
# Make it work for Python 2+3 and with Unicode
import io
try:
to_unicode = unicode
except NameError:
to_unicode = str
# Define data
data = {'a list': [1, 42, 3.141, 1337, 'help', u'€'],
'a string': 'bla',
'another dict': {'foo': 'bar',
'key': 'value',
... |
d8cf9a4c7d593de4bfa1bd36ec7c4666b0c54647 | c84d0ee65007b2bf2df9d580c22755cebcb89162 | /RobotstudioEnvs/CR/CRv_ant.py | 3c5b3155f8dd3f8440d3bdb2ca84d898a7e79ed8 | [] | no_license | marcosventosa/Repo_RL_CIC | e56d5305eaab4cc3444974ac1ea82b44e8f93766 | 96d00150ed77babaf98aca4567c268e2bb292137 | refs/heads/master | 2022-12-17T00:44:20.498006 | 2020-02-25T10:58:40 | 2020-02-25T10:58:40 | 242,601,417 | 0 | 0 | null | 2022-12-08T06:19:01 | 2020-02-23T22:30:20 | Python | UTF-8 | Python | false | false | 2,547 | py | CRv_ant.py | # Importing program libraries (0.2)
import time
import numpy as np
# Importing socket as sock
#-------------------------------------------------------
# Creating a function to connec to RobotStudio
# This function should be called first thing, in order to connect to RobotStudio
class RS_serial():
def __init__(sel... |
a646cc24f49dc174caa3d4005d0a2050241ccd2e | d5e9c885d851af43fa57ecbc6e98695287df01a4 | /nodes.py | b2f0fa1023c053ed1ce25d9cd1d052d043d11cf2 | [] | no_license | madelinebriere/congestion | 164dcc871d2f8a889b5d8b65d43a59a83b06d1b9 | 8d0909ca397d57a8b534c91af271e0f8118a081a | refs/heads/master | 2020-03-29T04:38:17.815113 | 2018-10-19T03:48:01 | 2018-10-19T03:48:01 | 149,540,491 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 3,058 | py | nodes.py | #!/usr/bin/python
from mininet.topo import Topo
from mininet.net import Mininet
from mininet.node import CPULimitedHost
from mininet.link import TCLink
from mininet.ut... |
3dc4f543059666a653b400f85371c6566446bd11 | 603c2ee1fcd87c69004c49f740104218acffcacd | /shrapnel/direct_messages/views.py | 0f7055dba99f464f5843b97b0151e1259cbf4f16 | [
"Apache-2.0"
] | permissive | BLG411-Group6/shrapnel-api | 8c306958bfec1e32865954fe1191771ec53fdac0 | 0cb1d6b1f4d57837c99f867d8ac80095de3e7330 | refs/heads/preprod | 2022-05-02T06:15:34.696102 | 2020-02-24T20:34:58 | 2020-02-24T20:34:58 | 229,444,031 | 0 | 0 | Apache-2.0 | 2019-12-21T15:19:33 | 2019-12-21T15:08:07 | Python | UTF-8 | Python | false | false | 2,450 | py | views.py | from rest_framework.generics import ListAPIView, RetrieveDestroyAPIView, CreateAPIView
from rest_framework.permissions import IsAuthenticated
from shrapnel.direct_messages.models import DirectMessage
from shrapnel.direct_messages.serializers import DirectMessageSerializer
from shrapnel.users.models import User
from sh... |
766273c2c3112da7d972011c35c3c2f6b356c5e5 | e1857d58ec7d5a4c580b7241d77e190d3338172a | /python/locker/accept.py | 3c2349449acd83aea7e3fd469bd4e158a222d0b0 | [] | no_license | goldberg0408/home-pi-github | 678e34c9ec8aef926a35393e73b8aefc6a777376 | a22de003053b2584c4322b9e3f151c6f61b83a00 | refs/heads/master | 2021-01-01T16:14:45.189490 | 2017-12-14T00:19:17 | 2017-12-14T00:19:17 | 97,792,794 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 739 | py | accept.py | import sys
from sdk.api.sender_id import SenderID
from sdk.exceptions import CoolsmsException
## @brief This sample code demonstrate how to request sender number register through CoolSMS Rest API
if __name__ == "__main__":
# set api key, api secret
api_key = "NCS76REGORDXIHMI"
api_secret = "XSCPKTB0CVFBV... |
c04b693588988433d31b3749fe8e875053388d1c | 9270f30aca9d1e11633cb1298b37e5d8ae0ea064 | /Week1_Basics_of_Coding_and_Math/hash-maps/two-sum.py | 56cc3f2d12b464a4ef129786d218a4204f04cc52 | [] | no_license | achamorr/wallbreakers | e29a52939b8cc79a48e5d018ad4f6a88c0b20ccb | 6ea90d9c3f671a941a8c07770ec6e4d38c469408 | refs/heads/master | 2020-07-29T06:58:01.243735 | 2020-07-02T19:36:06 | 2020-07-02T19:36:06 | 209,707,051 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,315 | py | two-sum.py | #needs work, keep improving
class Solution:
def twoSum(self, nums: List[int], target: int) -> List[int]:
#sort
nums = mergesort(nums)
#we can assume already ordered
#find pairs
top = len(nums)-1
bottom = 0
for i, num in enumerate(nums):
while top >... |
1ec3ed3c7e1e6a59c67d51813e267b23bd021502 | a05b30882182c8078659dff3c7cb6d6743a4b8ea | /registration/nl_coords_transform.py | 0c617bc7b0167e3b3414526ef2e72dd43900dd4c | [] | no_license | afids/afids-macaca | ed6bcb971d61af18bef89eaf59843190302e81d8 | acda826c91607e67368ed5fdda9cd938a2631127 | refs/heads/master | 2023-06-08T01:24:27.233208 | 2023-06-06T18:17:11 | 2023-06-06T18:17:11 | 253,129,004 | 6 | 3 | null | 2022-08-09T11:05:21 | 2020-04-05T00:58:11 | Jupyter Notebook | UTF-8 | Python | false | false | 19,269 | py | nl_coords_transform.py | #!/usr/bin/env python
# python3 status: compatible
# system libraries
import sys, os
if 1 : # for testing, might add the current dir and ~/abin to the PATH
try: sys.path.extend(['.', '%s/abin' % os.getenv('HOME')])
except: pass
# AFNI libraries
from afnipy import option_list as OL
from afnipy import afni_... |
252e4da6a0d4187694f49285e267099f1c48ddeb | ca7aa979e7059467e158830b76673f5b77a0f5a3 | /Python_codes/p03385/s713476628.py | 3430df57b6ff98f8ddbfbb586e9b920e07e5df22 | [] | no_license | Aasthaengg/IBMdataset | 7abb6cbcc4fb03ef5ca68ac64ba460c4a64f8901 | f33f1c5c3b16d0ea8d1f5a7d479ad288bb3f48d8 | refs/heads/main | 2023-04-22T10:22:44.763102 | 2021-05-13T17:27:22 | 2021-05-13T17:27:22 | 367,112,348 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 50 | py | s713476628.py | print("YNeos"["".join(sorted(input()))!="abc"::2]) |
74f243d4e3127a03308450bcf346fa4ced0a311c | 16334828155d038450f0aecfcb2420e1a9e6ce5d | /AnalysisModules/test/hnuZscale_cfg.py | fcb62b56ca9d421d66e4f2ea613b479f3cee7a6c | [] | no_license | UMN-CMS/HeavyNu | cfc9b97dec8b7b6fd616cfd3d81ddc09dfeef44d | ad1f2ae7d6c4f7bb680b4c06fdf756bc480345a4 | refs/heads/master | 2016-09-05T22:36:26.786870 | 2014-09-23T20:29:01 | 2014-09-23T20:29:01 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 9,926 | py | hnuZscale_cfg.py | import FWCore.ParameterSet.Config as cms
import os
#import sys
#isMC=sys.modules['__main__'].isMC
#isMCsignal=sys.modules['__main__'].isMCsignal
#process = sys.modules['__main__'].process
isMC=True
isMCsignal=False
Training=False
isRun2010LoLumi=False
isRun2011=True
isPileupMC=True
isData=not isMC
## Low and high ... |
d654aea3da3e36ccde8a5f4e03798a0dea5aad8a | 9da7441dcb0fa33d4f8d526971da2eb818610d46 | /methplotlib/import_methylation.py | b166448f85140c243e8c280e3590fdb29996f472 | [
"MIT"
] | permissive | W-zhennan/methplotlib | 986c7a442bdf2b496c281aa038b626368841e51f | f9967be234ccb4f2871126bb49234b5563afca19 | refs/heads/master | 2022-11-08T17:49:26.408547 | 2020-06-17T10:11:21 | 2020-06-17T10:11:21 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 6,711 | py | import_methylation.py | import pandas as pd
import pyranges as pr
import numpy as np
import sys
import logging
from methplotlib.utils import file_sniffer
import pysam
class Methylation(object):
def __init__(self, table, data_type, name, called_sites):
self.table = table
self.data_type = data_type
self.name = name... |
6ee36994f63d64e35c4e76f65e9c4f09797a161e | ad8c176c7b77274d2ef110988929736ed3f6f790 | /algorithms/HackerRank/tree_lowest_common_ancestor.py | 998197681d5751a3202412cb85213c4729625e13 | [] | no_license | sumitalp/problems | f3abbe73150b949a302c0736e9105a4158056175 | 8f6381bce1313e95a6a2e328741efe89993b3b0c | refs/heads/master | 2023-01-15T18:21:36.508204 | 2023-01-13T01:15:48 | 2023-01-13T01:15:48 | 64,126,614 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,287 | py | tree_lowest_common_ancestor.py | class Node:
def __init__(self, info):
self.info = info
self.left = None
self.right = None
self.level = None
def __str__(self):
return str(self.info)
class BinarySearchTree:
def __init__(self):
self.root = None
def create(self, val):
i... |
207b6e56b683c0b069c531a4c6076c2822814390 | c8b557a60035aff42bfbd291dc707a2977e53f8b | /speech_stutter/testing.py | 3d0f49d7c0f27169ac65255543789d4b7f02e531 | [] | no_license | chiragsanghvi18/stutterio | a8ced6cf2926a37b05d310b255746105a5eb59a9 | 934c09725b305f9de952689469d55f2bacc024a2 | refs/heads/master | 2020-08-14T05:40:46.160439 | 2018-01-02T01:58:39 | 2018-01-02T01:58:39 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 47 | py | testing.py | file = open("yo.txt", "wr")
file.write("Yo")
|
e6af221f1d6397d0fc52671cdd27d43549d0aecb | 1279be084452edc2d903302c6d38a1399816b182 | /test/test_barleycorn.py | 3f1b7282076aeb6915ef2f6375c443aacd3dacb2 | [] | no_license | jjpr/barleycorn | 061ae062401952b70c302f0bfcd0647e1095edf2 | 7c4c9d4e3fbf63d102979b23371c1aa55f73691a | refs/heads/master | 2021-01-19T08:34:57.558915 | 2015-05-26T20:08:16 | 2015-05-26T20:08:16 | 34,343,927 | 1 | 1 | null | null | null | null | UTF-8 | Python | false | false | 117 | py | test_barleycorn.py | __author__ = 'jjpr'
import pyrr
import barleycorn as bc
def test_xyz123():
cone_x = bc.primitives.Cone(1.0, 1.0)
|
ce75c23c6b0862dde797225f53c900b4ebc56428 | 59f561d77aaed093b6ecde199fec72b38ec323f2 | /registro.py | 836de97f6f24d40d97a60b32f3ef9eaffa4ab6b7 | [
"MIT"
] | permissive | Javierfiestasbotella/Repite-Botella | 43db5b85cd40a77471e6780e4d1afeca61054c56 | 7867c181f8341abd747c228dec4b6ba1175aacf4 | refs/heads/master | 2023-04-15T23:01:21.988606 | 2021-04-03T23:00:33 | 2021-04-03T23:00:33 | 350,490,806 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 983 | py | registro.py | from bbdd import *
def usuario():
global usser
usser=input("Introduce un usuario : ")
if len(usser)<5 or len(usser)>15:
print("El usuario debe tener entre 5 y 15 caracteres")
usuario()
elif usser.isalnum()==False:
print("Los valores del usurio deben ser únicamente letras o números")
usuario()
... |
345967e2aeafda6ce30cbbbbacf976c97b17def7 | ba2b33e5a94025f128072485be33e51b07618288 | /Python/saver.py | f6b2885f49e4192bc40fb21b023c8a8b7177dee0 | [] | no_license | ChildofFire/CodingStuff | b0de394b349b5dfeb106d61e550e5b5325afe653 | 7046ca1954f547cd48d028cebfa04d739774bdcb | refs/heads/master | 2021-04-09T16:09:03.587548 | 2018-06-07T16:05:00 | 2018-06-07T16:05:00 | 125,531,422 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 173 | py | saver.py | myDict={'Friends': ['AP', 'Soham', 'Baba'],
'Likes': ['Math', 'Programming'],
'languages': ['C++', 'Python', 'Java']}
myInt=123
myFloat=12.3333
myName='Somesh Thakur' |
f70f66926b9e2bf8b387d481263493d7f4c65397 | 856c5b9ef59f0e5501fede6143e6e1b4353247ba | /S6_1art.py | cd88b082225c86562ee7f17acbfca7e5117d674e | [] | no_license | Andrespazmi/Ejercicios1-parcial | bc8f659239a0f3bc9b07f168f2048b9fedbea1cc | 785573940288f6577c38490a299c987011e33ddf | refs/heads/main | 2023-07-25T17:55:52.366526 | 2021-09-06T18:02:17 | 2021-09-06T18:02:17 | 403,710,975 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 362 | py | S6_1art.py | """"
articulo
cliente
venta
ventadet
"""
class Articulo:
def __init__(self,cod,des,pre,stoc):
self.codigo=cod
self.descripcion = des
self.precio=pre
self.stock=stoc
class ventaDetalle:
def __init__(self,pro,pre,cant):
self.producto=pro
sel... |
b8fcd8e6dce8d210576bc4166dd258e5fd51278d | ad28cc835345d23559b99b729ad450fcf8d867f1 | /wormpose/pose/headtail_resolution.py | eccde00d9a1560f4f3aeb9508d3c05785ca4aa7c | [
"CC-BY-4.0",
"BSD-3-Clause"
] | permissive | iteal/wormpose | 02bb7131377e2d069a91cc1af5adac8593728755 | fb1d77eac56538569f639ab58a62470bff10f04c | refs/heads/main | 2023-08-09T05:15:04.075219 | 2021-12-09T02:49:51 | 2021-12-09T02:49:51 | 246,706,178 | 45 | 15 | BSD-3-Clause | 2023-07-06T21:57:47 | 2020-03-12T00:11:41 | Python | UTF-8 | Python | false | false | 14,099 | py | headtail_resolution.py | """
This module contains the logic to resolve the head-tail orientation of a predicted video time series.
"""
import logging
import numpy as np
import numpy.ma as ma
from wormpose.pose.distance_metrics import angle_distance, skeleton_distance
from wormpose.pose.results_datatypes import (
BaseResults,
Shuffle... |
ec90c731a0e546d9d399cbb68c92be1acca8cbe0 | 8a1200f2bd0bf25a264c065da896d1806e45155a | /packages/mysql-5.6.10.py | 2785fb3dd9e1170ff1b3b366edd11e2df158a815 | [] | no_license | mhulsman/enhance | fac908eca561749ab99ea708f19f37eaceabf6c5 | 761234a263e4962a8e10026ce143c1ea0e7e8728 | refs/heads/master | 2021-01-18T23:40:56.252953 | 2016-09-29T13:04:48 | 2016-09-29T13:04:48 | 1,520,086 | 3 | 4 | null | null | null | null | UTF-8 | Python | false | false | 275 | py | mysql-5.6.10.py |
from package import *
class mysql(MakePackage):
dependencies = ["cmake"]
fetch="http://dev.mysql.com/get/Downloads/MySQL-5.6/mysql-5.6.10.tar.gz/from/http://cdn.mysql.com/"
config='cmake -G "Unix Makefiles" -DCMAKE_INSTALL_PREFIX=%(prefix)s -DWITH_READLINE=1'
|
372d8c8cb9ec8f579db8588aff7799c73c5af255 | a18dd63829e2b8bc8c375617ed1e0a6c4ea93925 | /tweet_collect.py | 75c0c3866f6a11dac8c738b691ae0aa2c5ef6c7f | [] | no_license | nickbonne/twitter_friends_data | 100a73b9af1045b7890bc9c6c72103c7374c14ee | ea466f036a32bb88801b5a43d617d4f601d58b3b | refs/heads/master | 2021-01-11T18:57:36.659420 | 2017-03-14T17:56:38 | 2017-03-14T17:56:38 | 79,281,065 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 9,427 | py | tweet_collect.py | #!/home/nick/.virtualenvs/twitterbots/bin/python3.5
# -*- coding: utf-8 -*-
import tweepy
import sqlite3
from configparser import ConfigParser
'''
A little OOP would be good later for
authenticated user data, c, conn, api
'''
def main():
Collector.collect()
class Collector:
# Main function
def coll... |
ab02b2c449929af1ca07db5d5aab2a20915f42e8 | 8b979747dff3c3594f6917e2f49aa19bc7a1d50c | /scripts/perf_of_free_core_prepare.py | 6e7a1a7b5047d7d7a2756134ffb78b32463b5b8a | [] | no_license | pugong/eru-core | 0f0e0da442ee1f771f9dc65160726160d36d75bc | feef6ce2cef33012fe0b5912aadc68f7583a81f6 | refs/heads/master | 2021-01-21T06:14:23.222574 | 2015-06-15T07:07:22 | 2015-06-15T07:07:22 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 848 | py | perf_of_free_core_prepare.py | #!/usr/bin/env python
# encoding: utf-8
from eru.app import create_app_with_celery
from eru.models import db, Group, Pod, Host, App
from tests.utils import random_ipv4, random_string, random_uuid, random_sha1
host_number = int(raw_input("how many hosts: "))
app, _ = create_app_with_celery
app.config['TESTING'] = Tru... |
e08d9770503d23eaf175d90603063c6016a024d6 | f3821e3cba25523cf73436221209595876888c55 | /Src/Python files/q-2and3.py | 1bbc70abc78b5cf6775b862018394eef233373b0 | [
"MIT"
] | permissive | ayushkdwivedi/PCA-K_Means-GMM | 38e70319cabb7a18204d55f2336931812329a94e | 7277bbfedbadcf876618c1c028d7d3c48ffef84f | refs/heads/master | 2021-03-13T06:33:32.336693 | 2020-03-11T18:28:41 | 2020-03-11T18:28:41 | 246,649,202 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,431 | py | q-2and3.py | import pandas as pd
import numpy as np
from sklearn import preprocessing
from sklearn.model_selection import train_test_split
from sklearn.neighbors import KNeighborsClassifier
from sklearn.metrics import recall_score, precision_score
import matplotlib.pyplot as plt
def sigmoid(x):
return 1/(1 + np.exp(-x))
def l... |
0c9981ff36b8936b93b75204d5931db617059572 | 065d289c5ce33c8ccd3bf5d595fb132f96a424d3 | /mainpage/views.py | 89ec79d432fdc5a2f62aaf3db29df9a8c9ef78e8 | [] | no_license | SxN13/Djanho-site | 600466e575fe0c30ae7ab31c9214e578c5995989 | 4c246b9b16ea318110cdd46311e190228445b207 | refs/heads/master | 2020-04-05T09:16:10.220737 | 2018-11-08T18:14:28 | 2018-11-08T18:14:28 | 156,749,153 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,120 | py | views.py | from django.shortcuts import render
import getpass
from .form import UploadFileForm # подключение формы
sss = ""
def index(request):
v = getpass.getuser()
print(v)
if request.method == "POST":
form = UploadFileForm(request.POST, request.FILES)
print(form)
save_path = 'mainpage/stat... |
88c00876b88dba32115746ccca20f08373e38f37 | 110bbe2362d9852ff5e41f6a3c31fb592298f453 | /Modulo pandas/Ejemplos/estadisticas.py | 0298f62a06d620e2436a097cd6ff32cd2bda29d3 | [] | no_license | marcosperezper/cursoPython | a08650b1c646d707b9a17d8bc5888c61baca4e73 | 40cf13d3e59cc382be93bcf622b5db60dda93b11 | refs/heads/master | 2023-03-09T23:10:01.471000 | 2021-02-24T10:09:26 | 2021-02-24T10:09:26 | 279,596,773 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 476 | py | estadisticas.py | #Estadisticas en dataframes
import pandas as pd
import numpy as np
array = np.array([[1,8,3],[5,6,7]])
dataframe = pd.DataFrame(array, index=['a','b'],columns=list('123'))
# print(dataframe)
suma_columnas = dataframe.sum()
# print(suma_columnas)
suma_filas = dataframe.sum(axis=1)
# print(suma_filas)
minimo = data... |
a8e0074b1640821367295d68d610a85fd7e33d7c | d34580be6005caf2d2a0f5c18ca9bd1a70fc3bd8 | /scripts/fig8.py | eaf15e680d26955276ef2ce8c32209e99032c593 | [
"MIT"
] | permissive | seqcode/miniMDS | 186bf39cb8cedc6cd5eb7cf33f38c9449797e2ca | da522387b85fc121c2a47b34b61e3955d83ed1fe | refs/heads/master | 2023-07-24T06:03:57.939187 | 2023-06-14T02:47:24 | 2023-06-14T02:47:24 | 80,081,082 | 23 | 10 | MIT | 2023-07-06T23:22:31 | 2017-01-26T02:59:17 | Python | UTF-8 | Python | false | false | 3,311 | py | fig8.py | from matplotlib import pyplot as plt
import numpy as np
import sys
sys.path.append("..")
import data_tools as dt
import array_tools as at
from scipy import stats as st
import misc
chroms = (1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, "X")
n = len(chroms)
mmds_rs = np.zeros(n)
cmds_r... |
dd318e288df9d3695ee35a98213bbb2c26eaecef | 74deabedc4fdc2637c55aed636ddbd219caa73ab | /LaundryService/skylaundryAdmin.py | 8d2c328d71ae43846a78db31a51c3ceb1f7f2220 | [] | no_license | Shahbaz-mahmood123/Python-GUI-project | 3e0a4500c9bceb04cb9cbaf0c152c7d0147f7c5d | a1d0ce5d49d75c273dccba576cf765162ac1b060 | refs/heads/master | 2020-07-26T08:56:54.690527 | 2019-10-03T14:26:12 | 2019-10-03T14:26:12 | 208,596,531 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 3,533 | py | skylaundryAdmin.py | # SkyLaundry - On Demand Laundry Service
# Admin Page
# This page will allow the admin to view the orders and assign the orders to the drivers
# @ Author Shahbaz
from tkinter import *
import tkinter.messagebox
#Create window
root = Tk()
# Create Labels
lWelcome = Label(root, text="Welcome Administrator!")
labelfon... |
5da93e5cc80ecf2040e4ad2769824aa81989b0f7 | 871e29bed0c0343646267bca95f86c8d1d803943 | /Reddit DailyProgrammer/192i_markovChain.py | 805547b6c001727147cd4431336b4f59720cd210 | [
"BSD-2-Clause"
] | permissive | ghevcoul/programming-practice | abe74bc17f0b77f6d5f6002c6058f42fb481f1b9 | 8609d37f4723aa94a63f7d310a0f9cacf2683d27 | refs/heads/master | 2020-04-13T21:36:21.397118 | 2016-05-02T20:52:59 | 2016-05-02T20:52:59 | 31,683,884 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,820 | py | 192i_markovChain.py | # Written for Python 3.4
#
# /r/dailyprogrammer Challenge #192 Intermediate - Markov Chain Error Detection
# https://www.reddit.com/r/dailyprogrammer/comments/2ovt2i/20141210_challenge_192_intermediate_markov_chain/
import sys
import os.path
from string import ascii_lowercase as letters
############################... |
4f65ffa070b29847ac3c807281fa7bcee254293b | 2f698b37166539165967906e95bba9c05a64cc2c | /app/__init__.py | 37bed411e360826378f93513a35c90d7f210c237 | [] | no_license | GustavoCielo/python-flask-psycopg2-CRUD-SQL | 175442bd6fc48cd76c4ea16848d2f26aefc84eba | 3ce51fe65d3d70778ddac8ae63443c2bc7c810a5 | refs/heads/master | 2023-07-19T03:30:27.154378 | 2021-09-22T19:10:59 | 2021-09-22T19:10:59 | 409,327,407 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 180 | py | __init__.py | from flask import Flask
from app.routes import anime_blueprints
def create_app():
app = Flask(__name__)
app.register_blueprint(anime_blueprints.bp_animes)
return app |
899eccb7826dad4fcc8a1f92c90ec985f1f4f3f4 | 969e8af4817a1a06edf9ae91c16ca07d7269eb0e | /misperris/migrations/0005_auto_20181024_1710.py | 927c64b97feb85274306f49c2d388ab053bdd55f | [] | no_license | GabrielConstenla/mis-perris | e5f965ed2183f95a9d84058053832d490e5f043d | d0ab2fc341e8fedb007ae49064b33eac71751508 | refs/heads/master | 2020-04-01T21:47:22.574677 | 2018-10-30T15:42:33 | 2018-10-30T15:42:33 | 153,675,256 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 501 | py | 0005_auto_20181024_1710.py | # Generated by Django 2.0.9 on 2018-10-24 20:10
from django.db import migrations, models
import misperris.validators
class Migration(migrations.Migration):
dependencies = [
('misperris', '0004_auto_20181024_1515'),
]
operations = [
migrations.AlterField(
model_name='adoptant... |
714dd40797e7c25ef57d888af24d17fc329d0853 | 422f278342c2b0b837c4bd4165a716e077db8c83 | /test_project/modc/__init__.py | 80707b1b50d62b31835923f907e970102361ae7d | [
"BSD-3-Clause"
] | permissive | futurice/fabric-deployment-helper | a1e95c1db114a757e5fe1fbbefe32b54076f8d67 | fc152b9b3d4c67f77642577c7d29b25093cebdff | refs/heads/master | 2020-05-06T15:19:08.336411 | 2014-10-08T13:34:19 | 2014-10-08T13:34:19 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 178 | py | __init__.py | from soppa.contrib import *
class ModParent(Soppa):
voodoo = True
class ModC(ModParent):
modc_left = 'left'
var = 'modc'
def voodoo(self):
return False
|
0cd2c77516747d85804e16e4e7c0b7e6aed87d00 | 777a2c0289fa099e1241890453dd1cd490a05a6a | /models/neuralnetwork.py | 7b37b69453975efd6a5a1821c256692c4dc2bb43 | [] | no_license | benja263/Adarmonic_mean_project | 392d359d506aa8679b9b29008115d0f0dfb3c46b | 5625574782f51d95cf8ac6fc3920e29fea9f53a6 | refs/heads/master | 2020-04-04T03:36:05.160550 | 2018-12-16T22:03:08 | 2018-12-16T22:03:08 | 155,718,647 | 0 | 1 | null | null | null | null | UTF-8 | Python | false | false | 6,344 | py | neuralnetwork.py | # -*- coding: utf-8 -*-
"""NN.ipynb
Automatically generated by Colaboratory.
Original file is located at
https://colab.research.google.com/drive/1T7AzUMOcH_vKE5hNcqYdckKQ4wkOAO-3
"""
from google.colab import drive
drive.mount('/content/drive')
import pandas as pd
import numpy as np
import re
# from helpers impo... |
0701e909c78fbeccc816dba8aa63e882cd952af4 | 5a1a70a36efd4e6452c4347de9eb968eb5ceb3b7 | /app/__init__.py | bffca14acccaf16fdf83ec6500a2cfa526243aff | [] | no_license | zolaneta/books_flask_app | 261eff31417a21ae0f7d34d29ab4d0398f2d56c7 | b3905b45764028e1404c84cda79f0ec8a560bd1c | refs/heads/master | 2021-01-21T04:55:08.543412 | 2016-07-18T21:18:03 | 2016-07-18T21:18:03 | 53,359,772 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 754 | py | __init__.py | from flask import Flask
from flask_sqlalchemy import SQLAlchemy
from flask.ext.login import LoginManager
app = Flask(__name__, static_url_path='', static_folder="static")
app.config.from_object('config')
db = SQLAlchemy(app)
from app.main import views
from app import models
from models import Book, User
login_man... |
f2acd78b3219818c5e86f8ae0468e13b98b25445 | 0a5e2789e3322c98ecba57d52d708bb1a2032805 | /website/models.py | ec1150a6be3910293d4e08fca086d10a9ceb9c89 | [] | no_license | joshua7v/SeraphNav | 70e093f6f3835565377b7d0df8756ee7d7aaa47d | 02b48189a2e3a08708a33073c8c722d25ed875c3 | refs/heads/master | 2016-09-09T23:15:05.687341 | 2015-09-26T10:40:31 | 2015-09-26T10:40:31 | 38,226,911 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,384 | py | models.py | __author__ = 'Joshua'
from SeraphNav import db
from datetime import datetime
class Site(db.Model):
id = db.Column(db.Integer, primary_key=True)
user_id = db.Column(db.Integer, db.ForeignKey('user.id'))
title = db.Column(db.String(80))
desc = db.Column(db.Text)
url = db.Column(db.String(255))
... |
d947405297f122344176794724931fad47eb988a | 15504ebab9ce88aa7891709d0090048eeff158d1 | /Stitching/dji/dji_stitch.py | cb98003afc70496c4e9273c7e0c3c4e81fdbd61d | [] | no_license | henrymound/DroneStereoVision | 75c6716fca90be406856a8985a8211fc90c7a929 | 60bf3c86bb9c3d0c34f771d5c4fbd544baadfc71 | refs/heads/master | 2022-08-16T22:22:15.162559 | 2019-05-20T17:29:46 | 2019-05-20T17:29:46 | 173,035,906 | 2 | 2 | null | null | null | null | UTF-8 | Python | false | false | 737 | py | dji_stitch.py | import sys
import traceback
import threading
import av
import cv2.cv2 as cv2 # for avoidance of pylint error
import numpy as np
import imutils
NUM_IMAGES = 910-433
START_NUM = 433
images = []
stitcher = cv2.Stitcher_create(cv2.Stitcher_SCANS)
if __name__ == '__main__':
for i in range(0, NUM_IMAGES, 2): # Only add... |
c9d829aa820868b4c5966feb6f635d36e5bfa6dd | 78d5ed168b813886fcd4516c90f122ae54f793db | /Leaning/NLP_project/三元组/extraction.py | 857babc57e546ff4a44e395da5c3506380ce961e | [] | no_license | LiaoBoWen/MyProject | 9919272c323d33a435eaa9f989ac73c058410e5b | 648fa01a0f0be1ace4b4b233822ccd2107ab0897 | refs/heads/master | 2020-07-21T07:55:29.301575 | 2019-11-02T03:28:19 | 2019-11-02T03:28:19 | 206,782,221 | 2 | 1 | null | null | null | null | UTF-8 | Python | false | false | 28 | py | extraction.py | from pyltp import Segmentor
|
0a569953e6fa2f51abace762f5e0bf74a3a20517 | 12a6dfd6e58d20139eb6e7b3b064a2f6e1bcfd2f | /string_split_and_join.py | 2362351db31e3b5394dfaa50ee026f2c5be03d85 | [] | no_license | harrykane1018/javavara-assignment | 2e83aa1ff4ca84a6544458222d72e066a3543396 | 60c16b5db3c4629467228c19344956f8c172d9b0 | refs/heads/master | 2022-11-15T17:35:37.808897 | 2020-07-17T02:56:08 | 2020-07-17T02:56:08 | 277,517,432 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 71 | py | string_split_and_join.py | # 성공
line = input()
result = line.replace(" ", "-")
print(result) |
305d2ba9800406341dd0c7437a436daf7bc1f2e2 | 5431cd080959610173b779dcf8fe36a2993e0b99 | /AI_Literacy_App/views.py | dd04bb494370079b6c9fee3ba2490408b8d77afc | [] | no_license | Aamir185/AI_Literacy_Tool_Capstone_T2_2020 | df6f1422c0deacd908089eec41b4ca67f6565251 | 2fe70c6c98d48d4ff693909dd9576335c4aea147 | refs/heads/master | 2023-05-08T16:43:29.032136 | 2020-10-09T08:55:45 | 2020-10-09T08:55:45 | 363,111,458 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 4,212 | py | views.py | from django.shortcuts import render
from django.http import JsonResponse, HttpResponse
from django.views.decorators.csrf import csrf_exempt
from django.core.files.storage import FileSystemStorage
from .forms import ImageForm
from django.db.utils import OperationalError
import os, sys
import subprocess
BASE_DIR = os.pa... |
07b4c26be73b64c9d13120448d3137c1a7994eed | 09b374dd111f3b4b36a925b940a567e1c5c5739e | /NCF/load_data.py | 5c7fd82382a39bb32a47c84d7d38aa319eadeb9c | [] | no_license | IEGraph/GNN_Sizheli | 7badbf5a56ecec4363f1cf21a924c771e74102e8 | dbc2bdd43442f4af219916dea7975ec31683472b | refs/heads/master | 2023-01-23T13:44:19.400683 | 2020-12-09T07:15:05 | 2020-12-09T07:15:05 | 289,825,089 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 6,697 | py | load_data.py | import pandas as pd
import numpy as np
import torch
from torch.utils.data import DataLoader, Dataset
import random
from copy import deepcopy
import scipy.sparse as sp
random.seed(0)
class UserItemRatingDataset(Dataset):
"""
Wrapper, convert <user, item, rating> Tensor into pytorch tensor
"""
def __init__(self, use... |
9a5030bbba0a7a4d4990e0cf0c78398632720274 | f5a67863e828d11408f5cb5cdd55dc881f472712 | /scripts/craft_adv_samples.py | e387edc262f28dbc97ad65b1cff9e6a94a5954b4 | [] | no_license | tsehsuan1102/pytorch-detecting-adversarial-samples | d208494d0e753f1cdc6bdde3428c77097870d9f0 | d4eec1f61f6125dab8206fe884cf9240ab5da196 | refs/heads/main | 2023-02-16T18:06:13.635516 | 2021-01-15T18:37:44 | 2021-01-15T18:37:44 | 328,111,021 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 4,309 | py | craft_adv_samples.py | import os
import argparse
import numpy as np
import torch
from torch.utils.data import Dataset, DataLoader
import torchattacks
import pickle
from detect.util import get_data, get_model, evaluate
from detect.attacks import (fast_gradient_sign_method,
basic_iterative_method,
... |
95892a271e67ad89141dcec01b483b7a94f8849c | 9ee7378815f6542c0766af652dc52cb519ea0129 | /biochallenge/apps/challenge/migrations/0006_challenge_script.py | 971006b7c1a39348da94c5df3dfec8c2c27002b7 | [
"BSD-2-Clause"
] | permissive | bio-ontology-research-group/biochallenge | 27433a8c4f0622dc11df4abad16dead95ba73c67 | 9de86af3935547ab2eb5e283a07a2550f028c68b | refs/heads/master | 2022-12-14T13:04:25.418252 | 2021-02-10T06:16:42 | 2021-02-10T06:16:42 | 205,980,478 | 0 | 1 | BSD-2-Clause | 2022-11-22T07:02:39 | 2019-09-03T03:19:54 | HTML | UTF-8 | Python | false | false | 525 | py | 0006_challenge_script.py | # Generated by Django 2.2.5 on 2019-09-06 03:03
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('challenge', '0005_auto_20190905_0257'),
]
operations = [
migrations.AddField(
model_name='challenge',
name='script',... |
c2acb7b590fb4df35d35df31cedcbfe6d4cb2361 | 55951f0948de5266710090398c5b81b22eef8e66 | /findKthLargest.py | 4d2727b32c411684d30a156092d5e62b6cf71a83 | [] | no_license | lingyk/Code_Interview | 7f951aac3052b31db935f5bbbcb3fe8b86cefbd9 | 9eb595072a7d5dd9d296e349b8195785dc45effd | refs/heads/main | 2023-03-10T09:24:22.918839 | 2021-02-24T21:36:16 | 2021-02-24T21:36:16 | 323,773,153 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 306 | py | findKthLargest.py | import heapq
class Solution(object):
def findKthLargest(self, nums, k):
return sorted(nums)[len(nums)-k]
def findKthLargest2(self, nums, k):
return heapq.nlargest(k, nums)[-1]
print(Solution().findKthLargest([3,2,1,5,6,4], 2))
print(Solution().findKthLargest2([3,2,1,5,6,4], 2)) |
6a1fca4771f917b6049dff8b07017f34ae561054 | 55b3ca2e22d3fda0941048b55fb5132de7df7278 | /chapter_2/3_HVAC_control/PID_tank.py | e936c12826e0db5528487c0d0f812f68c642e6f7 | [] | no_license | eddes/buildingphysics | e1ff49105b477815983b8b521e5544a0c1b96502 | 71eee23038fafb09f140b972e88d0b0934ba1eb3 | refs/heads/master | 2022-09-30T15:26:29.057738 | 2022-09-05T11:35:21 | 2022-09-05T11:35:21 | 253,423,637 | 26 | 8 | null | 2022-09-05T11:35:22 | 2020-04-06T07:19:06 | Jupyter Notebook | UTF-8 | Python | false | false | 3,341 | py | PID_tank.py | # -*- coding: utf-8 -*-
"""
Created on Thu Mar 26 14:15:51 2020
@author: walthere
"""
#quelques couleurs
rouge_A='#C60C2E'
vert1_A='#005157'
vert2_A='#627D77'
vert3_A='#9EB28F'
vert4_A='#C5E5A4'
medblue='royalblue'
gris1_A='#595A5C'
coule=[rouge_A,vert1_A,vert2_A,vert3_A,vert4_A,medblue,gris1_A]
import numpy as np
imp... |
73317225101a1080446e15faa6f182dd4d298b8c | 5c2a1af59da65a0b01f7ef08adb742fbea387590 | /Analysis/service.py | 5a4a003ac8627330ffe447da9e37753f4e0d59d5 | [] | no_license | vs333/qps_auto_analysis_py | 7e64db36b6ad7d3a0e8ca9eb0f3c6b430617284d | 1b23a75bd5b834e13f4f747d539c7d16f53b782e | refs/heads/master | 2020-03-18T00:10:30.553411 | 2018-05-19T17:02:57 | 2018-05-19T17:02:57 | 134,081,529 | 1 | 1 | null | null | null | null | UTF-8 | Python | false | false | 1,585 | py | service.py | # -*- coding: utf-8 -*-
import Http.Service
import Collect.service
import datetime
class Base(object):
def __init__(self, nginx_ip):
self.date = long(datetime.datetime.now().strftime('%Y%m%d%H%M'))
self.htp = Http.Service.Base(nginx_ip)
self.nginx_ip = nginx_ip
def converter_qps(self)... |
1ec372218ddf5f1b505db1b5b685aec252a48f34 | 17c2f3264ffe9ba9bfb4a6977a5c472bd0a37760 | /Funksiyalar/masala2.py | c33e72ea072a89dd1b1a66ed66436747cc5562a6 | [] | no_license | bekzod886/Python_darslari | 3a65c324ceb9c25c1412fede2601c6c3700038c1 | d10ad869f9f2fc93c8f6776ecd41d3296a9d44e1 | refs/heads/main | 2023-06-24T06:02:58.617953 | 2021-07-26T09:06:21 | 2021-07-26T09:06:21 | 381,596,236 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 67 | py | masala2.py | def ism(*name):
print(name[-1],name[-2])
ism("Davron","John")
|
54a3aa0e72648bf4eedc2db1c8ba78bd11e6258c | 5fc2c05f6fd26a7dcf9ee79ba96ac23835d9ced2 | /src/profiles_project/profiles_api/views.py | a8f3816ff564e2357993cbb767d4b3b38973ab3d | [] | no_license | stephencockerill/profiles-rest-api | 7d597b112e24c04d4656b75ffee9ce0da9ad9709 | 1f43bb5155b20d3bac655b0a6f05dbfb0bf7cb25 | refs/heads/master | 2021-09-07T08:16:17.297683 | 2018-02-20T03:05:37 | 2018-02-20T03:05:37 | 117,587,390 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 4,477 | py | views.py | from django.shortcuts import render
from rest_framework import (
viewsets,
status,
filters
)
from rest_framework.authentication import TokenAuthentication
from rest_framework.authtoken.serializers import AuthTokenSerializer
from rest_framework.authtoken.views import ObtainAuthToken
from rest_framework.permission... |
a592bb965c57578adc788e3207d2b1826599793f | 60f8b6ccbd45dd152d6c0b605136e0909e8e709d | /rating/models.py | ea3bf8c36daa34518c11534131e60a1772c9348c | [] | no_license | captain-noob/Photogram | d42a97bfc4cbf42ceef592d8c24654218616be63 | 64c4b7a5471b608185275e64d9e0945f0ebf1327 | refs/heads/master | 2022-07-28T08:46:18.777481 | 2020-05-24T07:17:37 | 2020-05-24T07:17:37 | 266,488,124 | 5 | 0 | null | null | null | null | UTF-8 | Python | false | false | 585 | py | models.py | from django.db import models
from accounts.models import user_detials
from upload.models import imguploads
# Create your models here.
class likes(models.Model):
cus_id=models.ForeignKey(user_detials,on_delete=models.CASCADE,related_name="+")
photo_id=models.ForeignKey(imguploads,on_delete=models.CASCADE,relate... |
2b481a1befbcdeccc7c8da9df8d908890cf24cc4 | 1618ca511f4b62623987b2d1f24d38491649242c | /I Trimestre/secuencialesPython/precioConDescuento.py | 0e38285c9b81194830a8b070ea5ee2fdaa05ca8c | [] | no_license | jlalvarezfernandez/Python | 446024a473d88ea0630d668658732fb9a56e5f51 | 9151c20260c4321bf6b983a833e82d6d0aee5fab | refs/heads/master | 2020-12-13T07:51:21.517408 | 2020-05-22T12:37:31 | 2020-05-22T12:37:31 | 234,352,971 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,083 | py | precioConDescuento.py | # Programa: Ejercicio9 PrecioConDescuento.py
#
# Proposito: Una tienda ofrece un descuento del 15% sobre el total de la compra y un cliente desea saber cuanto deberá pagar finalmente por su compra.
#
# @author: Álvarez Fernández José Luis
# Fecha : 10/10/2019
#
#
# Variables a usar
# precioInicial (númerica): almacenar... |
f656cb581568724296936b903fcd489929037ef7 | c7591bfb3a95818eae821531c4bcbacde7f00e6b | /config_3.py | dbac0381788905be2b3079d3456b83aff16726f2 | [] | no_license | jhanarato/building | 4b2368120d565a7234a081e94ad051f51197b930 | 576af770523513a58c7d8777b7af1d769cf3c2d1 | refs/heads/master | 2022-12-18T13:17:24.236376 | 2020-08-30T01:42:42 | 2020-08-30T01:42:42 | 290,648,395 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,395 | py | config_3.py | import sections, insulation
description = "Bradford with Rockwool for Bedroom Exterior Walls"
# A list of tuples matching insulation product to section to insulate.
config = [(sections.ne_bedroom_n, insulation.rockwool_90),
(sections.ne_bedroom_e, insulation.rockwool_90),
(sections.ne_bedroom_s, i... |
5fcfa42e84ab30206702f303c8db16dc5205ebd4 | a8b6e709d6fac5268938200cd50a0aadf77a9a14 | /blueprints/courses.py | 36211768daea83b752ebde5e345107aac41f5db8 | [] | no_license | coprice/HCFA-Backend | 633b26ff939e13f9e7bbef3bc97f3665ddeb97b6 | 6f4d47301110411ea9d8c12f893e39266387b2c2 | refs/heads/master | 2022-12-10T17:32:52.366235 | 2019-02-28T14:37:22 | 2019-02-28T14:37:22 | 140,915,836 | 1 | 0 | null | 2018-07-30T21:04:17 | 2018-07-14T04:30:32 | Python | UTF-8 | Python | false | false | 10,552 | py | courses.py | from sanic.response import json as json_response, html, redirect
from sanic import Blueprint
from mailer.mailer import mailer
from pusher.pusher import pusher
from template_loader.template_loader import template
from db.db import db
courses = Blueprint('courses')
baseURI = '/courses'
# GET - /courses?uid={uid}&toke... |
509b53d06de3cf21f5cdb7d39a0bbd800e0730f7 | d6f50a9aa40272d66d17a4561f4252e70a80e5aa | /Model.py | 7f20c76090a621c7aac220da428e9cd34b427719 | [] | no_license | ManUtdMoon/Gym-Carla | 96f848e9c9d86d2888a77b67d16a1836c06b5621 | cb2e69c825af5bfb93da153d2c5f2933739f92b3 | refs/heads/master | 2022-07-05T13:26:58.447608 | 2020-04-06T07:32:31 | 2020-04-06T07:32:31 | 243,408,588 | 2 | 0 | null | null | null | null | UTF-8 | Python | false | false | 25,303 | py | Model.py | from __future__ import print_function
import torch
import numpy as np
import torch.nn as nn
import torch.utils.data as Data
import torch.nn.functional as F
from torch.distributions import Normal
import math
'''
class QNet(nn.Module):
def __init__(self, args,log_std_min=-6, log_std_max=6):
super(QNet, self)... |