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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
0873243676b2553a6e80e55a1769459f2757dfc3 | a5fb82dd0c31efcc1ce000d33c0cb6f1110b9eeb | /sewa/migrations/0086_auto_20210613_0014.py | 6ba20ddc1e502ec9a47d3ec19ad7d3400bf20331 | [] | no_license | hanivia/bumdes | 065129e79b93c40364f713c7e686b393f9db73ed | c4c31424b7ef005f78e3bd780c6ad313d39fb7e7 | refs/heads/master | 2023-07-13T22:47:41.674917 | 2021-08-16T05:15:00 | 2021-08-16T05:15:00 | 396,621,470 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 440 | py | 0086_auto_20210613_0014.py | # Generated by Django 3.1.2 on 2021-06-12 17:14
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('sewa', '0085_auto_20210613_0013'),
]
operations = [
migrations.AlterField(
model_name='orderitem',
name='status',
... |
cf080bf5c470b5f57ccad71f5174e75408dc9650 | 1f413ba920a5882122175afbd4bec79c218669be | /Scripts/plot_alpha_critical_dependencies.py | 98e84f05e51e5054e36241c14e552b90837d1cbf | [] | no_license | leonel11/KaschenkoEquation | 3b7f6226d23791999a918cb52831494860bd0732 | 2cdec729f999b5c1f5de91015f62a0cfb2bc1012 | refs/heads/master | 2023-04-27T13:27:18.870056 | 2023-04-25T10:01:35 | 2023-04-25T10:01:35 | 124,406,369 | 0 | 0 | null | 2022-06-22T04:09:46 | 2018-03-08T14:55:00 | Rich Text Format | UTF-8 | Python | false | false | 3,416 | py | plot_alpha_critical_dependencies.py | '''
Script for visualization all critical dependencies of alpha values
(for DIVERGENT and 2 OSCILLATING cases of loss stability of zero solution)
for LINEARIZED BOUNDARY-VALUE PROBLEM
'''
import pandas as pd
import matplotlib.pyplot as plt
import os
import utils
x0 = 0.49
AFTER_TANGENT = True
DATA_PATH = f'../Trace... |
1e102fa60d6159da43d28bba0cd23c843947b73d | 63b7671b5296b97aa5271d076540e0d81b85d599 | /strongr/clouddomain/handler/impl/cloud/opennebula/deployvmshandler.py | a3afe7fea3d74610a6be7d1d99a358aa3de30e78 | [
"Apache-2.0"
] | permissive | bigr-erasmusmc/StrongR | bd30d7f41c1fef87bd241c0c4ea059f88c5c426e | 48573e170771a251f629f2d13dba7173f010a38c | refs/heads/master | 2021-10-10T10:17:15.344510 | 2018-11-20T10:21:50 | 2018-11-20T10:21:50 | 112,336,650 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,406 | py | deployvmshandler.py | from strongr.clouddomain.handler.abstract.cloud import AbstractDeployVmsHandler
import salt.cloud
import time
import strongr.core
import strongr.clouddomain.model.gateways
class DeployVmsHandler(AbstractDeployVmsHandler):
def __call__(self, command):
overrides = {}
overrides['memory'] = command... |
d85d049bc19e2af2bfc7884dc7cd0834ceeba41b | 2d1ed64ff8d8553759cda295c68540980ddeff51 | /camera.py | c1869aa4e0b2ca5fec0deb4ca206e4c1fc7a870b | [] | no_license | ElleTojaroon/RaspberryPiProjects | 1d4913fc3cc051e097838aff675856138c8bee94 | 790567f0802f169459e72804bc3bc37003ce732a | refs/heads/master | 2020-12-30T09:58:46.451810 | 2020-06-24T19:48:46 | 2020-06-24T19:48:46 | 99,249,190 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 93 | py | camera.py | import picamera
camera = picamera.PiCamera()
camera.vflip = True
camera.capture('image.jpg')
|
a0474e9f41c298bfb18a6cfbd9eb49ded6d24f4f | 5462142b5e72cb39bea5b802dd46f55357c4ea84 | /demo.py | c89c2fb5fd08c579d90b451790b757288d865047 | [] | no_license | qqmadeinchina/myhomeocde | a0996ba195020da9af32613d6d2822b049e515a0 | 291a30fac236feb75b47610c4d554392d7b30139 | refs/heads/master | 2023-03-23T05:28:53.076041 | 2020-08-24T08:39:00 | 2020-08-24T08:39:00 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 357 | py | demo.py | import re
import urllib.request
def getdate():
for i in range(26700,26716):
url="http://www.risfond.com/case/fmcg/%d"%(i)
html=urllib.request.urlopen(url).read().decode("utf-8")
page_list=re.findall('<div class="sc_d_c">(.*?)<span class="sc_d_con">(.*?)</span></div>',html)
print(pag... |
2d7cecb7d4b8dde5262a97089cba8cb0cc2cdf9c | 72380f040ed939beef750ce11e105ee768827be3 | /dash-app/server.py | 260b7476753c512a96cd456858e5728556f32611 | [
"MIT"
] | permissive | ducnd58233/pipeline-asm-1 | 5fa5a151528173e988964378ebf5cf208a206726 | e9b505d80c6efe6c0343e0a0f32d54f8fdb214a6 | refs/heads/main | 2023-07-20T10:56:43.147389 | 2021-08-19T04:23:26 | 2021-08-19T04:23:26 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 268 | py | server.py | from app import make_layout
from flask_failsafe import failsafe
@failsafe
def create_app():
from maindash import app
app.layout = make_layout()
return app.server
if __name__ == "__main__":
create_app().run(host='0.0.0.0', debug=True, port=8050) |
f57638fade8d207ade903b2a5e888926031aa998 | 1b67719834d1386a32a8685dbd604c440d44ce02 | /write_numbers.py | 1968ed55673dc0df9d4434dae4eecfaf69d04cb0 | [] | no_license | kovacsav/python-training-2021-10-13 | 96f0339fea83135d27b2f4c725b95f3e2effbf18 | f8668acb718514a5ede21ef630a6d52610a45b1e | refs/heads/master | 2023-08-27T18:43:23.514834 | 2021-10-19T14:00:10 | 2021-10-19T14:00:10 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 207 | py | write_numbers.py | from os.path import isfile
print(isfile("numbers.txt"))
print(isfile("numbers_grrrr.txt"))
with open("numbers.txt", encoding="utf-8", mode="a") as f:
for i in range(10):
f.write(f"Szam: {i}\n") |
d5e90ea6b3dd86837e7f6e236804a18859f15179 | e9326a94d4b9cd15f04b88574d2820fb211fef9e | /01 - Company_Investor_df.py | 607c5cc3fbddc9b232b53face5df65a3514326ee | [] | no_license | ysjamesjang/Blockchain.SharktankProject | c8e7e6ec0eaf2061e4079c87a3915cfcdf729b18 | 1ddcfdfadf1367f00208e1d4d20efefca6c1b462 | refs/heads/main | 2023-08-14T17:45:07.498722 | 2021-10-09T12:58:25 | 2021-10-09T12:58:25 | 412,287,844 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 18,187 | py | 01 - Company_Investor_df.py | # Initializing imports.
from pathlib import Path
import pandas as pd
import numpy as np
import datetime as dt
import streamlit as st
pd.set_option('display.max_colwidth', None)
st.sidebar.title("GET FUNDING")
st.title("Shark Tank Smart Contract Marketplace")
st.write("Are you in need of funding for your next project... |
1bf502a70f5243128b02e670478637fb01a764b0 | e4a56d5828653b76d7652d70aa3e869619ffc1c7 | /Number riddles.py | 5fc893158b3eba202e1851eb37491907ca0813d8 | [] | no_license | Innocentdoge/GameCube | e149f7bf379d43138918cd16c718429b957436be | 7a327e3db04ecb941f8ed3531946b2e787211a0a | refs/heads/master | 2020-08-26T15:38:25.276783 | 2019-10-24T12:33:19 | 2019-10-24T12:33:19 | 217,058,331 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,030 | py | Number riddles.py | import random
def riddleGame():
print("You enter a square room with nothing but a piece of white paper in the middle. The paper reads:\n"
"\nAnswer the riddle for you to proceed\nThe answer to the riddle is a number you see\nWhen multiples are present,"
"\nthe answer is low to high with ... |
d3fdff6f9c6134d095dfc9b2d0fd3308209e3702 | 8cf50ef9e680fe09587a63f87b15179fe5b9a1d7 | /back/api/homework_api/urls.py | 5e93865b1ddff697eee5a75d2e8752f4cf0312df | [] | no_license | EgorS2000/TestTaskLearningResource | 227620f39bbbe63d6dbd5ba3c976ab3636a46c95 | 5cd376e8c5f6f5551906915a0be7baa0a72821ca | refs/heads/master | 2023-04-13T19:49:01.734492 | 2021-04-16T13:21:40 | 2021-04-16T13:21:40 | 358,239,772 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 390 | py | urls.py | from django.urls import path
from api.homework_api.api_views import (
GiveAnswerHomework,
AssessHomework,
)
urlpatterns = [
path(
"homeworks/<int:id>/answer/",
GiveAnswerHomework.as_view(),
name='answer_homework'
),
path(
"homeworks/<int:id>/answer/mark/",
As... |
7132427ae419af34f960243e775cd70ff3325261 | 0cafcffc95d8681417f1f9a7830f3e4cfd312ec2 | /productcategory/urls.py | 4fdcacaaa490a1f3d9711ff2015e508b7a9bbe36 | [] | no_license | jackiedabekar/CategoryProductTask | 4d5351f06bf0f6e254bf76e164dbd84200d152fd | 3c2b4e4ae2b2b2ab6656f4e2f970bd554f7eb4af | refs/heads/master | 2023-05-01T05:35:41.062074 | 2021-05-13T12:48:46 | 2021-05-13T12:48:46 | 361,434,571 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 752 | py | urls.py | from django.urls import path, re_path
from .views import CategoryListCreateAPIView, ProductListCreateAPIView, CategoryProductListAPIView, ProductBulkUpload
app_name = 'productcategory'
urlpatterns = [
# Endpoint To Display All Product With Their Catrgory
path('product/', ProductListCreateAPIView.as_view(), n... |
4f4af949969d176f2eb583b361d8cd53b09f50ba | 4fa1f7c6bc31f898ebb04f43cb63a3d202b57ba0 | /APP/view/auth.py | 44d2df23f8b4942744069bccc252fb8d148b9e31 | [] | no_license | LOGIC0805/Personal-Collections-Website | 1b4d80431de1878c8154a549b563499fb9ddac38 | a2048a237805adc265949a189cbe2a243e3830c1 | refs/heads/master | 2023-02-13T05:16:37.343942 | 2021-01-15T07:29:17 | 2021-01-15T07:29:17 | 325,418,857 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 4,344 | py | auth.py | from flask import request, Flask, jsonify, Blueprint
import json
from APP.view.database import db_session
from APP.view.model import Users
bp_auth = Blueprint("bp_auth", __name__,url_prefix="/bp_auth")
@bp_auth.route('/login', methods=['POST', 'GET'])
def login():
if request.method == 'POST':
phonenum = r... |
3fa6a61ac781e527da1b3ad2045d38b6ca696f82 | 32167eb2b1282584bd9e9ad8a0daeacef256352e | /lib/tinysegmenter/__init__.py | abc0fe6a52a6161310da592be3a806ddd40b5cc1 | [
"BSD-3-Clause"
] | permissive | ngr-t/SublimeJapaneseWordJump | 5d6b122bddbb3b955f1b9806e50e850073727f7b | f726b1286a03ee8aaa22da170d575fe2003b8a16 | refs/heads/master | 2021-01-19T03:30:10.880671 | 2017-04-06T15:15:36 | 2017-04-06T15:15:36 | 87,319,331 | 0 | 1 | null | null | null | null | UTF-8 | Python | false | false | 68 | py | __init__.py | __all__ = ["TinySegmenter"]
from .tinysegmenter import TinySegmenter |
fa6ba32cdb54b447e9bbc6696e2b07c7a1512ee7 | 6062ba0947af6a2534df10e2dc3e3d7b6a86f42f | /web/migrations/0006_auto_20190322_1652.py | 2cb0b86c52f247074eedb93987c7d1b921bbded3 | [] | no_license | pqok/month_card | 4c3874b3092ec10be601dd7275453681738f01d7 | 897690837052777f23a0f6dff49949fc42d18f0b | refs/heads/master | 2022-01-09T23:41:58.316195 | 2019-04-02T04:53:18 | 2019-04-02T04:53:18 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 934 | py | 0006_auto_20190322_1652.py | # -*- coding: utf-8 -*-
# Generated by Django 1.10.3 on 2019-03-22 08:52
from __future__ import unicode_literals
import datetime
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('web', '0005_auto_20190322_1648'),
]
operations = [
migratio... |
24dee9ab157247d3c6d53f32bd4ef5f88239178e | 3a5005e2adb560896a0c8b03f2392cc58186eef9 | /menu.py | e1930935fd4c9214da40a978c2722209b3853249 | [] | no_license | robbertvdzon/pitest2 | f1d14c69a9f8f247faa00a916f4902ee0e6a8c5b | 7645ebdb447ccf7c14b31435a40289683fd4346a | refs/heads/master | 2021-05-04T00:55:41.697977 | 2018-03-07T20:24:50 | 2018-03-07T20:24:50 | 120,356,086 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 602 | py | menu.py | from display import *
from time import *
class Menu:
def onMessage(self, event, message):
print 'got message in menu: '+event+' '+message
def initMenu():
global bus
global menu
menu = Menu()
bus = getEventbus()
print "call register:"
bus.register(menu)
print "Init menu:"
re... |
1bc9584ecf076152bd9eaa3ae4f297d5a54a7ba6 | e4c1e5c140b9f08408b14d30823f1ecfe68d87ca | /tree/find_paths.py | 4dad71b3f050e99fffc429b30f88340cf00ae39b | [] | no_license | gtang31/algorithms | 949f81d29d68aef9cc92fea0f1ae8708ed0b8518 | 5347a98a61efbfef75e3e27ac564c423c4ec25bb | refs/heads/master | 2021-09-25T22:52:58.352224 | 2021-09-09T00:54:25 | 2021-09-09T00:54:25 | 88,106,767 | 0 | 1 | null | null | null | null | UTF-8 | Python | false | false | 1,585 | py | find_paths.py | """
Given a graph, represented as a dictionary of lists, find all paths between the
start and end node. We can solve this problem using DFS or BFS
"""
__author__ = "Gary Tang"
def get_all_paths(start, end, graph):
"""
@param start: string or int representing the starting node in the the graph
@param end: ... |
5cd28a46775ed38ce88658ce97fc45504d971900 | 6017802a27c2170a81838faffe65a450081ef142 | /addons-own/website_sale_donate/models/frst_zgruppedetail.py | c9fa8f0aa6d6d69e5c74c17544ddef40b694acb0 | [] | no_license | OpenAT/online | 5fe6f997ab6a37cfb90b7651a6d3cef81ff35e73 | de4a1fea0b4e60226fc51bd731388e88d2e25b3f | refs/heads/o8 | 2023-08-06T21:40:37.006251 | 2023-07-19T15:07:33 | 2023-07-19T15:07:33 | 50,013,003 | 5 | 9 | null | 2023-02-16T00:33:21 | 2016-01-20T07:34:28 | JavaScript | UTF-8 | Python | false | false | 502 | py | frst_zgruppedetail.py | # -*- coding: utf-'8' "-*-"
from openerp import models, fields, api
# Fundraising Studio groups
class FRSTzGruppeDetailWebsiteSaleDonate(models.Model):
_inherit = "frst.zgruppedetail"
product_template_ids = fields.Many2many(comodel_name='product.template', string='Product Templates')
#product_product_ids... |
f1f78a85ebe19530e6647cb463cfda70a88cec7e | 961c231dfd4f98cd3e991d16866550bcf46a4049 | /simplebot.py | 04a94a5d853cd1e0e5addaea9d9fcedf522a699b | [] | no_license | lokkey/pyQ3 | 93c0983df90628ad32b5acbe4ce9d30aaad38535 | cee7d1b08fcc19f1227451a9bd1a25f43dbc1f1a | refs/heads/master | 2021-01-22T23:15:22.461883 | 2015-05-11T11:07:56 | 2015-05-11T11:07:56 | 35,417,339 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 456 | py | simplebot.py | #### Libraries
# Standard library
import random
class SimpleBot:
"""
Valid movement values. 0 indicates no movement.
8 1 2
7 0 3
6 5 4
"""
def __init__(self, name):
self.name = name
pass
def act(self, myX, myY, oppX, oppY, frags, oppFrags, health, oppHealth, myRockets, time, rocketMap, healthPack1, heal... |
47b352a331ddd1fdc8da7acfb7f75397ba92d5e4 | 1990d5ea646234feb342cbe1438b12e110cc8fbf | /2 - Regresión/2_2 - Regresión Lineal Múltiple/Regresion_Lineal_Multiple_Manual.py | d78166a259f6224992f0af300fb252374366948f | [] | no_license | julianchaux/MachineLearning | 02127331d46e6e99ed77fcf685a00f5cc765a824 | 53fc8d184b30cb158b25d6215a6b1dbc4bea9ac3 | refs/heads/master | 2023-06-28T12:21:39.394583 | 2021-08-05T03:58:24 | 2021-08-05T03:58:24 | 382,650,238 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 8,199 | py | Regresion_Lineal_Multiple_Manual.py | # -*- coding: utf-8 -*-
# Regresión Lineal Múltiple
# Importar las librerías
import numpy as np
import matplotlib.pyplot as plt
import pandas as pd
#----------------------------------------------------------------------------------------------
# Importar el dataset
dataset = pd.read_csv("50_Startups.csv")
# X -> Mat... |
d1734f548634e91bf8742c0aa320d2884ca5d107 | 59215aedab58405b0214c99f32ff538bebbf0f5f | /stats/gatherStats.py | 53d558182b34afb7f2b8c1ac4df98cf879772baa | [] | no_license | GeorgiosNikolopoulos/NeuroLog | 1b2908d507d3a2644798c31fac7d67830d5261a7 | 7789e07f68e025bc478537d492d95a7b061577f4 | refs/heads/master | 2022-12-11T11:27:45.089224 | 2020-09-10T09:32:54 | 2020-09-10T09:32:54 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 6,180 | py | gatherStats.py | import json
from pathlib import Path
from statistics import mean
import argparse
import matplotlib.pyplot as plt
import numpy as np
import re
# open all projects and run the three methods
def main():
with open(fileLoc) as json_file:
logs = json.load(json_file)
calculateGlobalStatistic... |
86e39fe7791063193807af70eb8ae7e1e684bb7a | a23ebf4fc9c3f93d42b0014435caec1fd7fe460a | /trunk/project/dargent/old-admin/views.py | 003607561147fbf1becb8b66bde552e705af19f7 | [] | no_license | arcofam/dargent-shop | 13cc553cba00e22b1b98b5bacb62d6183d8f531b | 45d36045257c8012cee3bb8da5a7051f0025d789 | refs/heads/master | 2017-05-25T00:02:36.373548 | 2013-11-26T22:11:54 | 2013-11-26T22:11:54 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 5,984 | py | views.py |
from products.models import ProductCategory
from productprops.models import Product, Producer, Country
from dargent.views import TemplateView, JSONView
from forms import AddProductForm, \
AddProductCategoryForm, \
AddProducerForm, \
AddCountryForm, \
RenameProductCategoryForm, \
RenameProducer... |
7f97ec5df6a0bd91a339344aec689fa4d7b2807d | 4511d576fbdc5572786247448141b2d5af111245 | /pysrc/DBPediaSparql.py | e3e7e0b49895420f3af8caa39606b8bdc4b11b1e | [] | no_license | georgebirsanuc/Tema3-IA | 0727373202c82183c7738447ef54095086059c48 | 48127c0ed1668c8d6a123a61043aa2c6f6d5dbc0 | refs/heads/master | 2020-07-26T03:40:48.112351 | 2016-11-16T15:35:16 | 2016-11-16T15:35:16 | 73,736,581 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,848 | py | DBPediaSparql.py | from SPARQLWrapper import SPARQLWrapper, JSON
import xml.etree.ElementTree as Et
def word(s):
first=0 # 0 no, 1 yes
tempor=''
s=' '.join(s.split())
for i in range(0,len(s)):
if s[i] != ' ' and first==0 :
# tempor = tempor + str(s[i]).upper()
t="".join(s[i].upper())
... |
a92ad25965a6997a145e3d8f1493bc24121d86d5 | fba9e087f1061462ef4279b9ffd973f42550628a | /filamentcolors/models.py | 3a356ef596cd4994b582c53550dedea1a9829241 | [
"MIT"
] | permissive | itsthejoker/filamentcolors.xyz | 0279758e2ebb476991138f31bde6d4afc0b9a001 | c0b7a35ad4bce8df13788dff41d0f4ef908a6bd1 | refs/heads/master | 2023-08-07T13:54:36.727531 | 2023-08-05T16:37:05 | 2023-08-05T16:37:05 | 162,664,620 | 31 | 2 | MIT | 2023-07-17T15:23:11 | 2018-12-21T04:13:21 | Python | UTF-8 | Python | false | false | 29,487 | py | models.py | import os
from io import BytesIO
from typing import Tuple, List, Union
import cv2
import numpy as np
import pytz
from PIL import Image as Img
from colormath.color_conversions import convert_color
from colormath.color_diff import delta_e_cmc
from colormath.color_objects import LabColor, sRGBColor
from colorthief import... |
89a955e6bd4a33353d962d45b8da5c9dccea801b | 021054c31143cbf439689a01be0b6838d52666c0 | /build_dict.py | f7e25787daac8e54c544ec89a4d1f2c998001162 | [] | no_license | oliveclove/fuzzy_quantization | ef7a44b5afcb847e99afd2512d6248b6c256ee00 | f820ec40e16e67022d6f25cd193801c72ac9ecb8 | refs/heads/master | 2020-06-06T12:37:49.202818 | 2019-06-19T14:26:19 | 2019-06-19T14:26:19 | 192,742,031 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,565 | py | build_dict.py | # -*- coding: utf-8 -*-
"""
Created on Thu March 24 16:14:25 2019
@author: yanjun zhou
"""
#sentiDictionay类用于构造情感词典
import thulac
class sentiDictionary:
def __init__(self):
pass
#读取文件中的内容
def readWords(self,filePath):
wordlist=[]
with open(filePath,encoding='utf8') as f:
... |
a255d8810eb21de507be0f791eab039c80ba08e4 | 43d8edbea1b7060317d0f0aa09b20acd63ebdc54 | /tests/filters/test_exif.py | da37d5867f0d78fdfc177a881118700f3263bb3b | [
"MIT"
] | permissive | iburunat/organize | 33cc6511a1a434dda05183228e31f9a93f5a0e63 | cf33a1103c3890aa3c0329a41c875165cb4e6e0a | refs/heads/master | 2023-08-08T22:19:43.945920 | 2023-07-18T20:13:55 | 2023-07-18T20:13:55 | 265,134,732 | 1 | 0 | MIT | 2020-05-19T03:37:13 | 2020-05-19T03:37:12 | null | UTF-8 | Python | false | false | 2,429 | py | test_exif.py | import pytest
from conftest import ORGANIZE_DIR
from fs import copy
from organize.core import run
RESOURCE_DIR = str(ORGANIZE_DIR / "tests" / "resources" / "images-with-exif")
@pytest.fixture
def images_folder(testfs):
copy.copy_dir(RESOURCE_DIR, "/", testfs, "/")
yield testfs
def test_exif_read_camera(im... |
4fef8a1dbb2b9f183154309deea7c3e0a6183bec | 0a3f99daceddbc6e710da5b24693f822359405ef | /v1/classes/user.py | 2f884d763bc95f8eb0d7afaec6190bbc47bb11a4 | [] | no_license | ES94/labs-api | 21569eaee36816b105ae121ff5e5b51091d0bf15 | b38409540f16d0e423f9ccfd9e75a36aca20e2d7 | refs/heads/master | 2022-11-04T21:16:25.124947 | 2020-06-29T18:27:52 | 2020-06-29T18:27:52 | 273,248,214 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 6,358 | py | user.py | #!/usr/bin/python3.5
# -*- coding: utf-8 -*-
# Librerías
from collections import OrderedDict
class User:
@staticmethod
def get_ordered_options(user_options):
"""
Returns user options as a list of ordered dictionaries.
Keywords arguments:
user_options -- user menu options
... |
863a802ac3d73b40e6d2644d48b366a6e288bd78 | 737b5b330593390928a28d03cd56cb83210d3e95 | /matrix_scroll.py | e4fe3fa0b293acfdd6ed26024042a87bf4ebb1c4 | [] | no_license | asanchez78/max7219 | 88c729eca7ac64062f14a7e42fc0d8e5fb3f7fea | f19fc9d9ea74cf6efcb124f2c5e3f61b5e07b11a | refs/heads/master | 2021-01-13T03:18:02.251395 | 2017-01-25T15:19:20 | 2017-01-25T15:19:20 | 77,587,116 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 642 | py | matrix_scroll.py | #!/usr/bin/python3
import max7219.led as led
import argparse
device = led.matrix(cascaded = 3)
parser = argparse.ArgumentParser(description='Scrolls message on LED matrix')
parser.add_argument('-m','--message',help='The message to scroll on the LED matrix',required=True)
parser.add_argument('-r','--repeat',help='Th... |
976463d65beb27cbef159c96ca98bded6dcfa678 | 40ec0306d0b70da83e6f2afacbac934726b30d32 | /scripts/remove.py | 522ee7705db51cd146efdaa5eb0495f7b9695074 | [] | no_license | chu888chu888/Linux-vbox-setup | fa0d25f32ab927f70d015691576f102d3af21843 | 2927e9a1a22d68abec2d207d44b55dfac56bb342 | refs/heads/master | 2020-04-01T21:12:49.775024 | 2013-12-16T20:12:42 | 2013-12-16T20:12:42 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 612 | py | remove.py | #!/usr/bin/python
# setup env
import sys
import os
from subprocess import call
basepath = "/var/www/vhosts"
# get input file
if sys.argv.__len__() == 1:
print 'Please specify a site name'
sys.exit(2)
# input file name
site_name = sys.argv[1]
# remove folder
os.system("rm -rf " + basepath + "/" + site_name)
# r... |
09db4ee3a2b32da72e9255659883f7461ee8386a | 314dff24a2200a4a0a09731d0f61c2cafcf91cf4 | /tests/testrun.py | 334e4c55e0094b0f3e2998ff3c6b3191292adfad | [] | no_license | WritingCenterScheduler/Engine | 9098489c4ee187a96c4d9f05c67e02e700a5802c | 2374d9e2a2d2b6010ee86750aa8e4d1ae8b32800 | refs/heads/development | 2021-01-19T12:12:12.883633 | 2016-10-24T01:30:26 | 2016-10-24T01:30:26 | 69,047,713 | 0 | 0 | null | 2016-10-24T01:30:26 | 2016-09-23T17:46:16 | Python | UTF-8 | Python | false | false | 8,120 | py | testrun.py | import unittest
import numpy as np
from engine import models
from copy import deepcopy
from . import sampledata
class TestRun(unittest.TestCase):
def setUp(self):
self.sm = models.ScheduleManager()
# Create Test Employee
self.tc1 = "010"
self.candidate1 = models.Employee(sampleda... |
249f2e61b38a0e986a6f53b6b3e84623e0954194 | d2516311cf1ab62b627ba2204fb428f0c44073a2 | /p58.py | 3302dcc74456b5fdf4fd98a9a19c8aa34d0f103c | [] | no_license | anbumagan/player | f3818878830c3ae39e8a1430c9b0f60252bb78f0 | 731f1fb9375c0d503831439aee3b2f7bd3af5970 | refs/heads/master | 2020-06-03T00:18:46.687815 | 2019-07-08T14:21:11 | 2019-07-08T14:21:11 | 191,358,242 | 0 | 1 | null | null | null | null | UTF-8 | Python | false | false | 52 | py | p58.py | x11=str(input())
y=str(input())
print(x11.count(y))
|
b0adcd6b661b8ddaf15c5138a3896ee1e99f0b2a | 23070fb44381f5510a187a5b31db623f81df1fe4 | /account/urls.py | 31afce40987525853cd3a3fd8fb7d1154421e44a | [] | no_license | Babak-khezri/Instagram | a47afe51b90897590f4f91cd8f96c82aeb4b420c | 758fc7a569649ff47ac70eb5019fb835959e0689 | refs/heads/main | 2023-08-27T16:43:37.536571 | 2021-10-22T18:18:22 | 2021-10-22T18:18:22 | 357,272,178 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,503 | py | urls.py | from django.contrib.auth import views
from django.contrib.auth.forms import PasswordChangeForm
from django.urls import path
from .views import *
app_name = 'account'
urlpatterns = [
path('login/',login_view,name='login'),
path('signup/',signup_view,name='signup'),
path('logout/',logout_view,name='logout'),... |
be7dc6677f0afd7fa14eb64c541c03368829c732 | 155d9e806919265a83ce5e7e0f13f67333cd0973 | /pushups/tasks.py | 8c1cf8901467348304f079bfa8a600ec647cb80f | [] | no_license | waypaver/pushups | c3084b7c7849307484479b8d53b4e4bd195a85f7 | 08a970504ff94a5900fdbaaef0dfbdfbc6d998da | refs/heads/master | 2021-01-21T00:44:00.346892 | 2014-09-16T16:08:10 | 2014-09-16T16:08:10 | 23,393,344 | 1 | 0 | null | 2014-09-12T21:18:18 | 2014-08-27T14:47:14 | Python | UTF-8 | Python | false | false | 156 | py | tasks.py | from __future__ import absolute_import
from pushups.celery import app
@app.task
def add(x, y):
return x + y
@app.task
def hello():
return "Hello World" |
b2115f558f12ba906f479e2e0c47ca46e484e7f6 | ed521b7a200c56eee6ae19060c81e79ed1562ef2 | /sktime/transformations/series/detrend/_deseasonalize.py | 718b6bacfab90a540b7a21c1cee9eb8c3847affd | [
"BSD-3-Clause"
] | permissive | moezali1/sktime | 0d9438fe6694e4f3650d3c3f95b7eb615c8bf2fe | db0242f6e0230ee3a96d0a62973535d9c328c2ea | refs/heads/main | 2023-08-27T21:50:43.807013 | 2021-11-03T04:59:11 | 2021-11-03T04:59:11 | 424,967,000 | 0 | 1 | BSD-3-Clause | 2021-11-05T13:58:11 | 2021-11-05T13:58:10 | null | UTF-8 | Python | false | false | 18,522 | py | _deseasonalize.py | #!/usr/bin/env python3 -u
# -*- coding: utf-8 -*-
# copyright: sktime developers, BSD-3-Clause License (see LICENSE file)
"""Implements transformations to deseasonalize a timeseries."""
__author__ = ["mloning", "eyalshafran"]
__all__ = ["Deseasonalizer", "ConditionalDeseasonalizer", "STLTransformer"]
import numpy as ... |
0d9a96dde70df105c640f05160b8a19147e18e14 | a9d769da52fc99567bb0a2964cbb16881e24bf8e | /client.py | 7da977c2a2060f34bdb0433d1b2a4fbcde67cc1f | [] | no_license | vmin8/client_server_application | 60abd31111b1cdda740618c3023949e10d536b67 | 31f21e15bbb321b38749890ba98263196441d349 | refs/heads/master | 2021-09-10T21:25:01.166988 | 2018-04-02T13:11:22 | 2018-04-02T13:11:22 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,957 | py | client.py | import time
import socket
class ClientError(Exception):
pass
class SocketError(ClientError):
pass
class ProtocolError(ClientError):
pass
class Client:
def __init__(self, host, port, timeout=None):
self.host = host
self.port = int(port)
self.timeout = timeout
try:... |
b139330e573300ba81f5a1e009317ba3d65c4946 | 892f016bdf8a81d922456543cf32235bd5db90d5 | /python-homework/PyRamen/PyRamen.py | 33598aec7de51fd36acbccab06d28bdea11f7763 | [] | no_license | 1henrys/myBC_output | b5e12c8803e988ea306262577601ee842e18ae1f | 96d1d7258399b082eead207fc7051df35108100e | refs/heads/master | 2023-03-20T20:07:44.184399 | 2021-03-06T21:00:45 | 2021-03-06T21:00:45 | 296,889,060 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 3,686 | py | PyRamen.py | # -*- coding: UTF-8 -*-
""" PyRamen Homework assignment
This script reads in provided menu_data.csv and sales_data.csv into
separate list objects. And then aggregates calculated per product results
into report dictionary:
01-count : total quantity for each ramen type
02-revenue : total revenue for each ramen ... |
e94a5d3e13d349f2e065c0a835637b3bd03065c2 | a25e7a4e642ef48c5864e9abb64ac942e7b71be5 | /notebooks/data/load_data.py | c914b7c6e45a390bf9d3dc5364ecab941ca9c57c | [] | no_license | vipulbjj/fake_news_detection | f06b0f0e86539fbc87f0638db1be0ea4184f16a8 | 48f5ed92282fda69a3ff49d2dab009886c672885 | refs/heads/master | 2020-07-01T02:41:57.561833 | 2019-08-04T15:09:18 | 2019-08-04T15:09:18 | 201,022,343 | 3 | 0 | null | 2019-08-07T09:53:41 | 2019-08-07T09:53:41 | null | UTF-8 | Python | false | false | 254 | py | load_data.py | import pandas as pd
def load_train():
return pd.read_csv('./data/train2.tsv', delimiter='\t')
def load_val():
return pd.read_csv('./data/val2.tsv', delimiter='\t')
def load_test():
return pd.read_csv('./data/test2.tsv', delimiter='\t')
|
d025cbd3dc0f2abce1876ac63058bca03eb11cca | a88a93c239251479b7e3b9725b1e3d5c8b594cd9 | /homealumno-gui/homealumno-gui | adb1277028f3c4659387aebb82cf986f5ab7d6ed | [] | no_license | max-linux/max-desktop | a615118b2ac3d97fe1ab1994013bfafc53a194c8 | b820d284138a834efb3feba783a98f5063dfdf5d | refs/heads/master | 2023-07-21T15:01:45.605007 | 2023-07-17T12:27:03 | 2023-07-17T12:27:03 | 14,561,447 | 13 | 10 | null | 2014-10-13T16:39:49 | 2013-11-20T16:09:54 | Python | UTF-8 | Python | false | false | 3,006 | homealumno-gui | #!/usr/bin/python
# -*- coding: UTF-8 -*-
##########################################################################
# HomeAlumno-GUI writen by MarioDebian <mariodebian@gmail.com>
#
# HomeAlumno-GUI version __VERSION__
#
# Copyright (c) 2010 Mario Izquierdo <mariodebian@gmail.com>
#
# This program is free software; ... | |
428b3420fa6e2b8ea2b2f3fc5889ff9f6ca35207 | 89744412683f818356c0db394b8f1cb9c5235b40 | /02_列表和元组/list_集合.py | 0db22c71458cf12717b7d7941751813b76a46047 | [] | no_license | pleuvoir/python-tutorial | a84835ae1d62446fd54eab2c3a69407ed68e2ba8 | 9785bcf06956bc73c86ce0ab83f5e82e6ab2c3e5 | refs/heads/master | 2022-04-26T12:07:45.050277 | 2020-05-02T07:21:14 | 2020-05-02T07:21:14 | 245,397,536 | 0 | 0 | null | 2020-04-08T13:00:25 | 2020-03-06T11:01:50 | Python | UTF-8 | Python | false | false | 1,170 | py | list_集合.py | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
# 定义集合
a = [1, 2, [3, 4], 5]
"""增加元素"""
a.append(6)
print(a) # [1, 2, [3, 4], 5, 6]
"""两个空的集合是相等的"""
empty_list1 = []
empty_list2 = []
print(empty_list1 == empty_list2) # True
# 判断列表是不是空
if not empty_list1:
print('is empty') # 为空
else:
print('is not empty')... |
4223a72096850a9b515698de97f4663d497f6022 | 2251fdddb61ca46518be61f42b46a186e03dfdda | /command.py | c51d6e5b0fab2d7109c1b16317b68433f6cf056d | [] | no_license | MichaelKim0407/log-interact | 93be419dbf099abfb23e8a8e0d2a648c786f1b5a | 7ac87364ea2e189aa10fb164ec830a9c743e601c | refs/heads/master | 2021-04-29T08:47:52.944321 | 2017-01-04T07:16:37 | 2017-01-04T07:16:37 | 77,671,581 | 2 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,280 | py | command.py | import log as _log
import util as _util
__author__ = 'Michael'
__commands = {}
def command(name):
def __decor(func):
__commands[name] = func
return func
return __decor
def execute(name, **kwargs):
if name not in __commands:
raise _util.Error("Command '{}' not found".format(nam... |
f28ea3aadd88d2879e2af9a75d73ab341cf0bfe8 | ba14294ecd07a6c5f06a8204b298e1dfeeef7938 | /123_digit(S08Q02).py | d3749820faa174f5d57ee3a88ddfa3e4adaf1131 | [] | no_license | deepak261/python-exe | 50fd87f022d9e1b8e90661b1ce69df4ac53fbfa9 | 0bf575eebdbe4da0e3957b06aa7f0854286b73d1 | refs/heads/master | 2020-09-12T08:33:43.493309 | 2019-12-17T09:48:17 | 2019-12-17T09:48:17 | 222,369,729 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 774 | py | 123_digit(S08Q02).py | '''
S08Q02
Ask the user to enter a number.
- If the number is a single digit number, add 7 to it,
and print the number in its unit’s place
- If the number is a two digit number, raise the number to the power of 5,
and print the last 2 digits
- If the number is a three digit number, ask user to enter anothe... |
7b69eefbeea92b6281f8ca41d25b1cb19b3deef6 | 0395348808236f753338b3ea12ccf89b08c349e3 | /files/fetch/fetch-blocks/tm-blocks.py | 56fecf667ba475586fac4a0b3cf4ee4d0fdb1606 | [] | no_license | theredcomputer/tmkit-docker | b896dffb201a8b7c14fc9119b7bb6d6a3013602c | ce031087a985aeb94db539a036bde83b4372c100 | refs/heads/master | 2020-04-07T11:57:15.182429 | 2018-11-26T18:59:49 | 2018-11-26T18:59:49 | 158,348,666 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 7,779 | py | tm-blocks.py | #########################
### Domain Parameters ###
#########################
# Table grid resolution
RESOLUTION=0.1
# End-Effector Frame
FRAME = "end_effector_grasp"
# Object placement tolerance
EPSILON = 1e-4
########################
### Imported Modules ###
########################
# Import our planning packa... |
6f64d7add6de74c97d11d5dd0be7178ea11fd281 | 9958d1f00929580a78011e5430a1af5dba2198aa | /Practise/chap 3/chp3 3.7.py | 2b3ac176e94764b5f8dca2682cd0b653ad3e4e7b | [] | no_license | wasif-balol/saylani-python | d3492019f3b9871f5933129adc7474a47d35c4ab | f414ad94e9a65c36ba4d21346f6aa33ce30b464f | refs/heads/master | 2021-01-25T12:43:24.797787 | 2018-08-28T11:56:00 | 2018-08-28T11:56:00 | 123,501,657 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,339 | py | chp3 3.7.py | invitation=["Minhal","Amaan","Sadat"]
print("You are invited on dinner : ",invitation[0])
print("You are invited on dinner : ",invitation[1])
print("You are invited on dinner : ",invitation[2])
print(invitation[0],"will not come on dinner")
invitation[0] = "aleem"
print(invitation)
print("You are invited on dinn... |
1695a3a767dcd0dc6fd2389951476a2e9bf2c958 | 473c79013d79dfcb72e4c21e1782f8a36b944f57 | /copy to ros/ardrone_odometry.py | fe7c4e325e4eb83dfa0d02841b494cb33b557035 | [] | no_license | OlehQWERTY/QT_AR_Drone_App | cf59c2df42046abc45d1e397ded43e40e3091a74 | 60f86bbdf47041ab1747005ce1296925e48ddb9d | refs/heads/master | 2021-09-02T09:45:37.164671 | 2018-01-01T16:01:46 | 2018-01-01T16:01:46 | 112,081,833 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 738 | py | ardrone_odometry.py | #!/usr/bin/env python
import roslib
import rospy
roslib.load_manifest('test1')
from nav_msgs.msg import Odometry
from std_msgs.msg import Int32
odometryData = ''
#x_pos = 0.0
#y_pos = 0.0
#z_pos = 0.0
def ReceiveData(data):
global odometryData
odometryData = (str(int(data.header.stamp.to_sec())) + ',' + str(data... |
1ff763fac1f17dfffc6c79346694cba373754cf4 | 41127e57171e219cdca2490b8125501ffe5ed3d2 | /Python/01_least_squares_classifier/LSC_version01.py | bf0f28a885001360ca1c76fa2e55ec89ccdc3c8e | [] | no_license | CosmoChan/PRML_Exercise | 3b5e473000e2732650a63ed41bfb4eeca7fe12ce | d817d4127fd5f09dcf5a359b24e0e998128115cf | refs/heads/master | 2020-05-30T07:11:59.665509 | 2016-12-30T13:54:40 | 2016-12-30T13:54:40 | 69,086,667 | 2 | 2 | null | null | null | null | UTF-8 | Python | false | false | 4,147 | py | LSC_version01.py | # -*- coding: utf-8 -*-
"""
Least Squares Classifier
Created on Thu Sep 24 14:25:02 2016
@author: Voidsky
"""
from numpy import *
import operator
from os import listdir
def img2vect(filename):
"""Loading a single sample to a vector.
Each sample image's is a matrix whose pixels are 32*32,
then we should transf... |
18020140d23c2eb70c39946873bd8875acdf86aa | ad93b7786f9222c9a5ffe9f36a784afc5caa9a0a | /fish2/ch02/count_method_small.py | 23b4ec59a23aea8e5bd8f1713350f002b7e3e535 | [] | no_license | garvan2021/fish | 2e05f701d3a9731b87d7c53eda5be85a747aaf62 | f0fa177134e11a87e8e8fa631c279b31222703fd | refs/heads/master | 2023-07-22T04:15:59.408623 | 2021-09-09T09:03:03 | 2021-09-09T09:03:03 | 404,652,631 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 371 | py | count_method_small.py | import sys
sys.path.append('..')
import numpy as np
import matplotlib.pyplot as plt
from common.util import preprocess, create_co_matrix, ppmi
text = 'You say goodbye and I say hello.'
corpus, word_to_id, id_to_word = preprocess(text)
vocab_size = len(id_to_word)
C = create_co_matrix(corpus, vocab_size, window_size = ... |
74d27289f67fb51f38b708494e2ce26bbfec3402 | 691161974493a931aa02fd1e70ab6fe94b7b4fdf | /hba1c/session/migrations/0002_auto_20160515_0953.py | eb9c4fadf1ee2c5905e22ebd32eca0eecb43cc98 | [] | no_license | lamby/hba1c.chris-lamb.co.uk | 4329510dd157cb617fa7d8c3a997cdfc3a652462 | de0e28284a25be924d6c6cc6d413ee796692965d | refs/heads/master | 2016-09-12T22:09:29.426322 | 2016-05-15T13:38:58 | 2016-05-15T13:38:58 | 58,862,360 | 0 | 1 | null | null | null | null | UTF-8 | Python | false | false | 452 | py | 0002_auto_20160515_0953.py | # -*- coding: utf-8 -*-
# Generated by Django 1.9.6 on 2016-05-15 09:53
from __future__ import unicode_literals
from django.db import migrations
class Migration(migrations.Migration):
dependencies = [
('session', '0001_initial'),
]
operations = [
migrations.RemoveField(
mode... |
965cd7a11fd4313d9f6794c5cee31214597fc729 | 6d2d5307424bc3e14e63952d4d8c417328e3093f | /codeForPiAndLambda's/lambdaToDynamo.py | 6eb8bf14abfee0909cec77c513616ae1fe2c3f8c | [] | no_license | Free-apples/158335CloudGroupAssignment | 40f6db2ee069155ee34d9b5c0568952c9f9bda31 | 0f95852a98bb9eff8029fb3509212e00a50bdc5f | refs/heads/main | 2023-05-07T06:26:19.859202 | 2021-05-30T13:35:41 | 2021-05-30T13:35:41 | 371,755,538 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,600 | py | lambdaToDynamo.py | import csv
import datetime
import json
import boto3
from botocore.vendored import requests
# url of a single user
link = 'http://data.ecan.govt.nz/data/133/Water/Consent%20Irrigation%20Restrictions/CSV?RecordNo=@@@@@@@&Today=@D%2F@M%2F@Y'
# user list
def lambda_handler(event, context):
region = 'ap-southeast-... |
862f8a735fc07adbc1149002d9d140bc7d648a88 | bd498cbbb28e33370298a84b693f93a3058d3138 | /DellEMC/benchmarks/maskrcnn/implementation/pytorch/maskrcnn_benchmark/modeling/roi_heads/box_head/loss.py | 48d5608885ffb2533334a508f4bfec16c3eb04a2 | [
"MIT",
"Apache-2.0"
] | permissive | piyushghai/training_results_v0.7 | afb303446e75e3e9789b0f6c40ce330b6b83a70c | e017c9359f66e2d814c6990d1ffa56654a73f5b0 | refs/heads/master | 2022-12-19T16:50:17.372320 | 2020-09-24T01:02:00 | 2020-09-24T18:01:01 | 298,127,245 | 0 | 1 | Apache-2.0 | 2020-09-24T00:27:21 | 2020-09-24T00:27:21 | null | UTF-8 | Python | false | false | 9,931 | py | loss.py | # Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved.
# Copyright (c) 2018-2019 NVIDIA CORPORATION. All rights reserved.
import torch
from torch.nn import functional as F
from maskrcnn_benchmark.layers import smooth_l1_loss
from maskrcnn_benchmark.structures.bounding_box import BoxList
from maskrcnn_... |
ad0c185088776d128fea9df8a66756b6f41df65f | 311c84ee22fa6324cfc03128b394a9818c2ead71 | /libs/commands/page.py | 86d462710341bbb74cd75aaed145dc2981c9eba3 | [
"MIT"
] | permissive | nickklein/wp-yeti | d73f8ac6ffb8cfa7f5c77a2521de312fc8592723 | 996da8e34c7aa79d665a1a35aab0792a62e0a722 | refs/heads/master | 2022-06-29T18:35:51.791321 | 2018-10-25T02:13:53 | 2018-10-25T02:13:53 | 100,830,702 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 607 | py | page.py | #page.py
import os
from libs.classes import createFiles as createClass
def init(name):
#define config vars
THEME_FOLDER = os.environ.get("THEME_FOLDER")
VIEWS_FOLDER = os.environ.get("VIEWS_FOLDER")
pagename = 'page-' + name
files = createClass.createClass()
#passing path through is weird
files.createFile(
... |
9c92f16f29ccea93f9678dd1a5b132951730b49e | 9fb22ab5e484c6a35a95ced3d10cb067daced756 | /hw4/hw4_part1.py | a9b99f238138cd1767fd2b008b31362903d4302a | [] | no_license | h1aihan/CS1-Python | 4c3dd70772d9e9912d954235ab095bc5defb3880 | 1ab91ff92a8f82a34064e578c35f3aebc596ba77 | refs/heads/master | 2020-04-26T15:14:58.975278 | 2019-03-03T23:18:28 | 2019-03-03T23:18:28 | 173,641,430 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,067 | py | hw4_part1.py | #### Author: Han Hai
#### HW4 PART1 ALTERNATING WORDS
#### OCT 15 2015
a=raw_input('Enter a word => ')
print a
a=a.lower()
word=list(a)
def is_alternating(word):
vowel=word[::2]
consonent=word[1::2]
i=0
j=0
k=0
x=0
while i<len(vowel):
if vowel[i]!='a' and vowel[i]!=... |
c9fb7214a7e750856cc2aa3302a26f6f418d7946 | a711ee088857f2f7c858ba987225e01abf707a66 | /model.py | b38b6088bcb8a0abf6a283b5adf9d7c5f34f5fbb | [] | no_license | kumar1202/LDA-Topic-Modelling | d262394bad6591e2ae3c0cf20e01c398378eda91 | 9c6498b6273e05d1bb45518e31c3fdcb4c2605a4 | refs/heads/master | 2021-09-05T07:45:32.295766 | 2018-01-25T10:29:08 | 2018-01-25T10:29:08 | 115,798,639 | 0 | 1 | null | null | null | null | UTF-8 | Python | false | false | 8,671 | py | model.py |
# -*- coding: utf-8 -*-
"""
Created on Thurs Jan 25 14:35:31 2018
@author: Kumar Abhijeet
"""
from gensim.corpora.textcorpus import TextDirectoryCorpus
from gensim.corpora import Dictionary, MmCorpus
from gensim.models import LdaModel, TfidfModel
from gensim.matutils import cossim
import numpy as np
impor... |
dec8345d3117a1dceeb661db2f451a233ca0aef4 | 732807f6bc7d2d72f7ff25fed6cf77cc09323891 | /deprecated/CallCells_AE_XQ.py | 38fdc2e0fccebe49aa07b35f9538bb2aaf582640 | [] | no_license | Moldia/iss-analysis | 8d40a3708638142f80f890938464af8d62787752 | 1cc471a57f18a195cddc6fc9892014a2f9e09518 | refs/heads/master | 2021-03-27T16:00:19.519300 | 2019-10-04T12:56:33 | 2019-10-04T12:56:33 | 101,768,032 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 6,387 | py | CallCells_AE_XQ.py | import numpy as np
from scipy import spatial
import os
input_file = r'G:\Salamander project\New\Cellprofiler\Ch030\Decoding\QT_0.5_details_noNNNN.csv'
output_folder = r'G:\Salamander project\New\Cellprofiler\Analysis'
output_suffix = r'Ch030'
## variables ##
radius = 30 #... |
e8f40a233ec7f46ba59e25040ec7449bcd4a0d54 | cab315af6b0be7f453b82fb0e65e987062390554 | /utils/camera.py | 7f95b596be154faf6aafa97e4ddf8ebe4f7f7e52 | [] | no_license | Ilnaz77/tracketron | c95c0b06c63dbdb803fcd04e838d747139908e35 | 7df608a8f2ca9007f508c3d794adb4c3df2aee57 | refs/heads/main | 2023-05-28T18:50:20.067672 | 2021-06-11T17:20:04 | 2021-06-11T17:20:04 | 375,790,785 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 772 | py | camera.py | import cv2
import os
class Camera(object):
def __init__(self, video_name, format=".avi"):
self.video_name = os.path.join("./videos/", str(video_name) + format)
assert os.path.isfile(self.video_name), "Video path error"
self.width = None
self.height = None
def __call__(self):
... |
2e6a15de45b6ae426ab8313fe98df35ca9d07302 | ee16f2ee14125883a65bf5f8fa91831fea33d31b | /cmake/lint.py | 3da4e6df865be04ff329103826790466116e6cd6 | [] | no_license | Mononofu/sepm-temp | 00d70f355a171abe28506dcb34673ad59eb28d59 | bf9575c8e75b358d9d1d54a2b0c69e48d3be4196 | refs/heads/master | 2021-01-13T02:07:03.656466 | 2013-05-13T12:33:01 | 2013-05-13T12:33:01 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 598 | py | lint.py | import os
from os.path import join
import commands
def skip_file(name):
skip = [".git", "build", "cmake", "dashboard", "dependencies", "doxygen", "ice", "tests", "ui"]
for s in skip:
if name.startswith("./" + s):
return True
return False
source_files = []
for root, dirs, files in os.walk('.'):
if n... |
d1dfb9f0151b9451227110803ddaaaa9a610d224 | 3eb9b2585c2df3d6b9f2ff1051d3ac8c102c3b44 | /Envoi/Envoi-et-reception.py | ba73f4b5e5166841b8a11eb0005fa7edf83d7a0c | [] | no_license | vincent-time/ESP32-Structures | 9708aa1acad8dfeecce54809a8df3dcee3d8b245 | 19799a372e3b109f004d2820e2f73ebc8aff0268 | refs/heads/master | 2021-07-24T19:48:08.566704 | 2021-03-25T18:57:58 | 2021-03-25T18:57:58 | 245,801,323 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,635 | py | Envoi-et-reception.py |
#import LoRaDuplexCallback
#import LoRaPingPong
#import LoRaSender
from sx1276 import SX127x
from ssd1306_i2c import Display
from machine import Pin, I2C, TouchPad, SPI
from time import sleep, sleep_us, sleep_ms, ticks_ms, ticks_us
#from synchro import synchro_us
device_config = {
'miso':19,
'mosi':27,
... |
04439b9c9b1aab535a4cbe73a59d1db041f706de | f245a3d48d5d4393d326265df93c6c463ef57420 | /2019/Day14/Part2.py | 5f342a0edd74e433f804c1d90760721f71d3e659 | [] | no_license | crazyzelot/AdventOfCode | 1a03665a0a42969b1908f7a2730d35551befe830 | 283449eb58176c89c1aac424a607100d24cac2d4 | refs/heads/main | 2023-02-04T01:53:23.565306 | 2020-12-21T14:05:23 | 2020-12-21T14:05:23 | 322,614,481 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 732 | py | Part2.py | def main ():
Input = "32201576181190016443492260218971682877572722601899359371551495354219607692471736921100566504384043941818936525464915918379742732331575625975430644707751232286822584568182690149858279785425794077353260690659221465545974028619382257408480822488337747330301174927278185726336591815671493051361250... |
5cac72ec1eb6a590494529c30b02ddae98a37a89 | d1b282fafa42bf3c9d4a66a9de13ea2e2d544ecc | /first_app/file.py | 885131366e59a7264bf30818304ba2b57391f229 | [] | no_license | andrerodrig/Django | 0c39ba5499c04293b34a5ae7b6c3da76c7ae2d16 | 5e1685850ef43ef3fd70bb3bc10f06fad4da9882 | refs/heads/master | 2020-07-21T11:09:12.139975 | 2019-09-06T18:09:40 | 2019-09-06T18:09:40 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 44 | py | file.py | import os
print(os.path.dirname(__file__)) |
e6d843cd9f652eda1546cddd2cc4d8192c445c5e | de172a658ed0f5f222946bfc366a926056eabfad | /CodeDemo/shangxuetang/一期/序列/tuple元组/总结.py | d9f1726d5ad196d2f008e6f862f08eacf7fb4feb | [] | no_license | yuanguLeo/yuanguPython | 9cc44b2d06bb21d39340bd054f25258f87341657 | 4445ea10717e0fb6e4e9d5ddafef7a8f5c1ad7c8 | refs/heads/master | 2023-01-21T09:03:36.679425 | 2022-02-07T02:46:18 | 2022-02-07T02:46:18 | 202,049,369 | 0 | 0 | null | 2022-01-26T10:16:40 | 2019-08-13T02:42:31 | Python | UTF-8 | Python | false | false | 296 | py | 总结.py | #!/usr/bin/env python
# -*- coding: utf-8 -*-
# @Time : 2019/9/3 9:27
'''
总结:
1、元组的核心特点是:不可变序列
2、元组的访问和处理速度比列表快
3、与整数和字符串一样,元组可以作为字典的健,列表则永远不能作为字典的健使用
'''
|
ca6bca9e66d7088d779a7490aa83beedc942fb8a | 0363a02834a25b4d0e374f802f5fb62426f88b66 | /task4_histogram.py | 52975dbde802a8246675dbac90ee058fdb175104 | [] | no_license | mikhail-7975/imageProcessing | 96517f383746937e07150ba0845a214102e3bc3f | bf23988569fc2ef41d23ee861b04ec76f76df867 | refs/heads/master | 2022-12-25T03:31:04.580619 | 2020-10-09T17:07:14 | 2020-10-09T17:07:14 | 296,225,192 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,193 | py | task4_histogram.py | # importing required libraries of opencv
import cv2
import numpy as np
# importing library for plotting
from matplotlib import pyplot as plt
print("enter alpha: ")
alpha = float(input())#0.5
print("enter beta: ")
beta = float(input())#0
#g(i, j) = a * g(i, j) + b
# reads an input image
img = cv2.imread('... |
209c988387b7347101656121b8f8e470fac9b820 | cb18398cecc96e5be024a7e43f04cf922fb27f25 | /question4.py | 85dd2c6135c60e311e291cf88e722335cd2774bb | [] | no_license | loktioncode/100_questions | 85014674e17d9e8a43533f88367789dad1c1afa9 | 92be234f15921dafb791bd96f655a7046e127eaa | refs/heads/master | 2020-03-20T15:19:10.063343 | 2017-01-11T13:45:20 | 2017-01-11T13:45:20 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 844 | py | question4.py | '''
#----------------------------------------#
Question 4
Level 1
Question:
Write a program which accepts a sequence of comma-separated numbers from console and generate a list and a tuple which contains every number.
Suppose the following input is supplied to the program:
34,67,55,33,12,98
Then, the output should be:... |
bd4fb8838da38005692c983930fbc7faeb8c658e | f969b2642cb028c081ac67ed18491ddee18d4a1f | /main.py | dceb0e82c15ff93906be28bd3bfeb718ce3e7fe9 | [] | no_license | Aishwary200/project130 | a417715a8aa554d40fc0c0920042955537701171 | f6d0a4c83d367f7bed8775dc6a0b68b6ed176674 | refs/heads/master | 2023-06-29T19:38:23.380490 | 2021-08-10T10:14:00 | 2021-08-10T10:14:00 | 394,608,651 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 252 | py | main.py | import pandas as pd
import csv
df = pd.read_csv('total_stars.csv')
print(df.shape)
del df['Luminosity']
del df['temp_Star_name']
del df['temp_Distance']
del df['temp_Mass']
del df['temp_Radius']
print(df.shape)
df.dropna(axis=0)
df.to_csv('final.csv')
|
c1768c26d50cb6758acf2e553dac434297f4de4c | 195efde9bf7e923c4d24d19c94e6e85d9db948bc | /Experimenteur/dataset/__init__.py | dbb4d1ebafac3f088450f4d547e9715bd51b2105 | [] | no_license | FranciscoCanas/Experimenteur | b1913636c2123d8e75f3a7d4e7c638c4cfcc80d4 | ed6846292e0b6b09097b4721f741104f9ac070e6 | refs/heads/master | 2021-01-23T12:11:33.441640 | 2015-09-08T16:22:37 | 2015-09-08T16:22:56 | 41,746,153 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 3,014 | py | __init__.py | import tables as tb
import numpy as np
import pandas as pd
import h5py as h5
from tabulate import tabulate
class Dataset:
"""
Represents a dataset used in an experiment. ie:
dataset_args = {
'ADNI_Cortical_Features': {
'source_path': source_path,
'class_names': ['ad', 'cn', 'mci'],
... |
ba35c779db7a4c0cbb35628226e2b1f88a3a8246 | bc28f5388438a810c8c21f37607bc38f6b7ee440 | /mgn/repository/master_timezone_repository.py | 3f38dcdc5d4d4427a3b56f22be284604d666db6c | [] | no_license | pradeep-bhadauria/mgn-services | 121589a9def2efafde9eb60103d178158d81b781 | dac792494fd0c79a1e37279f5f24467a791e0f97 | refs/heads/master | 2021-08-21T20:36:32.912810 | 2017-11-29T01:45:49 | 2017-11-29T01:45:49 | 112,410,114 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,609 | py | master_timezone_repository.py | from mgn import db
from mgn.utils.constants import ACTIVE, INACTIVE
from mgn.models.master_timezone_model import MasterTimezoneModel
class MasterTimezoneRepository:
timezone_id = None
def __init__(self, timezone_id=None):
self.timezone_id = timezone_id
@staticmethod
def add(code=None, desc=N... |
61373ff0c96c8bd6cec848c74d36994d32bcdb02 | b788bfff95a506b995120d3bb9d8693c59f7fa49 | /server.py | f7e0e7c7ac8ec585fd7bff931783aaa94ae3f89a | [] | no_license | samyjain411/moneycontrol | 90a2ebe98fbeedafb87d3cdee5875062b623d8f8 | e09d734a5ab99bba85b27d68d4b35bc7bb2c31bd | refs/heads/master | 2021-09-19T19:48:58.213098 | 2018-07-31T10:47:07 | 2018-07-31T10:47:07 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 13,354 | py | server.py | """
Crawler module for money control.
"""
import os
import re
import sys
import json
import config
import logging
import requests
import argparse
import sqlalchemy
import tornado.web
import numpy as np
import pandas as pd
import tornado.ioloop
from datetime import datetime
from bs4 import BeautifulSoup
from tornado imp... |
5482f53eaee350adff217a388f3864649d41b07d | de8c48638dac46c1827c1cdf6535f10eddacfb72 | /Web/Web/models.py | a600588f890e79f335f62b30cd98a18e2e7039c6 | [] | no_license | c7w/BiliSearchCST | 24b05537d8f800a569091c6288c610d9a77b9cb3 | 01b83a835d547c158cdafade15b59828d6334085 | refs/heads/master | 2023-08-06T22:37:53.131776 | 2021-09-02T16:28:53 | 2021-09-02T16:28:53 | 401,547,327 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,691 | py | models.py | from django.db import models
from django.db.models.fields.related import ForeignKey
# Many [videos] to one [Up]
class Up(models.Model):
id = models.IntegerField(primary_key=True, db_index=True)
username = models.TextField(db_index=True)
signature = models.TextField(db_index=True)
level = models.Integer... |
a96204e8277729b331691a326c035e86318b6d2b | f43694436cc4a1246e68bf67f10a486dcef69b72 | /gunrock-output/rw/gpu.Kwalklen/plot.py | e8960078909019623cfda00282fc304804c5b7cd | [] | no_license | gunrock/io | 47f9e5c708eef1bea6f0acae464cbdf60774fb10 | d42ec8e8328117d70fb910f2d1f751ce15862810 | refs/heads/master | 2022-03-20T00:13:39.009482 | 2022-02-27T23:39:18 | 2022-02-27T23:39:18 | 43,464,873 | 11 | 7 | null | 2019-08-12T00:06:17 | 2015-09-30T23:11:36 | Jupyter Notebook | UTF-8 | Python | false | false | 702 | py | plot.py | import sys
import numpy as np
import matplotlib.pyplot as plt
runtime=[]
walk=[10, 160, 20, 40, 5, 80]
def readData(filename):
with open(filename) as f:
line = f.readlines()
line = [x.strip() for x in line]
for i in range(len(line)):
runtime.append((float)(line[i].split()[5]))
def plot():
fig = plt.figur... |
b13efdbaf453c6502f0d616c7a7c3f3ca680f2ab | 89cb9dad3c9e81a93d477fd1413f4c58ad2cc45a | /Main.py | 994ab5c646f4f79edf352a158dcd401f2952318e | [] | no_license | mcelrea/FirstPythonGame | 07bcf81d86ba08d710c29e4df716efe6978fcc6b | 625cf3b01fa22e48470fd03e90ea2991a7d76359 | refs/heads/master | 2021-04-06T20:03:50.643413 | 2018-03-15T18:09:11 | 2018-03-15T18:09:11 | 125,396,939 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,099 | py | Main.py | import pygame
import Projectile
pygame.init()
screen = pygame.display.set_mode((800,600))
pygame.font.init()
myfont = pygame.font.SysFont('Comic Sans MS', 30)
done = False
player1 = pygame.image.load("smallCharacter.png")
p1x = 100
p1y = 100
p1HitBox = player1.get_rect()
p1Bullets = []
p1Dir = "right"
player2 = pyg... |
333853b1fdc24303198eb91d33f9ad6437547a3c | 7af339223d8aa9fc131f35199d0047957b0d3b15 | /skills/admin.py | 565878dec0b3931a2ddec9ca0bf44e7fe9153da8 | [
"Beerware"
] | permissive | klauck/kicker | 80fadbd1179d9abb0bc12ddae1b4b688562265c2 | 5440f7a4d58f3e09799b426215c9bab24415cfa0 | refs/heads/master | 2021-01-22T22:28:42.536266 | 2018-02-07T22:15:22 | 2018-02-07T22:15:22 | 92,776,643 | 1 | 1 | null | null | null | null | UTF-8 | Python | false | false | 169 | py | admin.py | from django.contrib import admin
from .models import GameResult, Player, Season
admin.site.register(GameResult)
admin.site.register(Player)
admin.site.register(Season)
|
5a9faa75927683848e11628c8ee6e02ad124cdd3 | 9d6a0a02f61076dc28eafe241501fe9fa7855ae0 | /getattr.py | 7ed55eb9b2b0e5cbac3a3e956a48877365413f95 | [] | no_license | yyqlk/magical-python | 6edc977a02957fe8eebd7f594966db05c92358ca | 7c433b4fc42171a0df8e231764b9aa13521d0e26 | refs/heads/master | 2020-04-02T15:58:19.191283 | 2019-02-04T10:43:15 | 2019-02-04T10:43:15 | 154,592,093 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,906 | py | getattr.py | # AUTHOR : YYQLK
"""getattr,setattr,hasattr的运用,通过输入字符串形式的属性方法名字来取出,设置,判断属性方法"""
# 1.getattr,setattr,hasattr
class student(object):
def __init__(self,name,cls):
self.name = name
self.cls = cls
def sex(self,sex):
print('sex is %s'%sex)
lk = student("like",520) # 实例化类,万物皆对象
... |
d7f87f274a97d428d157378da403922cae392c50 | ceb6a02b1bf1723724401b385afacb8706822c1d | /Ejercicio_N083.py | 84428cdc2ecf1a47f0fc23a7caede496cc7db5ea | [] | no_license | A-Alexander-code/150-Python-Challenges--Solutions | 03b789f2155fc85e4a08c80c96053d3352b7a2c5 | ebcb933a01d31af1d864179b842327ff99f06a7f | refs/heads/master | 2023-07-21T11:06:18.743187 | 2021-08-15T18:50:41 | 2021-08-15T18:50:41 | 394,122,965 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 265 | py | Ejercicio_N083.py | letra = input("Ingrese un mensaje en mayúscula: ")
correct = letra.upper()
while letra != correct:
print("Error. No es el formato indicado, intentelo denuevo")
letra = input("Ingrese una letra en mayúscula: ")
correct = letra.upper()
print("Gracias") |
da0b07a261217f54c9e642b0f669b1eaccb91be9 | 632074392888eb810daeb6547a8351601fd70244 | /hw_7_StratulatKate/main.py | 3ee5bf5b27721c989e41f7ea34fc69e9b618a620 | [] | no_license | katestratulat1999/PROGRAMMING2 | 08e928b7fa079de6f1a8bc68c4cf8e0397d5c7a8 | 667e2a640a6e0315638c47230fa471266b29ce9d | refs/heads/master | 2023-05-29T04:06:52.142369 | 2019-06-17T20:53:20 | 2019-06-17T20:53:20 | 147,907,990 | 0 | 0 | null | 2023-05-01T20:57:36 | 2018-09-08T06:28:59 | Python | UTF-8 | Python | false | false | 1,116 | py | main.py | from flask import Flask
from flask import request, render_template
from gr import mainFunc
import re
app = Flask(__name__)
@app.after_request
def add_header(response):
response.cache_control.max_age = 0
return response
@app.route('/')
def index():
if request.args:
res = re.findall(... |
5f2b7a0dae6900bef908d6c535682f11856ecc7a | d63706381cc7d015e7d93099e2a2bb88a2203a20 | /physical_education/models/tasks.py | eedbecf90cf22dce1de586a2199b91e485acea7f | [
"MIT"
] | permissive | skrapi/physical_education | 026e7f5d010885730a542c2ca455605a2134fb3d | 3be10e1953a2c17d516c276dbd9486a774d7ed7f | refs/heads/master | 2022-12-22T04:03:15.716993 | 2020-09-27T14:02:07 | 2020-09-27T14:02:07 | 299,044,603 | 0 | 0 | MIT | 2020-09-27T14:01:39 | 2020-09-27T14:01:38 | null | UTF-8 | Python | false | false | 2,604 | py | tasks.py | """
Some tasks for the robots in the models folder.
"""
from typing import Dict, Any
from .. import utils
from pyomo.environ import Objective
from ..foot import feet_penalty
from ..motor import torque_squared_penalty
def drop_test(robot, *, z_rot: float, min_torque: bool, initial_height: float = 1.) -> Dict[str, Any]... |
f8fbd14f80635cada89f5063fa4cb7b62278932b | faabe9a400e820c17b01f5ef649750682b0ade3a | /lx4.py | 1c15d9e210cf0b07ee3c0b98a4f4b2c8d3c93c53 | [] | no_license | hp0680/python_practise | 492ec4980c729cae055ae0d398e4be283a099c36 | 86100a58a88d8937685d20991b0db8e65fcfa6b9 | refs/heads/master | 2023-03-09T05:45:11.262923 | 2021-03-02T02:27:11 | 2021-03-02T02:27:11 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,546 | py | lx4.py | print("输入您的月薪金额,将显示该月需要交的所得税金额与您的税后工资")
q = float(input("请输入月薪金额:"))
a1 = 0.03 #3000
b2 = 0.1 #3000-12000
c3 = 0.2 #12000-25000
d4 = 0.25 #25000-35000
e5 = 0.3 #35000-55000
f6 = 0.35 #55000-80000
g7 = 0.4 #80000
l = 3000 #3000数字
m = q-3000 # 三千后的工资
qqq = q * 0.03
q22 = q - qqq
if q<=3000:
print("... |
228a1e3a35ab16ee69dfe83f3f54b41b1dd12dcb | 0e1c0016ec706076cbe4b560f8cc219e2b70e2cb | /driver.py | 05bc628318ad82c093ce6aae11f821d3e9576cf9 | [] | no_license | mohd-ahsan-mirza/coding-problem-4 | d1f3906395dcb1d6b8c56a213e96c7d81fb05807 | eb4ef8e2ccbdb3e4da54d3bf54758a50d56018a5 | refs/heads/master | 2020-04-19T02:02:10.267136 | 2019-01-28T03:05:34 | 2019-01-28T03:05:34 | 167,890,248 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 574 | py | driver.py | from module import *
import random
size = 10
frequency = {}
while size != 1000:
data = random.sample(range(1, size*2), size)
codingProblem = codingProblem4(data)
integer = codingProblem.firstMissingPositiveInteger()
if integer in frequency:
frequency[integer] = frequency[integer] + 1
else:
frequency[in... |
b6a2e66cbd0f2ed726c399320336d6b8236712dc | a3707c60312f1ad7335246fb68171552ed330fa0 | /helloworld.py | e5d28228f864ef0d66af9a4a614749a8eb442707 | [] | no_license | rs2311/pythonpractice | 3a8d07f19b59968915bf8c5692067d3e4ab47965 | efdb7ea3d82f8d05f2cb8e757e85a21bf6b79084 | refs/heads/main | 2023-03-21T13:23:33.192947 | 2021-03-21T16:25:43 | 2021-03-21T16:25:43 | 349,299,100 | 0 | 1 | null | 2021-03-21T16:25:43 | 2021-03-19T04:22:36 | Python | UTF-8 | Python | false | false | 278 | py | helloworld.py |
'''
RS review from desktop, corrected with () and ""
'''
print ("First line created by RS from github")
print ("Second line updated by sailu from github")
print ("Third line updte by ravi from local system")
print ("Fouth line update by ravi from local system branch Develop")
|
82c9f7618b633b76802b2115002b50c000b9b6bf | af43615e07f2bfaa908d6d96b4c90f98ce3ad47b | /tests/cron_job_tests/test_consent_sync_controller.py | 30e6940b80d7c9e0937367b22ed534ca9c9dc123 | [
"BSD-3-Clause"
] | permissive | all-of-us/raw-data-repository | 11aa25385543f5f8ef706663b79ce181775c1c9a | 461ae46aeda21d54de8a91aa5ef677676d5db541 | refs/heads/devel | 2023-09-01T06:47:25.710651 | 2023-09-01T01:18:56 | 2023-09-01T01:18:56 | 66,000,771 | 46 | 22 | BSD-3-Clause | 2023-09-14T21:06:38 | 2016-08-18T13:47:08 | Python | UTF-8 | Python | false | false | 11,689 | py | test_consent_sync_controller.py | import mock
from rdr_service import config
from rdr_service.dao.participant_dao import ParticipantDao
from rdr_service.model.consent_file import ConsentFile, ConsentType
from rdr_service.offline.sync_consent_files import ConsentSyncController, DEFAULT_GOOGLE_GROUP, DEFAULT_ORG_NAME
from rdr_service.storage import Goog... |
8ea035d4fdc672957644a8b948b53b60346183c2 | cef018cb067ecbdb982bf397aa5f65d72b666551 | /tests/unit/deploy/test_packager.py | 3b64d6f6c2a6ec0cb3a1ec5378cab5ea15c8e260 | [
"Apache-2.0"
] | permissive | aws/chalice | 7a46ca570dd91dd15bd49f3a81ac13ebe32f22d4 | 79838b02dc330cfe549823899d2662ded0538015 | refs/heads/master | 2023-09-02T10:44:34.345115 | 2023-06-08T21:04:06 | 2023-06-08T21:04:06 | 59,868,262 | 7,528 | 994 | Apache-2.0 | 2023-09-06T15:58:10 | 2016-05-27T23:27:13 | Python | UTF-8 | Python | false | false | 11,561 | py | test_packager.py | import pytest
from collections import namedtuple
from chalice.utils import OSUtils
from chalice.compat import pip_no_compile_c_env_vars
from chalice.compat import pip_no_compile_c_shim
from chalice.deploy.packager import Package
from chalice.deploy.packager import PipRunner
from chalice.deploy.packager import Subproce... |
b080b57cf0a13258dfe920fa068d43dca091696d | 6433a49de25f30f8d40d5a92010f86cfa6f96c23 | /section1/dictionary02.py | 1e14cddc71715d9cfdd988560edf6d3ad730eb39 | [] | no_license | hyuraku/Python_Learning_Diary | afac9fcbb23d0a49eeb4dd7d12f5907d250c5bd6 | 3bdc04fb2182d2713b29dadb62c0e24e03cb855b | refs/heads/master | 2021-06-21T16:30:52.515128 | 2019-04-10T15:04:32 | 2019-04-10T15:04:32 | 114,783,147 | 2 | 0 | null | 2019-01-29T14:24:45 | 2017-12-19T15:45:39 | Python | UTF-8 | Python | false | false | 252 | py | dictionary02.py | #辞書型は参照型のデータなので
#単なる代入では複製できない
x={'a':1}
y=x
print(id(x),id(y))
#> 4381234088 4381234088
#複製するなら以下のコマンド
y=x.copy()
y['a']=100
print(id(x),id(y))
#> 4381234088 4381172360
|
e45f149d6d3c81a1a98e98d39f9ac854559c9682 | 5f23d6445095ff4ede6bb1093b340d4c32aaf0af | /pyrix_site/djangohelper/helper.py | 5fc7094d37d99677087f76dd1cafe7e4a66ac764 | [] | no_license | indexofire/pyrix-site | 7be43f5775cc3443b05929c914da3b9b64280f38 | a3817e68f96ccf890cc4d794d2d34fafa825ee8c | refs/heads/master | 2021-06-01T12:53:38.081986 | 2017-02-17T02:27:46 | 2017-02-17T02:27:46 | 655,107 | 1 | 1 | null | 2020-10-03T11:38:39 | 2010-05-07T14:44:55 | Python | UTF-8 | Python | false | false | 1,697 | py | helper.py | #!/usr/bin/env python
# -*- coding: UTF-8 -*-
from django.http import HttpResponse
from django.utils import simplejson
from django.utils.translation import ugettext_lazy as _
def json_response(data):
return HttpResponse(simplejson.dumps(data), mimetype='text/html')#application/json
def _ajax_login_requir... |
f3e999378963483bd0bc0ecc33839a568c2fb2df | 36177ac1e12282052f9227efd39ded086c33ef7b | /utils/db.py | da8eb1675227c0085d43ce5eef96de0e42f59214 | [] | no_license | RyanHecht/BrYOUno | 6624129a25d90560e78a6e27fe83ae25b8559901 | 103d694a3c197fb9dcaa54bc8994d3ade20cd46c | refs/heads/master | 2020-06-20T11:24:27.654746 | 2018-09-12T04:59:37 | 2018-09-12T04:59:37 | 74,936,778 | 0 | 1 | null | 2016-12-18T17:27:17 | 2016-11-28T04:19:22 | Python | UTF-8 | Python | false | false | 1,211 | py | db.py | import sqlite3
import datetime
def init():
connection = sqlite3.connect('/home/pi/BrYOUno/utils/database.db')
c = connection.cursor()
c.execute('''CREATE TABLE IF NOT EXISTS errors
(id integer primary key, timestamp datetime NOT NULL, error text NOT NULL, info text, file text)''')
... |
3e108ab21348893cc04ae3570d4f406989444efb | a379dbb178b904f370ea696e504ee3cbf38f3a4c | /ui/DetectHeaderWidget.py | 8238ec855100bca91ee5db5f3b2db7540edc3cb3 | [] | no_license | LK007CX/General-Industrial-Smart-Monitoring | e9bd9a840eefc809feb3f813f13f0cc973aa9305 | 250ff8c4a4696c0a4be9d5d10c7a735ee3d745e9 | refs/heads/main | 2023-03-30T21:48:51.112784 | 2021-03-31T09:20:50 | 2021-03-31T09:20:50 | 334,022,005 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,281 | py | DetectHeaderWidget.py | #!/usr/bin/python3
# -*- coding: UTF-8 -*-
import sys
from PyQt5.QtCore import Qt
from PyQt5.QtWidgets import QWidget, QLabel, QHBoxLayout, QApplication
class DetectHeaderWidget(QWidget):
def __init__(self, *args, **kwargs):
super(DetectHeaderWidget, self).__init__(*args, **kwargs)
... |
d3907b259ad061aafd2c5e4d201a568c6dc7ab60 | d78ca85fe0dfc26848a74fc47bd88d98e7dae674 | /p2_stack_and_queue/parentheses.py | f179767fbeb1891ebdee59c4ab631c5ca9dcd4ab | [] | no_license | SpikeKing/data_structure_with_python | 7c8a1da267985d78a4104cbf9729b624da8a0deb | 06329d962ab8246092d4ae289ac8dbbda6abf9a6 | refs/heads/master | 2021-07-01T14:42:59.591885 | 2019-06-09T01:28:37 | 2019-06-09T01:28:37 | 153,263,944 | 18 | 2 | null | null | null | null | UTF-8 | Python | false | false | 883 | py | parentheses.py | #!/usr/bin/env python
# -- coding: utf-8 --
"""
Copyright (c) 2018. All rights reserved.
Created by C. L. Wang on 2018/10/29
"""
def par_checker(symbol_str):
"""
括号匹配,list包含栈的功能
append是添加,pop是删除
https://docs.python.org/2/tutorial/datastructures.html
14行
:param symbol_str: 符号字符串
:return: 是否... |
5f8468d9ab1e7c01c16021530258545268e3e0fe | e77743eae25576ff3b0b503d31e9d7ae56e44edb | /amazon_link_follow.py | 514648bf9447eafbdd507643b613d4385fb1650b | [] | no_license | JackieSAM/E-Commerce-Automation-Essentials | a4d28f897a56b2ae6131c6ae6637c2ffe8932a51 | cf498267fb23effbe9b7300e48aa04b922b549ab | refs/heads/main | 2023-07-13T16:33:07.480305 | 2021-09-08T17:28:59 | 2021-09-08T17:28:59 | 404,436,097 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 734 | py | amazon_link_follow.py | from selenium import webdriver
from selenium.webdriver.support.ui import Select
import time
import csv
driver=webdriver.Chrome(executable_path="C:\\Users\\Foxin\\Desktop\\chromedriver.exe")
f = open("amazon_price.csv","r")
reader =csv.reader(f)
linksr = []
for row in reader:
linksr.append(row)
newest = [i[0] for i ... |
f7a5d4a800cc6136b44a8d597a0b46dc2adea918 | 7668563035df48ea8d615fbe3d251add68f66ec9 | /bin/cit | 27bcf05c0bd3c24076cbedf9821227e835054170 | [] | no_license | oguzalb/cit | 31161a04adb8917adca150a10010dc150d77e8c9 | 5236b27361cc023311fe3f1ba1ec5eafc9b98e3f | refs/heads/master | 2020-06-21T16:39:54.501734 | 2017-05-01T15:35:29 | 2017-05-01T15:35:29 | 74,779,261 | 6 | 1 | null | 2016-11-25T18:45:31 | 2016-11-25T18:10:51 | Python | UTF-8 | Python | false | false | 784 | cit | #!/usr/bin/python
import sys
from citlib.commands import (
cat_file, commit, init, status, update_index,
write_tree, checkout, log, branch, add, diff,
rm)
commands = {
"write-tree": write_tree,
"commit": commit,
"cat-file": cat_file,
"init": init,
"update-index": update_index,
"stat... | |
f180400f001aa06444b9a4cf6dc76c005a3645c5 | 7e91d71e3b6274a9d615cbccc5f8318240a3a112 | /src/mvc.py | d0680ea82d35eb10222386cc0fc3e7a301da8440 | [] | no_license | smallfish0807/torcha | d8bb17d05eb81ddbce10a70016276a5b9bc47644 | 58a156a4e3dae57eaf7aa7637e52e805c30dc211 | refs/heads/master | 2023-04-15T04:04:42.371914 | 2021-04-16T08:16:47 | 2021-04-16T08:16:47 | 358,525,963 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 6,292 | py | mvc.py | import os
import pandas as pd
import torch
import torch.nn as nn
from torch.utils.data import Dataset
from torchvision import transforms
from PIL import Image
CrossEntropyLoss = nn.CrossEntropyLoss
class Lambda(nn.Module):
def __init__(self, func):
super().__init__()
self.func = func
def fo... |
0db1ea2908731b47a28d20a660fd26cbcbc5dbd4 | 380f22148c1aec690202347225011f1354e72daf | /lab4/POP3/client.py | 1e24e760e3e70f2b52c423933a74ba40e69391b0 | [] | no_license | DariaVoo/Networks-Telecommunications | 229f06cf3e565d69b75eb765eb88ca7636e9c43d | 8418a1ed2ba40c1e70efc37f8366af8c565eb540 | refs/heads/master | 2023-01-13T22:01:08.282810 | 2020-11-14T17:17:11 | 2020-11-14T17:17:11 | 297,036,678 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 4,720 | py | client.py | import poplib
from email.header import decode_header
from email.parser import Parser
from email.message import Message
from pip._vendor.pyparsing import unicode
from not_send import PAAAS
def decode_field(field: str):
""" Парсинг полей сообщения"""
bytes_subj, encoding = decode_header(field)[0]
if encod... |
d784b501a91eacc8b049e63ec935d9c771f30cf0 | 6ff0a78e222184bbfe876676ef557845ff23ac0f | /backend/scraping.py | 49bd212df3362f9c5b40e955ed7d56a472e8409c | [] | no_license | swetakumari29/gmail_scraping | 305cd43bffa0208e3fcb5db09de62197ae4e7d77 | 3f5e9db9feb066b5b3926709cee89b80efb6f95f | refs/heads/master | 2022-12-30T07:33:24.320015 | 2020-10-15T05:40:46 | 2020-10-15T05:40:46 | 304,219,278 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,733 | py | scraping.py | from __future__ import print_function
import pickle
import os.path
from googleapiclient.discovery import build
from google_auth_oauthlib.flow import InstalledAppFlow
from google.auth.transport.requests import Request
# If modifying these scopes, delete the file token.pickle.
SCOPES = ['https://www.googleapis.com/auth/... |
9dd19db30921654e8ea8c6cfdde2927581ce9140 | ec1c12c46fd402efbc80acc66cfb52885aa87863 | /finalpipeline/config.py | 7f4801ecaaf5c59eca7ef48fe3abe66402a3b5a9 | [] | no_license | rachel-ker/MLPipeline | eac032b98680788e30ddd38e3d53f2db1074a08e | 2edb2edb526e880e1886f55e5464a2d1a7c2e121 | refs/heads/master | 2022-12-08T11:54:24.544728 | 2020-03-14T04:07:40 | 2020-03-14T04:07:40 | 179,376,517 | 0 | 0 | null | 2022-12-08T01:43:51 | 2019-04-03T22:00:06 | Jupyter Notebook | UTF-8 | Python | false | false | 5,994 | py | config.py | '''
Configuration File
'''
## DATA FILE / LABEL
DATAFILE = "data/projects_2012_2013.csv"
OUTCOME = "notfullyfundedin60days"
## CHANGE DATA TYPES
TO_DATE = ["date_posted", "datefullyfunded"]
## TEMPORAL VALIDATION
PREDICTION_PERIOD = 60 # in days
TEST_PERIOD = 180 # in days
DATE_TO_SPLIT = "date_posted"
TRAIN_... |
2628098df18eb3f8c17a8c9cb17d6d7fc4b84c8f | a2dc75a80398dee58c49fa00759ac99cfefeea36 | /bluebottle/activities/tests/test_api.py | 10ca1b9f55ba0b1304c6f62038bfd5a5790319c6 | [
"BSD-2-Clause"
] | permissive | onepercentclub/bluebottle | e38b0df2218772adf9febb8c6e25a2937889acc0 | 2b5f3562584137c8c9f5392265db1ab8ee8acf75 | refs/heads/master | 2023-08-29T14:01:50.565314 | 2023-08-24T11:18:58 | 2023-08-24T11:18:58 | 13,149,527 | 15 | 9 | BSD-3-Clause | 2023-09-13T10:46:20 | 2013-09-27T12:09:13 | Python | UTF-8 | Python | false | false | 83,243 | py | test_api.py | import datetime
import io
import json
import re
from builtins import str
from datetime import timedelta
import dateutil
from django.contrib.gis.geos import Point
from django.test import tag
from django.test.utils import override_settings
from django.urls import reverse
from django.utils.timezone import now
from django... |
770616cf6d527097d5564c63334c8550431ddd3d | 9a719d5c3f7d085555379f7da7c553718f6df1b3 | /n_t/Snakefile | 865a927b871c785ea97f099a6bc6a8f1e57c3073 | [
"MIT"
] | permissive | LohmuellerLab/analysis | 986e34c36bb9da436cf53237e2d790a3891ed575 | d41b37f530a96d18ad076564c0ec696607246e80 | refs/heads/master | 2020-05-07T10:53:22.960787 | 2019-04-02T20:25:36 | 2019-04-02T20:25:36 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 4,748 | Snakefile | import pathlib
import sys
import numpy as np
import stdpopsim
import stairway
import smc
import simulations
import plots
stairwayplot_code = "stairwayplot/swarmops.jar"
genetic_map_downloaded_flag= ".genetic_map_downloaded"
seed = 12345
np.random.seed(seed)
reps = 2
seed_array = np.random.random_integers(1,2**31,... | |
ffa8c9e007a7fcc6390f7a98145b29bb790bf65c | bc035bd233dcf51557d1b07061f986e5bf03b964 | /battle_field/items/devices_models/lidar.py | f9f545d53e04f4791a24976bf63205b83901af5e | [] | no_license | AlexanderSoftman/battle_field | 48c1a9b88e0a307ef88d4d092bd96ac7356a43a2 | 4c5525b6204f6b69579edf9bec34ab4bc00e94d3 | refs/heads/master | 2021-05-14T22:57:41.632422 | 2018-01-16T09:33:42 | 2018-01-16T09:33:42 | 105,632,197 | 0 | 1 | null | null | null | null | UTF-8 | Python | false | false | 1,510 | py | lidar.py | from PyQt5 import QtWidgets, QtGui, QtCore
from battle_field.items.devices_models import lidar_model
import os
import battle_field
import logging
LOG = logging.getLogger(__name__)
class Lidar(QtWidgets.QGraphicsPixmapItem):
lidar_pict = os.path.join(
os.path.split(
battle_field.__file__)[0]... |
b139c403742e8b0b14624c123123162b24cf999d | 1bee8ea3b33136183e4f7446227ac633e6b4415d | /backend/main.py | 519adf6a302756bc3b676d57d70fe4d4246a0ac8 | [] | no_license | 0xCatgenius/is439_iot_team_warriot | 6c0481922ec6efaade390ebfa710f3ca1787429c | ece2afcbc8288c521a3c218e1946adf7c79e6d5c | refs/heads/master | 2021-10-29T03:00:55.755017 | 2019-04-25T11:08:52 | 2019-04-25T11:08:52 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 3,747 | py | main.py | # -*- coding: utf-8 -*-
"""
Created on Tue Mar 26 16:13:45 2019
@author: malcolmng.2015
"""
import sched, time
import datetime
from datetime import date
from store_Sensor_Data_to_DB import write_to_heatmap
from durationCalculation import calculateDuration
from user_detection import getPastData,getBIDDistFrom... |
a6e8fee4c1746861c2cf8f6bec81262ad762c49f | 1fbbb06db8bf8d957eaf4bf2cc3651e219ceb615 | /MejorIntentoClasificacionDeFlores.py | f6ed26113d7c3ef2faa19e629215c211cc938a34 | [] | no_license | MarcZN/PRACTICA-RED-CONVOLUTIVA | 3b11d3dde9bda71f97f1ed2e957501ea43f1684f | e363d2462c8036240378a5d6030f36fb7b0f1826 | refs/heads/master | 2020-05-24T22:06:12.309182 | 2019-05-19T15:14:12 | 2019-05-19T15:14:12 | 187,491,216 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 3,826 | py | MejorIntentoClasificacionDeFlores.py | #!/usr/bin/env python
# coding: utf-8
# # Welcome to Jupyter!
# In[ ]:
import matplotlib.pyplot as plt
from keras.preprocessing.image import ImageDataGenerator
from keras.models import Sequential
from keras.optimizers import RMSprop
from keras.layers import Dense, Dropout, Flatten
from keras.layers import Conv2D, M... |
03006113cda382ce1c4237a77c950968d3c93637 | be0dc98761ccd534b77f9cd030b2b92886f8cd19 | /predavanje3/formatirani_ispis2.py | d9ab01cb0c5faf09c6bad867ab59b0318bf5da0b | [
"MIT"
] | permissive | vmilkovic/uvod_u_programiranje | 7e0c662b1dffc8097edb5bb5a4a532f2c3a9fab0 | 209611e38c8fe84c727649df4b868a4278eb77c3 | refs/heads/master | 2022-04-07T00:33:17.059137 | 2020-02-16T19:28:41 | 2020-02-16T19:28:41 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 125 | py | formatirani_ispis2.py | # d - cijeli broj
# f - realni broj
# s - string
#primjer formatiranog ispisa
a=3.12345
print('{0:f},{1:0.1f}'.format(a, a)) |
98e6607f75e642c64b08277fed52a4d84646cef2 | c7cd60a9d09a404549ba25c24b3764acfe2bff8a | /core/models/Aluno.py | 40ee5f95034efc7efa89350dd253c43c65d58e24 | [] | no_license | henrique221/tcc-client-django | c74ded189a8b2405ba17076c742394439712b6da | d75f871f406e374e902434b812edfdbb17cd819b | refs/heads/master | 2020-03-15T02:42:43.252714 | 2018-05-01T13:49:06 | 2018-05-01T13:49:06 | 131,924,541 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 830 | py | Aluno.py | from django.db import models
from .Usuario import Usuario
class Aluno(Usuario):
curso = models.ForeignKey(to='Curso', related_name="alunos", null=False, blank=False) #onetomany
#nome = models.CharField(max_length=120,null=False)
#email = models.CharField(max_length=80)
celular = models.CharField(max_len... |
5f71e57a016cc3e18c1eda19c3c407fa7dba6d79 | d590cb80953f00248105da9d9b61bba409ff2462 | /pathMaker.py | 65751af607f0448b627ff9ab27ac77769871bf01 | [
"MIT"
] | permissive | goyousalukis/phototimer | 2516dacad4ad561b0492f7803dbf149d4309d0c9 | 339d39614c22b06d87965f4e8355bbcba4d4012f | refs/heads/master | 2022-04-25T05:07:31.606185 | 2020-04-29T18:08:26 | 2020-04-29T18:08:26 | 259,999,532 | 0 | 0 | MIT | 2020-04-29T17:47:46 | 2020-04-29T17:47:45 | null | UTF-8 | Python | false | false | 389 | py | pathMaker.py | import os
class pathMaker:
def __init__(self):
pass
def get_parts(self, totalPath):
if(totalPath==None):
return []
return totalPath.strip("/").split("/")
def get_paths(self, totalPath):
parts = self.get_parts(totalPath)
paths =[]
path = "/"
for p in parts:
path = os.path.join(path,p)
paths.a... |
330f6fb54e7ffbf62b90607b5b1c313990a39f6b | ffd5e689f88c49ab7af3554c22dc0c36301084fa | /simple_fun_176_reverse_letter.py | f10ab45c330992dcb8aedbb9cd026160473cda90 | [] | no_license | ellismckenzielee/codewars-python | 1710e6f0499047139479de386927c7dbd5f1cdf6 | af3f4b4534798a58115d0565730aae28ce87437e | refs/heads/master | 2023-08-09T13:38:40.964141 | 2023-08-01T14:45:22 | 2023-08-01T14:45:22 | 168,981,376 | 45 | 18 | null | null | null | null | UTF-8 | Python | false | false | 208 | py | simple_fun_176_reverse_letter.py | #simple fun #176: reverse letter kata
#https://www.codewars.com/kata/58b8c94b7df3f116eb00005b
def reverse_letter(string):
return ''.join(list(map(lambda x: x if x.isalpha() else '', string))[::-1])
|
21937c7236d67032c25d1d6dd62398aa660e09c4 | e65884911703b2b3fa2d05ae5261a3110009f6c0 | /scripts/rebuild_eleves_competency_evaluations.py | 55a5b568999d16ae863312532bb23873d662a9d8 | [
"MIT"
] | permissive | kreako/edts4c | d786f9e7d7be3c29d6f9f4756e6532578feaee89 | d65de5709d604f0d8bd9f8aefb675df2086d46da | refs/heads/main | 2023-03-02T18:56:52.808384 | 2021-02-12T12:43:00 | 2021-02-12T12:43:00 | 336,941,044 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,442 | py | rebuild_eleves_competency_evaluations.py | from peewee import *
database = PostgresqlDatabase('postgres', **{'host': 'localhost', 'user': 'postgres'})
class UnknownField(object):
def __init__(self, *_, **__): pass
class BaseModel(Model):
class Meta:
database = database
class DieselSchemaMigrations(BaseModel):
run_on = DateTimeField(const... |
6157b5ee600902d9077ce4f69d72cb4a93f4aa0b | 4e9423c2fef4b697c5f0b3eb8cb3e264ac8400b5 | /test.py | 240e993ca7151313edc44494b0b232515c099467 | [] | no_license | ankitrev/Parking-Lot | a287008722170e2fcb65ebc1b7397258058a6885 | 177842da96ad5aee53f39b60063c04292dc25b1a | refs/heads/main | 2023-01-15T08:01:59.393241 | 2020-11-23T09:09:13 | 2020-11-23T09:09:13 | 315,113,550 | 0 | 0 | null | 2020-11-22T19:27:36 | 2020-11-22T19:16:04 | null | UTF-8 | Python | false | false | 2,208 | py | test.py | import unittest
from Models.ParkingLot import ParkingLot
class ParkingLotUnitTesting(unittest.TestCase):
''' Unit test to test each of the individual methods '''
def test_create_parking_slot(self):
parking_lot = ParkingLot()
res_str = parking_lot.create_n_slots(10)
self.assertEqual(len(parking_lot.all_slots(... |
79f95a5609aac766c6643307259079b7bd8f17c0 | 1b3f870a6f334d18316aa1af87898198258f22be | /alumnusb_system/accounts/admin.py | ce369e03b3d91716fb83b1292de7972bcf5eb6fe | [] | no_license | manuelguillegil/alumnusb-system | 1447390cef41ef26ea5160a5d60bd98a844da120 | 978f1c603c18f2f53172aea6e9b1e2967a9a50fb | refs/heads/master | 2022-12-13T06:01:57.211646 | 2021-06-28T05:02:26 | 2021-06-28T05:02:26 | 234,742,401 | 1 | 3 | null | 2022-12-07T16:41:13 | 2020-01-18T13:55:54 | CSS | UTF-8 | Python | false | false | 293 | py | admin.py | from django.contrib import admin
from .models import *
# Register your models here.
admin.site.register(User_information)
admin.site.register(User_stats)
admin.site.register(Achievements)
admin.site.register(User_Achievements)
admin.site.register(Message)
admin.site.register(Profile_Picture) |