blob_id stringlengths 40 40 | directory_id stringlengths 40 40 | path stringlengths 2 616 | content_id stringlengths 40 40 | detected_licenses listlengths 0 69 | license_type stringclasses 2
values | repo_name stringlengths 5 118 | snapshot_id stringlengths 40 40 | revision_id stringlengths 40 40 | branch_name stringlengths 4 63 | visit_date timestamp[us] | revision_date timestamp[us] | committer_date timestamp[us] | github_id int64 2.91k 686M ⌀ | star_events_count int64 0 209k | fork_events_count int64 0 110k | gha_license_id stringclasses 23
values | gha_event_created_at timestamp[us] | gha_created_at timestamp[us] | gha_language stringclasses 213
values | src_encoding stringclasses 30
values | language stringclasses 1
value | is_vendor bool 2
classes | is_generated bool 2
classes | length_bytes int64 2 10.3M | extension stringclasses 246
values | content stringlengths 2 10.3M | authors listlengths 1 1 | author_id stringlengths 0 212 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
7ae305ba58e2d8d511726e15f0b30b5e25e26026 | 4c97a552e8bbcc8f5d832a33322a12ebb5d23f47 | /python programs/loops/printingrevnumswhile.py | c2334439d72aca6f3ec55ba062cac5ee88853d9e | [] | no_license | amsenthilkumar/ZenClass | afe5d9e4faba2eef0fa5920330dbe642e3742e1c | c4bb4d1c1cdec8c6aa8e59181db9d4dd4447c5d8 | refs/heads/master | 2021-06-28T10:41:49.366282 | 2020-06-02T10:17:01 | 2020-06-02T10:17:01 | 222,610,812 | 0 | 0 | null | 2021-03-20T02:23:23 | 2019-11-19T04:49:16 | Jupyter Notebook | UTF-8 | Python | false | false | 46 | py | n=int(input())
while(n>0):
print(n)
n=n-1 | [
"noreply@github.com"
] | amsenthilkumar.noreply@github.com |
fd80c62ae71a5f4cfe50e2f3f303aeea7284c25a | 0b821ce06a3afe7a0e76a8d48be2858bdb378818 | /python/ctp_py/network.py | eaa3604408c58de20b56fdee0c09cd08fc439f09 | [] | no_license | reinhardtken/refresh_phone | def9d688575c7550b2aad21823f218ce82bb43fd | ff958d456a665031acac2e1f607100f533bdf554 | refs/heads/master | 2020-04-04T20:07:29.143771 | 2019-01-25T11:22:21 | 2019-01-25T11:22:21 | 156,234,788 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,635 | py | #!/usr/bin/env python
# -*- coding: utf-8 -*-
import threading
import Queue
import asyncore
import logging
import socket
#====================================
import asyn_pb_client
import asyn_pb_client_keepalive
#====================================
class Network:
def __init__(self, queue, p1, p2):... | [
"reinhardtken@hotmail.com"
] | reinhardtken@hotmail.com |
a44f128f58bb23a4c624266d368973bf055909f5 | 4491549f0b1bbf5397ae0b56192605a7abcb61b0 | /python/CSTI/CSTI.py | 93a1621d660fd0f88430767eabc3c4c4f68a8f2c | [
"Apache-2.0"
] | permissive | iNoSec2/skf-labs | 81e9d400ccac1007632add23bd50a094de1f50d5 | 8af9edc83e313be1578c5dee0fd4ecdf7ac18a32 | refs/heads/master | 2023-08-17T00:20:12.274684 | 2023-08-04T13:13:10 | 2023-08-04T13:13:10 | 235,376,119 | 0 | 0 | Apache-2.0 | 2023-08-05T00:31:43 | 2020-01-21T15:33:01 | Python | UTF-8 | Python | false | false | 528 | py | from flask import Flask, request, render_template
app = Flask(__name__, static_url_path='/static', static_folder='static')
app.config['DEBUG'] = True
@app.route("/")
def start():
return render_template("index.html")
@app.route("/home", methods=['POST'])
def home():
CSTI = request.form['string']
... | [
"glenntencate@gmail.com"
] | glenntencate@gmail.com |
2c2b3763a7ae0d0cf2cd41d323716587148d7e40 | 2821dc3c68598b82f80b8a3a97be424ac0ba6cb7 | /lab4/tensorflow-keras/mnist_cnn.py | 2278b8a659099dbf7901e27f4987ea1cc7b96b5f | [
"Apache-2.0"
] | permissive | paolo-26/SLNN | a21d1c6fef3965b537908216ccf94628c7dce3b6 | 492801b3423f4268d2b1a46d504650e6e2263aca | refs/heads/master | 2020-04-03T16:50:48.054721 | 2019-02-22T19:44:57 | 2019-02-22T19:44:57 | 155,421,477 | 0 | 1 | null | null | null | null | UTF-8 | Python | false | false | 3,780 | py | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
import tensorflow as tf
from tensorflow.examples.tutorials.mnist import input_data
from tensorflow.contrib.keras import layers
from tensorflow.contrib.keras import models
from tensorflow.contrib.keras import initializers
import sys
import argparse
# global flags for con... | [
"paolo.1995@ymail.com"
] | paolo.1995@ymail.com |
bfa90fa5a9d82c7635b2671ee7a7af3ac54de232 | e89aaf63a9593ff112708598b0f476c43599ead4 | /cherrypy/process/plugins.py | 4d7dcbfd48fb57aec8127f03a6abce5dd76a489a | [
"BSD-3-Clause"
] | permissive | Vungle/cherrypy-3.2.4 | 60eb11c83efd803dc1c728602756d343ca9632a4 | c4ef67a49a71445eb7caa9d94565cb5aace69699 | refs/heads/master | 2021-01-01T19:16:27.047678 | 2014-03-04T22:41:56 | 2014-03-04T22:41:56 | 16,367,063 | 1 | 2 | null | null | null | null | UTF-8 | Python | false | false | 25,827 | py | """Site services for use with a Web Site Process Bus."""
import os
import re
import signal as _signal
import sys
import time
import threading
from cherrypy._cpcompat import basestring, get_daemon, get_thread_ident
from cherrypy._cpcompat import ntob, set, Timer, SetDaemonProperty
# _module__file__base is used by Aut... | [
"ben.reiter@vungle.com"
] | ben.reiter@vungle.com |
3cb2017e792254a5cf2a3c9db8253320af6ea929 | 8ae4f2696299e86032e2debfea39d586934ab170 | /database/_database/python_files/function_stack_update.py | ba0409db14935d6038bfcd570817ba47e177fd51 | [
"MIT"
] | permissive | gendry/solpybas | a5dd9592a59f3a9a25533e8b3502412ae5f1c2dd | 1ff8554f0871994871a0878464fac5bb47428d1d | refs/heads/master | 2020-06-01T20:54:09.352841 | 2019-07-23T16:20:58 | 2019-07-23T16:20:58 | 190,923,341 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 3,475 | py | import sqlite3
#This generically adds stuff to the depositions / treatments and dep_conds / treatmetn_conds tables...
def stack_update_function(self, conn, dsp_lst, stack_dict, device_stack_id):
status = 'No status yet'
#TABLE device_stacks (id INTEGER PRIMARY KEY, stack_name TEXT, bot_elec_pat INTEGER, top_elec_pat ... | [
"833625@swansea.ac.uk"
] | 833625@swansea.ac.uk |
55e6bf144a154ad0a793bd5e4c8003ba57282762 | a6856778fcd6c7525d099a370a2d8929bda56c84 | /rango/migrations/0002_auto_20180121_1803.py | e0b2261167de62a13e8cf571375c23bf07c12d37 | [] | no_license | marto12345/tango_with_django_project | 45388cd54f8755aa1d90564ed7831138ac892955 | 3af5a71b8872d5cf2b9f43540b63446cfa70383b | refs/heads/master | 2021-09-06T16:05:56.827815 | 2018-02-08T10:36:13 | 2018-02-08T10:36:13 | 117,220,804 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 724 | py | # -*- coding: utf-8 -*-
# Generated by Django 1.11.7 on 2018-01-21 18:03
from __future__ import unicode_literals
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('rango', '0001_initial'),
]
operations = [
migrations.AlterModelOptions(
... | [
"2247164D@student.gla.ac.uk"
] | 2247164D@student.gla.ac.uk |
af3775190e643c596ee52288df6168ac27e96704 | 16da574a10f7cb19200cc076400eb0af15ce0927 | /soulware-backend/web_proj/urls.py | b34ac59c7e3163483c6697a76b3bc7123720e669 | [] | no_license | shg9411/soulware | f08128a91e84adb42169101a84ce2d41faed4e7e | 4e0ce35dd3cbcda00138f7db49d6949e699da562 | refs/heads/main | 2023-04-28T04:54:05.957589 | 2021-05-10T06:05:53 | 2021-05-10T06:05:53 | 348,669,106 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,033 | py | from django.contrib import admin
from django.urls import path, include
from django.conf import settings
from django.conf.urls.static import static
from drf_yasg.views import get_schema_view
from drf_yasg import openapi
from rest_framework import permissions
schema_view = get_schema_view(
openapi.Info(
tit... | [
"shg9411@naver.com"
] | shg9411@naver.com |
8843f08796119d39abcfba1b77cf133fba75e43f | 31ee95824818f899707f046c71d676bae0416a55 | /class6-sockets/3c.betterserver.py | bf565ff7729a267c450909b07799ce466bf3e580 | [] | no_license | cloudsecuritylabs/pythonclassaug2021 | 25af51df61ca804656001821f945dcfa1cb23502 | c1aa6a9b0b602b1be581c06c695a66ca3741d480 | refs/heads/master | 2023-08-24T13:19:08.350995 | 2021-10-11T02:50:24 | 2021-10-11T02:50:24 | 400,352,574 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 421 | py | import socket
try:
mysocket = socket.socket()
mysocket.bind(('0.0.0.0', 1339))
mysocket.listen(1)
c, addr = mysocket.accept()
buffer = 5
data = ""
while True:
packet = c.recv(buffer)
parsed = packet.decode()
data += parsed
if len(packet) < buf... | [
"basu.ankan@gmail.com"
] | basu.ankan@gmail.com |
f7c5355d1cc1c692102fd43f2b4ead3cb9c6aa46 | a48b6a7de1271d60106e2c372039867906ff209a | /finished/rpninfix_test.py | c11a6227ba91ec2861282c0b0039266079694fdb | [
"MIT"
] | permissive | kpatel20538/Rosetta-Code-Python-Tasks | f96edc50ffd5cad1bdd1e7e1ae56cb801ca3fd2b | 0e0a7af89fa0dd3a534c6edf83b99e3e8a41b19a | refs/heads/master | 2021-01-12T00:08:02.022550 | 2017-01-16T02:13:20 | 2017-01-16T02:13:20 | 78,676,035 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 757 | py | import tasks.rpninfix
import unittest
import logging
class TestRpnInfix(unittest.TestCase):
def setUp(self):
""" Test Case Enviroment """
logging.basicConfig(filename="./logs/rpninfix_test.log",level=logging.DEBUG)
logging.info('TestRpnInfix initialized')
def test_left_assoc(self):
""" Testing Lef... | [
"kpatel20538@gmail.com"
] | kpatel20538@gmail.com |
5960b56a73a75ad709c224e1284238096c68a1a7 | 37cc94b8c79fda394068b938037085eb3198024a | /script.py | f272cbb625397da886760d98b0934385c6dd03de | [
"BSD-2-Clause"
] | permissive | kingsea0-0/GrafNet | c98922d1f4239f259c8a1ac28ec955c5c539e825 | 32165bfccf5afb171c4b8362796f825e16392e30 | refs/heads/master | 2022-04-18T07:28:43.813180 | 2020-04-23T07:48:30 | 2020-04-23T07:48:30 | 256,982,056 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 6,673 | py | import sys
import json
import nltk
from tqdm import tqdm
from collections import Counter
# from itertools import zip
def combine_dist(dist1, dist2, w1):
ensemble_dist = dist2.copy()
for gid, prob in dist1.items():
if gid in ensemble_dist:
ensemble_dist[gid] = (1 - w1) * ensemble_dist[gid] +... | [
"741222996@qq.com"
] | 741222996@qq.com |
dca56aedfa3ad1aebbac730c6682f2dfc35d9fb1 | 971e0efcc68b8f7cfb1040c38008426f7bcf9d2e | /tests/artificial/transf_Integration/trend_PolyTrend/cycle_12/ar_/test_artificial_128_Integration_PolyTrend_12__100.py | b4f25714f1ffe6ea1d2ffda7b332a68fb1668f32 | [
"BSD-3-Clause",
"LicenseRef-scancode-unknown-license-reference"
] | permissive | antoinecarme/pyaf | a105d172c2e7544f8d580d75f28b751351dd83b6 | b12db77cb3fa9292e774b2b33db8ce732647c35e | refs/heads/master | 2023-09-01T09:30:59.967219 | 2023-07-28T20:15:53 | 2023-07-28T20:15:53 | 70,790,978 | 457 | 77 | BSD-3-Clause | 2023-03-08T21:45:40 | 2016-10-13T09:30:30 | Python | UTF-8 | Python | false | false | 268 | py | import pyaf.Bench.TS_datasets as tsds
import tests.artificial.process_artificial_dataset as art
art.process_dataset(N = 128 , FREQ = 'D', seed = 0, trendtype = "PolyTrend", cycle_length = 12, transform = "Integration", sigma = 0.0, exog_count = 100, ar_order = 0); | [
"antoine.carme@laposte.net"
] | antoine.carme@laposte.net |
60420a475a2f7366d5990acf32aebbc4b9c41da5 | ba6924d75c47ec173749a7fe2fd54a195f542dc3 | /tensorflow_probability/python/distributions/joint_distribution_coroutine_test.py | 87175609d56f614fe9ae2689f49eb4993f6bccf1 | [
"Apache-2.0"
] | permissive | AngelBerihuete/probability | d8e27f7a78fb558f22ca8115ba042d49f335415b | 8bdbf1c0b0f801edaf342f4ffc9caf1cfd6f1103 | refs/heads/master | 2020-06-09T13:52:01.275044 | 2019-06-22T00:06:10 | 2019-06-22T00:07:11 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 16,970 | py | # Copyright 2018 The TensorFlow Probability Authors.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law o... | [
"gardener@tensorflow.org"
] | gardener@tensorflow.org |
4262ca17e4f906cb8056db58604ac8cce6e59b9a | 23ba854b3b6cb457c8c01793e24f15d411650281 | /monk/tf_keras_1/finetune/level_4_evaluation_base.py | 34b6beb1c1d5cd6ff1fdf4aa1d96d4abf7912acf | [
"Apache-2.0"
] | permissive | shaunstanislauslau/monk_v1 | a506a8cb2e45f3d04734bfab01db09eb3d804771 | 01905b911f1757adef9d7366a704b2a5289e1095 | refs/heads/master | 2023-05-11T08:16:39.442925 | 2020-03-03T07:45:06 | 2020-03-03T07:45:06 | 244,685,539 | 0 | 0 | Apache-2.0 | 2023-05-09T19:02:15 | 2020-03-03T16:25:46 | null | UTF-8 | Python | false | false | 6,543 | py | from tf_keras_1.finetune.imports import *
from system.imports import *
from tf_keras_1.finetune.level_3_training_base import finetune_training
class finetune_evaluation(finetune_training):
@accepts("self", verbose=int, post_trace=True)
@TraceFunction(trace_args=True, trace_rv=True)
def __init__(self, ver... | [
"abhishek4273@gmail.com"
] | abhishek4273@gmail.com |
92d45f0567a686cb57d652d6ccaf23ffcd01a779 | 8d169bd14e4b4afaf27de87b62c2608e967b86c9 | /service.py | dd3d70fa82e873c7fa5c497e9d3870dab1681c3f | [
"Unlicense"
] | permissive | floort/buienbadge | 72fcc7a9a488240a6189aa6bc7a9438bdb54f3e7 | 178a090970e69891b3381a8d158b06d1b611c147 | refs/heads/master | 2021-06-20T08:34:34.982594 | 2017-08-05T20:23:56 | 2017-08-05T20:23:56 | 99,443,591 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,263 | py | import urequests
import ugfx
import network
import badge
import time
def setup():
pass
def loop():
sta_if = network.WLAN(network.STA_IF); sta_if.active(True) # Activate standalone interface
sta_if.scan() # Scan for available access points
sta_if.connect... | [
"noreply@github.com"
] | floort.noreply@github.com |
9992ff9aee45ed02003d5ce75e3b546b9fbcc500 | 80e6d8be1918fdd3f1f73d356daa5d4252913861 | /6.If Statement & Assignment.py | 599eaebb53c17e2b08211eac8f24265184dc188b | [] | no_license | koolhussain/Python-Basics | 0bf539d2caaf16259e9734b5969fb8762389c905 | 26c3707197f829927a143601a9e3e6da89178291 | refs/heads/master | 2021-09-09T11:20:03.156611 | 2018-03-15T14:41:37 | 2018-03-15T14:41:37 | 115,584,306 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 612 | py | x = 5
y = 8
z = 5
a = 3
#if example
if x < y:
print('X is lesser than y')
if z < y > x:
print('Y is greatre than Z & X')
if z < y > x > a:
print('Y is greatre than Z & X')
if z <= x:
print('z is less than to equal to x')
#if else example
if x > y:
print('X is greater than y')
else:
print... | [
"ahmad.hussain91@gmail.com"
] | ahmad.hussain91@gmail.com |
10e0407756b06e0e3a967eecaf43c67bfe4aa87b | f4e8d97d93e05430b4927427363ef47e692dade2 | /ex30.py | 11fb5c2b1dc63c2108e4d35cc5f94a6d01979840 | [] | no_license | MsJayMorris/learnpythonthehardway | 6fa91f917e6c87fb8617161e9f4d61750579a2ca | f56a62bd3a51b12ff065c26b3b2adefa33593a44 | refs/heads/master | 2021-01-10T16:30:08.162781 | 2016-01-30T10:49:15 | 2016-01-30T10:49:15 | 48,209,590 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 512 | py | people = 30
cars = 40
trucks = 15
if cars > people Or trucks > cars:
print "We should take the cars."
elif cars < people:
print "We should not take the cars."
else:
print "We can't decide."
if trucks > cars And people < trucks:
print "That's too many trucks."
elif trucks < cars:
print "Maybe ... | [
"msjaymorris@gmail.com"
] | msjaymorris@gmail.com |
a7c6f21ec1846551beda5168398d4af1642175d1 | a1b69bbf742a4a4e7b6f166b20e7b5ab3c060b57 | /playground/binary_file.py | 677b04267c9c7cf48af553063d561722b2124331 | [
"MIT"
] | permissive | dpm76/uPyFlasher | 8970af362652ef23124a62ea385e4ff22946849c | bd37d891af985c11e22f210789c33394460a0e4d | refs/heads/master | 2021-06-01T22:33:52.803930 | 2020-07-27T14:42:02 | 2020-07-27T14:42:02 | 140,459,032 | 2 | 0 | null | null | null | null | UTF-8 | Python | false | false | 490 | py | def printBinaryFile(path):
'''
Shows a binary file.
This function is intended to show a binary file uploaded to the MCU
@param path: path to the file
'''
with open(path, "rb") as f:
buffer = bytes(f.read(16))
while len(buffer) > 0:
line = ""
for byte in buffer:
... | [
"info@davidpm.eu"
] | info@davidpm.eu |
35f4e105582a5c17c9b15220071ef8798cb57d94 | 3ea720fde9aca2d71c34148bf9cec2082d4b32f6 | /people/tests/unit/models/test_performer.py | 619297920f732e651982c085cfd962d2030c5a4f | [] | no_license | aqsmallwood/symphony-hall-backend | 54d9905c6ea65ab5fc35e18beddaeef8e1337d82 | fabdd9ca9e58a3bb4cdd2f41dc4d398c9e30ffe8 | refs/heads/master | 2022-06-17T06:01:13.509769 | 2020-02-28T05:37:08 | 2020-02-28T05:37:08 | 242,221,355 | 0 | 0 | null | 2022-05-25T04:18:21 | 2020-02-21T20:06:07 | Python | UTF-8 | Python | false | false | 407 | py | from people.models import Performer
def test_performer_has_necessary_fields():
performer = Performer()
assert True == hasattr(performer, 'id')
assert True == hasattr(performer, 'name')
def test_performer_has_meaningful_string_representation():
test_performer_name = 'Fiddling Fiddler'
performer ... | [
"smallwoodadrian54@gmail.com"
] | smallwoodadrian54@gmail.com |
a26d9ab41dd1583a3474ec17749f3c2df866c269 | 3793d07a972c24f6bca9456b144b7415608d1e30 | /movieDatabase-master/movies/migrations/0010_movie_has_tag_t_id.py | 58aa82d13e4cc4f70102e09f8f2a685631eb855f | [] | no_license | lucianHymer/movieDatabase | 31591a0d939d158ef7c63937ffcfbbb3e7128077 | 7f5ad2541a21c0d1b7b7aec7fde13f9c1048b7ea | refs/heads/master | 2021-01-19T09:15:45.556242 | 2017-08-24T21:48:44 | 2017-08-24T21:48:44 | 87,745,263 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 407 | py | # Generated by Django 2.0.dev20170322162159 on 2017-04-06 18:33
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('movies', '0009_movie_has_tag'),
]
operations = [
migrations.AddField(
model_name='movie_has_tag',
na... | [
"mdng223@g.uky.edu"
] | mdng223@g.uky.edu |
49473eb66d8de28c289682d058fe5aabf9e6059a | 256faeac3766bdcb563d85af95902ed8bce40cf0 | /sets-discard,pop,delete-operations.py | a71b3ddc8caf8f6ae02576e58e186eb97b250aec | [] | no_license | Harini-sakthivel/PYTHON-Hands-on-coding- | 2285863edbebcccd4770616549c111b7bafaa913 | c54e64ea9e51ea6629c3311a613a3d23bacb4ccc | refs/heads/master | 2021-07-12T04:06:17.716157 | 2019-08-18T09:30:19 | 2019-08-18T09:30:19 | 202,975,946 | 4 | 1 | null | 2020-10-03T14:21:14 | 2019-08-18T07:59:05 | Python | UTF-8 | Python | false | false | 1,087 | py | '''
.remove(x)
>>> s = set([1, 2, 3, 4, 5, 6, 7, 8, 9])
>>> s.remove(5)
>>> print s
set([1, 2, 3, 4, 6, 7, 8, 9])
>>> print s.remove(4)
None
>>> print s
set([1, 2, 3, 6, 7, 8, 9])
>>> s.remove(0)
KeyError: 0
.discard(x)
>>> s = set([1, 2, 3, 4, 5, 6, 7, 8, 9])
>>> s.discard(5)
>>> print s
set([1, 2, 3, 4, 6, 7, 8,... | [
"noreply@github.com"
] | Harini-sakthivel.noreply@github.com |
83f4c71b012c11784749714418397eef3ae1f6ca | be4d3de3a08164b2ae7c92442be10a560a7dc119 | /client.py | f99f99c357ef828926571c35ef42a4c0e45f88e4 | [] | no_license | magnuscodex/chat | b8db014db2cee598b487736dfb75bdcfbfee6170 | 29edd4b878959c4c37f3d5347f087bc0b4161ca2 | refs/heads/master | 2021-01-10T19:50:42.564533 | 2014-01-17T07:15:18 | 2014-01-17T07:15:18 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 835 | py | #!/usr/bin/env python
import socket
import sys
import signal
from select import select
TCP_PORT = 4675
BUFF_SIZE = 1024
TIMEOUT = 1
def sig_handler(sig, frame):
print "Exiting"
#TODO make socket global and close it
exit(0)
signal.signal(signal.SIGINT, sig_handler)
host = raw_input("server name:")
s = socket... | [
"magnuscodex@gmail.com"
] | magnuscodex@gmail.com |
bc5075b856cd517a73420eef0f7cffb2dc993082 | 55dc9c7d7fb03aba894c15e2b7ed06e89b522da9 | /predict.py | c7d4d5df5e25fd61422252d1242a73e9fece4bf8 | [] | no_license | HotVector/Face-Authentication | 6e7636077d9a104d624ad776428f6b9a19cd9f4a | 5e67f88d2b85051318551d7d3102f3589611bd38 | refs/heads/master | 2021-01-24T03:30:29.850038 | 2018-04-22T14:27:41 | 2018-04-22T14:27:41 | 122,895,403 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 378 | py | import tensorflow as tf
import cv2
class FacePredict(object):
def faceCompare(self, faces):
#print("Begin Compare.")
gray = cv2.cvtColor(faces[0], cv2.COLOR_BGR2GRAY)
###for idx, i in enumerate(faces):
### windowName = "Face - " + str(idx)
### cv2.imshow(windowName, i)
... | [
"veerendra2002@gmail.com"
] | veerendra2002@gmail.com |
89249622c56fe5943c302eea7bb7045414687ae1 | aa79f29196a90788a6d47fdaae39ac6c5ce2a710 | /backend/profiles/admin.py | 5aa08fe30ddf921ed9f96b1b7ccd22d783e7c6a1 | [] | no_license | MutwiriFrank/twitter_clone | 5c4bb902dfbeef9793da9bb0b9bd0713e6f712cb | 718dbb4f4ae3da968f67f8efe2bb53411e8dc1f5 | refs/heads/master | 2023-06-22T10:12:44.780344 | 2021-07-24T09:20:32 | 2021-07-24T09:20:32 | 389,051,013 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 221 | py | from django.contrib import admin
from .models import Profile, FollowerRelation, Skills, Review
admin.site.register(Profile)
admin.site.register(Skills)
admin.site.register(FollowerRelation)
admin.site.register(Review) | [
"mutwirifranco@gmail.com"
] | mutwirifranco@gmail.com |
b3d3ff47eb93e30ac5afeb9d6c86f0b632d925a7 | 4e9aa9c6e3d6a12a5cd0a2332a1a8ef8124045bf | /plugin.video.salts/scrapers/2movies_scraper.py | e3b7496fd09580e9950f6ab0b254e0f59983471d | [] | no_license | Oggie101/tknorris-beta-repo | 53354005c089b80e09067f412c4c701561826988 | 5e7aa01fea46b31c0df7b69012fb1473221e2469 | refs/heads/master | 2021-01-18T00:31:24.679958 | 2015-10-14T19:16:23 | 2015-10-14T19:16:23 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 4,722 | py | """
SALTS XBMC Addon
Copyright (C) 2014 tknorris
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
T... | [
"tknorris@gmail.com"
] | tknorris@gmail.com |
77a6931ad430cd0530157aacb5dc04b0e9ae289b | 04d821121ccf79fe3935ce542e039f31b5997e42 | /microservice/drone_ifood/apps.py | f60235fa89ee96d818c74fdf3b9d4b4c8b60a3f0 | [] | no_license | jcpribeiro/Atividade_FIAP | d351f0e5c93d4e46db6957126d73040121ec7f2f | 3bcaeaa63bd0c8b3bd4f1b5b8ad103515f37e449 | refs/heads/main | 2023-08-21T05:01:58.020745 | 2021-09-30T22:54:58 | 2021-09-30T22:54:58 | 411,798,962 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 153 | py | from django.apps import AppConfig
class DroneIfoodConfig(AppConfig):
default_auto_field = 'django.db.models.BigAutoField'
name = 'drone_ifood'
| [
"42126757+jcpribeiro@users.noreply.github.com"
] | 42126757+jcpribeiro@users.noreply.github.com |
b9b8310451c9429b1ccaa0e257eb72aa6c00031d | 401069e7f0e8a865c6c18bc9ca0f2cbcc8cba6b2 | /ensembl_gene/ensembl_gene.py | 4a2adb872ed8cc81ecb2b426518bd565e29c75f7 | [] | no_license | wul0228/mydb_v1 | e48981d18dac6f88acdc84cdc0b2c3c7a5d244c9 | 66a2cc681ef4670161e68a6cfc5447b126dba46c | refs/heads/master | 2021-09-06T23:01:12.202023 | 2018-02-13T03:37:04 | 2018-02-13T03:37:04 | 115,709,752 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 14,173 | py | #!/usr/bin/env python
# -*- coding:utf-8 -*-
# date: 2017/11/28
# author:wuling
# emai:ling.wu@myhealthygene.com
#this model set to download,extract,standard insert and select gene data from ensembl
import sys
sys.path.append('../')
sys.setdefaultencoding = ('utf-8')
from share import *
from config import *
__all... | [
"ling.wu@myhealthgene.com"
] | ling.wu@myhealthgene.com |
adb12d09d6069e3548e300f017cbfcf43b1d6608 | 8658f9b6385eeccc02a92fbba8ad37f4d5356fef | /cs260/project6/AbstractCollection.py | 7ef97fe2d35aa6934a14a1e57e33fa25d7a546e4 | [] | no_license | tlmurphy/freshman-projects | 805effcca6ed1ceb9a56397239ae17ee5c5c840f | dbb966060c397b0ca5ac2e7601586ede511078f8 | refs/heads/master | 2021-06-02T01:53:58.243526 | 2016-07-19T20:03:03 | 2016-07-19T20:03:03 | 50,886,609 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,409 | py | """
Abstract Collection to be used
for all collections
This is the parent of all collections
Trevor Murphy
"""
class AbstractCollection(object):
"""An abstract collection implementation"""
# Constructor
def __init__(self, sourceCollection=None):
"""Sets the initial state of self,... | [
"murphtrevor@gmail.com"
] | murphtrevor@gmail.com |
05d8817e7de13d880fc4971f0a4391b0f59f954d | ac9776814df50efe2e12e216078c7b835c27e184 | /hrparser/data_parser/person_parser.py | 0c09a5e6092b92edfb2205989eccb62d9ec32f2b | [] | no_license | danesjenovdan/hr-parser | 0b2d4b06f7172cf6ffac224bae23f998d52d675e | ed51b19fa82cc4f4e02765ed4f4b0673fd691639 | refs/heads/master | 2022-12-11T18:18:21.887449 | 2019-11-28T13:56:34 | 2019-11-28T13:56:34 | 135,311,488 | 0 | 0 | null | 2022-11-22T02:30:13 | 2018-05-29T14:51:04 | Python | UTF-8 | Python | false | false | 2,308 | py | from .base_parser import BaseParser
from ..settings import API_URL, API_AUTH, API_DATE_FORMAT
from .utils import parse_date
from datetime import datetime
class PersonParser(BaseParser):
def __init__(self, data, reference):
# call init of parent object
super(PersonParser, self).__init__(reference)
... | [
"cofek0@gmail.com"
] | cofek0@gmail.com |
55412c5f714fe716cc21d55bc47bbafcb16b931b | 80dcf54754f9d58fed1d0e034c93c50ba27443dc | /dictionary.py | abc72fd4d2f20c997e317a1aef71f451ee3754ec | [] | no_license | ilich8884/LearningEnglish | 4465e55ce8ade9febebc26d12178c26664bd142b | abf862f4969de6b7c3743d4f6407f876bc00d25c | refs/heads/master | 2020-12-24T22:05:10.021784 | 2012-11-02T01:09:14 | 2012-11-03T15:55:54 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 6,479 | py | # -*- coding: utf-8 -*-
import json
import os.path
import word
import global_stat
import unittest
class Dict:
def __init__(self):
self.words = {}
def get_word_by_key(self, en):
w = self.words.get(en)
if not w:
w = self.words[en] = word.Word()
return w
def reload_dict_s(self, text):
self.words = {}
... | [
"ReanGD@yandex.ru"
] | ReanGD@yandex.ru |
545d6dfe6abc36a6a5e48876c2ed2067604cf3a9 | 5e7dd2da8eec0cff4b9e67a4a6f0633ce4b76524 | /apps/news/views.py | 6387006f673ba11a61a500002d2767dbddfc32dc | [] | no_license | Hyuancheng/xfz_vue_server | 90f1a42dc8be22f9385f1e936a0d9bb4b0001137 | 3512fb0b9f3e9b0f0214ef71306fb4d524616b21 | refs/heads/master | 2022-09-22T11:52:50.605832 | 2020-06-01T11:32:48 | 2020-06-01T11:32:48 | 268,471,971 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,079 | py | from django.shortcuts import render
from django.views import View
from .models import News
class NewsView(View):
"""首页"""
def get(self, request):
# 查询所有新闻,并查出目录及作者信息,减少后续数据库查询次数
news = News.objects.all().defer('content').select_related('category', 'author')
content = {
'ne... | [
"1520966793@qq.com"
] | 1520966793@qq.com |
f2073f2537f4bef9e0aa717f74eec294e4e5a9cd | cb8c63aea91220a9272498d5ea6cca0a0738b16a | /sodasurpler.py | 87cbd97f69aa81b669f4592f8d2fae5f03d8a6e7 | [] | no_license | akantuni/Kattis | 1265de95bfe507ce7b50451a16f19720b86bef44 | 12f31bb31747096bf157fcf6b1f9242d91654533 | refs/heads/master | 2021-12-14T11:18:27.723045 | 2021-12-11T05:43:37 | 2021-12-11T05:43:37 | 111,472,667 | 1 | 1 | null | null | null | null | UTF-8 | Python | false | false | 180 | py | s = input()
e = int(s.split(" ")[0])
f = int(s.split(" ")[1])
c = int(s.split(" ")[2])
t = e + f
ans = 0
while t // c != 0:
ans += t // c
t = t // c + t % c
print(ans)
| [
"akantuni@gmail.com"
] | akantuni@gmail.com |
672c8451e5896176ef5174de4b6496c4b1e3a6b2 | cd3fab4d8e30aebe5c996fb2389d4a15a21feb10 | /python/find_the_smallest_integer_in_the_array.py | 6ee56679d6e3bab16389ffa9e6b4988ed44426f7 | [] | no_license | luisflores189544/codewars-solutions | 93c1c3113c52779ce9537ee5d5397442d626ea56 | 1ad4dae2519cbf3f5b45201fe01a5be0762a0e6f | refs/heads/master | 2020-03-17T20:03:57.883229 | 2018-06-20T17:41:54 | 2018-06-20T17:41:54 | 133,891,731 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 129 | py | #Given an array of integers your solution should find the smallest integer.
def find_smallest_int(arr):
return sorted(arr)[0]
| [
"noreply@github.com"
] | luisflores189544.noreply@github.com |
79e79a6dba06cb195c15c6de2977218994c616bb | 6af3cf565ebab9b54af285268db6fc5e8cf9c465 | /api/migrations/0001_initial.py | a08891e9e278ae1ea61ea8891b24fd389375cd51 | [] | no_license | tabishimam2/Nurturelabs_Assignment | 5508c57f98a4bf30fcc4189e61caba1873e45ce4 | cfb32de9281ef4e9cfadcef74459f0b6000fbd47 | refs/heads/master | 2023-04-14T04:40:41.283457 | 2021-05-09T17:02:52 | 2021-05-09T17:02:52 | 365,726,574 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,524 | py | # Generated by Django 3.2 on 2021-05-09 12:01
from django.db import migrations, models
class Migration(migrations.Migration):
initial = True
dependencies = [
]
operations = [
migrations.CreateModel(
name='Advisor',
fields=[
('id', models.BigAutoField... | [
"timam799@gmail.com"
] | timam799@gmail.com |
4954477aa6e16c22ed490e8df4230d5604f3a58b | 33f1bfde0ae84747ed66946917bd94edf8e9b512 | /07 - Listen in Python/Notebooks in anderen Formaten/py/Arbeiten mit Tupeln.ipynb.py | 17ef40d38c37cdfe529db4cda60bb0abcefcf885 | [] | no_license | LCK1635/Python_Kurs | 66bb8ce356a9c3fe41a90c2995bb63e7a81f2fe4 | 8742604e677baa3774cde9b2434c1b40470a224f | refs/heads/master | 2021-09-07T04:23:36.732602 | 2018-02-17T12:56:32 | 2018-02-17T12:56:32 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,305 | py | # Diese .py - Datei wurde automatisch aus dem IPython - Notebook (.ipynb) generiert.
#
# Gelegentlich wurde ich von Teilnehmern gefragt, ob ich die Kursmaterialien nicht
# auch als normale .py - Datien bereitstellen könne. Dadurch ist es möglich, den Code
# ohne Jupyter zu öffnen, beispielsweise wenn Python-Programme... | [
"tillin@besonet.ch"
] | tillin@besonet.ch |
24af84abc07f34ca0d70f0e9fca0d9761cde7931 | c30b95effe38f0e5afb058a10ed2b091df492e86 | /algorithms/strings/reduced_strings.py | de5f7185518f1efa3da12366b05e122440e650b1 | [] | no_license | anikasetia/hackerrank | f7fbacf1ac5ef439842dffbe1592ebcd18271547 | 7f2605eb6a373516a8c11e01ffa08d9353395aa4 | refs/heads/master | 2021-01-25T09:53:39.934309 | 2018-08-09T15:30:27 | 2018-08-09T15:30:27 | 123,328,471 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 209 | py | s = list(input())
i = 0
while(i < len(s) - 1):
if(s[i] == s[i+1]):
s.pop(i)
s.pop(i)
i = 0
else:
i += 1
newString = (''.join(s))
if(newString == ''):
print("Empty String")
else:
print(newString)
| [
"anika.setia18@gmail.com"
] | anika.setia18@gmail.com |
c29e606bdbcccef5278639c8e865ee2a5ea6d5dc | cdc44b20348b1aad4b00b09d6213deb9682a779f | /venv/bin/pyreverse | cef1c06ab98a059d611a6bc2bf6b2fafde73c4a5 | [] | no_license | matias6942/MIR-Tarea1 | 576fef19bd3213870feeba31e081175ff4b8c198 | 84db2480740225919c0c496acaf868caff346400 | refs/heads/master | 2021-09-25T02:19:32.081577 | 2018-10-16T23:31:18 | 2018-10-16T23:31:18 | 150,164,866 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 260 | #!/home/matias/Documents/MIR-Tarea1/venv/bin/python
# -*- coding: utf-8 -*-
import re
import sys
from pylint import run_pyreverse
if __name__ == '__main__':
sys.argv[0] = re.sub(r'(-script\.pyw?|\.exe)?$', '', sys.argv[0])
sys.exit(run_pyreverse())
| [
"matias.zamora@ing.uchile.cl"
] | matias.zamora@ing.uchile.cl | |
a2486b55709abc8b65ab3d41b9a15ff29a0671c7 | fa0c32e18262897f5ba558950c2a7d33665ae97c | /charts/sheets.py | ed04c084f9fca8d7e06033688733c74533308471 | [
"Apache-2.0"
] | permissive | sanjaynv/SBK | 8634d35fe6268030af8f6b062152468133801041 | 64655cd18e999f6274d738f8e421a66473d490f2 | refs/heads/master | 2023-07-06T00:09:27.984821 | 2023-06-19T13:52:02 | 2023-06-19T13:52:02 | 247,745,359 | 2 | 0 | Apache-2.0 | 2020-03-16T15:25:08 | 2020-03-16T15:25:08 | null | UTF-8 | Python | false | false | 2,338 | py | #!/usr/local/bin/python3
# Copyright (c) KMG. 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
##
# SBK-sheets : Stora... | [
"keshava.gowda@gmail.com"
] | keshava.gowda@gmail.com |
e6498a09c3b06d7c6725afa0311b15c560317083 | 191a24cd8ca4fd54789fc861a282cf82ea079434 | /secretary2/urls.py | 4ebee877f669a4c67d478e02b76746c96e3b6edf | [] | no_license | Uccueo4/secretary2 | 5abbd6801fdf802c3f177761c741f771ced55f89 | 901519b9d953964bf8ed95dfa5b68706094321b4 | refs/heads/master | 2021-01-11T14:25:31.394356 | 2017-02-09T05:49:13 | 2017-02-09T05:49:13 | 81,407,599 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,296 | py | """secretary2 URL Configuration
The `urlpatterns` list routes URLs to views. For more information please see:
https://docs.djangoproject.com/en/1.9/topics/http/urls/
Examples:
Function views
1. Add an import: from my_app import views
2. Add a URL to urlpatterns: url(r'^$', views.home, name='home')
Class-... | [
"silentwindma@gmail.com"
] | silentwindma@gmail.com |
0582ca31bc079ef0d0101aef1f0272cffce156bb | 35d5682a7cc9d93c11e0486bb132cffc16f37859 | /NWPLab/restconf-to-spark.py | d8998870b9bf8190c7029e061c5cab2f3fc0ccbe | [] | no_license | martynrees/devnet-express-code-samples | 6032e6caed8fef03671d64eafce5119f0f09a9e6 | c7592275461cd9d3c207befb0142aadba54c41c9 | refs/heads/master | 2021-01-19T21:00:35.798441 | 2017-04-17T21:24:19 | 2017-04-17T21:24:19 | 88,588,636 | 1 | 0 | null | 2017-04-18T06:13:04 | 2017-04-18T06:13:04 | null | UTF-8 | Python | false | false | 3,578 | py | #!/usr/bin/env python
# ############################################################################
# Copyright (c) 2016 Bruno Klauser <bklauser@cisco.com>
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions
... | [
"darien@sdnessentials.com"
] | darien@sdnessentials.com |
9c683f0f896498477456d213422ba9310195fb08 | 6ecfc4ad9e2b61eb647c09b43fd955862e644eb4 | /Week03/哲学家.py | 410a9df2d5af21962da46ad57525e27f97f6d716 | [] | no_license | brownfoxsir/Python004 | 4ebfebf969430a657d1bc5e65cb697c8ffc05291 | 7fb9b9d169dbacf6aa93c878973fa938325c9fed | refs/heads/master | 2023-02-07T12:10:32.965733 | 2020-12-20T15:57:38 | 2020-12-20T15:57:38 | 295,945,252 | 0 | 1 | null | 2020-09-16T06:37:52 | 2020-09-16T06:37:52 | null | UTF-8 | Python | false | false | 2,712 | py | #!/usr/bin/python
import sys
import threading
import time
class Semaphore(object):
def __init__(self, initial):
self.lock = threading.Condition(threading.Lock())
self.value = initial
def up(self):
with self.lock:
self.value += 1
self.lock.notify()
def dow... | [
"brownfoxsir@gmail.com"
] | brownfoxsir@gmail.com |
a7619f6654ac154392697fbcb15790412af0f201 | dda7e790b230c9f2e42993fc35706e228aca45f8 | /Projet_info.py | b7c34f5d9c007ac723fdca53fe2e0018c05fed38 | [] | no_license | ablo340/Pyhton_website | a266c80ad9327cad39746f97e840a40ca56487ff | 99dd2190342877e190113f7049500f73a2beb0fb | refs/heads/master | 2022-04-09T15:28:18.707254 | 2020-03-16T20:14:05 | 2020-03-16T20:14:05 | 124,147,538 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 3,548 | py | import json
import os
import cherrypy
from cherrypy.lib.static import serve_file
import jinja2
import jinja2plugin
import jinja2tool
class WebApp():
def __init__(self):
self.feasts= self.loadfeasts()
#route vers la page d'accueil
@cherrypy.expose
def index(self):
if le... | [
"ablo110@live.fr"
] | ablo110@live.fr |
2949108488c1b01a6e1884163add585d51810555 | 837fff65705faf7419e15e2f3a7563601c81950d | /quotes/quotes/settings.py | 9ef0c8af0d817aeb4a14e6903a93cc71a8b8de01 | [] | no_license | abdulazeem/Scrapy-Projects | 1c7b7ee85cc3026510a01e6f6fe5aa162935694f | 3d3a217bd246cd72cc3c0b10c1073f1664f9141a | refs/heads/master | 2022-12-03T07:58:41.478320 | 2020-08-24T12:55:58 | 2020-08-24T12:55:58 | 289,927,738 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 3,103 | py | # -*- coding: utf-8 -*-
# Scrapy settings for quotes project
#
# For simplicity, this file contains only settings considered important or
# commonly used. You can find more settings consulting the documentation:
#
# https://doc.scrapy.org/en/latest/topics/settings.html
# https://doc.scrapy.org/en/latest/topics... | [
"azeem012001@gmail.com"
] | azeem012001@gmail.com |
51d14d9e353798e5fc1aee069bf86c642f2df85d | 4b8ac4077e7480817a8ef6be6a5831ee4bdd2b9e | /uchu-cli/utils.py | 203ebd1ecc804a3445fd24218874208472ff6c2d | [
"MIT"
] | permissive | UchuServer/cli | 14c8dfd91d17746d60cd8c08a0865b63e51ad8bf | ebe1dbeda4a1035744c32df229e968d4568a6927 | refs/heads/master | 2023-06-17T19:04:25.623924 | 2021-07-13T10:16:19 | 2021-07-13T10:16:19 | 321,522,414 | 2 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,243 | py | import requests
from . import commands
def WorkOutLargestCommand() -> int:
Largest: int = 0
for x in commands.CommandList:
if (len(x) + len(GetArgs(x)) + 1) > Largest:
Largest = (len(x) + len(GetArgs(x)) + 1)
return Largest
def GetArgs(Command: str) -> str:
Return: str = ""
if ... | [
"17jbradford@tqacademy.co.uk"
] | 17jbradford@tqacademy.co.uk |
cf94fdc877f7461b30060f45ddcd56cac0cb6e01 | 6c721f3cfce6dc88396cd3b5f6a59d65a2ea5033 | /some_learn/Data_Set_handle/Caltech-Dateset/anaylsis_result/draw_result_in_new_anno/src/generate_result2txt.py | f9ecc3049084e101fc53fc0cad1d2e16c74bdc91 | [
"MIT"
] | permissive | unicoe/PycharmProjects | 20a3dabe88c7874da54451c7bb16999afc0eee35 | 23ff314eb5ac9bfa01a8278089d722b5d0061751 | refs/heads/master | 2020-03-23T09:16:25.907188 | 2019-12-21T03:10:49 | 2019-12-21T03:10:49 | 141,377,686 | 4 | 1 | null | null | null | null | UTF-8 | Python | false | false | 2,733 | py | def generate_result(resource_path, des_path):
"""
:param path:
:return:
"""
des_path1 = "/home/user/PycharmProjects/caltech_new_anno/out/out1.txt"
des_path2 = "/home/user/PycharmProjects/caltech_new_anno/out/out2.txt"
rf = open(resource_path)
content = rf.readline()
cnt = 0
t... | [
"unicoe@163.com"
] | unicoe@163.com |
617f2daa7d6f16a5c0dcba89f71b914b51a6c829 | f1d67722dcd4c2209eedc0a61e5ea0ee27c95470 | /mpisppy/tests/examples/apl1p.py | 24988a8f7c43d751af19ab6376eb825d98a0bc64 | [] | no_license | wangcj05/mpi-sppy | 08204019b466da5e0812b16dd5cb53da1bdbd793 | 42aff4c11dc42fcba8a9520da00e48c6e9ab7d85 | refs/heads/main | 2023-08-25T04:36:58.606490 | 2021-11-01T21:40:14 | 2021-11-01T21:40:14 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 8,295 | py | #ReferenceModel for full set of scenarios for APL1P; May 2021
#We use costs from Bailey, Jensen and Morton, Response Surface Analysis of Two-Stage Stochastic Linear Programming with Recourse
#(costs are 10x higher than in the original [Infanger 1992] paper)
import pyomo.environ as pyo
import numpy as np
import mpisppy... | [
"sylvain.czx@gmail.com"
] | sylvain.czx@gmail.com |
3fe76d3f252cdb4ef3b8aa1b2bd57309ffc10491 | 50888c8f98b0f86f60c5aba2f5bb2e127033f78f | /apps/utils/redis_obj.py | aa88f7bbf2f428ab499697fd67d6faa17755e9ff | [] | no_license | nhb-git/mxOnline | 83b2325812cfc599f0921c989b6bd687a8f37ed2 | 7d5d7c2361f9a38ed0e1c88344bb2f5125f0fbb9 | refs/heads/master | 2022-12-05T23:15:26.273598 | 2020-09-03T00:11:11 | 2020-09-03T00:11:11 | 287,920,982 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 356 | py | #!/usr/bin/env python
# -*- coding: utf-8 -*-
# 开发人员 :Davis Niu
# 开发时间 :8/16/2020 1:37 AM
# 文件名称 :redis_obj.py
import redis
from MxOnline.settings import REDIS_HOST, REDIS_PORT
def redis_obj(host=REDIS_HOST, port=REDIS_PORT):
r = redis.Redis(host, port, db=0, charset='utf8', decode_responses=True)
ret... | [
"niuhaibao@gmail.com"
] | niuhaibao@gmail.com |
8ce07f08c2d9e49656282ac45274bda28b6f7c7b | 1dab646570a8ac9af92b15031883f874307a0ca9 | /111.py | 825a9181a8da58753c1b9661724e20767b48793e | [] | no_license | reshmapalani/pythonprogram | 8854bd5da4bc5f7b523a07f9c0be7b1ec5b8ae22 | 88b203168a412d42dd4ebfde3453a216a3a4c26a | refs/heads/master | 2020-04-27T16:58:49.845751 | 2019-05-15T18:30:59 | 2019-05-15T18:30:59 | 174,499,664 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 160 | py | import random
d = {8:37,38:9,11:2,13:34,40:68,65:46,52:81}
p = random.choice([2,8,9,13,40,65,52])
print("You got",p)
if p in d:
print("You can go to ",d[p]) | [
"noreply@github.com"
] | reshmapalani.noreply@github.com |
cd88987a7e86a3cba2b431e4cd63332219704a57 | 951de9221b0b3cfc20ad0ad45ec751be614a8709 | /tests/integration/messaging/v1/test_brand_registration.py | 6e6be298a71a6cf42b880de0a98e916ed3c44d85 | [
"MIT"
] | permissive | HireAnEsquire/twilio-python | 6762e2467504e25290e7fb604d851d586dde18a4 | 48e970fa0b4b46be5ee560a1de5976ca3ad69fef | refs/heads/main | 2023-06-30T08:25:01.735944 | 2021-08-03T20:24:14 | 2021-08-03T20:24:14 | 391,991,328 | 0 | 0 | MIT | 2021-08-02T14:58:54 | 2021-08-02T14:58:53 | null | UTF-8 | Python | false | false | 5,456 | py | # coding=utf-8
r"""
This code was generated by
\ / _ _ _| _ _
| (_)\/(_)(_|\/| |(/_ v1.0.0
/ /
"""
from tests import IntegrationTestCase
from tests.holodeck import Request
from twilio.base.exceptions import TwilioException
from twilio.http.response import Response
class BrandRegistrationTestCase... | [
"team_interfaces+github@twilio.com"
] | team_interfaces+github@twilio.com |
18110511b08e58d3d47e69557d3cd22b3cb3d6ff | 9842fd63e3476dc58e0b2fc09e3c9f573c1fe054 | /lwc/middleware.py | b9eedeff4c3167b07f9d2da071f03e171e604062 | [] | no_license | pythonista6785/Launching-With-Code-lwc- | e8e6c1812bbbea10e5e2e27858fae90fd68683b5 | b454fe352b546ce522ef9ab1aa92b4fdbe600e52 | refs/heads/master | 2021-04-28T23:44:03.779846 | 2017-01-06T10:50:41 | 2017-01-06T10:50:41 | 77,728,314 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 274 | py | from joins.models import Join
class ReferMiddleware():
def process_request(self, request):
ref_id = request.GET.get("ref")
#print ref_id
try:
obj = Join.objects.get(ref_id = ref_id)
except:
obj = None
if obj:
request.session["join_id_ref"] = obj.id
| [
"pythonista.hlp@gmail.com"
] | pythonista.hlp@gmail.com |
d63468cc5addf7f2c479859b8f107f50a4eb9d1c | d5e16a3880ad978eafef136ebf554297e5c9a30f | /elan2mqtt/aiohttp/web_protocol.py | ad0c0498e39562e30f1f8275a719b554a813b06c | [
"MIT"
] | permissive | zdar/elan2mqtt | 42333ec7e8bb53f5946f0916fc4a39ba05294e24 | c8a21ea3e1dc80a360aed2d7eadf74ee5a3efcd4 | refs/heads/master | 2023-02-04T23:57:16.480168 | 2023-01-20T09:49:31 | 2023-01-20T09:49:31 | 156,423,532 | 11 | 5 | MIT | 2022-01-28T08:56:10 | 2018-11-06T17:44:01 | Python | UTF-8 | Python | false | false | 22,548 | py | import asyncio
import asyncio.streams
import traceback
import warnings
from collections import deque
from contextlib import suppress
from html import escape as html_escape
from http import HTTPStatus
from logging import Logger
from typing import (
TYPE_CHECKING,
Any,
Awaitable,
Callable,
Deque,
... | [
"noreply@github.com"
] | zdar.noreply@github.com |
3abdf84cc22cefb42af6f5fd17b8ededadeb3779 | fc070dfc9182b7f3a923e2b22331112c01bc8970 | /21-30/30.py | 66dd4eb1d8af8f9ebfcc9ced98c6c30be7ad3c02 | [] | no_license | sucman/Python100 | 346ddd11e4387ef3fac14f9180c1607bf4573afc | 6453455f9029cb86953fc70f5bcf5a8d84489673 | refs/heads/master | 2020-05-04T15:29:00.617638 | 2019-04-03T08:37:43 | 2019-04-03T08:37:59 | 179,242,746 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 399 | py | # -*- coding:utf-8 -*-
'''
一个5位数,判断它是不是回文数。即12321是回文数,个位与万位相同,十位与千位相同。
'''
a = int(raw_input("请输入数字:"))
x = str(a)
flag = True
for i in range(len(x) / 2):
if x[i] != x[-i - 1]:
flag = False
break
if flag:
print "%d 是一个回文数。" % a
else:
print "%d 不是回文数。" % a
| [
"https://github.com/sucman/AppiumTest.git"
] | https://github.com/sucman/AppiumTest.git |
3f0b3d42f816e833e4bab099a8f4bf1c4dd007e3 | 3c7057226c7bb01cd493cde5742b3979cf030f94 | /tests/unit/client/test_auth_tracker.py | 9857bf2e6d080b102db25cb8cb9a8c3ab9e75097 | [
"Apache-2.0"
] | permissive | sharadc2001/lmctl | 2d047f776d1bbee811801ccc5454a097b1484841 | a220a3abeef5fc1f7c0a9410524625c2ff895a0a | refs/heads/master | 2023-05-27T06:14:49.425793 | 2021-04-29T20:08:52 | 2021-04-29T20:08:52 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,084 | py | import unittest
import time
from lmctl.client.auth_tracker import AuthTracker
class TestAuthTracker(unittest.TestCase):
def test_accept_auth_response(self):
tracker = AuthTracker()
tracker.accept_auth_response({
'accessToken': '123',
'expiresIn': 60,
})
self... | [
"daniel.vaccaro-senna@ibm.com"
] | daniel.vaccaro-senna@ibm.com |
79021698e963ef29669a46525cd80edf60c44917 | afdcdaabecd85a2f237a40c57e52c5b2651ee4ac | /textutils/settings.py | 63d106afb62d18c3734b0ac6d4372bbe35795c05 | [] | no_license | amit631308/TextUtils | 4ec99b4763ca06c2a921df8aec6c8d593ed523bf | d4c3f788de73c95f226299f1a881ebab2eb905be | refs/heads/master | 2020-12-12T12:43:36.792812 | 2020-01-15T17:16:56 | 2020-01-15T17:16:56 | 234,129,046 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 3,106 | py | """
Django settings for textutils project.
Generated by 'django-admin startproject' using Django 2.2.
For more information on this file, see
https://docs.djangoproject.com/en/2.2/topics/settings/
For the full list of settings and their values, see
https://docs.djangoproject.com/en/2.2/ref/settings/
"""
import os
#... | [
"you@example.com"
] | you@example.com |
4853d7a33e778004d0fcfc54df63a2f2c44f64de | 2ac6af36f5412d3407a8bea8abee91e866559df3 | /python/most_digits.py | 8281e1a35b15bddc854093e3001046f7eb7b17a1 | [] | no_license | fzramos/brainteasers | 128a6bfe26dd359135576cc838aa178f5f74bc3f | c7a2a3b440e6cd9eb7271dccee30af2fd51a1044 | refs/heads/master | 2023-03-31T04:00:11.701374 | 2021-04-02T17:17:01 | 2021-04-02T17:17:01 | 331,523,790 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 417 | py | """
Find the number with the most digits.
If two numbers in the argument array have the same number of digits, return the first one in the array.
"""
# quick first attempt
def find_longest(arr):
strs = list(map(str, arr))
# without key max would see string 4 as greater than string 1000
return int(... | [
"64625115+fzramos@users.noreply.github.com"
] | 64625115+fzramos@users.noreply.github.com |
200c79377301477c6cc35c49fbf5ab5eecc2f49c | 8e35a152a91fe484eb971c597964132b968bf0f7 | /validate_hcert.py | bf7ed9eb2df1797832a0e29eaa08fc35e80a6cfe | [] | no_license | Totoro2205/eu-dcc-diagnostics | 540354e1157e5c5ece1b226dfa5a39a30cdafafa | 0b82b043689ab7ada82072d3221cf123237ba3c9 | refs/heads/master | 2023-09-01T16:06:37.392438 | 2021-10-27T15:02:46 | 2021-10-27T15:02:46 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,931 | py | #!/bin/env python3.9
import sys
from base45 import b45decode
import zlib
from cbor2 import loads
from cose.messages import Sign1Message
from classes.SchemaValidator import SchemaValidator
from classes.SignatureValidator import SignatureValidator
from classes.TrustList import TrustList, UnknownKidError
# Initialize c... | [
"ryan@seldonplan.com"
] | ryan@seldonplan.com |
10cb9613d04d8eda241c65c5cdd1b61e4190ce71 | ac853361fa5faed26a9725d2b76c5e6ed5b83a9f | /ppd_rank1/data_aug.py | 3ab199878e8237706d194911966cbc138f8fb750 | [] | no_license | jnuCompetition/chip2018 | 1637483fcf116157c08fca691639b0b277c1c1d6 | 0621a391a8eead6251bb8adc610a7905ba6c20cd | refs/heads/master | 2020-04-08T16:00:25.102851 | 2018-11-28T12:23:24 | 2018-11-28T12:23:24 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 7,443 | py | #/usr/bin/env python
#coding=utf-8
import sys,math
import numpy as np
import pandas as pd
from sklearn.model_selection import train_test_split, StratifiedKFold
clusterindex = 0
questionindex = {}
clusterindexsim = {}
clusterinfo = {}
questionfalse = {}
count = 0
limit = 2000000
for line in open('../input/train.csv... | [
"zhaoyuansir@163.com"
] | zhaoyuansir@163.com |
55a530839c8082968273f2a09b8b4ddf21380663 | 646a5080f2e4ae87c90978282844a9b314367088 | /camera_ws/catkin_ws/build/image_pipeline/camera_calibration/catkin_generated/pkg.develspace.context.pc.py | 2cdfae278109b18e1b22d4a786fc4a2f4610699a | [] | no_license | 0000duck/METR4202-T6 | eb72a064fafc13b11c833a25802fb9c74472d010 | fa7ef8e9a2e443a18df9ab214619b5458b9edd67 | refs/heads/main | 2023-08-16T07:24:26.877881 | 2021-10-25T04:09:29 | 2021-10-25T04:09:29 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 404 | py | # generated from catkin/cmake/template/pkg.context.pc.in
CATKIN_PACKAGE_PREFIX = ""
PROJECT_PKG_CONFIG_INCLUDE_DIRS = "".split(';') if "" != "" else []
PROJECT_CATKIN_DEPENDS = "".replace(';', ' ')
PKG_CONFIG_LIBRARIES_WITH_PREFIX = "".split(';') if "" != "" else []
PROJECT_NAME = "camera_calibration"
PROJECT_SPACE_DIR... | [
"m.leonard@uqconnect.edu.au"
] | m.leonard@uqconnect.edu.au |
400b4e2d59da265875e51847c2fd51ad8e9da2ea | 15f321878face2af9317363c5f6de1e5ddd9b749 | /solutions_python/Problem_200/4699.py | 47f6b945465c705d69be01ee6ea4d93ff6faac1f | [] | no_license | dr-dos-ok/Code_Jam_Webscraper | c06fd59870842664cd79c41eb460a09553e1c80a | 26a35bf114a3aa30fc4c677ef069d95f41665cc0 | refs/heads/master | 2020-04-06T08:17:40.938460 | 2018-10-14T10:12:47 | 2018-10-14T10:12:47 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 838 | py | # input() reads a string with a line of input, stripping the '\n' (newline) at the end.
# This is all you need for most Google Code Jam problems.
t = int(input()) # read a line with a single integer
for i in range(1, t + 1):
number = [int(s) for s in input()]
adjust = 0
final = 0
same = 0
output = ""... | [
"miliar1732@gmail.com"
] | miliar1732@gmail.com |
4a9d85d73d161d461258a8b08813d81d310c6bba | 242d50e9daeee73653e0e553679a61f3e984a303 | /plots/python/cutsJet1.py | 7f0eb9af5ec549ee7193ac746e4f49528a5ca1c9 | [] | no_license | HephyAnalysisSW/TTGammaEFT | 72cf63d20097daa37ffd008904d75a78fa009162 | bbedb106154bab510289a3833ec39949c5e4b005 | refs/heads/master | 2021-11-28T09:44:56.093647 | 2021-10-22T08:45:14 | 2021-10-22T08:45:14 | 157,550,390 | 0 | 2 | null | 2020-07-02T06:29:45 | 2018-11-14T13:08:28 | Python | UTF-8 | Python | false | false | 1,096 | py | #!/usr/bin/env python
''' Define list of plots for plot script
'''
# Standard Imports
from math import pi
# RootTools
from RootTools.core.standard import *
# plotList
cutsJet1 = []
cutsJet1.append( Plot(
name = 'jet1_neHEF',
texX = 'neHEF(jet_{1})',
tex... | [
"lukas.k.lechner@gmail.com"
] | lukas.k.lechner@gmail.com |
be67f68208b753fa387e260cf954c5e941ff7844 | f4d0f1357530a5889fcbf51bb9b9c5abe86afe9d | /scrapy.py | d9f70ec729a40a626b82037faba5e91e5bc228b9 | [] | no_license | marcelosantos/python-web-scraping | fd25e7372dbb1ad77aa537e6111eba99c9d363cb | 0c7c6c837903de1a1910280661635daf8579d1bf | refs/heads/master | 2021-01-01T18:28:37.730372 | 2017-01-06T19:30:44 | 2017-01-06T19:30:44 | 78,232,730 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 586 | py | import requests
from bs4 import BeautifulSoup
url = 'http://www.blog.pythonlibrary.org/'
def get_articles():
""" Get the articles from the front page of the blog """
req = requests.get(url)
html = req.text
soup = BeautifulSoup(html, 'html.parser')
pages = soup.findAll('h1')
articles = {i.a[... | [
"marcelosantosadm@gmail.com"
] | marcelosantosadm@gmail.com |
02ff9203e38764ba63dffd72edcc3d9bcc88c667 | 83de24182a7af33c43ee340b57755e73275149ae | /aliyun-python-sdk-ecd/aliyunsdkecd/request/v20200930/ApproveFotaUpdateRequest.py | 9aa68198a829fe25048d4a1eeb00483f8e626999 | [
"Apache-2.0"
] | permissive | aliyun/aliyun-openapi-python-sdk | 4436ca6c57190ceadbc80f0b1c35b1ab13c00c7f | 83fd547946fd6772cf26f338d9653f4316c81d3c | refs/heads/master | 2023-08-04T12:32:57.028821 | 2023-08-04T06:00:29 | 2023-08-04T06:00:29 | 39,558,861 | 1,080 | 721 | NOASSERTION | 2023-09-14T08:51:06 | 2015-07-23T09:39:45 | Python | UTF-8 | Python | false | false | 1,646 | py | # Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The ASF licenses this file
# to you under the Apache License, Version 2.0 (the
# "License"); you may not u... | [
"sdk-team@alibabacloud.com"
] | sdk-team@alibabacloud.com |
d77de184040e7ebe354e10ffa5520ea641e93455 | a6cefd249baa7d7de56c435dbd023339d32b1127 | /loadmat.py | f8e679d2d22dbaac2bdaf945aa7ace060f7a45c7 | [] | no_license | jmbruges/semSync | 9ffa8124c5d3b50e3ca4058abe72e748cc591f55 | 88d6791a689796751eccfb249719be70a75fe14f | refs/heads/master | 2020-06-20T01:41:48.486260 | 2019-07-15T07:36:44 | 2019-07-15T07:36:44 | 196,947,178 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,184 | py | # loadmat.py
import scipy as sp
import scipy.io as spio # this is to import Matlab files, e.g. structure type
def loadmat(filename):
'''
this function should be called instead of direct spio.loadmat
as it cures the problem of not properly recovering python dictionaries
from mat files. It calls the fun... | [
"javbru@pop-os.localdomain"
] | javbru@pop-os.localdomain |
bc8493def8d4bd248adf21fd2e2afe1310914713 | a140fe192fd643ce556fa34bf2f84ddbdb97f091 | /.history/사용자정의예외처리_20200709155926.py | 50dfdf7745a95aa031e58bbcf32a3cb61abeb416 | [] | no_license | sangha0719/py-practice | 826f13cb422ef43992a69f822b9f04c2cb6d4815 | 6d71ce64bf91cc3bccee81378577d84ba9d9c121 | refs/heads/master | 2023-03-13T04:40:55.883279 | 2021-02-25T12:02:04 | 2021-02-25T12:02:04 | 342,230,484 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 630 | py | class BigNumberError(Exception):
def __init__(self, msg):
self.msg
try:
print("한 자리 숫자 나누기 전용 계산기입니다.")
num1 = int(input("첫 번째 숫자를 입력하세요 : "))
num2 = int(input("두 번째 숫자를 입력하세요 : "))
if num1 >= 10 or num2 >= 10:
raise BigNumberError
print("{0} / {1} = {2}".format(num1, num2, int... | [
"sangha0719@gmail.com"
] | sangha0719@gmail.com |
1e96e7cc7e1f51834877e17634f948ebee8dc31f | ac75b787a84d15e15a3339cc1e72280015f9829f | /pyrosim_env/bin/easy_install-2.7 | 60b7a9605667c9c2e8edc2e6ec49206f1af720f9 | [] | no_license | mmarder96/pyrosim | e5cb1ec2c7eb07c5a4c841d4e46cece5cff3ed1e | c9879462d58806f5473e55762290a31825bbe6ce | refs/heads/master | 2020-03-31T14:58:11.405260 | 2018-06-24T22:22:06 | 2018-06-24T22:22:06 | 152,317,847 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 262 | 7 | #!/home/max/dev/pyrosim/pyrosim_env/bin/python
# -*- coding: utf-8 -*-
import re
import sys
from setuptools.command.easy_install import main
if __name__ == '__main__':
sys.argv[0] = re.sub(r'(-script\.pyw?|\.exe)?$', '', sys.argv[0])
sys.exit(main())
| [
"demenon290@gmail.com"
] | demenon290@gmail.com |
2a413c3593c9375a9624c588d6d41eb2f1c38247 | 7c88abfec665c7e73c672480cfcdbbe374c9ca01 | /covidportal/beds/forms.py | c0315e8607533a14cdd55174051b99f3966f46a4 | [] | no_license | biya-sussan-varghese/django-app | 8c75c26baa1f8364291ab547723dc43532ede063 | 9c15f5e6b346d6224fbfca050b634184a71ef363 | refs/heads/master | 2023-05-02T05:43:09.982222 | 2021-05-20T17:54:14 | 2021-05-20T17:54:14 | 369,268,105 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,191 | py | <<<<<<< current
from django.forms import ModelForm
from .models import Patient,BedAllocation
class PatientForm(ModelForm):
class Meta:
model = Patient
fields = ['name', 'age','location', 'district', 'phone', 'aadhar', 'category']
class BedAllocationForm(ModelForm):
class Meta:
model = ... | [
"christy219008@sahrdaya.ac.in"
] | christy219008@sahrdaya.ac.in |
31c89ed6485f9df323dbb57e8f982d10e5b85f9e | 79ed6b86bfbc9d6c97e612662d57fc31007ab85f | /sandbox/officeAnalysis.py | d426210ba709d11bbde978b24c03b171ab5a0898 | [] | no_license | saniemi/SamPy | d4b97581cbee534ddfb077aeaec4c46eacdf3e15 | 5da864558774c4fefddbe0663db68aea26f0f7a8 | refs/heads/master | 2021-01-19T03:18:21.598686 | 2016-08-05T08:26:06 | 2016-08-05T08:26:06 | 55,225,941 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 13,576 | py | """
Survey Analysis
===============
A simple script to do some analysis on survey data.
Dependencies
------------
:requires: pandas
:requires: numpy
:requires: matplotlib
:requires: nltk
:requires: wordcloud
:requires: rpy2
Author
------
:author: Sami Niemi (sami.niemi@valtech.co.uk)
Version
-------
:version:... | [
"Sami.Niemi@valtech.co.uk"
] | Sami.Niemi@valtech.co.uk |
d947cbfeb799505d1e5542d28c3c4e07143a3117 | db43e14fb860d20981d7444104ade55bf80ecc57 | /horse_app/serializer.py | fd43d2e49d4687e8d44f6da4cdfbd136f079d5cc | [] | no_license | B2Gdevs/horse-market | 4ee0cb38260e07da2fe9b8aac1cee9df9a27a3f2 | 615da451f3b995a2059c7b4c40e52f951b45394a | refs/heads/main | 2023-05-15T17:59:54.405452 | 2021-05-27T00:01:16 | 2021-05-27T00:01:16 | 368,019,347 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,418 | py | from rest_framework import serializers
from auth_app.serializer import UserSerializer
from horse_app.models import Horse, SliderImage, Message
class HorseViewSerializer(serializers.ModelSerializer):
owner = UserSerializer(many=False)
url = serializers.HyperlinkedIdentityField('horse-detail')
class Meta:... | [
"b2gdevs@gmail.com"
] | b2gdevs@gmail.com |
8932bac6b9449a31176dcb2c912a072e42621129 | be3f21ff09ca547b4551b3e30c2cd16b32953332 | /pwnabletw/dubblesort/solve.py | 57ab24fb8c9ec9487fedec46ae94b42d1f838fa9 | [
"LicenseRef-scancode-warranty-disclaimer"
] | no_license | nithinchowdary007/writeups | 42369017213a15f53827a942ca45334444364fad | 6dedce2f01bf653258a2b43c85e086eba8288462 | refs/heads/master | 2023-04-14T18:06:13.971831 | 2021-04-09T13:44:46 | 2021-04-09T13:44:46 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,324 | py | from pwn import *
e = ELF("./dubblesort")
libc = ELF("./libc_32.so.6")
ld = ELF("./ld-2.23.so")
context.binary = e
context.terminal = ["konsole", "-e"]
while True:
# just keep running this POS until u get shell
#p = process([ld.path, e.path], env={"LD_PRELOAD": libc.path})
p = remote("chall.pwnable.tw",... | [
"jwanggt@gmail.com"
] | jwanggt@gmail.com |
938eb9df3b8a2db62a40ce15b101f61e6db3da32 | fda3e6f885f046e5f705cb0aab6dac04c0063e74 | /scripts/ya-bedev-06-01-00.py | 1ee63b9b8081c25c826ac218c36cc37b96a2d29c | [] | no_license | odvk/ynd-bedev-crs | 9bbd51ddacc0f0693f76a5d4b076647e744e5950 | e657b2b9b0b64a82ba815d4acfbb033244d11ae7 | refs/heads/master | 2020-07-03T08:50:25.490653 | 2019-08-15T06:14:24 | 2019-08-15T06:14:24 | 201,857,273 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,556 | py | # 1. Что такое библиотеки?
# Библиотека или модуль — это набор готовых функций, объединенных общей темой. Например, в библиотеке math собраны функции для подсчёта математических величин.
"""
Чтобы получить доступ к этим функциям, нужно командой import (англ. «импорт») в начале программы импортировать библиотеку. Это е... | [
"kustov.dv@gmail.com"
] | kustov.dv@gmail.com |
f095803d34ccf540ecc117845e2a8679494cef17 | 15f6b817e8fdf0b2fab07149d53a42ad9b20e61b | /cod/add_pieces_mosaic.py | 0e16c85c9025925041772a26f297b16980ab02ac | [] | no_license | PredaAlinCatalin/Mosaic-image | 70fdb0abd702a95769ef8ca9eb75e7e79cb93b5e | 76cf21d7429ce03c39c5ef345a116805ed7ad553 | refs/heads/main | 2023-03-12T00:00:29.789112 | 2021-03-02T19:47:13 | 2021-03-02T19:47:13 | 343,893,378 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 8,447 | py | from parameters import *
import numpy as np
import pdb
import timeit
import math
def add_pieces_grid(params: Parameters):
start_time = timeit.default_timer()
img_mosaic = np.zeros(params.image_resized.shape, np.uint8)
N, H, W, C = params.small_images.shape
h, w, c = params.image_resized.shape
num_... | [
"predacatalin99@gmail.com"
] | predacatalin99@gmail.com |
753fcfdcb661bc572d8a1c5e7ede1d3024ca7494 | 91bd632a44a636953d569ed14229523c0551abb7 | /zad14_2.py | 5238cdb787ca77f5a029f91041fb2a54b1716c8b | [
"MIT"
] | permissive | kamilhabrych/python-semestr5-lista14 | c58206b6bad8454b5c928a66dd95388524ba5184 | b5dea544d98a1badbd6fee9e6220196a5f9dd7c0 | refs/heads/main | 2023-03-12T11:15:01.032592 | 2021-03-08T14:43:50 | 2021-03-08T14:43:50 | 344,571,785 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 774 | py | from graphics import *
max_width = 500
max_height = 500
win = GraphWin('Kamil Habrych zadanie 2', max_width, max_height)
win.setBackground('white')
circle = Circle(Point(250,250),50)
circle.setFill('brown')
circle.draw(win)
lengthOfMove = 20
while True:
pt_circle = circle.getCenter()
r_circle = circle.get... | [
"noreply@github.com"
] | kamilhabrych.noreply@github.com |
24317dd98c1779c905c0a9984bad14e30e1b61d2 | 82b018b01a20685e080ee4cb6de3e8bfe816df23 | /Chapter 5/campy_rf_feces.py | 29a76d2c4972c41821bb5b84317ac240fcf5ded6 | [] | no_license | cgolden1993/Dissertation | ce0008c43d789547d557276984fdd7e992045eaf | 96790cff770cf64010b61921277117c7c2e081ac | refs/heads/master | 2020-12-29T23:47:51.496704 | 2020-03-02T16:36:44 | 2020-03-02T16:36:44 | 238,782,708 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 6,016 | py | import pandas as pd
import numpy as np
from collections import Counter
from pprint import pprint
#import time
import matplotlib.pyplot as plt
#plt.style.use('ggplot') #changes plot styles to ggplot
from scipy.stats import randint as sp_randint
from sklearn.ensemble import RandomForestClassifier
from sklearn.model_s... | [
"cgolden1993@gmail.com"
] | cgolden1993@gmail.com |
c7062d7318e35df1a0692c6a4756df7f166434ae | fac7a965a035c713b83890b7384648c1d83a179a | /ML/cnn_config.py | 4f1f620700687bdaf3c7ec600dbf9e10aa52e248 | [
"Apache-2.0"
] | permissive | shiyxg/tremor | 160b170cf44c863a9c485662cfb04281f1b2919d | 18c4efa8104fe2aba9789488aeca200b6fa143e5 | refs/heads/master | 2020-03-23T21:38:34.039712 | 2018-07-25T03:25:52 | 2018-07-25T03:25:52 | 142,121,763 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,446 | py | # -*- coding:utf-8
class CNNConf:
def __init__(self):
self.INPUT_SHAPE = [32, 32, 1]
self.OUTPUT_SHAPE = [32, 32, 1]
self.conv = []
self.conv.append({
'name': 'convBlock1',
'times': 2,
'filterSize': [3, 3],
'outputChn': ... | [
"shiyxg@163.com"
] | shiyxg@163.com |
403712191e3ca6c3157643b795608c3c3134eecb | 81efa90f461bfcb2569a570626fe69b59f3b221a | /Core/views/administracion/inicio/views.py | 8bdcbb7b0f890dc227ba71a4e8d35c495a677e43 | [] | no_license | gonvazsua/SportManagement | 1760188f2ba54964a33805981eee191a14822baf | cdc0ed7a625ad1e2ea754074d2594d6a5b1a3b99 | refs/heads/master | 2021-04-09T16:10:29.550367 | 2016-11-27T10:51:52 | 2016-11-27T10:51:52 | 31,132,158 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 7,680 | py | # -*- encoding: utf-8 -*-
from Core.utils import *
from django.db.models import *
from datetime import date,datetime
from django.conf import settings
from django.db.models import Q
import logging
from django.contrib.auth.decorators import login_required
from Core.utils import cargar_tipos_notificaciones_settings
#Inst... | [
"gonzalovazquezs@gmail.com"
] | gonzalovazquezs@gmail.com |
167a6dc35b93695c5bd036b9b48511a56c1c7163 | 0d0a4eeafb0273ee42367d0c936343d5b95b909d | /flask_blueprint_example/flaskScriptPrint/BluePrint2.py | d1d81e9536688ca81b20be9b71540da2026cd4ef | [] | no_license | wenxuefeng3930/FlaskProject | 4e52a394a034ce9f0b40684a04049a446bc94625 | 84569744adec76d9cfd8abc18fa51f0bad3e7bf5 | refs/heads/master | 2023-07-03T01:16:16.402369 | 2019-08-14T00:25:41 | 2019-08-14T00:25:41 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 244 | py | """
多蓝图命令行模式 蓝图2
"""
from flask import Blueprint
simple_blueprint2 = Blueprint("simple_page2",__name__) #创建蓝图
#bluePrint的路由和视图
@simple_blueprint2.route("/index2")
def index():
return "hello world2" | [
"laobian@qq.com"
] | laobian@qq.com |
7bae6397d5e871161b74b1423b0f7d92af2179e7 | 9743d5fd24822f79c156ad112229e25adb9ed6f6 | /xai/brain/wordbase/nouns/_protectorates.py | dd027b0d6daa7f7d43e89f657ed8332912ed0cf6 | [
"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 | 280 | py |
from xai.brain.wordbase.nouns._protectorate import _PROTECTORATE
#calss header
class _PROTECTORATES(_PROTECTORATE, ):
def __init__(self,):
_PROTECTORATE.__init__(self)
self.name = "PROTECTORATES"
self.specie = 'nouns'
self.basic = "protectorate"
self.jsondata = {}
| [
"xingwang1991@gmail.com"
] | xingwang1991@gmail.com |
7cb82e50a3b526596f89c5dc582ba08e64e4b9ac | 7a9441513330da0c72b459e1293897b4845d0b28 | /support_tools/bins.py | dbfc6a5a020685c6b059685a592e417370a53d62 | [] | no_license | ap190/LearnDeeply | 64d1123bebf25478499131b15bce66bc1cdfeaa0 | a673574bbcfc3e146eeae3eba362fc26de0cdb05 | refs/heads/master | 2020-04-07T10:25:53.490318 | 2019-12-24T06:11:56 | 2019-12-24T06:11:56 | 158,286,591 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 3,701 | py | import json
import os
from collections import Counter
import matplotlib.pyplot as plt
import numpy as np
"""
Class to create bins for likes, and for classifying likes to each bin with labels,
along with other support methods to visualize distribution.
"""
class bins:
def __init__(self, bin_nums = 10):
self.bin_nu... | [
"qi_feng@brown.edu"
] | qi_feng@brown.edu |
19bc16da22037d022ce0059b019ffe42ab352117 | d9788c9ad7ffcb089a89f436bdf06886b8995e24 | /task30.py | 3a85dbfecafd4f9795ed47035123346a378e805b | [] | no_license | akyl-3008/p2t30 | 99a1d6edaf9f216223f5925e60123aa26f547c87 | 3613cce639fdaee1de28db9e1525cb2fbe3b35e3 | refs/heads/master | 2020-12-02T02:14:53.828850 | 2019-12-30T05:48:23 | 2019-12-30T05:48:23 | 230,855,659 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 70 | py | wordy = ("privet", "privet", "kak", "ty")
print(wordy.count("privet")) | [
"akyl-3008@example.com"
] | akyl-3008@example.com |
b49f4867b92765140fea43924ef77775fdeaa1ca | b738f097345e3ef491fa18ae8fb4d0df52d28423 | /done/python-tdd@polsl/test-sample.py | ed622673efa7d832e0e22a8297c527e4f676e656 | [
"MIT"
] | permissive | afronski/presentations | f2bc1ea4b36f097a1cd497c47fd920565859c7cc | 86bc641c760bf532ae0db593ae4f4fe3545a7c86 | refs/heads/master | 2021-05-04T11:55:52.409420 | 2018-02-12T11:25:41 | 2018-02-12T11:25:41 | 5,912,257 | 2 | 2 | null | 2013-11-03T20:24:33 | 2012-09-22T10:41:22 | JavaScript | UTF-8 | Python | false | false | 542 | py | import unittest
def hanoi(n):
return 2 ** n - 1
class TestGame(unittest.TestCase):
def setUp(self):
pass
def testBasicCase(self):
assert hanoi(3) == 7, "3 krążki hanoi da się przenieść w 7 ruchach"
def testLowerEdgeCase(self):
assert hanoi(0) == 0, "0 krążków = 0 ruchów"
... | [
"afronski@gmail.com"
] | afronski@gmail.com |
fb06ffd44f5a47e94e7f283d995aa7086e4026b8 | 324a2bdacb4b6c6286ce6886bca412cca283d649 | /src/gym/test_parameters/analyze_comb.py | 147145a8f48c1c03ffb5967f7de0245965229e70 | [
"Apache-2.0"
] | permissive | shaymargolis/PCC-RL | 1c244640e68df4b811bb980147cb95e277bd3966 | 947a0016480db57a3bd1f96f3f892180d707496b | refs/heads/master | 2023-02-10T03:01:13.496385 | 2020-12-04T15:25:45 | 2020-12-04T15:25:45 | 265,189,635 | 0 | 0 | NOASSERTION | 2020-05-19T08:27:52 | 2020-05-19T08:27:51 | null | UTF-8 | Python | false | false | 2,470 | py | import os
import numpy as np
import json
import pandas as pd
import tqdm
from src.gym.visualizer.single_sender_visualizer import SingleSenderVisualizer
INPUT_DIR = "/cs/labs/schapiram/shaymar/parameter_tests/comb_env"
data = []
class FakeEnv:
def reset(self, bool=False):
return None
def analyze_file(... | [
"shay.margolis@mail.huji.ac.il"
] | shay.margolis@mail.huji.ac.il |
6164cedce8bab869c9e6734a74467c0777d4fa13 | 3d899feb92ce18a45e24426dc3b8650cd253818c | /vnpy/ppo/tqdata.py | 1b0aeb1243639eab0fd6312294f55005728aa80d | [] | no_license | qzl18/Quantitative-Trading-Demo | bbdd6756101d905da4dd1c1fda7e35f476aff7ec | 20bbed0335fab4e49aa64d9702b948519a1bc277 | refs/heads/master | 2023-03-17T15:02:55.499729 | 2021-02-08T04:23:10 | 2021-02-08T04:23:10 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 3,394 | py | import pandas as pd
from tqsdk import TqApi
from datetime import timedelta
from typing import List, Optional
from .setting import SETTINGS
from .constant import Exchange, Interval
from .object import BarData, HistoryRequest
# 时间戳对齐
TIME_GAP = 8 * 60 * 60 * 1000000000
INTERVAL_VT2TQ = {
Interval.MINU... | [
"xieyi@aksofy.cn"
] | xieyi@aksofy.cn |
726c876fb262f2048686ccf86e30f17fe5ee050b | 3c5e61b9762ee1fcb26439fa722c1c0e2600b0db | /notebook/iternote/note.py | 0c0b4724db35dc537cd7f858574d28923e820d44 | [] | no_license | jacksonyoudi/python-note | ccf5406faaf15a15abae5dbf5a993b91131d2dd5 | 098b4c4e8e713948ca96ef732c19f3b5efe60cbe | refs/heads/master | 2021-01-17T15:13:12.573714 | 2016-10-25T03:09:24 | 2016-10-25T03:09:24 | 69,309,792 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 3,073 | py | # coding: utf8
迭代器只不过是一个实现迭代协议的容器对象。它基于两个方法:
next 返回容器的下一个项目
__iter__ 返回迭代器本身
迭代器可以通过使用一个iter内建函数和一个序列来创建。
i = iter('abc')
i.next()
当序列遍历完,会抛出一个StopIteration异常
生成器
基于yield指令,可以暂停一个函数并返回中结果。该函数将保存执行环境并且可以在必要时间恢复。
def fibonacci():
a,b = 0,1
while True:
yield b
a,b ... | [
"liangchangyoujackson@gmail.com"
] | liangchangyoujackson@gmail.com |
cee8c8a80f0d94dd1e8ff71f232cf9abe16c0033 | f0b6b2fdada21ba0c3cbd04144e7bc6c00eaf762 | /standards/__init__.py | e183e96df57a78ff309bfe53cc1d1ed593a9eb2c | [] | no_license | RomanSavran/ontology-api | 437d079f5fa576c75a0b7e7ce535c07e54cac800 | 07aa35738e4314b9383d5e9b72ccffec675d3613 | refs/heads/master | 2023-01-19T20:57:16.042616 | 2020-11-16T08:23:19 | 2020-11-16T08:23:19 | 298,217,890 | 0 | 2 | null | 2020-11-16T08:23:20 | 2020-09-24T08:35:11 | Python | UTF-8 | Python | false | false | 277 | py | from flask import Flask
from logging.config import dictConfig
app = Flask(__name__)
app.config.from_object("standards.config.Config")
dictConfig(app.config.get('LOGGING_CONFIG', {}))
from standards.api import api_bp # noqa
app.register_blueprint(api_bp, url_prefix='/api/')
| [
"y.beshta@uds.systems"
] | y.beshta@uds.systems |
d1ed2f23948319d744c9cc1b2926a9bf1b0c70c7 | 9ead001429ed7123063c38654a5f3cb2873ebd7c | /sce/slides/python/pra/Python Tutorial/Func3.py~ | b27c2b1c6693e002479de887ad6775ca8d5c9f1e | [] | no_license | smadala/IIIT-PG11 | 73646632de36c0774413f1e201d9ce14895ae645 | a0f350261732442838314fcf821f7dad0a6c7b7b | refs/heads/master | 2021-01-23T13:30:05.050032 | 2013-11-13T11:03:30 | 2013-11-13T11:03:30 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 249 | #!/bin/python
import sys
# Function with command line arguments
def display(args):
print 'Number of arguments passed = ', len(args)
print 'Arguments passed = ', str(args)
display(sys.argv) # sys.argv = arguments passed from the command line
| [
"satya@Satya-PC.(none)"
] | satya@Satya-PC.(none) | |
22534f5284e4018a59dbe29907518cb3caa32436 | 768763d058a7ad809c7214d9b06619d5164d487c | /tests/helpers.py | 9aca21e2c20f00076c1bbf280807897b49d31db8 | [
"MIT"
] | permissive | dougthor42/pynuget | 14d764a3e0d853fd405f3d3ab02bd1433b0fb40f | a7a5e769badf57bb178200c1e788980840929936 | refs/heads/master | 2023-03-04T00:05:29.403875 | 2021-04-02T20:39:22 | 2021-04-02T20:39:22 | 130,394,863 | 7 | 2 | MIT | 2022-07-06T19:50:33 | 2018-04-20T17:38:11 | Python | UTF-8 | Python | false | false | 593 | py | # -*- coding: utf-8 -*-
"""
"""
import os
DATA_DIR = os.path.join(os.path.dirname(os.path.abspath(__file__)), "data")
def check_push(expected_code, client, header, file=None):
data = None
if file:
nupkg_file = os.path.join(DATA_DIR, file)
openf = open(nupkg_file, 'rb')
data = {'packa... | [
"doug.thor@gmail.com"
] | doug.thor@gmail.com |
d235f1c3797262d25e0f26ab7ec719b26e84ca21 | c0f808504dd3d7fd27c39f1503fbc14c1d37bf9f | /sources/scipy-scipy-414c1ab/scipy/sparse/tests/test_base.py | 2d2163b637b26a86195ddfd73774d3d76ce5e2f4 | [] | no_license | georgiee/lip-sync-lpc | 7662102d4715e4985c693b316a02d11026ffb117 | e931cc14fe4e741edabd12471713bf84d53a4250 | refs/heads/master | 2018-09-16T08:47:26.368491 | 2018-06-05T17:01:08 | 2018-06-05T17:01:08 | 5,779,592 | 17 | 4 | null | null | null | null | UTF-8 | Python | false | false | 65,539 | py | #
# Authors: Travis Oliphant, Ed Schofield, Robert Cimrman, Nathan Bell, and others
""" Test functions for sparse matrices
"""
__usage__ = """
Build sparse:
python setup.py build
Run tests if scipy is installed:
python -c 'import scipy;scipy.sparse.test()'
Run tests if sparse is not installed:
python tests/test... | [
"georgios@kaleadis.de"
] | georgios@kaleadis.de |
7afb0ea84644b1bf6afbc0de0954989346d9d818 | 531c47c15b97cbcb263ec86821d7f258c81c0aaf | /sdk/resources/azure-mgmt-resource/azure/mgmt/resource/resources/v2018_05_01/operations/_deployment_operations_operations.py | 9b382ad50a49f1db1c0b2bf544db7ab840f5b10d | [
"LicenseRef-scancode-generic-cla",
"LGPL-2.1-or-later",
"MIT"
] | permissive | YijunXieMS/azure-sdk-for-python | be364d3b88204fd3c7d223df23756386ff7a3361 | f779de8e53dbec033f98f976284e6d9491fd60b3 | refs/heads/master | 2021-07-15T18:06:28.748507 | 2020-09-04T15:48:52 | 2020-09-04T15:48:52 | 205,457,088 | 1 | 2 | MIT | 2020-06-16T16:38:15 | 2019-08-30T21:08:55 | Python | UTF-8 | Python | false | false | 15,317 | py | # coding=utf-8
# --------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for license information.
# Code generated by Microsoft (R) AutoRest Code Generator.
# Changes may ... | [
"noreply@github.com"
] | YijunXieMS.noreply@github.com |
1bb07661e2f145c524b06a23863cf532e2036f4e | 28f8a21b5d4b961477f105bddeb36654a6cc3d57 | /PhysicsTools/PatAlgos/test/patTuple_fastsim_cfg.py | b6fe834b06fb3292157515ba9c9effe49b9100d3 | [] | no_license | fcostanz/NTupler | 316be24ca3c8b9784def7e0deea3fd5ead58f72e | adc566a93ad4973fe61a1a9a24ceaabc3973a7ed | refs/heads/master | 2016-09-06T03:57:21.982267 | 2014-02-17T10:01:14 | 2014-02-17T10:01:14 | 16,286,291 | 0 | 1 | null | null | null | null | UTF-8 | Python | false | false | 1,059 | py | ## import skeleton process
from PhysicsTools.PatAlgos.patTemplate_cfg import *
## let it run
process.p = cms.Path(
process.patDefaultSequence
)
## ------------------------------------------------------
# In addition you usually want to change the following
# parameters:
## ------------------------------... | [
"fcost@nafhh-cms02.desy.de"
] | fcost@nafhh-cms02.desy.de |
c73b83f30926c4562ba946d153ecae54b4d5eb9c | 661b81143e1d99c2f2bad8dc78c6a5830667d47e | /skriptid/scraper_mushroomworld.py | eb18ff02a17e794f63743d317d05fc87e5279e88 | [] | no_license | andry1001/seenetuvastaja | 764405b78b824c5350c72f9fa4db193881dbe8d5 | d110eb3790e2c09efcffa8d08662e9cff3908abb | refs/heads/master | 2020-05-18T06:13:01.899127 | 2019-09-07T10:47:37 | 2019-09-07T10:47:37 | 184,227,476 | 0 | 0 | null | null | null | null | WINDOWS-1252 | Python | false | false | 2,103 | py | ###########################################################################################################################
# skripti kirjutades on aluseks võetud kood järgnevatelt lehekülgedelt: #
# https://stackoverflow.com/questions/18408307/how-to-extract-and-down... | [
"noreply@github.com"
] | andry1001.noreply@github.com |
cf67ea891aa1db6ec1100a61523886a37e8b7585 | 5c929ec2036ff04dbaaa78a5939380095b1075b9 | /archiv/migrations/0037_usecase_custom_layer.py | 5bdb64a491ee0bc035bde96aff97179e70841e78 | [
"MIT"
] | permissive | acdh-oeaw/mmp | 9c0535129446123e32ce5a104447b7432b4e7e05 | 5381aa97757c456d0ce4f68137f5287e57376629 | refs/heads/master | 2023-04-15T06:26:25.605304 | 2023-03-28T12:14:43 | 2023-03-28T12:14:43 | 334,097,604 | 3 | 0 | MIT | 2023-03-28T12:14:45 | 2021-01-29T09:32:19 | Python | UTF-8 | Python | false | false | 568 | py | # Generated by Django 3.2.9 on 2022-06-09 05:37
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('archiv', '0036_spatialcoverage_show_labels'),
]
operations = [
migrations.AddField(
model_name='usecase',
name='cust... | [
"peter.andorfer@oeaw.ac.at"
] | peter.andorfer@oeaw.ac.at |
49292474819489ee394693df757244bb7466aee7 | 1426a4f8b67e32394613e89802e04611d5d777fe | /try_baike1.py | b10a5b36057c2f81b28f04b02c1d5c256e43ca53 | [] | no_license | HuaienYao/python-crawler | ea62ed920d52ffacfabe5a919dee62b61e3147c5 | 630e3f92436f1ba8b470d3f30872759da9bf53ae | refs/heads/master | 2020-04-19T22:47:39.041827 | 2019-02-01T08:43:58 | 2019-02-01T08:43:58 | 168,479,203 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 412 | py | #本代码是爬百度百科的小实验
from bs4 import BeautifulSoup
from urllib.request import urlopen
import re
import random
#设置起始url
base_url = "https://baike.baidu.com"
his = ["/item/%E7%BD%91%E7%BB%9C%E7%88%AC%E8%99%AB/5162711"]
url = base_url + his[-1]
html = urlopen(url).read().decode('utf-8')
soup = BeautifulSoup(html,features='lx... | [
"wyane.yia@gmail.com"
] | wyane.yia@gmail.com |
bf8afdc6a17a89cceb0f8505c726252ddb799c71 | 30c8de06d3181d53cc2549cca3ae3363142793ed | /adaptable networks/experiments/algorithms/importance/betweenness_centrality.py | bcd7c5af0631a7f11e1dcc15bb9abfcfbcd20829 | [] | no_license | sanket-patil/Complex-Networks | 6ac6d431958b288c82c54ec08c1f0e8533bc6c1a | 8d99f23000ad994032a846bdbb84daa948cfa460 | refs/heads/master | 2021-01-13T07:29:40.179392 | 2013-01-10T04:37:52 | 2013-01-10T04:37:52 | 3,737,590 | 2 | 0 | null | null | null | null | UTF-8 | Python | false | false | 6,867 | py | ''' Computes the betweenness centrality measures. '''
import algorithms.paths.paths
def getNodeBetweennessSequence(gr = None, nl = None, apsp = None):
betweenness = {}
plist = apsp
nodes = nl
if gr:
nodes = gr.getNodeList()
plist = algorithms.paths.paths.getAPSP(gr, allsp = Tru... | [
"sanketvpatil@gmail.com"
] | sanketvpatil@gmail.com |
6291ac45390f72142bdf12dfd36524ada4640f4a | b8ef2769bf6d9159457faa642f57c91a01533ef0 | /1 mac_changer/macchanger-5.py | 0ccc2c5350479b116ff7f2adf3745a8aa29cf3c1 | [] | no_license | C-BOE86/Python-Ethical-Hacking-Tools | 096d9252096536164a18c6449d105d3807415e51 | 0ca3dd29bc35722e8e6a55a2a6d56036dccb856b | refs/heads/master | 2022-03-23T04:29:30.215390 | 2019-12-03T19:57:57 | 2019-12-03T19:57:57 | 198,090,999 | 2 | 2 | null | null | null | null | UTF-8 | Python | false | false | 1,697 | py | #!/usr/bin/python
'''
Getting the value for the interface and mac addr to a variable and
then pass the value to the command directly
secure code
handling user input if the user put ; or && to execute another command
it will stop by removin the shell=True single string commmand
rather we remove the shell=True and exe... | [
"noreply@github.com"
] | C-BOE86.noreply@github.com |
dc1aca49e98ba1198a880584be42f9758fdd5ebd | bd435e3ff491d13c3cb1ffcf34771ac1c80f7859 | /code/flask/01/app/config.py | 82b45957f1f35cffc8f4752f0c8de4f86285b81c | [] | no_license | luningcowboy/PythonTutorial | 8f4b6d16e0fad99a226540a6f12639ccdff402ff | 9024efe8ed22aca0a1271a2c1c388d3ffe1e6690 | refs/heads/master | 2021-06-16T23:03:22.153473 | 2020-04-09T13:52:12 | 2020-04-09T13:52:12 | 187,571,993 | 0 | 0 | null | 2021-03-25T23:02:36 | 2019-05-20T05:16:13 | Python | UTF-8 | Python | false | false | 405 | py | CSRF_ENABLED = True
SECRET_KEY = 'you-will-never-guess'
OPENID_PROVIDERS = [
{ 'name': 'Google', 'url':'https://www.google.com/accounts/o8/id'},
{ 'name': 'Yahoo', 'url': 'https://me.yahoo.com' },
{ 'name': 'AOL', 'url': 'http://openid.aol.com/<username>' },
{ 'name': 'Flickr', 'url': 'http://www.flick... | [
"luningcowboy@gmail.com"
] | luningcowboy@gmail.com |
a4e77f0776606f0a309094559dcad9e0c32954f5 | 308953409e1a3b828ac49b7301c1e751cbf762cf | /suite_EETc 21/tst_New_Factory_Reset_Import/test.py | 7b07a75708d02a52cf6a0deb7faad6f848d82f6f | [] | no_license | asthagaur1/danfoss-automation | 4dcc7d8f000917b67e4d6f46ff862a525ddcbc5e | 213a99d3375889cd0e0c801421a50e9fe6085879 | refs/heads/main | 2023-03-31T23:26:56.956107 | 2021-04-01T08:52:37 | 2021-04-01T08:52:37 | 353,627,845 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 414 | py | def main():
excel = r"C:\gitworkspace\KoolProg-TestAutomation\Master_Functions\Test_Automation\SourceCode\suite_EETc 21\shared\testdata\New_Factory_Reset_Import.xls";
#Mapping with Global scripts for Function library and key action.
source(findFile("scripts", "Functions.py"))
source(findFile("scripts", ... | [
"asthagaur@danfoss.com"
] | asthagaur@danfoss.com |
db2e8f2e37710404f33d22a0aceafc1fbb6f1009 | ceeea27fddee32f76d138e5a9b135c9686147676 | /env/lib/python3.8/site-packages/location/migrations/0008_auto__add_field_locationconsumersettings_icloud_timezone.py | 2ab1f2e5eaae3f23b949d3c39791b23f64b2cfe5 | [
"MIT"
] | permissive | angels101/practice-django-framework-api- | 8e237efc20a797a2d45d836a28eb90f97d1535b7 | 0a888c75126940c33bc7afc14b8d1496c586512f | refs/heads/main | 2023-04-14T17:28:48.136114 | 2021-04-19T11:27:13 | 2021-04-19T11:27:13 | 357,435,663 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 7,123 | py | # -*- coding: utf-8 -*-
import datetime
from south.db import db
from south.v2 import SchemaMigration
from django.db import models
class Migration(SchemaMigration):
def forwards(self, orm):
# Adding field 'LocationConsumerSettings.icloud_timezone'
db.add_column(u'location_locationconsumersettings'... | [
"angelscodex101@gmail.com"
] | angelscodex101@gmail.com |
284f857566050d27403cbc88caec96c5ddefb015 | fd87102dc12fff6ab7262aabae7c365c58a9ad6f | /audioclick/mblookup.py | 973066e94adaea02b83e87c378ad37f2ac9526c9 | [] | no_license | vasuman/audioclick | fe3bc62d067c1a3846d69f60bb24a3ed1b257c5d | 5f60689e53b8fcda3ed61f20ff58feb98d6785b3 | refs/heads/master | 2021-01-19T06:32:14.997649 | 2012-08-14T06:09:30 | 2012-08-14T06:09:30 | 5,215,118 | 3 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,127 | py |
import urllib2
import json
import musicbrainzngs as mb
import logging
mb.set_useragent('AudioClick','0.1dev')
def generate_track(rec_info,final_release):
track={}
track['title']=rec_info['title']
track['artist']=rec_info['artist-credit-phrase']
track['musicbrainz_trackid']=final_release['trackid']
track['album'... | [
"vasumanar@gmail.com"
] | vasumanar@gmail.com |
7da2d62723cf241c6ab65437c17e738eed8b2a76 | e7de2a57c397ba6e3d2059b76b13ca6c4cdce5e8 | /util.py | fa5bcd7c5a19393aa49201d59cdc9ae92cfe8740 | [
"BSD-3-Clause"
] | permissive | wingpang-gz/decaNLP | 2a8baedd490748f4fe43a0825b09b3fa6a79769f | d776d9f600c127a0a3e28c85960cf0ea615e8f63 | refs/heads/master | 2020-03-26T18:07:49.767505 | 2018-08-16T19:51:40 | 2018-08-16T19:51:40 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 7,643 | py | from text import torchtext
import time
import os
import sys
import torch
import random
import numpy as np
def get_context_question(ex, context, question, field):
return ex.context_special + ex.context + ex.question_special + ex.question
def preprocess_examples(args, tasks, splits, field, logger=None, train=True... | [
"bryan.mccann.is@gmail.com"
] | bryan.mccann.is@gmail.com |
63bb1f85690d6a2db33908697c2a176e9ed47132 | 442620638423710f68f719b28a645d4041eec346 | /modules/sql_main.py | b2efe37e8570647cdbe95f349a2b65240efb9d36 | [] | no_license | ivprokofyev/cb_parsing | 324e0160ebb04926085b51fecb438101f42d76dd | c2370679844554f1c96939017cc1875c5a2c214a | refs/heads/master | 2020-04-05T21:49:35.684748 | 2018-12-01T22:37:08 | 2018-12-01T22:38:08 | 157,234,680 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 20,634 | py | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
import psycopg2
class SqlShell:
"""
Middle-end для доступа к БД
Методы:
Для парсеров
countInputParsers - посчет количества записей спарсенных тарифов в БД
getAllIdInputParsers - получение всех записей по ID агента в БД
checkInputParsers - пров... | [
"iv.prokofyev@gmail.com"
] | iv.prokofyev@gmail.com |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.