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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
8fdda3449c4a417d517d60f56fd3a235e97f6cc5 | d0484ecacd8ad5c2f6d2c5b3cdd082a364eddc52 | /filterVideo.py | 9a9a4fdef15b47c64725433555c9ee119d8a6d1f | [] | no_license | rahulrawat09/Profanity-Detector | ef3693d023ae6e16eef6443dc7a3f5a959f7dedf | 577bcc8cbfae417a81cdca228fdcbc8989b3e1e6 | refs/heads/main | 2023-06-17T11:03:37.030020 | 2021-07-14T17:42:15 | 2021-07-14T17:42:15 | 385,996,751 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 8,540 | py | filterVideo.py | #This file will filter/censor bad words from the video file
'''
Install packages and dependencies
Initialize the enviornment
The bash script will
1) Download pre-trained Intel Models
2) Create configuration file (needed for making inference on speech)
3) Required pre-requisites for LibriSpeech Model (graph... |
87a5560b7e86a0b4360ba3582d555632b5fc29c1 | 113b962bd5e2eb770067bd374a15dfe8a1c2d09f | /py_scripts/cdhit/cdhit_maxlen_compare.py | 07ced7ae932bb3cf40f82d418f2dc410d52317a7 | [] | no_license | aungthurhahein/biotech_script | ecce51950bcef69405843da12ece2f84ea5541d6 | 2fda699343e6c46543fa1df2412c8ca2f2622cda | refs/heads/master | 2020-12-24T06:20:13.028141 | 2016-07-06T15:23:34 | 2016-07-06T15:23:34 | 25,574,741 | 5 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,399 | py | cdhit_maxlen_compare.py | #! /usr/bin/env/ python
"""
#
# usage:
# output:
# Dev: __author__ = 'aung'
# Date:
"""
import sys
import re
clstfile = sys.argv[1] # parse cluster file
lenfile = sys.argv[2] # lenfile
clstid = []
memid = []
with open(clstfile, 'rb') as f1:
for line in f1:
line_split = line.split('\t')
clstid.a... |
176049b6f4060fae9b6eef387070ce76efbf7a05 | c24ceb698f10c38a462e0157d1514f08150ad550 | /app/models.py | d62ed19ffa061a06011ea57af56f205ba93294bc | [
"MIT"
] | permissive | charlesashby/marketvault-front-end | 4290ef6f1c3b22732560ce2784b23d2fd2752545 | 758cf8ba1d8486f45eac093ded78a15fc82df3dc | refs/heads/main | 2023-06-12T22:21:09.400708 | 2021-07-04T18:41:19 | 2021-07-04T18:41:19 | 350,133,762 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,123 | py | models.py | import datetime
from sqlalchemy.ext.hybrid import hybrid_property
from flask_login import UserMixin
from app import db, bcrypt
class LoginHistory(db.Model, UserMixin):
__tablename__ = 'login_history'
email = db.Column(db.String(255), primary_key=True)
ip = db.Column(db.String(255), primary_key=True)
... |
22e6a360f1b79470d16564245133e99d551f624e | 2ed70bb062cc5213662c5d37e16c97f957158b3d | /frontend/views.py | 633b077e88e4b93e40f927beaef3cd3507e3a78c | [] | no_license | nanaji0133/Cricket | c8e92885049d58a2b018c1389098c8ea9ee8f0d8 | 3c45e7b0be59b945ddc260d194abb17edebd6d79 | refs/heads/master | 2022-11-13T10:19:03.799421 | 2020-07-05T01:31:15 | 2020-07-05T01:31:15 | 254,896,080 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 252 | py | views.py | from django.shortcuts import render
from rest_framework.views import APIView
from rest_framework.renderers import TemplateHTMLRenderer
from rest_framework.response import Response
def home(request):
return render(request, "frontend/index.html")
|
d892165372b376d4b4113c834f3575d9075ee01d | b4a527447b2063333ad28d2fc29d6128de0e75f5 | /nevpro_orient_addons/gst_accounting/report/gst_sales_receipts_print.py | a208890847cc86d2f0dfbba7071f84f270e20bb0 | [] | no_license | shreyaskamath22/sample_code | ab693cc83c86dd696339dc7f03790720d5114435 | 33d80a2e88ac954f391a80146bdea95b4f3119c8 | refs/heads/master | 2021-05-12T13:17:38.136713 | 2018-01-10T10:03:47 | 2018-01-10T10:03:47 | 116,930,435 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 33,326 | py | gst_sales_receipts_print.py | # Version 1.0.012 ---> Added Branch name for the refence number for the other cfob
#version 1.0.041 to remove hardcoded address,email,phoneno,website from report
# version 1.0.056 --> Changes Related to DD receipt print 09 oct 15
import time
from report import report_sxw
from tools.translate import _
from tools impor... |
9fcc44b224d3c495150bc4a61e1bd6cf172e790a | 69c2f71177ab9ab1d9485ad1f784d3e2440f3f00 | /jobs/migrations/0003_jobsteps_jobtimes.py | 0a24f5a3ffdcda8c42c86ec847ab42f125fe28c2 | [] | no_license | Code-Institute-Submissions/meade-maintenance-app | 98da2aafa29dc3a0c858e5e0bf56f17af99afef1 | 930b23472f5109afd52a078ad18de0a1a3a68cb9 | refs/heads/main | 2023-07-05T08:01:50.446883 | 2021-08-19T23:38:09 | 2021-08-19T23:38:09 | 398,102,861 | 0 | 1 | null | 2021-08-19T23:50:57 | 2021-08-19T23:50:56 | null | UTF-8 | Python | false | false | 1,237 | py | 0003_jobsteps_jobtimes.py | # Generated by Django 3.2.4 on 2021-07-25 15:19
from django.db import migrations, models
import django.db.models.deletion
class Migration(migrations.Migration):
dependencies = [
('jobs', '0002_alter_job_description'),
]
operations = [
migrations.CreateModel(
name='JobTimes',... |
399cc14c3b7afe88592d96d03edb9b1d41bfdeda | 9b416cf5b4bf4156f5268b0c80cb0173a8aff92c | /April 19 Assignment/L2 Regularization/LR+L2_pytorch_auto.py | b26af5d0486593e21056910d75618367eb8be2d2 | [] | no_license | BenningtonCS/tristanryerparke | 16b37d82025b0c4f0fd6b7d7bd5963d3c72f4d3b | ef7d8d0fb40eb4918f37b911d92dc7c394e9fa86 | refs/heads/main | 2023-05-07T15:23:49.840534 | 2021-06-02T00:17:47 | 2021-06-02T00:17:47 | 341,592,643 | 0 | 1 | null | null | null | null | UTF-8 | Python | false | false | 1,870 | py | LR+L2_pytorch_auto.py | # Linear Regression concise version
import numpy as np
import torch
from torch.utils import data
def synthetic_data(w, b, num_examples):
#Create data from normal dist based on given weights
X = torch.normal(0, 1, (num_examples, len(w)))
y = X @ w + b
y += torch.normal(0, 0.01, y.shape)
return X, y.... |
d9142d08f45799714dc7f7d9ddf7ce470512e1da | 6b92d9fbfeba7a4b1b4a9c1d8436cbd27b436bfc | /py7.py | 15c9621b33e55002ff9c5291dbde107234fbe5d3 | [] | no_license | kerberoszwj/kerberos | cf705142a75af719ff7c85b85269fdf8d031d61e | c8db2f01031a38ddfec39a17e63fbef652ae8e0c | refs/heads/master | 2020-05-22T03:26:04.726184 | 2019-05-18T15:06:03 | 2019-05-18T15:06:03 | 186,211,802 | 0 | 1 | null | null | null | null | UTF-8 | Python | false | false | 6,024 | py | py7.py | import socket
import threading
sock = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
myDict = dict() # 当前在线人员
myList = list() # 当前socket在线客户端列表
def cc():
sock.bind(('localhost', 5678))
sock.listen(5)
print('Server', socket.gethostbyname('localhost'), 'listening ...')
#myDict = dict() # 当前在线人员
#myList... |
668764988e488b207c5f5b5c93722f2840887b93 | 9128b8beea9af7ce4c0dd0dbdd57e30b274e520e | /experiments/cli.py | 07f1fe01f46138d7c3e69ed8a4ba78d4aa8317bc | [] | no_license | vbrh-immalle/py_mvc_cli | 1f4f4db539e8a510f50d4cbf825877bc9a70b368 | cfbc6cc39be62b3e2bff4ac7fa1fa14a7d2aa5fe | refs/heads/master | 2021-02-08T15:12:16.160452 | 2020-03-01T14:38:35 | 2020-03-01T14:38:35 | 244,164,726 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 80 | py | cli.py | import os
if __name__ == "__main__":
os.system('clear')
print("Hallo!") |
0cdf366fe820b9f870f5d5c86f339ab89751844b | f5314df5b6e695abb1e262513d0f39868448250f | /src/tnglib/slas.py | e4d8cb537dd4001cb960259dbaa2aff827104d32 | [
"Apache-2.0"
] | permissive | sonata-nfv/tng-cli | 50f10a8f6a269250c9066d85b8a7793341e529be | 22faa016826f1ed15e214b3a99d6a2011093d63b | refs/heads/master | 2020-04-17T03:52:23.965710 | 2019-12-04T08:48:59 | 2019-12-04T08:48:59 | 166,203,901 | 3 | 25 | Apache-2.0 | 2019-12-04T08:49:01 | 2019-01-17T10:05:25 | Python | UTF-8 | Python | false | false | 10,327 | py | slas.py | # Copyright (c) 2015 SONATA-NFV, 2017 5GTANGO
# ALL RIGHTS RESERVED.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by ... |
fd1bd3be9acc1cd0a4e8b7a687eb5703e3f1f385 | c795b3040d10063ee1c8a2a83574731dff5c970f | /refactored/connection/password_and_port.py | 45f60f0ea2a7cfba7d55ea594a1120ffb63e16d9 | [] | no_license | SkinnyPigeon/new_dv_tests | 5cc34d8ab95eaa08b5ed6644dd8b20c442fba3ac | 71aa4ea754633763efa2185d135e56ab9f366dde | refs/heads/master | 2023-08-29T12:07:02.272614 | 2021-09-24T15:40:17 | 2021-09-24T15:40:17 | 409,604,811 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 442 | py | password_and_port.py | from dotenv import load_dotenv
import subprocess
import os
def get_password_and_port():
project_folder = subprocess.check_output(
"pwd", shell=True).decode("utf-8").rstrip()
load_dotenv(os.path.join(project_folder, '.env'))
PORT = os.getenv('PGPORT')
PASSWORD = os.getenv('PGPASSWORD')
if PORT =... |
0c6b7be13cc7f4d5efe97c0228e07a86641a4e91 | 48b17ff5a215b9e1323c89f50c1c0d9054c90ce8 | /keras_lstm_attention.py | 22e9988dca63c93eb6e70635b9602bc2f05f2c20 | [] | no_license | 108061529/DM19-Lab2-Homework | 56a3add5f533c454402bcc4b2acaaf4d6a6f5624 | b0f6ed843021bd55789540ea4be73b8a336070c0 | refs/heads/master | 2020-09-08T09:39:41.158047 | 2019-12-24T08:40:22 | 2019-12-24T08:40:22 | 221,097,509 | 0 | 0 | null | 2019-11-12T00:44:43 | 2019-11-12T00:44:42 | null | UTF-8 | Python | false | false | 4,504 | py | keras_lstm_attention.py | # -*- coding: utf-8 -*-
"""
Created on Sat Nov 23 20:56:31 2019
@author: menghan
"""
from __future__ import print_function
from keras.models import Model
from keras.preprocessing import sequence
from keras.layers import Dense, Embedding
from keras.layers import LSTM,Input,Flatten
from keras.preprocessing.text import ... |
ccff36e1bba6ef6e7e6806d6c1b1b43a82720300 | 9eb26e3cfe885d46fc56ac76c7d1a66ccd26be38 | /download-hc-products.py | 85682059c19e61a4626500756e085a882467c651 | [
"MIT"
] | permissive | slavrd/py-download-hc-product | 27c4ed3d3a1bf43fbe332af1a634fa77a0b33f79 | f14a90703a31e912057e88501c8926aea5ce5c50 | refs/heads/master | 2021-07-01T07:27:38.257806 | 2019-09-30T07:18:55 | 2019-09-30T07:18:55 | 205,347,439 | 1 | 0 | MIT | 2019-09-30T07:18:59 | 2019-08-30T09:13:24 | Python | UTF-8 | Python | false | false | 1,976 | py | download-hc-products.py | import requests
import json
from packaging.version import Version, parse
import zipfile
import wget
import os
import sys
# Define the TF realese to download
if len(sys.argv) < 2:
print("no product name was provided.")
sys.exit(1)
product = sys.argv[1]
if len(sys.argv) > 2:
ver = sys.argv[2]
else:
ver... |
22fcc6910bc3e0f94e3c31dc50a4c01c084bcabb | 6f79614a6150503ecdf9f5c86429fd9e1abc4288 | /points.py | 9334a8d9bac8c255149b46d5b693f324da3b3bf8 | [] | no_license | msabramo/points | 75eeba2fe3f53760679b977721b34c1be11e3f30 | 9bd253856f776eda938ea89875d665a9e8bbbbd0 | refs/heads/master | 2023-06-09T15:55:51.662280 | 2016-10-31T22:50:21 | 2016-10-31T22:50:21 | 72,484,659 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,300 | py | points.py | #!/usr/bin/env python
from math import sqrt
import operator
class Point(object):
"""A 2-D point"""
def __init__(self, x, y):
self._x = x
self._y = y
def __repr__(self):
return '<Point %d, %d>' % (self._x, self._y)
@classmethod
def distance(cls, point1, point2):
... |
d0d9e3a7560c3446768717c83be9a35f4e84d311 | 236614bd1623d599d3240ad4d530bf2d1add471c | /pset6/sentimental/readability.py | 6baa979f31c8f12154a3f42150871838bb46df4a | [] | no_license | CurtainsAreBetter/cs50work | e796f8cad9b6471bf51a1c32d9def873060e66b2 | 528d117ecc43e1cbdf9cff1a3b4301d932da6ce0 | refs/heads/main | 2023-08-20T01:35:41.699782 | 2021-10-12T02:33:46 | 2021-10-12T02:33:46 | 390,141,403 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 556 | py | readability.py | from cs50 import get_string
def main():
s = get_string("Text: ")
s_count = s.count(".") + s.count("?") + s.count("!")
w_count = len(s.split(" "))
c_count = 0
for c in s:
if c.isalpha():
c_count += 1
L = (c_count / w_count) * 100
S = (s_count / w_count) * 100
gr... |
7778267484e85196549fe7f2e163c53f612b1eda | f396a296c89a2ca245139636ff6fef7df8e1d525 | /quality_processing.py | 25d9e16a94329fd8a0386c3861c5ce8eb8e1b5ae | [] | no_license | avahoffman/climate-extremes-gene-expression | 9faf1d21af778f4d99a65c469c128d26b2cdcfcb | 723ce7ac332829f72e948d7edb322fae437ae0cf | refs/heads/master | 2021-08-21T20:52:03.225091 | 2020-03-16T21:41:37 | 2020-03-16T21:41:37 | 132,258,768 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,635 | py | quality_processing.py | '''
splitting up files
'''
# import os
# directory="/Users/avahoffman/Documents/CSU/Research/msmi_arrays/CEE_microarrays"
# for filename in os.listdir(directory):
# if filename.endswith(".gpr"):
# print(os.path.join(directory, filename))
# with open(directory+"/"+filename) as open_file, open(directory+"/"+filenam... |
fc066b7cecd7022e0ebc4e32de6dc23c959b4e34 | 53c583216c24336fbefbe6712ae6ea40d9e2fa51 | /notebooks/DF01_Basic.py | 611db41b4156cf59e6959af8cae14d008228fc34 | [] | no_license | nodesense/ibm-synapse-may-batch01 | a8334669f94b396c6b749faf33d30f7b6f8ff6a4 | f9b373a9bc13512c368ac9c49e23c58a950813fa | refs/heads/main | 2023-06-06T10:08:27.597023 | 2021-06-25T03:40:11 | 2021-06-25T03:40:11 | 372,425,916 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 3,037 | py | DF01_Basic.py | # Databricks notebook source
# sparksession, entry point for data frame/sql
print (spark) # spark session
# COMMAND ----------
# Python list of python tuples
products = [
# (product_id, product_name, brand_id)
(1, 'iPhone', 100),
(2, 'Galaxy', 200),
(3, 'Redme', 300), # orphan... |
9c0f061a37f87b08570f13f9ceba6a79c177cf8c | c607902a48125eaa724452ef9988d450ab5b32b2 | /ctasks/year_2021/month_06/day_20210618/L00000015_v1.py | f8e456145a0788e476f24de29ba43c356f1495c9 | [
"MIT"
] | permissive | nesen2019/everyday | 8571e00275546b7a437dbb4da5e6d95a6be60f5a | 8439d99b12a938cb8325cdaceef8861af062abc5 | refs/heads/main | 2023-06-21T05:02:47.713360 | 2021-07-28T15:27:23 | 2021-07-28T15:27:23 | 376,860,050 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,184 | py | L00000015_v1.py | '''
15.3Sum
15.三数之和
https://leetcode-cn.com/problems/
3sum
给你一个包含 n 个整数的数组 nums,判断 nums 中是否存在三个元素 a,b,c ,使得 a + b + c = 0 ?请你找出所有和为 0 且不重复的三元组。
注意:答案中不可以包含重复的三元组。
示例 1:
输入:nums = [-1,0,1,2,-1,-4]
输出:[[-1,-1,2],[-1,0,1]]
示例 2:
输入:nums = []
输出:[]
示例 3:
输入:nums = [0]
输出:[]
提示:
0 <= nums.length <= 3000
-105 <=... |
7c582f21d61ae79bc0c32724184d102fd326085b | ce76b3ef70b885d7c354b6ddb8447d111548e0f1 | /public_work_or_high_world/company_or_part/early_work/leave_last_life_on_week.py | c36f5d516cd0635fb5969303373c32d6794249f0 | [] | no_license | JingkaiTang/github-play | 9bdca4115eee94a7b5e4ae9d3d6052514729ff21 | 51b550425a91a97480714fe9bc63cb5112f6f729 | refs/heads/master | 2021-01-20T20:18:21.249162 | 2016-08-19T07:20:12 | 2016-08-19T07:20:12 | 60,834,519 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 264 | py | leave_last_life_on_week.py |
#! /usr/bin/env python
def large_child_or_way(str_arg):
little_work_or_next_man(str_arg)
print('last_government_or_new_hand')
def little_work_or_next_man(str_arg):
print(str_arg)
if __name__ == '__main__':
large_child_or_way('go_other_number')
|
609494faa72b0359b100ef823ade62a3a68111d8 | 7faabd75c936e079553d4fc0a46c2b71909c6c28 | /geoopt_layers/poincare/__init__.py | 857849b5531efa3ee609a3307d89e6541e9e369b | [] | no_license | ferrine/geoopt-layers | 80f48bc54b6bd130e4744d3fc2865a2c65398055 | 8a6b25046db7197ecf29db18fa0b47e8ebfe1044 | refs/heads/master | 2022-04-22T02:02:52.185919 | 2019-12-24T09:01:39 | 2019-12-24T09:01:39 | 218,776,743 | 12 | 1 | null | null | null | null | UTF-8 | Python | false | false | 1,000 | py | __init__.py | from .linear import MobiusLinear
from .pooling import (
MobiusAdaptiveAvgPool2d,
MobiusAdaptiveMaxPool2d,
MobiusAvgPool2d,
MobiusMaxPool2d,
)
from .batch_norm import (
MobiusBatchNorm,
MobiusBatchNorm1d,
MobiusBatchNorm2d,
MobiusBatchNorm3d,
)
from .radial import RadialNd, Radial2d, Radi... |
1977f81092ff78525c39f51b6ff49eeb98e7d9f1 | 114c4387e1ed3dae2c89a3a9c671f9f130746244 | /edacc/views/plot.py | 9a572bde535a381093e1902df42f7728e21bf8ae | [
"MIT"
] | permissive | EDACC/edacc_web | 68003a40e0afb50130720fe3844d1e25b8d8bcb1 | ce45b0b4baf19245f1418265f421d2a6f939d481 | refs/heads/master | 2021-01-17T16:08:48.708787 | 2014-06-03T05:30:55 | 2014-06-03T05:30:55 | 11,822,769 | 0 | 1 | null | null | null | null | UTF-8 | Python | false | false | 73,660 | py | plot.py | # -*- coding: utf-8 -*-
"""
edacc.views.plot
----------------
Plot view functions.
The handlers defined in this module return the plotted images as
HTTP responses.
:copyright: (c) 2010 by Daniel Diepold.
:license: MIT, see LICENSE for details.
"""
import os
import numpy
import StringIO
im... |
b8184f7bc5295746c9b06acc7f295ecc648305d5 | b93e0e0b8b50c0860b997a4f405633bf160b62df | /analyse_impact_recursif.py | ece997c79f3843fd8f9b6b6e135ce89e9dc76335 | [] | no_license | rapidoo/graphData | 313262a096a20d902be7e0fd3a7bcc19020a8147 | 7567ffd4c26aa21705204978da7711d1ee415c3a | refs/heads/master | 2021-01-01T06:54:49.165483 | 2014-03-04T13:40:59 | 2014-03-04T13:40:59 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 755 | py | analyse_impact_recursif.py | import sys
from py2neo import neo4j
graph_db = neo4j.GraphDatabaseService("http://localhost:7474/db/data/")
datasets = graph_db.get_or_create_index(neo4j.Node, "Dataset")
recipes = graph_db.get_or_create_index(neo4j.Relationship, "Recipes")
def analyse_impacts():
if len(sys.argv) > 1 :
foundDatasets = datasets.... |
346ec8472696f6473f3efa0bcc53c471739710cc | a1115883ce50d35482fb5e6662ae246b7782a7aa | /app/repository/examination_repository.py | ba1d7148515829db3b1e0fffee8eaa015f7f8541 | [
"MIT"
] | permissive | viaict/viaduct | 4c1252706a23f9ea83e6507ebafef2ced2288746 | 1faec7e123c3fae7e8dbe1a354ad27b68f2a8cef | refs/heads/develop | 2021-01-25T10:17:12.802733 | 2018-10-13T12:53:47 | 2018-10-13T12:53:47 | 18,373,059 | 11 | 3 | MIT | 2020-05-20T16:44:52 | 2014-04-02T16:26:03 | CSS | UTF-8 | Python | false | false | 3,507 | py | examination_repository.py | from flask_sqlalchemy import Pagination
from sqlalchemy import or_
from app import db
from app.models.course import Course
from app.models.education import Education
from app.models.examination import Examination
def find_examination_by_id(exam_id):
return db.session.query(Examination)\
.filter_by(id=exa... |
c47dba48d12d8983f1aa563cc1bc024cd58ca587 | e25b14f4b1a60c6688f948fa5e2f968c06eaa7d5 | /example/getjshtml.py | deac7a28d295b655afd230e79479ccbec8dd0103 | [] | no_license | lamborghini1993/WebCrawler | a7509f410c029891244b1c187f5df4fb03c3151e | 6794409ad9646602beab8506ddbf4e2108a06d31 | refs/heads/master | 2021-10-18T23:18:00.880920 | 2019-02-15T07:46:55 | 2019-02-15T07:46:55 | 108,209,153 | 0 | 2 | null | null | null | null | UTF-8 | Python | false | false | 1,369 | py | getjshtml.py | # -*- coding:utf-8 -*-
# 肖豪
# 获取JS渲染页面之后的源码
"""
1.使用到selenium库
2.使用了phantomjs.exe工具
"""
# import re
# info = '-----<span class="time">[--]</span>-------'
# zf = r'<span class="time">\[(.*?)\]</span>'
# zftime = r'<span class="zf(.*?)">(.*?)</span>'
# mm = re.search(zf, info)
# print(mm.group(1))
... |
04d21a4029d7f8a12625af8bdc35671817fdec5d | 9545652800884f0e54fe6595d8634c29ea4827a2 | /每日一题/2020_09_12_二叉树的层平均值.py | ce974e9270485bdb6a6721bb69f7a3ce075dbffa | [] | no_license | challeger/leetCode | 662d9f600a40fd8970568679656f6911a6fdfb05 | d75c35b6f8ab33c158de7fa977ab0b16dac4fc25 | refs/heads/master | 2023-01-13T07:34:42.464959 | 2020-11-13T02:40:31 | 2020-11-13T02:40:31 | 286,426,790 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 984 | py | 2020_09_12_二叉树的层平均值.py | """
day: 2020-09-12
url: https://leetcode-cn.com/problems/average-of-levels-in-binary-tree/
题目名: 二叉树的层平均值
给定一个非空二叉树,返回一个由每层节点平均值组成的数组.
思路:
层序遍历.
"""
from typing import List
from collections import deque
class TreeNode:
def __init__(self, x):
self.val = x
self.left = None
self.right = ... |
4bb27f2613595d53dcc28da7e8bc00fb5cec8f19 | 7f52845b5aca331ac200565f897b2b1ba3aa79d9 | /m251/fisher/diagonal/variational_diagonal_execs.py | 246e853d4c6cbdf02ab3ffc0389eaf1e7112441e | [] | no_license | mmatena/m251 | f8fb4ba9c10cd4dfcf5ee252f80e4832e4e86aa0 | e23249cf0896c5b42bcd07de70f7b9996d8b276b | refs/heads/master | 2023-05-06T10:44:10.945534 | 2021-06-03T15:07:29 | 2021-06-03T15:07:29 | 321,217,654 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,703 | py | variational_diagonal_execs.py | """TODO: Add title."""
import contextlib
from absl import logging
import tensorflow as tf
from del8.core.di import executable
from del8.core.di import scopes
from del8.executables.models import checkpoints as ckpt_exec
from m251.models.bert import glue_classifier_execs as gc_exe
from .diagonal_execs import Mergable... |
399477d181d5070fe9ad2dd201d4ae74a3816904 | 342de2241e0b11cb9d502b4ced2a6a64cf2fe19b | /mt_site/tenant_router/cache/patch.py | 76a8560e6e5a1fdbbc245ac8084d66a86d035e26 | [] | no_license | digitalcrackers/multi-tenant-poc | e0f2691fcf6a217d778d0a0f3b9edd73f640bdb6 | 03e8f6e7709583f0dbe6c5c9c665fff453a61302 | refs/heads/main | 2023-07-30T10:21:27.978064 | 2021-09-19T11:15:21 | 2021-09-19T11:15:21 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,333 | py | patch.py | import logging
from django.core.cache import CacheHandler
from tenant_router.cache.utils import construct_cache_alias
from tenant_router.managers.task_local import tls_tenant_manager
logger = logging.getLogger(__name__)
class TenantAwareCacheHandler(CacheHandler):
def __init__(self, *args, **kwargs):
... |
5d99141c9f1b8e64944355bbccd844955bb54369 | fb2cc597f319380d228fc15c4008760a82203687 | /var/spack/repos/builtin/packages/py-coilmq/package.py | 3af792a84328de8113c1ce161f579f1a2b9500bd | [
"Apache-2.0",
"MIT",
"LicenseRef-scancode-unknown-license-reference",
"BSD-3-Clause",
"LGPL-2.1-only"
] | permissive | JayjeetAtGithub/spack | c41b5debcbe139abb2eab626210505b7f930d637 | 6c2df00443a2cd092446c7d84431ae37e64e4296 | refs/heads/develop | 2023-03-21T02:35:58.391230 | 2022-10-08T22:57:45 | 2022-10-08T22:57:45 | 205,764,532 | 0 | 0 | MIT | 2019-09-02T02:44:48 | 2019-09-02T02:44:47 | null | UTF-8 | Python | false | false | 1,301 | py | package.py | # Copyright 2013-2022 Lawrence Livermore National Security, LLC and other
# Spack Project Developers. See the top-level COPYRIGHT file for details.
#
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
from spack.package import *
class PyCoilmq(PythonPackage):
"""Lightweight Python STOMP message broker."""
homep... |
5b58c3c2fbbe0eaf45a827ee1973744511a31b33 | 9743d5fd24822f79c156ad112229e25adb9ed6f6 | /xai/brain/wordbase/verbs/_stipples.py | 902840e29f5bb92313be1d24551570fa7156e654 | [
"MIT"
] | permissive | cash2one/xai | de7adad1758f50dd6786bf0111e71a903f039b64 | e76f12c9f4dcf3ac1c7c08b0cc8844c0b0a104b6 | refs/heads/master | 2021-01-19T12:33:54.964379 | 2017-01-28T02:00:50 | 2017-01-28T02:00:50 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 245 | py | _stipples.py |
from xai.brain.wordbase.verbs._stipple import _STIPPLE
#calss header
class _STIPPLES(_STIPPLE, ):
def __init__(self,):
_STIPPLE.__init__(self)
self.name = "STIPPLES"
self.specie = 'verbs'
self.basic = "stipple"
self.jsondata = {}
|
0c708ae636deb0ea80ff2c47a3f69617b65234ca | 38b275eadb1cd66f7f0ef9fef4b6eb4d081e2818 | /routes/athlete_routes.py | 391651ce9df03f2e478a0f0d699ea43c1db7d5c6 | [
"MIT"
] | permissive | edeneault/SpringBoard-Capstone-1 | 91e31f93ac7ff5da8a1dc2ee8cb1f363e583c8de | f60642c8ddc59b91df01a4c9269dffca89103bec | refs/heads/main | 2023-07-28T22:13:34.650702 | 2021-09-24T18:45:41 | 2021-09-24T18:45:41 | 352,090,107 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 3,422 | py | athlete_routes.py | ## Import App ##
from app import app
from flask import Flask, render_template, request, flash, redirect, session, jsonify, g
from sqlalchemy.exc import IntegrityError
from models import ( db, connect_db, User, Team, Athlete, Workout, Athlete_workout, Category,
Equipment, Muscle, Exercise, Workout_... |
5d2175cb2a401ad1bc2cd313a341a4638995881e | 15016ea8123ef9350fd4e941863673af122727c3 | /computer-labs/rl-CL3/lib/q_learning_app.py | e7326b90643430746e7de3a92a98147946aed525 | [
"MIT"
] | permissive | JulianoLagana/deep-machine-learning | 6c32e566d68333c5d6ace0b2f7f617246bd6576d | e9c8022dd98c6075647f8000aac52ad8cbba72b9 | refs/heads/master | 2023-07-08T20:18:01.681932 | 2023-06-22T08:45:41 | 2023-06-22T08:45:41 | 101,074,029 | 54 | 131 | MIT | 2022-09-07T05:41:19 | 2017-08-22T14:48:55 | Jupyter Notebook | UTF-8 | Python | false | false | 11,056 | py | q_learning_app.py | import matplotlib.pyplot as plt
import numpy as np
from lib.algos import epsilon_greedy_pi_from_q_table
from lib.plot_utils import plot_all_states, plot_agent, plot_q_table, plot_env_agent_and_policy_at_state, \
plot_env_agent_and_chosen_action, plot_policy
from lib.grid_world import a_index_to_symbol
class QLea... |
aaf34316fcb524f4c8c27f284c907e43373d5ff8 | 8cf00be8202824f0898f50251c4078bcff787c6d | /req_feature.py | 28a4fd9fb33ba6311a5b71942e6b9e49fae745bc | [] | no_license | sartz18/Intrusion-Detection-Ensemble-Learning-and-Packet-Sniffer | 1422f4dce0a2bfa010fd1eca53c3387912bac36b | c75aac1293b8ddfaec028d9872519f2f5760339e | refs/heads/main | 2023-01-29T13:16:09.154011 | 2020-12-16T16:50:28 | 2020-12-16T16:50:28 | 312,795,167 | 1 | 1 | null | null | null | null | UTF-8 | Python | false | false | 662 | py | req_feature.py | timestamp,
src_ip,
src_port,
dst_ip,
dst_port,
index,
idx,
--duration,
--protocol,
--service,
--status_flag,
--src_bytes,
--dst_bytes,
%land,
%wrong_frag,
%urgent
%hot,
%num_failed_logins,
%logged_in,
%num_compromised,
%logged_in,
%num_compromised,
%root_shell,
%su_attempted,
... |
26f5f455b1ef330c04dcf177fd0e4b2c9a1352a1 | 030c447ca1a7b2d143252aceebd090e915d49504 | /poly_regress.py | b0de5912aed0c29e6a88d1cdcba3b792a2baf51e | [] | no_license | dxjester/Py.ml_algorithms | 7bf99a67ef794978e698af81bc0786c3521c73cd | 9c9a7d6f83db1b6e3da9ee51766bb2face98605e | refs/heads/master | 2022-04-20T17:37:16.976056 | 2020-04-20T16:30:20 | 2020-04-20T16:30:20 | 216,270,022 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,640 | py | poly_regress.py | # -*- coding: utf-8 -*-
"""
FILENAME: poly_regression.py
PROJECT: Machine Learning Algorithms
DATE CREATED: 13-Mar-20
DATE UPDATED: 13-Mar-20
VERSION: 1.0
"""
# --------------- PHASE 1: Environment Setup -------------------#
# import the necessary libraries
import pandas as pd
import numpy as np
import matplotlib.pyplo... |
2e85eff9d5b4c06b7d42b92c58df78dd5f99392b | cde460ada76f15c3ccbd769b7b5a49f04cb755b8 | /models/res_company.py | 1cc73c2cd98b4027510a7f0c1b74f6db4bdba059 | [] | no_license | DevHerles/hpv | a528eef2044dc4c551399effad41f3a5b2ec0816 | 9aa3c2c9ce3f25f7b16d4e187847a308fd23ec63 | refs/heads/master | 2021-04-30T06:22:21.069579 | 2018-03-26T20:39:37 | 2018-03-26T20:39:37 | 121,440,507 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 342 | py | res_company.py | # -*- encoding: utf-8 -*-
from odoo import fields, models
class ResCompany(models.Model):
_inherit = 'res.company'
product_id = fields.Many2one('product.template', 'Prueba')
prefijo = fields.Char('Prefijo')
codigo_renipes = fields.Char(u'Código Renipes')
microred_id = fields.Many2one('minsa.micr... |
5aae156d7d2c6dd4fa0579864afb73ada2198ee0 | 1d7e3e89922e2a48e24abadb7a1ca2bbe3fdc76c | /src/i_util.py | 2ca7ee5c79244cfbd5d4810f78a79c10202972e2 | [] | no_license | vitorenesduarte/iGen | 5d0ad7507e67440dd7b01acc071475f7cb72ee65 | 9d8f8e3bac942d4e7fc637a594458a00713e035a | refs/heads/master | 2021-01-18T17:26:49.353286 | 2016-06-15T12:53:57 | 2016-06-15T12:53:57 | 58,960,716 | 0 | 0 | null | 2016-06-15T12:53:57 | 2016-05-16T19:26:07 | Python | UTF-8 | Python | false | false | 1,725 | py | i_util.py | from imp_ast import *
def extract_while_invariant(loop):
body = parse_parsed(loop.body)
inv = InvStatement(TrueBexp())
for i in xrange(0, len(body)):
command = body[i]
if isinstance(command, InvStatement):
body.pop(i)
return (body, command)
return (body, inv)
... |
c1972ade7141fdcbacb0494c89122c0c7d3a4a9e | 6506409d76a3e0fdf039d11d61a02bd7b542999a | /protobuf_utils.py | e2ee1a9ab78bd7a4e23bde44d95608ad04955617 | [
"Apache-2.0"
] | permissive | samlet/stack | 775001189a18305d83193f5bf48932e83ba422ea | 9958d18ee5e75cf9794f546c904097dc1ff4f3a0 | refs/heads/master | 2022-05-11T11:14:38.127606 | 2022-05-06T15:35:03 | 2022-05-06T15:35:03 | 224,751,055 | 3 | 1 | null | null | null | null | UTF-8 | Python | false | false | 463 | py | protobuf_utils.py | def write_proto_to(proto, file):
from os.path import expanduser
with open(expanduser(file), "wb") as f:
f.write(proto.SerializeToString())
def read_proto(proto, file):
from os.path import expanduser
with open(expanduser(file), "rb") as f:
proto.ParseFromString(f.read())
def convert_pro... |
cc47a523f71f1d321ec64ddba399e25bc9ee60e1 | d150fd716a9d69b1253f22b0567f919d068ea06c | /docker/flask/main.py | 8fe4e476764c0347193acbbe5c32d52dda42809f | [] | no_license | andreaskring/performance-testing-workshop | c6f1548a2bbcef83a626fb232bc68155faf5e855 | d1f48b94cca2c931867398c87b7e8bd3b9b8ba07 | refs/heads/master | 2020-09-21T18:44:19.498269 | 2019-12-04T21:56:53 | 2019-12-04T21:56:53 | 224,887,383 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 404 | py | main.py | import flask
app = flask.Flask(__name__)
def fib(n):
"""Recursive in order to be slow"""
if n == 0:
return 0
elif n == 1:
return 1
else:
return fib(n-2) + fib(n-1)
@app.route('/fib')
def hello_world():
n = flask.request.args.get('n', 10)
return flask.jsonify({'fib': ... |
1a3ed85da81d40d07cc07845feaaccda3cc688ce | 0f3b3e613a4813d17068562aabaa926ae7e04599 | /Classes/setupDatabePopulate.py | 19168e3e228182265f379bff6a540b28eb9456a5 | [] | no_license | marcelogomess/SMSFactory | 1acc49513bcc3d6c6bc2558d9f33c9237c48b880 | d5316d0908998f8f43ae2c88c55696b1b72f0ece | refs/heads/master | 2021-01-10T21:47:02.818007 | 2015-05-11T00:06:32 | 2015-05-11T00:06:32 | 35,296,091 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,346 | py | setupDatabePopulate.py | from sqlalchemy import create_engine
from sqlalchemy.orm import sessionmaker
from setupDatabase import Base, Empresas, Modems, Campanhas, Telefones, Envios, Recebimentos, Usuarios
engine = create_engine('sqlite:///smsfactory.db')
Base.metadata.bind = engine
DBSession = sessionmaker(bind=engine)
session = DBSession(... |
c31a75ef14529cf30a2ea208ccf0184ee54dd124 | 40132b5435a0e6a571489a707805e6067d94d1cb | /768. Max Chunks To Make Sorted II_hard.py | 34adff887b16e9343a8d5f5f2705d5d2b9f09e56 | [] | no_license | dedekinds/pyleetcode | be3d1038055067db768c0adb79d041419ca20ab5 | c5a1a9625da10b39b7d0b950a289ca2032fecd49 | refs/heads/master | 2022-12-13T14:51:32.309654 | 2022-11-27T12:40:59 | 2022-11-27T12:40:59 | 91,312,370 | 5 | 0 | null | null | null | null | UTF-8 | Python | false | false | 396 | py | 768. Max Chunks To Make Sorted II_hard.py | class Solution:
def maxChunksToSorted(self, arr: 'List[int]') -> 'int':
sum_pre = 0
sum_cur = 0
sort_arr = sorted(arr)
ans = 0
for i in range(len(arr)):
sum_pre += arr[i]
sum_cur += sort_arr[i]
if sum_pre == sum_cur:
sum_pre... |
6876ba162c211208dd14a6e2688877c74f0540e5 | 9945ebd67429dbdd9cec466db56ae67d06f9be13 | /test/001-spider.py | 98f0da7a07a2275f5786d6d0dad535563078a09a | [
"MIT"
] | permissive | zerlous/morning-python | 44dca9abbd7838abb86112ba629c913a2ea5343a | 8ef8b5602ece9f74da870f3588ad7c2f734792b3 | refs/heads/master | 2020-05-04T05:14:55.980980 | 2019-04-04T16:17:07 | 2019-04-04T16:17:07 | 178,982,125 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,349 | py | 001-spider.py | #!/usr/bin/env python
# -*- coding: utf-8 -*-
# @Author : zerlous
# @File : crawler.py
# @Time : 2019-04-04 12:46
# @Desc : 豆瓣Top250 数据爬虫
import requests
import json
from bs4 import BeautifulSoup as bs
def main():
url = 'https://movie.douban.com/top250'
result = []
for start in range(0, 250, 25):
... |
07b4bc076f5405d3e1ce068cad76d689a592c844 | d3504340d90c06913ddad2f6b5e351eaaf0a9df1 | /pyfeti/tests/test_feti_solver.py | 43ca069ab6c1e8931c992985aa0bc67ecd7abb1b | [] | no_license | gdmcbain/PYFETI | ef07ec245c3664b30dc3db9fc4d9b036c8a7cc31 | 0d3f947f4e5ed5df928097b044253afd48fe26ee | refs/heads/master | 2020-08-05T11:44:22.053752 | 2019-06-17T15:58:32 | 2019-06-17T15:58:32 | 212,489,792 | 0 | 0 | null | 2019-10-03T03:27:07 | 2019-10-03T03:27:06 | null | UTF-8 | Python | false | false | 28,845 | py | test_feti_solver.py |
import sys
import numpy as np
from unittest import TestCase, main
from collections import OrderedDict
from scipy import sparse
import time
sys.path.append('../..')
from pyfeti.src.utils import OrderedSet, Get_dofs, save_object, MapDofs
from pyfeti.src.linalg import Matrix, Vector, elimination_matrix_from_map_dofs, e... |
46f35a78e596667bcd957cbf1ec63eaa2e6369e7 | d51bcbc6ebb8d1d003ef0dbb829e9d7cd542fdb6 | /cogs/developer/developer.py | 0ae3c3f8b88d5e2eebefaf3ca1ea8d7359cace51 | [] | no_license | inainazumakun/smack-bot | a6c7efdce5fe2b14b9015a638ddbd05936cdb95f | 0b9c6c55d69c196e52118fb350448c957af4d4c0 | refs/heads/master | 2023-06-16T19:09:30.990173 | 2021-07-15T08:30:17 | 2021-07-15T08:30:17 | 385,140,903 | 1 | 1 | null | 2021-07-13T10:00:59 | 2021-07-12T06:02:02 | null | UTF-8 | Python | false | false | 1,691 | py | developer.py | """Developer Cog
A utility cog with commands intended for developers to assist in testing bot functionality
and development.
"""
from discord.ext import commands
from discord.ext.commands import errors
import config
from config import LogType
# CONFIGS = config.get_cog_configs('developer')
STRINGS = config.get_cog_st... |
ecfb6a2d81ae3dd3baa35955207640597181c3b0 | 48c9563d168c4fd85192df8bb73c479ca7f2a4ea | /calculate.py | f601cf87c8b18f2317bc40b45745a8666379aeca | [
"MIT"
] | permissive | Gklub/hdu_credit_calculate | b2528e990f928060c30bd0a91c813d7f3eaa7145 | 132775db51610e4a02ea13d83f18bb0d84183659 | refs/heads/master | 2020-11-30T16:19:33.671935 | 2016-06-01T07:27:09 | 2016-06-01T07:27:09 | 60,155,202 | 1 | 0 | null | 2016-06-01T07:31:39 | 2016-06-01T07:31:38 | null | UTF-8 | Python | false | false | 5,635 | py | calculate.py | #!/usr/bin/env python3
"""
This cli program is used to calculate credit, then compare it with requirement
Author: Mephis Pheies
Email: mephistommm@gmail.com
"""
import re
from collections import namedtuple
COURSECATEGORY = namedtuple("COURSECATEGORY",
("name", "basis_key", "requirement"... |
4386dcb1eba5fd2569e8bf2b184c2c35fe2fb255 | 7b02ef182ef6d49eafd3007c67006eebcac6aa84 | /maddy_blog/api/urls.py | 893d5e78cb95cfe9f9a61845f444c1e74c048780 | [] | no_license | gffuma/maddy-blog | 315f66f02957fe0e7f3d22e3af527fe093bcbf22 | fb308e868daef2d4c28971a8b643778ba82ad3c4 | refs/heads/master | 2021-01-11T01:57:00.210075 | 2016-10-13T17:44:46 | 2016-10-13T17:44:46 | 70,832,397 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 363 | py | urls.py | from django.conf.urls import url, include
from rest_framework import routers
from .views import PostViewSet, CategoryViewSet, ContentViewSet
router = routers.DefaultRouter()
router.register(r'posts', PostViewSet)
router.register(r'categories', CategoryViewSet)
router.register(r'contents', ContentViewSet)
urlpatterns ... |
c3991ea788cf64af6c712d3af8fa5924560e5527 | 35c79ef552b90434fb9d3a6cccb3ed7851fcb61a | /复杂链表的复制.py | 7cd8554586dfc61b682420f47d9190deee68fff4 | [] | no_license | melo4/jianzhioffer | 7b50a741a6c8ec08a676410d1fc7ec5c21043f10 | 4f139f578f4c6c6d402886cfca4c0d8adb856f1f | refs/heads/master | 2020-04-29T15:34:05.750162 | 2019-09-30T09:43:33 | 2019-09-30T09:43:33 | 176,232,506 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,012 | py | 复杂链表的复制.py | # -*- coding: utf-8 -*-
# @Time : 2019/4/11 下午4:21
# @Author : Meng Xiao
class RandomListNode:
def __init__(self, x):
self.val = x
self.next = None
self.random = None
class Solution:
def Clone(self, pHead):
if not pHead:
return None
pNode = pHead
w... |
f5dec26838287cf8e92b9c9d31b9856125df2a8b | 7b125c06fc6cf6b67c0e767c7503529f8417db71 | /run.py | 89ca289aef28a6fdabdf6ae8864525f674073d60 | [
"MIT"
] | permissive | mihaitodor/wikipedia_logs_crawler | 2c4004af500c2bfd0d9c11da16c07ab18101448e | 2fcb8fd8f03b1f4b0bff422a09e70b1efa2c6de1 | refs/heads/master | 2020-12-25T14:48:42.560268 | 2016-09-20T21:55:27 | 2016-09-20T21:55:27 | 66,795,256 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 558 | py | run.py | #!/usr/bin/env python
from subprocess import Popen
import codecs
from json import load, dump
from dateutil.parser import parse
#Use --nolog to supress scrapy logging output
Popen('scrapy crawl wiki_logs_spider -t json -o output/wiki_logs.json'.split()).wait()
with codecs.open('output/wiki_logs.json', 'r+', encoding=... |
fe233025382e3026b40e3a6446ac6b59695771a1 | df023df4fd6e7a626e122da5bb999990a1dac0ad | /py/kmeans.py | 51ce13d3fe7819cfee26ef992c83d1ee65324c10 | [] | no_license | dlcampillo/MEDITS | e1e864bd493723771ba406d267dc66a913e0bf4d | 93bb35308f3df02c24c8cb3dd09dd936f31fc870 | refs/heads/main | 2023-03-29T20:56:06.959200 | 2021-03-21T16:44:11 | 2021-03-21T16:44:11 | 350,057,838 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,741 | py | kmeans.py | import pandas as pd
import numpy as np
import matplotlib.pyplot as plt
from sklearn.cluster import KMeans
import xlsxwriter as xlsw
from geopy.distance import geodesic
n = 201
processing_time = 1.5
travel_time = 25
dataframe = pd.read_excel('tablafinal.xlsx')
dataframe = dataframe[:-1]
X = np.array(dataframe[['LONG'... |
7ed4ae91099a4da1c74ee6439d57b9f91b312432 | 5a9ced99e61be6d5922e504b318784f27682cd68 | /989. Add to Array-Form of Integer.py | 0e24f770a66cc91a3f28d07d55ae4ee6a92c8e0c | [] | no_license | jsw7524/989.AddtoArray-FormofInteger | a9d97a7b91ffbc1eaba84ffb8846c6069011af70 | 1035e2ac8b938736d8f3ed956cdd6b1899628a1c | refs/heads/master | 2022-04-20T09:05:14.180037 | 2020-04-19T10:45:45 | 2020-04-19T10:45:45 | 256,974,475 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,404 | py | 989. Add to Array-Form of Integer.py | import math
class Solution(object):
def addToArrayForm(self, A, K):
#prepare
digitLength=max(math.ceil(math.log10(K+1)),len(A))
A.reverse()
arrayK=[0]*digitLength
tmp=K
for i in range(digitLength):
arrayK[i]=tmp%10
tmp//=10
while len(A)... |
eb34d902eb85c01e2b0e88ee2cd97489625451ef | a0915e7348e055a5800d4409ce8cb0d7399042d2 | /backendtldr/scraper/scrape.py | a3966538990280dde570b098485673a5ce25579d | [] | no_license | petalrame/TLDR | 2deb54ec59f6965cdb4ed606dd9407fefe630412 | 78396fae13a098b5a2a84ca6424f01a8eeed496e | refs/heads/master | 2023-01-30T19:41:12.168075 | 2017-11-17T22:59:00 | 2019-10-24T20:11:06 | 81,751,639 | 0 | 0 | null | 2020-12-11T23:40:58 | 2017-02-12T19:39:47 | Python | UTF-8 | Python | false | false | 3,550 | py | scrape.py | """Scrape data (urls, authors, content, titles) from articles."""
import sys
sys.path.append("newspaper-0.1.0.7")
import newspaper
from scraper.models import Article
from django.utils import timezone
from summarize import summary_handler
from summarize import event_handler
# List of article dictionaries.
# Dicts must c... |
2a533ee280da799dc75b2d03e7775016b1278860 | b1eac5e638273ddce5f7a9111676ecf1a7a0305a | /day5/redis10.py | 1534535867439dc4e13d8300c8f42c4d8bd93a6a | [] | no_license | zhangbailong945/pachong | 081d4b79448ab01292d91011e6db4811784baa63 | 8af730989488ecfc09d40e96a4790ce1a6ce1714 | refs/heads/master | 2020-03-28T01:15:27.909917 | 2019-06-06T09:46:07 | 2019-06-06T09:46:07 | 147,490,458 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,819 | py | redis10.py | #sort set 有序序列集合
#1.zadd(name,*args,**kwargs)
#在name对应的有序集合中添加元素
#2.zcard(name)
#获取name对应的有序集合中元素的个数
#3.zcount(name,min,max)
#获取name对应的有序集合中年龄在[min,max]之间的个数
#4.zincrby(name,value,amount)
#自增name对应的有序集合的name对应的年龄
#5.zrange(name,start,end,desc=False,withscores=False,score_cast_func=float)
#按照索引范围获取name对应的有序集合的元素
#... |
c8b49e1097dbf254ce706a578d312987963f933a | 5b237a609ada9a42b9697943c7f9a25ef768a453 | /createExecutable.py | 9e24a3805cff3e498ef090503101506f53b9d2b1 | [] | no_license | SystemsCyber/SSS2-GUI | f409a911cfa3194d1bf49892e5a4d864dc7652c9 | 4300e69769895294ac41bef37b3a7e913e41c20e | refs/heads/master | 2022-08-23T11:04:16.981619 | 2020-09-27T01:04:00 | 2020-09-27T01:04:00 | 252,339,835 | 1 | 1 | null | 2021-06-28T01:58:55 | 2020-04-02T02:51:18 | Python | UTF-8 | Python | false | false | 197 | py | createExecutable.py | from distutils.core import setup
import py2exe
setup(
windows = [
{
"script": "SSS2-Interface.py",
"icon_resources": [(1, "synerconlogo.ico")]
}
],
) |
3fd16df248b868851265d06514fc408e873e1ca6 | b3fa84a2e2e93065df88a1a0d2b272ad8795c04a | /shutterstock/api.py | c3c0497e19f2002538c2af86f8ec4756368ed5ee | [
"MIT"
] | permissive | malero/python-shutterstock-api | bb676b87a896b0cfd05cccccc315de2b2f569332 | 69f056fa837d3c111133950d066b336c6f46ed96 | refs/heads/master | 2020-03-28T05:13:59.381959 | 2018-11-06T23:15:48 | 2018-11-06T23:15:48 | 147,764,123 | 0 | 1 | MIT | 2019-07-10T22:58:25 | 2018-09-07T03:13:58 | Python | UTF-8 | Python | false | false | 1,220 | py | api.py | import json
import requests
class ShutterstockAPI:
def __init__(self, token):
self.token = token
@property
def headers(self):
return {
'Content-Type': 'application/json',
'Authorization': 'Bearer {token}'.format(
token=self.token
)
... |
ffcd8f9039d9e075f0ca68875faf735f52f9a285 | 9743d5fd24822f79c156ad112229e25adb9ed6f6 | /xai/brain/wordbase/nouns/_facing.py | e8f32e3624d227ed9ca4cb4c1dd41c5d897b7e23 | [
"MIT"
] | permissive | cash2one/xai | de7adad1758f50dd6786bf0111e71a903f039b64 | e76f12c9f4dcf3ac1c7c08b0cc8844c0b0a104b6 | refs/heads/master | 2021-01-19T12:33:54.964379 | 2017-01-28T02:00:50 | 2017-01-28T02:00:50 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 500 | py | _facing.py |
#calss header
class _FACING():
def __init__(self,):
self.name = "FACING"
self.definitions = [u'an extra layer of material sewn to the inside edge of a piece of clothing to make it stronger, or to the outside, especially of collars and the ends of sleeves, for decoration: ', u'an outer layer covering a wall, etc... |
1f752faf4c101614b7182f96c6ce84897c4b6531 | d9b785fa4f4f608d20f0974d1f3d64b6612fbf5f | /druken_bishop.py | 99a9526baee607e910ad0ff8f97ff207a68b1986 | [
"MIT"
] | permissive | ivangonekrazy/drunken_bishop | f141cd423d7f9701fc16f57cbb801e298afb711d | bda14685b5261b4c477a60989ae5d826c82b57fb | refs/heads/master | 2020-03-22T22:45:32.901155 | 2018-07-17T18:10:46 | 2018-07-17T18:10:46 | 140,769,395 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 4,130 | py | druken_bishop.py | import random
import StringIO
import textwrap
class RandomArt(object):
WIDTH = 17
HEIGHT = 9
CENTER = (8, 4)
ALL_STEP_DIRECTIONS = [
('N', 'W'),
('N', 'E'),
('S', 'W'),
('S', 'E'),
]
START_GLYPH = 'S'
END_GLYPH = 'E'
GLYPHS = ' .o+=*BOX@%&#/^'
def... |
8da8f93643ee4edf840a9d3a9ca4ff0157264af2 | 2235100a6602dfd26e7df20924da997ef9b44c50 | /notebooks/utils.py | b7d06b20622c5fe50318a176718316f125bc91f3 | [] | no_license | IvanBrasilico/model_ajna_1 | 03985199d09f9db480f64b971ba8262bc11b68ad | 3a2dbc8ee9f32b560aa9d942f6f3b51bfced3a87 | refs/heads/master | 2022-12-10T13:47:18.889737 | 2021-09-28T14:01:46 | 2021-09-28T14:01:46 | 190,408,041 | 5 | 1 | null | 2022-11-22T05:13:10 | 2019-06-05T14:15:14 | Jupyter Notebook | UTF-8 | Python | false | false | 2,902 | py | utils.py | import numpy as np
import matplotlib.pyplot as plt
import os
import random
from PIL import Image
from sklearn.metrics import classification_report, confusion_matrix
def get_imagens_erro(pgenerator, pmodel, tamanho=0):
'''Usa generator para gerar batches.
Retorna y_real e y_pred de todos os exemplos do ge... |
ec9c4cd801a5b62405c13121155c3dfa40491cf4 | fb86b31db1f69a89cc77ac9a2796b5f3f1032235 | /ZH/old/ZH_v3.py | 4320a6933e84655e1e187110ef051bcfb7dcdf08 | [] | no_license | GageDeZoort/ZH_AddConfigFile | a310ee87728615be28e3e568f1ad5e8d913de758 | d1d9ab164539dc7f3a72a79ddb8081b304c419b3 | refs/heads/master | 2020-09-06T17:00:41.914401 | 2019-11-08T14:34:26 | 2019-11-08T14:34:26 | 220,487,268 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 8,174 | py | ZH_v3.py | #
# make sync ntuple for ZH tau tau analysis
# takes nanoAOD file as input
#
from ROOT import TFile, TTree, TH1D, TCanvas, TLorentzVector
import numpy as np
from math import sqrt, pi
import tauFun
import generalFunctions as GF
import outTuple
import time
def getArgs() :
import argparse
parser = argparse.Ar... |
8c63e9d2e5d85c25e126aa1824feb8dafde58469 | c7f95daebf17fcab9cf16255f931d0b694e3ec30 | /accounts/urls.py | 034bd132200dfc0896f5315691e731e16a9b5e90 | [
"MIT"
] | permissive | kevin-meyers/make-wiki-v2 | 6ece7fffb1b8a20bffd77df0758ec56fe8c57bc9 | 575b3ba8a197c4853af5960b1cad14f40dc6a6c2 | refs/heads/master | 2023-04-27T12:19:29.736497 | 2020-06-06T20:49:14 | 2020-06-06T20:49:14 | 221,320,054 | 0 | 0 | MIT | 2023-04-21T20:41:09 | 2019-11-12T21:58:11 | Python | UTF-8 | Python | false | false | 158 | py | urls.py | from django.urls import path
from accounts.views import SignupView
urlpatterns = [
path('signup', SignupView.as_view(), name='accounts-signup-page'),
]
|
857b9c63177d8cab52ac4b8f8c363e011d9b4753 | 6478277dd93381be3a99edc15221b2f1c78b2831 | /rpn.py | aa2a6deb0c4ff8e9c48fbd54002534c3b40ccc49 | [] | no_license | tjwldnjss13/YOLO9000-pytorch | 1f41aa6ca8d7ba4b105074c05a2e2f9107333c9e | 6cd2d94097d9f19567d20609b82905d72189da92 | refs/heads/master | 2023-01-12T14:55:13.181534 | 2020-11-12T05:30:53 | 2020-11-12T05:30:53 | 309,539,872 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 707 | py | rpn.py | import torch
import torch.nn as nn
class RPN(nn.Module):
def __init__(self, n_filter, n_anchor_box=5):
super(RPN, self).__init__()
self.n_anchor_box = n_anchor_box
self.reg_conv1 = nn.Conv2d(n_filter, 512, 1, 1, 0)
self.reg_conv2 = nn.Conv2d(512, 5 * self.n_anchor_box, 1, 1, 0)
... |
4d3780cc2936bfbffd139af31ac094f049a8bdb3 | e10a6d844a286db26ef56469e31dc8488a8c6f0e | /ravens/ravens/models/__init__.py | ad9f22f0e9b4c62362f729abfdb452bba6593f55 | [
"Apache-2.0",
"CC-BY-4.0"
] | permissive | Jimmy-INL/google-research | 54ad5551f97977f01297abddbfc8a99a7900b791 | 5573d9c5822f4e866b6692769963ae819cb3f10d | refs/heads/master | 2023-04-07T19:43:54.483068 | 2023-03-24T16:27:28 | 2023-03-24T16:32:17 | 282,682,170 | 1 | 0 | Apache-2.0 | 2020-07-26T15:50:32 | 2020-07-26T15:50:31 | null | UTF-8 | Python | false | false | 1,078 | py | __init__.py | # coding=utf-8
# Copyright 2022 The Google Research Authors.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicab... |
41b7e5bf271ddc01f96fbb22d71b8aaedd59ea40 | d6aae799e18e907fb413b715200c7832252a87e5 | /neural-architecture-search/ENAS/micro_search.py | 4b4c552b399b2c001a7637438ed8d5f35b45175c | [
"BSD-3-Clause",
"MIT",
"LicenseRef-scancode-proprietary-license",
"Apache-2.0",
"CC-BY-NC-4.0",
"LicenseRef-scancode-unknown-license-reference"
] | permissive | sony/nnabla-examples | 0d0bbd5df3028996e790bcf07248fdb0932697d1 | 41f71faa6efff7774a76bbd5af3198322a90a6ab | refs/heads/master | 2023-09-04T03:45:54.023899 | 2023-08-22T03:31:21 | 2023-08-22T03:31:21 | 109,625,584 | 308 | 108 | Apache-2.0 | 2023-08-22T03:31:23 | 2017-11-05T23:30:40 | Python | UTF-8 | Python | false | false | 19,670 | py | micro_search.py | # Copyright 2018,2019,2020,2021 Sony Corporation.
# Copyright 2021 Sony Group Corporation.
#
# 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
#... |
33d8e172a3fe1517219ad61c616a59557079d4a1 | ba54626f1beae7b81cd60c92de654767b435970c | /python/adv/pyqt5/main.py | ae065de875d47f5fe56b058465205e36cae92f49 | [] | no_license | SoleGH/much_more | 2870fe5a5ffe971ce279f8b852bd83297f33c1a1 | c930b4339dd3ed0d0575cecc840efbe074ba4cbb | refs/heads/master | 2023-06-07T18:13:11.589578 | 2023-06-06T07:04:47 | 2023-06-06T07:04:47 | 137,881,499 | 0 | 2 | null | null | null | null | UTF-8 | Python | false | false | 1,456 | py | main.py | # *_* uft-8 *_*
import os
import winreg
from PyQt5.QtWidgets import QApplication
import sys
# 设置项目路径必须在本地包导入最顶层
from common.const import CONST
current_file = os.path.abspath(__file__)
main_dir = os.path.dirname(current_file)
CONST.PROJECT_PATH = main_dir
from forms.main_ui import MainUI, ErrorUI
from common.logger imp... |
053ae6e2870e1b98aaaa46be053ce587367f4b91 | 2560feda0e6875e797571e3992192c1ad9b223ef | /Evaluation_AnalyzeModelPerformanceResults_Calculations.py | 5ad9b2c3c514dc518c72fc08c445de4e4f8529e0 | [] | no_license | kikivanderheijden/CNN_SoundLoc_NC | 7060945e62973d21e9389659cb38b76e7fe76f7c | c158481524cef6af92487a16a711b00255732762 | refs/heads/master | 2023-02-07T16:20:39.412567 | 2020-12-29T14:50:18 | 2020-12-29T14:50:18 | 319,252,239 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 3,761 | py | Evaluation_AnalyzeModelPerformanceResults_Calculations.py | import numpy as np
import openpyxl
def Evaluation_CalculateAveragePerformance(CNN_dict_preds, excelfile, filenames_CNN):
mse = CNN_dict_preds['mse']
cosine_distance_degrees = CNN_dict_preds['cosine_distance_degrees']
# retrieve values for plot (A), you have to divide models into trained with AD l... |
7eaf55dd2f1a4aebf4456531e4d7966d33044d36 | f8cff1f2c00f000aba61cdf728d8a2b254647f09 | /OpenSpider-master/request/httprequest.py | a740d21edf0c58f18a776213ed2bb6a50c77c3df | [] | no_license | vieyahn2017/crawlers | 76097ec9ca71edd128addf341ae02ef26ef383dc | fa584094b026cbf0451e78303c56f614fa5fedde | refs/heads/master | 2021-09-12T21:23:33.265856 | 2018-04-21T03:06:50 | 2018-04-21T03:06:50 | 102,854,533 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 209 | py | httprequest.py | __author__ = 'zhangxa'
from ..request import Request
'''
HttpRequest should have a dispatcher called HttpRequestDispatcher
'''
class HttpRequest(Request):
def __init__(self,url):
self._url = url
|
7542fea1b4ac703834436eaeb5d18c6c777d9c2b | cebeec1f180031dfc4d7ef61d4e81e928e23e6c1 | /theconscience/project_mixins.py | 54319ee02b119071cc7bca6179c7d5d0de358446 | [] | no_license | theConscience/theconscience | cf53a40ed4c9be7c7ec8d75649a33c097bd6c456 | 62c3e58d9284a51f8b1b5c31acfafa9e5e46b39c | refs/heads/master | 2021-01-10T02:34:43.440128 | 2018-04-05T15:40:45 | 2018-04-05T15:40:45 | 47,506,564 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 7,332 | py | project_mixins.py | # -*- coding: utf-8 -*-
import json
from settings import MEDIA_ROOT, MEDIA_URL
# from django.conf import settings
from django.contrib import messages
# from django.contrib.auth.decorators import login_required
# from django.contrib.contenttypes.models import ContentType
# from django.core.paginator import Pagi... |
86714f98992bbc57d4c7e4738458c4762bc094ff | f95e73867e4383784d6fdd6a1c9fe06cffbfd019 | /PythonToolkit/DigitRecognition/recognizor.py | 3a8b8452628c8039c62f1aadbc811861a6ad5947 | [] | no_license | linxiaohui/CodeLibrary | da03a9ed631d1d44b098ae393b4bd9e378ab38d3 | 96a5d22a8c442c4aec8a064ce383aba8a7559b2c | refs/heads/master | 2021-01-18T03:42:39.536939 | 2018-12-11T06:47:15 | 2018-12-11T06:47:15 | 85,795,767 | 3 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,369 | py | recognizor.py | # -*- coding: utf-8 -*-
import cv2
import numpy as np
samples = np.loadtxt('features.data',np.float32)
responses = np.loadtxt('labels.data',np.float32)
responses = responses.reshape((responses.size,1))
model = cv2.ml.KNearest_create()
model.train(samples,cv2.ml.ROW_SAMPLE, responses)
im2 = cv2.imread('d... |
c38016d11932c36b241dd420e2a35a2c4da9c51d | 8b0787d074aaa9e864de59bf4f99d59f05e345ea | /test/test_indicator/test_OLS.py | ef2dbd6f92852b524157a2877b0c0713ddddbd0b | [] | no_license | lalacat/TradeBackSystem | 068dea30a19b277fc0238ff3f456fdb597fc5e42 | 66eb4dce9c4a59534680415b0d029c8a3d53bca4 | refs/heads/master | 2022-03-03T13:44:13.744496 | 2022-02-17T10:19:21 | 2022-02-17T10:19:21 | 187,209,639 | 3 | 2 | null | null | null | null | UTF-8 | Python | false | false | 1,823 | py | test_OLS.py | import matplotlib.pyplot as plt # python matplotlib 绘图
import numpy as np
import pandas as pd;
from datetime import datetime
from scipy import stats
import statsmodels.api as sm
from base_database.database_mongo import init
from base_utils.constant import Interval, Exchange
from settings.setting import Settings
"""
最... |
562775ce457e26bde4535c58a53bcaf5985a6c3a | d5e7d991dc853612e74869d81059ab5f162d7f59 | /gen2-seq-num-sync/sync-multiple-devices.py | d69a9125fbaf6ec5ec0ce7722dc1ce9c78cce05a | [
"MIT"
] | permissive | AMB-technology-playground/depthai-experiments | b0ca1d3e7f531db7d51b4edac95d8d5aa5fd5fa3 | b3f72a2a1dfc27f3c55d987482141db6815c0f0c | refs/heads/master | 2023-09-05T23:00:21.804683 | 2021-10-15T09:42:17 | 2021-10-15T09:42:17 | 415,680,320 | 0 | 0 | MIT | 2021-10-10T19:25:12 | 2021-10-10T19:25:11 | null | UTF-8 | Python | false | false | 3,817 | py | sync-multiple-devices.py | #!/usr/bin/env python3
import cv2
import math
import depthai as dai
import contextlib
import argparse
from datetime import timedelta
parser = argparse.ArgumentParser(epilog='Press C to capture a set of frames.')
parser.add_argument('-f', '--fps', type=float, default=30,
help='Camera sensor FPS, ap... |
452565a1e93ad71693a67f3423e7d13e74b23f45 | 7b9a2a391e1ca5ef61d7b26aae36ffb3bb0c88e1 | /tests/tools/test_filltemplate.py | 4bff70dbf25e8dedf6d341fe3e60458b8c8c37c7 | [
"LicenseRef-scancode-warranty-disclaimer",
"LicenseRef-scancode-public-domain"
] | permissive | usnistgov/atomman | 6d9bf45deb7c5360eba6f99c696e3ce9d6ea41cd | b8af21a9285959d38ee26173081db1b4488401bc | refs/heads/master | 2023-08-07T15:17:20.327487 | 2023-07-28T20:48:35 | 2023-07-28T20:48:35 | 54,718,470 | 78 | 36 | NOASSERTION | 2022-12-18T19:40:12 | 2016-03-25T12:52:52 | Python | UTF-8 | Python | false | false | 611 | py | test_filltemplate.py | # coding: utf-8
# https://docs.pytest.org/en/latest/
import pytest
from atomman.tools import filltemplate
def test_filltemplate():
template1 = 'this is my {val} to test'
template2 = 'another <val> to test'
template3 = 'yet another !@#$val?@ to test'
var = {'val': 'template', 'notused':'STEVE!'}
... |
fea5cfe99d9637a57fbde490544e4f39d9d8feaf | a422fd527f02c15a8cc0eff5d1b981c061b964f2 | /market_announcement/pipelines.py | ddada9f0cbe7c345792ef4eb07fc2d4040b6601e | [] | no_license | kevin-light/market_announcement | a0e35451cc36a11892d2b773eca9f845f44b879e | 83b304781ebeddd3fbb4e4abff45ff44156d16ab | refs/heads/master | 2021-02-28T03:00:33.194241 | 2020-03-07T13:37:50 | 2020-03-07T13:37:50 | 245,656,885 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,663 | py | pipelines.py | # -*- coding: utf-8 -*-
# Define your item pipelines here
#
# Don't forget to add your pipeline to the ITEM_PIPELINES setting
# See: https://doc.scrapy.org/en/latest/topics/item-pipeline.html
# class MarketAnnouncementPipeline(object):
# def process_item(self, item, spider):
# return item
import psycopg2... |
aaa5820fec45f8faf438d034c54a24fedff71e9f | bc00bdc08d76c8be38c51b1f1caeced2a4668592 | /abjad_demo/env/lib/python3.6/site-packages/abjad/pitch/Inversion.py | 4122d3f2b1b23d0f66127f03fa01d9979377ec6b | [] | no_license | gsy/gmajor | 769afd6e87f6712e4059f3f779f41932cbca962d | 7f5f20a19494256615fbaaa840b2a0bbbf6e311f | refs/heads/master | 2023-02-08T07:00:44.479895 | 2019-05-20T13:58:03 | 2019-05-20T13:58:03 | 161,866,236 | 0 | 0 | null | 2023-02-02T06:26:34 | 2018-12-15T03:32:48 | Scheme | UTF-8 | Python | false | false | 6,986 | py | Inversion.py | from abjad import markups
from abjad.system.AbjadValueObject import AbjadValueObject
class Inversion(AbjadValueObject):
"""
Inversion operator.
.. container:: example
>>> abjad.Inversion()
Inversion()
.. container:: example
>>> abjad.Inversion(axis=15)
Inversion(a... |
25e3eca5e911ab3a8c3e18e1e6e42f4f1fba39a4 | 889b81ef12c0b4c9590e3ec07024c86787cf3196 | /algorithms/google/NextClosestTime.py | 81c9344d72bb914f6de57b7f0c19e95b98d94e77 | [] | no_license | james4388/algorithm-1 | ab06ff40819994483e879f2f9c950e6b6711832c | 2d5c09b63438aee7925252d5c6c4ede872bf52f1 | refs/heads/master | 2020-11-25T04:43:24.249904 | 2019-11-18T06:12:48 | 2019-11-18T06:12:48 | 228,507,062 | 1 | 0 | null | 2019-12-17T01:26:59 | 2019-12-17T01:26:59 | null | UTF-8 | Python | false | false | 1,219 | py | NextClosestTime.py |
# Find next closest time of current given time
# Solution: calculate in minute: m = hour * 60 + min, increase value and check
# if all number in allowed number, runtime: O(24*60)
class Solution(object):
def nextClosestTime(self, time):
cur = 60 * int(time[:2]) + int(time[3:])
allowed = {int(x) fo... |
bced1d16e85e253612b8f9fd525c16b4f3c9293a | 613c9ebaebb80a0424ea053ad06a21f772e38941 | /projects/models/__init__.py | 7857c5336c86b8f163ac16e2ed3942762d0f69a9 | [
"Apache-2.0"
] | permissive | math-sasso/projects | 5447d25c21f6b8f785327d650925be1fccf19258 | 26a6148046533476e625a872a2950c383aa975a8 | refs/heads/master | 2022-12-28T16:43:54.321667 | 2020-10-15T12:30:35 | 2020-10-15T12:30:35 | 259,403,099 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 285 | py | __init__.py | from .component import Component
from .experiment import Experiment
from .operators import Operator
from .dependencies import Dependency
from .project import Project
from .template import Template
__all__ = ['Component', 'Experiment', 'Operator', 'Dependency', 'Project', 'Template']
|
0561722bb83e40c0fc4fc3392f0337a10b22edae | 839d8d7ccfa54d046e22e31a2c6e86a520ee0fb5 | /icore/base/date/timer.py | b3cd59d78ca0f6f7921dff530c9aa4d45f6bedce | [] | no_license | Erich6917/python_corepython | 7b584dda737ef914780decca5dd401aa33328af5 | 0176c9be2684b838cf9613db40a45af213fa20d1 | refs/heads/master | 2023-02-11T12:46:31.789212 | 2021-01-05T06:21:24 | 2021-01-05T06:21:24 | 102,881,831 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 531 | py | timer.py | # -*- coding: utf-8 -*-
# @Time : 2018/1/11
# @Author : LIYUAN134
# @File : timer.py
# @Commment:
#
from datetime import datetime, timedelta
def demo_time1():
a = datetime(2012, 9, 23)
print a
print(a + timedelta(days=10))
b = datetime(2012, 12, 21)
d = b - a
print d.days... |
918c73cd5bdc6745df74ba72c883f71531b61855 | 27ce7d1ecb8556b1cce963eb649c92abf27347ab | /Codeforces/59A Word.py | 5ba72fd9da6ac0b2351815b0c811e4926e086588 | [
"Unlicense"
] | permissive | a3X3k/Competitive-programing-hacktoberfest-2021 | c005c2413e93e14808c5f1e60cbbc73c0ff04674 | bc3997997318af4c5eafad7348abdd9bf5067b4f | refs/heads/main | 2023-08-31T17:14:21.584487 | 2021-10-04T04:03:41 | 2021-10-04T04:03:41 | 413,268,126 | 1 | 0 | Unlicense | 2021-10-04T04:02:03 | 2021-10-04T04:02:02 | null | UTF-8 | Python | false | false | 180 | py | 59A Word.py | #https://codeforces.com/problemset/problem/59/A
s = input()
c,n=0,0
for i in s:
if ord(i)<97:
c+=1
else:
n+=1
print(s.lower()) if c<=n else print(s.upper()) |
e8e94a603c3195f585f40e791489529c2a3a5800 | 973b1bf6320b78ac8e06ea360bc8ca97c69d060c | /cursos/cursos/spiders/udacity.py | 1314a761b898d3f2d8e688c91b0bb4aefc434342 | [] | no_license | manoel-victor1602/Sistema-de-Recomendacao-Simples | bedc86e34a6664059e4d2bfce5942a40bb7532e5 | 7608320610a8e46a6d6046ec51ff90b0bd737e8f | refs/heads/master | 2020-04-08T17:15:50.003581 | 2018-11-28T20:37:26 | 2018-11-28T20:37:26 | 159,559,383 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,169 | py | udacity.py | import scrapy
class UdacitySpider(scrapy.Spider):
name = 'udacity'
start_urls = ['https://br.udacity.com/courses/all/']
def parse(self, response):
divs = response.xpath("/html/body/ir-root/ir-content/ir-course-catalog/section[3]/div/div[2]/ir-course-card-catalog/div/div/div/div")
for div i... |
91dde2cc585176d0468c4f682d2a436e76b43307 | 42e9b24babc17fc44cd8f922d11caea75457aa88 | /mysite/website/models.py | 23362acc137cc9e3a07ac2a1b092ed154be06557 | [] | no_license | danielevezz/test-django | f3f4aadba24d94aed130b1aab0a892e8a2999a4f | 0761cb8ef446eb6550d24183fa11529f68a57179 | refs/heads/master | 2020-04-05T13:13:23.497257 | 2018-11-24T08:13:56 | 2018-11-24T08:13:56 | 156,892,696 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 427 | py | models.py | import datetime
from django.db import models
# Create your models here.
class Event(models.Model):
title = models.CharField(max_length=50)
createdAt = models.DateTimeField("Created at")
description = models.TextField("description")
def __str__(self):
return self.title
def new(self):
... |
4f10eefaa9df9bf3ff3c15e8d7fd901cfc2ce4a2 | 9f11e2a9da329b90839ca1547f801350601c5206 | /crm/admin.py | 3787f153395ce555be8267d9a2f7a58c2dcd9674 | [] | no_license | Christi418/Assignment2 | a18fcc1ea792a5f11f01a352b17ade3178c410dd | 486950e5b8cc2f6916f5e6d404f6972da53b032b | refs/heads/master | 2020-03-31T06:58:43.279197 | 2018-10-08T01:41:54 | 2018-10-08T01:41:54 | 152,002,339 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 314 | py | admin.py | from django.contrib import admin
from .models import Customer
class CustomerList(admin.ModelAdmin):
list_display = ( 'cust_name', 'organization', 'phone_number' )
list_filter = ( 'cust_name', 'organization')
search_fields = ('cust_name', )
ordering = ['cust_name']
admin.site.register(Customer)
|
6290782168c1fdb1fa5cd6a0c2673ea134187c03 | ffbe68f6b32cb47fa24d88cdf12f489ea03b58aa | /cmptuple.py | be9707f6656f7351f62d84917c9919390fed3513 | [] | no_license | Vipretha/Vipretha | 3fe27f986cdb7f6d675753adf7d79d5eacb52b02 | ccded940e59115602399cdfe89a304eb75c951bd | refs/heads/main | 2023-08-17T00:36:29.719078 | 2021-10-04T05:18:53 | 2021-10-04T05:18:53 | 402,299,101 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 157 | py | cmptuple.py | Tuple1 + Tuple2 = (123 , 'XYZ' ),(456 , 'ABC')
print cmp(Tuple1 , Tuple2)
print cmp(Tuple2 , Tuple1)
Tuple3 = Tuple2 + (789,);
print cmp(Tuple2 , Tuple3) |
01e984e920c98d1aea6db896f18cead18b5f3fa0 | 2bf9f38cbb160c503ec567219a9f8a925f1f5c88 | /openregistry/api/models/roles.py | 3900a2c31d96bac01f21b635661fbed85a6752b6 | [
"Apache-2.0"
] | permissive | openprocurement/openregistry.api | 68d00535c2c290f64b27bba2d3294657436e131e | 1e1cf5fe056562c44184e0b763786f0886320a1b | refs/heads/master | 2021-01-01T14:06:24.208383 | 2019-02-21T15:29:55 | 2019-02-21T15:29:55 | 97,586,134 | 4 | 10 | null | 2018-01-24T17:14:31 | 2017-07-18T10:35:30 | Python | UTF-8 | Python | false | false | 1,252 | py | roles.py | # -*- coding: utf-8 -*-
from schematics.transforms import whitelist, blacklist
from couchdb_schematics.document import SchematicsDocument
schematics_default_role = SchematicsDocument.Options.roles['default'] + blacklist("__parent__")
schematics_embedded_role = SchematicsDocument.Options.roles['embedded'] + blacklist("... |
248af713b516b0df53913ae773d43b33e1c006b4 | 403727cfe7c414ee63cf5db290ccea345ee12cf8 | /ALGORITHM/BAEKJOON/SOURCE/03. Stack & Quequ(스택과 큐)/4. 카드2.py | fb89b292a09660fd922f95a787820346cb56640b | [] | no_license | parksjsj9368/TIL | 5178ea9715a1656d5440a49f05b4065a18f72ad7 | a4d3ece6f755fd4a9572a1d0cc291648842e433b | refs/heads/main | 2023-09-06T06:16:43.442216 | 2021-11-16T00:26:33 | 2021-11-16T00:26:33 | 295,646,397 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 506 | py | 4. 카드2.py | n = int(input())
from collections import deque
queue = deque()
for i in range(n) :
queue.append(i+1)
while len(queue) > 1 :
queue.popleft()
n = queue[0]
queue.popleft()
queue.append(n)
print(queue[0])
# 숏 코딩
#
# n = int(input())
# from collections import deque
# queue = dequ... |
4d2c08e56ecda39050b0b8da903feaa5ac6d0afb | aa61348fae850ae99bfed1a60b63e5169d687249 | /GRAFOSLAB2/Engine.py | d34e960f20b559636609c316af4db6bd47c3f6c1 | [] | no_license | Diego223/LAB2GRAFOS | c22af348879f38d027a6ea75f565bb788cd83a21 | 01041d4195c90b76638e3bf9b10acf2d8d447e58 | refs/heads/main | 2023-06-22T00:44:14.141046 | 2021-07-20T02:48:43 | 2021-07-20T02:48:43 | 387,652,839 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,375 | py | Engine.py | #Universidad del Valle de Guatemala
#Graficas por Computadora
#Laboratorio 2
#Diego Crespo 19541
from Base import Dibujador, V3, color
from numpy import sin, cos
width = 960
height = 1500
caja = Dibujador(height,width)
#k=0
caja.glColor(0,0,1)
#TRIANGULO
caja.glLine(V3(100,100),V3(140,140))
caja.gl... |
572f7f77bd9c4f7875c4770cd9bc807dca82bd5e | 4b29eecf282fd3964b75aa846ba20eef44ca25c0 | /map.py | 36ba53ea90603007dee5cc5282f0cc59d09b733d | [] | no_license | bhagabati-prasad/python-voice-assistant | 338d85eeccb2870cb5c7632a98640674cbb08868 | c5a858d2e48c4588c7e055eb9681a3d88004ffea | refs/heads/master | 2023-07-27T22:46:51.336140 | 2021-09-13T17:47:12 | 2021-09-13T17:47:12 | 406,072,639 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 845 | py | map.py | # Python program to get a google map
# image of specified location using
# Google Static Maps API
# importing required modules
import requests
# Enter your api key here
api_key = "AIzaSyDbxBS8xoKXHk6hXFklgsKz72RiiI-fxRE"
# url variable store url
url = "https://maps.googleapis.com/maps/api/staticmap?"
# center defin... |
bc860577a7a9c6466fb1cf604dae49dcb08f89df | bab097b60cc93bba63451cfb4dde1e608582da31 | /python/86.py | cceaa91a5f4615b847bef139f631f4223dc38675 | [] | no_license | isabella0428/Leetcode | c4807301d4676914d7239d1e38e9a85bcb0b557f | f8b74681b5c6e642a8cbac71ca1b5490509ac5e7 | refs/heads/master | 2020-08-25T00:58:33.779280 | 2020-02-07T09:21:13 | 2020-02-07T09:21:13 | 165,828,038 | 2 | 0 | null | null | null | null | UTF-8 | Python | false | false | 904 | py | 86.py | class ListNode:
def __init__(self, x):
self.val = x
self.next = None
class Solution:
def partition(self, head: 'ListNode', x: 'int') -> 'ListNode':
num = []
while head:
num.append(head.val)
head = head.next
loc = 0
for i in range(len(num))... |
2e1a814ddad3ae1410d71b30846d9b99de70b672 | 6108d2fa2c556b1dd9fbe652b624a15807bd7e7b | /core/db.py | 2cdf9b7942eab6d313df6a954740415d9d0080c1 | [
"MIT"
] | permissive | AppforallHQ/appbuy | 71c11d69468d234f7960f4ea738bd4f2d432233b | 1f92c111e31336b6558d4ac52f969066196c0642 | refs/heads/master | 2020-07-01T17:15:52.839313 | 2016-11-20T10:50:58 | 2016-11-20T10:50:58 | 74,268,153 | 3 | 2 | null | null | null | null | UTF-8 | Python | false | false | 272 | py | db.py | import logging
import pymongo
import redis
from core import settings
try:
client = pymongo.MongoClient(settings.MONGO_HOST, settings.MONGO_PORT)
appbuy = client.appbuy
except Exception as ex:
logging.exception(ex)
redis = redis.from_url(settings.REDIS_URL) |
8bbc241cc9f7a51703d590f3dc8883358ae6f8c8 | 9574acf2bd81044bc8a5c860be5c189522593185 | /RandStr_Gen/app.py | 428102fa5c3d78a5c37f63c16d40ea57ff6ddf20 | [] | no_license | zReginaldo/PracticalSFIAProject | d2141966ff10591bae124e4b2e3bc82af28f76ba | ef00a53b6d3eaa5d9bc65d11dea14a653848c706 | refs/heads/master | 2023-03-22T19:03:05.194157 | 2020-04-06T10:57:01 | 2020-04-06T10:57:01 | 247,325,807 | 0 | 0 | null | 2021-03-20T05:21:37 | 2020-03-14T17:51:20 | Python | UTF-8 | Python | false | false | 612 | py | app.py | from flask import Flask, request, jsonify, Response
import requests
import random
from os import getenv
app = Flask(__name__)
app.config['SECRET_KEY'] = getenv('SECRET_KEY')
@app.route('/')
@app.route('/RandStr', methods=['GET','POST'])
def RandStr():
Rand_str=''
Vowels = 'A' + 'E' + 'I' + 'O' + 'U'
Letters = ['a'... |
0764892764083b0a91b20a8d433df14e84c916af | 2bc95e428b262d1db456e1365e82a7babf254e71 | /rest_api_MTO/customer/cust_adr_api.py | 0c1e7ed5661c8f7482c48d8890220a7bebf63c87 | [] | no_license | gaurshetty/rest_api_ORM | 43c91a11f41e0de1852aab1ebf1df560a4152ea1 | f0b8546cb4360abdad18927c43a482a6aaa26442 | refs/heads/master | 2020-11-28T11:35:19.834352 | 2019-12-28T05:45:21 | 2019-12-28T05:45:21 | 229,800,456 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 3,169 | py | cust_adr_api.py | import requests
from flask import Flask, render_template, request, session
app = Flask(__name__)
app.config['SECRET_KEY'] = '128779321SADKJAJ33'
customer_address_url = "http://localhost:5000/producer/customeraddress/"
address_customer_url = "http://localhost:5000/producer/addresscustomer/"
customer_url = "http://loca... |
ce71a3d5426fa0a2bdcc80bddec23bf29f64e8df | 3a603416ab9d4f5b3665a21f8be0107dff24cfbc | /src/metrics.py | debe0fee8d51805be214ca15e20a8539a0624c04 | [
"MIT"
] | permissive | montyly/adversarial-robustness-toolbox | 55b8bee0eb68fb9b836170d9e9a101360c3c3f2e | 40b1592dfd268b3a6d1aad1f8a4c847c9e01a270 | refs/heads/master | 2021-04-15T08:57:15.488360 | 2018-03-23T15:37:50 | 2018-03-23T15:37:50 | 126,506,369 | 0 | 1 | MIT | 2019-04-02T19:51:45 | 2018-03-23T15:44:36 | Python | UTF-8 | Python | false | false | 7,068 | py | metrics.py | # MIT License
#
# Copyright (C) IBM Corporation 2018
#
# Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated
# documentation files (the "Software"), to deal in the Software without restriction, including without limitation the
# rights to use, copy, modify, merge... |
27fbca667697a8d2236fabc88e7348b222e8f353 | 6dc338668ea2db6b8ec53d5ad35ae411e9c120cf | /l10n_it_ricevute_bancarie/__openerp__.py | 8dd3fdc9ada89672d1b9f5a691f2d2fa6bd92015 | [] | no_license | archetipo/l10n-italy | c6e7ee817be7df1f63006972a096e0471f641dcf | e5fcb69f8eb63e739474610a8b059aaaf5b20161 | refs/heads/7.0 | 2021-01-14T08:55:03.858840 | 2015-07-09T15:38:33 | 2015-07-09T15:38:33 | 26,489,119 | 1 | 0 | null | 2015-09-04T09:06:11 | 2014-11-11T14:45:22 | Python | UTF-8 | Python | false | false | 3,893 | py | __openerp__.py | # -*- coding: utf-8 -*-
#
#
# Copyright (C) 2012 Andrea Cometa.
# Email: info@andreacometa.it
# Web site: http://www.andreacometa.it
# Copyright (C) 2012 Agile Business Group sagl (<http://www.agilebg.com>)
# Copyright (C) 2012 Domsense srl (<http://www.domsense.com>)
# Copyright (C) 2012 Associazione... |
fb50407f0a52c7b933df4b54af4e4c945c0b8161 | 9a6042dc79e0b07504a68dfe43925a7dfc2af913 | /britishcouncil_am_ielts_days_parser.py | a21adf10dfce4d8315e9f4b09cc8e3584806ea05 | [] | no_license | KoStard/britishcouncil_am_ielts_days_parser | 479830cd1720d1fead620593ebac518f68d97484 | 92673f5b76842a6fdb2b99853a7208c87ea2fa39 | refs/heads/master | 2022-12-25T22:14:43.361895 | 2020-10-10T14:58:06 | 2020-10-10T14:58:06 | 302,910,000 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 3,983 | py | britishcouncil_am_ielts_days_parser.py | from requests import Session
from pprint import pprint
from fake_useragent import UserAgent
from bs4 import BeautifulSoup
from datetime import datetime
import os
import json
from constants import PROJECT_ID, DATES_KEY
from datastore_wrapper import save_to_datastore, get_from_datastore
from telegram_bot import receive_c... |
49f5899bfaeadb5a6c7a88f1681eae26117cb2e1 | b4293c5461401122eb5ad7160368ede618e26669 | /create_random_dataset.py | 74cb39b6c3dccb49612509e85360d6fbfd42efc2 | [] | no_license | gansik/task_distributor | 3f96629f4f9897c36ecedb2e8bda675fb8383914 | c9ebdc9a0d6147c0aa4097a269740169148c0340 | refs/heads/master | 2021-01-10T11:14:35.807214 | 2016-02-03T14:40:40 | 2016-02-03T14:40:47 | 50,998,368 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 813 | py | create_random_dataset.py | import random
from tests import TestTaskDistributor
if __name__ == '__main__':
tp_emp_sum = 0
with open('data/employees.csv', 'w') as f:
for i in range(10):
tp = random.randint(10, 40)
tp_emp_sum += tp
f.write('%s %d\n' % (TestTaskDistributor._get_random_name(), tp)... |
0b6e62da1b16e9406d912f490a8507cf2984e403 | fa2896969adfd040dc3490adf7798c74c37622ff | /app/questionnaire/migrations/0005_auto_20201019_1133.py | d3530b50444f7fa8f848c3224123aed4408f6067 | [] | no_license | eirsture/studentidrett-backend | b1fd10cd8ba2ec1b8cb20c1ef7a72464ef33e43f | 6e03e34ef42f3031d5197215c2fba5296f583460 | refs/heads/main | 2023-01-22T17:26:07.758923 | 2020-11-19T08:34:49 | 2020-11-19T08:34:49 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,640 | py | 0005_auto_20201019_1133.py | # Generated by Django 3.1.1 on 2020-10-19 09:33
from django.db import migrations, models
import django.db.models.deletion
class Migration(migrations.Migration):
dependencies = [
('sports', '0002_auto_20201005_2318'),
('questionnaire', '0004_auto_20201019_1051'),
]
operations = [
... |
cb92f14781465954db7435d74a0554aab3ad2cee | 6632037358152602fab2c79abde181369bfeeae9 | /Python Projects 2020/HankeyAH7.py | 3bf92b13a39dde7dfa550c884032a3187270378c | [] | no_license | abbihankey/Software-Development-Portfolio | d6a1c0df2ac6dd8ab2a8f874d368966a73936782 | 6bafd65b0689a6f480e5142c49eaa21e7366289a | refs/heads/main | 2023-02-27T03:39:32.299641 | 2021-01-26T23:24:49 | 2021-01-26T23:24:49 | 332,872,797 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,515 | py | HankeyAH7.py | CD_RW_PRICE = 16.50
DVD_RW_PRICE = 21.75
def main():
cd_customers_counter = 0
dvd_customers_counter = 0
total_payment_due = 0
print("Customer Name \tCode\tSpindle\tPayment Due")
print('')
try:
infile = open ("/users/abbih/desktop/disks.txt",'r')
customer_name = infile.readline()
while... |
7b3223c57a1f23bf54d81bb5bd4cb9cae5bcfb2d | 735eab863db89841615a3fb97be5565ac1aee7c7 | /codesf_suggest/config.py | e18f0c5b7e24e3541c928f9ea21dc0ba8b3ce9b9 | [] | no_license | thefunkjunky/CodeSF-Suggest-v2 | e93e4e5307e0b2e1db38f64438a406da9129bd86 | c00c5a2e12223af8d3005be6a912a0f8e6f5aa14 | refs/heads/master | 2021-01-17T16:15:30.633110 | 2016-11-11T20:22:34 | 2016-11-11T20:22:34 | 71,493,712 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 584 | py | config.py | import json
import urllib
import sys
import os
class DevelopmentConfig(object):
# try:
# with open("config_variables.json", 'r') as cfg_file:
# cfg_params = json.load(cfg_file)
# except Exception as e:
# sys.exit()
# SECRET_KEY = cfg_params['secret_key']
DEBUG = True
clas... |
1f5713f8cb05c9fca4051c46f1c380be80d0ea57 | 2b5e92a7c752054d61ec0a0b5aacbfaed93c34be | /httpclass.py | 1de1b5b138e93c82eb48a6fa959f7db2fc658689 | [] | no_license | vasvi1203/HTTP-Server | c6eac4d2b82f8959303af873726de92a53c0f9aa | a570b1ceba20186f2250194717bbd21e63f1104d | refs/heads/master | 2023-06-05T00:35:56.155745 | 2021-06-23T09:59:45 | 2021-06-23T09:59:45 | 379,554,883 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 21,002 | py | httpclass.py | from socket import *
import sys
import os
from copy import *
import threading
from datetime import *
import calendar
import pytz
import mimetypes
import email
import http.client
import uuid
import base64
from config import *
class Cookie:
def __init__(self):
self.name = 'cookie'
self.value = uuid.uuid1() #generat... |
9ce1520fdaaa10eed594c0aee97f50685a0d46b2 | c63c7cec51733ff5b64db348a560345d31e0ccc2 | /python/scatterplot/scatterplotly.py | 717812b27dcdfec551530c0f6e1d761ab9df003c | [] | no_license | yuhangwang5/plot_classification | 0d3807a7a6d78b60a8d9c2ea13d8b5e7101c8a95 | 24b50d9728ca81094063824dc6a1467c85760f23 | refs/heads/master | 2023-03-17T03:48:51.367117 | 2018-07-18T10:00:30 | 2018-07-18T10:00:30 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,679 | py | scatterplotly.py | import matplotlib.pyplot as plt
import numpy as np
import plotly.plotly as py
import plotly.tools as tls
# Learn about API authentication here: https://plot.ly/python/getting-started
# Find your api_key here: https://plot.ly/settings/api
import plotly.plotly as py
import plotly.graph_objs as go
import numpy as np
... |
3de9b5a41f1821d828d78961a485a0f347e67a73 | 70c46a89174965ceb0223a3f55c78cd36a82c616 | /demo.py | c9f62db6d120b87f2a2a7323b6324c6bd35c2cb6 | [] | no_license | shw2018/Keras-Image-Super-Resolution | 2255f9fa1b104b1eb70e46dd8751c57e0902894b | b79f4c46ca889f7dc9fd3339460496d7f9400ccc | refs/heads/master | 2022-11-18T08:51:51.148130 | 2020-07-19T02:41:11 | 2020-07-19T02:41:11 | 281,678,066 | 0 | 1 | null | 2020-07-22T12:58:41 | 2020-07-22T12:58:40 | null | UTF-8 | Python | false | false | 3,559 | py | demo.py | import os
import argparse
import tensorflow as tf
import data
from model import get_generator
import utils
os.environ['TF_CPP_MIN_LOG_LEVEL'] = '3'
def save_image(image, save_dir, file_name, ext):
image = (image * 127.5) + 127.5
image = tf.cast(image, tf.uint8)
image = tf.squeeze(image, axis=0)
i... |
6777616d29f50ca09cde57e51a6c2abcbb53c940 | e123975ccf3f809e9e8f5831e7040f7c6c46536f | /new_EB.py | 4ce4d0f544ba34f1da385da08ff9de230a4aaa3d | [] | no_license | YJHelloWorld/Prepare_codes | b57ba27b32c62ef4c15fba1d31ef6eb01328357e | 4d1914ca0d57fd82c219659d85cda06964f8d007 | refs/heads/master | 2020-04-13T15:22:23.446882 | 2019-09-21T22:12:19 | 2019-09-21T22:12:19 | 163,271,959 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 8,188 | py | new_EB.py | import os
import pysm
from pysm.nominal import models
import numpy as np
import healpy as hp
import matplotlib.pyplot as plt
from pysm.common import convert_units
import matplotlib as mpl
import numpy.ma as ma
from NPTFit import create_mask as cm
#os.system('rm -rf /smc/jianyao/datasets/image_matrix/2_channels/train; m... |
e48bfc4e0144a5d32e4051bb47195e67e5033117 | 5909f71a59fc0822fd4310c8208655b43022e575 | /tests/test-tokenizer-0-llama.py | bc164ee296cb1d6ff1ee28469ee913b7c345e12e | [
"MIT"
] | permissive | ggerganov/llama.cpp | 308952cd4596b3fd0f9012f4f27391add876f684 | e8d91589258f9204397a7ac5f9b3c857835c98f8 | refs/heads/master | 2023-09-01T08:29:47.920145 | 2023-09-01T08:15:57 | 2023-09-01T08:15:57 | 612,354,784 | 38,908 | 4,352 | MIT | 2023-09-14T20:59:47 | 2023-03-10T18:58:00 | C | UTF-8 | Python | false | false | 2,856 | py | test-tokenizer-0-llama.py | # tests with SPM tokenizer
import os
import sys
import argparse
from sentencepiece import SentencePieceProcessor
parser = argparse.ArgumentParser()
parser.add_argument("dir_tokenizer", help="directory containing 'tokenizer.model' file")
parser.add_argument("--fname-tok", help="path to a text file to tokenize")
arg... |
c9ac349b7bbac86a27f11d695a49bdba21a81a64 | 63edb456ab748622f9933b0f7b25b43721381fb1 | /lab12.py | 9a46c9bf171bcf546be3c8134f162a65fb3ac0c5 | [] | no_license | wojdylakjr/AGH-Python | 07bd8796bde8e07f9563de8ec041a298587c55ec | e207025fc5a05ed89dd78a8eece5454668ca8168 | refs/heads/master | 2023-05-28T09:47:14.577161 | 2021-06-10T10:38:46 | 2021-06-10T10:38:46 | 352,803,345 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 3,345 | py | lab12.py | # Proszę napisać iterator zwracający kolejny wyraz ciągu arytmetycznego dwoma sposobami i porównać ich wykorzystanie (2p)
print("zad1")
class Arythmetic1:
def __init__(self, number, a0, r):
self._number = number;
self._a0 = a0
self._r = r;
def __iter__(self):
return self
def __next... |
2ae32840badec6cd69268514cec69b7e5b8cea69 | 19667a122098caccb4e108b8f6529f076ab3de65 | /backend/research/models.py | 87d05e22ee7b149fb0e67da93b7a983febeac8c4 | [] | no_license | rashijain2109/dept-dash | 92a4f389e9de999aecf9ebfeda20145bc1a3e047 | e2e39ac70a2f0a3b5695ef6919e2293b95bc8183 | refs/heads/master | 2020-09-04T11:25:11.191436 | 2020-01-18T04:23:46 | 2020-01-18T04:23:46 | 219,720,039 | 0 | 2 | null | 2020-04-10T14:15:12 | 2019-11-05T10:38:46 | Python | UTF-8 | Python | false | false | 3,392 | py | models.py | from django.db import models
from users.models import Department, Faculty, Student
from backend import settings
class ResearchScholar(Student):
FULL_TIMER = "FT"
PART_TIMER = "PT"
ASPIRANT = "AS"
TENURE_TYPE_CHOICES = [
(FULL_TIMER, "Full Time"),
(PART_TIMER, "Part Time"),
(AS... |