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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
8df6bbe3030d5b655670bf5a5fc62ef50f3ccaf4 | 80d2caf7a3346f234e9e67932be0aa4e14cfa384 | /Problem0025.py | c4abe26f69df96c491a2ff8fb07fe8bf6fdef7e9 | [] | no_license | wmontanaro/ProjectEuler | 2ec679246914f64e41855d3cf1a8dfb6d2fc4d8c | be875213eedf6dbbe98a9807992b9516ffbda37e | refs/heads/master | 2021-05-08T11:47:19.934040 | 2018-02-02T00:24:38 | 2018-02-02T00:24:38 | 119,910,189 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 828 | py | Problem0025.py | '''
Project Euler Problem 25:
The Fibonacci sequence is defined by the recurrence relation:
Fn = Fn−1 + Fn−2, where F1 = 1 and F2 = 1.
Hence the first 12 terms will be:
F1 = 1
F2 = 1
F3 = 2
F4 = 3
F5 = 5
F6 = 8
F7 = 13
F8 = 21
F9 = 34
F10 = 55
F11 = 89
F12 = 144
The 12th term, F12, is the first term to contain three... |
a7374d386e1212d2a54102387da6c9e25646f283 | b098e90bab9fd3f2ea13ca99b5d909102e602e00 | /cliff/tests/utils.py | b9cdba35939a7e61f9b776226949050a4796fa35 | [
"Apache-2.0"
] | permissive | vova557/cliff | d341cd13700c2b28d8a6af5853746e8d86851926 | f072892cd7c4ab865f378510fbbb20629257f53a | refs/heads/master | 2020-08-06T19:19:08.761593 | 2019-11-18T13:36:36 | 2019-11-18T13:36:36 | 213,121,582 | 1 | 0 | Apache-2.0 | 2019-10-06T06:49:33 | 2019-10-06T06:49:33 | null | UTF-8 | Python | false | false | 1,391 | py | utils.py | # Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed u... |
7cb31ec1977c85312c1ab52bf3663655e2706673 | d4ac1c91ae98a1e4fc0edd6f872cc081b64e2b29 | /tripleand.py | 5320f0170db8e4a5cfec115aec9830de120bd85d | [] | no_license | carolinascarneiro/pp-python-challenges | 43ec51f9b640c0a92c6e68a2f3046e7476fb8e06 | 7bbbb011bdbb81b656424cf559c419cf64a5571e | refs/heads/main | 2023-06-13T23:09:06.650555 | 2021-07-20T02:23:28 | 2021-07-20T02:23:28 | 383,810,021 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 429 | py | tripleand.py | # Challenge
# Boolean and
# Define a function named triple_and that takes three parameters and returns True
# only if they are all True and False otherwise.
def triple_and(a, b, c):
print(len([i for i in [a, b, c] if i != True]) == 0)
#Python Principle Solutions
# def triple_and(a, b, c):
# return ... |
81caa6c52e4723ecfc87a768faf1b1d1267bdcfd | cadb49f4e45e825f199923cb0a469b9cf7f9a0a5 | /VoxelizeWindow_GUI.py | 0bf8f69fc7d891173dc9b49fe7b42d2d26f73166 | [] | no_license | qi55wyqu/InteractiveConeBeamReconstruction | c185e51176901f33c21603ef475a353fa17bbb57 | 3551f1523c07b667f4952431fb1fc6908d3007b4 | refs/heads/master | 2022-04-04T12:01:30.158405 | 2020-01-29T09:07:25 | 2020-01-29T09:07:25 | 111,735,574 | 0 | 0 | null | 2017-11-22T21:46:50 | 2017-11-22T21:46:49 | null | UTF-8 | Python | false | false | 7,766 | py | VoxelizeWindow_GUI.py | # -*- coding: utf-8 -*-
# Form implementation generated from reading ui file 'VoxelizeWindow_GUI.ui'
#
# Created by: PyQt5 UI code generator 5.9.2
#
# WARNING! All changes made in this file will be lost!
from PyQt5 import QtCore, QtGui, QtWidgets
class Ui_Voxelize_Window(object):
def setupUi(self, Voxelize_Windo... |
d6426e95d3324aed7c51f3fb98e2e57577654c33 | a38a295b2538537e04d9865c003e1f611544cff8 | /Les 3/3_1.py | 5f358fa51c2414f7dc2eaeecf30f866ceba79bae | [] | no_license | LuukHendriks99/Python | 0bfd3b9584d0fd18742d985fd6c2e465b2f5b13c | 970b1e189a589c817750bb3e966e77e6bdf3f00e | refs/heads/master | 2021-07-20T06:33:18.130667 | 2017-10-30T13:39:36 | 2017-10-30T13:39:36 | 103,111,085 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 73 | py | 3_1.py | score = int(input('Geef je score:'))
if score>15: print('Gefeliciteerd!') |
223049fe5e721ac012e3798312149bc654372cd2 | 82e3cddeacbdcc243f3759961ebb9deb198eae00 | /Assignments/Python-Assignments/assignment_4/q5.py | b3f1b17aa98cb15bd69498f2689d52a9ff76d20d | [] | no_license | prateek-manocha/Python-AI-Course | ec6134ad4983abfab72431f9b0b824ea6654b1dd | 4bbaad86d4cd1e204f91a6ce6b645cff014436e8 | refs/heads/master | 2023-02-27T19:01:08.386463 | 2021-02-07T07:08:46 | 2021-02-07T07:08:46 | 275,341,983 | 0 | 6 | null | null | null | null | UTF-8 | Python | false | false | 816 | py | q5.py | f = open('passage.txt', 'r')
f.read()
print('Total number of characters:',f.tell())
unique_words = {}
position = 0
f.seek(position)
for line in f:
for word in line.split(' '):
word_mod = word.replace('.','').replace('(','').replace(')','').replace(',','').replace('\n','').lower()
if word_mod not in... |
e277700f46852de24dbcb4636088090da3f600e3 | 61cedaa699c720898d5b0f93aaf8d846aa6ec863 | /build/scripts-2.7/import-stackmob-to-apiOmat | f3cbea67750d42d7abb528198339573ecb6c1faa | [] | no_license | apinaut/apiOmat-import-stackmob | c0433132d6b7a8b67356700676ba3afe07dc419d | ecadb892267a4866d5bbed3b2d690263b4984f02 | refs/heads/master | 2020-05-17T09:12:03.832844 | 2014-02-12T14:56:16 | 2014-02-12T14:56:16 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 19,180 | import-stackmob-to-apiOmat | #!/Users/phimi/base/bin/python
'''
Created on 12.02.2014
@author: phimi
'''
import sys, getopt
import base64, urllib2, urllib
import json
import zipfile
import time
from _pyio import BytesIO
import gzip
import re
baseURL = "https://apiomat.org/yambas/rest"
apiKey = None
system = "LIVE"
userMail = None
password = Non... | |
894a5cb3fa347b55d61c0de5a821eeb4b3b95e93 | a696f85332d0f85f06bfdc47b32d427491160eb3 | /test/python/HyperMongo.py | 9232a507958642305efe269e80cd7ffa20c4c297 | [
"BSD-3-Clause"
] | permissive | cnangel/hyperdex | 1abdac27db819c74db0f7052f307e13a08963f09 | b272e85b08d232993baf6105a4beba833deadfe3 | refs/heads/master | 2020-04-06T03:34:50.419075 | 2016-05-30T09:27:54 | 2016-05-30T09:27:54 | 59,998,894 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 887 | py | HyperMongo.py | from testlib import *
from hyperdex.mongo import *
import sys
# This tests the mongo-compatibility layer
db = HyperDatabase(sys.argv[1], int(sys.argv[2]))
assertTrue(db.test.insert({'_id' : 'k1', 'a' : 'b', 'c' : 1}))
db.test.update({'_id' : 'k1'}, {'$inc' : {'c' : 1}})
res = db.test.find_one({'_id' : 'k1'})
assertE... |
c6c86a060ddcf103fe487be3da871d5bf595f7c7 | b289306f0edad2ecd10d668a0f7abe417f2b5477 | /data_set/multi_label_attention_dataset.py | b684efdc5a9e8212e85b924dd8c208409dd8b6f7 | [] | no_license | dhirajsangwan/SXMNet | f7291b9de28b03cddc1283fa60844715a8c84797 | d254d532f96bc7481081c685b19cf535f8a0b3a6 | refs/heads/master | 2023-01-04T14:04:20.062968 | 2020-11-02T09:15:57 | 2020-11-02T09:15:57 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,862 | py | multi_label_attention_dataset.py | import torch
import torchvision.transforms as transforms
from data_set.xray_multi_label_attention_folder import MyFolder
import data_set.my_transform as my_transforms
def prepare_data(args):
normalize = transforms.Normalize(mean=[0.485, 0.456, 0.406],
std=[0.229, 0.224, 0.225]... |
9d4f573ab524577171a54f1cc795a87828dd4ef9 | f487532281c1c6a36a5c62a29744d8323584891b | /sdk/python/pulumi_azure/appservice/web_app_active_slot.py | 35da4b31a0bd92700f51c6f2b60d56a3a6b6de76 | [
"MPL-2.0",
"BSD-3-Clause",
"Apache-2.0"
] | permissive | pulumi/pulumi-azure | a8f8f21c46c802aecf1397c737662ddcc438a2db | c16962e5c4f5810efec2806b8bb49d0da960d1ea | refs/heads/master | 2023-08-25T00:17:05.290397 | 2023-08-24T06:11:55 | 2023-08-24T06:11:55 | 103,183,737 | 129 | 57 | Apache-2.0 | 2023-09-13T05:44:10 | 2017-09-11T20:19:15 | Java | UTF-8 | Python | false | false | 13,491 | py | web_app_active_slot.py | # coding=utf-8
# *** WARNING: this file was generated by the Pulumi Terraform Bridge (tfgen) Tool. ***
# *** Do not edit by hand unless you're certain you know what you are doing! ***
import copy
import warnings
import pulumi
import pulumi.runtime
from typing import Any, Mapping, Optional, Sequence, Union, overload
fr... |
fad1dc83a59cec757c72486a6296999e207c50a7 | ca701df40018e400d68e5d4aed6e6e5af842d726 | /ACM-ICPC/Korea Regional/2013/Preliminaries/H.py | ee1aa822613a920b439b1410498121456d0a9320 | [] | no_license | leejseo/PS | 8bd1dad5063b8360e9e330024337656e91d17ab4 | d8b9ea75477475bae9ad9cd6410ee1081ac12414 | refs/heads/master | 2021-09-10T05:05:32.032528 | 2021-08-30T21:50:38 | 2021-08-30T21:50:38 | 156,533,684 | 2 | 1 | null | null | null | null | UTF-8 | Python | false | false | 1,053 | py | H.py | import sys
raw_input = sys.stdin.readline
def augment(adj, u, visited, match):
for v in range(len(adj[0])):
if adj[u][v] and not visited[v]:
visited[v] = True
if match[v] == -1:
match[v] = u
return True
augmented = augment(adj, match[v], vi... |
5bf994ba6a23422ee932e6a4d243afb8b0ff1ccf | fe12155c28db173d86937913df6e2dc439a01376 | /tasks/migrations/0002_auto_20191022_0149.py | 57e0a546398f03f61c83ba374f4c7c12344a725b | [] | no_license | wevertonjfarias/gestao_inoarb | 31991b1ba35a59b9ec43fdee16c44fbc8dc7159f | 9b27c1d4987d77b6c33d3244ea56b94f556cec59 | refs/heads/master | 2022-11-27T08:01:09.263866 | 2020-01-19T21:13:04 | 2020-01-19T21:13:04 | 220,876,267 | 2 | 1 | null | 2022-11-22T04:51:36 | 2019-11-11T01:22:49 | Python | UTF-8 | Python | false | false | 750 | py | 0002_auto_20191022_0149.py | # Generated by Django 2.2.5 on 2019-10-22 04:49
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('tasks', '0001_initial'),
]
operations = [
migrations.AlterField(
model_name='ocorrencia',
name='cep',
fi... |
f9008d21571a4a722b5440663296efbd345e4521 | b81e84ad59e8264eb83d1ff7ed87bc0fcc92b3ab | /svm/svm_classifiers.py | 907f7a503ce05cbae495f41b0b76ae6ab5d0c09a | [] | no_license | nginyc/trash-classifier | 2b9eb8e1297bd28e5bae463bc6beabcd94e14e2a | e34774ee89e3cfb87aae6b31c0d50de85f9808d4 | refs/heads/master | 2022-12-13T06:14:17.529213 | 2018-04-20T14:52:14 | 2018-04-20T14:52:14 | 126,681,262 | 2 | 3 | null | 2022-12-08T00:56:32 | 2018-03-25T09:13:48 | Python | UTF-8 | Python | false | false | 6,094 | py | svm_classifiers.py | import numpy as np
import sys
import cv2
import os
from sklearn import svm, metrics, model_selection
from scipy import stats
from skopt import gp_minimize
from skopt.space import Real, Integer, Categorical
from skopt.utils import use_named_args
from common import load_images
from .extract_inception_bottleneck_features... |
fc189a1afa0b1a31e2a420ff21f5cfbff2d89347 | ba572050b1d51a95ec4e833fa65674bca24b2836 | /sjk-test.py | 4f7269383d70bf6429cf74816365bde62a84fc84 | [] | no_license | sdsxpln/iotCC2650sjk | dcc70cec348eee425997ccba8a8f6bb685e6292a | c103d3425d40d9997064afddd50605d3d643b5e8 | refs/heads/master | 2020-03-11T06:52:24.887696 | 2017-06-05T17:23:04 | 2017-06-05T17:23:04 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 3,503 | py | sjk-test.py | from bluepy.btle import UUID, Peripheral, DefaultDelegate, AssignedNumbers
import struct
import math
import time
import sys
import argparse
def _TI_UUID(val):
return UUID("%08X-0451-4000-b000-000000000000" % (0xF0000000+val))
SJK_MAC = 'a0:e6:f8:ae:14:00'
#SJK_MAC = '24:71:89:E9:72:07'
class SensorBase:
... |
9a504b2a0c3ddb6b8e6eb52945d3ec37d5f9e99b | a4c7157c356a5134af8d8ceab802cb7744b13b0a | /backend/post/views.py | 0af7126b8af75dfe59d8b7ac269d5bb4a81cf330 | [] | no_license | JustKode/KHUtack-Overflow | e4f8abe68e4bc01ceccf4a5ccc5d154fd8354089 | daabc3cd8da93b0e8b20a77af21cb55731a83881 | refs/heads/master | 2023-06-02T20:06:48.751139 | 2021-06-22T11:24:06 | 2021-06-22T11:24:06 | 368,268,263 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 14,866 | py | views.py | from django.contrib import messages
from django.shortcuts import render, get_object_or_404, redirect
from django.core.paginator import EmptyPage, Paginator
from board.models import Category, SubCategory
from post.models import Question, Comment, Answer, Tag
from post.forms import PostForm
import json
def get_question... |
2f78d1165490c76124f0fe523446e654d71a770a | 345f1148c773ee3f9f4139e332d757575149f2af | /LSTM Model/lstm_phishing_detection.py | db3ae8df7aea8a4cbb0fe6c82887228d8a093956 | [] | no_license | ayahashim/Defences-against-web-application-attacks-and-detecting-phishing-links-using-machine-learning | 146662886646c38d5b3c2df496b0d149de688362 | f942915c264a62893fd1e48bf20c8d1bff7b0884 | refs/heads/master | 2023-04-08T14:21:24.968811 | 2021-04-16T02:30:22 | 2021-04-16T02:30:22 | 356,413,871 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 4,544 | py | lstm_phishing_detection.py | # -*- coding: utf-8 -*-
"""LSTM_phishing_Detection.ipynb
Automatically generated by Colaboratory.
Original file is located at
https://colab.research.google.com/drive/1qrjGKga-S8VZLOjoAfchBgFG4w6welrb
"""
import csv
import random
import numpy as np
import matplotlib.pyplot as plt
import tensorflow as tf
from tens... |
9718bdbef10c40b8c09905bf71f763fefd0d3781 | fededdcf60997e5887d9c841bb095b2e8cb16e1d | /testJar.py | fa83ebdbdd17542b70002e64016145cf3135dc0b | [] | no_license | forever201406/pythonLearning | 2497929ab3a6568998f266f62979bdd2f8cca627 | 6dd200aea29e54f8f178d265c96825be05b651a0 | refs/heads/master | 2020-12-07T07:45:33.710176 | 2016-09-07T09:15:35 | 2016-09-07T09:15:35 | 67,590,553 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 656 | py | testJar.py | #!/usr/bin/env python
#coding : utf-8
from jpype import *
# jvmpath = getDefaultJVMPath()
# startJVM(jvmpath, "-ea", "-Djava.class.path=.")
# TA = JPackage('test2').TestApi
# jd = TA()
# jd.printData('1234')
# s = jd.getData('a')
# print s
# shutdownJVM();
jvmpath = getDefaultJVMPath()
st... |
16ebff0eb098252c65e35fa92f311ec022d6b5f2 | 49ef46aec11c3156ba89f1757103ca454360b14b | /chapter-5/chapter_5.py | ebc6aa83ef1a3d93d77d0c32725964453a631375 | [] | no_license | breanneboland/Think-Python | 46121fcd0e99f7cf8b003e1fe0d003bf0047234a | 1c4d43efc27aa259f95f1d1a71d9adf207543be8 | refs/heads/master | 2021-01-12T04:56:21.978658 | 2017-07-02T07:34:09 | 2017-07-02T07:34:09 | 77,812,125 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 985 | py | chapter_5.py | # in-text exercises
def a_function():
print("oh hi")
def do_n(obj, n):
if n <= 0:
return
obj()
print(n)
do_n(obj, n-1)
# do_n(a_function, 4)
# Exercise 5-3
def check_fermat(a, b, c, n):
if n > 2:
if a ** n + b ** n == c ** n:
print("Whoa, Fermat, dude")
els... |
094a5655a91977285df69200924221497d709df9 | fb5a6b0085db64f7a1e718b00e8f6e7ea8b5bc97 | /Simulator.py | a80189a33f01222774280c727f0ce03d21582234 | [] | no_license | pbcanfield/SynapseModeller | a50896159a6d8dd0d5c968ac8cdab4c7e9b1c16f | f065943702bbb9163daea6bb0a6aaf24c4dac8e2 | refs/heads/master | 2022-12-03T21:19:57.786842 | 2020-08-18T20:52:14 | 2020-08-18T20:52:14 | 280,243,553 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 7,534 | py | Simulator.py | from neuron import h
from sys import platform
import os
import json
import numpy as np
from importlib import reload
class Simulator:
#Cell parameters.
resting = -61.1 #mV
tstop = 400 #ms
#netstim parameters.
stim_number = 12
stim_interval = 12
stim_start = 100
membrane_potential = [... |
fb9a4fbd59f498f5f4de2b984f0d07967b54ad96 | e566f4e64f986128191e758af61492b64dae9e39 | /mystagram/models.py | 92f611988e32a989af7c484b206f28a9b3f47f0f | [] | no_license | Wanghit/mystagram | 8a07e4d5cfca09b2d0b318fd4f2c45b91e5aa225 | aefeb42853eab5dc732b02092ce3065f11db6ca3 | refs/heads/master | 2021-01-22T06:02:12.561324 | 2017-05-31T10:41:58 | 2017-05-31T10:41:58 | 92,517,404 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,689 | py | models.py | # -*- encoding=UTF-8 -*-
from mystagram import db
from datetime import datetime
import random
class User(db.Model):
id=db.Column(db.Integer,primary_key=True,autoincrement=True)
username=db.Column(db.String(80),unique=True)
password=db.Column(db.String(32))
head_url=db.Column(db.String(256))
images=... |
623e38f6a7264075f2969eab9fde475e2fdd995a | cefbacf23cd3e7e1afa74ed4a58166e392f947dd | /html_parser.py | a685a1e7219c9acf978ada72327aa2aa913ee1b4 | [] | no_license | FreeA7/startupCompanyInfoCraw | e1f4d0d34e00f97facdfe953c1dd62934b1326ae | 1915f63641e247d12ba4d2f28b321c6e7782ae0b | refs/heads/master | 2021-01-25T08:19:47.088822 | 2017-06-08T14:12:59 | 2017-06-08T14:12:59 | 93,756,279 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 11,215 | py | html_parser.py | # -*- coding: UTF-8 -*-
from bs4 import BeautifulSoup
import re
import urllib.parse
class HtmlParser(object):
def _get_fir_urls(self,page_url,soup):
new_urls = set()
#中转页:https://www.itjuzi.com/investevents/15746 (1~无穷)(数字是结尾,去掉重复的)
links = soup.find_all('a',href = re.compile(r"http... |
39c1c1cbfbb8b1fb3575bc5a384a018b7352443c | 24125555e39be056998e3e64ab5da692a9d4f2d2 | /gitlab/idfa/idfatracker/worker.py | ccbe46694bef9fd3834f165a184a1d9c59c74a9f | [
"BSD-2-Clause"
] | permissive | ExpLife0011/wk15-18 | 7ee9f228dcfaff9453dec2f3cde00e0ff37cb076 | 9c68c92d879b129d0998c0927af76f3902044c6e | refs/heads/master | 2020-03-15T20:07:05.936062 | 2018-05-05T07:49:01 | 2018-05-05T07:49:01 | 132,325,410 | 1 | 0 | null | 2018-05-06T09:44:44 | 2018-05-06T09:44:44 | null | UTF-8 | Python | false | false | 5,916 | py | worker.py | # -*- coding: utf-8 -*-
from __future__ import (absolute_import, division, print_function,
unicode_literals)
from gevent import monkey, get_hub
from gevent.hub import LoopExit
monkey.patch_all()
import signal
import gevent
import gevent.pool
from rq import Worker
try: # for rq >= 0.5.0
fro... |
bd689fbaf05fc7a927d575b77d8a75f5c8949239 | 1be14eb2a95896a33e9b6ba2b9da29c58d260a35 | /Softphone/models.py | a31106f3bac26d89b058f1be4f5633d69d8ead8c | [] | no_license | sharmasachin10/softphone_django | ca55f7a671e775fed8b7c897c048f552d4e47107 | bfc329d89943ae128770cee19151ae16b1af7f78 | refs/heads/master | 2022-12-13T21:17:01.482610 | 2019-11-14T11:38:15 | 2019-11-14T11:38:15 | 219,959,134 | 0 | 0 | null | 2022-12-08T06:50:11 | 2019-11-06T09:27:13 | HTML | UTF-8 | Python | false | false | 3,210 | py | models.py | from django.db import models
from django.contrib.auth.models import User
# start TimeStamp #
class TimeStamp(models.Model):
"""Base class containing all models common information."""
created_at = models.DateTimeField(auto_now_add=True, null=True)
updated_at = models.DateTimeField(auto_now=True)
class... |
0bc5d025051dd5b83104c9ef23db4e2ee34817bb | 66c3e74e76248583e9ee5e79574e434b95c10172 | /tests/test_examples.py | 2d00d330792772f51910c8522a91c04effa92bbb | [
"Apache-2.0"
] | permissive | bowuL/cool | 36a2c82de1077a2ceec8f41dfe6f5336811e077b | ea3cf8cc712a5a3700c3d8a0d1ac8d733c34ef61 | refs/heads/master | 2023-05-09T03:54:13.161584 | 2021-06-01T06:07:19 | 2021-06-01T06:07:19 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,057 | py | test_examples.py | import os
import re
import sys
import subprocess
import tempfile
from pathlib import Path
def check_examples():
from cool import F
readme = Path(__file__).absolute().parent.parent / "README.md"
sources = readme.read_text(encoding="utf8")
current_cwd = os.getcwd()
with tempfile.TemporaryDirectory(... |
d0e3668080c5a30499e1501fedec7eb4f8cc3494 | 2f24871ed5abc8b0ebd862a99dde4339bafbfad9 | /moveit_planners/test_configs/prbt_moveit_config/launch/demo.launch.py | e1a77e5207fb7c5173e24376e42abce84f724191 | [
"BSD-3-Clause"
] | permissive | ros-planning/moveit2 | b3c01ac1197a302d4ee834f9addfde754a2b07e9 | 47d92ef973680aea1badd6cc6080598f040a89f4 | refs/heads/main | 2023-09-04T08:32:28.333482 | 2023-08-24T15:44:29 | 2023-08-24T15:44:29 | 170,893,393 | 680 | 445 | BSD-3-Clause | 2023-09-14T17:23:51 | 2019-02-15T16:17:11 | C++ | UTF-8 | Python | false | false | 7,632 | py | demo.launch.py | import os
import yaml
from launch import LaunchDescription
from launch.actions import DeclareLaunchArgument
from launch.substitutions import LaunchConfiguration
from launch.conditions import IfCondition, UnlessCondition
from launch_ros.actions import Node
from launch.actions import ExecuteProcess
from ament_index_pytho... |
5e95d6de68b1fdc8cd1c2a5930d08db0b4a2eac4 | 32582711c9106e852205d007acdcc0055cff814a | /BlogPage/urls.py | b4f41f4d97b7c406b8123f8acb4e20bbb2eab192 | [] | no_license | Kanharajput/Courses | ebdac69a4d866fa7e804057836aefc98ce5b312e | d44c316b98f69aede708a04d3ea0cf3f897dd1eb | refs/heads/main | 2023-05-26T10:32:29.004082 | 2021-06-10T07:35:03 | 2021-06-10T07:35:03 | 312,973,661 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 418 | py | urls.py | from django.contrib import admin
from django.urls import path
from . views import AllBlogs, DetailBlog, LikeView, DislikeView
urlpatterns = [
path('BlogHome', AllBlogs.as_view(), name = 'blogs'),
path('article/<int:pk>', DetailBlog.as_view(), name = 'article-detail'),
path('like/<int:pk>', LikeView,... |
5c5909ece327c3e9914aa36e2b7f7dccfd182d13 | 0987f31e64bcacb41ba3a1e20054d7b8ac0d7346 | /practice/algorithm_datastructure_for_programming_contest/416_DPL_1_B.py | 4bb49e13ac1195290aa96b3c64c617608bbe9682 | [] | no_license | masakiaota/kyoupuro | 81ae52ab3014fb2b1e10472994afa4caa9ea463b | 74915a40ac157f89fe400e3f98e9bf3c10012cd7 | refs/heads/master | 2021-06-27T04:13:52.152582 | 2020-09-20T03:21:17 | 2020-09-20T03:21:17 | 147,049,195 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,021 | py | 416_DPL_1_B.py | # https://onlinejudge.u-aizu.ac.jp/courses/library/7/DPL/1/DPL_1_B
# 王道のナップサック問題
# 解説は螺旋本で十分わかりやすい
# また、けんちょんさんの記事もわかりやすい
# https://qiita.com/drken/items/a5e6fe22863b7992efdb#%E5%95%8F%E9%A1%8C-2%E3%83%8A%E3%83%83%E3%83%97%E3%82%B5%E3%83%83%E3%82%AF%E5%95%8F%E9%A1%8C
# 実装の都合上本とは少しだけ変えて実装する
# items (N,) ,i番目の品物の価値と重さが記... |
39e9d504df330ae64303b55e89d4cba89ef25dfa | 83426fd7972733709d2ff42b95118b9d396991cc | /bizzit/models.py | 043cbd087b746c508455c25d421c48ae96ec2167 | [] | no_license | SidharthDNaik/CSE-183-bizz-it | 2c894a97de746d5bfc156bf7dbcaf3bf047b88e9 | 916eac8b6268e8e14cbdabb2858de4da0a83a1a3 | refs/heads/master | 2023-06-03T10:35:39.271488 | 2021-06-08T06:41:31 | 2021-06-08T06:41:31 | 370,845,962 | 0 | 1 | null | null | null | null | UTF-8 | Python | false | false | 2,238 | py | models.py | """
This file defines the database models
"""
import datetime
from .common import db, Field, auth
from pydal.validators import *
def get_user_email():
return auth.current_user.get('email') if auth.current_user else None
def get_user_first_name():
return auth.current_user.get('first_name') if auth.current_us... |
6444bce3bf50edde6c134d8de04989bda12e9865 | 3a4e44fa2eba36d88d65c4ad7b00166bd2a8cf3f | /migrate.py | c751aa375ab932a5075cee795297f15255bacb4a | [
"MIT"
] | permissive | max-lobur/confluence2zendesk | 359c8920532003d52c45b1a6ab62b1a5943d876e | e0120f0c1330a91510d596f6c180a5446e43e2a6 | refs/heads/master | 2021-01-23T08:10:12.365541 | 2017-03-29T09:13:03 | 2017-03-29T09:13:03 | 86,479,772 | 6 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,104 | py | migrate.py | #!/usr/bin/env python3
import sys
import json
from common import confluence, zendesk, CREATE_AS_DRAFT
def migrate(target_section_id, article_id):
mode = "view"
try:
confl_article = confluence().get_page_by_id(
article_id, expand="metadata.labels,body.{}".format(mode))
except json.JSOND... |
457a6e8400ac59de15b8254a139d4a557d38967b | e6cc6a80e220ad7d2877bdda7a11181e54aa9f9d | /m04_TestStateDetectionGUI.py | 9ed5c87d5f9b3f9f376d5d63668d040cba68ebec | [] | no_license | OrtnerMichael/MID | a20f24cecaaaf6a661602f3969912d9c8e382cd9 | fbd51f9714272fc516df292ae8334b00fe243f79 | refs/heads/master | 2022-07-26T16:53:25.110697 | 2020-05-13T09:15:52 | 2020-05-13T09:15:52 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 3,570 | py | m04_TestStateDetectionGUI.py | import numpy as np
import tkinter as tk
import threading
from tkinter import messagebox as tkMessageBox
from m96_visualization import IDriveVisualizer
from m97_sensorCom import readSensor, getXMCserialConnection
from m99_BfieldSimulation import simulateField13V as simulateField
from m00_Config import CONFIG
... |
ad4dfc8f0a083bab979008413c614935f757f8b6 | 39422acf98c117d80aa2f5ab40ecd24da8f8d349 | /segmentation.py | ed92213bfa92f1b18b99aa340c4eae5a204ecf8d | [] | no_license | Fuminides/TFM--Mercados | ef3ce8e0866ffd2e2d79087a530e592703d24aed | 61bda9b6964a228bfae52ef7a098c24627ac01f8 | refs/heads/master | 2021-09-16T19:24:42.930127 | 2018-06-24T00:45:19 | 2018-06-24T00:45:19 | 117,273,170 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 13,242 | py | segmentation.py | # -*- coding: utf-8 -*-
"""
Created on Tue Jan 16 12:17:59 2018
@author: Javier Fumanal Idocin
"""
import numpy as np
import random
import progressbar
from joblib import delayed, Parallel, cpu_count
from clustering import extract_features
def _num_after_point(x):
'''
Given a float number x, it returns the nu... |
addd202fad6cebc31a7659b608c399dd5044a747 | cfc3fa658f826d02308453e557d82758895399c2 | /datasets/scifact/scifact.py | 295c1f891a53d39547a0b9dd5597789bf6836c28 | [
"Apache-2.0"
] | permissive | meehawk/datasets | cac530ec0e17514c01cdff30302521d6303ed93b | b70141e3c5149430951773aaa0155555c5fb3e76 | refs/heads/master | 2023-03-29T12:51:54.700891 | 2021-04-08T17:22:53 | 2021-04-08T17:22:53 | 355,996,122 | 9 | 0 | Apache-2.0 | 2021-04-08T17:31:03 | 2021-04-08T17:31:02 | null | UTF-8 | Python | false | false | 7,329 | py | scifact.py | """Scientific fact-checking dataset. Verifies claims based on citation sentences
using evidence from the cited abstracts."""
from __future__ import absolute_import, division, print_function
import json
import os
import datasets
_CITATION = """\
@inproceedings{Wadden2020FactOF,
title={Fact or Fiction: Verifying S... |
1593244c943ac8f879c4472dc1124d03377621d1 | 05d05dd004b942872cdd93d88b0a0563daf7e6ee | /0008/address_book2.py | 990d91dba8e1445b8156480605fb4541296b7f90 | [] | no_license | shirley5229/show-me-the-code | c5fb9a6fae71ce4d923ae19b1cfe52bc0cfc8f9c | a8e1e3b39ba3a6843d2b5411251515fccbda7233 | refs/heads/master | 2021-10-25T06:11:40.386268 | 2019-04-02T01:21:31 | 2019-04-02T01:21:31 | 118,093,565 | 0 | 0 | null | 2018-01-19T07:40:18 | 2018-01-19T07:40:18 | null | UTF-8 | Python | false | false | 773 | py | address_book2.py | #coding=utf-8
import argparse
parser=argparse.ArgumentParser(description='address book test.')
parser.add_argument('action',choices=['show','add'],default='add',help='add or show address.')
parser.add_argument('-n','--name',help='Name of your friend.')
parser.add_argument('-p','--phone',help='Phone num of your friend... |
35ebe7c46b2ecdbd5b024feee24f2f710221190c | 6cd6dcd9305ceaf0094355621a28c7d8245ceff8 | /examples/basics/model/long_run_bpmn_example_test.py | 90df5fe897ad3678f80db7c62d7114980771ccb6 | [
"MIT"
] | permissive | fladdimir/casymda | c5e09fa40926b0bd1f708d4910521749dc9eb667 | 1ac390c8d2f049f25c2d7a6a82750874c218d9b8 | refs/heads/github | 2023-04-08T12:45:11.541761 | 2023-03-27T19:04:07 | 2023-03-27T19:04:07 | 248,068,077 | 39 | 9 | MIT | 2022-01-04T23:38:31 | 2020-03-17T20:35:57 | Python | UTF-8 | Python | false | false | 622 | py | long_run_bpmn_example_test.py | """sample model execution"""
import examples.basics.model.bpmn_example_model as model_module
from simpy import Environment
def test_simple_run():
"""run model"""
env = Environment()
model = model_module.Model(env)
model.source.max_entities = 10 ** 3 # increase for higher runtime
model.source.int... |
326a3464ed7e12aa5cca76ac920c417161f68a9e | 1ab7b3f2aa63de8488ce7c466a67d367771aa1f2 | /Ricardo_OS/Python_backend/venv/lib/python3.8/site-packages/pandas/tests/series/methods/test_between_time.py | e9d2f8e6f1637c80786e927c4af44ba39cb4fca4 | [
"MIT"
] | permissive | icl-rocketry/Avionics | 9d39aeb11aba11115826fd73357b415026a7adad | 95b7a061eabd6f2b607fba79e007186030f02720 | refs/heads/master | 2022-07-30T07:54:10.642930 | 2022-07-10T12:19:10 | 2022-07-10T12:19:10 | 216,184,670 | 9 | 1 | MIT | 2022-06-27T10:17:06 | 2019-10-19T09:57:07 | C++ | UTF-8 | Python | false | false | 5,086 | py | test_between_time.py | from datetime import datetime, time
from itertools import product
import numpy as np
import pytest
from pandas._libs.tslibs import timezones
import pandas.util._test_decorators as td
from pandas import DataFrame, Series, date_range
import pandas._testing as tm
class TestBetweenTime:
@pytest.mark.parametrize("t... |
4dc6a9750d071f9484d876d376838eff0d5b0edd | f1364645e43b60c05b746083981e5c7f169702ba | /lib/indicator.py | 64a1be57a3a32da0f4746d90e99bdd2dfcf2bb83 | [] | no_license | geniustom/AI_Trading | bf41b946abe1f431a98078878d4b5f28a9a0d5c3 | 8c21d966053d64a224dc6b277ac9a33c576134ea | refs/heads/master | 2020-05-29T18:35:43.400029 | 2020-03-28T21:11:09 | 2020-03-28T21:11:09 | 189,305,491 | 2 | 0 | null | null | null | null | UTF-8 | Python | false | false | 54,157 | py | indicator.py | # coding=UTF-8
import numpy as np
class indicator:
def __init__(self):
self.name=""
self.data=np.array([])
self.count=0
class indicatorGroup:
def __init__(self):
self.ids=[]
#self.names=np.array([])
self.len=0
def get(self,dname,list_type... |
30d8d7d7257f2877270f5cb987105dbb386fd550 | bacf977955dae587d386311c7fc9301dccd56429 | /src/fabricflow/fibc/app/fibcapi_test.py | 9c656f71cc7cc578a529caf691e4faad8b620e1a | [
"LicenseRef-scancode-unknown-license-reference",
"Apache-2.0"
] | permissive | JalenLin/beluganos | e20d4dbf8231438a2512a165edc61d3f391f2a30 | 718612ac67dd3cb7569fa47250ba094286d4054b | refs/heads/master | 2020-04-17T03:36:56.165756 | 2018-08-30T09:59:58 | 2018-08-30T09:59:58 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,954 | py | fibcapi_test.py | #! /usr/bin/env python
# -*- coding: utf-8 -*-
# Copyright (C) 2017 Nippon Telegraph and Telephone 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/l... |
15f49e1b6c2b4e70673eaa63c8414d80b93f56ff | be96a4fb4011c1c65d9a368a0efc94408d62b111 | /dinomic.py | d2c1c6ee53dafb51142cb172c7681ddb53e43a12 | [] | no_license | youknowone/dinomic | 629355810126566b17051bfc70ca3191b9837fe3 | 301cd751def0f0ad972f7db62ad99702b25bc496 | refs/heads/master | 2021-01-10T01:09:10.529658 | 2016-01-08T23:59:54 | 2016-01-08T23:59:54 | 49,303,436 | 2 | 0 | null | null | null | null | UTF-8 | Python | false | false | 883 | py | dinomic.py |
"""Dinomic injects dynamic invocation handler for python object when attributes
are not accessible.
"""
class MetaDinomic(type):
"""This is a metaclass. Use `Dinomic` for normal subclassing."""
def __init__(cls, *args, **kwargs):
def getattribute(self, name):
sup = super(cls, self)
... |
47be007535fa8236e1db3ff39bc1980336cd9140 | 6fa59de63ad9e4dea93b92866c3f6e111a5069e9 | /users/models.py | 718446aaf7082364ebcd0889c5164839b0eda440 | [] | no_license | stabone/papillon | 6f5c45e5be4af3961b341ec5863da4e6c5e065a6 | 9e5b402f70b9c85ca9ceb27674412b2cb105dda1 | refs/heads/master | 2020-04-30T01:37:18.149375 | 2015-01-18T16:19:23 | 2015-01-18T16:19:23 | 14,810,812 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,741 | py | models.py | #-*- coding: utf-8 -*-
from django.db import models
from django.conf import settings
from django.contrib.auth.models import BaseUserManager, PermissionsMixin, AbstractBaseUser
# https://docs.djangoproject.com/en/dev/topics/auth/customizing/
def handle_file_upload(instance, filename):
filename = "/users/{1}".form... |
da105f65ede1fefe02c5af9f0aa8687783b6e4ec | e75464d747d1170bb40d0a23e869bd378433b5b8 | /Radius_Map/Radius_Map_W.py | dd00988cd27f38833dcd68fb59c5adf3d445d549 | [] | no_license | DuanPandeng/Python | 383f2d7b0856bfe7145920e41a81c537a2ef0b51 | 475f37eab123108648aa88d5f6c38ef069fbbf62 | refs/heads/master | 2021-06-21T17:13:36.132390 | 2020-12-10T07:37:45 | 2020-12-10T07:37:45 | 164,551,292 | 0 | 1 | null | null | null | null | UTF-8 | Python | false | false | 4,387 | py | Radius_Map_W.py | # -*- coding: utf-8 -*-
import sys
from PyQt5.QtGui import QTextCursor
from PyQt5.QtCore import pyqtSlot, QObject, pyqtSignal
from PyQt5.QtWidgets import QDialog, QApplication
from Ui_Radius_Map_W import Ui_Dialog
from Radius_Map import *
class Dialog(QDialog, Ui_Dialog):
"""
Class documentati... |
ece3ef9235863b859eaf202f48271e823d4f8ff6 | 7bfcb30811ae883d1416760f8fad3a377e041aec | /project2/stage3/multitask.py | 78be23dc91533dd95f4c216866c6b81da263e899 | [] | no_license | hdecnu/cv_learning | 55e17cca47ef07e23bbc9aeeac2478a068dfff49 | 745be701cbd178895ab4fb23ad389209c2871b73 | refs/heads/master | 2020-06-16T00:52:07.645030 | 2020-02-10T10:34:27 | 2020-02-10T10:34:27 | 195,436,283 | 2 | 0 | null | null | null | null | UTF-8 | Python | false | false | 8,213 | py | multitask.py | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
Created on Fri Sep 6 13:09:07 2019
@author: chenxiahang
"""
import os
os.chdir('/Users/chenxiahang/Documents/pythondata/project1')
from Species_Network import *
import pandas as pd
from PIL import Image
from torchvision.transforms import transforms
from torch.utils... |
17fe87a52bf5769160ef9e8f6875b38d14c9a378 | c9c6a9822d5ead90b5493d4f108500f3f155cb2a | /code-challenges/spoj/ONP.py | 8a5fbb624616fe056f4fadf7149ab3344a75f77f | [] | no_license | abhimanyusahai/algorithm-puzzles | 118278db6503238a55c74633bca4c71c8068262f | ff9b5dbab1eedd325402752d717f532a083b0538 | refs/heads/master | 2022-05-23T09:49:34.042237 | 2019-05-01T12:30:27 | 2019-05-01T12:30:27 | 85,608,905 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 544 | py | ONP.py | num_cases = input()
ALPHABETS = map(chr, xrange(97, 123))
OPERATORS = ['+', '-', '*', '/', '^']
for i in xrange(0, num_cases):
usr_input = raw_input()
usr_input = list(usr_input)
operator_stack = []
answer = []
for j in xrange(0, len(usr_input)):
if usr_input[j] in ALPHABETS:
a... |
527461305c995e5faefbcc3cdf3b199821554d17 | 91c59e83ba6957d7cad8b5c610e8f4260a9e5037 | /FARMER/Farmer_Details/migrations/0004_auto_20210709_1819.py | 19e6c3665edee8e6fad57cd015eb2e4ed3bf682c | [] | no_license | ssohail706/farmer_poc | 60720df40892484048bed8f846560a529f971e5a | 529d1fb9890af6a481be4c5aa868c83478f74709 | refs/heads/main | 2023-06-15T23:40:04.320390 | 2021-07-10T08:09:32 | 2021-07-10T08:09:32 | 384,645,337 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 915 | py | 0004_auto_20210709_1819.py | # Generated by Django 3.2.5 on 2021-07-09 12:49
from django.db import migrations, models
import django.db.models.deletion
class Migration(migrations.Migration):
dependencies = [
('Farmer_Details', '0003_auto_20210709_1814'),
]
operations = [
migrations.AlterField(
model_name... |
680e2867e77604e8230106d7cf39531c74af2c99 | 5f2192058c67bfcd87b4b0c827c704a74ce0e2e1 | /src/FeedForwardNN/FeedForwardNet_2layer_single_output.py | 7dcce7df1d6409bb6243b72d1329fec839de57be | [] | no_license | bielim/MomentsToParams | a583eb5a32c9af8bd5caa0b25eda10998c235255 | 80a3dfde6f95b872901ff6226ec1fca2de764d14 | refs/heads/master | 2021-05-19T16:18:42.459960 | 2020-04-06T02:41:10 | 2020-04-06T02:41:10 | 252,021,851 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 8,582 | py | FeedForwardNet_2layer_single_output.py | # Import modules
import numpy as np
import random
import matplotlib.pyplot as plt
plt.rcParams.update({'font.size': 16})
from sklearn.model_selection import train_test_split
from numpy import genfromtxt # to read csv data file
import scipy.stats as stats
import time
import copy
from utils import zscore
# PyTorch
impo... |
0e9018676a2bef2b91cf20076425a0ca02505122 | 99d436394e47571160340c95d527ecadaae83541 | /algorithms_theory/ch6_sorting/6-4.py | 38dc23012b34ff590f6cb1d30f2e9d3ed1d58db7 | [] | no_license | LeeSeok-Jun/Algorithms | b47ba4de5580302e9e2399bcf85d245ebeb1b93d | 0e8573bd03c50df3f89dd0ee9eed9cf8716ef8d8 | refs/heads/main | 2023-03-02T06:47:20.939235 | 2021-02-08T05:18:24 | 2021-02-08T05:18:24 | 299,840,348 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,337 | py | 6-4.py | """
퀵 정렬 알고리즘(일반적인 형태)
- 평균 시간 복잡도 O(NlogN)
- 최악의 경우 시간 복잡도 O(N^2)
- 삽입 정렬과 다르게 데이터가 어느정도 정렬 되어있는 경우 느리게 동작
"""
array = [5, 7, 9, 0, 3, 1, 6, 2, 4, 8]
def quick_sort(array, start, end):
if start >= end: # 원소가 1개인 경우 종료
return
pivot = start # 첫 번째 원소를 피벗(pivot, 기준)으로 지정
left = start + 1
right =... |
fb1c8c282100cd8664720ff00b0a67692a1c64fc | 2ce54d148438db3235f2c414568ed3d6582c67fc | /books/migrations/0004_loan.py | 9a8ae468b4e873542da86b316ba2d58f1cf0b3fb | [] | no_license | rishabh-soni/Libray_Management_System | 7965092c3e4665ff07fee8d3f3677d53169ccb66 | abc0aca15f9ee799da10721911f6d4228e8ed79d | refs/heads/master | 2023-04-16T01:10:12.494835 | 2021-04-21T15:16:00 | 2021-04-21T15:16:00 | 358,249,441 | 1 | 2 | null | null | null | null | UTF-8 | Python | false | false | 917 | py | 0004_loan.py | # Generated by Django 3.1.2 on 2021-04-18 17:02
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('books', '0003_hold'),
]
operations = [
migrations.CreateModel(
name='Loan',
fields=[
('id', models.A... |
cde3aaca01de5676e24324e0962266e3b487d3a1 | fa9ecd0eb2138f18186139ad54327a1da12ef71a | /src/web-app/app/home/views.py | 8a8de0e9d19b6a7a7a00f07b39e66af3ce0870b9 | [] | no_license | CubyHebergs/CubyDock | ddf5af2e262905b41236955a8b20d8033d59f557 | 6bb46958f94f5c68805bb3c94d688067f2029d18 | refs/heads/master | 2021-08-17T11:55:52.245646 | 2021-04-16T08:09:48 | 2021-04-16T08:09:48 | 249,032,832 | 3 | 1 | null | 2020-06-06T20:00:23 | 2020-03-21T18:05:05 | JavaScript | UTF-8 | Python | false | false | 1,487 | py | views.py | from django.shortcuts import render
from django.http import HttpResponse
from django.contrib.auth import login
from app.tools.dpam.backends import PAMBackend
from core.system.stats_system import *
from django.core.cache import cache
from django.views.decorators.cache import cache_page
import datetime
# Create your view... |
f0a8653ea2c86c40ef90ea0d3ab0c46e8c2b26b2 | 310efb4a934f696cd764f342ca732d3c2f9239f0 | /study/basicstudy/一月/thread学习/全局锁.py | c1f2ee05aef74b4008163ad1c0ffdf705fdecb8a | [] | no_license | liaogguoxiong/study_python | 516283ad03e27fbe1aabf1063442ab2f4a8fce54 | 933d1a0097fc96cacfe9f931422935e6e19527ee | refs/heads/master | 2021-10-20T19:11:23.556093 | 2019-03-01T08:06:36 | 2019-03-01T08:06:36 | 169,345,091 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,001 | py | 全局锁.py | # @Author :lgx
# @Time :2019/2/18 22:28
# @File :全局锁.py
'''
多线程执行的时候,公用一个数据的话
可能会造成数据错误.比如2个线程调用一个
全局变量,第一个线程没有返回全局变量,第二个
线程就开始调用全局变量,调用的是最开始的变量,
而不是第一个线程返回的变量,可能会导致出错.
所以需要一个锁来把变量锁住,别的线程调用的时候,
另外的线程不得调用
'''
import threading
num=0
t_list=[]
glock=threading.Lock() #声明全局变量锁
def add_num():
global num ... |
059bfa1c1083eac4c5cf895bc63334822151c6be | 07d51f18d768891e2f935e5549b4b375cbfde6c8 | /landshark/model.py | 15cf98ce4cb82e0bfaea2c32a6226f9658ea6212 | [
"Apache-2.0"
] | permissive | skiptoniam/landshark | 75f046515faeb875e7a2a78953cb37bbf69b6f1a | 336b3a00942db0a30f4cc3a8dc89fb9de80575ee | refs/heads/develop | 2020-08-01T10:39:59.613190 | 2020-02-12T22:13:45 | 2020-02-12T22:13:45 | 210,970,978 | 0 | 0 | Apache-2.0 | 2020-02-12T22:13:46 | 2019-09-26T01:14:47 | null | UTF-8 | Python | false | false | 6,514 | py | model.py | """Train/test with tfrecords."""
# Copyright 2019 CSIRO (Data61)
#
# 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 appl... |
4cd21dcbe85653e0c5f40a1b6324b099cb4b9fae | a1e858add7eff145860e5d4ec072ab0179ab1ffe | /tets.py | 978ff2e611cf81cd57e310ba8647717793538d5d | [] | no_license | aduanfei123456/asyncio-spider | e5543e416b90ec320cc7c4ce767245b4452754f8 | 8915ab5e3724f415eedac739b6644a555df801e2 | refs/heads/master | 2021-01-18T19:16:04.416204 | 2017-04-07T00:41:05 | 2017-04-07T00:41:05 | 86,894,855 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 5,458 | py | tets.py | import asyncio
import pymysql
import aiohttp
from spider.utilities import make_random_useragent
from selenium import webdriver
from spider import concur_async
import logging
from bs4 import BeautifulSoup
import re
import requests
import random
proxy_l=["36.42.33.13:8080","211.75.72.49:80","120.3.55.174:8998"
,... |
331070f3b66840f3fb06321a056d7eb457fbca27 | e03bce53de6f88c0e09f56e4fe11c36af0f1161f | /runway/config/models/utils.py | bf5632d22590cf46c2ef958d45bcc3c30e3ed363 | [
"Apache-2.0"
] | permissive | onicagroup/runway | 20c31df9cbc1a1ffc5c9aa468ce5cf7d6ac7899f | 0763b06aee07d2cf3f037a49ca0cb81a048c5deb | refs/heads/master | 2023-08-30T22:35:54.113981 | 2023-08-29T14:13:35 | 2023-08-29T14:13:35 | 122,529,924 | 156 | 79 | Apache-2.0 | 2023-09-13T13:43:50 | 2018-02-22T20:12:55 | Python | UTF-8 | Python | false | false | 920 | py | utils.py | """Runway & CFNgin config model utilities."""
from __future__ import annotations
import re
from pathlib import Path
from typing import Any, Optional
CFNGIN_LOOKUP_STRING_REGEX = r"^\${.*}$"
RUNWAY_LOOKUP_STRING_ERROR = ValueError("field can only be a string if it's a lookup")
RUNWAY_LOOKUP_STRING_REGEX = r"^\${.*}$"
... |
481034554b37d09157b7203b9946e93b7e1d4a40 | ad9ae83be9d001cd58b88e8add032bc3333ccf76 | /task.py | 2e71c1d7e8d94d933a241a611ae7e7f214a6e06f | [] | no_license | Dm1tryD/task_1 | e856859d5936ba94deb57dd45ae7bb5c1b5318a0 | 713a12b8d57e46c764b4a68554011e7c0380f95e | refs/heads/main | 2023-03-23T00:41:52.416359 | 2021-03-21T20:00:58 | 2021-03-21T20:00:58 | 350,099,980 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 197 | py | task.py | def slice_less(my_list, lesser):
return sorted([num for num in my_list if num > lesser], reverse=True)
my_list = [234,999,51,5,1,5124,52,15,9,24,1,42]
foo = slice_less(my_list, 55)
print(foo)
|
066b4c869657293a3b0874b67679fcd9d7edac52 | fbd30376f0f3666c20761951404eb88cb69dad9a | /src/shortener/views.py | 183f18f9e6313451067253a2f81edf3410d55efa | [] | no_license | MauroBaJ/URL_Shortener | 16dacf4864dfee0ee1958aa0e6fe8e92909956e3 | c7cf78cb2573b6cd24274a5691754d7ad7833f02 | refs/heads/master | 2022-11-24T03:45:54.795756 | 2020-07-26T19:02:39 | 2020-07-26T19:02:39 | 282,714,355 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 425 | py | views.py | from django.shortcuts import render
from django.http import HttpResponse
from django.views import View
# Create your views here.
def FRV(request, *args, **kwargs): #Function Redirect View
print(args)
print(kwargs)
return HttpResponse("Hello")
class CRV(View): #Class Redirect View
def get(self, reques... |
90780413ac3b23acefee6fdbfc9c14bf0412ee16 | 127823b86891c09f1a2bf66eeaf393f26d78fc2f | /pso-pyswarms/example.py | 8398c2998ca19f51d05435ddece6edbac8bdb8aa | [
"MIT"
] | permissive | marcelovca90-inatel/C210 | 48bac936323cccbd0670c49704f51f65d5c4e34a | 44ee47041212c409ab908ddeef7a81a7f076cca8 | refs/heads/master | 2022-09-10T22:57:32.863862 | 2020-05-25T17:32:46 | 2020-05-25T17:32:46 | 255,704,421 | 3 | 1 | null | null | null | null | UTF-8 | Python | false | false | 2,208 | py | example.py | # Import modules
import numpy as np
import matplotlib.pyplot as plt
from IPython.display import Image
# Import PySwarms
import pyswarms as ps
from pyswarms.utils.functions import single_obj as fx
# Set-up hyperparameters
options = { 'c1': 0.5, 'c2': 0.3, 'w': 0.9 }
# Call instance of PSO
# https://pyswarms.readthedo... |
f642af53f651c07d6f8553af11db02cbe642dca2 | c2a00676b9ccf7d258e04b2918cce945283bce4c | /occ/occ/reduction/read.py | 0b9d692a61d00b2e511a2d14f764927e9c4c7d9d | [] | no_license | robwalton/occmodeler | 1147488fd40b8005adc549435ead8084e71f0619 | e535447a786508b0c04e491b417f9772ef03a415 | refs/heads/master | 2020-04-29T03:27:49.597972 | 2019-07-15T13:16:25 | 2019-07-15T13:16:25 | 175,810,584 | 3 | 0 | null | null | null | null | UTF-8 | Python | false | false | 4,645 | py | read.py | import pandas as pd
#%% Read and filter data
NODE_TYPES = ('place', 'transition')
def read_raw_csv(filename):
return pd.read_csv(filename, delimiter=';')
def read_tidy_csv(filename, node_type, filter_name_list=None, drop_non_coloured_sums=False):
"""
Reads a csv file created by spike with columns name... |
de8f63116a8bd933402c1b01f52fa1e7baf1c660 | 6587ba66a15232fa1423d2830ae4438eb2fdace9 | /Caracteristqiue/models.py | 250b0716efb44b5a866dac22821f4d144dc56128 | [] | no_license | abdouss/projetFrance | 56445c4e4295e9092125e73628b2e79f0e5c7ac2 | ffcafa481d96357d27ec53e27a7bc919dc66d05b | refs/heads/master | 2021-01-03T23:30:53.617524 | 2020-02-13T14:41:58 | 2020-02-13T14:41:58 | 240,282,581 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,521 | py | models.py |
# Create your models here.
from django.db import models
from django.conf import settings
from django.urls import reverse
# Create your models here.
User = settings.AUTH_USER_MODEL
class Pam(models.Model):
user =models.ForeignKey(User,on_delete=models.CASCADE)
i... |
c07daa72eac49e30af47346589494162aec115ad | ac1d1375c5e514975d3b5299d289973dfdbc2a6f | /cmpstr.py | 53b1245014421525d9c42c500abf1fb554476278 | [] | no_license | Kalaiselvan1503/Guvi1 | 00ba50e5f206a16e1306ef3cc3c9d74456d6ad35 | bb0819f0c9be89ef2862b78f4d5afb7ab81e2c29 | refs/heads/master | 2020-04-15T21:28:34.970689 | 2019-07-09T14:31:04 | 2019-07-09T14:31:04 | 165,033,717 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 117 | py | cmpstr.py | #Kkscasesens
x,y=input().split()
if len(x)==len(y):
if x==y:
print("yes")
else:
print("no")
else:
print("no")
|
bd49d0b161c002a105bf7e879b74ec196ef7ec2f | 570ec11cac2901190c60fdbdefee70fcf6811913 | /initdb.py | 6ae1c7032e8586d983e322fe15a59a8f60f7a338 | [
"MIT"
] | permissive | emcconkey/aws-cost-tracker | 7e98bbb47097822d1fb643395026fd561d3ee877 | ad556bb177db8855b7a7ceaf2c8b4819ddf6ef4a | refs/heads/master | 2020-09-08T11:20:53.716231 | 2020-03-09T20:28:53 | 2020-03-09T20:28:53 | 221,118,794 | 0 | 2 | MIT | 2020-03-09T20:05:11 | 2019-11-12T03:07:58 | Python | UTF-8 | Python | false | false | 616 | py | initdb.py | #!/usr/bin/env python3
import sqlite3
db = sqlite3.connect('costdata.sqlite')
cursor = db.cursor()
cursor.execute('''
CREATE TABLE tracking(
id INTEGER PRIMARY KEY AUTOINCREMENT,
date TEXT,
account TEXT,
product TEXT,
... |
e1a80fb420ec676201a6b1391691475e90a35560 | d00645023ac75b4b198dc6b74e22a387bbf37cc3 | /Dynamic Programming/lcs1.py | 8c785609db44f9051936e7f0173c21ae13a3b34e | [
"MIT"
] | permissive | aadityachapagain/Descent_py | a2b7650c4346f6c196e0e5d5a21b431aef15378a | 61e61588f83aca98b74e93a5865ef1aca0726746 | refs/heads/master | 2022-12-13T06:56:55.917040 | 2020-08-19T11:18:40 | 2020-08-19T11:18:40 | 156,497,145 | 2 | 1 | MIT | 2022-12-08T06:00:46 | 2018-11-07T05:56:31 | Python | UTF-8 | Python | false | false | 1,734 | py | lcs1.py | """
Problem Defination
LCS Problem Statement: Given two sequences, find the length of longest subsequence present in both of them.
A subsequence is a sequence that appears in the same relative order, but not necessarily contiguous. For example,
“abc”, “abg”, “bdf”, “aeg”, ‘”acefg”, .. etc are subsequences of “abcdefg... |
10b368b8e2bfcb8842bb65dae32c0a51dc310459 | 55838d43d4094ab15b97b9d57ad5b0d08173db3d | /zmon_worker_monitor/web_server/web.py | 1752dc280e03dad7914c6cc20e5a1820cbc3da9b | [
"Apache-2.0"
] | permissive | mikkeloscar/zmon-worker | 31f924dfecdcc9b23e76d08b0614c2d1948de999 | 7a440190db2c1f2ee4ba246953e559e4522ad6ac | refs/heads/master | 2020-12-24T05:03:58.078863 | 2020-01-17T10:19:55 | 2020-01-17T10:19:55 | 237,391,300 | 1 | 0 | NOASSERTION | 2020-01-31T08:43:46 | 2020-01-31T08:43:45 | null | UTF-8 | Python | false | false | 1,586 | py | web.py | #!/usr/bin/env python
# -*- coding: utf-8 -*-
"""
Logic for a basic HTTP server (flask app). This code will most likely be run in a separate process.
We expose several HTTP endpoints that return information about the operations of zmon-worker processes.
This app obtain information on the operation of zmon-worker by q... |
541bdd806f1153eb6c2437f6812bcd18c15623cf | 87ddcf61c2faaaa795b9c25af334a76018337f62 | /frictionless/actions/transform.py | 159f86ee2fc93f21887c433ae4b6fb56e77167dd | [
"MIT"
] | permissive | frictionlessdata/frictionless-py | 17d663ad34c18964113c97e4d657004610fe0df0 | 740319edeee58f12cc6956a53356f3065ff18cbb | refs/heads/main | 2023-08-26T16:24:25.353929 | 2023-08-04T07:55:37 | 2023-08-04T07:55:37 | 28,409,905 | 295 | 79 | MIT | 2023-09-04T05:01:33 | 2014-12-23T17:11:11 | Python | UTF-8 | Python | false | false | 1,445 | py | transform.py | from typing import Any, List, Optional, Union
from ..exception import FrictionlessException
from ..package import Package
from ..pipeline import Pipeline, Step
from ..platform import platform
from ..resource import Resource
def transform(
source: Optional[Any] = None,
*,
type: Optional[str] = None,
#... |
c2ff7d5f57f36e041043854efe9ad10c925ccbf0 | 1d43d807b795ecd6884f24e05fd8a6dfb971774f | /engine.py | 767ab425b4fe55b6f802322f936645a58ad1d96d | [] | no_license | kazemnejad/inverted-pendulum | 3a1987fde4ff1fca4995369d38a27afe90bb1c07 | a017fe9e78058f39b22abf8254ca9ebdcdf87dc0 | refs/heads/master | 2021-01-10T08:48:41.280266 | 2016-01-24T07:28:33 | 2016-01-24T07:28:33 | 49,085,324 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 7,470 | py | engine.py | import logging
import os
import pickle
import random
import config
from actiontype import ActionType
from exception import OnExitException
from gui import GUI
from worldmodel import WorldModel
class Engine(object):
def __init__(self, enableAiPlayer):
self.gui = GUI(enableAiPlayer=enableAiPlayer)
... |
d9f150c0919bf1962a4c87f92c927ae3a12362e5 | 9ebb664ae2a778876d05e78ad8985816721e2706 | /Py_scripts/DB_1st_filter_standard.py | 7f87212bff800495ed87f7b88ab1ceedfa866d46 | [] | no_license | seongyeol-park/Human_Lineage_Tracing | dc35818b629a3960e93a485e60eee26b764ede30 | 5012529fee63fa3f64dc80b18ff0c9968a25b078 | refs/heads/main | 2023-06-03T20:25:41.662730 | 2021-06-22T07:57:37 | 2021-06-22T07:57:37 | 314,397,015 | 3 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,791 | py | DB_1st_filter_standard.py | #181106: rasm >=2 or pnn >=3 filter out
#181127: column_number_editing; location =='NA' passing as false; only include chromosomes in chr_list; varread < 3 filter out
#191013: copied from DB6_filter_1-3.py and edited column numbers
import sys
print(sys.argv[1])
in_file=open(sys.argv[1])
out_file=open(sys.argv[1]+'.fi'... |
a0e724388f458edf3dc5b4adff7f342678862b29 | 908369877953f517778ebb42b6f7745b7f410b85 | /tutorial/main.py | eebc8bddb3b3e54e96979eee371cdb0947e2a303 | [] | no_license | JoulesCH/PythonWeb | 7027d1ca1e2dfa61288e76ea81625310370823e9 | 595ba0cf7b2e84a689a9b5743c39b80636189cd9 | refs/heads/master | 2022-10-16T23:20:09.670934 | 2020-06-15T01:30:25 | 2020-06-15T01:30:25 | 271,905,207 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 989 | py | main.py | from flask import Flask
from flask import render_template, request
app = Flask(__name__)
@app.route('/')
def index():
name = 'Codi'
is_premium = False
course = 'Python Web'
courses = ['Python','Ruby','Java','Elixir']
return render_template('index.html',username = name,is_premium = is_premium,cour... |
ebb60ffe700c5f53c0edee2dafbbe1aaa76ff8de | e9f974a496cb8a64bedde785d1d553292f74ebef | /composition.py | 7073a748129305a3bfe99a6d4ff5ee284321046e | [] | no_license | jwsmithgit/chipifier | 8f3c00abb5a65af2683cea850b81b75b54a4a0dc | c7bda4ea76dcc4dfdda97b5ba8c855878979a169 | refs/heads/master | 2021-01-10T09:35:27.392454 | 2016-04-12T01:17:00 | 2016-04-12T01:17:00 | 53,228,732 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 6,831 | py | composition.py | '''
COMPOSITION class
a composition is a collection of notes for one instrument
'''
import numpy as np
import note
from note import Note
import scale
import utilities
import random
class Composition :
def __init__( self ) :
self.channel = 1
self.tempo = -1
self.notes = [ ]
self.scal... |
764cab8d9588f5bb99bf18627fee21161eed10d4 | 2da4873707475c01b849ee2049e89ff3bedb9cc7 | /data/data_prep_code/00_Labelled_Reviews_Prep.py | 2b793b731c437f5e90a2878e7ecd71d2f05b53ff | [] | no_license | LIANGZHILI/Opinion_Mining | 1146e90acad6a236950fc4393976ecd756104569 | be840d7cbe380f4fc9ba79f7ef0b84b0592b4788 | refs/heads/master | 2020-04-20T05:07:31.615853 | 2019-02-01T05:28:16 | 2019-02-01T05:28:16 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,106 | py | 00_Labelled_Reviews_Prep.py | import xml.etree.ElementTree as ET
import pandas as pd
import os
cwd = os.getcwd()
PATH = '/'.join(cwd.split('/')[0:-1]) + '/data/raw/'
NUM_REVIEW_THRESH = 300
OUT_FNAME = '/'.join(cwd.split('/')[0:-1]) + '/data/labeled_restaurant_data.csv'
# Parse & clearn labeled training data
tree = ET.parse(PATH + 'Restaurants... |
4c3e6fb54f2c7e35a82bc3146ca9a476a7b65ee6 | ba0f23468f6f236e136a714daef8e6fc0a364f61 | /Exercises/middle_11.py.py | 1d3ab52f7877a576a63c230b7732be34ad78cfd6 | [] | no_license | kyrilkhaletsky/CA117-Programming | 83fa07dfeecc62b8a13789130034b694cc911089 | 14abda9c296c65404d6545ce0268ef24f9f386fb | refs/heads/master | 2021-01-17T04:24:44.878671 | 2019-02-12T16:33:50 | 2019-02-12T16:33:50 | 82,944,616 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 216 | py | middle_11.py.py | import sys
def middle(s):
if len(s) % 2 == 0:
return "No middle character!"
else:
return (s[len(s) // 2])
def main():
s = middle(sys.argv[1])
print (s)
if __name__ == "__main__":
main()
|
71294eb2491668b11c2303fc2e9a34705bf324d4 | 0b8186bc13ce5ed5c4f3eb6b61251809078d7acd | /attribute_parser.py | 56454c19653c2aafeb4439aef7af9092d021f1a6 | [] | no_license | 0m-ax/kicad-pick-and-place-import | c28206f738f677be2b89019f87047b02e644539c | 23a8a143287b2bbc4e78b0525fe62c2c836d49d7 | refs/heads/master | 2022-09-17T09:25:38.910927 | 2020-06-02T18:04:19 | 2020-06-02T18:04:19 | 268,774,600 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 5,062 | py | attribute_parser.py | from enum import Enum
class AttriuteParser:
name = "parser"
def __init__(self,options):
super().__init__()
self.options = options
def parse_value(self,value):
raise NotImplementedError
class ParserPredictor:
def __init__(self,extractor,context):
super().__init__()
... |
3472f6008825befca135e48ebf706183c3b82ccc | f76e1fdb673d4799e226975bca8673a22d2a8769 | /vignettes/ThinkBayes/chapter5/mixture04.py | 83d9c2df05c308fe73c0ee1be76d5da915e128bc | [] | no_license | drachimera/DataScience | b49e021a9c1e21a538edabcb24d8a0ad63f12e2d | 7481a44322b859cacfdccb68c5efc11fc51f82b7 | refs/heads/master | 2021-07-05T04:08:22.902147 | 2020-09-01T21:49:25 | 2020-09-01T21:49:25 | 39,398,598 | 5 | 7 | null | 2017-06-05T00:16:51 | 2015-07-20T17:37:53 | null | UTF-8 | Python | false | false | 831 | py | mixture04.py | from __future__ import print_function, division
import sys
sys.path.append("../lib/ThinkBayes2/code/")
from thinkbayes2 import Suite, Pmf, SampleSum, MakeMixture
import thinkplot
from simulationDD02 import Die
pmf_dice = Pmf()
pmf_dice.Set(Die(4), 2)
pmf_dice.Set(Die(6), 3)
pmf_dice.Set(Die(8), 2)
pmf_dice.Set(Die(12)... |
f3041f6db4f6771f4afb04c7a2788e8269a79fee | 80b635bd84a73e1b1a66f68815b2bf44019e6dff | /arcade.py | c0bb5bf67dd9b2c1d35b5aa1e79e07bb42e36e63 | [
"CC-BY-3.0"
] | permissive | Dev-AviSingh/SpaceInvaders | fdd664ad9b83df30734ffc71ca9cf79903becf0e | 8076937e9956d090cee60c0f01009902ce31976f | refs/heads/master | 2020-07-03T03:42:10.681644 | 2019-08-12T06:45:53 | 2019-08-12T06:45:53 | 201,772,309 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 18,768 | py | arcade.py | import tkinter as tk
from threading import Thread
from time import time,sleep
from random import randint, choice
import math
from PIL import Image, ImageTk
import Constants
import Entities
class Box(object):
def __init__(self, x, y, width, height):
self.x = x
self.y = y
self.wi... |
a83c0da61aacd484a035116ed6840dcf300b3696 | ecfe4fa5d1aa18f42336e3cf1a717c8b826954aa | /proactive_messaging_process/scenario_tests/main.py | 6b49c6903a8f2a986e35e34ca2682027bcf6bc8b | [] | no_license | ucd-csl/HakeemBotCodeV3 | d610128c69bc110d6a0ef9088df1ed792dc7d2ce | 4f976cce0b4839cf17ba1d3cbced02c8bd06ca86 | refs/heads/master | 2022-12-09T14:08:25.540834 | 2020-02-20T22:51:04 | 2020-02-20T22:51:04 | 224,742,506 | 0 | 0 | null | 2022-12-08T02:10:47 | 2019-11-28T23:10:41 | C# | UTF-8 | Python | false | false | 67 | py | main.py | from scenario_tests import Unit
test = Unit.Unit()
test.run_all() |
e35466805de5d5c8285b05428bc960f57f74a133 | 634613ea960260d8b12fc7eedf1e9aede34171ce | /reinforcement_learning/utils/agent.py | 776e51949eb2cd393f79ec7d337e3830954957d9 | [] | no_license | maianumerosky/final-optimizacion | d7ba36db5a02bc26c6033a3fdff888b8a8db2fc5 | 1e24c298c9b97eda2c228185fd9f2f50e1f83780 | refs/heads/main | 2023-04-19T15:32:14.338158 | 2021-05-13T12:18:23 | 2021-05-13T12:18:23 | 364,209,477 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 330 | py | agent.py | import numpy as np
class Agent:
def __init__(self, policy):
self._policy = policy
def select_action(self, state, epsilon=0.):
if np.random.uniform() < epsilon:
return np.random.choice([0, 1])
distribution = self._policy.get_distribution(state)
return np.argmax(dist... |
4bcbbbfccb33c93154fed2aba22a559a5c937500 | 5c27d149f19e7b001caeaefed1539bebf448c8b0 | /virtualenvs/djangodev/Lib/site-packages/aldryn_forms/migrations/0007_auto_20170315_1421.py | 1090713e8b8fcde8c9f48499a72762c9d13d5b55 | [] | no_license | joanamarques/Django-website | 27853d4fbdc33e5559a6d052590a6025effbef4b | 0d30b5736e954ac03373d662d1e371c42c1dcd51 | refs/heads/master | 2022-10-07T15:34:57.217628 | 2018-01-10T10:32:31 | 2018-01-10T10:32:31 | 116,943,629 | 0 | 1 | null | 2022-10-01T11:41:55 | 2018-01-10T10:35:52 | Python | UTF-8 | Python | false | false | 6,256 | py | 0007_auto_20170315_1421.py | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('aldryn_forms', '0006_auto_20160821_1039'),
]
operations = [
migrations.AlterField(
model_name='emailfieldplugin'... |
6d0f9f5d338a5b8dae51a74ab4fe8d977065bb81 | 1d6174ab304954d78abda6011e6f2db0711e452e | /validation/validation.py | 19a301ab343fc6244c706fc836dadb615e735a9c | [] | no_license | vanicuo/MEG-inverse-UNet | 6df7d2fa20a1aa74dc557355a2ca03dee5488d94 | 007fa78fc88fbcc52d240fa8ed97871c7f00db59 | refs/heads/master | 2020-09-23T14:24:38.701208 | 2019-12-05T08:56:13 | 2019-12-05T08:56:13 | 225,520,261 | 1 | 0 | null | 2019-12-03T03:14:35 | 2019-12-03T03:14:34 | null | UTF-8 | Python | false | false | 1,724 | py | validation.py | # This file contains validation functions for network calls.
from __future__ import unicode_literals, print_function
import platform
import multiprocessing
import re
def validate_cpu_threads(n_cpu):
if n_cpu < 1:
print("CPU_THREADS has to be at least 1. Setting CPU_THREADS to 1.")
return 1
if ... |
21c408d68ef52c2964d32c28217d695a17a5c225 | fc420c31e51ef5ce6b6f2242aae4e1baccfbdda0 | /flask_app/app.py | 6b071e80ff9cad8e2da302823d67d37894ca5236 | [] | no_license | jessica-cao/mood-detection | 095b4afda3b7334eb5a7621c7f50b5ed1b0eb999 | 56f8f9616c0496eced6f320d0682d5d4502f7326 | refs/heads/master | 2020-07-26T01:41:11.332540 | 2019-09-16T22:52:15 | 2019-09-16T22:52:15 | 208,489,223 | 2 | 3 | null | null | null | null | UTF-8 | Python | false | false | 588 | py | app.py | from flask import Flask, redirect, url_for, request, render_template
import cv2
app = Flask(__name__)
@app.route('/success')
def success():
camera_port = 0
camera = cv2.VideoCapture(camera_port, cv2.CAP_DSHOW)
return_value, image = camera.read()
cv2.imwrite("image.bmp", image)
camera.release()
cv2.destr... |
f6c474aebac60b61ba9a08da894c8557e680499f | 2695d586778c3a19cad843f14f505f3e534f470d | /practice/Dynamic_Programming/Wine_2156.py | b699730c3915424dbcd8c2616fc4d0149bea22ef | [] | no_license | kjh03160/Algorithm_Basic | efdb2473186d0aff983a8c0f961d6b86ce66b0d1 | 24842569237db95629cec38ca9ea8e459857c77e | refs/heads/master | 2023-07-14T21:34:29.074373 | 2021-09-11T10:13:00 | 2021-09-11T10:13:00 | 276,395,958 | 2 | 0 | null | null | null | null | UTF-8 | Python | false | false | 517 | py | Wine_2156.py | # https://www.acmicpc.net/problem/2156
def wine(arr):
DP = [0] * len(arr)
DP[0] = arr[0]
if len(arr) > 1:
DP[1] = arr[0] + arr[1]
for i in range(2, len(arr)):
a = DP[i - 2] + arr[i] # 1번 연속 마시는 경우
b = DP[i - 3] + arr[i - 1] + arr[i] # 2번 연속 마시는 경우
c = DP[i - 1] # 0번 ... |
9fcd71513b1b67385d937a2c06808057fa225760 | 2129cb2e4589e0234fd332922d65d3518e57027e | /scripts/fire_calculate_nbr.py | 08869c89f6928348b1a020b47e782cefff877e02 | [
"CC-BY-4.0"
] | permissive | alexaac/amazon-fire-analysis | 6902709e0c93fe70a805129f787a32f3c7a74e32 | 04f0c7e013e4811ecf5e7fd4136be6092f143d30 | refs/heads/master | 2020-12-14T01:53:47.500968 | 2020-02-03T22:05:24 | 2020-02-03T22:05:24 | 234,597,153 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 5,818 | py | fire_calculate_nbr.py | '''
Created on 20 Oct 2019
Converts the scaled Digital Numbers (DN)
representing multispectral image data
acquired by Landsat 8 Operational Land Imager (OLI)
to Top of Atmosphere (ToA) Reflectance
@author: Cristina Alexa
'''
import arcpy
import os, re, math
from arcpy.sa import *
# Input parameters
landsat_fol... |
837b7bca345db9a5f98635ba2bd6d07348a16b43 | b27243f53a000513582e942f0ef17c0c76715e58 | /users/models.py | 51629875a2f19054b628c3c72ec9f6bf08597118 | [] | no_license | altanka/hury-server | 87bcad80619e55f664785c45b9edbb06b9ab80f6 | 52195253388542a82302a94c5b88e7a54dad2552 | refs/heads/master | 2023-08-13T18:51:53.453946 | 2021-09-10T17:06:03 | 2021-09-10T17:06:03 | 403,085,795 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 250 | py | models.py | from django.db import models
# Create your models here.
class User(models.Model):
email = models.EmailField(max_length=200)
id_token = models.JSONField()
def __str__(self) -> str:
return "%s: %s" % (self.email, self.id_token)
|
3534f6e010ef581dda78018855a2247404efe970 | 8a3ab7ddf8610878fbb15686aa2eff6def59db23 | /envadmin/request/models.py | 8e4ec0a34b00119e6e766a28a3f2ee6082322d57 | [] | no_license | chyangfather/envadmin | ee85ff865842bd8853157ca22f78385f1f4fc509 | c7c15ce13e2cad77d91ddce659dc3ee59d9c6049 | refs/heads/master | 2021-05-26T23:38:09.872439 | 2013-06-26T07:47:57 | 2013-06-26T07:48:08 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,710 | py | models.py | # coding=utf-8
from django.db import models
from subject.models import Subject,Person
from resource.models import *
import datetime
#import subject
class Dictionary(models.Model):
dict_key = models.CharField(max_length=255)
dict_value = models.CharField(max_length=255)
class Project(Subject):
plan_date = model... |
fc89d40efd72e958823e1e2962dfcfa0f85a5972 | 9495f3780d9146a215f8f8517b67b6d04cd40a73 | /practica comun/24_venta.py | e28761c0c045ab50da2ebcb8396adacd225b10ef | [] | no_license | aku752/ejercicios | 5c254f20f1b367b8b81e983452db8cd94419bf26 | 43c738fd76df1baf85da56acf708af5571167aef | refs/heads/master | 2021-02-25T04:57:56.735295 | 2020-04-22T15:16:20 | 2020-04-22T15:16:20 | 245,448,269 | 3 | 0 | null | null | null | null | UTF-8 | Python | false | false | 821 | py | 24_venta.py | print("--------Fabrica el cometa--------")
materia_prima = int(input("Materia prima: "))
clave = int(input("Clave del producto: "))
if clave == 3 or clave == 4:
mano_obra = materia_prima*0.75
else:
if clave == 1 or clave == 5:
mano_obra = materia_prima*0.85
else:
mano_obra = materia_prima*0.... |
f8bacda4b5e0a46753d138d84eb54953717afec1 | 02e4920166051129d1ca28a0da80405a982f1cfe | /curso_py/ex018.py | 641b1006dc6f61ebce8b0c6df0c866caad3322a4 | [] | no_license | felipeonf/Exercises_Python | 1ab40cea2466d6bb5459b5384a1dde8e1066b3b4 | 8eb2d17a35a6352fd5268a5fa43b834443171c70 | refs/heads/main | 2023-07-23T22:30:13.567469 | 2021-08-25T03:34:33 | 2021-08-25T03:34:33 | 397,062,295 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,015 | py | ex018.py | #programa que calcula descontos de acordo com os tipos de pagamentos
print('>='*10,'CASAS FELPS','>='*10)
preco = float(input('Qual é o preço do seu produto? R$'))
print('As opções de pagamento são: ')
print('''(1) - À VISTA NO DINHEIRO OU CHEQUE
(2)- À VISTA NO CARTÃO
(3)- EM ATÉ 2X NO CARTÃO
(4)- 3X OU MAIS NO... |
1bd3ba56674c0094dade9b47f0009afd38911327 | d296415851384c12efd08913fddb07123ec2471f | /pyirc/server_test.py | d9a6a35a44dd556b4111b01dea7ced26cf6a6995 | [] | no_license | Screwperman/pyirc | 3c9278c946a9cd3d47229b677eb22c88d6514cad | ecf34c0a8f83e95e846671185547f8757ccc8835 | refs/heads/master | 2016-09-16T02:02:58.141804 | 2008-03-29T22:03:45 | 2008-03-29T22:03:45 | 9,065 | 4 | 0 | null | null | null | null | UTF-8 | Python | false | false | 3,737 | py | server_test.py | # -*- coding: utf-8 -*-
#
# Tests for connection.py
import unittest
from pmock import *
import server
# Test cases.
class TestServer(unittest.TestCase):
def setUp(self):
self.w = Mock()
self.d = Mock()
# Inject a fresh mock to replace the wireproto module
server.wireproto = self.... |
f8bed8a3dbe323a53b34e13d3eb6889fe971179f | a45e8ebc8030eeb080f0b2f483375173b05ccf60 | /Test/titBitsPython.py | 433c3fdcdfc17c10f0614fb6ef6fe75aa416118c | [] | no_license | santoshr1016/OpenCV | 436098b8cba2a2a2e955181eab9be096c57cb1ec | 69456ea144e1586106bba7bdd92369aebc8625e2 | refs/heads/master | 2021-06-04T14:51:45.034114 | 2016-09-01T12:34:03 | 2016-09-01T12:34:03 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 707 | py | titBitsPython.py | import numpy as np
import sys
# from scipy import stats
# from scipy.stats import itemfreq
#The difference is that flatten always returns a copy and
#ravel returns a view of the original array whenever possible.
# but if you modify the array returned by ravel, it may modify the entries in the original array.
# If you m... |
53adcd5118c67920bf28077aa658b4ae8bad8218 | 010c5fbc97731286be00028ff33fc981d943bca3 | /primal/src/code/impute/bin/count_alleles.py | 2ab1ea915c899926a4ae235787d6df7c788cc44c | [] | no_license | orenlivne/ober | 6ce41e0f75d3a8baebc53e28d7f6ae4aeb645f30 | 810b16b2611f32c191182042240851152784edea | refs/heads/master | 2021-01-23T13:48:49.172653 | 2014-04-03T13:57:44 | 2014-04-03T13:57:44 | 6,902,212 | 7 | 1 | null | null | null | null | UTF-8 | Python | false | false | 2,737 | py | count_alleles.py | #!/usr/bin/env python
'''
============================================================
Calculate allele frequencies in a .gxn (Gaixin-format) file.
GXN format: snp name, sample ID, allele1, allele2.
Typically, the 1 allele is the minor and 2 is the major.
Row order does NOT matter.
SNP_1 SAMPLE_ID_1 A1 A2
...
SNP_1... |
0b2ce7a6804ab8a64133c7868b5fe864ff737983 | a760b5ff52ac7058dcc132b53f8da8ed414dc7a7 | /bms/bms/league_mgt_system/management/commands/generate_users.py | 951b32b57652bd9bbe4d04ceeff61dc22b0350c2 | [] | no_license | damithme/bms-server | 5809919054453e687fe735d0124339ec8b0c52a4 | f7d0858f0f22292250f507ac5fff162bab9228b3 | refs/heads/master | 2022-04-24T16:04:24.008843 | 2020-04-27T02:48:58 | 2020-04-27T02:48:58 | 259,079,917 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 5,471 | py | generate_users.py | from django.core.management import BaseCommand
from bms.league_mgt_system.models import User, Tournament, Round, Team, Player, Game, PlayerPerformance
import random
from random import randint
from datetime import datetime, timedelta
class Command(BaseCommand):
help = "Generate User Data"
def handle(self, *ar... |
7dcf77586b30584c17cb8b6e104afc35060edc8c | ed80d30b458df03821fab32bec4969f8fefe6a50 | /app/migrations/0002_auto_20170331_1817.py | ba97cc10b4c32cb140880bbd87ff0d290d90a603 | [] | no_license | elizabethbarr/WhereTheTruckDev | a717567377c55a55b18646c2f0ab348fc4b1b1ed | caeea5ce5d4a7a0837178f838d519dd3be72aede | refs/heads/master | 2020-03-09T00:03:49.227914 | 2018-04-06T22:45:29 | 2018-04-06T22:45:29 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 781 | py | 0002_auto_20170331_1817.py | # -*- coding: utf-8 -*-
# Generated by Django 1.9.9 on 2017-03-31 18:17
from __future__ import unicode_literals
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('app', '0001_initial'),
]
operations = [
migrations.AlterField(
m... |
d0b2540aecc90df16caff566355285347fa58da3 | 9bf51c5d6a3666448ddfd4bf2f0b3301afaa4463 | /app/utilities/validators/date.py | d2d8d973dd3b9c844878a5af14f91c620c9790dd | [] | no_license | Madscientiste/OpenClassrooms_P4 | f997a9585fae8b62785832857ab22f80b8001c0d | 18a6dfc63a2a6b709391d9e0a0265dc46da71c8b | refs/heads/main | 2023-05-05T15:25:28.318984 | 2021-05-28T10:09:07 | 2021-05-28T10:09:07 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 653 | py | date.py | # flake8: noqa
from datetime import datetime
from prompt_toolkit.validation import Validator, ValidationError
class DateValidator(Validator):
def validate(self, document):
try:
datetime.strptime(document.text, "%d/%m/%Y")
except:
raise ValidationError(
messa... |
ac754b53f1ec11d23d51be834343a4398db1e931 | c20eb645111e14b8c2f3d1c0ddb3da98a1dc9c31 | /Preview/webserver.py | abb67578f8040a2595e5c11133d044ae2385dc5e | [] | no_license | sagarPakhrin/PP4E | db54f9c7d7bd2cc848f973b83e5c93bcad618424 | 5f542be426417002f18dc66b600c8f18c46582d2 | refs/heads/master | 2020-05-20T23:00:58.539004 | 2019-05-13T11:46:46 | 2019-05-13T11:46:46 | 185,793,205 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 210 | py | webserver.py | import os,sys
from http.server import HTTPServer, CGIHTTPRequestHandler
webdir = "."
port = 80
os.chdir(webdir)
srvaddr = ("",port)
srvrobj = HTTPServer(srvaddr, CGIHTTPRequestHandler)
srvrobj.serve_forever()
|
1ac4bd4adc9be3db01c376227aba40154760560f | dff3499e9fb877bb9f2b2934ed701a15fd24dae6 | /assignment3_codes/big_data_codes/fetch_tweets.py | 1a975431586eb55b9b99160be9955d97fe3f435c | [] | no_license | rashmikaibrahimpatnam/Database_assignments | 7e2fae604e65a2be9ba3fd9ade74d419572c524b | a9a26f1b598e5870491ab8377f3fe86eea3a0174 | refs/heads/master | 2023-02-18T10:10:55.873490 | 2020-12-06T01:27:27 | 2020-12-06T01:27:27 | 327,420,166 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 3,818 | py | fetch_tweets.py | import tweepy
from listener import TweeListener
from tweepy import Stream
from connect_db import ConnectDb
from clean_data import CleanData
import bson
'''
class that extracts tweets using the
streaming in tweepy
'''
class TweetExtraction():
def __init__(self,connect):
self.connect = connec... |
b955af506787dd47b1c0528049cc59697b637429 | 9d986aec511e8d3bbf9ce27800f9ac1ec5aebab2 | /StockQuery/StockQuery.py | 3d583818a0ab36427d9e627cad9ad10ed2ddfbbf | [] | no_license | idealegg/stock_search | 2dd7b2eb9b3ae3c779613451ebeddc31e1cd4383 | 72204f08ccd11de7108cd07bd476c11b675d04c2 | refs/heads/master | 2020-04-02T05:44:22.878950 | 2019-09-17T06:29:09 | 2019-09-17T06:29:09 | 62,101,299 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,495 | py | StockQuery.py | # -*- coding: utf-8 -*-
import urllib2
import chardet
import json
import pprint
from ConfigManager.ConfigManager import ConfigManager
from StockCodeQuery.StockCodeQuery import StockCodeQuery
class StockQuery:
def __init__(self):
self.url = ''
self.req = None
self.resp = None
self.c... |
73dd782bde4cc5c7f09214b651c90d97e09085ee | 0cc045c389b807c7df6485ecf10ebe644b6eb7a5 | /data_modeling/etl.py | bd0a800c7fe311373af5aa3d80fd2a1760968bd1 | [
"MIT"
] | permissive | cristhianmurcia182/dend-02-data-modeling-apache-cassandra | f39af0bd075568c48caf20365cc3b1a0aac533cc | 72b26e242b4ae95c31c59f4987376c3fc58c8528 | refs/heads/master | 2020-06-15T14:17:39.195798 | 2019-04-17T16:51:29 | 2019-04-17T16:51:29 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,060 | py | etl.py | """
This module provides methods to load the raw data, prepare it and
store it in the data warehouse.
"""
import logging
import cql_queries
from db import create_session, insert
from etl_steps.prepare import PreparerQuery1, PreparerQuery2, \
PreparerQuery3
from utils import read_file
logging.basicConfig(filename... |
19de941bea4e085fda262fb01dc5792dd4181fbb | 99b514dc6b0f4f035056ce0f9e982001a1f95846 | /lab7_q4.py | dda32dd98de2763dffcb7135079c40a564700b6a | [] | no_license | avijit621/Python-Sem-2- | 838f21dab96abc1586b7f95607b46a83e7ce0fef | be59c91ec565b19f18420f5f03e14b6e2d97f325 | refs/heads/master | 2023-04-23T03:48:00.965536 | 2021-04-25T09:26:28 | 2021-04-25T09:26:28 | 343,720,838 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,229 | py | lab7_q4.py | import numpy as np
import matplotlib.pyplot as plt
def CompareConvergence():
f=lambda x:x- np.cos(x) # function f
df=lambda x: 1+np.sin(x) # derivative of f
# Calculation by secant method
x0=0
x1=5
h=0
secant_value=[]
secant_counter=[]
while abs(f(x1))>10 ** (-10): # error threshold ... |
41e04db5cc89d9cc16dbc846aa63ba0daf209335 | 1c466d877aa078be3bfa7ae3374c2cd27e4e6543 | /blog/user_profile/forms.py | f04d737554db9bbf14f803c9090a3f6e8a83ec00 | [] | no_license | skripka696/blog | 9bc93263125984d6368a2d66ff6cd1236d7f77d1 | 652c4c152d547819b4fc9b55912ced3092f73977 | refs/heads/master | 2021-01-23T05:30:12.878488 | 2017-03-30T13:53:52 | 2017-03-30T13:53:52 | 86,314,647 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,458 | py | forms.py | from django import forms
from django.contrib.auth import get_user_model
from user_profile.models import User
from django.contrib.auth.forms import UserCreationForm, AuthenticationForm
from blog.settings import RECAPTCHA_PRIVATE_KEY
import requests
import json
class BootstrapStyleForm(forms.Form):
def __init__(se... |
8cebb22129faa222f8546860009fd262f91d31a9 | 401f9d26571d67c014f060bb7427aba1f533dbce | /keyboards/default/menu_keyboard.py | 93e7561e037d306d70da048f08e815253b639324 | [] | no_license | rezakien/docker-ready-python-shop | 7802f2e5fa034ffc1d52ed2ae008af3a2b9c9a14 | 50c484c151a1b0dfd18ed23c34ab1c7c73d02f00 | refs/heads/master | 2023-05-16T17:00:44.789418 | 2021-06-10T10:27:03 | 2021-06-10T10:27:03 | 367,644,858 | 0 | 1 | null | null | null | null | UTF-8 | Python | false | false | 516 | py | menu_keyboard.py | from aiogram.types import ReplyKeyboardMarkup, KeyboardButton
from loader import _
def get_menu_keyboard(locale=None):
return ReplyKeyboardMarkup(resize_keyboard=True, keyboard=[
[KeyboardButton(_("Категории 🗂", locale=locale)), KeyboardButton(_("Корзина 🛒", locale=locale))],
[KeyboardButton(_("... |
270cc7f280194692f1d5e348286d2207a6f76887 | 7cbb1bc4550aa76790db242c8ba1cdb9550ce426 | /europeana_circus.py | 7e6dbae587017c672000172df04a5857a376e63c | [] | no_license | ErinEMcC/pfch-2015 | b8765bfc380994ab72266964b0a7f2316946f4af | 08461f781d46ae4625cdff960db6c79b52e23bc2 | refs/heads/master | 2021-01-10T17:19:45.290085 | 2015-12-17T23:00:40 | 2015-12-17T23:00:40 | 44,770,564 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 359 | py | europeana_circus.py | import requests
import json
r = requests.get('http://www.europeana.eu/api/v2/search.json?wskey=JQ4CNwmGL&query=europeana_collectionName%3A2021603*&qf=YEAR%3A%5B1900+TO+1901%5D&start=1&rows=12&profile=standard')
print(r.status_code)
print ("\n")
print(r.text)
print ("\n")
#turn it into a python dictonary
#data = js... |
eff1d1fc43a6096a54831815fff7af0f8ab0aed5 | 755fdbcc65c6f5ec3647a2a5fd224d8437e54280 | /python/pythonlx/mypy19--元祖的访问和计数.py | 6d53bcfcf40fd5fdbd3ff5bd9a9847c2942f057b | [] | no_license | qinzhuhe/webStudy | d26bb7d751f024f8b0fda548c714f25c93b112ab | c1607f68a9d67ebc962b23b8bb6bb6d8ffc0317f | refs/heads/master | 2023-01-11T18:47:19.511959 | 2020-09-24T15:32:01 | 2020-09-24T15:32:01 | 188,851,384 | 0 | 0 | null | 2023-01-07T15:09:34 | 2019-05-27T13:46:01 | JavaScript | UTF-8 | Python | false | false | 1,031 | py | mypy19--元祖的访问和计数.py | Python 3.7.1 (v3.7.1:260ec2c36a, Oct 20 2018, 14:05:16) [MSC v.1915 32 bit (Intel)] on win32
Type "help", "copyright", "credits" or "license()" for more information.
>>> a = (20,30,40)
>>> a[0]
20
>>> a[1]
30
>>> a[1]=300
Traceback (most recent call last):
File "<pyshell#3>", line 1, in <module>
a[1]=300
TypeErro... |
3c1ee408e626a8c04813bc0671cb50977a31aa5f | 2132d3eed6014feaf300c29f5c6c8457e694cc03 | /pyforum/urls.py | ed6856cc734c6423a24873e318e266d5c5a19761 | [
"MIT"
] | permissive | linzeyang/pyforum | e1aaed48c1a2f4cf17414cb26ddf3e20a62ae642 | 204990d7f07f62d49eeb0fff1a22f640a437d9b9 | refs/heads/master | 2020-05-15T22:56:17.928454 | 2014-07-17T15:57:41 | 2014-07-17T15:57:41 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,681 | py | urls.py | from django.conf.urls import patterns, url
# Uncomment the next two lines to enable the admin:
# from django.contrib import admin
# admin.autodiscover()
urlpatterns = patterns('pyforum.views',
# Examples:
# url(r'^$', 'mysite.views.home', name='home'),
# url(r'^mysite/', include('mysite.foo.urls')),
... |
27d690c5a013a520f8a68364c0289f2dbdbcaecd | b2b340a03ed1f930347512ee0dcd885cbb64da0f | /iconGen/iconGen.py | 1979f70376f758c93eddc62ffc5597ea58fa3c22 | [
"MIT"
] | permissive | Madoshakalaka/icon-generator | ed619e9a418eaecfef49e00f68084062efb4e394 | 86085debcdfc9bb375c800436f364121fea29662 | refs/heads/master | 2022-07-07T17:05:06.537489 | 2019-07-22T05:29:57 | 2019-07-22T05:29:57 | 192,803,273 | 4 | 0 | MIT | 2022-06-21T22:10:55 | 2019-06-19T20:56:45 | Python | UTF-8 | Python | false | false | 8,958 | py | iconGen.py | #!/usr/bin/env python3
import argparse
import sys
from os import mkdir, path
from os.path import isfile, isdir
from cv2 import cv2
from cv2.cv2 import imread, selectROI, imshow
NO_POINT = 0
ONE_POINT = 1
TWO_POINT = 2
STATE = NO_POINT
POINTS = [0, 0, 0, 0] # x_min, x_max, y_min, y_max
def mouse_callback(event, x,... |
541b48591f49d0c0ba8130de3df1ce035764d96d | 2a3743ced45bd79826dcdc55f304da049f627f1b | /venv/lib/python3.7/site-packages/jedi/third_party/typeshed/stdlib/3/_tracemalloc.pyi | 21d00332ad3738b8eb2473888a92561a04924e92 | [
"MIT",
"Apache-2.0"
] | permissive | Dimasik007/Deribit_funding_rate_indicator | 12cc8cd7c0be564d6e34d9eae91940c62492ae2a | 3251602ae5249069489834f9afb57b11ff37750e | refs/heads/master | 2023-05-26T10:14:20.395939 | 2019-08-03T11:35:51 | 2019-08-03T11:35:51 | 198,705,946 | 5 | 3 | MIT | 2023-05-22T22:29:24 | 2019-07-24T20:32:19 | Python | UTF-8 | Python | false | false | 639 | pyi | _tracemalloc.pyi | """Stub file for the '_tracemalloc' module."""
# This is an autogenerated file. It serves as a starting point
# for a more precise manual annotation of this module.
# Feel free to edit the source below, but remove this header when you do.
from typing import Any
def _get_object_traceback(*args, **kwargs) -> Any: ...
... |
162cd8b09508995dd00cbfbb6adf4004b36b6153 | 5aaf6389130f58bd44c2ae264bc75a3ee5787cfa | /CHAZvBeta/src/module_GenBamPred.py | f581ea9423cf1d2baf0580164cbca793348ff6c2 | [
"MIT"
] | permissive | Wenbo-Duan/CHAZ | effa6fb0808f588f85e90436bd3bad9d47e4cd05 | 195dd3e59e2a9aa7d5213c99d3d8bfaaada700ea | refs/heads/main | 2023-08-13T23:11:23.766344 | 2021-09-20T20:47:46 | 2021-09-20T20:47:46 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 24,101 | py | module_GenBamPred.py | #!/usr/bin/env python
import numpy as np
import calendar
import random
import time
import sys
import dask.array as da
import os
import gc
import pickle
import copy
import pandas as pd
import module_riskModel as mrisk
import Namelist as gv
import pandas as pd
import netCDF4 as nc
from netCDF4 import Dataset
from scipy i... |